From b1fa47b2ac1d69a7f3e0937039b95e9f48e74ef2 Mon Sep 17 00:00:00 2001 From: Eduard Marbach Date: Sun, 17 Nov 2024 21:49:25 +0100 Subject: [PATCH] feat: add experimental support for readarr * this commit is not functional because the API of readarr is different then the other current available *arr projects (v1 vs v3 endpoints) --- README.md | 7 + docs/docs/configuration/config-file.md | 28 +- .../configuration/experimental-support.md | 123 +- examples/full/config/config.yml | 40 + examples/full/config/secrets.yml | 1 + examples/full/docker-compose.yml | 18 + examples/full/readarr.xml | 17 + examples/full/templates/readarr.yml | 13 + generate-api.ts | 13 + src/__generated__/readarr/Api.ts | 4271 +++++++++++++++++ src/__generated__/readarr/Content.ts | 36 + src/__generated__/readarr/Feed.ts | 55 + src/__generated__/readarr/Login.ts | 64 + src/__generated__/readarr/Logout.ts | 36 + src/__generated__/readarr/Path.ts | 36 + src/__generated__/readarr/Ping.ts | 54 + src/__generated__/readarr/data-contracts.ts | 1980 ++++++++ src/api.ts | 17 +- src/config.ts | 1 + src/index.ts | 20 + src/types/common.types.ts | 2 +- src/types/config.types.ts | 1 + 22 files changed, 6801 insertions(+), 32 deletions(-) create mode 100644 examples/full/readarr.xml create mode 100644 examples/full/templates/readarr.yml create mode 100644 src/__generated__/readarr/Api.ts create mode 100644 src/__generated__/readarr/Content.ts create mode 100644 src/__generated__/readarr/Feed.ts create mode 100644 src/__generated__/readarr/Login.ts create mode 100644 src/__generated__/readarr/Logout.ts create mode 100644 src/__generated__/readarr/Path.ts create mode 100644 src/__generated__/readarr/Ping.ts create mode 100644 src/__generated__/readarr/data-contracts.ts diff --git a/README.md b/README.md index b5d3d84..f921247 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,13 @@ Other projects: - Provide CFs directly in config (Convert JSON with https://www.bairesdev.com/tools/json2yaml/) - Merge order is `TrashGuide -> LocalFiles -> CFs in Config` +### Supported \*arr Applications + +- Radarr +- Sonarr +- Whisparr (experimental) +- Readarr (experimental) + ## Configuration Full documentation can be found here: https://configarr.raydak.de diff --git a/docs/docs/configuration/config-file.md b/docs/docs/configuration/config-file.md index e877d7e..9d0d0c7 100644 --- a/docs/docs/configuration/config-file.md +++ b/docs/docs/configuration/config-file.md @@ -162,32 +162,10 @@ radarr: min_format_score: 200 # experimental support: check https://configarr.rayak.de/docs/configuration/experimental-support -whisparr: - instance1: # Instance name (can be any unique identifier) - base_url: http://whisparr:6969 # instance URL - api_key: !secret WHISPARR_API_KEY # Reference to API key in secrets.yml - - quality_definition: - type: movies # TODO: not checked yet - - include: - # only custom defined templates available - - template: whisparr - - custom_formats: # Custom format assignments - - trash_ids: - - example-in-config-cf - assign_scores_to: - - name: ExampleProfile - score: 1000 +whisparr: {} - quality_profiles: - # TODO: language not correctly mapped - - name: ExampleProfile - upgrade: - until_score: 200 - # Not supported in whisparr - #min_format_score: 200 +# experimental support: check https://configarr.rayak.de/docs/configuration/experimental-support +readarr: {} ``` ### secrets.yml diff --git a/docs/docs/configuration/experimental-support.md b/docs/docs/configuration/experimental-support.md index 2294543..5a95d17 100644 --- a/docs/docs/configuration/experimental-support.md +++ b/docs/docs/configuration/experimental-support.md @@ -2,7 +2,7 @@ sidebar_position: 2 title: Experimental Support description: "Experimental and testing support for other *Arr tools" -keywords: [configarr configuration, yaml config, custom formats, expermintal, whisparr] +keywords: [configarr configuration, yaml config, custom formats, expermintal, whisparr, readarr] --- # Experimental support @@ -29,3 +29,124 @@ Following things are currently not supported or tested: ``` - initial language of quality profiles is not correct -> `0` - no available presets because nothings provided in trash guide or recyclarr -> needs to be done manually with local templates and custom formats + +### Configuration File + +Check [configuration file reference](/docs/configuration/config-file#custom-format-definitions) for more information. + +Specifics for Whisparr: + +```yaml title="config.yml" +localCustomFormatsPath: /app/cfs +localConfigTemplatesPath: /app/templates + +customFormatDefinitions: + - trash_id: example-in-config-cf + trash_scores: + default: -10000 + trash_description: "Language: German Only" + name: "Language: Not German" + includeCustomFormatWhenRenaming: false + specifications: + - name: Not German Language + implementation: LanguageSpecification + negate: true + required: false + fields: + value: 4 + +# experimental support: check https://configarr.rayak.de/docs/configuration/experimental-support +whisparr: + instance1: # Instance name (can be any unique identifier) + base_url: http://whisparr:6969 # instance URL + api_key: !secret WHISPARR_API_KEY # Reference to API key in secrets.yml + + quality_definition: + type: movies # TODO: not checked yet + + include: + # only custom defined templates available + - template: whisparr + + custom_formats: # Custom format assignments + - trash_ids: + - example-in-config-cf + assign_scores_to: + - name: ExampleProfile + score: 1000 + + quality_profiles: + # TODO: language not correctly mapped + - name: ExampleProfile + upgrade: + until_score: 200 + # Not supported in whisparr + #min_format_score: 200 +``` + +## Readarr v1 + +Experimental support for Readarr was added with [v1.5.0](https://github.com/raydak-labs/configarr/releases/tag/v1.4.0). + +Configuration is mostly equal to the Sonarr or Radarr. + +Following things are currently not supported or tested: + +- quality definition preset is not evaluated + ```yaml + quality_definition: + type: movies # not checked yet + ``` +- metadata profiles are not supported. This is a specific thing to readarr and requires custom implementation and breaking out of some abstraction layer we have in the code +- no available presets because nothings provided in trash guide or recyclarr -> needs to be done manually with local templates and custom formats + +### Configuration File + +Check [configuration file reference](/docs/configuration/config-file#custom-format-definitions) for more information. + +Specifics for Whisparr: + +```yaml title="config.yml" +localCustomFormatsPath: /app/cfs +localConfigTemplatesPath: /app/templates + +customFormatDefinitions: + - trash_id: example-release-title-cf + trash_scores: + default: 0 + name: ExampleReleaseTitleCF + includeCustomFormatWhenRenaming: false + specifications: + - name: Preferred Words + implementation: ReleaseTitleSpecification + negate: false + required: false + fields: + value: "\\b(SPARKS|Framestor)\\b" + +# experimental support: check https://configarr.rayak.de/docs/configuration/experimental-support +readarr: + instance1: # Instance name (can be any unique identifier) + base_url: http://readarr:8787 # instance URL + api_key: !secret READARR_API_KEY # Reference to API key in secrets.yml + + # not supported + # quality_definition: + # type: movies # Quality definition type + + include: + # only custom defined templates available + - template: readarr + + custom_formats: # Custom format assignments + - trash_ids: + - example-release-title-cf + assign_scores_to: + - name: ExampleProfile + score: 1000 + + quality_profiles: + - name: ExampleProfile + upgrade: + until_score: 200 +``` diff --git a/examples/full/config/config.yml b/examples/full/config/config.yml index 94c03ab..550ef95 100644 --- a/examples/full/config/config.yml +++ b/examples/full/config/config.yml @@ -17,6 +17,18 @@ customFormatDefinitions: required: false fields: value: 4 + - trash_id: example-release-title-cf + trash_scores: + default: 0 + name: ExampleReleaseTitleCF + includeCustomFormatWhenRenaming: false + specifications: + - name: Preferred Words + implementation: ReleaseTitleSpecification + negate: false + required: false + fields: + value: "\\b(SPARKS|Framestor)\\b" sonarr: instance1: @@ -107,3 +119,31 @@ whisparr: until_score: 200 # Not supported in whisparr #min_format_score: 200 + +readarr: + instance1: # Instance name (can be any unique identifier) + base_url: http://readarr:8787 # instance URL + api_key: !secret READARR_API_KEY # Reference to API key in secrets.yml + + # not supported + # quality_definition: + # type: movies # Quality definition type + + include: + # only custom defined templates available + - template: readarr + + custom_formats: # Custom format assignments + - trash_ids: + - example-release-title-cf + assign_scores_to: + - name: ExampleProfile + score: 1000 + + quality_profiles: + # TODO: language not correctly mapped + - name: ExampleProfile + upgrade: + until_score: 200 + # Not supported in whisparr + #min_format_score: 200 diff --git a/examples/full/config/secrets.yml b/examples/full/config/secrets.yml index e6a9e6b..ed4df26 100644 --- a/examples/full/config/secrets.yml +++ b/examples/full/config/secrets.yml @@ -1,3 +1,4 @@ SONARR_API_KEY: 5e792b7e0fe14f58b8e92bf0902d4a44 RADARR_API_KEY: 0daa3a2b940f4e08bac991e9a30e9e12 WHISPARR_API_KEY: 2ebd18db81e14c2d98d06ef4b865aaa8 +READARR_API_KEY: e001718ba38a424d8aae7cb391b5d27a diff --git a/examples/full/docker-compose.yml b/examples/full/docker-compose.yml index 764c131..eca04d0 100644 --- a/examples/full/docker-compose.yml +++ b/examples/full/docker-compose.yml @@ -29,6 +29,7 @@ services: - 6501:7878 restart: unless-stopped + # experimental whisparr: image: ghcr.io/hotio/whisparr:v3-3.0.0.695 networks: @@ -45,6 +46,22 @@ services: - ${PWD}/whisparr.xml:/config/config.xml:rw restart: unless-stopped + # experimental + readarr: + image: lscr.io/linuxserver/readarr:develop-0.4.3.2665-ls130 + networks: + - configarr-full + environment: + - PUID=1000 + - PGID=1000 + - TZ=Etc/UTC + volumes: + - readarr:/config + - ${PWD}/readarr.xml:/config/config.xml:rw + ports: + - 6503:8787 + restart: unless-stopped + networks: configarr-full: name: configarr-full @@ -53,3 +70,4 @@ volumes: sonarr: radarr: whisparr: + readarr: diff --git a/examples/full/readarr.xml b/examples/full/readarr.xml new file mode 100644 index 0000000..c45c3a0 --- /dev/null +++ b/examples/full/readarr.xml @@ -0,0 +1,17 @@ + + * + 8787 + 6868 + False + True + e001718ba38a424d8aae7cb391b5d27a + Basic + DisabledForLocalAddresses + develop + debug + + + + Readarr + Docker + \ No newline at end of file diff --git a/examples/full/templates/readarr.yml b/examples/full/templates/readarr.yml new file mode 100644 index 0000000..4be7997 --- /dev/null +++ b/examples/full/templates/readarr.yml @@ -0,0 +1,13 @@ +quality_profiles: + - name: ExampleProfile + reset_unmatched_scores: + enabled: true + upgrade: + allowed: true + until_quality: MOBI + until_score: 1000 + min_format_score: 5 + quality_sort: top + qualities: + - name: EPUB + - name: MOBI diff --git a/generate-api.ts b/generate-api.ts index 7a87449..b09bdb0 100644 --- a/generate-api.ts +++ b/generate-api.ts @@ -6,6 +6,7 @@ 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 PATH_WHISPARR_DIR = path.resolve(PATH_TO_OUTPUT_DIR, "whisparr"); +const PATH_READARR_DIR = path.resolve(PATH_TO_OUTPUT_DIR, "readarr"); const main = async () => { await generateApi({ @@ -41,9 +42,21 @@ const main = async () => { }, }); + await generateApi({ + output: PATH_READARR_DIR, + url: "https://raw.githubusercontent.com/Readarr/Readarr/develop/src/Readarr.Api.V1/openapi.json", + modular: true, + singleHttpClient: true, + // @ts-ignore 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")); unlinkSync(path.resolve(PATH_WHISPARR_DIR, "..ts")); + unlinkSync(path.resolve(PATH_READARR_DIR, "..ts")); }; main(); diff --git a/src/__generated__/readarr/Api.ts b/src/__generated__/readarr/Api.ts new file mode 100644 index 0000000..78db64b --- /dev/null +++ b/src/__generated__/readarr/Api.ts @@ -0,0 +1,4271 @@ +/* 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 { + ApiInfoResource, + AuthorEditorResource, + AuthorResource, + BackupResource, + BlocklistBulkResource, + BlocklistResourcePagingResource, + BookEditorResource, + BookFileListResource, + BookFileResource, + BookResource, + BookResourcePagingResource, + BooksMonitoredResource, + BookshelfResource, + CommandResource, + CustomFilterResource, + CustomFormatResource, + DelayProfileResource, + DevelopmentConfigResource, + DiskSpaceResource, + DownloadClientBulkResource, + DownloadClientConfigResource, + DownloadClientResource, + EditionResource, + EntityHistoryEventType, + HealthResource, + HistoryResource, + HistoryResourcePagingResource, + HostConfigResource, + ImportListBulkResource, + ImportListExclusionResource, + ImportListResource, + IndexerBulkResource, + IndexerConfigResource, + IndexerFlagResource, + IndexerResource, + LanguageResource, + LogFileResource, + LogResourcePagingResource, + ManualImportResource, + ManualImportUpdateResource, + MediaManagementConfigResource, + MetadataProfileResource, + MetadataProviderConfigResource, + MetadataResource, + NamingConfigResource, + NotificationResource, + ParseResource, + QualityDefinitionResource, + QualityProfileResource, + QueueBulkResource, + QueueResource, + QueueResourcePagingResource, + QueueStatusResource, + ReleaseProfileResource, + ReleaseResource, + RemotePathMappingResource, + RenameBookResource, + RetagBookResource, + RootFolderResource, + 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, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Author + * @name V1AuthorList + * @request GET:/api/v1/author + * @secure + */ + v1AuthorList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/author`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Author + * @name V1AuthorCreate + * @request POST:/api/v1/author + * @secure + */ + v1AuthorCreate = (data: AuthorResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/author`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Author + * @name V1AuthorUpdate + * @request PUT:/api/v1/author/{id} + * @secure + */ + v1AuthorUpdate = ( + id: string, + data: AuthorResource, + query?: { + /** @default false */ + moveFiles?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v1/author/${id}`, + method: "PUT", + query: query, + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Author + * @name V1AuthorDelete + * @request DELETE:/api/v1/author/{id} + * @secure + */ + v1AuthorDelete = ( + id: number, + query?: { + /** @default false */ + deleteFiles?: boolean; + /** @default false */ + addImportListExclusion?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v1/author/${id}`, + method: "DELETE", + query: query, + secure: true, + ...params, + }); + /** + * No description + * + * @tags Author + * @name V1AuthorDetail + * @request GET:/api/v1/author/{id} + * @secure + */ + v1AuthorDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/author/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags AuthorEditor + * @name V1AuthorEditorUpdate + * @request PUT:/api/v1/author/editor + * @secure + */ + v1AuthorEditorUpdate = (data: AuthorEditorResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/author/editor`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags AuthorEditor + * @name V1AuthorEditorDelete + * @request DELETE:/api/v1/author/editor + * @secure + */ + v1AuthorEditorDelete = (data: AuthorEditorResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/author/editor`, + method: "DELETE", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags AuthorLookup + * @name V1AuthorLookupList + * @request GET:/api/v1/author/lookup + * @secure + */ + v1AuthorLookupList = ( + query?: { + term?: string; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v1/author/lookup`, + method: "GET", + query: query, + secure: true, + ...params, + }); + /** + * No description + * + * @tags Backup + * @name V1SystemBackupList + * @request GET:/api/v1/system/backup + * @secure + */ + v1SystemBackupList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/system/backup`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Backup + * @name V1SystemBackupDelete + * @request DELETE:/api/v1/system/backup/{id} + * @secure + */ + v1SystemBackupDelete = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/system/backup/${id}`, + method: "DELETE", + secure: true, + ...params, + }); + /** + * No description + * + * @tags Backup + * @name V1SystemBackupRestoreCreate + * @request POST:/api/v1/system/backup/restore/{id} + * @secure + */ + v1SystemBackupRestoreCreate = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/system/backup/restore/${id}`, + method: "POST", + secure: true, + ...params, + }); + /** + * No description + * + * @tags Backup + * @name V1SystemBackupRestoreUploadCreate + * @request POST:/api/v1/system/backup/restore/upload + * @secure + */ + v1SystemBackupRestoreUploadCreate = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/system/backup/restore/upload`, + method: "POST", + secure: true, + ...params, + }); + /** + * No description + * + * @tags Blocklist + * @name V1BlocklistList + * @request GET:/api/v1/blocklist + * @secure + */ + v1BlocklistList = ( + query?: { + /** + * @format int32 + * @default 1 + */ + page?: number; + /** + * @format int32 + * @default 10 + */ + pageSize?: number; + sortKey?: string; + sortDirection?: SortDirection; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v1/blocklist`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Blocklist + * @name V1BlocklistDelete + * @request DELETE:/api/v1/blocklist/{id} + * @secure + */ + v1BlocklistDelete = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/blocklist/${id}`, + method: "DELETE", + secure: true, + ...params, + }); + /** + * No description + * + * @tags Blocklist + * @name V1BlocklistBulkDelete + * @request DELETE:/api/v1/blocklist/bulk + * @secure + */ + v1BlocklistBulkDelete = (data: BlocklistBulkResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/blocklist/bulk`, + method: "DELETE", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags Book + * @name V1BookList + * @request GET:/api/v1/book + * @secure + */ + v1BookList = ( + query?: { + /** @format int32 */ + authorId?: number; + bookIds?: number[]; + titleSlug?: string; + /** @default false */ + includeAllAuthorBooks?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v1/book`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Book + * @name V1BookCreate + * @request POST:/api/v1/book + * @secure + */ + v1BookCreate = (data: BookResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/book`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Book + * @name V1BookOverviewDetail + * @request GET:/api/v1/book/{id}/overview + * @secure + */ + v1BookOverviewDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/book/${id}/overview`, + method: "GET", + secure: true, + ...params, + }); + /** + * No description + * + * @tags Book + * @name V1BookUpdate + * @request PUT:/api/v1/book/{id} + * @secure + */ + v1BookUpdate = (id: string, data: BookResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/book/${id}`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Book + * @name V1BookDelete + * @request DELETE:/api/v1/book/{id} + * @secure + */ + v1BookDelete = ( + id: number, + query?: { + /** @default false */ + deleteFiles?: boolean; + /** @default false */ + addImportListExclusion?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v1/book/${id}`, + method: "DELETE", + query: query, + secure: true, + ...params, + }); + /** + * No description + * + * @tags Book + * @name V1BookDetail + * @request GET:/api/v1/book/{id} + * @secure + */ + v1BookDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/book/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Book + * @name V1BookMonitorUpdate + * @request PUT:/api/v1/book/monitor + * @secure + */ + v1BookMonitorUpdate = (data: BooksMonitoredResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/book/monitor`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags BookEditor + * @name V1BookEditorUpdate + * @request PUT:/api/v1/book/editor + * @secure + */ + v1BookEditorUpdate = (data: BookEditorResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/book/editor`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags BookEditor + * @name V1BookEditorDelete + * @request DELETE:/api/v1/book/editor + * @secure + */ + v1BookEditorDelete = (data: BookEditorResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/book/editor`, + method: "DELETE", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags BookFile + * @name V1BookfileList + * @request GET:/api/v1/bookfile + * @secure + */ + v1BookfileList = ( + query?: { + /** @format int32 */ + authorId?: number; + bookFileIds?: number[]; + bookId?: number[]; + unmapped?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v1/bookfile`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags BookFile + * @name V1BookfileUpdate + * @request PUT:/api/v1/bookfile/{id} + * @secure + */ + v1BookfileUpdate = (id: string, data: BookFileResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/bookfile/${id}`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags BookFile + * @name V1BookfileDelete + * @request DELETE:/api/v1/bookfile/{id} + * @secure + */ + v1BookfileDelete = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/bookfile/${id}`, + method: "DELETE", + secure: true, + ...params, + }); + /** + * No description + * + * @tags BookFile + * @name V1BookfileDetail + * @request GET:/api/v1/bookfile/{id} + * @secure + */ + v1BookfileDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/bookfile/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags BookFile + * @name V1BookfileEditorUpdate + * @request PUT:/api/v1/bookfile/editor + * @secure + */ + v1BookfileEditorUpdate = (data: BookFileListResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/bookfile/editor`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags BookFile + * @name V1BookfileBulkDelete + * @request DELETE:/api/v1/bookfile/bulk + * @secure + */ + v1BookfileBulkDelete = (data: BookFileListResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/bookfile/bulk`, + method: "DELETE", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags BookLookup + * @name V1BookLookupList + * @request GET:/api/v1/book/lookup + * @secure + */ + v1BookLookupList = ( + query?: { + term?: string; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v1/book/lookup`, + method: "GET", + query: query, + secure: true, + ...params, + }); + /** + * No description + * + * @tags Bookshelf + * @name V1BookshelfCreate + * @request POST:/api/v1/bookshelf + * @secure + */ + v1BookshelfCreate = (data: BookshelfResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/bookshelf`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags Calendar + * @name V1CalendarList + * @request GET:/api/v1/calendar + * @secure + */ + v1CalendarList = ( + query?: { + /** @format date-time */ + start?: string; + /** @format date-time */ + end?: string; + /** @default false */ + unmonitored?: boolean; + /** @default false */ + includeAuthor?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v1/calendar`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Calendar + * @name V1CalendarDetail + * @request GET:/api/v1/calendar/{id} + * @secure + */ + v1CalendarDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/calendar/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Command + * @name V1CommandCreate + * @request POST:/api/v1/command + * @secure + */ + v1CommandCreate = (data: CommandResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/command`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Command + * @name V1CommandList + * @request GET:/api/v1/command + * @secure + */ + v1CommandList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/command`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Command + * @name V1CommandDelete + * @request DELETE:/api/v1/command/{id} + * @secure + */ + v1CommandDelete = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/command/${id}`, + method: "DELETE", + secure: true, + ...params, + }); + /** + * No description + * + * @tags Command + * @name V1CommandDetail + * @request GET:/api/v1/command/{id} + * @secure + */ + v1CommandDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/command/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags CustomFilter + * @name V1CustomfilterList + * @request GET:/api/v1/customfilter + * @secure + */ + v1CustomfilterList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/customfilter`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags CustomFilter + * @name V1CustomfilterCreate + * @request POST:/api/v1/customfilter + * @secure + */ + v1CustomfilterCreate = (data: CustomFilterResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/customfilter`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags CustomFilter + * @name V1CustomfilterUpdate + * @request PUT:/api/v1/customfilter/{id} + * @secure + */ + v1CustomfilterUpdate = (id: string, data: CustomFilterResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/customfilter/${id}`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags CustomFilter + * @name V1CustomfilterDelete + * @request DELETE:/api/v1/customfilter/{id} + * @secure + */ + v1CustomfilterDelete = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/customfilter/${id}`, + method: "DELETE", + secure: true, + ...params, + }); + /** + * No description + * + * @tags CustomFilter + * @name V1CustomfilterDetail + * @request GET:/api/v1/customfilter/{id} + * @secure + */ + v1CustomfilterDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/customfilter/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags CustomFormat + * @name V1CustomformatCreate + * @request POST:/api/v1/customformat + * @secure + */ + v1CustomformatCreate = (data: CustomFormatResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/customformat`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags CustomFormat + * @name V1CustomformatList + * @request GET:/api/v1/customformat + * @secure + */ + v1CustomformatList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/customformat`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags CustomFormat + * @name V1CustomformatUpdate + * @request PUT:/api/v1/customformat/{id} + * @secure + */ + v1CustomformatUpdate = (id: string, data: CustomFormatResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/customformat/${id}`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags CustomFormat + * @name V1CustomformatDelete + * @request DELETE:/api/v1/customformat/{id} + * @secure + */ + v1CustomformatDelete = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/customformat/${id}`, + method: "DELETE", + secure: true, + ...params, + }); + /** + * No description + * + * @tags CustomFormat + * @name V1CustomformatDetail + * @request GET:/api/v1/customformat/{id} + * @secure + */ + v1CustomformatDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/customformat/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags CustomFormat + * @name V1CustomformatSchemaList + * @request GET:/api/v1/customformat/schema + * @secure + */ + v1CustomformatSchemaList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/customformat/schema`, + method: "GET", + secure: true, + ...params, + }); + /** + * No description + * + * @tags Cutoff + * @name V1WantedCutoffList + * @request GET:/api/v1/wanted/cutoff + * @secure + */ + v1WantedCutoffList = ( + query?: { + /** + * @format int32 + * @default 1 + */ + page?: number; + /** + * @format int32 + * @default 10 + */ + pageSize?: number; + sortKey?: string; + sortDirection?: SortDirection; + /** @default false */ + includeAuthor?: boolean; + /** @default true */ + monitored?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v1/wanted/cutoff`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Cutoff + * @name V1WantedCutoffDetail + * @request GET:/api/v1/wanted/cutoff/{id} + * @secure + */ + v1WantedCutoffDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/wanted/cutoff/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags DelayProfile + * @name V1DelayprofileCreate + * @request POST:/api/v1/delayprofile + * @secure + */ + v1DelayprofileCreate = (data: DelayProfileResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/delayprofile`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags DelayProfile + * @name V1DelayprofileList + * @request GET:/api/v1/delayprofile + * @secure + */ + v1DelayprofileList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/delayprofile`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags DelayProfile + * @name V1DelayprofileDelete + * @request DELETE:/api/v1/delayprofile/{id} + * @secure + */ + v1DelayprofileDelete = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/delayprofile/${id}`, + method: "DELETE", + secure: true, + ...params, + }); + /** + * No description + * + * @tags DelayProfile + * @name V1DelayprofileUpdate + * @request PUT:/api/v1/delayprofile/{id} + * @secure + */ + v1DelayprofileUpdate = (id: string, data: DelayProfileResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/delayprofile/${id}`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags DelayProfile + * @name V1DelayprofileDetail + * @request GET:/api/v1/delayprofile/{id} + * @secure + */ + v1DelayprofileDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/delayprofile/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags DelayProfile + * @name V1DelayprofileReorderUpdate + * @request PUT:/api/v1/delayprofile/reorder/{id} + * @secure + */ + v1DelayprofileReorderUpdate = ( + id: number, + query?: { + /** @format int32 */ + afterId?: number; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v1/delayprofile/reorder/${id}`, + method: "PUT", + query: query, + secure: true, + ...params, + }); + /** + * No description + * + * @tags DevelopmentConfig + * @name V1ConfigDevelopmentList + * @request GET:/api/v1/config/development + * @secure + */ + v1ConfigDevelopmentList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/config/development`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags DevelopmentConfig + * @name V1ConfigDevelopmentUpdate + * @request PUT:/api/v1/config/development/{id} + * @secure + */ + v1ConfigDevelopmentUpdate = (id: string, data: DevelopmentConfigResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/config/development/${id}`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags DevelopmentConfig + * @name V1ConfigDevelopmentDetail + * @request GET:/api/v1/config/development/{id} + * @secure + */ + v1ConfigDevelopmentDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/config/development/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags DiskSpace + * @name V1DiskspaceList + * @request GET:/api/v1/diskspace + * @secure + */ + v1DiskspaceList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/diskspace`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags DownloadClient + * @name V1DownloadclientList + * @request GET:/api/v1/downloadclient + * @secure + */ + v1DownloadclientList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/downloadclient`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags DownloadClient + * @name V1DownloadclientCreate + * @request POST:/api/v1/downloadclient + * @secure + */ + v1DownloadclientCreate = ( + data: DownloadClientResource, + query?: { + /** @default false */ + forceSave?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v1/downloadclient`, + method: "POST", + query: query, + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags DownloadClient + * @name V1DownloadclientUpdate + * @request PUT:/api/v1/downloadclient/{id} + * @secure + */ + v1DownloadclientUpdate = ( + id: string, + data: DownloadClientResource, + query?: { + /** @default false */ + forceSave?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v1/downloadclient/${id}`, + method: "PUT", + query: query, + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags DownloadClient + * @name V1DownloadclientDelete + * @request DELETE:/api/v1/downloadclient/{id} + * @secure + */ + v1DownloadclientDelete = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/downloadclient/${id}`, + method: "DELETE", + secure: true, + ...params, + }); + /** + * No description + * + * @tags DownloadClient + * @name V1DownloadclientDetail + * @request GET:/api/v1/downloadclient/{id} + * @secure + */ + v1DownloadclientDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/downloadclient/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags DownloadClient + * @name V1DownloadclientBulkUpdate + * @request PUT:/api/v1/downloadclient/bulk + * @secure + */ + v1DownloadclientBulkUpdate = (data: DownloadClientBulkResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/downloadclient/bulk`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags DownloadClient + * @name V1DownloadclientBulkDelete + * @request DELETE:/api/v1/downloadclient/bulk + * @secure + */ + v1DownloadclientBulkDelete = (data: DownloadClientBulkResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/downloadclient/bulk`, + method: "DELETE", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags DownloadClient + * @name V1DownloadclientSchemaList + * @request GET:/api/v1/downloadclient/schema + * @secure + */ + v1DownloadclientSchemaList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/downloadclient/schema`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags DownloadClient + * @name V1DownloadclientTestCreate + * @request POST:/api/v1/downloadclient/test + * @secure + */ + v1DownloadclientTestCreate = ( + data: DownloadClientResource, + query?: { + /** @default false */ + forceTest?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v1/downloadclient/test`, + method: "POST", + query: query, + body: data, + secure: true, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags DownloadClient + * @name V1DownloadclientTestallCreate + * @request POST:/api/v1/downloadclient/testall + * @secure + */ + v1DownloadclientTestallCreate = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/downloadclient/testall`, + method: "POST", + secure: true, + ...params, + }); + /** + * No description + * + * @tags DownloadClient + * @name V1DownloadclientActionCreate + * @request POST:/api/v1/downloadclient/action/{name} + * @secure + */ + v1DownloadclientActionCreate = (name: string, data: DownloadClientResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/downloadclient/action/${name}`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags DownloadClientConfig + * @name V1ConfigDownloadclientList + * @request GET:/api/v1/config/downloadclient + * @secure + */ + v1ConfigDownloadclientList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/config/downloadclient`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags DownloadClientConfig + * @name V1ConfigDownloadclientUpdate + * @request PUT:/api/v1/config/downloadclient/{id} + * @secure + */ + v1ConfigDownloadclientUpdate = (id: string, data: DownloadClientConfigResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/config/downloadclient/${id}`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags DownloadClientConfig + * @name V1ConfigDownloadclientDetail + * @request GET:/api/v1/config/downloadclient/{id} + * @secure + */ + v1ConfigDownloadclientDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/config/downloadclient/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Edition + * @name V1EditionList + * @request GET:/api/v1/edition + * @secure + */ + v1EditionList = ( + query?: { + bookId?: number[]; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v1/edition`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags FileSystem + * @name V1FilesystemList + * @request GET:/api/v1/filesystem + * @secure + */ + v1FilesystemList = ( + query?: { + path?: string; + /** @default false */ + includeFiles?: boolean; + /** @default false */ + allowFoldersWithoutTrailingSlashes?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v1/filesystem`, + method: "GET", + query: query, + secure: true, + ...params, + }); + /** + * No description + * + * @tags FileSystem + * @name V1FilesystemTypeList + * @request GET:/api/v1/filesystem/type + * @secure + */ + v1FilesystemTypeList = ( + query?: { + path?: string; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v1/filesystem/type`, + method: "GET", + query: query, + secure: true, + ...params, + }); + /** + * No description + * + * @tags FileSystem + * @name V1FilesystemMediafilesList + * @request GET:/api/v1/filesystem/mediafiles + * @secure + */ + v1FilesystemMediafilesList = ( + query?: { + path?: string; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v1/filesystem/mediafiles`, + method: "GET", + query: query, + secure: true, + ...params, + }); + /** + * No description + * + * @tags Health + * @name V1HealthList + * @request GET:/api/v1/health + * @secure + */ + v1HealthList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/health`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags History + * @name V1HistoryList + * @request GET:/api/v1/history + * @secure + */ + v1HistoryList = ( + query?: { + /** + * @format int32 + * @default 1 + */ + page?: number; + /** + * @format int32 + * @default 10 + */ + pageSize?: number; + sortKey?: string; + sortDirection?: SortDirection; + includeAuthor?: boolean; + includeBook?: boolean; + eventType?: number[]; + /** @format int32 */ + bookId?: number; + downloadId?: string; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v1/history`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags History + * @name V1HistorySinceList + * @request GET:/api/v1/history/since + * @secure + */ + v1HistorySinceList = ( + query?: { + /** @format date-time */ + date?: string; + eventType?: EntityHistoryEventType; + /** @default false */ + includeAuthor?: boolean; + /** @default false */ + includeBook?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v1/history/since`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags History + * @name V1HistoryAuthorList + * @request GET:/api/v1/history/author + * @secure + */ + v1HistoryAuthorList = ( + query?: { + /** @format int32 */ + authorId?: number; + /** @format int32 */ + bookId?: number; + eventType?: EntityHistoryEventType; + /** @default false */ + includeAuthor?: boolean; + /** @default false */ + includeBook?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v1/history/author`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags History + * @name V1HistoryFailedCreate + * @request POST:/api/v1/history/failed/{id} + * @secure + */ + v1HistoryFailedCreate = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/history/failed/${id}`, + method: "POST", + secure: true, + ...params, + }); + /** + * No description + * + * @tags HostConfig + * @name V1ConfigHostList + * @request GET:/api/v1/config/host + * @secure + */ + v1ConfigHostList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/config/host`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags HostConfig + * @name V1ConfigHostUpdate + * @request PUT:/api/v1/config/host/{id} + * @secure + */ + v1ConfigHostUpdate = (id: string, data: HostConfigResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/config/host/${id}`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags HostConfig + * @name V1ConfigHostDetail + * @request GET:/api/v1/config/host/{id} + * @secure + */ + v1ConfigHostDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/config/host/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags ImportList + * @name V1ImportlistList + * @request GET:/api/v1/importlist + * @secure + */ + v1ImportlistList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/importlist`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags ImportList + * @name V1ImportlistCreate + * @request POST:/api/v1/importlist + * @secure + */ + v1ImportlistCreate = ( + data: ImportListResource, + query?: { + /** @default false */ + forceSave?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v1/importlist`, + method: "POST", + query: query, + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags ImportList + * @name V1ImportlistUpdate + * @request PUT:/api/v1/importlist/{id} + * @secure + */ + v1ImportlistUpdate = ( + id: string, + data: ImportListResource, + query?: { + /** @default false */ + forceSave?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v1/importlist/${id}`, + method: "PUT", + query: query, + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags ImportList + * @name V1ImportlistDelete + * @request DELETE:/api/v1/importlist/{id} + * @secure + */ + v1ImportlistDelete = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/importlist/${id}`, + method: "DELETE", + secure: true, + ...params, + }); + /** + * No description + * + * @tags ImportList + * @name V1ImportlistDetail + * @request GET:/api/v1/importlist/{id} + * @secure + */ + v1ImportlistDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/importlist/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags ImportList + * @name V1ImportlistBulkUpdate + * @request PUT:/api/v1/importlist/bulk + * @secure + */ + v1ImportlistBulkUpdate = (data: ImportListBulkResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/importlist/bulk`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags ImportList + * @name V1ImportlistBulkDelete + * @request DELETE:/api/v1/importlist/bulk + * @secure + */ + v1ImportlistBulkDelete = (data: ImportListBulkResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/importlist/bulk`, + method: "DELETE", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags ImportList + * @name V1ImportlistSchemaList + * @request GET:/api/v1/importlist/schema + * @secure + */ + v1ImportlistSchemaList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/importlist/schema`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags ImportList + * @name V1ImportlistTestCreate + * @request POST:/api/v1/importlist/test + * @secure + */ + v1ImportlistTestCreate = ( + data: ImportListResource, + query?: { + /** @default false */ + forceTest?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v1/importlist/test`, + method: "POST", + query: query, + body: data, + secure: true, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags ImportList + * @name V1ImportlistTestallCreate + * @request POST:/api/v1/importlist/testall + * @secure + */ + v1ImportlistTestallCreate = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/importlist/testall`, + method: "POST", + secure: true, + ...params, + }); + /** + * No description + * + * @tags ImportList + * @name V1ImportlistActionCreate + * @request POST:/api/v1/importlist/action/{name} + * @secure + */ + v1ImportlistActionCreate = (name: string, data: ImportListResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/importlist/action/${name}`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags ImportListExclusion + * @name V1ImportlistexclusionList + * @request GET:/api/v1/importlistexclusion + * @secure + */ + v1ImportlistexclusionList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/importlistexclusion`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags ImportListExclusion + * @name V1ImportlistexclusionCreate + * @request POST:/api/v1/importlistexclusion + * @secure + */ + v1ImportlistexclusionCreate = (data: ImportListExclusionResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/importlistexclusion`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags ImportListExclusion + * @name V1ImportlistexclusionUpdate + * @request PUT:/api/v1/importlistexclusion/{id} + * @secure + */ + v1ImportlistexclusionUpdate = (id: string, data: ImportListExclusionResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/importlistexclusion/${id}`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags ImportListExclusion + * @name V1ImportlistexclusionDelete + * @request DELETE:/api/v1/importlistexclusion/{id} + * @secure + */ + v1ImportlistexclusionDelete = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/importlistexclusion/${id}`, + method: "DELETE", + secure: true, + ...params, + }); + /** + * No description + * + * @tags ImportListExclusion + * @name V1ImportlistexclusionDetail + * @request GET:/api/v1/importlistexclusion/{id} + * @secure + */ + v1ImportlistexclusionDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/importlistexclusion/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Indexer + * @name V1IndexerList + * @request GET:/api/v1/indexer + * @secure + */ + v1IndexerList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/indexer`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Indexer + * @name V1IndexerCreate + * @request POST:/api/v1/indexer + * @secure + */ + v1IndexerCreate = ( + data: IndexerResource, + query?: { + /** @default false */ + forceSave?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v1/indexer`, + method: "POST", + query: query, + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Indexer + * @name V1IndexerUpdate + * @request PUT:/api/v1/indexer/{id} + * @secure + */ + v1IndexerUpdate = ( + id: string, + data: IndexerResource, + query?: { + /** @default false */ + forceSave?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v1/indexer/${id}`, + method: "PUT", + query: query, + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Indexer + * @name V1IndexerDelete + * @request DELETE:/api/v1/indexer/{id} + * @secure + */ + v1IndexerDelete = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/indexer/${id}`, + method: "DELETE", + secure: true, + ...params, + }); + /** + * No description + * + * @tags Indexer + * @name V1IndexerDetail + * @request GET:/api/v1/indexer/{id} + * @secure + */ + v1IndexerDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/indexer/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Indexer + * @name V1IndexerBulkUpdate + * @request PUT:/api/v1/indexer/bulk + * @secure + */ + v1IndexerBulkUpdate = (data: IndexerBulkResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/indexer/bulk`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Indexer + * @name V1IndexerBulkDelete + * @request DELETE:/api/v1/indexer/bulk + * @secure + */ + v1IndexerBulkDelete = (data: IndexerBulkResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/indexer/bulk`, + method: "DELETE", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags Indexer + * @name V1IndexerSchemaList + * @request GET:/api/v1/indexer/schema + * @secure + */ + v1IndexerSchemaList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/indexer/schema`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Indexer + * @name V1IndexerTestCreate + * @request POST:/api/v1/indexer/test + * @secure + */ + v1IndexerTestCreate = ( + data: IndexerResource, + query?: { + /** @default false */ + forceTest?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v1/indexer/test`, + method: "POST", + query: query, + body: data, + secure: true, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags Indexer + * @name V1IndexerTestallCreate + * @request POST:/api/v1/indexer/testall + * @secure + */ + v1IndexerTestallCreate = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/indexer/testall`, + method: "POST", + secure: true, + ...params, + }); + /** + * No description + * + * @tags Indexer + * @name V1IndexerActionCreate + * @request POST:/api/v1/indexer/action/{name} + * @secure + */ + v1IndexerActionCreate = (name: string, data: IndexerResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/indexer/action/${name}`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags IndexerConfig + * @name V1ConfigIndexerList + * @request GET:/api/v1/config/indexer + * @secure + */ + v1ConfigIndexerList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/config/indexer`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags IndexerConfig + * @name V1ConfigIndexerUpdate + * @request PUT:/api/v1/config/indexer/{id} + * @secure + */ + v1ConfigIndexerUpdate = (id: string, data: IndexerConfigResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/config/indexer/${id}`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags IndexerConfig + * @name V1ConfigIndexerDetail + * @request GET:/api/v1/config/indexer/{id} + * @secure + */ + v1ConfigIndexerDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/config/indexer/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags IndexerFlag + * @name V1IndexerflagList + * @request GET:/api/v1/indexerflag + * @secure + */ + v1IndexerflagList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/indexerflag`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Language + * @name V1LanguageList + * @request GET:/api/v1/language + * @secure + */ + v1LanguageList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/language`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Language + * @name V1LanguageDetail + * @request GET:/api/v1/language/{id} + * @secure + */ + v1LanguageDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/language/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Localization + * @name V1LocalizationList + * @request GET:/api/v1/localization + * @secure + */ + v1LocalizationList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/localization`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Log + * @name V1LogList + * @request GET:/api/v1/log + * @secure + */ + v1LogList = ( + 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/v1/log`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags LogFile + * @name V1LogFileList + * @request GET:/api/v1/log/file + * @secure + */ + v1LogFileList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/log/file`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags LogFile + * @name V1LogFileDetail + * @request GET:/api/v1/log/file/{filename} + * @secure + */ + v1LogFileDetail = (filename: string, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/log/file/${filename}`, + method: "GET", + secure: true, + ...params, + }); + /** + * No description + * + * @tags ManualImport + * @name V1ManualimportCreate + * @request POST:/api/v1/manualimport + * @secure + */ + v1ManualimportCreate = (data: ManualImportUpdateResource[], params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/manualimport`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags ManualImport + * @name V1ManualimportList + * @request GET:/api/v1/manualimport + * @secure + */ + v1ManualimportList = ( + query?: { + folder?: string; + downloadId?: string; + /** @format int32 */ + authorId?: number; + /** @default true */ + filterExistingFiles?: boolean; + /** @default true */ + replaceExistingFiles?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v1/manualimport`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags MediaCover + * @name V1MediacoverAuthorDetail + * @request GET:/api/v1/mediacover/author/{authorId}/{filename} + * @secure + */ + v1MediacoverAuthorDetail = (authorId: number, filename: string, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/mediacover/author/${authorId}/${filename}`, + method: "GET", + secure: true, + ...params, + }); + /** + * No description + * + * @tags MediaCover + * @name V1MediacoverBookDetail + * @request GET:/api/v1/mediacover/book/{bookId}/{filename} + * @secure + */ + v1MediacoverBookDetail = (bookId: number, filename: string, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/mediacover/book/${bookId}/${filename}`, + method: "GET", + secure: true, + ...params, + }); + /** + * No description + * + * @tags MediaManagementConfig + * @name V1ConfigMediamanagementList + * @request GET:/api/v1/config/mediamanagement + * @secure + */ + v1ConfigMediamanagementList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/config/mediamanagement`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags MediaManagementConfig + * @name V1ConfigMediamanagementUpdate + * @request PUT:/api/v1/config/mediamanagement/{id} + * @secure + */ + v1ConfigMediamanagementUpdate = (id: string, data: MediaManagementConfigResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/config/mediamanagement/${id}`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags MediaManagementConfig + * @name V1ConfigMediamanagementDetail + * @request GET:/api/v1/config/mediamanagement/{id} + * @secure + */ + v1ConfigMediamanagementDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/config/mediamanagement/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Metadata + * @name V1MetadataList + * @request GET:/api/v1/metadata + * @secure + */ + v1MetadataList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/metadata`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Metadata + * @name V1MetadataCreate + * @request POST:/api/v1/metadata + * @secure + */ + v1MetadataCreate = ( + data: MetadataResource, + query?: { + /** @default false */ + forceSave?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v1/metadata`, + method: "POST", + query: query, + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Metadata + * @name V1MetadataUpdate + * @request PUT:/api/v1/metadata/{id} + * @secure + */ + v1MetadataUpdate = ( + id: string, + data: MetadataResource, + query?: { + /** @default false */ + forceSave?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v1/metadata/${id}`, + method: "PUT", + query: query, + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Metadata + * @name V1MetadataDelete + * @request DELETE:/api/v1/metadata/{id} + * @secure + */ + v1MetadataDelete = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/metadata/${id}`, + method: "DELETE", + secure: true, + ...params, + }); + /** + * No description + * + * @tags Metadata + * @name V1MetadataDetail + * @request GET:/api/v1/metadata/{id} + * @secure + */ + v1MetadataDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/metadata/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Metadata + * @name V1MetadataSchemaList + * @request GET:/api/v1/metadata/schema + * @secure + */ + v1MetadataSchemaList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/metadata/schema`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Metadata + * @name V1MetadataTestCreate + * @request POST:/api/v1/metadata/test + * @secure + */ + v1MetadataTestCreate = ( + data: MetadataResource, + query?: { + /** @default false */ + forceTest?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v1/metadata/test`, + method: "POST", + query: query, + body: data, + secure: true, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags Metadata + * @name V1MetadataTestallCreate + * @request POST:/api/v1/metadata/testall + * @secure + */ + v1MetadataTestallCreate = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/metadata/testall`, + method: "POST", + secure: true, + ...params, + }); + /** + * No description + * + * @tags Metadata + * @name V1MetadataActionCreate + * @request POST:/api/v1/metadata/action/{name} + * @secure + */ + v1MetadataActionCreate = (name: string, data: MetadataResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/metadata/action/${name}`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags MetadataProfile + * @name V1MetadataprofileCreate + * @request POST:/api/v1/metadataprofile + * @secure + */ + v1MetadataprofileCreate = (data: MetadataProfileResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/metadataprofile`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags MetadataProfile + * @name V1MetadataprofileList + * @request GET:/api/v1/metadataprofile + * @secure + */ + v1MetadataprofileList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/metadataprofile`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags MetadataProfile + * @name V1MetadataprofileDelete + * @request DELETE:/api/v1/metadataprofile/{id} + * @secure + */ + v1MetadataprofileDelete = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/metadataprofile/${id}`, + method: "DELETE", + secure: true, + ...params, + }); + /** + * No description + * + * @tags MetadataProfile + * @name V1MetadataprofileUpdate + * @request PUT:/api/v1/metadataprofile/{id} + * @secure + */ + v1MetadataprofileUpdate = (id: string, data: MetadataProfileResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/metadataprofile/${id}`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags MetadataProfile + * @name V1MetadataprofileDetail + * @request GET:/api/v1/metadataprofile/{id} + * @secure + */ + v1MetadataprofileDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/metadataprofile/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags MetadataProfileSchema + * @name V1MetadataprofileSchemaList + * @request GET:/api/v1/metadataprofile/schema + * @secure + */ + v1MetadataprofileSchemaList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/metadataprofile/schema`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags MetadataProviderConfig + * @name V1ConfigMetadataproviderList + * @request GET:/api/v1/config/metadataprovider + * @secure + */ + v1ConfigMetadataproviderList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/config/metadataprovider`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags MetadataProviderConfig + * @name V1ConfigMetadataproviderUpdate + * @request PUT:/api/v1/config/metadataprovider/{id} + * @secure + */ + v1ConfigMetadataproviderUpdate = (id: string, data: MetadataProviderConfigResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/config/metadataprovider/${id}`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags MetadataProviderConfig + * @name V1ConfigMetadataproviderDetail + * @request GET:/api/v1/config/metadataprovider/{id} + * @secure + */ + v1ConfigMetadataproviderDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/config/metadataprovider/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Missing + * @name V1WantedMissingList + * @request GET:/api/v1/wanted/missing + * @secure + */ + v1WantedMissingList = ( + query?: { + /** + * @format int32 + * @default 1 + */ + page?: number; + /** + * @format int32 + * @default 10 + */ + pageSize?: number; + sortKey?: string; + sortDirection?: SortDirection; + /** @default false */ + includeAuthor?: boolean; + /** @default true */ + monitored?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v1/wanted/missing`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Missing + * @name V1WantedMissingDetail + * @request GET:/api/v1/wanted/missing/{id} + * @secure + */ + v1WantedMissingDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/wanted/missing/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags NamingConfig + * @name V1ConfigNamingList + * @request GET:/api/v1/config/naming + * @secure + */ + v1ConfigNamingList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/config/naming`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags NamingConfig + * @name V1ConfigNamingUpdate + * @request PUT:/api/v1/config/naming/{id} + * @secure + */ + v1ConfigNamingUpdate = (id: string, data: NamingConfigResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/config/naming/${id}`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags NamingConfig + * @name V1ConfigNamingDetail + * @request GET:/api/v1/config/naming/{id} + * @secure + */ + v1ConfigNamingDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/config/naming/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags NamingConfig + * @name V1ConfigNamingExamplesList + * @request GET:/api/v1/config/naming/examples + * @secure + */ + v1ConfigNamingExamplesList = ( + query?: { + renameBooks?: boolean; + replaceIllegalCharacters?: boolean; + /** @format int32 */ + colonReplacementFormat?: number; + standardBookFormat?: string; + authorFolderFormat?: string; + includeAuthorName?: boolean; + includeBookTitle?: boolean; + includeQuality?: boolean; + replaceSpaces?: boolean; + separator?: string; + numberStyle?: string; + /** @format int32 */ + id?: number; + resourceName?: string; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v1/config/naming/examples`, + method: "GET", + query: query, + secure: true, + ...params, + }); + /** + * No description + * + * @tags Notification + * @name V1NotificationList + * @request GET:/api/v1/notification + * @secure + */ + v1NotificationList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/notification`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Notification + * @name V1NotificationCreate + * @request POST:/api/v1/notification + * @secure + */ + v1NotificationCreate = ( + data: NotificationResource, + query?: { + /** @default false */ + forceSave?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v1/notification`, + method: "POST", + query: query, + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Notification + * @name V1NotificationUpdate + * @request PUT:/api/v1/notification/{id} + * @secure + */ + v1NotificationUpdate = ( + id: string, + data: NotificationResource, + query?: { + /** @default false */ + forceSave?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v1/notification/${id}`, + method: "PUT", + query: query, + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Notification + * @name V1NotificationDelete + * @request DELETE:/api/v1/notification/{id} + * @secure + */ + v1NotificationDelete = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/notification/${id}`, + method: "DELETE", + secure: true, + ...params, + }); + /** + * No description + * + * @tags Notification + * @name V1NotificationDetail + * @request GET:/api/v1/notification/{id} + * @secure + */ + v1NotificationDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/notification/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Notification + * @name V1NotificationSchemaList + * @request GET:/api/v1/notification/schema + * @secure + */ + v1NotificationSchemaList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/notification/schema`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Notification + * @name V1NotificationTestCreate + * @request POST:/api/v1/notification/test + * @secure + */ + v1NotificationTestCreate = ( + data: NotificationResource, + query?: { + /** @default false */ + forceTest?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v1/notification/test`, + method: "POST", + query: query, + body: data, + secure: true, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags Notification + * @name V1NotificationTestallCreate + * @request POST:/api/v1/notification/testall + * @secure + */ + v1NotificationTestallCreate = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/notification/testall`, + method: "POST", + secure: true, + ...params, + }); + /** + * No description + * + * @tags Notification + * @name V1NotificationActionCreate + * @request POST:/api/v1/notification/action/{name} + * @secure + */ + v1NotificationActionCreate = (name: string, data: NotificationResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/notification/action/${name}`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags Parse + * @name V1ParseList + * @request GET:/api/v1/parse + * @secure + */ + v1ParseList = ( + query?: { + title?: string; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v1/parse`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags QualityDefinition + * @name V1QualitydefinitionUpdate + * @request PUT:/api/v1/qualitydefinition/{id} + * @secure + */ + v1QualitydefinitionUpdate = (id: string, data: QualityDefinitionResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/qualitydefinition/${id}`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags QualityDefinition + * @name V1QualitydefinitionDetail + * @request GET:/api/v1/qualitydefinition/{id} + * @secure + */ + v1QualitydefinitionDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/qualitydefinition/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags QualityDefinition + * @name V1QualitydefinitionList + * @request GET:/api/v1/qualitydefinition + * @secure + */ + v1QualitydefinitionList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/qualitydefinition`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags QualityDefinition + * @name V1QualitydefinitionUpdateUpdate + * @request PUT:/api/v1/qualitydefinition/update + * @secure + */ + v1QualitydefinitionUpdateUpdate = (data: QualityDefinitionResource[], params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/qualitydefinition/update`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags QualityProfile + * @name V1QualityprofileCreate + * @request POST:/api/v1/qualityprofile + * @secure + */ + v1QualityprofileCreate = (data: QualityProfileResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/qualityprofile`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags QualityProfile + * @name V1QualityprofileList + * @request GET:/api/v1/qualityprofile + * @secure + */ + v1QualityprofileList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/qualityprofile`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags QualityProfile + * @name V1QualityprofileDelete + * @request DELETE:/api/v1/qualityprofile/{id} + * @secure + */ + v1QualityprofileDelete = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/qualityprofile/${id}`, + method: "DELETE", + secure: true, + ...params, + }); + /** + * No description + * + * @tags QualityProfile + * @name V1QualityprofileUpdate + * @request PUT:/api/v1/qualityprofile/{id} + * @secure + */ + v1QualityprofileUpdate = (id: string, data: QualityProfileResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/qualityprofile/${id}`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags QualityProfile + * @name V1QualityprofileDetail + * @request GET:/api/v1/qualityprofile/{id} + * @secure + */ + v1QualityprofileDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/qualityprofile/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags QualityProfileSchema + * @name V1QualityprofileSchemaList + * @request GET:/api/v1/qualityprofile/schema + * @secure + */ + v1QualityprofileSchemaList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/qualityprofile/schema`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Queue + * @name V1QueueDelete + * @request DELETE:/api/v1/queue/{id} + * @secure + */ + v1QueueDelete = ( + 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/v1/queue/${id}`, + method: "DELETE", + query: query, + secure: true, + ...params, + }); + /** + * No description + * + * @tags Queue + * @name V1QueueBulkDelete + * @request DELETE:/api/v1/queue/bulk + * @secure + */ + v1QueueBulkDelete = ( + 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/v1/queue/bulk`, + method: "DELETE", + query: query, + body: data, + secure: true, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags Queue + * @name V1QueueList + * @request GET:/api/v1/queue + * @secure + */ + v1QueueList = ( + query?: { + /** + * @format int32 + * @default 1 + */ + page?: number; + /** + * @format int32 + * @default 10 + */ + pageSize?: number; + sortKey?: string; + sortDirection?: SortDirection; + /** @default false */ + includeUnknownAuthorItems?: boolean; + /** @default false */ + includeAuthor?: boolean; + /** @default false */ + includeBook?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v1/queue`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags QueueAction + * @name V1QueueGrabCreate + * @request POST:/api/v1/queue/grab/{id} + * @secure + */ + v1QueueGrabCreate = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/queue/grab/${id}`, + method: "POST", + secure: true, + ...params, + }); + /** + * No description + * + * @tags QueueAction + * @name V1QueueGrabBulkCreate + * @request POST:/api/v1/queue/grab/bulk + * @secure + */ + v1QueueGrabBulkCreate = (data: QueueBulkResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/queue/grab/bulk`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + ...params, + }); + /** + * No description + * + * @tags QueueDetails + * @name V1QueueDetailsList + * @request GET:/api/v1/queue/details + * @secure + */ + v1QueueDetailsList = ( + query?: { + /** @format int32 */ + authorId?: number; + bookIds?: number[]; + /** @default false */ + includeAuthor?: boolean; + /** @default true */ + includeBook?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v1/queue/details`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags QueueStatus + * @name V1QueueStatusList + * @request GET:/api/v1/queue/status + * @secure + */ + v1QueueStatusList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/queue/status`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Release + * @name V1ReleaseCreate + * @request POST:/api/v1/release + * @secure + */ + v1ReleaseCreate = (data: ReleaseResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/release`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Release + * @name V1ReleaseList + * @request GET:/api/v1/release + * @secure + */ + v1ReleaseList = ( + query?: { + /** @format int32 */ + bookId?: number; + /** @format int32 */ + authorId?: number; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v1/release`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags ReleaseProfile + * @name V1ReleaseprofileList + * @request GET:/api/v1/releaseprofile + * @secure + */ + v1ReleaseprofileList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/releaseprofile`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags ReleaseProfile + * @name V1ReleaseprofileCreate + * @request POST:/api/v1/releaseprofile + * @secure + */ + v1ReleaseprofileCreate = (data: ReleaseProfileResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/releaseprofile`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags ReleaseProfile + * @name V1ReleaseprofileUpdate + * @request PUT:/api/v1/releaseprofile/{id} + * @secure + */ + v1ReleaseprofileUpdate = (id: string, data: ReleaseProfileResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/releaseprofile/${id}`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags ReleaseProfile + * @name V1ReleaseprofileDelete + * @request DELETE:/api/v1/releaseprofile/{id} + * @secure + */ + v1ReleaseprofileDelete = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/releaseprofile/${id}`, + method: "DELETE", + secure: true, + ...params, + }); + /** + * No description + * + * @tags ReleaseProfile + * @name V1ReleaseprofileDetail + * @request GET:/api/v1/releaseprofile/{id} + * @secure + */ + v1ReleaseprofileDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/releaseprofile/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags ReleasePush + * @name V1ReleasePushCreate + * @request POST:/api/v1/release/push + * @secure + */ + v1ReleasePushCreate = (data: ReleaseResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/release/push`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags RemotePathMapping + * @name V1RemotepathmappingCreate + * @request POST:/api/v1/remotepathmapping + * @secure + */ + v1RemotepathmappingCreate = (data: RemotePathMappingResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/remotepathmapping`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags RemotePathMapping + * @name V1RemotepathmappingList + * @request GET:/api/v1/remotepathmapping + * @secure + */ + v1RemotepathmappingList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/remotepathmapping`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags RemotePathMapping + * @name V1RemotepathmappingDelete + * @request DELETE:/api/v1/remotepathmapping/{id} + * @secure + */ + v1RemotepathmappingDelete = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/remotepathmapping/${id}`, + method: "DELETE", + secure: true, + ...params, + }); + /** + * No description + * + * @tags RemotePathMapping + * @name V1RemotepathmappingUpdate + * @request PUT:/api/v1/remotepathmapping/{id} + * @secure + */ + v1RemotepathmappingUpdate = (id: string, data: RemotePathMappingResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/remotepathmapping/${id}`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags RemotePathMapping + * @name V1RemotepathmappingDetail + * @request GET:/api/v1/remotepathmapping/{id} + * @secure + */ + v1RemotepathmappingDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/remotepathmapping/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags RenameBook + * @name V1RenameList + * @request GET:/api/v1/rename + * @secure + */ + v1RenameList = ( + query?: { + /** @format int32 */ + authorId?: number; + /** @format int32 */ + bookId?: number; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v1/rename`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags RetagBook + * @name V1RetagList + * @request GET:/api/v1/retag + * @secure + */ + v1RetagList = ( + query?: { + /** @format int32 */ + authorId?: number; + /** @format int32 */ + bookId?: number; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v1/retag`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags RootFolder + * @name V1RootfolderCreate + * @request POST:/api/v1/rootfolder + * @secure + */ + v1RootfolderCreate = (data: RootFolderResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/rootfolder`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags RootFolder + * @name V1RootfolderList + * @request GET:/api/v1/rootfolder + * @secure + */ + v1RootfolderList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/rootfolder`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags RootFolder + * @name V1RootfolderUpdate + * @request PUT:/api/v1/rootfolder/{id} + * @secure + */ + v1RootfolderUpdate = (id: string, data: RootFolderResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/rootfolder/${id}`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags RootFolder + * @name V1RootfolderDelete + * @request DELETE:/api/v1/rootfolder/{id} + * @secure + */ + v1RootfolderDelete = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/rootfolder/${id}`, + method: "DELETE", + secure: true, + ...params, + }); + /** + * No description + * + * @tags RootFolder + * @name V1RootfolderDetail + * @request GET:/api/v1/rootfolder/{id} + * @secure + */ + v1RootfolderDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/rootfolder/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Search + * @name V1SearchList + * @request GET:/api/v1/search + * @secure + */ + v1SearchList = ( + query?: { + term?: string; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v1/search`, + method: "GET", + query: query, + secure: true, + ...params, + }); + /** + * No description + * + * @tags Series + * @name V1SeriesList + * @request GET:/api/v1/series + * @secure + */ + v1SeriesList = ( + query?: { + /** @format int32 */ + authorId?: number; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/api/v1/series`, + method: "GET", + query: query, + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags System + * @name V1SystemStatusList + * @request GET:/api/v1/system/status + * @secure + */ + v1SystemStatusList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/system/status`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags System + * @name V1SystemRoutesList + * @request GET:/api/v1/system/routes + * @secure + */ + v1SystemRoutesList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/system/routes`, + method: "GET", + secure: true, + ...params, + }); + /** + * No description + * + * @tags System + * @name V1SystemRoutesDuplicateList + * @request GET:/api/v1/system/routes/duplicate + * @secure + */ + v1SystemRoutesDuplicateList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/system/routes/duplicate`, + method: "GET", + secure: true, + ...params, + }); + /** + * No description + * + * @tags System + * @name V1SystemShutdownCreate + * @request POST:/api/v1/system/shutdown + * @secure + */ + v1SystemShutdownCreate = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/system/shutdown`, + method: "POST", + secure: true, + ...params, + }); + /** + * No description + * + * @tags System + * @name V1SystemRestartCreate + * @request POST:/api/v1/system/restart + * @secure + */ + v1SystemRestartCreate = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/system/restart`, + method: "POST", + secure: true, + ...params, + }); + /** + * No description + * + * @tags Tag + * @name V1TagList + * @request GET:/api/v1/tag + * @secure + */ + v1TagList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/tag`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Tag + * @name V1TagCreate + * @request POST:/api/v1/tag + * @secure + */ + v1TagCreate = (data: TagResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/tag`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Tag + * @name V1TagUpdate + * @request PUT:/api/v1/tag/{id} + * @secure + */ + v1TagUpdate = (id: string, data: TagResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/tag/${id}`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Tag + * @name V1TagDelete + * @request DELETE:/api/v1/tag/{id} + * @secure + */ + v1TagDelete = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/tag/${id}`, + method: "DELETE", + secure: true, + ...params, + }); + /** + * No description + * + * @tags Tag + * @name V1TagDetail + * @request GET:/api/v1/tag/{id} + * @secure + */ + v1TagDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/tag/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags TagDetails + * @name V1TagDetailList + * @request GET:/api/v1/tag/detail + * @secure + */ + v1TagDetailList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/tag/detail`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags TagDetails + * @name V1TagDetailDetail + * @request GET:/api/v1/tag/detail/{id} + * @secure + */ + v1TagDetailDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/tag/detail/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Task + * @name V1SystemTaskList + * @request GET:/api/v1/system/task + * @secure + */ + v1SystemTaskList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/system/task`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Task + * @name V1SystemTaskDetail + * @request GET:/api/v1/system/task/{id} + * @secure + */ + v1SystemTaskDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/system/task/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags UiConfig + * @name V1ConfigUiUpdate + * @request PUT:/api/v1/config/ui/{id} + * @secure + */ + v1ConfigUiUpdate = (id: string, data: UiConfigResource, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/config/ui/${id}`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }); + /** + * No description + * + * @tags UiConfig + * @name V1ConfigUiDetail + * @request GET:/api/v1/config/ui/{id} + * @secure + */ + v1ConfigUiDetail = (id: number, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/config/ui/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags UiConfig + * @name V1ConfigUiList + * @request GET:/api/v1/config/ui + * @secure + */ + v1ConfigUiList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/config/ui`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags Update + * @name V1UpdateList + * @request GET:/api/v1/update + * @secure + */ + v1UpdateList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/update`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags UpdateLogFile + * @name V1LogFileUpdateList + * @request GET:/api/v1/log/file/update + * @secure + */ + v1LogFileUpdateList = (params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/log/file/update`, + method: "GET", + secure: true, + format: "json", + ...params, + }); + /** + * No description + * + * @tags UpdateLogFile + * @name V1LogFileUpdateDetail + * @request GET:/api/v1/log/file/update/{filename} + * @secure + */ + v1LogFileUpdateDetail = (filename: string, params: RequestParams = {}) => + this.http.request({ + path: `/api/v1/log/file/update/${filename}`, + method: "GET", + secure: true, + ...params, + }); +} diff --git a/src/__generated__/readarr/Content.ts b/src/__generated__/readarr/Content.ts new file mode 100644 index 0000000..e62a80c --- /dev/null +++ b/src/__generated__/readarr/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__/readarr/Feed.ts b/src/__generated__/readarr/Feed.ts new file mode 100644 index 0000000..9d6549b --- /dev/null +++ b/src/__generated__/readarr/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 V1CalendarReadarrIcsList + * @request GET:/feed/v1/calendar/readarr.ics + * @secure + */ + v1CalendarReadarrIcsList = ( + query?: { + /** + * @format int32 + * @default 7 + */ + pastDays?: number; + /** + * @format int32 + * @default 28 + */ + futureDays?: number; + /** @default "" */ + tagList?: string; + /** @default false */ + unmonitored?: boolean; + }, + params: RequestParams = {}, + ) => + this.http.request({ + path: `/feed/v1/calendar/readarr.ics`, + method: "GET", + query: query, + secure: true, + ...params, + }); +} diff --git a/src/__generated__/readarr/Login.ts b/src/__generated__/readarr/Login.ts new file mode 100644 index 0000000..d8653c4 --- /dev/null +++ b/src/__generated__/readarr/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__/readarr/Logout.ts b/src/__generated__/readarr/Logout.ts new file mode 100644 index 0000000..1d6bd02 --- /dev/null +++ b/src/__generated__/readarr/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__/readarr/Path.ts b/src/__generated__/readarr/Path.ts new file mode 100644 index 0000000..0a306be --- /dev/null +++ b/src/__generated__/readarr/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__/readarr/Ping.ts b/src/__generated__/readarr/Ping.ts new file mode 100644 index 0000000..556eb9d --- /dev/null +++ b/src/__generated__/readarr/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__/readarr/data-contracts.ts b/src/__generated__/readarr/data-contracts.ts new file mode 100644 index 0000000..0c82dc2 --- /dev/null +++ b/src/__generated__/readarr/data-contracts.ts @@ -0,0 +1,1980 @@ +/* eslint-disable */ +/* tslint:disable */ +/* + * --------------------------------------------------------------- + * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## + * ## ## + * ## AUTHOR: acacode ## + * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## + * --------------------------------------------------------------- + */ + +export interface AddAuthorOptions { + monitor?: MonitorTypes; + booksToMonitor?: string[] | null; + monitored?: boolean; + searchForMissingBooks?: boolean; +} + +export interface AddBookOptions { + addType?: BookAddType; + searchForNewBook?: boolean; +} + +export enum AllowFingerprinting { + Never = "never", + NewFiles = "newFiles", + AllFiles = "allFiles", +} + +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 Author { + /** @format int32 */ + id?: number; + /** @format int32 */ + authorMetadataId?: number; + cleanName?: string | null; + monitored?: boolean; + monitorNewItems?: NewItemMonitorTypes; + /** @format date-time */ + lastInfoSync?: string | null; + path?: string | null; + rootFolderPath?: string | null; + /** @format date-time */ + added?: string; + /** @format int32 */ + qualityProfileId?: number; + /** @format int32 */ + metadataProfileId?: number; + /** @uniqueItems true */ + tags?: number[] | null; + addOptions?: AddAuthorOptions; + metadata?: AuthorMetadataLazyLoaded; + qualityProfile?: QualityProfileLazyLoaded; + metadataProfile?: MetadataProfileLazyLoaded; + books?: BookListLazyLoaded; + series?: SeriesListLazyLoaded; + name?: string | null; + foreignAuthorId?: string | null; +} + +export interface AuthorEditorResource { + authorIds?: number[] | null; + monitored?: boolean | null; + monitorNewItems?: NewItemMonitorTypes; + /** @format int32 */ + qualityProfileId?: number | null; + /** @format int32 */ + metadataProfileId?: number | null; + rootFolderPath?: string | null; + tags?: number[] | null; + applyTags?: ApplyTags; + moveFiles?: boolean; + deleteFiles?: boolean; +} + +export interface AuthorLazyLoaded { + value?: Author; + isLoaded?: boolean; +} + +export interface AuthorMetadata { + /** @format int32 */ + id?: number; + foreignAuthorId?: string | null; + titleSlug?: string | null; + name?: string | null; + sortName?: string | null; + nameLastFirst?: string | null; + sortNameLastFirst?: string | null; + aliases?: string[] | null; + overview?: string | null; + disambiguation?: string | null; + gender?: string | null; + hometown?: string | null; + /** @format date-time */ + born?: string | null; + /** @format date-time */ + died?: string | null; + status?: AuthorStatusType; + images?: MediaCover[] | null; + links?: Links[] | null; + genres?: string[] | null; + ratings?: Ratings; +} + +export interface AuthorMetadataLazyLoaded { + value?: AuthorMetadata; + isLoaded?: boolean; +} + +export interface AuthorResource { + /** @format int32 */ + id?: number; + /** @format int32 */ + authorMetadataId?: number; + status?: AuthorStatusType; + ended?: boolean; + authorName?: string | null; + authorNameLastFirst?: string | null; + foreignAuthorId?: string | null; + titleSlug?: string | null; + overview?: string | null; + disambiguation?: string | null; + links?: Links[] | null; + nextBook?: Book; + lastBook?: Book; + images?: MediaCover[] | null; + remotePoster?: string | null; + path?: string | null; + /** @format int32 */ + qualityProfileId?: number; + /** @format int32 */ + metadataProfileId?: number; + monitored?: boolean; + monitorNewItems?: NewItemMonitorTypes; + rootFolderPath?: string | null; + genres?: string[] | null; + cleanName?: string | null; + sortName?: string | null; + sortNameLastFirst?: string | null; + /** @uniqueItems true */ + tags?: number[] | null; + /** @format date-time */ + added?: string; + addOptions?: AddAuthorOptions; + ratings?: Ratings; + statistics?: AuthorStatisticsResource; +} + +export interface AuthorStatisticsResource { + /** @format int32 */ + bookFileCount?: number; + /** @format int32 */ + bookCount?: number; + /** @format int32 */ + availableBookCount?: number; + /** @format int32 */ + totalBookCount?: number; + /** @format int64 */ + sizeOnDisk?: number; + /** @format double */ + percentOfBooks?: number; +} + +export enum AuthorStatusType { + Continuing = "continuing", + Ended = "ended", +} + +export interface AuthorTitleInfo { + title?: string | null; + titleWithoutYear?: string | null; + /** @format int32 */ + year?: number; +} + +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 */ + authorId?: number; + bookIds?: number[] | null; + sourceTitle?: string | null; + quality?: QualityModel; + customFormats?: CustomFormatResource[] | null; + /** @format date-time */ + date?: string; + protocol?: DownloadProtocol; + indexer?: string | null; + message?: string | null; + author?: AuthorResource; +} + +export interface BlocklistResourcePagingResource { + /** @format int32 */ + page?: number; + /** @format int32 */ + pageSize?: number; + sortKey?: string | null; + sortDirection?: SortDirection; + /** @format int32 */ + totalRecords?: number; + records?: BlocklistResource[] | null; +} + +export interface Book { + /** @format int32 */ + id?: number; + /** @format int32 */ + authorMetadataId?: number; + foreignBookId?: string | null; + foreignEditionId?: string | null; + titleSlug?: string | null; + title?: string | null; + /** @format date-time */ + releaseDate?: string | null; + links?: Links[] | null; + genres?: string[] | null; + relatedBooks?: number[] | null; + ratings?: Ratings; + /** @format date-time */ + lastSearchTime?: string | null; + cleanTitle?: string | null; + monitored?: boolean; + anyEditionOk?: boolean; + /** @format date-time */ + lastInfoSync?: string | null; + /** @format date-time */ + added?: string; + addOptions?: AddBookOptions; + authorMetadata?: AuthorMetadataLazyLoaded; + author?: AuthorLazyLoaded; + editions?: EditionListLazyLoaded; + bookFiles?: BookFileListLazyLoaded; + seriesLinks?: SeriesBookLinkListLazyLoaded; +} + +export enum BookAddType { + Automatic = "automatic", + Manual = "manual", +} + +export interface BookEditorResource { + bookIds?: number[] | null; + monitored?: boolean | null; + deleteFiles?: boolean | null; + addImportListExclusion?: boolean | null; +} + +export interface BookFile { + /** @format int32 */ + id?: number; + path?: string | null; + /** @format int64 */ + size?: number; + /** @format date-time */ + modified?: string; + /** @format date-time */ + dateAdded?: string; + originalFilePath?: string | null; + sceneName?: string | null; + releaseGroup?: string | null; + quality?: QualityModel; + indexerFlags?: IndexerFlags; + mediaInfo?: MediaInfoModel; + /** @format int32 */ + editionId?: number; + /** @format int32 */ + calibreId?: number; + /** @format int32 */ + part?: number; + author?: AuthorLazyLoaded; + edition?: EditionLazyLoaded; + /** @format int32 */ + partCount?: number; +} + +export interface BookFileListLazyLoaded { + value?: BookFile[] | null; + isLoaded?: boolean; +} + +export interface BookFileListResource { + bookFileIds?: number[] | null; + quality?: QualityModel; +} + +export interface BookFileResource { + /** @format int32 */ + id?: number; + /** @format int32 */ + authorId?: number; + /** @format int32 */ + bookId?: number; + path?: string | null; + /** @format int64 */ + size?: number; + /** @format date-time */ + dateAdded?: string; + quality?: QualityModel; + /** @format int32 */ + qualityWeight?: number; + /** @format int32 */ + indexerFlags?: number | null; + mediaInfo?: MediaInfoResource; + qualityCutoffNotMet?: boolean; + audioTags?: ParsedTrackInfo; +} + +export interface BookLazyLoaded { + value?: Book; + isLoaded?: boolean; +} + +export interface BookListLazyLoaded { + value?: Book[] | null; + isLoaded?: boolean; +} + +export interface BookResource { + /** @format int32 */ + id?: number; + title?: string | null; + authorTitle?: string | null; + seriesTitle?: string | null; + disambiguation?: string | null; + overview?: string | null; + /** @format int32 */ + authorId?: number; + foreignBookId?: string | null; + foreignEditionId?: string | null; + titleSlug?: string | null; + monitored?: boolean; + anyEditionOk?: boolean; + ratings?: Ratings; + /** @format date-time */ + releaseDate?: string | null; + /** @format int32 */ + pageCount?: number; + genres?: string[] | null; + author?: AuthorResource; + images?: MediaCover[] | null; + links?: Links[] | null; + statistics?: BookStatisticsResource; + /** @format date-time */ + added?: string | null; + addOptions?: AddBookOptions; + remoteCover?: string | null; + editions?: EditionResource[] | null; +} + +export interface BookResourcePagingResource { + /** @format int32 */ + page?: number; + /** @format int32 */ + pageSize?: number; + sortKey?: string | null; + sortDirection?: SortDirection; + /** @format int32 */ + totalRecords?: number; + records?: BookResource[] | null; +} + +export interface BookStatisticsResource { + /** @format int32 */ + bookFileCount?: number; + /** @format int32 */ + bookCount?: number; + /** @format int32 */ + totalBookCount?: number; + /** @format int64 */ + sizeOnDisk?: number; + /** @format double */ + percentOfBooks?: number; +} + +export interface BooksMonitoredResource { + bookIds?: number[] | null; + monitored?: boolean; +} + +export interface BookshelfAuthorResource { + /** @format int32 */ + id?: number; + monitored?: boolean | null; + books?: BookResource[] | null; +} + +export interface BookshelfResource { + authors?: BookshelfAuthorResource[] | null; + monitoringOptions?: MonitoringOptions; + monitorNewItems?: NewItemMonitorTypes; +} + +export enum CertificateValidationType { + Enabled = "enabled", + DisabledForLocalAddresses = "disabledForLocalAddresses", + Disabled = "disabled", +} + +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 CustomFilterResource { + /** @format int32 */ + id?: number; + type?: string | null; + label?: string | null; + filters?: Record[] | null; +} + +export interface CustomFormat { + /** @format int32 */ + id?: number; + name?: string | null; + includeCustomFormatWhenRenaming?: boolean; + specifications?: ICustomFormatSpecification[] | 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 DevelopmentConfigResource { + /** @format int32 */ + id?: number; + metadataSource?: string | null; + consoleLogLevel?: string | null; + logSql?: boolean; + /** @format int32 */ + logRotate?: number; + filterSentryEvents?: boolean; +} + +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 Edition { + /** @format int32 */ + id?: number; + /** @format int32 */ + bookId?: number; + foreignEditionId?: string | null; + titleSlug?: string | null; + isbn13?: string | null; + asin?: string | null; + title?: string | null; + language?: string | null; + overview?: string | null; + format?: string | null; + isEbook?: boolean; + disambiguation?: string | null; + publisher?: string | null; + /** @format int32 */ + pageCount?: number; + /** @format date-time */ + releaseDate?: string | null; + images?: MediaCover[] | null; + links?: Links[] | null; + ratings?: Ratings; + monitored?: boolean; + manualAdd?: boolean; + book?: BookLazyLoaded; + bookFiles?: BookFileListLazyLoaded; +} + +export interface EditionLazyLoaded { + value?: Edition; + isLoaded?: boolean; +} + +export interface EditionListLazyLoaded { + value?: Edition[] | null; + isLoaded?: boolean; +} + +export interface EditionResource { + /** @format int32 */ + id?: number; + /** @format int32 */ + bookId?: number; + foreignEditionId?: string | null; + titleSlug?: string | null; + isbn13?: string | null; + asin?: string | null; + title?: string | null; + language?: string | null; + overview?: string | null; + format?: string | null; + isEbook?: boolean; + disambiguation?: string | null; + publisher?: string | null; + /** @format int32 */ + pageCount?: number; + /** @format date-time */ + releaseDate?: string | null; + images?: MediaCover[] | null; + links?: Links[] | null; + ratings?: Ratings; + monitored?: boolean; + manualAdd?: boolean; + remoteCover?: string | null; +} + +export enum EntityHistoryEventType { + Unknown = "unknown", + Grabbed = "grabbed", + BookFileImported = "bookFileImported", + DownloadFailed = "downloadFailed", + BookFileDeleted = "bookFileDeleted", + BookFileRenamed = "bookFileRenamed", + BookImportIncomplete = "bookImportIncomplete", + DownloadImported = "downloadImported", + BookFileRetagged = "bookFileRetagged", + DownloadIgnored = "downloadIgnored", +} + +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; + placeholder?: string | null; + isFloat?: boolean; +} + +export enum FileDateType { + None = "none", + BookReleaseDate = "bookReleaseDate", +} + +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 */ + bookId?: number; + /** @format int32 */ + authorId?: number; + sourceTitle?: string | null; + quality?: QualityModel; + customFormats?: CustomFormatResource[] | null; + /** @format int32 */ + customFormatScore?: number; + qualityCutoffNotMet?: boolean; + /** @format date-time */ + date?: string; + downloadId?: string | null; + eventType?: EntityHistoryEventType; + data?: Record; + book?: BookResource; + author?: AuthorResource; +} + +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; + 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 ICustomFormatSpecification { + /** @format int32 */ + order?: number; + infoLink?: string | null; + implementationName?: string | null; + name?: string | null; + negate?: boolean; + required?: boolean; +} + +export interface ImportListBulkResource { + ids?: number[] | null; + tags?: number[] | null; + applyTags?: ApplyTags; + enableAutomaticAdd?: boolean | null; + rootFolderPath?: string | null; + /** @format int32 */ + qualityProfileId?: number | null; + /** @format int32 */ + metadataProfileId?: number | null; +} + +export interface ImportListExclusionResource { + /** @format int32 */ + id?: number; + foreignId?: string | null; + authorName?: string | null; +} + +export enum ImportListMonitorType { + None = "none", + SpecificBook = "specificBook", + EntireAuthor = "entireAuthor", +} + +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; + shouldMonitor?: ImportListMonitorType; + shouldMonitorExisting?: boolean; + shouldSearch?: boolean; + rootFolderPath?: string | null; + monitorNewItems?: NewItemMonitorTypes; + /** @format int32 */ + qualityProfileId?: number; + /** @format int32 */ + metadataProfileId?: number; + listType?: ImportListType; + /** @format int32 */ + listOrder?: number; + /** @format date-span */ + minRefreshInterval?: string; +} + +export enum ImportListType { + Program = "program", + Goodreads = "goodreads", + Other = "other", +} + +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; +} + +export interface IndexerFlagResource { + /** @format int32 */ + id?: number; + name?: string | null; + nameLower?: string | null; +} + +export enum IndexerFlags { + Freeleech = "freeleech", + Halfleech = "halfleech", + DoubleUpload = "doubleUpload", + Internal = "internal", + Scene = "scene", + Freeleech75 = "freeleech75", + Freeleech25 = "freeleech25", +} + +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 IsoCountry { + twoLetterCode?: string | null; + name?: string | null; +} + +export interface LanguageResource { + /** @format int32 */ + id?: number; + name?: string | null; + nameLower?: string | null; +} + +export interface Links { + url?: string | null; + name?: 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 ManualImportResource { + /** @format int32 */ + id?: number; + path?: string | null; + name?: string | null; + /** @format int64 */ + size?: number; + author?: AuthorResource; + book?: BookResource; + foreignEditionId?: string | null; + quality?: QualityModel; + releaseGroup?: string | null; + /** @format int32 */ + qualityWeight?: number; + downloadId?: string | null; + /** @format int32 */ + indexerFlags?: number; + rejections?: Rejection[] | null; + audioTags?: ParsedTrackInfo; + additionalFile?: boolean; + replaceExistingFiles?: boolean; + disableReleaseSwitching?: boolean; +} + +export interface ManualImportUpdateResource { + /** @format int32 */ + id?: number; + path?: string | null; + name?: string | null; + /** @format int32 */ + authorId?: number | null; + /** @format int32 */ + bookId?: number | null; + foreignEditionId?: string | null; + quality?: QualityModel; + releaseGroup?: string | null; + /** @format int32 */ + indexerFlags?: number; + downloadId?: string | null; + additionalFile?: boolean; + replaceExistingFiles?: boolean; + disableReleaseSwitching?: boolean; + rejections?: Rejection[] | null; +} + +export interface MediaCover { + url?: string | null; + coverType?: MediaCoverTypes; + extension?: string | null; +} + +export enum MediaCoverTypes { + Unknown = "unknown", + Poster = "poster", + Banner = "banner", + Fanart = "fanart", + Screenshot = "screenshot", + Headshot = "headshot", + Cover = "cover", + Disc = "disc", + Logo = "logo", + Clearlogo = "clearlogo", +} + +export interface MediaInfoModel { + audioFormat?: string | null; + /** @format int32 */ + audioBitrate?: number; + /** @format int32 */ + audioChannels?: number; + /** @format int32 */ + audioBits?: number; + /** @format int32 */ + audioSampleRate?: number; +} + +export interface MediaInfoResource { + /** @format int32 */ + id?: number; + /** @format double */ + audioChannels?: number; + audioBitRate?: string | null; + audioCodec?: string | null; + audioBits?: string | null; + audioSampleRate?: string | null; +} + +export interface MediaManagementConfigResource { + /** @format int32 */ + id?: number; + autoUnmonitorPreviouslyDownloadedBooks?: boolean; + recycleBin?: string | null; + /** @format int32 */ + recycleBinCleanupDays?: number; + downloadPropersAndRepacks?: ProperDownloadTypes; + createEmptyAuthorFolders?: boolean; + deleteEmptyFolders?: boolean; + fileDate?: FileDateType; + watchLibraryForChanges?: boolean; + rescanAfterRefresh?: RescanAfterRefreshType; + allowFingerprinting?: AllowFingerprinting; + setPermissionsLinux?: boolean; + chmodFolder?: string | null; + chownGroup?: string | null; + skipFreeSpaceCheckWhenImporting?: boolean; + /** @format int32 */ + minimumFreeSpaceWhenImporting?: number; + copyUsingHardlinks?: boolean; + importExtraFiles?: boolean; + extraFileExtensions?: string | null; +} + +export interface MetadataProfile { + /** @format int32 */ + id?: number; + name?: string | null; + /** @format double */ + minPopularity?: number; + skipMissingDate?: boolean; + skipMissingIsbn?: boolean; + skipPartsAndSets?: boolean; + skipSeriesSecondary?: boolean; + allowedLanguages?: string | null; + /** @format int32 */ + minPages?: number; + ignored?: string[] | null; +} + +export interface MetadataProfileLazyLoaded { + value?: MetadataProfile; + isLoaded?: boolean; +} + +export interface MetadataProfileResource { + /** @format int32 */ + id?: number; + name?: string | null; + /** @format double */ + minPopularity?: number; + skipMissingDate?: boolean; + skipMissingIsbn?: boolean; + skipPartsAndSets?: boolean; + skipSeriesSecondary?: boolean; + allowedLanguages?: string | null; + /** @format int32 */ + minPages?: number; + ignored?: string[] | null; +} + +export interface MetadataProviderConfigResource { + /** @format int32 */ + id?: number; + writeAudioTags?: WriteAudioTagsType; + scrubAudioTags?: boolean; + writeBookTags?: WriteBookTagsType; + updateCovers?: boolean; + embedMetadata?: 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 { + All = "all", + Future = "future", + Missing = "missing", + Existing = "existing", + Latest = "latest", + First = "first", + None = "none", + Unknown = "unknown", +} + +export interface MonitoringOptions { + monitor?: MonitorTypes; + booksToMonitor?: string[] | null; + monitored?: boolean; +} + +export interface NamingConfigResource { + /** @format int32 */ + id?: number; + renameBooks?: boolean; + replaceIllegalCharacters?: boolean; + /** @format int32 */ + colonReplacementFormat?: number; + standardBookFormat?: string | null; + authorFolderFormat?: string | null; + includeAuthorName?: boolean; + includeBookTitle?: boolean; + includeQuality?: boolean; + replaceSpaces?: boolean; + separator?: string | null; + numberStyle?: string | null; +} + +export enum NewItemMonitorTypes { + All = "all", + None = "none", + New = "new", +} + +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; + onReleaseImport?: boolean; + onUpgrade?: boolean; + onRename?: boolean; + onAuthorAdded?: boolean; + onAuthorDelete?: boolean; + onBookDelete?: boolean; + onBookFileDelete?: boolean; + onBookFileDeleteForUpgrade?: boolean; + onHealthIssue?: boolean; + onDownloadFailure?: boolean; + onImportFailure?: boolean; + onBookRetag?: boolean; + onApplicationUpdate?: boolean; + supportsOnGrab?: boolean; + supportsOnReleaseImport?: boolean; + supportsOnUpgrade?: boolean; + supportsOnRename?: boolean; + supportsOnAuthorAdded?: boolean; + supportsOnAuthorDelete?: boolean; + supportsOnBookDelete?: boolean; + supportsOnBookFileDelete?: boolean; + supportsOnBookFileDeleteForUpgrade?: boolean; + supportsOnHealthIssue?: boolean; + includeHealthWarnings?: boolean; + supportsOnDownloadFailure?: boolean; + supportsOnImportFailure?: boolean; + supportsOnBookRetag?: boolean; + supportsOnApplicationUpdate?: boolean; + testCommand?: string | null; +} + +export interface ParseResource { + /** @format int32 */ + id?: number; + title?: string | null; + parsedBookInfo?: ParsedBookInfo; + author?: AuthorResource; + books?: BookResource[] | null; +} + +export interface ParsedBookInfo { + bookTitle?: string | null; + authorName?: string | null; + authorTitleInfo?: AuthorTitleInfo; + quality?: QualityModel; + releaseDate?: string | null; + discography?: boolean; + /** @format int32 */ + discographyStart?: number; + /** @format int32 */ + discographyEnd?: number; + releaseGroup?: string | null; + releaseHash?: string | null; + releaseVersion?: string | null; + releaseTitle?: string | null; +} + +export interface ParsedTrackInfo { + title?: string | null; + cleanTitle?: string | null; + authors?: string[] | null; + authorTitle?: string | null; + bookTitle?: string | null; + seriesTitle?: string | null; + seriesIndex?: string | null; + isbn?: string | null; + asin?: string | null; + goodreadsId?: string | null; + authorMBId?: string | null; + bookMBId?: string | null; + releaseMBId?: string | null; + recordingMBId?: string | null; + trackMBId?: string | null; + /** @format int32 */ + discNumber?: number; + /** @format int32 */ + discCount?: number; + country?: IsoCountry; + /** @format int32 */ + year?: number; + publisher?: string | null; + label?: string | null; + source?: string | null; + catalogNumber?: string | null; + disambiguation?: string | null; + /** @format date-span */ + duration?: string; + quality?: QualityModel; + mediaInfo?: MediaInfoModel; + trackNumbers?: number[] | null; + language?: string | null; + releaseGroup?: string | null; + releaseHash?: string | null; +} + +export interface PingResource { + status?: string | null; +} + +export interface ProfileFormatItem { + format?: CustomFormat; + /** @format int32 */ + score?: number; +} + +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; +} + +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; +} + +export interface QualityModel { + quality?: Quality; + revision?: Revision; +} + +export interface QualityProfile { + /** @format int32 */ + id?: number; + name?: string | null; + upgradeAllowed?: boolean; + /** @format int32 */ + cutoff?: number; + /** @format int32 */ + minFormatScore?: number; + /** @format int32 */ + cutoffFormatScore?: number; + formatItems?: ProfileFormatItem[] | null; + items?: QualityProfileQualityItem[] | null; +} + +export interface QualityProfileLazyLoaded { + value?: QualityProfile; + isLoaded?: boolean; +} + +export interface QualityProfileQualityItem { + /** @format int32 */ + id?: number; + name?: string | null; + quality?: Quality; + items?: QualityProfileQualityItem[] | null; + allowed?: boolean; +} + +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; + formatItems?: ProfileFormatItemResource[] | null; +} + +export interface QueueBulkResource { + ids?: number[] | null; +} + +export interface QueueResource { + /** @format int32 */ + id?: number; + /** @format int32 */ + authorId?: number | null; + /** @format int32 */ + bookId?: number | null; + author?: AuthorResource; + book?: BookResource; + 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; + 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; + downloadForced?: 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; + /** @format double */ + popularity?: number; +} + +export interface Rejection { + reason?: string | null; + type?: RejectionType; +} + +export enum RejectionType { + Permanent = "permanent", + Temporary = "temporary", +} + +export interface ReleaseProfileResource { + /** @format int32 */ + id?: number; + enabled?: boolean; + required?: string[] | null; + ignored?: string[] | null; + /** @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; + discography?: boolean; + sceneSource?: boolean; + airDate?: string | null; + authorName?: string | null; + bookTitle?: string | null; + approved?: boolean; + temporarilyRejected?: boolean; + rejected?: boolean; + rejections?: string[] | null; + /** @format date-time */ + publishDate?: string; + commentUrl?: string | null; + downloadUrl?: string | null; + infoUrl?: string | null; + downloadAllowed?: boolean; + /** @format int32 */ + releaseWeight?: number; + customFormats?: CustomFormatResource[] | null; + /** @format int32 */ + customFormatScore?: number; + magnetUrl?: string | null; + infoHash?: string | null; + /** @format int32 */ + seeders?: number | null; + /** @format int32 */ + leechers?: number | null; + protocol?: DownloadProtocol; + /** @format int32 */ + indexerFlags?: number; + /** @format int32 */ + authorId?: number | null; + /** @format int32 */ + bookId?: number | null; + /** @format int32 */ + downloadClientId?: number | null; + downloadClient?: string | null; +} + +export interface RemotePathMappingResource { + /** @format int32 */ + id?: number; + host?: string | null; + remotePath?: string | null; + localPath?: string | null; +} + +export interface RenameBookResource { + /** @format int32 */ + id?: number; + /** @format int32 */ + authorId?: number; + /** @format int32 */ + bookId?: number; + /** @format int32 */ + bookFileId?: number; + existingPath?: string | null; + newPath?: string | null; +} + +export enum RescanAfterRefreshType { + Always = "always", + AfterManual = "afterManual", + Never = "never", +} + +export interface RetagBookResource { + /** @format int32 */ + id?: number; + /** @format int32 */ + authorId?: number; + /** @format int32 */ + bookId?: number; + trackNumbers?: number[] | null; + /** @format int32 */ + bookFileId?: number; + path?: string | null; + changes?: TagDifference[] | null; +} + +export interface Revision { + /** @format int32 */ + version?: number; + /** @format int32 */ + real?: number; + isRepack?: boolean; +} + +export interface RootFolderResource { + /** @format int32 */ + id?: number; + name?: string | null; + path?: string | null; + /** @format int32 */ + defaultMetadataProfileId?: number; + /** @format int32 */ + defaultQualityProfileId?: number; + defaultMonitorOption?: MonitorTypes; + defaultNewItemMonitorOption?: NewItemMonitorTypes; + /** @uniqueItems true */ + defaultTags?: number[] | null; + isCalibreLibrary?: boolean; + host?: string | null; + /** @format int32 */ + port?: number; + urlBase?: string | null; + username?: string | null; + password?: string | null; + library?: string | null; + outputFormat?: string | null; + outputProfile?: string | null; + useSsl?: boolean; + accessible?: boolean; + /** @format int64 */ + freeSpace?: number | null; + /** @format int64 */ + totalSpace?: number | 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; +} + +export interface Series { + /** @format int32 */ + id?: number; + foreignSeriesId?: string | null; + title?: string | null; + description?: string | null; + numbered?: boolean; + /** @format int32 */ + workCount?: number; + /** @format int32 */ + primaryWorkCount?: number; + linkItems?: SeriesBookLinkListLazyLoaded; + books?: BookListLazyLoaded; + foreignAuthorId?: string | null; +} + +export interface SeriesBookLink { + /** @format int32 */ + id?: number; + position?: string | null; + /** @format int32 */ + seriesPosition?: number; + /** @format int32 */ + seriesId?: number; + /** @format int32 */ + bookId?: number; + isPrimary?: boolean; + series?: SeriesLazyLoaded; + book?: BookLazyLoaded; +} + +export interface SeriesBookLinkListLazyLoaded { + value?: SeriesBookLink[] | null; + isLoaded?: boolean; +} + +export interface SeriesBookLinkResource { + /** @format int32 */ + id?: number; + position?: string | null; + /** @format int32 */ + seriesPosition?: number; + /** @format int32 */ + seriesId?: number; + /** @format int32 */ + bookId?: number; +} + +export interface SeriesLazyLoaded { + value?: Series; + isLoaded?: boolean; +} + +export interface SeriesListLazyLoaded { + value?: Series[] | null; + isLoaded?: boolean; +} + +export interface SeriesResource { + /** @format int32 */ + id?: number; + title?: string | null; + description?: string | null; + links?: SeriesBookLinkResource[] | null; +} + +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; + 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 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; + authorIds?: number[] | null; +} + +export interface TagDifference { + field?: string | null; + oldValue?: string | null; + newValue?: string | 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", + DownloadFailed = "downloadFailed", + DownloadFailedPending = "downloadFailedPending", + ImportPending = "importPending", + Importing = "importing", + ImportFailed = "importFailed", + Imported = "imported", + 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; + /** @format int32 */ + uiLanguage?: number; + theme?: 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; +} + +export enum WriteAudioTagsType { + No = "no", + NewFiles = "newFiles", + AllFiles = "allFiles", + Sync = "sync", +} + +export enum WriteBookTagsType { + NewFiles = "newFiles", + AllFiles = "allFiles", + Sync = "sync", +} diff --git a/src/api.ts b/src/api.ts index 301f84b..0ed8dc7 100644 --- a/src/api.ts +++ b/src/api.ts @@ -1,5 +1,6 @@ import { KyHttpClient } from "./__generated__/ky-client"; import { Api as RadarrApi } from "./__generated__/radarr/Api"; +import { Api as ReadarrApi } from "./__generated__/readarr/Api"; import { Api as SonarrApi } from "./__generated__/sonarr/Api"; import { Api as WhisparrApi } from "./__generated__/whisparr/Api"; import { logger } from "./logger"; @@ -8,15 +9,17 @@ import { ArrType } from "./types/common.types"; let sonarrClient: SonarrApi | undefined; let radarrClient: RadarrApi | undefined; let whisparrClient: WhisparrApi | undefined; +let readarrClient: ReadarrApi | undefined; export const unsetApi = () => { sonarrClient = undefined; radarrClient = undefined; whisparrClient = undefined; + readarrClient = undefined; }; -export const getArrApi = (): SonarrApi | RadarrApi | WhisparrApi => { - const client = sonarrClient || radarrClient || whisparrClient; +export const getArrApi = (): SonarrApi | RadarrApi | WhisparrApi | ReadarrApi => { + const client = sonarrClient || radarrClient || whisparrClient || readarrClient; if (client) { return client; @@ -62,15 +65,15 @@ const handleErrorApi = (error: any, arrType: ArrType) => { throw new Error(message); }; -export const configureApi = async (type: ArrType, url: string, apiKey: string) => { +export const configureApi = async (type: ArrType, baseUrl: string, apiKey: string) => { unsetApi(); - validateParams(url, apiKey, type); + validateParams(baseUrl, apiKey, type); const httpClient = new KyHttpClient({ headers: { "X-Api-Key": apiKey, }, - prefixUrl: url, + prefixUrl: baseUrl, }); let api; @@ -88,6 +91,10 @@ export const configureApi = async (type: ArrType, url: string, apiKey: string) = api = new WhisparrApi(httpClient); whisparrClient = api; break; + case "READARR": + api = new ReadarrApi(httpClient); + readarrClient = api; + break; default: throw new Error(`Invalid API type: ${type}`); } diff --git a/src/config.ts b/src/config.ts index 3bc7c76..c577781 100644 --- a/src/config.ts +++ b/src/config.ts @@ -129,6 +129,7 @@ export const transformConfig = (input: InputConfigSchema): ConfigSchema => { radarr: mappedCustomFormats(input.radarr), sonarr: mappedCustomFormats(input.sonarr), whisparr: mappedCustomFormats(input.whisparr), + readarr: mappedCustomFormats(input.readarr), }; }; diff --git a/src/index.ts b/src/index.ts index e72acb6..96bc1ab 100644 --- a/src/index.ts +++ b/src/index.ts @@ -352,6 +352,26 @@ const run = async () => { unsetApi(); } } + + const readarrConfig = applicationConfig.readarr; + + if ( + readarrConfig == null || + Array.isArray(readarrConfig) || + typeof readarrConfig !== "object" || + Object.keys(readarrConfig).length <= 0 + ) { + logHeading(`No Readarr instances defined.`); + } else { + logHeading(`Processing Readarr ...`); + + for (const [instanceName, instance] of Object.entries(readarrConfig)) { + logger.info(`Processing Readarr Instance: ${instanceName}`); + await configureApi("READARR", instance.base_url, instance.api_key); + await pipeline(instance, "READARR"); + unsetApi(); + } + } }; run(); diff --git a/src/types/common.types.ts b/src/types/common.types.ts index f4e4b03..4c29464 100644 --- a/src/types/common.types.ts +++ b/src/types/common.types.ts @@ -66,7 +66,7 @@ export type MappedTemplates = Partial< export type MappedMergedTemplates = MappedTemplates & Required>; -export type ArrType = "SONARR" | "RADARR" | "WHISPARR"; // anime and series exists in trash guide +export type ArrType = "RADARR" | "SONARR" | "WHISPARR" | "READARR"; export type QualityDefintionsSonarr = "anime" | "series" | "custom"; export type QualityDefintionsRadarr = "movie" | "custom"; diff --git a/src/types/config.types.ts b/src/types/config.types.ts index 50025fb..59000e8 100644 --- a/src/types/config.types.ts +++ b/src/types/config.types.ts @@ -12,6 +12,7 @@ export type InputConfigSchema = { sonarr?: Record; radarr?: Record; whisparr?: Record; + readarr?: Record; }; export type InputConfigCustomFormat = {