diff --git a/orval.config.ts b/orval.config.ts new file mode 100644 index 0000000..4f4aa5f --- /dev/null +++ b/orval.config.ts @@ -0,0 +1,66 @@ +// orval.config.ts +import { defineConfig } from 'orval' + +export default defineConfig({ + reportSystem: { + input: { + target: process.env.API_DOCS_URL ?? 'http://localhost:8080/v3/api-docs', + }, + output: { + target: 'src/api/endpoints', + schemas: 'src/api/models', + client: 'react-query', + mode: 'tags-split', + override: { + mutator: { + path: 'src/utils/http/clients/coreBackend.client.ts', + name: 'coreBackendClient', + }, + query: { + useQuery: true, + useMutation: true, + }, + // ── Fix GET endpoints that were generated as mutations ── + operations: { + getReports: { + query: { useQuery: true, useMutation: false }, + }, + getProfile: { + query: { useQuery: true, useMutation: false }, + }, + getDashboardCounts: { + query: { useQuery: true, useMutation: false }, + }, + getImage: { + query: { useQuery: true, useMutation: false }, + }, + getUserImage: { + query: { useQuery: true, useMutation: false }, + }, + // ── Fix POST endpoints that should be mutations ── + moderateReport: { + query: { useQuery: false, useMutation: true }, + }, + createReport: { + query: { useQuery: false, useMutation: true }, + }, + logoutAuth: { + query: { useQuery: false, useMutation: true }, + }, + updateProfile: { + query: { useQuery: false, useMutation: true }, + }, + uploadProfileImage: { + query: { useQuery: false, useMutation: true }, + }, + uploadCoverImage: { + query: { useQuery: false, useMutation: true }, + }, + updatePost: { + query: { useQuery: false, useMutation: true }, + }, + }, + }, + }, + }, +}) diff --git a/orvalAPIGeneration.md b/orvalAPIGeneration.md new file mode 100644 index 0000000..a6f9f48 --- /dev/null +++ b/orvalAPIGeneration.md @@ -0,0 +1,417 @@ +# Orval API Code Generation + +## Overview + +This project uses [Orval](https://orval.dev) to auto-generate TypeScript types, Axios client functions, and TanStack Query hooks directly from the backend OpenAPI spec. + +**The rule:** `src/api/` is owned entirely by Orval. Never edit files inside it manually — they are regenerated and overwritten every time `pnpm generate` runs. + +--- + +## How It Fits Together + +``` +Backend Spring API + ↓ +OpenAPI spec (/v3/api-docs) + ↓ +Orval reads spec → generates src/api/ + ↓ +Generated hooks use TanStack Query internally + ↓ +Feature hooks (src/features/*/hooks/) wrap generated hooks + ↓ +Views consume feature hooks +``` + +| Tool | Role | +| ----------------------------- | -------------------------------------------------- | +| **Orval** | Code generator — reads spec, writes TypeScript | +| **TanStack Query** | Runtime engine — caching, loading state, refetch | +| **Axios (coreBackendClient)** | HTTP transport — auth headers, interceptors, retry | + +--- + +## Folder Structure + +``` +src/ +├── api/ ← ORVAL OWNS THIS — never edit manually +│ ├── models/ ← generated TypeScript interfaces + enums +│ │ ├── moderationReport.ts +│ │ ├── moderationReportStatus.ts +│ │ ├── createReportRequest.ts +│ │ ├── userProfile.ts +│ │ └── index.ts ← barrel export for all models +│ └── endpoints/ ← generated hooks split by OpenAPI tag +│ ├── authentication/ +│ │ └── authentication.ts +│ ├── reports/ +│ │ └── reports.ts ← useGetReports, useModerateReport +│ ├── posts/ +│ │ └── posts.ts +│ └── users/ +│ └── users.ts ← useGetProfile, useUpdateProfile +│ +└── features/ + └── moderation/ + └── hooks/ ← YOU OWN THIS + ├── useReports.ts ← thin wrapper over useGetReports + └── useModerateAction.ts ← thin wrapper over useModerateReport +``` + +--- + +## Setup + +### Prerequisites + +- Backend running at `http://localhost:8080` +- Spec available at `http://localhost:8080/v3/api-docs` + +### Install + +```bash +pnpm add -D orval +pnpm add @tanstack/react-query +``` + +### Generate + +```bash +pnpm generate +``` + +This command hits the backend spec URL, reads all endpoints, and regenerates everything inside `src/api/`. + +--- + +## Configuration + +```ts +// orval.config.ts — project root +import { defineConfig } from 'orval' + +export default defineConfig({ + reportSystem: { + input: { + // Live backend URL. Falls back to static file if backend is not running. + target: process.env.API_DOCS_URL ?? 'http://localhost:8080/v3/api-docs', + }, + output: { + target: 'src/api/endpoints', + schemas: 'src/api/models', + client: 'react-query', + mode: 'tags-split', // one file per OpenAPI tag + override: { + mutator: { + // All generated hooks use this Axios instance — inherits auth + // interceptors, retry logic, and error handling automatically + path: 'src/utils/http/clients/coreBackend.client.ts', + name: 'coreBackendClient', + }, + query: { + useQuery: true, + useMutation: true, + }, + // Per-operation overrides — corrects query vs mutation assignment + // that Orval gets wrong due to OpenAPI 3.1.0 compatibility gaps + operations: { + // GET endpoints forced to useQuery (cached, refetchable) + getReports: { query: { useQuery: true, useMutation: false } }, + getProfile: { query: { useQuery: true, useMutation: false } }, + getDashboardCounts: { query: { useQuery: true, useMutation: false } }, + getImage: { query: { useQuery: true, useMutation: false } }, + getUserImage: { query: { useQuery: true, useMutation: false } }, + // POST write operations forced to useMutation (fire-and-forget) + moderateReport: { query: { useQuery: false, useMutation: true } }, + createReport: { query: { useQuery: false, useMutation: true } }, + logoutAuth: { query: { useQuery: false, useMutation: true } }, + updateProfile: { query: { useQuery: false, useMutation: true } }, + uploadProfileImage: { query: { useQuery: false, useMutation: true } }, + uploadCoverImage: { query: { useQuery: false, useMutation: true } }, + updatePost: { query: { useQuery: false, useMutation: true } }, + }, + }, + }, + }, +}) +``` + +### Environment Variables + +| Variable | Description | Default | +| ---------------------- | --------------------------------------- | ----------------------------------- | +| `API_DOCS_URL` | OpenAPI spec URL used during generation | `http://localhost:8080/v3/api-docs` | +| `VITE_BACKEND_API_URL` | Base URL used at runtime for API calls | Set in `.env.local` | + +```bash +# .env.local +VITE_BACKEND_API_URL=http://localhost:8080 +API_DOCS_URL=http://localhost:8080/v3/api-docs +``` + +--- + +## The Mutator — coreBackendClient + +Orval routes every generated API call through `coreBackendClient`. This means all generated hooks automatically inherit: + +- Bearer token attachment (via `attachAuthToken` interceptor) +- Automatic token refresh on 401 (via `refreshTokenInterceptor`) +- Retry on network failure (via `retryInterceptor`) +- Standardised error handling (via `errorInterceptor`) + +```ts +// src/utils/http/clients/coreBackend.client.ts +import type { AxiosRequestConfig } from 'axios' + +const axiosInstance = createAxiosClient(backendApiUrl, [ + attachAuthToken, + refreshTokenInterceptor, + retryInterceptor, + errorInterceptor, +]) + +// Orval calls this function for every generated request +// It must be a callable function — not the Axios instance directly +export const coreBackendClient = (config: AxiosRequestConfig): Promise => { + return axiosInstance(config).then((response) => response.data) +} +``` + +> **Why a function and not the instance directly?** +> Orval calls `coreBackendClient(config)` for each request. An Axios instance is callable, but Orval's TypeScript type for a mutator expects `(config) => Promise` — a plain function signature. The wrapper satisfies that contract. + +--- + +## Generated Models + +All backend DTOs are generated as TypeScript interfaces in `src/api/models/`. + +### Key types for the moderation dashboard + +```ts +// Moderation report — mirrors Java ModerationReport entity +import type { ModerationReport } from '@/api/models' + +// Report status enum — mirrors Java ReportStatus +import type { ModerationReportStatus } from '@/api/models' +// Values: 'PENDING' | 'AI_SCREENING' | 'ESCALATED' | 'RESOLVED' + +// Moderation action enum — mirrors Java ModerationAction +import type { ModerationReportActionTaken } from '@/api/models' +// Values: 'NONE' | 'WARN' | 'REMOVE_CONTENT' | 'BAN_REPORTER' | 'BAN_AUTHOR' | 'ESCALATE' | 'DISMISS' + +// Filing a report +import type { CreateReportRequest } from '@/api/models' + +// Moderator action request +import type { ModerateReportRequest } from '@/api/models' + +// User profile +import type { UserProfile } from '@/api/models' +``` + +### Important note on `ApiSuccessResponse` + +Your backend wraps most responses in an envelope: + +```json +{ + "message": "Reports fetched", + "http-status": "OK", + "data": [ ...actual payload... ] +} +``` + +The generated `data` field is typed as `unknown` because the spec uses a generic `ApiSuccessResponse`. When consuming these endpoints, unwrap with: + +```ts +const reports = (response.data as ModerationReport[]) ?? [] +``` + +Endpoints that have specific response types (like `GET /reports → ModerationReport[]`) are correctly typed and don't need casting. + +--- + +## Generated Hooks + +### Query hooks (GET — cached, refetchable) + +```ts +import { useGetReports } from '@/api/endpoints/reports/reports' +import { useGetProfile } from '@/api/endpoints/users/users' +import { useGetDashboardCounts } from '@/api/endpoints/posts/posts' + +// Usage +const { data, isLoading, error, refetch } = useGetReports({ status: 'ESCALATED' }) +``` + +### Mutation hooks (POST/write — fire-and-forget) + +```ts +import { useModerateReport } from '@/api/endpoints/reports/reports' +import { useCreateReport } from '@/api/endpoints/reports/reports' +import { useLogoutAuth } from '@/api/endpoints/authentication/authentication' + +// Usage +const mutation = useModerateReport() +mutation.mutateAsync({ id: 'RPT-001', moderateReportRequest: { action: 'BAN_AUTHOR' } }) +``` + +--- + +## Feature Hook Pattern + +Never use generated hooks directly in views. Always wrap them in a feature hook that adds app-specific logic. + +### useReports + +```ts +// src/features/moderation/hooks/useReports.ts +import { useGetReports } from '@/api/endpoints/reports/reports' +import type { ModerationReportStatus } from '@/api/models' + +export function useReports(status?: ModerationReportStatus) { + const { data, isLoading, error } = useGetReports( + { status }, + { query: { staleTime: 10_000 } } // cache for 10s, refetch in background + ) + + return { + reports: data?.data ?? [], // unwrap ApiSuccessResponse envelope + isLoading, + error: error?.message ?? null, + } +} +``` + +### useModerateAction + +```ts +// src/features/moderation/hooks/useModerateAction.ts +import { useModerateReport } from '@/api/endpoints/reports/reports' +import { useQueryClient } from '@tanstack/react-query' +import { getGetReportsQueryKey } from '@/api/endpoints/reports/reports' + +export function useModerateAction() { + const queryClient = useQueryClient() + const mutation = useModerateReport() + + const moderate = async (id: string, action: string, note?: string) => { + await mutation.mutateAsync({ + id, + moderateReportRequest: { action, note }, + }) + // Invalidate cache so queue refetches automatically after action + // Same concept as @CacheEvict in Spring + queryClient.invalidateQueries({ + queryKey: getGetReportsQueryKey(), + }) + } + + return { + moderate, + isProcessing: mutation.isPending, + error: mutation.error?.message ?? null, + } +} +``` + +### In a view + +```ts +// features/moderation/views/ModerationQueue.tsx +import { useReports } from '../hooks/useReports' +import { useModerateAction } from '../hooks/useModerateAction' + +export default function ModerationQueue() { + const { reports, isLoading } = useReports('PENDING') + const { moderate, isProcessing } = useModerateAction() + + return ( + // ... + ) +} +``` + +--- + +## Query Key Management + +Orval generates a query key function for every `useQuery` hook. Use these for cache invalidation — never hardcode strings. + +```ts +import { getGetReportsQueryKey, getGetProfileQueryKey } from '@/api/endpoints/reports/reports' + +// Invalidate after moderation action +queryClient.invalidateQueries({ queryKey: getGetReportsQueryKey() }) + +// Invalidate with filter params +queryClient.invalidateQueries({ queryKey: getGetReportsQueryKey({ status: 'PENDING' }) }) +``` + +--- + +## When to Regenerate + +Run `pnpm generate` whenever: + +- Backend adds a new endpoint +- Backend changes a request or response shape +- Backend renames a field or enum value +- You pull new backend changes from Git + +After regenerating, TypeScript will immediately highlight every place in the codebase that needs updating — same guarantee as a Java interface change propagating through all implementations. + +--- + +## Adding a New Backend Endpoint — Workflow + +``` +1. Backend engineer adds endpoint + updates OpenAPI spec +2. Frontend engineer runs: pnpm generate +3. New hook appears in src/api/endpoints//.ts +4. New types appear in src/api/models/ +5. If the hook is GET → check it generated as useQuery, not useMutation + If wrong → add an operations override in orval.config.ts +6. Create a feature hook wrapper in features//hooks/ +7. Consume in the view +``` + +--- + +## Known Issues & Workarounds + +### OpenAPI 3.1.0 compatibility + +The backend spec uses `openapi: 3.1.0`. Orval has incomplete support for 3.1.0 which causes some GET endpoints to be generated as `useMutation` instead of `useQuery`. This is corrected via the `operations` overrides in `orval.config.ts`. When adding new GET endpoints, verify the generated hook type and add an override if needed. + +### Generic ApiSuccessResponse + +Most endpoints return `ApiSuccessResponse` with `data: unknown`. Strongly-typed endpoints (like `GET /reports`) are correct. For weakly typed ones, cast the data field at the feature hook boundary — never in the view. + +### POST endpoints used for fetching + +Several backend endpoints use POST for data retrieval (`/post/getAllPost`, `/post/getUserProfile`). Orval generates these as `useQuery` with POST method. This is correct behaviour — TanStack Query is HTTP-method agnostic. Do not change these to mutations. + +--- + +## Gitignore Decision + +`src/api/` is **committed to Git** in this project. This means: + +- Generated code is visible in PRs and code reviews +- No extra setup step required after cloning +- Diffs show exactly what changed when the spec updates + +If you prefer to gitignore it, add `pnpm generate` as a `postinstall` script in `package.json` so it runs automatically after `pnpm install`. + +```json +// package.json +"scripts": { + "generate": "orval", + "postinstall": "orval" +} +``` diff --git a/package.json b/package.json index 7b7499e..c225e41 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "storybook": "storybook dev -p 6006", "build-storybook": "storybook build", "chromatic": "npx chromatic --project-token=chpt_bd8d0a3ce41cca0", - "generate:api": "openapi-typescript http://localhost:8080/v3/api-docs -o src/api/generated/types.ts" + "generate": "orval --config orval.config.ts" }, "lint-staged": { "*.{js,jsx,ts,tsx,json,css,scss,md}": [ @@ -28,6 +28,7 @@ "@react-oauth/google": "^0.12.2", "@storybook/react": "^10.3.6", "@tailwindcss/vite": "^4.2.4", + "@tanstack/react-query": "^5.100.11", "@types/js-cookie": "^3.0.6", "@vitejs/plugin-react-swc": "^4.3.0", "axios": "^1.13.2", @@ -72,7 +73,7 @@ "globals": "^17.5.0", "husky": "^9.1.7", "lint-staged": "^17.0.2", - "openapi-typescript": "^7.13.0", + "orval": "^8.11.0", "playwright": "^1.59.1", "prettier": "^3.8.3", "prettier-plugin-tailwindcss": "^0.8.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ac6a7a9..f561b02 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -20,6 +20,9 @@ importers: '@tailwindcss/vite': specifier: ^4.2.4 version: 4.3.0(vite@8.0.11(@types/node@24.12.3)(esbuild@0.27.7)(jiti@2.7.0)(yaml@2.8.4)) + '@tanstack/react-query': + specifier: ^5.100.11 + version: 5.100.11(react@19.2.6) '@types/js-cookie': specifier: ^3.0.6 version: 3.0.6 @@ -147,9 +150,9 @@ importers: lint-staged: specifier: ^17.0.2 version: 17.0.4 - openapi-typescript: - specifier: ^7.13.0 - version: 7.13.0(typescript@6.0.3) + orval: + specifier: ^8.11.0 + version: 8.11.0(prettier@3.8.3)(typescript@6.0.3) playwright: specifier: ^1.59.1 version: 1.59.1 @@ -267,6 +270,11 @@ packages: peerDependencies: storybook: ^0.0.0-0 || ^10.1.0 || ^10.1.0-0 || ^10.2.0-0 || ^10.3.0-0 || ^10.4.0-0 + '@commander-js/extra-typings@14.0.0': + resolution: {integrity: sha512-hIn0ncNaJRLkZrxBIp5AsW/eXEHNKYQBh0aPdoUqNgD+Io3NIykQqpKFyKcuasZhicGaEZJX/JBSIkZ4e5x8Dg==} + peerDependencies: + commander: ~14.0.0 + '@emnapi/core@1.10.0': resolution: {integrity: sha512-yq6OkJ4p82CAfPl0u9mQebQHKPJkY7WrIuk205cTYnYe+k2Z8YBh11FrbRG/H6ihirqcacOgl2BIO8oyMQLeXw==} @@ -476,6 +484,9 @@ packages: resolution: {integrity: sha512-43/qtrDUokr7LJqoF2c3+RInu/t4zfrpYdoSDfYyhg52rwLV6TnOvdG4fXm7IkSB3wErkcmJS9iEhjVtOSEjjA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@gerrit0/mini-shiki@3.23.0': + resolution: {integrity: sha512-bEMORlG0cqdjVyCEuU0cDQbORWX+kYCeo0kV1lbxF5bt4r7SID2l9bqsxJEM0zndaxpOUT7riCyIVEuqq/Ynxg==} + '@heroicons/react@2.2.0': resolution: {integrity: sha512-LMcepvRaS9LYHJGsF0zzmgKCUim/X3N/DQKc4jepAXJ7l8QxJ1PmxJzqplF2Z3FE4PqBAIGyJAQ/w4B5dsqbtQ==} peerDependencies: @@ -541,6 +552,56 @@ packages: '@neoconfetti/react@1.0.0': resolution: {integrity: sha512-klcSooChXXOzIm+SE5IISIAn3bYzYfPjbX7D7HoqZL84oAfgREeSg5vSIaSFH+DaGzzvImTyWe1OyrJ67vik4A==} + '@nodelib/fs.scandir@2.1.5': + resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} + engines: {node: '>= 8'} + + '@nodelib/fs.stat@2.0.5': + resolution: {integrity: sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==} + engines: {node: '>= 8'} + + '@nodelib/fs.walk@1.2.8': + resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} + engines: {node: '>= 8'} + + '@orval/angular@8.11.0': + resolution: {integrity: sha512-L6vl2gX0Bn9Wn3b00juWpM+UZJlUT0EaTyWKFMzllq3rU+vL1yItAioL2SmTVeJghSktshB31wYX0YqL5JnUbQ==} + + '@orval/axios@8.11.0': + resolution: {integrity: sha512-cwD9XEQEvWfEZrjTDvmMKwbY63LqlGVQzZdCVEcVrxP+KohaFBMIBIUmgL2Y5twkKEg08IxnzI8+M4K2PbpJ0w==} + + '@orval/core@8.11.0': + resolution: {integrity: sha512-E4scpBLgmUsz1OLSXT/A66a2+w/F4syBwgVp+iI4Ex6KSMMBEfUJVpfi3U6zSHSALauMNrloSBywq/F67DvOcQ==} + peerDependencies: + '@faker-js/faker': '>=10' + peerDependenciesMeta: + '@faker-js/faker': + optional: true + + '@orval/fetch@8.11.0': + resolution: {integrity: sha512-tiCRJgEl7CUntzbntkf/lsKkUNgCn8sdyPfIS8M0W8NVQVzAQvP4PwPHoY4/syOhK7zQje2pwLm/HAfz+9XyDg==} + + '@orval/hono@8.11.0': + resolution: {integrity: sha512-g0Ht6J/9Hcto8UjJzhNQZk/5/uhPOu928Qrog3vCVHOXHvt/6k4al76hABf00xDnizbNApUQ54JS27rs1v98KA==} + + '@orval/mcp@8.11.0': + resolution: {integrity: sha512-1PMOdJvntWOGn67IV1Vn8oWMOImx/kH1YftumlK9FxJc/meMbjGNNYohhumedqSPcIjdtekzDNKrqvC0utWRAg==} + + '@orval/mock@8.11.0': + resolution: {integrity: sha512-hch3Jhgrm/XcCV6e+w3uv+4RRcAY3WPHdQoMMog3PfB9ocSgM+80CRv8GhJTK2U4oesUYanYlHa8zqLs9HF+4g==} + + '@orval/query@8.11.0': + resolution: {integrity: sha512-+VKldxLOGvcn6mf5tWFz/7LKimCRvN5jp8kSv4wJCniSr95rAjWjYr2kUz9gvKHs38CiPX/yWJIZIMCTpvXeoA==} + + '@orval/solid-start@8.11.0': + resolution: {integrity: sha512-NomnUGbt8PwGR+st+vH6YmvWSoeuut628rxBMDnM2j2HNln4qat4iOuwxYbyu1s9do7sdgR7R08spVRQ07J1ng==} + + '@orval/swr@8.11.0': + resolution: {integrity: sha512-yhKAF3JsiwONrLvuFEqWlHFDtDrrbPXSUijufmB02ZCzV8T+9vavLRW2bZV1M3StqophQ425yPaxw69g2eqh1Q==} + + '@orval/zod@8.11.0': + resolution: {integrity: sha512-/VcupTOIoE+pZgPO9/2fEy4GDzxcIrN+p/l14/sfxzOyOoeRRCyOPuIv1HMkXILYfFmo9PJTwbaPwxOSquErdA==} + '@oxc-project/types@0.128.0': resolution: {integrity: sha512-huv1Y/LzBJkBVHt3OlC7u0zHBW9qXf1FdD7sGmc1rXc2P1mTwHssYv7jyGx5KAACSCH+9B3Bhn6Z9luHRvf7pQ==} @@ -553,16 +614,6 @@ packages: react: '>=16.8.0' react-dom: '>=16.8.0' - '@redocly/ajv@8.11.2': - resolution: {integrity: sha512-io1JpnwtIcvojV7QKDUSIuMN/ikdOUd1ReEnUnMKGfDVridQZ31J0MmIuqwuRjWDZfmvr+Q0MqCcfHM2gTivOg==} - - '@redocly/config@0.22.0': - resolution: {integrity: sha512-gAy93Ddo01Z3bHuVdPWfCwzgfaYgMdaZPcfL7JZ7hWJoK9V0lXDbigTWkhiPFAaLWzbOJ+kbUQG1+XwIm0KRGQ==} - - '@redocly/openapi-core@1.34.14': - resolution: {integrity: sha512-y+xFx+Zz54Xhr8jUdnLENYnt7Y7GEDL6Q03ga7rTtX8DVwefX9H+hQEPgJp1nda7vdH+wJ9/HBVvyfBuW9x6rA==} - engines: {node: '>=18.17.0', npm: '>=9.5.0'} - '@rolldown/binding-android-arm64@1.0.0-rc.18': resolution: {integrity: sha512-lIDyUAfD7U3+BWKzdxMbJcsYHuqXqmGz40aeRqvuAm3y5TkJSYTBW2RDrn65DJFPQqVjUAUqq5uz8urzQ8aBdQ==} engines: {node: ^20.19.0 || >=22.12.0} @@ -598,36 +649,42 @@ packages: engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] + libc: [glibc] '@rolldown/binding-linux-arm64-musl@1.0.0-rc.18': resolution: {integrity: sha512-QWjdxN1HJCpBTAcZ5N5F7wju3gVPzRzSpmGzx7na0c/1qpN9CFil+xt+l9lV/1M6/gqHSNXCiqPfwhVJPeLnug==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] + libc: [musl] '@rolldown/binding-linux-ppc64-gnu@1.0.0-rc.18': resolution: {integrity: sha512-ugCOyj7a4d9h3q9B+wXmf6g3a68UsjGh6dob5DHevHGMwDUbhsYNbSPxJsENcIttJZ9jv7qGM2UesLw5jqIhdg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [ppc64] os: [linux] + libc: [glibc] '@rolldown/binding-linux-s390x-gnu@1.0.0-rc.18': resolution: {integrity: sha512-kKWRhbsotpXkGbcd5dllUWg5gEXcDAa8u5YnP9AV5DYNbvJHGzzuwv7dpmhc8NqKMJldl0a+x76IHbspEpEmdA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [s390x] os: [linux] + libc: [glibc] '@rolldown/binding-linux-x64-gnu@1.0.0-rc.18': resolution: {integrity: sha512-uCo8ElcCIAMyYAZyuIZ81oFkhTSIllNvUCHCAlbhlN4ji3uC28h7IIdlXyIvGO7HsuqnV9p3rD/bpH7XhIyhRw==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] + libc: [glibc] '@rolldown/binding-linux-x64-musl@1.0.0-rc.18': resolution: {integrity: sha512-XNOQZtuE6yUIvx4rwGemwh8kpL1xvU41FXy/s9K7T/3JVcqGzo3NfKM2HrbrGgfPYGFW42f07Wk++aOC6B9NWA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] + libc: [musl] '@rolldown/binding-openharmony-arm64@1.0.0-rc.18': resolution: {integrity: sha512-tSn/kzrfa7tNOXr7sEacDBN4YsIqTyLqh45IO0nHDwtpKIDNDJr+VFojt+4klSpChxB29JLyduSsE0MKEwa65A==} @@ -667,6 +724,56 @@ packages: rollup: optional: true + '@scalar/helpers@0.5.2': + resolution: {integrity: sha512-Pi1GAl8jO6ungmGj2sjDfCfqiBNrKW6HXDZmminV94ybGU/KtRLOqHwd0n9FIhY3j0RYGpGC0VCuniCICfQPHg==} + engines: {node: '>=22'} + + '@scalar/helpers@0.8.0': + resolution: {integrity: sha512-gmOC6VravNB9VDl6wnt/GOj4K/hn48tj5bpW4AM4MhH8Ubil6uu7g1DSoKHwltu8Ks79KEtR6JmOrROi9R7jaQ==} + engines: {node: '>=22'} + + '@scalar/json-magic@0.12.14': + resolution: {integrity: sha512-dWrCy3ew1r7OQ1pu2r4ZjiKEVy0yVd66kXdmsl41bteOG2F2I2IBlPjmPV6p8ckjImQHxtNBIntFaQfNrdBhJg==} + engines: {node: '>=22'} + + '@scalar/json-magic@0.12.8': + resolution: {integrity: sha512-a559iO8tmFeA90JJAAM3U5x1Asf3mr0Z8uDC1PmyLTDjdSOfajP7EY9VzNoXE2cM48ilf9qrjmkbw/d4VCFjQw==} + engines: {node: '>=22'} + + '@scalar/openapi-parser@0.25.12': + resolution: {integrity: sha512-1hajBAbc7cbEcsSZEQxaPXZyCjMf6h6hObV+SO32jkC6rrxinPXQIucDu9HTu/jm/FaaMnNhc8/XDWz5/E49cQ==} + engines: {node: '>=22'} + + '@scalar/openapi-types@0.8.0': + resolution: {integrity: sha512-WmaxVSfvY5K/TwcG2B2TU1WOe1As1uc2s7myswtP6dBlcjU3hM08SApxv/jmyGaCE8t4gO5BBhmHY4pDUfmr2g==} + engines: {node: '>=22'} + + '@scalar/openapi-upgrader@0.2.6': + resolution: {integrity: sha512-pvEmfSCDNYR4+lygidUqfo+shzyp4OSh9+UgK110rzA8Oot6WbJBM03Fuq3M255G7G6R9iXyfsebB7MBUocPkw==} + engines: {node: '>=22'} + + '@sec-ant/readable-stream@0.4.1': + resolution: {integrity: sha512-831qok9r2t8AlxLko40y2ebgSDhenenCatLVeW/uBtnHPyhHOvG0C7TvfgecV+wHzIm5KUICgzmVpWS+IMEAeg==} + + '@shikijs/engine-oniguruma@3.23.0': + resolution: {integrity: sha512-1nWINwKXxKKLqPibT5f4pAFLej9oZzQTsby8942OTlsJzOBZ0MWKiwzMsd+jhzu8YPCHAswGnnN1YtQfirL35g==} + + '@shikijs/langs@3.23.0': + resolution: {integrity: sha512-2Ep4W3Re5aB1/62RSYQInK9mM3HsLeB91cHqznAJMuylqjzNVAVCMnNWRHFtcNHXsoNRayP9z1qj4Sq3nMqYXg==} + + '@shikijs/themes@3.23.0': + resolution: {integrity: sha512-5qySYa1ZgAT18HR/ypENL9cUSGOeI2x+4IvYJu4JgVJdizn6kG4ia5Q1jDEOi7gTbN4RbuYtmHh0W3eccOrjMA==} + + '@shikijs/types@3.23.0': + resolution: {integrity: sha512-3JZ5HXOZfYjsYSk0yPwBrkupyYSLpAE26Qc0HLghhZNGTZg/SKxXIIgoxOpmmeQP0RRSDJTk1/vPfw9tbw+jSQ==} + + '@shikijs/vscode-textmate@10.0.2': + resolution: {integrity: sha512-83yeghZ2xxin3Nj8z1NMd/NCuca+gsYXswywDy5bHvwlWL8tpTQmzGeUuHd9FC3E/SBEMvzJRwWEOz5gGes9Qg==} + + '@sindresorhus/merge-streams@4.0.0': + resolution: {integrity: sha512-tlqY9xq5ukxTUZBmoOp+m61cqwQD5pHJtFY3Mn8CA8ps6yghLH/Hw8UPdqg4OLmFW3IFlcXnQNmo/dh8HzXYIQ==} + engines: {node: '>=18'} + '@standard-schema/spec@1.1.0': resolution: {integrity: sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==} @@ -785,36 +892,42 @@ packages: engines: {node: '>=10'} cpu: [arm64] os: [linux] + libc: [glibc] '@swc/core-linux-arm64-musl@1.15.33': resolution: {integrity: sha512-il7tYM+CpUNzieQbwAjFT1P8zqAhmGWNAGhQZBnxurXZ0aNn+5nqYFTEUKNZl7QibtT0uQXzTZrNGHCIj6Y1Og==} engines: {node: '>=10'} cpu: [arm64] os: [linux] + libc: [musl] '@swc/core-linux-ppc64-gnu@1.15.33': resolution: {integrity: sha512-ZtNBwN0Z7CFj9Il0FcPaKdjgP7URyKu/3RfH46vq+0paOBqLj4NYldD6Qo//Duif/7IOtAraUfDOmp0PLAufog==} engines: {node: '>=10'} cpu: [ppc64] os: [linux] + libc: [glibc] '@swc/core-linux-s390x-gnu@1.15.33': resolution: {integrity: sha512-De1IyajoOmhOYYjw/lx66bKlyDpHZTueqwpDrWgf5O7T6d1ODeJJO9/OqMBmrBQc5C+dNnlmIufHsp4QVCWufA==} engines: {node: '>=10'} cpu: [s390x] os: [linux] + libc: [glibc] '@swc/core-linux-x64-gnu@1.15.33': resolution: {integrity: sha512-mGTH0YxmUN+x6vRN/I6NOk5X0ogNktkwPnJ94IMvR7QjhRDwL0O8RXEDhyUM0YtwWrryBOqaJQBX4zruxEPRGw==} engines: {node: '>=10'} cpu: [x64] os: [linux] + libc: [glibc] '@swc/core-linux-x64-musl@1.15.33': resolution: {integrity: sha512-hj628ZkSEJf6zMf5VMbYrG2O6QqyTIp2qwY6VlCjvIa9lAEZ5c2lfPblCLVGYubTeLJDxadLB/CxqQYOQABeEQ==} engines: {node: '>=10'} cpu: [x64] os: [linux] + libc: [musl] '@swc/core-win32-arm64-msvc@1.15.33': resolution: {integrity: sha512-GV2oohtN2/5+KSccl86VULu3aT+LrISC8uzgSq0FRnikpD+Zwc+sBlXmoKQ+Db6jI57ITUOIB8jRkdGMABC29g==} @@ -890,24 +1003,28 @@ packages: engines: {node: '>= 20'} cpu: [arm64] os: [linux] + libc: [glibc] '@tailwindcss/oxide-linux-arm64-musl@4.3.0': resolution: {integrity: sha512-Z6sukiQsngnWO+l39X4pPbiWT81IC+PLKF+PHxIlyZbGNb9MODfYlXEVlFvej5BOZInWX01kVyzeLvHsXhfczQ==} engines: {node: '>= 20'} cpu: [arm64] os: [linux] + libc: [musl] '@tailwindcss/oxide-linux-x64-gnu@4.3.0': resolution: {integrity: sha512-DRNdQRpSGzRGfARVuVkxvM8Q12nh19l4BF/G7zGA1oe+9wcC6saFBHTISrpIcKzhiXtSrlSrluCfvMuledoCTQ==} engines: {node: '>= 20'} cpu: [x64] os: [linux] + libc: [glibc] '@tailwindcss/oxide-linux-x64-musl@4.3.0': resolution: {integrity: sha512-Z0IADbDo8bh6I7h2IQMx601AdXBLfFpEdUotft86evd/8ZPflZe9COPO8Q1vw+pfLWIUo9zN/JGZvwuAJqduqg==} engines: {node: '>= 20'} cpu: [x64] os: [linux] + libc: [musl] '@tailwindcss/oxide-wasm32-wasi@4.3.0': resolution: {integrity: sha512-HNZGOUxEmElksYR7S6sC5jTeNGpobAsy9u7Gu0AskJ8/20FR9GqebUyB+HBcU/ax6BHuiuJi+Oda4B+YX6H1yA==} @@ -942,6 +1059,14 @@ packages: peerDependencies: vite: ^5.2.0 || ^6 || ^7 || ^8 + '@tanstack/query-core@5.100.11': + resolution: {integrity: sha512-lmE0994apShXPj8CUxgx4ch5yUJhE9k/+tVwihBvPOyerACWdBocfFg24t8+0RhtlTd7tEgchDkhlCxNssvDxw==} + + '@tanstack/react-query@5.100.11': + resolution: {integrity: sha512-J0f9s5x3LE1450nNNfYx+e/n0DMa0uOBdFJUy5r0RvmsXd4nB/n0rbHtHI1vYXhikNFan+wf51p6Tmp4c8ucrg==} + peerDependencies: + react: ^18 || ^19 + '@testing-library/dom@10.4.1': resolution: {integrity: sha512-o4PXJQidqJl82ckFaXUeoAW+XysPLauYI43Abki5hABd853iMhitooc6znOnczgbTYmEP6U6/y1ZyKAIsvMKGg==} engines: {node: '>=18'} @@ -986,6 +1111,9 @@ packages: '@types/estree@1.0.9': resolution: {integrity: sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==} + '@types/hast@3.0.4': + resolution: {integrity: sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==} + '@types/js-cookie@3.0.6': resolution: {integrity: sha512-wkw9yd1kEXOPnvEeEV1Go1MmxtBJL0RR79aOTAApecWFVu7w0NNXNqhcWgvw2YgZDYadliXkl14pa3WXw5jlCQ==} @@ -1009,6 +1137,9 @@ packages: '@types/resolve@1.20.6': resolution: {integrity: sha512-A4STmOXPhMUtHH+S6ymgE2GiBSMqf4oTvcQZMcHzokuTLVYzXTB8ttjcgxOVaAp2lGwEdzZ0J+cRbbeevQj1UQ==} + '@types/unist@3.0.3': + resolution: {integrity: sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==} + '@typescript-eslint/eslint-plugin@8.59.2': resolution: {integrity: sha512-j/bwmkBvHUtPNxzuWe5z6BEk3q54YRyGlBXkSsmfoih7zNrBvl5A9A98anlp/7JbyZcWIJ8KXo/3Tq/DjFLtuQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -1161,13 +1292,28 @@ packages: engines: {node: '>=0.4.0'} hasBin: true - agent-base@7.1.4: - resolution: {integrity: sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==} - engines: {node: '>= 14'} + ajv-draft-04@1.0.0: + resolution: {integrity: sha512-mv00Te6nmYbRp5DCwclxtt7yV/joXJPGS7nM+97GdxvuttCOfgI3K4U25zboyeX0O+myI8ERluxQe5wljMmVIw==} + peerDependencies: + ajv: ^8.5.0 + peerDependenciesMeta: + ajv: + optional: true + + ajv-formats@3.0.1: + resolution: {integrity: sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ==} + peerDependencies: + ajv: ^8.0.0 + peerDependenciesMeta: + ajv: + optional: true ajv@6.15.0: resolution: {integrity: sha512-fgFx7Hfoq60ytK2c7DhnF8jIvzYgOMxfugjLOSMHjLIPgenqa7S7oaagATUq99mV6IYvN2tRmC0wnTYX6iPbMw==} + ajv@8.20.0: + resolution: {integrity: sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA==} + ansi-colors@4.1.3: resolution: {integrity: sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==} engines: {node: '>=6'} @@ -1277,13 +1423,14 @@ packages: brace-expansion@1.1.14: resolution: {integrity: sha512-MWPGfDxnyzKU7rNOW9SP/c50vi3xrmrua/+6hfPbCS2ABNWfx24vPidzvC7krjU/RTo235sV776ymlsMtGKj8g==} - brace-expansion@2.1.0: - resolution: {integrity: sha512-TN1kCZAgdgweJhWWpgKYrQaMNHcDULHkWwQIspdtjV4Y5aurRdZpjAqn6yX3FPqTA9ngHCc4hJxMAMgGfve85w==} - brace-expansion@5.0.6: resolution: {integrity: sha512-kLpxurY4Z4r9sgMsyG0Z9uzsBlgiU/EFKhj/h91/8yHu0edo7XuixOIH3VcJ8kkxs6/jPzoI6U9Vj3WqbMQ94g==} engines: {node: 18 || 20 || >=22} + braces@3.0.3: + resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} + engines: {node: '>=8'} + browserslist@4.28.2: resolution: {integrity: sha512-48xSriZYYg+8qXna9kwqjIVzuQxi+KYWp2+5nCYnYKPTr0LvD89Jqk2Or5ogxz0NUMfIjhh2lIUX/LyX9B4oIg==} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} @@ -1324,13 +1471,14 @@ packages: resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} engines: {node: '>=10'} - change-case@5.4.4: - resolution: {integrity: sha512-HRQyTk2/YPEkt9TnUPbOpr64Uw3KOicFWPVBb+xiHvd6eBx/qPr9xqfBFDT8P2vWsvvz4jbEkfDe71W3VyNu2w==} - check-error@2.1.3: resolution: {integrity: sha512-PAJdDJusoxnwm1VwW07VWwUN1sl7smmC3OKggvndJFadxxDRyFJBX/ggnu/KE4kQAB7a3Dp8f/YXC1FlUprWmA==} engines: {node: '>= 16'} + chokidar@5.0.0: + resolution: {integrity: sha512-TQMmc3w+5AxjpL8iIiwebF73dRDF4fBIieAqGn9RGCWaEVwQ6Fb2cGe31Yns0RRIzii5goJ1Y7xbMwo1TxMplw==} + engines: {node: '>= 20.19.0'} + chromatic@13.3.5: resolution: {integrity: sha512-MzPhxpl838qJUo0A55osCF2ifwPbjcIPeElr1d4SHcjnHoIcg7l1syJDrAYK/a+PcCBrOGi06jPNpQAln5hWgw==} hasBin: true @@ -1380,13 +1528,17 @@ packages: color-name@1.1.4: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} - colorette@1.4.0: - resolution: {integrity: sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g==} - combined-stream@1.0.8: resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==} engines: {node: '>= 0.8'} + commander@14.0.3: + resolution: {integrity: sha512-H+y0Jo/T1RZ9qPP4Eh1pkcQcLRglraJaSLoyOtHxu6AapkjWVCy2Sit1QQ4x3Dng8qDlSsZEet7g5Pq06MvTgw==} + engines: {node: '>=20'} + + compare-versions@6.1.1: + resolution: {integrity: sha512-4hm4VPpIecmlg59CHXnRDnqGplJFrbLG4aFEl5vl6cK1u76ws3LLvX7ikFnTDl5vo39sjWD6AaDPYodJp/NNHg==} + concat-map@0.0.1: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} @@ -1501,6 +1653,14 @@ packages: resolution: {integrity: sha512-xe9vQb5kReirPUxgQrXA3ihgbCqssmTiM7cOZ+Gzu+VeGWgpV98lLZvp0dl4yriyAePcewxGUs9UpKD8PET9KQ==} engines: {node: '>=10.13.0'} + enquirer@2.4.1: + resolution: {integrity: sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==} + engines: {node: '>=8.6'} + + entities@4.5.0: + resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} + engines: {node: '>=0.12'} + environment@1.1.0: resolution: {integrity: sha512-xUtoPkMggbz0MPyPiIWr1Kp4aeWJjDZ6SMvURhimjdZgsRuDplF5/s9hcgGhyXMhs+6vpnuoiZ2kFiu3FMnS8Q==} engines: {node: '>=18'} @@ -1638,6 +1798,10 @@ packages: eventemitter3@5.0.4: resolution: {integrity: sha512-mlsTRyGaPBjPedk6Bvw+aqbsXDtoAyAzm5MO7JgU+yVRyMQ5O8bD4Kcci7BS85f93veegeCPkL8R4GLClnjLFw==} + execa@9.6.1: + resolution: {integrity: sha512-9Be3ZoN4LmYR90tUoVu2te2BsbzHfhJyfEiAVfz7N5/zv+jduIfLrV2xdQXOHbaD6KgpGdO9PRPM1Y4Q9QkPkA==} + engines: {node: ^18.19.0 || >=20.5.0} + expect-type@1.3.0: resolution: {integrity: sha512-knvyeauYhqjOYvQ66MznSMs83wmHrCycNEN6Ao+2AeYEfxUIkuiVxdEa1qlGEPK+We3n0THiDciYSsCcgW/DoA==} engines: {node: '>=12.0.0'} @@ -1645,12 +1809,22 @@ packages: fast-deep-equal@3.1.3: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} + fast-glob@3.3.3: + resolution: {integrity: sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==} + engines: {node: '>=8.6.0'} + fast-json-stable-stringify@2.1.0: resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} fast-levenshtein@2.0.6: resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} + fast-uri@3.1.2: + resolution: {integrity: sha512-rVjf7ArG3LTk+FS6Yw81V1DLuZl1bRbNrev6Tmd/9RaroeeRRJhAt7jg/6YFxbvAQXUCavSoZhPPj6oOx+5KjQ==} + + fastq@1.20.1: + resolution: {integrity: sha512-GGToxJ/w1x32s/D2EKND7kTil4n8OVk/9mycTc4VDza13lOvpUZTGX3mFSCtV9ksdGBVzvsyAVLM6mHFThxXxw==} + fdir@6.5.0: resolution: {integrity: sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==} engines: {node: '>=12.0.0'} @@ -1660,6 +1834,10 @@ packages: picomatch: optional: true + figures@6.1.0: + resolution: {integrity: sha512-d+l3qxjSesT4V7v2fh+QnmFnUWv9lSpjarhShNTgBOfA0ttejbQUAlHLitbjkoRiDulW0OPoQPYIGhIC8ohejg==} + engines: {node: '>=18'} + file-entry-cache@8.0.0: resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==} engines: {node: '>=16.0.0'} @@ -1668,10 +1846,18 @@ packages: resolution: {integrity: sha512-sJslQKU2uM33qH5nqewAwVB2QgR6w1aMNsYUp3aN5rMRyXEwJGmZvaWzeJFNTOXWlHQyBFCWrdj3fV/fsTOX8w==} engines: {node: '>= 10.4.0'} + fill-range@7.1.1: + resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} + engines: {node: '>=8'} + find-up@5.0.0: resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} engines: {node: '>=10'} + find-up@8.0.0: + resolution: {integrity: sha512-JGG8pvDi2C+JxidYdIwQDyS/CgcrIdh18cvgxcBge3wSHRQOrooMD3GlFBcmMJAN9M42SAZjDp5zv1dglJjwww==} + engines: {node: '>=20'} + flat-cache@4.0.1: resolution: {integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==} engines: {node: '>=16'} @@ -1696,6 +1882,10 @@ packages: resolution: {integrity: sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w==} engines: {node: '>= 6'} + fs-extra@11.3.5: + resolution: {integrity: sha512-eKpRKAovdpZtR1WopLHxlBWvAgPny3c4gX1G5Jhwmmw4XJj0ifSD5qB5TOo8hmA0wlRKDAOAhEE1yVPgs6Fgcg==} + engines: {node: '>=14.14'} + fsevents@2.3.2: resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} @@ -1736,10 +1926,21 @@ packages: resolution: {integrity: sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==} engines: {node: '>= 0.4'} + get-stream@9.0.1: + resolution: {integrity: sha512-kVCxPF3vQM/N0B1PmoqVUqgHP+EeVjmZSQn+1oCRPxd2P21P2F19lIgbR3HBosbB1PUhOAoctJnfEn2GbN2eZA==} + engines: {node: '>=18'} + get-symbol-description@1.1.0: resolution: {integrity: sha512-w9UMqWwJxHNOvoNzSJ2oPF5wvYcvP7jUvYzhp67yEhTi17ZDBBC1z9pTdGuzjD+EFIqLSYRweZjqfiPzQ06Ebg==} engines: {node: '>= 0.4'} + get-tsconfig@4.14.0: + resolution: {integrity: sha512-yTb+8DXzDREzgvYmh6s9vHsSVCHeC0G3PI5bEXNBHtmshPnO+S5O7qgLEOn0I5QvMy6kpZN8K1NKGyilLb93wA==} + + glob-parent@5.1.2: + resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} + engines: {node: '>= 6'} + glob-parent@6.0.2: resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} engines: {node: '>=10.13.0'} @@ -1760,6 +1961,10 @@ packages: resolution: {integrity: sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==} engines: {node: '>= 0.4'} + globby@16.1.0: + resolution: {integrity: sha512-+A4Hq7m7Ze592k9gZRy4gJ27DrXRNnC1vPjxTt1qQxEY8RxagBkBxivkCwg7FxSTG0iLLEMaUx13oOr0R2/qcQ==} + engines: {node: '>=20'} + globrex@0.1.2: resolution: {integrity: sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==} @@ -1806,9 +2011,9 @@ packages: html-escaper@2.0.2: resolution: {integrity: sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==} - https-proxy-agent@7.0.6: - resolution: {integrity: sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==} - engines: {node: '>= 14'} + human-signals@8.0.1: + resolution: {integrity: sha512-eKCa6bwnJhvxj14kZk5NCPc6Hb6BdsU9DZcOnmQKSnO1VKrfV0zCvtttPZUsBvjmNDn8rpcJfpwSYnHBjc95MQ==} + engines: {node: '>=18.18.0'} husky@9.1.7: resolution: {integrity: sha512-5gs5ytaNjBrh5Ow3zrvdUUY+0VxIuWVL4i9irt6friV+BqdCfmV11CQTWMiBYWHbXhco+J1kHfTOUkePhCDvMA==} @@ -1835,10 +2040,6 @@ packages: resolution: {integrity: sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==} engines: {node: '>=8'} - index-to-position@1.2.0: - resolution: {integrity: sha512-Yg7+ztRkqslMAS2iFaU+Oa4KTSidr63OsFGlOrJoW981kIYO3CGCS3wA95P1mUi/IVSJkn0D479KTJpVpvFNuw==} - engines: {node: '>=18'} - inherits@2.0.3: resolution: {integrity: sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==} @@ -1920,6 +2121,18 @@ packages: resolution: {integrity: sha512-lZhclumE1G6VYD8VHe35wFaIif+CTy5SJIi5+3y4psDgWu4wPDoBhF8NxUOinEc7pHgiTsT6MaBb92rKhhD+Xw==} engines: {node: '>= 0.4'} + is-number@7.0.0: + resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} + engines: {node: '>=0.12.0'} + + is-path-inside@4.0.0: + resolution: {integrity: sha512-lJJV/5dYS+RcL8uQdBDW9c9uWFLLBNRyFhnAKXw5tVqLlKZ4RMGZKv+YQ/IA3OhD+RpbJa1LLFM1FQPGyIXvOA==} + engines: {node: '>=12'} + + is-plain-obj@4.1.0: + resolution: {integrity: sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==} + engines: {node: '>=12'} + is-regex@1.2.1: resolution: {integrity: sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g==} engines: {node: '>= 0.4'} @@ -1932,6 +2145,10 @@ packages: resolution: {integrity: sha512-ISWac8drv4ZGfwKl5slpHG9OwPNty4jOWPRIhBpxOoD+hqITiwuipOQ2bNthAzwA3B4fIjO4Nln74N0S9byq8A==} engines: {node: '>= 0.4'} + is-stream@4.0.1: + resolution: {integrity: sha512-Dnz92NInDqYckGEUJv689RbRiTSEHCQ7wOVeALbkOz999YpqT46yMRIGtSNl2iCL1waAZSx40+h59NV/EwzV/A==} + engines: {node: '>=18'} + is-string@1.1.1: resolution: {integrity: sha512-BtEeSsoaQjlSPBemMQIrY1MY0uM6vnS1g5fmufYOtnxLGUZM2178PKbhsk7Ffv58IX+ZtcvoGwccYsh0PglkAA==} engines: {node: '>= 0.4'} @@ -1944,6 +2161,10 @@ packages: resolution: {integrity: sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==} engines: {node: '>= 0.4'} + is-unicode-supported@2.1.0: + resolution: {integrity: sha512-mE00Gnza5EEB3Ds0HfMyllZzbBrmLOX3vfWoj9A9PEnTfratQ/BcaJOuMhnkhjXvb2+FkY3VuHqtAGpTPmglFQ==} + engines: {node: '>=18'} + is-weakmap@2.0.2: resolution: {integrity: sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==} engines: {node: '>= 0.4'} @@ -1986,10 +2207,6 @@ packages: resolution: {integrity: sha512-cEiJEAEoIbWfCZYKWhVwFuvPX1gETRYPw6LlaTKoxD3s2AkXzkCjnp6h0V77ozyqj0jakteJ4YqDJT830+lVGw==} engines: {node: '>=14'} - js-levenshtein@1.1.6: - resolution: {integrity: sha512-X2BB11YZtrRqY4EnQcLX5Rh373zbK4alC1FW7D7MBhL2gtcC17cTnr6DmfHZeS0s2rTHjUTMMHfG7gO8SSdw+g==} - engines: {node: '>=0.10.0'} - js-tokens@10.0.0: resolution: {integrity: sha512-lM/UBzQmfJRo9ABXbPWemivdCW8V2G8FHaHdypQaIy523snUjog0W71ayWXTjiR+ixeMyVHN2XcpnTd/liPg/Q==} @@ -2025,6 +2242,10 @@ packages: jsonfile@6.2.1: resolution: {integrity: sha512-zwOTdL3rFQ/lRdBnntKVOX6k5cKJwEc1HdilT71BWEu7J41gXIB2MRp+vxduPSwZJPWBxEzv4yH1wYLJGUHX4Q==} + jsonpointer@5.0.1: + resolution: {integrity: sha512-p/nXbhSEcu3pZRdkW1OfJhpsVtW1gd4Wa1fnQc9YLiTfAjn0312eMKimbdIQzuZl9aa9xUGaRlP9T/CJE/ditQ==} + engines: {node: '>=0.10.0'} + jsx-ast-utils@3.3.5: resolution: {integrity: sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ==} engines: {node: '>=4.0'} @@ -2043,6 +2264,10 @@ packages: resolution: {integrity: sha512-MbjN408fEndfiQXbFQ1vnd+1NoLDsnQW41410oQBXiyXDMYH5z505juWa4KUE1LqxRC7DgOgZDbKLxHIwm27hA==} engines: {node: '>=0.10'} + leven@4.1.0: + resolution: {integrity: sha512-KZ9W9nWDT7rF7Dazg8xyLHGLrmpgq2nVNFUckhqdW3szVP6YhCpp/RAnpmVExA9JvrMynjwSLVrEj3AepHR6ew==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + levn@0.4.1: resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} engines: {node: '>= 0.8.0'} @@ -2082,24 +2307,28 @@ packages: engines: {node: '>= 12.0.0'} cpu: [arm64] os: [linux] + libc: [glibc] lightningcss-linux-arm64-musl@1.32.0: resolution: {integrity: sha512-UpQkoenr4UJEzgVIYpI80lDFvRmPVg6oqboNHfoH4CQIfNA+HOrZ7Mo7KZP02dC6LjghPQJeBsvXhJod/wnIBg==} engines: {node: '>= 12.0.0'} cpu: [arm64] os: [linux] + libc: [musl] lightningcss-linux-x64-gnu@1.32.0: resolution: {integrity: sha512-V7Qr52IhZmdKPVr+Vtw8o+WLsQJYCTd8loIfpDaMRWGUZfBOYEJeyJIkqGIDMZPwPx24pUMfwSxxI8phr/MbOA==} engines: {node: '>= 12.0.0'} cpu: [x64] os: [linux] + libc: [glibc] lightningcss-linux-x64-musl@1.32.0: resolution: {integrity: sha512-bYcLp+Vb0awsiXg/80uCRezCYHNg1/l3mt0gzHnWV9XP1W5sKa5/TCdGWaR/zBM2PeF/HbsQv/j2URNOiVuxWg==} engines: {node: '>= 12.0.0'} cpu: [x64] os: [linux] + libc: [musl] lightningcss-win32-arm64-msvc@1.32.0: resolution: {integrity: sha512-8SbC8BR40pS6baCM8sbtYDSwEVQd4JlFTOlaD3gWGHfThTcABnNDBda6eTZeqbofalIJhFx0qKzgHJmcPTnGdw==} @@ -2117,6 +2346,9 @@ packages: resolution: {integrity: sha512-NXYBzinNrblfraPGyrbPoD19C1h9lfI/1mzgWYvXUTe414Gz/X1FD2XBZSZM7rRTrMA8JL3OtAaGifrIKhQ5yQ==} engines: {node: '>= 12.0.0'} + linkify-it@5.0.0: + resolution: {integrity: sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==} + lint-staged@17.0.4: resolution: {integrity: sha512-+rU9lSUyVOZ/hDUmRLVGzyS2v73cDdQjX+XQz1AaOdIE4RysLq0HoPW2HrrgeNCLklkhi904VBU1bmgWLHVnkA==} engines: {node: '>=22.22.1'} @@ -2130,6 +2362,10 @@ packages: resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} engines: {node: '>=10'} + locate-path@8.0.0: + resolution: {integrity: sha512-XT9ewWAC43tiAV7xDAPflMkG0qOPn2QjHqlgX8FOqmWa/rxnyYDulF9T0F7tRy1u+TVTmK/M//6VIOye+2zDXg==} + engines: {node: '>=20'} + lodash.merge@4.6.2: resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} @@ -2152,6 +2388,9 @@ packages: peerDependencies: react: ^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0 + lunr@2.3.9: + resolution: {integrity: sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==} + lz-string@1.5.0: resolution: {integrity: sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==} hasBin: true @@ -2166,10 +2405,25 @@ packages: resolution: {integrity: sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==} engines: {node: '>=10'} + markdown-it@14.1.1: + resolution: {integrity: sha512-BuU2qnTti9YKgK5N+IeMubp14ZUKUUw7yeJbkjtosvHiP0AZ5c8IAgEMk79D0eC8F23r4Ac/q8cAIFdm2FtyoA==} + hasBin: true + math-intrinsics@1.1.0: resolution: {integrity: sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==} engines: {node: '>= 0.4'} + mdurl@2.0.0: + resolution: {integrity: sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==} + + merge2@1.4.1: + resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} + engines: {node: '>= 8'} + + micromatch@4.0.8: + resolution: {integrity: sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==} + engines: {node: '>=8.6'} + mime-db@1.52.0: resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==} engines: {node: '>= 0.6'} @@ -2193,10 +2447,6 @@ packages: minimatch@3.1.5: resolution: {integrity: sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==} - minimatch@5.1.9: - resolution: {integrity: sha512-7o1wEA2RyMP7Iu7GNba9vc0RWWGACJOCZBJX2GJWip0ikV+wcOsgVuY9uE8CPiyQhkGFSlhuSkZPavN7u1c2Fw==} - engines: {node: '>=10'} - minimist@1.2.8: resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} @@ -2222,6 +2472,10 @@ packages: node-releases@2.0.38: resolution: {integrity: sha512-3qT/88Y3FbH/Kx4szpQQ4HzUbVrHPKTLVpVocKiLfoYvw9XSGOX2FmD2d6DrXbVYyAQTF2HeF6My8jmzx7/CRw==} + npm-run-path@6.0.0: + resolution: {integrity: sha512-9qny7Z9DsQU8Ou39ERsPU4OZQlSTP47ShQzuKZ6PRXpYLtIFgl/DEBYEXKlvcEa+9tHVcK8CF81Y2V72qaZhWA==} + engines: {node: '>=18'} + object-inspect@1.13.4: resolution: {integrity: sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==} engines: {node: '>= 0.4'} @@ -2253,16 +2507,20 @@ packages: resolution: {integrity: sha512-YgBpdJHPyQ2UE5x+hlSXcnejzAvD0b22U2OuAP+8OnlJT+PjWPxtgmGqKKc+RgTM63U9gN0YzrYc71R2WT/hTA==} engines: {node: '>=18'} - openapi-typescript@7.13.0: - resolution: {integrity: sha512-EFP392gcqXS7ntPvbhBzbF8TyBA+baIYEm791Hy5YkjDYKTnk/Tn5OQeKm5BIZvJihpp8Zzr4hzx0Irde1LNGQ==} - hasBin: true - peerDependencies: - typescript: ^5.x - optionator@0.9.4: resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==} engines: {node: '>= 0.8.0'} + orval@8.11.0: + resolution: {integrity: sha512-kzQ6Jlzh/FafiuI2Feur8kdyVOJ8blQK1sjqRMU/Z2tBrqYjJirS3tDXe5UdyIgU+cmAq0ckiOuU2dsGMwyv6Q==} + engines: {node: '>=22.18.0'} + hasBin: true + peerDependencies: + prettier: '>=3.0.0' + peerDependenciesMeta: + prettier: + optional: true + own-keys@1.0.1: resolution: {integrity: sha512-qFOyK5PjiWZd+QQIh+1jhdb9LpxTF0qs7Pm8o5QHYZ0M3vKqSqzsZaEB6oWlxZ+q2sJBMI/Ktgd2N5ZwQoRHfg==} engines: {node: '>= 0.4'} @@ -2271,16 +2529,24 @@ packages: resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} engines: {node: '>=10'} + p-limit@4.0.0: + resolution: {integrity: sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + p-locate@5.0.0: resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} engines: {node: '>=10'} + p-locate@6.0.0: + resolution: {integrity: sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + parent-module@1.0.1: resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} engines: {node: '>=6'} - parse-json@8.3.0: - resolution: {integrity: sha512-ybiGyvspI+fAoRQbIPRddCcSTV9/LsJbf0e/S85VLowVGzRmokfneg2kwVW/KU5rOXrPSbF1qAKPMgNTqqROQQ==} + parse-ms@4.0.0: + resolution: {integrity: sha512-TXfryirbmq34y8QBwgqCVLi+8oA3oWx2eAnSn62ITyEhEYaWRlVZ2DvMM9eZbMs/RfxPu/PK/aBLyGj4IrqMHw==} engines: {node: '>=18'} path-exists@4.0.0: @@ -2291,6 +2557,10 @@ packages: resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} engines: {node: '>=8'} + path-key@4.0.0: + resolution: {integrity: sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==} + engines: {node: '>=12'} + path-parse@1.0.7: resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} @@ -2311,6 +2581,10 @@ packages: picocolors@1.1.1: resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} + picomatch@2.3.2: + resolution: {integrity: sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==} + engines: {node: '>=8.6'} + picomatch@4.0.4: resolution: {integrity: sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==} engines: {node: '>=12'} @@ -2328,10 +2602,6 @@ packages: engines: {node: '>=18'} hasBin: true - pluralize@8.0.0: - resolution: {integrity: sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==} - engines: {node: '>=4'} - pngjs@7.0.0: resolution: {integrity: sha512-LKWqWJRhstyYo9pGvgor/ivk2w94eSjE3RGVuzLGlr3NmD8bf7RcYGze1mNdEHRP6TRP6rMuDHk5t44hnTRyow==} engines: {node: '>=14.19.0'} @@ -2412,6 +2682,10 @@ packages: resolution: {integrity: sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} + pretty-ms@9.3.0: + resolution: {integrity: sha512-gjVS5hOP+M3wMm5nmNOucbIrqudzs9v/57bWRHQWLYklXqoXKrVfYW2W9+glfGsqtPgpiz5WwyEEB+ksXIx3gQ==} + engines: {node: '>=18'} + process@0.11.10: resolution: {integrity: sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==} engines: {node: '>= 0.6.0'} @@ -2420,10 +2694,17 @@ packages: resolution: {integrity: sha512-cJ+oHTW1VAEa8cJslgmUZrc+sjRKgAKl3Zyse6+PV38hZe/V6Z14TbCuXcan9F9ghlz4QrFr2c92TNF82UkYHA==} engines: {node: '>=10'} + punycode.js@2.3.1: + resolution: {integrity: sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==} + engines: {node: '>=6'} + punycode@2.3.1: resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} engines: {node: '>=6'} + queue-microtask@1.2.3: + resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} + react-docgen-typescript@2.4.0: resolution: {integrity: sha512-ZtAp5XTO5HRzQctjPU0ybY0RRCQO19X/8fxn3w7y2VVTUbGHDKULPTL4ky3vB05euSgG5NpALhEhDPvQ56wvXg==} peerDependencies: @@ -2473,6 +2754,10 @@ packages: resolution: {integrity: sha512-sfWGGfavi0xr8Pg0sVsyHMAOziVYKgPLNrS7ig+ivMNb3wbCBw3KxtflsGBAwD3gYQlE/AEZsTLgToRrSCjb0Q==} engines: {node: '>=0.10.0'} + readdirp@5.0.0: + resolution: {integrity: sha512-9u/XQ1pvrQtYyMpZe7DXKv2p5CNvyVwzUB6uhLAnQwHMSgKMBR62lc7AHljaeteeHXn11XTAaLLUVZYVZyuRBQ==} + engines: {node: '>= 20.19.0'} + recast@0.23.11: resolution: {integrity: sha512-YTUo+Flmw4ZXiWfQKGcwwc11KnoRAYgzAE2E7mXKCjSviTKShtxBsN6YUUBB2gtaBzKzeKunxhUwNHQuRryhWA==} engines: {node: '>= 4'} @@ -2489,6 +2774,9 @@ packages: resolution: {integrity: sha512-dYqgNSZbDwkaJ2ceRd9ojCGjBq+mOm9LmtXnAnEGyHhN/5R7iDW2TRw3h+o/jCFxus3P2LfWIIiwowAjANm7IA==} engines: {node: '>= 0.4'} + remeda@2.34.1: + resolution: {integrity: sha512-k5iIF3lHm2NQ+2bNGDvZTD5jZl/JZkCS6AQOfGjYBd7V4rbb3K5whHvab0/O7CqPI43vYzbnIVCQXQJqmOyI6w==} + require-from-string@2.0.2: resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} engines: {node: '>=0.10.0'} @@ -2497,6 +2785,9 @@ packages: resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} engines: {node: '>=4'} + resolve-pkg-maps@1.0.0: + resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==} + resolve@1.22.12: resolution: {integrity: sha512-TyeJ1zif53BPfHootBGwPRYT1RUt6oGWsaQr8UyZW/eAm9bKoijtvruSDEmZHm92CwS9nj7/fWttqPCgzep8CA==} engines: {node: '>= 0.4'} @@ -2506,6 +2797,10 @@ packages: resolution: {integrity: sha512-oMA2dcrw6u0YfxJQXm342bFKX/E4sG9rbTzO9ptUcR/e8A33cHuvStiYOwH7fszkZlZ1z/ta9AAoPk2F4qIOHA==} engines: {node: '>=18'} + reusify@1.1.0: + resolution: {integrity: sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==} + engines: {iojs: '>=1.0.0', node: '>=0.10.0'} + rfdc@1.4.1: resolution: {integrity: sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==} @@ -2518,6 +2813,9 @@ packages: resolution: {integrity: sha512-DPe5pVFaAsinSaV6QjQ6gdiedWDcRCbUuiQfQa2wmWV7+xC9bGulGI8+TdRmoFkAPaBXk8CrAbnlY2ISniJ47Q==} engines: {node: '>=18'} + run-parallel@1.2.0: + resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} + safe-array-concat@1.1.4: resolution: {integrity: sha512-wtZlHyOje6OZTGqAoaDKxFkgRtkF9CnHAVnCHKfuj200wAgL+bSJhdsCD2l0Qx/2ekEXjPWcyKkfGb5CPboslg==} engines: {node: '>=0.4'} @@ -2592,6 +2890,10 @@ packages: resolution: {integrity: sha512-2wcC/oGxHis/BoHkkPwldgiPSYcpZK3JU28WoMVv55yHJgcZ8rlXvuG9iZggz+sU1d4bRgIGASwyWqjxu3FM0g==} engines: {node: '>=18'} + slash@5.1.0: + resolution: {integrity: sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg==} + engines: {node: '>=14.16'} + slice-ansi@7.1.2: resolution: {integrity: sha512-iOBWFgUX7caIZiuutICxVgX1SdxwAVFFKwt1EvMYYec/NWO5meOJ6K5uQxhrYBdQJne4KxiqZc+KptFOWFSI9w==} engines: {node: '>=18'} @@ -2658,6 +2960,10 @@ packages: resolution: {integrity: sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==} engines: {node: '>= 0.4'} + strip-ansi@6.0.1: + resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} + engines: {node: '>=8'} + strip-ansi@7.2.0: resolution: {integrity: sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==} engines: {node: '>=12'} @@ -2666,6 +2972,10 @@ packages: resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==} engines: {node: '>=4'} + strip-final-newline@4.0.0: + resolution: {integrity: sha512-aulFJcD6YK8V1G7iRB5tigAP4TsHBZZrOV8pjV++zdUwmeV8uzbY7yn6h9MswN62adStNZFuCIx4haBnRuMDaw==} + engines: {node: '>=18'} + strip-indent@3.0.0: resolution: {integrity: sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==} engines: {node: '>=8'} @@ -2697,10 +3007,6 @@ packages: stylis@4.3.6: resolution: {integrity: sha512-yQ3rwFWRfwNUY7H5vpU0wfdkNSnvnJinhF9830Swlaxl03zsOjCfmX0ugac+3LtK0lYSgwL/KXc8oYL3mG4YFQ==} - supports-color@10.2.2: - resolution: {integrity: sha512-SS+jx45GF1QjgEXQx4NJZV9ImqmO2NPz5FNsIHrsDjh2YsHnawpan7SNQ1o8NuhrbHZy9AZhIoCUiCeaW/C80g==} - engines: {node: '>=18'} - supports-color@7.2.0: resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} engines: {node: '>=8'} @@ -2742,6 +3048,10 @@ packages: resolution: {integrity: sha512-azl+t0z7pw/z958Gy9svOTuzqIk6xq+NSheJzn5MMWtWTFywIacg2wUlzKFGtt3cthx0r2SxMK0yzJOR0IES7Q==} engines: {node: '>=14.0.0'} + to-regex-range@5.0.1: + resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} + engines: {node: '>=8.0'} + totalist@3.0.1: resolution: {integrity: sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==} engines: {node: '>=6'} @@ -2777,10 +3087,6 @@ packages: resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} engines: {node: '>= 0.8.0'} - type-fest@4.41.0: - resolution: {integrity: sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==} - engines: {node: '>=16'} - typed-array-buffer@1.0.3: resolution: {integrity: sha512-nAYYwfY3qnzX30IkA6AQZjVbtK6duGontcQm1WSG1MD94YLqK0515GNApXkoxKOWMusVssAHWLh9SeaoefYFGw==} engines: {node: '>= 0.4'} @@ -2797,6 +3103,25 @@ packages: resolution: {integrity: sha512-3KS2b+kL7fsuk/eJZ7EQdnEmQoaho/r6KUef7hxvltNA5DR8NAUM+8wJMbJyZ4G9/7i3v5zPBIMN5aybAh2/Jg==} engines: {node: '>= 0.4'} + typedoc-plugin-coverage@4.0.3: + resolution: {integrity: sha512-baim3wyMkqpX7rBzL/6iZ7wzKJuSr9ffP16RHOsdTUNoHUZeXLIZHSUBtUhXmNHaUNRgfqdmKLBwyggbJjGdeQ==} + engines: {node: '>= 18'} + peerDependencies: + typedoc: 0.28.x + + typedoc-plugin-markdown@4.11.0: + resolution: {integrity: sha512-2iunh2ALyfyh204OF7h2u0kuQ84xB3jFZtFyUr01nThJkLvR8oGGSSDlyt2gyO4kXhvUxDcVbO0y43+qX+wFbw==} + engines: {node: '>= 18'} + peerDependencies: + typedoc: 0.28.x + + typedoc@0.28.19: + resolution: {integrity: sha512-wKh+lhdmMFivMlc6vRRcMGXeGEHGU2g8a2CkPTJjJlwRf1iXbimWIPcFolCqe4E0d/FRtGszpIrsp3WLpDB8Pw==} + engines: {node: '>= 18', pnpm: '>= 10'} + hasBin: true + peerDependencies: + typescript: 5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x || 5.6.x || 5.7.x || 5.8.x || 5.9.x || 6.0.x + typescript-eslint@8.59.2: resolution: {integrity: sha512-pJw051uomb3ZeCzGTpRb8RbEqB5Y4WWet8gl/GcTlU35BSx0PVdZ86/bqkQCyKKuraVQEK7r6kBHQXF+fBhkoQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -2809,6 +3134,9 @@ packages: engines: {node: '>=14.17'} hasBin: true + uc.micro@2.1.0: + resolution: {integrity: sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==} + unbox-primitive@1.1.0: resolution: {integrity: sha512-nWJ91DjeOkej/TA8pXQ3myruKpKEYgqvpw9lz4OPHj/NWFNluYrjbz9j01CJ8yKQd2g4jFoOkINCTW2I5LEEyw==} engines: {node: '>= 0.4'} @@ -2816,6 +3144,14 @@ packages: undici-types@7.16.0: resolution: {integrity: sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==} + unicorn-magic@0.3.0: + resolution: {integrity: sha512-+QBBXBCvifc56fsbuxZQ6Sic3wqqc3WWaqxs58gvJrcOuN83HGTCwz3oS5phzU9LthRNE9VrJCFCLUgHeeFnfA==} + engines: {node: '>=18'} + + unicorn-magic@0.4.0: + resolution: {integrity: sha512-wH590V9VNgYH9g3lH9wWjTrUoKsjLF6sGLjhR4sH1LWpLmCOH0Zf7PukhDA8BiS7KHe4oPNkcTHqYkj7SOGUOw==} + engines: {node: '>=20'} + universalify@2.0.1: resolution: {integrity: sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==} engines: {node: '>= 10.0.0'} @@ -2830,9 +3166,6 @@ packages: peerDependencies: browserslist: '>= 4.21.0' - uri-js-replace@1.0.1: - resolution: {integrity: sha512-W+C9NWNLFOoBI2QWDp4UT9pv65r2w5Cx+3sTYFvtMdDBxkKt1syCqsUdSFAChbEe1uK5TfS04wt/nGwmaeIQ0g==} - uri-js@4.4.1: resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} @@ -2996,22 +3329,23 @@ packages: yallist@3.1.1: resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==} - yaml-ast-parser@0.0.43: - resolution: {integrity: sha512-2PTINUwsRqSd+s8XxKaJWQlUuEMHJQyEuh2edBbW8KNJz0SJPwUSD2zRWqezFEdN7IzAgeuYHFUCF7o8zRdZ0A==} - yaml@2.8.4: resolution: {integrity: sha512-ml/JPOj9fOQK8RNnWojA67GbZ0ApXAUlN2UQclwv2eVgTgn7O9gg9o7paZWKMp4g0H3nTLtS9LVzhkpOFIKzog==} engines: {node: '>= 14.6'} hasBin: true - yargs-parser@21.1.1: - resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} - engines: {node: '>=12'} - yocto-queue@0.1.0: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} + yocto-queue@1.2.2: + resolution: {integrity: sha512-4LCcse/U2MHZ63HAJVE+v71o7yOdIe4cZ70Wpf8D/IyjDKYQLV5GD46B+hSTjJsvV5PztjvHoU580EftxjDZFQ==} + engines: {node: '>=12.20'} + + yoctocolors@2.1.2: + resolution: {integrity: sha512-CzhO+pFNo8ajLM2d2IW/R93ipy99LWjtwblvC1RsoSUMZgyLbYFr221TnSNT7GjGdYui6P459mw9JH/g/zW2ug==} + engines: {node: '>=18'} + zod-validation-error@4.0.2: resolution: {integrity: sha512-Q6/nZLe6jxuU80qb/4uJ4t5v2VEZ44lzQjPDhYJNztRQ4wyWc6VF3D3Kb/fAuPetZQnhS3hnajCf9CsWesghLQ==} engines: {node: '>=18.0.0'} @@ -3064,7 +3398,7 @@ snapshots: '@babel/types': 7.29.0 '@jridgewell/remapping': 2.3.5 convert-source-map: 2.0.0 - debug: 4.4.3(supports-color@10.2.2) + debug: 4.4.3 gensync: 1.0.0-beta.2 json5: 2.2.3 semver: 6.3.1 @@ -3136,7 +3470,7 @@ snapshots: '@babel/parser': 7.29.3 '@babel/template': 7.28.6 '@babel/types': 7.29.0 - debug: 4.4.3(supports-color@10.2.2) + debug: 4.4.3 transitivePeerDependencies: - supports-color @@ -3161,6 +3495,10 @@ snapshots: - '@chromatic-com/cypress' - '@chromatic-com/playwright' + '@commander-js/extra-typings@14.0.0(commander@14.0.3)': + dependencies: + commander: 14.0.3 + '@emnapi/core@1.10.0': dependencies: '@emnapi/wasi-threads': 1.2.1 @@ -3271,7 +3609,7 @@ snapshots: '@eslint/config-array@0.21.2': dependencies: '@eslint/object-schema': 2.1.7 - debug: 4.4.3(supports-color@10.2.2) + debug: 4.4.3 minimatch: 3.1.5 transitivePeerDependencies: - supports-color @@ -3287,7 +3625,7 @@ snapshots: '@eslint/eslintrc@3.3.5': dependencies: ajv: 6.15.0 - debug: 4.4.3(supports-color@10.2.2) + debug: 4.4.3 espree: 10.4.0 globals: 14.0.0 ignore: 5.3.2 @@ -3307,6 +3645,14 @@ snapshots: '@eslint/core': 0.17.0 levn: 0.4.1 + '@gerrit0/mini-shiki@3.23.0': + dependencies: + '@shikijs/engine-oniguruma': 3.23.0 + '@shikijs/langs': 3.23.0 + '@shikijs/themes': 3.23.0 + '@shikijs/types': 3.23.0 + '@shikijs/vscode-textmate': 10.0.2 + '@heroicons/react@2.2.0(react@19.2.6)': dependencies: react: 19.2.6 @@ -3369,37 +3715,135 @@ snapshots: '@neoconfetti/react@1.0.0': {} - '@oxc-project/types@0.128.0': {} + '@nodelib/fs.scandir@2.1.5': + dependencies: + '@nodelib/fs.stat': 2.0.5 + run-parallel: 1.2.0 - '@polka/url@1.0.0-next.29': {} + '@nodelib/fs.stat@2.0.5': {} - '@react-oauth/google@0.12.2(react-dom@19.2.6(react@19.2.6))(react@19.2.6)': + '@nodelib/fs.walk@1.2.8': dependencies: - react: 19.2.6 - react-dom: 19.2.6(react@19.2.6) + '@nodelib/fs.scandir': 2.1.5 + fastq: 1.20.1 - '@redocly/ajv@8.11.2': + '@orval/angular@8.11.0(typescript@6.0.3)': dependencies: - fast-deep-equal: 3.1.3 - json-schema-traverse: 1.0.0 - require-from-string: 2.0.2 - uri-js-replace: 1.0.1 + '@orval/core': 8.11.0(typescript@6.0.3) + transitivePeerDependencies: + - '@faker-js/faker' + - supports-color + - typescript - '@redocly/config@0.22.0': {} + '@orval/axios@8.11.0(typescript@6.0.3)': + dependencies: + '@orval/core': 8.11.0(typescript@6.0.3) + transitivePeerDependencies: + - '@faker-js/faker' + - supports-color + - typescript - '@redocly/openapi-core@1.34.14(supports-color@10.2.2)': + '@orval/core@8.11.0(typescript@6.0.3)': dependencies: - '@redocly/ajv': 8.11.2 - '@redocly/config': 0.22.0 - colorette: 1.4.0 - https-proxy-agent: 7.0.6(supports-color@10.2.2) - js-levenshtein: 1.1.6 - js-yaml: 4.1.1 - minimatch: 5.1.9 - pluralize: 8.0.0 - yaml-ast-parser: 0.0.43 + '@scalar/openapi-types': 0.8.0 + acorn: 8.16.0 + compare-versions: 6.1.1 + debug: 4.4.3 + esbuild: 0.27.7 + esutils: 2.0.3 + fs-extra: 11.3.5 + globby: 16.1.0 + jiti: 2.7.0 + remeda: 2.34.1 + typedoc: 0.28.19(typescript@6.0.3) transitivePeerDependencies: - supports-color + - typescript + + '@orval/fetch@8.11.0(typescript@6.0.3)': + dependencies: + '@orval/core': 8.11.0(typescript@6.0.3) + '@scalar/openapi-types': 0.8.0 + transitivePeerDependencies: + - '@faker-js/faker' + - supports-color + - typescript + + '@orval/hono@8.11.0(typescript@6.0.3)': + dependencies: + '@orval/core': 8.11.0(typescript@6.0.3) + '@orval/zod': 8.11.0(typescript@6.0.3) + fs-extra: 11.3.5 + remeda: 2.34.1 + transitivePeerDependencies: + - '@faker-js/faker' + - supports-color + - typescript + + '@orval/mcp@8.11.0(typescript@6.0.3)': + dependencies: + '@orval/core': 8.11.0(typescript@6.0.3) + '@orval/fetch': 8.11.0(typescript@6.0.3) + '@orval/zod': 8.11.0(typescript@6.0.3) + transitivePeerDependencies: + - '@faker-js/faker' + - supports-color + - typescript + + '@orval/mock@8.11.0(typescript@6.0.3)': + dependencies: + '@orval/core': 8.11.0(typescript@6.0.3) + remeda: 2.34.1 + transitivePeerDependencies: + - '@faker-js/faker' + - supports-color + - typescript + + '@orval/query@8.11.0(typescript@6.0.3)': + dependencies: + '@orval/core': 8.11.0(typescript@6.0.3) + '@orval/fetch': 8.11.0(typescript@6.0.3) + remeda: 2.34.1 + transitivePeerDependencies: + - '@faker-js/faker' + - supports-color + - typescript + + '@orval/solid-start@8.11.0(typescript@6.0.3)': + dependencies: + '@orval/core': 8.11.0(typescript@6.0.3) + '@scalar/openapi-types': 0.8.0 + transitivePeerDependencies: + - '@faker-js/faker' + - supports-color + - typescript + + '@orval/swr@8.11.0(typescript@6.0.3)': + dependencies: + '@orval/core': 8.11.0(typescript@6.0.3) + '@orval/fetch': 8.11.0(typescript@6.0.3) + transitivePeerDependencies: + - '@faker-js/faker' + - supports-color + - typescript + + '@orval/zod@8.11.0(typescript@6.0.3)': + dependencies: + '@orval/core': 8.11.0(typescript@6.0.3) + remeda: 2.34.1 + transitivePeerDependencies: + - '@faker-js/faker' + - supports-color + - typescript + + '@oxc-project/types@0.128.0': {} + + '@polka/url@1.0.0-next.29': {} + + '@react-oauth/google@0.12.2(react-dom@19.2.6(react@19.2.6))(react@19.2.6)': + dependencies: + react: 19.2.6 + react-dom: 19.2.6(react@19.2.6) '@rolldown/binding-android-arm64@1.0.0-rc.18': optional: true @@ -3460,6 +3904,65 @@ snapshots: estree-walker: 2.0.2 picomatch: 4.0.4 + '@scalar/helpers@0.5.2': {} + + '@scalar/helpers@0.8.0': {} + + '@scalar/json-magic@0.12.14': + dependencies: + '@scalar/helpers': 0.8.0 + pathe: 2.0.3 + yaml: 2.8.4 + + '@scalar/json-magic@0.12.8': + dependencies: + '@scalar/helpers': 0.5.2 + pathe: 2.0.3 + yaml: 2.8.4 + + '@scalar/openapi-parser@0.25.12': + dependencies: + '@scalar/helpers': 0.5.2 + '@scalar/json-magic': 0.12.8 + '@scalar/openapi-types': 0.8.0 + '@scalar/openapi-upgrader': 0.2.6 + ajv: 8.20.0 + ajv-draft-04: 1.0.0(ajv@8.20.0) + ajv-formats: 3.0.1(ajv@8.20.0) + jsonpointer: 5.0.1 + leven: 4.1.0 + yaml: 2.8.4 + + '@scalar/openapi-types@0.8.0': {} + + '@scalar/openapi-upgrader@0.2.6': + dependencies: + '@scalar/openapi-types': 0.8.0 + + '@sec-ant/readable-stream@0.4.1': {} + + '@shikijs/engine-oniguruma@3.23.0': + dependencies: + '@shikijs/types': 3.23.0 + '@shikijs/vscode-textmate': 10.0.2 + + '@shikijs/langs@3.23.0': + dependencies: + '@shikijs/types': 3.23.0 + + '@shikijs/themes@3.23.0': + dependencies: + '@shikijs/types': 3.23.0 + + '@shikijs/types@3.23.0': + dependencies: + '@shikijs/vscode-textmate': 10.0.2 + '@types/hast': 3.0.4 + + '@shikijs/vscode-textmate@10.0.2': {} + + '@sindresorhus/merge-streams@4.0.0': {} + '@standard-schema/spec@1.1.0': {} '@storybook/addon-a11y@10.3.6(storybook@10.3.6(@testing-library/dom@10.4.1)(prettier@3.8.3)(react-dom@19.2.6(react@19.2.6))(react@19.2.6))': @@ -3703,6 +4206,13 @@ snapshots: tailwindcss: 4.3.0 vite: 8.0.11(@types/node@24.12.3)(esbuild@0.27.7)(jiti@2.7.0)(yaml@2.8.4) + '@tanstack/query-core@5.100.11': {} + + '@tanstack/react-query@5.100.11(react@19.2.6)': + dependencies: + '@tanstack/query-core': 5.100.11 + react: 19.2.6 + '@testing-library/dom@10.4.1': dependencies: '@babel/code-frame': 7.29.0 @@ -3766,6 +4276,10 @@ snapshots: '@types/estree@1.0.9': {} + '@types/hast@3.0.4': + dependencies: + '@types/unist': 3.0.3 + '@types/js-cookie@3.0.6': {} '@types/json-schema@7.0.15': {} @@ -3786,6 +4300,8 @@ snapshots: '@types/resolve@1.20.6': {} + '@types/unist@3.0.3': {} + '@typescript-eslint/eslint-plugin@8.59.2(@typescript-eslint/parser@8.59.2(eslint@9.39.4(jiti@2.7.0))(typescript@6.0.3))(eslint@9.39.4(jiti@2.7.0))(typescript@6.0.3)': dependencies: '@eslint-community/regexpp': 4.12.2 @@ -3808,7 +4324,7 @@ snapshots: '@typescript-eslint/types': 8.59.2 '@typescript-eslint/typescript-estree': 8.59.2(typescript@6.0.3) '@typescript-eslint/visitor-keys': 8.59.2 - debug: 4.4.3(supports-color@10.2.2) + debug: 4.4.3 eslint: 9.39.4(jiti@2.7.0) typescript: 6.0.3 transitivePeerDependencies: @@ -3818,7 +4334,7 @@ snapshots: dependencies: '@typescript-eslint/tsconfig-utils': 8.59.2(typescript@6.0.3) '@typescript-eslint/types': 8.59.2 - debug: 4.4.3(supports-color@10.2.2) + debug: 4.4.3 typescript: 6.0.3 transitivePeerDependencies: - supports-color @@ -3837,7 +4353,7 @@ snapshots: '@typescript-eslint/types': 8.59.2 '@typescript-eslint/typescript-estree': 8.59.2(typescript@6.0.3) '@typescript-eslint/utils': 8.59.2(eslint@9.39.4(jiti@2.7.0))(typescript@6.0.3) - debug: 4.4.3(supports-color@10.2.2) + debug: 4.4.3 eslint: 9.39.4(jiti@2.7.0) ts-api-utils: 2.5.0(typescript@6.0.3) typescript: 6.0.3 @@ -3852,7 +4368,7 @@ snapshots: '@typescript-eslint/tsconfig-utils': 8.59.2(typescript@6.0.3) '@typescript-eslint/types': 8.59.2 '@typescript-eslint/visitor-keys': 8.59.2 - debug: 4.4.3(supports-color@10.2.2) + debug: 4.4.3 minimatch: 10.2.5 semver: 7.8.0 tinyglobby: 0.2.16 @@ -4007,7 +4523,13 @@ snapshots: acorn@8.16.0: {} - agent-base@7.1.4: {} + ajv-draft-04@1.0.0(ajv@8.20.0): + optionalDependencies: + ajv: 8.20.0 + + ajv-formats@3.0.1(ajv@8.20.0): + optionalDependencies: + ajv: 8.20.0 ajv@6.15.0: dependencies: @@ -4016,6 +4538,13 @@ snapshots: json-schema-traverse: 0.4.1 uri-js: 4.4.1 + ajv@8.20.0: + dependencies: + fast-deep-equal: 3.1.3 + fast-uri: 3.1.2 + json-schema-traverse: 1.0.0 + require-from-string: 2.0.2 + ansi-colors@4.1.3: {} ansi-escapes@7.3.0: @@ -4127,14 +4656,14 @@ snapshots: balanced-match: 1.0.2 concat-map: 0.0.1 - brace-expansion@2.1.0: - dependencies: - balanced-match: 1.0.2 - brace-expansion@5.0.6: dependencies: balanced-match: 4.0.4 + braces@3.0.3: + dependencies: + fill-range: 7.1.1 + browserslist@4.28.2: dependencies: baseline-browser-mapping: 2.10.29 @@ -4183,10 +4712,12 @@ snapshots: ansi-styles: 4.3.0 supports-color: 7.2.0 - change-case@5.4.4: {} - check-error@2.1.3: {} + chokidar@5.0.0: + dependencies: + readdirp: 5.0.0 + chromatic@13.3.5: {} chromatic@16.9.1: @@ -4214,12 +4745,14 @@ snapshots: color-name@1.1.4: {} - colorette@1.4.0: {} - combined-stream@1.0.8: dependencies: delayed-stream: 1.0.0 + commander@14.0.3: {} + + compare-versions@6.1.1: {} + concat-map@0.0.1: {} convert-source-map@2.0.0: {} @@ -4256,11 +4789,9 @@ snapshots: es-errors: 1.3.0 is-data-view: 1.0.2 - debug@4.4.3(supports-color@10.2.2): + debug@4.4.3: dependencies: ms: 2.1.3 - optionalDependencies: - supports-color: 10.2.2 deep-eql@5.0.2: {} @@ -4320,6 +4851,13 @@ snapshots: graceful-fs: 4.2.11 tapable: 2.3.3 + enquirer@2.4.1: + dependencies: + ansi-colors: 4.1.3 + strip-ansi: 6.0.1 + + entities@4.5.0: {} + environment@1.1.0: {} es-abstract@1.24.2: @@ -4514,7 +5052,7 @@ snapshots: ajv: 6.15.0 chalk: 4.1.2 cross-spawn: 7.0.6 - debug: 4.4.3(supports-color@10.2.2) + debug: 4.4.3 escape-string-regexp: 4.0.0 eslint-scope: 8.4.0 eslint-visitor-keys: 4.2.1 @@ -4566,29 +5104,71 @@ snapshots: eventemitter3@5.0.4: {} + execa@9.6.1: + dependencies: + '@sindresorhus/merge-streams': 4.0.0 + cross-spawn: 7.0.6 + figures: 6.1.0 + get-stream: 9.0.1 + human-signals: 8.0.1 + is-plain-obj: 4.1.0 + is-stream: 4.0.1 + npm-run-path: 6.0.0 + pretty-ms: 9.3.0 + signal-exit: 4.1.0 + strip-final-newline: 4.0.0 + yoctocolors: 2.1.2 + expect-type@1.3.0: {} fast-deep-equal@3.1.3: {} + fast-glob@3.3.3: + dependencies: + '@nodelib/fs.stat': 2.0.5 + '@nodelib/fs.walk': 1.2.8 + glob-parent: 5.1.2 + merge2: 1.4.1 + micromatch: 4.0.8 + fast-json-stable-stringify@2.1.0: {} fast-levenshtein@2.0.6: {} + fast-uri@3.1.2: {} + + fastq@1.20.1: + dependencies: + reusify: 1.1.0 + fdir@6.5.0(picomatch@4.0.4): optionalDependencies: picomatch: 4.0.4 + figures@6.1.0: + dependencies: + is-unicode-supported: 2.1.0 + file-entry-cache@8.0.0: dependencies: flat-cache: 4.0.1 filesize@10.1.6: {} + fill-range@7.1.1: + dependencies: + to-regex-range: 5.0.1 + find-up@5.0.0: dependencies: locate-path: 6.0.0 path-exists: 4.0.0 + find-up@8.0.0: + dependencies: + locate-path: 8.0.0 + unicorn-magic: 0.3.0 + flat-cache@4.0.1: dependencies: flatted: 3.4.2 @@ -4610,6 +5190,12 @@ snapshots: hasown: 2.0.3 mime-types: 2.1.35 + fs-extra@11.3.5: + dependencies: + graceful-fs: 4.2.11 + jsonfile: 6.2.1 + universalify: 2.0.1 + fsevents@2.3.2: optional: true @@ -4653,12 +5239,25 @@ snapshots: dunder-proto: 1.0.1 es-object-atoms: 1.1.1 + get-stream@9.0.1: + dependencies: + '@sec-ant/readable-stream': 0.4.1 + is-stream: 4.0.1 + get-symbol-description@1.1.0: dependencies: call-bound: 1.0.4 es-errors: 1.3.0 get-intrinsic: 1.3.0 + get-tsconfig@4.14.0: + dependencies: + resolve-pkg-maps: 1.0.0 + + glob-parent@5.1.2: + dependencies: + is-glob: 4.0.3 + glob-parent@6.0.2: dependencies: is-glob: 4.0.3 @@ -4678,6 +5277,15 @@ snapshots: define-properties: 1.2.1 gopd: 1.2.0 + globby@16.1.0: + dependencies: + '@sindresorhus/merge-streams': 4.0.0 + fast-glob: 3.3.3 + ignore: 7.0.5 + is-path-inside: 4.0.0 + slash: 5.1.0 + unicorn-magic: 0.4.0 + globrex@0.1.2: {} gopd@1.2.0: {} @@ -4714,12 +5322,7 @@ snapshots: html-escaper@2.0.2: {} - https-proxy-agent@7.0.6(supports-color@10.2.2): - dependencies: - agent-base: 7.1.4 - debug: 4.4.3(supports-color@10.2.2) - transitivePeerDependencies: - - supports-color + human-signals@8.0.1: {} husky@9.1.7: {} @@ -4736,8 +5339,6 @@ snapshots: indent-string@4.0.0: {} - index-to-position@1.2.0: {} - inherits@2.0.3: {} internal-slot@1.1.0: @@ -4823,6 +5424,12 @@ snapshots: call-bound: 1.0.4 has-tostringtag: 1.0.2 + is-number@7.0.0: {} + + is-path-inside@4.0.0: {} + + is-plain-obj@4.1.0: {} + is-regex@1.2.1: dependencies: call-bound: 1.0.4 @@ -4836,6 +5443,8 @@ snapshots: dependencies: call-bound: 1.0.4 + is-stream@4.0.1: {} + is-string@1.1.1: dependencies: call-bound: 1.0.4 @@ -4851,6 +5460,8 @@ snapshots: dependencies: which-typed-array: 1.1.20 + is-unicode-supported@2.1.0: {} + is-weakmap@2.0.2: {} is-weakref@1.1.1: @@ -4887,8 +5498,6 @@ snapshots: js-cookie@3.0.5: {} - js-levenshtein@1.1.6: {} - js-tokens@10.0.0: {} js-tokens@4.0.0: {} @@ -4915,6 +5524,8 @@ snapshots: optionalDependencies: graceful-fs: 4.2.11 + jsonpointer@5.0.1: {} + jsx-ast-utils@3.3.5: dependencies: array-includes: 3.1.9 @@ -4934,6 +5545,8 @@ snapshots: dependencies: language-subtag-registry: 0.3.23 + leven@4.1.0: {} + levn@0.4.1: dependencies: prelude-ls: 1.2.1 @@ -4988,6 +5601,10 @@ snapshots: lightningcss-win32-arm64-msvc: 1.32.0 lightningcss-win32-x64-msvc: 1.32.0 + linkify-it@5.0.0: + dependencies: + uc.micro: 2.1.0 + lint-staged@17.0.4: dependencies: listr2: 10.2.1 @@ -5009,6 +5626,10 @@ snapshots: dependencies: p-locate: 5.0.0 + locate-path@8.0.0: + dependencies: + p-locate: 6.0.0 + lodash.merge@4.6.2: {} log-update@6.1.0: @@ -5031,6 +5652,8 @@ snapshots: dependencies: react: 19.2.6 + lunr@2.3.9: {} + lz-string@1.5.0: {} magic-string@0.30.21: @@ -5047,8 +5670,26 @@ snapshots: dependencies: semver: 7.8.0 + markdown-it@14.1.1: + dependencies: + argparse: 2.0.1 + entities: 4.5.0 + linkify-it: 5.0.0 + mdurl: 2.0.0 + punycode.js: 2.3.1 + uc.micro: 2.1.0 + math-intrinsics@1.1.0: {} + mdurl@2.0.0: {} + + merge2@1.4.1: {} + + micromatch@4.0.8: + dependencies: + braces: 3.0.3 + picomatch: 2.3.2 + mime-db@1.52.0: {} mime-types@2.1.35: @@ -5067,10 +5708,6 @@ snapshots: dependencies: brace-expansion: 1.1.14 - minimatch@5.1.9: - dependencies: - brace-expansion: 2.1.0 - minimist@1.2.8: {} minipass@7.1.3: {} @@ -5085,6 +5722,11 @@ snapshots: node-releases@2.0.38: {} + npm-run-path@6.0.0: + dependencies: + path-key: 4.0.0 + unicorn-magic: 0.3.0 + object-inspect@1.13.4: {} object-keys@1.1.1: {} @@ -5125,16 +5767,6 @@ snapshots: is-inside-container: 1.0.0 wsl-utils: 0.1.0 - openapi-typescript@7.13.0(typescript@6.0.3): - dependencies: - '@redocly/openapi-core': 1.34.14(supports-color@10.2.2) - ansi-colors: 4.1.3 - change-case: 5.4.4 - parse-json: 8.3.0 - supports-color: 10.2.2 - typescript: 6.0.3 - yargs-parser: 21.1.1 - optionator@0.9.4: dependencies: deep-is: 0.1.4 @@ -5144,6 +5776,44 @@ snapshots: type-check: 0.4.0 word-wrap: 1.2.5 + orval@8.11.0(prettier@3.8.3)(typescript@6.0.3): + dependencies: + '@commander-js/extra-typings': 14.0.0(commander@14.0.3) + '@orval/angular': 8.11.0(typescript@6.0.3) + '@orval/axios': 8.11.0(typescript@6.0.3) + '@orval/core': 8.11.0(typescript@6.0.3) + '@orval/fetch': 8.11.0(typescript@6.0.3) + '@orval/hono': 8.11.0(typescript@6.0.3) + '@orval/mcp': 8.11.0(typescript@6.0.3) + '@orval/mock': 8.11.0(typescript@6.0.3) + '@orval/query': 8.11.0(typescript@6.0.3) + '@orval/solid-start': 8.11.0(typescript@6.0.3) + '@orval/swr': 8.11.0(typescript@6.0.3) + '@orval/zod': 8.11.0(typescript@6.0.3) + '@scalar/json-magic': 0.12.14 + '@scalar/openapi-parser': 0.25.12 + '@scalar/openapi-types': 0.8.0 + chokidar: 5.0.0 + commander: 14.0.3 + enquirer: 2.4.1 + execa: 9.6.1 + find-up: 8.0.0 + fs-extra: 11.3.5 + get-tsconfig: 4.14.0 + jiti: 2.7.0 + js-yaml: 4.1.1 + remeda: 2.34.1 + string-argv: 0.3.2 + typedoc: 0.28.19(typescript@6.0.3) + typedoc-plugin-coverage: 4.0.3(typedoc@0.28.19(typescript@6.0.3)) + typedoc-plugin-markdown: 4.11.0(typedoc@0.28.19(typescript@6.0.3)) + optionalDependencies: + prettier: 3.8.3 + transitivePeerDependencies: + - '@faker-js/faker' + - supports-color + - typescript + own-keys@1.0.1: dependencies: get-intrinsic: 1.3.0 @@ -5154,24 +5824,30 @@ snapshots: dependencies: yocto-queue: 0.1.0 + p-limit@4.0.0: + dependencies: + yocto-queue: 1.2.2 + p-locate@5.0.0: dependencies: p-limit: 3.1.0 + p-locate@6.0.0: + dependencies: + p-limit: 4.0.0 + parent-module@1.0.1: dependencies: callsites: 3.1.0 - parse-json@8.3.0: - dependencies: - '@babel/code-frame': 7.29.0 - index-to-position: 1.2.0 - type-fest: 4.41.0 + parse-ms@4.0.0: {} path-exists@4.0.0: {} path-key@3.1.1: {} + path-key@4.0.0: {} + path-parse@1.0.7: {} path-scurry@2.0.2: @@ -5190,6 +5866,8 @@ snapshots: picocolors@1.1.1: {} + picomatch@2.3.2: {} + picomatch@4.0.4: {} piexifjs@1.0.6: {} @@ -5202,8 +5880,6 @@ snapshots: optionalDependencies: fsevents: 2.3.2 - pluralize@8.0.0: {} - pngjs@7.0.0: {} possible-typed-array-names@1.1.0: {} @@ -5228,12 +5904,20 @@ snapshots: ansi-styles: 5.2.0 react-is: 17.0.2 + pretty-ms@9.3.0: + dependencies: + parse-ms: 4.0.0 + process@0.11.10: {} proxy-from-env@2.1.0: {} + punycode.js@2.3.1: {} + punycode@2.3.1: {} + queue-microtask@1.2.3: {} + react-docgen-typescript@2.4.0(typescript@6.0.3): dependencies: typescript: 6.0.3 @@ -5286,6 +5970,8 @@ snapshots: react@19.2.6: {} + readdirp@5.0.0: {} + recast@0.23.11: dependencies: ast-types: 0.16.1 @@ -5319,10 +6005,14 @@ snapshots: gopd: 1.2.0 set-function-name: 2.0.2 + remeda@2.34.1: {} + require-from-string@2.0.2: {} resolve-from@4.0.0: {} + resolve-pkg-maps@1.0.0: {} + resolve@1.22.12: dependencies: es-errors: 1.3.0 @@ -5335,6 +6025,8 @@ snapshots: onetime: 7.0.0 signal-exit: 4.1.0 + reusify@1.1.0: {} + rfdc@1.4.1: {} rolldown@1.0.0-rc.18: @@ -5360,6 +6052,10 @@ snapshots: run-applescript@7.1.0: {} + run-parallel@1.2.0: + dependencies: + queue-microtask: 1.2.3 + safe-array-concat@1.1.4: dependencies: call-bind: 1.0.9 @@ -5453,6 +6149,8 @@ snapshots: mrmime: 2.0.1 totalist: 3.0.1 + slash@5.1.0: {} + slice-ansi@7.1.2: dependencies: ansi-styles: 6.2.3 @@ -5542,12 +6240,18 @@ snapshots: define-properties: 1.2.1 es-object-atoms: 1.1.1 + strip-ansi@6.0.1: + dependencies: + ansi-regex: 5.0.1 + strip-ansi@7.2.0: dependencies: ansi-regex: 6.2.2 strip-bom@3.0.0: {} + strip-final-newline@4.0.0: {} + strip-indent@3.0.0: dependencies: min-indent: 1.0.1 @@ -5567,8 +6271,6 @@ snapshots: stylis@4.3.6: {} - supports-color@10.2.2: {} - supports-color@7.2.0: dependencies: has-flag: 4.0.0 @@ -5596,6 +6298,10 @@ snapshots: tinyspy@4.0.4: {} + to-regex-range@5.0.1: + dependencies: + is-number: 7.0.0 + totalist@3.0.1: {} ts-api-utils@2.5.0(typescript@6.0.3): @@ -5620,8 +6326,6 @@ snapshots: dependencies: prelude-ls: 1.2.1 - type-fest@4.41.0: {} - typed-array-buffer@1.0.3: dependencies: call-bound: 1.0.4 @@ -5655,6 +6359,23 @@ snapshots: possible-typed-array-names: 1.1.0 reflect.getprototypeof: 1.0.10 + typedoc-plugin-coverage@4.0.3(typedoc@0.28.19(typescript@6.0.3)): + dependencies: + typedoc: 0.28.19(typescript@6.0.3) + + typedoc-plugin-markdown@4.11.0(typedoc@0.28.19(typescript@6.0.3)): + dependencies: + typedoc: 0.28.19(typescript@6.0.3) + + typedoc@0.28.19(typescript@6.0.3): + dependencies: + '@gerrit0/mini-shiki': 3.23.0 + lunr: 2.3.9 + markdown-it: 14.1.1 + minimatch: 10.2.5 + typescript: 6.0.3 + yaml: 2.8.4 + typescript-eslint@8.59.2(eslint@9.39.4(jiti@2.7.0))(typescript@6.0.3): dependencies: '@typescript-eslint/eslint-plugin': 8.59.2(@typescript-eslint/parser@8.59.2(eslint@9.39.4(jiti@2.7.0))(typescript@6.0.3))(eslint@9.39.4(jiti@2.7.0))(typescript@6.0.3) @@ -5668,6 +6389,8 @@ snapshots: typescript@6.0.3: {} + uc.micro@2.1.0: {} + unbox-primitive@1.1.0: dependencies: call-bound: 1.0.4 @@ -5677,6 +6400,10 @@ snapshots: undici-types@7.16.0: {} + unicorn-magic@0.3.0: {} + + unicorn-magic@0.4.0: {} + universalify@2.0.1: {} unplugin@2.3.11: @@ -5692,8 +6419,6 @@ snapshots: escalade: 3.2.0 picocolors: 1.1.1 - uri-js-replace@1.0.1: {} - uri-js@4.4.1: dependencies: punycode: 2.3.1 @@ -5710,7 +6435,7 @@ snapshots: vite-tsconfig-paths@6.1.1(typescript@6.0.3)(vite@8.0.11(@types/node@24.12.3)(esbuild@0.27.7)(jiti@2.7.0)(yaml@2.8.4)): dependencies: - debug: 4.4.3(supports-color@10.2.2) + debug: 4.4.3 globrex: 0.1.2 tsconfck: 3.1.6(typescript@6.0.3) vite: 8.0.11(@types/node@24.12.3)(esbuild@0.27.7)(jiti@2.7.0)(yaml@2.8.4) @@ -5835,14 +6560,13 @@ snapshots: yallist@3.1.1: {} - yaml-ast-parser@0.0.43: {} + yaml@2.8.4: {} - yaml@2.8.4: - optional: true + yocto-queue@0.1.0: {} - yargs-parser@21.1.1: {} + yocto-queue@1.2.2: {} - yocto-queue@0.1.0: {} + yoctocolors@2.1.2: {} zod-validation-error@4.0.2(zod@4.4.3): dependencies: diff --git a/src/api/endpoints/authentication/authentication.ts b/src/api/endpoints/authentication/authentication.ts new file mode 100644 index 0000000..dc14f18 --- /dev/null +++ b/src/api/endpoints/authentication/authentication.ts @@ -0,0 +1,1788 @@ +/** + * Generated by orval v8.11.0 🍺 + * Do not edit manually. + * Stone Inscription API + * REST API for OAuth authentication, user profiles, inscription posts, images, public dashboard metrics, and moderation reports. + +Most JSON endpoints return a standard envelope with `message`, `http-status`, and `data`. Protected endpoints use a JWT bearer token in the `Authorization` header. + + * OpenAPI spec version: v1 + */ +import { useMutation, useQuery } from '@tanstack/react-query' +import type { + DataTag, + DefinedInitialDataOptions, + DefinedUseQueryResult, + MutationFunction, + QueryClient, + QueryFunction, + QueryKey, + UndefinedInitialDataOptions, + UseMutationOptions, + UseMutationResult, + UseQueryOptions, + UseQueryResult, +} from '@tanstack/react-query' + +import type { + AccessTokenResponse, + ApiErrorResponse, + ApiSuccessResponse, + ApproveAdminRequestParams, + GetMethodNameParams, + UpdateLastActive204, +} from '../../models' + +import { coreBackendClient } from '../../../utils/http/clients/coreBackend.client' + +export type getMethodNameResponse200 = { + data: string + status: 200 +} + +export type getMethodNameResponse400 = { + data: ApiErrorResponse + status: 400 +} + +export type getMethodNameResponse422 = { + data: ApiErrorResponse + status: 422 +} + +export type getMethodNameResponse500 = { + data: ApiErrorResponse + status: 500 +} + +export type getMethodNameResponseSuccess = getMethodNameResponse200 & { + headers: Headers +} +export type getMethodNameResponseError = ( + | getMethodNameResponse400 + | getMethodNameResponse422 + | getMethodNameResponse500 +) & { + headers: Headers +} + +export type getMethodNameResponse = getMethodNameResponseSuccess | getMethodNameResponseError + +export const getGetMethodNameUrl = (params: GetMethodNameParams) => { + const normalizedParams = new URLSearchParams() + + Object.entries(params || {}).forEach(([key, value]) => { + if (value !== undefined) { + normalizedParams.append(key, value === null ? 'null' : value.toString()) + } + }) + + const stringifiedParams = normalizedParams.toString() + + return stringifiedParams.length > 0 ? `/api/v1/?${stringifiedParams}` : `/api/v1/` +} + +/** + * Returns a minimal success message for connectivity checks. + * @summary API smoke test + */ +export const getMethodName = async ( + params: GetMethodNameParams, + options?: RequestInit +): Promise => { + return coreBackendClient(getGetMethodNameUrl(params), { + ...options, + method: 'GET', + }) +} + +export const getGetMethodNameMutationOptions = < + TError = ApiErrorResponse, + TContext = unknown, +>(options?: { + mutation?: UseMutationOptions< + Awaited>, + TError, + { params: GetMethodNameParams }, + TContext + > +}): UseMutationOptions< + Awaited>, + TError, + { params: GetMethodNameParams }, + TContext +> => { + const mutationKey = ['getMethodName'] + const { mutation: mutationOptions } = options + ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey + ? options + : { ...options, mutation: { ...options.mutation, mutationKey } } + : { mutation: { mutationKey } } + + const mutationFn: MutationFunction< + Awaited>, + { params: GetMethodNameParams } + > = (props) => { + const { params } = props ?? {} + + return getMethodName(params) + } + + return { mutationFn, ...mutationOptions } +} + +export type GetMethodNameMutationResult = NonNullable>> + +export type GetMethodNameMutationError = ApiErrorResponse + +/** + * @summary API smoke test + */ +export const useGetMethodName = ( + options?: { + mutation?: UseMutationOptions< + Awaited>, + TError, + { params: GetMethodNameParams }, + TContext + > + }, + queryClient?: QueryClient +): UseMutationResult< + Awaited>, + TError, + { params: GetMethodNameParams }, + TContext +> => { + return useMutation(getGetMethodNameMutationOptions(options), queryClient) +} +export type authResponse200 = { + data: string + status: 200 +} + +export type authResponse400 = { + data: ApiErrorResponse + status: 400 +} + +export type authResponse401 = { + data: ApiErrorResponse + status: 401 +} + +export type authResponse403 = { + data: ApiErrorResponse + status: 403 +} + +export type authResponse422 = { + data: ApiErrorResponse + status: 422 +} + +export type authResponse500 = { + data: ApiErrorResponse + status: 500 +} + +export type authResponseSuccess = authResponse200 & { + headers: Headers +} +export type authResponseError = ( + | authResponse400 + | authResponse401 + | authResponse403 + | authResponse422 + | authResponse500 +) & { + headers: Headers +} + +export type authResponse = authResponseSuccess | authResponseError + +export const getAuthUrl = () => { + return `/api/v1/auth` +} + +/** + * Requires an admin role and returns a simple authenticated message. + * @summary Admin auth check + */ +export const auth = async (options?: RequestInit): Promise => { + return coreBackendClient(getAuthUrl(), { + ...options, + method: 'GET', + }) +} + +export const getAuthMutationOptions = (options?: { + mutation?: UseMutationOptions>, TError, void, TContext> +}): UseMutationOptions>, TError, void, TContext> => { + const mutationKey = ['auth'] + const { mutation: mutationOptions } = options + ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey + ? options + : { ...options, mutation: { ...options.mutation, mutationKey } } + : { mutation: { mutationKey } } + + const mutationFn: MutationFunction>, void> = () => { + return auth() + } + + return { mutationFn, ...mutationOptions } +} + +export type AuthMutationResult = NonNullable>> + +export type AuthMutationError = ApiErrorResponse + +/** + * @summary Admin auth check + */ +export const useAuth = ( + options?: { + mutation?: UseMutationOptions>, TError, void, TContext> + }, + queryClient?: QueryClient +): UseMutationResult>, TError, void, TContext> => { + return useMutation(getAuthMutationOptions(options), queryClient) +} +export type facebookLoginResponse200 = { + data: string + status: 200 +} + +export type facebookLoginResponse400 = { + data: ApiErrorResponse + status: 400 +} + +export type facebookLoginResponse422 = { + data: ApiErrorResponse + status: 422 +} + +export type facebookLoginResponse500 = { + data: ApiErrorResponse + status: 500 +} + +export type facebookLoginResponseSuccess = facebookLoginResponse200 & { + headers: Headers +} +export type facebookLoginResponseError = ( + | facebookLoginResponse400 + | facebookLoginResponse422 + | facebookLoginResponse500 +) & { + headers: Headers +} + +export type facebookLoginResponse = facebookLoginResponseSuccess | facebookLoginResponseError + +export const getFacebookLoginUrl = () => { + return `/api/v1/auth/facebook` +} + +/** + * Legacy endpoint that returns the Facebook OAuth redirect target as text. + * @summary Facebook login redirect marker + */ +export const facebookLogin = async (options?: RequestInit): Promise => { + return coreBackendClient(getFacebookLoginUrl(), { + ...options, + method: 'GET', + }) +} + +export const getFacebookLoginMutationOptions = < + TError = ApiErrorResponse, + TContext = unknown, +>(options?: { + mutation?: UseMutationOptions>, TError, void, TContext> +}): UseMutationOptions>, TError, void, TContext> => { + const mutationKey = ['facebookLogin'] + const { mutation: mutationOptions } = options + ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey + ? options + : { ...options, mutation: { ...options.mutation, mutationKey } } + : { mutation: { mutationKey } } + + const mutationFn: MutationFunction>, void> = () => { + return facebookLogin() + } + + return { mutationFn, ...mutationOptions } +} + +export type FacebookLoginMutationResult = NonNullable>> + +export type FacebookLoginMutationError = ApiErrorResponse + +/** + * @summary Facebook login redirect marker + */ +export const useFacebookLogin = ( + options?: { + mutation?: UseMutationOptions>, TError, void, TContext> + }, + queryClient?: QueryClient +): UseMutationResult>, TError, void, TContext> => { + return useMutation(getFacebookLoginMutationOptions(options), queryClient) +} +export type authTokenResponse200 = { + data: string + status: 200 +} + +export type authTokenResponse400 = { + data: ApiErrorResponse + status: 400 +} + +export type authTokenResponse422 = { + data: ApiErrorResponse + status: 422 +} + +export type authTokenResponse500 = { + data: ApiErrorResponse + status: 500 +} + +export type authTokenResponseSuccess = authTokenResponse200 & { + headers: Headers +} +export type authTokenResponseError = ( + | authTokenResponse400 + | authTokenResponse422 + | authTokenResponse500 +) & { + headers: Headers +} + +export type authTokenResponse = authTokenResponseSuccess | authTokenResponseError + +export const getAuthTokenUrl = () => { + return `/api/v1/auth/token` +} + +/** + * Returns a text message used after successful authentication flows. + * @summary Token success marker + */ +export const authToken = async (options?: RequestInit): Promise => { + return coreBackendClient(getAuthTokenUrl(), { + ...options, + method: 'GET', + }) +} + +export const getAuthTokenMutationOptions = < + TError = ApiErrorResponse, + TContext = unknown, +>(options?: { + mutation?: UseMutationOptions>, TError, void, TContext> +}): UseMutationOptions>, TError, void, TContext> => { + const mutationKey = ['authToken'] + const { mutation: mutationOptions } = options + ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey + ? options + : { ...options, mutation: { ...options.mutation, mutationKey } } + : { mutation: { mutationKey } } + + const mutationFn: MutationFunction>, void> = () => { + return authToken() + } + + return { mutationFn, ...mutationOptions } +} + +export type AuthTokenMutationResult = NonNullable>> + +export type AuthTokenMutationError = ApiErrorResponse + +/** + * @summary Token success marker + */ +export const useAuthToken = ( + options?: { + mutation?: UseMutationOptions>, TError, void, TContext> + }, + queryClient?: QueryClient +): UseMutationResult>, TError, void, TContext> => { + return useMutation(getAuthTokenMutationOptions(options), queryClient) +} +export type authRoleResponse200 = { + data: string + status: 200 +} + +export type authRoleResponse400 = { + data: ApiErrorResponse + status: 400 +} + +export type authRoleResponse401 = { + data: ApiErrorResponse + status: 401 +} + +export type authRoleResponse403 = { + data: ApiErrorResponse + status: 403 +} + +export type authRoleResponse422 = { + data: ApiErrorResponse + status: 422 +} + +export type authRoleResponse500 = { + data: ApiErrorResponse + status: 500 +} + +export type authRoleResponseSuccess = authRoleResponse200 & { + headers: Headers +} +export type authRoleResponseError = ( + | authRoleResponse400 + | authRoleResponse401 + | authRoleResponse403 + | authRoleResponse422 + | authRoleResponse500 +) & { + headers: Headers +} + +export type authRoleResponse = authRoleResponseSuccess | authRoleResponseError + +export const getAuthRoleUrl = () => { + return `/api/v1/authrole` +} + +/** + * Requires either user or admin role. + * @summary User or admin role check + */ +export const authRole = async (options?: RequestInit): Promise => { + return coreBackendClient(getAuthRoleUrl(), { + ...options, + method: 'GET', + }) +} + +export const getAuthRoleMutationOptions = < + TError = ApiErrorResponse, + TContext = unknown, +>(options?: { + mutation?: UseMutationOptions>, TError, void, TContext> +}): UseMutationOptions>, TError, void, TContext> => { + const mutationKey = ['authRole'] + const { mutation: mutationOptions } = options + ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey + ? options + : { ...options, mutation: { ...options.mutation, mutationKey } } + : { mutation: { mutationKey } } + + const mutationFn: MutationFunction>, void> = () => { + return authRole() + } + + return { mutationFn, ...mutationOptions } +} + +export type AuthRoleMutationResult = NonNullable>> + +export type AuthRoleMutationError = ApiErrorResponse + +/** + * @summary User or admin role check + */ +export const useAuthRole = ( + options?: { + mutation?: UseMutationOptions>, TError, void, TContext> + }, + queryClient?: QueryClient +): UseMutationResult>, TError, void, TContext> => { + return useMutation(getAuthRoleMutationOptions(options), queryClient) +} +export type getfailResponse200 = { + data: string + status: 200 +} + +export type getfailResponse400 = { + data: ApiErrorResponse + status: 400 +} + +export type getfailResponse401 = { + data: ApiErrorResponse + status: 401 +} + +export type getfailResponse403 = { + data: ApiErrorResponse + status: 403 +} + +export type getfailResponse422 = { + data: ApiErrorResponse + status: 422 +} + +export type getfailResponse500 = { + data: ApiErrorResponse + status: 500 +} + +export type getfailResponseSuccess = getfailResponse200 & { + headers: Headers +} +export type getfailResponseError = ( + | getfailResponse400 + | getfailResponse401 + | getfailResponse403 + | getfailResponse422 + | getfailResponse500 +) & { + headers: Headers +} + +export type getfailResponse = getfailResponseSuccess | getfailResponseError + +export const getGetfailUrl = () => { + return `/api/v1/fail` +} + +/** + * Requires a user role and returns a simple role-check message. + * @summary User role check + */ +export const getfail = async (options?: RequestInit): Promise => { + return coreBackendClient(getGetfailUrl(), { + ...options, + method: 'GET', + }) +} + +export const getGetfailMutationOptions = (options?: { + mutation?: UseMutationOptions>, TError, void, TContext> +}): UseMutationOptions>, TError, void, TContext> => { + const mutationKey = ['getfail'] + const { mutation: mutationOptions } = options + ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey + ? options + : { ...options, mutation: { ...options.mutation, mutationKey } } + : { mutation: { mutationKey } } + + const mutationFn: MutationFunction>, void> = () => { + return getfail() + } + + return { mutationFn, ...mutationOptions } +} + +export type GetfailMutationResult = NonNullable>> + +export type GetfailMutationError = ApiErrorResponse + +/** + * @summary User role check + */ +export const useGetfail = ( + options?: { + mutation?: UseMutationOptions>, TError, void, TContext> + }, + queryClient?: QueryClient +): UseMutationResult>, TError, void, TContext> => { + return useMutation(getGetfailMutationOptions(options), queryClient) +} +export type noAuthResponse200 = { + data: string + status: 200 +} + +export type noAuthResponse400 = { + data: ApiErrorResponse + status: 400 +} + +export type noAuthResponse422 = { + data: ApiErrorResponse + status: 422 +} + +export type noAuthResponse500 = { + data: ApiErrorResponse + status: 500 +} + +export type noAuthResponseSuccess = noAuthResponse200 & { + headers: Headers +} +export type noAuthResponseError = (noAuthResponse400 | noAuthResponse422 | noAuthResponse500) & { + headers: Headers +} + +export type noAuthResponse = noAuthResponseSuccess | noAuthResponseError + +export const getNoAuthUrl = () => { + return `/api/v1/noauth/check` +} + +/** + * Confirms that public no-auth routes are reachable. + * @summary Public auth health check + */ +export const noAuth = async (options?: RequestInit): Promise => { + return coreBackendClient(getNoAuthUrl(), { + ...options, + method: 'GET', + }) +} + +export const getNoAuthMutationOptions = (options?: { + mutation?: UseMutationOptions>, TError, void, TContext> +}): UseMutationOptions>, TError, void, TContext> => { + const mutationKey = ['noAuth'] + const { mutation: mutationOptions } = options + ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey + ? options + : { ...options, mutation: { ...options.mutation, mutationKey } } + : { mutation: { mutationKey } } + + const mutationFn: MutationFunction>, void> = () => { + return noAuth() + } + + return { mutationFn, ...mutationOptions } +} + +export type NoAuthMutationResult = NonNullable>> + +export type NoAuthMutationError = ApiErrorResponse + +/** + * @summary Public auth health check + */ +export const useNoAuth = ( + options?: { + mutation?: UseMutationOptions>, TError, void, TContext> + }, + queryClient?: QueryClient +): UseMutationResult>, TError, void, TContext> => { + return useMutation(getNoAuthMutationOptions(options), queryClient) +} +export type approveAdminRequestResponse302 = { + data: void + status: 302 +} + +export type approveAdminRequestResponse400 = { + data: ApiErrorResponse + status: 400 +} + +export type approveAdminRequestResponse422 = { + data: ApiErrorResponse + status: 422 +} + +export type approveAdminRequestResponse500 = { + data: ApiErrorResponse + status: 500 +} +export type approveAdminRequestResponseError = ( + | approveAdminRequestResponse302 + | approveAdminRequestResponse400 + | approveAdminRequestResponse422 + | approveAdminRequestResponse500 +) & { + headers: Headers +} + +export type approveAdminRequestResponse = approveAdminRequestResponseError + +export const getApproveAdminRequestUrl = (params: ApproveAdminRequestParams) => { + const normalizedParams = new URLSearchParams() + + Object.entries(params || {}).forEach(([key, value]) => { + if (value !== undefined) { + normalizedParams.append(key, value === null ? 'null' : value.toString()) + } + }) + + const stringifiedParams = normalizedParams.toString() + + return stringifiedParams.length > 0 + ? `/oauth2/admin/approve?${stringifiedParams}` + : `/oauth2/admin/approve` +} + +/** + * Consumes an emailed approval token and redirects the browser to the configured approval-result page. + * @summary Approve admin request + */ +export const approveAdminRequest = async ( + params: ApproveAdminRequestParams, + options?: RequestInit +): Promise => { + return coreBackendClient(getApproveAdminRequestUrl(params), { + ...options, + method: 'GET', + }) +} + +export const getApproveAdminRequestMutationOptions = < + TError = void | ApiErrorResponse, + TContext = unknown, +>(options?: { + mutation?: UseMutationOptions< + Awaited>, + TError, + { params: ApproveAdminRequestParams }, + TContext + > +}): UseMutationOptions< + Awaited>, + TError, + { params: ApproveAdminRequestParams }, + TContext +> => { + const mutationKey = ['approveAdminRequest'] + const { mutation: mutationOptions } = options + ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey + ? options + : { ...options, mutation: { ...options.mutation, mutationKey } } + : { mutation: { mutationKey } } + + const mutationFn: MutationFunction< + Awaited>, + { params: ApproveAdminRequestParams } + > = (props) => { + const { params } = props ?? {} + + return approveAdminRequest(params) + } + + return { mutationFn, ...mutationOptions } +} + +export type ApproveAdminRequestMutationResult = NonNullable< + Awaited> +> + +export type ApproveAdminRequestMutationError = void | ApiErrorResponse + +/** + * @summary Approve admin request + */ +export const useApproveAdminRequest = ( + options?: { + mutation?: UseMutationOptions< + Awaited>, + TError, + { params: ApproveAdminRequestParams }, + TContext + > + }, + queryClient?: QueryClient +): UseMutationResult< + Awaited>, + TError, + { params: ApproveAdminRequestParams }, + TContext +> => { + return useMutation(getApproveAdminRequestMutationOptions(options), queryClient) +} +export type adminLoginDefaultResponse200 = { + data: void + status: 200 +} + +export type adminLoginDefaultResponse400 = { + data: ApiErrorResponse + status: 400 +} + +export type adminLoginDefaultResponse422 = { + data: ApiErrorResponse + status: 422 +} + +export type adminLoginDefaultResponse500 = { + data: ApiErrorResponse + status: 500 +} + +export type adminLoginDefaultResponseSuccess = adminLoginDefaultResponse200 & { + headers: Headers +} +export type adminLoginDefaultResponseError = ( + | adminLoginDefaultResponse400 + | adminLoginDefaultResponse422 + | adminLoginDefaultResponse500 +) & { + headers: Headers +} + +export type adminLoginDefaultResponse = + | adminLoginDefaultResponseSuccess + | adminLoginDefaultResponseError + +export const getAdminLoginDefaultUrl = () => { + return `/oauth2/admin/login` +} + +/** + * Starts admin login using the configured default OAuth provider. + * @summary Start default admin OAuth login + */ +export const adminLoginDefault = async ( + options?: RequestInit +): Promise => { + return coreBackendClient(getAdminLoginDefaultUrl(), { + ...options, + method: 'GET', + }) +} + +export const getAdminLoginDefaultMutationOptions = < + TError = ApiErrorResponse, + TContext = unknown, +>(options?: { + mutation?: UseMutationOptions< + Awaited>, + TError, + void, + TContext + > +}): UseMutationOptions>, TError, void, TContext> => { + const mutationKey = ['adminLoginDefault'] + const { mutation: mutationOptions } = options + ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey + ? options + : { ...options, mutation: { ...options.mutation, mutationKey } } + : { mutation: { mutationKey } } + + const mutationFn: MutationFunction>, void> = () => { + return adminLoginDefault() + } + + return { mutationFn, ...mutationOptions } +} + +export type AdminLoginDefaultMutationResult = NonNullable< + Awaited> +> + +export type AdminLoginDefaultMutationError = ApiErrorResponse + +/** + * @summary Start default admin OAuth login + */ +export const useAdminLoginDefault = ( + options?: { + mutation?: UseMutationOptions< + Awaited>, + TError, + void, + TContext + > + }, + queryClient?: QueryClient +): UseMutationResult>, TError, void, TContext> => { + return useMutation(getAdminLoginDefaultMutationOptions(options), queryClient) +} +export type adminLoginResponse200 = { + data: void + status: 200 +} + +export type adminLoginResponse400 = { + data: ApiErrorResponse + status: 400 +} + +export type adminLoginResponse422 = { + data: ApiErrorResponse + status: 422 +} + +export type adminLoginResponse500 = { + data: ApiErrorResponse + status: 500 +} + +export type adminLoginResponseSuccess = adminLoginResponse200 & { + headers: Headers +} +export type adminLoginResponseError = ( + | adminLoginResponse400 + | adminLoginResponse422 + | adminLoginResponse500 +) & { + headers: Headers +} + +export type adminLoginResponse = adminLoginResponseSuccess | adminLoginResponseError + +export const getAdminLoginUrl = (provider: string) => { + return `/oauth2/admin/login/${provider}` +} + +/** + * Starts OAuth login for an approved admin account. + * @summary Start admin OAuth login + */ +export const adminLogin = async ( + provider: string, + options?: RequestInit +): Promise => { + return coreBackendClient(getAdminLoginUrl(provider), { + ...options, + method: 'GET', + }) +} + +export const getAdminLoginMutationOptions = < + TError = ApiErrorResponse, + TContext = unknown, +>(options?: { + mutation?: UseMutationOptions< + Awaited>, + TError, + { provider: string }, + TContext + > +}): UseMutationOptions< + Awaited>, + TError, + { provider: string }, + TContext +> => { + const mutationKey = ['adminLogin'] + const { mutation: mutationOptions } = options + ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey + ? options + : { ...options, mutation: { ...options.mutation, mutationKey } } + : { mutation: { mutationKey } } + + const mutationFn: MutationFunction< + Awaited>, + { provider: string } + > = (props) => { + const { provider } = props ?? {} + + return adminLogin(provider) + } + + return { mutationFn, ...mutationOptions } +} + +export type AdminLoginMutationResult = NonNullable>> + +export type AdminLoginMutationError = ApiErrorResponse + +/** + * @summary Start admin OAuth login + */ +export const useAdminLogin = ( + options?: { + mutation?: UseMutationOptions< + Awaited>, + TError, + { provider: string }, + TContext + > + }, + queryClient?: QueryClient +): UseMutationResult< + Awaited>, + TError, + { provider: string }, + TContext +> => { + return useMutation(getAdminLoginMutationOptions(options), queryClient) +} +export type adminRegisterDefaultResponse200 = { + data: void + status: 200 +} + +export type adminRegisterDefaultResponse400 = { + data: ApiErrorResponse + status: 400 +} + +export type adminRegisterDefaultResponse422 = { + data: ApiErrorResponse + status: 422 +} + +export type adminRegisterDefaultResponse500 = { + data: ApiErrorResponse + status: 500 +} + +export type adminRegisterDefaultResponseSuccess = adminRegisterDefaultResponse200 & { + headers: Headers +} +export type adminRegisterDefaultResponseError = ( + | adminRegisterDefaultResponse400 + | adminRegisterDefaultResponse422 + | adminRegisterDefaultResponse500 +) & { + headers: Headers +} + +export type adminRegisterDefaultResponse = + | adminRegisterDefaultResponseSuccess + | adminRegisterDefaultResponseError + +export const getAdminRegisterDefaultUrl = () => { + return `/oauth2/admin/register` +} + +/** + * Starts admin registration using the configured default OAuth provider. + * @summary Start default admin registration + */ +export const adminRegisterDefault = async ( + options?: RequestInit +): Promise => { + return coreBackendClient(getAdminRegisterDefaultUrl(), { + ...options, + method: 'GET', + }) +} + +export const getAdminRegisterDefaultMutationOptions = < + TError = ApiErrorResponse, + TContext = unknown, +>(options?: { + mutation?: UseMutationOptions< + Awaited>, + TError, + void, + TContext + > +}): UseMutationOptions< + Awaited>, + TError, + void, + TContext +> => { + const mutationKey = ['adminRegisterDefault'] + const { mutation: mutationOptions } = options + ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey + ? options + : { ...options, mutation: { ...options.mutation, mutationKey } } + : { mutation: { mutationKey } } + + const mutationFn: MutationFunction< + Awaited>, + void + > = () => { + return adminRegisterDefault() + } + + return { mutationFn, ...mutationOptions } +} + +export type AdminRegisterDefaultMutationResult = NonNullable< + Awaited> +> + +export type AdminRegisterDefaultMutationError = ApiErrorResponse + +/** + * @summary Start default admin registration + */ +export const useAdminRegisterDefault = ( + options?: { + mutation?: UseMutationOptions< + Awaited>, + TError, + void, + TContext + > + }, + queryClient?: QueryClient +): UseMutationResult>, TError, void, TContext> => { + return useMutation(getAdminRegisterDefaultMutationOptions(options), queryClient) +} +export type adminRegisterResponse200 = { + data: void + status: 200 +} + +export type adminRegisterResponse400 = { + data: ApiErrorResponse + status: 400 +} + +export type adminRegisterResponse422 = { + data: ApiErrorResponse + status: 422 +} + +export type adminRegisterResponse500 = { + data: ApiErrorResponse + status: 500 +} + +export type adminRegisterResponseSuccess = adminRegisterResponse200 & { + headers: Headers +} +export type adminRegisterResponseError = ( + | adminRegisterResponse400 + | adminRegisterResponse422 + | adminRegisterResponse500 +) & { + headers: Headers +} + +export type adminRegisterResponse = adminRegisterResponseSuccess | adminRegisterResponseError + +export const getAdminRegisterUrl = (provider: string) => { + return `/oauth2/admin/register/${provider}` +} + +/** + * Starts OAuth flow for an admin registration request. + * @summary Start admin registration + */ +export const adminRegister = async ( + provider: string, + options?: RequestInit +): Promise => { + return coreBackendClient(getAdminRegisterUrl(provider), { + ...options, + method: 'GET', + }) +} + +export const getAdminRegisterMutationOptions = < + TError = ApiErrorResponse, + TContext = unknown, +>(options?: { + mutation?: UseMutationOptions< + Awaited>, + TError, + { provider: string }, + TContext + > +}): UseMutationOptions< + Awaited>, + TError, + { provider: string }, + TContext +> => { + const mutationKey = ['adminRegister'] + const { mutation: mutationOptions } = options + ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey + ? options + : { ...options, mutation: { ...options.mutation, mutationKey } } + : { mutation: { mutationKey } } + + const mutationFn: MutationFunction< + Awaited>, + { provider: string } + > = (props) => { + const { provider } = props ?? {} + + return adminRegister(provider) + } + + return { mutationFn, ...mutationOptions } +} + +export type AdminRegisterMutationResult = NonNullable>> + +export type AdminRegisterMutationError = ApiErrorResponse + +/** + * @summary Start admin registration + */ +export const useAdminRegister = ( + options?: { + mutation?: UseMutationOptions< + Awaited>, + TError, + { provider: string }, + TContext + > + }, + queryClient?: QueryClient +): UseMutationResult< + Awaited>, + TError, + { provider: string }, + TContext +> => { + return useMutation(getAdminRegisterMutationOptions(options), queryClient) +} +export type updateLastActiveResponse204 = { + data: UpdateLastActive204 + status: 204 +} + +export type updateLastActiveResponse400 = { + data: ApiErrorResponse + status: 400 +} + +export type updateLastActiveResponse422 = { + data: ApiErrorResponse + status: 422 +} + +export type updateLastActiveResponse500 = { + data: ApiErrorResponse + status: 500 +} + +export type updateLastActiveResponseSuccess = updateLastActiveResponse204 & { + headers: Headers +} +export type updateLastActiveResponseError = ( + | updateLastActiveResponse400 + | updateLastActiveResponse422 + | updateLastActiveResponse500 +) & { + headers: Headers +} + +export type updateLastActiveResponse = + | updateLastActiveResponseSuccess + | updateLastActiveResponseError + +export const getUpdateLastActiveUrl = () => { + return `/oauth2/authenticated/active` +} + +/** + * Refreshes last-use time for the refresh-token session. Returns no content on success. + * @summary Mark session active + */ +export const updateLastActive = async ( + options?: RequestInit +): Promise => { + return coreBackendClient(getUpdateLastActiveUrl(), { + ...options, + method: 'POST', + }) +} + +export const getUpdateLastActiveQueryKey = () => { + return ['POST', `/oauth2/authenticated/active`] as const +} + +export const getUpdateLastActiveQueryOptions = < + TData = Awaited>, + TError = ApiErrorResponse, +>(options?: { + query?: Partial>, TError, TData>> +}) => { + const { query: queryOptions } = options ?? {} + + const queryKey = queryOptions?.queryKey ?? getUpdateLastActiveQueryKey() + + const queryFn: QueryFunction>> = ({ signal }) => + updateLastActive({ signal }) + + return { queryKey, queryFn, ...queryOptions } as UseQueryOptions< + Awaited>, + TError, + TData + > & { queryKey: DataTag } +} + +export type UpdateLastActiveQueryResult = NonNullable>> +export type UpdateLastActiveQueryError = ApiErrorResponse + +export function useUpdateLastActive< + TData = Awaited>, + TError = ApiErrorResponse, +>( + options: { + query: Partial>, TError, TData>> & + Pick< + DefinedInitialDataOptions< + Awaited>, + TError, + Awaited> + >, + 'initialData' + > + }, + queryClient?: QueryClient +): DefinedUseQueryResult & { queryKey: DataTag } +export function useUpdateLastActive< + TData = Awaited>, + TError = ApiErrorResponse, +>( + options?: { + query?: Partial>, TError, TData>> & + Pick< + UndefinedInitialDataOptions< + Awaited>, + TError, + Awaited> + >, + 'initialData' + > + }, + queryClient?: QueryClient +): UseQueryResult & { queryKey: DataTag } +export function useUpdateLastActive< + TData = Awaited>, + TError = ApiErrorResponse, +>( + options?: { + query?: Partial>, TError, TData>> + }, + queryClient?: QueryClient +): UseQueryResult & { queryKey: DataTag } +/** + * @summary Mark session active + */ + +export function useUpdateLastActive< + TData = Awaited>, + TError = ApiErrorResponse, +>( + options?: { + query?: Partial>, TError, TData>> + }, + queryClient?: QueryClient +): UseQueryResult & { queryKey: DataTag } { + const queryOptions = getUpdateLastActiveQueryOptions(options) + + const query = useQuery(queryOptions, queryClient) as UseQueryResult & { + queryKey: DataTag + } + + return { ...query, queryKey: queryOptions.queryKey } +} + +export type refreshTokenResponse200 = { + data: AccessTokenResponse + status: 200 +} + +export type refreshTokenResponse400 = { + data: ApiErrorResponse + status: 400 +} + +export type refreshTokenResponse401 = { + data: ApiErrorResponse + status: 401 +} + +export type refreshTokenResponse422 = { + data: ApiErrorResponse + status: 422 +} + +export type refreshTokenResponse500 = { + data: ApiErrorResponse + status: 500 +} + +export type refreshTokenResponseSuccess = refreshTokenResponse200 & { + headers: Headers +} +export type refreshTokenResponseError = ( + | refreshTokenResponse400 + | refreshTokenResponse401 + | refreshTokenResponse422 + | refreshTokenResponse500 +) & { + headers: Headers +} + +export type refreshTokenResponse = refreshTokenResponseSuccess | refreshTokenResponseError + +export const getRefreshTokenUrl = () => { + return `/oauth2/authenticated/refresh-token` +} + +/** + * Rotates the HTTP-only refresh token cookie and returns a new JWT access token. + * @summary Refresh access token + */ +export const refreshToken = async (options?: RequestInit): Promise => { + return coreBackendClient(getRefreshTokenUrl(), { + ...options, + method: 'POST', + }) +} + +export const getRefreshTokenQueryKey = () => { + return ['POST', `/oauth2/authenticated/refresh-token`] as const +} + +export const getRefreshTokenQueryOptions = < + TData = Awaited>, + TError = ApiErrorResponse, +>(options?: { + query?: Partial>, TError, TData>> +}) => { + const { query: queryOptions } = options ?? {} + + const queryKey = queryOptions?.queryKey ?? getRefreshTokenQueryKey() + + const queryFn: QueryFunction>> = ({ signal }) => + refreshToken({ signal }) + + return { queryKey, queryFn, ...queryOptions } as UseQueryOptions< + Awaited>, + TError, + TData + > & { queryKey: DataTag } +} + +export type RefreshTokenQueryResult = NonNullable>> +export type RefreshTokenQueryError = ApiErrorResponse + +export function useRefreshToken< + TData = Awaited>, + TError = ApiErrorResponse, +>( + options: { + query: Partial>, TError, TData>> & + Pick< + DefinedInitialDataOptions< + Awaited>, + TError, + Awaited> + >, + 'initialData' + > + }, + queryClient?: QueryClient +): DefinedUseQueryResult & { queryKey: DataTag } +export function useRefreshToken< + TData = Awaited>, + TError = ApiErrorResponse, +>( + options?: { + query?: Partial>, TError, TData>> & + Pick< + UndefinedInitialDataOptions< + Awaited>, + TError, + Awaited> + >, + 'initialData' + > + }, + queryClient?: QueryClient +): UseQueryResult & { queryKey: DataTag } +export function useRefreshToken< + TData = Awaited>, + TError = ApiErrorResponse, +>( + options?: { + query?: Partial>, TError, TData>> + }, + queryClient?: QueryClient +): UseQueryResult & { queryKey: DataTag } +/** + * @summary Refresh access token + */ + +export function useRefreshToken< + TData = Awaited>, + TError = ApiErrorResponse, +>( + options?: { + query?: Partial>, TError, TData>> + }, + queryClient?: QueryClient +): UseQueryResult & { queryKey: DataTag } { + const queryOptions = getRefreshTokenQueryOptions(options) + + const query = useQuery(queryOptions, queryClient) as UseQueryResult & { + queryKey: DataTag + } + + return { ...query, queryKey: queryOptions.queryKey } +} + +export type loginResponse200 = { + data: void + status: 200 +} + +export type loginResponse400 = { + data: ApiErrorResponse + status: 400 +} + +export type loginResponse422 = { + data: ApiErrorResponse + status: 422 +} + +export type loginResponse500 = { + data: ApiErrorResponse + status: 500 +} + +export type loginResponseSuccess = loginResponse200 & { + headers: Headers +} +export type loginResponseError = (loginResponse400 | loginResponse422 | loginResponse500) & { + headers: Headers +} + +export type loginResponse = loginResponseSuccess | loginResponseError + +export const getLoginUrl = () => { + return `/oauth2/login` +} + +/** + * Redirects to the configured default OAuth provider. + * @summary Start default user OAuth login + */ +export const login = async (options?: RequestInit): Promise => { + return coreBackendClient(getLoginUrl(), { + ...options, + method: 'GET', + }) +} + +export const getLoginMutationOptions = (options?: { + mutation?: UseMutationOptions>, TError, void, TContext> +}): UseMutationOptions>, TError, void, TContext> => { + const mutationKey = ['login'] + const { mutation: mutationOptions } = options + ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey + ? options + : { ...options, mutation: { ...options.mutation, mutationKey } } + : { mutation: { mutationKey } } + + const mutationFn: MutationFunction>, void> = () => { + return login() + } + + return { mutationFn, ...mutationOptions } +} + +export type LoginMutationResult = NonNullable>> + +export type LoginMutationError = ApiErrorResponse + +/** + * @summary Start default user OAuth login + */ +export const useLogin = ( + options?: { + mutation?: UseMutationOptions>, TError, void, TContext> + }, + queryClient?: QueryClient +): UseMutationResult>, TError, void, TContext> => { + return useMutation(getLoginMutationOptions(options), queryClient) +} +export type loginWithProviderResponse302 = { + data: void + status: 302 +} + +export type loginWithProviderResponse400 = { + data: ApiErrorResponse + status: 400 +} + +export type loginWithProviderResponse422 = { + data: ApiErrorResponse + status: 422 +} + +export type loginWithProviderResponse500 = { + data: ApiErrorResponse + status: 500 +} +export type loginWithProviderResponseError = ( + | loginWithProviderResponse302 + | loginWithProviderResponse400 + | loginWithProviderResponse422 + | loginWithProviderResponse500 +) & { + headers: Headers +} + +export type loginWithProviderResponse = loginWithProviderResponseError + +export const getLoginWithProviderUrl = (provider: string) => { + return `/oauth2/login/${provider}` +} + +/** + * Stores the user-login flow marker and redirects to the configured OAuth provider. + * @summary Start user OAuth login + */ +export const loginWithProvider = async ( + provider: string, + options?: RequestInit +): Promise => { + return coreBackendClient(getLoginWithProviderUrl(provider), { + ...options, + method: 'GET', + }) +} + +export const getLoginWithProviderMutationOptions = < + TError = void | ApiErrorResponse, + TContext = unknown, +>(options?: { + mutation?: UseMutationOptions< + Awaited>, + TError, + { provider: string }, + TContext + > +}): UseMutationOptions< + Awaited>, + TError, + { provider: string }, + TContext +> => { + const mutationKey = ['loginWithProvider'] + const { mutation: mutationOptions } = options + ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey + ? options + : { ...options, mutation: { ...options.mutation, mutationKey } } + : { mutation: { mutationKey } } + + const mutationFn: MutationFunction< + Awaited>, + { provider: string } + > = (props) => { + const { provider } = props ?? {} + + return loginWithProvider(provider) + } + + return { mutationFn, ...mutationOptions } +} + +export type LoginWithProviderMutationResult = NonNullable< + Awaited> +> + +export type LoginWithProviderMutationError = void | ApiErrorResponse + +/** + * @summary Start user OAuth login + */ +export const useLoginWithProvider = ( + options?: { + mutation?: UseMutationOptions< + Awaited>, + TError, + { provider: string }, + TContext + > + }, + queryClient?: QueryClient +): UseMutationResult< + Awaited>, + TError, + { provider: string }, + TContext +> => { + return useMutation(getLoginWithProviderMutationOptions(options), queryClient) +} +export type logoutAuthResponse200 = { + data: ApiSuccessResponse + status: 200 +} + +export type logoutAuthResponse400 = { + data: ApiErrorResponse + status: 400 +} + +export type logoutAuthResponse422 = { + data: ApiErrorResponse + status: 422 +} + +export type logoutAuthResponse500 = { + data: ApiErrorResponse + status: 500 +} + +export type logoutAuthResponseSuccess = logoutAuthResponse200 & { + headers: Headers +} +export type logoutAuthResponseError = ( + | logoutAuthResponse400 + | logoutAuthResponse422 + | logoutAuthResponse500 +) & { + headers: Headers +} + +export type logoutAuthResponse = logoutAuthResponseSuccess | logoutAuthResponseError + +export const getLogoutAuthUrl = () => { + return `/oauth2/logout` +} + +/** + * Revokes the refresh token cookie when present and expires the browser cookie. + * @summary Logout + */ +export const logoutAuth = async (options?: RequestInit): Promise => { + return coreBackendClient(getLogoutAuthUrl(), { + ...options, + method: 'POST', + }) +} + +export const getLogoutAuthMutationOptions = < + TError = ApiErrorResponse, + TContext = unknown, +>(options?: { + mutation?: UseMutationOptions>, TError, void, TContext> +}): UseMutationOptions>, TError, void, TContext> => { + const mutationKey = ['logoutAuth'] + const { mutation: mutationOptions } = options + ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey + ? options + : { ...options, mutation: { ...options.mutation, mutationKey } } + : { mutation: { mutationKey } } + + const mutationFn: MutationFunction>, void> = () => { + return logoutAuth() + } + + return { mutationFn, ...mutationOptions } +} + +export type LogoutAuthMutationResult = NonNullable>> + +export type LogoutAuthMutationError = ApiErrorResponse + +/** + * @summary Logout + */ +export const useLogoutAuth = ( + options?: { + mutation?: UseMutationOptions>, TError, void, TContext> + }, + queryClient?: QueryClient +): UseMutationResult>, TError, void, TContext> => { + return useMutation(getLogoutAuthMutationOptions(options), queryClient) +} diff --git a/src/api/endpoints/posts/posts.ts b/src/api/endpoints/posts/posts.ts new file mode 100644 index 0000000..854ea08 --- /dev/null +++ b/src/api/endpoints/posts/posts.ts @@ -0,0 +1,2858 @@ +/** + * Generated by orval v8.11.0 🍺 + * Do not edit manually. + * Stone Inscription API + * REST API for OAuth authentication, user profiles, inscription posts, images, public dashboard metrics, and moderation reports. + +Most JSON endpoints return a standard envelope with `message`, `http-status`, and `data`. Protected endpoints use a JWT bearer token in the `Authorization` header. + + * OpenAPI spec version: v1 + */ +import { useMutation, useQuery } from '@tanstack/react-query' +import type { + DataTag, + DefinedInitialDataOptions, + DefinedUseQueryResult, + MutationFunction, + QueryClient, + QueryFunction, + QueryKey, + UndefinedInitialDataOptions, + UseMutationOptions, + UseMutationResult, + UseQueryOptions, + UseQueryResult, +} from '@tanstack/react-query' + +import type { + AddImagesToPostBody, + AddImagesToPostParams, + AddPoastDiscriptionParams, + AddPostWithFileBody, + AddRatingParams, + AddVoteParams, + ApiErrorResponse, + ApiSuccessResponse, + DashboardCountsResponse, + DeleteImagesFromPostParams, + DescriptionDeleteParams, + GetPostDiscriptionParams, + PostDeleteParams, + UpdatePostBody, + UpdatePostDiscriptionParams, + UpdatePostParams, +} from '../../models' + +import { coreBackendClient } from '../../../utils/http/clients/coreBackend.client' + +export type addImagesToPostResponse200 = { + data: ApiSuccessResponse + status: 200 +} + +export type addImagesToPostResponse400 = { + data: ApiErrorResponse + status: 400 +} + +export type addImagesToPostResponse401 = { + data: ApiErrorResponse + status: 401 +} + +export type addImagesToPostResponse403 = { + data: ApiErrorResponse + status: 403 +} + +export type addImagesToPostResponse422 = { + data: ApiErrorResponse + status: 422 +} + +export type addImagesToPostResponse500 = { + data: ApiErrorResponse + status: 500 +} + +export type addImagesToPostResponseSuccess = addImagesToPostResponse200 & { + headers: Headers +} +export type addImagesToPostResponseError = ( + | addImagesToPostResponse400 + | addImagesToPostResponse401 + | addImagesToPostResponse403 + | addImagesToPostResponse422 + | addImagesToPostResponse500 +) & { + headers: Headers +} + +export type addImagesToPostResponse = addImagesToPostResponseSuccess | addImagesToPostResponseError + +export const getAddImagesToPostUrl = (params: AddImagesToPostParams) => { + const normalizedParams = new URLSearchParams() + + Object.entries(params || {}).forEach(([key, value]) => { + if (value !== undefined) { + normalizedParams.append(key, value === null ? 'null' : value.toString()) + } + }) + + const stringifiedParams = normalizedParams.toString() + + return stringifiedParams.length > 0 + ? `/post/addImagesToPost?${stringifiedParams}` + : `/post/addImagesToPost` +} + +/** + * Adds one or more images to an owned post while enforcing extension, size, and max image-count rules. + * @summary Add images to post + */ +export const addImagesToPost = async ( + params: AddImagesToPostParams, + addImagesToPostBody?: AddImagesToPostBody, + options?: RequestInit +): Promise => { + return coreBackendClient(getAddImagesToPostUrl(params), { + ...options, + method: 'POST', + headers: { 'Content-Type': 'application/json', ...options?.headers }, + body: JSON.stringify(addImagesToPostBody), + }) +} + +export const getAddImagesToPostQueryKey = ( + params?: AddImagesToPostParams, + addImagesToPostBody?: AddImagesToPostBody +) => { + return [ + 'POST', + `/post/addImagesToPost`, + ...(params ? [params] : []), + addImagesToPostBody, + ] as const +} + +export const getAddImagesToPostQueryOptions = < + TData = Awaited>, + TError = ApiErrorResponse, +>( + params: AddImagesToPostParams, + addImagesToPostBody?: AddImagesToPostBody, + options?: { + query?: Partial>, TError, TData>> + } +) => { + const { query: queryOptions } = options ?? {} + + const queryKey = queryOptions?.queryKey ?? getAddImagesToPostQueryKey(params, addImagesToPostBody) + + const queryFn: QueryFunction>> = ({ signal }) => + addImagesToPost(params, addImagesToPostBody, { signal }) + + return { queryKey, queryFn, ...queryOptions } as UseQueryOptions< + Awaited>, + TError, + TData + > & { queryKey: DataTag } +} + +export type AddImagesToPostQueryResult = NonNullable>> +export type AddImagesToPostQueryError = ApiErrorResponse + +export function useAddImagesToPost< + TData = Awaited>, + TError = ApiErrorResponse, +>( + params: AddImagesToPostParams, + addImagesToPostBody: undefined | AddImagesToPostBody, + options: { + query: Partial>, TError, TData>> & + Pick< + DefinedInitialDataOptions< + Awaited>, + TError, + Awaited> + >, + 'initialData' + > + }, + queryClient?: QueryClient +): DefinedUseQueryResult & { queryKey: DataTag } +export function useAddImagesToPost< + TData = Awaited>, + TError = ApiErrorResponse, +>( + params: AddImagesToPostParams, + addImagesToPostBody?: AddImagesToPostBody, + options?: { + query?: Partial>, TError, TData>> & + Pick< + UndefinedInitialDataOptions< + Awaited>, + TError, + Awaited> + >, + 'initialData' + > + }, + queryClient?: QueryClient +): UseQueryResult & { queryKey: DataTag } +export function useAddImagesToPost< + TData = Awaited>, + TError = ApiErrorResponse, +>( + params: AddImagesToPostParams, + addImagesToPostBody?: AddImagesToPostBody, + options?: { + query?: Partial>, TError, TData>> + }, + queryClient?: QueryClient +): UseQueryResult & { queryKey: DataTag } +/** + * @summary Add images to post + */ + +export function useAddImagesToPost< + TData = Awaited>, + TError = ApiErrorResponse, +>( + params: AddImagesToPostParams, + addImagesToPostBody?: AddImagesToPostBody, + options?: { + query?: Partial>, TError, TData>> + }, + queryClient?: QueryClient +): UseQueryResult & { queryKey: DataTag } { + const queryOptions = getAddImagesToPostQueryOptions(params, addImagesToPostBody, options) + + const query = useQuery(queryOptions, queryClient) as UseQueryResult & { + queryKey: DataTag + } + + return { ...query, queryKey: queryOptions.queryKey } +} + +export type addPoastDiscriptionResponse200 = { + data: ApiSuccessResponse + status: 200 +} + +export type addPoastDiscriptionResponse400 = { + data: ApiErrorResponse + status: 400 +} + +export type addPoastDiscriptionResponse401 = { + data: ApiErrorResponse + status: 401 +} + +export type addPoastDiscriptionResponse403 = { + data: ApiErrorResponse + status: 403 +} + +export type addPoastDiscriptionResponse422 = { + data: ApiErrorResponse + status: 422 +} + +export type addPoastDiscriptionResponse500 = { + data: ApiErrorResponse + status: 500 +} + +export type addPoastDiscriptionResponseSuccess = addPoastDiscriptionResponse200 & { + headers: Headers +} +export type addPoastDiscriptionResponseError = ( + | addPoastDiscriptionResponse400 + | addPoastDiscriptionResponse401 + | addPoastDiscriptionResponse403 + | addPoastDiscriptionResponse422 + | addPoastDiscriptionResponse500 +) & { + headers: Headers +} + +export type addPoastDiscriptionResponse = + | addPoastDiscriptionResponseSuccess + | addPoastDiscriptionResponseError + +export const getAddPoastDiscriptionUrl = (params: AddPoastDiscriptionParams) => { + const normalizedParams = new URLSearchParams() + + Object.entries(params || {}).forEach(([key, value]) => { + if (value !== undefined) { + normalizedParams.append(key, value === null ? 'null' : value.toString()) + } + }) + + const stringifiedParams = normalizedParams.toString() + + return stringifiedParams.length > 0 + ? `/post/addPoastDiscription?${stringifiedParams}` + : `/post/addPoastDiscription` +} + +/** + * Adds a user-authored description/comment to a post after content moderation. Endpoint spelling preserves the existing API contract. + * @summary Add post description + */ +export const addPoastDiscription = async ( + params: AddPoastDiscriptionParams, + options?: RequestInit +): Promise => { + return coreBackendClient(getAddPoastDiscriptionUrl(params), { + ...options, + method: 'POST', + }) +} + +export const getAddPoastDiscriptionQueryKey = (params?: AddPoastDiscriptionParams) => { + return ['POST', `/post/addPoastDiscription`, ...(params ? [params] : [])] as const +} + +export const getAddPoastDiscriptionQueryOptions = < + TData = Awaited>, + TError = ApiErrorResponse, +>( + params: AddPoastDiscriptionParams, + options?: { + query?: Partial>, TError, TData>> + } +) => { + const { query: queryOptions } = options ?? {} + + const queryKey = queryOptions?.queryKey ?? getAddPoastDiscriptionQueryKey(params) + + const queryFn: QueryFunction>> = ({ signal }) => + addPoastDiscription(params, { signal }) + + return { queryKey, queryFn, ...queryOptions } as UseQueryOptions< + Awaited>, + TError, + TData + > & { queryKey: DataTag } +} + +export type AddPoastDiscriptionQueryResult = NonNullable< + Awaited> +> +export type AddPoastDiscriptionQueryError = ApiErrorResponse + +export function useAddPoastDiscription< + TData = Awaited>, + TError = ApiErrorResponse, +>( + params: AddPoastDiscriptionParams, + options: { + query: Partial< + UseQueryOptions>, TError, TData> + > & + Pick< + DefinedInitialDataOptions< + Awaited>, + TError, + Awaited> + >, + 'initialData' + > + }, + queryClient?: QueryClient +): DefinedUseQueryResult & { queryKey: DataTag } +export function useAddPoastDiscription< + TData = Awaited>, + TError = ApiErrorResponse, +>( + params: AddPoastDiscriptionParams, + options?: { + query?: Partial< + UseQueryOptions>, TError, TData> + > & + Pick< + UndefinedInitialDataOptions< + Awaited>, + TError, + Awaited> + >, + 'initialData' + > + }, + queryClient?: QueryClient +): UseQueryResult & { queryKey: DataTag } +export function useAddPoastDiscription< + TData = Awaited>, + TError = ApiErrorResponse, +>( + params: AddPoastDiscriptionParams, + options?: { + query?: Partial>, TError, TData>> + }, + queryClient?: QueryClient +): UseQueryResult & { queryKey: DataTag } +/** + * @summary Add post description + */ + +export function useAddPoastDiscription< + TData = Awaited>, + TError = ApiErrorResponse, +>( + params: AddPoastDiscriptionParams, + options?: { + query?: Partial>, TError, TData>> + }, + queryClient?: QueryClient +): UseQueryResult & { queryKey: DataTag } { + const queryOptions = getAddPoastDiscriptionQueryOptions(params, options) + + const query = useQuery(queryOptions, queryClient) as UseQueryResult & { + queryKey: DataTag + } + + return { ...query, queryKey: queryOptions.queryKey } +} + +export type addPostWithFileResponse200 = { + data: ApiSuccessResponse + status: 200 +} + +export type addPostWithFileResponse400 = { + data: ApiErrorResponse + status: 400 +} + +export type addPostWithFileResponse401 = { + data: ApiErrorResponse + status: 401 +} + +export type addPostWithFileResponse403 = { + data: ApiErrorResponse + status: 403 +} + +export type addPostWithFileResponse422 = { + data: ApiErrorResponse + status: 422 +} + +export type addPostWithFileResponse500 = { + data: ApiErrorResponse + status: 500 +} + +export type addPostWithFileResponseSuccess = addPostWithFileResponse200 & { + headers: Headers +} +export type addPostWithFileResponseError = ( + | addPostWithFileResponse400 + | addPostWithFileResponse401 + | addPostWithFileResponse403 + | addPostWithFileResponse422 + | addPostWithFileResponse500 +) & { + headers: Headers +} + +export type addPostWithFileResponse = addPostWithFileResponseSuccess | addPostWithFileResponseError + +export const getAddPostWithFileUrl = () => { + return `/post/addPostWithFile` +} + +/** + * Creates an inscription post from multipart metadata and one or more images. The server validates extension, image count, size, metadata, geolocation, perceptual hash data, and content moderation. + * @summary Create post with images + */ +export const addPostWithFile = async ( + addPostWithFileBody?: AddPostWithFileBody, + options?: RequestInit +): Promise => { + return coreBackendClient(getAddPostWithFileUrl(), { + ...options, + method: 'POST', + headers: { 'Content-Type': 'application/json', ...options?.headers }, + body: JSON.stringify(addPostWithFileBody), + }) +} + +export const getAddPostWithFileQueryKey = (addPostWithFileBody?: AddPostWithFileBody) => { + return ['POST', `/post/addPostWithFile`, addPostWithFileBody] as const +} + +export const getAddPostWithFileQueryOptions = < + TData = Awaited>, + TError = ApiErrorResponse, +>( + addPostWithFileBody?: AddPostWithFileBody, + options?: { + query?: Partial>, TError, TData>> + } +) => { + const { query: queryOptions } = options ?? {} + + const queryKey = queryOptions?.queryKey ?? getAddPostWithFileQueryKey(addPostWithFileBody) + + const queryFn: QueryFunction>> = ({ signal }) => + addPostWithFile(addPostWithFileBody, { signal }) + + return { queryKey, queryFn, ...queryOptions } as UseQueryOptions< + Awaited>, + TError, + TData + > & { queryKey: DataTag } +} + +export type AddPostWithFileQueryResult = NonNullable>> +export type AddPostWithFileQueryError = ApiErrorResponse + +export function useAddPostWithFile< + TData = Awaited>, + TError = ApiErrorResponse, +>( + addPostWithFileBody: undefined | AddPostWithFileBody, + options: { + query: Partial>, TError, TData>> & + Pick< + DefinedInitialDataOptions< + Awaited>, + TError, + Awaited> + >, + 'initialData' + > + }, + queryClient?: QueryClient +): DefinedUseQueryResult & { queryKey: DataTag } +export function useAddPostWithFile< + TData = Awaited>, + TError = ApiErrorResponse, +>( + addPostWithFileBody?: AddPostWithFileBody, + options?: { + query?: Partial>, TError, TData>> & + Pick< + UndefinedInitialDataOptions< + Awaited>, + TError, + Awaited> + >, + 'initialData' + > + }, + queryClient?: QueryClient +): UseQueryResult & { queryKey: DataTag } +export function useAddPostWithFile< + TData = Awaited>, + TError = ApiErrorResponse, +>( + addPostWithFileBody?: AddPostWithFileBody, + options?: { + query?: Partial>, TError, TData>> + }, + queryClient?: QueryClient +): UseQueryResult & { queryKey: DataTag } +/** + * @summary Create post with images + */ + +export function useAddPostWithFile< + TData = Awaited>, + TError = ApiErrorResponse, +>( + addPostWithFileBody?: AddPostWithFileBody, + options?: { + query?: Partial>, TError, TData>> + }, + queryClient?: QueryClient +): UseQueryResult & { queryKey: DataTag } { + const queryOptions = getAddPostWithFileQueryOptions(addPostWithFileBody, options) + + const query = useQuery(queryOptions, queryClient) as UseQueryResult & { + queryKey: DataTag + } + + return { ...query, queryKey: queryOptions.queryKey } +} + +export type addRatingResponse200 = { + data: ApiSuccessResponse + status: 200 +} + +export type addRatingResponse400 = { + data: ApiErrorResponse + status: 400 +} + +export type addRatingResponse401 = { + data: ApiErrorResponse + status: 401 +} + +export type addRatingResponse403 = { + data: ApiErrorResponse + status: 403 +} + +export type addRatingResponse422 = { + data: ApiErrorResponse + status: 422 +} + +export type addRatingResponse500 = { + data: ApiErrorResponse + status: 500 +} + +export type addRatingResponseSuccess = addRatingResponse200 & { + headers: Headers +} +export type addRatingResponseError = ( + | addRatingResponse400 + | addRatingResponse401 + | addRatingResponse403 + | addRatingResponse422 + | addRatingResponse500 +) & { + headers: Headers +} + +export type addRatingResponse = addRatingResponseSuccess | addRatingResponseError + +export const getAddRatingUrl = (params: AddRatingParams) => { + const normalizedParams = new URLSearchParams() + + Object.entries(params || {}).forEach(([key, value]) => { + if (value !== undefined) { + normalizedParams.append(key, value === null ? 'null' : value.toString()) + } + }) + + const stringifiedParams = normalizedParams.toString() + + return stringifiedParams.length > 0 ? `/post/addRating?${stringifiedParams}` : `/post/addRating` +} + +/** + * Adds or updates the authenticated user's numeric rating for a post. + * @summary Rate post + */ +export const addRating = async ( + params: AddRatingParams, + options?: RequestInit +): Promise => { + return coreBackendClient(getAddRatingUrl(params), { + ...options, + method: 'POST', + }) +} + +export const getAddRatingQueryKey = (params?: AddRatingParams) => { + return ['POST', `/post/addRating`, ...(params ? [params] : [])] as const +} + +export const getAddRatingQueryOptions = < + TData = Awaited>, + TError = ApiErrorResponse, +>( + params: AddRatingParams, + options?: { + query?: Partial>, TError, TData>> + } +) => { + const { query: queryOptions } = options ?? {} + + const queryKey = queryOptions?.queryKey ?? getAddRatingQueryKey(params) + + const queryFn: QueryFunction>> = ({ signal }) => + addRating(params, { signal }) + + return { queryKey, queryFn, ...queryOptions } as UseQueryOptions< + Awaited>, + TError, + TData + > & { queryKey: DataTag } +} + +export type AddRatingQueryResult = NonNullable>> +export type AddRatingQueryError = ApiErrorResponse + +export function useAddRating< + TData = Awaited>, + TError = ApiErrorResponse, +>( + params: AddRatingParams, + options: { + query: Partial>, TError, TData>> & + Pick< + DefinedInitialDataOptions< + Awaited>, + TError, + Awaited> + >, + 'initialData' + > + }, + queryClient?: QueryClient +): DefinedUseQueryResult & { queryKey: DataTag } +export function useAddRating< + TData = Awaited>, + TError = ApiErrorResponse, +>( + params: AddRatingParams, + options?: { + query?: Partial>, TError, TData>> & + Pick< + UndefinedInitialDataOptions< + Awaited>, + TError, + Awaited> + >, + 'initialData' + > + }, + queryClient?: QueryClient +): UseQueryResult & { queryKey: DataTag } +export function useAddRating< + TData = Awaited>, + TError = ApiErrorResponse, +>( + params: AddRatingParams, + options?: { + query?: Partial>, TError, TData>> + }, + queryClient?: QueryClient +): UseQueryResult & { queryKey: DataTag } +/** + * @summary Rate post + */ + +export function useAddRating< + TData = Awaited>, + TError = ApiErrorResponse, +>( + params: AddRatingParams, + options?: { + query?: Partial>, TError, TData>> + }, + queryClient?: QueryClient +): UseQueryResult & { queryKey: DataTag } { + const queryOptions = getAddRatingQueryOptions(params, options) + + const query = useQuery(queryOptions, queryClient) as UseQueryResult & { + queryKey: DataTag + } + + return { ...query, queryKey: queryOptions.queryKey } +} + +export type addVoteResponse200 = { + data: ApiSuccessResponse + status: 200 +} + +export type addVoteResponse400 = { + data: ApiErrorResponse + status: 400 +} + +export type addVoteResponse401 = { + data: ApiErrorResponse + status: 401 +} + +export type addVoteResponse403 = { + data: ApiErrorResponse + status: 403 +} + +export type addVoteResponse422 = { + data: ApiErrorResponse + status: 422 +} + +export type addVoteResponse500 = { + data: ApiErrorResponse + status: 500 +} + +export type addVoteResponseSuccess = addVoteResponse200 & { + headers: Headers +} +export type addVoteResponseError = ( + | addVoteResponse400 + | addVoteResponse401 + | addVoteResponse403 + | addVoteResponse422 + | addVoteResponse500 +) & { + headers: Headers +} + +export type addVoteResponse = addVoteResponseSuccess | addVoteResponseError + +export const getAddVoteUrl = (params: AddVoteParams) => { + const normalizedParams = new URLSearchParams() + + Object.entries(params || {}).forEach(([key, value]) => { + if (value !== undefined) { + normalizedParams.append(key, value === null ? 'null' : value.toString()) + } + }) + + const stringifiedParams = normalizedParams.toString() + + return stringifiedParams.length > 0 ? `/post/addVote?${stringifiedParams}` : `/post/addVote` +} + +/** + * Adds an upvote when the authenticated user has not voted, or removes the existing vote. + * @summary Toggle description vote + */ +export const addVote = async ( + params: AddVoteParams, + options?: RequestInit +): Promise => { + return coreBackendClient(getAddVoteUrl(params), { + ...options, + method: 'POST', + }) +} + +export const getAddVoteQueryKey = (params?: AddVoteParams) => { + return ['POST', `/post/addVote`, ...(params ? [params] : [])] as const +} + +export const getAddVoteQueryOptions = < + TData = Awaited>, + TError = ApiErrorResponse, +>( + params: AddVoteParams, + options?: { query?: Partial>, TError, TData>> } +) => { + const { query: queryOptions } = options ?? {} + + const queryKey = queryOptions?.queryKey ?? getAddVoteQueryKey(params) + + const queryFn: QueryFunction>> = ({ signal }) => + addVote(params, { signal }) + + return { queryKey, queryFn, ...queryOptions } as UseQueryOptions< + Awaited>, + TError, + TData + > & { queryKey: DataTag } +} + +export type AddVoteQueryResult = NonNullable>> +export type AddVoteQueryError = ApiErrorResponse + +export function useAddVote>, TError = ApiErrorResponse>( + params: AddVoteParams, + options: { + query: Partial>, TError, TData>> & + Pick< + DefinedInitialDataOptions< + Awaited>, + TError, + Awaited> + >, + 'initialData' + > + }, + queryClient?: QueryClient +): DefinedUseQueryResult & { queryKey: DataTag } +export function useAddVote>, TError = ApiErrorResponse>( + params: AddVoteParams, + options?: { + query?: Partial>, TError, TData>> & + Pick< + UndefinedInitialDataOptions< + Awaited>, + TError, + Awaited> + >, + 'initialData' + > + }, + queryClient?: QueryClient +): UseQueryResult & { queryKey: DataTag } +export function useAddVote>, TError = ApiErrorResponse>( + params: AddVoteParams, + options?: { + query?: Partial>, TError, TData>> + }, + queryClient?: QueryClient +): UseQueryResult & { queryKey: DataTag } +/** + * @summary Toggle description vote + */ + +export function useAddVote>, TError = ApiErrorResponse>( + params: AddVoteParams, + options?: { + query?: Partial>, TError, TData>> + }, + queryClient?: QueryClient +): UseQueryResult & { queryKey: DataTag } { + const queryOptions = getAddVoteQueryOptions(params, options) + + const query = useQuery(queryOptions, queryClient) as UseQueryResult & { + queryKey: DataTag + } + + return { ...query, queryKey: queryOptions.queryKey } +} + +export type deleteImagesFromPostResponse200 = { + data: ApiSuccessResponse + status: 200 +} + +export type deleteImagesFromPostResponse400 = { + data: ApiErrorResponse + status: 400 +} + +export type deleteImagesFromPostResponse401 = { + data: ApiErrorResponse + status: 401 +} + +export type deleteImagesFromPostResponse403 = { + data: ApiErrorResponse + status: 403 +} + +export type deleteImagesFromPostResponse422 = { + data: ApiErrorResponse + status: 422 +} + +export type deleteImagesFromPostResponse500 = { + data: ApiErrorResponse + status: 500 +} + +export type deleteImagesFromPostResponseSuccess = deleteImagesFromPostResponse200 & { + headers: Headers +} +export type deleteImagesFromPostResponseError = ( + | deleteImagesFromPostResponse400 + | deleteImagesFromPostResponse401 + | deleteImagesFromPostResponse403 + | deleteImagesFromPostResponse422 + | deleteImagesFromPostResponse500 +) & { + headers: Headers +} + +export type deleteImagesFromPostResponse = + | deleteImagesFromPostResponseSuccess + | deleteImagesFromPostResponseError + +export const getDeleteImagesFromPostUrl = (params: DeleteImagesFromPostParams) => { + const normalizedParams = new URLSearchParams() + + Object.entries(params || {}).forEach(([key, value]) => { + if (value !== undefined) { + normalizedParams.append(key, value === null ? 'null' : value.toString()) + } + }) + + const stringifiedParams = normalizedParams.toString() + + return stringifiedParams.length > 0 + ? `/post/deleteImagesFromPost?${stringifiedParams}` + : `/post/deleteImagesFromPost` +} + +/** + * Deletes selected images from an owned post while ensuring the post still has at least one image. + * @summary Delete post images + */ +export const deleteImagesFromPost = async ( + params: DeleteImagesFromPostParams, + options?: RequestInit +): Promise => { + return coreBackendClient(getDeleteImagesFromPostUrl(params), { + ...options, + method: 'POST', + }) +} + +export const getDeleteImagesFromPostQueryKey = (params?: DeleteImagesFromPostParams) => { + return ['POST', `/post/deleteImagesFromPost`, ...(params ? [params] : [])] as const +} + +export const getDeleteImagesFromPostQueryOptions = < + TData = Awaited>, + TError = ApiErrorResponse, +>( + params: DeleteImagesFromPostParams, + options?: { + query?: Partial< + UseQueryOptions>, TError, TData> + > + } +) => { + const { query: queryOptions } = options ?? {} + + const queryKey = queryOptions?.queryKey ?? getDeleteImagesFromPostQueryKey(params) + + const queryFn: QueryFunction>> = ({ signal }) => + deleteImagesFromPost(params, { signal }) + + return { queryKey, queryFn, ...queryOptions } as UseQueryOptions< + Awaited>, + TError, + TData + > & { queryKey: DataTag } +} + +export type DeleteImagesFromPostQueryResult = NonNullable< + Awaited> +> +export type DeleteImagesFromPostQueryError = ApiErrorResponse + +export function useDeleteImagesFromPost< + TData = Awaited>, + TError = ApiErrorResponse, +>( + params: DeleteImagesFromPostParams, + options: { + query: Partial< + UseQueryOptions>, TError, TData> + > & + Pick< + DefinedInitialDataOptions< + Awaited>, + TError, + Awaited> + >, + 'initialData' + > + }, + queryClient?: QueryClient +): DefinedUseQueryResult & { queryKey: DataTag } +export function useDeleteImagesFromPost< + TData = Awaited>, + TError = ApiErrorResponse, +>( + params: DeleteImagesFromPostParams, + options?: { + query?: Partial< + UseQueryOptions>, TError, TData> + > & + Pick< + UndefinedInitialDataOptions< + Awaited>, + TError, + Awaited> + >, + 'initialData' + > + }, + queryClient?: QueryClient +): UseQueryResult & { queryKey: DataTag } +export function useDeleteImagesFromPost< + TData = Awaited>, + TError = ApiErrorResponse, +>( + params: DeleteImagesFromPostParams, + options?: { + query?: Partial< + UseQueryOptions>, TError, TData> + > + }, + queryClient?: QueryClient +): UseQueryResult & { queryKey: DataTag } +/** + * @summary Delete post images + */ + +export function useDeleteImagesFromPost< + TData = Awaited>, + TError = ApiErrorResponse, +>( + params: DeleteImagesFromPostParams, + options?: { + query?: Partial< + UseQueryOptions>, TError, TData> + > + }, + queryClient?: QueryClient +): UseQueryResult & { queryKey: DataTag } { + const queryOptions = getDeleteImagesFromPostQueryOptions(params, options) + + const query = useQuery(queryOptions, queryClient) as UseQueryResult & { + queryKey: DataTag + } + + return { ...query, queryKey: queryOptions.queryKey } +} + +export type descriptionDeleteResponse200 = { + data: ApiSuccessResponse + status: 200 +} + +export type descriptionDeleteResponse400 = { + data: ApiErrorResponse + status: 400 +} + +export type descriptionDeleteResponse401 = { + data: ApiErrorResponse + status: 401 +} + +export type descriptionDeleteResponse403 = { + data: ApiErrorResponse + status: 403 +} + +export type descriptionDeleteResponse422 = { + data: ApiErrorResponse + status: 422 +} + +export type descriptionDeleteResponse500 = { + data: ApiErrorResponse + status: 500 +} + +export type descriptionDeleteResponseSuccess = descriptionDeleteResponse200 & { + headers: Headers +} +export type descriptionDeleteResponseError = ( + | descriptionDeleteResponse400 + | descriptionDeleteResponse401 + | descriptionDeleteResponse403 + | descriptionDeleteResponse422 + | descriptionDeleteResponse500 +) & { + headers: Headers +} + +export type descriptionDeleteResponse = + | descriptionDeleteResponseSuccess + | descriptionDeleteResponseError + +export const getDescriptionDeleteUrl = (params: DescriptionDeleteParams) => { + const normalizedParams = new URLSearchParams() + + Object.entries(params || {}).forEach(([key, value]) => { + if (value !== undefined) { + normalizedParams.append(key, value === null ? 'null' : value.toString()) + } + }) + + const stringifiedParams = normalizedParams.toString() + + return stringifiedParams.length > 0 + ? `/post/discriptionDelete?${stringifiedParams}` + : `/post/discriptionDelete` +} + +/** + * Deletes a description/comment owned by the authenticated user. Endpoint spelling preserves the existing API contract. + * @summary Delete my description + */ +export const descriptionDelete = async ( + params: DescriptionDeleteParams, + options?: RequestInit +): Promise => { + return coreBackendClient(getDescriptionDeleteUrl(params), { + ...options, + method: 'POST', + }) +} + +export const getDescriptionDeleteQueryKey = (params?: DescriptionDeleteParams) => { + return ['POST', `/post/discriptionDelete`, ...(params ? [params] : [])] as const +} + +export const getDescriptionDeleteQueryOptions = < + TData = Awaited>, + TError = ApiErrorResponse, +>( + params: DescriptionDeleteParams, + options?: { + query?: Partial>, TError, TData>> + } +) => { + const { query: queryOptions } = options ?? {} + + const queryKey = queryOptions?.queryKey ?? getDescriptionDeleteQueryKey(params) + + const queryFn: QueryFunction>> = ({ signal }) => + descriptionDelete(params, { signal }) + + return { queryKey, queryFn, ...queryOptions } as UseQueryOptions< + Awaited>, + TError, + TData + > & { queryKey: DataTag } +} + +export type DescriptionDeleteQueryResult = NonNullable< + Awaited> +> +export type DescriptionDeleteQueryError = ApiErrorResponse + +export function useDescriptionDelete< + TData = Awaited>, + TError = ApiErrorResponse, +>( + params: DescriptionDeleteParams, + options: { + query: Partial>, TError, TData>> & + Pick< + DefinedInitialDataOptions< + Awaited>, + TError, + Awaited> + >, + 'initialData' + > + }, + queryClient?: QueryClient +): DefinedUseQueryResult & { queryKey: DataTag } +export function useDescriptionDelete< + TData = Awaited>, + TError = ApiErrorResponse, +>( + params: DescriptionDeleteParams, + options?: { + query?: Partial>, TError, TData>> & + Pick< + UndefinedInitialDataOptions< + Awaited>, + TError, + Awaited> + >, + 'initialData' + > + }, + queryClient?: QueryClient +): UseQueryResult & { queryKey: DataTag } +export function useDescriptionDelete< + TData = Awaited>, + TError = ApiErrorResponse, +>( + params: DescriptionDeleteParams, + options?: { + query?: Partial>, TError, TData>> + }, + queryClient?: QueryClient +): UseQueryResult & { queryKey: DataTag } +/** + * @summary Delete my description + */ + +export function useDescriptionDelete< + TData = Awaited>, + TError = ApiErrorResponse, +>( + params: DescriptionDeleteParams, + options?: { + query?: Partial>, TError, TData>> + }, + queryClient?: QueryClient +): UseQueryResult & { queryKey: DataTag } { + const queryOptions = getDescriptionDeleteQueryOptions(params, options) + + const query = useQuery(queryOptions, queryClient) as UseQueryResult & { + queryKey: DataTag + } + + return { ...query, queryKey: queryOptions.queryKey } +} + +export type getAllPostResponse200 = { + data: ApiSuccessResponse + status: 200 +} + +export type getAllPostResponse400 = { + data: ApiErrorResponse + status: 400 +} + +export type getAllPostResponse401 = { + data: ApiErrorResponse + status: 401 +} + +export type getAllPostResponse403 = { + data: ApiErrorResponse + status: 403 +} + +export type getAllPostResponse422 = { + data: ApiErrorResponse + status: 422 +} + +export type getAllPostResponse500 = { + data: ApiErrorResponse + status: 500 +} + +export type getAllPostResponseSuccess = getAllPostResponse200 & { + headers: Headers +} +export type getAllPostResponseError = ( + | getAllPostResponse400 + | getAllPostResponse401 + | getAllPostResponse403 + | getAllPostResponse422 + | getAllPostResponse500 +) & { + headers: Headers +} + +export type getAllPostResponse = getAllPostResponseSuccess | getAllPostResponseError + +export const getGetAllPostUrl = () => { + return `/post/getAllPost` +} + +/** + * Returns all posts with image identifiers expanded to public image URLs. + * @summary List all visible posts + */ +export const getAllPost = async (options?: RequestInit): Promise => { + return coreBackendClient(getGetAllPostUrl(), { + ...options, + method: 'POST', + }) +} + +export const getGetAllPostQueryKey = () => { + return ['POST', `/post/getAllPost`] as const +} + +export const getGetAllPostQueryOptions = < + TData = Awaited>, + TError = ApiErrorResponse, +>(options?: { + query?: Partial>, TError, TData>> +}) => { + const { query: queryOptions } = options ?? {} + + const queryKey = queryOptions?.queryKey ?? getGetAllPostQueryKey() + + const queryFn: QueryFunction>> = ({ signal }) => + getAllPost({ signal }) + + return { queryKey, queryFn, ...queryOptions } as UseQueryOptions< + Awaited>, + TError, + TData + > & { queryKey: DataTag } +} + +export type GetAllPostQueryResult = NonNullable>> +export type GetAllPostQueryError = ApiErrorResponse + +export function useGetAllPost< + TData = Awaited>, + TError = ApiErrorResponse, +>( + options: { + query: Partial>, TError, TData>> & + Pick< + DefinedInitialDataOptions< + Awaited>, + TError, + Awaited> + >, + 'initialData' + > + }, + queryClient?: QueryClient +): DefinedUseQueryResult & { queryKey: DataTag } +export function useGetAllPost< + TData = Awaited>, + TError = ApiErrorResponse, +>( + options?: { + query?: Partial>, TError, TData>> & + Pick< + UndefinedInitialDataOptions< + Awaited>, + TError, + Awaited> + >, + 'initialData' + > + }, + queryClient?: QueryClient +): UseQueryResult & { queryKey: DataTag } +export function useGetAllPost< + TData = Awaited>, + TError = ApiErrorResponse, +>( + options?: { + query?: Partial>, TError, TData>> + }, + queryClient?: QueryClient +): UseQueryResult & { queryKey: DataTag } +/** + * @summary List all visible posts + */ + +export function useGetAllPost< + TData = Awaited>, + TError = ApiErrorResponse, +>( + options?: { + query?: Partial>, TError, TData>> + }, + queryClient?: QueryClient +): UseQueryResult & { queryKey: DataTag } { + const queryOptions = getGetAllPostQueryOptions(options) + + const query = useQuery(queryOptions, queryClient) as UseQueryResult & { + queryKey: DataTag + } + + return { ...query, queryKey: queryOptions.queryKey } +} + +export type getAllUserPostResponse200 = { + data: ApiSuccessResponse + status: 200 +} + +export type getAllUserPostResponse400 = { + data: ApiErrorResponse + status: 400 +} + +export type getAllUserPostResponse401 = { + data: ApiErrorResponse + status: 401 +} + +export type getAllUserPostResponse403 = { + data: ApiErrorResponse + status: 403 +} + +export type getAllUserPostResponse422 = { + data: ApiErrorResponse + status: 422 +} + +export type getAllUserPostResponse500 = { + data: ApiErrorResponse + status: 500 +} + +export type getAllUserPostResponseSuccess = getAllUserPostResponse200 & { + headers: Headers +} +export type getAllUserPostResponseError = ( + | getAllUserPostResponse400 + | getAllUserPostResponse401 + | getAllUserPostResponse403 + | getAllUserPostResponse422 + | getAllUserPostResponse500 +) & { + headers: Headers +} + +export type getAllUserPostResponse = getAllUserPostResponseSuccess | getAllUserPostResponseError + +export const getGetAllUserPostUrl = () => { + return `/post/getAllUserPost` +} + +/** + * Returns posts created by the authenticated user with image URLs hydrated. + * @summary List my posts + */ +export const getAllUserPost = async (options?: RequestInit): Promise => { + return coreBackendClient(getGetAllUserPostUrl(), { + ...options, + method: 'POST', + }) +} + +export const getGetAllUserPostQueryKey = () => { + return ['POST', `/post/getAllUserPost`] as const +} + +export const getGetAllUserPostQueryOptions = < + TData = Awaited>, + TError = ApiErrorResponse, +>(options?: { + query?: Partial>, TError, TData>> +}) => { + const { query: queryOptions } = options ?? {} + + const queryKey = queryOptions?.queryKey ?? getGetAllUserPostQueryKey() + + const queryFn: QueryFunction>> = ({ signal }) => + getAllUserPost({ signal }) + + return { queryKey, queryFn, ...queryOptions } as UseQueryOptions< + Awaited>, + TError, + TData + > & { queryKey: DataTag } +} + +export type GetAllUserPostQueryResult = NonNullable>> +export type GetAllUserPostQueryError = ApiErrorResponse + +export function useGetAllUserPost< + TData = Awaited>, + TError = ApiErrorResponse, +>( + options: { + query: Partial>, TError, TData>> & + Pick< + DefinedInitialDataOptions< + Awaited>, + TError, + Awaited> + >, + 'initialData' + > + }, + queryClient?: QueryClient +): DefinedUseQueryResult & { queryKey: DataTag } +export function useGetAllUserPost< + TData = Awaited>, + TError = ApiErrorResponse, +>( + options?: { + query?: Partial>, TError, TData>> & + Pick< + UndefinedInitialDataOptions< + Awaited>, + TError, + Awaited> + >, + 'initialData' + > + }, + queryClient?: QueryClient +): UseQueryResult & { queryKey: DataTag } +export function useGetAllUserPost< + TData = Awaited>, + TError = ApiErrorResponse, +>( + options?: { + query?: Partial>, TError, TData>> + }, + queryClient?: QueryClient +): UseQueryResult & { queryKey: DataTag } +/** + * @summary List my posts + */ + +export function useGetAllUserPost< + TData = Awaited>, + TError = ApiErrorResponse, +>( + options?: { + query?: Partial>, TError, TData>> + }, + queryClient?: QueryClient +): UseQueryResult & { queryKey: DataTag } { + const queryOptions = getGetAllUserPostQueryOptions(options) + + const query = useQuery(queryOptions, queryClient) as UseQueryResult & { + queryKey: DataTag + } + + return { ...query, queryKey: queryOptions.queryKey } +} + +export type getCommentByUserResponse200 = { + data: ApiSuccessResponse + status: 200 +} + +export type getCommentByUserResponse400 = { + data: ApiErrorResponse + status: 400 +} + +export type getCommentByUserResponse422 = { + data: ApiErrorResponse + status: 422 +} + +export type getCommentByUserResponse500 = { + data: ApiErrorResponse + status: 500 +} + +export type getCommentByUserResponseSuccess = getCommentByUserResponse200 & { + headers: Headers +} +export type getCommentByUserResponseError = ( + | getCommentByUserResponse400 + | getCommentByUserResponse422 + | getCommentByUserResponse500 +) & { + headers: Headers +} + +export type getCommentByUserResponse = + | getCommentByUserResponseSuccess + | getCommentByUserResponseError + +export const getGetCommentByUserUrl = () => { + return `/post/getCommentByUser` +} + +/** + * Returns descriptions/comments authored by the authenticated user with post preview image URLs. + * @summary List my descriptions + */ +export const getCommentByUser = async ( + options?: RequestInit +): Promise => { + return coreBackendClient(getGetCommentByUserUrl(), { + ...options, + method: 'POST', + }) +} + +export const getGetCommentByUserQueryKey = () => { + return ['POST', `/post/getCommentByUser`] as const +} + +export const getGetCommentByUserQueryOptions = < + TData = Awaited>, + TError = ApiErrorResponse, +>(options?: { + query?: Partial>, TError, TData>> +}) => { + const { query: queryOptions } = options ?? {} + + const queryKey = queryOptions?.queryKey ?? getGetCommentByUserQueryKey() + + const queryFn: QueryFunction>> = ({ signal }) => + getCommentByUser({ signal }) + + return { queryKey, queryFn, ...queryOptions } as UseQueryOptions< + Awaited>, + TError, + TData + > & { queryKey: DataTag } +} + +export type GetCommentByUserQueryResult = NonNullable>> +export type GetCommentByUserQueryError = ApiErrorResponse + +export function useGetCommentByUser< + TData = Awaited>, + TError = ApiErrorResponse, +>( + options: { + query: Partial>, TError, TData>> & + Pick< + DefinedInitialDataOptions< + Awaited>, + TError, + Awaited> + >, + 'initialData' + > + }, + queryClient?: QueryClient +): DefinedUseQueryResult & { queryKey: DataTag } +export function useGetCommentByUser< + TData = Awaited>, + TError = ApiErrorResponse, +>( + options?: { + query?: Partial>, TError, TData>> & + Pick< + UndefinedInitialDataOptions< + Awaited>, + TError, + Awaited> + >, + 'initialData' + > + }, + queryClient?: QueryClient +): UseQueryResult & { queryKey: DataTag } +export function useGetCommentByUser< + TData = Awaited>, + TError = ApiErrorResponse, +>( + options?: { + query?: Partial>, TError, TData>> + }, + queryClient?: QueryClient +): UseQueryResult & { queryKey: DataTag } +/** + * @summary List my descriptions + */ + +export function useGetCommentByUser< + TData = Awaited>, + TError = ApiErrorResponse, +>( + options?: { + query?: Partial>, TError, TData>> + }, + queryClient?: QueryClient +): UseQueryResult & { queryKey: DataTag } { + const queryOptions = getGetCommentByUserQueryOptions(options) + + const query = useQuery(queryOptions, queryClient) as UseQueryResult & { + queryKey: DataTag + } + + return { ...query, queryKey: queryOptions.queryKey } +} + +export type getPostDiscriptionResponse200 = { + data: ApiSuccessResponse + status: 200 +} + +export type getPostDiscriptionResponse400 = { + data: ApiErrorResponse + status: 400 +} + +export type getPostDiscriptionResponse401 = { + data: ApiErrorResponse + status: 401 +} + +export type getPostDiscriptionResponse403 = { + data: ApiErrorResponse + status: 403 +} + +export type getPostDiscriptionResponse422 = { + data: ApiErrorResponse + status: 422 +} + +export type getPostDiscriptionResponse500 = { + data: ApiErrorResponse + status: 500 +} + +export type getPostDiscriptionResponseSuccess = getPostDiscriptionResponse200 & { + headers: Headers +} +export type getPostDiscriptionResponseError = ( + | getPostDiscriptionResponse400 + | getPostDiscriptionResponse401 + | getPostDiscriptionResponse403 + | getPostDiscriptionResponse422 + | getPostDiscriptionResponse500 +) & { + headers: Headers +} + +export type getPostDiscriptionResponse = + | getPostDiscriptionResponseSuccess + | getPostDiscriptionResponseError + +export const getGetPostDiscriptionUrl = (params: GetPostDiscriptionParams) => { + const normalizedParams = new URLSearchParams() + + Object.entries(params || {}).forEach(([key, value]) => { + if (value !== undefined) { + normalizedParams.append(key, value === null ? 'null' : value.toString()) + } + }) + + const stringifiedParams = normalizedParams.toString() + + return stringifiedParams.length > 0 + ? `/post/getPostDiscription?${stringifiedParams}` + : `/post/getPostDiscription` +} + +/** + * Returns all user descriptions/comments for a post. Endpoint spelling preserves the existing API contract. + * @summary List post descriptions + */ +export const getPostDiscription = async ( + params: GetPostDiscriptionParams, + options?: RequestInit +): Promise => { + return coreBackendClient(getGetPostDiscriptionUrl(params), { + ...options, + method: 'POST', + }) +} + +export const getGetPostDiscriptionQueryKey = (params?: GetPostDiscriptionParams) => { + return ['POST', `/post/getPostDiscription`, ...(params ? [params] : [])] as const +} + +export const getGetPostDiscriptionQueryOptions = < + TData = Awaited>, + TError = ApiErrorResponse, +>( + params: GetPostDiscriptionParams, + options?: { + query?: Partial>, TError, TData>> + } +) => { + const { query: queryOptions } = options ?? {} + + const queryKey = queryOptions?.queryKey ?? getGetPostDiscriptionQueryKey(params) + + const queryFn: QueryFunction>> = ({ signal }) => + getPostDiscription(params, { signal }) + + return { queryKey, queryFn, ...queryOptions } as UseQueryOptions< + Awaited>, + TError, + TData + > & { queryKey: DataTag } +} + +export type GetPostDiscriptionQueryResult = NonNullable< + Awaited> +> +export type GetPostDiscriptionQueryError = ApiErrorResponse + +export function useGetPostDiscription< + TData = Awaited>, + TError = ApiErrorResponse, +>( + params: GetPostDiscriptionParams, + options: { + query: Partial>, TError, TData>> & + Pick< + DefinedInitialDataOptions< + Awaited>, + TError, + Awaited> + >, + 'initialData' + > + }, + queryClient?: QueryClient +): DefinedUseQueryResult & { queryKey: DataTag } +export function useGetPostDiscription< + TData = Awaited>, + TError = ApiErrorResponse, +>( + params: GetPostDiscriptionParams, + options?: { + query?: Partial< + UseQueryOptions>, TError, TData> + > & + Pick< + UndefinedInitialDataOptions< + Awaited>, + TError, + Awaited> + >, + 'initialData' + > + }, + queryClient?: QueryClient +): UseQueryResult & { queryKey: DataTag } +export function useGetPostDiscription< + TData = Awaited>, + TError = ApiErrorResponse, +>( + params: GetPostDiscriptionParams, + options?: { + query?: Partial>, TError, TData>> + }, + queryClient?: QueryClient +): UseQueryResult & { queryKey: DataTag } +/** + * @summary List post descriptions + */ + +export function useGetPostDiscription< + TData = Awaited>, + TError = ApiErrorResponse, +>( + params: GetPostDiscriptionParams, + options?: { + query?: Partial>, TError, TData>> + }, + queryClient?: QueryClient +): UseQueryResult & { queryKey: DataTag } { + const queryOptions = getGetPostDiscriptionQueryOptions(params, options) + + const query = useQuery(queryOptions, queryClient) as UseQueryResult & { + queryKey: DataTag + } + + return { ...query, queryKey: queryOptions.queryKey } +} + +export type postDeleteResponse200 = { + data: ApiSuccessResponse + status: 200 +} + +export type postDeleteResponse400 = { + data: ApiErrorResponse + status: 400 +} + +export type postDeleteResponse401 = { + data: ApiErrorResponse + status: 401 +} + +export type postDeleteResponse403 = { + data: ApiErrorResponse + status: 403 +} + +export type postDeleteResponse422 = { + data: ApiErrorResponse + status: 422 +} + +export type postDeleteResponse500 = { + data: ApiErrorResponse + status: 500 +} + +export type postDeleteResponseSuccess = postDeleteResponse200 & { + headers: Headers +} +export type postDeleteResponseError = ( + | postDeleteResponse400 + | postDeleteResponse401 + | postDeleteResponse403 + | postDeleteResponse422 + | postDeleteResponse500 +) & { + headers: Headers +} + +export type postDeleteResponse = postDeleteResponseSuccess | postDeleteResponseError + +export const getPostDeleteUrl = (params: PostDeleteParams) => { + const normalizedParams = new URLSearchParams() + + Object.entries(params || {}).forEach(([key, value]) => { + if (value !== undefined) { + normalizedParams.append(key, value === null ? 'null' : value.toString()) + } + }) + + const stringifiedParams = normalizedParams.toString() + + return stringifiedParams.length > 0 ? `/post/postDelete?${stringifiedParams}` : `/post/postDelete` +} + +/** + * Deletes a post owned by the authenticated user and archives related content according to the content delete service. + * @summary Delete my post + */ +export const postDelete = async ( + params: PostDeleteParams, + options?: RequestInit +): Promise => { + return coreBackendClient(getPostDeleteUrl(params), { + ...options, + method: 'POST', + }) +} + +export const getPostDeleteQueryKey = (params?: PostDeleteParams) => { + return ['POST', `/post/postDelete`, ...(params ? [params] : [])] as const +} + +export const getPostDeleteQueryOptions = < + TData = Awaited>, + TError = ApiErrorResponse, +>( + params: PostDeleteParams, + options?: { + query?: Partial>, TError, TData>> + } +) => { + const { query: queryOptions } = options ?? {} + + const queryKey = queryOptions?.queryKey ?? getPostDeleteQueryKey(params) + + const queryFn: QueryFunction>> = ({ signal }) => + postDelete(params, { signal }) + + return { queryKey, queryFn, ...queryOptions } as UseQueryOptions< + Awaited>, + TError, + TData + > & { queryKey: DataTag } +} + +export type PostDeleteQueryResult = NonNullable>> +export type PostDeleteQueryError = ApiErrorResponse + +export function usePostDelete< + TData = Awaited>, + TError = ApiErrorResponse, +>( + params: PostDeleteParams, + options: { + query: Partial>, TError, TData>> & + Pick< + DefinedInitialDataOptions< + Awaited>, + TError, + Awaited> + >, + 'initialData' + > + }, + queryClient?: QueryClient +): DefinedUseQueryResult & { queryKey: DataTag } +export function usePostDelete< + TData = Awaited>, + TError = ApiErrorResponse, +>( + params: PostDeleteParams, + options?: { + query?: Partial>, TError, TData>> & + Pick< + UndefinedInitialDataOptions< + Awaited>, + TError, + Awaited> + >, + 'initialData' + > + }, + queryClient?: QueryClient +): UseQueryResult & { queryKey: DataTag } +export function usePostDelete< + TData = Awaited>, + TError = ApiErrorResponse, +>( + params: PostDeleteParams, + options?: { + query?: Partial>, TError, TData>> + }, + queryClient?: QueryClient +): UseQueryResult & { queryKey: DataTag } +/** + * @summary Delete my post + */ + +export function usePostDelete< + TData = Awaited>, + TError = ApiErrorResponse, +>( + params: PostDeleteParams, + options?: { + query?: Partial>, TError, TData>> + }, + queryClient?: QueryClient +): UseQueryResult & { queryKey: DataTag } { + const queryOptions = getPostDeleteQueryOptions(params, options) + + const query = useQuery(queryOptions, queryClient) as UseQueryResult & { + queryKey: DataTag + } + + return { ...query, queryKey: queryOptions.queryKey } +} + +export type getDashboardCountsResponse200 = { + data: DashboardCountsResponse + status: 200 +} + +export type getDashboardCountsResponse400 = { + data: ApiErrorResponse + status: 400 +} + +export type getDashboardCountsResponse422 = { + data: ApiErrorResponse + status: 422 +} + +export type getDashboardCountsResponse500 = { + data: ApiErrorResponse + status: 500 +} + +export type getDashboardCountsResponseSuccess = getDashboardCountsResponse200 & { + headers: Headers +} +export type getDashboardCountsResponseError = ( + | getDashboardCountsResponse400 + | getDashboardCountsResponse422 + | getDashboardCountsResponse500 +) & { + headers: Headers +} + +export type getDashboardCountsResponse = + | getDashboardCountsResponseSuccess + | getDashboardCountsResponseError + +export const getGetDashboardCountsUrl = () => { + return `/post/public/getDashboardCounts` +} + +/** + * Returns public aggregate counts used by the dashboard. + * @summary Get public dashboard counts + */ +export const getDashboardCounts = async ( + options?: RequestInit +): Promise => { + return coreBackendClient(getGetDashboardCountsUrl(), { + ...options, + method: 'GET', + }) +} + +export const getGetDashboardCountsQueryKey = () => { + return [`/post/public/getDashboardCounts`] as const +} + +export const getGetDashboardCountsQueryOptions = < + TData = Awaited>, + TError = ApiErrorResponse, +>(options?: { + query?: Partial>, TError, TData>> +}) => { + const { query: queryOptions } = options ?? {} + + const queryKey = queryOptions?.queryKey ?? getGetDashboardCountsQueryKey() + + const queryFn: QueryFunction>> = ({ signal }) => + getDashboardCounts({ signal }) + + return { queryKey, queryFn, ...queryOptions } as UseQueryOptions< + Awaited>, + TError, + TData + > & { queryKey: DataTag } +} + +export type GetDashboardCountsQueryResult = NonNullable< + Awaited> +> +export type GetDashboardCountsQueryError = ApiErrorResponse + +export function useGetDashboardCounts< + TData = Awaited>, + TError = ApiErrorResponse, +>( + options: { + query: Partial>, TError, TData>> & + Pick< + DefinedInitialDataOptions< + Awaited>, + TError, + Awaited> + >, + 'initialData' + > + }, + queryClient?: QueryClient +): DefinedUseQueryResult & { queryKey: DataTag } +export function useGetDashboardCounts< + TData = Awaited>, + TError = ApiErrorResponse, +>( + options?: { + query?: Partial< + UseQueryOptions>, TError, TData> + > & + Pick< + UndefinedInitialDataOptions< + Awaited>, + TError, + Awaited> + >, + 'initialData' + > + }, + queryClient?: QueryClient +): UseQueryResult & { queryKey: DataTag } +export function useGetDashboardCounts< + TData = Awaited>, + TError = ApiErrorResponse, +>( + options?: { + query?: Partial>, TError, TData>> + }, + queryClient?: QueryClient +): UseQueryResult & { queryKey: DataTag } +/** + * @summary Get public dashboard counts + */ + +export function useGetDashboardCounts< + TData = Awaited>, + TError = ApiErrorResponse, +>( + options?: { + query?: Partial>, TError, TData>> + }, + queryClient?: QueryClient +): UseQueryResult & { queryKey: DataTag } { + const queryOptions = getGetDashboardCountsQueryOptions(options) + + const query = useQuery(queryOptions, queryClient) as UseQueryResult & { + queryKey: DataTag + } + + return { ...query, queryKey: queryOptions.queryKey } +} + +export type getImageResponse200 = { + data: Blob + status: 200 +} + +export type getImageResponse400 = { + data: ApiErrorResponse + status: 400 +} + +export type getImageResponse404 = { + data: ApiErrorResponse + status: 404 +} + +export type getImageResponse422 = { + data: ApiErrorResponse + status: 422 +} + +export type getImageResponse500 = { + data: ApiErrorResponse + status: 500 +} + +export type getImageResponseSuccess = getImageResponse200 & { + headers: Headers +} +export type getImageResponseError = ( + | getImageResponse400 + | getImageResponse404 + | getImageResponse422 + | getImageResponse500 +) & { + headers: Headers +} + +export type getImageResponse = getImageResponseSuccess | getImageResponseError + +export const getGetImageUrl = (id: string) => { + return `/post/public/images/${id}` +} + +/** + * Public endpoint that streams a stored inscription image by id. + * @summary Download post image + */ +export const getImage = async (id: string, options?: RequestInit): Promise => { + return coreBackendClient(getGetImageUrl(id), { + ...options, + method: 'GET', + }) +} + +export const getGetImageQueryKey = (id: string) => { + return [`/post/public/images/${id}`] as const +} + +export const getGetImageQueryOptions = < + TData = Awaited>, + TError = ApiErrorResponse, +>( + id: string, + options?: { + query?: Partial>, TError, TData>> + } +) => { + const { query: queryOptions } = options ?? {} + + const queryKey = queryOptions?.queryKey ?? getGetImageQueryKey(id) + + const queryFn: QueryFunction>> = ({ signal }) => + getImage(id, { signal }) + + return { + queryKey, + queryFn, + enabled: id !== null && id !== undefined, + ...queryOptions, + } as UseQueryOptions>, TError, TData> & { + queryKey: DataTag + } +} + +export type GetImageQueryResult = NonNullable>> +export type GetImageQueryError = ApiErrorResponse + +export function useGetImage< + TData = Awaited>, + TError = ApiErrorResponse, +>( + id: string, + options: { + query: Partial>, TError, TData>> & + Pick< + DefinedInitialDataOptions< + Awaited>, + TError, + Awaited> + >, + 'initialData' + > + }, + queryClient?: QueryClient +): DefinedUseQueryResult & { queryKey: DataTag } +export function useGetImage< + TData = Awaited>, + TError = ApiErrorResponse, +>( + id: string, + options?: { + query?: Partial>, TError, TData>> & + Pick< + UndefinedInitialDataOptions< + Awaited>, + TError, + Awaited> + >, + 'initialData' + > + }, + queryClient?: QueryClient +): UseQueryResult & { queryKey: DataTag } +export function useGetImage< + TData = Awaited>, + TError = ApiErrorResponse, +>( + id: string, + options?: { + query?: Partial>, TError, TData>> + }, + queryClient?: QueryClient +): UseQueryResult & { queryKey: DataTag } +/** + * @summary Download post image + */ + +export function useGetImage< + TData = Awaited>, + TError = ApiErrorResponse, +>( + id: string, + options?: { + query?: Partial>, TError, TData>> + }, + queryClient?: QueryClient +): UseQueryResult & { queryKey: DataTag } { + const queryOptions = getGetImageQueryOptions(id, options) + + const query = useQuery(queryOptions, queryClient) as UseQueryResult & { + queryKey: DataTag + } + + return { ...query, queryKey: queryOptions.queryKey } +} + +export type updatePostResponse200 = { + data: ApiSuccessResponse + status: 200 +} + +export type updatePostResponse400 = { + data: ApiErrorResponse + status: 400 +} + +export type updatePostResponse401 = { + data: ApiErrorResponse + status: 401 +} + +export type updatePostResponse403 = { + data: ApiErrorResponse + status: 403 +} + +export type updatePostResponse422 = { + data: ApiErrorResponse + status: 422 +} + +export type updatePostResponse500 = { + data: ApiErrorResponse + status: 500 +} + +export type updatePostResponseSuccess = updatePostResponse200 & { + headers: Headers +} +export type updatePostResponseError = ( + | updatePostResponse400 + | updatePostResponse401 + | updatePostResponse403 + | updatePostResponse422 + | updatePostResponse500 +) & { + headers: Headers +} + +export type updatePostResponse = updatePostResponseSuccess | updatePostResponseError + +export const getUpdatePostUrl = (params: UpdatePostParams) => { + const normalizedParams = new URLSearchParams() + + Object.entries(params || {}).forEach(([key, value]) => { + if (value !== undefined) { + normalizedParams.append(key, value === null ? 'null' : value.toString()) + } + }) + + const stringifiedParams = normalizedParams.toString() + + return stringifiedParams.length > 0 ? `/post/updatePost?${stringifiedParams}` : `/post/updatePost` +} + +/** + * Updates post metadata, removes selected images, adds new images, and enforces that at least one image remains and no more than 16 images are attached. + * @summary Update post metadata and images + */ +export const updatePost = async ( + params: UpdatePostParams, + updatePostBody?: UpdatePostBody, + options?: RequestInit +): Promise => { + return coreBackendClient(getUpdatePostUrl(params), { + ...options, + method: 'POST', + headers: { 'Content-Type': 'application/json', ...options?.headers }, + body: JSON.stringify(updatePostBody), + }) +} + +export const getUpdatePostMutationOptions = < + TError = ApiErrorResponse, + TContext = unknown, +>(options?: { + mutation?: UseMutationOptions< + Awaited>, + TError, + { params: UpdatePostParams; data?: UpdatePostBody }, + TContext + > +}): UseMutationOptions< + Awaited>, + TError, + { params: UpdatePostParams; data?: UpdatePostBody }, + TContext +> => { + const mutationKey = ['updatePost'] + const { mutation: mutationOptions } = options + ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey + ? options + : { ...options, mutation: { ...options.mutation, mutationKey } } + : { mutation: { mutationKey } } + + const mutationFn: MutationFunction< + Awaited>, + { params: UpdatePostParams; data?: UpdatePostBody } + > = (props) => { + const { params, data } = props ?? {} + + return updatePost(params, data) + } + + return { mutationFn, ...mutationOptions } +} + +export type UpdatePostMutationResult = NonNullable>> +export type UpdatePostMutationBody = UpdatePostBody | undefined +export type UpdatePostMutationError = ApiErrorResponse + +/** + * @summary Update post metadata and images + */ +export const useUpdatePost = ( + options?: { + mutation?: UseMutationOptions< + Awaited>, + TError, + { params: UpdatePostParams; data?: UpdatePostBody }, + TContext + > + }, + queryClient?: QueryClient +): UseMutationResult< + Awaited>, + TError, + { params: UpdatePostParams; data?: UpdatePostBody }, + TContext +> => { + return useMutation(getUpdatePostMutationOptions(options), queryClient) +} +export type updatePostDiscriptionResponse200 = { + data: ApiSuccessResponse + status: 200 +} + +export type updatePostDiscriptionResponse400 = { + data: ApiErrorResponse + status: 400 +} + +export type updatePostDiscriptionResponse401 = { + data: ApiErrorResponse + status: 401 +} + +export type updatePostDiscriptionResponse403 = { + data: ApiErrorResponse + status: 403 +} + +export type updatePostDiscriptionResponse422 = { + data: ApiErrorResponse + status: 422 +} + +export type updatePostDiscriptionResponse500 = { + data: ApiErrorResponse + status: 500 +} + +export type updatePostDiscriptionResponseSuccess = updatePostDiscriptionResponse200 & { + headers: Headers +} +export type updatePostDiscriptionResponseError = ( + | updatePostDiscriptionResponse400 + | updatePostDiscriptionResponse401 + | updatePostDiscriptionResponse403 + | updatePostDiscriptionResponse422 + | updatePostDiscriptionResponse500 +) & { + headers: Headers +} + +export type updatePostDiscriptionResponse = + | updatePostDiscriptionResponseSuccess + | updatePostDiscriptionResponseError + +export const getUpdatePostDiscriptionUrl = (params: UpdatePostDiscriptionParams) => { + const normalizedParams = new URLSearchParams() + + Object.entries(params || {}).forEach(([key, value]) => { + if (value !== undefined) { + normalizedParams.append(key, value === null ? 'null' : value.toString()) + } + }) + + const stringifiedParams = normalizedParams.toString() + + return stringifiedParams.length > 0 + ? `/post/updatePostDiscription?${stringifiedParams}` + : `/post/updatePostDiscription` +} + +/** + * Updates an authenticated user's own description/comment after moderation. + * @summary Update post description + */ +export const updatePostDiscription = async ( + params: UpdatePostDiscriptionParams, + options?: RequestInit +): Promise => { + return coreBackendClient(getUpdatePostDiscriptionUrl(params), { + ...options, + method: 'POST', + }) +} + +export const getUpdatePostDiscriptionQueryKey = (params?: UpdatePostDiscriptionParams) => { + return ['POST', `/post/updatePostDiscription`, ...(params ? [params] : [])] as const +} + +export const getUpdatePostDiscriptionQueryOptions = < + TData = Awaited>, + TError = ApiErrorResponse, +>( + params: UpdatePostDiscriptionParams, + options?: { + query?: Partial< + UseQueryOptions>, TError, TData> + > + } +) => { + const { query: queryOptions } = options ?? {} + + const queryKey = queryOptions?.queryKey ?? getUpdatePostDiscriptionQueryKey(params) + + const queryFn: QueryFunction>> = ({ signal }) => + updatePostDiscription(params, { signal }) + + return { queryKey, queryFn, ...queryOptions } as UseQueryOptions< + Awaited>, + TError, + TData + > & { queryKey: DataTag } +} + +export type UpdatePostDiscriptionQueryResult = NonNullable< + Awaited> +> +export type UpdatePostDiscriptionQueryError = ApiErrorResponse + +export function useUpdatePostDiscription< + TData = Awaited>, + TError = ApiErrorResponse, +>( + params: UpdatePostDiscriptionParams, + options: { + query: Partial< + UseQueryOptions>, TError, TData> + > & + Pick< + DefinedInitialDataOptions< + Awaited>, + TError, + Awaited> + >, + 'initialData' + > + }, + queryClient?: QueryClient +): DefinedUseQueryResult & { queryKey: DataTag } +export function useUpdatePostDiscription< + TData = Awaited>, + TError = ApiErrorResponse, +>( + params: UpdatePostDiscriptionParams, + options?: { + query?: Partial< + UseQueryOptions>, TError, TData> + > & + Pick< + UndefinedInitialDataOptions< + Awaited>, + TError, + Awaited> + >, + 'initialData' + > + }, + queryClient?: QueryClient +): UseQueryResult & { queryKey: DataTag } +export function useUpdatePostDiscription< + TData = Awaited>, + TError = ApiErrorResponse, +>( + params: UpdatePostDiscriptionParams, + options?: { + query?: Partial< + UseQueryOptions>, TError, TData> + > + }, + queryClient?: QueryClient +): UseQueryResult & { queryKey: DataTag } +/** + * @summary Update post description + */ + +export function useUpdatePostDiscription< + TData = Awaited>, + TError = ApiErrorResponse, +>( + params: UpdatePostDiscriptionParams, + options?: { + query?: Partial< + UseQueryOptions>, TError, TData> + > + }, + queryClient?: QueryClient +): UseQueryResult & { queryKey: DataTag } { + const queryOptions = getUpdatePostDiscriptionQueryOptions(params, options) + + const query = useQuery(queryOptions, queryClient) as UseQueryResult & { + queryKey: DataTag + } + + return { ...query, queryKey: queryOptions.queryKey } +} + +export type userProfileResponse200 = { + data: ApiSuccessResponse + status: 200 +} + +export type userProfileResponse400 = { + data: ApiErrorResponse + status: 400 +} + +export type userProfileResponse401 = { + data: ApiErrorResponse + status: 401 +} + +export type userProfileResponse403 = { + data: ApiErrorResponse + status: 403 +} + +export type userProfileResponse422 = { + data: ApiErrorResponse + status: 422 +} + +export type userProfileResponse500 = { + data: ApiErrorResponse + status: 500 +} + +export type userProfileResponseSuccess = userProfileResponse200 & { + headers: Headers +} +export type userProfileResponseError = ( + | userProfileResponse400 + | userProfileResponse401 + | userProfileResponse403 + | userProfileResponse422 + | userProfileResponse500 +) & { + headers: Headers +} + +export type userProfileResponse = userProfileResponseSuccess | userProfileResponseError + +export const getUserProfileUrl = () => { + return `/post/userProfile` +} + +/** + * Legacy post-module profile endpoint that returns the authenticated user object in the standard envelope. + * @summary Get current user entity profile + */ +export const userProfile = async (options?: RequestInit): Promise => { + return coreBackendClient(getUserProfileUrl(), { + ...options, + method: 'POST', + }) +} + +export const getUserProfileQueryKey = () => { + return ['POST', `/post/userProfile`] as const +} + +export const getUserProfileQueryOptions = < + TData = Awaited>, + TError = ApiErrorResponse, +>(options?: { + query?: Partial>, TError, TData>> +}) => { + const { query: queryOptions } = options ?? {} + + const queryKey = queryOptions?.queryKey ?? getUserProfileQueryKey() + + const queryFn: QueryFunction>> = ({ signal }) => + userProfile({ signal }) + + return { queryKey, queryFn, ...queryOptions } as UseQueryOptions< + Awaited>, + TError, + TData + > & { queryKey: DataTag } +} + +export type UserProfileQueryResult = NonNullable>> +export type UserProfileQueryError = ApiErrorResponse + +export function useUserProfile< + TData = Awaited>, + TError = ApiErrorResponse, +>( + options: { + query: Partial>, TError, TData>> & + Pick< + DefinedInitialDataOptions< + Awaited>, + TError, + Awaited> + >, + 'initialData' + > + }, + queryClient?: QueryClient +): DefinedUseQueryResult & { queryKey: DataTag } +export function useUserProfile< + TData = Awaited>, + TError = ApiErrorResponse, +>( + options?: { + query?: Partial>, TError, TData>> & + Pick< + UndefinedInitialDataOptions< + Awaited>, + TError, + Awaited> + >, + 'initialData' + > + }, + queryClient?: QueryClient +): UseQueryResult & { queryKey: DataTag } +export function useUserProfile< + TData = Awaited>, + TError = ApiErrorResponse, +>( + options?: { + query?: Partial>, TError, TData>> + }, + queryClient?: QueryClient +): UseQueryResult & { queryKey: DataTag } +/** + * @summary Get current user entity profile + */ + +export function useUserProfile< + TData = Awaited>, + TError = ApiErrorResponse, +>( + options?: { + query?: Partial>, TError, TData>> + }, + queryClient?: QueryClient +): UseQueryResult & { queryKey: DataTag } { + const queryOptions = getUserProfileQueryOptions(options) + + const query = useQuery(queryOptions, queryClient) as UseQueryResult & { + queryKey: DataTag + } + + return { ...query, queryKey: queryOptions.queryKey } +} diff --git a/src/api/endpoints/reports/reports.ts b/src/api/endpoints/reports/reports.ts new file mode 100644 index 0000000..b4fa5dd --- /dev/null +++ b/src/api/endpoints/reports/reports.ts @@ -0,0 +1,466 @@ +/** + * Generated by orval v8.11.0 🍺 + * Do not edit manually. + * Stone Inscription API + * REST API for OAuth authentication, user profiles, inscription posts, images, public dashboard metrics, and moderation reports. + +Most JSON endpoints return a standard envelope with `message`, `http-status`, and `data`. Protected endpoints use a JWT bearer token in the `Authorization` header. + + * OpenAPI spec version: v1 + */ +import { useMutation, useQuery } from '@tanstack/react-query' +import type { + DataTag, + DefinedInitialDataOptions, + DefinedUseQueryResult, + MutationFunction, + QueryClient, + QueryFunction, + QueryKey, + UndefinedInitialDataOptions, + UseMutationOptions, + UseMutationResult, + UseQueryOptions, + UseQueryResult, +} from '@tanstack/react-query' + +import type { + ApiErrorResponse, + ApiSuccessResponse, + CreateReportRequest, + GetReportsParams, + ModerateReportRequest, + ModerationReport, + ReportQueuedResponse, +} from '../../models' + +import { coreBackendClient } from '../../../utils/http/clients/coreBackend.client' + +export type moderateReportResponse200 = { + data: ApiSuccessResponse + status: 200 +} + +export type moderateReportResponse400 = { + data: ApiErrorResponse + status: 400 +} + +export type moderateReportResponse401 = { + data: ApiErrorResponse + status: 401 +} + +export type moderateReportResponse403 = { + data: ApiErrorResponse + status: 403 +} + +export type moderateReportResponse404 = { + data: ApiErrorResponse + status: 404 +} + +export type moderateReportResponse422 = { + data: ApiErrorResponse + status: 422 +} + +export type moderateReportResponse500 = { + data: ApiErrorResponse + status: 500 +} + +export type moderateReportResponseSuccess = moderateReportResponse200 & { + headers: Headers +} +export type moderateReportResponseError = ( + | moderateReportResponse400 + | moderateReportResponse401 + | moderateReportResponse403 + | moderateReportResponse404 + | moderateReportResponse422 + | moderateReportResponse500 +) & { + headers: Headers +} + +export type moderateReportResponse = moderateReportResponseSuccess | moderateReportResponseError + +export const getModerateReportUrl = (id: string) => { + return `/moderate/${id}` +} + +/** + * Runs the moderation chain for a report. Human moderator roles are required when an escalated report needs final resolution. + * @summary Moderate report + */ +export const moderateReport = async ( + id: string, + moderateReportRequest?: ModerateReportRequest, + options?: RequestInit +): Promise => { + return coreBackendClient(getModerateReportUrl(id), { + ...options, + method: 'POST', + headers: { 'Content-Type': 'application/json', ...options?.headers }, + body: JSON.stringify(moderateReportRequest), + }) +} + +export const getModerateReportMutationOptions = < + TError = ApiErrorResponse, + TContext = unknown, +>(options?: { + mutation?: UseMutationOptions< + Awaited>, + TError, + { id: string; data?: ModerateReportRequest }, + TContext + > +}): UseMutationOptions< + Awaited>, + TError, + { id: string; data?: ModerateReportRequest }, + TContext +> => { + const mutationKey = ['moderateReport'] + const { mutation: mutationOptions } = options + ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey + ? options + : { ...options, mutation: { ...options.mutation, mutationKey } } + : { mutation: { mutationKey } } + + const mutationFn: MutationFunction< + Awaited>, + { id: string; data?: ModerateReportRequest } + > = (props) => { + const { id, data } = props ?? {} + + return moderateReport(id, data) + } + + return { mutationFn, ...mutationOptions } +} + +export type ModerateReportMutationResult = NonNullable>> +export type ModerateReportMutationBody = ModerateReportRequest | undefined +export type ModerateReportMutationError = ApiErrorResponse + +/** + * @summary Moderate report + */ +export const useModerateReport = ( + options?: { + mutation?: UseMutationOptions< + Awaited>, + TError, + { id: string; data?: ModerateReportRequest }, + TContext + > + }, + queryClient?: QueryClient +): UseMutationResult< + Awaited>, + TError, + { id: string; data?: ModerateReportRequest }, + TContext +> => { + return useMutation(getModerateReportMutationOptions(options), queryClient) +} +export type createReportResponse202 = { + data: ReportQueuedResponse + status: 202 +} + +export type createReportResponse400 = { + data: ApiErrorResponse + status: 400 +} + +export type createReportResponse401 = { + data: ApiErrorResponse + status: 401 +} + +export type createReportResponse403 = { + data: ApiErrorResponse + status: 403 +} + +export type createReportResponse422 = { + data: ApiErrorResponse + status: 422 +} + +export type createReportResponse500 = { + data: ApiErrorResponse + status: 500 +} + +export type createReportResponseSuccess = createReportResponse202 & { + headers: Headers +} +export type createReportResponseError = ( + | createReportResponse400 + | createReportResponse401 + | createReportResponse403 + | createReportResponse422 + | createReportResponse500 +) & { + headers: Headers +} + +export type createReportResponse = createReportResponseSuccess | createReportResponseError + +export const getCreateReportUrl = () => { + return `/report` +} + +/** + * Accepts a report from the authenticated user, validates target/reporting rules, and queues the report for AI moderation. + * @summary Submit report + */ +export const createReport = async ( + createReportRequest: CreateReportRequest, + options?: RequestInit +): Promise => { + return coreBackendClient(getCreateReportUrl(), { + ...options, + method: 'POST', + headers: { 'Content-Type': 'application/json', ...options?.headers }, + body: JSON.stringify(createReportRequest), + }) +} + +export const getCreateReportMutationOptions = < + TError = ApiErrorResponse, + TContext = unknown, +>(options?: { + mutation?: UseMutationOptions< + Awaited>, + TError, + { data: CreateReportRequest }, + TContext + > +}): UseMutationOptions< + Awaited>, + TError, + { data: CreateReportRequest }, + TContext +> => { + const mutationKey = ['createReport'] + const { mutation: mutationOptions } = options + ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey + ? options + : { ...options, mutation: { ...options.mutation, mutationKey } } + : { mutation: { mutationKey } } + + const mutationFn: MutationFunction< + Awaited>, + { data: CreateReportRequest } + > = (props) => { + const { data } = props ?? {} + + return createReport(data) + } + + return { mutationFn, ...mutationOptions } +} + +export type CreateReportMutationResult = NonNullable>> +export type CreateReportMutationBody = CreateReportRequest +export type CreateReportMutationError = ApiErrorResponse + +/** + * @summary Submit report + */ +export const useCreateReport = ( + options?: { + mutation?: UseMutationOptions< + Awaited>, + TError, + { data: CreateReportRequest }, + TContext + > + }, + queryClient?: QueryClient +): UseMutationResult< + Awaited>, + TError, + { data: CreateReportRequest }, + TContext +> => { + return useMutation(getCreateReportMutationOptions(options), queryClient) +} +export type getReportsResponse200 = { + data: ModerationReport[] + status: 200 +} + +export type getReportsResponse400 = { + data: ApiErrorResponse + status: 400 +} + +export type getReportsResponse401 = { + data: ApiErrorResponse + status: 401 +} + +export type getReportsResponse403 = { + data: ApiErrorResponse + status: 403 +} + +export type getReportsResponse422 = { + data: ApiErrorResponse + status: 422 +} + +export type getReportsResponse500 = { + data: ApiErrorResponse + status: 500 +} + +export type getReportsResponseSuccess = getReportsResponse200 & { + headers: Headers +} +export type getReportsResponseError = ( + | getReportsResponse400 + | getReportsResponse401 + | getReportsResponse403 + | getReportsResponse422 + | getReportsResponse500 +) & { + headers: Headers +} + +export type getReportsResponse = getReportsResponseSuccess | getReportsResponseError + +export const getGetReportsUrl = (params?: GetReportsParams) => { + const normalizedParams = new URLSearchParams() + + Object.entries(params || {}).forEach(([key, value]) => { + if (value !== undefined) { + normalizedParams.append(key, value === null ? 'null' : value.toString()) + } + }) + + const stringifiedParams = normalizedParams.toString() + + return stringifiedParams.length > 0 ? `/reports?${stringifiedParams}` : `/reports` +} + +/** + * Returns moderation reports ordered by creation time. Moderators may optionally filter by status. + * @summary List moderation reports + */ +export const getReports = async ( + params?: GetReportsParams, + options?: RequestInit +): Promise => { + return coreBackendClient(getGetReportsUrl(params), { + ...options, + method: 'GET', + }) +} + +export const getGetReportsQueryKey = (params?: GetReportsParams) => { + return [`/reports`, ...(params ? [params] : [])] as const +} + +export const getGetReportsQueryOptions = < + TData = Awaited>, + TError = ApiErrorResponse, +>( + params?: GetReportsParams, + options?: { + query?: Partial>, TError, TData>> + } +) => { + const { query: queryOptions } = options ?? {} + + const queryKey = queryOptions?.queryKey ?? getGetReportsQueryKey(params) + + const queryFn: QueryFunction>> = ({ signal }) => + getReports(params, { signal }) + + return { queryKey, queryFn, ...queryOptions } as UseQueryOptions< + Awaited>, + TError, + TData + > & { queryKey: DataTag } +} + +export type GetReportsQueryResult = NonNullable>> +export type GetReportsQueryError = ApiErrorResponse + +export function useGetReports< + TData = Awaited>, + TError = ApiErrorResponse, +>( + params: undefined | GetReportsParams, + options: { + query: Partial>, TError, TData>> & + Pick< + DefinedInitialDataOptions< + Awaited>, + TError, + Awaited> + >, + 'initialData' + > + }, + queryClient?: QueryClient +): DefinedUseQueryResult & { queryKey: DataTag } +export function useGetReports< + TData = Awaited>, + TError = ApiErrorResponse, +>( + params?: GetReportsParams, + options?: { + query?: Partial>, TError, TData>> & + Pick< + UndefinedInitialDataOptions< + Awaited>, + TError, + Awaited> + >, + 'initialData' + > + }, + queryClient?: QueryClient +): UseQueryResult & { queryKey: DataTag } +export function useGetReports< + TData = Awaited>, + TError = ApiErrorResponse, +>( + params?: GetReportsParams, + options?: { + query?: Partial>, TError, TData>> + }, + queryClient?: QueryClient +): UseQueryResult & { queryKey: DataTag } +/** + * @summary List moderation reports + */ + +export function useGetReports< + TData = Awaited>, + TError = ApiErrorResponse, +>( + params?: GetReportsParams, + options?: { + query?: Partial>, TError, TData>> + }, + queryClient?: QueryClient +): UseQueryResult & { queryKey: DataTag } { + const queryOptions = getGetReportsQueryOptions(params, options) + + const query = useQuery(queryOptions, queryClient) as UseQueryResult & { + queryKey: DataTag + } + + return { ...query, queryKey: queryOptions.queryKey } +} diff --git a/src/api/endpoints/users/users.ts b/src/api/endpoints/users/users.ts new file mode 100644 index 0000000..e5bca3b --- /dev/null +++ b/src/api/endpoints/users/users.ts @@ -0,0 +1,731 @@ +/** + * Generated by orval v8.11.0 🍺 + * Do not edit manually. + * Stone Inscription API + * REST API for OAuth authentication, user profiles, inscription posts, images, public dashboard metrics, and moderation reports. + +Most JSON endpoints return a standard envelope with `message`, `http-status`, and `data`. Protected endpoints use a JWT bearer token in the `Authorization` header. + + * OpenAPI spec version: v1 + */ +import { useMutation, useQuery } from '@tanstack/react-query' +import type { + DataTag, + DefinedInitialDataOptions, + DefinedUseQueryResult, + MutationFunction, + QueryClient, + QueryFunction, + QueryKey, + UndefinedInitialDataOptions, + UseMutationOptions, + UseMutationResult, + UseQueryOptions, + UseQueryResult, +} from '@tanstack/react-query' + +import type { + ApiErrorResponse, + ApiSuccessResponse, + UpdateProfileRequest, + UploadCoverImageBody, + UploadProfileImageBody, + UserProfile, +} from '../../models' + +import { coreBackendClient } from '../../../utils/http/clients/coreBackend.client' + +export type getProfileResponse200 = { + data: ApiSuccessResponse + status: 200 +} + +export type getProfileResponse400 = { + data: ApiErrorResponse + status: 400 +} + +export type getProfileResponse401 = { + data: ApiErrorResponse + status: 401 +} + +export type getProfileResponse403 = { + data: ApiErrorResponse + status: 403 +} + +export type getProfileResponse422 = { + data: ApiErrorResponse + status: 422 +} + +export type getProfileResponse500 = { + data: ApiErrorResponse + status: 500 +} + +export type getProfileResponseSuccess = getProfileResponse200 & { + headers: Headers +} +export type getProfileResponseError = ( + | getProfileResponse400 + | getProfileResponse401 + | getProfileResponse403 + | getProfileResponse422 + | getProfileResponse500 +) & { + headers: Headers +} + +export type getProfileResponse = getProfileResponseSuccess | getProfileResponseError + +export const getGetProfileUrl = () => { + return `/user/profile` +} + +/** + * Returns the profile attached to the JWT subject. + * @summary Get my profile + */ +export const getProfile = async (options?: RequestInit): Promise => { + return coreBackendClient(getGetProfileUrl(), { + ...options, + method: 'GET', + }) +} + +export const getGetProfileQueryKey = () => { + return [`/user/profile`] as const +} + +export const getGetProfileQueryOptions = < + TData = Awaited>, + TError = ApiErrorResponse, +>(options?: { + query?: Partial>, TError, TData>> +}) => { + const { query: queryOptions } = options ?? {} + + const queryKey = queryOptions?.queryKey ?? getGetProfileQueryKey() + + const queryFn: QueryFunction>> = ({ signal }) => + getProfile({ signal }) + + return { queryKey, queryFn, ...queryOptions } as UseQueryOptions< + Awaited>, + TError, + TData + > & { queryKey: DataTag } +} + +export type GetProfileQueryResult = NonNullable>> +export type GetProfileQueryError = ApiErrorResponse + +export function useGetProfile< + TData = Awaited>, + TError = ApiErrorResponse, +>( + options: { + query: Partial>, TError, TData>> & + Pick< + DefinedInitialDataOptions< + Awaited>, + TError, + Awaited> + >, + 'initialData' + > + }, + queryClient?: QueryClient +): DefinedUseQueryResult & { queryKey: DataTag } +export function useGetProfile< + TData = Awaited>, + TError = ApiErrorResponse, +>( + options?: { + query?: Partial>, TError, TData>> & + Pick< + UndefinedInitialDataOptions< + Awaited>, + TError, + Awaited> + >, + 'initialData' + > + }, + queryClient?: QueryClient +): UseQueryResult & { queryKey: DataTag } +export function useGetProfile< + TData = Awaited>, + TError = ApiErrorResponse, +>( + options?: { + query?: Partial>, TError, TData>> + }, + queryClient?: QueryClient +): UseQueryResult & { queryKey: DataTag } +/** + * @summary Get my profile + */ + +export function useGetProfile< + TData = Awaited>, + TError = ApiErrorResponse, +>( + options?: { + query?: Partial>, TError, TData>> + }, + queryClient?: QueryClient +): UseQueryResult & { queryKey: DataTag } { + const queryOptions = getGetProfileQueryOptions(options) + + const query = useQuery(queryOptions, queryClient) as UseQueryResult & { + queryKey: DataTag + } + + return { ...query, queryKey: queryOptions.queryKey } +} + +export type getUserImageResponse200 = { + data: Blob + status: 200 +} + +export type getUserImageResponse400 = { + data: ApiErrorResponse + status: 400 +} + +export type getUserImageResponse404 = { + data: ApiErrorResponse + status: 404 +} + +export type getUserImageResponse422 = { + data: ApiErrorResponse + status: 422 +} + +export type getUserImageResponse500 = { + data: ApiErrorResponse + status: 500 +} + +export type getUserImageResponseSuccess = getUserImageResponse200 & { + headers: Headers +} +export type getUserImageResponseError = ( + | getUserImageResponse400 + | getUserImageResponse404 + | getUserImageResponse422 + | getUserImageResponse500 +) & { + headers: Headers +} + +export type getUserImageResponse = getUserImageResponseSuccess | getUserImageResponseError + +export const getGetUserImageUrl = (id: string) => { + return `/user/public/images/${id}` +} + +/** + * Public endpoint that streams a profile or cover image by id. + * @summary Download user image + */ +export const getUserImage = async ( + id: string, + options?: RequestInit +): Promise => { + return coreBackendClient(getGetUserImageUrl(id), { + ...options, + method: 'GET', + }) +} + +export const getGetUserImageQueryKey = (id: string) => { + return [`/user/public/images/${id}`] as const +} + +export const getGetUserImageQueryOptions = < + TData = Awaited>, + TError = ApiErrorResponse, +>( + id: string, + options?: { + query?: Partial>, TError, TData>> + } +) => { + const { query: queryOptions } = options ?? {} + + const queryKey = queryOptions?.queryKey ?? getGetUserImageQueryKey(id) + + const queryFn: QueryFunction>> = ({ signal }) => + getUserImage(id, { signal }) + + return { + queryKey, + queryFn, + enabled: id !== null && id !== undefined, + ...queryOptions, + } as UseQueryOptions>, TError, TData> & { + queryKey: DataTag + } +} + +export type GetUserImageQueryResult = NonNullable>> +export type GetUserImageQueryError = ApiErrorResponse + +export function useGetUserImage< + TData = Awaited>, + TError = ApiErrorResponse, +>( + id: string, + options: { + query: Partial>, TError, TData>> & + Pick< + DefinedInitialDataOptions< + Awaited>, + TError, + Awaited> + >, + 'initialData' + > + }, + queryClient?: QueryClient +): DefinedUseQueryResult & { queryKey: DataTag } +export function useGetUserImage< + TData = Awaited>, + TError = ApiErrorResponse, +>( + id: string, + options?: { + query?: Partial>, TError, TData>> & + Pick< + UndefinedInitialDataOptions< + Awaited>, + TError, + Awaited> + >, + 'initialData' + > + }, + queryClient?: QueryClient +): UseQueryResult & { queryKey: DataTag } +export function useGetUserImage< + TData = Awaited>, + TError = ApiErrorResponse, +>( + id: string, + options?: { + query?: Partial>, TError, TData>> + }, + queryClient?: QueryClient +): UseQueryResult & { queryKey: DataTag } +/** + * @summary Download user image + */ + +export function useGetUserImage< + TData = Awaited>, + TError = ApiErrorResponse, +>( + id: string, + options?: { + query?: Partial>, TError, TData>> + }, + queryClient?: QueryClient +): UseQueryResult & { queryKey: DataTag } { + const queryOptions = getGetUserImageQueryOptions(id, options) + + const query = useQuery(queryOptions, queryClient) as UseQueryResult & { + queryKey: DataTag + } + + return { ...query, queryKey: queryOptions.queryKey } +} + +export type updateProfileResponse200 = { + data: UserProfile + status: 200 +} + +export type updateProfileResponse400 = { + data: ApiErrorResponse + status: 400 +} + +export type updateProfileResponse401 = { + data: ApiErrorResponse + status: 401 +} + +export type updateProfileResponse403 = { + data: ApiErrorResponse + status: 403 +} + +export type updateProfileResponse422 = { + data: ApiErrorResponse + status: 422 +} + +export type updateProfileResponse500 = { + data: ApiErrorResponse + status: 500 +} + +export type updateProfileResponseSuccess = updateProfileResponse200 & { + headers: Headers +} +export type updateProfileResponseError = ( + | updateProfileResponse400 + | updateProfileResponse401 + | updateProfileResponse403 + | updateProfileResponse422 + | updateProfileResponse500 +) & { + headers: Headers +} + +export type updateProfileResponse = updateProfileResponseSuccess | updateProfileResponseError + +export const getUpdateProfileUrl = () => { + return `/user/updateProfile` +} + +/** + * Updates the authenticated user's editable profile fields. Bean validation constraints are visible in the request schema. + * @summary Update my profile + */ +export const updateProfile = async ( + updateProfileRequest: UpdateProfileRequest, + options?: RequestInit +): Promise => { + return coreBackendClient(getUpdateProfileUrl(), { + ...options, + method: 'POST', + headers: { 'Content-Type': 'application/json', ...options?.headers }, + body: JSON.stringify(updateProfileRequest), + }) +} + +export const getUpdateProfileMutationOptions = < + TError = ApiErrorResponse, + TContext = unknown, +>(options?: { + mutation?: UseMutationOptions< + Awaited>, + TError, + { data: UpdateProfileRequest }, + TContext + > +}): UseMutationOptions< + Awaited>, + TError, + { data: UpdateProfileRequest }, + TContext +> => { + const mutationKey = ['updateProfile'] + const { mutation: mutationOptions } = options + ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey + ? options + : { ...options, mutation: { ...options.mutation, mutationKey } } + : { mutation: { mutationKey } } + + const mutationFn: MutationFunction< + Awaited>, + { data: UpdateProfileRequest } + > = (props) => { + const { data } = props ?? {} + + return updateProfile(data) + } + + return { mutationFn, ...mutationOptions } +} + +export type UpdateProfileMutationResult = NonNullable>> +export type UpdateProfileMutationBody = UpdateProfileRequest +export type UpdateProfileMutationError = ApiErrorResponse + +/** + * @summary Update my profile + */ +export const useUpdateProfile = ( + options?: { + mutation?: UseMutationOptions< + Awaited>, + TError, + { data: UpdateProfileRequest }, + TContext + > + }, + queryClient?: QueryClient +): UseMutationResult< + Awaited>, + TError, + { data: UpdateProfileRequest }, + TContext +> => { + return useMutation(getUpdateProfileMutationOptions(options), queryClient) +} +export type uploadCoverImageResponse200 = { + data: ApiSuccessResponse + status: 200 +} + +export type uploadCoverImageResponse400 = { + data: ApiErrorResponse + status: 400 +} + +export type uploadCoverImageResponse401 = { + data: ApiErrorResponse + status: 401 +} + +export type uploadCoverImageResponse403 = { + data: ApiErrorResponse + status: 403 +} + +export type uploadCoverImageResponse422 = { + data: ApiErrorResponse + status: 422 +} + +export type uploadCoverImageResponse500 = { + data: ApiErrorResponse + status: 500 +} + +export type uploadCoverImageResponseSuccess = uploadCoverImageResponse200 & { + headers: Headers +} +export type uploadCoverImageResponseError = ( + | uploadCoverImageResponse400 + | uploadCoverImageResponse401 + | uploadCoverImageResponse403 + | uploadCoverImageResponse422 + | uploadCoverImageResponse500 +) & { + headers: Headers +} + +export type uploadCoverImageResponse = + | uploadCoverImageResponseSuccess + | uploadCoverImageResponseError + +export const getUploadCoverImageUrl = () => { + return `/user/uploadCoverImage` +} + +/** + * Replaces the authenticated user's cover image. Accepts one multipart image file using the configured extension allow-list. + * @summary Upload cover image + */ +export const uploadCoverImage = async ( + uploadCoverImageBody?: UploadCoverImageBody, + options?: RequestInit +): Promise => { + return coreBackendClient(getUploadCoverImageUrl(), { + ...options, + method: 'POST', + headers: { 'Content-Type': 'application/json', ...options?.headers }, + body: JSON.stringify(uploadCoverImageBody), + }) +} + +export const getUploadCoverImageMutationOptions = < + TError = ApiErrorResponse, + TContext = unknown, +>(options?: { + mutation?: UseMutationOptions< + Awaited>, + TError, + { data?: UploadCoverImageBody }, + TContext + > +}): UseMutationOptions< + Awaited>, + TError, + { data?: UploadCoverImageBody }, + TContext +> => { + const mutationKey = ['uploadCoverImage'] + const { mutation: mutationOptions } = options + ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey + ? options + : { ...options, mutation: { ...options.mutation, mutationKey } } + : { mutation: { mutationKey } } + + const mutationFn: MutationFunction< + Awaited>, + { data?: UploadCoverImageBody } + > = (props) => { + const { data } = props ?? {} + + return uploadCoverImage(data) + } + + return { mutationFn, ...mutationOptions } +} + +export type UploadCoverImageMutationResult = NonNullable< + Awaited> +> +export type UploadCoverImageMutationBody = UploadCoverImageBody | undefined +export type UploadCoverImageMutationError = ApiErrorResponse + +/** + * @summary Upload cover image + */ +export const useUploadCoverImage = ( + options?: { + mutation?: UseMutationOptions< + Awaited>, + TError, + { data?: UploadCoverImageBody }, + TContext + > + }, + queryClient?: QueryClient +): UseMutationResult< + Awaited>, + TError, + { data?: UploadCoverImageBody }, + TContext +> => { + return useMutation(getUploadCoverImageMutationOptions(options), queryClient) +} +export type uploadProfileImageResponse200 = { + data: ApiSuccessResponse + status: 200 +} + +export type uploadProfileImageResponse400 = { + data: ApiErrorResponse + status: 400 +} + +export type uploadProfileImageResponse401 = { + data: ApiErrorResponse + status: 401 +} + +export type uploadProfileImageResponse403 = { + data: ApiErrorResponse + status: 403 +} + +export type uploadProfileImageResponse422 = { + data: ApiErrorResponse + status: 422 +} + +export type uploadProfileImageResponse500 = { + data: ApiErrorResponse + status: 500 +} + +export type uploadProfileImageResponseSuccess = uploadProfileImageResponse200 & { + headers: Headers +} +export type uploadProfileImageResponseError = ( + | uploadProfileImageResponse400 + | uploadProfileImageResponse401 + | uploadProfileImageResponse403 + | uploadProfileImageResponse422 + | uploadProfileImageResponse500 +) & { + headers: Headers +} + +export type uploadProfileImageResponse = + | uploadProfileImageResponseSuccess + | uploadProfileImageResponseError + +export const getUploadProfileImageUrl = () => { + return `/user/uploadProfileImage` +} + +/** + * Replaces the authenticated user's profile image. Accepts one multipart image file using the configured extension allow-list. + * @summary Upload profile image + */ +export const uploadProfileImage = async ( + uploadProfileImageBody?: UploadProfileImageBody, + options?: RequestInit +): Promise => { + return coreBackendClient(getUploadProfileImageUrl(), { + ...options, + method: 'POST', + headers: { 'Content-Type': 'application/json', ...options?.headers }, + body: JSON.stringify(uploadProfileImageBody), + }) +} + +export const getUploadProfileImageMutationOptions = < + TError = ApiErrorResponse, + TContext = unknown, +>(options?: { + mutation?: UseMutationOptions< + Awaited>, + TError, + { data?: UploadProfileImageBody }, + TContext + > +}): UseMutationOptions< + Awaited>, + TError, + { data?: UploadProfileImageBody }, + TContext +> => { + const mutationKey = ['uploadProfileImage'] + const { mutation: mutationOptions } = options + ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey + ? options + : { ...options, mutation: { ...options.mutation, mutationKey } } + : { mutation: { mutationKey } } + + const mutationFn: MutationFunction< + Awaited>, + { data?: UploadProfileImageBody } + > = (props) => { + const { data } = props ?? {} + + return uploadProfileImage(data) + } + + return { mutationFn, ...mutationOptions } +} + +export type UploadProfileImageMutationResult = NonNullable< + Awaited> +> +export type UploadProfileImageMutationBody = UploadProfileImageBody | undefined +export type UploadProfileImageMutationError = ApiErrorResponse + +/** + * @summary Upload profile image + */ +export const useUploadProfileImage = ( + options?: { + mutation?: UseMutationOptions< + Awaited>, + TError, + { data?: UploadProfileImageBody }, + TContext + > + }, + queryClient?: QueryClient +): UseMutationResult< + Awaited>, + TError, + { data?: UploadProfileImageBody }, + TContext +> => { + return useMutation(getUploadProfileImageMutationOptions(options), queryClient) +} diff --git a/src/api/models/accessTokenResponse.ts b/src/api/models/accessTokenResponse.ts new file mode 100644 index 0000000..4d64c80 --- /dev/null +++ b/src/api/models/accessTokenResponse.ts @@ -0,0 +1,18 @@ +/** + * Generated by orval v8.11.0 🍺 + * Do not edit manually. + * Stone Inscription API + * REST API for OAuth authentication, user profiles, inscription posts, images, public dashboard metrics, and moderation reports. + +Most JSON endpoints return a standard envelope with `message`, `http-status`, and `data`. Protected endpoints use a JWT bearer token in the `Authorization` header. + + * OpenAPI spec version: v1 + */ + +/** + * Access token payload returned after refresh-token rotation. + */ +export interface AccessTokenResponse { + /** New short-lived JWT access token. */ + accessToken?: string +} diff --git a/src/api/models/addImagesToPostBody.ts b/src/api/models/addImagesToPostBody.ts new file mode 100644 index 0000000..f95a2fb --- /dev/null +++ b/src/api/models/addImagesToPostBody.ts @@ -0,0 +1,15 @@ +/** + * Generated by orval v8.11.0 🍺 + * Do not edit manually. + * Stone Inscription API + * REST API for OAuth authentication, user profiles, inscription posts, images, public dashboard metrics, and moderation reports. + +Most JSON endpoints return a standard envelope with `message`, `http-status`, and `data`. Protected endpoints use a JWT bearer token in the `Authorization` header. + + * OpenAPI spec version: v1 + */ + +export type AddImagesToPostBody = { + /** Image files. Maximum 16 images per post total. */ + files: Blob[] +} diff --git a/src/api/models/addImagesToPostParams.ts b/src/api/models/addImagesToPostParams.ts new file mode 100644 index 0000000..13689a1 --- /dev/null +++ b/src/api/models/addImagesToPostParams.ts @@ -0,0 +1,17 @@ +/** + * Generated by orval v8.11.0 🍺 + * Do not edit manually. + * Stone Inscription API + * REST API for OAuth authentication, user profiles, inscription posts, images, public dashboard metrics, and moderation reports. + +Most JSON endpoints return a standard envelope with `message`, `http-status`, and `data`. Protected endpoints use a JWT bearer token in the `Authorization` header. + + * OpenAPI spec version: v1 + */ + +export type AddImagesToPostParams = { + /** + * Post id. + */ + postId: string +} diff --git a/src/api/models/addPoastDiscriptionParams.ts b/src/api/models/addPoastDiscriptionParams.ts new file mode 100644 index 0000000..4df3b98 --- /dev/null +++ b/src/api/models/addPoastDiscriptionParams.ts @@ -0,0 +1,21 @@ +/** + * Generated by orval v8.11.0 🍺 + * Do not edit manually. + * Stone Inscription API + * REST API for OAuth authentication, user profiles, inscription posts, images, public dashboard metrics, and moderation reports. + +Most JSON endpoints return a standard envelope with `message`, `http-status`, and `data`. Protected endpoints use a JWT bearer token in the `Authorization` header. + + * OpenAPI spec version: v1 + */ + +export type AddPoastDiscriptionParams = { + /** + * Post id. + */ + postId: string + /** + * Description text. + */ + discription: string +} diff --git a/src/api/models/addPostWithFileBody.ts b/src/api/models/addPostWithFileBody.ts new file mode 100644 index 0000000..a8a58ae --- /dev/null +++ b/src/api/models/addPostWithFileBody.ts @@ -0,0 +1,17 @@ +/** + * Generated by orval v8.11.0 🍺 + * Do not edit manually. + * Stone Inscription API + * REST API for OAuth authentication, user profiles, inscription posts, images, public dashboard metrics, and moderation reports. + +Most JSON endpoints return a standard envelope with `message`, `http-status`, and `data`. Protected endpoints use a JWT bearer token in the `Authorization` header. + + * OpenAPI spec version: v1 + */ +import type { InscriptionPost } from './inscriptionPost' + +export type AddPostWithFileBody = { + /** Image files. Maximum 16 files, 75 MB each. */ + files: Blob[] + post?: InscriptionPost +} diff --git a/src/api/models/addRatingParams.ts b/src/api/models/addRatingParams.ts new file mode 100644 index 0000000..e70a191 --- /dev/null +++ b/src/api/models/addRatingParams.ts @@ -0,0 +1,21 @@ +/** + * Generated by orval v8.11.0 🍺 + * Do not edit manually. + * Stone Inscription API + * REST API for OAuth authentication, user profiles, inscription posts, images, public dashboard metrics, and moderation reports. + +Most JSON endpoints return a standard envelope with `message`, `http-status`, and `data`. Protected endpoints use a JWT bearer token in the `Authorization` header. + + * OpenAPI spec version: v1 + */ + +export type AddRatingParams = { + /** + * Post id. + */ + postId: string + /** + * Rating value. + */ + rating: number +} diff --git a/src/api/models/addVoteParams.ts b/src/api/models/addVoteParams.ts new file mode 100644 index 0000000..09afd66 --- /dev/null +++ b/src/api/models/addVoteParams.ts @@ -0,0 +1,17 @@ +/** + * Generated by orval v8.11.0 🍺 + * Do not edit manually. + * Stone Inscription API + * REST API for OAuth authentication, user profiles, inscription posts, images, public dashboard metrics, and moderation reports. + +Most JSON endpoints return a standard envelope with `message`, `http-status`, and `data`. Protected endpoints use a JWT bearer token in the `Authorization` header. + + * OpenAPI spec version: v1 + */ + +export type AddVoteParams = { + /** + * Description id. + */ + descriptionId: string +} diff --git a/src/api/models/apiErrorResponse.ts b/src/api/models/apiErrorResponse.ts new file mode 100644 index 0000000..fbd8076 --- /dev/null +++ b/src/api/models/apiErrorResponse.ts @@ -0,0 +1,22 @@ +/** + * Generated by orval v8.11.0 🍺 + * Do not edit manually. + * Stone Inscription API + * REST API for OAuth authentication, user profiles, inscription posts, images, public dashboard metrics, and moderation reports. + +Most JSON endpoints return a standard envelope with `message`, `http-status`, and `data`. Protected endpoints use a JWT bearer token in the `Authorization` header. + + * OpenAPI spec version: v1 + */ + +/** + * Standard error body returned by API exception handlers. + */ +export interface ApiErrorResponse { + /** Human-readable error message. */ + error_message?: string + /** HTTP status reason or numeric status used by the handler. */ + http_status?: unknown + /** HTTP status code. */ + http_status_code?: number +} diff --git a/src/api/models/apiSuccessResponse.ts b/src/api/models/apiSuccessResponse.ts new file mode 100644 index 0000000..23cfdb4 --- /dev/null +++ b/src/api/models/apiSuccessResponse.ts @@ -0,0 +1,22 @@ +/** + * Generated by orval v8.11.0 🍺 + * Do not edit manually. + * Stone Inscription API + * REST API for OAuth authentication, user profiles, inscription posts, images, public dashboard metrics, and moderation reports. + +Most JSON endpoints return a standard envelope with `message`, `http-status`, and `data`. Protected endpoints use a JWT bearer token in the `Authorization` header. + + * OpenAPI spec version: v1 + */ + +/** + * Standard success envelope returned by most JSON endpoints. + */ +export interface ApiSuccessResponse { + /** Endpoint-specific payload. */ + data?: unknown + /** HTTP status reason used by the response envelope. */ + 'http-status'?: unknown + /** Operation result message. */ + message?: string +} diff --git a/src/api/models/approveAdminRequestParams.ts b/src/api/models/approveAdminRequestParams.ts new file mode 100644 index 0000000..e03d620 --- /dev/null +++ b/src/api/models/approveAdminRequestParams.ts @@ -0,0 +1,17 @@ +/** + * Generated by orval v8.11.0 🍺 + * Do not edit manually. + * Stone Inscription API + * REST API for OAuth authentication, user profiles, inscription posts, images, public dashboard metrics, and moderation reports. + +Most JSON endpoints return a standard envelope with `message`, `http-status`, and `data`. Protected endpoints use a JWT bearer token in the `Authorization` header. + + * OpenAPI spec version: v1 + */ + +export type ApproveAdminRequestParams = { + /** + * Admin approval token. + */ + token: string +} diff --git a/src/api/models/createReportRequest.ts b/src/api/models/createReportRequest.ts new file mode 100644 index 0000000..e249086 --- /dev/null +++ b/src/api/models/createReportRequest.ts @@ -0,0 +1,33 @@ +/** + * Generated by orval v8.11.0 🍺 + * Do not edit manually. + * Stone Inscription API + * REST API for OAuth authentication, user profiles, inscription posts, images, public dashboard metrics, and moderation reports. + +Most JSON endpoints return a standard envelope with `message`, `http-status`, and `data`. Protected endpoints use a JWT bearer token in the `Authorization` header. + + * OpenAPI spec version: v1 + */ +import type { CreateReportRequestReason } from './createReportRequestReason' +import type { CreateReportRequestTargetType } from './createReportRequestTargetType' + +/** + * Request used by authenticated users to report a post, comment, or user. + */ +export interface CreateReportRequest { + /** + * Reporter-provided context for moderators. Maximum 1000 characters. + * @minLength 0 + * @maxLength 1000 + */ + details: string + /** Reason selected by the reporter. */ + reason: CreateReportRequestReason + /** + * MongoDB ObjectId or canonical identifier of the reported resource. + * @minLength 1 + */ + targetId: string + /** Type of resource being reported. */ + targetType: CreateReportRequestTargetType +} diff --git a/src/api/models/createReportRequestReason.ts b/src/api/models/createReportRequestReason.ts new file mode 100644 index 0000000..8905f3c --- /dev/null +++ b/src/api/models/createReportRequestReason.ts @@ -0,0 +1,25 @@ +/** + * Generated by orval v8.11.0 🍺 + * Do not edit manually. + * Stone Inscription API + * REST API for OAuth authentication, user profiles, inscription posts, images, public dashboard metrics, and moderation reports. + +Most JSON endpoints return a standard envelope with `message`, `http-status`, and `data`. Protected endpoints use a JWT bearer token in the `Authorization` header. + + * OpenAPI spec version: v1 + */ + +/** + * Reason selected by the reporter. + */ +export type CreateReportRequestReason = + (typeof CreateReportRequestReason)[keyof typeof CreateReportRequestReason] + +export const CreateReportRequestReason = { + SPAM: 'SPAM', + HATE_SPEECH: 'HATE_SPEECH', + MISINFORMATION: 'MISINFORMATION', + HARASSMENT: 'HARASSMENT', + EXPLICIT_CONTENT: 'EXPLICIT_CONTENT', + OTHER: 'OTHER', +} as const diff --git a/src/api/models/createReportRequestTargetType.ts b/src/api/models/createReportRequestTargetType.ts new file mode 100644 index 0000000..7133374 --- /dev/null +++ b/src/api/models/createReportRequestTargetType.ts @@ -0,0 +1,22 @@ +/** + * Generated by orval v8.11.0 🍺 + * Do not edit manually. + * Stone Inscription API + * REST API for OAuth authentication, user profiles, inscription posts, images, public dashboard metrics, and moderation reports. + +Most JSON endpoints return a standard envelope with `message`, `http-status`, and `data`. Protected endpoints use a JWT bearer token in the `Authorization` header. + + * OpenAPI spec version: v1 + */ + +/** + * Type of resource being reported. + */ +export type CreateReportRequestTargetType = + (typeof CreateReportRequestTargetType)[keyof typeof CreateReportRequestTargetType] + +export const CreateReportRequestTargetType = { + POST: 'POST', + COMMENT: 'COMMENT', + USER: 'USER', +} as const diff --git a/src/api/models/dashboardCountsResponse.ts b/src/api/models/dashboardCountsResponse.ts new file mode 100644 index 0000000..faa512f --- /dev/null +++ b/src/api/models/dashboardCountsResponse.ts @@ -0,0 +1,26 @@ +/** + * Generated by orval v8.11.0 🍺 + * Do not edit manually. + * Stone Inscription API + * REST API for OAuth authentication, user profiles, inscription posts, images, public dashboard metrics, and moderation reports. + +Most JSON endpoints return a standard envelope with `message`, `http-status`, and `data`. Protected endpoints use a JWT bearer token in the `Authorization` header. + + * OpenAPI spec version: v1 + */ + +/** + * Public aggregate counters for the application dashboard. + */ +export interface DashboardCountsResponse { + /** Posts with extracted geolocation metadata. */ + totalGeoTaggedPosts?: number + /** Uploaded image objects. */ + totalImages?: number + /** Published posts. */ + totalPosts?: number + /** Posts with an English translation available. */ + totalTranslations?: number + /** Registered users. */ + totalUsers?: number +} diff --git a/src/api/models/deleteImagesFromPostParams.ts b/src/api/models/deleteImagesFromPostParams.ts new file mode 100644 index 0000000..decbd94 --- /dev/null +++ b/src/api/models/deleteImagesFromPostParams.ts @@ -0,0 +1,21 @@ +/** + * Generated by orval v8.11.0 🍺 + * Do not edit manually. + * Stone Inscription API + * REST API for OAuth authentication, user profiles, inscription posts, images, public dashboard metrics, and moderation reports. + +Most JSON endpoints return a standard envelope with `message`, `http-status`, and `data`. Protected endpoints use a JWT bearer token in the `Authorization` header. + + * OpenAPI spec version: v1 + */ + +export type DeleteImagesFromPostParams = { + /** + * Post id. + */ + postId: string + /** + * Image ids to delete. + */ + deletedImageIds: string[] +} diff --git a/src/api/models/descriptionDeleteParams.ts b/src/api/models/descriptionDeleteParams.ts new file mode 100644 index 0000000..4ca2da6 --- /dev/null +++ b/src/api/models/descriptionDeleteParams.ts @@ -0,0 +1,17 @@ +/** + * Generated by orval v8.11.0 🍺 + * Do not edit manually. + * Stone Inscription API + * REST API for OAuth authentication, user profiles, inscription posts, images, public dashboard metrics, and moderation reports. + +Most JSON endpoints return a standard envelope with `message`, `http-status`, and `data`. Protected endpoints use a JWT bearer token in the `Authorization` header. + + * OpenAPI spec version: v1 + */ + +export type DescriptionDeleteParams = { + /** + * Description id. + */ + descriptionId: string +} diff --git a/src/api/models/getMethodNameParams.ts b/src/api/models/getMethodNameParams.ts new file mode 100644 index 0000000..1586c10 --- /dev/null +++ b/src/api/models/getMethodNameParams.ts @@ -0,0 +1,17 @@ +/** + * Generated by orval v8.11.0 🍺 + * Do not edit manually. + * Stone Inscription API + * REST API for OAuth authentication, user profiles, inscription posts, images, public dashboard metrics, and moderation reports. + +Most JSON endpoints return a standard envelope with `message`, `http-status`, and `data`. Protected endpoints use a JWT bearer token in the `Authorization` header. + + * OpenAPI spec version: v1 + */ + +export type GetMethodNameParams = { + /** + * Echo parameter placeholder. + */ + param: string +} diff --git a/src/api/models/getPostDiscriptionParams.ts b/src/api/models/getPostDiscriptionParams.ts new file mode 100644 index 0000000..ed0dbec --- /dev/null +++ b/src/api/models/getPostDiscriptionParams.ts @@ -0,0 +1,17 @@ +/** + * Generated by orval v8.11.0 🍺 + * Do not edit manually. + * Stone Inscription API + * REST API for OAuth authentication, user profiles, inscription posts, images, public dashboard metrics, and moderation reports. + +Most JSON endpoints return a standard envelope with `message`, `http-status`, and `data`. Protected endpoints use a JWT bearer token in the `Authorization` header. + + * OpenAPI spec version: v1 + */ + +export type GetPostDiscriptionParams = { + /** + * Post id. + */ + postId: string +} diff --git a/src/api/models/getReportsParams.ts b/src/api/models/getReportsParams.ts new file mode 100644 index 0000000..b2bf10f --- /dev/null +++ b/src/api/models/getReportsParams.ts @@ -0,0 +1,18 @@ +/** + * Generated by orval v8.11.0 🍺 + * Do not edit manually. + * Stone Inscription API + * REST API for OAuth authentication, user profiles, inscription posts, images, public dashboard metrics, and moderation reports. + +Most JSON endpoints return a standard envelope with `message`, `http-status`, and `data`. Protected endpoints use a JWT bearer token in the `Authorization` header. + + * OpenAPI spec version: v1 + */ +import type { GetReportsStatus } from './getReportsStatus' + +export type GetReportsParams = { + /** + * Optional report status filter. + */ + status?: GetReportsStatus +} diff --git a/src/api/models/getReportsStatus.ts b/src/api/models/getReportsStatus.ts new file mode 100644 index 0000000..2529fd0 --- /dev/null +++ b/src/api/models/getReportsStatus.ts @@ -0,0 +1,19 @@ +/** + * Generated by orval v8.11.0 🍺 + * Do not edit manually. + * Stone Inscription API + * REST API for OAuth authentication, user profiles, inscription posts, images, public dashboard metrics, and moderation reports. + +Most JSON endpoints return a standard envelope with `message`, `http-status`, and `data`. Protected endpoints use a JWT bearer token in the `Authorization` header. + + * OpenAPI spec version: v1 + */ + +export type GetReportsStatus = (typeof GetReportsStatus)[keyof typeof GetReportsStatus] + +export const GetReportsStatus = { + PENDING: 'PENDING', + AI_SCREENING: 'AI_SCREENING', + ESCALATED: 'ESCALATED', + RESOLVED: 'RESOLVED', +} as const diff --git a/src/api/models/index.ts b/src/api/models/index.ts new file mode 100644 index 0000000..566602f --- /dev/null +++ b/src/api/models/index.ts @@ -0,0 +1,52 @@ +/** + * Generated by orval v8.11.0 🍺 + * Do not edit manually. + * Stone Inscription API + * REST API for OAuth authentication, user profiles, inscription posts, images, public dashboard metrics, and moderation reports. + +Most JSON endpoints return a standard envelope with `message`, `http-status`, and `data`. Protected endpoints use a JWT bearer token in the `Authorization` header. + + * OpenAPI spec version: v1 + */ + +export * from './accessTokenResponse' +export * from './addImagesToPostBody' +export * from './addImagesToPostParams' +export * from './addPoastDiscriptionParams' +export * from './addPostWithFileBody' +export * from './addRatingParams' +export * from './addVoteParams' +export * from './apiErrorResponse' +export * from './apiSuccessResponse' +export * from './approveAdminRequestParams' +export * from './createReportRequest' +export * from './createReportRequestReason' +export * from './createReportRequestTargetType' +export * from './dashboardCountsResponse' +export * from './deleteImagesFromPostParams' +export * from './descriptionDeleteParams' +export * from './getMethodNameParams' +export * from './getPostDiscriptionParams' +export * from './getReportsParams' +export * from './getReportsStatus' +export * from './inscriptionPost' +export * from './inscriptionPostDescription' +export * from './moderateReportRequest' +export * from './moderateReportRequestAction' +export * from './moderationReport' +export * from './moderationReportActionTaken' +export * from './moderationReportReason' +export * from './moderationReportStatus' +export * from './moderationReportTargetType' +export * from './objectId' +export * from './postDeleteParams' +export * from './reportAuditEntry' +export * from './reportQueuedResponse' +export * from './updateLastActive204' +export * from './updatePostBody' +export * from './updatePostDiscriptionParams' +export * from './updatePostParams' +export * from './updateProfileRequest' +export * from './uploadCoverImageBody' +export * from './uploadProfileImageBody' +export * from './userProfile' diff --git a/src/api/models/inscriptionPost.ts b/src/api/models/inscriptionPost.ts new file mode 100644 index 0000000..8c369ca --- /dev/null +++ b/src/api/models/inscriptionPost.ts @@ -0,0 +1,26 @@ +/** + * Generated by orval v8.11.0 🍺 + * Do not edit manually. + * Stone Inscription API + * REST API for OAuth authentication, user profiles, inscription posts, images, public dashboard metrics, and moderation reports. + +Most JSON endpoints return a standard envelope with `message`, `http-status`, and `data`. Protected endpoints use a JWT bearer token in the `Authorization` header. + + * OpenAPI spec version: v1 + */ +import type { InscriptionPostDescription } from './inscriptionPostDescription' + +/** + * Post metadata JSON part. + */ +export interface InscriptionPost { + /** Localized inscription description and language metadata. */ + description?: InscriptionPostDescription + script?: unknown[] + /** High-level post topic. */ + topic?: string + /** Content type or category. */ + type?: string + /** Whether the post should be visible publicly. Field name preserves the existing API spelling. */ + visiblity?: boolean +} diff --git a/src/api/models/inscriptionPostDescription.ts b/src/api/models/inscriptionPostDescription.ts new file mode 100644 index 0000000..48f0100 --- /dev/null +++ b/src/api/models/inscriptionPostDescription.ts @@ -0,0 +1,24 @@ +/** + * Generated by orval v8.11.0 🍺 + * Do not edit manually. + * Stone Inscription API + * REST API for OAuth authentication, user profiles, inscription posts, images, public dashboard metrics, and moderation reports. + +Most JSON endpoints return a standard envelope with `message`, `http-status`, and `data`. Protected endpoints use a JWT bearer token in the `Authorization` header. + + * OpenAPI spec version: v1 + */ + +/** + * Human-readable inscription description payload. + */ +export interface InscriptionPostDescription { + /** Detailed inscription description. */ + description?: string + language?: unknown[] + scriptLanguage?: unknown[] + /** Primary subject of the inscription. */ + subject?: string + /** Display title for the inscription. */ + title?: string +} diff --git a/src/api/models/moderateReportRequest.ts b/src/api/models/moderateReportRequest.ts new file mode 100644 index 0000000..7a004bc --- /dev/null +++ b/src/api/models/moderateReportRequest.ts @@ -0,0 +1,25 @@ +/** + * Generated by orval v8.11.0 🍺 + * Do not edit manually. + * Stone Inscription API + * REST API for OAuth authentication, user profiles, inscription posts, images, public dashboard metrics, and moderation reports. + +Most JSON endpoints return a standard envelope with `message`, `http-status`, and `data`. Protected endpoints use a JWT bearer token in the `Authorization` header. + + * OpenAPI spec version: v1 + */ +import type { ModerateReportRequestAction } from './moderateReportRequestAction' + +/** + * Optional instruction supplied by a moderator when processing a report. + */ +export interface ModerateReportRequest { + /** Moderation action to apply. If omitted, the moderation chain decides the next transition. */ + action?: ModerateReportRequestAction + /** + * Moderator note saved in the report audit trail. Maximum 1000 characters. + * @minLength 0 + * @maxLength 1000 + */ + note?: string +} diff --git a/src/api/models/moderateReportRequestAction.ts b/src/api/models/moderateReportRequestAction.ts new file mode 100644 index 0000000..1e10f27 --- /dev/null +++ b/src/api/models/moderateReportRequestAction.ts @@ -0,0 +1,26 @@ +/** + * Generated by orval v8.11.0 🍺 + * Do not edit manually. + * Stone Inscription API + * REST API for OAuth authentication, user profiles, inscription posts, images, public dashboard metrics, and moderation reports. + +Most JSON endpoints return a standard envelope with `message`, `http-status`, and `data`. Protected endpoints use a JWT bearer token in the `Authorization` header. + + * OpenAPI spec version: v1 + */ + +/** + * Moderation action to apply. If omitted, the moderation chain decides the next transition. + */ +export type ModerateReportRequestAction = + (typeof ModerateReportRequestAction)[keyof typeof ModerateReportRequestAction] + +export const ModerateReportRequestAction = { + NONE: 'NONE', + WARN: 'WARN', + REMOVE_CONTENT: 'REMOVE_CONTENT', + BAN_REPORTER: 'BAN_REPORTER', + BAN_AUTHOR: 'BAN_AUTHOR', + ESCALATE: 'ESCALATE', + DISMISS: 'DISMISS', +} as const diff --git a/src/api/models/moderationReport.ts b/src/api/models/moderationReport.ts new file mode 100644 index 0000000..cdcc586 --- /dev/null +++ b/src/api/models/moderationReport.ts @@ -0,0 +1,50 @@ +/** + * Generated by orval v8.11.0 🍺 + * Do not edit manually. + * Stone Inscription API + * REST API for OAuth authentication, user profiles, inscription posts, images, public dashboard metrics, and moderation reports. + +Most JSON endpoints return a standard envelope with `message`, `http-status`, and `data`. Protected endpoints use a JWT bearer token in the `Authorization` header. + + * OpenAPI spec version: v1 + */ +import type { ModerationReportActionTaken } from './moderationReportActionTaken' +import type { ModerationReportReason } from './moderationReportReason' +import type { ModerationReportStatus } from './moderationReportStatus' +import type { ModerationReportTargetType } from './moderationReportTargetType' +import type { ObjectId } from './objectId' +import type { ReportAuditEntry } from './reportAuditEntry' + +/** + * Moderation report state, target metadata, AI score, and audit history. + */ +export interface ModerationReport { + /** Report identifier. */ + _id?: ObjectId + /** Action applied during moderation. */ + actionTaken?: ModerationReportActionTaken + activeReportKey?: string + /** AI confidence score from 0 to 1. */ + aiConfidenceScore?: number + auditEntries?: ReportAuditEntry[] + createdAt?: string + /** Reporter-provided details. */ + details?: string + /** Reporter-selected reason. */ + reason?: ModerationReportReason + /** Reporter user id. */ + reporterId?: string + resolvedAt?: string + /** Actor that resolved the report. */ + resolvedBy?: string + /** Current moderation workflow status. */ + status?: ModerationReportStatus + /** Author id of the reported target. */ + targetAuthorId?: string + /** Reported target id. */ + targetId?: string + /** Reported target type. */ + targetType?: ModerationReportTargetType + updatedAt?: string + version?: number +} diff --git a/src/api/models/moderationReportActionTaken.ts b/src/api/models/moderationReportActionTaken.ts new file mode 100644 index 0000000..d0f4a74 --- /dev/null +++ b/src/api/models/moderationReportActionTaken.ts @@ -0,0 +1,26 @@ +/** + * Generated by orval v8.11.0 🍺 + * Do not edit manually. + * Stone Inscription API + * REST API for OAuth authentication, user profiles, inscription posts, images, public dashboard metrics, and moderation reports. + +Most JSON endpoints return a standard envelope with `message`, `http-status`, and `data`. Protected endpoints use a JWT bearer token in the `Authorization` header. + + * OpenAPI spec version: v1 + */ + +/** + * Action applied during moderation. + */ +export type ModerationReportActionTaken = + (typeof ModerationReportActionTaken)[keyof typeof ModerationReportActionTaken] + +export const ModerationReportActionTaken = { + NONE: 'NONE', + WARN: 'WARN', + REMOVE_CONTENT: 'REMOVE_CONTENT', + BAN_REPORTER: 'BAN_REPORTER', + BAN_AUTHOR: 'BAN_AUTHOR', + ESCALATE: 'ESCALATE', + DISMISS: 'DISMISS', +} as const diff --git a/src/api/models/moderationReportReason.ts b/src/api/models/moderationReportReason.ts new file mode 100644 index 0000000..127a805 --- /dev/null +++ b/src/api/models/moderationReportReason.ts @@ -0,0 +1,25 @@ +/** + * Generated by orval v8.11.0 🍺 + * Do not edit manually. + * Stone Inscription API + * REST API for OAuth authentication, user profiles, inscription posts, images, public dashboard metrics, and moderation reports. + +Most JSON endpoints return a standard envelope with `message`, `http-status`, and `data`. Protected endpoints use a JWT bearer token in the `Authorization` header. + + * OpenAPI spec version: v1 + */ + +/** + * Reporter-selected reason. + */ +export type ModerationReportReason = + (typeof ModerationReportReason)[keyof typeof ModerationReportReason] + +export const ModerationReportReason = { + SPAM: 'SPAM', + HATE_SPEECH: 'HATE_SPEECH', + MISINFORMATION: 'MISINFORMATION', + HARASSMENT: 'HARASSMENT', + EXPLICIT_CONTENT: 'EXPLICIT_CONTENT', + OTHER: 'OTHER', +} as const diff --git a/src/api/models/moderationReportStatus.ts b/src/api/models/moderationReportStatus.ts new file mode 100644 index 0000000..8017a60 --- /dev/null +++ b/src/api/models/moderationReportStatus.ts @@ -0,0 +1,23 @@ +/** + * Generated by orval v8.11.0 🍺 + * Do not edit manually. + * Stone Inscription API + * REST API for OAuth authentication, user profiles, inscription posts, images, public dashboard metrics, and moderation reports. + +Most JSON endpoints return a standard envelope with `message`, `http-status`, and `data`. Protected endpoints use a JWT bearer token in the `Authorization` header. + + * OpenAPI spec version: v1 + */ + +/** + * Current moderation workflow status. + */ +export type ModerationReportStatus = + (typeof ModerationReportStatus)[keyof typeof ModerationReportStatus] + +export const ModerationReportStatus = { + PENDING: 'PENDING', + AI_SCREENING: 'AI_SCREENING', + ESCALATED: 'ESCALATED', + RESOLVED: 'RESOLVED', +} as const diff --git a/src/api/models/moderationReportTargetType.ts b/src/api/models/moderationReportTargetType.ts new file mode 100644 index 0000000..e25ed28 --- /dev/null +++ b/src/api/models/moderationReportTargetType.ts @@ -0,0 +1,22 @@ +/** + * Generated by orval v8.11.0 🍺 + * Do not edit manually. + * Stone Inscription API + * REST API for OAuth authentication, user profiles, inscription posts, images, public dashboard metrics, and moderation reports. + +Most JSON endpoints return a standard envelope with `message`, `http-status`, and `data`. Protected endpoints use a JWT bearer token in the `Authorization` header. + + * OpenAPI spec version: v1 + */ + +/** + * Reported target type. + */ +export type ModerationReportTargetType = + (typeof ModerationReportTargetType)[keyof typeof ModerationReportTargetType] + +export const ModerationReportTargetType = { + POST: 'POST', + COMMENT: 'COMMENT', + USER: 'USER', +} as const diff --git a/src/api/models/objectId.ts b/src/api/models/objectId.ts new file mode 100644 index 0000000..148623e --- /dev/null +++ b/src/api/models/objectId.ts @@ -0,0 +1,15 @@ +/** + * Generated by orval v8.11.0 🍺 + * Do not edit manually. + * Stone Inscription API + * REST API for OAuth authentication, user profiles, inscription posts, images, public dashboard metrics, and moderation reports. + +Most JSON endpoints return a standard envelope with `message`, `http-status`, and `data`. Protected endpoints use a JWT bearer token in the `Authorization` header. + + * OpenAPI spec version: v1 + */ + +export interface ObjectId { + date?: string + timestamp?: number +} diff --git a/src/api/models/postDeleteParams.ts b/src/api/models/postDeleteParams.ts new file mode 100644 index 0000000..88b80c3 --- /dev/null +++ b/src/api/models/postDeleteParams.ts @@ -0,0 +1,17 @@ +/** + * Generated by orval v8.11.0 🍺 + * Do not edit manually. + * Stone Inscription API + * REST API for OAuth authentication, user profiles, inscription posts, images, public dashboard metrics, and moderation reports. + +Most JSON endpoints return a standard envelope with `message`, `http-status`, and `data`. Protected endpoints use a JWT bearer token in the `Authorization` header. + + * OpenAPI spec version: v1 + */ + +export type PostDeleteParams = { + /** + * Post id. + */ + postId: string +} diff --git a/src/api/models/reportAuditEntry.ts b/src/api/models/reportAuditEntry.ts new file mode 100644 index 0000000..8cdc6b3 --- /dev/null +++ b/src/api/models/reportAuditEntry.ts @@ -0,0 +1,22 @@ +/** + * Generated by orval v8.11.0 🍺 + * Do not edit manually. + * Stone Inscription API + * REST API for OAuth authentication, user profiles, inscription posts, images, public dashboard metrics, and moderation reports. + +Most JSON endpoints return a standard envelope with `message`, `http-status`, and `data`. Protected endpoints use a JWT bearer token in the `Authorization` header. + + * OpenAPI spec version: v1 + */ + +/** + * Single audit trail entry recorded during report moderation. + */ +export interface ReportAuditEntry { + /** Actor email or system actor name. */ + actor?: string + /** Audit creation timestamp. */ + createdAt?: string + /** Audit message. */ + message?: string +} diff --git a/src/api/models/reportQueuedResponse.ts b/src/api/models/reportQueuedResponse.ts new file mode 100644 index 0000000..b93574a --- /dev/null +++ b/src/api/models/reportQueuedResponse.ts @@ -0,0 +1,24 @@ +/** + * Generated by orval v8.11.0 🍺 + * Do not edit manually. + * Stone Inscription API + * REST API for OAuth authentication, user profiles, inscription posts, images, public dashboard metrics, and moderation reports. + +Most JSON endpoints return a standard envelope with `message`, `http-status`, and `data`. Protected endpoints use a JWT bearer token in the `Authorization` header. + + * OpenAPI spec version: v1 + */ + +/** + * Payload returned after a report is accepted for asynchronous moderation. + */ +export interface ReportQueuedResponse { + /** Published report event identifier. */ + eventId?: string + /** Queue processing state. */ + status?: string + /** Identifier of the reported content or user. */ + targetId?: string + /** Reported resource type. */ + targetType?: string +} diff --git a/src/api/models/updateLastActive204.ts b/src/api/models/updateLastActive204.ts new file mode 100644 index 0000000..e76987d --- /dev/null +++ b/src/api/models/updateLastActive204.ts @@ -0,0 +1,12 @@ +/** + * Generated by orval v8.11.0 🍺 + * Do not edit manually. + * Stone Inscription API + * REST API for OAuth authentication, user profiles, inscription posts, images, public dashboard metrics, and moderation reports. + +Most JSON endpoints return a standard envelope with `message`, `http-status`, and `data`. Protected endpoints use a JWT bearer token in the `Authorization` header. + + * OpenAPI spec version: v1 + */ + +export type UpdateLastActive204 = { [key: string]: unknown } diff --git a/src/api/models/updatePostBody.ts b/src/api/models/updatePostBody.ts new file mode 100644 index 0000000..4e2cf50 --- /dev/null +++ b/src/api/models/updatePostBody.ts @@ -0,0 +1,17 @@ +/** + * Generated by orval v8.11.0 🍺 + * Do not edit manually. + * Stone Inscription API + * REST API for OAuth authentication, user profiles, inscription posts, images, public dashboard metrics, and moderation reports. + +Most JSON endpoints return a standard envelope with `message`, `http-status`, and `data`. Protected endpoints use a JWT bearer token in the `Authorization` header. + + * OpenAPI spec version: v1 + */ +import type { InscriptionPost } from './inscriptionPost' + +export type UpdatePostBody = { + /** New image files to add. */ + files?: Blob[] + post?: InscriptionPost +} diff --git a/src/api/models/updatePostDiscriptionParams.ts b/src/api/models/updatePostDiscriptionParams.ts new file mode 100644 index 0000000..07ce266 --- /dev/null +++ b/src/api/models/updatePostDiscriptionParams.ts @@ -0,0 +1,21 @@ +/** + * Generated by orval v8.11.0 🍺 + * Do not edit manually. + * Stone Inscription API + * REST API for OAuth authentication, user profiles, inscription posts, images, public dashboard metrics, and moderation reports. + +Most JSON endpoints return a standard envelope with `message`, `http-status`, and `data`. Protected endpoints use a JWT bearer token in the `Authorization` header. + + * OpenAPI spec version: v1 + */ + +export type UpdatePostDiscriptionParams = { + /** + * Description id. + */ + discriptionId: string + /** + * Updated description text. + */ + discription: string +} diff --git a/src/api/models/updatePostParams.ts b/src/api/models/updatePostParams.ts new file mode 100644 index 0000000..89410bd --- /dev/null +++ b/src/api/models/updatePostParams.ts @@ -0,0 +1,21 @@ +/** + * Generated by orval v8.11.0 🍺 + * Do not edit manually. + * Stone Inscription API + * REST API for OAuth authentication, user profiles, inscription posts, images, public dashboard metrics, and moderation reports. + +Most JSON endpoints return a standard envelope with `message`, `http-status`, and `data`. Protected endpoints use a JWT bearer token in the `Authorization` header. + + * OpenAPI spec version: v1 + */ + +export type UpdatePostParams = { + /** + * Post id. + */ + postId: string + /** + * Image ids to remove from the post. + */ + deletedImageIds?: string[] +} diff --git a/src/api/models/updateProfileRequest.ts b/src/api/models/updateProfileRequest.ts new file mode 100644 index 0000000..f78bec4 --- /dev/null +++ b/src/api/models/updateProfileRequest.ts @@ -0,0 +1,29 @@ +/** + * Generated by orval v8.11.0 🍺 + * Do not edit manually. + * Stone Inscription API + * REST API for OAuth authentication, user profiles, inscription posts, images, public dashboard metrics, and moderation reports. + +Most JSON endpoints return a standard envelope with `message`, `http-status`, and `data`. Protected endpoints use a JWT bearer token in the `Authorization` header. + + * OpenAPI spec version: v1 + */ + +/** + * Editable profile fields for the authenticated user. + */ +export interface UpdateProfileRequest { + /** + * Short profile bio. Letters, numbers, and spaces only. + * @minLength 3 + * @maxLength 150 + * @pattern ^(?=.*[A-Za-z0-9])[A-Za-z0-9 ]+$ + */ + bio?: string + /** + * Unique username. Submit only when changing it. + * @minLength 3 + * @maxLength 25 + */ + username?: string +} diff --git a/src/api/models/uploadCoverImageBody.ts b/src/api/models/uploadCoverImageBody.ts new file mode 100644 index 0000000..9839da2 --- /dev/null +++ b/src/api/models/uploadCoverImageBody.ts @@ -0,0 +1,15 @@ +/** + * Generated by orval v8.11.0 🍺 + * Do not edit manually. + * Stone Inscription API + * REST API for OAuth authentication, user profiles, inscription posts, images, public dashboard metrics, and moderation reports. + +Most JSON endpoints return a standard envelope with `message`, `http-status`, and `data`. Protected endpoints use a JWT bearer token in the `Authorization` header. + + * OpenAPI spec version: v1 + */ + +export type UploadCoverImageBody = { + /** Cover image file. Allowed extensions come from `file.extn`. */ + file: Blob +} diff --git a/src/api/models/uploadProfileImageBody.ts b/src/api/models/uploadProfileImageBody.ts new file mode 100644 index 0000000..e9639b6 --- /dev/null +++ b/src/api/models/uploadProfileImageBody.ts @@ -0,0 +1,15 @@ +/** + * Generated by orval v8.11.0 🍺 + * Do not edit manually. + * Stone Inscription API + * REST API for OAuth authentication, user profiles, inscription posts, images, public dashboard metrics, and moderation reports. + +Most JSON endpoints return a standard envelope with `message`, `http-status`, and `data`. Protected endpoints use a JWT bearer token in the `Authorization` header. + + * OpenAPI spec version: v1 + */ + +export type UploadProfileImageBody = { + /** Profile image file. Allowed extensions come from `file.extn`. */ + file: Blob +} diff --git a/src/api/models/userProfile.ts b/src/api/models/userProfile.ts new file mode 100644 index 0000000..31f860e --- /dev/null +++ b/src/api/models/userProfile.ts @@ -0,0 +1,38 @@ +/** + * Generated by orval v8.11.0 🍺 + * Do not edit manually. + * Stone Inscription API + * REST API for OAuth authentication, user profiles, inscription posts, images, public dashboard metrics, and moderation reports. + +Most JSON endpoints return a standard envelope with `message`, `http-status`, and `data`. Protected endpoints use a JWT bearer token in the `Authorization` header. + + * OpenAPI spec version: v1 + */ + +/** + * Profile details returned for the authenticated user. + */ +export interface UserProfile { + /** Short user bio. */ + bio?: string + /** Public cover image URL. */ + coverImage?: string + /** User email address. */ + email?: string + /** Follower count. */ + followers?: number + /** User identifier. */ + id?: string + /** Number of uploaded inscription images. */ + imagesUploaded?: number + /** OAuth provider display name. */ + name?: string + /** Reputation points. */ + points?: number + /** Public profile image URL. */ + profileImage?: string + /** Total upvotes received on user comments/descriptions. */ + upvotesReceived?: number + /** Application username. */ + username?: string +} diff --git a/src/utils/http/clients/coreBackend.client.ts b/src/utils/http/clients/coreBackend.client.ts index 1d36581..e9fbd55 100644 --- a/src/utils/http/clients/coreBackend.client.ts +++ b/src/utils/http/clients/coreBackend.client.ts @@ -1,14 +1,34 @@ +// src/utils/http/clients/coreBackend.client.ts +import type { AxiosRequestConfig } from 'axios' import { createAxiosClient } from '../axiosFactory' import { attachAuthToken } from '../interceptors/authRequest.interceptor' import { errorInterceptor } from '../interceptors/error.interceptor' import { refreshTokenInterceptor } from '../interceptors/refreshToken.interceptor' import { retryInterceptor } from '../interceptors/retry.interceptor' -const backendApiUrl = window._env_?.VITE_BACKEND_API_URL || import.meta.env.VITE_BACKEND_API_URL -// FOR CALLING BACKEND APIS WITH AUTHENTICATION AND RETRY LOGIC -export const coreBackendClient = createAxiosClient(backendApiUrl, [ +declare global { + interface Window { + _env_?: { + VITE_BACKEND_API_URL?: string + } + } +} + +const backendApiUrl = + (typeof window !== 'undefined' && window._env_?.VITE_BACKEND_API_URL) || + (typeof process !== 'undefined' && process.env.VITE_BACKEND_API_URL) || + '' + +// The Axios instance — used internally +const axiosInstance = createAxiosClient(backendApiUrl, [ attachAuthToken, refreshTokenInterceptor, retryInterceptor, errorInterceptor, ]) + +// ← This is what Orval needs — a callable function that wraps the instance +// Orval calls this for every generated API request +export const coreBackendClient = (config: AxiosRequestConfig): Promise => { + return axiosInstance(config).then((response) => response.data) +}