diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index d1a8c71..97a80cd 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -30,5 +30,8 @@ jobs: - name: Lint run: pnpm lint + - name: Typecheck + run: pnpm typecheck + - name: Test run: pnpm test diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f3d68ff..07c289b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,6 +24,9 @@ jobs: # https://github.com/docker/setup-qemu-action - name: Set up QEMU uses: docker/setup-qemu-action@v3 + with: + image: tonistiigi/binfmt:qemu-v8.1.5 # more recent + # https://github.com/docker/setup-buildx-action - name: Set up Docker Buildx id: buildx diff --git a/.gitignore b/.gitignore index 3bd4e07..6dfaca5 100644 --- a/.gitignore +++ b/.gitignore @@ -158,3 +158,4 @@ secrets.yml test*.json repos/ dockerrepos +.DS_Store diff --git a/Dockerfile b/Dockerfile index 281a115..02765e7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,5 @@ # https://github.com/nodejs/docker-node/blob/main/docs/BestPractices.md +# TODO because multiarch build has problems with QEMU and Node we cannot use alpine here: https://github.com/nodejs/docker-node/issues/1798 FROM node:22.9.0-slim AS base WORKDIR /app @@ -35,16 +36,10 @@ ENV SECRETS_LOCATION=/app/config/secrets.yml CMD [ "pnpm", "start" ] # https://github.com/evanw/esbuild/issues/1921 -# TODO not using alpine for now because different error messages for example for requests. -FROM node:22.9.0-slim AS prod +FROM node:22.9.0-alpine AS prod WORKDIR /app -#RUN apk add --no-cache libstdc++ dumb-init git - -RUN apt-get update && apt-get install -y \ - git \ - dumb-init \ - && rm -rf /var/lib/apt/lists/* +RUN apk add --no-cache libstdc++ dumb-init git # TODO maybe in future. Results in breaking change #USER node diff --git a/Dockerfile-deno.Dockerfile b/Dockerfile-deno.Dockerfile new file mode 100644 index 0000000..2822951 --- /dev/null +++ b/Dockerfile-deno.Dockerfile @@ -0,0 +1,69 @@ +# https://github.com/denoland/deno_docker/blob/main/example/Dockerfile + +FROM denoland/deno:alpine-2.0.0 AS base +WORKDIR /app + +RUN apk add --no-cache libstdc++ dumb-init git + +COPY package.json pnpm-lock.yaml ./ + +RUN deno install + +FROM base AS builder +COPY src src/ +COPY index.ts esbuild.ts ./ + +RUN deno --allow-env --allow-read --allow-run esbuild.ts + +FROM base AS dev +ENV CONFIG_LOCATION=/app/config/config.yml +ENV SECRETS_LOCATION=/app/config/secrets.yml +ENV DENO_DIR=/app/.deno_cache +# manually mount src etc + +CMD ["deno", "--allow-env", "--allow-read", "--allow-run", "--allow-net", "--allow-sys", "--unstable-sloppy-imports", "index.ts"] + +# https://github.com/evanw/esbuild/issues/1921 +FROM denoland/deno:alpine-2.0.0 AS prod +WORKDIR /app + +RUN apk add --no-cache libstdc++ dumb-init git + +# TODO maybe in future. Results in breaking change +#USER node + +COPY --from=builder /app/bundle.cjs /app/index.cjs + +ENV CONFIG_LOCATION=/app/config/config.yml +ENV SECRETS_LOCATION=/app/config/secrets.yml +ENV DENO_DIR=/app/.deno_cache + +# Compile cache / modify for multi-user +RUN deno cache --unstable-sloppy-imports index.cjs || true +RUN chmod uga+rw -R ${DENO_DIR} + +# Not sure about those options +#--cached-only +#--no-code-cache + +# TODO not sure about this +# Run with dumb-init to not start node with PID=1, since Node.js was not designed to run as PID 1 +CMD ["dumb-init", "deno", "--allow-env", "--allow-read", "--allow-run", "--allow-net", "--allow-sys", "--unstable-sloppy-imports", "index.cjs"] + + +# BUN Sample +# FROM oven/bun:1.1.30-alpine AS prod +# WORKDIR /app + +# RUN apk add --no-cache libstdc++ dumb-init git + +# # TODO maybe in future. Results in breaking change +# #USER node + +# COPY --from=builder /app/bundle.cjs /app/index.cjs + +# ENV CONFIG_LOCATION=/app/config/config.yml +# ENV SECRETS_LOCATION=/app/config/secrets.yml + +# # Run with dumb-init to not start node with PID=1, since Node.js was not designed to run as PID 1 +# CMD ["dumb-init", "bun", "index.cjs"] diff --git a/generate-api.js b/generate-api.js index b370fe1..91f2b92 100644 --- a/generate-api.js +++ b/generate-api.js @@ -1,22 +1,36 @@ -import path from "path"; +import { unlinkSync } from "node:fs"; +import path from "node:path"; import { generateApi } from "swagger-typescript-api"; const PATH_TO_OUTPUT_DIR = path.resolve(process.cwd(), "./src/__generated__"); +const PATH_SONARR_DIR = path.resolve(PATH_TO_OUTPUT_DIR, "sonarr"); +const PATH_RADARR_DIR = path.resolve(PATH_TO_OUTPUT_DIR, "radarr"); const main = async () => { await generateApi({ - name: "generated-sonarr-api.ts", - output: PATH_TO_OUTPUT_DIR, + output: PATH_SONARR_DIR, url: "https://raw.githubusercontent.com/Sonarr/Sonarr/develop/src/Sonarr.Api.V3/openapi.json", - httpClientType: "axios", + modular: true, + singleHttpClient: true, + // little hack to have one single client (we are deleting the weird created file for the http-client) + fileNames: { + httpClient: "../ky-client", + }, }); await generateApi({ - name: "generated-radarr-api.ts", - output: PATH_TO_OUTPUT_DIR, + output: PATH_RADARR_DIR, url: "https://raw.githubusercontent.com/Radarr/Radarr/develop/src/Radarr.Api.V3/openapi.json", - httpClientType: "axios", + modular: true, + singleHttpClient: true, + // little hack to have one single client (we are deleting the weird created file for the http-client) + fileNames: { + httpClient: "../ky-client", + }, }); + + unlinkSync(path.resolve(PATH_SONARR_DIR, "..ts")); + unlinkSync(path.resolve(PATH_RADARR_DIR, "..ts")); }; main(); diff --git a/index.ts b/index.ts index b649282..70fe1e8 100644 --- a/index.ts +++ b/index.ts @@ -1,7 +1,7 @@ import "dotenv/config"; import fs from "node:fs"; -import { CustomFormatResource } from "./src/__generated__/generated-sonarr-api"; +import { MergedCustomFormatResource } from "./src/__generated__/mergedTypes"; import { configureRadarrApi, configureSonarrApi, getArrApi, unsetApi } from "./src/api"; import { getConfig } from "./src/config"; import { @@ -117,7 +117,7 @@ const pipeline = async (value: ConfigArrInstance, arrType: ArrType) => { const serverCFMapping = serverCFs.reduce((p, c) => { p.set(c.name!, c); return p; - }, new Map()); + }, new Map()); await manageCf(mergedCFs, serverCFMapping, idsToManage); logger.info(`CustomFormats synchronized`); @@ -206,8 +206,8 @@ const pipeline = async (value: ConfigArrInstance, arrType: ArrType) => { if (!IS_DRY_RUN) { for (const element of create) { try { - const newProfile = await api.v3QualityprofileCreate(element as any); // Ignore types - logger.info(`Created QualityProfile: ${newProfile.data.name}`); + const newProfile = await api.v3QualityprofileCreate(element as any).json(); // Ignore types + logger.info(`Created QualityProfile: ${newProfile.name}`); } catch (error: any) { let message; @@ -232,8 +232,8 @@ const pipeline = async (value: ConfigArrInstance, arrType: ArrType) => { for (const element of changedQPs) { try { - const newProfile = await api.v3QualityprofileUpdate("" + element.id, element as any); // Ignore types - logger.info(`Updated QualityProfile: ${newProfile.data.name}`); + const newProfile = await api.v3QualityprofileUpdate("" + element.id, element as any).json(); // Ignore types + logger.info(`Updated QualityProfile: ${newProfile.name}`); } catch (error: any) { let message; diff --git a/package.json b/package.json index cdbdd52..d1ebd4b 100644 --- a/package.json +++ b/package.json @@ -15,8 +15,8 @@ "author": "", "license": "ISC", "dependencies": { - "axios": "1.7.7", "dotenv": "16.4.5", + "ky": "1.7.2", "node-ts": "6.1.3", "pino": "9.4.0", "pino-pretty": "11.2.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index da8b47a..87adc6c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,12 +8,12 @@ importers: .: dependencies: - axios: - specifier: 1.7.7 - version: 1.7.7 dotenv: specifier: 16.4.5 version: 16.4.5 + ky: + specifier: 1.7.2 + version: 1.7.2 node-ts: specifier: 6.1.3 version: 6.1.3 @@ -730,16 +730,10 @@ packages: resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==} engines: {node: '>=12'} - asynckit@0.4.0: - resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} - atomic-sleep@1.0.0: resolution: {integrity: sha512-kNOjDqAh7px0XWNI+4QbzoiR/nTkHAWNud2uvnJquD1/x5a7EQZMJT0AczqK0Qn67oY/TTQ1LbUKajZpp3I9tQ==} engines: {node: '>=8.0.0'} - axios@1.7.7: - resolution: {integrity: sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q==} - balanced-match@1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} @@ -795,10 +789,6 @@ packages: colorette@2.0.20: resolution: {integrity: sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==} - combined-stream@1.0.8: - resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==} - engines: {node: '>= 0.8'} - consola@3.2.3: resolution: {integrity: sha512-I5qxpzLv+sJhTVEoLYNcTW+bThDCPsit0vLNKShZx6rLtpilNpmmeTPaeqJb9ZE9dV3DGaeby6Vuhrw38WjeyQ==} engines: {node: ^14.18.0 || >=16.10.0} @@ -832,10 +822,6 @@ packages: resolution: {integrity: sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==} engines: {node: '>=6'} - delayed-stream@1.0.0: - resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} - engines: {node: '>=0.4.0'} - didyoumean@1.2.2: resolution: {integrity: sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==} @@ -913,23 +899,10 @@ packages: fast-safe-stringify@2.1.1: resolution: {integrity: sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==} - follow-redirects@1.15.6: - resolution: {integrity: sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==} - engines: {node: '>=4.0'} - peerDependencies: - debug: '*' - peerDependenciesMeta: - debug: - optional: true - foreground-child@3.2.1: resolution: {integrity: sha512-PXUUyLqrR2XCWICfv6ukppP96sdFwWbNEnfEMt7jNsISjMsvaLNinAHNDYyvkyU+SZG2BTSbT5NjG+vZslfGTA==} engines: {node: '>=14'} - form-data@4.0.0: - resolution: {integrity: sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==} - engines: {node: '>= 6'} - fsevents@2.3.2: resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} @@ -1021,6 +994,10 @@ packages: json-parse-even-better-errors@2.3.1: resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} + ky@1.7.2: + resolution: {integrity: sha512-OzIvbHKKDpi60TnF9t7UUVAF1B4mcqc02z5PIvrm08Wyb+yOcz63GRvEuVxNT18a9E1SrNouhB4W2NNLeD7Ykg==} + engines: {node: '>=18'} + lines-and-columns@1.2.4: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} @@ -1047,14 +1024,6 @@ packages: resolution: {integrity: sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==} engines: {node: '>=10'} - mime-db@1.52.0: - resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==} - engines: {node: '>= 0.6'} - - mime-types@2.1.35: - resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==} - engines: {node: '>= 0.6'} - minimatch@9.0.5: resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==} engines: {node: '>=16 || 14 >=14.17'} @@ -1186,9 +1155,6 @@ packages: resolution: {integrity: sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==} engines: {node: '>= 0.6.0'} - proxy-from-env@1.1.0: - resolution: {integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==} - pump@3.0.0: resolution: {integrity: sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==} @@ -1925,18 +1891,8 @@ snapshots: assertion-error@2.0.1: {} - asynckit@0.4.0: {} - atomic-sleep@1.0.0: {} - axios@1.7.7: - dependencies: - follow-redirects: 1.15.6 - form-data: 4.0.0 - proxy-from-env: 1.1.0 - transitivePeerDependencies: - - debug - balanced-match@1.0.2: {} base64-js@1.5.1: {} @@ -1992,10 +1948,6 @@ snapshots: colorette@2.0.20: {} - combined-stream@1.0.8: - dependencies: - delayed-stream: 1.0.0 - consola@3.2.3: {} cosmiconfig@9.0.0(typescript@5.5.4): @@ -2021,8 +1973,6 @@ snapshots: deep-eql@5.0.2: {} - delayed-stream@1.0.0: {} - didyoumean@1.2.2: {} dotenv@16.4.5: {} @@ -2145,19 +2095,11 @@ snapshots: fast-safe-stringify@2.1.1: {} - follow-redirects@1.15.6: {} - foreground-child@3.2.1: dependencies: cross-spawn: 7.0.3 signal-exit: 4.1.0 - form-data@4.0.0: - dependencies: - asynckit: 0.4.0 - combined-stream: 1.0.8 - mime-types: 2.1.35 - fsevents@2.3.2: optional: true @@ -2241,6 +2183,8 @@ snapshots: json-parse-even-better-errors@2.3.1: {} + ky@1.7.2: {} + lines-and-columns@1.2.4: {} lodash@4.17.21: {} @@ -2269,12 +2213,6 @@ snapshots: dependencies: semver: 7.6.0 - mime-db@1.52.0: {} - - mime-types@2.1.35: - dependencies: - mime-db: 1.52.0 - minimatch@9.0.5: dependencies: brace-expansion: 2.0.1 @@ -2425,8 +2363,6 @@ snapshots: process@0.11.10: {} - proxy-from-env@1.1.0: {} - pump@3.0.0: dependencies: end-of-stream: 1.4.4 diff --git a/src/__generated__/generated-radarr-api.ts b/src/__generated__/generated-radarr-api.ts deleted file mode 100644 index 3297733..0000000 --- a/src/__generated__/generated-radarr-api.ts +++ /dev/null @@ -1,6465 +0,0 @@ -/* eslint-disable */ -/* tslint:disable */ -/* - * --------------------------------------------------------------- - * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## - * ## ## - * ## AUTHOR: acacode ## - * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## - * --------------------------------------------------------------- - */ - -export enum AddMovieMethod { - Manual = "manual", - List = "list", - Collection = "collection", -} - -export interface AddMovieOptions { - ignoreEpisodesWithFiles?: boolean; - ignoreEpisodesWithoutFiles?: boolean; - monitor?: MonitorTypes; - searchForMovie?: boolean; - addMethod?: AddMovieMethod; -} - -export interface AlternativeTitleResource { - /** @format int32 */ - id?: number; - sourceType?: SourceType; - /** @format int32 */ - movieMetadataId?: number; - title?: string | null; - cleanTitle?: string | null; -} - -export interface ApiInfoResource { - current?: string | null; - deprecated?: string[] | null; -} - -export enum ApplyTags { - Add = "add", - Remove = "remove", - Replace = "replace", -} - -export enum AuthenticationRequiredType { - Enabled = "enabled", - DisabledForLocalAddresses = "disabledForLocalAddresses", -} - -export enum AuthenticationType { - None = "none", - Basic = "basic", - Forms = "forms", - External = "external", -} - -export interface AutoTaggingResource { - /** @format int32 */ - id?: number; - name?: string | null; - removeTagsAutomatically?: boolean; - /** @uniqueItems true */ - tags?: number[] | null; - specifications?: AutoTaggingSpecificationSchema[] | null; -} - -export interface AutoTaggingSpecificationSchema { - /** @format int32 */ - id?: number; - name?: string | null; - implementation?: string | null; - implementationName?: string | null; - negate?: boolean; - required?: boolean; - fields?: Field[] | null; -} - -export interface BackupResource { - /** @format int32 */ - id?: number; - name?: string | null; - path?: string | null; - type?: BackupType; - /** @format int64 */ - size?: number; - /** @format date-time */ - time?: string; -} - -export enum BackupType { - Scheduled = "scheduled", - Manual = "manual", - Update = "update", -} - -export interface BlocklistBulkResource { - ids?: number[] | null; -} - -export interface BlocklistResource { - /** @format int32 */ - id?: number; - /** @format int32 */ - movieId?: number; - sourceTitle?: string | null; - languages?: Language[] | null; - quality?: QualityModel; - customFormats?: CustomFormatResource[] | null; - /** @format date-time */ - date?: string; - protocol?: DownloadProtocol; - indexer?: string | null; - message?: string | null; - movie?: MovieResource; -} - -export interface BlocklistResourcePagingResource { - /** @format int32 */ - page?: number; - /** @format int32 */ - pageSize?: number; - sortKey?: string | null; - sortDirection?: SortDirection; - /** @format int32 */ - totalRecords?: number; - records?: BlocklistResource[] | null; -} - -export enum CertificateValidationType { - Enabled = "enabled", - DisabledForLocalAddresses = "disabledForLocalAddresses", - Disabled = "disabled", -} - -export interface CollectionMovieResource { - /** @format int32 */ - tmdbId?: number; - imdbId?: string | null; - title?: string | null; - cleanTitle?: string | null; - sortTitle?: string | null; - status?: MovieStatusType; - overview?: string | null; - /** @format int32 */ - runtime?: number; - images?: MediaCover[] | null; - /** @format int32 */ - year?: number; - ratings?: Ratings; - genres?: string[] | null; - folder?: string | null; - isExisting?: boolean; - isExcluded?: boolean; -} - -export interface CollectionResource { - /** @format int32 */ - id?: number; - title?: string | null; - sortTitle?: string | null; - /** @format int32 */ - tmdbId?: number; - images?: MediaCover[] | null; - overview?: string | null; - monitored?: boolean; - rootFolderPath?: string | null; - /** @format int32 */ - qualityProfileId?: number; - searchOnAdd?: boolean; - minimumAvailability?: MovieStatusType; - movies?: CollectionMovieResource[] | null; - /** @format int32 */ - missingMovies?: number; - /** @uniqueItems true */ - tags?: number[] | null; -} - -export interface CollectionUpdateResource { - collectionIds?: number[] | null; - monitored?: boolean | null; - monitorMovies?: boolean | null; - searchOnAdd?: boolean | null; - /** @format int32 */ - qualityProfileId?: number | null; - rootFolderPath?: string | null; - minimumAvailability?: MovieStatusType; -} - -export enum ColonReplacementFormat { - Delete = "delete", - Dash = "dash", - SpaceDash = "spaceDash", - SpaceDashSpace = "spaceDashSpace", - Smart = "smart", -} - -export interface Command { - sendUpdatesToClient?: boolean; - updateScheduledTask?: boolean; - completionMessage?: string | null; - requiresDiskAccess?: boolean; - isExclusive?: boolean; - isTypeExclusive?: boolean; - isLongRunning?: boolean; - name?: string | null; - /** @format date-time */ - lastExecutionTime?: string | null; - /** @format date-time */ - lastStartTime?: string | null; - trigger?: CommandTrigger; - suppressMessages?: boolean; - clientUserAgent?: string | null; -} - -export enum CommandPriority { - Normal = "normal", - High = "high", - Low = "low", -} - -export interface CommandResource { - /** @format int32 */ - id?: number; - name?: string | null; - commandName?: string | null; - message?: string | null; - body?: Command; - priority?: CommandPriority; - status?: CommandStatus; - result?: CommandResult; - /** @format date-time */ - queued?: string; - /** @format date-time */ - started?: string | null; - /** @format date-time */ - ended?: string | null; - /** @format date-span */ - duration?: string | null; - exception?: string | null; - trigger?: CommandTrigger; - clientUserAgent?: string | null; - /** @format date-time */ - stateChangeTime?: string | null; - sendUpdatesToClient?: boolean; - updateScheduledTask?: boolean; - /** @format date-time */ - lastExecutionTime?: string | null; -} - -export enum CommandResult { - Unknown = "unknown", - Successful = "successful", - Unsuccessful = "unsuccessful", -} - -export enum CommandStatus { - Queued = "queued", - Started = "started", - Completed = "completed", - Failed = "failed", - Aborted = "aborted", - Cancelled = "cancelled", - Orphaned = "orphaned", -} - -export enum CommandTrigger { - Unspecified = "unspecified", - Manual = "manual", - Scheduled = "scheduled", -} - -export interface CreditResource { - /** @format int32 */ - id?: number; - personName?: string | null; - creditTmdbId?: string | null; - /** @format int32 */ - personTmdbId?: number; - /** @format int32 */ - movieMetadataId?: number; - images?: MediaCover[] | null; - department?: string | null; - job?: string | null; - character?: string | null; - /** @format int32 */ - order?: number; - type?: CreditType; -} - -export enum CreditType { - Cast = "cast", - Crew = "crew", -} - -export interface CustomFilterResource { - /** @format int32 */ - id?: number; - type?: string | null; - label?: string | null; - filters?: Record[] | null; -} - -export interface CustomFormatBulkResource { - /** @uniqueItems true */ - ids?: number[] | null; - includeCustomFormatWhenRenaming?: boolean | null; -} - -export interface CustomFormatResource { - /** @format int32 */ - id?: number; - name?: string | null; - includeCustomFormatWhenRenaming?: boolean | null; - specifications?: CustomFormatSpecificationSchema[] | null; -} - -export interface CustomFormatSpecificationSchema { - /** @format int32 */ - id?: number; - name?: string | null; - implementation?: string | null; - implementationName?: string | null; - infoLink?: string | null; - negate?: boolean; - required?: boolean; - fields?: Field[] | null; - presets?: CustomFormatSpecificationSchema[] | null; -} - -export enum DatabaseType { - SqLite = "sqLite", - PostgreSQL = "postgreSQL", -} - -export interface DelayProfileResource { - /** @format int32 */ - id?: number; - enableUsenet?: boolean; - enableTorrent?: boolean; - preferredProtocol?: DownloadProtocol; - /** @format int32 */ - usenetDelay?: number; - /** @format int32 */ - torrentDelay?: number; - bypassIfHighestQuality?: boolean; - bypassIfAboveCustomFormatScore?: boolean; - /** @format int32 */ - minimumCustomFormatScore?: number; - /** @format int32 */ - order?: number; - /** @uniqueItems true */ - tags?: number[] | null; -} - -export interface DiskSpaceResource { - /** @format int32 */ - id?: number; - path?: string | null; - label?: string | null; - /** @format int64 */ - freeSpace?: number; - /** @format int64 */ - totalSpace?: number; -} - -export interface DownloadClientBulkResource { - ids?: number[] | null; - tags?: number[] | null; - applyTags?: ApplyTags; - enable?: boolean | null; - /** @format int32 */ - priority?: number | null; - removeCompletedDownloads?: boolean | null; - removeFailedDownloads?: boolean | null; -} - -export interface DownloadClientConfigResource { - /** @format int32 */ - id?: number; - downloadClientWorkingFolders?: string | null; - enableCompletedDownloadHandling?: boolean; - /** @format int32 */ - checkForFinishedDownloadInterval?: number; - autoRedownloadFailed?: boolean; - autoRedownloadFailedFromInteractiveSearch?: boolean; -} - -export interface DownloadClientResource { - /** @format int32 */ - id?: number; - name?: string | null; - fields?: Field[] | null; - implementationName?: string | null; - implementation?: string | null; - configContract?: string | null; - infoLink?: string | null; - message?: ProviderMessage; - /** @uniqueItems true */ - tags?: number[] | null; - presets?: DownloadClientResource[] | null; - enable?: boolean; - protocol?: DownloadProtocol; - /** @format int32 */ - priority?: number; - removeCompletedDownloads?: boolean; - removeFailedDownloads?: boolean; -} - -export enum DownloadProtocol { - Unknown = "unknown", - Usenet = "usenet", - Torrent = "torrent", -} - -export interface ExtraFileResource { - /** @format int32 */ - id?: number; - /** @format int32 */ - movieId?: number; - /** @format int32 */ - movieFileId?: number | null; - relativePath?: string | null; - extension?: string | null; - languageTags?: string[] | null; - title?: string | null; - type?: ExtraFileType; -} - -export enum ExtraFileType { - Subtitle = "subtitle", - Metadata = "metadata", - Other = "other", -} - -export interface Field { - /** @format int32 */ - order?: number; - name?: string | null; - label?: string | null; - unit?: string | null; - helpText?: string | null; - helpTextWarning?: string | null; - helpLink?: string | null; - value?: any; - type?: string | null; - advanced?: boolean; - selectOptions?: SelectOption[] | null; - selectOptionsProviderAction?: string | null; - section?: string | null; - hidden?: string | null; - privacy?: PrivacyLevel; - placeholder?: string | null; - isFloat?: boolean; -} - -export enum FileDateType { - None = "none", - Cinemas = "cinemas", - Release = "release", -} - -export enum HealthCheckResult { - Ok = "ok", - Notice = "notice", - Warning = "warning", - Error = "error", -} - -export interface HealthResource { - /** @format int32 */ - id?: number; - source?: string | null; - type?: HealthCheckResult; - message?: string | null; - wikiUrl?: HttpUri; -} - -export interface HistoryResource { - /** @format int32 */ - id?: number; - /** @format int32 */ - movieId?: number; - sourceTitle?: string | null; - languages?: Language[] | null; - quality?: QualityModel; - customFormats?: CustomFormatResource[] | null; - /** @format int32 */ - customFormatScore?: number; - qualityCutoffNotMet?: boolean; - /** @format date-time */ - date?: string; - downloadId?: string | null; - eventType?: MovieHistoryEventType; - data?: Record; - movie?: MovieResource; -} - -export interface HistoryResourcePagingResource { - /** @format int32 */ - page?: number; - /** @format int32 */ - pageSize?: number; - sortKey?: string | null; - sortDirection?: SortDirection; - /** @format int32 */ - totalRecords?: number; - records?: HistoryResource[] | null; -} - -export interface HostConfigResource { - /** @format int32 */ - id?: number; - bindAddress?: string | null; - /** @format int32 */ - port?: number; - /** @format int32 */ - sslPort?: number; - enableSsl?: boolean; - launchBrowser?: boolean; - authenticationMethod?: AuthenticationType; - authenticationRequired?: AuthenticationRequiredType; - analyticsEnabled?: boolean; - username?: string | null; - password?: string | null; - passwordConfirmation?: string | null; - logLevel?: string | null; - /** @format int32 */ - logSizeLimit?: number; - consoleLogLevel?: string | null; - branch?: string | null; - apiKey?: string | null; - sslCertPath?: string | null; - sslCertPassword?: string | null; - urlBase?: string | null; - instanceName?: string | null; - applicationUrl?: string | null; - updateAutomatically?: boolean; - updateMechanism?: UpdateMechanism; - updateScriptPath?: string | null; - proxyEnabled?: boolean; - proxyType?: ProxyType; - proxyHostname?: string | null; - /** @format int32 */ - proxyPort?: number; - proxyUsername?: string | null; - proxyPassword?: string | null; - proxyBypassFilter?: string | null; - proxyBypassLocalAddresses?: boolean; - certificateValidation?: CertificateValidationType; - backupFolder?: string | null; - /** @format int32 */ - backupInterval?: number; - /** @format int32 */ - backupRetention?: number; -} - -export interface HttpUri { - fullUri?: string | null; - scheme?: string | null; - host?: string | null; - /** @format int32 */ - port?: number | null; - path?: string | null; - query?: string | null; - fragment?: string | null; -} - -export interface ImportListBulkResource { - ids?: number[] | null; - tags?: number[] | null; - applyTags?: ApplyTags; - enabled?: boolean | null; - enableAuto?: boolean | null; - rootFolderPath?: string | null; - /** @format int32 */ - qualityProfileId?: number | null; - minimumAvailability?: MovieStatusType; -} - -export interface ImportListConfigResource { - /** @format int32 */ - id?: number; - listSyncLevel?: string | null; -} - -export interface ImportListExclusionBulkResource { - /** @uniqueItems true */ - ids?: number[] | null; -} - -export interface ImportListExclusionResource { - /** @format int32 */ - id?: number; - name?: string | null; - fields?: Field[] | null; - implementationName?: string | null; - implementation?: string | null; - configContract?: string | null; - infoLink?: string | null; - message?: ProviderMessage; - /** @uniqueItems true */ - tags?: number[] | null; - presets?: ImportListExclusionResource[] | null; - /** @format int32 */ - tmdbId?: number; - movieTitle?: string | null; - /** @format int32 */ - movieYear?: number; -} - -export interface ImportListExclusionResourcePagingResource { - /** @format int32 */ - page?: number; - /** @format int32 */ - pageSize?: number; - sortKey?: string | null; - sortDirection?: SortDirection; - /** @format int32 */ - totalRecords?: number; - records?: ImportListExclusionResource[] | null; -} - -export interface ImportListResource { - /** @format int32 */ - id?: number; - name?: string | null; - fields?: Field[] | null; - implementationName?: string | null; - implementation?: string | null; - configContract?: string | null; - infoLink?: string | null; - message?: ProviderMessage; - /** @uniqueItems true */ - tags?: number[] | null; - presets?: ImportListResource[] | null; - enabled?: boolean; - enableAuto?: boolean; - monitor?: MonitorTypes; - rootFolderPath?: string | null; - /** @format int32 */ - qualityProfileId?: number; - searchOnAdd?: boolean; - minimumAvailability?: MovieStatusType; - listType?: ImportListType; - /** @format int32 */ - listOrder?: number; - /** @format date-span */ - minRefreshInterval?: string; -} - -export enum ImportListType { - Program = "program", - Tmdb = "tmdb", - Trakt = "trakt", - Plex = "plex", - Simkl = "simkl", - Other = "other", - Advanced = "advanced", -} - -export interface IndexerBulkResource { - ids?: number[] | null; - tags?: number[] | null; - applyTags?: ApplyTags; - enableRss?: boolean | null; - enableAutomaticSearch?: boolean | null; - enableInteractiveSearch?: boolean | null; - /** @format int32 */ - priority?: number | null; -} - -export interface IndexerConfigResource { - /** @format int32 */ - id?: number; - /** @format int32 */ - minimumAge?: number; - /** @format int32 */ - maximumSize?: number; - /** @format int32 */ - retention?: number; - /** @format int32 */ - rssSyncInterval?: number; - preferIndexerFlags?: boolean; - /** @format int32 */ - availabilityDelay?: number; - allowHardcodedSubs?: boolean; - whitelistedHardcodedSubs?: string | null; -} - -export interface IndexerFlagResource { - /** @format int32 */ - id?: number; - name?: string | null; - nameLower?: string | null; -} - -export interface IndexerResource { - /** @format int32 */ - id?: number; - name?: string | null; - fields?: Field[] | null; - implementationName?: string | null; - implementation?: string | null; - configContract?: string | null; - infoLink?: string | null; - message?: ProviderMessage; - /** @uniqueItems true */ - tags?: number[] | null; - presets?: IndexerResource[] | null; - enableRss?: boolean; - enableAutomaticSearch?: boolean; - enableInteractiveSearch?: boolean; - supportsRss?: boolean; - supportsSearch?: boolean; - protocol?: DownloadProtocol; - /** @format int32 */ - priority?: number; - /** @format int32 */ - downloadClientId?: number; -} - -export interface Language { - /** @format int32 */ - id?: number; - name?: string | null; -} - -export interface LanguageResource { - /** @format int32 */ - id?: number; - name?: string | null; - nameLower?: string | null; -} - -export interface LocalizationLanguageResource { - identifier?: string | null; -} - -export interface LogFileResource { - /** @format int32 */ - id?: number; - filename?: string | null; - /** @format date-time */ - lastWriteTime?: string; - contentsUrl?: string | null; - downloadUrl?: string | null; -} - -export interface LogResource { - /** @format int32 */ - id?: number; - /** @format date-time */ - time?: string; - exception?: string | null; - exceptionType?: string | null; - level?: string | null; - logger?: string | null; - message?: string | null; - method?: string | null; -} - -export interface LogResourcePagingResource { - /** @format int32 */ - page?: number; - /** @format int32 */ - pageSize?: number; - sortKey?: string | null; - sortDirection?: SortDirection; - /** @format int32 */ - totalRecords?: number; - records?: LogResource[] | null; -} - -export interface ManualImportReprocessResource { - /** @format int32 */ - id?: number; - path?: string | null; - /** @format int32 */ - movieId?: number; - movie?: MovieResource; - quality?: QualityModel; - languages?: Language[] | null; - releaseGroup?: string | null; - downloadId?: string | null; - customFormats?: CustomFormatResource[] | null; - /** @format int32 */ - customFormatScore?: number; - /** @format int32 */ - indexerFlags?: number; - rejections?: Rejection[] | null; -} - -export interface ManualImportResource { - /** @format int32 */ - id?: number; - path?: string | null; - relativePath?: string | null; - folderName?: string | null; - name?: string | null; - /** @format int64 */ - size?: number; - movie?: MovieResource; - quality?: QualityModel; - languages?: Language[] | null; - releaseGroup?: string | null; - /** @format int32 */ - qualityWeight?: number; - downloadId?: string | null; - customFormats?: CustomFormatResource[] | null; - /** @format int32 */ - customFormatScore?: number; - /** @format int32 */ - indexerFlags?: number; - rejections?: Rejection[] | null; -} - -export interface MediaCover { - coverType?: MediaCoverTypes; - url?: string | null; - remoteUrl?: string | null; -} - -export enum MediaCoverTypes { - Unknown = "unknown", - Poster = "poster", - Banner = "banner", - Fanart = "fanart", - Screenshot = "screenshot", - Headshot = "headshot", - Clearlogo = "clearlogo", -} - -export interface MediaInfoResource { - /** @format int32 */ - id?: number; - /** @format int64 */ - audioBitrate?: number; - /** @format double */ - audioChannels?: number; - audioCodec?: string | null; - audioLanguages?: string | null; - /** @format int32 */ - audioStreamCount?: number; - /** @format int32 */ - videoBitDepth?: number; - /** @format int64 */ - videoBitrate?: number; - videoCodec?: string | null; - /** @format double */ - videoFps?: number; - videoDynamicRange?: string | null; - videoDynamicRangeType?: string | null; - resolution?: string | null; - runTime?: string | null; - scanType?: string | null; - subtitles?: string | null; -} - -export interface MediaManagementConfigResource { - /** @format int32 */ - id?: number; - autoUnmonitorPreviouslyDownloadedMovies?: boolean; - recycleBin?: string | null; - /** @format int32 */ - recycleBinCleanupDays?: number; - downloadPropersAndRepacks?: ProperDownloadTypes; - createEmptyMovieFolders?: boolean; - deleteEmptyFolders?: boolean; - fileDate?: FileDateType; - rescanAfterRefresh?: RescanAfterRefreshType; - autoRenameFolders?: boolean; - pathsDefaultStatic?: boolean; - setPermissionsLinux?: boolean; - chmodFolder?: string | null; - chownGroup?: string | null; - skipFreeSpaceCheckWhenImporting?: boolean; - /** @format int32 */ - minimumFreeSpaceWhenImporting?: number; - copyUsingHardlinks?: boolean; - useScriptImport?: boolean; - scriptImportPath?: string | null; - importExtraFiles?: boolean; - extraFileExtensions?: string | null; - enableMediaInfo?: boolean; -} - -export interface MetadataConfigResource { - /** @format int32 */ - id?: number; - certificationCountry?: TMDbCountryCode; -} - -export interface MetadataResource { - /** @format int32 */ - id?: number; - name?: string | null; - fields?: Field[] | null; - implementationName?: string | null; - implementation?: string | null; - configContract?: string | null; - infoLink?: string | null; - message?: ProviderMessage; - /** @uniqueItems true */ - tags?: number[] | null; - presets?: MetadataResource[] | null; - enable?: boolean; -} - -export enum Modifier { - None = "none", - Regional = "regional", - Screener = "screener", - Rawhd = "rawhd", - Brdisk = "brdisk", - Remux = "remux", -} - -export enum MonitorTypes { - MovieOnly = "movieOnly", - MovieAndCollection = "movieAndCollection", - None = "none", -} - -export interface MovieCollectionResource { - title?: string | null; - /** @format int32 */ - tmdbId?: number; -} - -export interface MovieEditorResource { - movieIds?: number[] | null; - monitored?: boolean | null; - /** @format int32 */ - qualityProfileId?: number | null; - minimumAvailability?: MovieStatusType; - rootFolderPath?: string | null; - tags?: number[] | null; - applyTags?: ApplyTags; - moveFiles?: boolean; - deleteFiles?: boolean; - addImportExclusion?: boolean; -} - -export interface MovieFileListResource { - movieFileIds?: number[] | null; - languages?: Language[] | null; - quality?: QualityModel; - edition?: string | null; - releaseGroup?: string | null; - sceneName?: string | null; - /** @format int32 */ - indexerFlags?: number | null; -} - -export interface MovieFileResource { - /** @format int32 */ - id?: number; - /** @format int32 */ - movieId?: number; - relativePath?: string | null; - path?: string | null; - /** @format int64 */ - size?: number; - /** @format date-time */ - dateAdded?: string; - sceneName?: string | null; - releaseGroup?: string | null; - edition?: string | null; - languages?: Language[] | null; - quality?: QualityModel; - customFormats?: CustomFormatResource[] | null; - /** @format int32 */ - customFormatScore?: number; - /** @format int32 */ - indexerFlags?: number | null; - mediaInfo?: MediaInfoResource; - originalFilePath?: string | null; - qualityCutoffNotMet?: boolean; -} - -export enum MovieHistoryEventType { - Unknown = "unknown", - Grabbed = "grabbed", - DownloadFolderImported = "downloadFolderImported", - DownloadFailed = "downloadFailed", - MovieFileDeleted = "movieFileDeleted", - MovieFolderImported = "movieFolderImported", - MovieFileRenamed = "movieFileRenamed", - DownloadIgnored = "downloadIgnored", -} - -export interface MovieResource { - /** @format int32 */ - id?: number; - title?: string | null; - originalTitle?: string | null; - originalLanguage?: Language; - alternateTitles?: AlternativeTitleResource[] | null; - /** @format int32 */ - secondaryYear?: number | null; - /** @format int32 */ - secondaryYearSourceId?: number; - sortTitle?: string | null; - /** @format int64 */ - sizeOnDisk?: number | null; - status?: MovieStatusType; - overview?: string | null; - /** @format date-time */ - inCinemas?: string | null; - /** @format date-time */ - physicalRelease?: string | null; - /** @format date-time */ - digitalRelease?: string | null; - /** @format date-time */ - releaseDate?: string | null; - physicalReleaseNote?: string | null; - images?: MediaCover[] | null; - website?: string | null; - remotePoster?: string | null; - /** @format int32 */ - year?: number; - youTubeTrailerId?: string | null; - studio?: string | null; - path?: string | null; - /** @format int32 */ - qualityProfileId?: number; - hasFile?: boolean | null; - /** @format int32 */ - movieFileId?: number; - monitored?: boolean; - minimumAvailability?: MovieStatusType; - isAvailable?: boolean; - folderName?: string | null; - /** @format int32 */ - runtime?: number; - cleanTitle?: string | null; - imdbId?: string | null; - /** @format int32 */ - tmdbId?: number; - titleSlug?: string | null; - rootFolderPath?: string | null; - folder?: string | null; - certification?: string | null; - genres?: string[] | null; - /** @uniqueItems true */ - tags?: number[] | null; - /** @format date-time */ - added?: string; - addOptions?: AddMovieOptions; - ratings?: Ratings; - movieFile?: MovieFileResource; - collection?: MovieCollectionResource; - /** @format float */ - popularity?: number; - /** @format date-time */ - lastSearchTime?: string | null; - statistics?: MovieStatisticsResource; -} - -export interface MovieResourcePagingResource { - /** @format int32 */ - page?: number; - /** @format int32 */ - pageSize?: number; - sortKey?: string | null; - sortDirection?: SortDirection; - /** @format int32 */ - totalRecords?: number; - records?: MovieResource[] | null; -} - -export enum MovieRuntimeFormatType { - HoursMinutes = "hoursMinutes", - Minutes = "minutes", -} - -export interface MovieStatisticsResource { - /** @format int32 */ - movieFileCount?: number; - /** @format int64 */ - sizeOnDisk?: number; - releaseGroups?: string[] | null; -} - -export enum MovieStatusType { - Tba = "tba", - Announced = "announced", - InCinemas = "inCinemas", - Released = "released", - Deleted = "deleted", -} - -export interface NamingConfigResource { - /** @format int32 */ - id?: number; - renameMovies?: boolean; - replaceIllegalCharacters?: boolean; - colonReplacementFormat?: ColonReplacementFormat; - standardMovieFormat?: string | null; - movieFolderFormat?: string | null; -} - -export interface NotificationResource { - /** @format int32 */ - id?: number; - name?: string | null; - fields?: Field[] | null; - implementationName?: string | null; - implementation?: string | null; - configContract?: string | null; - infoLink?: string | null; - message?: ProviderMessage; - /** @uniqueItems true */ - tags?: number[] | null; - presets?: NotificationResource[] | null; - link?: string | null; - onGrab?: boolean; - onDownload?: boolean; - onUpgrade?: boolean; - onRename?: boolean; - onMovieAdded?: boolean; - onMovieDelete?: boolean; - onMovieFileDelete?: boolean; - onMovieFileDeleteForUpgrade?: boolean; - onHealthIssue?: boolean; - includeHealthWarnings?: boolean; - onHealthRestored?: boolean; - onApplicationUpdate?: boolean; - onManualInteractionRequired?: boolean; - supportsOnGrab?: boolean; - supportsOnDownload?: boolean; - supportsOnUpgrade?: boolean; - supportsOnRename?: boolean; - supportsOnMovieAdded?: boolean; - supportsOnMovieDelete?: boolean; - supportsOnMovieFileDelete?: boolean; - supportsOnMovieFileDeleteForUpgrade?: boolean; - supportsOnHealthIssue?: boolean; - supportsOnHealthRestored?: boolean; - supportsOnApplicationUpdate?: boolean; - supportsOnManualInteractionRequired?: boolean; - testCommand?: string | null; -} - -export interface ParseResource { - /** @format int32 */ - id?: number; - title?: string | null; - parsedMovieInfo?: ParsedMovieInfo; - movie?: MovieResource; - languages?: Language[] | null; - customFormats?: CustomFormatResource[] | null; - /** @format int32 */ - customFormatScore?: number; -} - -export interface ParsedMovieInfo { - movieTitles?: string[] | null; - originalTitle?: string | null; - releaseTitle?: string | null; - simpleReleaseTitle?: string | null; - quality?: QualityModel; - languages?: Language[] | null; - releaseGroup?: string | null; - releaseHash?: string | null; - edition?: string | null; - /** @format int32 */ - year?: number; - imdbId?: string | null; - /** @format int32 */ - tmdbId?: number; - hardcodedSubs?: string | null; - movieTitle?: string | null; - primaryMovieTitle?: string | null; -} - -export interface PingResource { - status?: string | null; -} - -export enum PrivacyLevel { - Normal = "normal", - Password = "password", - ApiKey = "apiKey", - UserName = "userName", -} - -export interface ProfileFormatItemResource { - /** @format int32 */ - id?: number; - /** @format int32 */ - format?: number; - name?: string | null; - /** @format int32 */ - score?: number; -} - -export enum ProperDownloadTypes { - PreferAndUpgrade = "preferAndUpgrade", - DoNotUpgrade = "doNotUpgrade", - DoNotPrefer = "doNotPrefer", -} - -export interface ProviderMessage { - message?: string | null; - type?: ProviderMessageType; -} - -export enum ProviderMessageType { - Info = "info", - Warning = "warning", - Error = "error", -} - -export enum ProxyType { - Http = "http", - Socks4 = "socks4", - Socks5 = "socks5", -} - -export interface Quality { - /** @format int32 */ - id?: number; - name?: string | null; - source?: QualitySource; - /** @format int32 */ - resolution?: number; - modifier?: Modifier; -} - -export interface QualityDefinitionResource { - /** @format int32 */ - id?: number; - quality?: Quality; - title?: string | null; - /** @format int32 */ - weight?: number; - /** @format double */ - minSize?: number | null; - /** @format double */ - maxSize?: number | null; - /** @format double */ - preferredSize?: number | null; -} - -export interface QualityModel { - quality?: Quality; - revision?: Revision; -} - -export interface QualityProfileQualityItemResource { - /** @format int32 */ - id?: number; - name?: string | null; - quality?: Quality; - items?: QualityProfileQualityItemResource[] | null; - allowed?: boolean; -} - -export interface QualityProfileResource { - /** @format int32 */ - id?: number; - name?: string | null; - upgradeAllowed?: boolean; - /** @format int32 */ - cutoff?: number; - items?: QualityProfileQualityItemResource[] | null; - /** @format int32 */ - minFormatScore?: number; - /** @format int32 */ - cutoffFormatScore?: number; - /** @format int32 */ - minUpgradeFormatScore?: number; - formatItems?: ProfileFormatItemResource[] | null; - language?: Language; -} - -export enum QualitySource { - Unknown = "unknown", - Cam = "cam", - Telesync = "telesync", - Telecine = "telecine", - Workprint = "workprint", - Dvd = "dvd", - Tv = "tv", - Webdl = "webdl", - Webrip = "webrip", - Bluray = "bluray", -} - -export interface QueueBulkResource { - ids?: number[] | null; -} - -export interface QueueResource { - /** @format int32 */ - id?: number; - /** @format int32 */ - movieId?: number | null; - movie?: MovieResource; - languages?: Language[] | null; - quality?: QualityModel; - customFormats?: CustomFormatResource[] | null; - /** @format int32 */ - customFormatScore?: number; - /** @format double */ - size?: number; - title?: string | null; - /** @format double */ - sizeleft?: number; - /** @format date-span */ - timeleft?: string | null; - /** @format date-time */ - estimatedCompletionTime?: string | null; - /** @format date-time */ - added?: string | null; - status?: string | null; - trackedDownloadStatus?: TrackedDownloadStatus; - trackedDownloadState?: TrackedDownloadState; - statusMessages?: TrackedDownloadStatusMessage[] | null; - errorMessage?: string | null; - downloadId?: string | null; - protocol?: DownloadProtocol; - downloadClient?: string | null; - downloadClientHasPostImportCategory?: boolean; - indexer?: string | null; - outputPath?: string | null; -} - -export interface QueueResourcePagingResource { - /** @format int32 */ - page?: number; - /** @format int32 */ - pageSize?: number; - sortKey?: string | null; - sortDirection?: SortDirection; - /** @format int32 */ - totalRecords?: number; - records?: QueueResource[] | null; -} - -export interface QueueStatusResource { - /** @format int32 */ - id?: number; - /** @format int32 */ - totalCount?: number; - /** @format int32 */ - count?: number; - /** @format int32 */ - unknownCount?: number; - errors?: boolean; - warnings?: boolean; - unknownErrors?: boolean; - unknownWarnings?: boolean; -} - -export interface RatingChild { - /** @format int32 */ - votes?: number; - /** @format double */ - value?: number; - type?: RatingType; -} - -export enum RatingType { - User = "user", - Critic = "critic", -} - -export interface Ratings { - imdb?: RatingChild; - tmdb?: RatingChild; - metacritic?: RatingChild; - rottenTomatoes?: RatingChild; - trakt?: RatingChild; -} - -export interface Rejection { - reason?: string | null; - type?: RejectionType; -} - -export enum RejectionType { - Permanent = "permanent", - Temporary = "temporary", -} - -export interface ReleaseProfileResource { - /** @format int32 */ - id?: number; - name?: string | null; - enabled?: boolean; - required?: any; - ignored?: any; - /** @format int32 */ - indexerId?: number; - /** @uniqueItems true */ - tags?: number[] | null; -} - -export interface ReleaseResource { - /** @format int32 */ - id?: number; - guid?: string | null; - quality?: QualityModel; - customFormats?: CustomFormatResource[] | null; - /** @format int32 */ - customFormatScore?: number; - /** @format int32 */ - qualityWeight?: number; - /** @format int32 */ - age?: number; - /** @format double */ - ageHours?: number; - /** @format double */ - ageMinutes?: number; - /** @format int64 */ - size?: number; - /** @format int32 */ - indexerId?: number; - indexer?: string | null; - releaseGroup?: string | null; - subGroup?: string | null; - releaseHash?: string | null; - title?: string | null; - sceneSource?: boolean; - movieTitles?: string[] | null; - languages?: Language[] | null; - /** @format int32 */ - mappedMovieId?: number | null; - approved?: boolean; - temporarilyRejected?: boolean; - rejected?: boolean; - /** @format int32 */ - tmdbId?: number; - /** @format int32 */ - imdbId?: number; - rejections?: string[] | null; - /** @format date-time */ - publishDate?: string; - commentUrl?: string | null; - downloadUrl?: string | null; - infoUrl?: string | null; - downloadAllowed?: boolean; - /** @format int32 */ - releaseWeight?: number; - edition?: string | null; - magnetUrl?: string | null; - infoHash?: string | null; - /** @format int32 */ - seeders?: number | null; - /** @format int32 */ - leechers?: number | null; - protocol?: DownloadProtocol; - indexerFlags?: any; - /** @format int32 */ - movieId?: number | null; - /** @format int32 */ - downloadClientId?: number | null; - downloadClient?: string | null; - shouldOverride?: boolean | null; -} - -export interface RemotePathMappingResource { - /** @format int32 */ - id?: number; - host?: string | null; - remotePath?: string | null; - localPath?: string | null; -} - -export interface RenameMovieResource { - /** @format int32 */ - id?: number; - /** @format int32 */ - movieId?: number; - /** @format int32 */ - movieFileId?: number; - existingPath?: string | null; - newPath?: string | null; -} - -export enum RescanAfterRefreshType { - Always = "always", - AfterManual = "afterManual", - Never = "never", -} - -export interface Revision { - /** @format int32 */ - version?: number; - /** @format int32 */ - real?: number; - isRepack?: boolean; -} - -export interface RootFolderResource { - /** @format int32 */ - id?: number; - path?: string | null; - accessible?: boolean; - /** @format int64 */ - freeSpace?: number | null; - unmappedFolders?: UnmappedFolder[] | null; -} - -export enum RuntimeMode { - Console = "console", - Service = "service", - Tray = "tray", -} - -export interface SelectOption { - /** @format int32 */ - value?: number; - name?: string | null; - /** @format int32 */ - order?: number; - hint?: string | null; - dividerAfter?: boolean; -} - -export enum SortDirection { - Default = "default", - Ascending = "ascending", - Descending = "descending", -} - -export enum SourceType { - Tmdb = "tmdb", - Mappings = "mappings", - User = "user", - Indexer = "indexer", -} - -export interface SystemResource { - appName?: string | null; - instanceName?: string | null; - version?: string | null; - /** @format date-time */ - buildTime?: string; - isDebug?: boolean; - isProduction?: boolean; - isAdmin?: boolean; - isUserInteractive?: boolean; - startupPath?: string | null; - appData?: string | null; - osName?: string | null; - osVersion?: string | null; - isNetCore?: boolean; - isLinux?: boolean; - isOsx?: boolean; - isWindows?: boolean; - isDocker?: boolean; - mode?: RuntimeMode; - branch?: string | null; - databaseType?: DatabaseType; - databaseVersion?: string | null; - authentication?: AuthenticationType; - /** @format int32 */ - migrationVersion?: number; - urlBase?: string | null; - runtimeVersion?: string | null; - runtimeName?: string | null; - /** @format date-time */ - startTime?: string; - packageVersion?: string | null; - packageAuthor?: string | null; - packageUpdateMechanism?: UpdateMechanism; - packageUpdateMechanismMessage?: string | null; -} - -export enum TMDbCountryCode { - Au = "au", - Br = "br", - Ca = "ca", - Fr = "fr", - De = "de", - Gb = "gb", - Ie = "ie", - It = "it", - Es = "es", - Us = "us", - Nz = "nz", -} - -export interface TagDetailsResource { - /** @format int32 */ - id?: number; - label?: string | null; - delayProfileIds?: number[] | null; - importListIds?: number[] | null; - notificationIds?: number[] | null; - releaseProfileIds?: number[] | null; - indexerIds?: number[] | null; - downloadClientIds?: number[] | null; - autoTagIds?: number[] | null; - movieIds?: number[] | null; -} - -export interface TagResource { - /** @format int32 */ - id?: number; - label?: string | null; -} - -export interface TaskResource { - /** @format int32 */ - id?: number; - name?: string | null; - taskName?: string | null; - /** @format int32 */ - interval?: number; - /** @format date-time */ - lastExecution?: string; - /** @format date-time */ - lastStartTime?: string; - /** @format date-time */ - nextExecution?: string; - /** @format date-span */ - lastDuration?: string; -} - -export enum TrackedDownloadState { - Downloading = "downloading", - ImportBlocked = "importBlocked", - ImportPending = "importPending", - Importing = "importing", - Imported = "imported", - FailedPending = "failedPending", - Failed = "failed", - Ignored = "ignored", -} - -export enum TrackedDownloadStatus { - Ok = "ok", - Warning = "warning", - Error = "error", -} - -export interface TrackedDownloadStatusMessage { - title?: string | null; - messages?: string[] | null; -} - -export interface UiConfigResource { - /** @format int32 */ - id?: number; - /** @format int32 */ - firstDayOfWeek?: number; - calendarWeekColumnHeader?: string | null; - movieRuntimeFormat?: MovieRuntimeFormatType; - shortDateFormat?: string | null; - longDateFormat?: string | null; - timeFormat?: string | null; - showRelativeDates?: boolean; - enableColorImpairedMode?: boolean; - /** @format int32 */ - movieInfoLanguage?: number; - /** @format int32 */ - uiLanguage?: number; - theme?: string | null; -} - -export interface UnmappedFolder { - name?: string | null; - path?: string | null; - relativePath?: string | null; -} - -export interface UpdateChanges { - new?: string[] | null; - fixed?: string[] | null; -} - -export enum UpdateMechanism { - BuiltIn = "builtIn", - Script = "script", - External = "external", - Apt = "apt", - Docker = "docker", -} - -export interface UpdateResource { - /** @format int32 */ - id?: number; - version?: string | null; - branch?: string | null; - /** @format date-time */ - releaseDate?: string; - fileName?: string | null; - url?: string | null; - installed?: boolean; - /** @format date-time */ - installedOn?: string | null; - installable?: boolean; - latest?: boolean; - changes?: UpdateChanges; - hash?: string | null; -} - -import type { AxiosInstance, AxiosRequestConfig, AxiosResponse, HeadersDefaults, ResponseType } from "axios"; -import axios from "axios"; - -export type QueryParamsType = Record; - -export interface FullRequestParams extends Omit { - /** set parameter to `true` for call `securityWorker` for this request */ - secure?: boolean; - /** request path */ - path: string; - /** content type of request body */ - type?: ContentType; - /** query params */ - query?: QueryParamsType; - /** format of response (i.e. response.json() -> format: "json") */ - format?: ResponseType; - /** request body */ - body?: unknown; -} - -export type RequestParams = Omit; - -export interface ApiConfig extends Omit { - securityWorker?: (securityData: SecurityDataType | null) => Promise | AxiosRequestConfig | void; - secure?: boolean; - format?: ResponseType; -} - -export enum ContentType { - Json = "application/json", - FormData = "multipart/form-data", - UrlEncoded = "application/x-www-form-urlencoded", - Text = "text/plain", -} - -export class HttpClient { - public instance: AxiosInstance; - private securityData: SecurityDataType | null = null; - private securityWorker?: ApiConfig["securityWorker"]; - private secure?: boolean; - private format?: ResponseType; - - constructor({ securityWorker, secure, format, ...axiosConfig }: ApiConfig = {}) { - this.instance = axios.create({ ...axiosConfig, baseURL: axiosConfig.baseURL || "{protocol}://{hostpath}" }); - this.secure = secure; - this.format = format; - this.securityWorker = securityWorker; - } - - public setSecurityData = (data: SecurityDataType | null) => { - this.securityData = data; - }; - - protected mergeRequestParams(params1: AxiosRequestConfig, params2?: AxiosRequestConfig): AxiosRequestConfig { - const method = params1.method || (params2 && params2.method); - - return { - ...this.instance.defaults, - ...params1, - ...(params2 || {}), - headers: { - ...((method && this.instance.defaults.headers[method.toLowerCase() as keyof HeadersDefaults]) || {}), - ...(params1.headers || {}), - ...((params2 && params2.headers) || {}), - }, - }; - } - - protected stringifyFormItem(formItem: unknown) { - if (typeof formItem === "object" && formItem !== null) { - return JSON.stringify(formItem); - } else { - return `${formItem}`; - } - } - - protected createFormData(input: Record): FormData { - if (input instanceof FormData) { - return input; - } - return Object.keys(input || {}).reduce((formData, key) => { - const property = input[key]; - const propertyContent: any[] = property instanceof Array ? property : [property]; - - for (const formItem of propertyContent) { - const isFileType = formItem instanceof Blob || formItem instanceof File; - formData.append(key, isFileType ? formItem : this.stringifyFormItem(formItem)); - } - - return formData; - }, new FormData()); - } - - public request = async ({ - secure, - path, - type, - query, - format, - body, - ...params - }: FullRequestParams): Promise> => { - const secureParams = - ((typeof secure === "boolean" ? secure : this.secure) && this.securityWorker && (await this.securityWorker(this.securityData))) || {}; - const requestParams = this.mergeRequestParams(params, secureParams); - const responseFormat = format || this.format || undefined; - - if (type === ContentType.FormData && body && body !== null && typeof body === "object") { - body = this.createFormData(body as Record); - } - - if (type === ContentType.Text && body && body !== null && typeof body !== "string") { - body = JSON.stringify(body); - } - - return this.instance.request({ - ...requestParams, - headers: { - ...(requestParams.headers || {}), - ...(type ? { "Content-Type": type } : {}), - }, - params: query, - responseType: responseFormat, - data: body, - url: path, - }); - }; -} - -/** - * @title Radarr - * @version 3.0.0 - * @license GPL-3.0 (https://github.com/Radarr/Radarr/blob/develop/LICENSE) - * @baseUrl {protocol}://{hostpath} - * - * Radarr API docs - */ -export class Api extends HttpClient { - /** - * No description - * - * @tags StaticResource - * @name GetRoot - * @request GET:/ - * @secure - */ - getRoot = (path: string, params: RequestParams = {}) => - this.request({ - path: `/`, - method: "GET", - secure: true, - ...params, - }); - - api = { - /** - * No description - * - * @tags AlternativeTitle - * @name V3AlttitleList - * @request GET:/api/v3/alttitle - * @secure - */ - v3AlttitleList: ( - query?: { - /** @format int32 */ - movieId?: number; - /** @format int32 */ - movieMetadataId?: number; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/alttitle`, - method: "GET", - query: query, - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags AlternativeTitle - * @name V3AlttitleDetail - * @request GET:/api/v3/alttitle/{id} - * @secure - */ - v3AlttitleDetail: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/alttitle/${id}`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags ApiInfo - * @name GetApi - * @request GET:/api - * @secure - */ - getApi: (params: RequestParams = {}) => - this.request({ - path: `/api`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags AutoTagging - * @name V3AutotaggingCreate - * @request POST:/api/v3/autotagging - * @secure - */ - v3AutotaggingCreate: (data: AutoTaggingResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/autotagging`, - method: "POST", - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags AutoTagging - * @name V3AutotaggingList - * @request GET:/api/v3/autotagging - * @secure - */ - v3AutotaggingList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/autotagging`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags AutoTagging - * @name V3AutotaggingUpdate - * @request PUT:/api/v3/autotagging/{id} - * @secure - */ - v3AutotaggingUpdate: (id: string, data: AutoTaggingResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/autotagging/${id}`, - method: "PUT", - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags AutoTagging - * @name V3AutotaggingDelete - * @request DELETE:/api/v3/autotagging/{id} - * @secure - */ - v3AutotaggingDelete: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/autotagging/${id}`, - method: "DELETE", - secure: true, - ...params, - }), - - /** - * No description - * - * @tags AutoTagging - * @name V3AutotaggingDetail - * @request GET:/api/v3/autotagging/{id} - * @secure - */ - v3AutotaggingDetail: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/autotagging/${id}`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags AutoTagging - * @name V3AutotaggingSchemaList - * @request GET:/api/v3/autotagging/schema - * @secure - */ - v3AutotaggingSchemaList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/autotagging/schema`, - method: "GET", - secure: true, - ...params, - }), - - /** - * No description - * - * @tags Backup - * @name V3SystemBackupList - * @request GET:/api/v3/system/backup - * @secure - */ - v3SystemBackupList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/system/backup`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Backup - * @name V3SystemBackupDelete - * @request DELETE:/api/v3/system/backup/{id} - * @secure - */ - v3SystemBackupDelete: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/system/backup/${id}`, - method: "DELETE", - secure: true, - ...params, - }), - - /** - * No description - * - * @tags Backup - * @name V3SystemBackupRestoreCreate - * @request POST:/api/v3/system/backup/restore/{id} - * @secure - */ - v3SystemBackupRestoreCreate: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/system/backup/restore/${id}`, - method: "POST", - secure: true, - ...params, - }), - - /** - * No description - * - * @tags Backup - * @name V3SystemBackupRestoreUploadCreate - * @request POST:/api/v3/system/backup/restore/upload - * @secure - */ - v3SystemBackupRestoreUploadCreate: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/system/backup/restore/upload`, - method: "POST", - secure: true, - ...params, - }), - - /** - * No description - * - * @tags Blocklist - * @name V3BlocklistList - * @request GET:/api/v3/blocklist - * @secure - */ - v3BlocklistList: ( - query?: { - /** - * @format int32 - * @default 1 - */ - page?: number; - /** - * @format int32 - * @default 10 - */ - pageSize?: number; - sortKey?: string; - sortDirection?: SortDirection; - movieIds?: number[]; - protocols?: DownloadProtocol[]; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/blocklist`, - method: "GET", - query: query, - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Blocklist - * @name V3BlocklistMovieList - * @request GET:/api/v3/blocklist/movie - * @secure - */ - v3BlocklistMovieList: ( - query?: { - /** @format int32 */ - movieId?: number; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/blocklist/movie`, - method: "GET", - query: query, - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Blocklist - * @name V3BlocklistDelete - * @request DELETE:/api/v3/blocklist/{id} - * @secure - */ - v3BlocklistDelete: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/blocklist/${id}`, - method: "DELETE", - secure: true, - ...params, - }), - - /** - * No description - * - * @tags Blocklist - * @name V3BlocklistBulkDelete - * @request DELETE:/api/v3/blocklist/bulk - * @secure - */ - v3BlocklistBulkDelete: (data: BlocklistBulkResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/blocklist/bulk`, - method: "DELETE", - body: data, - secure: true, - type: ContentType.Json, - ...params, - }), - - /** - * No description - * - * @tags Calendar - * @name V3CalendarList - * @request GET:/api/v3/calendar - * @secure - */ - v3CalendarList: ( - query?: { - /** @format date-time */ - start?: string; - /** @format date-time */ - end?: string; - /** @default false */ - unmonitored?: boolean; - /** @default "" */ - tags?: string; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/calendar`, - method: "GET", - query: query, - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Collection - * @name V3CollectionList - * @request GET:/api/v3/collection - * @secure - */ - v3CollectionList: ( - query?: { - /** @format int32 */ - tmdbId?: number; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/collection`, - method: "GET", - query: query, - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Collection - * @name V3CollectionUpdate - * @request PUT:/api/v3/collection - * @secure - */ - v3CollectionUpdate: (data: CollectionUpdateResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/collection`, - method: "PUT", - body: data, - secure: true, - type: ContentType.Json, - ...params, - }), - - /** - * No description - * - * @tags Collection - * @name V3CollectionUpdate2 - * @request PUT:/api/v3/collection/{id} - * @originalName v3CollectionUpdate - * @duplicate - * @secure - */ - v3CollectionUpdate2: (id: string, data: CollectionResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/collection/${id}`, - method: "PUT", - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Collection - * @name V3CollectionDetail - * @request GET:/api/v3/collection/{id} - * @secure - */ - v3CollectionDetail: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/collection/${id}`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Command - * @name V3CommandCreate - * @request POST:/api/v3/command - * @secure - */ - v3CommandCreate: (data: CommandResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/command`, - method: "POST", - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Command - * @name V3CommandList - * @request GET:/api/v3/command - * @secure - */ - v3CommandList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/command`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Command - * @name V3CommandDelete - * @request DELETE:/api/v3/command/{id} - * @secure - */ - v3CommandDelete: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/command/${id}`, - method: "DELETE", - secure: true, - ...params, - }), - - /** - * No description - * - * @tags Command - * @name V3CommandDetail - * @request GET:/api/v3/command/{id} - * @secure - */ - v3CommandDetail: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/command/${id}`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Credit - * @name V3CreditList - * @request GET:/api/v3/credit - * @secure - */ - v3CreditList: ( - query?: { - /** @format int32 */ - movieId?: number; - /** @format int32 */ - movieMetadataId?: number; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/credit`, - method: "GET", - query: query, - secure: true, - ...params, - }), - - /** - * No description - * - * @tags Credit - * @name V3CreditDetail - * @request GET:/api/v3/credit/{id} - * @secure - */ - v3CreditDetail: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/credit/${id}`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags CustomFilter - * @name V3CustomfilterList - * @request GET:/api/v3/customfilter - * @secure - */ - v3CustomfilterList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/customfilter`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags CustomFilter - * @name V3CustomfilterCreate - * @request POST:/api/v3/customfilter - * @secure - */ - v3CustomfilterCreate: (data: CustomFilterResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/customfilter`, - method: "POST", - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags CustomFilter - * @name V3CustomfilterUpdate - * @request PUT:/api/v3/customfilter/{id} - * @secure - */ - v3CustomfilterUpdate: (id: string, data: CustomFilterResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/customfilter/${id}`, - method: "PUT", - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags CustomFilter - * @name V3CustomfilterDelete - * @request DELETE:/api/v3/customfilter/{id} - * @secure - */ - v3CustomfilterDelete: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/customfilter/${id}`, - method: "DELETE", - secure: true, - ...params, - }), - - /** - * No description - * - * @tags CustomFilter - * @name V3CustomfilterDetail - * @request GET:/api/v3/customfilter/{id} - * @secure - */ - v3CustomfilterDetail: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/customfilter/${id}`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags CustomFormat - * @name V3CustomformatList - * @request GET:/api/v3/customformat - * @secure - */ - v3CustomformatList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/customformat`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags CustomFormat - * @name V3CustomformatCreate - * @request POST:/api/v3/customformat - * @secure - */ - v3CustomformatCreate: (data: CustomFormatResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/customformat`, - method: "POST", - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags CustomFormat - * @name V3CustomformatUpdate - * @request PUT:/api/v3/customformat/{id} - * @secure - */ - v3CustomformatUpdate: (id: string, data: CustomFormatResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/customformat/${id}`, - method: "PUT", - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags CustomFormat - * @name V3CustomformatDelete - * @request DELETE:/api/v3/customformat/{id} - * @secure - */ - v3CustomformatDelete: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/customformat/${id}`, - method: "DELETE", - secure: true, - ...params, - }), - - /** - * No description - * - * @tags CustomFormat - * @name V3CustomformatDetail - * @request GET:/api/v3/customformat/{id} - * @secure - */ - v3CustomformatDetail: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/customformat/${id}`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags CustomFormat - * @name V3CustomformatBulkUpdate - * @request PUT:/api/v3/customformat/bulk - * @secure - */ - v3CustomformatBulkUpdate: (data: CustomFormatBulkResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/customformat/bulk`, - method: "PUT", - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags CustomFormat - * @name V3CustomformatBulkDelete - * @request DELETE:/api/v3/customformat/bulk - * @secure - */ - v3CustomformatBulkDelete: (data: CustomFormatBulkResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/customformat/bulk`, - method: "DELETE", - body: data, - secure: true, - type: ContentType.Json, - ...params, - }), - - /** - * No description - * - * @tags CustomFormat - * @name V3CustomformatSchemaList - * @request GET:/api/v3/customformat/schema - * @secure - */ - v3CustomformatSchemaList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/customformat/schema`, - method: "GET", - secure: true, - ...params, - }), - - /** - * No description - * - * @tags Cutoff - * @name V3WantedCutoffList - * @request GET:/api/v3/wanted/cutoff - * @secure - */ - v3WantedCutoffList: ( - query?: { - /** - * @format int32 - * @default 1 - */ - page?: number; - /** - * @format int32 - * @default 10 - */ - pageSize?: number; - sortKey?: string; - sortDirection?: SortDirection; - /** @default true */ - monitored?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/wanted/cutoff`, - method: "GET", - query: query, - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags DelayProfile - * @name V3DelayprofileCreate - * @request POST:/api/v3/delayprofile - * @secure - */ - v3DelayprofileCreate: (data: DelayProfileResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/delayprofile`, - method: "POST", - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags DelayProfile - * @name V3DelayprofileList - * @request GET:/api/v3/delayprofile - * @secure - */ - v3DelayprofileList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/delayprofile`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags DelayProfile - * @name V3DelayprofileDelete - * @request DELETE:/api/v3/delayprofile/{id} - * @secure - */ - v3DelayprofileDelete: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/delayprofile/${id}`, - method: "DELETE", - secure: true, - ...params, - }), - - /** - * No description - * - * @tags DelayProfile - * @name V3DelayprofileUpdate - * @request PUT:/api/v3/delayprofile/{id} - * @secure - */ - v3DelayprofileUpdate: (id: string, data: DelayProfileResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/delayprofile/${id}`, - method: "PUT", - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags DelayProfile - * @name V3DelayprofileDetail - * @request GET:/api/v3/delayprofile/{id} - * @secure - */ - v3DelayprofileDetail: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/delayprofile/${id}`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags DelayProfile - * @name V3DelayprofileReorderUpdate - * @request PUT:/api/v3/delayprofile/reorder/{id} - * @secure - */ - v3DelayprofileReorderUpdate: ( - id: number, - query?: { - /** @format int32 */ - after?: number; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/delayprofile/reorder/${id}`, - method: "PUT", - query: query, - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags DiskSpace - * @name V3DiskspaceList - * @request GET:/api/v3/diskspace - * @secure - */ - v3DiskspaceList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/diskspace`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags DownloadClient - * @name V3DownloadclientList - * @request GET:/api/v3/downloadclient - * @secure - */ - v3DownloadclientList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/downloadclient`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags DownloadClient - * @name V3DownloadclientCreate - * @request POST:/api/v3/downloadclient - * @secure - */ - v3DownloadclientCreate: ( - data: DownloadClientResource, - query?: { - /** @default false */ - forceSave?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/downloadclient`, - method: "POST", - query: query, - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags DownloadClient - * @name V3DownloadclientUpdate - * @request PUT:/api/v3/downloadclient/{id} - * @secure - */ - v3DownloadclientUpdate: ( - id: number, - data: DownloadClientResource, - query?: { - /** @default false */ - forceSave?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/downloadclient/${id}`, - method: "PUT", - query: query, - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags DownloadClient - * @name V3DownloadclientDelete - * @request DELETE:/api/v3/downloadclient/{id} - * @secure - */ - v3DownloadclientDelete: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/downloadclient/${id}`, - method: "DELETE", - secure: true, - ...params, - }), - - /** - * No description - * - * @tags DownloadClient - * @name V3DownloadclientDetail - * @request GET:/api/v3/downloadclient/{id} - * @secure - */ - v3DownloadclientDetail: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/downloadclient/${id}`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags DownloadClient - * @name V3DownloadclientBulkUpdate - * @request PUT:/api/v3/downloadclient/bulk - * @secure - */ - v3DownloadclientBulkUpdate: (data: DownloadClientBulkResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/downloadclient/bulk`, - method: "PUT", - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags DownloadClient - * @name V3DownloadclientBulkDelete - * @request DELETE:/api/v3/downloadclient/bulk - * @secure - */ - v3DownloadclientBulkDelete: (data: DownloadClientBulkResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/downloadclient/bulk`, - method: "DELETE", - body: data, - secure: true, - type: ContentType.Json, - ...params, - }), - - /** - * No description - * - * @tags DownloadClient - * @name V3DownloadclientSchemaList - * @request GET:/api/v3/downloadclient/schema - * @secure - */ - v3DownloadclientSchemaList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/downloadclient/schema`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags DownloadClient - * @name V3DownloadclientTestCreate - * @request POST:/api/v3/downloadclient/test - * @secure - */ - v3DownloadclientTestCreate: ( - data: DownloadClientResource, - query?: { - /** @default false */ - forceTest?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/downloadclient/test`, - method: "POST", - query: query, - body: data, - secure: true, - type: ContentType.Json, - ...params, - }), - - /** - * No description - * - * @tags DownloadClient - * @name V3DownloadclientTestallCreate - * @request POST:/api/v3/downloadclient/testall - * @secure - */ - v3DownloadclientTestallCreate: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/downloadclient/testall`, - method: "POST", - secure: true, - ...params, - }), - - /** - * No description - * - * @tags DownloadClient - * @name V3DownloadclientActionCreate - * @request POST:/api/v3/downloadclient/action/{name} - * @secure - */ - v3DownloadclientActionCreate: (name: string, data: DownloadClientResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/downloadclient/action/${name}`, - method: "POST", - body: data, - secure: true, - type: ContentType.Json, - ...params, - }), - - /** - * No description - * - * @tags DownloadClientConfig - * @name V3ConfigDownloadclientList - * @request GET:/api/v3/config/downloadclient - * @secure - */ - v3ConfigDownloadclientList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/config/downloadclient`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags DownloadClientConfig - * @name V3ConfigDownloadclientUpdate - * @request PUT:/api/v3/config/downloadclient/{id} - * @secure - */ - v3ConfigDownloadclientUpdate: (id: string, data: DownloadClientConfigResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/config/downloadclient/${id}`, - method: "PUT", - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags DownloadClientConfig - * @name V3ConfigDownloadclientDetail - * @request GET:/api/v3/config/downloadclient/{id} - * @secure - */ - v3ConfigDownloadclientDetail: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/config/downloadclient/${id}`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags ExtraFile - * @name V3ExtrafileList - * @request GET:/api/v3/extrafile - * @secure - */ - v3ExtrafileList: ( - query?: { - /** @format int32 */ - movieId?: number; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/extrafile`, - method: "GET", - query: query, - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags FileSystem - * @name V3FilesystemList - * @request GET:/api/v3/filesystem - * @secure - */ - v3FilesystemList: ( - query?: { - path?: string; - /** @default false */ - includeFiles?: boolean; - /** @default false */ - allowFoldersWithoutTrailingSlashes?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/filesystem`, - method: "GET", - query: query, - secure: true, - ...params, - }), - - /** - * No description - * - * @tags FileSystem - * @name V3FilesystemTypeList - * @request GET:/api/v3/filesystem/type - * @secure - */ - v3FilesystemTypeList: ( - query?: { - path?: string; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/filesystem/type`, - method: "GET", - query: query, - secure: true, - ...params, - }), - - /** - * No description - * - * @tags FileSystem - * @name V3FilesystemMediafilesList - * @request GET:/api/v3/filesystem/mediafiles - * @secure - */ - v3FilesystemMediafilesList: ( - query?: { - path?: string; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/filesystem/mediafiles`, - method: "GET", - query: query, - secure: true, - ...params, - }), - - /** - * No description - * - * @tags Health - * @name V3HealthList - * @request GET:/api/v3/health - * @secure - */ - v3HealthList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/health`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags History - * @name V3HistoryList - * @request GET:/api/v3/history - * @secure - */ - v3HistoryList: ( - query?: { - /** - * @format int32 - * @default 1 - */ - page?: number; - /** - * @format int32 - * @default 10 - */ - pageSize?: number; - sortKey?: string; - sortDirection?: SortDirection; - includeMovie?: boolean; - eventType?: number[]; - downloadId?: string; - movieIds?: number[]; - languages?: number[]; - quality?: number[]; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/history`, - method: "GET", - query: query, - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags History - * @name V3HistorySinceList - * @request GET:/api/v3/history/since - * @secure - */ - v3HistorySinceList: ( - query?: { - /** @format date-time */ - date?: string; - eventType?: MovieHistoryEventType; - /** @default false */ - includeMovie?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/history/since`, - method: "GET", - query: query, - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags History - * @name V3HistoryMovieList - * @request GET:/api/v3/history/movie - * @secure - */ - v3HistoryMovieList: ( - query?: { - /** @format int32 */ - movieId?: number; - eventType?: MovieHistoryEventType; - /** @default false */ - includeMovie?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/history/movie`, - method: "GET", - query: query, - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags History - * @name V3HistoryFailedCreate - * @request POST:/api/v3/history/failed/{id} - * @secure - */ - v3HistoryFailedCreate: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/history/failed/${id}`, - method: "POST", - secure: true, - ...params, - }), - - /** - * No description - * - * @tags HostConfig - * @name V3ConfigHostList - * @request GET:/api/v3/config/host - * @secure - */ - v3ConfigHostList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/config/host`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags HostConfig - * @name V3ConfigHostUpdate - * @request PUT:/api/v3/config/host/{id} - * @secure - */ - v3ConfigHostUpdate: (id: string, data: HostConfigResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/config/host/${id}`, - method: "PUT", - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags HostConfig - * @name V3ConfigHostDetail - * @request GET:/api/v3/config/host/{id} - * @secure - */ - v3ConfigHostDetail: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/config/host/${id}`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags ImportList - * @name V3ImportlistList - * @request GET:/api/v3/importlist - * @secure - */ - v3ImportlistList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/importlist`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags ImportList - * @name V3ImportlistCreate - * @request POST:/api/v3/importlist - * @secure - */ - v3ImportlistCreate: ( - data: ImportListResource, - query?: { - /** @default false */ - forceSave?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/importlist`, - method: "POST", - query: query, - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags ImportList - * @name V3ImportlistUpdate - * @request PUT:/api/v3/importlist/{id} - * @secure - */ - v3ImportlistUpdate: ( - id: number, - data: ImportListResource, - query?: { - /** @default false */ - forceSave?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/importlist/${id}`, - method: "PUT", - query: query, - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags ImportList - * @name V3ImportlistDelete - * @request DELETE:/api/v3/importlist/{id} - * @secure - */ - v3ImportlistDelete: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/importlist/${id}`, - method: "DELETE", - secure: true, - ...params, - }), - - /** - * No description - * - * @tags ImportList - * @name V3ImportlistDetail - * @request GET:/api/v3/importlist/{id} - * @secure - */ - v3ImportlistDetail: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/importlist/${id}`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags ImportList - * @name V3ImportlistBulkUpdate - * @request PUT:/api/v3/importlist/bulk - * @secure - */ - v3ImportlistBulkUpdate: (data: ImportListBulkResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/importlist/bulk`, - method: "PUT", - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags ImportList - * @name V3ImportlistBulkDelete - * @request DELETE:/api/v3/importlist/bulk - * @secure - */ - v3ImportlistBulkDelete: (data: ImportListBulkResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/importlist/bulk`, - method: "DELETE", - body: data, - secure: true, - type: ContentType.Json, - ...params, - }), - - /** - * No description - * - * @tags ImportList - * @name V3ImportlistSchemaList - * @request GET:/api/v3/importlist/schema - * @secure - */ - v3ImportlistSchemaList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/importlist/schema`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags ImportList - * @name V3ImportlistTestCreate - * @request POST:/api/v3/importlist/test - * @secure - */ - v3ImportlistTestCreate: ( - data: ImportListResource, - query?: { - /** @default false */ - forceTest?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/importlist/test`, - method: "POST", - query: query, - body: data, - secure: true, - type: ContentType.Json, - ...params, - }), - - /** - * No description - * - * @tags ImportList - * @name V3ImportlistTestallCreate - * @request POST:/api/v3/importlist/testall - * @secure - */ - v3ImportlistTestallCreate: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/importlist/testall`, - method: "POST", - secure: true, - ...params, - }), - - /** - * No description - * - * @tags ImportList - * @name V3ImportlistActionCreate - * @request POST:/api/v3/importlist/action/{name} - * @secure - */ - v3ImportlistActionCreate: (name: string, data: ImportListResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/importlist/action/${name}`, - method: "POST", - body: data, - secure: true, - type: ContentType.Json, - ...params, - }), - - /** - * No description - * - * @tags ImportListConfig - * @name V3ConfigImportlistList - * @request GET:/api/v3/config/importlist - * @secure - */ - v3ConfigImportlistList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/config/importlist`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags ImportListConfig - * @name V3ConfigImportlistUpdate - * @request PUT:/api/v3/config/importlist/{id} - * @secure - */ - v3ConfigImportlistUpdate: (id: string, data: ImportListConfigResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/config/importlist/${id}`, - method: "PUT", - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags ImportListConfig - * @name V3ConfigImportlistDetail - * @request GET:/api/v3/config/importlist/{id} - * @secure - */ - v3ConfigImportlistDetail: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/config/importlist/${id}`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags ImportListExclusion - * @name V3ExclusionsList - * @request GET:/api/v3/exclusions - * @deprecated - * @secure - */ - v3ExclusionsList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/exclusions`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags ImportListExclusion - * @name V3ExclusionsCreate - * @request POST:/api/v3/exclusions - * @secure - */ - v3ExclusionsCreate: (data: ImportListExclusionResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/exclusions`, - method: "POST", - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags ImportListExclusion - * @name V3ExclusionsPagedList - * @request GET:/api/v3/exclusions/paged - * @secure - */ - v3ExclusionsPagedList: ( - query?: { - /** - * @format int32 - * @default 1 - */ - page?: number; - /** - * @format int32 - * @default 10 - */ - pageSize?: number; - sortKey?: string; - sortDirection?: SortDirection; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/exclusions/paged`, - method: "GET", - query: query, - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags ImportListExclusion - * @name V3ExclusionsUpdate - * @request PUT:/api/v3/exclusions/{id} - * @secure - */ - v3ExclusionsUpdate: (id: string, data: ImportListExclusionResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/exclusions/${id}`, - method: "PUT", - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags ImportListExclusion - * @name V3ExclusionsDelete - * @request DELETE:/api/v3/exclusions/{id} - * @secure - */ - v3ExclusionsDelete: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/exclusions/${id}`, - method: "DELETE", - secure: true, - ...params, - }), - - /** - * No description - * - * @tags ImportListExclusion - * @name V3ExclusionsDetail - * @request GET:/api/v3/exclusions/{id} - * @secure - */ - v3ExclusionsDetail: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/exclusions/${id}`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags ImportListExclusion - * @name V3ExclusionsBulkCreate - * @request POST:/api/v3/exclusions/bulk - * @secure - */ - v3ExclusionsBulkCreate: (data: ImportListExclusionResource[], params: RequestParams = {}) => - this.request({ - path: `/api/v3/exclusions/bulk`, - method: "POST", - body: data, - secure: true, - type: ContentType.Json, - ...params, - }), - - /** - * No description - * - * @tags ImportListExclusion - * @name V3ExclusionsBulkDelete - * @request DELETE:/api/v3/exclusions/bulk - * @secure - */ - v3ExclusionsBulkDelete: (data: ImportListExclusionBulkResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/exclusions/bulk`, - method: "DELETE", - body: data, - secure: true, - type: ContentType.Json, - ...params, - }), - - /** - * No description - * - * @tags ImportListMovies - * @name V3ImportlistMovieList - * @request GET:/api/v3/importlist/movie - * @secure - */ - v3ImportlistMovieList: ( - query?: { - /** @default false */ - includeRecommendations?: boolean; - /** @default false */ - includeTrending?: boolean; - /** @default false */ - includePopular?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/importlist/movie`, - method: "GET", - query: query, - secure: true, - ...params, - }), - - /** - * No description - * - * @tags ImportListMovies - * @name V3ImportlistMovieCreate - * @request POST:/api/v3/importlist/movie - * @secure - */ - v3ImportlistMovieCreate: (data: MovieResource[], params: RequestParams = {}) => - this.request({ - path: `/api/v3/importlist/movie`, - method: "POST", - body: data, - secure: true, - type: ContentType.Json, - ...params, - }), - - /** - * No description - * - * @tags Indexer - * @name V3IndexerList - * @request GET:/api/v3/indexer - * @secure - */ - v3IndexerList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/indexer`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Indexer - * @name V3IndexerCreate - * @request POST:/api/v3/indexer - * @secure - */ - v3IndexerCreate: ( - data: IndexerResource, - query?: { - /** @default false */ - forceSave?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/indexer`, - method: "POST", - query: query, - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Indexer - * @name V3IndexerUpdate - * @request PUT:/api/v3/indexer/{id} - * @secure - */ - v3IndexerUpdate: ( - id: number, - data: IndexerResource, - query?: { - /** @default false */ - forceSave?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/indexer/${id}`, - method: "PUT", - query: query, - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Indexer - * @name V3IndexerDelete - * @request DELETE:/api/v3/indexer/{id} - * @secure - */ - v3IndexerDelete: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/indexer/${id}`, - method: "DELETE", - secure: true, - ...params, - }), - - /** - * No description - * - * @tags Indexer - * @name V3IndexerDetail - * @request GET:/api/v3/indexer/{id} - * @secure - */ - v3IndexerDetail: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/indexer/${id}`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Indexer - * @name V3IndexerBulkUpdate - * @request PUT:/api/v3/indexer/bulk - * @secure - */ - v3IndexerBulkUpdate: (data: IndexerBulkResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/indexer/bulk`, - method: "PUT", - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Indexer - * @name V3IndexerBulkDelete - * @request DELETE:/api/v3/indexer/bulk - * @secure - */ - v3IndexerBulkDelete: (data: IndexerBulkResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/indexer/bulk`, - method: "DELETE", - body: data, - secure: true, - type: ContentType.Json, - ...params, - }), - - /** - * No description - * - * @tags Indexer - * @name V3IndexerSchemaList - * @request GET:/api/v3/indexer/schema - * @secure - */ - v3IndexerSchemaList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/indexer/schema`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Indexer - * @name V3IndexerTestCreate - * @request POST:/api/v3/indexer/test - * @secure - */ - v3IndexerTestCreate: ( - data: IndexerResource, - query?: { - /** @default false */ - forceTest?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/indexer/test`, - method: "POST", - query: query, - body: data, - secure: true, - type: ContentType.Json, - ...params, - }), - - /** - * No description - * - * @tags Indexer - * @name V3IndexerTestallCreate - * @request POST:/api/v3/indexer/testall - * @secure - */ - v3IndexerTestallCreate: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/indexer/testall`, - method: "POST", - secure: true, - ...params, - }), - - /** - * No description - * - * @tags Indexer - * @name V3IndexerActionCreate - * @request POST:/api/v3/indexer/action/{name} - * @secure - */ - v3IndexerActionCreate: (name: string, data: IndexerResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/indexer/action/${name}`, - method: "POST", - body: data, - secure: true, - type: ContentType.Json, - ...params, - }), - - /** - * No description - * - * @tags IndexerConfig - * @name V3ConfigIndexerList - * @request GET:/api/v3/config/indexer - * @secure - */ - v3ConfigIndexerList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/config/indexer`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags IndexerConfig - * @name V3ConfigIndexerUpdate - * @request PUT:/api/v3/config/indexer/{id} - * @secure - */ - v3ConfigIndexerUpdate: (id: string, data: IndexerConfigResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/config/indexer/${id}`, - method: "PUT", - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags IndexerConfig - * @name V3ConfigIndexerDetail - * @request GET:/api/v3/config/indexer/{id} - * @secure - */ - v3ConfigIndexerDetail: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/config/indexer/${id}`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags IndexerFlag - * @name V3IndexerflagList - * @request GET:/api/v3/indexerflag - * @secure - */ - v3IndexerflagList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/indexerflag`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Language - * @name V3LanguageList - * @request GET:/api/v3/language - * @secure - */ - v3LanguageList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/language`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Language - * @name V3LanguageDetail - * @request GET:/api/v3/language/{id} - * @secure - */ - v3LanguageDetail: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/language/${id}`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Localization - * @name V3LocalizationList - * @request GET:/api/v3/localization - * @secure - */ - v3LocalizationList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/localization`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Localization - * @name V3LocalizationLanguageList - * @request GET:/api/v3/localization/language - * @secure - */ - v3LocalizationLanguageList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/localization/language`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Log - * @name V3LogList - * @request GET:/api/v3/log - * @secure - */ - v3LogList: ( - query?: { - /** - * @format int32 - * @default 1 - */ - page?: number; - /** - * @format int32 - * @default 10 - */ - pageSize?: number; - sortKey?: string; - sortDirection?: SortDirection; - level?: string; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/log`, - method: "GET", - query: query, - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags LogFile - * @name V3LogFileList - * @request GET:/api/v3/log/file - * @secure - */ - v3LogFileList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/log/file`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags LogFile - * @name V3LogFileDetail - * @request GET:/api/v3/log/file/{filename} - * @secure - */ - v3LogFileDetail: (filename: string, params: RequestParams = {}) => - this.request({ - path: `/api/v3/log/file/${filename}`, - method: "GET", - secure: true, - ...params, - }), - - /** - * No description - * - * @tags ManualImport - * @name V3ManualimportList - * @request GET:/api/v3/manualimport - * @secure - */ - v3ManualimportList: ( - query?: { - folder?: string; - downloadId?: string; - /** @format int32 */ - movieId?: number; - /** @default true */ - filterExistingFiles?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/manualimport`, - method: "GET", - query: query, - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags ManualImport - * @name V3ManualimportCreate - * @request POST:/api/v3/manualimport - * @secure - */ - v3ManualimportCreate: (data: ManualImportReprocessResource[], params: RequestParams = {}) => - this.request({ - path: `/api/v3/manualimport`, - method: "POST", - body: data, - secure: true, - type: ContentType.Json, - ...params, - }), - - /** - * No description - * - * @tags MediaCover - * @name V3MediacoverDetail - * @request GET:/api/v3/mediacover/{movieId}/{filename} - * @secure - */ - v3MediacoverDetail: (movieId: number, filename: string, params: RequestParams = {}) => - this.request({ - path: `/api/v3/mediacover/${movieId}/${filename}`, - method: "GET", - secure: true, - ...params, - }), - - /** - * No description - * - * @tags MediaManagementConfig - * @name V3ConfigMediamanagementList - * @request GET:/api/v3/config/mediamanagement - * @secure - */ - v3ConfigMediamanagementList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/config/mediamanagement`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags MediaManagementConfig - * @name V3ConfigMediamanagementUpdate - * @request PUT:/api/v3/config/mediamanagement/{id} - * @secure - */ - v3ConfigMediamanagementUpdate: (id: string, data: MediaManagementConfigResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/config/mediamanagement/${id}`, - method: "PUT", - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags MediaManagementConfig - * @name V3ConfigMediamanagementDetail - * @request GET:/api/v3/config/mediamanagement/{id} - * @secure - */ - v3ConfigMediamanagementDetail: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/config/mediamanagement/${id}`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Metadata - * @name V3MetadataList - * @request GET:/api/v3/metadata - * @secure - */ - v3MetadataList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/metadata`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Metadata - * @name V3MetadataCreate - * @request POST:/api/v3/metadata - * @secure - */ - v3MetadataCreate: ( - data: MetadataResource, - query?: { - /** @default false */ - forceSave?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/metadata`, - method: "POST", - query: query, - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Metadata - * @name V3MetadataUpdate - * @request PUT:/api/v3/metadata/{id} - * @secure - */ - v3MetadataUpdate: ( - id: number, - data: MetadataResource, - query?: { - /** @default false */ - forceSave?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/metadata/${id}`, - method: "PUT", - query: query, - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Metadata - * @name V3MetadataDelete - * @request DELETE:/api/v3/metadata/{id} - * @secure - */ - v3MetadataDelete: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/metadata/${id}`, - method: "DELETE", - secure: true, - ...params, - }), - - /** - * No description - * - * @tags Metadata - * @name V3MetadataDetail - * @request GET:/api/v3/metadata/{id} - * @secure - */ - v3MetadataDetail: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/metadata/${id}`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Metadata - * @name V3MetadataSchemaList - * @request GET:/api/v3/metadata/schema - * @secure - */ - v3MetadataSchemaList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/metadata/schema`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Metadata - * @name V3MetadataTestCreate - * @request POST:/api/v3/metadata/test - * @secure - */ - v3MetadataTestCreate: ( - data: MetadataResource, - query?: { - /** @default false */ - forceTest?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/metadata/test`, - method: "POST", - query: query, - body: data, - secure: true, - type: ContentType.Json, - ...params, - }), - - /** - * No description - * - * @tags Metadata - * @name V3MetadataTestallCreate - * @request POST:/api/v3/metadata/testall - * @secure - */ - v3MetadataTestallCreate: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/metadata/testall`, - method: "POST", - secure: true, - ...params, - }), - - /** - * No description - * - * @tags Metadata - * @name V3MetadataActionCreate - * @request POST:/api/v3/metadata/action/{name} - * @secure - */ - v3MetadataActionCreate: (name: string, data: MetadataResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/metadata/action/${name}`, - method: "POST", - body: data, - secure: true, - type: ContentType.Json, - ...params, - }), - - /** - * No description - * - * @tags MetadataConfig - * @name V3ConfigMetadataList - * @request GET:/api/v3/config/metadata - * @secure - */ - v3ConfigMetadataList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/config/metadata`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags MetadataConfig - * @name V3ConfigMetadataUpdate - * @request PUT:/api/v3/config/metadata/{id} - * @secure - */ - v3ConfigMetadataUpdate: (id: string, data: MetadataConfigResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/config/metadata/${id}`, - method: "PUT", - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags MetadataConfig - * @name V3ConfigMetadataDetail - * @request GET:/api/v3/config/metadata/{id} - * @secure - */ - v3ConfigMetadataDetail: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/config/metadata/${id}`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Missing - * @name V3WantedMissingList - * @request GET:/api/v3/wanted/missing - * @secure - */ - v3WantedMissingList: ( - query?: { - /** - * @format int32 - * @default 1 - */ - page?: number; - /** - * @format int32 - * @default 10 - */ - pageSize?: number; - sortKey?: string; - sortDirection?: SortDirection; - /** @default true */ - monitored?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/wanted/missing`, - method: "GET", - query: query, - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Movie - * @name V3MovieList - * @request GET:/api/v3/movie - * @secure - */ - v3MovieList: ( - query?: { - /** @format int32 */ - tmdbId?: number; - /** @default false */ - excludeLocalCovers?: boolean; - /** @format int32 */ - languageId?: number; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/movie`, - method: "GET", - query: query, - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Movie - * @name V3MovieCreate - * @request POST:/api/v3/movie - * @secure - */ - v3MovieCreate: (data: MovieResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/movie`, - method: "POST", - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Movie - * @name V3MovieUpdate - * @request PUT:/api/v3/movie/{id} - * @secure - */ - v3MovieUpdate: ( - id: string, - data: MovieResource, - query?: { - /** @default false */ - moveFiles?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/movie/${id}`, - method: "PUT", - query: query, - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Movie - * @name V3MovieDelete - * @request DELETE:/api/v3/movie/{id} - * @secure - */ - v3MovieDelete: ( - id: number, - query?: { - /** @default false */ - deleteFiles?: boolean; - /** @default false */ - addImportExclusion?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/movie/${id}`, - method: "DELETE", - query: query, - secure: true, - ...params, - }), - - /** - * No description - * - * @tags Movie - * @name V3MovieDetail - * @request GET:/api/v3/movie/{id} - * @secure - */ - v3MovieDetail: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/movie/${id}`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags MovieEditor - * @name V3MovieEditorUpdate - * @request PUT:/api/v3/movie/editor - * @secure - */ - v3MovieEditorUpdate: (data: MovieEditorResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/movie/editor`, - method: "PUT", - body: data, - secure: true, - type: ContentType.Json, - ...params, - }), - - /** - * No description - * - * @tags MovieEditor - * @name V3MovieEditorDelete - * @request DELETE:/api/v3/movie/editor - * @secure - */ - v3MovieEditorDelete: (data: MovieEditorResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/movie/editor`, - method: "DELETE", - body: data, - secure: true, - type: ContentType.Json, - ...params, - }), - - /** - * No description - * - * @tags MovieFile - * @name V3MoviefileList - * @request GET:/api/v3/moviefile - * @secure - */ - v3MoviefileList: ( - query?: { - movieId?: number[]; - movieFileIds?: number[]; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/moviefile`, - method: "GET", - query: query, - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags MovieFile - * @name V3MoviefileUpdate - * @request PUT:/api/v3/moviefile/{id} - * @secure - */ - v3MoviefileUpdate: (id: string, data: MovieFileResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/moviefile/${id}`, - method: "PUT", - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags MovieFile - * @name V3MoviefileDelete - * @request DELETE:/api/v3/moviefile/{id} - * @secure - */ - v3MoviefileDelete: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/moviefile/${id}`, - method: "DELETE", - secure: true, - ...params, - }), - - /** - * No description - * - * @tags MovieFile - * @name V3MoviefileDetail - * @request GET:/api/v3/moviefile/{id} - * @secure - */ - v3MoviefileDetail: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/moviefile/${id}`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags MovieFile - * @name V3MoviefileEditorUpdate - * @request PUT:/api/v3/moviefile/editor - * @secure - */ - v3MoviefileEditorUpdate: (data: MovieFileListResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/moviefile/editor`, - method: "PUT", - body: data, - secure: true, - type: ContentType.Json, - ...params, - }), - - /** - * No description - * - * @tags MovieFile - * @name V3MoviefileBulkDelete - * @request DELETE:/api/v3/moviefile/bulk - * @secure - */ - v3MoviefileBulkDelete: (data: MovieFileListResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/moviefile/bulk`, - method: "DELETE", - body: data, - secure: true, - type: ContentType.Json, - ...params, - }), - - /** - * No description - * - * @tags MovieImport - * @name V3MovieImportCreate - * @request POST:/api/v3/movie/import - * @secure - */ - v3MovieImportCreate: (data: MovieResource[], params: RequestParams = {}) => - this.request({ - path: `/api/v3/movie/import`, - method: "POST", - body: data, - secure: true, - type: ContentType.Json, - ...params, - }), - - /** - * No description - * - * @tags MovieLookup - * @name V3MovieLookupTmdbList - * @request GET:/api/v3/movie/lookup/tmdb - * @secure - */ - v3MovieLookupTmdbList: ( - query?: { - /** @format int32 */ - tmdbId?: number; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/movie/lookup/tmdb`, - method: "GET", - query: query, - secure: true, - ...params, - }), - - /** - * No description - * - * @tags MovieLookup - * @name V3MovieLookupImdbList - * @request GET:/api/v3/movie/lookup/imdb - * @secure - */ - v3MovieLookupImdbList: ( - query?: { - imdbId?: string; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/movie/lookup/imdb`, - method: "GET", - query: query, - secure: true, - ...params, - }), - - /** - * No description - * - * @tags MovieLookup - * @name V3MovieLookupList - * @request GET:/api/v3/movie/lookup - * @secure - */ - v3MovieLookupList: ( - query?: { - term?: string; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/movie/lookup`, - method: "GET", - query: query, - secure: true, - ...params, - }), - - /** - * No description - * - * @tags NamingConfig - * @name V3ConfigNamingList - * @request GET:/api/v3/config/naming - * @secure - */ - v3ConfigNamingList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/config/naming`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags NamingConfig - * @name V3ConfigNamingUpdate - * @request PUT:/api/v3/config/naming/{id} - * @secure - */ - v3ConfigNamingUpdate: (id: string, data: NamingConfigResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/config/naming/${id}`, - method: "PUT", - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags NamingConfig - * @name V3ConfigNamingDetail - * @request GET:/api/v3/config/naming/{id} - * @secure - */ - v3ConfigNamingDetail: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/config/naming/${id}`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags NamingConfig - * @name V3ConfigNamingExamplesList - * @request GET:/api/v3/config/naming/examples - * @secure - */ - v3ConfigNamingExamplesList: ( - query?: { - renameMovies?: boolean; - replaceIllegalCharacters?: boolean; - colonReplacementFormat?: ColonReplacementFormat; - standardMovieFormat?: string; - movieFolderFormat?: string; - /** @format int32 */ - id?: number; - resourceName?: string; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/config/naming/examples`, - method: "GET", - query: query, - secure: true, - ...params, - }), - - /** - * No description - * - * @tags Notification - * @name V3NotificationList - * @request GET:/api/v3/notification - * @secure - */ - v3NotificationList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/notification`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Notification - * @name V3NotificationCreate - * @request POST:/api/v3/notification - * @secure - */ - v3NotificationCreate: ( - data: NotificationResource, - query?: { - /** @default false */ - forceSave?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/notification`, - method: "POST", - query: query, - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Notification - * @name V3NotificationUpdate - * @request PUT:/api/v3/notification/{id} - * @secure - */ - v3NotificationUpdate: ( - id: number, - data: NotificationResource, - query?: { - /** @default false */ - forceSave?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/notification/${id}`, - method: "PUT", - query: query, - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Notification - * @name V3NotificationDelete - * @request DELETE:/api/v3/notification/{id} - * @secure - */ - v3NotificationDelete: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/notification/${id}`, - method: "DELETE", - secure: true, - ...params, - }), - - /** - * No description - * - * @tags Notification - * @name V3NotificationDetail - * @request GET:/api/v3/notification/{id} - * @secure - */ - v3NotificationDetail: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/notification/${id}`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Notification - * @name V3NotificationSchemaList - * @request GET:/api/v3/notification/schema - * @secure - */ - v3NotificationSchemaList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/notification/schema`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Notification - * @name V3NotificationTestCreate - * @request POST:/api/v3/notification/test - * @secure - */ - v3NotificationTestCreate: ( - data: NotificationResource, - query?: { - /** @default false */ - forceTest?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/notification/test`, - method: "POST", - query: query, - body: data, - secure: true, - type: ContentType.Json, - ...params, - }), - - /** - * No description - * - * @tags Notification - * @name V3NotificationTestallCreate - * @request POST:/api/v3/notification/testall - * @secure - */ - v3NotificationTestallCreate: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/notification/testall`, - method: "POST", - secure: true, - ...params, - }), - - /** - * No description - * - * @tags Notification - * @name V3NotificationActionCreate - * @request POST:/api/v3/notification/action/{name} - * @secure - */ - v3NotificationActionCreate: (name: string, data: NotificationResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/notification/action/${name}`, - method: "POST", - body: data, - secure: true, - type: ContentType.Json, - ...params, - }), - - /** - * No description - * - * @tags Parse - * @name V3ParseList - * @request GET:/api/v3/parse - * @secure - */ - v3ParseList: ( - query?: { - title?: string; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/parse`, - method: "GET", - query: query, - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags QualityDefinition - * @name V3QualitydefinitionUpdate - * @request PUT:/api/v3/qualitydefinition/{id} - * @secure - */ - v3QualitydefinitionUpdate: (id: string, data: QualityDefinitionResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/qualitydefinition/${id}`, - method: "PUT", - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags QualityDefinition - * @name V3QualitydefinitionDetail - * @request GET:/api/v3/qualitydefinition/{id} - * @secure - */ - v3QualitydefinitionDetail: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/qualitydefinition/${id}`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags QualityDefinition - * @name V3QualitydefinitionList - * @request GET:/api/v3/qualitydefinition - * @secure - */ - v3QualitydefinitionList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/qualitydefinition`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags QualityDefinition - * @name V3QualitydefinitionUpdateUpdate - * @request PUT:/api/v3/qualitydefinition/update - * @secure - */ - v3QualitydefinitionUpdateUpdate: (data: QualityDefinitionResource[], params: RequestParams = {}) => - this.request({ - path: `/api/v3/qualitydefinition/update`, - method: "PUT", - body: data, - secure: true, - type: ContentType.Json, - ...params, - }), - - /** - * No description - * - * @tags QualityProfile - * @name V3QualityprofileCreate - * @request POST:/api/v3/qualityprofile - * @secure - */ - v3QualityprofileCreate: (data: QualityProfileResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/qualityprofile`, - method: "POST", - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags QualityProfile - * @name V3QualityprofileList - * @request GET:/api/v3/qualityprofile - * @secure - */ - v3QualityprofileList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/qualityprofile`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags QualityProfile - * @name V3QualityprofileDelete - * @request DELETE:/api/v3/qualityprofile/{id} - * @secure - */ - v3QualityprofileDelete: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/qualityprofile/${id}`, - method: "DELETE", - secure: true, - ...params, - }), - - /** - * No description - * - * @tags QualityProfile - * @name V3QualityprofileUpdate - * @request PUT:/api/v3/qualityprofile/{id} - * @secure - */ - v3QualityprofileUpdate: (id: string, data: QualityProfileResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/qualityprofile/${id}`, - method: "PUT", - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags QualityProfile - * @name V3QualityprofileDetail - * @request GET:/api/v3/qualityprofile/{id} - * @secure - */ - v3QualityprofileDetail: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/qualityprofile/${id}`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags QualityProfileSchema - * @name V3QualityprofileSchemaList - * @request GET:/api/v3/qualityprofile/schema - * @secure - */ - v3QualityprofileSchemaList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/qualityprofile/schema`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Queue - * @name V3QueueDelete - * @request DELETE:/api/v3/queue/{id} - * @secure - */ - v3QueueDelete: ( - id: number, - query?: { - /** @default true */ - removeFromClient?: boolean; - /** @default false */ - blocklist?: boolean; - /** @default false */ - skipRedownload?: boolean; - /** @default false */ - changeCategory?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/queue/${id}`, - method: "DELETE", - query: query, - secure: true, - ...params, - }), - - /** - * No description - * - * @tags Queue - * @name V3QueueBulkDelete - * @request DELETE:/api/v3/queue/bulk - * @secure - */ - v3QueueBulkDelete: ( - data: QueueBulkResource, - query?: { - /** @default true */ - removeFromClient?: boolean; - /** @default false */ - blocklist?: boolean; - /** @default false */ - skipRedownload?: boolean; - /** @default false */ - changeCategory?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/queue/bulk`, - method: "DELETE", - query: query, - body: data, - secure: true, - type: ContentType.Json, - ...params, - }), - - /** - * No description - * - * @tags Queue - * @name V3QueueList - * @request GET:/api/v3/queue - * @secure - */ - v3QueueList: ( - query?: { - /** - * @format int32 - * @default 1 - */ - page?: number; - /** - * @format int32 - * @default 10 - */ - pageSize?: number; - sortKey?: string; - sortDirection?: SortDirection; - /** @default false */ - includeUnknownMovieItems?: boolean; - /** @default false */ - includeMovie?: boolean; - movieIds?: number[]; - protocol?: DownloadProtocol; - languages?: number[]; - /** @format int32 */ - quality?: number; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/queue`, - method: "GET", - query: query, - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags QueueAction - * @name V3QueueGrabCreate - * @request POST:/api/v3/queue/grab/{id} - * @secure - */ - v3QueueGrabCreate: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/queue/grab/${id}`, - method: "POST", - secure: true, - ...params, - }), - - /** - * No description - * - * @tags QueueAction - * @name V3QueueGrabBulkCreate - * @request POST:/api/v3/queue/grab/bulk - * @secure - */ - v3QueueGrabBulkCreate: (data: QueueBulkResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/queue/grab/bulk`, - method: "POST", - body: data, - secure: true, - type: ContentType.Json, - ...params, - }), - - /** - * No description - * - * @tags QueueDetails - * @name V3QueueDetailsList - * @request GET:/api/v3/queue/details - * @secure - */ - v3QueueDetailsList: ( - query?: { - /** @format int32 */ - movieId?: number; - /** @default false */ - includeMovie?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/queue/details`, - method: "GET", - query: query, - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags QueueStatus - * @name V3QueueStatusList - * @request GET:/api/v3/queue/status - * @secure - */ - v3QueueStatusList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/queue/status`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Release - * @name V3ReleaseCreate - * @request POST:/api/v3/release - * @secure - */ - v3ReleaseCreate: (data: ReleaseResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/release`, - method: "POST", - body: data, - secure: true, - type: ContentType.Json, - ...params, - }), - - /** - * No description - * - * @tags Release - * @name V3ReleaseList - * @request GET:/api/v3/release - * @secure - */ - v3ReleaseList: ( - query?: { - /** @format int32 */ - movieId?: number; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/release`, - method: "GET", - query: query, - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags ReleaseProfile - * @name V3ReleaseprofileCreate - * @request POST:/api/v3/releaseprofile - * @secure - */ - v3ReleaseprofileCreate: (data: ReleaseProfileResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/releaseprofile`, - method: "POST", - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags ReleaseProfile - * @name V3ReleaseprofileList - * @request GET:/api/v3/releaseprofile - * @secure - */ - v3ReleaseprofileList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/releaseprofile`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags ReleaseProfile - * @name V3ReleaseprofileDelete - * @request DELETE:/api/v3/releaseprofile/{id} - * @secure - */ - v3ReleaseprofileDelete: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/releaseprofile/${id}`, - method: "DELETE", - secure: true, - ...params, - }), - - /** - * No description - * - * @tags ReleaseProfile - * @name V3ReleaseprofileUpdate - * @request PUT:/api/v3/releaseprofile/{id} - * @secure - */ - v3ReleaseprofileUpdate: (id: string, data: ReleaseProfileResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/releaseprofile/${id}`, - method: "PUT", - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags ReleaseProfile - * @name V3ReleaseprofileDetail - * @request GET:/api/v3/releaseprofile/{id} - * @secure - */ - v3ReleaseprofileDetail: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/releaseprofile/${id}`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags ReleasePush - * @name V3ReleasePushCreate - * @request POST:/api/v3/release/push - * @secure - */ - v3ReleasePushCreate: (data: ReleaseResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/release/push`, - method: "POST", - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags RemotePathMapping - * @name V3RemotepathmappingCreate - * @request POST:/api/v3/remotepathmapping - * @secure - */ - v3RemotepathmappingCreate: (data: RemotePathMappingResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/remotepathmapping`, - method: "POST", - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags RemotePathMapping - * @name V3RemotepathmappingList - * @request GET:/api/v3/remotepathmapping - * @secure - */ - v3RemotepathmappingList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/remotepathmapping`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags RemotePathMapping - * @name V3RemotepathmappingDelete - * @request DELETE:/api/v3/remotepathmapping/{id} - * @secure - */ - v3RemotepathmappingDelete: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/remotepathmapping/${id}`, - method: "DELETE", - secure: true, - ...params, - }), - - /** - * No description - * - * @tags RemotePathMapping - * @name V3RemotepathmappingUpdate - * @request PUT:/api/v3/remotepathmapping/{id} - * @secure - */ - v3RemotepathmappingUpdate: (id: string, data: RemotePathMappingResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/remotepathmapping/${id}`, - method: "PUT", - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags RemotePathMapping - * @name V3RemotepathmappingDetail - * @request GET:/api/v3/remotepathmapping/{id} - * @secure - */ - v3RemotepathmappingDetail: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/remotepathmapping/${id}`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags RenameMovie - * @name V3RenameList - * @request GET:/api/v3/rename - * @secure - */ - v3RenameList: ( - query?: { - /** @format int32 */ - movieId?: number; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/rename`, - method: "GET", - query: query, - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags RootFolder - * @name V3RootfolderCreate - * @request POST:/api/v3/rootfolder - * @secure - */ - v3RootfolderCreate: (data: RootFolderResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/rootfolder`, - method: "POST", - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags RootFolder - * @name V3RootfolderList - * @request GET:/api/v3/rootfolder - * @secure - */ - v3RootfolderList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/rootfolder`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags RootFolder - * @name V3RootfolderDelete - * @request DELETE:/api/v3/rootfolder/{id} - * @secure - */ - v3RootfolderDelete: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/rootfolder/${id}`, - method: "DELETE", - secure: true, - ...params, - }), - - /** - * No description - * - * @tags RootFolder - * @name V3RootfolderDetail - * @request GET:/api/v3/rootfolder/{id} - * @secure - */ - v3RootfolderDetail: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/rootfolder/${id}`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags System - * @name V3SystemStatusList - * @request GET:/api/v3/system/status - * @secure - */ - v3SystemStatusList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/system/status`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags System - * @name V3SystemRoutesList - * @request GET:/api/v3/system/routes - * @secure - */ - v3SystemRoutesList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/system/routes`, - method: "GET", - secure: true, - ...params, - }), - - /** - * No description - * - * @tags System - * @name V3SystemRoutesDuplicateList - * @request GET:/api/v3/system/routes/duplicate - * @secure - */ - v3SystemRoutesDuplicateList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/system/routes/duplicate`, - method: "GET", - secure: true, - ...params, - }), - - /** - * No description - * - * @tags System - * @name V3SystemShutdownCreate - * @request POST:/api/v3/system/shutdown - * @secure - */ - v3SystemShutdownCreate: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/system/shutdown`, - method: "POST", - secure: true, - ...params, - }), - - /** - * No description - * - * @tags System - * @name V3SystemRestartCreate - * @request POST:/api/v3/system/restart - * @secure - */ - v3SystemRestartCreate: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/system/restart`, - method: "POST", - secure: true, - ...params, - }), - - /** - * No description - * - * @tags Tag - * @name V3TagList - * @request GET:/api/v3/tag - * @secure - */ - v3TagList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/tag`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Tag - * @name V3TagCreate - * @request POST:/api/v3/tag - * @secure - */ - v3TagCreate: (data: TagResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/tag`, - method: "POST", - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Tag - * @name V3TagUpdate - * @request PUT:/api/v3/tag/{id} - * @secure - */ - v3TagUpdate: (id: string, data: TagResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/tag/${id}`, - method: "PUT", - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Tag - * @name V3TagDelete - * @request DELETE:/api/v3/tag/{id} - * @secure - */ - v3TagDelete: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/tag/${id}`, - method: "DELETE", - secure: true, - ...params, - }), - - /** - * No description - * - * @tags Tag - * @name V3TagDetail - * @request GET:/api/v3/tag/{id} - * @secure - */ - v3TagDetail: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/tag/${id}`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags TagDetails - * @name V3TagDetailList - * @request GET:/api/v3/tag/detail - * @secure - */ - v3TagDetailList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/tag/detail`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags TagDetails - * @name V3TagDetailDetail - * @request GET:/api/v3/tag/detail/{id} - * @secure - */ - v3TagDetailDetail: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/tag/detail/${id}`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Task - * @name V3SystemTaskList - * @request GET:/api/v3/system/task - * @secure - */ - v3SystemTaskList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/system/task`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Task - * @name V3SystemTaskDetail - * @request GET:/api/v3/system/task/{id} - * @secure - */ - v3SystemTaskDetail: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/system/task/${id}`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags UiConfig - * @name V3ConfigUiUpdate - * @request PUT:/api/v3/config/ui/{id} - * @secure - */ - v3ConfigUiUpdate: (id: string, data: UiConfigResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/config/ui/${id}`, - method: "PUT", - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags UiConfig - * @name V3ConfigUiDetail - * @request GET:/api/v3/config/ui/{id} - * @secure - */ - v3ConfigUiDetail: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/config/ui/${id}`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags UiConfig - * @name V3ConfigUiList - * @request GET:/api/v3/config/ui - * @secure - */ - v3ConfigUiList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/config/ui`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Update - * @name V3UpdateList - * @request GET:/api/v3/update - * @secure - */ - v3UpdateList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/update`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags UpdateLogFile - * @name V3LogFileUpdateList - * @request GET:/api/v3/log/file/update - * @secure - */ - v3LogFileUpdateList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/log/file/update`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags UpdateLogFile - * @name V3LogFileUpdateDetail - * @request GET:/api/v3/log/file/update/{filename} - * @secure - */ - v3LogFileUpdateDetail: (filename: string, params: RequestParams = {}) => - this.request({ - path: `/api/v3/log/file/update/${filename}`, - method: "GET", - secure: true, - ...params, - }), - }; - login = { - /** - * No description - * - * @tags Authentication - * @name LoginCreate - * @request POST:/login - * @secure - */ - loginCreate: ( - data: { - username?: string; - password?: string; - rememberMe?: string; - }, - query?: { - returnUrl?: string; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/login`, - method: "POST", - query: query, - body: data, - secure: true, - type: ContentType.FormData, - ...params, - }), - - /** - * No description - * - * @tags StaticResource - * @name LoginList - * @request GET:/login - * @secure - */ - loginList: (params: RequestParams = {}) => - this.request({ - path: `/login`, - method: "GET", - secure: true, - ...params, - }), - }; - logout = { - /** - * No description - * - * @tags Authentication - * @name LogoutList - * @request GET:/logout - * @secure - */ - logoutList: (params: RequestParams = {}) => - this.request({ - path: `/logout`, - method: "GET", - secure: true, - ...params, - }), - }; - feed = { - /** - * No description - * - * @tags CalendarFeed - * @name V3CalendarRadarrIcsList - * @request GET:/feed/v3/calendar/radarr.ics - * @secure - */ - v3CalendarRadarrIcsList: ( - query?: { - /** - * @format int32 - * @default 7 - */ - pastDays?: number; - /** - * @format int32 - * @default 28 - */ - futureDays?: number; - /** @default "" */ - tags?: string; - /** @default false */ - unmonitored?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/feed/v3/calendar/radarr.ics`, - method: "GET", - query: query, - secure: true, - ...params, - }), - }; - ping = { - /** - * No description - * - * @tags Ping - * @name PingList - * @request GET:/ping - * @secure - */ - pingList: (params: RequestParams = {}) => - this.request({ - path: `/ping`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Ping - * @name HeadPing - * @request HEAD:/ping - * @secure - */ - headPing: (params: RequestParams = {}) => - this.request({ - path: `/ping`, - method: "HEAD", - secure: true, - format: "json", - ...params, - }), - }; - content = { - /** - * No description - * - * @tags StaticResource - * @name ContentDetail - * @request GET:/content/{path} - * @secure - */ - contentDetail: (path: string, params: RequestParams = {}) => - this.request({ - path: `/content/${path}`, - method: "GET", - secure: true, - ...params, - }), - }; - path = { - /** - * No description - * - * @tags StaticResource - * @name GetPath - * @request GET:/{path} - * @secure - */ - getPath: (path: string, params: RequestParams = {}) => - this.request({ - path: `/${path}`, - method: "GET", - secure: true, - ...params, - }), - }; -} diff --git a/src/__generated__/generated-sonarr-api.ts b/src/__generated__/generated-sonarr-api.ts deleted file mode 100644 index 4fe2634..0000000 --- a/src/__generated__/generated-sonarr-api.ts +++ /dev/null @@ -1,6531 +0,0 @@ -/* eslint-disable */ -/* tslint:disable */ -/* - * --------------------------------------------------------------- - * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## - * ## ## - * ## AUTHOR: acacode ## - * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## - * --------------------------------------------------------------- - */ - -export interface AddSeriesOptions { - ignoreEpisodesWithFiles?: boolean; - ignoreEpisodesWithoutFiles?: boolean; - monitor?: MonitorTypes; - searchForMissingEpisodes?: boolean; - searchForCutoffUnmetEpisodes?: boolean; -} - -export interface AlternateTitleResource { - title?: string | null; - /** @format int32 */ - seasonNumber?: number | null; - /** @format int32 */ - sceneSeasonNumber?: number | null; - sceneOrigin?: string | null; - comment?: string | null; -} - -export enum ApplyTags { - Add = "add", - Remove = "remove", - Replace = "replace", -} - -export enum AuthenticationRequiredType { - Enabled = "enabled", - DisabledForLocalAddresses = "disabledForLocalAddresses", -} - -export enum AuthenticationType { - None = "none", - Basic = "basic", - Forms = "forms", - External = "external", -} - -export interface AutoTaggingResource { - /** @format int32 */ - id?: number; - name?: string | null; - removeTagsAutomatically?: boolean; - /** @uniqueItems true */ - tags?: number[] | null; - specifications?: AutoTaggingSpecificationSchema[] | null; -} - -export interface AutoTaggingSpecificationSchema { - /** @format int32 */ - id?: number; - name?: string | null; - implementation?: string | null; - implementationName?: string | null; - negate?: boolean; - required?: boolean; - fields?: Field[] | null; -} - -export interface BackupResource { - /** @format int32 */ - id?: number; - name?: string | null; - path?: string | null; - type?: BackupType; - /** @format int64 */ - size?: number; - /** @format date-time */ - time?: string; -} - -export enum BackupType { - Scheduled = "scheduled", - Manual = "manual", - Update = "update", -} - -export interface BlocklistBulkResource { - ids?: number[] | null; -} - -export interface BlocklistResource { - /** @format int32 */ - id?: number; - /** @format int32 */ - seriesId?: number; - episodeIds?: number[] | null; - sourceTitle?: string | null; - languages?: Language[] | null; - quality?: QualityModel; - customFormats?: CustomFormatResource[] | null; - /** @format date-time */ - date?: string; - protocol?: DownloadProtocol; - indexer?: string | null; - message?: string | null; - series?: SeriesResource; -} - -export interface BlocklistResourcePagingResource { - /** @format int32 */ - page?: number; - /** @format int32 */ - pageSize?: number; - sortKey?: string | null; - sortDirection?: SortDirection; - /** @format int32 */ - totalRecords?: number; - records?: BlocklistResource[] | null; -} - -export enum CertificateValidationType { - Enabled = "enabled", - DisabledForLocalAddresses = "disabledForLocalAddresses", - Disabled = "disabled", -} - -export interface Command { - sendUpdatesToClient?: boolean; - updateScheduledTask?: boolean; - completionMessage?: string | null; - requiresDiskAccess?: boolean; - isExclusive?: boolean; - isLongRunning?: boolean; - name?: string | null; - /** @format date-time */ - lastExecutionTime?: string | null; - /** @format date-time */ - lastStartTime?: string | null; - trigger?: CommandTrigger; - suppressMessages?: boolean; - clientUserAgent?: string | null; -} - -export enum CommandPriority { - Normal = "normal", - High = "high", - Low = "low", -} - -export interface CommandResource { - /** @format int32 */ - id?: number; - name?: string | null; - commandName?: string | null; - message?: string | null; - body?: Command; - priority?: CommandPriority; - status?: CommandStatus; - result?: CommandResult; - /** @format date-time */ - queued?: string; - /** @format date-time */ - started?: string | null; - /** @format date-time */ - ended?: string | null; - /** @format date-span */ - duration?: string | null; - exception?: string | null; - trigger?: CommandTrigger; - clientUserAgent?: string | null; - /** @format date-time */ - stateChangeTime?: string | null; - sendUpdatesToClient?: boolean; - updateScheduledTask?: boolean; - /** @format date-time */ - lastExecutionTime?: string | null; -} - -export enum CommandResult { - Unknown = "unknown", - Successful = "successful", - Unsuccessful = "unsuccessful", -} - -export enum CommandStatus { - Queued = "queued", - Started = "started", - Completed = "completed", - Failed = "failed", - Aborted = "aborted", - Cancelled = "cancelled", - Orphaned = "orphaned", -} - -export enum CommandTrigger { - Unspecified = "unspecified", - Manual = "manual", - Scheduled = "scheduled", -} - -export interface CustomFilterResource { - /** @format int32 */ - id?: number; - type?: string | null; - label?: string | null; - filters?: Record[] | null; -} - -export interface CustomFormatBulkResource { - /** @uniqueItems true */ - ids?: number[] | null; - includeCustomFormatWhenRenaming?: boolean | null; -} - -export interface CustomFormatResource { - /** @format int32 */ - id?: number; - name?: string | null; - includeCustomFormatWhenRenaming?: boolean | null; - specifications?: CustomFormatSpecificationSchema[] | null; -} - -export interface CustomFormatSpecificationSchema { - /** @format int32 */ - id?: number; - name?: string | null; - implementation?: string | null; - implementationName?: string | null; - infoLink?: string | null; - negate?: boolean; - required?: boolean; - fields?: Field[] | null; - presets?: CustomFormatSpecificationSchema[] | null; -} - -export enum DatabaseType { - SqLite = "sqLite", - PostgreSQL = "postgreSQL", -} - -export interface DelayProfileResource { - /** @format int32 */ - id?: number; - enableUsenet?: boolean; - enableTorrent?: boolean; - preferredProtocol?: DownloadProtocol; - /** @format int32 */ - usenetDelay?: number; - /** @format int32 */ - torrentDelay?: number; - bypassIfHighestQuality?: boolean; - bypassIfAboveCustomFormatScore?: boolean; - /** @format int32 */ - minimumCustomFormatScore?: number; - /** @format int32 */ - order?: number; - /** @uniqueItems true */ - tags?: number[] | null; -} - -export interface DiskSpaceResource { - /** @format int32 */ - id?: number; - path?: string | null; - label?: string | null; - /** @format int64 */ - freeSpace?: number; - /** @format int64 */ - totalSpace?: number; -} - -export interface DownloadClientBulkResource { - ids?: number[] | null; - tags?: number[] | null; - applyTags?: ApplyTags; - enable?: boolean | null; - /** @format int32 */ - priority?: number | null; - removeCompletedDownloads?: boolean | null; - removeFailedDownloads?: boolean | null; -} - -export interface DownloadClientConfigResource { - /** @format int32 */ - id?: number; - downloadClientWorkingFolders?: string | null; - enableCompletedDownloadHandling?: boolean; - autoRedownloadFailed?: boolean; - autoRedownloadFailedFromInteractiveSearch?: boolean; -} - -export interface DownloadClientResource { - /** @format int32 */ - id?: number; - name?: string | null; - fields?: Field[] | null; - implementationName?: string | null; - implementation?: string | null; - configContract?: string | null; - infoLink?: string | null; - message?: ProviderMessage; - /** @uniqueItems true */ - tags?: number[] | null; - presets?: DownloadClientResource[] | null; - enable?: boolean; - protocol?: DownloadProtocol; - /** @format int32 */ - priority?: number; - removeCompletedDownloads?: boolean; - removeFailedDownloads?: boolean; -} - -export enum DownloadProtocol { - Unknown = "unknown", - Usenet = "usenet", - Torrent = "torrent", -} - -export interface EpisodeFileListResource { - episodeFileIds?: number[] | null; - languages?: Language[] | null; - quality?: QualityModel; - sceneName?: string | null; - releaseGroup?: string | null; -} - -export interface EpisodeFileResource { - /** @format int32 */ - id?: number; - /** @format int32 */ - seriesId?: number; - /** @format int32 */ - seasonNumber?: number; - relativePath?: string | null; - path?: string | null; - /** @format int64 */ - size?: number; - /** @format date-time */ - dateAdded?: string; - sceneName?: string | null; - releaseGroup?: string | null; - languages?: Language[] | null; - quality?: QualityModel; - customFormats?: CustomFormatResource[] | null; - /** @format int32 */ - customFormatScore?: number; - /** @format int32 */ - indexerFlags?: number | null; - releaseType?: ReleaseType; - mediaInfo?: MediaInfoResource; - qualityCutoffNotMet?: boolean; -} - -export enum EpisodeHistoryEventType { - Unknown = "unknown", - Grabbed = "grabbed", - SeriesFolderImported = "seriesFolderImported", - DownloadFolderImported = "downloadFolderImported", - DownloadFailed = "downloadFailed", - EpisodeFileDeleted = "episodeFileDeleted", - EpisodeFileRenamed = "episodeFileRenamed", - DownloadIgnored = "downloadIgnored", -} - -export interface EpisodeResource { - /** @format int32 */ - id?: number; - /** @format int32 */ - seriesId?: number; - /** @format int32 */ - tvdbId?: number; - /** @format int32 */ - episodeFileId?: number; - /** @format int32 */ - seasonNumber?: number; - /** @format int32 */ - episodeNumber?: number; - title?: string | null; - airDate?: string | null; - /** @format date-time */ - airDateUtc?: string | null; - /** @format date-time */ - lastSearchTime?: string | null; - /** @format int32 */ - runtime?: number; - finaleType?: string | null; - overview?: string | null; - episodeFile?: EpisodeFileResource; - hasFile?: boolean; - monitored?: boolean; - /** @format int32 */ - absoluteEpisodeNumber?: number | null; - /** @format int32 */ - sceneAbsoluteEpisodeNumber?: number | null; - /** @format int32 */ - sceneEpisodeNumber?: number | null; - /** @format int32 */ - sceneSeasonNumber?: number | null; - unverifiedSceneNumbering?: boolean; - /** @format date-time */ - endTime?: string | null; - /** @format date-time */ - grabDate?: string | null; - series?: SeriesResource; - images?: MediaCover[] | null; -} - -export interface EpisodeResourcePagingResource { - /** @format int32 */ - page?: number; - /** @format int32 */ - pageSize?: number; - sortKey?: string | null; - sortDirection?: SortDirection; - /** @format int32 */ - totalRecords?: number; - records?: EpisodeResource[] | null; -} - -export enum EpisodeTitleRequiredType { - Always = "always", - BulkSeasonReleases = "bulkSeasonReleases", - Never = "never", -} - -export interface EpisodesMonitoredResource { - episodeIds?: number[] | null; - monitored?: boolean; -} - -export interface Field { - /** @format int32 */ - order?: number; - name?: string | null; - label?: string | null; - unit?: string | null; - helpText?: string | null; - helpTextWarning?: string | null; - helpLink?: string | null; - value?: any; - type?: string | null; - advanced?: boolean; - selectOptions?: SelectOption[] | null; - selectOptionsProviderAction?: string | null; - section?: string | null; - hidden?: string | null; - privacy?: PrivacyLevel; - placeholder?: string | null; - isFloat?: boolean; -} - -export enum FileDateType { - None = "none", - LocalAirDate = "localAirDate", - UtcAirDate = "utcAirDate", -} - -export enum HealthCheckResult { - Ok = "ok", - Notice = "notice", - Warning = "warning", - Error = "error", -} - -export interface HealthResource { - /** @format int32 */ - id?: number; - source?: string | null; - type?: HealthCheckResult; - message?: string | null; - wikiUrl?: HttpUri; -} - -export interface HistoryResource { - /** @format int32 */ - id?: number; - /** @format int32 */ - episodeId?: number; - /** @format int32 */ - seriesId?: number; - sourceTitle?: string | null; - languages?: Language[] | null; - quality?: QualityModel; - customFormats?: CustomFormatResource[] | null; - /** @format int32 */ - customFormatScore?: number; - qualityCutoffNotMet?: boolean; - /** @format date-time */ - date?: string; - downloadId?: string | null; - eventType?: EpisodeHistoryEventType; - data?: Record; - episode?: EpisodeResource; - series?: SeriesResource; -} - -export interface HistoryResourcePagingResource { - /** @format int32 */ - page?: number; - /** @format int32 */ - pageSize?: number; - sortKey?: string | null; - sortDirection?: SortDirection; - /** @format int32 */ - totalRecords?: number; - records?: HistoryResource[] | null; -} - -export interface HostConfigResource { - /** @format int32 */ - id?: number; - bindAddress?: string | null; - /** @format int32 */ - port?: number; - /** @format int32 */ - sslPort?: number; - enableSsl?: boolean; - launchBrowser?: boolean; - authenticationMethod?: AuthenticationType; - authenticationRequired?: AuthenticationRequiredType; - analyticsEnabled?: boolean; - username?: string | null; - password?: string | null; - passwordConfirmation?: string | null; - logLevel?: string | null; - /** @format int32 */ - logSizeLimit?: number; - consoleLogLevel?: string | null; - branch?: string | null; - apiKey?: string | null; - sslCertPath?: string | null; - sslCertPassword?: string | null; - urlBase?: string | null; - instanceName?: string | null; - applicationUrl?: string | null; - updateAutomatically?: boolean; - updateMechanism?: UpdateMechanism; - updateScriptPath?: string | null; - proxyEnabled?: boolean; - proxyType?: ProxyType; - proxyHostname?: string | null; - /** @format int32 */ - proxyPort?: number; - proxyUsername?: string | null; - proxyPassword?: string | null; - proxyBypassFilter?: string | null; - proxyBypassLocalAddresses?: boolean; - certificateValidation?: CertificateValidationType; - backupFolder?: string | null; - /** @format int32 */ - backupInterval?: number; - /** @format int32 */ - backupRetention?: number; -} - -export interface HttpUri { - fullUri?: string | null; - scheme?: string | null; - host?: string | null; - /** @format int32 */ - port?: number | null; - path?: string | null; - query?: string | null; - fragment?: string | null; -} - -export interface ImportListBulkResource { - ids?: number[] | null; - tags?: number[] | null; - applyTags?: ApplyTags; - enableAutomaticAdd?: boolean | null; - rootFolderPath?: string | null; - /** @format int32 */ - qualityProfileId?: number | null; -} - -export interface ImportListConfigResource { - /** @format int32 */ - id?: number; - listSyncLevel?: ListSyncLevelType; - /** @format int32 */ - listSyncTag?: number; -} - -export interface ImportListExclusionBulkResource { - /** @uniqueItems true */ - ids?: number[] | null; -} - -export interface ImportListExclusionResource { - /** @format int32 */ - id?: number; - /** @format int32 */ - tvdbId?: number; - title?: string | null; -} - -export interface ImportListExclusionResourcePagingResource { - /** @format int32 */ - page?: number; - /** @format int32 */ - pageSize?: number; - sortKey?: string | null; - sortDirection?: SortDirection; - /** @format int32 */ - totalRecords?: number; - records?: ImportListExclusionResource[] | null; -} - -export interface ImportListResource { - /** @format int32 */ - id?: number; - name?: string | null; - fields?: Field[] | null; - implementationName?: string | null; - implementation?: string | null; - configContract?: string | null; - infoLink?: string | null; - message?: ProviderMessage; - /** @uniqueItems true */ - tags?: number[] | null; - presets?: ImportListResource[] | null; - enableAutomaticAdd?: boolean; - searchForMissingEpisodes?: boolean; - shouldMonitor?: MonitorTypes; - monitorNewItems?: NewItemMonitorTypes; - rootFolderPath?: string | null; - /** @format int32 */ - qualityProfileId?: number; - seriesType?: SeriesTypes; - seasonFolder?: boolean; - listType?: ImportListType; - /** @format int32 */ - listOrder?: number; - /** @format date-span */ - minRefreshInterval?: string; -} - -export enum ImportListType { - Program = "program", - Plex = "plex", - Trakt = "trakt", - Simkl = "simkl", - Other = "other", - Advanced = "advanced", -} - -export interface IndexerBulkResource { - ids?: number[] | null; - tags?: number[] | null; - applyTags?: ApplyTags; - enableRss?: boolean | null; - enableAutomaticSearch?: boolean | null; - enableInteractiveSearch?: boolean | null; - /** @format int32 */ - priority?: number | null; -} - -export interface IndexerConfigResource { - /** @format int32 */ - id?: number; - /** @format int32 */ - minimumAge?: number; - /** @format int32 */ - retention?: number; - /** @format int32 */ - maximumSize?: number; - /** @format int32 */ - rssSyncInterval?: number; -} - -export interface IndexerFlagResource { - /** @format int32 */ - id?: number; - name?: string | null; - nameLower?: string | null; -} - -export interface IndexerResource { - /** @format int32 */ - id?: number; - name?: string | null; - fields?: Field[] | null; - implementationName?: string | null; - implementation?: string | null; - configContract?: string | null; - infoLink?: string | null; - message?: ProviderMessage; - /** @uniqueItems true */ - tags?: number[] | null; - presets?: IndexerResource[] | null; - enableRss?: boolean; - enableAutomaticSearch?: boolean; - enableInteractiveSearch?: boolean; - supportsRss?: boolean; - supportsSearch?: boolean; - protocol?: DownloadProtocol; - /** @format int32 */ - priority?: number; - /** @format int32 */ - seasonSearchMaximumSingleEpisodeAge?: number; - /** @format int32 */ - downloadClientId?: number; -} - -export interface Language { - /** @format int32 */ - id?: number; - name?: string | null; -} - -export interface LanguageProfileItemResource { - /** @format int32 */ - id?: number; - language?: Language; - allowed?: boolean; -} - -export interface LanguageProfileResource { - /** @format int32 */ - id?: number; - name?: string | null; - upgradeAllowed?: boolean; - cutoff?: Language; - languages?: LanguageProfileItemResource[] | null; -} - -export interface LanguageResource { - /** @format int32 */ - id?: number; - name?: string | null; - nameLower?: string | null; -} - -export enum ListSyncLevelType { - Disabled = "disabled", - LogOnly = "logOnly", - KeepAndUnmonitor = "keepAndUnmonitor", - KeepAndTag = "keepAndTag", -} - -export interface LocalizationLanguageResource { - identifier?: string | null; -} - -export interface LocalizationResource { - /** @format int32 */ - id?: number; - strings?: Record; -} - -export interface LogFileResource { - /** @format int32 */ - id?: number; - filename?: string | null; - /** @format date-time */ - lastWriteTime?: string; - contentsUrl?: string | null; - downloadUrl?: string | null; -} - -export interface LogResource { - /** @format int32 */ - id?: number; - /** @format date-time */ - time?: string; - exception?: string | null; - exceptionType?: string | null; - level?: string | null; - logger?: string | null; - message?: string | null; - method?: string | null; -} - -export interface LogResourcePagingResource { - /** @format int32 */ - page?: number; - /** @format int32 */ - pageSize?: number; - sortKey?: string | null; - sortDirection?: SortDirection; - /** @format int32 */ - totalRecords?: number; - records?: LogResource[] | null; -} - -export interface ManualImportReprocessResource { - /** @format int32 */ - id?: number; - path?: string | null; - /** @format int32 */ - seriesId?: number; - /** @format int32 */ - seasonNumber?: number | null; - episodes?: EpisodeResource[] | null; - episodeIds?: number[] | null; - quality?: QualityModel; - languages?: Language[] | null; - releaseGroup?: string | null; - downloadId?: string | null; - customFormats?: CustomFormatResource[] | null; - /** @format int32 */ - customFormatScore?: number; - /** @format int32 */ - indexerFlags?: number; - releaseType?: ReleaseType; - rejections?: Rejection[] | null; -} - -export interface ManualImportResource { - /** @format int32 */ - id?: number; - path?: string | null; - relativePath?: string | null; - folderName?: string | null; - name?: string | null; - /** @format int64 */ - size?: number; - series?: SeriesResource; - /** @format int32 */ - seasonNumber?: number | null; - episodes?: EpisodeResource[] | null; - /** @format int32 */ - episodeFileId?: number | null; - releaseGroup?: string | null; - quality?: QualityModel; - languages?: Language[] | null; - /** @format int32 */ - qualityWeight?: number; - downloadId?: string | null; - customFormats?: CustomFormatResource[] | null; - /** @format int32 */ - customFormatScore?: number; - /** @format int32 */ - indexerFlags?: number; - releaseType?: ReleaseType; - rejections?: Rejection[] | null; -} - -export interface MediaCover { - coverType?: MediaCoverTypes; - url?: string | null; - remoteUrl?: string | null; -} - -export enum MediaCoverTypes { - Unknown = "unknown", - Poster = "poster", - Banner = "banner", - Fanart = "fanart", - Screenshot = "screenshot", - Headshot = "headshot", - Clearlogo = "clearlogo", -} - -export interface MediaInfoResource { - /** @format int32 */ - id?: number; - /** @format int64 */ - audioBitrate?: number; - /** @format double */ - audioChannels?: number; - audioCodec?: string | null; - audioLanguages?: string | null; - /** @format int32 */ - audioStreamCount?: number; - /** @format int32 */ - videoBitDepth?: number; - /** @format int64 */ - videoBitrate?: number; - videoCodec?: string | null; - /** @format double */ - videoFps?: number; - videoDynamicRange?: string | null; - videoDynamicRangeType?: string | null; - resolution?: string | null; - runTime?: string | null; - scanType?: string | null; - subtitles?: string | null; -} - -export interface MediaManagementConfigResource { - /** @format int32 */ - id?: number; - autoUnmonitorPreviouslyDownloadedEpisodes?: boolean; - recycleBin?: string | null; - /** @format int32 */ - recycleBinCleanupDays?: number; - downloadPropersAndRepacks?: ProperDownloadTypes; - createEmptySeriesFolders?: boolean; - deleteEmptyFolders?: boolean; - fileDate?: FileDateType; - rescanAfterRefresh?: RescanAfterRefreshType; - setPermissionsLinux?: boolean; - chmodFolder?: string | null; - chownGroup?: string | null; - episodeTitleRequired?: EpisodeTitleRequiredType; - skipFreeSpaceCheckWhenImporting?: boolean; - /** @format int32 */ - minimumFreeSpaceWhenImporting?: number; - copyUsingHardlinks?: boolean; - useScriptImport?: boolean; - scriptImportPath?: string | null; - importExtraFiles?: boolean; - extraFileExtensions?: string | null; - enableMediaInfo?: boolean; -} - -export interface MetadataResource { - /** @format int32 */ - id?: number; - name?: string | null; - fields?: Field[] | null; - implementationName?: string | null; - implementation?: string | null; - configContract?: string | null; - infoLink?: string | null; - message?: ProviderMessage; - /** @uniqueItems true */ - tags?: number[] | null; - presets?: MetadataResource[] | null; - enable?: boolean; -} - -export enum MonitorTypes { - Unknown = "unknown", - All = "all", - Future = "future", - Missing = "missing", - Existing = "existing", - FirstSeason = "firstSeason", - LastSeason = "lastSeason", - LatestSeason = "latestSeason", - Pilot = "pilot", - Recent = "recent", - MonitorSpecials = "monitorSpecials", - UnmonitorSpecials = "unmonitorSpecials", - None = "none", - Skip = "skip", -} - -export interface MonitoringOptions { - ignoreEpisodesWithFiles?: boolean; - ignoreEpisodesWithoutFiles?: boolean; - monitor?: MonitorTypes; -} - -export interface NamingConfigResource { - /** @format int32 */ - id?: number; - renameEpisodes?: boolean; - replaceIllegalCharacters?: boolean; - /** @format int32 */ - colonReplacementFormat?: number; - customColonReplacementFormat?: string | null; - /** @format int32 */ - multiEpisodeStyle?: number; - standardEpisodeFormat?: string | null; - dailyEpisodeFormat?: string | null; - animeEpisodeFormat?: string | null; - seriesFolderFormat?: string | null; - seasonFolderFormat?: string | null; - specialsFolderFormat?: string | null; -} - -export enum NewItemMonitorTypes { - All = "all", - None = "none", -} - -export interface NotificationResource { - /** @format int32 */ - id?: number; - name?: string | null; - fields?: Field[] | null; - implementationName?: string | null; - implementation?: string | null; - configContract?: string | null; - infoLink?: string | null; - message?: ProviderMessage; - /** @uniqueItems true */ - tags?: number[] | null; - presets?: NotificationResource[] | null; - link?: string | null; - onGrab?: boolean; - onDownload?: boolean; - onUpgrade?: boolean; - onImportComplete?: boolean; - onRename?: boolean; - onSeriesAdd?: boolean; - onSeriesDelete?: boolean; - onEpisodeFileDelete?: boolean; - onEpisodeFileDeleteForUpgrade?: boolean; - onHealthIssue?: boolean; - includeHealthWarnings?: boolean; - onHealthRestored?: boolean; - onApplicationUpdate?: boolean; - onManualInteractionRequired?: boolean; - supportsOnGrab?: boolean; - supportsOnDownload?: boolean; - supportsOnUpgrade?: boolean; - supportsOnImportComplete?: boolean; - supportsOnRename?: boolean; - supportsOnSeriesAdd?: boolean; - supportsOnSeriesDelete?: boolean; - supportsOnEpisodeFileDelete?: boolean; - supportsOnEpisodeFileDeleteForUpgrade?: boolean; - supportsOnHealthIssue?: boolean; - supportsOnHealthRestored?: boolean; - supportsOnApplicationUpdate?: boolean; - supportsOnManualInteractionRequired?: boolean; - testCommand?: string | null; -} - -export interface ParseResource { - /** @format int32 */ - id?: number; - title?: string | null; - parsedEpisodeInfo?: ParsedEpisodeInfo; - series?: SeriesResource; - episodes?: EpisodeResource[] | null; - languages?: Language[] | null; - customFormats?: CustomFormatResource[] | null; - /** @format int32 */ - customFormatScore?: number; -} - -export interface ParsedEpisodeInfo { - releaseTitle?: string | null; - seriesTitle?: string | null; - seriesTitleInfo?: SeriesTitleInfo; - quality?: QualityModel; - /** @format int32 */ - seasonNumber?: number; - episodeNumbers?: number[] | null; - absoluteEpisodeNumbers?: number[] | null; - specialAbsoluteEpisodeNumbers?: number[] | null; - airDate?: string | null; - languages?: Language[] | null; - fullSeason?: boolean; - isPartialSeason?: boolean; - isMultiSeason?: boolean; - isSeasonExtra?: boolean; - isSplitEpisode?: boolean; - isMiniSeries?: boolean; - special?: boolean; - releaseGroup?: string | null; - releaseHash?: string | null; - /** @format int32 */ - seasonPart?: number; - releaseTokens?: string | null; - /** @format int32 */ - dailyPart?: number | null; - isDaily?: boolean; - isAbsoluteNumbering?: boolean; - isPossibleSpecialEpisode?: boolean; - isPossibleSceneSeasonSpecial?: boolean; - releaseType?: ReleaseType; -} - -export interface PingResource { - status?: string | null; -} - -export enum PrivacyLevel { - Normal = "normal", - Password = "password", - ApiKey = "apiKey", - UserName = "userName", -} - -export interface ProfileFormatItemResource { - /** @format int32 */ - id?: number; - /** @format int32 */ - format?: number; - name?: string | null; - /** @format int32 */ - score?: number; -} - -export enum ProperDownloadTypes { - PreferAndUpgrade = "preferAndUpgrade", - DoNotUpgrade = "doNotUpgrade", - DoNotPrefer = "doNotPrefer", -} - -export interface ProviderMessage { - message?: string | null; - type?: ProviderMessageType; -} - -export enum ProviderMessageType { - Info = "info", - Warning = "warning", - Error = "error", -} - -export enum ProxyType { - Http = "http", - Socks4 = "socks4", - Socks5 = "socks5", -} - -export interface Quality { - /** @format int32 */ - id?: number; - name?: string | null; - source?: QualitySource; - /** @format int32 */ - resolution?: number; -} - -export interface QualityDefinitionLimitsResource { - /** @format int32 */ - min?: number; - /** @format int32 */ - max?: number; -} - -export interface QualityDefinitionResource { - /** @format int32 */ - id?: number; - quality?: Quality; - title?: string | null; - /** @format int32 */ - weight?: number; - /** @format double */ - minSize?: number | null; - /** @format double */ - maxSize?: number | null; - /** @format double */ - preferredSize?: number | null; -} - -export interface QualityModel { - quality?: Quality; - revision?: Revision; -} - -export interface QualityProfileQualityItemResource { - /** @format int32 */ - id?: number; - name?: string | null; - quality?: Quality; - items?: QualityProfileQualityItemResource[] | null; - allowed?: boolean; -} - -export interface QualityProfileResource { - /** @format int32 */ - id?: number; - name?: string | null; - upgradeAllowed?: boolean; - /** @format int32 */ - cutoff?: number; - items?: QualityProfileQualityItemResource[] | null; - /** @format int32 */ - minFormatScore?: number; - /** @format int32 */ - cutoffFormatScore?: number; - /** @format int32 */ - minUpgradeFormatScore?: number; - formatItems?: ProfileFormatItemResource[] | null; -} - -export enum QualitySource { - Unknown = "unknown", - Television = "television", - TelevisionRaw = "televisionRaw", - Web = "web", - WebRip = "webRip", - Dvd = "dvd", - Bluray = "bluray", - BlurayRaw = "blurayRaw", -} - -export interface QueueBulkResource { - ids?: number[] | null; -} - -export interface QueueResource { - /** @format int32 */ - id?: number; - /** @format int32 */ - seriesId?: number | null; - /** @format int32 */ - episodeId?: number | null; - /** @format int32 */ - seasonNumber?: number | null; - series?: SeriesResource; - episode?: EpisodeResource; - languages?: Language[] | null; - quality?: QualityModel; - customFormats?: CustomFormatResource[] | null; - /** @format int32 */ - customFormatScore?: number; - /** @format double */ - size?: number; - title?: string | null; - /** @format double */ - sizeleft?: number; - /** @format date-span */ - timeleft?: string | null; - /** @format date-time */ - estimatedCompletionTime?: string | null; - /** @format date-time */ - added?: string | null; - status?: string | null; - trackedDownloadStatus?: TrackedDownloadStatus; - trackedDownloadState?: TrackedDownloadState; - statusMessages?: TrackedDownloadStatusMessage[] | null; - errorMessage?: string | null; - downloadId?: string | null; - protocol?: DownloadProtocol; - downloadClient?: string | null; - downloadClientHasPostImportCategory?: boolean; - indexer?: string | null; - outputPath?: string | null; - episodeHasFile?: boolean; -} - -export interface QueueResourcePagingResource { - /** @format int32 */ - page?: number; - /** @format int32 */ - pageSize?: number; - sortKey?: string | null; - sortDirection?: SortDirection; - /** @format int32 */ - totalRecords?: number; - records?: QueueResource[] | null; -} - -export interface QueueStatusResource { - /** @format int32 */ - id?: number; - /** @format int32 */ - totalCount?: number; - /** @format int32 */ - count?: number; - /** @format int32 */ - unknownCount?: number; - errors?: boolean; - warnings?: boolean; - unknownErrors?: boolean; - unknownWarnings?: boolean; -} - -export interface Ratings { - /** @format int32 */ - votes?: number; - /** @format double */ - value?: number; -} - -export interface Rejection { - reason?: string | null; - type?: RejectionType; -} - -export enum RejectionType { - Permanent = "permanent", - Temporary = "temporary", -} - -export interface ReleaseEpisodeResource { - /** @format int32 */ - id?: number; - /** @format int32 */ - seasonNumber?: number; - /** @format int32 */ - episodeNumber?: number; - /** @format int32 */ - absoluteEpisodeNumber?: number | null; - title?: string | null; -} - -export interface ReleaseProfileResource { - /** @format int32 */ - id?: number; - name?: string | null; - enabled?: boolean; - required?: any; - ignored?: any; - /** @format int32 */ - indexerId?: number; - /** @uniqueItems true */ - tags?: number[] | null; -} - -export interface ReleaseResource { - /** @format int32 */ - id?: number; - guid?: string | null; - quality?: QualityModel; - /** @format int32 */ - qualityWeight?: number; - /** @format int32 */ - age?: number; - /** @format double */ - ageHours?: number; - /** @format double */ - ageMinutes?: number; - /** @format int64 */ - size?: number; - /** @format int32 */ - indexerId?: number; - indexer?: string | null; - releaseGroup?: string | null; - subGroup?: string | null; - releaseHash?: string | null; - title?: string | null; - fullSeason?: boolean; - sceneSource?: boolean; - /** @format int32 */ - seasonNumber?: number; - languages?: Language[] | null; - /** @format int32 */ - languageWeight?: number; - airDate?: string | null; - seriesTitle?: string | null; - episodeNumbers?: number[] | null; - absoluteEpisodeNumbers?: number[] | null; - /** @format int32 */ - mappedSeasonNumber?: number | null; - mappedEpisodeNumbers?: number[] | null; - mappedAbsoluteEpisodeNumbers?: number[] | null; - /** @format int32 */ - mappedSeriesId?: number | null; - mappedEpisodeInfo?: ReleaseEpisodeResource[] | null; - approved?: boolean; - temporarilyRejected?: boolean; - rejected?: boolean; - /** @format int32 */ - tvdbId?: number; - /** @format int32 */ - tvRageId?: number; - imdbId?: string | null; - rejections?: string[] | null; - /** @format date-time */ - publishDate?: string; - commentUrl?: string | null; - downloadUrl?: string | null; - infoUrl?: string | null; - episodeRequested?: boolean; - downloadAllowed?: boolean; - /** @format int32 */ - releaseWeight?: number; - customFormats?: CustomFormatResource[] | null; - /** @format int32 */ - customFormatScore?: number; - sceneMapping?: AlternateTitleResource; - magnetUrl?: string | null; - infoHash?: string | null; - /** @format int32 */ - seeders?: number | null; - /** @format int32 */ - leechers?: number | null; - protocol?: DownloadProtocol; - /** @format int32 */ - indexerFlags?: number; - isDaily?: boolean; - isAbsoluteNumbering?: boolean; - isPossibleSpecialEpisode?: boolean; - special?: boolean; - /** @format int32 */ - seriesId?: number | null; - /** @format int32 */ - episodeId?: number | null; - episodeIds?: number[] | null; - /** @format int32 */ - downloadClientId?: number | null; - downloadClient?: string | null; - shouldOverride?: boolean | null; -} - -export enum ReleaseType { - Unknown = "unknown", - SingleEpisode = "singleEpisode", - MultiEpisode = "multiEpisode", - SeasonPack = "seasonPack", -} - -export interface RemotePathMappingResource { - /** @format int32 */ - id?: number; - host?: string | null; - remotePath?: string | null; - localPath?: string | null; -} - -export interface RenameEpisodeResource { - /** @format int32 */ - id?: number; - /** @format int32 */ - seriesId?: number; - /** @format int32 */ - seasonNumber?: number; - episodeNumbers?: number[] | null; - /** @format int32 */ - episodeFileId?: number; - existingPath?: string | null; - newPath?: string | null; -} - -export enum RescanAfterRefreshType { - Always = "always", - AfterManual = "afterManual", - Never = "never", -} - -export interface Revision { - /** @format int32 */ - version?: number; - /** @format int32 */ - real?: number; - isRepack?: boolean; -} - -export interface RootFolderResource { - /** @format int32 */ - id?: number; - path?: string | null; - accessible?: boolean; - /** @format int64 */ - freeSpace?: number | null; - unmappedFolders?: UnmappedFolder[] | null; -} - -export enum RuntimeMode { - Console = "console", - Service = "service", - Tray = "tray", -} - -export interface SeasonPassResource { - series?: SeasonPassSeriesResource[] | null; - monitoringOptions?: MonitoringOptions; -} - -export interface SeasonPassSeriesResource { - /** @format int32 */ - id?: number; - monitored?: boolean | null; - seasons?: SeasonResource[] | null; -} - -export interface SeasonResource { - /** @format int32 */ - seasonNumber?: number; - monitored?: boolean; - statistics?: SeasonStatisticsResource; - images?: MediaCover[] | null; -} - -export interface SeasonStatisticsResource { - /** @format date-time */ - nextAiring?: string | null; - /** @format date-time */ - previousAiring?: string | null; - /** @format int32 */ - episodeFileCount?: number; - /** @format int32 */ - episodeCount?: number; - /** @format int32 */ - totalEpisodeCount?: number; - /** @format int64 */ - sizeOnDisk?: number; - releaseGroups?: string[] | null; - /** @format double */ - percentOfEpisodes?: number; -} - -export interface SelectOption { - /** @format int32 */ - value?: number; - name?: string | null; - /** @format int32 */ - order?: number; - hint?: string | null; -} - -export interface SeriesEditorResource { - seriesIds?: number[] | null; - monitored?: boolean | null; - monitorNewItems?: NewItemMonitorTypes; - /** @format int32 */ - qualityProfileId?: number | null; - seriesType?: SeriesTypes; - seasonFolder?: boolean | null; - rootFolderPath?: string | null; - tags?: number[] | null; - applyTags?: ApplyTags; - moveFiles?: boolean; - deleteFiles?: boolean; - addImportListExclusion?: boolean; -} - -export interface SeriesResource { - /** @format int32 */ - id?: number; - title?: string | null; - alternateTitles?: AlternateTitleResource[] | null; - sortTitle?: string | null; - status?: SeriesStatusType; - ended?: boolean; - profileName?: string | null; - overview?: string | null; - /** @format date-time */ - nextAiring?: string | null; - /** @format date-time */ - previousAiring?: string | null; - network?: string | null; - airTime?: string | null; - images?: MediaCover[] | null; - originalLanguage?: Language; - remotePoster?: string | null; - seasons?: SeasonResource[] | null; - /** @format int32 */ - year?: number; - path?: string | null; - /** @format int32 */ - qualityProfileId?: number; - seasonFolder?: boolean; - monitored?: boolean; - monitorNewItems?: NewItemMonitorTypes; - useSceneNumbering?: boolean; - /** @format int32 */ - runtime?: number; - /** @format int32 */ - tvdbId?: number; - /** @format int32 */ - tvRageId?: number; - /** @format int32 */ - tvMazeId?: number; - /** @format int32 */ - tmdbId?: number; - /** @format date-time */ - firstAired?: string | null; - /** @format date-time */ - lastAired?: string | null; - seriesType?: SeriesTypes; - cleanTitle?: string | null; - imdbId?: string | null; - titleSlug?: string | null; - rootFolderPath?: string | null; - folder?: string | null; - certification?: string | null; - genres?: string[] | null; - /** @uniqueItems true */ - tags?: number[] | null; - /** @format date-time */ - added?: string; - addOptions?: AddSeriesOptions; - ratings?: Ratings; - statistics?: SeriesStatisticsResource; - episodesChanged?: boolean | null; - /** - * @deprecated - * @format int32 - */ - languageProfileId?: number; -} - -export interface SeriesStatisticsResource { - /** @format int32 */ - seasonCount?: number; - /** @format int32 */ - episodeFileCount?: number; - /** @format int32 */ - episodeCount?: number; - /** @format int32 */ - totalEpisodeCount?: number; - /** @format int64 */ - sizeOnDisk?: number; - releaseGroups?: string[] | null; - /** @format double */ - percentOfEpisodes?: number; -} - -export enum SeriesStatusType { - Continuing = "continuing", - Ended = "ended", - Upcoming = "upcoming", - Deleted = "deleted", -} - -export interface SeriesTitleInfo { - title?: string | null; - titleWithoutYear?: string | null; - /** @format int32 */ - year?: number; - allTitles?: string[] | null; -} - -export enum SeriesTypes { - Standard = "standard", - Daily = "daily", - Anime = "anime", -} - -export enum SortDirection { - Default = "default", - Ascending = "ascending", - Descending = "descending", -} - -export interface SystemResource { - appName?: string | null; - instanceName?: string | null; - version?: string | null; - /** @format date-time */ - buildTime?: string; - isDebug?: boolean; - isProduction?: boolean; - isAdmin?: boolean; - isUserInteractive?: boolean; - startupPath?: string | null; - appData?: string | null; - osName?: string | null; - osVersion?: string | null; - isNetCore?: boolean; - isLinux?: boolean; - isOsx?: boolean; - isWindows?: boolean; - isDocker?: boolean; - mode?: RuntimeMode; - branch?: string | null; - authentication?: AuthenticationType; - sqliteVersion?: string | null; - /** @format int32 */ - migrationVersion?: number; - urlBase?: string | null; - runtimeVersion?: string | null; - runtimeName?: string | null; - /** @format date-time */ - startTime?: string; - packageVersion?: string | null; - packageAuthor?: string | null; - packageUpdateMechanism?: UpdateMechanism; - packageUpdateMechanismMessage?: string | null; - databaseVersion?: string | null; - databaseType?: DatabaseType; -} - -export interface TagDetailsResource { - /** @format int32 */ - id?: number; - label?: string | null; - delayProfileIds?: number[] | null; - importListIds?: number[] | null; - notificationIds?: number[] | null; - restrictionIds?: number[] | null; - indexerIds?: number[] | null; - downloadClientIds?: number[] | null; - autoTagIds?: number[] | null; - seriesIds?: number[] | null; -} - -export interface TagResource { - /** @format int32 */ - id?: number; - label?: string | null; -} - -export interface TaskResource { - /** @format int32 */ - id?: number; - name?: string | null; - taskName?: string | null; - /** @format int32 */ - interval?: number; - /** @format date-time */ - lastExecution?: string; - /** @format date-time */ - lastStartTime?: string; - /** @format date-time */ - nextExecution?: string; - /** @format date-span */ - lastDuration?: string; -} - -export enum TrackedDownloadState { - Downloading = "downloading", - ImportBlocked = "importBlocked", - ImportPending = "importPending", - Importing = "importing", - Imported = "imported", - FailedPending = "failedPending", - Failed = "failed", - Ignored = "ignored", -} - -export enum TrackedDownloadStatus { - Ok = "ok", - Warning = "warning", - Error = "error", -} - -export interface TrackedDownloadStatusMessage { - title?: string | null; - messages?: string[] | null; -} - -export interface UiConfigResource { - /** @format int32 */ - id?: number; - /** @format int32 */ - firstDayOfWeek?: number; - calendarWeekColumnHeader?: string | null; - shortDateFormat?: string | null; - longDateFormat?: string | null; - timeFormat?: string | null; - showRelativeDates?: boolean; - enableColorImpairedMode?: boolean; - theme?: string | null; - /** @format int32 */ - uiLanguage?: number; -} - -export interface UnmappedFolder { - name?: string | null; - path?: string | null; - relativePath?: string | null; -} - -export interface UpdateChanges { - new?: string[] | null; - fixed?: string[] | null; -} - -export enum UpdateMechanism { - BuiltIn = "builtIn", - Script = "script", - External = "external", - Apt = "apt", - Docker = "docker", -} - -export interface UpdateResource { - /** @format int32 */ - id?: number; - version?: string | null; - branch?: string | null; - /** @format date-time */ - releaseDate?: string; - fileName?: string | null; - url?: string | null; - installed?: boolean; - /** @format date-time */ - installedOn?: string | null; - installable?: boolean; - latest?: boolean; - changes?: UpdateChanges; - hash?: string | null; -} - -import type { AxiosInstance, AxiosRequestConfig, AxiosResponse, HeadersDefaults, ResponseType } from "axios"; -import axios from "axios"; - -export type QueryParamsType = Record; - -export interface FullRequestParams extends Omit { - /** set parameter to `true` for call `securityWorker` for this request */ - secure?: boolean; - /** request path */ - path: string; - /** content type of request body */ - type?: ContentType; - /** query params */ - query?: QueryParamsType; - /** format of response (i.e. response.json() -> format: "json") */ - format?: ResponseType; - /** request body */ - body?: unknown; -} - -export type RequestParams = Omit; - -export interface ApiConfig extends Omit { - securityWorker?: (securityData: SecurityDataType | null) => Promise | AxiosRequestConfig | void; - secure?: boolean; - format?: ResponseType; -} - -export enum ContentType { - Json = "application/json", - FormData = "multipart/form-data", - UrlEncoded = "application/x-www-form-urlencoded", - Text = "text/plain", -} - -export class HttpClient { - public instance: AxiosInstance; - private securityData: SecurityDataType | null = null; - private securityWorker?: ApiConfig["securityWorker"]; - private secure?: boolean; - private format?: ResponseType; - - constructor({ securityWorker, secure, format, ...axiosConfig }: ApiConfig = {}) { - this.instance = axios.create({ ...axiosConfig, baseURL: axiosConfig.baseURL || "{protocol}://{hostpath}" }); - this.secure = secure; - this.format = format; - this.securityWorker = securityWorker; - } - - public setSecurityData = (data: SecurityDataType | null) => { - this.securityData = data; - }; - - protected mergeRequestParams(params1: AxiosRequestConfig, params2?: AxiosRequestConfig): AxiosRequestConfig { - const method = params1.method || (params2 && params2.method); - - return { - ...this.instance.defaults, - ...params1, - ...(params2 || {}), - headers: { - ...((method && this.instance.defaults.headers[method.toLowerCase() as keyof HeadersDefaults]) || {}), - ...(params1.headers || {}), - ...((params2 && params2.headers) || {}), - }, - }; - } - - protected stringifyFormItem(formItem: unknown) { - if (typeof formItem === "object" && formItem !== null) { - return JSON.stringify(formItem); - } else { - return `${formItem}`; - } - } - - protected createFormData(input: Record): FormData { - if (input instanceof FormData) { - return input; - } - return Object.keys(input || {}).reduce((formData, key) => { - const property = input[key]; - const propertyContent: any[] = property instanceof Array ? property : [property]; - - for (const formItem of propertyContent) { - const isFileType = formItem instanceof Blob || formItem instanceof File; - formData.append(key, isFileType ? formItem : this.stringifyFormItem(formItem)); - } - - return formData; - }, new FormData()); - } - - public request = async ({ - secure, - path, - type, - query, - format, - body, - ...params - }: FullRequestParams): Promise> => { - const secureParams = - ((typeof secure === "boolean" ? secure : this.secure) && this.securityWorker && (await this.securityWorker(this.securityData))) || {}; - const requestParams = this.mergeRequestParams(params, secureParams); - const responseFormat = format || this.format || undefined; - - if (type === ContentType.FormData && body && body !== null && typeof body === "object") { - body = this.createFormData(body as Record); - } - - if (type === ContentType.Text && body && body !== null && typeof body !== "string") { - body = JSON.stringify(body); - } - - return this.instance.request({ - ...requestParams, - headers: { - ...(requestParams.headers || {}), - ...(type ? { "Content-Type": type } : {}), - }, - params: query, - responseType: responseFormat, - data: body, - url: path, - }); - }; -} - -/** - * @title Sonarr - * @version 3.0.0 - * @license GPL-3.0 (https://github.com/Sonarr/Sonarr/blob/develop/LICENSE) - * @baseUrl {protocol}://{hostpath} - * - * Sonarr API docs - The v3 API docs apply to both v3 and v4 versions of Sonarr. Some functionality may only be available in v4 of the Sonarr application. - */ -export class Api extends HttpClient { - /** - * No description - * - * @tags StaticResource - * @name GetRoot - * @request GET:/ - * @secure - */ - getRoot = (path: string, params: RequestParams = {}) => - this.request({ - path: `/`, - method: "GET", - secure: true, - ...params, - }); - - api = { - /** - * No description - * - * @tags ApiInfo - * @name GetApi - * @request GET:/api - * @secure - */ - getApi: (params: RequestParams = {}) => - this.request({ - path: `/api`, - method: "GET", - secure: true, - ...params, - }), - - /** - * No description - * - * @tags AutoTagging - * @name V3AutotaggingCreate - * @request POST:/api/v3/autotagging - * @secure - */ - v3AutotaggingCreate: (data: AutoTaggingResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/autotagging`, - method: "POST", - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags AutoTagging - * @name V3AutotaggingList - * @request GET:/api/v3/autotagging - * @secure - */ - v3AutotaggingList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/autotagging`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags AutoTagging - * @name V3AutotaggingUpdate - * @request PUT:/api/v3/autotagging/{id} - * @secure - */ - v3AutotaggingUpdate: (id: string, data: AutoTaggingResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/autotagging/${id}`, - method: "PUT", - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags AutoTagging - * @name V3AutotaggingDelete - * @request DELETE:/api/v3/autotagging/{id} - * @secure - */ - v3AutotaggingDelete: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/autotagging/${id}`, - method: "DELETE", - secure: true, - ...params, - }), - - /** - * No description - * - * @tags AutoTagging - * @name V3AutotaggingDetail - * @request GET:/api/v3/autotagging/{id} - * @secure - */ - v3AutotaggingDetail: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/autotagging/${id}`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags AutoTagging - * @name V3AutotaggingSchemaList - * @request GET:/api/v3/autotagging/schema - * @secure - */ - v3AutotaggingSchemaList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/autotagging/schema`, - method: "GET", - secure: true, - ...params, - }), - - /** - * No description - * - * @tags Backup - * @name V3SystemBackupList - * @request GET:/api/v3/system/backup - * @secure - */ - v3SystemBackupList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/system/backup`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Backup - * @name V3SystemBackupDelete - * @request DELETE:/api/v3/system/backup/{id} - * @secure - */ - v3SystemBackupDelete: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/system/backup/${id}`, - method: "DELETE", - secure: true, - ...params, - }), - - /** - * No description - * - * @tags Backup - * @name V3SystemBackupRestoreCreate - * @request POST:/api/v3/system/backup/restore/{id} - * @secure - */ - v3SystemBackupRestoreCreate: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/system/backup/restore/${id}`, - method: "POST", - secure: true, - ...params, - }), - - /** - * No description - * - * @tags Backup - * @name V3SystemBackupRestoreUploadCreate - * @request POST:/api/v3/system/backup/restore/upload - * @secure - */ - v3SystemBackupRestoreUploadCreate: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/system/backup/restore/upload`, - method: "POST", - secure: true, - ...params, - }), - - /** - * No description - * - * @tags Blocklist - * @name V3BlocklistList - * @request GET:/api/v3/blocklist - * @secure - */ - v3BlocklistList: ( - query?: { - /** - * @format int32 - * @default 1 - */ - page?: number; - /** - * @format int32 - * @default 10 - */ - pageSize?: number; - sortKey?: string; - sortDirection?: SortDirection; - seriesIds?: number[]; - protocols?: DownloadProtocol[]; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/blocklist`, - method: "GET", - query: query, - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Blocklist - * @name V3BlocklistDelete - * @request DELETE:/api/v3/blocklist/{id} - * @secure - */ - v3BlocklistDelete: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/blocklist/${id}`, - method: "DELETE", - secure: true, - ...params, - }), - - /** - * No description - * - * @tags Blocklist - * @name V3BlocklistBulkDelete - * @request DELETE:/api/v3/blocklist/bulk - * @secure - */ - v3BlocklistBulkDelete: (data: BlocklistBulkResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/blocklist/bulk`, - method: "DELETE", - body: data, - secure: true, - type: ContentType.Json, - ...params, - }), - - /** - * No description - * - * @tags Calendar - * @name V3CalendarList - * @request GET:/api/v3/calendar - * @secure - */ - v3CalendarList: ( - query?: { - /** @format date-time */ - start?: string; - /** @format date-time */ - end?: string; - /** @default false */ - unmonitored?: boolean; - /** @default false */ - includeSeries?: boolean; - /** @default false */ - includeEpisodeFile?: boolean; - /** @default false */ - includeEpisodeImages?: boolean; - /** @default "" */ - tags?: string; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/calendar`, - method: "GET", - query: query, - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Calendar - * @name V3CalendarDetail - * @request GET:/api/v3/calendar/{id} - * @secure - */ - v3CalendarDetail: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/calendar/${id}`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Command - * @name V3CommandCreate - * @request POST:/api/v3/command - * @secure - */ - v3CommandCreate: (data: CommandResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/command`, - method: "POST", - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Command - * @name V3CommandList - * @request GET:/api/v3/command - * @secure - */ - v3CommandList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/command`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Command - * @name V3CommandDelete - * @request DELETE:/api/v3/command/{id} - * @secure - */ - v3CommandDelete: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/command/${id}`, - method: "DELETE", - secure: true, - ...params, - }), - - /** - * No description - * - * @tags Command - * @name V3CommandDetail - * @request GET:/api/v3/command/{id} - * @secure - */ - v3CommandDetail: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/command/${id}`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags CustomFilter - * @name V3CustomfilterList - * @request GET:/api/v3/customfilter - * @secure - */ - v3CustomfilterList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/customfilter`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags CustomFilter - * @name V3CustomfilterCreate - * @request POST:/api/v3/customfilter - * @secure - */ - v3CustomfilterCreate: (data: CustomFilterResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/customfilter`, - method: "POST", - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags CustomFilter - * @name V3CustomfilterUpdate - * @request PUT:/api/v3/customfilter/{id} - * @secure - */ - v3CustomfilterUpdate: (id: string, data: CustomFilterResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/customfilter/${id}`, - method: "PUT", - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags CustomFilter - * @name V3CustomfilterDelete - * @request DELETE:/api/v3/customfilter/{id} - * @secure - */ - v3CustomfilterDelete: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/customfilter/${id}`, - method: "DELETE", - secure: true, - ...params, - }), - - /** - * No description - * - * @tags CustomFilter - * @name V3CustomfilterDetail - * @request GET:/api/v3/customfilter/{id} - * @secure - */ - v3CustomfilterDetail: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/customfilter/${id}`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags CustomFormat - * @name V3CustomformatList - * @request GET:/api/v3/customformat - * @secure - */ - v3CustomformatList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/customformat`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags CustomFormat - * @name V3CustomformatCreate - * @request POST:/api/v3/customformat - * @secure - */ - v3CustomformatCreate: (data: CustomFormatResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/customformat`, - method: "POST", - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags CustomFormat - * @name V3CustomformatUpdate - * @request PUT:/api/v3/customformat/{id} - * @secure - */ - v3CustomformatUpdate: (id: string, data: CustomFormatResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/customformat/${id}`, - method: "PUT", - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags CustomFormat - * @name V3CustomformatDelete - * @request DELETE:/api/v3/customformat/{id} - * @secure - */ - v3CustomformatDelete: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/customformat/${id}`, - method: "DELETE", - secure: true, - ...params, - }), - - /** - * No description - * - * @tags CustomFormat - * @name V3CustomformatDetail - * @request GET:/api/v3/customformat/{id} - * @secure - */ - v3CustomformatDetail: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/customformat/${id}`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags CustomFormat - * @name V3CustomformatBulkUpdate - * @request PUT:/api/v3/customformat/bulk - * @secure - */ - v3CustomformatBulkUpdate: (data: CustomFormatBulkResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/customformat/bulk`, - method: "PUT", - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags CustomFormat - * @name V3CustomformatBulkDelete - * @request DELETE:/api/v3/customformat/bulk - * @secure - */ - v3CustomformatBulkDelete: (data: CustomFormatBulkResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/customformat/bulk`, - method: "DELETE", - body: data, - secure: true, - type: ContentType.Json, - ...params, - }), - - /** - * No description - * - * @tags CustomFormat - * @name V3CustomformatSchemaList - * @request GET:/api/v3/customformat/schema - * @secure - */ - v3CustomformatSchemaList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/customformat/schema`, - method: "GET", - secure: true, - ...params, - }), - - /** - * No description - * - * @tags Cutoff - * @name V3WantedCutoffList - * @request GET:/api/v3/wanted/cutoff - * @secure - */ - v3WantedCutoffList: ( - query?: { - /** - * @format int32 - * @default 1 - */ - page?: number; - /** - * @format int32 - * @default 10 - */ - pageSize?: number; - sortKey?: string; - sortDirection?: SortDirection; - /** @default false */ - includeSeries?: boolean; - /** @default false */ - includeEpisodeFile?: boolean; - /** @default false */ - includeImages?: boolean; - /** @default true */ - monitored?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/wanted/cutoff`, - method: "GET", - query: query, - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Cutoff - * @name V3WantedCutoffDetail - * @request GET:/api/v3/wanted/cutoff/{id} - * @secure - */ - v3WantedCutoffDetail: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/wanted/cutoff/${id}`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags DelayProfile - * @name V3DelayprofileCreate - * @request POST:/api/v3/delayprofile - * @secure - */ - v3DelayprofileCreate: (data: DelayProfileResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/delayprofile`, - method: "POST", - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags DelayProfile - * @name V3DelayprofileList - * @request GET:/api/v3/delayprofile - * @secure - */ - v3DelayprofileList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/delayprofile`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags DelayProfile - * @name V3DelayprofileDelete - * @request DELETE:/api/v3/delayprofile/{id} - * @secure - */ - v3DelayprofileDelete: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/delayprofile/${id}`, - method: "DELETE", - secure: true, - ...params, - }), - - /** - * No description - * - * @tags DelayProfile - * @name V3DelayprofileUpdate - * @request PUT:/api/v3/delayprofile/{id} - * @secure - */ - v3DelayprofileUpdate: (id: string, data: DelayProfileResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/delayprofile/${id}`, - method: "PUT", - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags DelayProfile - * @name V3DelayprofileDetail - * @request GET:/api/v3/delayprofile/{id} - * @secure - */ - v3DelayprofileDetail: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/delayprofile/${id}`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags DelayProfile - * @name V3DelayprofileReorderUpdate - * @request PUT:/api/v3/delayprofile/reorder/{id} - * @secure - */ - v3DelayprofileReorderUpdate: ( - id: number, - query?: { - /** @format int32 */ - after?: number; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/delayprofile/reorder/${id}`, - method: "PUT", - query: query, - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags DiskSpace - * @name V3DiskspaceList - * @request GET:/api/v3/diskspace - * @secure - */ - v3DiskspaceList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/diskspace`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags DownloadClient - * @name V3DownloadclientList - * @request GET:/api/v3/downloadclient - * @secure - */ - v3DownloadclientList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/downloadclient`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags DownloadClient - * @name V3DownloadclientCreate - * @request POST:/api/v3/downloadclient - * @secure - */ - v3DownloadclientCreate: ( - data: DownloadClientResource, - query?: { - /** @default false */ - forceSave?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/downloadclient`, - method: "POST", - query: query, - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags DownloadClient - * @name V3DownloadclientUpdate - * @request PUT:/api/v3/downloadclient/{id} - * @secure - */ - v3DownloadclientUpdate: ( - id: number, - data: DownloadClientResource, - query?: { - /** @default false */ - forceSave?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/downloadclient/${id}`, - method: "PUT", - query: query, - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags DownloadClient - * @name V3DownloadclientDelete - * @request DELETE:/api/v3/downloadclient/{id} - * @secure - */ - v3DownloadclientDelete: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/downloadclient/${id}`, - method: "DELETE", - secure: true, - ...params, - }), - - /** - * No description - * - * @tags DownloadClient - * @name V3DownloadclientDetail - * @request GET:/api/v3/downloadclient/{id} - * @secure - */ - v3DownloadclientDetail: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/downloadclient/${id}`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags DownloadClient - * @name V3DownloadclientBulkUpdate - * @request PUT:/api/v3/downloadclient/bulk - * @secure - */ - v3DownloadclientBulkUpdate: (data: DownloadClientBulkResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/downloadclient/bulk`, - method: "PUT", - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags DownloadClient - * @name V3DownloadclientBulkDelete - * @request DELETE:/api/v3/downloadclient/bulk - * @secure - */ - v3DownloadclientBulkDelete: (data: DownloadClientBulkResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/downloadclient/bulk`, - method: "DELETE", - body: data, - secure: true, - type: ContentType.Json, - ...params, - }), - - /** - * No description - * - * @tags DownloadClient - * @name V3DownloadclientSchemaList - * @request GET:/api/v3/downloadclient/schema - * @secure - */ - v3DownloadclientSchemaList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/downloadclient/schema`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags DownloadClient - * @name V3DownloadclientTestCreate - * @request POST:/api/v3/downloadclient/test - * @secure - */ - v3DownloadclientTestCreate: ( - data: DownloadClientResource, - query?: { - /** @default false */ - forceTest?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/downloadclient/test`, - method: "POST", - query: query, - body: data, - secure: true, - type: ContentType.Json, - ...params, - }), - - /** - * No description - * - * @tags DownloadClient - * @name V3DownloadclientTestallCreate - * @request POST:/api/v3/downloadclient/testall - * @secure - */ - v3DownloadclientTestallCreate: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/downloadclient/testall`, - method: "POST", - secure: true, - ...params, - }), - - /** - * No description - * - * @tags DownloadClient - * @name V3DownloadclientActionCreate - * @request POST:/api/v3/downloadclient/action/{name} - * @secure - */ - v3DownloadclientActionCreate: (name: string, data: DownloadClientResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/downloadclient/action/${name}`, - method: "POST", - body: data, - secure: true, - type: ContentType.Json, - ...params, - }), - - /** - * No description - * - * @tags DownloadClientConfig - * @name V3ConfigDownloadclientList - * @request GET:/api/v3/config/downloadclient - * @secure - */ - v3ConfigDownloadclientList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/config/downloadclient`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags DownloadClientConfig - * @name V3ConfigDownloadclientUpdate - * @request PUT:/api/v3/config/downloadclient/{id} - * @secure - */ - v3ConfigDownloadclientUpdate: (id: string, data: DownloadClientConfigResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/config/downloadclient/${id}`, - method: "PUT", - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags DownloadClientConfig - * @name V3ConfigDownloadclientDetail - * @request GET:/api/v3/config/downloadclient/{id} - * @secure - */ - v3ConfigDownloadclientDetail: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/config/downloadclient/${id}`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Episode - * @name V3EpisodeList - * @request GET:/api/v3/episode - * @secure - */ - v3EpisodeList: ( - query?: { - /** @format int32 */ - seriesId?: number; - /** @format int32 */ - seasonNumber?: number; - episodeIds?: number[]; - /** @format int32 */ - episodeFileId?: number; - /** @default false */ - includeSeries?: boolean; - /** @default false */ - includeEpisodeFile?: boolean; - /** @default false */ - includeImages?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/episode`, - method: "GET", - query: query, - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Episode - * @name V3EpisodeUpdate - * @request PUT:/api/v3/episode/{id} - * @secure - */ - v3EpisodeUpdate: (id: number, data: EpisodeResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/episode/${id}`, - method: "PUT", - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Episode - * @name V3EpisodeDetail - * @request GET:/api/v3/episode/{id} - * @secure - */ - v3EpisodeDetail: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/episode/${id}`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Episode - * @name V3EpisodeMonitorUpdate - * @request PUT:/api/v3/episode/monitor - * @secure - */ - v3EpisodeMonitorUpdate: ( - data: EpisodesMonitoredResource, - query?: { - /** @default false */ - includeImages?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/episode/monitor`, - method: "PUT", - query: query, - body: data, - secure: true, - type: ContentType.Json, - ...params, - }), - - /** - * No description - * - * @tags EpisodeFile - * @name V3EpisodefileList - * @request GET:/api/v3/episodefile - * @secure - */ - v3EpisodefileList: ( - query?: { - /** @format int32 */ - seriesId?: number; - episodeFileIds?: number[]; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/episodefile`, - method: "GET", - query: query, - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags EpisodeFile - * @name V3EpisodefileUpdate - * @request PUT:/api/v3/episodefile/{id} - * @secure - */ - v3EpisodefileUpdate: (id: string, data: EpisodeFileResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/episodefile/${id}`, - method: "PUT", - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags EpisodeFile - * @name V3EpisodefileDelete - * @request DELETE:/api/v3/episodefile/{id} - * @secure - */ - v3EpisodefileDelete: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/episodefile/${id}`, - method: "DELETE", - secure: true, - ...params, - }), - - /** - * No description - * - * @tags EpisodeFile - * @name V3EpisodefileDetail - * @request GET:/api/v3/episodefile/{id} - * @secure - */ - v3EpisodefileDetail: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/episodefile/${id}`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags EpisodeFile - * @name V3EpisodefileEditorUpdate - * @request PUT:/api/v3/episodefile/editor - * @secure - */ - v3EpisodefileEditorUpdate: (data: EpisodeFileListResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/episodefile/editor`, - method: "PUT", - body: data, - secure: true, - type: ContentType.Json, - ...params, - }), - - /** - * No description - * - * @tags EpisodeFile - * @name V3EpisodefileBulkDelete - * @request DELETE:/api/v3/episodefile/bulk - * @secure - */ - v3EpisodefileBulkDelete: (data: EpisodeFileListResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/episodefile/bulk`, - method: "DELETE", - body: data, - secure: true, - type: ContentType.Json, - ...params, - }), - - /** - * No description - * - * @tags EpisodeFile - * @name V3EpisodefileBulkUpdate - * @request PUT:/api/v3/episodefile/bulk - * @secure - */ - v3EpisodefileBulkUpdate: (data: EpisodeFileResource[], params: RequestParams = {}) => - this.request({ - path: `/api/v3/episodefile/bulk`, - method: "PUT", - body: data, - secure: true, - type: ContentType.Json, - ...params, - }), - - /** - * No description - * - * @tags FileSystem - * @name V3FilesystemList - * @request GET:/api/v3/filesystem - * @secure - */ - v3FilesystemList: ( - query?: { - path?: string; - /** @default false */ - includeFiles?: boolean; - /** @default false */ - allowFoldersWithoutTrailingSlashes?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/filesystem`, - method: "GET", - query: query, - secure: true, - ...params, - }), - - /** - * No description - * - * @tags FileSystem - * @name V3FilesystemTypeList - * @request GET:/api/v3/filesystem/type - * @secure - */ - v3FilesystemTypeList: ( - query?: { - path?: string; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/filesystem/type`, - method: "GET", - query: query, - secure: true, - ...params, - }), - - /** - * No description - * - * @tags FileSystem - * @name V3FilesystemMediafilesList - * @request GET:/api/v3/filesystem/mediafiles - * @secure - */ - v3FilesystemMediafilesList: ( - query?: { - path?: string; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/filesystem/mediafiles`, - method: "GET", - query: query, - secure: true, - ...params, - }), - - /** - * No description - * - * @tags Health - * @name V3HealthList - * @request GET:/api/v3/health - * @secure - */ - v3HealthList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/health`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags History - * @name V3HistoryList - * @request GET:/api/v3/history - * @secure - */ - v3HistoryList: ( - query?: { - /** - * @format int32 - * @default 1 - */ - page?: number; - /** - * @format int32 - * @default 10 - */ - pageSize?: number; - sortKey?: string; - sortDirection?: SortDirection; - includeSeries?: boolean; - includeEpisode?: boolean; - eventType?: number[]; - /** @format int32 */ - episodeId?: number; - downloadId?: string; - seriesIds?: number[]; - languages?: number[]; - quality?: number[]; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/history`, - method: "GET", - query: query, - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags History - * @name V3HistorySinceList - * @request GET:/api/v3/history/since - * @secure - */ - v3HistorySinceList: ( - query?: { - /** @format date-time */ - date?: string; - eventType?: EpisodeHistoryEventType; - /** @default false */ - includeSeries?: boolean; - /** @default false */ - includeEpisode?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/history/since`, - method: "GET", - query: query, - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags History - * @name V3HistorySeriesList - * @request GET:/api/v3/history/series - * @secure - */ - v3HistorySeriesList: ( - query?: { - /** @format int32 */ - seriesId?: number; - /** @format int32 */ - seasonNumber?: number; - eventType?: EpisodeHistoryEventType; - /** @default false */ - includeSeries?: boolean; - /** @default false */ - includeEpisode?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/history/series`, - method: "GET", - query: query, - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags History - * @name V3HistoryFailedCreate - * @request POST:/api/v3/history/failed/{id} - * @secure - */ - v3HistoryFailedCreate: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/history/failed/${id}`, - method: "POST", - secure: true, - ...params, - }), - - /** - * No description - * - * @tags HostConfig - * @name V3ConfigHostList - * @request GET:/api/v3/config/host - * @secure - */ - v3ConfigHostList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/config/host`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags HostConfig - * @name V3ConfigHostUpdate - * @request PUT:/api/v3/config/host/{id} - * @secure - */ - v3ConfigHostUpdate: (id: string, data: HostConfigResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/config/host/${id}`, - method: "PUT", - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags HostConfig - * @name V3ConfigHostDetail - * @request GET:/api/v3/config/host/{id} - * @secure - */ - v3ConfigHostDetail: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/config/host/${id}`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags ImportList - * @name V3ImportlistList - * @request GET:/api/v3/importlist - * @secure - */ - v3ImportlistList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/importlist`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags ImportList - * @name V3ImportlistCreate - * @request POST:/api/v3/importlist - * @secure - */ - v3ImportlistCreate: ( - data: ImportListResource, - query?: { - /** @default false */ - forceSave?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/importlist`, - method: "POST", - query: query, - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags ImportList - * @name V3ImportlistUpdate - * @request PUT:/api/v3/importlist/{id} - * @secure - */ - v3ImportlistUpdate: ( - id: number, - data: ImportListResource, - query?: { - /** @default false */ - forceSave?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/importlist/${id}`, - method: "PUT", - query: query, - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags ImportList - * @name V3ImportlistDelete - * @request DELETE:/api/v3/importlist/{id} - * @secure - */ - v3ImportlistDelete: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/importlist/${id}`, - method: "DELETE", - secure: true, - ...params, - }), - - /** - * No description - * - * @tags ImportList - * @name V3ImportlistDetail - * @request GET:/api/v3/importlist/{id} - * @secure - */ - v3ImportlistDetail: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/importlist/${id}`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags ImportList - * @name V3ImportlistBulkUpdate - * @request PUT:/api/v3/importlist/bulk - * @secure - */ - v3ImportlistBulkUpdate: (data: ImportListBulkResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/importlist/bulk`, - method: "PUT", - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags ImportList - * @name V3ImportlistBulkDelete - * @request DELETE:/api/v3/importlist/bulk - * @secure - */ - v3ImportlistBulkDelete: (data: ImportListBulkResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/importlist/bulk`, - method: "DELETE", - body: data, - secure: true, - type: ContentType.Json, - ...params, - }), - - /** - * No description - * - * @tags ImportList - * @name V3ImportlistSchemaList - * @request GET:/api/v3/importlist/schema - * @secure - */ - v3ImportlistSchemaList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/importlist/schema`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags ImportList - * @name V3ImportlistTestCreate - * @request POST:/api/v3/importlist/test - * @secure - */ - v3ImportlistTestCreate: ( - data: ImportListResource, - query?: { - /** @default false */ - forceTest?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/importlist/test`, - method: "POST", - query: query, - body: data, - secure: true, - type: ContentType.Json, - ...params, - }), - - /** - * No description - * - * @tags ImportList - * @name V3ImportlistTestallCreate - * @request POST:/api/v3/importlist/testall - * @secure - */ - v3ImportlistTestallCreate: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/importlist/testall`, - method: "POST", - secure: true, - ...params, - }), - - /** - * No description - * - * @tags ImportList - * @name V3ImportlistActionCreate - * @request POST:/api/v3/importlist/action/{name} - * @secure - */ - v3ImportlistActionCreate: (name: string, data: ImportListResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/importlist/action/${name}`, - method: "POST", - body: data, - secure: true, - type: ContentType.Json, - ...params, - }), - - /** - * No description - * - * @tags ImportListConfig - * @name V3ConfigImportlistList - * @request GET:/api/v3/config/importlist - * @secure - */ - v3ConfigImportlistList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/config/importlist`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags ImportListConfig - * @name V3ConfigImportlistUpdate - * @request PUT:/api/v3/config/importlist/{id} - * @secure - */ - v3ConfigImportlistUpdate: (id: string, data: ImportListConfigResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/config/importlist/${id}`, - method: "PUT", - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags ImportListConfig - * @name V3ConfigImportlistDetail - * @request GET:/api/v3/config/importlist/{id} - * @secure - */ - v3ConfigImportlistDetail: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/config/importlist/${id}`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags ImportListExclusion - * @name V3ImportlistexclusionList - * @request GET:/api/v3/importlistexclusion - * @deprecated - * @secure - */ - v3ImportlistexclusionList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/importlistexclusion`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags ImportListExclusion - * @name V3ImportlistexclusionCreate - * @request POST:/api/v3/importlistexclusion - * @secure - */ - v3ImportlistexclusionCreate: (data: ImportListExclusionResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/importlistexclusion`, - method: "POST", - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags ImportListExclusion - * @name V3ImportlistexclusionPagedList - * @request GET:/api/v3/importlistexclusion/paged - * @secure - */ - v3ImportlistexclusionPagedList: ( - query?: { - /** - * @format int32 - * @default 1 - */ - page?: number; - /** - * @format int32 - * @default 10 - */ - pageSize?: number; - sortKey?: string; - sortDirection?: SortDirection; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/importlistexclusion/paged`, - method: "GET", - query: query, - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags ImportListExclusion - * @name V3ImportlistexclusionUpdate - * @request PUT:/api/v3/importlistexclusion/{id} - * @secure - */ - v3ImportlistexclusionUpdate: (id: string, data: ImportListExclusionResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/importlistexclusion/${id}`, - method: "PUT", - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags ImportListExclusion - * @name V3ImportlistexclusionDelete - * @request DELETE:/api/v3/importlistexclusion/{id} - * @secure - */ - v3ImportlistexclusionDelete: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/importlistexclusion/${id}`, - method: "DELETE", - secure: true, - ...params, - }), - - /** - * No description - * - * @tags ImportListExclusion - * @name V3ImportlistexclusionDetail - * @request GET:/api/v3/importlistexclusion/{id} - * @secure - */ - v3ImportlistexclusionDetail: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/importlistexclusion/${id}`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags ImportListExclusion - * @name V3ImportlistexclusionBulkDelete - * @request DELETE:/api/v3/importlistexclusion/bulk - * @secure - */ - v3ImportlistexclusionBulkDelete: (data: ImportListExclusionBulkResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/importlistexclusion/bulk`, - method: "DELETE", - body: data, - secure: true, - type: ContentType.Json, - ...params, - }), - - /** - * No description - * - * @tags Indexer - * @name V3IndexerList - * @request GET:/api/v3/indexer - * @secure - */ - v3IndexerList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/indexer`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Indexer - * @name V3IndexerCreate - * @request POST:/api/v3/indexer - * @secure - */ - v3IndexerCreate: ( - data: IndexerResource, - query?: { - /** @default false */ - forceSave?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/indexer`, - method: "POST", - query: query, - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Indexer - * @name V3IndexerUpdate - * @request PUT:/api/v3/indexer/{id} - * @secure - */ - v3IndexerUpdate: ( - id: number, - data: IndexerResource, - query?: { - /** @default false */ - forceSave?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/indexer/${id}`, - method: "PUT", - query: query, - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Indexer - * @name V3IndexerDelete - * @request DELETE:/api/v3/indexer/{id} - * @secure - */ - v3IndexerDelete: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/indexer/${id}`, - method: "DELETE", - secure: true, - ...params, - }), - - /** - * No description - * - * @tags Indexer - * @name V3IndexerDetail - * @request GET:/api/v3/indexer/{id} - * @secure - */ - v3IndexerDetail: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/indexer/${id}`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Indexer - * @name V3IndexerBulkUpdate - * @request PUT:/api/v3/indexer/bulk - * @secure - */ - v3IndexerBulkUpdate: (data: IndexerBulkResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/indexer/bulk`, - method: "PUT", - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Indexer - * @name V3IndexerBulkDelete - * @request DELETE:/api/v3/indexer/bulk - * @secure - */ - v3IndexerBulkDelete: (data: IndexerBulkResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/indexer/bulk`, - method: "DELETE", - body: data, - secure: true, - type: ContentType.Json, - ...params, - }), - - /** - * No description - * - * @tags Indexer - * @name V3IndexerSchemaList - * @request GET:/api/v3/indexer/schema - * @secure - */ - v3IndexerSchemaList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/indexer/schema`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Indexer - * @name V3IndexerTestCreate - * @request POST:/api/v3/indexer/test - * @secure - */ - v3IndexerTestCreate: ( - data: IndexerResource, - query?: { - /** @default false */ - forceTest?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/indexer/test`, - method: "POST", - query: query, - body: data, - secure: true, - type: ContentType.Json, - ...params, - }), - - /** - * No description - * - * @tags Indexer - * @name V3IndexerTestallCreate - * @request POST:/api/v3/indexer/testall - * @secure - */ - v3IndexerTestallCreate: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/indexer/testall`, - method: "POST", - secure: true, - ...params, - }), - - /** - * No description - * - * @tags Indexer - * @name V3IndexerActionCreate - * @request POST:/api/v3/indexer/action/{name} - * @secure - */ - v3IndexerActionCreate: (name: string, data: IndexerResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/indexer/action/${name}`, - method: "POST", - body: data, - secure: true, - type: ContentType.Json, - ...params, - }), - - /** - * No description - * - * @tags IndexerConfig - * @name V3ConfigIndexerList - * @request GET:/api/v3/config/indexer - * @secure - */ - v3ConfigIndexerList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/config/indexer`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags IndexerConfig - * @name V3ConfigIndexerUpdate - * @request PUT:/api/v3/config/indexer/{id} - * @secure - */ - v3ConfigIndexerUpdate: (id: string, data: IndexerConfigResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/config/indexer/${id}`, - method: "PUT", - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags IndexerConfig - * @name V3ConfigIndexerDetail - * @request GET:/api/v3/config/indexer/{id} - * @secure - */ - v3ConfigIndexerDetail: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/config/indexer/${id}`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags IndexerFlag - * @name V3IndexerflagList - * @request GET:/api/v3/indexerflag - * @secure - */ - v3IndexerflagList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/indexerflag`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Language - * @name V3LanguageList - * @request GET:/api/v3/language - * @secure - */ - v3LanguageList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/language`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Language - * @name V3LanguageDetail - * @request GET:/api/v3/language/{id} - * @secure - */ - v3LanguageDetail: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/language/${id}`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags LanguageProfile - * @name V3LanguageprofileCreate - * @request POST:/api/v3/languageprofile - * @deprecated - * @secure - */ - v3LanguageprofileCreate: (data: LanguageProfileResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/languageprofile`, - method: "POST", - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags LanguageProfile - * @name V3LanguageprofileList - * @request GET:/api/v3/languageprofile - * @deprecated - * @secure - */ - v3LanguageprofileList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/languageprofile`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags LanguageProfile - * @name V3LanguageprofileDelete - * @request DELETE:/api/v3/languageprofile/{id} - * @deprecated - * @secure - */ - v3LanguageprofileDelete: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/languageprofile/${id}`, - method: "DELETE", - secure: true, - ...params, - }), - - /** - * No description - * - * @tags LanguageProfile - * @name V3LanguageprofileUpdate - * @request PUT:/api/v3/languageprofile/{id} - * @deprecated - * @secure - */ - v3LanguageprofileUpdate: (id: string, data: LanguageProfileResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/languageprofile/${id}`, - method: "PUT", - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags LanguageProfile - * @name V3LanguageprofileDetail - * @request GET:/api/v3/languageprofile/{id} - * @secure - */ - v3LanguageprofileDetail: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/languageprofile/${id}`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags LanguageProfileSchema - * @name V3LanguageprofileSchemaList - * @request GET:/api/v3/languageprofile/schema - * @deprecated - * @secure - */ - v3LanguageprofileSchemaList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/languageprofile/schema`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Localization - * @name V3LocalizationList - * @request GET:/api/v3/localization - * @secure - */ - v3LocalizationList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/localization`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Localization - * @name V3LocalizationLanguageList - * @request GET:/api/v3/localization/language - * @secure - */ - v3LocalizationLanguageList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/localization/language`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Localization - * @name V3LocalizationDetail - * @request GET:/api/v3/localization/{id} - * @secure - */ - v3LocalizationDetail: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/localization/${id}`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Log - * @name V3LogList - * @request GET:/api/v3/log - * @secure - */ - v3LogList: ( - query?: { - /** - * @format int32 - * @default 1 - */ - page?: number; - /** - * @format int32 - * @default 10 - */ - pageSize?: number; - sortKey?: string; - sortDirection?: SortDirection; - level?: string; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/log`, - method: "GET", - query: query, - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags LogFile - * @name V3LogFileList - * @request GET:/api/v3/log/file - * @secure - */ - v3LogFileList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/log/file`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags LogFile - * @name V3LogFileDetail - * @request GET:/api/v3/log/file/{filename} - * @secure - */ - v3LogFileDetail: (filename: string, params: RequestParams = {}) => - this.request({ - path: `/api/v3/log/file/${filename}`, - method: "GET", - secure: true, - ...params, - }), - - /** - * No description - * - * @tags ManualImport - * @name V3ManualimportList - * @request GET:/api/v3/manualimport - * @secure - */ - v3ManualimportList: ( - query?: { - folder?: string; - downloadId?: string; - /** @format int32 */ - seriesId?: number; - /** @format int32 */ - seasonNumber?: number; - /** @default true */ - filterExistingFiles?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/manualimport`, - method: "GET", - query: query, - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags ManualImport - * @name V3ManualimportCreate - * @request POST:/api/v3/manualimport - * @secure - */ - v3ManualimportCreate: (data: ManualImportReprocessResource[], params: RequestParams = {}) => - this.request({ - path: `/api/v3/manualimport`, - method: "POST", - body: data, - secure: true, - type: ContentType.Json, - ...params, - }), - - /** - * No description - * - * @tags MediaCover - * @name V3MediacoverDetail - * @request GET:/api/v3/mediacover/{seriesId}/{filename} - * @secure - */ - v3MediacoverDetail: (seriesId: number, filename: string, params: RequestParams = {}) => - this.request({ - path: `/api/v3/mediacover/${seriesId}/${filename}`, - method: "GET", - secure: true, - ...params, - }), - - /** - * No description - * - * @tags MediaManagementConfig - * @name V3ConfigMediamanagementList - * @request GET:/api/v3/config/mediamanagement - * @secure - */ - v3ConfigMediamanagementList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/config/mediamanagement`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags MediaManagementConfig - * @name V3ConfigMediamanagementUpdate - * @request PUT:/api/v3/config/mediamanagement/{id} - * @secure - */ - v3ConfigMediamanagementUpdate: (id: string, data: MediaManagementConfigResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/config/mediamanagement/${id}`, - method: "PUT", - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags MediaManagementConfig - * @name V3ConfigMediamanagementDetail - * @request GET:/api/v3/config/mediamanagement/{id} - * @secure - */ - v3ConfigMediamanagementDetail: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/config/mediamanagement/${id}`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Metadata - * @name V3MetadataList - * @request GET:/api/v3/metadata - * @secure - */ - v3MetadataList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/metadata`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Metadata - * @name V3MetadataCreate - * @request POST:/api/v3/metadata - * @secure - */ - v3MetadataCreate: ( - data: MetadataResource, - query?: { - /** @default false */ - forceSave?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/metadata`, - method: "POST", - query: query, - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Metadata - * @name V3MetadataUpdate - * @request PUT:/api/v3/metadata/{id} - * @secure - */ - v3MetadataUpdate: ( - id: number, - data: MetadataResource, - query?: { - /** @default false */ - forceSave?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/metadata/${id}`, - method: "PUT", - query: query, - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Metadata - * @name V3MetadataDelete - * @request DELETE:/api/v3/metadata/{id} - * @secure - */ - v3MetadataDelete: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/metadata/${id}`, - method: "DELETE", - secure: true, - ...params, - }), - - /** - * No description - * - * @tags Metadata - * @name V3MetadataDetail - * @request GET:/api/v3/metadata/{id} - * @secure - */ - v3MetadataDetail: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/metadata/${id}`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Metadata - * @name V3MetadataSchemaList - * @request GET:/api/v3/metadata/schema - * @secure - */ - v3MetadataSchemaList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/metadata/schema`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Metadata - * @name V3MetadataTestCreate - * @request POST:/api/v3/metadata/test - * @secure - */ - v3MetadataTestCreate: ( - data: MetadataResource, - query?: { - /** @default false */ - forceTest?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/metadata/test`, - method: "POST", - query: query, - body: data, - secure: true, - type: ContentType.Json, - ...params, - }), - - /** - * No description - * - * @tags Metadata - * @name V3MetadataTestallCreate - * @request POST:/api/v3/metadata/testall - * @secure - */ - v3MetadataTestallCreate: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/metadata/testall`, - method: "POST", - secure: true, - ...params, - }), - - /** - * No description - * - * @tags Metadata - * @name V3MetadataActionCreate - * @request POST:/api/v3/metadata/action/{name} - * @secure - */ - v3MetadataActionCreate: (name: string, data: MetadataResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/metadata/action/${name}`, - method: "POST", - body: data, - secure: true, - type: ContentType.Json, - ...params, - }), - - /** - * No description - * - * @tags Missing - * @name V3WantedMissingList - * @request GET:/api/v3/wanted/missing - * @secure - */ - v3WantedMissingList: ( - query?: { - /** - * @format int32 - * @default 1 - */ - page?: number; - /** - * @format int32 - * @default 10 - */ - pageSize?: number; - sortKey?: string; - sortDirection?: SortDirection; - /** @default false */ - includeSeries?: boolean; - /** @default false */ - includeImages?: boolean; - /** @default true */ - monitored?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/wanted/missing`, - method: "GET", - query: query, - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Missing - * @name V3WantedMissingDetail - * @request GET:/api/v3/wanted/missing/{id} - * @secure - */ - v3WantedMissingDetail: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/wanted/missing/${id}`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags NamingConfig - * @name V3ConfigNamingList - * @request GET:/api/v3/config/naming - * @secure - */ - v3ConfigNamingList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/config/naming`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags NamingConfig - * @name V3ConfigNamingUpdate - * @request PUT:/api/v3/config/naming/{id} - * @secure - */ - v3ConfigNamingUpdate: (id: string, data: NamingConfigResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/config/naming/${id}`, - method: "PUT", - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags NamingConfig - * @name V3ConfigNamingDetail - * @request GET:/api/v3/config/naming/{id} - * @secure - */ - v3ConfigNamingDetail: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/config/naming/${id}`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags NamingConfig - * @name V3ConfigNamingExamplesList - * @request GET:/api/v3/config/naming/examples - * @secure - */ - v3ConfigNamingExamplesList: ( - query?: { - renameEpisodes?: boolean; - replaceIllegalCharacters?: boolean; - /** @format int32 */ - colonReplacementFormat?: number; - customColonReplacementFormat?: string; - /** @format int32 */ - multiEpisodeStyle?: number; - standardEpisodeFormat?: string; - dailyEpisodeFormat?: string; - animeEpisodeFormat?: string; - seriesFolderFormat?: string; - seasonFolderFormat?: string; - specialsFolderFormat?: string; - /** @format int32 */ - id?: number; - resourceName?: string; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/config/naming/examples`, - method: "GET", - query: query, - secure: true, - ...params, - }), - - /** - * No description - * - * @tags Notification - * @name V3NotificationList - * @request GET:/api/v3/notification - * @secure - */ - v3NotificationList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/notification`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Notification - * @name V3NotificationCreate - * @request POST:/api/v3/notification - * @secure - */ - v3NotificationCreate: ( - data: NotificationResource, - query?: { - /** @default false */ - forceSave?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/notification`, - method: "POST", - query: query, - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Notification - * @name V3NotificationUpdate - * @request PUT:/api/v3/notification/{id} - * @secure - */ - v3NotificationUpdate: ( - id: number, - data: NotificationResource, - query?: { - /** @default false */ - forceSave?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/notification/${id}`, - method: "PUT", - query: query, - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Notification - * @name V3NotificationDelete - * @request DELETE:/api/v3/notification/{id} - * @secure - */ - v3NotificationDelete: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/notification/${id}`, - method: "DELETE", - secure: true, - ...params, - }), - - /** - * No description - * - * @tags Notification - * @name V3NotificationDetail - * @request GET:/api/v3/notification/{id} - * @secure - */ - v3NotificationDetail: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/notification/${id}`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Notification - * @name V3NotificationSchemaList - * @request GET:/api/v3/notification/schema - * @secure - */ - v3NotificationSchemaList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/notification/schema`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Notification - * @name V3NotificationTestCreate - * @request POST:/api/v3/notification/test - * @secure - */ - v3NotificationTestCreate: ( - data: NotificationResource, - query?: { - /** @default false */ - forceTest?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/notification/test`, - method: "POST", - query: query, - body: data, - secure: true, - type: ContentType.Json, - ...params, - }), - - /** - * No description - * - * @tags Notification - * @name V3NotificationTestallCreate - * @request POST:/api/v3/notification/testall - * @secure - */ - v3NotificationTestallCreate: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/notification/testall`, - method: "POST", - secure: true, - ...params, - }), - - /** - * No description - * - * @tags Notification - * @name V3NotificationActionCreate - * @request POST:/api/v3/notification/action/{name} - * @secure - */ - v3NotificationActionCreate: (name: string, data: NotificationResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/notification/action/${name}`, - method: "POST", - body: data, - secure: true, - type: ContentType.Json, - ...params, - }), - - /** - * No description - * - * @tags Parse - * @name V3ParseList - * @request GET:/api/v3/parse - * @secure - */ - v3ParseList: ( - query?: { - title?: string; - path?: string; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/parse`, - method: "GET", - query: query, - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags QualityDefinition - * @name V3QualitydefinitionUpdate - * @request PUT:/api/v3/qualitydefinition/{id} - * @secure - */ - v3QualitydefinitionUpdate: (id: string, data: QualityDefinitionResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/qualitydefinition/${id}`, - method: "PUT", - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags QualityDefinition - * @name V3QualitydefinitionDetail - * @request GET:/api/v3/qualitydefinition/{id} - * @secure - */ - v3QualitydefinitionDetail: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/qualitydefinition/${id}`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags QualityDefinition - * @name V3QualitydefinitionList - * @request GET:/api/v3/qualitydefinition - * @secure - */ - v3QualitydefinitionList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/qualitydefinition`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags QualityDefinition - * @name V3QualitydefinitionUpdateUpdate - * @request PUT:/api/v3/qualitydefinition/update - * @secure - */ - v3QualitydefinitionUpdateUpdate: (data: QualityDefinitionResource[], params: RequestParams = {}) => - this.request({ - path: `/api/v3/qualitydefinition/update`, - method: "PUT", - body: data, - secure: true, - type: ContentType.Json, - ...params, - }), - - /** - * No description - * - * @tags QualityDefinition - * @name V3QualitydefinitionLimitsList - * @request GET:/api/v3/qualitydefinition/limits - * @secure - */ - v3QualitydefinitionLimitsList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/qualitydefinition/limits`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags QualityProfile - * @name V3QualityprofileCreate - * @request POST:/api/v3/qualityprofile - * @secure - */ - v3QualityprofileCreate: (data: QualityProfileResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/qualityprofile`, - method: "POST", - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags QualityProfile - * @name V3QualityprofileList - * @request GET:/api/v3/qualityprofile - * @secure - */ - v3QualityprofileList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/qualityprofile`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags QualityProfile - * @name V3QualityprofileDelete - * @request DELETE:/api/v3/qualityprofile/{id} - * @secure - */ - v3QualityprofileDelete: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/qualityprofile/${id}`, - method: "DELETE", - secure: true, - ...params, - }), - - /** - * No description - * - * @tags QualityProfile - * @name V3QualityprofileUpdate - * @request PUT:/api/v3/qualityprofile/{id} - * @secure - */ - v3QualityprofileUpdate: (id: string, data: QualityProfileResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/qualityprofile/${id}`, - method: "PUT", - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags QualityProfile - * @name V3QualityprofileDetail - * @request GET:/api/v3/qualityprofile/{id} - * @secure - */ - v3QualityprofileDetail: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/qualityprofile/${id}`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags QualityProfileSchema - * @name V3QualityprofileSchemaList - * @request GET:/api/v3/qualityprofile/schema - * @secure - */ - v3QualityprofileSchemaList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/qualityprofile/schema`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Queue - * @name V3QueueDelete - * @request DELETE:/api/v3/queue/{id} - * @secure - */ - v3QueueDelete: ( - id: number, - query?: { - /** @default true */ - removeFromClient?: boolean; - /** @default false */ - blocklist?: boolean; - /** @default false */ - skipRedownload?: boolean; - /** @default false */ - changeCategory?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/queue/${id}`, - method: "DELETE", - query: query, - secure: true, - ...params, - }), - - /** - * No description - * - * @tags Queue - * @name V3QueueBulkDelete - * @request DELETE:/api/v3/queue/bulk - * @secure - */ - v3QueueBulkDelete: ( - data: QueueBulkResource, - query?: { - /** @default true */ - removeFromClient?: boolean; - /** @default false */ - blocklist?: boolean; - /** @default false */ - skipRedownload?: boolean; - /** @default false */ - changeCategory?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/queue/bulk`, - method: "DELETE", - query: query, - body: data, - secure: true, - type: ContentType.Json, - ...params, - }), - - /** - * No description - * - * @tags Queue - * @name V3QueueList - * @request GET:/api/v3/queue - * @secure - */ - v3QueueList: ( - query?: { - /** - * @format int32 - * @default 1 - */ - page?: number; - /** - * @format int32 - * @default 10 - */ - pageSize?: number; - sortKey?: string; - sortDirection?: SortDirection; - /** @default false */ - includeUnknownSeriesItems?: boolean; - /** @default false */ - includeSeries?: boolean; - /** @default false */ - includeEpisode?: boolean; - seriesIds?: number[]; - protocol?: DownloadProtocol; - languages?: number[]; - /** @format int32 */ - quality?: number; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/queue`, - method: "GET", - query: query, - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags QueueAction - * @name V3QueueGrabCreate - * @request POST:/api/v3/queue/grab/{id} - * @secure - */ - v3QueueGrabCreate: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/queue/grab/${id}`, - method: "POST", - secure: true, - ...params, - }), - - /** - * No description - * - * @tags QueueAction - * @name V3QueueGrabBulkCreate - * @request POST:/api/v3/queue/grab/bulk - * @secure - */ - v3QueueGrabBulkCreate: (data: QueueBulkResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/queue/grab/bulk`, - method: "POST", - body: data, - secure: true, - type: ContentType.Json, - ...params, - }), - - /** - * No description - * - * @tags QueueDetails - * @name V3QueueDetailsList - * @request GET:/api/v3/queue/details - * @secure - */ - v3QueueDetailsList: ( - query?: { - /** @format int32 */ - seriesId?: number; - episodeIds?: number[]; - /** @default false */ - includeSeries?: boolean; - /** @default false */ - includeEpisode?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/queue/details`, - method: "GET", - query: query, - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags QueueStatus - * @name V3QueueStatusList - * @request GET:/api/v3/queue/status - * @secure - */ - v3QueueStatusList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/queue/status`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Release - * @name V3ReleaseCreate - * @request POST:/api/v3/release - * @secure - */ - v3ReleaseCreate: (data: ReleaseResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/release`, - method: "POST", - body: data, - secure: true, - type: ContentType.Json, - ...params, - }), - - /** - * No description - * - * @tags Release - * @name V3ReleaseList - * @request GET:/api/v3/release - * @secure - */ - v3ReleaseList: ( - query?: { - /** @format int32 */ - seriesId?: number; - /** @format int32 */ - episodeId?: number; - /** @format int32 */ - seasonNumber?: number; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/release`, - method: "GET", - query: query, - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags ReleaseProfile - * @name V3ReleaseprofileCreate - * @request POST:/api/v3/releaseprofile - * @secure - */ - v3ReleaseprofileCreate: (data: ReleaseProfileResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/releaseprofile`, - method: "POST", - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags ReleaseProfile - * @name V3ReleaseprofileList - * @request GET:/api/v3/releaseprofile - * @secure - */ - v3ReleaseprofileList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/releaseprofile`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags ReleaseProfile - * @name V3ReleaseprofileDelete - * @request DELETE:/api/v3/releaseprofile/{id} - * @secure - */ - v3ReleaseprofileDelete: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/releaseprofile/${id}`, - method: "DELETE", - secure: true, - ...params, - }), - - /** - * No description - * - * @tags ReleaseProfile - * @name V3ReleaseprofileUpdate - * @request PUT:/api/v3/releaseprofile/{id} - * @secure - */ - v3ReleaseprofileUpdate: (id: string, data: ReleaseProfileResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/releaseprofile/${id}`, - method: "PUT", - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags ReleaseProfile - * @name V3ReleaseprofileDetail - * @request GET:/api/v3/releaseprofile/{id} - * @secure - */ - v3ReleaseprofileDetail: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/releaseprofile/${id}`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags ReleasePush - * @name V3ReleasePushCreate - * @request POST:/api/v3/release/push - * @secure - */ - v3ReleasePushCreate: (data: ReleaseResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/release/push`, - method: "POST", - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags RemotePathMapping - * @name V3RemotepathmappingCreate - * @request POST:/api/v3/remotepathmapping - * @secure - */ - v3RemotepathmappingCreate: (data: RemotePathMappingResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/remotepathmapping`, - method: "POST", - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags RemotePathMapping - * @name V3RemotepathmappingList - * @request GET:/api/v3/remotepathmapping - * @secure - */ - v3RemotepathmappingList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/remotepathmapping`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags RemotePathMapping - * @name V3RemotepathmappingDelete - * @request DELETE:/api/v3/remotepathmapping/{id} - * @secure - */ - v3RemotepathmappingDelete: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/remotepathmapping/${id}`, - method: "DELETE", - secure: true, - ...params, - }), - - /** - * No description - * - * @tags RemotePathMapping - * @name V3RemotepathmappingUpdate - * @request PUT:/api/v3/remotepathmapping/{id} - * @secure - */ - v3RemotepathmappingUpdate: (id: string, data: RemotePathMappingResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/remotepathmapping/${id}`, - method: "PUT", - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags RemotePathMapping - * @name V3RemotepathmappingDetail - * @request GET:/api/v3/remotepathmapping/{id} - * @secure - */ - v3RemotepathmappingDetail: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/remotepathmapping/${id}`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags RenameEpisode - * @name V3RenameList - * @request GET:/api/v3/rename - * @secure - */ - v3RenameList: ( - query?: { - /** @format int32 */ - seriesId?: number; - /** @format int32 */ - seasonNumber?: number; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/rename`, - method: "GET", - query: query, - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags RootFolder - * @name V3RootfolderCreate - * @request POST:/api/v3/rootfolder - * @secure - */ - v3RootfolderCreate: (data: RootFolderResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/rootfolder`, - method: "POST", - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags RootFolder - * @name V3RootfolderList - * @request GET:/api/v3/rootfolder - * @secure - */ - v3RootfolderList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/rootfolder`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags RootFolder - * @name V3RootfolderDelete - * @request DELETE:/api/v3/rootfolder/{id} - * @secure - */ - v3RootfolderDelete: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/rootfolder/${id}`, - method: "DELETE", - secure: true, - ...params, - }), - - /** - * No description - * - * @tags RootFolder - * @name V3RootfolderDetail - * @request GET:/api/v3/rootfolder/{id} - * @secure - */ - v3RootfolderDetail: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/rootfolder/${id}`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags SeasonPass - * @name V3SeasonpassCreate - * @request POST:/api/v3/seasonpass - * @secure - */ - v3SeasonpassCreate: (data: SeasonPassResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/seasonpass`, - method: "POST", - body: data, - secure: true, - type: ContentType.Json, - ...params, - }), - - /** - * No description - * - * @tags Series - * @name V3SeriesList - * @request GET:/api/v3/series - * @secure - */ - v3SeriesList: ( - query?: { - /** @format int32 */ - tvdbId?: number; - /** @default false */ - includeSeasonImages?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/series`, - method: "GET", - query: query, - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Series - * @name V3SeriesCreate - * @request POST:/api/v3/series - * @secure - */ - v3SeriesCreate: (data: SeriesResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/series`, - method: "POST", - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Series - * @name V3SeriesDetail - * @request GET:/api/v3/series/{id} - * @secure - */ - v3SeriesDetail: ( - id: number, - query?: { - /** @default false */ - includeSeasonImages?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/series/${id}`, - method: "GET", - query: query, - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Series - * @name V3SeriesUpdate - * @request PUT:/api/v3/series/{id} - * @secure - */ - v3SeriesUpdate: ( - id: string, - data: SeriesResource, - query?: { - /** @default false */ - moveFiles?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/series/${id}`, - method: "PUT", - query: query, - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Series - * @name V3SeriesDelete - * @request DELETE:/api/v3/series/{id} - * @secure - */ - v3SeriesDelete: ( - id: number, - query?: { - /** @default false */ - deleteFiles?: boolean; - /** @default false */ - addImportListExclusion?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/series/${id}`, - method: "DELETE", - query: query, - secure: true, - ...params, - }), - - /** - * No description - * - * @tags SeriesEditor - * @name V3SeriesEditorUpdate - * @request PUT:/api/v3/series/editor - * @secure - */ - v3SeriesEditorUpdate: (data: SeriesEditorResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/series/editor`, - method: "PUT", - body: data, - secure: true, - type: ContentType.Json, - ...params, - }), - - /** - * No description - * - * @tags SeriesEditor - * @name V3SeriesEditorDelete - * @request DELETE:/api/v3/series/editor - * @secure - */ - v3SeriesEditorDelete: (data: SeriesEditorResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/series/editor`, - method: "DELETE", - body: data, - secure: true, - type: ContentType.Json, - ...params, - }), - - /** - * No description - * - * @tags SeriesImport - * @name V3SeriesImportCreate - * @request POST:/api/v3/series/import - * @secure - */ - v3SeriesImportCreate: (data: SeriesResource[], params: RequestParams = {}) => - this.request({ - path: `/api/v3/series/import`, - method: "POST", - body: data, - secure: true, - type: ContentType.Json, - ...params, - }), - - /** - * No description - * - * @tags SeriesLookup - * @name V3SeriesLookupList - * @request GET:/api/v3/series/lookup - * @secure - */ - v3SeriesLookupList: ( - query?: { - term?: string; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/api/v3/series/lookup`, - method: "GET", - query: query, - secure: true, - ...params, - }), - - /** - * No description - * - * @tags System - * @name V3SystemStatusList - * @request GET:/api/v3/system/status - * @secure - */ - v3SystemStatusList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/system/status`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags System - * @name V3SystemRoutesList - * @request GET:/api/v3/system/routes - * @secure - */ - v3SystemRoutesList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/system/routes`, - method: "GET", - secure: true, - ...params, - }), - - /** - * No description - * - * @tags System - * @name V3SystemRoutesDuplicateList - * @request GET:/api/v3/system/routes/duplicate - * @secure - */ - v3SystemRoutesDuplicateList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/system/routes/duplicate`, - method: "GET", - secure: true, - ...params, - }), - - /** - * No description - * - * @tags System - * @name V3SystemShutdownCreate - * @request POST:/api/v3/system/shutdown - * @secure - */ - v3SystemShutdownCreate: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/system/shutdown`, - method: "POST", - secure: true, - ...params, - }), - - /** - * No description - * - * @tags System - * @name V3SystemRestartCreate - * @request POST:/api/v3/system/restart - * @secure - */ - v3SystemRestartCreate: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/system/restart`, - method: "POST", - secure: true, - ...params, - }), - - /** - * No description - * - * @tags Tag - * @name V3TagList - * @request GET:/api/v3/tag - * @secure - */ - v3TagList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/tag`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Tag - * @name V3TagCreate - * @request POST:/api/v3/tag - * @secure - */ - v3TagCreate: (data: TagResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/tag`, - method: "POST", - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Tag - * @name V3TagUpdate - * @request PUT:/api/v3/tag/{id} - * @secure - */ - v3TagUpdate: (id: string, data: TagResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/tag/${id}`, - method: "PUT", - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Tag - * @name V3TagDelete - * @request DELETE:/api/v3/tag/{id} - * @secure - */ - v3TagDelete: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/tag/${id}`, - method: "DELETE", - secure: true, - ...params, - }), - - /** - * No description - * - * @tags Tag - * @name V3TagDetail - * @request GET:/api/v3/tag/{id} - * @secure - */ - v3TagDetail: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/tag/${id}`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags TagDetails - * @name V3TagDetailList - * @request GET:/api/v3/tag/detail - * @secure - */ - v3TagDetailList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/tag/detail`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags TagDetails - * @name V3TagDetailDetail - * @request GET:/api/v3/tag/detail/{id} - * @secure - */ - v3TagDetailDetail: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/tag/detail/${id}`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Task - * @name V3SystemTaskList - * @request GET:/api/v3/system/task - * @secure - */ - v3SystemTaskList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/system/task`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Task - * @name V3SystemTaskDetail - * @request GET:/api/v3/system/task/{id} - * @secure - */ - v3SystemTaskDetail: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/system/task/${id}`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags UiConfig - * @name V3ConfigUiUpdate - * @request PUT:/api/v3/config/ui/{id} - * @secure - */ - v3ConfigUiUpdate: (id: string, data: UiConfigResource, params: RequestParams = {}) => - this.request({ - path: `/api/v3/config/ui/${id}`, - method: "PUT", - body: data, - secure: true, - type: ContentType.Json, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags UiConfig - * @name V3ConfigUiDetail - * @request GET:/api/v3/config/ui/{id} - * @secure - */ - v3ConfigUiDetail: (id: number, params: RequestParams = {}) => - this.request({ - path: `/api/v3/config/ui/${id}`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags UiConfig - * @name V3ConfigUiList - * @request GET:/api/v3/config/ui - * @secure - */ - v3ConfigUiList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/config/ui`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Update - * @name V3UpdateList - * @request GET:/api/v3/update - * @secure - */ - v3UpdateList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/update`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags UpdateLogFile - * @name V3LogFileUpdateList - * @request GET:/api/v3/log/file/update - * @secure - */ - v3LogFileUpdateList: (params: RequestParams = {}) => - this.request({ - path: `/api/v3/log/file/update`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags UpdateLogFile - * @name V3LogFileUpdateDetail - * @request GET:/api/v3/log/file/update/{filename} - * @secure - */ - v3LogFileUpdateDetail: (filename: string, params: RequestParams = {}) => - this.request({ - path: `/api/v3/log/file/update/${filename}`, - method: "GET", - secure: true, - ...params, - }), - }; - login = { - /** - * No description - * - * @tags Authentication - * @name LoginCreate - * @request POST:/login - * @secure - */ - loginCreate: ( - data: { - username?: string; - password?: string; - rememberMe?: string; - }, - query?: { - returnUrl?: string; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/login`, - method: "POST", - query: query, - body: data, - secure: true, - type: ContentType.FormData, - ...params, - }), - - /** - * No description - * - * @tags StaticResource - * @name LoginList - * @request GET:/login - * @secure - */ - loginList: (params: RequestParams = {}) => - this.request({ - path: `/login`, - method: "GET", - secure: true, - ...params, - }), - }; - logout = { - /** - * No description - * - * @tags Authentication - * @name LogoutList - * @request GET:/logout - * @secure - */ - logoutList: (params: RequestParams = {}) => - this.request({ - path: `/logout`, - method: "GET", - secure: true, - ...params, - }), - }; - feed = { - /** - * No description - * - * @tags CalendarFeed - * @name V3CalendarSonarrIcsList - * @request GET:/feed/v3/calendar/sonarr.ics - * @secure - */ - v3CalendarSonarrIcsList: ( - query?: { - /** - * @format int32 - * @default 7 - */ - pastDays?: number; - /** - * @format int32 - * @default 28 - */ - futureDays?: number; - /** @default "" */ - tags?: string; - /** @default false */ - unmonitored?: boolean; - /** @default false */ - premieresOnly?: boolean; - /** @default false */ - asAllDay?: boolean; - }, - params: RequestParams = {}, - ) => - this.request({ - path: `/feed/v3/calendar/sonarr.ics`, - method: "GET", - query: query, - secure: true, - ...params, - }), - }; - ping = { - /** - * No description - * - * @tags Ping - * @name PingList - * @request GET:/ping - * @secure - */ - pingList: (params: RequestParams = {}) => - this.request({ - path: `/ping`, - method: "GET", - secure: true, - format: "json", - ...params, - }), - - /** - * No description - * - * @tags Ping - * @name HeadPing - * @request HEAD:/ping - * @secure - */ - headPing: (params: RequestParams = {}) => - this.request({ - path: `/ping`, - method: "HEAD", - secure: true, - format: "json", - ...params, - }), - }; - content = { - /** - * No description - * - * @tags StaticResource - * @name ContentDetail - * @request GET:/content/{path} - * @secure - */ - contentDetail: (path: string, params: RequestParams = {}) => - this.request({ - path: `/content/${path}`, - method: "GET", - secure: true, - ...params, - }), - }; - path = { - /** - * No description - * - * @tags StaticResource - * @name GetPath - * @request GET:/{path} - * @secure - */ - getPath: (path: string, params: RequestParams = {}) => - this.request({ - path: `/${path}`, - method: "GET", - secure: true, - ...params, - }), - }; -} diff --git a/src/__generated__/ky-client.ts b/src/__generated__/ky-client.ts new file mode 100644 index 0000000..c371cb7 --- /dev/null +++ b/src/__generated__/ky-client.ts @@ -0,0 +1,176 @@ +// Copied and modified from here: https://github.com/acacode/swagger-typescript-api/pull/690 +import type { BeforeRequestHook, Hooks, KyInstance, Options as KyOptions, NormalizedOptions } from "ky"; +import ky from "ky"; + +type KyResponse = Response & { + json(): Promise; +}; + +export type ResponsePromise = { + arrayBuffer: () => Promise; + blob: () => Promise; + formData: () => Promise; + json(): Promise; + text: () => Promise; +} & Promise>; + +export type ResponseFormat = keyof Omit; + +// Same as axios. Using provided SearchParamsOption by ky break some typings +export type QueryParamsType = Record; + +export interface FullRequestParams extends Omit { + /** set parameter to `true` for call `securityWorker` for this request */ + secure?: boolean; + /** request path */ + path: string; + /** content type of request body */ + type?: ContentType; + /** query params */ + query?: QueryParamsType; + /** format of response (i.e. response.json() -> format: "json") */ + format?: ResponseFormat; + /** request body */ + body?: unknown; +} + +export type RequestParams = Omit; + +export interface ApiConfig extends Omit { + securityWorker?: (securityData: SecurityDataType | null) => Promise | NormalizedOptions | void; + secure?: boolean; + format?: ResponseType; +} + +export enum ContentType { + Json = "application/json", + FormData = "multipart/form-data", + UrlEncoded = "application/x-www-form-urlencoded", + Text = "text/plain", +} + +export class HttpClient { + public ky: KyInstance; + private securityData: SecurityDataType | null = null; + private securityWorker?: ApiConfig["securityWorker"]; + private secure?: boolean; + private format?: ResponseType; + + constructor({ securityWorker, secure, format, ...options }: ApiConfig = {}) { + this.ky = ky.create({ ...options, prefixUrl: options.prefixUrl || "" }); + this.secure = secure; + this.format = format; + this.securityWorker = securityWorker; + } + + public setSecurityData = (data: SecurityDataType | null) => { + this.securityData = data; + }; + + protected mergeRequestParams(params1: KyOptions, params2?: KyOptions): KyOptions { + return { + ...params1, + ...params2, + headers: { + ...params1.headers, + ...(params2 && params2.headers), + }, + }; + } + + protected stringifyFormItem(formItem: unknown) { + if (typeof formItem === "object" && formItem !== null) { + return JSON.stringify(formItem); + } else { + return `${formItem}`; + } + } + + protected createFormData(input: Record): FormData { + return Object.keys(input || {}).reduce((formData, key) => { + const property = input[key]; + const propertyContent: any[] = property instanceof Array ? property : [property]; + + for (const formItem of propertyContent) { + const isFileType = formItem instanceof Blob || formItem instanceof File; + formData.append(key, isFileType ? formItem : this.stringifyFormItem(formItem)); + } + + return formData; + }, new FormData()); + } + + public request = ({ + secure = this.secure, + path, + type, + query, + format, + body, + ...options + }: FullRequestParams): ResponsePromise => { + if (body) { + if (type === ContentType.FormData) { + body = typeof body === "object" ? this.createFormData(body as Record) : body; + } else if (type === ContentType.Text) { + body = typeof body !== "string" ? JSON.stringify(body) : body; + } + } + + let headers: Headers | Record | undefined; + if (options.headers instanceof Headers) { + headers = new Headers(options.headers); + if (type && type !== ContentType.FormData) { + headers.set("Content-Type", type); + } + } else { + headers = { ...options.headers } as Record; + if (type && type !== ContentType.FormData) { + headers["Content-Type"] = type; + } + } + + let hooks: Hooks | undefined; + if (secure && this.securityWorker) { + const securityWorker: BeforeRequestHook = async (request, options) => { + const secureOptions = await this.securityWorker!(this.securityData); + if (secureOptions && typeof secureOptions === "object") { + let { headers } = options; + if (secureOptions.headers) { + const mergedHeaders = new Headers(headers); + const secureHeaders = new Headers(secureOptions.headers); + secureHeaders.forEach((value, key) => { + mergedHeaders.set(key, value); + }); + headers = mergedHeaders; + } + return new Request(request.url, { + ...options, + ...secureOptions, + headers, + }); + } + }; + + hooks = { + ...options.hooks, + beforeRequest: options.hooks && options.hooks.beforeRequest ? [securityWorker, ...options.hooks.beforeRequest] : [securityWorker], + }; + } + + // workaround for query types + const searchParams = new URLSearchParams(query); + + const request = this.ky(path.replace(/^\//, ""), { + ...options, + headers, + searchParams: searchParams, + body: body as any, + hooks, + }); + + return request; + }; +} + +export const KyHttpClient = HttpClient; diff --git a/src/__generated__/mergedTypes.ts b/src/__generated__/mergedTypes.ts new file mode 100644 index 0000000..9f85aab --- /dev/null +++ b/src/__generated__/mergedTypes.ts @@ -0,0 +1,56 @@ +import { + QualityDefinitionResource as QDRRadarr, + CustomFormatResource as RadarrCustomFormatResource, + CustomFormatSpecificationSchema as RadarrCustomFormatSpecificationSchema, + ProfileFormatItemResource as RadarrProfileFormatItemResource, + QualityProfileQualityItemResource as RadarrQualityProfileQualityItemResource, + QualityProfileResource as RadarrQualityProfileResource, +} from "./radarr/data-contracts"; +import { + QualityDefinitionResource as QDRSonarr, + CustomFormatResource as SonarrCustomFormatResource, + CustomFormatSpecificationSchema as SonarrCustomFormatSpecificationSchema, + ProfileFormatItemResource as SonarrProfileFormatItemResource, + QualityProfileQualityItemResource as SonarrQualityProfileQualityItemResource, + QualityProfileResource as SonarrQualityProfileResource, +} from "./sonarr/data-contracts"; + +// Those types are only to make the API client unified usable. +// Sonarr and Radarr slightly differ in API fields and therefore at the moment we can ignore those changes. +// If someday we need specific fields per *arr instance then we have to split the API usage and modify every module. + +type QDRMerged = QDRSonarr & QDRRadarr; +type QDRPickedSource = Omit, "source">; +type CustomQualitySource = { + quality?: T & { + source?: string; + }; +}; + +type OmittedQuality = Omit; + +export type MergedQualityDefinitionResource = OmittedQuality & Partial>; +export type MergedCustomFormatResource = SonarrCustomFormatResource & RadarrCustomFormatResource; +export type MergedProfileFormatItemResource = SonarrProfileFormatItemResource & RadarrProfileFormatItemResource; + +type QPQIRMerged = SonarrQualityProfileQualityItemResource & RadarrQualityProfileQualityItemResource; +type QPQIRPickedSource = Omit, "source">; + +export type MergedQualityProfileQualityItemResource = Omit & + Partial< + Omit & { + items?: MergedQualityProfileQualityItemResource[] | null; + quality?: QPQIRPickedSource & { source?: string }; + } + >; + +type QPRMerged = SonarrQualityProfileResource & RadarrQualityProfileResource; + +export type MergedQualityProfileResource = Omit & + Partial< + Omit & { + items?: MergedQualityProfileQualityItemResource[] | null; + } + >; + +export type MergedCustomFormatSpecificationSchema = RadarrCustomFormatSpecificationSchema & SonarrCustomFormatSpecificationSchema; diff --git a/src/__generated__/radarr/Api.ts b/src/__generated__/radarr/Api.ts new file mode 100644 index 0000000..d69ce28 --- /dev/null +++ b/src/__generated__/radarr/Api.ts @@ -0,0 +1,4307 @@ +/* eslint-disable */ +/* tslint:disable */ +/* + * --------------------------------------------------------------- + * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## + * ## ## + * ## AUTHOR: acacode ## + * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## + * --------------------------------------------------------------- + */ + +import { ContentType, HttpClient, RequestParams } from "./../ky-client"; +import { + AlternativeTitleResource, + ApiInfoResource, + AutoTaggingResource, + BackupResource, + BlocklistBulkResource, + BlocklistResource, + BlocklistResourcePagingResource, + CollectionResource, + CollectionUpdateResource, + ColonReplacementFormat, + CommandResource, + CreditResource, + CustomFilterResource, + CustomFormatBulkResource, + CustomFormatResource, + DelayProfileResource, + DiskSpaceResource, + DownloadClientBulkResource, + DownloadClientConfigResource, + DownloadClientResource, + DownloadProtocol, + ExtraFileResource, + HealthResource, + HistoryResource, + HistoryResourcePagingResource, + HostConfigResource, + ImportListBulkResource, + ImportListConfigResource, + ImportListExclusionBulkResource, + ImportListExclusionResource, + ImportListExclusionResourcePagingResource, + ImportListResource, + IndexerBulkResource, + IndexerConfigResource, + IndexerFlagResource, + IndexerResource, + LanguageResource, + LocalizationLanguageResource, + LogFileResource, + LogResourcePagingResource, + ManualImportReprocessResource, + ManualImportResource, + MediaManagementConfigResource, + MetadataConfigResource, + MetadataResource, + MovieEditorResource, + MovieFileListResource, + MovieFileResource, + MovieHistoryEventType, + MovieResource, + MovieResourcePagingResource, + NamingConfigResource, + NotificationResource, + ParseResource, + QualityDefinitionResource, + QualityProfileResource, + QueueBulkResource, + QueueResource, + QueueResourcePagingResource, + QueueStatusResource, + ReleaseProfileResource, + ReleaseResource, + RemotePathMappingResource, + RenameMovieResource, + RootFolderResource, + SortDirection, + SystemResource, + TagDetailsResource, + TagResource, + TaskResource, + UiConfigResource, + UpdateResource, +} from "./data-contracts"; + +export class Api { + http: HttpClient; + + constructor(http: HttpClient) { + this.http = http; + } + + /** + * No description + * + * @tags AlternativeTitle + * @name V3AlttitleList + * @request GET:/api/v3/alttitle + * @secure + */ + v3AlttitleList = ( + query?: { + /** @format int32 */ + movieId?: number; + /** @format int32 */ + movieMetadataId?: number; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/alttitle`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags AlternativeTitle + * @name V3AlttitleDetail + * @request GET:/api/v3/alttitle/{id} + * @secure + */ + v3AlttitleDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/alttitle/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags ApiInfo + * @name GetApi + * @request GET:/api + * @secure + */ + getApi = (params: RequestParams = {}) => + this.http.request({ + path: `/api`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags AutoTagging + * @name V3AutotaggingCreate + * @request POST:/api/v3/autotagging + * @secure + */ + v3AutotaggingCreate = (data: AutoTaggingResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/autotagging`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags AutoTagging + * @name V3AutotaggingList + * @request GET:/api/v3/autotagging + * @secure + */ + v3AutotaggingList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/autotagging`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags AutoTagging + * @name V3AutotaggingUpdate + * @request PUT:/api/v3/autotagging/{id} + * @secure + */ + v3AutotaggingUpdate = (id: string, data: AutoTaggingResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/autotagging/${id}`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags AutoTagging + * @name V3AutotaggingDelete + * @request DELETE:/api/v3/autotagging/{id} + * @secure + */ + v3AutotaggingDelete = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/autotagging/${id}`, + method: "DELETE", + secure: true, + ...params, + }); + /** + * No description + * + * @tags AutoTagging + * @name V3AutotaggingDetail + * @request GET:/api/v3/autotagging/{id} + * @secure + */ + v3AutotaggingDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/autotagging/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags AutoTagging + * @name V3AutotaggingSchemaList + * @request GET:/api/v3/autotagging/schema + * @secure + */ + v3AutotaggingSchemaList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/autotagging/schema`, + method: "GET", + secure: true, + ...params, + }); + /** + * No description + * + * @tags Backup + * @name V3SystemBackupList + * @request GET:/api/v3/system/backup + * @secure + */ + v3SystemBackupList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/system/backup`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Backup + * @name V3SystemBackupDelete + * @request DELETE:/api/v3/system/backup/{id} + * @secure + */ + v3SystemBackupDelete = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/system/backup/${id}`, + method: "DELETE", + secure: true, + ...params, + }); + /** + * No description + * + * @tags Backup + * @name V3SystemBackupRestoreCreate + * @request POST:/api/v3/system/backup/restore/{id} + * @secure + */ + v3SystemBackupRestoreCreate = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/system/backup/restore/${id}`, + method: "POST", + secure: true, + ...params, + }); + /** + * No description + * + * @tags Backup + * @name V3SystemBackupRestoreUploadCreate + * @request POST:/api/v3/system/backup/restore/upload + * @secure + */ + v3SystemBackupRestoreUploadCreate = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/system/backup/restore/upload`, + method: "POST", + secure: true, + ...params, + }); + /** + * No description + * + * @tags Blocklist + * @name V3BlocklistList + * @request GET:/api/v3/blocklist + * @secure + */ + v3BlocklistList = ( + query?: { + /** + * @format int32 + * @default 1 + */ + page?: number; + /** + * @format int32 + * @default 10 + */ + pageSize?: number; + sortKey?: string; + sortDirection?: SortDirection; + movieIds?: number[]; + protocols?: DownloadProtocol[]; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/blocklist`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Blocklist + * @name V3BlocklistMovieList + * @request GET:/api/v3/blocklist/movie + * @secure + */ + v3BlocklistMovieList = ( + query?: { + /** @format int32 */ + movieId?: number; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/blocklist/movie`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Blocklist + * @name V3BlocklistDelete + * @request DELETE:/api/v3/blocklist/{id} + * @secure + */ + v3BlocklistDelete = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/blocklist/${id}`, + method: "DELETE", + secure: true, + ...params, + }); + /** + * No description + * + * @tags Blocklist + * @name V3BlocklistBulkDelete + * @request DELETE:/api/v3/blocklist/bulk + * @secure + */ + v3BlocklistBulkDelete = (data: BlocklistBulkResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/blocklist/bulk`, + method: "DELETE", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags Calendar + * @name V3CalendarList + * @request GET:/api/v3/calendar + * @secure + */ + v3CalendarList = ( + query?: { + /** @format date-time */ + start?: string; + /** @format date-time */ + end?: string; + /** @default false */ + unmonitored?: boolean; + /** @default "" */ + tags?: string; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/calendar`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Collection + * @name V3CollectionList + * @request GET:/api/v3/collection + * @secure + */ + v3CollectionList = ( + query?: { + /** @format int32 */ + tmdbId?: number; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/collection`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Collection + * @name V3CollectionUpdate + * @request PUT:/api/v3/collection + * @secure + */ + v3CollectionUpdate = (data: CollectionUpdateResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/collection`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags Collection + * @name V3CollectionUpdate2 + * @request PUT:/api/v3/collection/{id} + * @originalName v3CollectionUpdate + * @duplicate + * @secure + */ + v3CollectionUpdate2 = (id: string, data: CollectionResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/collection/${id}`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Collection + * @name V3CollectionDetail + * @request GET:/api/v3/collection/{id} + * @secure + */ + v3CollectionDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/collection/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Command + * @name V3CommandCreate + * @request POST:/api/v3/command + * @secure + */ + v3CommandCreate = (data: CommandResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/command`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Command + * @name V3CommandList + * @request GET:/api/v3/command + * @secure + */ + v3CommandList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/command`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Command + * @name V3CommandDelete + * @request DELETE:/api/v3/command/{id} + * @secure + */ + v3CommandDelete = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/command/${id}`, + method: "DELETE", + secure: true, + ...params, + }); + /** + * No description + * + * @tags Command + * @name V3CommandDetail + * @request GET:/api/v3/command/{id} + * @secure + */ + v3CommandDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/command/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Credit + * @name V3CreditList + * @request GET:/api/v3/credit + * @secure + */ + v3CreditList = ( + query?: { + /** @format int32 */ + movieId?: number; + /** @format int32 */ + movieMetadataId?: number; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/credit`, + method: "GET", + query: query, + secure: true, + ...params, + }); + /** + * No description + * + * @tags Credit + * @name V3CreditDetail + * @request GET:/api/v3/credit/{id} + * @secure + */ + v3CreditDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/credit/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags CustomFilter + * @name V3CustomfilterList + * @request GET:/api/v3/customfilter + * @secure + */ + v3CustomfilterList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/customfilter`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags CustomFilter + * @name V3CustomfilterCreate + * @request POST:/api/v3/customfilter + * @secure + */ + v3CustomfilterCreate = (data: CustomFilterResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/customfilter`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags CustomFilter + * @name V3CustomfilterUpdate + * @request PUT:/api/v3/customfilter/{id} + * @secure + */ + v3CustomfilterUpdate = (id: string, data: CustomFilterResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/customfilter/${id}`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags CustomFilter + * @name V3CustomfilterDelete + * @request DELETE:/api/v3/customfilter/{id} + * @secure + */ + v3CustomfilterDelete = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/customfilter/${id}`, + method: "DELETE", + secure: true, + ...params, + }); + /** + * No description + * + * @tags CustomFilter + * @name V3CustomfilterDetail + * @request GET:/api/v3/customfilter/{id} + * @secure + */ + v3CustomfilterDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/customfilter/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags CustomFormat + * @name V3CustomformatList + * @request GET:/api/v3/customformat + * @secure + */ + v3CustomformatList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/customformat`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags CustomFormat + * @name V3CustomformatCreate + * @request POST:/api/v3/customformat + * @secure + */ + v3CustomformatCreate = (data: CustomFormatResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/customformat`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags CustomFormat + * @name V3CustomformatUpdate + * @request PUT:/api/v3/customformat/{id} + * @secure + */ + v3CustomformatUpdate = (id: string, data: CustomFormatResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/customformat/${id}`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags CustomFormat + * @name V3CustomformatDelete + * @request DELETE:/api/v3/customformat/{id} + * @secure + */ + v3CustomformatDelete = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/customformat/${id}`, + method: "DELETE", + secure: true, + ...params, + }); + /** + * No description + * + * @tags CustomFormat + * @name V3CustomformatDetail + * @request GET:/api/v3/customformat/{id} + * @secure + */ + v3CustomformatDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/customformat/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags CustomFormat + * @name V3CustomformatBulkUpdate + * @request PUT:/api/v3/customformat/bulk + * @secure + */ + v3CustomformatBulkUpdate = (data: CustomFormatBulkResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/customformat/bulk`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags CustomFormat + * @name V3CustomformatBulkDelete + * @request DELETE:/api/v3/customformat/bulk + * @secure + */ + v3CustomformatBulkDelete = (data: CustomFormatBulkResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/customformat/bulk`, + method: "DELETE", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags CustomFormat + * @name V3CustomformatSchemaList + * @request GET:/api/v3/customformat/schema + * @secure + */ + v3CustomformatSchemaList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/customformat/schema`, + method: "GET", + secure: true, + ...params, + }); + /** + * No description + * + * @tags Cutoff + * @name V3WantedCutoffList + * @request GET:/api/v3/wanted/cutoff + * @secure + */ + v3WantedCutoffList = ( + query?: { + /** + * @format int32 + * @default 1 + */ + page?: number; + /** + * @format int32 + * @default 10 + */ + pageSize?: number; + sortKey?: string; + sortDirection?: SortDirection; + /** @default true */ + monitored?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/wanted/cutoff`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags DelayProfile + * @name V3DelayprofileCreate + * @request POST:/api/v3/delayprofile + * @secure + */ + v3DelayprofileCreate = (data: DelayProfileResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/delayprofile`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags DelayProfile + * @name V3DelayprofileList + * @request GET:/api/v3/delayprofile + * @secure + */ + v3DelayprofileList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/delayprofile`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags DelayProfile + * @name V3DelayprofileDelete + * @request DELETE:/api/v3/delayprofile/{id} + * @secure + */ + v3DelayprofileDelete = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/delayprofile/${id}`, + method: "DELETE", + secure: true, + ...params, + }); + /** + * No description + * + * @tags DelayProfile + * @name V3DelayprofileUpdate + * @request PUT:/api/v3/delayprofile/{id} + * @secure + */ + v3DelayprofileUpdate = (id: string, data: DelayProfileResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/delayprofile/${id}`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags DelayProfile + * @name V3DelayprofileDetail + * @request GET:/api/v3/delayprofile/{id} + * @secure + */ + v3DelayprofileDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/delayprofile/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags DelayProfile + * @name V3DelayprofileReorderUpdate + * @request PUT:/api/v3/delayprofile/reorder/{id} + * @secure + */ + v3DelayprofileReorderUpdate = ( + id: number, + query?: { + /** @format int32 */ + after?: number; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/delayprofile/reorder/${id}`, + method: "PUT", + query: query, + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags DiskSpace + * @name V3DiskspaceList + * @request GET:/api/v3/diskspace + * @secure + */ + v3DiskspaceList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/diskspace`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags DownloadClient + * @name V3DownloadclientList + * @request GET:/api/v3/downloadclient + * @secure + */ + v3DownloadclientList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/downloadclient`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags DownloadClient + * @name V3DownloadclientCreate + * @request POST:/api/v3/downloadclient + * @secure + */ + v3DownloadclientCreate = ( + data: DownloadClientResource, + query?: { + /** @default false */ + forceSave?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/downloadclient`, + method: "POST", + query: query, + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags DownloadClient + * @name V3DownloadclientUpdate + * @request PUT:/api/v3/downloadclient/{id} + * @secure + */ + v3DownloadclientUpdate = ( + id: number, + data: DownloadClientResource, + query?: { + /** @default false */ + forceSave?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/downloadclient/${id}`, + method: "PUT", + query: query, + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags DownloadClient + * @name V3DownloadclientDelete + * @request DELETE:/api/v3/downloadclient/{id} + * @secure + */ + v3DownloadclientDelete = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/downloadclient/${id}`, + method: "DELETE", + secure: true, + ...params, + }); + /** + * No description + * + * @tags DownloadClient + * @name V3DownloadclientDetail + * @request GET:/api/v3/downloadclient/{id} + * @secure + */ + v3DownloadclientDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/downloadclient/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags DownloadClient + * @name V3DownloadclientBulkUpdate + * @request PUT:/api/v3/downloadclient/bulk + * @secure + */ + v3DownloadclientBulkUpdate = (data: DownloadClientBulkResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/downloadclient/bulk`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags DownloadClient + * @name V3DownloadclientBulkDelete + * @request DELETE:/api/v3/downloadclient/bulk + * @secure + */ + v3DownloadclientBulkDelete = (data: DownloadClientBulkResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/downloadclient/bulk`, + method: "DELETE", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags DownloadClient + * @name V3DownloadclientSchemaList + * @request GET:/api/v3/downloadclient/schema + * @secure + */ + v3DownloadclientSchemaList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/downloadclient/schema`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags DownloadClient + * @name V3DownloadclientTestCreate + * @request POST:/api/v3/downloadclient/test + * @secure + */ + v3DownloadclientTestCreate = ( + data: DownloadClientResource, + query?: { + /** @default false */ + forceTest?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/downloadclient/test`, + method: "POST", + query: query, + body: data, + secure: true, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags DownloadClient + * @name V3DownloadclientTestallCreate + * @request POST:/api/v3/downloadclient/testall + * @secure + */ + v3DownloadclientTestallCreate = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/downloadclient/testall`, + method: "POST", + secure: true, + ...params, + }); + /** + * No description + * + * @tags DownloadClient + * @name V3DownloadclientActionCreate + * @request POST:/api/v3/downloadclient/action/{name} + * @secure + */ + v3DownloadclientActionCreate = (name: string, data: DownloadClientResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/downloadclient/action/${name}`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags DownloadClientConfig + * @name V3ConfigDownloadclientList + * @request GET:/api/v3/config/downloadclient + * @secure + */ + v3ConfigDownloadclientList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/config/downloadclient`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags DownloadClientConfig + * @name V3ConfigDownloadclientUpdate + * @request PUT:/api/v3/config/downloadclient/{id} + * @secure + */ + v3ConfigDownloadclientUpdate = (id: string, data: DownloadClientConfigResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/config/downloadclient/${id}`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags DownloadClientConfig + * @name V3ConfigDownloadclientDetail + * @request GET:/api/v3/config/downloadclient/{id} + * @secure + */ + v3ConfigDownloadclientDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/config/downloadclient/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags ExtraFile + * @name V3ExtrafileList + * @request GET:/api/v3/extrafile + * @secure + */ + v3ExtrafileList = ( + query?: { + /** @format int32 */ + movieId?: number; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/extrafile`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags FileSystem + * @name V3FilesystemList + * @request GET:/api/v3/filesystem + * @secure + */ + v3FilesystemList = ( + query?: { + path?: string; + /** @default false */ + includeFiles?: boolean; + /** @default false */ + allowFoldersWithoutTrailingSlashes?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/filesystem`, + method: "GET", + query: query, + secure: true, + ...params, + }); + /** + * No description + * + * @tags FileSystem + * @name V3FilesystemTypeList + * @request GET:/api/v3/filesystem/type + * @secure + */ + v3FilesystemTypeList = ( + query?: { + path?: string; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/filesystem/type`, + method: "GET", + query: query, + secure: true, + ...params, + }); + /** + * No description + * + * @tags FileSystem + * @name V3FilesystemMediafilesList + * @request GET:/api/v3/filesystem/mediafiles + * @secure + */ + v3FilesystemMediafilesList = ( + query?: { + path?: string; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/filesystem/mediafiles`, + method: "GET", + query: query, + secure: true, + ...params, + }); + /** + * No description + * + * @tags Health + * @name V3HealthList + * @request GET:/api/v3/health + * @secure + */ + v3HealthList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/health`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags History + * @name V3HistoryList + * @request GET:/api/v3/history + * @secure + */ + v3HistoryList = ( + query?: { + /** + * @format int32 + * @default 1 + */ + page?: number; + /** + * @format int32 + * @default 10 + */ + pageSize?: number; + sortKey?: string; + sortDirection?: SortDirection; + includeMovie?: boolean; + eventType?: number[]; + downloadId?: string; + movieIds?: number[]; + languages?: number[]; + quality?: number[]; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/history`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags History + * @name V3HistorySinceList + * @request GET:/api/v3/history/since + * @secure + */ + v3HistorySinceList = ( + query?: { + /** @format date-time */ + date?: string; + eventType?: MovieHistoryEventType; + /** @default false */ + includeMovie?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/history/since`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags History + * @name V3HistoryMovieList + * @request GET:/api/v3/history/movie + * @secure + */ + v3HistoryMovieList = ( + query?: { + /** @format int32 */ + movieId?: number; + eventType?: MovieHistoryEventType; + /** @default false */ + includeMovie?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/history/movie`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags History + * @name V3HistoryFailedCreate + * @request POST:/api/v3/history/failed/{id} + * @secure + */ + v3HistoryFailedCreate = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/history/failed/${id}`, + method: "POST", + secure: true, + ...params, + }); + /** + * No description + * + * @tags HostConfig + * @name V3ConfigHostList + * @request GET:/api/v3/config/host + * @secure + */ + v3ConfigHostList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/config/host`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags HostConfig + * @name V3ConfigHostUpdate + * @request PUT:/api/v3/config/host/{id} + * @secure + */ + v3ConfigHostUpdate = (id: string, data: HostConfigResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/config/host/${id}`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags HostConfig + * @name V3ConfigHostDetail + * @request GET:/api/v3/config/host/{id} + * @secure + */ + v3ConfigHostDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/config/host/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags ImportList + * @name V3ImportlistList + * @request GET:/api/v3/importlist + * @secure + */ + v3ImportlistList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/importlist`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags ImportList + * @name V3ImportlistCreate + * @request POST:/api/v3/importlist + * @secure + */ + v3ImportlistCreate = ( + data: ImportListResource, + query?: { + /** @default false */ + forceSave?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/importlist`, + method: "POST", + query: query, + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags ImportList + * @name V3ImportlistUpdate + * @request PUT:/api/v3/importlist/{id} + * @secure + */ + v3ImportlistUpdate = ( + id: number, + data: ImportListResource, + query?: { + /** @default false */ + forceSave?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/importlist/${id}`, + method: "PUT", + query: query, + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags ImportList + * @name V3ImportlistDelete + * @request DELETE:/api/v3/importlist/{id} + * @secure + */ + v3ImportlistDelete = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/importlist/${id}`, + method: "DELETE", + secure: true, + ...params, + }); + /** + * No description + * + * @tags ImportList + * @name V3ImportlistDetail + * @request GET:/api/v3/importlist/{id} + * @secure + */ + v3ImportlistDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/importlist/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags ImportList + * @name V3ImportlistBulkUpdate + * @request PUT:/api/v3/importlist/bulk + * @secure + */ + v3ImportlistBulkUpdate = (data: ImportListBulkResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/importlist/bulk`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags ImportList + * @name V3ImportlistBulkDelete + * @request DELETE:/api/v3/importlist/bulk + * @secure + */ + v3ImportlistBulkDelete = (data: ImportListBulkResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/importlist/bulk`, + method: "DELETE", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags ImportList + * @name V3ImportlistSchemaList + * @request GET:/api/v3/importlist/schema + * @secure + */ + v3ImportlistSchemaList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/importlist/schema`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags ImportList + * @name V3ImportlistTestCreate + * @request POST:/api/v3/importlist/test + * @secure + */ + v3ImportlistTestCreate = ( + data: ImportListResource, + query?: { + /** @default false */ + forceTest?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/importlist/test`, + method: "POST", + query: query, + body: data, + secure: true, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags ImportList + * @name V3ImportlistTestallCreate + * @request POST:/api/v3/importlist/testall + * @secure + */ + v3ImportlistTestallCreate = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/importlist/testall`, + method: "POST", + secure: true, + ...params, + }); + /** + * No description + * + * @tags ImportList + * @name V3ImportlistActionCreate + * @request POST:/api/v3/importlist/action/{name} + * @secure + */ + v3ImportlistActionCreate = (name: string, data: ImportListResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/importlist/action/${name}`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags ImportListConfig + * @name V3ConfigImportlistList + * @request GET:/api/v3/config/importlist + * @secure + */ + v3ConfigImportlistList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/config/importlist`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags ImportListConfig + * @name V3ConfigImportlistUpdate + * @request PUT:/api/v3/config/importlist/{id} + * @secure + */ + v3ConfigImportlistUpdate = (id: string, data: ImportListConfigResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/config/importlist/${id}`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags ImportListConfig + * @name V3ConfigImportlistDetail + * @request GET:/api/v3/config/importlist/{id} + * @secure + */ + v3ConfigImportlistDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/config/importlist/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags ImportListExclusion + * @name V3ExclusionsList + * @request GET:/api/v3/exclusions + * @deprecated + * @secure + */ + v3ExclusionsList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/exclusions`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags ImportListExclusion + * @name V3ExclusionsCreate + * @request POST:/api/v3/exclusions + * @secure + */ + v3ExclusionsCreate = (data: ImportListExclusionResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/exclusions`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags ImportListExclusion + * @name V3ExclusionsPagedList + * @request GET:/api/v3/exclusions/paged + * @secure + */ + v3ExclusionsPagedList = ( + query?: { + /** + * @format int32 + * @default 1 + */ + page?: number; + /** + * @format int32 + * @default 10 + */ + pageSize?: number; + sortKey?: string; + sortDirection?: SortDirection; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/exclusions/paged`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags ImportListExclusion + * @name V3ExclusionsUpdate + * @request PUT:/api/v3/exclusions/{id} + * @secure + */ + v3ExclusionsUpdate = (id: string, data: ImportListExclusionResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/exclusions/${id}`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags ImportListExclusion + * @name V3ExclusionsDelete + * @request DELETE:/api/v3/exclusions/{id} + * @secure + */ + v3ExclusionsDelete = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/exclusions/${id}`, + method: "DELETE", + secure: true, + ...params, + }); + /** + * No description + * + * @tags ImportListExclusion + * @name V3ExclusionsDetail + * @request GET:/api/v3/exclusions/{id} + * @secure + */ + v3ExclusionsDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/exclusions/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags ImportListExclusion + * @name V3ExclusionsBulkCreate + * @request POST:/api/v3/exclusions/bulk + * @secure + */ + v3ExclusionsBulkCreate = (data: ImportListExclusionResource[], params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/exclusions/bulk`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags ImportListExclusion + * @name V3ExclusionsBulkDelete + * @request DELETE:/api/v3/exclusions/bulk + * @secure + */ + v3ExclusionsBulkDelete = (data: ImportListExclusionBulkResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/exclusions/bulk`, + method: "DELETE", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags ImportListMovies + * @name V3ImportlistMovieList + * @request GET:/api/v3/importlist/movie + * @secure + */ + v3ImportlistMovieList = ( + query?: { + /** @default false */ + includeRecommendations?: boolean; + /** @default false */ + includeTrending?: boolean; + /** @default false */ + includePopular?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/importlist/movie`, + method: "GET", + query: query, + secure: true, + ...params, + }); + /** + * No description + * + * @tags ImportListMovies + * @name V3ImportlistMovieCreate + * @request POST:/api/v3/importlist/movie + * @secure + */ + v3ImportlistMovieCreate = (data: MovieResource[], params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/importlist/movie`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags Indexer + * @name V3IndexerList + * @request GET:/api/v3/indexer + * @secure + */ + v3IndexerList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/indexer`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Indexer + * @name V3IndexerCreate + * @request POST:/api/v3/indexer + * @secure + */ + v3IndexerCreate = ( + data: IndexerResource, + query?: { + /** @default false */ + forceSave?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/indexer`, + method: "POST", + query: query, + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Indexer + * @name V3IndexerUpdate + * @request PUT:/api/v3/indexer/{id} + * @secure + */ + v3IndexerUpdate = ( + id: number, + data: IndexerResource, + query?: { + /** @default false */ + forceSave?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/indexer/${id}`, + method: "PUT", + query: query, + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Indexer + * @name V3IndexerDelete + * @request DELETE:/api/v3/indexer/{id} + * @secure + */ + v3IndexerDelete = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/indexer/${id}`, + method: "DELETE", + secure: true, + ...params, + }); + /** + * No description + * + * @tags Indexer + * @name V3IndexerDetail + * @request GET:/api/v3/indexer/{id} + * @secure + */ + v3IndexerDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/indexer/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Indexer + * @name V3IndexerBulkUpdate + * @request PUT:/api/v3/indexer/bulk + * @secure + */ + v3IndexerBulkUpdate = (data: IndexerBulkResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/indexer/bulk`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Indexer + * @name V3IndexerBulkDelete + * @request DELETE:/api/v3/indexer/bulk + * @secure + */ + v3IndexerBulkDelete = (data: IndexerBulkResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/indexer/bulk`, + method: "DELETE", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags Indexer + * @name V3IndexerSchemaList + * @request GET:/api/v3/indexer/schema + * @secure + */ + v3IndexerSchemaList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/indexer/schema`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Indexer + * @name V3IndexerTestCreate + * @request POST:/api/v3/indexer/test + * @secure + */ + v3IndexerTestCreate = ( + data: IndexerResource, + query?: { + /** @default false */ + forceTest?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/indexer/test`, + method: "POST", + query: query, + body: data, + secure: true, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags Indexer + * @name V3IndexerTestallCreate + * @request POST:/api/v3/indexer/testall + * @secure + */ + v3IndexerTestallCreate = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/indexer/testall`, + method: "POST", + secure: true, + ...params, + }); + /** + * No description + * + * @tags Indexer + * @name V3IndexerActionCreate + * @request POST:/api/v3/indexer/action/{name} + * @secure + */ + v3IndexerActionCreate = (name: string, data: IndexerResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/indexer/action/${name}`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags IndexerConfig + * @name V3ConfigIndexerList + * @request GET:/api/v3/config/indexer + * @secure + */ + v3ConfigIndexerList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/config/indexer`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags IndexerConfig + * @name V3ConfigIndexerUpdate + * @request PUT:/api/v3/config/indexer/{id} + * @secure + */ + v3ConfigIndexerUpdate = (id: string, data: IndexerConfigResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/config/indexer/${id}`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags IndexerConfig + * @name V3ConfigIndexerDetail + * @request GET:/api/v3/config/indexer/{id} + * @secure + */ + v3ConfigIndexerDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/config/indexer/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags IndexerFlag + * @name V3IndexerflagList + * @request GET:/api/v3/indexerflag + * @secure + */ + v3IndexerflagList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/indexerflag`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Language + * @name V3LanguageList + * @request GET:/api/v3/language + * @secure + */ + v3LanguageList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/language`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Language + * @name V3LanguageDetail + * @request GET:/api/v3/language/{id} + * @secure + */ + v3LanguageDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/language/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Localization + * @name V3LocalizationList + * @request GET:/api/v3/localization + * @secure + */ + v3LocalizationList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/localization`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Localization + * @name V3LocalizationLanguageList + * @request GET:/api/v3/localization/language + * @secure + */ + v3LocalizationLanguageList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/localization/language`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Log + * @name V3LogList + * @request GET:/api/v3/log + * @secure + */ + v3LogList = ( + query?: { + /** + * @format int32 + * @default 1 + */ + page?: number; + /** + * @format int32 + * @default 10 + */ + pageSize?: number; + sortKey?: string; + sortDirection?: SortDirection; + level?: string; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/log`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags LogFile + * @name V3LogFileList + * @request GET:/api/v3/log/file + * @secure + */ + v3LogFileList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/log/file`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags LogFile + * @name V3LogFileDetail + * @request GET:/api/v3/log/file/{filename} + * @secure + */ + v3LogFileDetail = (filename: string, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/log/file/${filename}`, + method: "GET", + secure: true, + ...params, + }); + /** + * No description + * + * @tags ManualImport + * @name V3ManualimportList + * @request GET:/api/v3/manualimport + * @secure + */ + v3ManualimportList = ( + query?: { + folder?: string; + downloadId?: string; + /** @format int32 */ + movieId?: number; + /** @default true */ + filterExistingFiles?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/manualimport`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags ManualImport + * @name V3ManualimportCreate + * @request POST:/api/v3/manualimport + * @secure + */ + v3ManualimportCreate = (data: ManualImportReprocessResource[], params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/manualimport`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags MediaCover + * @name V3MediacoverDetail + * @request GET:/api/v3/mediacover/{movieId}/{filename} + * @secure + */ + v3MediacoverDetail = (movieId: number, filename: string, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/mediacover/${movieId}/${filename}`, + method: "GET", + secure: true, + ...params, + }); + /** + * No description + * + * @tags MediaManagementConfig + * @name V3ConfigMediamanagementList + * @request GET:/api/v3/config/mediamanagement + * @secure + */ + v3ConfigMediamanagementList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/config/mediamanagement`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags MediaManagementConfig + * @name V3ConfigMediamanagementUpdate + * @request PUT:/api/v3/config/mediamanagement/{id} + * @secure + */ + v3ConfigMediamanagementUpdate = (id: string, data: MediaManagementConfigResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/config/mediamanagement/${id}`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags MediaManagementConfig + * @name V3ConfigMediamanagementDetail + * @request GET:/api/v3/config/mediamanagement/{id} + * @secure + */ + v3ConfigMediamanagementDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/config/mediamanagement/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Metadata + * @name V3MetadataList + * @request GET:/api/v3/metadata + * @secure + */ + v3MetadataList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/metadata`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Metadata + * @name V3MetadataCreate + * @request POST:/api/v3/metadata + * @secure + */ + v3MetadataCreate = ( + data: MetadataResource, + query?: { + /** @default false */ + forceSave?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/metadata`, + method: "POST", + query: query, + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Metadata + * @name V3MetadataUpdate + * @request PUT:/api/v3/metadata/{id} + * @secure + */ + v3MetadataUpdate = ( + id: number, + data: MetadataResource, + query?: { + /** @default false */ + forceSave?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/metadata/${id}`, + method: "PUT", + query: query, + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Metadata + * @name V3MetadataDelete + * @request DELETE:/api/v3/metadata/{id} + * @secure + */ + v3MetadataDelete = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/metadata/${id}`, + method: "DELETE", + secure: true, + ...params, + }); + /** + * No description + * + * @tags Metadata + * @name V3MetadataDetail + * @request GET:/api/v3/metadata/{id} + * @secure + */ + v3MetadataDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/metadata/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Metadata + * @name V3MetadataSchemaList + * @request GET:/api/v3/metadata/schema + * @secure + */ + v3MetadataSchemaList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/metadata/schema`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Metadata + * @name V3MetadataTestCreate + * @request POST:/api/v3/metadata/test + * @secure + */ + v3MetadataTestCreate = ( + data: MetadataResource, + query?: { + /** @default false */ + forceTest?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/metadata/test`, + method: "POST", + query: query, + body: data, + secure: true, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags Metadata + * @name V3MetadataTestallCreate + * @request POST:/api/v3/metadata/testall + * @secure + */ + v3MetadataTestallCreate = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/metadata/testall`, + method: "POST", + secure: true, + ...params, + }); + /** + * No description + * + * @tags Metadata + * @name V3MetadataActionCreate + * @request POST:/api/v3/metadata/action/{name} + * @secure + */ + v3MetadataActionCreate = (name: string, data: MetadataResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/metadata/action/${name}`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags MetadataConfig + * @name V3ConfigMetadataList + * @request GET:/api/v3/config/metadata + * @secure + */ + v3ConfigMetadataList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/config/metadata`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags MetadataConfig + * @name V3ConfigMetadataUpdate + * @request PUT:/api/v3/config/metadata/{id} + * @secure + */ + v3ConfigMetadataUpdate = (id: string, data: MetadataConfigResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/config/metadata/${id}`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags MetadataConfig + * @name V3ConfigMetadataDetail + * @request GET:/api/v3/config/metadata/{id} + * @secure + */ + v3ConfigMetadataDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/config/metadata/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Missing + * @name V3WantedMissingList + * @request GET:/api/v3/wanted/missing + * @secure + */ + v3WantedMissingList = ( + query?: { + /** + * @format int32 + * @default 1 + */ + page?: number; + /** + * @format int32 + * @default 10 + */ + pageSize?: number; + sortKey?: string; + sortDirection?: SortDirection; + /** @default true */ + monitored?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/wanted/missing`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Movie + * @name V3MovieList + * @request GET:/api/v3/movie + * @secure + */ + v3MovieList = ( + query?: { + /** @format int32 */ + tmdbId?: number; + /** @default false */ + excludeLocalCovers?: boolean; + /** @format int32 */ + languageId?: number; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/movie`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Movie + * @name V3MovieCreate + * @request POST:/api/v3/movie + * @secure + */ + v3MovieCreate = (data: MovieResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/movie`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Movie + * @name V3MovieUpdate + * @request PUT:/api/v3/movie/{id} + * @secure + */ + v3MovieUpdate = ( + id: string, + data: MovieResource, + query?: { + /** @default false */ + moveFiles?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/movie/${id}`, + method: "PUT", + query: query, + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Movie + * @name V3MovieDelete + * @request DELETE:/api/v3/movie/{id} + * @secure + */ + v3MovieDelete = ( + id: number, + query?: { + /** @default false */ + deleteFiles?: boolean; + /** @default false */ + addImportExclusion?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/movie/${id}`, + method: "DELETE", + query: query, + secure: true, + ...params, + }); + /** + * No description + * + * @tags Movie + * @name V3MovieDetail + * @request GET:/api/v3/movie/{id} + * @secure + */ + v3MovieDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/movie/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags MovieEditor + * @name V3MovieEditorUpdate + * @request PUT:/api/v3/movie/editor + * @secure + */ + v3MovieEditorUpdate = (data: MovieEditorResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/movie/editor`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags MovieEditor + * @name V3MovieEditorDelete + * @request DELETE:/api/v3/movie/editor + * @secure + */ + v3MovieEditorDelete = (data: MovieEditorResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/movie/editor`, + method: "DELETE", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags MovieFile + * @name V3MoviefileList + * @request GET:/api/v3/moviefile + * @secure + */ + v3MoviefileList = ( + query?: { + movieId?: number[]; + movieFileIds?: number[]; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/moviefile`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags MovieFile + * @name V3MoviefileUpdate + * @request PUT:/api/v3/moviefile/{id} + * @secure + */ + v3MoviefileUpdate = (id: string, data: MovieFileResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/moviefile/${id}`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags MovieFile + * @name V3MoviefileDelete + * @request DELETE:/api/v3/moviefile/{id} + * @secure + */ + v3MoviefileDelete = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/moviefile/${id}`, + method: "DELETE", + secure: true, + ...params, + }); + /** + * No description + * + * @tags MovieFile + * @name V3MoviefileDetail + * @request GET:/api/v3/moviefile/{id} + * @secure + */ + v3MoviefileDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/moviefile/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags MovieFile + * @name V3MoviefileEditorUpdate + * @request PUT:/api/v3/moviefile/editor + * @secure + */ + v3MoviefileEditorUpdate = (data: MovieFileListResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/moviefile/editor`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags MovieFile + * @name V3MoviefileBulkDelete + * @request DELETE:/api/v3/moviefile/bulk + * @secure + */ + v3MoviefileBulkDelete = (data: MovieFileListResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/moviefile/bulk`, + method: "DELETE", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags MovieImport + * @name V3MovieImportCreate + * @request POST:/api/v3/movie/import + * @secure + */ + v3MovieImportCreate = (data: MovieResource[], params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/movie/import`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags MovieLookup + * @name V3MovieLookupTmdbList + * @request GET:/api/v3/movie/lookup/tmdb + * @secure + */ + v3MovieLookupTmdbList = ( + query?: { + /** @format int32 */ + tmdbId?: number; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/movie/lookup/tmdb`, + method: "GET", + query: query, + secure: true, + ...params, + }); + /** + * No description + * + * @tags MovieLookup + * @name V3MovieLookupImdbList + * @request GET:/api/v3/movie/lookup/imdb + * @secure + */ + v3MovieLookupImdbList = ( + query?: { + imdbId?: string; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/movie/lookup/imdb`, + method: "GET", + query: query, + secure: true, + ...params, + }); + /** + * No description + * + * @tags MovieLookup + * @name V3MovieLookupList + * @request GET:/api/v3/movie/lookup + * @secure + */ + v3MovieLookupList = ( + query?: { + term?: string; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/movie/lookup`, + method: "GET", + query: query, + secure: true, + ...params, + }); + /** + * No description + * + * @tags NamingConfig + * @name V3ConfigNamingList + * @request GET:/api/v3/config/naming + * @secure + */ + v3ConfigNamingList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/config/naming`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags NamingConfig + * @name V3ConfigNamingUpdate + * @request PUT:/api/v3/config/naming/{id} + * @secure + */ + v3ConfigNamingUpdate = (id: string, data: NamingConfigResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/config/naming/${id}`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags NamingConfig + * @name V3ConfigNamingDetail + * @request GET:/api/v3/config/naming/{id} + * @secure + */ + v3ConfigNamingDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/config/naming/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags NamingConfig + * @name V3ConfigNamingExamplesList + * @request GET:/api/v3/config/naming/examples + * @secure + */ + v3ConfigNamingExamplesList = ( + query?: { + renameMovies?: boolean; + replaceIllegalCharacters?: boolean; + colonReplacementFormat?: ColonReplacementFormat; + standardMovieFormat?: string; + movieFolderFormat?: string; + /** @format int32 */ + id?: number; + resourceName?: string; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/config/naming/examples`, + method: "GET", + query: query, + secure: true, + ...params, + }); + /** + * No description + * + * @tags Notification + * @name V3NotificationList + * @request GET:/api/v3/notification + * @secure + */ + v3NotificationList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/notification`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Notification + * @name V3NotificationCreate + * @request POST:/api/v3/notification + * @secure + */ + v3NotificationCreate = ( + data: NotificationResource, + query?: { + /** @default false */ + forceSave?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/notification`, + method: "POST", + query: query, + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Notification + * @name V3NotificationUpdate + * @request PUT:/api/v3/notification/{id} + * @secure + */ + v3NotificationUpdate = ( + id: number, + data: NotificationResource, + query?: { + /** @default false */ + forceSave?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/notification/${id}`, + method: "PUT", + query: query, + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Notification + * @name V3NotificationDelete + * @request DELETE:/api/v3/notification/{id} + * @secure + */ + v3NotificationDelete = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/notification/${id}`, + method: "DELETE", + secure: true, + ...params, + }); + /** + * No description + * + * @tags Notification + * @name V3NotificationDetail + * @request GET:/api/v3/notification/{id} + * @secure + */ + v3NotificationDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/notification/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Notification + * @name V3NotificationSchemaList + * @request GET:/api/v3/notification/schema + * @secure + */ + v3NotificationSchemaList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/notification/schema`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Notification + * @name V3NotificationTestCreate + * @request POST:/api/v3/notification/test + * @secure + */ + v3NotificationTestCreate = ( + data: NotificationResource, + query?: { + /** @default false */ + forceTest?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/notification/test`, + method: "POST", + query: query, + body: data, + secure: true, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags Notification + * @name V3NotificationTestallCreate + * @request POST:/api/v3/notification/testall + * @secure + */ + v3NotificationTestallCreate = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/notification/testall`, + method: "POST", + secure: true, + ...params, + }); + /** + * No description + * + * @tags Notification + * @name V3NotificationActionCreate + * @request POST:/api/v3/notification/action/{name} + * @secure + */ + v3NotificationActionCreate = (name: string, data: NotificationResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/notification/action/${name}`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags Parse + * @name V3ParseList + * @request GET:/api/v3/parse + * @secure + */ + v3ParseList = ( + query?: { + title?: string; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/parse`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags QualityDefinition + * @name V3QualitydefinitionUpdate + * @request PUT:/api/v3/qualitydefinition/{id} + * @secure + */ + v3QualitydefinitionUpdate = (id: string, data: QualityDefinitionResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/qualitydefinition/${id}`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags QualityDefinition + * @name V3QualitydefinitionDetail + * @request GET:/api/v3/qualitydefinition/{id} + * @secure + */ + v3QualitydefinitionDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/qualitydefinition/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags QualityDefinition + * @name V3QualitydefinitionList + * @request GET:/api/v3/qualitydefinition + * @secure + */ + v3QualitydefinitionList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/qualitydefinition`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags QualityDefinition + * @name V3QualitydefinitionUpdateUpdate + * @request PUT:/api/v3/qualitydefinition/update + * @secure + */ + v3QualitydefinitionUpdateUpdate = (data: QualityDefinitionResource[], params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/qualitydefinition/update`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags QualityProfile + * @name V3QualityprofileCreate + * @request POST:/api/v3/qualityprofile + * @secure + */ + v3QualityprofileCreate = (data: QualityProfileResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/qualityprofile`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags QualityProfile + * @name V3QualityprofileList + * @request GET:/api/v3/qualityprofile + * @secure + */ + v3QualityprofileList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/qualityprofile`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags QualityProfile + * @name V3QualityprofileDelete + * @request DELETE:/api/v3/qualityprofile/{id} + * @secure + */ + v3QualityprofileDelete = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/qualityprofile/${id}`, + method: "DELETE", + secure: true, + ...params, + }); + /** + * No description + * + * @tags QualityProfile + * @name V3QualityprofileUpdate + * @request PUT:/api/v3/qualityprofile/{id} + * @secure + */ + v3QualityprofileUpdate = (id: string, data: QualityProfileResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/qualityprofile/${id}`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags QualityProfile + * @name V3QualityprofileDetail + * @request GET:/api/v3/qualityprofile/{id} + * @secure + */ + v3QualityprofileDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/qualityprofile/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags QualityProfileSchema + * @name V3QualityprofileSchemaList + * @request GET:/api/v3/qualityprofile/schema + * @secure + */ + v3QualityprofileSchemaList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/qualityprofile/schema`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Queue + * @name V3QueueDelete + * @request DELETE:/api/v3/queue/{id} + * @secure + */ + v3QueueDelete = ( + id: number, + query?: { + /** @default true */ + removeFromClient?: boolean; + /** @default false */ + blocklist?: boolean; + /** @default false */ + skipRedownload?: boolean; + /** @default false */ + changeCategory?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/queue/${id}`, + method: "DELETE", + query: query, + secure: true, + ...params, + }); + /** + * No description + * + * @tags Queue + * @name V3QueueBulkDelete + * @request DELETE:/api/v3/queue/bulk + * @secure + */ + v3QueueBulkDelete = ( + data: QueueBulkResource, + query?: { + /** @default true */ + removeFromClient?: boolean; + /** @default false */ + blocklist?: boolean; + /** @default false */ + skipRedownload?: boolean; + /** @default false */ + changeCategory?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/queue/bulk`, + method: "DELETE", + query: query, + body: data, + secure: true, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags Queue + * @name V3QueueList + * @request GET:/api/v3/queue + * @secure + */ + v3QueueList = ( + query?: { + /** + * @format int32 + * @default 1 + */ + page?: number; + /** + * @format int32 + * @default 10 + */ + pageSize?: number; + sortKey?: string; + sortDirection?: SortDirection; + /** @default false */ + includeUnknownMovieItems?: boolean; + /** @default false */ + includeMovie?: boolean; + movieIds?: number[]; + protocol?: DownloadProtocol; + languages?: number[]; + /** @format int32 */ + quality?: number; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/queue`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags QueueAction + * @name V3QueueGrabCreate + * @request POST:/api/v3/queue/grab/{id} + * @secure + */ + v3QueueGrabCreate = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/queue/grab/${id}`, + method: "POST", + secure: true, + ...params, + }); + /** + * No description + * + * @tags QueueAction + * @name V3QueueGrabBulkCreate + * @request POST:/api/v3/queue/grab/bulk + * @secure + */ + v3QueueGrabBulkCreate = (data: QueueBulkResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/queue/grab/bulk`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags QueueDetails + * @name V3QueueDetailsList + * @request GET:/api/v3/queue/details + * @secure + */ + v3QueueDetailsList = ( + query?: { + /** @format int32 */ + movieId?: number; + /** @default false */ + includeMovie?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/queue/details`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags QueueStatus + * @name V3QueueStatusList + * @request GET:/api/v3/queue/status + * @secure + */ + v3QueueStatusList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/queue/status`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Release + * @name V3ReleaseCreate + * @request POST:/api/v3/release + * @secure + */ + v3ReleaseCreate = (data: ReleaseResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/release`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags Release + * @name V3ReleaseList + * @request GET:/api/v3/release + * @secure + */ + v3ReleaseList = ( + query?: { + /** @format int32 */ + movieId?: number; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/release`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags ReleaseProfile + * @name V3ReleaseprofileCreate + * @request POST:/api/v3/releaseprofile + * @secure + */ + v3ReleaseprofileCreate = (data: ReleaseProfileResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/releaseprofile`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags ReleaseProfile + * @name V3ReleaseprofileList + * @request GET:/api/v3/releaseprofile + * @secure + */ + v3ReleaseprofileList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/releaseprofile`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags ReleaseProfile + * @name V3ReleaseprofileDelete + * @request DELETE:/api/v3/releaseprofile/{id} + * @secure + */ + v3ReleaseprofileDelete = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/releaseprofile/${id}`, + method: "DELETE", + secure: true, + ...params, + }); + /** + * No description + * + * @tags ReleaseProfile + * @name V3ReleaseprofileUpdate + * @request PUT:/api/v3/releaseprofile/{id} + * @secure + */ + v3ReleaseprofileUpdate = (id: string, data: ReleaseProfileResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/releaseprofile/${id}`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags ReleaseProfile + * @name V3ReleaseprofileDetail + * @request GET:/api/v3/releaseprofile/{id} + * @secure + */ + v3ReleaseprofileDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/releaseprofile/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags ReleasePush + * @name V3ReleasePushCreate + * @request POST:/api/v3/release/push + * @secure + */ + v3ReleasePushCreate = (data: ReleaseResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/release/push`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags RemotePathMapping + * @name V3RemotepathmappingCreate + * @request POST:/api/v3/remotepathmapping + * @secure + */ + v3RemotepathmappingCreate = (data: RemotePathMappingResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/remotepathmapping`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags RemotePathMapping + * @name V3RemotepathmappingList + * @request GET:/api/v3/remotepathmapping + * @secure + */ + v3RemotepathmappingList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/remotepathmapping`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags RemotePathMapping + * @name V3RemotepathmappingDelete + * @request DELETE:/api/v3/remotepathmapping/{id} + * @secure + */ + v3RemotepathmappingDelete = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/remotepathmapping/${id}`, + method: "DELETE", + secure: true, + ...params, + }); + /** + * No description + * + * @tags RemotePathMapping + * @name V3RemotepathmappingUpdate + * @request PUT:/api/v3/remotepathmapping/{id} + * @secure + */ + v3RemotepathmappingUpdate = (id: string, data: RemotePathMappingResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/remotepathmapping/${id}`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags RemotePathMapping + * @name V3RemotepathmappingDetail + * @request GET:/api/v3/remotepathmapping/{id} + * @secure + */ + v3RemotepathmappingDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/remotepathmapping/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags RenameMovie + * @name V3RenameList + * @request GET:/api/v3/rename + * @secure + */ + v3RenameList = ( + query?: { + /** @format int32 */ + movieId?: number; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/rename`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags RootFolder + * @name V3RootfolderCreate + * @request POST:/api/v3/rootfolder + * @secure + */ + v3RootfolderCreate = (data: RootFolderResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/rootfolder`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags RootFolder + * @name V3RootfolderList + * @request GET:/api/v3/rootfolder + * @secure + */ + v3RootfolderList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/rootfolder`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags RootFolder + * @name V3RootfolderDelete + * @request DELETE:/api/v3/rootfolder/{id} + * @secure + */ + v3RootfolderDelete = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/rootfolder/${id}`, + method: "DELETE", + secure: true, + ...params, + }); + /** + * No description + * + * @tags RootFolder + * @name V3RootfolderDetail + * @request GET:/api/v3/rootfolder/{id} + * @secure + */ + v3RootfolderDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/rootfolder/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags System + * @name V3SystemStatusList + * @request GET:/api/v3/system/status + * @secure + */ + v3SystemStatusList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/system/status`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags System + * @name V3SystemRoutesList + * @request GET:/api/v3/system/routes + * @secure + */ + v3SystemRoutesList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/system/routes`, + method: "GET", + secure: true, + ...params, + }); + /** + * No description + * + * @tags System + * @name V3SystemRoutesDuplicateList + * @request GET:/api/v3/system/routes/duplicate + * @secure + */ + v3SystemRoutesDuplicateList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/system/routes/duplicate`, + method: "GET", + secure: true, + ...params, + }); + /** + * No description + * + * @tags System + * @name V3SystemShutdownCreate + * @request POST:/api/v3/system/shutdown + * @secure + */ + v3SystemShutdownCreate = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/system/shutdown`, + method: "POST", + secure: true, + ...params, + }); + /** + * No description + * + * @tags System + * @name V3SystemRestartCreate + * @request POST:/api/v3/system/restart + * @secure + */ + v3SystemRestartCreate = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/system/restart`, + method: "POST", + secure: true, + ...params, + }); + /** + * No description + * + * @tags Tag + * @name V3TagList + * @request GET:/api/v3/tag + * @secure + */ + v3TagList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/tag`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Tag + * @name V3TagCreate + * @request POST:/api/v3/tag + * @secure + */ + v3TagCreate = (data: TagResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/tag`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Tag + * @name V3TagUpdate + * @request PUT:/api/v3/tag/{id} + * @secure + */ + v3TagUpdate = (id: string, data: TagResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/tag/${id}`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Tag + * @name V3TagDelete + * @request DELETE:/api/v3/tag/{id} + * @secure + */ + v3TagDelete = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/tag/${id}`, + method: "DELETE", + secure: true, + ...params, + }); + /** + * No description + * + * @tags Tag + * @name V3TagDetail + * @request GET:/api/v3/tag/{id} + * @secure + */ + v3TagDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/tag/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags TagDetails + * @name V3TagDetailList + * @request GET:/api/v3/tag/detail + * @secure + */ + v3TagDetailList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/tag/detail`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags TagDetails + * @name V3TagDetailDetail + * @request GET:/api/v3/tag/detail/{id} + * @secure + */ + v3TagDetailDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/tag/detail/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Task + * @name V3SystemTaskList + * @request GET:/api/v3/system/task + * @secure + */ + v3SystemTaskList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/system/task`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Task + * @name V3SystemTaskDetail + * @request GET:/api/v3/system/task/{id} + * @secure + */ + v3SystemTaskDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/system/task/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags UiConfig + * @name V3ConfigUiUpdate + * @request PUT:/api/v3/config/ui/{id} + * @secure + */ + v3ConfigUiUpdate = (id: string, data: UiConfigResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/config/ui/${id}`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags UiConfig + * @name V3ConfigUiDetail + * @request GET:/api/v3/config/ui/{id} + * @secure + */ + v3ConfigUiDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/config/ui/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags UiConfig + * @name V3ConfigUiList + * @request GET:/api/v3/config/ui + * @secure + */ + v3ConfigUiList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/config/ui`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Update + * @name V3UpdateList + * @request GET:/api/v3/update + * @secure + */ + v3UpdateList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/update`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags UpdateLogFile + * @name V3LogFileUpdateList + * @request GET:/api/v3/log/file/update + * @secure + */ + v3LogFileUpdateList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/log/file/update`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags UpdateLogFile + * @name V3LogFileUpdateDetail + * @request GET:/api/v3/log/file/update/{filename} + * @secure + */ + v3LogFileUpdateDetail = (filename: string, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/log/file/update/${filename}`, + method: "GET", + secure: true, + ...params, + }); +} diff --git a/src/__generated__/radarr/Content.ts b/src/__generated__/radarr/Content.ts new file mode 100644 index 0000000..e62a80c --- /dev/null +++ b/src/__generated__/radarr/Content.ts @@ -0,0 +1,36 @@ +/* eslint-disable */ +/* tslint:disable */ +/* + * --------------------------------------------------------------- + * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## + * ## ## + * ## AUTHOR: acacode ## + * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## + * --------------------------------------------------------------- + */ + +import { HttpClient, RequestParams } from "./../ky-client"; + +export class Content { + http: HttpClient; + + constructor(http: HttpClient) { + this.http = http; + } + + /** + * No description + * + * @tags StaticResource + * @name ContentDetail + * @request GET:/content/{path} + * @secure + */ + contentDetail = (path: string, params: RequestParams = {}) => + this.http.request({ + path: `/content/${path}`, + method: "GET", + secure: true, + ...params, + }); +} diff --git a/src/__generated__/radarr/Feed.ts b/src/__generated__/radarr/Feed.ts new file mode 100644 index 0000000..d889408 --- /dev/null +++ b/src/__generated__/radarr/Feed.ts @@ -0,0 +1,55 @@ +/* eslint-disable */ +/* tslint:disable */ +/* + * --------------------------------------------------------------- + * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## + * ## ## + * ## AUTHOR: acacode ## + * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## + * --------------------------------------------------------------- + */ + +import { HttpClient, RequestParams } from "./../ky-client"; + +export class Feed { + http: HttpClient; + + constructor(http: HttpClient) { + this.http = http; + } + + /** + * No description + * + * @tags CalendarFeed + * @name V3CalendarRadarrIcsList + * @request GET:/feed/v3/calendar/radarr.ics + * @secure + */ + v3CalendarRadarrIcsList = ( + query?: { + /** + * @format int32 + * @default 7 + */ + pastDays?: number; + /** + * @format int32 + * @default 28 + */ + futureDays?: number; + /** @default "" */ + tags?: string; + /** @default false */ + unmonitored?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/feed/v3/calendar/radarr.ics`, + method: "GET", + query: query, + secure: true, + ...params, + }); +} diff --git a/src/__generated__/radarr/Login.ts b/src/__generated__/radarr/Login.ts new file mode 100644 index 0000000..d8653c4 --- /dev/null +++ b/src/__generated__/radarr/Login.ts @@ -0,0 +1,64 @@ +/* eslint-disable */ +/* tslint:disable */ +/* + * --------------------------------------------------------------- + * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## + * ## ## + * ## AUTHOR: acacode ## + * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## + * --------------------------------------------------------------- + */ + +import { ContentType, HttpClient, RequestParams } from "./../ky-client"; + +export class Login { + http: HttpClient; + + constructor(http: HttpClient) { + this.http = http; + } + + /** + * No description + * + * @tags Authentication + * @name LoginCreate + * @request POST:/login + * @secure + */ + loginCreate = ( + data: { + username?: string; + password?: string; + rememberMe?: string; + }, + query?: { + returnUrl?: string; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/login`, + method: "POST", + query: query, + body: data, + secure: true, + type: ContentType.FormData, + ...params, + }); + /** + * No description + * + * @tags StaticResource + * @name LoginList + * @request GET:/login + * @secure + */ + loginList = (params: RequestParams = {}) => + this.http.request({ + path: `/login`, + method: "GET", + secure: true, + ...params, + }); +} diff --git a/src/__generated__/radarr/Logout.ts b/src/__generated__/radarr/Logout.ts new file mode 100644 index 0000000..1d6bd02 --- /dev/null +++ b/src/__generated__/radarr/Logout.ts @@ -0,0 +1,36 @@ +/* eslint-disable */ +/* tslint:disable */ +/* + * --------------------------------------------------------------- + * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## + * ## ## + * ## AUTHOR: acacode ## + * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## + * --------------------------------------------------------------- + */ + +import { HttpClient, RequestParams } from "./../ky-client"; + +export class Logout { + http: HttpClient; + + constructor(http: HttpClient) { + this.http = http; + } + + /** + * No description + * + * @tags Authentication + * @name LogoutList + * @request GET:/logout + * @secure + */ + logoutList = (params: RequestParams = {}) => + this.http.request({ + path: `/logout`, + method: "GET", + secure: true, + ...params, + }); +} diff --git a/src/__generated__/radarr/Path.ts b/src/__generated__/radarr/Path.ts new file mode 100644 index 0000000..0a306be --- /dev/null +++ b/src/__generated__/radarr/Path.ts @@ -0,0 +1,36 @@ +/* eslint-disable */ +/* tslint:disable */ +/* + * --------------------------------------------------------------- + * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## + * ## ## + * ## AUTHOR: acacode ## + * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## + * --------------------------------------------------------------- + */ + +import { HttpClient, RequestParams } from "./../ky-client"; + +export class Path { + http: HttpClient; + + constructor(http: HttpClient) { + this.http = http; + } + + /** + * No description + * + * @tags StaticResource + * @name GetPath + * @request GET:/{path} + * @secure + */ + getPath = (path: string, params: RequestParams = {}) => + this.http.request({ + path: `/${path}`, + method: "GET", + secure: true, + ...params, + }); +} diff --git a/src/__generated__/radarr/Ping.ts b/src/__generated__/radarr/Ping.ts new file mode 100644 index 0000000..556eb9d --- /dev/null +++ b/src/__generated__/radarr/Ping.ts @@ -0,0 +1,54 @@ +/* eslint-disable */ +/* tslint:disable */ +/* + * --------------------------------------------------------------- + * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## + * ## ## + * ## AUTHOR: acacode ## + * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## + * --------------------------------------------------------------- + */ + +import { HttpClient, RequestParams } from "./../ky-client"; +import { PingResource } from "./data-contracts"; + +export class Ping { + http: HttpClient; + + constructor(http: HttpClient) { + this.http = http; + } + + /** + * No description + * + * @tags Ping + * @name PingList + * @request GET:/ping + * @secure + */ + pingList = (params: RequestParams = {}) => + this.http.request({ + path: `/ping`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Ping + * @name HeadPing + * @request HEAD:/ping + * @secure + */ + headPing = (params: RequestParams = {}) => + this.http.request({ + path: `/ping`, + method: "HEAD", + secure: true, + format: "json", + ...params, + }); +} diff --git a/src/__generated__/radarr/data-contracts.ts b/src/__generated__/radarr/data-contracts.ts new file mode 100644 index 0000000..2aa00bc --- /dev/null +++ b/src/__generated__/radarr/data-contracts.ts @@ -0,0 +1,1702 @@ +/* eslint-disable */ +/* tslint:disable */ +/* + * --------------------------------------------------------------- + * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## + * ## ## + * ## AUTHOR: acacode ## + * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## + * --------------------------------------------------------------- + */ + +export enum AddMovieMethod { + Manual = "manual", + List = "list", + Collection = "collection", +} + +export interface AddMovieOptions { + ignoreEpisodesWithFiles?: boolean; + ignoreEpisodesWithoutFiles?: boolean; + monitor?: MonitorTypes; + searchForMovie?: boolean; + addMethod?: AddMovieMethod; +} + +export interface AlternativeTitleResource { + /** @format int32 */ + id?: number; + sourceType?: SourceType; + /** @format int32 */ + movieMetadataId?: number; + title?: string | null; + cleanTitle?: string | null; +} + +export interface ApiInfoResource { + current?: string | null; + deprecated?: string[] | null; +} + +export enum ApplyTags { + Add = "add", + Remove = "remove", + Replace = "replace", +} + +export enum AuthenticationRequiredType { + Enabled = "enabled", + DisabledForLocalAddresses = "disabledForLocalAddresses", +} + +export enum AuthenticationType { + None = "none", + Basic = "basic", + Forms = "forms", + External = "external", +} + +export interface AutoTaggingResource { + /** @format int32 */ + id?: number; + name?: string | null; + removeTagsAutomatically?: boolean; + /** @uniqueItems true */ + tags?: number[] | null; + specifications?: AutoTaggingSpecificationSchema[] | null; +} + +export interface AutoTaggingSpecificationSchema { + /** @format int32 */ + id?: number; + name?: string | null; + implementation?: string | null; + implementationName?: string | null; + negate?: boolean; + required?: boolean; + fields?: Field[] | null; +} + +export interface BackupResource { + /** @format int32 */ + id?: number; + name?: string | null; + path?: string | null; + type?: BackupType; + /** @format int64 */ + size?: number; + /** @format date-time */ + time?: string; +} + +export enum BackupType { + Scheduled = "scheduled", + Manual = "manual", + Update = "update", +} + +export interface BlocklistBulkResource { + ids?: number[] | null; +} + +export interface BlocklistResource { + /** @format int32 */ + id?: number; + /** @format int32 */ + movieId?: number; + sourceTitle?: string | null; + languages?: Language[] | null; + quality?: QualityModel; + customFormats?: CustomFormatResource[] | null; + /** @format date-time */ + date?: string; + protocol?: DownloadProtocol; + indexer?: string | null; + message?: string | null; + movie?: MovieResource; +} + +export interface BlocklistResourcePagingResource { + /** @format int32 */ + page?: number; + /** @format int32 */ + pageSize?: number; + sortKey?: string | null; + sortDirection?: SortDirection; + /** @format int32 */ + totalRecords?: number; + records?: BlocklistResource[] | null; +} + +export enum CertificateValidationType { + Enabled = "enabled", + DisabledForLocalAddresses = "disabledForLocalAddresses", + Disabled = "disabled", +} + +export interface CollectionMovieResource { + /** @format int32 */ + tmdbId?: number; + imdbId?: string | null; + title?: string | null; + cleanTitle?: string | null; + sortTitle?: string | null; + status?: MovieStatusType; + overview?: string | null; + /** @format int32 */ + runtime?: number; + images?: MediaCover[] | null; + /** @format int32 */ + year?: number; + ratings?: Ratings; + genres?: string[] | null; + folder?: string | null; + isExisting?: boolean; + isExcluded?: boolean; +} + +export interface CollectionResource { + /** @format int32 */ + id?: number; + title?: string | null; + sortTitle?: string | null; + /** @format int32 */ + tmdbId?: number; + images?: MediaCover[] | null; + overview?: string | null; + monitored?: boolean; + rootFolderPath?: string | null; + /** @format int32 */ + qualityProfileId?: number; + searchOnAdd?: boolean; + minimumAvailability?: MovieStatusType; + movies?: CollectionMovieResource[] | null; + /** @format int32 */ + missingMovies?: number; + /** @uniqueItems true */ + tags?: number[] | null; +} + +export interface CollectionUpdateResource { + collectionIds?: number[] | null; + monitored?: boolean | null; + monitorMovies?: boolean | null; + searchOnAdd?: boolean | null; + /** @format int32 */ + qualityProfileId?: number | null; + rootFolderPath?: string | null; + minimumAvailability?: MovieStatusType; +} + +export enum ColonReplacementFormat { + Delete = "delete", + Dash = "dash", + SpaceDash = "spaceDash", + SpaceDashSpace = "spaceDashSpace", + Smart = "smart", +} + +export interface Command { + sendUpdatesToClient?: boolean; + updateScheduledTask?: boolean; + completionMessage?: string | null; + requiresDiskAccess?: boolean; + isExclusive?: boolean; + isTypeExclusive?: boolean; + isLongRunning?: boolean; + name?: string | null; + /** @format date-time */ + lastExecutionTime?: string | null; + /** @format date-time */ + lastStartTime?: string | null; + trigger?: CommandTrigger; + suppressMessages?: boolean; + clientUserAgent?: string | null; +} + +export enum CommandPriority { + Normal = "normal", + High = "high", + Low = "low", +} + +export interface CommandResource { + /** @format int32 */ + id?: number; + name?: string | null; + commandName?: string | null; + message?: string | null; + body?: Command; + priority?: CommandPriority; + status?: CommandStatus; + result?: CommandResult; + /** @format date-time */ + queued?: string; + /** @format date-time */ + started?: string | null; + /** @format date-time */ + ended?: string | null; + /** @format date-span */ + duration?: string | null; + exception?: string | null; + trigger?: CommandTrigger; + clientUserAgent?: string | null; + /** @format date-time */ + stateChangeTime?: string | null; + sendUpdatesToClient?: boolean; + updateScheduledTask?: boolean; + /** @format date-time */ + lastExecutionTime?: string | null; +} + +export enum CommandResult { + Unknown = "unknown", + Successful = "successful", + Unsuccessful = "unsuccessful", +} + +export enum CommandStatus { + Queued = "queued", + Started = "started", + Completed = "completed", + Failed = "failed", + Aborted = "aborted", + Cancelled = "cancelled", + Orphaned = "orphaned", +} + +export enum CommandTrigger { + Unspecified = "unspecified", + Manual = "manual", + Scheduled = "scheduled", +} + +export interface CreditResource { + /** @format int32 */ + id?: number; + personName?: string | null; + creditTmdbId?: string | null; + /** @format int32 */ + personTmdbId?: number; + /** @format int32 */ + movieMetadataId?: number; + images?: MediaCover[] | null; + department?: string | null; + job?: string | null; + character?: string | null; + /** @format int32 */ + order?: number; + type?: CreditType; +} + +export enum CreditType { + Cast = "cast", + Crew = "crew", +} + +export interface CustomFilterResource { + /** @format int32 */ + id?: number; + type?: string | null; + label?: string | null; + filters?: Record[] | null; +} + +export interface CustomFormatBulkResource { + /** @uniqueItems true */ + ids?: number[] | null; + includeCustomFormatWhenRenaming?: boolean | null; +} + +export interface CustomFormatResource { + /** @format int32 */ + id?: number; + name?: string | null; + includeCustomFormatWhenRenaming?: boolean | null; + specifications?: CustomFormatSpecificationSchema[] | null; +} + +export interface CustomFormatSpecificationSchema { + /** @format int32 */ + id?: number; + name?: string | null; + implementation?: string | null; + implementationName?: string | null; + infoLink?: string | null; + negate?: boolean; + required?: boolean; + fields?: Field[] | null; + presets?: CustomFormatSpecificationSchema[] | null; +} + +export enum DatabaseType { + SqLite = "sqLite", + PostgreSQL = "postgreSQL", +} + +export interface DelayProfileResource { + /** @format int32 */ + id?: number; + enableUsenet?: boolean; + enableTorrent?: boolean; + preferredProtocol?: DownloadProtocol; + /** @format int32 */ + usenetDelay?: number; + /** @format int32 */ + torrentDelay?: number; + bypassIfHighestQuality?: boolean; + bypassIfAboveCustomFormatScore?: boolean; + /** @format int32 */ + minimumCustomFormatScore?: number; + /** @format int32 */ + order?: number; + /** @uniqueItems true */ + tags?: number[] | null; +} + +export interface DiskSpaceResource { + /** @format int32 */ + id?: number; + path?: string | null; + label?: string | null; + /** @format int64 */ + freeSpace?: number; + /** @format int64 */ + totalSpace?: number; +} + +export interface DownloadClientBulkResource { + ids?: number[] | null; + tags?: number[] | null; + applyTags?: ApplyTags; + enable?: boolean | null; + /** @format int32 */ + priority?: number | null; + removeCompletedDownloads?: boolean | null; + removeFailedDownloads?: boolean | null; +} + +export interface DownloadClientConfigResource { + /** @format int32 */ + id?: number; + downloadClientWorkingFolders?: string | null; + enableCompletedDownloadHandling?: boolean; + /** @format int32 */ + checkForFinishedDownloadInterval?: number; + autoRedownloadFailed?: boolean; + autoRedownloadFailedFromInteractiveSearch?: boolean; +} + +export interface DownloadClientResource { + /** @format int32 */ + id?: number; + name?: string | null; + fields?: Field[] | null; + implementationName?: string | null; + implementation?: string | null; + configContract?: string | null; + infoLink?: string | null; + message?: ProviderMessage; + /** @uniqueItems true */ + tags?: number[] | null; + presets?: DownloadClientResource[] | null; + enable?: boolean; + protocol?: DownloadProtocol; + /** @format int32 */ + priority?: number; + removeCompletedDownloads?: boolean; + removeFailedDownloads?: boolean; +} + +export enum DownloadProtocol { + Unknown = "unknown", + Usenet = "usenet", + Torrent = "torrent", +} + +export interface ExtraFileResource { + /** @format int32 */ + id?: number; + /** @format int32 */ + movieId?: number; + /** @format int32 */ + movieFileId?: number | null; + relativePath?: string | null; + extension?: string | null; + languageTags?: string[] | null; + title?: string | null; + type?: ExtraFileType; +} + +export enum ExtraFileType { + Subtitle = "subtitle", + Metadata = "metadata", + Other = "other", +} + +export interface Field { + /** @format int32 */ + order?: number; + name?: string | null; + label?: string | null; + unit?: string | null; + helpText?: string | null; + helpTextWarning?: string | null; + helpLink?: string | null; + value?: any; + type?: string | null; + advanced?: boolean; + selectOptions?: SelectOption[] | null; + selectOptionsProviderAction?: string | null; + section?: string | null; + hidden?: string | null; + privacy?: PrivacyLevel; + placeholder?: string | null; + isFloat?: boolean; +} + +export enum FileDateType { + None = "none", + Cinemas = "cinemas", + Release = "release", +} + +export enum HealthCheckResult { + Ok = "ok", + Notice = "notice", + Warning = "warning", + Error = "error", +} + +export interface HealthResource { + /** @format int32 */ + id?: number; + source?: string | null; + type?: HealthCheckResult; + message?: string | null; + wikiUrl?: HttpUri; +} + +export interface HistoryResource { + /** @format int32 */ + id?: number; + /** @format int32 */ + movieId?: number; + sourceTitle?: string | null; + languages?: Language[] | null; + quality?: QualityModel; + customFormats?: CustomFormatResource[] | null; + /** @format int32 */ + customFormatScore?: number; + qualityCutoffNotMet?: boolean; + /** @format date-time */ + date?: string; + downloadId?: string | null; + eventType?: MovieHistoryEventType; + data?: Record; + movie?: MovieResource; +} + +export interface HistoryResourcePagingResource { + /** @format int32 */ + page?: number; + /** @format int32 */ + pageSize?: number; + sortKey?: string | null; + sortDirection?: SortDirection; + /** @format int32 */ + totalRecords?: number; + records?: HistoryResource[] | null; +} + +export interface HostConfigResource { + /** @format int32 */ + id?: number; + bindAddress?: string | null; + /** @format int32 */ + port?: number; + /** @format int32 */ + sslPort?: number; + enableSsl?: boolean; + launchBrowser?: boolean; + authenticationMethod?: AuthenticationType; + authenticationRequired?: AuthenticationRequiredType; + analyticsEnabled?: boolean; + username?: string | null; + password?: string | null; + passwordConfirmation?: string | null; + logLevel?: string | null; + /** @format int32 */ + logSizeLimit?: number; + consoleLogLevel?: string | null; + branch?: string | null; + apiKey?: string | null; + sslCertPath?: string | null; + sslCertPassword?: string | null; + urlBase?: string | null; + instanceName?: string | null; + applicationUrl?: string | null; + updateAutomatically?: boolean; + updateMechanism?: UpdateMechanism; + updateScriptPath?: string | null; + proxyEnabled?: boolean; + proxyType?: ProxyType; + proxyHostname?: string | null; + /** @format int32 */ + proxyPort?: number; + proxyUsername?: string | null; + proxyPassword?: string | null; + proxyBypassFilter?: string | null; + proxyBypassLocalAddresses?: boolean; + certificateValidation?: CertificateValidationType; + backupFolder?: string | null; + /** @format int32 */ + backupInterval?: number; + /** @format int32 */ + backupRetention?: number; +} + +export interface HttpUri { + fullUri?: string | null; + scheme?: string | null; + host?: string | null; + /** @format int32 */ + port?: number | null; + path?: string | null; + query?: string | null; + fragment?: string | null; +} + +export interface ImportListBulkResource { + ids?: number[] | null; + tags?: number[] | null; + applyTags?: ApplyTags; + enabled?: boolean | null; + enableAuto?: boolean | null; + rootFolderPath?: string | null; + /** @format int32 */ + qualityProfileId?: number | null; + minimumAvailability?: MovieStatusType; +} + +export interface ImportListConfigResource { + /** @format int32 */ + id?: number; + listSyncLevel?: string | null; +} + +export interface ImportListExclusionBulkResource { + /** @uniqueItems true */ + ids?: number[] | null; +} + +export interface ImportListExclusionResource { + /** @format int32 */ + id?: number; + name?: string | null; + fields?: Field[] | null; + implementationName?: string | null; + implementation?: string | null; + configContract?: string | null; + infoLink?: string | null; + message?: ProviderMessage; + /** @uniqueItems true */ + tags?: number[] | null; + presets?: ImportListExclusionResource[] | null; + /** @format int32 */ + tmdbId?: number; + movieTitle?: string | null; + /** @format int32 */ + movieYear?: number; +} + +export interface ImportListExclusionResourcePagingResource { + /** @format int32 */ + page?: number; + /** @format int32 */ + pageSize?: number; + sortKey?: string | null; + sortDirection?: SortDirection; + /** @format int32 */ + totalRecords?: number; + records?: ImportListExclusionResource[] | null; +} + +export interface ImportListResource { + /** @format int32 */ + id?: number; + name?: string | null; + fields?: Field[] | null; + implementationName?: string | null; + implementation?: string | null; + configContract?: string | null; + infoLink?: string | null; + message?: ProviderMessage; + /** @uniqueItems true */ + tags?: number[] | null; + presets?: ImportListResource[] | null; + enabled?: boolean; + enableAuto?: boolean; + monitor?: MonitorTypes; + rootFolderPath?: string | null; + /** @format int32 */ + qualityProfileId?: number; + searchOnAdd?: boolean; + minimumAvailability?: MovieStatusType; + listType?: ImportListType; + /** @format int32 */ + listOrder?: number; + /** @format date-span */ + minRefreshInterval?: string; +} + +export enum ImportListType { + Program = "program", + Tmdb = "tmdb", + Trakt = "trakt", + Plex = "plex", + Simkl = "simkl", + Other = "other", + Advanced = "advanced", +} + +export interface IndexerBulkResource { + ids?: number[] | null; + tags?: number[] | null; + applyTags?: ApplyTags; + enableRss?: boolean | null; + enableAutomaticSearch?: boolean | null; + enableInteractiveSearch?: boolean | null; + /** @format int32 */ + priority?: number | null; +} + +export interface IndexerConfigResource { + /** @format int32 */ + id?: number; + /** @format int32 */ + minimumAge?: number; + /** @format int32 */ + maximumSize?: number; + /** @format int32 */ + retention?: number; + /** @format int32 */ + rssSyncInterval?: number; + preferIndexerFlags?: boolean; + /** @format int32 */ + availabilityDelay?: number; + allowHardcodedSubs?: boolean; + whitelistedHardcodedSubs?: string | null; +} + +export interface IndexerFlagResource { + /** @format int32 */ + id?: number; + name?: string | null; + nameLower?: string | null; +} + +export interface IndexerResource { + /** @format int32 */ + id?: number; + name?: string | null; + fields?: Field[] | null; + implementationName?: string | null; + implementation?: string | null; + configContract?: string | null; + infoLink?: string | null; + message?: ProviderMessage; + /** @uniqueItems true */ + tags?: number[] | null; + presets?: IndexerResource[] | null; + enableRss?: boolean; + enableAutomaticSearch?: boolean; + enableInteractiveSearch?: boolean; + supportsRss?: boolean; + supportsSearch?: boolean; + protocol?: DownloadProtocol; + /** @format int32 */ + priority?: number; + /** @format int32 */ + downloadClientId?: number; +} + +export interface Language { + /** @format int32 */ + id?: number; + name?: string | null; +} + +export interface LanguageResource { + /** @format int32 */ + id?: number; + name?: string | null; + nameLower?: string | null; +} + +export interface LocalizationLanguageResource { + identifier?: string | null; +} + +export interface LogFileResource { + /** @format int32 */ + id?: number; + filename?: string | null; + /** @format date-time */ + lastWriteTime?: string; + contentsUrl?: string | null; + downloadUrl?: string | null; +} + +export interface LogResource { + /** @format int32 */ + id?: number; + /** @format date-time */ + time?: string; + exception?: string | null; + exceptionType?: string | null; + level?: string | null; + logger?: string | null; + message?: string | null; + method?: string | null; +} + +export interface LogResourcePagingResource { + /** @format int32 */ + page?: number; + /** @format int32 */ + pageSize?: number; + sortKey?: string | null; + sortDirection?: SortDirection; + /** @format int32 */ + totalRecords?: number; + records?: LogResource[] | null; +} + +export interface ManualImportReprocessResource { + /** @format int32 */ + id?: number; + path?: string | null; + /** @format int32 */ + movieId?: number; + movie?: MovieResource; + quality?: QualityModel; + languages?: Language[] | null; + releaseGroup?: string | null; + downloadId?: string | null; + customFormats?: CustomFormatResource[] | null; + /** @format int32 */ + customFormatScore?: number; + /** @format int32 */ + indexerFlags?: number; + rejections?: Rejection[] | null; +} + +export interface ManualImportResource { + /** @format int32 */ + id?: number; + path?: string | null; + relativePath?: string | null; + folderName?: string | null; + name?: string | null; + /** @format int64 */ + size?: number; + movie?: MovieResource; + quality?: QualityModel; + languages?: Language[] | null; + releaseGroup?: string | null; + /** @format int32 */ + qualityWeight?: number; + downloadId?: string | null; + customFormats?: CustomFormatResource[] | null; + /** @format int32 */ + customFormatScore?: number; + /** @format int32 */ + indexerFlags?: number; + rejections?: Rejection[] | null; +} + +export interface MediaCover { + coverType?: MediaCoverTypes; + url?: string | null; + remoteUrl?: string | null; +} + +export enum MediaCoverTypes { + Unknown = "unknown", + Poster = "poster", + Banner = "banner", + Fanart = "fanart", + Screenshot = "screenshot", + Headshot = "headshot", + Clearlogo = "clearlogo", +} + +export interface MediaInfoResource { + /** @format int32 */ + id?: number; + /** @format int64 */ + audioBitrate?: number; + /** @format double */ + audioChannels?: number; + audioCodec?: string | null; + audioLanguages?: string | null; + /** @format int32 */ + audioStreamCount?: number; + /** @format int32 */ + videoBitDepth?: number; + /** @format int64 */ + videoBitrate?: number; + videoCodec?: string | null; + /** @format double */ + videoFps?: number; + videoDynamicRange?: string | null; + videoDynamicRangeType?: string | null; + resolution?: string | null; + runTime?: string | null; + scanType?: string | null; + subtitles?: string | null; +} + +export interface MediaManagementConfigResource { + /** @format int32 */ + id?: number; + autoUnmonitorPreviouslyDownloadedMovies?: boolean; + recycleBin?: string | null; + /** @format int32 */ + recycleBinCleanupDays?: number; + downloadPropersAndRepacks?: ProperDownloadTypes; + createEmptyMovieFolders?: boolean; + deleteEmptyFolders?: boolean; + fileDate?: FileDateType; + rescanAfterRefresh?: RescanAfterRefreshType; + autoRenameFolders?: boolean; + pathsDefaultStatic?: boolean; + setPermissionsLinux?: boolean; + chmodFolder?: string | null; + chownGroup?: string | null; + skipFreeSpaceCheckWhenImporting?: boolean; + /** @format int32 */ + minimumFreeSpaceWhenImporting?: number; + copyUsingHardlinks?: boolean; + useScriptImport?: boolean; + scriptImportPath?: string | null; + importExtraFiles?: boolean; + extraFileExtensions?: string | null; + enableMediaInfo?: boolean; +} + +export interface MetadataConfigResource { + /** @format int32 */ + id?: number; + certificationCountry?: TMDbCountryCode; +} + +export interface MetadataResource { + /** @format int32 */ + id?: number; + name?: string | null; + fields?: Field[] | null; + implementationName?: string | null; + implementation?: string | null; + configContract?: string | null; + infoLink?: string | null; + message?: ProviderMessage; + /** @uniqueItems true */ + tags?: number[] | null; + presets?: MetadataResource[] | null; + enable?: boolean; +} + +export enum Modifier { + None = "none", + Regional = "regional", + Screener = "screener", + Rawhd = "rawhd", + Brdisk = "brdisk", + Remux = "remux", +} + +export enum MonitorTypes { + MovieOnly = "movieOnly", + MovieAndCollection = "movieAndCollection", + None = "none", +} + +export interface MovieCollectionResource { + title?: string | null; + /** @format int32 */ + tmdbId?: number; +} + +export interface MovieEditorResource { + movieIds?: number[] | null; + monitored?: boolean | null; + /** @format int32 */ + qualityProfileId?: number | null; + minimumAvailability?: MovieStatusType; + rootFolderPath?: string | null; + tags?: number[] | null; + applyTags?: ApplyTags; + moveFiles?: boolean; + deleteFiles?: boolean; + addImportExclusion?: boolean; +} + +export interface MovieFileListResource { + movieFileIds?: number[] | null; + languages?: Language[] | null; + quality?: QualityModel; + edition?: string | null; + releaseGroup?: string | null; + sceneName?: string | null; + /** @format int32 */ + indexerFlags?: number | null; +} + +export interface MovieFileResource { + /** @format int32 */ + id?: number; + /** @format int32 */ + movieId?: number; + relativePath?: string | null; + path?: string | null; + /** @format int64 */ + size?: number; + /** @format date-time */ + dateAdded?: string; + sceneName?: string | null; + releaseGroup?: string | null; + edition?: string | null; + languages?: Language[] | null; + quality?: QualityModel; + customFormats?: CustomFormatResource[] | null; + /** @format int32 */ + customFormatScore?: number; + /** @format int32 */ + indexerFlags?: number | null; + mediaInfo?: MediaInfoResource; + originalFilePath?: string | null; + qualityCutoffNotMet?: boolean; +} + +export enum MovieHistoryEventType { + Unknown = "unknown", + Grabbed = "grabbed", + DownloadFolderImported = "downloadFolderImported", + DownloadFailed = "downloadFailed", + MovieFileDeleted = "movieFileDeleted", + MovieFolderImported = "movieFolderImported", + MovieFileRenamed = "movieFileRenamed", + DownloadIgnored = "downloadIgnored", +} + +export interface MovieResource { + /** @format int32 */ + id?: number; + title?: string | null; + originalTitle?: string | null; + originalLanguage?: Language; + alternateTitles?: AlternativeTitleResource[] | null; + /** @format int32 */ + secondaryYear?: number | null; + /** @format int32 */ + secondaryYearSourceId?: number; + sortTitle?: string | null; + /** @format int64 */ + sizeOnDisk?: number | null; + status?: MovieStatusType; + overview?: string | null; + /** @format date-time */ + inCinemas?: string | null; + /** @format date-time */ + physicalRelease?: string | null; + /** @format date-time */ + digitalRelease?: string | null; + /** @format date-time */ + releaseDate?: string | null; + physicalReleaseNote?: string | null; + images?: MediaCover[] | null; + website?: string | null; + remotePoster?: string | null; + /** @format int32 */ + year?: number; + youTubeTrailerId?: string | null; + studio?: string | null; + path?: string | null; + /** @format int32 */ + qualityProfileId?: number; + hasFile?: boolean | null; + /** @format int32 */ + movieFileId?: number; + monitored?: boolean; + minimumAvailability?: MovieStatusType; + isAvailable?: boolean; + folderName?: string | null; + /** @format int32 */ + runtime?: number; + cleanTitle?: string | null; + imdbId?: string | null; + /** @format int32 */ + tmdbId?: number; + titleSlug?: string | null; + rootFolderPath?: string | null; + folder?: string | null; + certification?: string | null; + genres?: string[] | null; + /** @uniqueItems true */ + tags?: number[] | null; + /** @format date-time */ + added?: string; + addOptions?: AddMovieOptions; + ratings?: Ratings; + movieFile?: MovieFileResource; + collection?: MovieCollectionResource; + /** @format float */ + popularity?: number; + /** @format date-time */ + lastSearchTime?: string | null; + statistics?: MovieStatisticsResource; +} + +export interface MovieResourcePagingResource { + /** @format int32 */ + page?: number; + /** @format int32 */ + pageSize?: number; + sortKey?: string | null; + sortDirection?: SortDirection; + /** @format int32 */ + totalRecords?: number; + records?: MovieResource[] | null; +} + +export enum MovieRuntimeFormatType { + HoursMinutes = "hoursMinutes", + Minutes = "minutes", +} + +export interface MovieStatisticsResource { + /** @format int32 */ + movieFileCount?: number; + /** @format int64 */ + sizeOnDisk?: number; + releaseGroups?: string[] | null; +} + +export enum MovieStatusType { + Tba = "tba", + Announced = "announced", + InCinemas = "inCinemas", + Released = "released", + Deleted = "deleted", +} + +export interface NamingConfigResource { + /** @format int32 */ + id?: number; + renameMovies?: boolean; + replaceIllegalCharacters?: boolean; + colonReplacementFormat?: ColonReplacementFormat; + standardMovieFormat?: string | null; + movieFolderFormat?: string | null; +} + +export interface NotificationResource { + /** @format int32 */ + id?: number; + name?: string | null; + fields?: Field[] | null; + implementationName?: string | null; + implementation?: string | null; + configContract?: string | null; + infoLink?: string | null; + message?: ProviderMessage; + /** @uniqueItems true */ + tags?: number[] | null; + presets?: NotificationResource[] | null; + link?: string | null; + onGrab?: boolean; + onDownload?: boolean; + onUpgrade?: boolean; + onRename?: boolean; + onMovieAdded?: boolean; + onMovieDelete?: boolean; + onMovieFileDelete?: boolean; + onMovieFileDeleteForUpgrade?: boolean; + onHealthIssue?: boolean; + includeHealthWarnings?: boolean; + onHealthRestored?: boolean; + onApplicationUpdate?: boolean; + onManualInteractionRequired?: boolean; + supportsOnGrab?: boolean; + supportsOnDownload?: boolean; + supportsOnUpgrade?: boolean; + supportsOnRename?: boolean; + supportsOnMovieAdded?: boolean; + supportsOnMovieDelete?: boolean; + supportsOnMovieFileDelete?: boolean; + supportsOnMovieFileDeleteForUpgrade?: boolean; + supportsOnHealthIssue?: boolean; + supportsOnHealthRestored?: boolean; + supportsOnApplicationUpdate?: boolean; + supportsOnManualInteractionRequired?: boolean; + testCommand?: string | null; +} + +export interface ParseResource { + /** @format int32 */ + id?: number; + title?: string | null; + parsedMovieInfo?: ParsedMovieInfo; + movie?: MovieResource; + languages?: Language[] | null; + customFormats?: CustomFormatResource[] | null; + /** @format int32 */ + customFormatScore?: number; +} + +export interface ParsedMovieInfo { + movieTitles?: string[] | null; + originalTitle?: string | null; + releaseTitle?: string | null; + simpleReleaseTitle?: string | null; + quality?: QualityModel; + languages?: Language[] | null; + releaseGroup?: string | null; + releaseHash?: string | null; + edition?: string | null; + /** @format int32 */ + year?: number; + imdbId?: string | null; + /** @format int32 */ + tmdbId?: number; + hardcodedSubs?: string | null; + movieTitle?: string | null; + primaryMovieTitle?: string | null; +} + +export interface PingResource { + status?: string | null; +} + +export enum PrivacyLevel { + Normal = "normal", + Password = "password", + ApiKey = "apiKey", + UserName = "userName", +} + +export interface ProfileFormatItemResource { + /** @format int32 */ + id?: number; + /** @format int32 */ + format?: number; + name?: string | null; + /** @format int32 */ + score?: number; +} + +export enum ProperDownloadTypes { + PreferAndUpgrade = "preferAndUpgrade", + DoNotUpgrade = "doNotUpgrade", + DoNotPrefer = "doNotPrefer", +} + +export interface ProviderMessage { + message?: string | null; + type?: ProviderMessageType; +} + +export enum ProviderMessageType { + Info = "info", + Warning = "warning", + Error = "error", +} + +export enum ProxyType { + Http = "http", + Socks4 = "socks4", + Socks5 = "socks5", +} + +export interface Quality { + /** @format int32 */ + id?: number; + name?: string | null; + source?: QualitySource; + /** @format int32 */ + resolution?: number; + modifier?: Modifier; +} + +export interface QualityDefinitionResource { + /** @format int32 */ + id?: number; + quality?: Quality; + title?: string | null; + /** @format int32 */ + weight?: number; + /** @format double */ + minSize?: number | null; + /** @format double */ + maxSize?: number | null; + /** @format double */ + preferredSize?: number | null; +} + +export interface QualityModel { + quality?: Quality; + revision?: Revision; +} + +export interface QualityProfileQualityItemResource { + /** @format int32 */ + id?: number; + name?: string | null; + quality?: Quality; + items?: QualityProfileQualityItemResource[] | null; + allowed?: boolean; +} + +export interface QualityProfileResource { + /** @format int32 */ + id?: number; + name?: string | null; + upgradeAllowed?: boolean; + /** @format int32 */ + cutoff?: number; + items?: QualityProfileQualityItemResource[] | null; + /** @format int32 */ + minFormatScore?: number; + /** @format int32 */ + cutoffFormatScore?: number; + /** @format int32 */ + minUpgradeFormatScore?: number; + formatItems?: ProfileFormatItemResource[] | null; + language?: Language; +} + +export enum QualitySource { + Unknown = "unknown", + Cam = "cam", + Telesync = "telesync", + Telecine = "telecine", + Workprint = "workprint", + Dvd = "dvd", + Tv = "tv", + Webdl = "webdl", + Webrip = "webrip", + Bluray = "bluray", +} + +export interface QueueBulkResource { + ids?: number[] | null; +} + +export interface QueueResource { + /** @format int32 */ + id?: number; + /** @format int32 */ + movieId?: number | null; + movie?: MovieResource; + languages?: Language[] | null; + quality?: QualityModel; + customFormats?: CustomFormatResource[] | null; + /** @format int32 */ + customFormatScore?: number; + /** @format double */ + size?: number; + title?: string | null; + /** @format double */ + sizeleft?: number; + /** @format date-span */ + timeleft?: string | null; + /** @format date-time */ + estimatedCompletionTime?: string | null; + /** @format date-time */ + added?: string | null; + status?: string | null; + trackedDownloadStatus?: TrackedDownloadStatus; + trackedDownloadState?: TrackedDownloadState; + statusMessages?: TrackedDownloadStatusMessage[] | null; + errorMessage?: string | null; + downloadId?: string | null; + protocol?: DownloadProtocol; + downloadClient?: string | null; + downloadClientHasPostImportCategory?: boolean; + indexer?: string | null; + outputPath?: string | null; +} + +export interface QueueResourcePagingResource { + /** @format int32 */ + page?: number; + /** @format int32 */ + pageSize?: number; + sortKey?: string | null; + sortDirection?: SortDirection; + /** @format int32 */ + totalRecords?: number; + records?: QueueResource[] | null; +} + +export interface QueueStatusResource { + /** @format int32 */ + id?: number; + /** @format int32 */ + totalCount?: number; + /** @format int32 */ + count?: number; + /** @format int32 */ + unknownCount?: number; + errors?: boolean; + warnings?: boolean; + unknownErrors?: boolean; + unknownWarnings?: boolean; +} + +export interface RatingChild { + /** @format int32 */ + votes?: number; + /** @format double */ + value?: number; + type?: RatingType; +} + +export enum RatingType { + User = "user", + Critic = "critic", +} + +export interface Ratings { + imdb?: RatingChild; + tmdb?: RatingChild; + metacritic?: RatingChild; + rottenTomatoes?: RatingChild; + trakt?: RatingChild; +} + +export interface Rejection { + reason?: string | null; + type?: RejectionType; +} + +export enum RejectionType { + Permanent = "permanent", + Temporary = "temporary", +} + +export interface ReleaseProfileResource { + /** @format int32 */ + id?: number; + name?: string | null; + enabled?: boolean; + required?: any; + ignored?: any; + /** @format int32 */ + indexerId?: number; + /** @uniqueItems true */ + tags?: number[] | null; +} + +export interface ReleaseResource { + /** @format int32 */ + id?: number; + guid?: string | null; + quality?: QualityModel; + customFormats?: CustomFormatResource[] | null; + /** @format int32 */ + customFormatScore?: number; + /** @format int32 */ + qualityWeight?: number; + /** @format int32 */ + age?: number; + /** @format double */ + ageHours?: number; + /** @format double */ + ageMinutes?: number; + /** @format int64 */ + size?: number; + /** @format int32 */ + indexerId?: number; + indexer?: string | null; + releaseGroup?: string | null; + subGroup?: string | null; + releaseHash?: string | null; + title?: string | null; + sceneSource?: boolean; + movieTitles?: string[] | null; + languages?: Language[] | null; + /** @format int32 */ + mappedMovieId?: number | null; + approved?: boolean; + temporarilyRejected?: boolean; + rejected?: boolean; + /** @format int32 */ + tmdbId?: number; + /** @format int32 */ + imdbId?: number; + rejections?: string[] | null; + /** @format date-time */ + publishDate?: string; + commentUrl?: string | null; + downloadUrl?: string | null; + infoUrl?: string | null; + downloadAllowed?: boolean; + /** @format int32 */ + releaseWeight?: number; + edition?: string | null; + magnetUrl?: string | null; + infoHash?: string | null; + /** @format int32 */ + seeders?: number | null; + /** @format int32 */ + leechers?: number | null; + protocol?: DownloadProtocol; + indexerFlags?: any; + /** @format int32 */ + movieId?: number | null; + /** @format int32 */ + downloadClientId?: number | null; + downloadClient?: string | null; + shouldOverride?: boolean | null; +} + +export interface RemotePathMappingResource { + /** @format int32 */ + id?: number; + host?: string | null; + remotePath?: string | null; + localPath?: string | null; +} + +export interface RenameMovieResource { + /** @format int32 */ + id?: number; + /** @format int32 */ + movieId?: number; + /** @format int32 */ + movieFileId?: number; + existingPath?: string | null; + newPath?: string | null; +} + +export enum RescanAfterRefreshType { + Always = "always", + AfterManual = "afterManual", + Never = "never", +} + +export interface Revision { + /** @format int32 */ + version?: number; + /** @format int32 */ + real?: number; + isRepack?: boolean; +} + +export interface RootFolderResource { + /** @format int32 */ + id?: number; + path?: string | null; + accessible?: boolean; + /** @format int64 */ + freeSpace?: number | null; + unmappedFolders?: UnmappedFolder[] | null; +} + +export enum RuntimeMode { + Console = "console", + Service = "service", + Tray = "tray", +} + +export interface SelectOption { + /** @format int32 */ + value?: number; + name?: string | null; + /** @format int32 */ + order?: number; + hint?: string | null; + dividerAfter?: boolean; +} + +export enum SortDirection { + Default = "default", + Ascending = "ascending", + Descending = "descending", +} + +export enum SourceType { + Tmdb = "tmdb", + Mappings = "mappings", + User = "user", + Indexer = "indexer", +} + +export interface SystemResource { + appName?: string | null; + instanceName?: string | null; + version?: string | null; + /** @format date-time */ + buildTime?: string; + isDebug?: boolean; + isProduction?: boolean; + isAdmin?: boolean; + isUserInteractive?: boolean; + startupPath?: string | null; + appData?: string | null; + osName?: string | null; + osVersion?: string | null; + isNetCore?: boolean; + isLinux?: boolean; + isOsx?: boolean; + isWindows?: boolean; + isDocker?: boolean; + mode?: RuntimeMode; + branch?: string | null; + databaseType?: DatabaseType; + databaseVersion?: string | null; + authentication?: AuthenticationType; + /** @format int32 */ + migrationVersion?: number; + urlBase?: string | null; + runtimeVersion?: string | null; + runtimeName?: string | null; + /** @format date-time */ + startTime?: string; + packageVersion?: string | null; + packageAuthor?: string | null; + packageUpdateMechanism?: UpdateMechanism; + packageUpdateMechanismMessage?: string | null; +} + +export enum TMDbCountryCode { + Au = "au", + Br = "br", + Ca = "ca", + Fr = "fr", + De = "de", + Gb = "gb", + Ie = "ie", + It = "it", + Es = "es", + Us = "us", + Nz = "nz", +} + +export interface TagDetailsResource { + /** @format int32 */ + id?: number; + label?: string | null; + delayProfileIds?: number[] | null; + importListIds?: number[] | null; + notificationIds?: number[] | null; + releaseProfileIds?: number[] | null; + indexerIds?: number[] | null; + downloadClientIds?: number[] | null; + autoTagIds?: number[] | null; + movieIds?: number[] | null; +} + +export interface TagResource { + /** @format int32 */ + id?: number; + label?: string | null; +} + +export interface TaskResource { + /** @format int32 */ + id?: number; + name?: string | null; + taskName?: string | null; + /** @format int32 */ + interval?: number; + /** @format date-time */ + lastExecution?: string; + /** @format date-time */ + lastStartTime?: string; + /** @format date-time */ + nextExecution?: string; + /** @format date-span */ + lastDuration?: string; +} + +export enum TrackedDownloadState { + Downloading = "downloading", + ImportBlocked = "importBlocked", + ImportPending = "importPending", + Importing = "importing", + Imported = "imported", + FailedPending = "failedPending", + Failed = "failed", + Ignored = "ignored", +} + +export enum TrackedDownloadStatus { + Ok = "ok", + Warning = "warning", + Error = "error", +} + +export interface TrackedDownloadStatusMessage { + title?: string | null; + messages?: string[] | null; +} + +export interface UiConfigResource { + /** @format int32 */ + id?: number; + /** @format int32 */ + firstDayOfWeek?: number; + calendarWeekColumnHeader?: string | null; + movieRuntimeFormat?: MovieRuntimeFormatType; + shortDateFormat?: string | null; + longDateFormat?: string | null; + timeFormat?: string | null; + showRelativeDates?: boolean; + enableColorImpairedMode?: boolean; + /** @format int32 */ + movieInfoLanguage?: number; + /** @format int32 */ + uiLanguage?: number; + theme?: string | null; +} + +export interface UnmappedFolder { + name?: string | null; + path?: string | null; + relativePath?: string | null; +} + +export interface UpdateChanges { + new?: string[] | null; + fixed?: string[] | null; +} + +export enum UpdateMechanism { + BuiltIn = "builtIn", + Script = "script", + External = "external", + Apt = "apt", + Docker = "docker", +} + +export interface UpdateResource { + /** @format int32 */ + id?: number; + version?: string | null; + branch?: string | null; + /** @format date-time */ + releaseDate?: string; + fileName?: string | null; + url?: string | null; + installed?: boolean; + /** @format date-time */ + installedOn?: string | null; + installable?: boolean; + latest?: boolean; + changes?: UpdateChanges; + hash?: string | null; +} diff --git a/src/__generated__/sonarr/Api.ts b/src/__generated__/sonarr/Api.ts new file mode 100644 index 0000000..2eb208c --- /dev/null +++ b/src/__generated__/sonarr/Api.ts @@ -0,0 +1,4312 @@ +/* eslint-disable */ +/* tslint:disable */ +/* + * --------------------------------------------------------------- + * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## + * ## ## + * ## AUTHOR: acacode ## + * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## + * --------------------------------------------------------------- + */ + +import { ContentType, HttpClient, RequestParams } from "./../ky-client"; +import { + AutoTaggingResource, + BackupResource, + BlocklistBulkResource, + BlocklistResourcePagingResource, + CommandResource, + CustomFilterResource, + CustomFormatBulkResource, + CustomFormatResource, + DelayProfileResource, + DiskSpaceResource, + DownloadClientBulkResource, + DownloadClientConfigResource, + DownloadClientResource, + DownloadProtocol, + EpisodeFileListResource, + EpisodeFileResource, + EpisodeHistoryEventType, + EpisodeResource, + EpisodeResourcePagingResource, + EpisodesMonitoredResource, + HealthResource, + HistoryResource, + HistoryResourcePagingResource, + HostConfigResource, + ImportListBulkResource, + ImportListConfigResource, + ImportListExclusionBulkResource, + ImportListExclusionResource, + ImportListExclusionResourcePagingResource, + ImportListResource, + IndexerBulkResource, + IndexerConfigResource, + IndexerFlagResource, + IndexerResource, + LanguageProfileResource, + LanguageResource, + LocalizationLanguageResource, + LocalizationResource, + LogFileResource, + LogResourcePagingResource, + ManualImportReprocessResource, + ManualImportResource, + MediaManagementConfigResource, + MetadataResource, + NamingConfigResource, + NotificationResource, + ParseResource, + QualityDefinitionLimitsResource, + QualityDefinitionResource, + QualityProfileResource, + QueueBulkResource, + QueueResource, + QueueResourcePagingResource, + QueueStatusResource, + ReleaseProfileResource, + ReleaseResource, + RemotePathMappingResource, + RenameEpisodeResource, + RootFolderResource, + SeasonPassResource, + SeriesEditorResource, + SeriesResource, + SortDirection, + SystemResource, + TagDetailsResource, + TagResource, + TaskResource, + UiConfigResource, + UpdateResource, +} from "./data-contracts"; + +export class Api { + http: HttpClient; + + constructor(http: HttpClient) { + this.http = http; + } + + /** + * No description + * + * @tags ApiInfo + * @name GetApi + * @request GET:/api + * @secure + */ + getApi = (params: RequestParams = {}) => + this.http.request({ + path: `/api`, + method: "GET", + secure: true, + ...params, + }); + /** + * No description + * + * @tags AutoTagging + * @name V3AutotaggingCreate + * @request POST:/api/v3/autotagging + * @secure + */ + v3AutotaggingCreate = (data: AutoTaggingResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/autotagging`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags AutoTagging + * @name V3AutotaggingList + * @request GET:/api/v3/autotagging + * @secure + */ + v3AutotaggingList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/autotagging`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags AutoTagging + * @name V3AutotaggingUpdate + * @request PUT:/api/v3/autotagging/{id} + * @secure + */ + v3AutotaggingUpdate = (id: string, data: AutoTaggingResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/autotagging/${id}`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags AutoTagging + * @name V3AutotaggingDelete + * @request DELETE:/api/v3/autotagging/{id} + * @secure + */ + v3AutotaggingDelete = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/autotagging/${id}`, + method: "DELETE", + secure: true, + ...params, + }); + /** + * No description + * + * @tags AutoTagging + * @name V3AutotaggingDetail + * @request GET:/api/v3/autotagging/{id} + * @secure + */ + v3AutotaggingDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/autotagging/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags AutoTagging + * @name V3AutotaggingSchemaList + * @request GET:/api/v3/autotagging/schema + * @secure + */ + v3AutotaggingSchemaList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/autotagging/schema`, + method: "GET", + secure: true, + ...params, + }); + /** + * No description + * + * @tags Backup + * @name V3SystemBackupList + * @request GET:/api/v3/system/backup + * @secure + */ + v3SystemBackupList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/system/backup`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Backup + * @name V3SystemBackupDelete + * @request DELETE:/api/v3/system/backup/{id} + * @secure + */ + v3SystemBackupDelete = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/system/backup/${id}`, + method: "DELETE", + secure: true, + ...params, + }); + /** + * No description + * + * @tags Backup + * @name V3SystemBackupRestoreCreate + * @request POST:/api/v3/system/backup/restore/{id} + * @secure + */ + v3SystemBackupRestoreCreate = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/system/backup/restore/${id}`, + method: "POST", + secure: true, + ...params, + }); + /** + * No description + * + * @tags Backup + * @name V3SystemBackupRestoreUploadCreate + * @request POST:/api/v3/system/backup/restore/upload + * @secure + */ + v3SystemBackupRestoreUploadCreate = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/system/backup/restore/upload`, + method: "POST", + secure: true, + ...params, + }); + /** + * No description + * + * @tags Blocklist + * @name V3BlocklistList + * @request GET:/api/v3/blocklist + * @secure + */ + v3BlocklistList = ( + query?: { + /** + * @format int32 + * @default 1 + */ + page?: number; + /** + * @format int32 + * @default 10 + */ + pageSize?: number; + sortKey?: string; + sortDirection?: SortDirection; + seriesIds?: number[]; + protocols?: DownloadProtocol[]; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/blocklist`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Blocklist + * @name V3BlocklistDelete + * @request DELETE:/api/v3/blocklist/{id} + * @secure + */ + v3BlocklistDelete = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/blocklist/${id}`, + method: "DELETE", + secure: true, + ...params, + }); + /** + * No description + * + * @tags Blocklist + * @name V3BlocklistBulkDelete + * @request DELETE:/api/v3/blocklist/bulk + * @secure + */ + v3BlocklistBulkDelete = (data: BlocklistBulkResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/blocklist/bulk`, + method: "DELETE", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags Calendar + * @name V3CalendarList + * @request GET:/api/v3/calendar + * @secure + */ + v3CalendarList = ( + query?: { + /** @format date-time */ + start?: string; + /** @format date-time */ + end?: string; + /** @default false */ + unmonitored?: boolean; + /** @default false */ + includeSeries?: boolean; + /** @default false */ + includeEpisodeFile?: boolean; + /** @default false */ + includeEpisodeImages?: boolean; + /** @default "" */ + tags?: string; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/calendar`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Calendar + * @name V3CalendarDetail + * @request GET:/api/v3/calendar/{id} + * @secure + */ + v3CalendarDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/calendar/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Command + * @name V3CommandCreate + * @request POST:/api/v3/command + * @secure + */ + v3CommandCreate = (data: CommandResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/command`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Command + * @name V3CommandList + * @request GET:/api/v3/command + * @secure + */ + v3CommandList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/command`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Command + * @name V3CommandDelete + * @request DELETE:/api/v3/command/{id} + * @secure + */ + v3CommandDelete = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/command/${id}`, + method: "DELETE", + secure: true, + ...params, + }); + /** + * No description + * + * @tags Command + * @name V3CommandDetail + * @request GET:/api/v3/command/{id} + * @secure + */ + v3CommandDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/command/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags CustomFilter + * @name V3CustomfilterList + * @request GET:/api/v3/customfilter + * @secure + */ + v3CustomfilterList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/customfilter`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags CustomFilter + * @name V3CustomfilterCreate + * @request POST:/api/v3/customfilter + * @secure + */ + v3CustomfilterCreate = (data: CustomFilterResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/customfilter`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags CustomFilter + * @name V3CustomfilterUpdate + * @request PUT:/api/v3/customfilter/{id} + * @secure + */ + v3CustomfilterUpdate = (id: string, data: CustomFilterResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/customfilter/${id}`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags CustomFilter + * @name V3CustomfilterDelete + * @request DELETE:/api/v3/customfilter/{id} + * @secure + */ + v3CustomfilterDelete = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/customfilter/${id}`, + method: "DELETE", + secure: true, + ...params, + }); + /** + * No description + * + * @tags CustomFilter + * @name V3CustomfilterDetail + * @request GET:/api/v3/customfilter/{id} + * @secure + */ + v3CustomfilterDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/customfilter/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags CustomFormat + * @name V3CustomformatList + * @request GET:/api/v3/customformat + * @secure + */ + v3CustomformatList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/customformat`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags CustomFormat + * @name V3CustomformatCreate + * @request POST:/api/v3/customformat + * @secure + */ + v3CustomformatCreate = (data: CustomFormatResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/customformat`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags CustomFormat + * @name V3CustomformatUpdate + * @request PUT:/api/v3/customformat/{id} + * @secure + */ + v3CustomformatUpdate = (id: string, data: CustomFormatResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/customformat/${id}`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags CustomFormat + * @name V3CustomformatDelete + * @request DELETE:/api/v3/customformat/{id} + * @secure + */ + v3CustomformatDelete = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/customformat/${id}`, + method: "DELETE", + secure: true, + ...params, + }); + /** + * No description + * + * @tags CustomFormat + * @name V3CustomformatDetail + * @request GET:/api/v3/customformat/{id} + * @secure + */ + v3CustomformatDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/customformat/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags CustomFormat + * @name V3CustomformatBulkUpdate + * @request PUT:/api/v3/customformat/bulk + * @secure + */ + v3CustomformatBulkUpdate = (data: CustomFormatBulkResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/customformat/bulk`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags CustomFormat + * @name V3CustomformatBulkDelete + * @request DELETE:/api/v3/customformat/bulk + * @secure + */ + v3CustomformatBulkDelete = (data: CustomFormatBulkResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/customformat/bulk`, + method: "DELETE", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags CustomFormat + * @name V3CustomformatSchemaList + * @request GET:/api/v3/customformat/schema + * @secure + */ + v3CustomformatSchemaList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/customformat/schema`, + method: "GET", + secure: true, + ...params, + }); + /** + * No description + * + * @tags Cutoff + * @name V3WantedCutoffList + * @request GET:/api/v3/wanted/cutoff + * @secure + */ + v3WantedCutoffList = ( + query?: { + /** + * @format int32 + * @default 1 + */ + page?: number; + /** + * @format int32 + * @default 10 + */ + pageSize?: number; + sortKey?: string; + sortDirection?: SortDirection; + /** @default false */ + includeSeries?: boolean; + /** @default false */ + includeEpisodeFile?: boolean; + /** @default false */ + includeImages?: boolean; + /** @default true */ + monitored?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/wanted/cutoff`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Cutoff + * @name V3WantedCutoffDetail + * @request GET:/api/v3/wanted/cutoff/{id} + * @secure + */ + v3WantedCutoffDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/wanted/cutoff/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags DelayProfile + * @name V3DelayprofileCreate + * @request POST:/api/v3/delayprofile + * @secure + */ + v3DelayprofileCreate = (data: DelayProfileResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/delayprofile`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags DelayProfile + * @name V3DelayprofileList + * @request GET:/api/v3/delayprofile + * @secure + */ + v3DelayprofileList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/delayprofile`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags DelayProfile + * @name V3DelayprofileDelete + * @request DELETE:/api/v3/delayprofile/{id} + * @secure + */ + v3DelayprofileDelete = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/delayprofile/${id}`, + method: "DELETE", + secure: true, + ...params, + }); + /** + * No description + * + * @tags DelayProfile + * @name V3DelayprofileUpdate + * @request PUT:/api/v3/delayprofile/{id} + * @secure + */ + v3DelayprofileUpdate = (id: string, data: DelayProfileResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/delayprofile/${id}`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags DelayProfile + * @name V3DelayprofileDetail + * @request GET:/api/v3/delayprofile/{id} + * @secure + */ + v3DelayprofileDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/delayprofile/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags DelayProfile + * @name V3DelayprofileReorderUpdate + * @request PUT:/api/v3/delayprofile/reorder/{id} + * @secure + */ + v3DelayprofileReorderUpdate = ( + id: number, + query?: { + /** @format int32 */ + after?: number; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/delayprofile/reorder/${id}`, + method: "PUT", + query: query, + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags DiskSpace + * @name V3DiskspaceList + * @request GET:/api/v3/diskspace + * @secure + */ + v3DiskspaceList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/diskspace`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags DownloadClient + * @name V3DownloadclientList + * @request GET:/api/v3/downloadclient + * @secure + */ + v3DownloadclientList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/downloadclient`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags DownloadClient + * @name V3DownloadclientCreate + * @request POST:/api/v3/downloadclient + * @secure + */ + v3DownloadclientCreate = ( + data: DownloadClientResource, + query?: { + /** @default false */ + forceSave?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/downloadclient`, + method: "POST", + query: query, + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags DownloadClient + * @name V3DownloadclientUpdate + * @request PUT:/api/v3/downloadclient/{id} + * @secure + */ + v3DownloadclientUpdate = ( + id: number, + data: DownloadClientResource, + query?: { + /** @default false */ + forceSave?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/downloadclient/${id}`, + method: "PUT", + query: query, + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags DownloadClient + * @name V3DownloadclientDelete + * @request DELETE:/api/v3/downloadclient/{id} + * @secure + */ + v3DownloadclientDelete = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/downloadclient/${id}`, + method: "DELETE", + secure: true, + ...params, + }); + /** + * No description + * + * @tags DownloadClient + * @name V3DownloadclientDetail + * @request GET:/api/v3/downloadclient/{id} + * @secure + */ + v3DownloadclientDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/downloadclient/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags DownloadClient + * @name V3DownloadclientBulkUpdate + * @request PUT:/api/v3/downloadclient/bulk + * @secure + */ + v3DownloadclientBulkUpdate = (data: DownloadClientBulkResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/downloadclient/bulk`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags DownloadClient + * @name V3DownloadclientBulkDelete + * @request DELETE:/api/v3/downloadclient/bulk + * @secure + */ + v3DownloadclientBulkDelete = (data: DownloadClientBulkResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/downloadclient/bulk`, + method: "DELETE", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags DownloadClient + * @name V3DownloadclientSchemaList + * @request GET:/api/v3/downloadclient/schema + * @secure + */ + v3DownloadclientSchemaList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/downloadclient/schema`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags DownloadClient + * @name V3DownloadclientTestCreate + * @request POST:/api/v3/downloadclient/test + * @secure + */ + v3DownloadclientTestCreate = ( + data: DownloadClientResource, + query?: { + /** @default false */ + forceTest?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/downloadclient/test`, + method: "POST", + query: query, + body: data, + secure: true, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags DownloadClient + * @name V3DownloadclientTestallCreate + * @request POST:/api/v3/downloadclient/testall + * @secure + */ + v3DownloadclientTestallCreate = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/downloadclient/testall`, + method: "POST", + secure: true, + ...params, + }); + /** + * No description + * + * @tags DownloadClient + * @name V3DownloadclientActionCreate + * @request POST:/api/v3/downloadclient/action/{name} + * @secure + */ + v3DownloadclientActionCreate = (name: string, data: DownloadClientResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/downloadclient/action/${name}`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags DownloadClientConfig + * @name V3ConfigDownloadclientList + * @request GET:/api/v3/config/downloadclient + * @secure + */ + v3ConfigDownloadclientList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/config/downloadclient`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags DownloadClientConfig + * @name V3ConfigDownloadclientUpdate + * @request PUT:/api/v3/config/downloadclient/{id} + * @secure + */ + v3ConfigDownloadclientUpdate = (id: string, data: DownloadClientConfigResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/config/downloadclient/${id}`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags DownloadClientConfig + * @name V3ConfigDownloadclientDetail + * @request GET:/api/v3/config/downloadclient/{id} + * @secure + */ + v3ConfigDownloadclientDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/config/downloadclient/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Episode + * @name V3EpisodeList + * @request GET:/api/v3/episode + * @secure + */ + v3EpisodeList = ( + query?: { + /** @format int32 */ + seriesId?: number; + /** @format int32 */ + seasonNumber?: number; + episodeIds?: number[]; + /** @format int32 */ + episodeFileId?: number; + /** @default false */ + includeSeries?: boolean; + /** @default false */ + includeEpisodeFile?: boolean; + /** @default false */ + includeImages?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/episode`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Episode + * @name V3EpisodeUpdate + * @request PUT:/api/v3/episode/{id} + * @secure + */ + v3EpisodeUpdate = (id: number, data: EpisodeResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/episode/${id}`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Episode + * @name V3EpisodeDetail + * @request GET:/api/v3/episode/{id} + * @secure + */ + v3EpisodeDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/episode/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Episode + * @name V3EpisodeMonitorUpdate + * @request PUT:/api/v3/episode/monitor + * @secure + */ + v3EpisodeMonitorUpdate = ( + data: EpisodesMonitoredResource, + query?: { + /** @default false */ + includeImages?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/episode/monitor`, + method: "PUT", + query: query, + body: data, + secure: true, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags EpisodeFile + * @name V3EpisodefileList + * @request GET:/api/v3/episodefile + * @secure + */ + v3EpisodefileList = ( + query?: { + /** @format int32 */ + seriesId?: number; + episodeFileIds?: number[]; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/episodefile`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags EpisodeFile + * @name V3EpisodefileUpdate + * @request PUT:/api/v3/episodefile/{id} + * @secure + */ + v3EpisodefileUpdate = (id: string, data: EpisodeFileResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/episodefile/${id}`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags EpisodeFile + * @name V3EpisodefileDelete + * @request DELETE:/api/v3/episodefile/{id} + * @secure + */ + v3EpisodefileDelete = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/episodefile/${id}`, + method: "DELETE", + secure: true, + ...params, + }); + /** + * No description + * + * @tags EpisodeFile + * @name V3EpisodefileDetail + * @request GET:/api/v3/episodefile/{id} + * @secure + */ + v3EpisodefileDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/episodefile/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags EpisodeFile + * @name V3EpisodefileEditorUpdate + * @request PUT:/api/v3/episodefile/editor + * @secure + */ + v3EpisodefileEditorUpdate = (data: EpisodeFileListResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/episodefile/editor`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags EpisodeFile + * @name V3EpisodefileBulkDelete + * @request DELETE:/api/v3/episodefile/bulk + * @secure + */ + v3EpisodefileBulkDelete = (data: EpisodeFileListResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/episodefile/bulk`, + method: "DELETE", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags EpisodeFile + * @name V3EpisodefileBulkUpdate + * @request PUT:/api/v3/episodefile/bulk + * @secure + */ + v3EpisodefileBulkUpdate = (data: EpisodeFileResource[], params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/episodefile/bulk`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags FileSystem + * @name V3FilesystemList + * @request GET:/api/v3/filesystem + * @secure + */ + v3FilesystemList = ( + query?: { + path?: string; + /** @default false */ + includeFiles?: boolean; + /** @default false */ + allowFoldersWithoutTrailingSlashes?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/filesystem`, + method: "GET", + query: query, + secure: true, + ...params, + }); + /** + * No description + * + * @tags FileSystem + * @name V3FilesystemTypeList + * @request GET:/api/v3/filesystem/type + * @secure + */ + v3FilesystemTypeList = ( + query?: { + path?: string; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/filesystem/type`, + method: "GET", + query: query, + secure: true, + ...params, + }); + /** + * No description + * + * @tags FileSystem + * @name V3FilesystemMediafilesList + * @request GET:/api/v3/filesystem/mediafiles + * @secure + */ + v3FilesystemMediafilesList = ( + query?: { + path?: string; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/filesystem/mediafiles`, + method: "GET", + query: query, + secure: true, + ...params, + }); + /** + * No description + * + * @tags Health + * @name V3HealthList + * @request GET:/api/v3/health + * @secure + */ + v3HealthList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/health`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags History + * @name V3HistoryList + * @request GET:/api/v3/history + * @secure + */ + v3HistoryList = ( + query?: { + /** + * @format int32 + * @default 1 + */ + page?: number; + /** + * @format int32 + * @default 10 + */ + pageSize?: number; + sortKey?: string; + sortDirection?: SortDirection; + includeSeries?: boolean; + includeEpisode?: boolean; + eventType?: number[]; + /** @format int32 */ + episodeId?: number; + downloadId?: string; + seriesIds?: number[]; + languages?: number[]; + quality?: number[]; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/history`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags History + * @name V3HistorySinceList + * @request GET:/api/v3/history/since + * @secure + */ + v3HistorySinceList = ( + query?: { + /** @format date-time */ + date?: string; + eventType?: EpisodeHistoryEventType; + /** @default false */ + includeSeries?: boolean; + /** @default false */ + includeEpisode?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/history/since`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags History + * @name V3HistorySeriesList + * @request GET:/api/v3/history/series + * @secure + */ + v3HistorySeriesList = ( + query?: { + /** @format int32 */ + seriesId?: number; + /** @format int32 */ + seasonNumber?: number; + eventType?: EpisodeHistoryEventType; + /** @default false */ + includeSeries?: boolean; + /** @default false */ + includeEpisode?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/history/series`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags History + * @name V3HistoryFailedCreate + * @request POST:/api/v3/history/failed/{id} + * @secure + */ + v3HistoryFailedCreate = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/history/failed/${id}`, + method: "POST", + secure: true, + ...params, + }); + /** + * No description + * + * @tags HostConfig + * @name V3ConfigHostList + * @request GET:/api/v3/config/host + * @secure + */ + v3ConfigHostList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/config/host`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags HostConfig + * @name V3ConfigHostUpdate + * @request PUT:/api/v3/config/host/{id} + * @secure + */ + v3ConfigHostUpdate = (id: string, data: HostConfigResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/config/host/${id}`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags HostConfig + * @name V3ConfigHostDetail + * @request GET:/api/v3/config/host/{id} + * @secure + */ + v3ConfigHostDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/config/host/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags ImportList + * @name V3ImportlistList + * @request GET:/api/v3/importlist + * @secure + */ + v3ImportlistList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/importlist`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags ImportList + * @name V3ImportlistCreate + * @request POST:/api/v3/importlist + * @secure + */ + v3ImportlistCreate = ( + data: ImportListResource, + query?: { + /** @default false */ + forceSave?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/importlist`, + method: "POST", + query: query, + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags ImportList + * @name V3ImportlistUpdate + * @request PUT:/api/v3/importlist/{id} + * @secure + */ + v3ImportlistUpdate = ( + id: number, + data: ImportListResource, + query?: { + /** @default false */ + forceSave?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/importlist/${id}`, + method: "PUT", + query: query, + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags ImportList + * @name V3ImportlistDelete + * @request DELETE:/api/v3/importlist/{id} + * @secure + */ + v3ImportlistDelete = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/importlist/${id}`, + method: "DELETE", + secure: true, + ...params, + }); + /** + * No description + * + * @tags ImportList + * @name V3ImportlistDetail + * @request GET:/api/v3/importlist/{id} + * @secure + */ + v3ImportlistDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/importlist/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags ImportList + * @name V3ImportlistBulkUpdate + * @request PUT:/api/v3/importlist/bulk + * @secure + */ + v3ImportlistBulkUpdate = (data: ImportListBulkResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/importlist/bulk`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags ImportList + * @name V3ImportlistBulkDelete + * @request DELETE:/api/v3/importlist/bulk + * @secure + */ + v3ImportlistBulkDelete = (data: ImportListBulkResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/importlist/bulk`, + method: "DELETE", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags ImportList + * @name V3ImportlistSchemaList + * @request GET:/api/v3/importlist/schema + * @secure + */ + v3ImportlistSchemaList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/importlist/schema`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags ImportList + * @name V3ImportlistTestCreate + * @request POST:/api/v3/importlist/test + * @secure + */ + v3ImportlistTestCreate = ( + data: ImportListResource, + query?: { + /** @default false */ + forceTest?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/importlist/test`, + method: "POST", + query: query, + body: data, + secure: true, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags ImportList + * @name V3ImportlistTestallCreate + * @request POST:/api/v3/importlist/testall + * @secure + */ + v3ImportlistTestallCreate = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/importlist/testall`, + method: "POST", + secure: true, + ...params, + }); + /** + * No description + * + * @tags ImportList + * @name V3ImportlistActionCreate + * @request POST:/api/v3/importlist/action/{name} + * @secure + */ + v3ImportlistActionCreate = (name: string, data: ImportListResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/importlist/action/${name}`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags ImportListConfig + * @name V3ConfigImportlistList + * @request GET:/api/v3/config/importlist + * @secure + */ + v3ConfigImportlistList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/config/importlist`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags ImportListConfig + * @name V3ConfigImportlistUpdate + * @request PUT:/api/v3/config/importlist/{id} + * @secure + */ + v3ConfigImportlistUpdate = (id: string, data: ImportListConfigResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/config/importlist/${id}`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags ImportListConfig + * @name V3ConfigImportlistDetail + * @request GET:/api/v3/config/importlist/{id} + * @secure + */ + v3ConfigImportlistDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/config/importlist/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags ImportListExclusion + * @name V3ImportlistexclusionList + * @request GET:/api/v3/importlistexclusion + * @deprecated + * @secure + */ + v3ImportlistexclusionList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/importlistexclusion`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags ImportListExclusion + * @name V3ImportlistexclusionCreate + * @request POST:/api/v3/importlistexclusion + * @secure + */ + v3ImportlistexclusionCreate = (data: ImportListExclusionResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/importlistexclusion`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags ImportListExclusion + * @name V3ImportlistexclusionPagedList + * @request GET:/api/v3/importlistexclusion/paged + * @secure + */ + v3ImportlistexclusionPagedList = ( + query?: { + /** + * @format int32 + * @default 1 + */ + page?: number; + /** + * @format int32 + * @default 10 + */ + pageSize?: number; + sortKey?: string; + sortDirection?: SortDirection; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/importlistexclusion/paged`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags ImportListExclusion + * @name V3ImportlistexclusionUpdate + * @request PUT:/api/v3/importlistexclusion/{id} + * @secure + */ + v3ImportlistexclusionUpdate = (id: string, data: ImportListExclusionResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/importlistexclusion/${id}`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags ImportListExclusion + * @name V3ImportlistexclusionDelete + * @request DELETE:/api/v3/importlistexclusion/{id} + * @secure + */ + v3ImportlistexclusionDelete = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/importlistexclusion/${id}`, + method: "DELETE", + secure: true, + ...params, + }); + /** + * No description + * + * @tags ImportListExclusion + * @name V3ImportlistexclusionDetail + * @request GET:/api/v3/importlistexclusion/{id} + * @secure + */ + v3ImportlistexclusionDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/importlistexclusion/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags ImportListExclusion + * @name V3ImportlistexclusionBulkDelete + * @request DELETE:/api/v3/importlistexclusion/bulk + * @secure + */ + v3ImportlistexclusionBulkDelete = (data: ImportListExclusionBulkResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/importlistexclusion/bulk`, + method: "DELETE", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags Indexer + * @name V3IndexerList + * @request GET:/api/v3/indexer + * @secure + */ + v3IndexerList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/indexer`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Indexer + * @name V3IndexerCreate + * @request POST:/api/v3/indexer + * @secure + */ + v3IndexerCreate = ( + data: IndexerResource, + query?: { + /** @default false */ + forceSave?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/indexer`, + method: "POST", + query: query, + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Indexer + * @name V3IndexerUpdate + * @request PUT:/api/v3/indexer/{id} + * @secure + */ + v3IndexerUpdate = ( + id: number, + data: IndexerResource, + query?: { + /** @default false */ + forceSave?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/indexer/${id}`, + method: "PUT", + query: query, + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Indexer + * @name V3IndexerDelete + * @request DELETE:/api/v3/indexer/{id} + * @secure + */ + v3IndexerDelete = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/indexer/${id}`, + method: "DELETE", + secure: true, + ...params, + }); + /** + * No description + * + * @tags Indexer + * @name V3IndexerDetail + * @request GET:/api/v3/indexer/{id} + * @secure + */ + v3IndexerDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/indexer/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Indexer + * @name V3IndexerBulkUpdate + * @request PUT:/api/v3/indexer/bulk + * @secure + */ + v3IndexerBulkUpdate = (data: IndexerBulkResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/indexer/bulk`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Indexer + * @name V3IndexerBulkDelete + * @request DELETE:/api/v3/indexer/bulk + * @secure + */ + v3IndexerBulkDelete = (data: IndexerBulkResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/indexer/bulk`, + method: "DELETE", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags Indexer + * @name V3IndexerSchemaList + * @request GET:/api/v3/indexer/schema + * @secure + */ + v3IndexerSchemaList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/indexer/schema`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Indexer + * @name V3IndexerTestCreate + * @request POST:/api/v3/indexer/test + * @secure + */ + v3IndexerTestCreate = ( + data: IndexerResource, + query?: { + /** @default false */ + forceTest?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/indexer/test`, + method: "POST", + query: query, + body: data, + secure: true, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags Indexer + * @name V3IndexerTestallCreate + * @request POST:/api/v3/indexer/testall + * @secure + */ + v3IndexerTestallCreate = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/indexer/testall`, + method: "POST", + secure: true, + ...params, + }); + /** + * No description + * + * @tags Indexer + * @name V3IndexerActionCreate + * @request POST:/api/v3/indexer/action/{name} + * @secure + */ + v3IndexerActionCreate = (name: string, data: IndexerResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/indexer/action/${name}`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags IndexerConfig + * @name V3ConfigIndexerList + * @request GET:/api/v3/config/indexer + * @secure + */ + v3ConfigIndexerList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/config/indexer`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags IndexerConfig + * @name V3ConfigIndexerUpdate + * @request PUT:/api/v3/config/indexer/{id} + * @secure + */ + v3ConfigIndexerUpdate = (id: string, data: IndexerConfigResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/config/indexer/${id}`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags IndexerConfig + * @name V3ConfigIndexerDetail + * @request GET:/api/v3/config/indexer/{id} + * @secure + */ + v3ConfigIndexerDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/config/indexer/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags IndexerFlag + * @name V3IndexerflagList + * @request GET:/api/v3/indexerflag + * @secure + */ + v3IndexerflagList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/indexerflag`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Language + * @name V3LanguageList + * @request GET:/api/v3/language + * @secure + */ + v3LanguageList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/language`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Language + * @name V3LanguageDetail + * @request GET:/api/v3/language/{id} + * @secure + */ + v3LanguageDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/language/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags LanguageProfile + * @name V3LanguageprofileCreate + * @request POST:/api/v3/languageprofile + * @deprecated + * @secure + */ + v3LanguageprofileCreate = (data: LanguageProfileResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/languageprofile`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags LanguageProfile + * @name V3LanguageprofileList + * @request GET:/api/v3/languageprofile + * @deprecated + * @secure + */ + v3LanguageprofileList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/languageprofile`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags LanguageProfile + * @name V3LanguageprofileDelete + * @request DELETE:/api/v3/languageprofile/{id} + * @deprecated + * @secure + */ + v3LanguageprofileDelete = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/languageprofile/${id}`, + method: "DELETE", + secure: true, + ...params, + }); + /** + * No description + * + * @tags LanguageProfile + * @name V3LanguageprofileUpdate + * @request PUT:/api/v3/languageprofile/{id} + * @deprecated + * @secure + */ + v3LanguageprofileUpdate = (id: string, data: LanguageProfileResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/languageprofile/${id}`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags LanguageProfile + * @name V3LanguageprofileDetail + * @request GET:/api/v3/languageprofile/{id} + * @secure + */ + v3LanguageprofileDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/languageprofile/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags LanguageProfileSchema + * @name V3LanguageprofileSchemaList + * @request GET:/api/v3/languageprofile/schema + * @deprecated + * @secure + */ + v3LanguageprofileSchemaList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/languageprofile/schema`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Localization + * @name V3LocalizationList + * @request GET:/api/v3/localization + * @secure + */ + v3LocalizationList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/localization`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Localization + * @name V3LocalizationLanguageList + * @request GET:/api/v3/localization/language + * @secure + */ + v3LocalizationLanguageList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/localization/language`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Localization + * @name V3LocalizationDetail + * @request GET:/api/v3/localization/{id} + * @secure + */ + v3LocalizationDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/localization/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Log + * @name V3LogList + * @request GET:/api/v3/log + * @secure + */ + v3LogList = ( + query?: { + /** + * @format int32 + * @default 1 + */ + page?: number; + /** + * @format int32 + * @default 10 + */ + pageSize?: number; + sortKey?: string; + sortDirection?: SortDirection; + level?: string; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/log`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags LogFile + * @name V3LogFileList + * @request GET:/api/v3/log/file + * @secure + */ + v3LogFileList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/log/file`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags LogFile + * @name V3LogFileDetail + * @request GET:/api/v3/log/file/{filename} + * @secure + */ + v3LogFileDetail = (filename: string, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/log/file/${filename}`, + method: "GET", + secure: true, + ...params, + }); + /** + * No description + * + * @tags ManualImport + * @name V3ManualimportList + * @request GET:/api/v3/manualimport + * @secure + */ + v3ManualimportList = ( + query?: { + folder?: string; + downloadId?: string; + /** @format int32 */ + seriesId?: number; + /** @format int32 */ + seasonNumber?: number; + /** @default true */ + filterExistingFiles?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/manualimport`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags ManualImport + * @name V3ManualimportCreate + * @request POST:/api/v3/manualimport + * @secure + */ + v3ManualimportCreate = (data: ManualImportReprocessResource[], params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/manualimport`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags MediaCover + * @name V3MediacoverDetail + * @request GET:/api/v3/mediacover/{seriesId}/{filename} + * @secure + */ + v3MediacoverDetail = (seriesId: number, filename: string, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/mediacover/${seriesId}/${filename}`, + method: "GET", + secure: true, + ...params, + }); + /** + * No description + * + * @tags MediaManagementConfig + * @name V3ConfigMediamanagementList + * @request GET:/api/v3/config/mediamanagement + * @secure + */ + v3ConfigMediamanagementList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/config/mediamanagement`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags MediaManagementConfig + * @name V3ConfigMediamanagementUpdate + * @request PUT:/api/v3/config/mediamanagement/{id} + * @secure + */ + v3ConfigMediamanagementUpdate = (id: string, data: MediaManagementConfigResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/config/mediamanagement/${id}`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags MediaManagementConfig + * @name V3ConfigMediamanagementDetail + * @request GET:/api/v3/config/mediamanagement/{id} + * @secure + */ + v3ConfigMediamanagementDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/config/mediamanagement/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Metadata + * @name V3MetadataList + * @request GET:/api/v3/metadata + * @secure + */ + v3MetadataList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/metadata`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Metadata + * @name V3MetadataCreate + * @request POST:/api/v3/metadata + * @secure + */ + v3MetadataCreate = ( + data: MetadataResource, + query?: { + /** @default false */ + forceSave?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/metadata`, + method: "POST", + query: query, + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Metadata + * @name V3MetadataUpdate + * @request PUT:/api/v3/metadata/{id} + * @secure + */ + v3MetadataUpdate = ( + id: number, + data: MetadataResource, + query?: { + /** @default false */ + forceSave?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/metadata/${id}`, + method: "PUT", + query: query, + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Metadata + * @name V3MetadataDelete + * @request DELETE:/api/v3/metadata/{id} + * @secure + */ + v3MetadataDelete = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/metadata/${id}`, + method: "DELETE", + secure: true, + ...params, + }); + /** + * No description + * + * @tags Metadata + * @name V3MetadataDetail + * @request GET:/api/v3/metadata/{id} + * @secure + */ + v3MetadataDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/metadata/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Metadata + * @name V3MetadataSchemaList + * @request GET:/api/v3/metadata/schema + * @secure + */ + v3MetadataSchemaList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/metadata/schema`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Metadata + * @name V3MetadataTestCreate + * @request POST:/api/v3/metadata/test + * @secure + */ + v3MetadataTestCreate = ( + data: MetadataResource, + query?: { + /** @default false */ + forceTest?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/metadata/test`, + method: "POST", + query: query, + body: data, + secure: true, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags Metadata + * @name V3MetadataTestallCreate + * @request POST:/api/v3/metadata/testall + * @secure + */ + v3MetadataTestallCreate = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/metadata/testall`, + method: "POST", + secure: true, + ...params, + }); + /** + * No description + * + * @tags Metadata + * @name V3MetadataActionCreate + * @request POST:/api/v3/metadata/action/{name} + * @secure + */ + v3MetadataActionCreate = (name: string, data: MetadataResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/metadata/action/${name}`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags Missing + * @name V3WantedMissingList + * @request GET:/api/v3/wanted/missing + * @secure + */ + v3WantedMissingList = ( + query?: { + /** + * @format int32 + * @default 1 + */ + page?: number; + /** + * @format int32 + * @default 10 + */ + pageSize?: number; + sortKey?: string; + sortDirection?: SortDirection; + /** @default false */ + includeSeries?: boolean; + /** @default false */ + includeImages?: boolean; + /** @default true */ + monitored?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/wanted/missing`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Missing + * @name V3WantedMissingDetail + * @request GET:/api/v3/wanted/missing/{id} + * @secure + */ + v3WantedMissingDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/wanted/missing/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags NamingConfig + * @name V3ConfigNamingList + * @request GET:/api/v3/config/naming + * @secure + */ + v3ConfigNamingList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/config/naming`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags NamingConfig + * @name V3ConfigNamingUpdate + * @request PUT:/api/v3/config/naming/{id} + * @secure + */ + v3ConfigNamingUpdate = (id: string, data: NamingConfigResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/config/naming/${id}`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags NamingConfig + * @name V3ConfigNamingDetail + * @request GET:/api/v3/config/naming/{id} + * @secure + */ + v3ConfigNamingDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/config/naming/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags NamingConfig + * @name V3ConfigNamingExamplesList + * @request GET:/api/v3/config/naming/examples + * @secure + */ + v3ConfigNamingExamplesList = ( + query?: { + renameEpisodes?: boolean; + replaceIllegalCharacters?: boolean; + /** @format int32 */ + colonReplacementFormat?: number; + customColonReplacementFormat?: string; + /** @format int32 */ + multiEpisodeStyle?: number; + standardEpisodeFormat?: string; + dailyEpisodeFormat?: string; + animeEpisodeFormat?: string; + seriesFolderFormat?: string; + seasonFolderFormat?: string; + specialsFolderFormat?: string; + /** @format int32 */ + id?: number; + resourceName?: string; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/config/naming/examples`, + method: "GET", + query: query, + secure: true, + ...params, + }); + /** + * No description + * + * @tags Notification + * @name V3NotificationList + * @request GET:/api/v3/notification + * @secure + */ + v3NotificationList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/notification`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Notification + * @name V3NotificationCreate + * @request POST:/api/v3/notification + * @secure + */ + v3NotificationCreate = ( + data: NotificationResource, + query?: { + /** @default false */ + forceSave?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/notification`, + method: "POST", + query: query, + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Notification + * @name V3NotificationUpdate + * @request PUT:/api/v3/notification/{id} + * @secure + */ + v3NotificationUpdate = ( + id: number, + data: NotificationResource, + query?: { + /** @default false */ + forceSave?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/notification/${id}`, + method: "PUT", + query: query, + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Notification + * @name V3NotificationDelete + * @request DELETE:/api/v3/notification/{id} + * @secure + */ + v3NotificationDelete = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/notification/${id}`, + method: "DELETE", + secure: true, + ...params, + }); + /** + * No description + * + * @tags Notification + * @name V3NotificationDetail + * @request GET:/api/v3/notification/{id} + * @secure + */ + v3NotificationDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/notification/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Notification + * @name V3NotificationSchemaList + * @request GET:/api/v3/notification/schema + * @secure + */ + v3NotificationSchemaList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/notification/schema`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Notification + * @name V3NotificationTestCreate + * @request POST:/api/v3/notification/test + * @secure + */ + v3NotificationTestCreate = ( + data: NotificationResource, + query?: { + /** @default false */ + forceTest?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/notification/test`, + method: "POST", + query: query, + body: data, + secure: true, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags Notification + * @name V3NotificationTestallCreate + * @request POST:/api/v3/notification/testall + * @secure + */ + v3NotificationTestallCreate = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/notification/testall`, + method: "POST", + secure: true, + ...params, + }); + /** + * No description + * + * @tags Notification + * @name V3NotificationActionCreate + * @request POST:/api/v3/notification/action/{name} + * @secure + */ + v3NotificationActionCreate = (name: string, data: NotificationResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/notification/action/${name}`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags Parse + * @name V3ParseList + * @request GET:/api/v3/parse + * @secure + */ + v3ParseList = ( + query?: { + title?: string; + path?: string; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/parse`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags QualityDefinition + * @name V3QualitydefinitionUpdate + * @request PUT:/api/v3/qualitydefinition/{id} + * @secure + */ + v3QualitydefinitionUpdate = (id: string, data: QualityDefinitionResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/qualitydefinition/${id}`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags QualityDefinition + * @name V3QualitydefinitionDetail + * @request GET:/api/v3/qualitydefinition/{id} + * @secure + */ + v3QualitydefinitionDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/qualitydefinition/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags QualityDefinition + * @name V3QualitydefinitionList + * @request GET:/api/v3/qualitydefinition + * @secure + */ + v3QualitydefinitionList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/qualitydefinition`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags QualityDefinition + * @name V3QualitydefinitionUpdateUpdate + * @request PUT:/api/v3/qualitydefinition/update + * @secure + */ + v3QualitydefinitionUpdateUpdate = (data: QualityDefinitionResource[], params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/qualitydefinition/update`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags QualityDefinition + * @name V3QualitydefinitionLimitsList + * @request GET:/api/v3/qualitydefinition/limits + * @secure + */ + v3QualitydefinitionLimitsList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/qualitydefinition/limits`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags QualityProfile + * @name V3QualityprofileCreate + * @request POST:/api/v3/qualityprofile + * @secure + */ + v3QualityprofileCreate = (data: QualityProfileResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/qualityprofile`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags QualityProfile + * @name V3QualityprofileList + * @request GET:/api/v3/qualityprofile + * @secure + */ + v3QualityprofileList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/qualityprofile`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags QualityProfile + * @name V3QualityprofileDelete + * @request DELETE:/api/v3/qualityprofile/{id} + * @secure + */ + v3QualityprofileDelete = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/qualityprofile/${id}`, + method: "DELETE", + secure: true, + ...params, + }); + /** + * No description + * + * @tags QualityProfile + * @name V3QualityprofileUpdate + * @request PUT:/api/v3/qualityprofile/{id} + * @secure + */ + v3QualityprofileUpdate = (id: string, data: QualityProfileResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/qualityprofile/${id}`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags QualityProfile + * @name V3QualityprofileDetail + * @request GET:/api/v3/qualityprofile/{id} + * @secure + */ + v3QualityprofileDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/qualityprofile/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags QualityProfileSchema + * @name V3QualityprofileSchemaList + * @request GET:/api/v3/qualityprofile/schema + * @secure + */ + v3QualityprofileSchemaList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/qualityprofile/schema`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Queue + * @name V3QueueDelete + * @request DELETE:/api/v3/queue/{id} + * @secure + */ + v3QueueDelete = ( + id: number, + query?: { + /** @default true */ + removeFromClient?: boolean; + /** @default false */ + blocklist?: boolean; + /** @default false */ + skipRedownload?: boolean; + /** @default false */ + changeCategory?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/queue/${id}`, + method: "DELETE", + query: query, + secure: true, + ...params, + }); + /** + * No description + * + * @tags Queue + * @name V3QueueBulkDelete + * @request DELETE:/api/v3/queue/bulk + * @secure + */ + v3QueueBulkDelete = ( + data: QueueBulkResource, + query?: { + /** @default true */ + removeFromClient?: boolean; + /** @default false */ + blocklist?: boolean; + /** @default false */ + skipRedownload?: boolean; + /** @default false */ + changeCategory?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/queue/bulk`, + method: "DELETE", + query: query, + body: data, + secure: true, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags Queue + * @name V3QueueList + * @request GET:/api/v3/queue + * @secure + */ + v3QueueList = ( + query?: { + /** + * @format int32 + * @default 1 + */ + page?: number; + /** + * @format int32 + * @default 10 + */ + pageSize?: number; + sortKey?: string; + sortDirection?: SortDirection; + /** @default false */ + includeUnknownSeriesItems?: boolean; + /** @default false */ + includeSeries?: boolean; + /** @default false */ + includeEpisode?: boolean; + seriesIds?: number[]; + protocol?: DownloadProtocol; + languages?: number[]; + /** @format int32 */ + quality?: number; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/queue`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags QueueAction + * @name V3QueueGrabCreate + * @request POST:/api/v3/queue/grab/{id} + * @secure + */ + v3QueueGrabCreate = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/queue/grab/${id}`, + method: "POST", + secure: true, + ...params, + }); + /** + * No description + * + * @tags QueueAction + * @name V3QueueGrabBulkCreate + * @request POST:/api/v3/queue/grab/bulk + * @secure + */ + v3QueueGrabBulkCreate = (data: QueueBulkResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/queue/grab/bulk`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags QueueDetails + * @name V3QueueDetailsList + * @request GET:/api/v3/queue/details + * @secure + */ + v3QueueDetailsList = ( + query?: { + /** @format int32 */ + seriesId?: number; + episodeIds?: number[]; + /** @default false */ + includeSeries?: boolean; + /** @default false */ + includeEpisode?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/queue/details`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags QueueStatus + * @name V3QueueStatusList + * @request GET:/api/v3/queue/status + * @secure + */ + v3QueueStatusList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/queue/status`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Release + * @name V3ReleaseCreate + * @request POST:/api/v3/release + * @secure + */ + v3ReleaseCreate = (data: ReleaseResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/release`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags Release + * @name V3ReleaseList + * @request GET:/api/v3/release + * @secure + */ + v3ReleaseList = ( + query?: { + /** @format int32 */ + seriesId?: number; + /** @format int32 */ + episodeId?: number; + /** @format int32 */ + seasonNumber?: number; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/release`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags ReleaseProfile + * @name V3ReleaseprofileCreate + * @request POST:/api/v3/releaseprofile + * @secure + */ + v3ReleaseprofileCreate = (data: ReleaseProfileResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/releaseprofile`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags ReleaseProfile + * @name V3ReleaseprofileList + * @request GET:/api/v3/releaseprofile + * @secure + */ + v3ReleaseprofileList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/releaseprofile`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags ReleaseProfile + * @name V3ReleaseprofileDelete + * @request DELETE:/api/v3/releaseprofile/{id} + * @secure + */ + v3ReleaseprofileDelete = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/releaseprofile/${id}`, + method: "DELETE", + secure: true, + ...params, + }); + /** + * No description + * + * @tags ReleaseProfile + * @name V3ReleaseprofileUpdate + * @request PUT:/api/v3/releaseprofile/{id} + * @secure + */ + v3ReleaseprofileUpdate = (id: string, data: ReleaseProfileResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/releaseprofile/${id}`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags ReleaseProfile + * @name V3ReleaseprofileDetail + * @request GET:/api/v3/releaseprofile/{id} + * @secure + */ + v3ReleaseprofileDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/releaseprofile/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags ReleasePush + * @name V3ReleasePushCreate + * @request POST:/api/v3/release/push + * @secure + */ + v3ReleasePushCreate = (data: ReleaseResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/release/push`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags RemotePathMapping + * @name V3RemotepathmappingCreate + * @request POST:/api/v3/remotepathmapping + * @secure + */ + v3RemotepathmappingCreate = (data: RemotePathMappingResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/remotepathmapping`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags RemotePathMapping + * @name V3RemotepathmappingList + * @request GET:/api/v3/remotepathmapping + * @secure + */ + v3RemotepathmappingList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/remotepathmapping`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags RemotePathMapping + * @name V3RemotepathmappingDelete + * @request DELETE:/api/v3/remotepathmapping/{id} + * @secure + */ + v3RemotepathmappingDelete = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/remotepathmapping/${id}`, + method: "DELETE", + secure: true, + ...params, + }); + /** + * No description + * + * @tags RemotePathMapping + * @name V3RemotepathmappingUpdate + * @request PUT:/api/v3/remotepathmapping/{id} + * @secure + */ + v3RemotepathmappingUpdate = (id: string, data: RemotePathMappingResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/remotepathmapping/${id}`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags RemotePathMapping + * @name V3RemotepathmappingDetail + * @request GET:/api/v3/remotepathmapping/{id} + * @secure + */ + v3RemotepathmappingDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/remotepathmapping/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags RenameEpisode + * @name V3RenameList + * @request GET:/api/v3/rename + * @secure + */ + v3RenameList = ( + query?: { + /** @format int32 */ + seriesId?: number; + /** @format int32 */ + seasonNumber?: number; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/rename`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags RootFolder + * @name V3RootfolderCreate + * @request POST:/api/v3/rootfolder + * @secure + */ + v3RootfolderCreate = (data: RootFolderResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/rootfolder`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags RootFolder + * @name V3RootfolderList + * @request GET:/api/v3/rootfolder + * @secure + */ + v3RootfolderList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/rootfolder`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags RootFolder + * @name V3RootfolderDelete + * @request DELETE:/api/v3/rootfolder/{id} + * @secure + */ + v3RootfolderDelete = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/rootfolder/${id}`, + method: "DELETE", + secure: true, + ...params, + }); + /** + * No description + * + * @tags RootFolder + * @name V3RootfolderDetail + * @request GET:/api/v3/rootfolder/{id} + * @secure + */ + v3RootfolderDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/rootfolder/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags SeasonPass + * @name V3SeasonpassCreate + * @request POST:/api/v3/seasonpass + * @secure + */ + v3SeasonpassCreate = (data: SeasonPassResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/seasonpass`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags Series + * @name V3SeriesList + * @request GET:/api/v3/series + * @secure + */ + v3SeriesList = ( + query?: { + /** @format int32 */ + tvdbId?: number; + /** @default false */ + includeSeasonImages?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/series`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Series + * @name V3SeriesCreate + * @request POST:/api/v3/series + * @secure + */ + v3SeriesCreate = (data: SeriesResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/series`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Series + * @name V3SeriesDetail + * @request GET:/api/v3/series/{id} + * @secure + */ + v3SeriesDetail = ( + id: number, + query?: { + /** @default false */ + includeSeasonImages?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/series/${id}`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Series + * @name V3SeriesUpdate + * @request PUT:/api/v3/series/{id} + * @secure + */ + v3SeriesUpdate = ( + id: string, + data: SeriesResource, + query?: { + /** @default false */ + moveFiles?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/series/${id}`, + method: "PUT", + query: query, + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Series + * @name V3SeriesDelete + * @request DELETE:/api/v3/series/{id} + * @secure + */ + v3SeriesDelete = ( + id: number, + query?: { + /** @default false */ + deleteFiles?: boolean; + /** @default false */ + addImportListExclusion?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/series/${id}`, + method: "DELETE", + query: query, + secure: true, + ...params, + }); + /** + * No description + * + * @tags SeriesEditor + * @name V3SeriesEditorUpdate + * @request PUT:/api/v3/series/editor + * @secure + */ + v3SeriesEditorUpdate = (data: SeriesEditorResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/series/editor`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags SeriesEditor + * @name V3SeriesEditorDelete + * @request DELETE:/api/v3/series/editor + * @secure + */ + v3SeriesEditorDelete = (data: SeriesEditorResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/series/editor`, + method: "DELETE", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags SeriesImport + * @name V3SeriesImportCreate + * @request POST:/api/v3/series/import + * @secure + */ + v3SeriesImportCreate = (data: SeriesResource[], params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/series/import`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags SeriesLookup + * @name V3SeriesLookupList + * @request GET:/api/v3/series/lookup + * @secure + */ + v3SeriesLookupList = ( + query?: { + term?: string; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v3/series/lookup`, + method: "GET", + query: query, + secure: true, + ...params, + }); + /** + * No description + * + * @tags System + * @name V3SystemStatusList + * @request GET:/api/v3/system/status + * @secure + */ + v3SystemStatusList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/system/status`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags System + * @name V3SystemRoutesList + * @request GET:/api/v3/system/routes + * @secure + */ + v3SystemRoutesList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/system/routes`, + method: "GET", + secure: true, + ...params, + }); + /** + * No description + * + * @tags System + * @name V3SystemRoutesDuplicateList + * @request GET:/api/v3/system/routes/duplicate + * @secure + */ + v3SystemRoutesDuplicateList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/system/routes/duplicate`, + method: "GET", + secure: true, + ...params, + }); + /** + * No description + * + * @tags System + * @name V3SystemShutdownCreate + * @request POST:/api/v3/system/shutdown + * @secure + */ + v3SystemShutdownCreate = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/system/shutdown`, + method: "POST", + secure: true, + ...params, + }); + /** + * No description + * + * @tags System + * @name V3SystemRestartCreate + * @request POST:/api/v3/system/restart + * @secure + */ + v3SystemRestartCreate = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/system/restart`, + method: "POST", + secure: true, + ...params, + }); + /** + * No description + * + * @tags Tag + * @name V3TagList + * @request GET:/api/v3/tag + * @secure + */ + v3TagList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/tag`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Tag + * @name V3TagCreate + * @request POST:/api/v3/tag + * @secure + */ + v3TagCreate = (data: TagResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/tag`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Tag + * @name V3TagUpdate + * @request PUT:/api/v3/tag/{id} + * @secure + */ + v3TagUpdate = (id: string, data: TagResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/tag/${id}`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Tag + * @name V3TagDelete + * @request DELETE:/api/v3/tag/{id} + * @secure + */ + v3TagDelete = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/tag/${id}`, + method: "DELETE", + secure: true, + ...params, + }); + /** + * No description + * + * @tags Tag + * @name V3TagDetail + * @request GET:/api/v3/tag/{id} + * @secure + */ + v3TagDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/tag/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags TagDetails + * @name V3TagDetailList + * @request GET:/api/v3/tag/detail + * @secure + */ + v3TagDetailList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/tag/detail`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags TagDetails + * @name V3TagDetailDetail + * @request GET:/api/v3/tag/detail/{id} + * @secure + */ + v3TagDetailDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/tag/detail/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Task + * @name V3SystemTaskList + * @request GET:/api/v3/system/task + * @secure + */ + v3SystemTaskList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/system/task`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Task + * @name V3SystemTaskDetail + * @request GET:/api/v3/system/task/{id} + * @secure + */ + v3SystemTaskDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/system/task/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags UiConfig + * @name V3ConfigUiUpdate + * @request PUT:/api/v3/config/ui/{id} + * @secure + */ + v3ConfigUiUpdate = (id: string, data: UiConfigResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/config/ui/${id}`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags UiConfig + * @name V3ConfigUiDetail + * @request GET:/api/v3/config/ui/{id} + * @secure + */ + v3ConfigUiDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/config/ui/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags UiConfig + * @name V3ConfigUiList + * @request GET:/api/v3/config/ui + * @secure + */ + v3ConfigUiList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/config/ui`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Update + * @name V3UpdateList + * @request GET:/api/v3/update + * @secure + */ + v3UpdateList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/update`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags UpdateLogFile + * @name V3LogFileUpdateList + * @request GET:/api/v3/log/file/update + * @secure + */ + v3LogFileUpdateList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/log/file/update`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags UpdateLogFile + * @name V3LogFileUpdateDetail + * @request GET:/api/v3/log/file/update/{filename} + * @secure + */ + v3LogFileUpdateDetail = (filename: string, params: RequestParams = {}) => + this.http.request({ + path: `/api/v3/log/file/update/${filename}`, + method: "GET", + secure: true, + ...params, + }); +} diff --git a/src/__generated__/sonarr/Content.ts b/src/__generated__/sonarr/Content.ts new file mode 100644 index 0000000..e62a80c --- /dev/null +++ b/src/__generated__/sonarr/Content.ts @@ -0,0 +1,36 @@ +/* eslint-disable */ +/* tslint:disable */ +/* + * --------------------------------------------------------------- + * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## + * ## ## + * ## AUTHOR: acacode ## + * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## + * --------------------------------------------------------------- + */ + +import { HttpClient, RequestParams } from "./../ky-client"; + +export class Content { + http: HttpClient; + + constructor(http: HttpClient) { + this.http = http; + } + + /** + * No description + * + * @tags StaticResource + * @name ContentDetail + * @request GET:/content/{path} + * @secure + */ + contentDetail = (path: string, params: RequestParams = {}) => + this.http.request({ + path: `/content/${path}`, + method: "GET", + secure: true, + ...params, + }); +} diff --git a/src/__generated__/sonarr/Feed.ts b/src/__generated__/sonarr/Feed.ts new file mode 100644 index 0000000..cf21a4c --- /dev/null +++ b/src/__generated__/sonarr/Feed.ts @@ -0,0 +1,59 @@ +/* eslint-disable */ +/* tslint:disable */ +/* + * --------------------------------------------------------------- + * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## + * ## ## + * ## AUTHOR: acacode ## + * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## + * --------------------------------------------------------------- + */ + +import { HttpClient, RequestParams } from "./../ky-client"; + +export class Feed { + http: HttpClient; + + constructor(http: HttpClient) { + this.http = http; + } + + /** + * No description + * + * @tags CalendarFeed + * @name V3CalendarSonarrIcsList + * @request GET:/feed/v3/calendar/sonarr.ics + * @secure + */ + v3CalendarSonarrIcsList = ( + query?: { + /** + * @format int32 + * @default 7 + */ + pastDays?: number; + /** + * @format int32 + * @default 28 + */ + futureDays?: number; + /** @default "" */ + tags?: string; + /** @default false */ + unmonitored?: boolean; + /** @default false */ + premieresOnly?: boolean; + /** @default false */ + asAllDay?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/feed/v3/calendar/sonarr.ics`, + method: "GET", + query: query, + secure: true, + ...params, + }); +} diff --git a/src/__generated__/sonarr/Login.ts b/src/__generated__/sonarr/Login.ts new file mode 100644 index 0000000..d8653c4 --- /dev/null +++ b/src/__generated__/sonarr/Login.ts @@ -0,0 +1,64 @@ +/* eslint-disable */ +/* tslint:disable */ +/* + * --------------------------------------------------------------- + * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## + * ## ## + * ## AUTHOR: acacode ## + * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## + * --------------------------------------------------------------- + */ + +import { ContentType, HttpClient, RequestParams } from "./../ky-client"; + +export class Login { + http: HttpClient; + + constructor(http: HttpClient) { + this.http = http; + } + + /** + * No description + * + * @tags Authentication + * @name LoginCreate + * @request POST:/login + * @secure + */ + loginCreate = ( + data: { + username?: string; + password?: string; + rememberMe?: string; + }, + query?: { + returnUrl?: string; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/login`, + method: "POST", + query: query, + body: data, + secure: true, + type: ContentType.FormData, + ...params, + }); + /** + * No description + * + * @tags StaticResource + * @name LoginList + * @request GET:/login + * @secure + */ + loginList = (params: RequestParams = {}) => + this.http.request({ + path: `/login`, + method: "GET", + secure: true, + ...params, + }); +} diff --git a/src/__generated__/sonarr/Logout.ts b/src/__generated__/sonarr/Logout.ts new file mode 100644 index 0000000..1d6bd02 --- /dev/null +++ b/src/__generated__/sonarr/Logout.ts @@ -0,0 +1,36 @@ +/* eslint-disable */ +/* tslint:disable */ +/* + * --------------------------------------------------------------- + * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## + * ## ## + * ## AUTHOR: acacode ## + * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## + * --------------------------------------------------------------- + */ + +import { HttpClient, RequestParams } from "./../ky-client"; + +export class Logout { + http: HttpClient; + + constructor(http: HttpClient) { + this.http = http; + } + + /** + * No description + * + * @tags Authentication + * @name LogoutList + * @request GET:/logout + * @secure + */ + logoutList = (params: RequestParams = {}) => + this.http.request({ + path: `/logout`, + method: "GET", + secure: true, + ...params, + }); +} diff --git a/src/__generated__/sonarr/Path.ts b/src/__generated__/sonarr/Path.ts new file mode 100644 index 0000000..0a306be --- /dev/null +++ b/src/__generated__/sonarr/Path.ts @@ -0,0 +1,36 @@ +/* eslint-disable */ +/* tslint:disable */ +/* + * --------------------------------------------------------------- + * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## + * ## ## + * ## AUTHOR: acacode ## + * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## + * --------------------------------------------------------------- + */ + +import { HttpClient, RequestParams } from "./../ky-client"; + +export class Path { + http: HttpClient; + + constructor(http: HttpClient) { + this.http = http; + } + + /** + * No description + * + * @tags StaticResource + * @name GetPath + * @request GET:/{path} + * @secure + */ + getPath = (path: string, params: RequestParams = {}) => + this.http.request({ + path: `/${path}`, + method: "GET", + secure: true, + ...params, + }); +} diff --git a/src/__generated__/sonarr/Ping.ts b/src/__generated__/sonarr/Ping.ts new file mode 100644 index 0000000..556eb9d --- /dev/null +++ b/src/__generated__/sonarr/Ping.ts @@ -0,0 +1,54 @@ +/* eslint-disable */ +/* tslint:disable */ +/* + * --------------------------------------------------------------- + * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## + * ## ## + * ## AUTHOR: acacode ## + * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## + * --------------------------------------------------------------- + */ + +import { HttpClient, RequestParams } from "./../ky-client"; +import { PingResource } from "./data-contracts"; + +export class Ping { + http: HttpClient; + + constructor(http: HttpClient) { + this.http = http; + } + + /** + * No description + * + * @tags Ping + * @name PingList + * @request GET:/ping + * @secure + */ + pingList = (params: RequestParams = {}) => + this.http.request({ + path: `/ping`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Ping + * @name HeadPing + * @request HEAD:/ping + * @secure + */ + headPing = (params: RequestParams = {}) => + this.http.request({ + path: `/ping`, + method: "HEAD", + secure: true, + format: "json", + ...params, + }); +} diff --git a/src/__generated__/sonarr/data-contracts.ts b/src/__generated__/sonarr/data-contracts.ts new file mode 100644 index 0000000..e3de0c7 --- /dev/null +++ b/src/__generated__/sonarr/data-contracts.ts @@ -0,0 +1,1757 @@ +/* eslint-disable */ +/* tslint:disable */ +/* + * --------------------------------------------------------------- + * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## + * ## ## + * ## AUTHOR: acacode ## + * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## + * --------------------------------------------------------------- + */ + +export interface AddSeriesOptions { + ignoreEpisodesWithFiles?: boolean; + ignoreEpisodesWithoutFiles?: boolean; + monitor?: MonitorTypes; + searchForMissingEpisodes?: boolean; + searchForCutoffUnmetEpisodes?: boolean; +} + +export interface AlternateTitleResource { + title?: string | null; + /** @format int32 */ + seasonNumber?: number | null; + /** @format int32 */ + sceneSeasonNumber?: number | null; + sceneOrigin?: string | null; + comment?: string | null; +} + +export enum ApplyTags { + Add = "add", + Remove = "remove", + Replace = "replace", +} + +export enum AuthenticationRequiredType { + Enabled = "enabled", + DisabledForLocalAddresses = "disabledForLocalAddresses", +} + +export enum AuthenticationType { + None = "none", + Basic = "basic", + Forms = "forms", + External = "external", +} + +export interface AutoTaggingResource { + /** @format int32 */ + id?: number; + name?: string | null; + removeTagsAutomatically?: boolean; + /** @uniqueItems true */ + tags?: number[] | null; + specifications?: AutoTaggingSpecificationSchema[] | null; +} + +export interface AutoTaggingSpecificationSchema { + /** @format int32 */ + id?: number; + name?: string | null; + implementation?: string | null; + implementationName?: string | null; + negate?: boolean; + required?: boolean; + fields?: Field[] | null; +} + +export interface BackupResource { + /** @format int32 */ + id?: number; + name?: string | null; + path?: string | null; + type?: BackupType; + /** @format int64 */ + size?: number; + /** @format date-time */ + time?: string; +} + +export enum BackupType { + Scheduled = "scheduled", + Manual = "manual", + Update = "update", +} + +export interface BlocklistBulkResource { + ids?: number[] | null; +} + +export interface BlocklistResource { + /** @format int32 */ + id?: number; + /** @format int32 */ + seriesId?: number; + episodeIds?: number[] | null; + sourceTitle?: string | null; + languages?: Language[] | null; + quality?: QualityModel; + customFormats?: CustomFormatResource[] | null; + /** @format date-time */ + date?: string; + protocol?: DownloadProtocol; + indexer?: string | null; + message?: string | null; + series?: SeriesResource; +} + +export interface BlocklistResourcePagingResource { + /** @format int32 */ + page?: number; + /** @format int32 */ + pageSize?: number; + sortKey?: string | null; + sortDirection?: SortDirection; + /** @format int32 */ + totalRecords?: number; + records?: BlocklistResource[] | null; +} + +export enum CertificateValidationType { + Enabled = "enabled", + DisabledForLocalAddresses = "disabledForLocalAddresses", + Disabled = "disabled", +} + +export interface Command { + sendUpdatesToClient?: boolean; + updateScheduledTask?: boolean; + completionMessage?: string | null; + requiresDiskAccess?: boolean; + isExclusive?: boolean; + isLongRunning?: boolean; + name?: string | null; + /** @format date-time */ + lastExecutionTime?: string | null; + /** @format date-time */ + lastStartTime?: string | null; + trigger?: CommandTrigger; + suppressMessages?: boolean; + clientUserAgent?: string | null; +} + +export enum CommandPriority { + Normal = "normal", + High = "high", + Low = "low", +} + +export interface CommandResource { + /** @format int32 */ + id?: number; + name?: string | null; + commandName?: string | null; + message?: string | null; + body?: Command; + priority?: CommandPriority; + status?: CommandStatus; + result?: CommandResult; + /** @format date-time */ + queued?: string; + /** @format date-time */ + started?: string | null; + /** @format date-time */ + ended?: string | null; + /** @format date-span */ + duration?: string | null; + exception?: string | null; + trigger?: CommandTrigger; + clientUserAgent?: string | null; + /** @format date-time */ + stateChangeTime?: string | null; + sendUpdatesToClient?: boolean; + updateScheduledTask?: boolean; + /** @format date-time */ + lastExecutionTime?: string | null; +} + +export enum CommandResult { + Unknown = "unknown", + Successful = "successful", + Unsuccessful = "unsuccessful", +} + +export enum CommandStatus { + Queued = "queued", + Started = "started", + Completed = "completed", + Failed = "failed", + Aborted = "aborted", + Cancelled = "cancelled", + Orphaned = "orphaned", +} + +export enum CommandTrigger { + Unspecified = "unspecified", + Manual = "manual", + Scheduled = "scheduled", +} + +export interface CustomFilterResource { + /** @format int32 */ + id?: number; + type?: string | null; + label?: string | null; + filters?: Record[] | null; +} + +export interface CustomFormatBulkResource { + /** @uniqueItems true */ + ids?: number[] | null; + includeCustomFormatWhenRenaming?: boolean | null; +} + +export interface CustomFormatResource { + /** @format int32 */ + id?: number; + name?: string | null; + includeCustomFormatWhenRenaming?: boolean | null; + specifications?: CustomFormatSpecificationSchema[] | null; +} + +export interface CustomFormatSpecificationSchema { + /** @format int32 */ + id?: number; + name?: string | null; + implementation?: string | null; + implementationName?: string | null; + infoLink?: string | null; + negate?: boolean; + required?: boolean; + fields?: Field[] | null; + presets?: CustomFormatSpecificationSchema[] | null; +} + +export enum DatabaseType { + SqLite = "sqLite", + PostgreSQL = "postgreSQL", +} + +export interface DelayProfileResource { + /** @format int32 */ + id?: number; + enableUsenet?: boolean; + enableTorrent?: boolean; + preferredProtocol?: DownloadProtocol; + /** @format int32 */ + usenetDelay?: number; + /** @format int32 */ + torrentDelay?: number; + bypassIfHighestQuality?: boolean; + bypassIfAboveCustomFormatScore?: boolean; + /** @format int32 */ + minimumCustomFormatScore?: number; + /** @format int32 */ + order?: number; + /** @uniqueItems true */ + tags?: number[] | null; +} + +export interface DiskSpaceResource { + /** @format int32 */ + id?: number; + path?: string | null; + label?: string | null; + /** @format int64 */ + freeSpace?: number; + /** @format int64 */ + totalSpace?: number; +} + +export interface DownloadClientBulkResource { + ids?: number[] | null; + tags?: number[] | null; + applyTags?: ApplyTags; + enable?: boolean | null; + /** @format int32 */ + priority?: number | null; + removeCompletedDownloads?: boolean | null; + removeFailedDownloads?: boolean | null; +} + +export interface DownloadClientConfigResource { + /** @format int32 */ + id?: number; + downloadClientWorkingFolders?: string | null; + enableCompletedDownloadHandling?: boolean; + autoRedownloadFailed?: boolean; + autoRedownloadFailedFromInteractiveSearch?: boolean; +} + +export interface DownloadClientResource { + /** @format int32 */ + id?: number; + name?: string | null; + fields?: Field[] | null; + implementationName?: string | null; + implementation?: string | null; + configContract?: string | null; + infoLink?: string | null; + message?: ProviderMessage; + /** @uniqueItems true */ + tags?: number[] | null; + presets?: DownloadClientResource[] | null; + enable?: boolean; + protocol?: DownloadProtocol; + /** @format int32 */ + priority?: number; + removeCompletedDownloads?: boolean; + removeFailedDownloads?: boolean; +} + +export enum DownloadProtocol { + Unknown = "unknown", + Usenet = "usenet", + Torrent = "torrent", +} + +export interface EpisodeFileListResource { + episodeFileIds?: number[] | null; + languages?: Language[] | null; + quality?: QualityModel; + sceneName?: string | null; + releaseGroup?: string | null; +} + +export interface EpisodeFileResource { + /** @format int32 */ + id?: number; + /** @format int32 */ + seriesId?: number; + /** @format int32 */ + seasonNumber?: number; + relativePath?: string | null; + path?: string | null; + /** @format int64 */ + size?: number; + /** @format date-time */ + dateAdded?: string; + sceneName?: string | null; + releaseGroup?: string | null; + languages?: Language[] | null; + quality?: QualityModel; + customFormats?: CustomFormatResource[] | null; + /** @format int32 */ + customFormatScore?: number; + /** @format int32 */ + indexerFlags?: number | null; + releaseType?: ReleaseType; + mediaInfo?: MediaInfoResource; + qualityCutoffNotMet?: boolean; +} + +export enum EpisodeHistoryEventType { + Unknown = "unknown", + Grabbed = "grabbed", + SeriesFolderImported = "seriesFolderImported", + DownloadFolderImported = "downloadFolderImported", + DownloadFailed = "downloadFailed", + EpisodeFileDeleted = "episodeFileDeleted", + EpisodeFileRenamed = "episodeFileRenamed", + DownloadIgnored = "downloadIgnored", +} + +export interface EpisodeResource { + /** @format int32 */ + id?: number; + /** @format int32 */ + seriesId?: number; + /** @format int32 */ + tvdbId?: number; + /** @format int32 */ + episodeFileId?: number; + /** @format int32 */ + seasonNumber?: number; + /** @format int32 */ + episodeNumber?: number; + title?: string | null; + airDate?: string | null; + /** @format date-time */ + airDateUtc?: string | null; + /** @format date-time */ + lastSearchTime?: string | null; + /** @format int32 */ + runtime?: number; + finaleType?: string | null; + overview?: string | null; + episodeFile?: EpisodeFileResource; + hasFile?: boolean; + monitored?: boolean; + /** @format int32 */ + absoluteEpisodeNumber?: number | null; + /** @format int32 */ + sceneAbsoluteEpisodeNumber?: number | null; + /** @format int32 */ + sceneEpisodeNumber?: number | null; + /** @format int32 */ + sceneSeasonNumber?: number | null; + unverifiedSceneNumbering?: boolean; + /** @format date-time */ + endTime?: string | null; + /** @format date-time */ + grabDate?: string | null; + series?: SeriesResource; + images?: MediaCover[] | null; +} + +export interface EpisodeResourcePagingResource { + /** @format int32 */ + page?: number; + /** @format int32 */ + pageSize?: number; + sortKey?: string | null; + sortDirection?: SortDirection; + /** @format int32 */ + totalRecords?: number; + records?: EpisodeResource[] | null; +} + +export enum EpisodeTitleRequiredType { + Always = "always", + BulkSeasonReleases = "bulkSeasonReleases", + Never = "never", +} + +export interface EpisodesMonitoredResource { + episodeIds?: number[] | null; + monitored?: boolean; +} + +export interface Field { + /** @format int32 */ + order?: number; + name?: string | null; + label?: string | null; + unit?: string | null; + helpText?: string | null; + helpTextWarning?: string | null; + helpLink?: string | null; + value?: any; + type?: string | null; + advanced?: boolean; + selectOptions?: SelectOption[] | null; + selectOptionsProviderAction?: string | null; + section?: string | null; + hidden?: string | null; + privacy?: PrivacyLevel; + placeholder?: string | null; + isFloat?: boolean; +} + +export enum FileDateType { + None = "none", + LocalAirDate = "localAirDate", + UtcAirDate = "utcAirDate", +} + +export enum HealthCheckResult { + Ok = "ok", + Notice = "notice", + Warning = "warning", + Error = "error", +} + +export interface HealthResource { + /** @format int32 */ + id?: number; + source?: string | null; + type?: HealthCheckResult; + message?: string | null; + wikiUrl?: HttpUri; +} + +export interface HistoryResource { + /** @format int32 */ + id?: number; + /** @format int32 */ + episodeId?: number; + /** @format int32 */ + seriesId?: number; + sourceTitle?: string | null; + languages?: Language[] | null; + quality?: QualityModel; + customFormats?: CustomFormatResource[] | null; + /** @format int32 */ + customFormatScore?: number; + qualityCutoffNotMet?: boolean; + /** @format date-time */ + date?: string; + downloadId?: string | null; + eventType?: EpisodeHistoryEventType; + data?: Record; + episode?: EpisodeResource; + series?: SeriesResource; +} + +export interface HistoryResourcePagingResource { + /** @format int32 */ + page?: number; + /** @format int32 */ + pageSize?: number; + sortKey?: string | null; + sortDirection?: SortDirection; + /** @format int32 */ + totalRecords?: number; + records?: HistoryResource[] | null; +} + +export interface HostConfigResource { + /** @format int32 */ + id?: number; + bindAddress?: string | null; + /** @format int32 */ + port?: number; + /** @format int32 */ + sslPort?: number; + enableSsl?: boolean; + launchBrowser?: boolean; + authenticationMethod?: AuthenticationType; + authenticationRequired?: AuthenticationRequiredType; + analyticsEnabled?: boolean; + username?: string | null; + password?: string | null; + passwordConfirmation?: string | null; + logLevel?: string | null; + /** @format int32 */ + logSizeLimit?: number; + consoleLogLevel?: string | null; + branch?: string | null; + apiKey?: string | null; + sslCertPath?: string | null; + sslCertPassword?: string | null; + urlBase?: string | null; + instanceName?: string | null; + applicationUrl?: string | null; + updateAutomatically?: boolean; + updateMechanism?: UpdateMechanism; + updateScriptPath?: string | null; + proxyEnabled?: boolean; + proxyType?: ProxyType; + proxyHostname?: string | null; + /** @format int32 */ + proxyPort?: number; + proxyUsername?: string | null; + proxyPassword?: string | null; + proxyBypassFilter?: string | null; + proxyBypassLocalAddresses?: boolean; + certificateValidation?: CertificateValidationType; + backupFolder?: string | null; + /** @format int32 */ + backupInterval?: number; + /** @format int32 */ + backupRetention?: number; +} + +export interface HttpUri { + fullUri?: string | null; + scheme?: string | null; + host?: string | null; + /** @format int32 */ + port?: number | null; + path?: string | null; + query?: string | null; + fragment?: string | null; +} + +export interface ImportListBulkResource { + ids?: number[] | null; + tags?: number[] | null; + applyTags?: ApplyTags; + enableAutomaticAdd?: boolean | null; + rootFolderPath?: string | null; + /** @format int32 */ + qualityProfileId?: number | null; +} + +export interface ImportListConfigResource { + /** @format int32 */ + id?: number; + listSyncLevel?: ListSyncLevelType; + /** @format int32 */ + listSyncTag?: number; +} + +export interface ImportListExclusionBulkResource { + /** @uniqueItems true */ + ids?: number[] | null; +} + +export interface ImportListExclusionResource { + /** @format int32 */ + id?: number; + /** @format int32 */ + tvdbId?: number; + title?: string | null; +} + +export interface ImportListExclusionResourcePagingResource { + /** @format int32 */ + page?: number; + /** @format int32 */ + pageSize?: number; + sortKey?: string | null; + sortDirection?: SortDirection; + /** @format int32 */ + totalRecords?: number; + records?: ImportListExclusionResource[] | null; +} + +export interface ImportListResource { + /** @format int32 */ + id?: number; + name?: string | null; + fields?: Field[] | null; + implementationName?: string | null; + implementation?: string | null; + configContract?: string | null; + infoLink?: string | null; + message?: ProviderMessage; + /** @uniqueItems true */ + tags?: number[] | null; + presets?: ImportListResource[] | null; + enableAutomaticAdd?: boolean; + searchForMissingEpisodes?: boolean; + shouldMonitor?: MonitorTypes; + monitorNewItems?: NewItemMonitorTypes; + rootFolderPath?: string | null; + /** @format int32 */ + qualityProfileId?: number; + seriesType?: SeriesTypes; + seasonFolder?: boolean; + listType?: ImportListType; + /** @format int32 */ + listOrder?: number; + /** @format date-span */ + minRefreshInterval?: string; +} + +export enum ImportListType { + Program = "program", + Plex = "plex", + Trakt = "trakt", + Simkl = "simkl", + Other = "other", + Advanced = "advanced", +} + +export interface IndexerBulkResource { + ids?: number[] | null; + tags?: number[] | null; + applyTags?: ApplyTags; + enableRss?: boolean | null; + enableAutomaticSearch?: boolean | null; + enableInteractiveSearch?: boolean | null; + /** @format int32 */ + priority?: number | null; +} + +export interface IndexerConfigResource { + /** @format int32 */ + id?: number; + /** @format int32 */ + minimumAge?: number; + /** @format int32 */ + retention?: number; + /** @format int32 */ + maximumSize?: number; + /** @format int32 */ + rssSyncInterval?: number; +} + +export interface IndexerFlagResource { + /** @format int32 */ + id?: number; + name?: string | null; + nameLower?: string | null; +} + +export interface IndexerResource { + /** @format int32 */ + id?: number; + name?: string | null; + fields?: Field[] | null; + implementationName?: string | null; + implementation?: string | null; + configContract?: string | null; + infoLink?: string | null; + message?: ProviderMessage; + /** @uniqueItems true */ + tags?: number[] | null; + presets?: IndexerResource[] | null; + enableRss?: boolean; + enableAutomaticSearch?: boolean; + enableInteractiveSearch?: boolean; + supportsRss?: boolean; + supportsSearch?: boolean; + protocol?: DownloadProtocol; + /** @format int32 */ + priority?: number; + /** @format int32 */ + seasonSearchMaximumSingleEpisodeAge?: number; + /** @format int32 */ + downloadClientId?: number; +} + +export interface Language { + /** @format int32 */ + id?: number; + name?: string | null; +} + +export interface LanguageProfileItemResource { + /** @format int32 */ + id?: number; + language?: Language; + allowed?: boolean; +} + +export interface LanguageProfileResource { + /** @format int32 */ + id?: number; + name?: string | null; + upgradeAllowed?: boolean; + cutoff?: Language; + languages?: LanguageProfileItemResource[] | null; +} + +export interface LanguageResource { + /** @format int32 */ + id?: number; + name?: string | null; + nameLower?: string | null; +} + +export enum ListSyncLevelType { + Disabled = "disabled", + LogOnly = "logOnly", + KeepAndUnmonitor = "keepAndUnmonitor", + KeepAndTag = "keepAndTag", +} + +export interface LocalizationLanguageResource { + identifier?: string | null; +} + +export interface LocalizationResource { + /** @format int32 */ + id?: number; + strings?: Record; +} + +export interface LogFileResource { + /** @format int32 */ + id?: number; + filename?: string | null; + /** @format date-time */ + lastWriteTime?: string; + contentsUrl?: string | null; + downloadUrl?: string | null; +} + +export interface LogResource { + /** @format int32 */ + id?: number; + /** @format date-time */ + time?: string; + exception?: string | null; + exceptionType?: string | null; + level?: string | null; + logger?: string | null; + message?: string | null; + method?: string | null; +} + +export interface LogResourcePagingResource { + /** @format int32 */ + page?: number; + /** @format int32 */ + pageSize?: number; + sortKey?: string | null; + sortDirection?: SortDirection; + /** @format int32 */ + totalRecords?: number; + records?: LogResource[] | null; +} + +export interface ManualImportReprocessResource { + /** @format int32 */ + id?: number; + path?: string | null; + /** @format int32 */ + seriesId?: number; + /** @format int32 */ + seasonNumber?: number | null; + episodes?: EpisodeResource[] | null; + episodeIds?: number[] | null; + quality?: QualityModel; + languages?: Language[] | null; + releaseGroup?: string | null; + downloadId?: string | null; + customFormats?: CustomFormatResource[] | null; + /** @format int32 */ + customFormatScore?: number; + /** @format int32 */ + indexerFlags?: number; + releaseType?: ReleaseType; + rejections?: Rejection[] | null; +} + +export interface ManualImportResource { + /** @format int32 */ + id?: number; + path?: string | null; + relativePath?: string | null; + folderName?: string | null; + name?: string | null; + /** @format int64 */ + size?: number; + series?: SeriesResource; + /** @format int32 */ + seasonNumber?: number | null; + episodes?: EpisodeResource[] | null; + /** @format int32 */ + episodeFileId?: number | null; + releaseGroup?: string | null; + quality?: QualityModel; + languages?: Language[] | null; + /** @format int32 */ + qualityWeight?: number; + downloadId?: string | null; + customFormats?: CustomFormatResource[] | null; + /** @format int32 */ + customFormatScore?: number; + /** @format int32 */ + indexerFlags?: number; + releaseType?: ReleaseType; + rejections?: Rejection[] | null; +} + +export interface MediaCover { + coverType?: MediaCoverTypes; + url?: string | null; + remoteUrl?: string | null; +} + +export enum MediaCoverTypes { + Unknown = "unknown", + Poster = "poster", + Banner = "banner", + Fanart = "fanart", + Screenshot = "screenshot", + Headshot = "headshot", + Clearlogo = "clearlogo", +} + +export interface MediaInfoResource { + /** @format int32 */ + id?: number; + /** @format int64 */ + audioBitrate?: number; + /** @format double */ + audioChannels?: number; + audioCodec?: string | null; + audioLanguages?: string | null; + /** @format int32 */ + audioStreamCount?: number; + /** @format int32 */ + videoBitDepth?: number; + /** @format int64 */ + videoBitrate?: number; + videoCodec?: string | null; + /** @format double */ + videoFps?: number; + videoDynamicRange?: string | null; + videoDynamicRangeType?: string | null; + resolution?: string | null; + runTime?: string | null; + scanType?: string | null; + subtitles?: string | null; +} + +export interface MediaManagementConfigResource { + /** @format int32 */ + id?: number; + autoUnmonitorPreviouslyDownloadedEpisodes?: boolean; + recycleBin?: string | null; + /** @format int32 */ + recycleBinCleanupDays?: number; + downloadPropersAndRepacks?: ProperDownloadTypes; + createEmptySeriesFolders?: boolean; + deleteEmptyFolders?: boolean; + fileDate?: FileDateType; + rescanAfterRefresh?: RescanAfterRefreshType; + setPermissionsLinux?: boolean; + chmodFolder?: string | null; + chownGroup?: string | null; + episodeTitleRequired?: EpisodeTitleRequiredType; + skipFreeSpaceCheckWhenImporting?: boolean; + /** @format int32 */ + minimumFreeSpaceWhenImporting?: number; + copyUsingHardlinks?: boolean; + useScriptImport?: boolean; + scriptImportPath?: string | null; + importExtraFiles?: boolean; + extraFileExtensions?: string | null; + enableMediaInfo?: boolean; +} + +export interface MetadataResource { + /** @format int32 */ + id?: number; + name?: string | null; + fields?: Field[] | null; + implementationName?: string | null; + implementation?: string | null; + configContract?: string | null; + infoLink?: string | null; + message?: ProviderMessage; + /** @uniqueItems true */ + tags?: number[] | null; + presets?: MetadataResource[] | null; + enable?: boolean; +} + +export enum MonitorTypes { + Unknown = "unknown", + All = "all", + Future = "future", + Missing = "missing", + Existing = "existing", + FirstSeason = "firstSeason", + LastSeason = "lastSeason", + LatestSeason = "latestSeason", + Pilot = "pilot", + Recent = "recent", + MonitorSpecials = "monitorSpecials", + UnmonitorSpecials = "unmonitorSpecials", + None = "none", + Skip = "skip", +} + +export interface MonitoringOptions { + ignoreEpisodesWithFiles?: boolean; + ignoreEpisodesWithoutFiles?: boolean; + monitor?: MonitorTypes; +} + +export interface NamingConfigResource { + /** @format int32 */ + id?: number; + renameEpisodes?: boolean; + replaceIllegalCharacters?: boolean; + /** @format int32 */ + colonReplacementFormat?: number; + customColonReplacementFormat?: string | null; + /** @format int32 */ + multiEpisodeStyle?: number; + standardEpisodeFormat?: string | null; + dailyEpisodeFormat?: string | null; + animeEpisodeFormat?: string | null; + seriesFolderFormat?: string | null; + seasonFolderFormat?: string | null; + specialsFolderFormat?: string | null; +} + +export enum NewItemMonitorTypes { + All = "all", + None = "none", +} + +export interface NotificationResource { + /** @format int32 */ + id?: number; + name?: string | null; + fields?: Field[] | null; + implementationName?: string | null; + implementation?: string | null; + configContract?: string | null; + infoLink?: string | null; + message?: ProviderMessage; + /** @uniqueItems true */ + tags?: number[] | null; + presets?: NotificationResource[] | null; + link?: string | null; + onGrab?: boolean; + onDownload?: boolean; + onUpgrade?: boolean; + onImportComplete?: boolean; + onRename?: boolean; + onSeriesAdd?: boolean; + onSeriesDelete?: boolean; + onEpisodeFileDelete?: boolean; + onEpisodeFileDeleteForUpgrade?: boolean; + onHealthIssue?: boolean; + includeHealthWarnings?: boolean; + onHealthRestored?: boolean; + onApplicationUpdate?: boolean; + onManualInteractionRequired?: boolean; + supportsOnGrab?: boolean; + supportsOnDownload?: boolean; + supportsOnUpgrade?: boolean; + supportsOnImportComplete?: boolean; + supportsOnRename?: boolean; + supportsOnSeriesAdd?: boolean; + supportsOnSeriesDelete?: boolean; + supportsOnEpisodeFileDelete?: boolean; + supportsOnEpisodeFileDeleteForUpgrade?: boolean; + supportsOnHealthIssue?: boolean; + supportsOnHealthRestored?: boolean; + supportsOnApplicationUpdate?: boolean; + supportsOnManualInteractionRequired?: boolean; + testCommand?: string | null; +} + +export interface ParseResource { + /** @format int32 */ + id?: number; + title?: string | null; + parsedEpisodeInfo?: ParsedEpisodeInfo; + series?: SeriesResource; + episodes?: EpisodeResource[] | null; + languages?: Language[] | null; + customFormats?: CustomFormatResource[] | null; + /** @format int32 */ + customFormatScore?: number; +} + +export interface ParsedEpisodeInfo { + releaseTitle?: string | null; + seriesTitle?: string | null; + seriesTitleInfo?: SeriesTitleInfo; + quality?: QualityModel; + /** @format int32 */ + seasonNumber?: number; + episodeNumbers?: number[] | null; + absoluteEpisodeNumbers?: number[] | null; + specialAbsoluteEpisodeNumbers?: number[] | null; + airDate?: string | null; + languages?: Language[] | null; + fullSeason?: boolean; + isPartialSeason?: boolean; + isMultiSeason?: boolean; + isSeasonExtra?: boolean; + isSplitEpisode?: boolean; + isMiniSeries?: boolean; + special?: boolean; + releaseGroup?: string | null; + releaseHash?: string | null; + /** @format int32 */ + seasonPart?: number; + releaseTokens?: string | null; + /** @format int32 */ + dailyPart?: number | null; + isDaily?: boolean; + isAbsoluteNumbering?: boolean; + isPossibleSpecialEpisode?: boolean; + isPossibleSceneSeasonSpecial?: boolean; + releaseType?: ReleaseType; +} + +export interface PingResource { + status?: string | null; +} + +export enum PrivacyLevel { + Normal = "normal", + Password = "password", + ApiKey = "apiKey", + UserName = "userName", +} + +export interface ProfileFormatItemResource { + /** @format int32 */ + id?: number; + /** @format int32 */ + format?: number; + name?: string | null; + /** @format int32 */ + score?: number; +} + +export enum ProperDownloadTypes { + PreferAndUpgrade = "preferAndUpgrade", + DoNotUpgrade = "doNotUpgrade", + DoNotPrefer = "doNotPrefer", +} + +export interface ProviderMessage { + message?: string | null; + type?: ProviderMessageType; +} + +export enum ProviderMessageType { + Info = "info", + Warning = "warning", + Error = "error", +} + +export enum ProxyType { + Http = "http", + Socks4 = "socks4", + Socks5 = "socks5", +} + +export interface Quality { + /** @format int32 */ + id?: number; + name?: string | null; + source?: QualitySource; + /** @format int32 */ + resolution?: number; +} + +export interface QualityDefinitionLimitsResource { + /** @format int32 */ + min?: number; + /** @format int32 */ + max?: number; +} + +export interface QualityDefinitionResource { + /** @format int32 */ + id?: number; + quality?: Quality; + title?: string | null; + /** @format int32 */ + weight?: number; + /** @format double */ + minSize?: number | null; + /** @format double */ + maxSize?: number | null; + /** @format double */ + preferredSize?: number | null; +} + +export interface QualityModel { + quality?: Quality; + revision?: Revision; +} + +export interface QualityProfileQualityItemResource { + /** @format int32 */ + id?: number; + name?: string | null; + quality?: Quality; + items?: QualityProfileQualityItemResource[] | null; + allowed?: boolean; +} + +export interface QualityProfileResource { + /** @format int32 */ + id?: number; + name?: string | null; + upgradeAllowed?: boolean; + /** @format int32 */ + cutoff?: number; + items?: QualityProfileQualityItemResource[] | null; + /** @format int32 */ + minFormatScore?: number; + /** @format int32 */ + cutoffFormatScore?: number; + /** @format int32 */ + minUpgradeFormatScore?: number; + formatItems?: ProfileFormatItemResource[] | null; +} + +export enum QualitySource { + Unknown = "unknown", + Television = "television", + TelevisionRaw = "televisionRaw", + Web = "web", + WebRip = "webRip", + Dvd = "dvd", + Bluray = "bluray", + BlurayRaw = "blurayRaw", +} + +export interface QueueBulkResource { + ids?: number[] | null; +} + +export interface QueueResource { + /** @format int32 */ + id?: number; + /** @format int32 */ + seriesId?: number | null; + /** @format int32 */ + episodeId?: number | null; + /** @format int32 */ + seasonNumber?: number | null; + series?: SeriesResource; + episode?: EpisodeResource; + languages?: Language[] | null; + quality?: QualityModel; + customFormats?: CustomFormatResource[] | null; + /** @format int32 */ + customFormatScore?: number; + /** @format double */ + size?: number; + title?: string | null; + /** @format double */ + sizeleft?: number; + /** @format date-span */ + timeleft?: string | null; + /** @format date-time */ + estimatedCompletionTime?: string | null; + /** @format date-time */ + added?: string | null; + status?: string | null; + trackedDownloadStatus?: TrackedDownloadStatus; + trackedDownloadState?: TrackedDownloadState; + statusMessages?: TrackedDownloadStatusMessage[] | null; + errorMessage?: string | null; + downloadId?: string | null; + protocol?: DownloadProtocol; + downloadClient?: string | null; + downloadClientHasPostImportCategory?: boolean; + indexer?: string | null; + outputPath?: string | null; + episodeHasFile?: boolean; +} + +export interface QueueResourcePagingResource { + /** @format int32 */ + page?: number; + /** @format int32 */ + pageSize?: number; + sortKey?: string | null; + sortDirection?: SortDirection; + /** @format int32 */ + totalRecords?: number; + records?: QueueResource[] | null; +} + +export interface QueueStatusResource { + /** @format int32 */ + id?: number; + /** @format int32 */ + totalCount?: number; + /** @format int32 */ + count?: number; + /** @format int32 */ + unknownCount?: number; + errors?: boolean; + warnings?: boolean; + unknownErrors?: boolean; + unknownWarnings?: boolean; +} + +export interface Ratings { + /** @format int32 */ + votes?: number; + /** @format double */ + value?: number; +} + +export interface Rejection { + reason?: string | null; + type?: RejectionType; +} + +export enum RejectionType { + Permanent = "permanent", + Temporary = "temporary", +} + +export interface ReleaseEpisodeResource { + /** @format int32 */ + id?: number; + /** @format int32 */ + seasonNumber?: number; + /** @format int32 */ + episodeNumber?: number; + /** @format int32 */ + absoluteEpisodeNumber?: number | null; + title?: string | null; +} + +export interface ReleaseProfileResource { + /** @format int32 */ + id?: number; + name?: string | null; + enabled?: boolean; + required?: any; + ignored?: any; + /** @format int32 */ + indexerId?: number; + /** @uniqueItems true */ + tags?: number[] | null; +} + +export interface ReleaseResource { + /** @format int32 */ + id?: number; + guid?: string | null; + quality?: QualityModel; + /** @format int32 */ + qualityWeight?: number; + /** @format int32 */ + age?: number; + /** @format double */ + ageHours?: number; + /** @format double */ + ageMinutes?: number; + /** @format int64 */ + size?: number; + /** @format int32 */ + indexerId?: number; + indexer?: string | null; + releaseGroup?: string | null; + subGroup?: string | null; + releaseHash?: string | null; + title?: string | null; + fullSeason?: boolean; + sceneSource?: boolean; + /** @format int32 */ + seasonNumber?: number; + languages?: Language[] | null; + /** @format int32 */ + languageWeight?: number; + airDate?: string | null; + seriesTitle?: string | null; + episodeNumbers?: number[] | null; + absoluteEpisodeNumbers?: number[] | null; + /** @format int32 */ + mappedSeasonNumber?: number | null; + mappedEpisodeNumbers?: number[] | null; + mappedAbsoluteEpisodeNumbers?: number[] | null; + /** @format int32 */ + mappedSeriesId?: number | null; + mappedEpisodeInfo?: ReleaseEpisodeResource[] | null; + approved?: boolean; + temporarilyRejected?: boolean; + rejected?: boolean; + /** @format int32 */ + tvdbId?: number; + /** @format int32 */ + tvRageId?: number; + imdbId?: string | null; + rejections?: string[] | null; + /** @format date-time */ + publishDate?: string; + commentUrl?: string | null; + downloadUrl?: string | null; + infoUrl?: string | null; + episodeRequested?: boolean; + downloadAllowed?: boolean; + /** @format int32 */ + releaseWeight?: number; + customFormats?: CustomFormatResource[] | null; + /** @format int32 */ + customFormatScore?: number; + sceneMapping?: AlternateTitleResource; + magnetUrl?: string | null; + infoHash?: string | null; + /** @format int32 */ + seeders?: number | null; + /** @format int32 */ + leechers?: number | null; + protocol?: DownloadProtocol; + /** @format int32 */ + indexerFlags?: number; + isDaily?: boolean; + isAbsoluteNumbering?: boolean; + isPossibleSpecialEpisode?: boolean; + special?: boolean; + /** @format int32 */ + seriesId?: number | null; + /** @format int32 */ + episodeId?: number | null; + episodeIds?: number[] | null; + /** @format int32 */ + downloadClientId?: number | null; + downloadClient?: string | null; + shouldOverride?: boolean | null; +} + +export enum ReleaseType { + Unknown = "unknown", + SingleEpisode = "singleEpisode", + MultiEpisode = "multiEpisode", + SeasonPack = "seasonPack", +} + +export interface RemotePathMappingResource { + /** @format int32 */ + id?: number; + host?: string | null; + remotePath?: string | null; + localPath?: string | null; +} + +export interface RenameEpisodeResource { + /** @format int32 */ + id?: number; + /** @format int32 */ + seriesId?: number; + /** @format int32 */ + seasonNumber?: number; + episodeNumbers?: number[] | null; + /** @format int32 */ + episodeFileId?: number; + existingPath?: string | null; + newPath?: string | null; +} + +export enum RescanAfterRefreshType { + Always = "always", + AfterManual = "afterManual", + Never = "never", +} + +export interface Revision { + /** @format int32 */ + version?: number; + /** @format int32 */ + real?: number; + isRepack?: boolean; +} + +export interface RootFolderResource { + /** @format int32 */ + id?: number; + path?: string | null; + accessible?: boolean; + /** @format int64 */ + freeSpace?: number | null; + unmappedFolders?: UnmappedFolder[] | null; +} + +export enum RuntimeMode { + Console = "console", + Service = "service", + Tray = "tray", +} + +export interface SeasonPassResource { + series?: SeasonPassSeriesResource[] | null; + monitoringOptions?: MonitoringOptions; +} + +export interface SeasonPassSeriesResource { + /** @format int32 */ + id?: number; + monitored?: boolean | null; + seasons?: SeasonResource[] | null; +} + +export interface SeasonResource { + /** @format int32 */ + seasonNumber?: number; + monitored?: boolean; + statistics?: SeasonStatisticsResource; + images?: MediaCover[] | null; +} + +export interface SeasonStatisticsResource { + /** @format date-time */ + nextAiring?: string | null; + /** @format date-time */ + previousAiring?: string | null; + /** @format int32 */ + episodeFileCount?: number; + /** @format int32 */ + episodeCount?: number; + /** @format int32 */ + totalEpisodeCount?: number; + /** @format int64 */ + sizeOnDisk?: number; + releaseGroups?: string[] | null; + /** @format double */ + percentOfEpisodes?: number; +} + +export interface SelectOption { + /** @format int32 */ + value?: number; + name?: string | null; + /** @format int32 */ + order?: number; + hint?: string | null; +} + +export interface SeriesEditorResource { + seriesIds?: number[] | null; + monitored?: boolean | null; + monitorNewItems?: NewItemMonitorTypes; + /** @format int32 */ + qualityProfileId?: number | null; + seriesType?: SeriesTypes; + seasonFolder?: boolean | null; + rootFolderPath?: string | null; + tags?: number[] | null; + applyTags?: ApplyTags; + moveFiles?: boolean; + deleteFiles?: boolean; + addImportListExclusion?: boolean; +} + +export interface SeriesResource { + /** @format int32 */ + id?: number; + title?: string | null; + alternateTitles?: AlternateTitleResource[] | null; + sortTitle?: string | null; + status?: SeriesStatusType; + ended?: boolean; + profileName?: string | null; + overview?: string | null; + /** @format date-time */ + nextAiring?: string | null; + /** @format date-time */ + previousAiring?: string | null; + network?: string | null; + airTime?: string | null; + images?: MediaCover[] | null; + originalLanguage?: Language; + remotePoster?: string | null; + seasons?: SeasonResource[] | null; + /** @format int32 */ + year?: number; + path?: string | null; + /** @format int32 */ + qualityProfileId?: number; + seasonFolder?: boolean; + monitored?: boolean; + monitorNewItems?: NewItemMonitorTypes; + useSceneNumbering?: boolean; + /** @format int32 */ + runtime?: number; + /** @format int32 */ + tvdbId?: number; + /** @format int32 */ + tvRageId?: number; + /** @format int32 */ + tvMazeId?: number; + /** @format int32 */ + tmdbId?: number; + /** @format date-time */ + firstAired?: string | null; + /** @format date-time */ + lastAired?: string | null; + seriesType?: SeriesTypes; + cleanTitle?: string | null; + imdbId?: string | null; + titleSlug?: string | null; + rootFolderPath?: string | null; + folder?: string | null; + certification?: string | null; + genres?: string[] | null; + /** @uniqueItems true */ + tags?: number[] | null; + /** @format date-time */ + added?: string; + addOptions?: AddSeriesOptions; + ratings?: Ratings; + statistics?: SeriesStatisticsResource; + episodesChanged?: boolean | null; + /** + * @deprecated + * @format int32 + */ + languageProfileId?: number; +} + +export interface SeriesStatisticsResource { + /** @format int32 */ + seasonCount?: number; + /** @format int32 */ + episodeFileCount?: number; + /** @format int32 */ + episodeCount?: number; + /** @format int32 */ + totalEpisodeCount?: number; + /** @format int64 */ + sizeOnDisk?: number; + releaseGroups?: string[] | null; + /** @format double */ + percentOfEpisodes?: number; +} + +export enum SeriesStatusType { + Continuing = "continuing", + Ended = "ended", + Upcoming = "upcoming", + Deleted = "deleted", +} + +export interface SeriesTitleInfo { + title?: string | null; + titleWithoutYear?: string | null; + /** @format int32 */ + year?: number; + allTitles?: string[] | null; +} + +export enum SeriesTypes { + Standard = "standard", + Daily = "daily", + Anime = "anime", +} + +export enum SortDirection { + Default = "default", + Ascending = "ascending", + Descending = "descending", +} + +export interface SystemResource { + appName?: string | null; + instanceName?: string | null; + version?: string | null; + /** @format date-time */ + buildTime?: string; + isDebug?: boolean; + isProduction?: boolean; + isAdmin?: boolean; + isUserInteractive?: boolean; + startupPath?: string | null; + appData?: string | null; + osName?: string | null; + osVersion?: string | null; + isNetCore?: boolean; + isLinux?: boolean; + isOsx?: boolean; + isWindows?: boolean; + isDocker?: boolean; + mode?: RuntimeMode; + branch?: string | null; + authentication?: AuthenticationType; + sqliteVersion?: string | null; + /** @format int32 */ + migrationVersion?: number; + urlBase?: string | null; + runtimeVersion?: string | null; + runtimeName?: string | null; + /** @format date-time */ + startTime?: string; + packageVersion?: string | null; + packageAuthor?: string | null; + packageUpdateMechanism?: UpdateMechanism; + packageUpdateMechanismMessage?: string | null; + databaseVersion?: string | null; + databaseType?: DatabaseType; +} + +export interface TagDetailsResource { + /** @format int32 */ + id?: number; + label?: string | null; + delayProfileIds?: number[] | null; + importListIds?: number[] | null; + notificationIds?: number[] | null; + restrictionIds?: number[] | null; + indexerIds?: number[] | null; + downloadClientIds?: number[] | null; + autoTagIds?: number[] | null; + seriesIds?: number[] | null; +} + +export interface TagResource { + /** @format int32 */ + id?: number; + label?: string | null; +} + +export interface TaskResource { + /** @format int32 */ + id?: number; + name?: string | null; + taskName?: string | null; + /** @format int32 */ + interval?: number; + /** @format date-time */ + lastExecution?: string; + /** @format date-time */ + lastStartTime?: string; + /** @format date-time */ + nextExecution?: string; + /** @format date-span */ + lastDuration?: string; +} + +export enum TrackedDownloadState { + Downloading = "downloading", + ImportBlocked = "importBlocked", + ImportPending = "importPending", + Importing = "importing", + Imported = "imported", + FailedPending = "failedPending", + Failed = "failed", + Ignored = "ignored", +} + +export enum TrackedDownloadStatus { + Ok = "ok", + Warning = "warning", + Error = "error", +} + +export interface TrackedDownloadStatusMessage { + title?: string | null; + messages?: string[] | null; +} + +export interface UiConfigResource { + /** @format int32 */ + id?: number; + /** @format int32 */ + firstDayOfWeek?: number; + calendarWeekColumnHeader?: string | null; + shortDateFormat?: string | null; + longDateFormat?: string | null; + timeFormat?: string | null; + showRelativeDates?: boolean; + enableColorImpairedMode?: boolean; + theme?: string | null; + /** @format int32 */ + uiLanguage?: number; +} + +export interface UnmappedFolder { + name?: string | null; + path?: string | null; + relativePath?: string | null; +} + +export interface UpdateChanges { + new?: string[] | null; + fixed?: string[] | null; +} + +export enum UpdateMechanism { + BuiltIn = "builtIn", + Script = "script", + External = "external", + Apt = "apt", + Docker = "docker", +} + +export interface UpdateResource { + /** @format int32 */ + id?: number; + version?: string | null; + branch?: string | null; + /** @format date-time */ + releaseDate?: string; + fileName?: string | null; + url?: string | null; + installed?: boolean; + /** @format date-time */ + installedOn?: string | null; + installable?: boolean; + latest?: boolean; + changes?: UpdateChanges; + hash?: string | null; +} diff --git a/src/api.ts b/src/api.ts index 6cda343..99edbf9 100644 --- a/src/api.ts +++ b/src/api.ts @@ -1,17 +1,18 @@ -import { Api as RadarrApi } from "./__generated__/generated-radarr-api"; -import { Api as SonarrApi } from "./__generated__/generated-sonarr-api"; +import { KyHttpClient } from "./__generated__/ky-client"; +import { Api as RadarrApi } from "./__generated__/radarr/Api"; +import { Api as SonarrApi } from "./__generated__/sonarr/Api"; import { logger } from "./logger"; import { ArrType } from "./types"; -let sonarrClient: SonarrApi["api"] | undefined; -let radarrClient: RadarrApi["api"] | undefined; +let sonarrClient: SonarrApi | undefined; +let radarrClient: RadarrApi | undefined; export const unsetApi = () => { sonarrClient = undefined; radarrClient = undefined; }; -export const getArrApi = () => { +export const getArrApi = (): SonarrApi | RadarrApi => { const client = sonarrClient || radarrClient; if (client) { @@ -47,8 +48,12 @@ const validateParams = (url: string, apiKey: string, arrType: ArrType) => { const handleErrorApi = (error: any, arrType: ArrType) => { let message; const arrLabel = arrType === "RADARR" ? "Radarr" : "Sonarr"; + const causeError = error?.cause?.message || error?.cause?.errors?.map((e: any) => e.message).join(";") || undefined; - error.message && logger.error(`Error configuring ${arrLabel} API: ${error.message}`); + const errorMessage = (error.message && `Message: ${error.message}`) || ""; + const causeMessage = (causeError && `- Cause: ${causeError}`) || ""; + + logger.error(`Error configuring ${arrLabel} API. ${errorMessage} ${causeMessage}`); if (error.response) { // The request was made and the server responded with a status code @@ -56,7 +61,7 @@ const handleErrorApi = (error: any, arrType: ArrType) => { message = `Unable to retrieve data from ${arrLabel} API. Server responded with status code ${error.response.status}: ${error.response.statusText}. Please check the API server status or your request parameters.`; } else { // Something happened in setting up the request that triggered an Error - message = `An unexpected error occurred while setting up the ${arrLabel} request: ${error.message}. Please try again.`; + message = `An unexpected error occurred while setting up the ${arrLabel} request: ${errorMessage} ${causeMessage}. Please try again.`; } throw new Error(message); @@ -66,21 +71,15 @@ export const configureSonarrApi = async (url: string, apiKey: string) => { unsetApi(); validateParams(url, apiKey, "SONARR"); - const api = new SonarrApi({ + const httpClient = new KyHttpClient({ headers: { "X-Api-Key": apiKey, }, - url: url, - baseURL: url, - // baseUrl: url, - // baseApiParams: { - // headers: { - // "X-Api-Key": apiKey, - // }, - // }, + prefixUrl: url, }); + const api = new SonarrApi(httpClient); - sonarrClient = api.api; + sonarrClient = api; try { await sonarrClient.v3MetadataList(); @@ -103,21 +102,15 @@ export const configureRadarrApi = async (url: string, apiKey: string) => { unsetApi(); validateParams(url, apiKey, "RADARR"); - const api = new RadarrApi({ + const httpClient = new KyHttpClient({ headers: { "X-Api-Key": apiKey, }, - url: url, - baseURL: url, - // baseUrl: url, - // baseApiParams: { - // headers: { - // "X-Api-Key": apiKey, - // }, - // }, + prefixUrl: url, }); + const api = new RadarrApi(httpClient); - radarrClient = api.api; + radarrClient = api; try { await radarrClient.v3MetadataList(); diff --git a/src/custom-formats.ts b/src/custom-formats.ts index ac0336b..1b70dcf 100644 --- a/src/custom-formats.ts +++ b/src/custom-formats.ts @@ -1,6 +1,6 @@ import fs from "node:fs"; import path from "node:path"; -import { CustomFormatResource } from "./__generated__/generated-sonarr-api"; +import { MergedCustomFormatResource } from "./__generated__/mergedTypes"; import { getArrApi } from "./api"; import { getConfig } from "./config"; import { logger } from "./logger"; @@ -9,24 +9,28 @@ import { IS_DRY_RUN, IS_LOCAL_SAMPLE_MODE, compareObjectsCarr, loadJsonFile, map export const deleteAllCustomFormats = async () => { const api = getArrApi(); - const cfOnServer = await api.v3CustomformatList(); + const cfOnServer = await api.v3CustomformatList().json(); - for (const cf of cfOnServer.data) { + for (const cf of cfOnServer) { await api.v3CustomformatDelete(cf.id!); logger.info(`Deleted CF: '${cf.name}'`); } }; -export const loadServerCustomFormats = async (): Promise => { +export const loadServerCustomFormats = async (): Promise => { if (IS_LOCAL_SAMPLE_MODE) { - return loadJsonFile(path.resolve(__dirname, "../tests/samples/cfs.json")); + return loadJsonFile(path.resolve(__dirname, "../tests/samples/cfs.json")); } const api = getArrApi(); - const cfOnServer = await api.v3CustomformatList(); - return cfOnServer.data; + const cfOnServer = await api.v3CustomformatList().json(); + return cfOnServer; }; -export const manageCf = async (cfProcessing: CFProcessing, serverCfs: Map, cfsToManage: Set) => { +export const manageCf = async ( + cfProcessing: CFProcessing, + serverCfs: Map, + cfsToManage: Set, +) => { const { carrIdMapping: trashIdToObject } = cfProcessing; const api = getArrApi(); @@ -113,7 +117,7 @@ export const loadLocalCfs = async (): Promise => { } const files = fs.readdirSync(`${cfPath}`).filter((fn) => fn.endsWith("json")); - const carrIdToObject = new Map(); + const carrIdToObject = new Map(); const cfNameToCarrObject = new Map(); for (const file of files) { @@ -147,7 +151,7 @@ export const loadCFFromConfig = (): CFProcessing | null => { return null; } - const carrIdToObject = new Map(); + const carrIdToObject = new Map(); const cfNameToCarrObject = new Map(); for (const def of defs) { diff --git a/src/quality-definitions.test.ts b/src/quality-definitions.test.ts index 8ed7d67..83f1db8 100644 --- a/src/quality-definitions.test.ts +++ b/src/quality-definitions.test.ts @@ -1,5 +1,5 @@ import { describe, expect, test } from "vitest"; -import { QualityDefinitionResource, QualitySource } from "./__generated__/generated-sonarr-api"; +import { MergedQualityDefinitionResource } from "./__generated__/mergedTypes"; import { calculateQualityDefinitionDiff } from "./quality-definitions"; import { TrashQualityDefintion } from "./types"; @@ -74,12 +74,12 @@ const exampleCFImplementations = { }; describe("QualityDefinitions", async () => { - const server: QualityDefinitionResource[] = [ + const server: MergedQualityDefinitionResource[] = [ { quality: { id: 0, name: "Unknown", - source: QualitySource.Unknown, + source: "unknown", resolution: 0, }, title: "Unknown", @@ -93,7 +93,7 @@ describe("QualityDefinitions", async () => { quality: { id: 1, name: "SDTV", - source: QualitySource.Television, + source: "television", resolution: 480, }, title: "SDTV", diff --git a/src/quality-definitions.ts b/src/quality-definitions.ts index 82c6f85..bf26356 100644 --- a/src/quality-definitions.ts +++ b/src/quality-definitions.ts @@ -1,27 +1,27 @@ import path from "node:path"; -import { QualityDefinitionResource } from "./__generated__/generated-sonarr-api"; +import { MergedQualityDefinitionResource } from "./__generated__/mergedTypes"; import { getArrApi } from "./api"; import { logger } from "./logger"; import { TrashQualityDefintion, TrashQualityDefintionQuality } from "./types"; import { IS_LOCAL_SAMPLE_MODE, loadJsonFile } from "./util"; -export const loadQualityDefinitionFromServer = async (): Promise => { +export const loadQualityDefinitionFromServer = async (): Promise => { if (IS_LOCAL_SAMPLE_MODE) { return loadJsonFile(path.resolve(__dirname, "../tests/samples/qualityDefinition.json")); } - return (await getArrApi().v3QualitydefinitionList()).data as QualityDefinitionResource[]; + return await getArrApi().v3QualitydefinitionList().json(); }; -export const calculateQualityDefinitionDiff = (serverQDs: QualityDefinitionResource[], trashQD: TrashQualityDefintion) => { +export const calculateQualityDefinitionDiff = (serverQDs: MergedQualityDefinitionResource[], trashQD: TrashQualityDefintion) => { const serverMap = serverQDs.reduce((p, c) => { p.set(c.title!, c); return p; - }, new Map()); + }, new Map()); const changeMap = new Map(); const create: TrashQualityDefintionQuality[] = []; - const restData: QualityDefinitionResource[] = []; + const restData: MergedQualityDefinitionResource[] = []; for (const tq of trashQD.qualities) { const element = serverMap.get(tq.quality); diff --git a/src/quality-profiles.test.ts b/src/quality-profiles.test.ts index c4901d2..2afc123 100644 --- a/src/quality-profiles.test.ts +++ b/src/quality-profiles.test.ts @@ -1,5 +1,5 @@ import { describe, expect, test } from "vitest"; -import { QualityDefinitionResource } from "./__generated__/generated-sonarr-api"; +import { MergedQualityDefinitionResource } from "./__generated__/mergedTypes"; import { doAllQualitiesExist, isOrderOfQualitiesEqual, mapQualities } from "./quality-profiles"; import { ConfigQualityProfile, ConfigQualityProfileItem } from "./types"; @@ -121,7 +121,7 @@ describe("QualityProfiles", async () => { { name: "HDTV-1080p" }, ]; - const resources: QualityDefinitionResource[] = [ + const resources: MergedQualityDefinitionResource[] = [ { id: 1, title: "HDTV-1080p", weight: 2, quality: { id: 1, name: "HDTV-1080p" } }, { id: 2, title: "WEBDL-1080p", weight: 2, quality: { id: 2, name: "WEBDL-1080p" } }, { id: 3, title: "WEBRip-1080p", weight: 2, quality: { id: 3, name: "WEBRip-1080p" } }, @@ -156,7 +156,7 @@ describe("QualityProfiles", async () => { { name: "HDTV-1080p", enabled: false }, ]; - const resources: QualityDefinitionResource[] = [ + const resources: MergedQualityDefinitionResource[] = [ { id: 1, title: "HDTV-1080p", weight: 2, quality: { id: 1, name: "HDTV-1080p" } }, { id: 2, title: "WEBDL-1080p", weight: 2, quality: { id: 2, name: "WEBDL-1080p" } }, { id: 3, title: "WEBRip-1080p", weight: 2, quality: { id: 3, name: "WEBRip-1080p" } }, diff --git a/src/quality-profiles.ts b/src/quality-profiles.ts index 662c7e5..42c8b78 100644 --- a/src/quality-profiles.ts +++ b/src/quality-profiles.ts @@ -1,11 +1,11 @@ import path from "node:path"; import { - CustomFormatResource, - ProfileFormatItemResource, - QualityDefinitionResource, - QualityProfileQualityItemResource, - QualityProfileResource, -} from "./__generated__/generated-sonarr-api"; + MergedCustomFormatResource, + MergedProfileFormatItemResource, + MergedQualityDefinitionResource, + MergedQualityProfileQualityItemResource, + MergedQualityProfileResource, +} from "./__generated__/mergedTypes"; import { getArrApi } from "./api"; import { loadServerCustomFormats } from "./custom-formats"; import { logger } from "./logger"; @@ -19,7 +19,7 @@ export const mapQualityProfiles = ( config: RecyclarrMergedTemplates, ) => { // QualityProfile -> (CF Name -> Scoring) - const profileScores = new Map>(); + const profileScores = new Map>(); const defaultScoringMap = new Map(config.quality_profiles.map((obj) => [obj.name, obj])); @@ -72,33 +72,34 @@ export const mapQualityProfiles = ( return profileScores; }; -export const loadQualityProfilesFromServer = async (): Promise => { +export const loadQualityProfilesFromServer = async (): Promise => { if (IS_LOCAL_SAMPLE_MODE) { return loadJsonFile(path.resolve(__dirname, `../tests/samples/quality_profiles.json`)); } const api = getArrApi(); - const qualityProfiles = await api.v3QualityprofileList(); - return qualityProfiles.data as QualityProfileResource[]; + const qualityProfiles = await api.v3QualityprofileList().json(); + // TODO type hack + return qualityProfiles as MergedQualityDefinitionResource[]; }; // TODO should we use clones or not? -export const mapQualities = (qd_source: QualityDefinitionResource[], value_source: ConfigQualityProfile) => { +export const mapQualities = (qd_source: MergedQualityDefinitionResource[], value_source: ConfigQualityProfile) => { const qd = cloneWithJSON(qd_source); const value = cloneWithJSON(value_source); const qdMap = new Map(qd.map((obj) => [obj.title, obj])); - const allowedQualities: QualityProfileQualityItemResource[] = value.qualities.map((obj, i) => { + const allowedQualities = value.qualities.map((obj, i) => { if (obj.qualities?.length && obj.qualities.length > 0) { return { allowed: obj.enabled ?? true, id: 1000 + i, name: obj.name, - items: obj.qualities?.map((obj2) => { + items: obj.qualities?.map((obj2) => { const qd = qdMap.get(obj2); - const returnObject: QualityProfileQualityItemResource = { + const returnObject: MergedQualityProfileQualityItemResource = { quality: { id: qd?.quality?.id, name: obj2, @@ -122,17 +123,18 @@ export const mapQualities = (qd_source: QualityDefinitionResource[], value_sourc qdMap.delete(obj.name); - return { + const item: MergedQualityProfileQualityItemResource = { allowed: obj.enabled ?? true, items: [], quality: { ...serverQD?.quality, }, }; + return item; } }); - const missingQualities: QualityProfileQualityItemResource[] = []; + const missingQualities: MergedQualityProfileQualityItemResource[] = []; for (const [key, value] of qdMap.entries()) { missingQualities.push({ @@ -220,25 +222,25 @@ export const isOrderOfQualitiesEqual = (obj1: ConfigQualityProfileItem[], obj2: export const calculateQualityProfilesDiff = async ( qpMerged: Map, - scoring: Map>, - serverQP: QualityProfileResource[], + scoring: Map>, + serverQP: MergedQualityProfileResource[], ): Promise<{ - changedQPs: QualityProfileResource[]; - create: QualityProfileResource[]; + changedQPs: MergedQualityProfileResource[]; + create: MergedQualityProfileResource[]; noChanges: string[]; }> => { const mappedServerQP = serverQP.reduce((p, c) => { p.set(c.name!, c); return p; - }, new Map()); + }, new Map()); // TODO can be optimized const qd = await loadQualityDefinitionFromServer(); const cfsFromServer = await loadServerCustomFormats(); const cfsServerMap = new Map(cfsFromServer.map((obj) => [obj.name!, obj])); - const createQPs: QualityProfileResource[] = []; - const changedQPs: QualityProfileResource[] = []; + const createQPs: MergedQualityProfileResource[] = []; + const changedQPs: MergedQualityProfileResource[] = []; const noChangedQPs: string[] = []; const changes = new Map(); @@ -270,9 +272,9 @@ export const calculateQualityProfilesDiff = async ( return p; }, new Map()); - const cfs: Map = new Map(JSON.parse(JSON.stringify(Array.from(cfsServerMap)))); + const cfs: Map = new Map(JSON.parse(JSON.stringify(Array.from(cfsServerMap)))); - const customFormatsMapped = Array.from(cfs.values()).map((e) => { + const customFormatsMapped = Array.from(cfs.values()).map((e) => { let score = 0; if (scoringForQP) { @@ -302,7 +304,7 @@ export const calculateQualityProfilesDiff = async ( const changeList: string[] = []; changes.set(serverMatch.name!, changeList); - const updatedServerObject: QualityProfileResource = JSON.parse(JSON.stringify(serverMatch)); + const updatedServerObject: MergedQualityProfileResource = JSON.parse(JSON.stringify(serverMatch)); let diffExist = false; @@ -415,7 +417,7 @@ export const calculateQualityProfilesDiff = async ( let scoringDiff = false; if (scoringForQP) { - const newCFFormats: ProfileFormatItemResource[] = []; + const newCFFormats: MergedProfileFormatItemResource[] = []; for (const [scoreKey, scoreValue] of scoringForQP.entries()) { const serverCF = serverCFMap.get(scoreKey); @@ -441,7 +443,7 @@ export const calculateQualityProfilesDiff = async ( } } - const missingCfs = Array.from(serverCFMap.values()).reduce((p, c) => { + const missingCfs = Array.from(serverCFMap.values()).reduce((p, c) => { const cfName = c.name!; const cfScore = c.score; diff --git a/src/trash-guide.ts b/src/trash-guide.ts index b7adccf..993f97e 100644 --- a/src/trash-guide.ts +++ b/src/trash-guide.ts @@ -1,7 +1,7 @@ import fs from "node:fs"; import path from "node:path"; import { CheckRepoActions, simpleGit } from "simple-git"; -import { CustomFormatResource } from "./__generated__/generated-sonarr-api"; +import { MergedCustomFormatResource } from "./__generated__/mergedTypes"; import { getConfig } from "./config"; import { logger } from "./logger"; import { @@ -56,7 +56,7 @@ export const loadSonarrTrashCFs = async (arrType: ArrType): Promise(); + const carrIdToObject = new Map(); const cfNameToCarrObject = new Map(); let pathForFiles: string; diff --git a/src/types.ts b/src/types.ts index eb4fc70..a5db638 100644 --- a/src/types.ts +++ b/src/types.ts @@ -1,4 +1,4 @@ -import { CustomFormatResource, CustomFormatSpecificationSchema } from "./__generated__/generated-sonarr-api"; +import { MergedCustomFormatResource, MergedCustomFormatSpecificationSchema } from "./__generated__/mergedTypes"; export type DynamicImportType = { default: T }; @@ -10,7 +10,7 @@ type RequireAtLeastOne = { export type UserFriendlyField = { name?: string | null; // TODO validate if this can really appear? As Input value?: any; -} & Pick; +} & Pick; export type TrashCFSpF = { min: number; max: number; exceptLanguage: boolean; value: any }; @@ -28,19 +28,19 @@ export type CustomFormatImportImplementation = | "ResolutionSpecification" // value number | "ReleaseGroupSpecification"; // value string -export type TC1 = Omit & { +export type TC1 = Omit & { implementation: "ReleaseTitleSpecification" | "LanguageSpecification"; fields?: RequireAtLeastOne | null; }; -export type TC2 = Omit & { +export type TC2 = Omit & { implementation: "SizeSpecification"; fields?: RequireAtLeastOne; }; export type TCM = TC1 | TC2; -export type ImportCF = Omit & { +export type ImportCF = Omit & { specifications?: TCM[] | null; }; @@ -74,7 +74,7 @@ export type CFProcessing = { string, { carrConfig: ConfigarrCF; - requestConfig: CustomFormatResource; + requestConfig: MergedCustomFormatResource; } >; cfNameToCarrConfig: Map; diff --git a/src/util.test.ts b/src/util.test.ts index 30fe81a..f1016b7 100644 --- a/src/util.test.ts +++ b/src/util.test.ts @@ -1,7 +1,6 @@ import path from "path"; import { describe, expect, test } from "vitest"; -import { CustomFormatResource as CustomFormatResourceRadarr, PrivacyLevel } from "./__generated__/generated-radarr-api"; -import { CustomFormatResource } from "./__generated__/generated-sonarr-api"; +import { MergedCustomFormatResource } from "./__generated__/mergedTypes"; import { TrashCF, TrashCFSpF } from "./types"; import { cloneWithJSON, compareObjectsCarr, loadJsonFile, mapImportCfToRequestCf, toCarrCF } from "./util"; @@ -76,7 +75,7 @@ const exampleCFImplementations = { }; describe("SizeSpecification", async () => { - const serverResponse: CustomFormatResource = { + const serverResponse: MergedCustomFormatResource = { id: 103, name: "Size: Block More 40GB", includeCustomFormatWhenRenaming: false, @@ -98,7 +97,6 @@ describe("SizeSpecification", async () => { value: 1, type: "number", advanced: false, - privacy: PrivacyLevel.Normal, isFloat: true, }, { @@ -110,7 +108,6 @@ describe("SizeSpecification", async () => { value: 9, type: "number", advanced: false, - privacy: PrivacyLevel.Normal, isFloat: true, }, ], @@ -174,7 +171,7 @@ describe("SizeSpecification", async () => { describe("compareObjectsCarr - general", async () => { const filePath = path.resolve(__dirname, "../tests/samples/20240930_cf_exceptLanguage.json"); - const serverResponse = loadJsonFile(filePath); + const serverResponse = loadJsonFile(filePath); const custom: TrashCF = { trash_id: "test123", diff --git a/src/util.ts b/src/util.ts index 38c12e3..8a8ed61 100644 --- a/src/util.ts +++ b/src/util.ts @@ -1,6 +1,6 @@ import { readFileSync } from "node:fs"; import path from "node:path"; -import { CustomFormatResource } from "./__generated__/generated-sonarr-api"; +import { MergedCustomFormatResource } from "./__generated__/mergedTypes"; import { logger } from "./logger"; import { ConfigarrCF, ImportCF, TrashCF, UserFriendlyField } from "./types"; @@ -62,7 +62,7 @@ export const toCarrCF = (input: TrashCF | ConfigarrCF): ConfigarrCF => { return trashToCarrCF(input); }; -export const mapImportCfToRequestCf = (cf: TrashCF | ConfigarrCF): CustomFormatResource => { +export const mapImportCfToRequestCf = (cf: TrashCF | ConfigarrCF): MergedCustomFormatResource => { let customId; let rest: ImportCF;