diff --git a/jellyfin-openapi-stable.json b/jellyfin-openapi-stable.json new file mode 100644 index 0000000..458ee5d --- /dev/null +++ b/jellyfin-openapi-stable.json @@ -0,0 +1,55407 @@ +{ + "openapi": "3.0.1", + "info": { + "title": "Jellyfin API", + "version": "10.8.9", + "x-jellyfin-version": "10.8.9" + }, + "servers": [ + { + "url": "http://localhost" + } + ], + "paths": { + "/System/ActivityLog/Entries": { + "get": { + "tags": [ + "ActivityLog" + ], + "summary": "Gets activity log entries.", + "operationId": "GetLogEntries", + "parameters": [ + { + "name": "startIndex", + "in": "query", + "description": "Optional. The record index to start at. All items with a lower index will be dropped from the results.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "limit", + "in": "query", + "description": "Optional. The maximum number of records to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "minDate", + "in": "query", + "description": "Optional. The minimum date. Format = ISO.", + "schema": { + "type": "string", + "format": "date-time" + } + }, + { + "name": "hasUserId", + "in": "query", + "description": "Optional. Filter log entries if it has user id, or not.", + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "Activity log returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ActivityLogEntryQueryResult" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ActivityLogEntryQueryResult" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ActivityLogEntryQueryResult" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "RequiresElevation" + ] + } + ] + } + }, + "/Auth/Keys": { + "get": { + "tags": [ + "ApiKey" + ], + "summary": "Get all keys.", + "operationId": "GetKeys", + "responses": { + "200": { + "description": "Api keys retrieved.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthenticationInfoQueryResult" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/AuthenticationInfoQueryResult" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/AuthenticationInfoQueryResult" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "RequiresElevation" + ] + } + ] + }, + "post": { + "tags": [ + "ApiKey" + ], + "summary": "Create a new api key.", + "operationId": "CreateKey", + "parameters": [ + { + "name": "app", + "in": "query", + "description": "Name of the app using the authentication key.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Api key created." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "RequiresElevation" + ] + } + ] + } + }, + "/Auth/Keys/{key}": { + "delete": { + "tags": [ + "ApiKey" + ], + "summary": "Remove an api key.", + "operationId": "RevokeKey", + "parameters": [ + { + "name": "key", + "in": "path", + "description": "The access token to delete.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Api key deleted." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "RequiresElevation" + ] + } + ] + } + }, + "/Artists": { + "get": { + "tags": [ + "Artists" + ], + "summary": "Gets all artists from a given item, folder, or the entire library.", + "operationId": "GetArtists", + "parameters": [ + { + "name": "minCommunityRating", + "in": "query", + "description": "Optional filter by minimum community rating.", + "schema": { + "type": "number", + "format": "double" + } + }, + { + "name": "startIndex", + "in": "query", + "description": "Optional. The record index to start at. All items with a lower index will be dropped from the results.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "limit", + "in": "query", + "description": "Optional. The maximum number of records to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "searchTerm", + "in": "query", + "description": "Optional. Search term.", + "schema": { + "type": "string" + } + }, + { + "name": "parentId", + "in": "query", + "description": "Specify this to localize the search to a specific item or folder. Omit to use the root.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "fields", + "in": "query", + "description": "Optional. Specify additional fields of information to return in the output.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ItemFields" + } + } + }, + { + "name": "excludeItemTypes", + "in": "query", + "description": "Optional. If specified, results will be filtered out based on item type. This allows multiple, comma delimited.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseItemKind" + } + } + }, + { + "name": "includeItemTypes", + "in": "query", + "description": "Optional. If specified, results will be filtered based on item type. This allows multiple, comma delimited.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseItemKind" + } + } + }, + { + "name": "filters", + "in": "query", + "description": "Optional. Specify additional filters to apply.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ItemFilter" + } + } + }, + { + "name": "isFavorite", + "in": "query", + "description": "Optional filter by items that are marked as favorite, or not.", + "schema": { + "type": "boolean" + } + }, + { + "name": "mediaTypes", + "in": "query", + "description": "Optional filter by MediaType. Allows multiple, comma delimited.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "genres", + "in": "query", + "description": "Optional. If specified, results will be filtered based on genre. This allows multiple, pipe delimited.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "genreIds", + "in": "query", + "description": "Optional. If specified, results will be filtered based on genre id. This allows multiple, pipe delimited.", + "schema": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + }, + { + "name": "officialRatings", + "in": "query", + "description": "Optional. If specified, results will be filtered based on OfficialRating. This allows multiple, pipe delimited.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "tags", + "in": "query", + "description": "Optional. If specified, results will be filtered based on tag. This allows multiple, pipe delimited.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "years", + "in": "query", + "description": "Optional. If specified, results will be filtered based on production year. This allows multiple, comma delimited.", + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + }, + { + "name": "enableUserData", + "in": "query", + "description": "Optional, include user data.", + "schema": { + "type": "boolean" + } + }, + { + "name": "imageTypeLimit", + "in": "query", + "description": "Optional, the max number of images to return, per image type.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "enableImageTypes", + "in": "query", + "description": "Optional. The image types to include in the output.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ImageType" + } + } + }, + { + "name": "person", + "in": "query", + "description": "Optional. If specified, results will be filtered to include only those containing the specified person.", + "schema": { + "type": "string" + } + }, + { + "name": "personIds", + "in": "query", + "description": "Optional. If specified, results will be filtered to include only those containing the specified person ids.", + "schema": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + }, + { + "name": "personTypes", + "in": "query", + "description": "Optional. If specified, along with Person, results will be filtered to include only those containing the specified person and PersonType. Allows multiple, comma-delimited.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "studios", + "in": "query", + "description": "Optional. If specified, results will be filtered based on studio. This allows multiple, pipe delimited.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "studioIds", + "in": "query", + "description": "Optional. If specified, results will be filtered based on studio id. This allows multiple, pipe delimited.", + "schema": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + }, + { + "name": "userId", + "in": "query", + "description": "User id.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "nameStartsWithOrGreater", + "in": "query", + "description": "Optional filter by items whose name is sorted equally or greater than a given input string.", + "schema": { + "type": "string" + } + }, + { + "name": "nameStartsWith", + "in": "query", + "description": "Optional filter by items whose name is sorted equally than a given input string.", + "schema": { + "type": "string" + } + }, + { + "name": "nameLessThan", + "in": "query", + "description": "Optional filter by items whose name is equally or lesser than a given input string.", + "schema": { + "type": "string" + } + }, + { + "name": "sortBy", + "in": "query", + "description": "Optional. Specify one or more sort orders, comma delimited.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort Order - Ascending,Descending.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SortOrder" + } + } + }, + { + "name": "enableImages", + "in": "query", + "description": "Optional, include image information in output.", + "schema": { + "type": "boolean", + "default": true + } + }, + { + "name": "enableTotalRecordCount", + "in": "query", + "description": "Total record count.", + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Artists returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Artists/{name}": { + "get": { + "tags": [ + "Artists" + ], + "summary": "Gets an artist by name.", + "operationId": "GetArtistByName", + "parameters": [ + { + "name": "name", + "in": "path", + "description": "Studio name.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "userId", + "in": "query", + "description": "Optional. Filter by user id, and attach user data.", + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Artist returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BaseItemDto" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDto" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDto" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Artists/AlbumArtists": { + "get": { + "tags": [ + "Artists" + ], + "summary": "Gets all album artists from a given item, folder, or the entire library.", + "operationId": "GetAlbumArtists", + "parameters": [ + { + "name": "minCommunityRating", + "in": "query", + "description": "Optional filter by minimum community rating.", + "schema": { + "type": "number", + "format": "double" + } + }, + { + "name": "startIndex", + "in": "query", + "description": "Optional. The record index to start at. All items with a lower index will be dropped from the results.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "limit", + "in": "query", + "description": "Optional. The maximum number of records to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "searchTerm", + "in": "query", + "description": "Optional. Search term.", + "schema": { + "type": "string" + } + }, + { + "name": "parentId", + "in": "query", + "description": "Specify this to localize the search to a specific item or folder. Omit to use the root.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "fields", + "in": "query", + "description": "Optional. Specify additional fields of information to return in the output.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ItemFields" + } + } + }, + { + "name": "excludeItemTypes", + "in": "query", + "description": "Optional. If specified, results will be filtered out based on item type. This allows multiple, comma delimited.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseItemKind" + } + } + }, + { + "name": "includeItemTypes", + "in": "query", + "description": "Optional. If specified, results will be filtered based on item type. This allows multiple, comma delimited.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseItemKind" + } + } + }, + { + "name": "filters", + "in": "query", + "description": "Optional. Specify additional filters to apply.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ItemFilter" + } + } + }, + { + "name": "isFavorite", + "in": "query", + "description": "Optional filter by items that are marked as favorite, or not.", + "schema": { + "type": "boolean" + } + }, + { + "name": "mediaTypes", + "in": "query", + "description": "Optional filter by MediaType. Allows multiple, comma delimited.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "genres", + "in": "query", + "description": "Optional. If specified, results will be filtered based on genre. This allows multiple, pipe delimited.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "genreIds", + "in": "query", + "description": "Optional. If specified, results will be filtered based on genre id. This allows multiple, pipe delimited.", + "schema": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + }, + { + "name": "officialRatings", + "in": "query", + "description": "Optional. If specified, results will be filtered based on OfficialRating. This allows multiple, pipe delimited.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "tags", + "in": "query", + "description": "Optional. If specified, results will be filtered based on tag. This allows multiple, pipe delimited.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "years", + "in": "query", + "description": "Optional. If specified, results will be filtered based on production year. This allows multiple, comma delimited.", + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + }, + { + "name": "enableUserData", + "in": "query", + "description": "Optional, include user data.", + "schema": { + "type": "boolean" + } + }, + { + "name": "imageTypeLimit", + "in": "query", + "description": "Optional, the max number of images to return, per image type.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "enableImageTypes", + "in": "query", + "description": "Optional. The image types to include in the output.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ImageType" + } + } + }, + { + "name": "person", + "in": "query", + "description": "Optional. If specified, results will be filtered to include only those containing the specified person.", + "schema": { + "type": "string" + } + }, + { + "name": "personIds", + "in": "query", + "description": "Optional. If specified, results will be filtered to include only those containing the specified person ids.", + "schema": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + }, + { + "name": "personTypes", + "in": "query", + "description": "Optional. If specified, along with Person, results will be filtered to include only those containing the specified person and PersonType. Allows multiple, comma-delimited.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "studios", + "in": "query", + "description": "Optional. If specified, results will be filtered based on studio. This allows multiple, pipe delimited.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "studioIds", + "in": "query", + "description": "Optional. If specified, results will be filtered based on studio id. This allows multiple, pipe delimited.", + "schema": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + }, + { + "name": "userId", + "in": "query", + "description": "User id.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "nameStartsWithOrGreater", + "in": "query", + "description": "Optional filter by items whose name is sorted equally or greater than a given input string.", + "schema": { + "type": "string" + } + }, + { + "name": "nameStartsWith", + "in": "query", + "description": "Optional filter by items whose name is sorted equally than a given input string.", + "schema": { + "type": "string" + } + }, + { + "name": "nameLessThan", + "in": "query", + "description": "Optional filter by items whose name is equally or lesser than a given input string.", + "schema": { + "type": "string" + } + }, + { + "name": "sortBy", + "in": "query", + "description": "Optional. Specify one or more sort orders, comma delimited.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort Order - Ascending,Descending.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SortOrder" + } + } + }, + { + "name": "enableImages", + "in": "query", + "description": "Optional, include image information in output.", + "schema": { + "type": "boolean", + "default": true + } + }, + { + "name": "enableTotalRecordCount", + "in": "query", + "description": "Total record count.", + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Album artists returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Audio/{itemId}/stream": { + "get": { + "tags": [ + "Audio" + ], + "summary": "Gets an audio stream.", + "operationId": "GetAudioStream", + "parameters": [ + { + "name": "itemId", + "in": "path", + "description": "The item id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "container", + "in": "query", + "description": "The audio container.", + "schema": { + "type": "string" + } + }, + { + "name": "static", + "in": "query", + "description": "Optional. If true, the original file will be streamed statically without any encoding. Use either no url extension or the original file extension. true/false.", + "schema": { + "type": "boolean" + } + }, + { + "name": "params", + "in": "query", + "description": "The streaming parameters.", + "schema": { + "type": "string" + } + }, + { + "name": "tag", + "in": "query", + "description": "The tag.", + "schema": { + "type": "string" + } + }, + { + "name": "deviceProfileId", + "in": "query", + "description": "Optional. The dlna device profile id to utilize.", + "schema": { + "type": "string" + } + }, + { + "name": "playSessionId", + "in": "query", + "description": "The play session id.", + "schema": { + "type": "string" + } + }, + { + "name": "segmentContainer", + "in": "query", + "description": "The segment container.", + "schema": { + "type": "string" + } + }, + { + "name": "segmentLength", + "in": "query", + "description": "The segment length.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "minSegments", + "in": "query", + "description": "The minimum number of segments.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "mediaSourceId", + "in": "query", + "description": "The media version id, if playing an alternate version.", + "schema": { + "type": "string" + } + }, + { + "name": "deviceId", + "in": "query", + "description": "The device id of the client requesting. Used to stop encoding processes when needed.", + "schema": { + "type": "string" + } + }, + { + "name": "audioCodec", + "in": "query", + "description": "Optional. Specify a audio codec to encode to, e.g. mp3. If omitted the server will auto-select using the url's extension. Options: aac, mp3, vorbis, wma.", + "schema": { + "type": "string" + } + }, + { + "name": "enableAutoStreamCopy", + "in": "query", + "description": "Whether or not to allow automatic stream copy if requested values match the original source. Defaults to true.", + "schema": { + "type": "boolean" + } + }, + { + "name": "allowVideoStreamCopy", + "in": "query", + "description": "Whether or not to allow copying of the video stream url.", + "schema": { + "type": "boolean" + } + }, + { + "name": "allowAudioStreamCopy", + "in": "query", + "description": "Whether or not to allow copying of the audio stream url.", + "schema": { + "type": "boolean" + } + }, + { + "name": "breakOnNonKeyFrames", + "in": "query", + "description": "Optional. Whether to break on non key frames.", + "schema": { + "type": "boolean" + } + }, + { + "name": "audioSampleRate", + "in": "query", + "description": "Optional. Specify a specific audio sample rate, e.g. 44100.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxAudioBitDepth", + "in": "query", + "description": "Optional. The maximum audio bit depth.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "audioBitRate", + "in": "query", + "description": "Optional. Specify an audio bitrate to encode to, e.g. 128000. If omitted this will be left to encoder defaults.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "audioChannels", + "in": "query", + "description": "Optional. Specify a specific number of audio channels to encode to, e.g. 2.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxAudioChannels", + "in": "query", + "description": "Optional. Specify a maximum number of audio channels to encode to, e.g. 2.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "profile", + "in": "query", + "description": "Optional. Specify a specific an encoder profile (varies by encoder), e.g. main, baseline, high.", + "schema": { + "type": "string" + } + }, + { + "name": "level", + "in": "query", + "description": "Optional. Specify a level for the encoder profile (varies by encoder), e.g. 3, 3.1.", + "schema": { + "type": "string" + } + }, + { + "name": "framerate", + "in": "query", + "description": "Optional. A specific video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements.", + "schema": { + "type": "number", + "format": "float" + } + }, + { + "name": "maxFramerate", + "in": "query", + "description": "Optional. A specific maximum video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements.", + "schema": { + "type": "number", + "format": "float" + } + }, + { + "name": "copyTimestamps", + "in": "query", + "description": "Whether or not to copy timestamps when transcoding with an offset. Defaults to false.", + "schema": { + "type": "boolean" + } + }, + { + "name": "startTimeTicks", + "in": "query", + "description": "Optional. Specify a starting offset, in ticks. 1 tick = 10000 ms.", + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "width", + "in": "query", + "description": "Optional. The fixed horizontal resolution of the encoded video.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "height", + "in": "query", + "description": "Optional. The fixed vertical resolution of the encoded video.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "videoBitRate", + "in": "query", + "description": "Optional. Specify a video bitrate to encode to, e.g. 500000. If omitted this will be left to encoder defaults.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "subtitleStreamIndex", + "in": "query", + "description": "Optional. The index of the subtitle stream to use. If omitted no subtitles will be used.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "subtitleMethod", + "in": "query", + "description": "Optional. Specify the subtitle delivery method.", + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SubtitleDeliveryMethod" + } + ] + } + }, + { + "name": "maxRefFrames", + "in": "query", + "description": "Optional.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxVideoBitDepth", + "in": "query", + "description": "Optional. The maximum video bit depth.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "requireAvc", + "in": "query", + "description": "Optional. Whether to require avc.", + "schema": { + "type": "boolean" + } + }, + { + "name": "deInterlace", + "in": "query", + "description": "Optional. Whether to deinterlace the video.", + "schema": { + "type": "boolean" + } + }, + { + "name": "requireNonAnamorphic", + "in": "query", + "description": "Optional. Whether to require a non anamorphic stream.", + "schema": { + "type": "boolean" + } + }, + { + "name": "transcodingMaxAudioChannels", + "in": "query", + "description": "Optional. The maximum number of audio channels to transcode.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "cpuCoreLimit", + "in": "query", + "description": "Optional. The limit of how many cpu cores to use.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "liveStreamId", + "in": "query", + "description": "The live stream id.", + "schema": { + "type": "string" + } + }, + { + "name": "enableMpegtsM2TsMode", + "in": "query", + "description": "Optional. Whether to enable the MpegtsM2Ts mode.", + "schema": { + "type": "boolean" + } + }, + { + "name": "videoCodec", + "in": "query", + "description": "Optional. Specify a video codec to encode to, e.g. h264. If omitted the server will auto-select using the url's extension. Options: h265, h264, mpeg4, theora, vp8, vp9, vpx (deprecated), wmv.", + "schema": { + "type": "string" + } + }, + { + "name": "subtitleCodec", + "in": "query", + "description": "Optional. Specify a subtitle codec to encode to.", + "schema": { + "type": "string" + } + }, + { + "name": "transcodeReasons", + "in": "query", + "description": "Optional. The transcoding reason.", + "schema": { + "type": "string" + } + }, + { + "name": "audioStreamIndex", + "in": "query", + "description": "Optional. The index of the audio stream to use. If omitted the first audio stream will be used.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "videoStreamIndex", + "in": "query", + "description": "Optional. The index of the video stream to use. If omitted the first video stream will be used.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "context", + "in": "query", + "description": "Optional. The MediaBrowser.Model.Dlna.EncodingContext.", + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/EncodingContext" + } + ] + } + }, + { + "name": "streamOptions", + "in": "query", + "description": "Optional. The streaming options.", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + } + } + } + ], + "responses": { + "200": { + "description": "Audio stream returned.", + "content": { + "audio/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + }, + "head": { + "tags": [ + "Audio" + ], + "summary": "Gets an audio stream.", + "operationId": "HeadAudioStream", + "parameters": [ + { + "name": "itemId", + "in": "path", + "description": "The item id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "container", + "in": "query", + "description": "The audio container.", + "schema": { + "type": "string" + } + }, + { + "name": "static", + "in": "query", + "description": "Optional. If true, the original file will be streamed statically without any encoding. Use either no url extension or the original file extension. true/false.", + "schema": { + "type": "boolean" + } + }, + { + "name": "params", + "in": "query", + "description": "The streaming parameters.", + "schema": { + "type": "string" + } + }, + { + "name": "tag", + "in": "query", + "description": "The tag.", + "schema": { + "type": "string" + } + }, + { + "name": "deviceProfileId", + "in": "query", + "description": "Optional. The dlna device profile id to utilize.", + "schema": { + "type": "string" + } + }, + { + "name": "playSessionId", + "in": "query", + "description": "The play session id.", + "schema": { + "type": "string" + } + }, + { + "name": "segmentContainer", + "in": "query", + "description": "The segment container.", + "schema": { + "type": "string" + } + }, + { + "name": "segmentLength", + "in": "query", + "description": "The segment length.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "minSegments", + "in": "query", + "description": "The minimum number of segments.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "mediaSourceId", + "in": "query", + "description": "The media version id, if playing an alternate version.", + "schema": { + "type": "string" + } + }, + { + "name": "deviceId", + "in": "query", + "description": "The device id of the client requesting. Used to stop encoding processes when needed.", + "schema": { + "type": "string" + } + }, + { + "name": "audioCodec", + "in": "query", + "description": "Optional. Specify a audio codec to encode to, e.g. mp3. If omitted the server will auto-select using the url's extension. Options: aac, mp3, vorbis, wma.", + "schema": { + "type": "string" + } + }, + { + "name": "enableAutoStreamCopy", + "in": "query", + "description": "Whether or not to allow automatic stream copy if requested values match the original source. Defaults to true.", + "schema": { + "type": "boolean" + } + }, + { + "name": "allowVideoStreamCopy", + "in": "query", + "description": "Whether or not to allow copying of the video stream url.", + "schema": { + "type": "boolean" + } + }, + { + "name": "allowAudioStreamCopy", + "in": "query", + "description": "Whether or not to allow copying of the audio stream url.", + "schema": { + "type": "boolean" + } + }, + { + "name": "breakOnNonKeyFrames", + "in": "query", + "description": "Optional. Whether to break on non key frames.", + "schema": { + "type": "boolean" + } + }, + { + "name": "audioSampleRate", + "in": "query", + "description": "Optional. Specify a specific audio sample rate, e.g. 44100.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxAudioBitDepth", + "in": "query", + "description": "Optional. The maximum audio bit depth.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "audioBitRate", + "in": "query", + "description": "Optional. Specify an audio bitrate to encode to, e.g. 128000. If omitted this will be left to encoder defaults.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "audioChannels", + "in": "query", + "description": "Optional. Specify a specific number of audio channels to encode to, e.g. 2.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxAudioChannels", + "in": "query", + "description": "Optional. Specify a maximum number of audio channels to encode to, e.g. 2.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "profile", + "in": "query", + "description": "Optional. Specify a specific an encoder profile (varies by encoder), e.g. main, baseline, high.", + "schema": { + "type": "string" + } + }, + { + "name": "level", + "in": "query", + "description": "Optional. Specify a level for the encoder profile (varies by encoder), e.g. 3, 3.1.", + "schema": { + "type": "string" + } + }, + { + "name": "framerate", + "in": "query", + "description": "Optional. A specific video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements.", + "schema": { + "type": "number", + "format": "float" + } + }, + { + "name": "maxFramerate", + "in": "query", + "description": "Optional. A specific maximum video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements.", + "schema": { + "type": "number", + "format": "float" + } + }, + { + "name": "copyTimestamps", + "in": "query", + "description": "Whether or not to copy timestamps when transcoding with an offset. Defaults to false.", + "schema": { + "type": "boolean" + } + }, + { + "name": "startTimeTicks", + "in": "query", + "description": "Optional. Specify a starting offset, in ticks. 1 tick = 10000 ms.", + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "width", + "in": "query", + "description": "Optional. The fixed horizontal resolution of the encoded video.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "height", + "in": "query", + "description": "Optional. The fixed vertical resolution of the encoded video.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "videoBitRate", + "in": "query", + "description": "Optional. Specify a video bitrate to encode to, e.g. 500000. If omitted this will be left to encoder defaults.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "subtitleStreamIndex", + "in": "query", + "description": "Optional. The index of the subtitle stream to use. If omitted no subtitles will be used.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "subtitleMethod", + "in": "query", + "description": "Optional. Specify the subtitle delivery method.", + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SubtitleDeliveryMethod" + } + ] + } + }, + { + "name": "maxRefFrames", + "in": "query", + "description": "Optional.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxVideoBitDepth", + "in": "query", + "description": "Optional. The maximum video bit depth.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "requireAvc", + "in": "query", + "description": "Optional. Whether to require avc.", + "schema": { + "type": "boolean" + } + }, + { + "name": "deInterlace", + "in": "query", + "description": "Optional. Whether to deinterlace the video.", + "schema": { + "type": "boolean" + } + }, + { + "name": "requireNonAnamorphic", + "in": "query", + "description": "Optional. Whether to require a non anamorphic stream.", + "schema": { + "type": "boolean" + } + }, + { + "name": "transcodingMaxAudioChannels", + "in": "query", + "description": "Optional. The maximum number of audio channels to transcode.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "cpuCoreLimit", + "in": "query", + "description": "Optional. The limit of how many cpu cores to use.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "liveStreamId", + "in": "query", + "description": "The live stream id.", + "schema": { + "type": "string" + } + }, + { + "name": "enableMpegtsM2TsMode", + "in": "query", + "description": "Optional. Whether to enable the MpegtsM2Ts mode.", + "schema": { + "type": "boolean" + } + }, + { + "name": "videoCodec", + "in": "query", + "description": "Optional. Specify a video codec to encode to, e.g. h264. If omitted the server will auto-select using the url's extension. Options: h265, h264, mpeg4, theora, vp8, vp9, vpx (deprecated), wmv.", + "schema": { + "type": "string" + } + }, + { + "name": "subtitleCodec", + "in": "query", + "description": "Optional. Specify a subtitle codec to encode to.", + "schema": { + "type": "string" + } + }, + { + "name": "transcodeReasons", + "in": "query", + "description": "Optional. The transcoding reason.", + "schema": { + "type": "string" + } + }, + { + "name": "audioStreamIndex", + "in": "query", + "description": "Optional. The index of the audio stream to use. If omitted the first audio stream will be used.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "videoStreamIndex", + "in": "query", + "description": "Optional. The index of the video stream to use. If omitted the first video stream will be used.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "context", + "in": "query", + "description": "Optional. The MediaBrowser.Model.Dlna.EncodingContext.", + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/EncodingContext" + } + ] + } + }, + { + "name": "streamOptions", + "in": "query", + "description": "Optional. The streaming options.", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + } + } + } + ], + "responses": { + "200": { + "description": "Audio stream returned.", + "content": { + "audio/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/Audio/{itemId}/stream.{container}": { + "get": { + "tags": [ + "Audio" + ], + "summary": "Gets an audio stream.", + "operationId": "GetAudioStreamByContainer", + "parameters": [ + { + "name": "itemId", + "in": "path", + "description": "The item id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "container", + "in": "path", + "description": "The audio container.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "static", + "in": "query", + "description": "Optional. If true, the original file will be streamed statically without any encoding. Use either no url extension or the original file extension. true/false.", + "schema": { + "type": "boolean" + } + }, + { + "name": "params", + "in": "query", + "description": "The streaming parameters.", + "schema": { + "type": "string" + } + }, + { + "name": "tag", + "in": "query", + "description": "The tag.", + "schema": { + "type": "string" + } + }, + { + "name": "deviceProfileId", + "in": "query", + "description": "Optional. The dlna device profile id to utilize.", + "schema": { + "type": "string" + } + }, + { + "name": "playSessionId", + "in": "query", + "description": "The play session id.", + "schema": { + "type": "string" + } + }, + { + "name": "segmentContainer", + "in": "query", + "description": "The segment container.", + "schema": { + "type": "string" + } + }, + { + "name": "segmentLength", + "in": "query", + "description": "The segment lenght.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "minSegments", + "in": "query", + "description": "The minimum number of segments.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "mediaSourceId", + "in": "query", + "description": "The media version id, if playing an alternate version.", + "schema": { + "type": "string" + } + }, + { + "name": "deviceId", + "in": "query", + "description": "The device id of the client requesting. Used to stop encoding processes when needed.", + "schema": { + "type": "string" + } + }, + { + "name": "audioCodec", + "in": "query", + "description": "Optional. Specify a audio codec to encode to, e.g. mp3. If omitted the server will auto-select using the url's extension. Options: aac, mp3, vorbis, wma.", + "schema": { + "type": "string" + } + }, + { + "name": "enableAutoStreamCopy", + "in": "query", + "description": "Whether or not to allow automatic stream copy if requested values match the original source. Defaults to true.", + "schema": { + "type": "boolean" + } + }, + { + "name": "allowVideoStreamCopy", + "in": "query", + "description": "Whether or not to allow copying of the video stream url.", + "schema": { + "type": "boolean" + } + }, + { + "name": "allowAudioStreamCopy", + "in": "query", + "description": "Whether or not to allow copying of the audio stream url.", + "schema": { + "type": "boolean" + } + }, + { + "name": "breakOnNonKeyFrames", + "in": "query", + "description": "Optional. Whether to break on non key frames.", + "schema": { + "type": "boolean" + } + }, + { + "name": "audioSampleRate", + "in": "query", + "description": "Optional. Specify a specific audio sample rate, e.g. 44100.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxAudioBitDepth", + "in": "query", + "description": "Optional. The maximum audio bit depth.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "audioBitRate", + "in": "query", + "description": "Optional. Specify an audio bitrate to encode to, e.g. 128000. If omitted this will be left to encoder defaults.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "audioChannels", + "in": "query", + "description": "Optional. Specify a specific number of audio channels to encode to, e.g. 2.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxAudioChannels", + "in": "query", + "description": "Optional. Specify a maximum number of audio channels to encode to, e.g. 2.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "profile", + "in": "query", + "description": "Optional. Specify a specific an encoder profile (varies by encoder), e.g. main, baseline, high.", + "schema": { + "type": "string" + } + }, + { + "name": "level", + "in": "query", + "description": "Optional. Specify a level for the encoder profile (varies by encoder), e.g. 3, 3.1.", + "schema": { + "type": "string" + } + }, + { + "name": "framerate", + "in": "query", + "description": "Optional. A specific video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements.", + "schema": { + "type": "number", + "format": "float" + } + }, + { + "name": "maxFramerate", + "in": "query", + "description": "Optional. A specific maximum video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements.", + "schema": { + "type": "number", + "format": "float" + } + }, + { + "name": "copyTimestamps", + "in": "query", + "description": "Whether or not to copy timestamps when transcoding with an offset. Defaults to false.", + "schema": { + "type": "boolean" + } + }, + { + "name": "startTimeTicks", + "in": "query", + "description": "Optional. Specify a starting offset, in ticks. 1 tick = 10000 ms.", + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "width", + "in": "query", + "description": "Optional. The fixed horizontal resolution of the encoded video.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "height", + "in": "query", + "description": "Optional. The fixed vertical resolution of the encoded video.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "videoBitRate", + "in": "query", + "description": "Optional. Specify a video bitrate to encode to, e.g. 500000. If omitted this will be left to encoder defaults.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "subtitleStreamIndex", + "in": "query", + "description": "Optional. The index of the subtitle stream to use. If omitted no subtitles will be used.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "subtitleMethod", + "in": "query", + "description": "Optional. Specify the subtitle delivery method.", + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SubtitleDeliveryMethod" + } + ] + } + }, + { + "name": "maxRefFrames", + "in": "query", + "description": "Optional.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxVideoBitDepth", + "in": "query", + "description": "Optional. The maximum video bit depth.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "requireAvc", + "in": "query", + "description": "Optional. Whether to require avc.", + "schema": { + "type": "boolean" + } + }, + { + "name": "deInterlace", + "in": "query", + "description": "Optional. Whether to deinterlace the video.", + "schema": { + "type": "boolean" + } + }, + { + "name": "requireNonAnamorphic", + "in": "query", + "description": "Optional. Whether to require a non anamporphic stream.", + "schema": { + "type": "boolean" + } + }, + { + "name": "transcodingMaxAudioChannels", + "in": "query", + "description": "Optional. The maximum number of audio channels to transcode.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "cpuCoreLimit", + "in": "query", + "description": "Optional. The limit of how many cpu cores to use.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "liveStreamId", + "in": "query", + "description": "The live stream id.", + "schema": { + "type": "string" + } + }, + { + "name": "enableMpegtsM2TsMode", + "in": "query", + "description": "Optional. Whether to enable the MpegtsM2Ts mode.", + "schema": { + "type": "boolean" + } + }, + { + "name": "videoCodec", + "in": "query", + "description": "Optional. Specify a video codec to encode to, e.g. h264. If omitted the server will auto-select using the url's extension. Options: h265, h264, mpeg4, theora, vp8, vp9, vpx (deprecated), wmv.", + "schema": { + "type": "string" + } + }, + { + "name": "subtitleCodec", + "in": "query", + "description": "Optional. Specify a subtitle codec to encode to.", + "schema": { + "type": "string" + } + }, + { + "name": "transcodeReasons", + "in": "query", + "description": "Optional. The transcoding reason.", + "schema": { + "type": "string" + } + }, + { + "name": "audioStreamIndex", + "in": "query", + "description": "Optional. The index of the audio stream to use. If omitted the first audio stream will be used.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "videoStreamIndex", + "in": "query", + "description": "Optional. The index of the video stream to use. If omitted the first video stream will be used.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "context", + "in": "query", + "description": "Optional. The MediaBrowser.Model.Dlna.EncodingContext.", + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/EncodingContext" + } + ] + } + }, + { + "name": "streamOptions", + "in": "query", + "description": "Optional. The streaming options.", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + } + } + } + ], + "responses": { + "200": { + "description": "Audio stream returned.", + "content": { + "audio/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + }, + "head": { + "tags": [ + "Audio" + ], + "summary": "Gets an audio stream.", + "operationId": "HeadAudioStreamByContainer", + "parameters": [ + { + "name": "itemId", + "in": "path", + "description": "The item id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "container", + "in": "path", + "description": "The audio container.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "static", + "in": "query", + "description": "Optional. If true, the original file will be streamed statically without any encoding. Use either no url extension or the original file extension. true/false.", + "schema": { + "type": "boolean" + } + }, + { + "name": "params", + "in": "query", + "description": "The streaming parameters.", + "schema": { + "type": "string" + } + }, + { + "name": "tag", + "in": "query", + "description": "The tag.", + "schema": { + "type": "string" + } + }, + { + "name": "deviceProfileId", + "in": "query", + "description": "Optional. The dlna device profile id to utilize.", + "schema": { + "type": "string" + } + }, + { + "name": "playSessionId", + "in": "query", + "description": "The play session id.", + "schema": { + "type": "string" + } + }, + { + "name": "segmentContainer", + "in": "query", + "description": "The segment container.", + "schema": { + "type": "string" + } + }, + { + "name": "segmentLength", + "in": "query", + "description": "The segment lenght.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "minSegments", + "in": "query", + "description": "The minimum number of segments.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "mediaSourceId", + "in": "query", + "description": "The media version id, if playing an alternate version.", + "schema": { + "type": "string" + } + }, + { + "name": "deviceId", + "in": "query", + "description": "The device id of the client requesting. Used to stop encoding processes when needed.", + "schema": { + "type": "string" + } + }, + { + "name": "audioCodec", + "in": "query", + "description": "Optional. Specify a audio codec to encode to, e.g. mp3. If omitted the server will auto-select using the url's extension. Options: aac, mp3, vorbis, wma.", + "schema": { + "type": "string" + } + }, + { + "name": "enableAutoStreamCopy", + "in": "query", + "description": "Whether or not to allow automatic stream copy if requested values match the original source. Defaults to true.", + "schema": { + "type": "boolean" + } + }, + { + "name": "allowVideoStreamCopy", + "in": "query", + "description": "Whether or not to allow copying of the video stream url.", + "schema": { + "type": "boolean" + } + }, + { + "name": "allowAudioStreamCopy", + "in": "query", + "description": "Whether or not to allow copying of the audio stream url.", + "schema": { + "type": "boolean" + } + }, + { + "name": "breakOnNonKeyFrames", + "in": "query", + "description": "Optional. Whether to break on non key frames.", + "schema": { + "type": "boolean" + } + }, + { + "name": "audioSampleRate", + "in": "query", + "description": "Optional. Specify a specific audio sample rate, e.g. 44100.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxAudioBitDepth", + "in": "query", + "description": "Optional. The maximum audio bit depth.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "audioBitRate", + "in": "query", + "description": "Optional. Specify an audio bitrate to encode to, e.g. 128000. If omitted this will be left to encoder defaults.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "audioChannels", + "in": "query", + "description": "Optional. Specify a specific number of audio channels to encode to, e.g. 2.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxAudioChannels", + "in": "query", + "description": "Optional. Specify a maximum number of audio channels to encode to, e.g. 2.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "profile", + "in": "query", + "description": "Optional. Specify a specific an encoder profile (varies by encoder), e.g. main, baseline, high.", + "schema": { + "type": "string" + } + }, + { + "name": "level", + "in": "query", + "description": "Optional. Specify a level for the encoder profile (varies by encoder), e.g. 3, 3.1.", + "schema": { + "type": "string" + } + }, + { + "name": "framerate", + "in": "query", + "description": "Optional. A specific video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements.", + "schema": { + "type": "number", + "format": "float" + } + }, + { + "name": "maxFramerate", + "in": "query", + "description": "Optional. A specific maximum video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements.", + "schema": { + "type": "number", + "format": "float" + } + }, + { + "name": "copyTimestamps", + "in": "query", + "description": "Whether or not to copy timestamps when transcoding with an offset. Defaults to false.", + "schema": { + "type": "boolean" + } + }, + { + "name": "startTimeTicks", + "in": "query", + "description": "Optional. Specify a starting offset, in ticks. 1 tick = 10000 ms.", + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "width", + "in": "query", + "description": "Optional. The fixed horizontal resolution of the encoded video.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "height", + "in": "query", + "description": "Optional. The fixed vertical resolution of the encoded video.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "videoBitRate", + "in": "query", + "description": "Optional. Specify a video bitrate to encode to, e.g. 500000. If omitted this will be left to encoder defaults.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "subtitleStreamIndex", + "in": "query", + "description": "Optional. The index of the subtitle stream to use. If omitted no subtitles will be used.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "subtitleMethod", + "in": "query", + "description": "Optional. Specify the subtitle delivery method.", + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SubtitleDeliveryMethod" + } + ] + } + }, + { + "name": "maxRefFrames", + "in": "query", + "description": "Optional.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxVideoBitDepth", + "in": "query", + "description": "Optional. The maximum video bit depth.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "requireAvc", + "in": "query", + "description": "Optional. Whether to require avc.", + "schema": { + "type": "boolean" + } + }, + { + "name": "deInterlace", + "in": "query", + "description": "Optional. Whether to deinterlace the video.", + "schema": { + "type": "boolean" + } + }, + { + "name": "requireNonAnamorphic", + "in": "query", + "description": "Optional. Whether to require a non anamporphic stream.", + "schema": { + "type": "boolean" + } + }, + { + "name": "transcodingMaxAudioChannels", + "in": "query", + "description": "Optional. The maximum number of audio channels to transcode.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "cpuCoreLimit", + "in": "query", + "description": "Optional. The limit of how many cpu cores to use.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "liveStreamId", + "in": "query", + "description": "The live stream id.", + "schema": { + "type": "string" + } + }, + { + "name": "enableMpegtsM2TsMode", + "in": "query", + "description": "Optional. Whether to enable the MpegtsM2Ts mode.", + "schema": { + "type": "boolean" + } + }, + { + "name": "videoCodec", + "in": "query", + "description": "Optional. Specify a video codec to encode to, e.g. h264. If omitted the server will auto-select using the url's extension. Options: h265, h264, mpeg4, theora, vp8, vp9, vpx (deprecated), wmv.", + "schema": { + "type": "string" + } + }, + { + "name": "subtitleCodec", + "in": "query", + "description": "Optional. Specify a subtitle codec to encode to.", + "schema": { + "type": "string" + } + }, + { + "name": "transcodeReasons", + "in": "query", + "description": "Optional. The transcoding reason.", + "schema": { + "type": "string" + } + }, + { + "name": "audioStreamIndex", + "in": "query", + "description": "Optional. The index of the audio stream to use. If omitted the first audio stream will be used.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "videoStreamIndex", + "in": "query", + "description": "Optional. The index of the video stream to use. If omitted the first video stream will be used.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "context", + "in": "query", + "description": "Optional. The MediaBrowser.Model.Dlna.EncodingContext.", + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/EncodingContext" + } + ] + } + }, + { + "name": "streamOptions", + "in": "query", + "description": "Optional. The streaming options.", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + } + } + } + ], + "responses": { + "200": { + "description": "Audio stream returned.", + "content": { + "audio/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/Branding/Configuration": { + "get": { + "tags": [ + "Branding" + ], + "summary": "Gets branding configuration.", + "operationId": "GetBrandingOptions", + "responses": { + "200": { + "description": "Branding configuration returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BrandingOptions" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/BrandingOptions" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/BrandingOptions" + } + } + } + } + } + } + }, + "/Branding/Css": { + "get": { + "tags": [ + "Branding" + ], + "summary": "Gets branding css.", + "operationId": "GetBrandingCss", + "responses": { + "200": { + "description": "Branding css returned.", + "content": { + "text/css": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "type": "string" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "type": "string" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "type": "string" + } + } + } + }, + "204": { + "description": "No branding css configured." + } + } + } + }, + "/Branding/Css.css": { + "get": { + "tags": [ + "Branding" + ], + "summary": "Gets branding css.", + "operationId": "GetBrandingCss_2", + "responses": { + "200": { + "description": "Branding css returned.", + "content": { + "text/css": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "type": "string" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "type": "string" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "type": "string" + } + } + } + }, + "204": { + "description": "No branding css configured." + } + } + } + }, + "/Channels": { + "get": { + "tags": [ + "Channels" + ], + "summary": "Gets available channels.", + "operationId": "GetChannels", + "parameters": [ + { + "name": "userId", + "in": "query", + "description": "User Id to filter by. Use System.Guid.Empty to not filter by user.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "startIndex", + "in": "query", + "description": "Optional. The record index to start at. All items with a lower index will be dropped from the results.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "limit", + "in": "query", + "description": "Optional. The maximum number of records to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "supportsLatestItems", + "in": "query", + "description": "Optional. Filter by channels that support getting latest items.", + "schema": { + "type": "boolean" + } + }, + { + "name": "supportsMediaDeletion", + "in": "query", + "description": "Optional. Filter by channels that support media deletion.", + "schema": { + "type": "boolean" + } + }, + { + "name": "isFavorite", + "in": "query", + "description": "Optional. Filter by channels that are favorite.", + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "Channels returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Channels/{channelId}/Features": { + "get": { + "tags": [ + "Channels" + ], + "summary": "Get channel features.", + "operationId": "GetChannelFeatures", + "parameters": [ + { + "name": "channelId", + "in": "path", + "description": "Channel id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Channel features returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChannelFeatures" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ChannelFeatures" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ChannelFeatures" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Channels/{channelId}/Items": { + "get": { + "tags": [ + "Channels" + ], + "summary": "Get channel items.", + "operationId": "GetChannelItems", + "parameters": [ + { + "name": "channelId", + "in": "path", + "description": "Channel Id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "folderId", + "in": "query", + "description": "Optional. Folder Id.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "userId", + "in": "query", + "description": "Optional. User Id.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "startIndex", + "in": "query", + "description": "Optional. The record index to start at. All items with a lower index will be dropped from the results.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "limit", + "in": "query", + "description": "Optional. The maximum number of records to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Optional. Sort Order - Ascending,Descending.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SortOrder" + } + } + }, + { + "name": "filters", + "in": "query", + "description": "Optional. Specify additional filters to apply.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ItemFilter" + } + } + }, + { + "name": "sortBy", + "in": "query", + "description": "Optional. Specify one or more sort orders, comma delimited. Options: Album, AlbumArtist, Artist, Budget, CommunityRating, CriticRating, DateCreated, DatePlayed, PlayCount, PremiereDate, ProductionYear, SortName, Random, Revenue, Runtime.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "fields", + "in": "query", + "description": "Optional. Specify additional fields of information to return in the output.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ItemFields" + } + } + } + ], + "responses": { + "200": { + "description": "Channel items returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Channels/Features": { + "get": { + "tags": [ + "Channels" + ], + "summary": "Get all channel features.", + "operationId": "GetAllChannelFeatures", + "responses": { + "200": { + "description": "All channel features returned.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ChannelFeatures" + } + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ChannelFeatures" + } + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ChannelFeatures" + } + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Channels/Items/Latest": { + "get": { + "tags": [ + "Channels" + ], + "summary": "Gets latest channel items.", + "operationId": "GetLatestChannelItems", + "parameters": [ + { + "name": "userId", + "in": "query", + "description": "Optional. User Id.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "startIndex", + "in": "query", + "description": "Optional. The record index to start at. All items with a lower index will be dropped from the results.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "limit", + "in": "query", + "description": "Optional. The maximum number of records to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "filters", + "in": "query", + "description": "Optional. Specify additional filters to apply.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ItemFilter" + } + } + }, + { + "name": "fields", + "in": "query", + "description": "Optional. Specify additional fields of information to return in the output.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ItemFields" + } + } + }, + { + "name": "channelIds", + "in": "query", + "description": "Optional. Specify one or more channel id's, comma delimited.", + "schema": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + } + ], + "responses": { + "200": { + "description": "Latest channel items returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/ClientLog/Document": { + "post": { + "tags": [ + "ClientLog" + ], + "summary": "Upload a document.", + "operationId": "LogFile", + "requestBody": { + "content": { + "text/plain": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "responses": { + "200": { + "description": "Document saved.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClientLogDocumentResponseDto" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ClientLogDocumentResponseDto" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ClientLogDocumentResponseDto" + } + } + } + }, + "403": { + "description": "Event logging disabled.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "413": { + "description": "Upload size too large.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Collections": { + "post": { + "tags": [ + "Collection" + ], + "summary": "Creates a new collection.", + "operationId": "CreateCollection", + "parameters": [ + { + "name": "name", + "in": "query", + "description": "The name of the collection.", + "schema": { + "type": "string" + } + }, + { + "name": "ids", + "in": "query", + "description": "Item Ids to add to the collection.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "parentId", + "in": "query", + "description": "Optional. Create the collection within a specific folder.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "isLocked", + "in": "query", + "description": "Whether or not to lock the new collection.", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "200": { + "description": "Collection created.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CollectionCreationResult" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/CollectionCreationResult" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/CollectionCreationResult" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Collections/{collectionId}/Items": { + "post": { + "tags": [ + "Collection" + ], + "summary": "Adds items to a collection.", + "operationId": "AddToCollection", + "parameters": [ + { + "name": "collectionId", + "in": "path", + "description": "The collection id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "ids", + "in": "query", + "description": "Item ids, comma delimited.", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + } + ], + "responses": { + "204": { + "description": "Items added to collection." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + }, + "delete": { + "tags": [ + "Collection" + ], + "summary": "Removes items from a collection.", + "operationId": "RemoveFromCollection", + "parameters": [ + { + "name": "collectionId", + "in": "path", + "description": "The collection id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "ids", + "in": "query", + "description": "Item ids, comma delimited.", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + } + ], + "responses": { + "204": { + "description": "Items removed from collection." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/System/Configuration": { + "get": { + "tags": [ + "Configuration" + ], + "summary": "Gets application configuration.", + "operationId": "GetConfiguration", + "responses": { + "200": { + "description": "Application configuration returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ServerConfiguration" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ServerConfiguration" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ServerConfiguration" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + }, + "post": { + "tags": [ + "Configuration" + ], + "summary": "Updates application configuration.", + "operationId": "UpdateConfiguration", + "requestBody": { + "description": "Configuration.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ServerConfiguration" + } + ], + "description": "Represents the server configuration." + } + }, + "text/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ServerConfiguration" + } + ], + "description": "Represents the server configuration." + } + }, + "application/*+json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ServerConfiguration" + } + ], + "description": "Represents the server configuration." + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Configuration updated." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "RequiresElevation", + "DefaultAuthorization" + ] + } + ] + } + }, + "/System/Configuration/{key}": { + "get": { + "tags": [ + "Configuration" + ], + "summary": "Gets a named configuration.", + "operationId": "GetNamedConfiguration", + "parameters": [ + { + "name": "key", + "in": "path", + "description": "Configuration key.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Configuration returned.", + "content": { + "application/json": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + }, + "post": { + "tags": [ + "Configuration" + ], + "summary": "Updates named configuration.", + "operationId": "UpdateNamedConfiguration", + "parameters": [ + { + "name": "key", + "in": "path", + "description": "Configuration key.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Configuration.", + "content": { + "application/json": { + "schema": { } + }, + "text/json": { + "schema": { } + }, + "application/*+json": { + "schema": { } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Named configuration updated." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "RequiresElevation", + "DefaultAuthorization" + ] + } + ] + } + }, + "/System/Configuration/MetadataOptions/Default": { + "get": { + "tags": [ + "Configuration" + ], + "summary": "Gets a default MetadataOptions object.", + "operationId": "GetDefaultMetadataOptions", + "responses": { + "200": { + "description": "Metadata options returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MetadataOptions" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/MetadataOptions" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/MetadataOptions" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "RequiresElevation", + "DefaultAuthorization" + ] + } + ] + } + }, + "/System/MediaEncoder/Path": { + "post": { + "tags": [ + "Configuration" + ], + "summary": "Updates the path to the media encoder.", + "operationId": "UpdateMediaEncoderPath", + "requestBody": { + "description": "Media encoder path form body.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/MediaEncoderPathDto" + } + ], + "description": "Media Encoder Path Dto." + } + }, + "text/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/MediaEncoderPathDto" + } + ], + "description": "Media Encoder Path Dto." + } + }, + "application/*+json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/MediaEncoderPathDto" + } + ], + "description": "Media Encoder Path Dto." + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Media encoder path updated." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "FirstTimeSetupOrElevated", + "DefaultAuthorization" + ] + } + ] + } + }, + "/web/ConfigurationPage": { + "get": { + "tags": [ + "Dashboard" + ], + "summary": "Gets a dashboard configuration page.", + "operationId": "GetDashboardConfigurationPage", + "parameters": [ + { + "name": "name", + "in": "query", + "description": "The name of the page.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "ConfigurationPage returned.", + "content": { + "text/html": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "application/x-javascript": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "404": { + "description": "Plugin configuration page not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + } + } + }, + "/web/ConfigurationPages": { + "get": { + "tags": [ + "Dashboard" + ], + "summary": "Gets the configuration pages.", + "operationId": "GetConfigurationPages", + "parameters": [ + { + "name": "enableInMainMenu", + "in": "query", + "description": "Whether to enable in the main menu.", + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "ConfigurationPages returned.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ConfigurationPageInfo" + } + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ConfigurationPageInfo" + } + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ConfigurationPageInfo" + } + } + } + } + }, + "404": { + "description": "Server still loading.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Devices": { + "get": { + "tags": [ + "Devices" + ], + "summary": "Get Devices.", + "operationId": "GetDevices", + "parameters": [ + { + "name": "supportsSync", + "in": "query", + "description": "Gets or sets a value indicating whether [supports synchronize].", + "schema": { + "type": "boolean" + } + }, + { + "name": "userId", + "in": "query", + "description": "Gets or sets the user identifier.", + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Devices retrieved.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceInfoQueryResult" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/DeviceInfoQueryResult" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/DeviceInfoQueryResult" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "RequiresElevation" + ] + } + ] + }, + "delete": { + "tags": [ + "Devices" + ], + "summary": "Deletes a device.", + "operationId": "DeleteDevice", + "parameters": [ + { + "name": "id", + "in": "query", + "description": "Device Id.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Device deleted." + }, + "404": { + "description": "Device not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "RequiresElevation" + ] + } + ] + } + }, + "/Devices/Info": { + "get": { + "tags": [ + "Devices" + ], + "summary": "Get info for a device.", + "operationId": "GetDeviceInfo", + "parameters": [ + { + "name": "id", + "in": "query", + "description": "Device Id.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Device info retrieved.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceInfo" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/DeviceInfo" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/DeviceInfo" + } + } + } + }, + "404": { + "description": "Device not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "RequiresElevation" + ] + } + ] + } + }, + "/Devices/Options": { + "get": { + "tags": [ + "Devices" + ], + "summary": "Get options for a device.", + "operationId": "GetDeviceOptions", + "parameters": [ + { + "name": "id", + "in": "query", + "description": "Device Id.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Device options retrieved.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceOptions" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/DeviceOptions" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/DeviceOptions" + } + } + } + }, + "404": { + "description": "Device not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "RequiresElevation" + ] + } + ] + }, + "post": { + "tags": [ + "Devices" + ], + "summary": "Update device options.", + "operationId": "UpdateDeviceOptions", + "parameters": [ + { + "name": "id", + "in": "query", + "description": "Device Id.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Device Options.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/DeviceOptionsDto" + } + ], + "description": "A dto representing custom options for a device." + } + }, + "text/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/DeviceOptionsDto" + } + ], + "description": "A dto representing custom options for a device." + } + }, + "application/*+json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/DeviceOptionsDto" + } + ], + "description": "A dto representing custom options for a device." + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Device options updated." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "RequiresElevation" + ] + } + ] + } + }, + "/DisplayPreferences/{displayPreferencesId}": { + "get": { + "tags": [ + "DisplayPreferences" + ], + "summary": "Get Display Preferences.", + "operationId": "GetDisplayPreferences", + "parameters": [ + { + "name": "displayPreferencesId", + "in": "path", + "description": "Display preferences id.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "userId", + "in": "query", + "description": "User id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "client", + "in": "query", + "description": "Client.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Display preferences retrieved.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DisplayPreferencesDto" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/DisplayPreferencesDto" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/DisplayPreferencesDto" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + }, + "post": { + "tags": [ + "DisplayPreferences" + ], + "summary": "Update Display Preferences.", + "operationId": "UpdateDisplayPreferences", + "parameters": [ + { + "name": "displayPreferencesId", + "in": "path", + "description": "Display preferences id.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "userId", + "in": "query", + "description": "User Id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "client", + "in": "query", + "description": "Client.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "New Display Preferences object.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/DisplayPreferencesDto" + } + ], + "description": "Defines the display preferences for any item that supports them (usually Folders)." + } + }, + "text/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/DisplayPreferencesDto" + } + ], + "description": "Defines the display preferences for any item that supports them (usually Folders)." + } + }, + "application/*+json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/DisplayPreferencesDto" + } + ], + "description": "Defines the display preferences for any item that supports them (usually Folders)." + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Display preferences updated." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Dlna/ProfileInfos": { + "get": { + "tags": [ + "Dlna" + ], + "summary": "Get profile infos.", + "operationId": "GetProfileInfos", + "responses": { + "200": { + "description": "Device profile infos returned.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DeviceProfileInfo" + } + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DeviceProfileInfo" + } + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DeviceProfileInfo" + } + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "RequiresElevation" + ] + } + ] + } + }, + "/Dlna/Profiles": { + "post": { + "tags": [ + "Dlna" + ], + "summary": "Creates a profile.", + "operationId": "CreateProfile", + "requestBody": { + "description": "Device profile.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/DeviceProfile" + } + ], + "description": "A MediaBrowser.Model.Dlna.DeviceProfile represents a set of metadata which determines which content a certain device is able to play.\r\n
\r\nSpecifically, it defines the supported containers and\r\ncodecs (video and/or audio, including codec profiles and levels)\r\nthe device is able to direct play (without transcoding or remuxing),\r\nas well as which containers/codecs to transcode to in case it isn't." + } + }, + "text/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/DeviceProfile" + } + ], + "description": "A MediaBrowser.Model.Dlna.DeviceProfile represents a set of metadata which determines which content a certain device is able to play.\r\n
\r\nSpecifically, it defines the supported containers and\r\ncodecs (video and/or audio, including codec profiles and levels)\r\nthe device is able to direct play (without transcoding or remuxing),\r\nas well as which containers/codecs to transcode to in case it isn't." + } + }, + "application/*+json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/DeviceProfile" + } + ], + "description": "A MediaBrowser.Model.Dlna.DeviceProfile represents a set of metadata which determines which content a certain device is able to play.\r\n
\r\nSpecifically, it defines the supported containers and\r\ncodecs (video and/or audio, including codec profiles and levels)\r\nthe device is able to direct play (without transcoding or remuxing),\r\nas well as which containers/codecs to transcode to in case it isn't." + } + } + } + }, + "responses": { + "204": { + "description": "Device profile created." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "RequiresElevation" + ] + } + ] + } + }, + "/Dlna/Profiles/{profileId}": { + "get": { + "tags": [ + "Dlna" + ], + "summary": "Gets a single profile.", + "operationId": "GetProfile", + "parameters": [ + { + "name": "profileId", + "in": "path", + "description": "Profile Id.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Device profile returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceProfile" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/DeviceProfile" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/DeviceProfile" + } + } + } + }, + "404": { + "description": "Device profile not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "RequiresElevation" + ] + } + ] + }, + "delete": { + "tags": [ + "Dlna" + ], + "summary": "Deletes a profile.", + "operationId": "DeleteProfile", + "parameters": [ + { + "name": "profileId", + "in": "path", + "description": "Profile id.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Device profile deleted." + }, + "404": { + "description": "Device profile not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "RequiresElevation" + ] + } + ] + }, + "post": { + "tags": [ + "Dlna" + ], + "summary": "Updates a profile.", + "operationId": "UpdateProfile", + "parameters": [ + { + "name": "profileId", + "in": "path", + "description": "Profile id.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Device profile.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/DeviceProfile" + } + ], + "description": "A MediaBrowser.Model.Dlna.DeviceProfile represents a set of metadata which determines which content a certain device is able to play.\r\n
\r\nSpecifically, it defines the supported containers and\r\ncodecs (video and/or audio, including codec profiles and levels)\r\nthe device is able to direct play (without transcoding or remuxing),\r\nas well as which containers/codecs to transcode to in case it isn't." + } + }, + "text/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/DeviceProfile" + } + ], + "description": "A MediaBrowser.Model.Dlna.DeviceProfile represents a set of metadata which determines which content a certain device is able to play.\r\n
\r\nSpecifically, it defines the supported containers and\r\ncodecs (video and/or audio, including codec profiles and levels)\r\nthe device is able to direct play (without transcoding or remuxing),\r\nas well as which containers/codecs to transcode to in case it isn't." + } + }, + "application/*+json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/DeviceProfile" + } + ], + "description": "A MediaBrowser.Model.Dlna.DeviceProfile represents a set of metadata which determines which content a certain device is able to play.\r\n
\r\nSpecifically, it defines the supported containers and\r\ncodecs (video and/or audio, including codec profiles and levels)\r\nthe device is able to direct play (without transcoding or remuxing),\r\nas well as which containers/codecs to transcode to in case it isn't." + } + } + } + }, + "responses": { + "204": { + "description": "Device profile updated." + }, + "404": { + "description": "Device profile not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "RequiresElevation" + ] + } + ] + } + }, + "/Dlna/Profiles/Default": { + "get": { + "tags": [ + "Dlna" + ], + "summary": "Gets the default profile.", + "operationId": "GetDefaultProfile", + "responses": { + "200": { + "description": "Default device profile returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceProfile" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/DeviceProfile" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/DeviceProfile" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "RequiresElevation" + ] + } + ] + } + }, + "/Dlna/{serverId}/ConnectionManager": { + "get": { + "tags": [ + "DlnaServer" + ], + "summary": "Gets Dlna media receiver registrar xml.", + "operationId": "GetConnectionManager", + "parameters": [ + { + "name": "serverId", + "in": "path", + "description": "Server UUID.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Dlna media receiver registrar xml returned.", + "content": { + "text/xml": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "503": { + "description": "DLNA is disabled." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "AnonymousLanAccessPolicy" + ] + } + ] + } + }, + "/Dlna/{serverId}/ConnectionManager/ConnectionManager": { + "get": { + "tags": [ + "DlnaServer" + ], + "summary": "Gets Dlna media receiver registrar xml.", + "operationId": "GetConnectionManager_2", + "parameters": [ + { + "name": "serverId", + "in": "path", + "description": "Server UUID.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Dlna media receiver registrar xml returned.", + "content": { + "text/xml": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "503": { + "description": "DLNA is disabled." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "AnonymousLanAccessPolicy" + ] + } + ] + } + }, + "/Dlna/{serverId}/ConnectionManager/ConnectionManager.xml": { + "get": { + "tags": [ + "DlnaServer" + ], + "summary": "Gets Dlna media receiver registrar xml.", + "operationId": "GetConnectionManager_3", + "parameters": [ + { + "name": "serverId", + "in": "path", + "description": "Server UUID.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Dlna media receiver registrar xml returned.", + "content": { + "text/xml": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "503": { + "description": "DLNA is disabled." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "AnonymousLanAccessPolicy" + ] + } + ] + } + }, + "/Dlna/{serverId}/ConnectionManager/Control": { + "post": { + "tags": [ + "DlnaServer" + ], + "summary": "Process a connection manager control request.", + "operationId": "ProcessConnectionManagerControlRequest", + "parameters": [ + { + "name": "serverId", + "in": "path", + "description": "Server UUID.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Request processed.", + "content": { + "text/xml": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "503": { + "description": "DLNA is disabled." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "AnonymousLanAccessPolicy" + ] + } + ] + } + }, + "/Dlna/{serverId}/ContentDirectory": { + "get": { + "tags": [ + "DlnaServer" + ], + "summary": "Gets Dlna content directory xml.", + "operationId": "GetContentDirectory", + "parameters": [ + { + "name": "serverId", + "in": "path", + "description": "Server UUID.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Dlna content directory returned.", + "content": { + "text/xml": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "503": { + "description": "DLNA is disabled." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "AnonymousLanAccessPolicy" + ] + } + ] + } + }, + "/Dlna/{serverId}/ContentDirectory/ContentDirectory": { + "get": { + "tags": [ + "DlnaServer" + ], + "summary": "Gets Dlna content directory xml.", + "operationId": "GetContentDirectory_2", + "parameters": [ + { + "name": "serverId", + "in": "path", + "description": "Server UUID.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Dlna content directory returned.", + "content": { + "text/xml": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "503": { + "description": "DLNA is disabled." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "AnonymousLanAccessPolicy" + ] + } + ] + } + }, + "/Dlna/{serverId}/ContentDirectory/ContentDirectory.xml": { + "get": { + "tags": [ + "DlnaServer" + ], + "summary": "Gets Dlna content directory xml.", + "operationId": "GetContentDirectory_3", + "parameters": [ + { + "name": "serverId", + "in": "path", + "description": "Server UUID.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Dlna content directory returned.", + "content": { + "text/xml": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "503": { + "description": "DLNA is disabled." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "AnonymousLanAccessPolicy" + ] + } + ] + } + }, + "/Dlna/{serverId}/ContentDirectory/Control": { + "post": { + "tags": [ + "DlnaServer" + ], + "summary": "Process a content directory control request.", + "operationId": "ProcessContentDirectoryControlRequest", + "parameters": [ + { + "name": "serverId", + "in": "path", + "description": "Server UUID.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Request processed.", + "content": { + "text/xml": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "503": { + "description": "DLNA is disabled." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "AnonymousLanAccessPolicy" + ] + } + ] + } + }, + "/Dlna/{serverId}/description": { + "get": { + "tags": [ + "DlnaServer" + ], + "summary": "Get Description Xml.", + "operationId": "GetDescriptionXml", + "parameters": [ + { + "name": "serverId", + "in": "path", + "description": "Server UUID.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Description xml returned.", + "content": { + "text/xml": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "503": { + "description": "DLNA is disabled." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "AnonymousLanAccessPolicy" + ] + } + ] + } + }, + "/Dlna/{serverId}/description.xml": { + "get": { + "tags": [ + "DlnaServer" + ], + "summary": "Get Description Xml.", + "operationId": "GetDescriptionXml_2", + "parameters": [ + { + "name": "serverId", + "in": "path", + "description": "Server UUID.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Description xml returned.", + "content": { + "text/xml": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "503": { + "description": "DLNA is disabled." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "AnonymousLanAccessPolicy" + ] + } + ] + } + }, + "/Dlna/{serverId}/icons/{fileName}": { + "get": { + "tags": [ + "DlnaServer" + ], + "summary": "Gets a server icon.", + "operationId": "GetIconId", + "parameters": [ + { + "name": "serverId", + "in": "path", + "description": "Server UUID.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "fileName", + "in": "path", + "description": "The icon filename.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Request processed.", + "content": { + "image/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "404": { + "description": "Not Found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "503": { + "description": "DLNA is disabled." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "AnonymousLanAccessPolicy" + ] + } + ] + } + }, + "/Dlna/{serverId}/MediaReceiverRegistrar": { + "get": { + "tags": [ + "DlnaServer" + ], + "summary": "Gets Dlna media receiver registrar xml.", + "operationId": "GetMediaReceiverRegistrar", + "parameters": [ + { + "name": "serverId", + "in": "path", + "description": "Server UUID.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Dlna media receiver registrar xml returned.", + "content": { + "text/xml": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "503": { + "description": "DLNA is disabled." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "AnonymousLanAccessPolicy" + ] + } + ] + } + }, + "/Dlna/{serverId}/MediaReceiverRegistrar/Control": { + "post": { + "tags": [ + "DlnaServer" + ], + "summary": "Process a media receiver registrar control request.", + "operationId": "ProcessMediaReceiverRegistrarControlRequest", + "parameters": [ + { + "name": "serverId", + "in": "path", + "description": "Server UUID.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Request processed.", + "content": { + "text/xml": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "503": { + "description": "DLNA is disabled." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "AnonymousLanAccessPolicy" + ] + } + ] + } + }, + "/Dlna/{serverId}/MediaReceiverRegistrar/MediaReceiverRegistrar": { + "get": { + "tags": [ + "DlnaServer" + ], + "summary": "Gets Dlna media receiver registrar xml.", + "operationId": "GetMediaReceiverRegistrar_2", + "parameters": [ + { + "name": "serverId", + "in": "path", + "description": "Server UUID.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Dlna media receiver registrar xml returned.", + "content": { + "text/xml": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "503": { + "description": "DLNA is disabled." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "AnonymousLanAccessPolicy" + ] + } + ] + } + }, + "/Dlna/{serverId}/MediaReceiverRegistrar/MediaReceiverRegistrar.xml": { + "get": { + "tags": [ + "DlnaServer" + ], + "summary": "Gets Dlna media receiver registrar xml.", + "operationId": "GetMediaReceiverRegistrar_3", + "parameters": [ + { + "name": "serverId", + "in": "path", + "description": "Server UUID.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Dlna media receiver registrar xml returned.", + "content": { + "text/xml": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "503": { + "description": "DLNA is disabled." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "AnonymousLanAccessPolicy" + ] + } + ] + } + }, + "/Dlna/icons/{fileName}": { + "get": { + "tags": [ + "DlnaServer" + ], + "summary": "Gets a server icon.", + "operationId": "GetIcon", + "parameters": [ + { + "name": "fileName", + "in": "path", + "description": "The icon filename.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Request processed.", + "content": { + "image/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "404": { + "description": "Not Found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "503": { + "description": "DLNA is disabled." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "AnonymousLanAccessPolicy" + ] + } + ] + } + }, + "/Audio/{itemId}/hls1/{playlistId}/{segmentId}.{container}": { + "get": { + "tags": [ + "DynamicHls" + ], + "summary": "Gets a video stream using HTTP live streaming.", + "operationId": "GetHlsAudioSegment", + "parameters": [ + { + "name": "itemId", + "in": "path", + "description": "The item id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "playlistId", + "in": "path", + "description": "The playlist id.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "segmentId", + "in": "path", + "description": "The segment id.", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "container", + "in": "path", + "description": "The video container. Possible values are: ts, webm, asf, wmv, ogv, mp4, m4v, mkv, mpeg, mpg, avi, 3gp, wmv, wtv, m2ts, mov, iso, flv.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "runtimeTicks", + "in": "query", + "description": "The position of the requested segment in ticks.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "actualSegmentLengthTicks", + "in": "query", + "description": "The length of the requested segment in ticks.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "static", + "in": "query", + "description": "Optional. If true, the original file will be streamed statically without any encoding. Use either no url extension or the original file extension. true/false.", + "schema": { + "type": "boolean" + } + }, + { + "name": "params", + "in": "query", + "description": "The streaming parameters.", + "schema": { + "type": "string" + } + }, + { + "name": "tag", + "in": "query", + "description": "The tag.", + "schema": { + "type": "string" + } + }, + { + "name": "deviceProfileId", + "in": "query", + "description": "Optional. The dlna device profile id to utilize.", + "schema": { + "type": "string" + } + }, + { + "name": "playSessionId", + "in": "query", + "description": "The play session id.", + "schema": { + "type": "string" + } + }, + { + "name": "segmentContainer", + "in": "query", + "description": "The segment container.", + "schema": { + "type": "string" + } + }, + { + "name": "segmentLength", + "in": "query", + "description": "The segment length.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "minSegments", + "in": "query", + "description": "The minimum number of segments.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "mediaSourceId", + "in": "query", + "description": "The media version id, if playing an alternate version.", + "schema": { + "type": "string" + } + }, + { + "name": "deviceId", + "in": "query", + "description": "The device id of the client requesting. Used to stop encoding processes when needed.", + "schema": { + "type": "string" + } + }, + { + "name": "audioCodec", + "in": "query", + "description": "Optional. Specify a audio codec to encode to, e.g. mp3. If omitted the server will auto-select using the url's extension. Options: aac, mp3, vorbis, wma.", + "schema": { + "type": "string" + } + }, + { + "name": "enableAutoStreamCopy", + "in": "query", + "description": "Whether or not to allow automatic stream copy if requested values match the original source. Defaults to true.", + "schema": { + "type": "boolean" + } + }, + { + "name": "allowVideoStreamCopy", + "in": "query", + "description": "Whether or not to allow copying of the video stream url.", + "schema": { + "type": "boolean" + } + }, + { + "name": "allowAudioStreamCopy", + "in": "query", + "description": "Whether or not to allow copying of the audio stream url.", + "schema": { + "type": "boolean" + } + }, + { + "name": "breakOnNonKeyFrames", + "in": "query", + "description": "Optional. Whether to break on non key frames.", + "schema": { + "type": "boolean" + } + }, + { + "name": "audioSampleRate", + "in": "query", + "description": "Optional. Specify a specific audio sample rate, e.g. 44100.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxAudioBitDepth", + "in": "query", + "description": "Optional. The maximum audio bit depth.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxStreamingBitrate", + "in": "query", + "description": "Optional. The maximum streaming bitrate.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "audioBitRate", + "in": "query", + "description": "Optional. Specify an audio bitrate to encode to, e.g. 128000. If omitted this will be left to encoder defaults.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "audioChannels", + "in": "query", + "description": "Optional. Specify a specific number of audio channels to encode to, e.g. 2.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxAudioChannels", + "in": "query", + "description": "Optional. Specify a maximum number of audio channels to encode to, e.g. 2.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "profile", + "in": "query", + "description": "Optional. Specify a specific an encoder profile (varies by encoder), e.g. main, baseline, high.", + "schema": { + "type": "string" + } + }, + { + "name": "level", + "in": "query", + "description": "Optional. Specify a level for the encoder profile (varies by encoder), e.g. 3, 3.1.", + "schema": { + "type": "string" + } + }, + { + "name": "framerate", + "in": "query", + "description": "Optional. A specific video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements.", + "schema": { + "type": "number", + "format": "float" + } + }, + { + "name": "maxFramerate", + "in": "query", + "description": "Optional. A specific maximum video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements.", + "schema": { + "type": "number", + "format": "float" + } + }, + { + "name": "copyTimestamps", + "in": "query", + "description": "Whether or not to copy timestamps when transcoding with an offset. Defaults to false.", + "schema": { + "type": "boolean" + } + }, + { + "name": "startTimeTicks", + "in": "query", + "description": "Optional. Specify a starting offset, in ticks. 1 tick = 10000 ms.", + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "width", + "in": "query", + "description": "Optional. The fixed horizontal resolution of the encoded video.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "height", + "in": "query", + "description": "Optional. The fixed vertical resolution of the encoded video.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "videoBitRate", + "in": "query", + "description": "Optional. Specify a video bitrate to encode to, e.g. 500000. If omitted this will be left to encoder defaults.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "subtitleStreamIndex", + "in": "query", + "description": "Optional. The index of the subtitle stream to use. If omitted no subtitles will be used.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "subtitleMethod", + "in": "query", + "description": "Optional. Specify the subtitle delivery method.", + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SubtitleDeliveryMethod" + } + ] + } + }, + { + "name": "maxRefFrames", + "in": "query", + "description": "Optional.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxVideoBitDepth", + "in": "query", + "description": "Optional. The maximum video bit depth.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "requireAvc", + "in": "query", + "description": "Optional. Whether to require avc.", + "schema": { + "type": "boolean" + } + }, + { + "name": "deInterlace", + "in": "query", + "description": "Optional. Whether to deinterlace the video.", + "schema": { + "type": "boolean" + } + }, + { + "name": "requireNonAnamorphic", + "in": "query", + "description": "Optional. Whether to require a non anamorphic stream.", + "schema": { + "type": "boolean" + } + }, + { + "name": "transcodingMaxAudioChannels", + "in": "query", + "description": "Optional. The maximum number of audio channels to transcode.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "cpuCoreLimit", + "in": "query", + "description": "Optional. The limit of how many cpu cores to use.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "liveStreamId", + "in": "query", + "description": "The live stream id.", + "schema": { + "type": "string" + } + }, + { + "name": "enableMpegtsM2TsMode", + "in": "query", + "description": "Optional. Whether to enable the MpegtsM2Ts mode.", + "schema": { + "type": "boolean" + } + }, + { + "name": "videoCodec", + "in": "query", + "description": "Optional. Specify a video codec to encode to, e.g. h264. If omitted the server will auto-select using the url's extension. Options: h265, h264, mpeg4, theora, vpx, wmv.", + "schema": { + "type": "string" + } + }, + { + "name": "subtitleCodec", + "in": "query", + "description": "Optional. Specify a subtitle codec to encode to.", + "schema": { + "type": "string" + } + }, + { + "name": "transcodeReasons", + "in": "query", + "description": "Optional. The transcoding reason.", + "schema": { + "type": "string" + } + }, + { + "name": "audioStreamIndex", + "in": "query", + "description": "Optional. The index of the audio stream to use. If omitted the first audio stream will be used.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "videoStreamIndex", + "in": "query", + "description": "Optional. The index of the video stream to use. If omitted the first video stream will be used.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "context", + "in": "query", + "description": "Optional. The MediaBrowser.Model.Dlna.EncodingContext.", + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/EncodingContext" + } + ] + } + }, + { + "name": "streamOptions", + "in": "query", + "description": "Optional. The streaming options.", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + } + } + } + ], + "responses": { + "200": { + "description": "Video stream returned.", + "content": { + "audio/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Audio/{itemId}/main.m3u8": { + "get": { + "tags": [ + "DynamicHls" + ], + "summary": "Gets an audio stream using HTTP live streaming.", + "operationId": "GetVariantHlsAudioPlaylist", + "parameters": [ + { + "name": "itemId", + "in": "path", + "description": "The item id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "static", + "in": "query", + "description": "Optional. If true, the original file will be streamed statically without any encoding. Use either no url extension or the original file extension. true/false.", + "schema": { + "type": "boolean" + } + }, + { + "name": "params", + "in": "query", + "description": "The streaming parameters.", + "schema": { + "type": "string" + } + }, + { + "name": "tag", + "in": "query", + "description": "The tag.", + "schema": { + "type": "string" + } + }, + { + "name": "deviceProfileId", + "in": "query", + "description": "Optional. The dlna device profile id to utilize.", + "schema": { + "type": "string" + } + }, + { + "name": "playSessionId", + "in": "query", + "description": "The play session id.", + "schema": { + "type": "string" + } + }, + { + "name": "segmentContainer", + "in": "query", + "description": "The segment container.", + "schema": { + "type": "string" + } + }, + { + "name": "segmentLength", + "in": "query", + "description": "The segment length.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "minSegments", + "in": "query", + "description": "The minimum number of segments.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "mediaSourceId", + "in": "query", + "description": "The media version id, if playing an alternate version.", + "schema": { + "type": "string" + } + }, + { + "name": "deviceId", + "in": "query", + "description": "The device id of the client requesting. Used to stop encoding processes when needed.", + "schema": { + "type": "string" + } + }, + { + "name": "audioCodec", + "in": "query", + "description": "Optional. Specify a audio codec to encode to, e.g. mp3. If omitted the server will auto-select using the url's extension. Options: aac, mp3, vorbis, wma.", + "schema": { + "type": "string" + } + }, + { + "name": "enableAutoStreamCopy", + "in": "query", + "description": "Whether or not to allow automatic stream copy if requested values match the original source. Defaults to true.", + "schema": { + "type": "boolean" + } + }, + { + "name": "allowVideoStreamCopy", + "in": "query", + "description": "Whether or not to allow copying of the video stream url.", + "schema": { + "type": "boolean" + } + }, + { + "name": "allowAudioStreamCopy", + "in": "query", + "description": "Whether or not to allow copying of the audio stream url.", + "schema": { + "type": "boolean" + } + }, + { + "name": "breakOnNonKeyFrames", + "in": "query", + "description": "Optional. Whether to break on non key frames.", + "schema": { + "type": "boolean" + } + }, + { + "name": "audioSampleRate", + "in": "query", + "description": "Optional. Specify a specific audio sample rate, e.g. 44100.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxAudioBitDepth", + "in": "query", + "description": "Optional. The maximum audio bit depth.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxStreamingBitrate", + "in": "query", + "description": "Optional. The maximum streaming bitrate.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "audioBitRate", + "in": "query", + "description": "Optional. Specify an audio bitrate to encode to, e.g. 128000. If omitted this will be left to encoder defaults.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "audioChannels", + "in": "query", + "description": "Optional. Specify a specific number of audio channels to encode to, e.g. 2.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxAudioChannels", + "in": "query", + "description": "Optional. Specify a maximum number of audio channels to encode to, e.g. 2.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "profile", + "in": "query", + "description": "Optional. Specify a specific an encoder profile (varies by encoder), e.g. main, baseline, high.", + "schema": { + "type": "string" + } + }, + { + "name": "level", + "in": "query", + "description": "Optional. Specify a level for the encoder profile (varies by encoder), e.g. 3, 3.1.", + "schema": { + "type": "string" + } + }, + { + "name": "framerate", + "in": "query", + "description": "Optional. A specific video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements.", + "schema": { + "type": "number", + "format": "float" + } + }, + { + "name": "maxFramerate", + "in": "query", + "description": "Optional. A specific maximum video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements.", + "schema": { + "type": "number", + "format": "float" + } + }, + { + "name": "copyTimestamps", + "in": "query", + "description": "Whether or not to copy timestamps when transcoding with an offset. Defaults to false.", + "schema": { + "type": "boolean" + } + }, + { + "name": "startTimeTicks", + "in": "query", + "description": "Optional. Specify a starting offset, in ticks. 1 tick = 10000 ms.", + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "width", + "in": "query", + "description": "Optional. The fixed horizontal resolution of the encoded video.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "height", + "in": "query", + "description": "Optional. The fixed vertical resolution of the encoded video.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "videoBitRate", + "in": "query", + "description": "Optional. Specify a video bitrate to encode to, e.g. 500000. If omitted this will be left to encoder defaults.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "subtitleStreamIndex", + "in": "query", + "description": "Optional. The index of the subtitle stream to use. If omitted no subtitles will be used.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "subtitleMethod", + "in": "query", + "description": "Optional. Specify the subtitle delivery method.", + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SubtitleDeliveryMethod" + } + ] + } + }, + { + "name": "maxRefFrames", + "in": "query", + "description": "Optional.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxVideoBitDepth", + "in": "query", + "description": "Optional. The maximum video bit depth.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "requireAvc", + "in": "query", + "description": "Optional. Whether to require avc.", + "schema": { + "type": "boolean" + } + }, + { + "name": "deInterlace", + "in": "query", + "description": "Optional. Whether to deinterlace the video.", + "schema": { + "type": "boolean" + } + }, + { + "name": "requireNonAnamorphic", + "in": "query", + "description": "Optional. Whether to require a non anamorphic stream.", + "schema": { + "type": "boolean" + } + }, + { + "name": "transcodingMaxAudioChannels", + "in": "query", + "description": "Optional. The maximum number of audio channels to transcode.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "cpuCoreLimit", + "in": "query", + "description": "Optional. The limit of how many cpu cores to use.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "liveStreamId", + "in": "query", + "description": "The live stream id.", + "schema": { + "type": "string" + } + }, + { + "name": "enableMpegtsM2TsMode", + "in": "query", + "description": "Optional. Whether to enable the MpegtsM2Ts mode.", + "schema": { + "type": "boolean" + } + }, + { + "name": "videoCodec", + "in": "query", + "description": "Optional. Specify a video codec to encode to, e.g. h264. If omitted the server will auto-select using the url's extension. Options: h265, h264, mpeg4, theora, vpx, wmv.", + "schema": { + "type": "string" + } + }, + { + "name": "subtitleCodec", + "in": "query", + "description": "Optional. Specify a subtitle codec to encode to.", + "schema": { + "type": "string" + } + }, + { + "name": "transcodeReasons", + "in": "query", + "description": "Optional. The transcoding reason.", + "schema": { + "type": "string" + } + }, + { + "name": "audioStreamIndex", + "in": "query", + "description": "Optional. The index of the audio stream to use. If omitted the first audio stream will be used.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "videoStreamIndex", + "in": "query", + "description": "Optional. The index of the video stream to use. If omitted the first video stream will be used.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "context", + "in": "query", + "description": "Optional. The MediaBrowser.Model.Dlna.EncodingContext.", + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/EncodingContext" + } + ] + } + }, + { + "name": "streamOptions", + "in": "query", + "description": "Optional. The streaming options.", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + } + } + } + ], + "responses": { + "200": { + "description": "Audio stream returned.", + "content": { + "application/x-mpegURL": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Audio/{itemId}/master.m3u8": { + "get": { + "tags": [ + "DynamicHls" + ], + "summary": "Gets an audio hls playlist stream.", + "operationId": "GetMasterHlsAudioPlaylist", + "parameters": [ + { + "name": "itemId", + "in": "path", + "description": "The item id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "static", + "in": "query", + "description": "Optional. If true, the original file will be streamed statically without any encoding. Use either no url extension or the original file extension. true/false.", + "schema": { + "type": "boolean" + } + }, + { + "name": "params", + "in": "query", + "description": "The streaming parameters.", + "schema": { + "type": "string" + } + }, + { + "name": "tag", + "in": "query", + "description": "The tag.", + "schema": { + "type": "string" + } + }, + { + "name": "deviceProfileId", + "in": "query", + "description": "Optional. The dlna device profile id to utilize.", + "schema": { + "type": "string" + } + }, + { + "name": "playSessionId", + "in": "query", + "description": "The play session id.", + "schema": { + "type": "string" + } + }, + { + "name": "segmentContainer", + "in": "query", + "description": "The segment container.", + "schema": { + "type": "string" + } + }, + { + "name": "segmentLength", + "in": "query", + "description": "The segment length.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "minSegments", + "in": "query", + "description": "The minimum number of segments.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "mediaSourceId", + "in": "query", + "description": "The media version id, if playing an alternate version.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "deviceId", + "in": "query", + "description": "The device id of the client requesting. Used to stop encoding processes when needed.", + "schema": { + "type": "string" + } + }, + { + "name": "audioCodec", + "in": "query", + "description": "Optional. Specify a audio codec to encode to, e.g. mp3. If omitted the server will auto-select using the url's extension. Options: aac, mp3, vorbis, wma.", + "schema": { + "type": "string" + } + }, + { + "name": "enableAutoStreamCopy", + "in": "query", + "description": "Whether or not to allow automatic stream copy if requested values match the original source. Defaults to true.", + "schema": { + "type": "boolean" + } + }, + { + "name": "allowVideoStreamCopy", + "in": "query", + "description": "Whether or not to allow copying of the video stream url.", + "schema": { + "type": "boolean" + } + }, + { + "name": "allowAudioStreamCopy", + "in": "query", + "description": "Whether or not to allow copying of the audio stream url.", + "schema": { + "type": "boolean" + } + }, + { + "name": "breakOnNonKeyFrames", + "in": "query", + "description": "Optional. Whether to break on non key frames.", + "schema": { + "type": "boolean" + } + }, + { + "name": "audioSampleRate", + "in": "query", + "description": "Optional. Specify a specific audio sample rate, e.g. 44100.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxAudioBitDepth", + "in": "query", + "description": "Optional. The maximum audio bit depth.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxStreamingBitrate", + "in": "query", + "description": "Optional. The maximum streaming bitrate.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "audioBitRate", + "in": "query", + "description": "Optional. Specify an audio bitrate to encode to, e.g. 128000. If omitted this will be left to encoder defaults.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "audioChannels", + "in": "query", + "description": "Optional. Specify a specific number of audio channels to encode to, e.g. 2.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxAudioChannels", + "in": "query", + "description": "Optional. Specify a maximum number of audio channels to encode to, e.g. 2.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "profile", + "in": "query", + "description": "Optional. Specify a specific an encoder profile (varies by encoder), e.g. main, baseline, high.", + "schema": { + "type": "string" + } + }, + { + "name": "level", + "in": "query", + "description": "Optional. Specify a level for the encoder profile (varies by encoder), e.g. 3, 3.1.", + "schema": { + "type": "string" + } + }, + { + "name": "framerate", + "in": "query", + "description": "Optional. A specific video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements.", + "schema": { + "type": "number", + "format": "float" + } + }, + { + "name": "maxFramerate", + "in": "query", + "description": "Optional. A specific maximum video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements.", + "schema": { + "type": "number", + "format": "float" + } + }, + { + "name": "copyTimestamps", + "in": "query", + "description": "Whether or not to copy timestamps when transcoding with an offset. Defaults to false.", + "schema": { + "type": "boolean" + } + }, + { + "name": "startTimeTicks", + "in": "query", + "description": "Optional. Specify a starting offset, in ticks. 1 tick = 10000 ms.", + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "width", + "in": "query", + "description": "Optional. The fixed horizontal resolution of the encoded video.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "height", + "in": "query", + "description": "Optional. The fixed vertical resolution of the encoded video.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "videoBitRate", + "in": "query", + "description": "Optional. Specify a video bitrate to encode to, e.g. 500000. If omitted this will be left to encoder defaults.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "subtitleStreamIndex", + "in": "query", + "description": "Optional. The index of the subtitle stream to use. If omitted no subtitles will be used.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "subtitleMethod", + "in": "query", + "description": "Optional. Specify the subtitle delivery method.", + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SubtitleDeliveryMethod" + } + ] + } + }, + { + "name": "maxRefFrames", + "in": "query", + "description": "Optional.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxVideoBitDepth", + "in": "query", + "description": "Optional. The maximum video bit depth.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "requireAvc", + "in": "query", + "description": "Optional. Whether to require avc.", + "schema": { + "type": "boolean" + } + }, + { + "name": "deInterlace", + "in": "query", + "description": "Optional. Whether to deinterlace the video.", + "schema": { + "type": "boolean" + } + }, + { + "name": "requireNonAnamorphic", + "in": "query", + "description": "Optional. Whether to require a non anamorphic stream.", + "schema": { + "type": "boolean" + } + }, + { + "name": "transcodingMaxAudioChannels", + "in": "query", + "description": "Optional. The maximum number of audio channels to transcode.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "cpuCoreLimit", + "in": "query", + "description": "Optional. The limit of how many cpu cores to use.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "liveStreamId", + "in": "query", + "description": "The live stream id.", + "schema": { + "type": "string" + } + }, + { + "name": "enableMpegtsM2TsMode", + "in": "query", + "description": "Optional. Whether to enable the MpegtsM2Ts mode.", + "schema": { + "type": "boolean" + } + }, + { + "name": "videoCodec", + "in": "query", + "description": "Optional. Specify a video codec to encode to, e.g. h264. If omitted the server will auto-select using the url's extension. Options: h265, h264, mpeg4, theora, vp8, vp9, vpx (deprecated), wmv.", + "schema": { + "type": "string" + } + }, + { + "name": "subtitleCodec", + "in": "query", + "description": "Optional. Specify a subtitle codec to encode to.", + "schema": { + "type": "string" + } + }, + { + "name": "transcodeReasons", + "in": "query", + "description": "Optional. The transcoding reason.", + "schema": { + "type": "string" + } + }, + { + "name": "audioStreamIndex", + "in": "query", + "description": "Optional. The index of the audio stream to use. If omitted the first audio stream will be used.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "videoStreamIndex", + "in": "query", + "description": "Optional. The index of the video stream to use. If omitted the first video stream will be used.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "context", + "in": "query", + "description": "Optional. The MediaBrowser.Model.Dlna.EncodingContext.", + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/EncodingContext" + } + ] + } + }, + { + "name": "streamOptions", + "in": "query", + "description": "Optional. The streaming options.", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + } + } + }, + { + "name": "enableAdaptiveBitrateStreaming", + "in": "query", + "description": "Enable adaptive bitrate streaming.", + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Audio stream returned.", + "content": { + "application/x-mpegURL": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + }, + "head": { + "tags": [ + "DynamicHls" + ], + "summary": "Gets an audio hls playlist stream.", + "operationId": "HeadMasterHlsAudioPlaylist", + "parameters": [ + { + "name": "itemId", + "in": "path", + "description": "The item id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "static", + "in": "query", + "description": "Optional. If true, the original file will be streamed statically without any encoding. Use either no url extension or the original file extension. true/false.", + "schema": { + "type": "boolean" + } + }, + { + "name": "params", + "in": "query", + "description": "The streaming parameters.", + "schema": { + "type": "string" + } + }, + { + "name": "tag", + "in": "query", + "description": "The tag.", + "schema": { + "type": "string" + } + }, + { + "name": "deviceProfileId", + "in": "query", + "description": "Optional. The dlna device profile id to utilize.", + "schema": { + "type": "string" + } + }, + { + "name": "playSessionId", + "in": "query", + "description": "The play session id.", + "schema": { + "type": "string" + } + }, + { + "name": "segmentContainer", + "in": "query", + "description": "The segment container.", + "schema": { + "type": "string" + } + }, + { + "name": "segmentLength", + "in": "query", + "description": "The segment length.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "minSegments", + "in": "query", + "description": "The minimum number of segments.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "mediaSourceId", + "in": "query", + "description": "The media version id, if playing an alternate version.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "deviceId", + "in": "query", + "description": "The device id of the client requesting. Used to stop encoding processes when needed.", + "schema": { + "type": "string" + } + }, + { + "name": "audioCodec", + "in": "query", + "description": "Optional. Specify a audio codec to encode to, e.g. mp3. If omitted the server will auto-select using the url's extension. Options: aac, mp3, vorbis, wma.", + "schema": { + "type": "string" + } + }, + { + "name": "enableAutoStreamCopy", + "in": "query", + "description": "Whether or not to allow automatic stream copy if requested values match the original source. Defaults to true.", + "schema": { + "type": "boolean" + } + }, + { + "name": "allowVideoStreamCopy", + "in": "query", + "description": "Whether or not to allow copying of the video stream url.", + "schema": { + "type": "boolean" + } + }, + { + "name": "allowAudioStreamCopy", + "in": "query", + "description": "Whether or not to allow copying of the audio stream url.", + "schema": { + "type": "boolean" + } + }, + { + "name": "breakOnNonKeyFrames", + "in": "query", + "description": "Optional. Whether to break on non key frames.", + "schema": { + "type": "boolean" + } + }, + { + "name": "audioSampleRate", + "in": "query", + "description": "Optional. Specify a specific audio sample rate, e.g. 44100.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxAudioBitDepth", + "in": "query", + "description": "Optional. The maximum audio bit depth.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxStreamingBitrate", + "in": "query", + "description": "Optional. The maximum streaming bitrate.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "audioBitRate", + "in": "query", + "description": "Optional. Specify an audio bitrate to encode to, e.g. 128000. If omitted this will be left to encoder defaults.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "audioChannels", + "in": "query", + "description": "Optional. Specify a specific number of audio channels to encode to, e.g. 2.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxAudioChannels", + "in": "query", + "description": "Optional. Specify a maximum number of audio channels to encode to, e.g. 2.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "profile", + "in": "query", + "description": "Optional. Specify a specific an encoder profile (varies by encoder), e.g. main, baseline, high.", + "schema": { + "type": "string" + } + }, + { + "name": "level", + "in": "query", + "description": "Optional. Specify a level for the encoder profile (varies by encoder), e.g. 3, 3.1.", + "schema": { + "type": "string" + } + }, + { + "name": "framerate", + "in": "query", + "description": "Optional. A specific video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements.", + "schema": { + "type": "number", + "format": "float" + } + }, + { + "name": "maxFramerate", + "in": "query", + "description": "Optional. A specific maximum video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements.", + "schema": { + "type": "number", + "format": "float" + } + }, + { + "name": "copyTimestamps", + "in": "query", + "description": "Whether or not to copy timestamps when transcoding with an offset. Defaults to false.", + "schema": { + "type": "boolean" + } + }, + { + "name": "startTimeTicks", + "in": "query", + "description": "Optional. Specify a starting offset, in ticks. 1 tick = 10000 ms.", + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "width", + "in": "query", + "description": "Optional. The fixed horizontal resolution of the encoded video.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "height", + "in": "query", + "description": "Optional. The fixed vertical resolution of the encoded video.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "videoBitRate", + "in": "query", + "description": "Optional. Specify a video bitrate to encode to, e.g. 500000. If omitted this will be left to encoder defaults.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "subtitleStreamIndex", + "in": "query", + "description": "Optional. The index of the subtitle stream to use. If omitted no subtitles will be used.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "subtitleMethod", + "in": "query", + "description": "Optional. Specify the subtitle delivery method.", + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SubtitleDeliveryMethod" + } + ] + } + }, + { + "name": "maxRefFrames", + "in": "query", + "description": "Optional.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxVideoBitDepth", + "in": "query", + "description": "Optional. The maximum video bit depth.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "requireAvc", + "in": "query", + "description": "Optional. Whether to require avc.", + "schema": { + "type": "boolean" + } + }, + { + "name": "deInterlace", + "in": "query", + "description": "Optional. Whether to deinterlace the video.", + "schema": { + "type": "boolean" + } + }, + { + "name": "requireNonAnamorphic", + "in": "query", + "description": "Optional. Whether to require a non anamorphic stream.", + "schema": { + "type": "boolean" + } + }, + { + "name": "transcodingMaxAudioChannels", + "in": "query", + "description": "Optional. The maximum number of audio channels to transcode.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "cpuCoreLimit", + "in": "query", + "description": "Optional. The limit of how many cpu cores to use.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "liveStreamId", + "in": "query", + "description": "The live stream id.", + "schema": { + "type": "string" + } + }, + { + "name": "enableMpegtsM2TsMode", + "in": "query", + "description": "Optional. Whether to enable the MpegtsM2Ts mode.", + "schema": { + "type": "boolean" + } + }, + { + "name": "videoCodec", + "in": "query", + "description": "Optional. Specify a video codec to encode to, e.g. h264. If omitted the server will auto-select using the url's extension. Options: h265, h264, mpeg4, theora, vp8, vp9, vpx (deprecated), wmv.", + "schema": { + "type": "string" + } + }, + { + "name": "subtitleCodec", + "in": "query", + "description": "Optional. Specify a subtitle codec to encode to.", + "schema": { + "type": "string" + } + }, + { + "name": "transcodeReasons", + "in": "query", + "description": "Optional. The transcoding reason.", + "schema": { + "type": "string" + } + }, + { + "name": "audioStreamIndex", + "in": "query", + "description": "Optional. The index of the audio stream to use. If omitted the first audio stream will be used.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "videoStreamIndex", + "in": "query", + "description": "Optional. The index of the video stream to use. If omitted the first video stream will be used.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "context", + "in": "query", + "description": "Optional. The MediaBrowser.Model.Dlna.EncodingContext.", + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/EncodingContext" + } + ] + } + }, + { + "name": "streamOptions", + "in": "query", + "description": "Optional. The streaming options.", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + } + } + }, + { + "name": "enableAdaptiveBitrateStreaming", + "in": "query", + "description": "Enable adaptive bitrate streaming.", + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Audio stream returned.", + "content": { + "application/x-mpegURL": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Videos/{itemId}/hls1/{playlistId}/{segmentId}.{container}": { + "get": { + "tags": [ + "DynamicHls" + ], + "summary": "Gets a video stream using HTTP live streaming.", + "operationId": "GetHlsVideoSegment", + "parameters": [ + { + "name": "itemId", + "in": "path", + "description": "The item id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "playlistId", + "in": "path", + "description": "The playlist id.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "segmentId", + "in": "path", + "description": "The segment id.", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "container", + "in": "path", + "description": "The video container. Possible values are: ts, webm, asf, wmv, ogv, mp4, m4v, mkv, mpeg, mpg, avi, 3gp, wmv, wtv, m2ts, mov, iso, flv.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "runtimeTicks", + "in": "query", + "description": "The position of the requested segment in ticks.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "actualSegmentLengthTicks", + "in": "query", + "description": "The length of the requested segment in ticks.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "static", + "in": "query", + "description": "Optional. If true, the original file will be streamed statically without any encoding. Use either no url extension or the original file extension. true/false.", + "schema": { + "type": "boolean" + } + }, + { + "name": "params", + "in": "query", + "description": "The streaming parameters.", + "schema": { + "type": "string" + } + }, + { + "name": "tag", + "in": "query", + "description": "The tag.", + "schema": { + "type": "string" + } + }, + { + "name": "deviceProfileId", + "in": "query", + "description": "Optional. The dlna device profile id to utilize.", + "schema": { + "type": "string" + } + }, + { + "name": "playSessionId", + "in": "query", + "description": "The play session id.", + "schema": { + "type": "string" + } + }, + { + "name": "segmentContainer", + "in": "query", + "description": "The segment container.", + "schema": { + "type": "string" + } + }, + { + "name": "segmentLength", + "in": "query", + "description": "The desired segment length.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "minSegments", + "in": "query", + "description": "The minimum number of segments.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "mediaSourceId", + "in": "query", + "description": "The media version id, if playing an alternate version.", + "schema": { + "type": "string" + } + }, + { + "name": "deviceId", + "in": "query", + "description": "The device id of the client requesting. Used to stop encoding processes when needed.", + "schema": { + "type": "string" + } + }, + { + "name": "audioCodec", + "in": "query", + "description": "Optional. Specify a audio codec to encode to, e.g. mp3. If omitted the server will auto-select using the url's extension. Options: aac, mp3, vorbis, wma.", + "schema": { + "type": "string" + } + }, + { + "name": "enableAutoStreamCopy", + "in": "query", + "description": "Whether or not to allow automatic stream copy if requested values match the original source. Defaults to true.", + "schema": { + "type": "boolean" + } + }, + { + "name": "allowVideoStreamCopy", + "in": "query", + "description": "Whether or not to allow copying of the video stream url.", + "schema": { + "type": "boolean" + } + }, + { + "name": "allowAudioStreamCopy", + "in": "query", + "description": "Whether or not to allow copying of the audio stream url.", + "schema": { + "type": "boolean" + } + }, + { + "name": "breakOnNonKeyFrames", + "in": "query", + "description": "Optional. Whether to break on non key frames.", + "schema": { + "type": "boolean" + } + }, + { + "name": "audioSampleRate", + "in": "query", + "description": "Optional. Specify a specific audio sample rate, e.g. 44100.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxAudioBitDepth", + "in": "query", + "description": "Optional. The maximum audio bit depth.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "audioBitRate", + "in": "query", + "description": "Optional. Specify an audio bitrate to encode to, e.g. 128000. If omitted this will be left to encoder defaults.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "audioChannels", + "in": "query", + "description": "Optional. Specify a specific number of audio channels to encode to, e.g. 2.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxAudioChannels", + "in": "query", + "description": "Optional. Specify a maximum number of audio channels to encode to, e.g. 2.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "profile", + "in": "query", + "description": "Optional. Specify a specific an encoder profile (varies by encoder), e.g. main, baseline, high.", + "schema": { + "type": "string" + } + }, + { + "name": "level", + "in": "query", + "description": "Optional. Specify a level for the encoder profile (varies by encoder), e.g. 3, 3.1.", + "schema": { + "type": "string" + } + }, + { + "name": "framerate", + "in": "query", + "description": "Optional. A specific video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements.", + "schema": { + "type": "number", + "format": "float" + } + }, + { + "name": "maxFramerate", + "in": "query", + "description": "Optional. A specific maximum video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements.", + "schema": { + "type": "number", + "format": "float" + } + }, + { + "name": "copyTimestamps", + "in": "query", + "description": "Whether or not to copy timestamps when transcoding with an offset. Defaults to false.", + "schema": { + "type": "boolean" + } + }, + { + "name": "startTimeTicks", + "in": "query", + "description": "Optional. Specify a starting offset, in ticks. 1 tick = 10000 ms.", + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "width", + "in": "query", + "description": "Optional. The fixed horizontal resolution of the encoded video.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "height", + "in": "query", + "description": "Optional. The fixed vertical resolution of the encoded video.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxWidth", + "in": "query", + "description": "Optional. The maximum horizontal resolution of the encoded video.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxHeight", + "in": "query", + "description": "Optional. The maximum vertical resolution of the encoded video.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "videoBitRate", + "in": "query", + "description": "Optional. Specify a video bitrate to encode to, e.g. 500000. If omitted this will be left to encoder defaults.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "subtitleStreamIndex", + "in": "query", + "description": "Optional. The index of the subtitle stream to use. If omitted no subtitles will be used.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "subtitleMethod", + "in": "query", + "description": "Optional. Specify the subtitle delivery method.", + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SubtitleDeliveryMethod" + } + ] + } + }, + { + "name": "maxRefFrames", + "in": "query", + "description": "Optional.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxVideoBitDepth", + "in": "query", + "description": "Optional. The maximum video bit depth.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "requireAvc", + "in": "query", + "description": "Optional. Whether to require avc.", + "schema": { + "type": "boolean" + } + }, + { + "name": "deInterlace", + "in": "query", + "description": "Optional. Whether to deinterlace the video.", + "schema": { + "type": "boolean" + } + }, + { + "name": "requireNonAnamorphic", + "in": "query", + "description": "Optional. Whether to require a non anamorphic stream.", + "schema": { + "type": "boolean" + } + }, + { + "name": "transcodingMaxAudioChannels", + "in": "query", + "description": "Optional. The maximum number of audio channels to transcode.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "cpuCoreLimit", + "in": "query", + "description": "Optional. The limit of how many cpu cores to use.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "liveStreamId", + "in": "query", + "description": "The live stream id.", + "schema": { + "type": "string" + } + }, + { + "name": "enableMpegtsM2TsMode", + "in": "query", + "description": "Optional. Whether to enable the MpegtsM2Ts mode.", + "schema": { + "type": "boolean" + } + }, + { + "name": "videoCodec", + "in": "query", + "description": "Optional. Specify a video codec to encode to, e.g. h264. If omitted the server will auto-select using the url's extension. Options: h265, h264, mpeg4, theora, vp8, vp9, vpx (deprecated), wmv.", + "schema": { + "type": "string" + } + }, + { + "name": "subtitleCodec", + "in": "query", + "description": "Optional. Specify a subtitle codec to encode to.", + "schema": { + "type": "string" + } + }, + { + "name": "transcodeReasons", + "in": "query", + "description": "Optional. The transcoding reason.", + "schema": { + "type": "string" + } + }, + { + "name": "audioStreamIndex", + "in": "query", + "description": "Optional. The index of the audio stream to use. If omitted the first audio stream will be used.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "videoStreamIndex", + "in": "query", + "description": "Optional. The index of the video stream to use. If omitted the first video stream will be used.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "context", + "in": "query", + "description": "Optional. The MediaBrowser.Model.Dlna.EncodingContext.", + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/EncodingContext" + } + ] + } + }, + { + "name": "streamOptions", + "in": "query", + "description": "Optional. The streaming options.", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + } + } + } + ], + "responses": { + "200": { + "description": "Video stream returned.", + "content": { + "video/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Videos/{itemId}/live.m3u8": { + "get": { + "tags": [ + "DynamicHls" + ], + "summary": "Gets a hls live stream.", + "operationId": "GetLiveHlsStream", + "parameters": [ + { + "name": "itemId", + "in": "path", + "description": "The item id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "container", + "in": "query", + "description": "The audio container.", + "schema": { + "type": "string" + } + }, + { + "name": "static", + "in": "query", + "description": "Optional. If true, the original file will be streamed statically without any encoding. Use either no url extension or the original file extension. true/false.", + "schema": { + "type": "boolean" + } + }, + { + "name": "params", + "in": "query", + "description": "The streaming parameters.", + "schema": { + "type": "string" + } + }, + { + "name": "tag", + "in": "query", + "description": "The tag.", + "schema": { + "type": "string" + } + }, + { + "name": "deviceProfileId", + "in": "query", + "description": "Optional. The dlna device profile id to utilize.", + "schema": { + "type": "string" + } + }, + { + "name": "playSessionId", + "in": "query", + "description": "The play session id.", + "schema": { + "type": "string" + } + }, + { + "name": "segmentContainer", + "in": "query", + "description": "The segment container.", + "schema": { + "type": "string" + } + }, + { + "name": "segmentLength", + "in": "query", + "description": "The segment lenght.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "minSegments", + "in": "query", + "description": "The minimum number of segments.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "mediaSourceId", + "in": "query", + "description": "The media version id, if playing an alternate version.", + "schema": { + "type": "string" + } + }, + { + "name": "deviceId", + "in": "query", + "description": "The device id of the client requesting. Used to stop encoding processes when needed.", + "schema": { + "type": "string" + } + }, + { + "name": "audioCodec", + "in": "query", + "description": "Optional. Specify a audio codec to encode to, e.g. mp3. If omitted the server will auto-select using the url's extension. Options: aac, mp3, vorbis, wma.", + "schema": { + "type": "string" + } + }, + { + "name": "enableAutoStreamCopy", + "in": "query", + "description": "Whether or not to allow automatic stream copy if requested values match the original source. Defaults to true.", + "schema": { + "type": "boolean" + } + }, + { + "name": "allowVideoStreamCopy", + "in": "query", + "description": "Whether or not to allow copying of the video stream url.", + "schema": { + "type": "boolean" + } + }, + { + "name": "allowAudioStreamCopy", + "in": "query", + "description": "Whether or not to allow copying of the audio stream url.", + "schema": { + "type": "boolean" + } + }, + { + "name": "breakOnNonKeyFrames", + "in": "query", + "description": "Optional. Whether to break on non key frames.", + "schema": { + "type": "boolean" + } + }, + { + "name": "audioSampleRate", + "in": "query", + "description": "Optional. Specify a specific audio sample rate, e.g. 44100.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxAudioBitDepth", + "in": "query", + "description": "Optional. The maximum audio bit depth.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "audioBitRate", + "in": "query", + "description": "Optional. Specify an audio bitrate to encode to, e.g. 128000. If omitted this will be left to encoder defaults.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "audioChannels", + "in": "query", + "description": "Optional. Specify a specific number of audio channels to encode to, e.g. 2.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxAudioChannels", + "in": "query", + "description": "Optional. Specify a maximum number of audio channels to encode to, e.g. 2.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "profile", + "in": "query", + "description": "Optional. Specify a specific an encoder profile (varies by encoder), e.g. main, baseline, high.", + "schema": { + "type": "string" + } + }, + { + "name": "level", + "in": "query", + "description": "Optional. Specify a level for the encoder profile (varies by encoder), e.g. 3, 3.1.", + "schema": { + "type": "string" + } + }, + { + "name": "framerate", + "in": "query", + "description": "Optional. A specific video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements.", + "schema": { + "type": "number", + "format": "float" + } + }, + { + "name": "maxFramerate", + "in": "query", + "description": "Optional. A specific maximum video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements.", + "schema": { + "type": "number", + "format": "float" + } + }, + { + "name": "copyTimestamps", + "in": "query", + "description": "Whether or not to copy timestamps when transcoding with an offset. Defaults to false.", + "schema": { + "type": "boolean" + } + }, + { + "name": "startTimeTicks", + "in": "query", + "description": "Optional. Specify a starting offset, in ticks. 1 tick = 10000 ms.", + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "width", + "in": "query", + "description": "Optional. The fixed horizontal resolution of the encoded video.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "height", + "in": "query", + "description": "Optional. The fixed vertical resolution of the encoded video.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "videoBitRate", + "in": "query", + "description": "Optional. Specify a video bitrate to encode to, e.g. 500000. If omitted this will be left to encoder defaults.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "subtitleStreamIndex", + "in": "query", + "description": "Optional. The index of the subtitle stream to use. If omitted no subtitles will be used.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "subtitleMethod", + "in": "query", + "description": "Optional. Specify the subtitle delivery method.", + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SubtitleDeliveryMethod" + } + ] + } + }, + { + "name": "maxRefFrames", + "in": "query", + "description": "Optional.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxVideoBitDepth", + "in": "query", + "description": "Optional. The maximum video bit depth.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "requireAvc", + "in": "query", + "description": "Optional. Whether to require avc.", + "schema": { + "type": "boolean" + } + }, + { + "name": "deInterlace", + "in": "query", + "description": "Optional. Whether to deinterlace the video.", + "schema": { + "type": "boolean" + } + }, + { + "name": "requireNonAnamorphic", + "in": "query", + "description": "Optional. Whether to require a non anamorphic stream.", + "schema": { + "type": "boolean" + } + }, + { + "name": "transcodingMaxAudioChannels", + "in": "query", + "description": "Optional. The maximum number of audio channels to transcode.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "cpuCoreLimit", + "in": "query", + "description": "Optional. The limit of how many cpu cores to use.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "liveStreamId", + "in": "query", + "description": "The live stream id.", + "schema": { + "type": "string" + } + }, + { + "name": "enableMpegtsM2TsMode", + "in": "query", + "description": "Optional. Whether to enable the MpegtsM2Ts mode.", + "schema": { + "type": "boolean" + } + }, + { + "name": "videoCodec", + "in": "query", + "description": "Optional. Specify a video codec to encode to, e.g. h264. If omitted the server will auto-select using the url's extension. Options: h265, h264, mpeg4, theora, vp8, vp9, vpx (deprecated), wmv.", + "schema": { + "type": "string" + } + }, + { + "name": "subtitleCodec", + "in": "query", + "description": "Optional. Specify a subtitle codec to encode to.", + "schema": { + "type": "string" + } + }, + { + "name": "transcodeReasons", + "in": "query", + "description": "Optional. The transcoding reason.", + "schema": { + "type": "string" + } + }, + { + "name": "audioStreamIndex", + "in": "query", + "description": "Optional. The index of the audio stream to use. If omitted the first audio stream will be used.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "videoStreamIndex", + "in": "query", + "description": "Optional. The index of the video stream to use. If omitted the first video stream will be used.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "context", + "in": "query", + "description": "Optional. The MediaBrowser.Model.Dlna.EncodingContext.", + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/EncodingContext" + } + ] + } + }, + { + "name": "streamOptions", + "in": "query", + "description": "Optional. The streaming options.", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + } + } + }, + { + "name": "maxWidth", + "in": "query", + "description": "Optional. The max width.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxHeight", + "in": "query", + "description": "Optional. The max height.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "enableSubtitlesInManifest", + "in": "query", + "description": "Optional. Whether to enable subtitles in the manifest.", + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "Hls live stream retrieved.", + "content": { + "application/x-mpegURL": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Videos/{itemId}/main.m3u8": { + "get": { + "tags": [ + "DynamicHls" + ], + "summary": "Gets a video stream using HTTP live streaming.", + "operationId": "GetVariantHlsVideoPlaylist", + "parameters": [ + { + "name": "itemId", + "in": "path", + "description": "The item id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "static", + "in": "query", + "description": "Optional. If true, the original file will be streamed statically without any encoding. Use either no url extension or the original file extension. true/false.", + "schema": { + "type": "boolean" + } + }, + { + "name": "params", + "in": "query", + "description": "The streaming parameters.", + "schema": { + "type": "string" + } + }, + { + "name": "tag", + "in": "query", + "description": "The tag.", + "schema": { + "type": "string" + } + }, + { + "name": "deviceProfileId", + "in": "query", + "description": "Optional. The dlna device profile id to utilize.", + "schema": { + "type": "string" + } + }, + { + "name": "playSessionId", + "in": "query", + "description": "The play session id.", + "schema": { + "type": "string" + } + }, + { + "name": "segmentContainer", + "in": "query", + "description": "The segment container.", + "schema": { + "type": "string" + } + }, + { + "name": "segmentLength", + "in": "query", + "description": "The segment length.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "minSegments", + "in": "query", + "description": "The minimum number of segments.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "mediaSourceId", + "in": "query", + "description": "The media version id, if playing an alternate version.", + "schema": { + "type": "string" + } + }, + { + "name": "deviceId", + "in": "query", + "description": "The device id of the client requesting. Used to stop encoding processes when needed.", + "schema": { + "type": "string" + } + }, + { + "name": "audioCodec", + "in": "query", + "description": "Optional. Specify a audio codec to encode to, e.g. mp3. If omitted the server will auto-select using the url's extension. Options: aac, mp3, vorbis, wma.", + "schema": { + "type": "string" + } + }, + { + "name": "enableAutoStreamCopy", + "in": "query", + "description": "Whether or not to allow automatic stream copy if requested values match the original source. Defaults to true.", + "schema": { + "type": "boolean" + } + }, + { + "name": "allowVideoStreamCopy", + "in": "query", + "description": "Whether or not to allow copying of the video stream url.", + "schema": { + "type": "boolean" + } + }, + { + "name": "allowAudioStreamCopy", + "in": "query", + "description": "Whether or not to allow copying of the audio stream url.", + "schema": { + "type": "boolean" + } + }, + { + "name": "breakOnNonKeyFrames", + "in": "query", + "description": "Optional. Whether to break on non key frames.", + "schema": { + "type": "boolean" + } + }, + { + "name": "audioSampleRate", + "in": "query", + "description": "Optional. Specify a specific audio sample rate, e.g. 44100.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxAudioBitDepth", + "in": "query", + "description": "Optional. The maximum audio bit depth.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "audioBitRate", + "in": "query", + "description": "Optional. Specify an audio bitrate to encode to, e.g. 128000. If omitted this will be left to encoder defaults.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "audioChannels", + "in": "query", + "description": "Optional. Specify a specific number of audio channels to encode to, e.g. 2.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxAudioChannels", + "in": "query", + "description": "Optional. Specify a maximum number of audio channels to encode to, e.g. 2.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "profile", + "in": "query", + "description": "Optional. Specify a specific an encoder profile (varies by encoder), e.g. main, baseline, high.", + "schema": { + "type": "string" + } + }, + { + "name": "level", + "in": "query", + "description": "Optional. Specify a level for the encoder profile (varies by encoder), e.g. 3, 3.1.", + "schema": { + "type": "string" + } + }, + { + "name": "framerate", + "in": "query", + "description": "Optional. A specific video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements.", + "schema": { + "type": "number", + "format": "float" + } + }, + { + "name": "maxFramerate", + "in": "query", + "description": "Optional. A specific maximum video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements.", + "schema": { + "type": "number", + "format": "float" + } + }, + { + "name": "copyTimestamps", + "in": "query", + "description": "Whether or not to copy timestamps when transcoding with an offset. Defaults to false.", + "schema": { + "type": "boolean" + } + }, + { + "name": "startTimeTicks", + "in": "query", + "description": "Optional. Specify a starting offset, in ticks. 1 tick = 10000 ms.", + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "width", + "in": "query", + "description": "Optional. The fixed horizontal resolution of the encoded video.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "height", + "in": "query", + "description": "Optional. The fixed vertical resolution of the encoded video.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxWidth", + "in": "query", + "description": "Optional. The maximum horizontal resolution of the encoded video.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxHeight", + "in": "query", + "description": "Optional. The maximum vertical resolution of the encoded video.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "videoBitRate", + "in": "query", + "description": "Optional. Specify a video bitrate to encode to, e.g. 500000. If omitted this will be left to encoder defaults.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "subtitleStreamIndex", + "in": "query", + "description": "Optional. The index of the subtitle stream to use. If omitted no subtitles will be used.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "subtitleMethod", + "in": "query", + "description": "Optional. Specify the subtitle delivery method.", + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SubtitleDeliveryMethod" + } + ] + } + }, + { + "name": "maxRefFrames", + "in": "query", + "description": "Optional.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxVideoBitDepth", + "in": "query", + "description": "Optional. The maximum video bit depth.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "requireAvc", + "in": "query", + "description": "Optional. Whether to require avc.", + "schema": { + "type": "boolean" + } + }, + { + "name": "deInterlace", + "in": "query", + "description": "Optional. Whether to deinterlace the video.", + "schema": { + "type": "boolean" + } + }, + { + "name": "requireNonAnamorphic", + "in": "query", + "description": "Optional. Whether to require a non anamorphic stream.", + "schema": { + "type": "boolean" + } + }, + { + "name": "transcodingMaxAudioChannels", + "in": "query", + "description": "Optional. The maximum number of audio channels to transcode.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "cpuCoreLimit", + "in": "query", + "description": "Optional. The limit of how many cpu cores to use.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "liveStreamId", + "in": "query", + "description": "The live stream id.", + "schema": { + "type": "string" + } + }, + { + "name": "enableMpegtsM2TsMode", + "in": "query", + "description": "Optional. Whether to enable the MpegtsM2Ts mode.", + "schema": { + "type": "boolean" + } + }, + { + "name": "videoCodec", + "in": "query", + "description": "Optional. Specify a video codec to encode to, e.g. h264. If omitted the server will auto-select using the url's extension. Options: h265, h264, mpeg4, theora, vp8, vp9, vpx (deprecated), wmv.", + "schema": { + "type": "string" + } + }, + { + "name": "subtitleCodec", + "in": "query", + "description": "Optional. Specify a subtitle codec to encode to.", + "schema": { + "type": "string" + } + }, + { + "name": "transcodeReasons", + "in": "query", + "description": "Optional. The transcoding reason.", + "schema": { + "type": "string" + } + }, + { + "name": "audioStreamIndex", + "in": "query", + "description": "Optional. The index of the audio stream to use. If omitted the first audio stream will be used.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "videoStreamIndex", + "in": "query", + "description": "Optional. The index of the video stream to use. If omitted the first video stream will be used.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "context", + "in": "query", + "description": "Optional. The MediaBrowser.Model.Dlna.EncodingContext.", + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/EncodingContext" + } + ] + } + }, + { + "name": "streamOptions", + "in": "query", + "description": "Optional. The streaming options.", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + } + } + } + ], + "responses": { + "200": { + "description": "Video stream returned.", + "content": { + "application/x-mpegURL": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Videos/{itemId}/master.m3u8": { + "get": { + "tags": [ + "DynamicHls" + ], + "summary": "Gets a video hls playlist stream.", + "operationId": "GetMasterHlsVideoPlaylist", + "parameters": [ + { + "name": "itemId", + "in": "path", + "description": "The item id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "static", + "in": "query", + "description": "Optional. If true, the original file will be streamed statically without any encoding. Use either no url extension or the original file extension. true/false.", + "schema": { + "type": "boolean" + } + }, + { + "name": "params", + "in": "query", + "description": "The streaming parameters.", + "schema": { + "type": "string" + } + }, + { + "name": "tag", + "in": "query", + "description": "The tag.", + "schema": { + "type": "string" + } + }, + { + "name": "deviceProfileId", + "in": "query", + "description": "Optional. The dlna device profile id to utilize.", + "schema": { + "type": "string" + } + }, + { + "name": "playSessionId", + "in": "query", + "description": "The play session id.", + "schema": { + "type": "string" + } + }, + { + "name": "segmentContainer", + "in": "query", + "description": "The segment container.", + "schema": { + "type": "string" + } + }, + { + "name": "segmentLength", + "in": "query", + "description": "The segment length.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "minSegments", + "in": "query", + "description": "The minimum number of segments.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "mediaSourceId", + "in": "query", + "description": "The media version id, if playing an alternate version.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "deviceId", + "in": "query", + "description": "The device id of the client requesting. Used to stop encoding processes when needed.", + "schema": { + "type": "string" + } + }, + { + "name": "audioCodec", + "in": "query", + "description": "Optional. Specify a audio codec to encode to, e.g. mp3. If omitted the server will auto-select using the url's extension. Options: aac, mp3, vorbis, wma.", + "schema": { + "type": "string" + } + }, + { + "name": "enableAutoStreamCopy", + "in": "query", + "description": "Whether or not to allow automatic stream copy if requested values match the original source. Defaults to true.", + "schema": { + "type": "boolean" + } + }, + { + "name": "allowVideoStreamCopy", + "in": "query", + "description": "Whether or not to allow copying of the video stream url.", + "schema": { + "type": "boolean" + } + }, + { + "name": "allowAudioStreamCopy", + "in": "query", + "description": "Whether or not to allow copying of the audio stream url.", + "schema": { + "type": "boolean" + } + }, + { + "name": "breakOnNonKeyFrames", + "in": "query", + "description": "Optional. Whether to break on non key frames.", + "schema": { + "type": "boolean" + } + }, + { + "name": "audioSampleRate", + "in": "query", + "description": "Optional. Specify a specific audio sample rate, e.g. 44100.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxAudioBitDepth", + "in": "query", + "description": "Optional. The maximum audio bit depth.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "audioBitRate", + "in": "query", + "description": "Optional. Specify an audio bitrate to encode to, e.g. 128000. If omitted this will be left to encoder defaults.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "audioChannels", + "in": "query", + "description": "Optional. Specify a specific number of audio channels to encode to, e.g. 2.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxAudioChannels", + "in": "query", + "description": "Optional. Specify a maximum number of audio channels to encode to, e.g. 2.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "profile", + "in": "query", + "description": "Optional. Specify a specific an encoder profile (varies by encoder), e.g. main, baseline, high.", + "schema": { + "type": "string" + } + }, + { + "name": "level", + "in": "query", + "description": "Optional. Specify a level for the encoder profile (varies by encoder), e.g. 3, 3.1.", + "schema": { + "type": "string" + } + }, + { + "name": "framerate", + "in": "query", + "description": "Optional. A specific video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements.", + "schema": { + "type": "number", + "format": "float" + } + }, + { + "name": "maxFramerate", + "in": "query", + "description": "Optional. A specific maximum video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements.", + "schema": { + "type": "number", + "format": "float" + } + }, + { + "name": "copyTimestamps", + "in": "query", + "description": "Whether or not to copy timestamps when transcoding with an offset. Defaults to false.", + "schema": { + "type": "boolean" + } + }, + { + "name": "startTimeTicks", + "in": "query", + "description": "Optional. Specify a starting offset, in ticks. 1 tick = 10000 ms.", + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "width", + "in": "query", + "description": "Optional. The fixed horizontal resolution of the encoded video.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "height", + "in": "query", + "description": "Optional. The fixed vertical resolution of the encoded video.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxWidth", + "in": "query", + "description": "Optional. The maximum horizontal resolution of the encoded video.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxHeight", + "in": "query", + "description": "Optional. The maximum vertical resolution of the encoded video.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "videoBitRate", + "in": "query", + "description": "Optional. Specify a video bitrate to encode to, e.g. 500000. If omitted this will be left to encoder defaults.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "subtitleStreamIndex", + "in": "query", + "description": "Optional. The index of the subtitle stream to use. If omitted no subtitles will be used.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "subtitleMethod", + "in": "query", + "description": "Optional. Specify the subtitle delivery method.", + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SubtitleDeliveryMethod" + } + ] + } + }, + { + "name": "maxRefFrames", + "in": "query", + "description": "Optional.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxVideoBitDepth", + "in": "query", + "description": "Optional. The maximum video bit depth.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "requireAvc", + "in": "query", + "description": "Optional. Whether to require avc.", + "schema": { + "type": "boolean" + } + }, + { + "name": "deInterlace", + "in": "query", + "description": "Optional. Whether to deinterlace the video.", + "schema": { + "type": "boolean" + } + }, + { + "name": "requireNonAnamorphic", + "in": "query", + "description": "Optional. Whether to require a non anamorphic stream.", + "schema": { + "type": "boolean" + } + }, + { + "name": "transcodingMaxAudioChannels", + "in": "query", + "description": "Optional. The maximum number of audio channels to transcode.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "cpuCoreLimit", + "in": "query", + "description": "Optional. The limit of how many cpu cores to use.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "liveStreamId", + "in": "query", + "description": "The live stream id.", + "schema": { + "type": "string" + } + }, + { + "name": "enableMpegtsM2TsMode", + "in": "query", + "description": "Optional. Whether to enable the MpegtsM2Ts mode.", + "schema": { + "type": "boolean" + } + }, + { + "name": "videoCodec", + "in": "query", + "description": "Optional. Specify a video codec to encode to, e.g. h264. If omitted the server will auto-select using the url's extension. Options: h265, h264, mpeg4, theora, vp8, vp9, vpx (deprecated), wmv.", + "schema": { + "type": "string" + } + }, + { + "name": "subtitleCodec", + "in": "query", + "description": "Optional. Specify a subtitle codec to encode to.", + "schema": { + "type": "string" + } + }, + { + "name": "transcodeReasons", + "in": "query", + "description": "Optional. The transcoding reason.", + "schema": { + "type": "string" + } + }, + { + "name": "audioStreamIndex", + "in": "query", + "description": "Optional. The index of the audio stream to use. If omitted the first audio stream will be used.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "videoStreamIndex", + "in": "query", + "description": "Optional. The index of the video stream to use. If omitted the first video stream will be used.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "context", + "in": "query", + "description": "Optional. The MediaBrowser.Model.Dlna.EncodingContext.", + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/EncodingContext" + } + ] + } + }, + { + "name": "streamOptions", + "in": "query", + "description": "Optional. The streaming options.", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + } + } + }, + { + "name": "enableAdaptiveBitrateStreaming", + "in": "query", + "description": "Enable adaptive bitrate streaming.", + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Video stream returned.", + "content": { + "application/x-mpegURL": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + }, + "head": { + "tags": [ + "DynamicHls" + ], + "summary": "Gets a video hls playlist stream.", + "operationId": "HeadMasterHlsVideoPlaylist", + "parameters": [ + { + "name": "itemId", + "in": "path", + "description": "The item id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "static", + "in": "query", + "description": "Optional. If true, the original file will be streamed statically without any encoding. Use either no url extension or the original file extension. true/false.", + "schema": { + "type": "boolean" + } + }, + { + "name": "params", + "in": "query", + "description": "The streaming parameters.", + "schema": { + "type": "string" + } + }, + { + "name": "tag", + "in": "query", + "description": "The tag.", + "schema": { + "type": "string" + } + }, + { + "name": "deviceProfileId", + "in": "query", + "description": "Optional. The dlna device profile id to utilize.", + "schema": { + "type": "string" + } + }, + { + "name": "playSessionId", + "in": "query", + "description": "The play session id.", + "schema": { + "type": "string" + } + }, + { + "name": "segmentContainer", + "in": "query", + "description": "The segment container.", + "schema": { + "type": "string" + } + }, + { + "name": "segmentLength", + "in": "query", + "description": "The segment length.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "minSegments", + "in": "query", + "description": "The minimum number of segments.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "mediaSourceId", + "in": "query", + "description": "The media version id, if playing an alternate version.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "deviceId", + "in": "query", + "description": "The device id of the client requesting. Used to stop encoding processes when needed.", + "schema": { + "type": "string" + } + }, + { + "name": "audioCodec", + "in": "query", + "description": "Optional. Specify a audio codec to encode to, e.g. mp3. If omitted the server will auto-select using the url's extension. Options: aac, mp3, vorbis, wma.", + "schema": { + "type": "string" + } + }, + { + "name": "enableAutoStreamCopy", + "in": "query", + "description": "Whether or not to allow automatic stream copy if requested values match the original source. Defaults to true.", + "schema": { + "type": "boolean" + } + }, + { + "name": "allowVideoStreamCopy", + "in": "query", + "description": "Whether or not to allow copying of the video stream url.", + "schema": { + "type": "boolean" + } + }, + { + "name": "allowAudioStreamCopy", + "in": "query", + "description": "Whether or not to allow copying of the audio stream url.", + "schema": { + "type": "boolean" + } + }, + { + "name": "breakOnNonKeyFrames", + "in": "query", + "description": "Optional. Whether to break on non key frames.", + "schema": { + "type": "boolean" + } + }, + { + "name": "audioSampleRate", + "in": "query", + "description": "Optional. Specify a specific audio sample rate, e.g. 44100.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxAudioBitDepth", + "in": "query", + "description": "Optional. The maximum audio bit depth.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "audioBitRate", + "in": "query", + "description": "Optional. Specify an audio bitrate to encode to, e.g. 128000. If omitted this will be left to encoder defaults.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "audioChannels", + "in": "query", + "description": "Optional. Specify a specific number of audio channels to encode to, e.g. 2.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxAudioChannels", + "in": "query", + "description": "Optional. Specify a maximum number of audio channels to encode to, e.g. 2.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "profile", + "in": "query", + "description": "Optional. Specify a specific an encoder profile (varies by encoder), e.g. main, baseline, high.", + "schema": { + "type": "string" + } + }, + { + "name": "level", + "in": "query", + "description": "Optional. Specify a level for the encoder profile (varies by encoder), e.g. 3, 3.1.", + "schema": { + "type": "string" + } + }, + { + "name": "framerate", + "in": "query", + "description": "Optional. A specific video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements.", + "schema": { + "type": "number", + "format": "float" + } + }, + { + "name": "maxFramerate", + "in": "query", + "description": "Optional. A specific maximum video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements.", + "schema": { + "type": "number", + "format": "float" + } + }, + { + "name": "copyTimestamps", + "in": "query", + "description": "Whether or not to copy timestamps when transcoding with an offset. Defaults to false.", + "schema": { + "type": "boolean" + } + }, + { + "name": "startTimeTicks", + "in": "query", + "description": "Optional. Specify a starting offset, in ticks. 1 tick = 10000 ms.", + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "width", + "in": "query", + "description": "Optional. The fixed horizontal resolution of the encoded video.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "height", + "in": "query", + "description": "Optional. The fixed vertical resolution of the encoded video.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxWidth", + "in": "query", + "description": "Optional. The maximum horizontal resolution of the encoded video.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxHeight", + "in": "query", + "description": "Optional. The maximum vertical resolution of the encoded video.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "videoBitRate", + "in": "query", + "description": "Optional. Specify a video bitrate to encode to, e.g. 500000. If omitted this will be left to encoder defaults.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "subtitleStreamIndex", + "in": "query", + "description": "Optional. The index of the subtitle stream to use. If omitted no subtitles will be used.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "subtitleMethod", + "in": "query", + "description": "Optional. Specify the subtitle delivery method.", + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SubtitleDeliveryMethod" + } + ] + } + }, + { + "name": "maxRefFrames", + "in": "query", + "description": "Optional.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxVideoBitDepth", + "in": "query", + "description": "Optional. The maximum video bit depth.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "requireAvc", + "in": "query", + "description": "Optional. Whether to require avc.", + "schema": { + "type": "boolean" + } + }, + { + "name": "deInterlace", + "in": "query", + "description": "Optional. Whether to deinterlace the video.", + "schema": { + "type": "boolean" + } + }, + { + "name": "requireNonAnamorphic", + "in": "query", + "description": "Optional. Whether to require a non anamorphic stream.", + "schema": { + "type": "boolean" + } + }, + { + "name": "transcodingMaxAudioChannels", + "in": "query", + "description": "Optional. The maximum number of audio channels to transcode.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "cpuCoreLimit", + "in": "query", + "description": "Optional. The limit of how many cpu cores to use.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "liveStreamId", + "in": "query", + "description": "The live stream id.", + "schema": { + "type": "string" + } + }, + { + "name": "enableMpegtsM2TsMode", + "in": "query", + "description": "Optional. Whether to enable the MpegtsM2Ts mode.", + "schema": { + "type": "boolean" + } + }, + { + "name": "videoCodec", + "in": "query", + "description": "Optional. Specify a video codec to encode to, e.g. h264. If omitted the server will auto-select using the url's extension. Options: h265, h264, mpeg4, theora, vp8, vp9, vpx (deprecated), wmv.", + "schema": { + "type": "string" + } + }, + { + "name": "subtitleCodec", + "in": "query", + "description": "Optional. Specify a subtitle codec to encode to.", + "schema": { + "type": "string" + } + }, + { + "name": "transcodeReasons", + "in": "query", + "description": "Optional. The transcoding reason.", + "schema": { + "type": "string" + } + }, + { + "name": "audioStreamIndex", + "in": "query", + "description": "Optional. The index of the audio stream to use. If omitted the first audio stream will be used.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "videoStreamIndex", + "in": "query", + "description": "Optional. The index of the video stream to use. If omitted the first video stream will be used.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "context", + "in": "query", + "description": "Optional. The MediaBrowser.Model.Dlna.EncodingContext.", + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/EncodingContext" + } + ] + } + }, + { + "name": "streamOptions", + "in": "query", + "description": "Optional. The streaming options.", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + } + } + }, + { + "name": "enableAdaptiveBitrateStreaming", + "in": "query", + "description": "Enable adaptive bitrate streaming.", + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Video stream returned.", + "content": { + "application/x-mpegURL": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Environment/DefaultDirectoryBrowser": { + "get": { + "tags": [ + "Environment" + ], + "summary": "Get Default directory browser.", + "operationId": "GetDefaultDirectoryBrowser", + "responses": { + "200": { + "description": "Default directory browser returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DefaultDirectoryBrowserInfoDto" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/DefaultDirectoryBrowserInfoDto" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/DefaultDirectoryBrowserInfoDto" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "FirstTimeSetupOrElevated" + ] + } + ] + } + }, + "/Environment/DirectoryContents": { + "get": { + "tags": [ + "Environment" + ], + "summary": "Gets the contents of a given directory in the file system.", + "operationId": "GetDirectoryContents", + "parameters": [ + { + "name": "path", + "in": "query", + "description": "The path.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "includeFiles", + "in": "query", + "description": "An optional filter to include or exclude files from the results. true/false.", + "schema": { + "type": "boolean", + "default": false + } + }, + { + "name": "includeDirectories", + "in": "query", + "description": "An optional filter to include or exclude folders from the results. true/false.", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "200": { + "description": "Directory contents returned.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FileSystemEntryInfo" + } + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FileSystemEntryInfo" + } + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FileSystemEntryInfo" + } + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "FirstTimeSetupOrElevated" + ] + } + ] + } + }, + "/Environment/Drives": { + "get": { + "tags": [ + "Environment" + ], + "summary": "Gets available drives from the server's file system.", + "operationId": "GetDrives", + "responses": { + "200": { + "description": "List of entries returned.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FileSystemEntryInfo" + } + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FileSystemEntryInfo" + } + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FileSystemEntryInfo" + } + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "FirstTimeSetupOrElevated" + ] + } + ] + } + }, + "/Environment/NetworkShares": { + "get": { + "tags": [ + "Environment" + ], + "summary": "Gets network paths.", + "operationId": "GetNetworkShares", + "responses": { + "200": { + "description": "Empty array returned.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FileSystemEntryInfo" + } + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FileSystemEntryInfo" + } + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FileSystemEntryInfo" + } + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "deprecated": true, + "security": [ + { + "CustomAuthentication": [ + "FirstTimeSetupOrElevated" + ] + } + ] + } + }, + "/Environment/ParentPath": { + "get": { + "tags": [ + "Environment" + ], + "summary": "Gets the parent path of a given path.", + "operationId": "GetParentPath", + "parameters": [ + { + "name": "path", + "in": "query", + "description": "The path.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "string" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "type": "string" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "type": "string" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "FirstTimeSetupOrElevated" + ] + } + ] + } + }, + "/Environment/ValidatePath": { + "post": { + "tags": [ + "Environment" + ], + "summary": "Validates path.", + "operationId": "ValidatePath", + "requestBody": { + "description": "Validate request object.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ValidatePathDto" + } + ], + "description": "Validate path object." + } + }, + "text/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ValidatePathDto" + } + ], + "description": "Validate path object." + } + }, + "application/*+json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ValidatePathDto" + } + ], + "description": "Validate path object." + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Path validated." + }, + "404": { + "description": "Path not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "FirstTimeSetupOrElevated" + ] + } + ] + } + }, + "/Items/Filters": { + "get": { + "tags": [ + "Filter" + ], + "summary": "Gets legacy query filters.", + "operationId": "GetQueryFiltersLegacy", + "parameters": [ + { + "name": "userId", + "in": "query", + "description": "Optional. User id.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "parentId", + "in": "query", + "description": "Optional. Parent id.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "includeItemTypes", + "in": "query", + "description": "Optional. If specified, results will be filtered based on item type. This allows multiple, comma delimited.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseItemKind" + } + } + }, + { + "name": "mediaTypes", + "in": "query", + "description": "Optional. Filter by MediaType. Allows multiple, comma delimited.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "Legacy filters retrieved.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueryFiltersLegacy" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/QueryFiltersLegacy" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/QueryFiltersLegacy" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Items/Filters2": { + "get": { + "tags": [ + "Filter" + ], + "summary": "Gets query filters.", + "operationId": "GetQueryFilters", + "parameters": [ + { + "name": "userId", + "in": "query", + "description": "Optional. User id.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "parentId", + "in": "query", + "description": "Optional. Specify this to localize the search to a specific item or folder. Omit to use the root.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "includeItemTypes", + "in": "query", + "description": "Optional. If specified, results will be filtered based on item type. This allows multiple, comma delimited.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseItemKind" + } + } + }, + { + "name": "isAiring", + "in": "query", + "description": "Optional. Is item airing.", + "schema": { + "type": "boolean" + } + }, + { + "name": "isMovie", + "in": "query", + "description": "Optional. Is item movie.", + "schema": { + "type": "boolean" + } + }, + { + "name": "isSports", + "in": "query", + "description": "Optional. Is item sports.", + "schema": { + "type": "boolean" + } + }, + { + "name": "isKids", + "in": "query", + "description": "Optional. Is item kids.", + "schema": { + "type": "boolean" + } + }, + { + "name": "isNews", + "in": "query", + "description": "Optional. Is item news.", + "schema": { + "type": "boolean" + } + }, + { + "name": "isSeries", + "in": "query", + "description": "Optional. Is item series.", + "schema": { + "type": "boolean" + } + }, + { + "name": "recursive", + "in": "query", + "description": "Optional. Search recursive.", + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "Filters retrieved.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueryFilters" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/QueryFilters" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/QueryFilters" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Genres": { + "get": { + "tags": [ + "Genres" + ], + "summary": "Gets all genres from a given item, folder, or the entire library.", + "operationId": "GetGenres", + "parameters": [ + { + "name": "startIndex", + "in": "query", + "description": "Optional. The record index to start at. All items with a lower index will be dropped from the results.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "limit", + "in": "query", + "description": "Optional. The maximum number of records to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "searchTerm", + "in": "query", + "description": "The search term.", + "schema": { + "type": "string" + } + }, + { + "name": "parentId", + "in": "query", + "description": "Specify this to localize the search to a specific item or folder. Omit to use the root.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "fields", + "in": "query", + "description": "Optional. Specify additional fields of information to return in the output.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ItemFields" + } + } + }, + { + "name": "excludeItemTypes", + "in": "query", + "description": "Optional. If specified, results will be filtered out based on item type. This allows multiple, comma delimited.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseItemKind" + } + } + }, + { + "name": "includeItemTypes", + "in": "query", + "description": "Optional. If specified, results will be filtered in based on item type. This allows multiple, comma delimited.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseItemKind" + } + } + }, + { + "name": "isFavorite", + "in": "query", + "description": "Optional filter by items that are marked as favorite, or not.", + "schema": { + "type": "boolean" + } + }, + { + "name": "imageTypeLimit", + "in": "query", + "description": "Optional, the max number of images to return, per image type.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "enableImageTypes", + "in": "query", + "description": "Optional. The image types to include in the output.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ImageType" + } + } + }, + { + "name": "userId", + "in": "query", + "description": "User id.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "nameStartsWithOrGreater", + "in": "query", + "description": "Optional filter by items whose name is sorted equally or greater than a given input string.", + "schema": { + "type": "string" + } + }, + { + "name": "nameStartsWith", + "in": "query", + "description": "Optional filter by items whose name is sorted equally than a given input string.", + "schema": { + "type": "string" + } + }, + { + "name": "nameLessThan", + "in": "query", + "description": "Optional filter by items whose name is equally or lesser than a given input string.", + "schema": { + "type": "string" + } + }, + { + "name": "sortBy", + "in": "query", + "description": "Optional. Specify one or more sort orders, comma delimited.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort Order - Ascending,Descending.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SortOrder" + } + } + }, + { + "name": "enableImages", + "in": "query", + "description": "Optional, include image information in output.", + "schema": { + "type": "boolean", + "default": true + } + }, + { + "name": "enableTotalRecordCount", + "in": "query", + "description": "Optional. Include total record count.", + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Genres returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Genres/{genreName}": { + "get": { + "tags": [ + "Genres" + ], + "summary": "Gets a genre, by name.", + "operationId": "GetGenre", + "parameters": [ + { + "name": "genreName", + "in": "path", + "description": "The genre name.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "userId", + "in": "query", + "description": "The user id.", + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Genres returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BaseItemDto" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDto" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDto" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Audio/{itemId}/hls/{segmentId}/stream.aac": { + "get": { + "tags": [ + "HlsSegment" + ], + "summary": "Gets the specified audio segment for an audio item.", + "operationId": "GetHlsAudioSegmentLegacyAac", + "parameters": [ + { + "name": "itemId", + "in": "path", + "description": "The item id.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "segmentId", + "in": "path", + "description": "The segment id.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Hls audio segment returned.", + "content": { + "audio/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/Audio/{itemId}/hls/{segmentId}/stream.mp3": { + "get": { + "tags": [ + "HlsSegment" + ], + "summary": "Gets the specified audio segment for an audio item.", + "operationId": "GetHlsAudioSegmentLegacyMp3", + "parameters": [ + { + "name": "itemId", + "in": "path", + "description": "The item id.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "segmentId", + "in": "path", + "description": "The segment id.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Hls audio segment returned.", + "content": { + "audio/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/Videos/{itemId}/hls/{playlistId}/{segmentId}.{segmentContainer}": { + "get": { + "tags": [ + "HlsSegment" + ], + "summary": "Gets a hls video segment.", + "operationId": "GetHlsVideoSegmentLegacy", + "parameters": [ + { + "name": "itemId", + "in": "path", + "description": "The item id.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "playlistId", + "in": "path", + "description": "The playlist id.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "segmentId", + "in": "path", + "description": "The segment id.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "segmentContainer", + "in": "path", + "description": "The segment container.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Hls video segment returned.", + "content": { + "video/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "404": { + "description": "Hls segment not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + } + } + }, + "/Videos/{itemId}/hls/{playlistId}/stream.m3u8": { + "get": { + "tags": [ + "HlsSegment" + ], + "summary": "Gets a hls video playlist.", + "operationId": "GetHlsPlaylistLegacy", + "parameters": [ + { + "name": "itemId", + "in": "path", + "description": "The video id.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "playlistId", + "in": "path", + "description": "The playlist id.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Hls video playlist returned.", + "content": { + "application/x-mpegURL": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Videos/ActiveEncodings": { + "delete": { + "tags": [ + "HlsSegment" + ], + "summary": "Stops an active encoding.", + "operationId": "StopEncodingProcess", + "parameters": [ + { + "name": "deviceId", + "in": "query", + "description": "The device id of the client requesting. Used to stop encoding processes when needed.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "playSessionId", + "in": "query", + "description": "The play session id.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Encoding stopped successfully." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Artists/{name}/Images/{imageType}/{imageIndex}": { + "get": { + "tags": [ + "Image" + ], + "summary": "Get artist image by name.", + "operationId": "GetArtistImage", + "parameters": [ + { + "name": "name", + "in": "path", + "description": "Artist name.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "imageType", + "in": "path", + "description": "Image type.", + "required": true, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ImageType" + } + ], + "description": "Enum ImageType." + } + }, + { + "name": "tag", + "in": "query", + "description": "Optional. Supply the cache tag from the item object to receive strong caching headers.", + "schema": { + "type": "string" + } + }, + { + "name": "format", + "in": "query", + "description": "Determines the output format of the image - original,gif,jpg,png.", + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ImageFormat" + } + ] + } + }, + { + "name": "maxWidth", + "in": "query", + "description": "The maximum image width to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxHeight", + "in": "query", + "description": "The maximum image height to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "percentPlayed", + "in": "query", + "description": "Optional. Percent to render for the percent played overlay.", + "schema": { + "type": "number", + "format": "double" + } + }, + { + "name": "unplayedCount", + "in": "query", + "description": "Optional. Unplayed count overlay to render.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "width", + "in": "query", + "description": "The fixed image width to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "height", + "in": "query", + "description": "The fixed image height to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "quality", + "in": "query", + "description": "Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "fillWidth", + "in": "query", + "description": "Width of box to fill.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "fillHeight", + "in": "query", + "description": "Height of box to fill.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "cropWhitespace", + "in": "query", + "description": "Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art.", + "deprecated": true, + "schema": { + "type": "boolean" + } + }, + { + "name": "addPlayedIndicator", + "in": "query", + "description": "Optional. Add a played indicator.", + "schema": { + "type": "boolean" + } + }, + { + "name": "blur", + "in": "query", + "description": "Optional. Blur image.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "backgroundColor", + "in": "query", + "description": "Optional. Apply a background color for transparent images.", + "schema": { + "type": "string" + } + }, + { + "name": "foregroundLayer", + "in": "query", + "description": "Optional. Apply a foreground layer on top of the image.", + "schema": { + "type": "string" + } + }, + { + "name": "imageIndex", + "in": "path", + "description": "Image index.", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "Image stream returned.", + "content": { + "image/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "404": { + "description": "Item not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + } + }, + "head": { + "tags": [ + "Image" + ], + "summary": "Get artist image by name.", + "operationId": "HeadArtistImage", + "parameters": [ + { + "name": "name", + "in": "path", + "description": "Artist name.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "imageType", + "in": "path", + "description": "Image type.", + "required": true, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ImageType" + } + ], + "description": "Enum ImageType." + } + }, + { + "name": "tag", + "in": "query", + "description": "Optional. Supply the cache tag from the item object to receive strong caching headers.", + "schema": { + "type": "string" + } + }, + { + "name": "format", + "in": "query", + "description": "Determines the output format of the image - original,gif,jpg,png.", + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ImageFormat" + } + ] + } + }, + { + "name": "maxWidth", + "in": "query", + "description": "The maximum image width to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxHeight", + "in": "query", + "description": "The maximum image height to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "percentPlayed", + "in": "query", + "description": "Optional. Percent to render for the percent played overlay.", + "schema": { + "type": "number", + "format": "double" + } + }, + { + "name": "unplayedCount", + "in": "query", + "description": "Optional. Unplayed count overlay to render.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "width", + "in": "query", + "description": "The fixed image width to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "height", + "in": "query", + "description": "The fixed image height to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "quality", + "in": "query", + "description": "Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "fillWidth", + "in": "query", + "description": "Width of box to fill.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "fillHeight", + "in": "query", + "description": "Height of box to fill.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "cropWhitespace", + "in": "query", + "description": "Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art.", + "deprecated": true, + "schema": { + "type": "boolean" + } + }, + { + "name": "addPlayedIndicator", + "in": "query", + "description": "Optional. Add a played indicator.", + "schema": { + "type": "boolean" + } + }, + { + "name": "blur", + "in": "query", + "description": "Optional. Blur image.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "backgroundColor", + "in": "query", + "description": "Optional. Apply a background color for transparent images.", + "schema": { + "type": "string" + } + }, + { + "name": "foregroundLayer", + "in": "query", + "description": "Optional. Apply a foreground layer on top of the image.", + "schema": { + "type": "string" + } + }, + { + "name": "imageIndex", + "in": "path", + "description": "Image index.", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "Image stream returned.", + "content": { + "image/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "404": { + "description": "Item not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + } + } + }, + "/Branding/Splashscreen": { + "get": { + "tags": [ + "Image" + ], + "summary": "Generates or gets the splashscreen.", + "operationId": "GetSplashscreen", + "parameters": [ + { + "name": "tag", + "in": "query", + "description": "Supply the cache tag from the item object to receive strong caching headers.", + "schema": { + "type": "string" + } + }, + { + "name": "format", + "in": "query", + "description": "Determines the output format of the image - original,gif,jpg,png.", + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ImageFormat" + } + ] + } + }, + { + "name": "maxWidth", + "in": "query", + "description": "The maximum image width to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxHeight", + "in": "query", + "description": "The maximum image height to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "width", + "in": "query", + "description": "The fixed image width to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "height", + "in": "query", + "description": "The fixed image height to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "fillWidth", + "in": "query", + "description": "Width of box to fill.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "fillHeight", + "in": "query", + "description": "Height of box to fill.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "blur", + "in": "query", + "description": "Blur image.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "backgroundColor", + "in": "query", + "description": "Apply a background color for transparent images.", + "schema": { + "type": "string" + } + }, + { + "name": "foregroundLayer", + "in": "query", + "description": "Apply a foreground layer on top of the image.", + "schema": { + "type": "string" + } + }, + { + "name": "quality", + "in": "query", + "description": "Quality setting, from 0-100.", + "schema": { + "maximum": 100, + "minimum": 0, + "type": "integer", + "format": "int32", + "default": 90 + } + } + ], + "responses": { + "200": { + "description": "Splashscreen returned successfully.", + "content": { + "image/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + }, + "post": { + "tags": [ + "Image" + ], + "summary": "Uploads a custom splashscreen.\r\nThe body is expected to the image contents base64 encoded.", + "operationId": "UploadCustomSplashscreen", + "requestBody": { + "content": { + "image/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "responses": { + "204": { + "description": "Successfully uploaded new splashscreen." + }, + "400": { + "description": "Error reading MimeType from uploaded image.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "403": { + "description": "User does not have permission to upload splashscreen..", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "CustomAuthentication": [ + "RequiresElevation" + ] + } + ] + }, + "delete": { + "tags": [ + "Image" + ], + "summary": "Delete a custom splashscreen.", + "operationId": "DeleteCustomSplashscreen", + "responses": { + "204": { + "description": "Successfully deleted the custom splashscreen." + }, + "403": { + "description": "User does not have permission to delete splashscreen.." + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "CustomAuthentication": [ + "RequiresElevation" + ] + } + ] + } + }, + "/Genres/{name}/Images/{imageType}": { + "get": { + "tags": [ + "Image" + ], + "summary": "Get genre image by name.", + "operationId": "GetGenreImage", + "parameters": [ + { + "name": "name", + "in": "path", + "description": "Genre name.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "imageType", + "in": "path", + "description": "Image type.", + "required": true, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ImageType" + } + ], + "description": "Enum ImageType." + } + }, + { + "name": "tag", + "in": "query", + "description": "Optional. Supply the cache tag from the item object to receive strong caching headers.", + "schema": { + "type": "string" + } + }, + { + "name": "format", + "in": "query", + "description": "Determines the output format of the image - original,gif,jpg,png.", + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ImageFormat" + } + ] + } + }, + { + "name": "maxWidth", + "in": "query", + "description": "The maximum image width to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxHeight", + "in": "query", + "description": "The maximum image height to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "percentPlayed", + "in": "query", + "description": "Optional. Percent to render for the percent played overlay.", + "schema": { + "type": "number", + "format": "double" + } + }, + { + "name": "unplayedCount", + "in": "query", + "description": "Optional. Unplayed count overlay to render.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "width", + "in": "query", + "description": "The fixed image width to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "height", + "in": "query", + "description": "The fixed image height to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "quality", + "in": "query", + "description": "Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "fillWidth", + "in": "query", + "description": "Width of box to fill.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "fillHeight", + "in": "query", + "description": "Height of box to fill.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "cropWhitespace", + "in": "query", + "description": "Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art.", + "deprecated": true, + "schema": { + "type": "boolean" + } + }, + { + "name": "addPlayedIndicator", + "in": "query", + "description": "Optional. Add a played indicator.", + "schema": { + "type": "boolean" + } + }, + { + "name": "blur", + "in": "query", + "description": "Optional. Blur image.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "backgroundColor", + "in": "query", + "description": "Optional. Apply a background color for transparent images.", + "schema": { + "type": "string" + } + }, + { + "name": "foregroundLayer", + "in": "query", + "description": "Optional. Apply a foreground layer on top of the image.", + "schema": { + "type": "string" + } + }, + { + "name": "imageIndex", + "in": "query", + "description": "Image index.", + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "Image stream returned.", + "content": { + "image/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "404": { + "description": "Item not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + } + }, + "head": { + "tags": [ + "Image" + ], + "summary": "Get genre image by name.", + "operationId": "HeadGenreImage", + "parameters": [ + { + "name": "name", + "in": "path", + "description": "Genre name.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "imageType", + "in": "path", + "description": "Image type.", + "required": true, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ImageType" + } + ], + "description": "Enum ImageType." + } + }, + { + "name": "tag", + "in": "query", + "description": "Optional. Supply the cache tag from the item object to receive strong caching headers.", + "schema": { + "type": "string" + } + }, + { + "name": "format", + "in": "query", + "description": "Determines the output format of the image - original,gif,jpg,png.", + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ImageFormat" + } + ] + } + }, + { + "name": "maxWidth", + "in": "query", + "description": "The maximum image width to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxHeight", + "in": "query", + "description": "The maximum image height to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "percentPlayed", + "in": "query", + "description": "Optional. Percent to render for the percent played overlay.", + "schema": { + "type": "number", + "format": "double" + } + }, + { + "name": "unplayedCount", + "in": "query", + "description": "Optional. Unplayed count overlay to render.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "width", + "in": "query", + "description": "The fixed image width to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "height", + "in": "query", + "description": "The fixed image height to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "quality", + "in": "query", + "description": "Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "fillWidth", + "in": "query", + "description": "Width of box to fill.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "fillHeight", + "in": "query", + "description": "Height of box to fill.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "cropWhitespace", + "in": "query", + "description": "Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art.", + "deprecated": true, + "schema": { + "type": "boolean" + } + }, + { + "name": "addPlayedIndicator", + "in": "query", + "description": "Optional. Add a played indicator.", + "schema": { + "type": "boolean" + } + }, + { + "name": "blur", + "in": "query", + "description": "Optional. Blur image.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "backgroundColor", + "in": "query", + "description": "Optional. Apply a background color for transparent images.", + "schema": { + "type": "string" + } + }, + { + "name": "foregroundLayer", + "in": "query", + "description": "Optional. Apply a foreground layer on top of the image.", + "schema": { + "type": "string" + } + }, + { + "name": "imageIndex", + "in": "query", + "description": "Image index.", + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "Image stream returned.", + "content": { + "image/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "404": { + "description": "Item not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + } + } + }, + "/Genres/{name}/Images/{imageType}/{imageIndex}": { + "get": { + "tags": [ + "Image" + ], + "summary": "Get genre image by name.", + "operationId": "GetGenreImageByIndex", + "parameters": [ + { + "name": "name", + "in": "path", + "description": "Genre name.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "imageType", + "in": "path", + "description": "Image type.", + "required": true, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ImageType" + } + ], + "description": "Enum ImageType." + } + }, + { + "name": "imageIndex", + "in": "path", + "description": "Image index.", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "tag", + "in": "query", + "description": "Optional. Supply the cache tag from the item object to receive strong caching headers.", + "schema": { + "type": "string" + } + }, + { + "name": "format", + "in": "query", + "description": "Determines the output format of the image - original,gif,jpg,png.", + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ImageFormat" + } + ] + } + }, + { + "name": "maxWidth", + "in": "query", + "description": "The maximum image width to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxHeight", + "in": "query", + "description": "The maximum image height to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "percentPlayed", + "in": "query", + "description": "Optional. Percent to render for the percent played overlay.", + "schema": { + "type": "number", + "format": "double" + } + }, + { + "name": "unplayedCount", + "in": "query", + "description": "Optional. Unplayed count overlay to render.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "width", + "in": "query", + "description": "The fixed image width to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "height", + "in": "query", + "description": "The fixed image height to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "quality", + "in": "query", + "description": "Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "fillWidth", + "in": "query", + "description": "Width of box to fill.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "fillHeight", + "in": "query", + "description": "Height of box to fill.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "cropWhitespace", + "in": "query", + "description": "Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art.", + "deprecated": true, + "schema": { + "type": "boolean" + } + }, + { + "name": "addPlayedIndicator", + "in": "query", + "description": "Optional. Add a played indicator.", + "schema": { + "type": "boolean" + } + }, + { + "name": "blur", + "in": "query", + "description": "Optional. Blur image.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "backgroundColor", + "in": "query", + "description": "Optional. Apply a background color for transparent images.", + "schema": { + "type": "string" + } + }, + { + "name": "foregroundLayer", + "in": "query", + "description": "Optional. Apply a foreground layer on top of the image.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Image stream returned.", + "content": { + "image/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "404": { + "description": "Item not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + } + }, + "head": { + "tags": [ + "Image" + ], + "summary": "Get genre image by name.", + "operationId": "HeadGenreImageByIndex", + "parameters": [ + { + "name": "name", + "in": "path", + "description": "Genre name.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "imageType", + "in": "path", + "description": "Image type.", + "required": true, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ImageType" + } + ], + "description": "Enum ImageType." + } + }, + { + "name": "imageIndex", + "in": "path", + "description": "Image index.", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "tag", + "in": "query", + "description": "Optional. Supply the cache tag from the item object to receive strong caching headers.", + "schema": { + "type": "string" + } + }, + { + "name": "format", + "in": "query", + "description": "Determines the output format of the image - original,gif,jpg,png.", + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ImageFormat" + } + ] + } + }, + { + "name": "maxWidth", + "in": "query", + "description": "The maximum image width to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxHeight", + "in": "query", + "description": "The maximum image height to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "percentPlayed", + "in": "query", + "description": "Optional. Percent to render for the percent played overlay.", + "schema": { + "type": "number", + "format": "double" + } + }, + { + "name": "unplayedCount", + "in": "query", + "description": "Optional. Unplayed count overlay to render.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "width", + "in": "query", + "description": "The fixed image width to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "height", + "in": "query", + "description": "The fixed image height to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "quality", + "in": "query", + "description": "Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "fillWidth", + "in": "query", + "description": "Width of box to fill.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "fillHeight", + "in": "query", + "description": "Height of box to fill.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "cropWhitespace", + "in": "query", + "description": "Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art.", + "deprecated": true, + "schema": { + "type": "boolean" + } + }, + { + "name": "addPlayedIndicator", + "in": "query", + "description": "Optional. Add a played indicator.", + "schema": { + "type": "boolean" + } + }, + { + "name": "blur", + "in": "query", + "description": "Optional. Blur image.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "backgroundColor", + "in": "query", + "description": "Optional. Apply a background color for transparent images.", + "schema": { + "type": "string" + } + }, + { + "name": "foregroundLayer", + "in": "query", + "description": "Optional. Apply a foreground layer on top of the image.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Image stream returned.", + "content": { + "image/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "404": { + "description": "Item not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + } + } + }, + "/Items/{itemId}/Images": { + "get": { + "tags": [ + "Image" + ], + "summary": "Get item image infos.", + "operationId": "GetItemImageInfos", + "parameters": [ + { + "name": "itemId", + "in": "path", + "description": "Item id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Item images returned.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ImageInfo" + } + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ImageInfo" + } + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ImageInfo" + } + } + } + } + }, + "404": { + "description": "Item not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Items/{itemId}/Images/{imageType}": { + "delete": { + "tags": [ + "Image" + ], + "summary": "Delete an item's image.", + "operationId": "DeleteItemImage", + "parameters": [ + { + "name": "itemId", + "in": "path", + "description": "Item id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "imageType", + "in": "path", + "description": "Image type.", + "required": true, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ImageType" + } + ], + "description": "Enum ImageType." + } + }, + { + "name": "imageIndex", + "in": "query", + "description": "The image index.", + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "204": { + "description": "Image deleted." + }, + "404": { + "description": "Item not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "RequiresElevation" + ] + } + ] + }, + "post": { + "tags": [ + "Image" + ], + "summary": "Set item image.", + "operationId": "SetItemImage", + "parameters": [ + { + "name": "itemId", + "in": "path", + "description": "Item id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "imageType", + "in": "path", + "description": "Image type.", + "required": true, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ImageType" + } + ], + "description": "Enum ImageType." + } + } + ], + "requestBody": { + "content": { + "image/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "responses": { + "204": { + "description": "Image saved." + }, + "404": { + "description": "Item not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "RequiresElevation" + ] + } + ] + }, + "get": { + "tags": [ + "Image" + ], + "summary": "Gets the item's image.", + "operationId": "GetItemImage", + "parameters": [ + { + "name": "itemId", + "in": "path", + "description": "Item id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "imageType", + "in": "path", + "description": "Image type.", + "required": true, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ImageType" + } + ], + "description": "Enum ImageType." + } + }, + { + "name": "maxWidth", + "in": "query", + "description": "The maximum image width to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxHeight", + "in": "query", + "description": "The maximum image height to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "width", + "in": "query", + "description": "The fixed image width to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "height", + "in": "query", + "description": "The fixed image height to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "quality", + "in": "query", + "description": "Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "fillWidth", + "in": "query", + "description": "Width of box to fill.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "fillHeight", + "in": "query", + "description": "Height of box to fill.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "tag", + "in": "query", + "description": "Optional. Supply the cache tag from the item object to receive strong caching headers.", + "schema": { + "type": "string" + } + }, + { + "name": "cropWhitespace", + "in": "query", + "description": "Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art.", + "deprecated": true, + "schema": { + "type": "boolean" + } + }, + { + "name": "format", + "in": "query", + "description": "Optional. The MediaBrowser.Model.Drawing.ImageFormat of the returned image.", + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ImageFormat" + } + ] + } + }, + { + "name": "addPlayedIndicator", + "in": "query", + "description": "Optional. Add a played indicator.", + "schema": { + "type": "boolean" + } + }, + { + "name": "percentPlayed", + "in": "query", + "description": "Optional. Percent to render for the percent played overlay.", + "schema": { + "type": "number", + "format": "double" + } + }, + { + "name": "unplayedCount", + "in": "query", + "description": "Optional. Unplayed count overlay to render.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "blur", + "in": "query", + "description": "Optional. Blur image.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "backgroundColor", + "in": "query", + "description": "Optional. Apply a background color for transparent images.", + "schema": { + "type": "string" + } + }, + { + "name": "foregroundLayer", + "in": "query", + "description": "Optional. Apply a foreground layer on top of the image.", + "schema": { + "type": "string" + } + }, + { + "name": "imageIndex", + "in": "query", + "description": "Image index.", + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "Image stream returned.", + "content": { + "image/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "404": { + "description": "Item not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + } + }, + "head": { + "tags": [ + "Image" + ], + "summary": "Gets the item's image.", + "operationId": "HeadItemImage", + "parameters": [ + { + "name": "itemId", + "in": "path", + "description": "Item id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "imageType", + "in": "path", + "description": "Image type.", + "required": true, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ImageType" + } + ], + "description": "Enum ImageType." + } + }, + { + "name": "maxWidth", + "in": "query", + "description": "The maximum image width to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxHeight", + "in": "query", + "description": "The maximum image height to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "width", + "in": "query", + "description": "The fixed image width to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "height", + "in": "query", + "description": "The fixed image height to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "quality", + "in": "query", + "description": "Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "fillWidth", + "in": "query", + "description": "Width of box to fill.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "fillHeight", + "in": "query", + "description": "Height of box to fill.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "tag", + "in": "query", + "description": "Optional. Supply the cache tag from the item object to receive strong caching headers.", + "schema": { + "type": "string" + } + }, + { + "name": "cropWhitespace", + "in": "query", + "description": "Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art.", + "deprecated": true, + "schema": { + "type": "boolean" + } + }, + { + "name": "format", + "in": "query", + "description": "Optional. The MediaBrowser.Model.Drawing.ImageFormat of the returned image.", + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ImageFormat" + } + ] + } + }, + { + "name": "addPlayedIndicator", + "in": "query", + "description": "Optional. Add a played indicator.", + "schema": { + "type": "boolean" + } + }, + { + "name": "percentPlayed", + "in": "query", + "description": "Optional. Percent to render for the percent played overlay.", + "schema": { + "type": "number", + "format": "double" + } + }, + { + "name": "unplayedCount", + "in": "query", + "description": "Optional. Unplayed count overlay to render.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "blur", + "in": "query", + "description": "Optional. Blur image.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "backgroundColor", + "in": "query", + "description": "Optional. Apply a background color for transparent images.", + "schema": { + "type": "string" + } + }, + { + "name": "foregroundLayer", + "in": "query", + "description": "Optional. Apply a foreground layer on top of the image.", + "schema": { + "type": "string" + } + }, + { + "name": "imageIndex", + "in": "query", + "description": "Image index.", + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "Image stream returned.", + "content": { + "image/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "404": { + "description": "Item not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + } + } + }, + "/Items/{itemId}/Images/{imageType}/{imageIndex}": { + "delete": { + "tags": [ + "Image" + ], + "summary": "Delete an item's image.", + "operationId": "DeleteItemImageByIndex", + "parameters": [ + { + "name": "itemId", + "in": "path", + "description": "Item id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "imageType", + "in": "path", + "description": "Image type.", + "required": true, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ImageType" + } + ], + "description": "Enum ImageType." + } + }, + { + "name": "imageIndex", + "in": "path", + "description": "The image index.", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "204": { + "description": "Image deleted." + }, + "404": { + "description": "Item not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "RequiresElevation" + ] + } + ] + }, + "post": { + "tags": [ + "Image" + ], + "summary": "Set item image.", + "operationId": "SetItemImageByIndex", + "parameters": [ + { + "name": "itemId", + "in": "path", + "description": "Item id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "imageType", + "in": "path", + "description": "Image type.", + "required": true, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ImageType" + } + ], + "description": "Enum ImageType." + } + }, + { + "name": "imageIndex", + "in": "path", + "description": "(Unused) Image index.", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "requestBody": { + "content": { + "image/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "responses": { + "204": { + "description": "Image saved." + }, + "404": { + "description": "Item not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "RequiresElevation" + ] + } + ] + }, + "get": { + "tags": [ + "Image" + ], + "summary": "Gets the item's image.", + "operationId": "GetItemImageByIndex", + "parameters": [ + { + "name": "itemId", + "in": "path", + "description": "Item id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "imageType", + "in": "path", + "description": "Image type.", + "required": true, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ImageType" + } + ], + "description": "Enum ImageType." + } + }, + { + "name": "imageIndex", + "in": "path", + "description": "Image index.", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxWidth", + "in": "query", + "description": "The maximum image width to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxHeight", + "in": "query", + "description": "The maximum image height to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "width", + "in": "query", + "description": "The fixed image width to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "height", + "in": "query", + "description": "The fixed image height to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "quality", + "in": "query", + "description": "Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "fillWidth", + "in": "query", + "description": "Width of box to fill.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "fillHeight", + "in": "query", + "description": "Height of box to fill.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "tag", + "in": "query", + "description": "Optional. Supply the cache tag from the item object to receive strong caching headers.", + "schema": { + "type": "string" + } + }, + { + "name": "cropWhitespace", + "in": "query", + "description": "Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art.", + "deprecated": true, + "schema": { + "type": "boolean" + } + }, + { + "name": "format", + "in": "query", + "description": "Optional. The MediaBrowser.Model.Drawing.ImageFormat of the returned image.", + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ImageFormat" + } + ] + } + }, + { + "name": "addPlayedIndicator", + "in": "query", + "description": "Optional. Add a played indicator.", + "schema": { + "type": "boolean" + } + }, + { + "name": "percentPlayed", + "in": "query", + "description": "Optional. Percent to render for the percent played overlay.", + "schema": { + "type": "number", + "format": "double" + } + }, + { + "name": "unplayedCount", + "in": "query", + "description": "Optional. Unplayed count overlay to render.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "blur", + "in": "query", + "description": "Optional. Blur image.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "backgroundColor", + "in": "query", + "description": "Optional. Apply a background color for transparent images.", + "schema": { + "type": "string" + } + }, + { + "name": "foregroundLayer", + "in": "query", + "description": "Optional. Apply a foreground layer on top of the image.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Image stream returned.", + "content": { + "image/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "404": { + "description": "Item not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + } + }, + "head": { + "tags": [ + "Image" + ], + "summary": "Gets the item's image.", + "operationId": "HeadItemImageByIndex", + "parameters": [ + { + "name": "itemId", + "in": "path", + "description": "Item id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "imageType", + "in": "path", + "description": "Image type.", + "required": true, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ImageType" + } + ], + "description": "Enum ImageType." + } + }, + { + "name": "imageIndex", + "in": "path", + "description": "Image index.", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxWidth", + "in": "query", + "description": "The maximum image width to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxHeight", + "in": "query", + "description": "The maximum image height to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "width", + "in": "query", + "description": "The fixed image width to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "height", + "in": "query", + "description": "The fixed image height to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "quality", + "in": "query", + "description": "Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "fillWidth", + "in": "query", + "description": "Width of box to fill.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "fillHeight", + "in": "query", + "description": "Height of box to fill.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "tag", + "in": "query", + "description": "Optional. Supply the cache tag from the item object to receive strong caching headers.", + "schema": { + "type": "string" + } + }, + { + "name": "cropWhitespace", + "in": "query", + "description": "Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art.", + "deprecated": true, + "schema": { + "type": "boolean" + } + }, + { + "name": "format", + "in": "query", + "description": "Optional. The MediaBrowser.Model.Drawing.ImageFormat of the returned image.", + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ImageFormat" + } + ] + } + }, + { + "name": "addPlayedIndicator", + "in": "query", + "description": "Optional. Add a played indicator.", + "schema": { + "type": "boolean" + } + }, + { + "name": "percentPlayed", + "in": "query", + "description": "Optional. Percent to render for the percent played overlay.", + "schema": { + "type": "number", + "format": "double" + } + }, + { + "name": "unplayedCount", + "in": "query", + "description": "Optional. Unplayed count overlay to render.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "blur", + "in": "query", + "description": "Optional. Blur image.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "backgroundColor", + "in": "query", + "description": "Optional. Apply a background color for transparent images.", + "schema": { + "type": "string" + } + }, + { + "name": "foregroundLayer", + "in": "query", + "description": "Optional. Apply a foreground layer on top of the image.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Image stream returned.", + "content": { + "image/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "404": { + "description": "Item not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + } + } + }, + "/Items/{itemId}/Images/{imageType}/{imageIndex}/{tag}/{format}/{maxWidth}/{maxHeight}/{percentPlayed}/{unplayedCount}": { + "get": { + "tags": [ + "Image" + ], + "summary": "Gets the item's image.", + "operationId": "GetItemImage2", + "parameters": [ + { + "name": "itemId", + "in": "path", + "description": "Item id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "imageType", + "in": "path", + "description": "Image type.", + "required": true, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ImageType" + } + ], + "description": "Enum ImageType." + } + }, + { + "name": "maxWidth", + "in": "path", + "description": "The maximum image width to return.", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxHeight", + "in": "path", + "description": "The maximum image height to return.", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "width", + "in": "query", + "description": "The fixed image width to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "height", + "in": "query", + "description": "The fixed image height to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "quality", + "in": "query", + "description": "Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "fillWidth", + "in": "query", + "description": "Width of box to fill.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "fillHeight", + "in": "query", + "description": "Height of box to fill.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "tag", + "in": "path", + "description": "Optional. Supply the cache tag from the item object to receive strong caching headers.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "cropWhitespace", + "in": "query", + "description": "Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art.", + "deprecated": true, + "schema": { + "type": "boolean" + } + }, + { + "name": "format", + "in": "path", + "description": "Determines the output format of the image - original,gif,jpg,png.", + "required": true, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ImageFormat" + } + ], + "description": "Enum ImageOutputFormat." + } + }, + { + "name": "addPlayedIndicator", + "in": "query", + "description": "Optional. Add a played indicator.", + "schema": { + "type": "boolean" + } + }, + { + "name": "percentPlayed", + "in": "path", + "description": "Optional. Percent to render for the percent played overlay.", + "required": true, + "schema": { + "type": "number", + "format": "double" + } + }, + { + "name": "unplayedCount", + "in": "path", + "description": "Optional. Unplayed count overlay to render.", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "blur", + "in": "query", + "description": "Optional. Blur image.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "backgroundColor", + "in": "query", + "description": "Optional. Apply a background color for transparent images.", + "schema": { + "type": "string" + } + }, + { + "name": "foregroundLayer", + "in": "query", + "description": "Optional. Apply a foreground layer on top of the image.", + "schema": { + "type": "string" + } + }, + { + "name": "imageIndex", + "in": "path", + "description": "Image index.", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "Image stream returned.", + "content": { + "image/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "404": { + "description": "Item not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + } + }, + "head": { + "tags": [ + "Image" + ], + "summary": "Gets the item's image.", + "operationId": "HeadItemImage2", + "parameters": [ + { + "name": "itemId", + "in": "path", + "description": "Item id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "imageType", + "in": "path", + "description": "Image type.", + "required": true, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ImageType" + } + ], + "description": "Enum ImageType." + } + }, + { + "name": "maxWidth", + "in": "path", + "description": "The maximum image width to return.", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxHeight", + "in": "path", + "description": "The maximum image height to return.", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "width", + "in": "query", + "description": "The fixed image width to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "height", + "in": "query", + "description": "The fixed image height to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "quality", + "in": "query", + "description": "Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "fillWidth", + "in": "query", + "description": "Width of box to fill.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "fillHeight", + "in": "query", + "description": "Height of box to fill.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "tag", + "in": "path", + "description": "Optional. Supply the cache tag from the item object to receive strong caching headers.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "cropWhitespace", + "in": "query", + "description": "Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art.", + "deprecated": true, + "schema": { + "type": "boolean" + } + }, + { + "name": "format", + "in": "path", + "description": "Determines the output format of the image - original,gif,jpg,png.", + "required": true, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ImageFormat" + } + ], + "description": "Enum ImageOutputFormat." + } + }, + { + "name": "addPlayedIndicator", + "in": "query", + "description": "Optional. Add a played indicator.", + "schema": { + "type": "boolean" + } + }, + { + "name": "percentPlayed", + "in": "path", + "description": "Optional. Percent to render for the percent played overlay.", + "required": true, + "schema": { + "type": "number", + "format": "double" + } + }, + { + "name": "unplayedCount", + "in": "path", + "description": "Optional. Unplayed count overlay to render.", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "blur", + "in": "query", + "description": "Optional. Blur image.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "backgroundColor", + "in": "query", + "description": "Optional. Apply a background color for transparent images.", + "schema": { + "type": "string" + } + }, + { + "name": "foregroundLayer", + "in": "query", + "description": "Optional. Apply a foreground layer on top of the image.", + "schema": { + "type": "string" + } + }, + { + "name": "imageIndex", + "in": "path", + "description": "Image index.", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "Image stream returned.", + "content": { + "image/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "404": { + "description": "Item not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + } + } + }, + "/Items/{itemId}/Images/{imageType}/{imageIndex}/Index": { + "post": { + "tags": [ + "Image" + ], + "summary": "Updates the index for an item image.", + "operationId": "UpdateItemImageIndex", + "parameters": [ + { + "name": "itemId", + "in": "path", + "description": "Item id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "imageType", + "in": "path", + "description": "Image type.", + "required": true, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ImageType" + } + ], + "description": "Enum ImageType." + } + }, + { + "name": "imageIndex", + "in": "path", + "description": "Old image index.", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "newIndex", + "in": "query", + "description": "New image index.", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "204": { + "description": "Image index updated." + }, + "404": { + "description": "Item not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "RequiresElevation" + ] + } + ] + } + }, + "/MusicGenres/{name}/Images/{imageType}": { + "get": { + "tags": [ + "Image" + ], + "summary": "Get music genre image by name.", + "operationId": "GetMusicGenreImage", + "parameters": [ + { + "name": "name", + "in": "path", + "description": "Music genre name.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "imageType", + "in": "path", + "description": "Image type.", + "required": true, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ImageType" + } + ], + "description": "Enum ImageType." + } + }, + { + "name": "tag", + "in": "query", + "description": "Optional. Supply the cache tag from the item object to receive strong caching headers.", + "schema": { + "type": "string" + } + }, + { + "name": "format", + "in": "query", + "description": "Determines the output format of the image - original,gif,jpg,png.", + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ImageFormat" + } + ] + } + }, + { + "name": "maxWidth", + "in": "query", + "description": "The maximum image width to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxHeight", + "in": "query", + "description": "The maximum image height to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "percentPlayed", + "in": "query", + "description": "Optional. Percent to render for the percent played overlay.", + "schema": { + "type": "number", + "format": "double" + } + }, + { + "name": "unplayedCount", + "in": "query", + "description": "Optional. Unplayed count overlay to render.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "width", + "in": "query", + "description": "The fixed image width to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "height", + "in": "query", + "description": "The fixed image height to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "quality", + "in": "query", + "description": "Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "fillWidth", + "in": "query", + "description": "Width of box to fill.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "fillHeight", + "in": "query", + "description": "Height of box to fill.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "cropWhitespace", + "in": "query", + "description": "Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art.", + "deprecated": true, + "schema": { + "type": "boolean" + } + }, + { + "name": "addPlayedIndicator", + "in": "query", + "description": "Optional. Add a played indicator.", + "schema": { + "type": "boolean" + } + }, + { + "name": "blur", + "in": "query", + "description": "Optional. Blur image.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "backgroundColor", + "in": "query", + "description": "Optional. Apply a background color for transparent images.", + "schema": { + "type": "string" + } + }, + { + "name": "foregroundLayer", + "in": "query", + "description": "Optional. Apply a foreground layer on top of the image.", + "schema": { + "type": "string" + } + }, + { + "name": "imageIndex", + "in": "query", + "description": "Image index.", + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "Image stream returned.", + "content": { + "image/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "404": { + "description": "Item not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + } + }, + "head": { + "tags": [ + "Image" + ], + "summary": "Get music genre image by name.", + "operationId": "HeadMusicGenreImage", + "parameters": [ + { + "name": "name", + "in": "path", + "description": "Music genre name.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "imageType", + "in": "path", + "description": "Image type.", + "required": true, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ImageType" + } + ], + "description": "Enum ImageType." + } + }, + { + "name": "tag", + "in": "query", + "description": "Optional. Supply the cache tag from the item object to receive strong caching headers.", + "schema": { + "type": "string" + } + }, + { + "name": "format", + "in": "query", + "description": "Determines the output format of the image - original,gif,jpg,png.", + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ImageFormat" + } + ] + } + }, + { + "name": "maxWidth", + "in": "query", + "description": "The maximum image width to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxHeight", + "in": "query", + "description": "The maximum image height to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "percentPlayed", + "in": "query", + "description": "Optional. Percent to render for the percent played overlay.", + "schema": { + "type": "number", + "format": "double" + } + }, + { + "name": "unplayedCount", + "in": "query", + "description": "Optional. Unplayed count overlay to render.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "width", + "in": "query", + "description": "The fixed image width to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "height", + "in": "query", + "description": "The fixed image height to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "quality", + "in": "query", + "description": "Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "fillWidth", + "in": "query", + "description": "Width of box to fill.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "fillHeight", + "in": "query", + "description": "Height of box to fill.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "cropWhitespace", + "in": "query", + "description": "Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art.", + "deprecated": true, + "schema": { + "type": "boolean" + } + }, + { + "name": "addPlayedIndicator", + "in": "query", + "description": "Optional. Add a played indicator.", + "schema": { + "type": "boolean" + } + }, + { + "name": "blur", + "in": "query", + "description": "Optional. Blur image.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "backgroundColor", + "in": "query", + "description": "Optional. Apply a background color for transparent images.", + "schema": { + "type": "string" + } + }, + { + "name": "foregroundLayer", + "in": "query", + "description": "Optional. Apply a foreground layer on top of the image.", + "schema": { + "type": "string" + } + }, + { + "name": "imageIndex", + "in": "query", + "description": "Image index.", + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "Image stream returned.", + "content": { + "image/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "404": { + "description": "Item not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + } + } + }, + "/MusicGenres/{name}/Images/{imageType}/{imageIndex}": { + "get": { + "tags": [ + "Image" + ], + "summary": "Get music genre image by name.", + "operationId": "GetMusicGenreImageByIndex", + "parameters": [ + { + "name": "name", + "in": "path", + "description": "Music genre name.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "imageType", + "in": "path", + "description": "Image type.", + "required": true, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ImageType" + } + ], + "description": "Enum ImageType." + } + }, + { + "name": "imageIndex", + "in": "path", + "description": "Image index.", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "tag", + "in": "query", + "description": "Optional. Supply the cache tag from the item object to receive strong caching headers.", + "schema": { + "type": "string" + } + }, + { + "name": "format", + "in": "query", + "description": "Determines the output format of the image - original,gif,jpg,png.", + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ImageFormat" + } + ] + } + }, + { + "name": "maxWidth", + "in": "query", + "description": "The maximum image width to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxHeight", + "in": "query", + "description": "The maximum image height to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "percentPlayed", + "in": "query", + "description": "Optional. Percent to render for the percent played overlay.", + "schema": { + "type": "number", + "format": "double" + } + }, + { + "name": "unplayedCount", + "in": "query", + "description": "Optional. Unplayed count overlay to render.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "width", + "in": "query", + "description": "The fixed image width to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "height", + "in": "query", + "description": "The fixed image height to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "quality", + "in": "query", + "description": "Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "fillWidth", + "in": "query", + "description": "Width of box to fill.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "fillHeight", + "in": "query", + "description": "Height of box to fill.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "cropWhitespace", + "in": "query", + "description": "Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art.", + "deprecated": true, + "schema": { + "type": "boolean" + } + }, + { + "name": "addPlayedIndicator", + "in": "query", + "description": "Optional. Add a played indicator.", + "schema": { + "type": "boolean" + } + }, + { + "name": "blur", + "in": "query", + "description": "Optional. Blur image.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "backgroundColor", + "in": "query", + "description": "Optional. Apply a background color for transparent images.", + "schema": { + "type": "string" + } + }, + { + "name": "foregroundLayer", + "in": "query", + "description": "Optional. Apply a foreground layer on top of the image.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Image stream returned.", + "content": { + "image/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "404": { + "description": "Item not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + } + }, + "head": { + "tags": [ + "Image" + ], + "summary": "Get music genre image by name.", + "operationId": "HeadMusicGenreImageByIndex", + "parameters": [ + { + "name": "name", + "in": "path", + "description": "Music genre name.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "imageType", + "in": "path", + "description": "Image type.", + "required": true, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ImageType" + } + ], + "description": "Enum ImageType." + } + }, + { + "name": "imageIndex", + "in": "path", + "description": "Image index.", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "tag", + "in": "query", + "description": "Optional. Supply the cache tag from the item object to receive strong caching headers.", + "schema": { + "type": "string" + } + }, + { + "name": "format", + "in": "query", + "description": "Determines the output format of the image - original,gif,jpg,png.", + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ImageFormat" + } + ] + } + }, + { + "name": "maxWidth", + "in": "query", + "description": "The maximum image width to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxHeight", + "in": "query", + "description": "The maximum image height to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "percentPlayed", + "in": "query", + "description": "Optional. Percent to render for the percent played overlay.", + "schema": { + "type": "number", + "format": "double" + } + }, + { + "name": "unplayedCount", + "in": "query", + "description": "Optional. Unplayed count overlay to render.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "width", + "in": "query", + "description": "The fixed image width to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "height", + "in": "query", + "description": "The fixed image height to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "quality", + "in": "query", + "description": "Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "fillWidth", + "in": "query", + "description": "Width of box to fill.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "fillHeight", + "in": "query", + "description": "Height of box to fill.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "cropWhitespace", + "in": "query", + "description": "Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art.", + "deprecated": true, + "schema": { + "type": "boolean" + } + }, + { + "name": "addPlayedIndicator", + "in": "query", + "description": "Optional. Add a played indicator.", + "schema": { + "type": "boolean" + } + }, + { + "name": "blur", + "in": "query", + "description": "Optional. Blur image.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "backgroundColor", + "in": "query", + "description": "Optional. Apply a background color for transparent images.", + "schema": { + "type": "string" + } + }, + { + "name": "foregroundLayer", + "in": "query", + "description": "Optional. Apply a foreground layer on top of the image.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Image stream returned.", + "content": { + "image/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "404": { + "description": "Item not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + } + } + }, + "/Persons/{name}/Images/{imageType}": { + "get": { + "tags": [ + "Image" + ], + "summary": "Get person image by name.", + "operationId": "GetPersonImage", + "parameters": [ + { + "name": "name", + "in": "path", + "description": "Person name.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "imageType", + "in": "path", + "description": "Image type.", + "required": true, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ImageType" + } + ], + "description": "Enum ImageType." + } + }, + { + "name": "tag", + "in": "query", + "description": "Optional. Supply the cache tag from the item object to receive strong caching headers.", + "schema": { + "type": "string" + } + }, + { + "name": "format", + "in": "query", + "description": "Determines the output format of the image - original,gif,jpg,png.", + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ImageFormat" + } + ] + } + }, + { + "name": "maxWidth", + "in": "query", + "description": "The maximum image width to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxHeight", + "in": "query", + "description": "The maximum image height to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "percentPlayed", + "in": "query", + "description": "Optional. Percent to render for the percent played overlay.", + "schema": { + "type": "number", + "format": "double" + } + }, + { + "name": "unplayedCount", + "in": "query", + "description": "Optional. Unplayed count overlay to render.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "width", + "in": "query", + "description": "The fixed image width to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "height", + "in": "query", + "description": "The fixed image height to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "quality", + "in": "query", + "description": "Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "fillWidth", + "in": "query", + "description": "Width of box to fill.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "fillHeight", + "in": "query", + "description": "Height of box to fill.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "cropWhitespace", + "in": "query", + "description": "Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art.", + "deprecated": true, + "schema": { + "type": "boolean" + } + }, + { + "name": "addPlayedIndicator", + "in": "query", + "description": "Optional. Add a played indicator.", + "schema": { + "type": "boolean" + } + }, + { + "name": "blur", + "in": "query", + "description": "Optional. Blur image.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "backgroundColor", + "in": "query", + "description": "Optional. Apply a background color for transparent images.", + "schema": { + "type": "string" + } + }, + { + "name": "foregroundLayer", + "in": "query", + "description": "Optional. Apply a foreground layer on top of the image.", + "schema": { + "type": "string" + } + }, + { + "name": "imageIndex", + "in": "query", + "description": "Image index.", + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "Image stream returned.", + "content": { + "image/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "404": { + "description": "Item not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + } + }, + "head": { + "tags": [ + "Image" + ], + "summary": "Get person image by name.", + "operationId": "HeadPersonImage", + "parameters": [ + { + "name": "name", + "in": "path", + "description": "Person name.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "imageType", + "in": "path", + "description": "Image type.", + "required": true, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ImageType" + } + ], + "description": "Enum ImageType." + } + }, + { + "name": "tag", + "in": "query", + "description": "Optional. Supply the cache tag from the item object to receive strong caching headers.", + "schema": { + "type": "string" + } + }, + { + "name": "format", + "in": "query", + "description": "Determines the output format of the image - original,gif,jpg,png.", + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ImageFormat" + } + ] + } + }, + { + "name": "maxWidth", + "in": "query", + "description": "The maximum image width to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxHeight", + "in": "query", + "description": "The maximum image height to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "percentPlayed", + "in": "query", + "description": "Optional. Percent to render for the percent played overlay.", + "schema": { + "type": "number", + "format": "double" + } + }, + { + "name": "unplayedCount", + "in": "query", + "description": "Optional. Unplayed count overlay to render.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "width", + "in": "query", + "description": "The fixed image width to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "height", + "in": "query", + "description": "The fixed image height to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "quality", + "in": "query", + "description": "Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "fillWidth", + "in": "query", + "description": "Width of box to fill.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "fillHeight", + "in": "query", + "description": "Height of box to fill.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "cropWhitespace", + "in": "query", + "description": "Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art.", + "deprecated": true, + "schema": { + "type": "boolean" + } + }, + { + "name": "addPlayedIndicator", + "in": "query", + "description": "Optional. Add a played indicator.", + "schema": { + "type": "boolean" + } + }, + { + "name": "blur", + "in": "query", + "description": "Optional. Blur image.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "backgroundColor", + "in": "query", + "description": "Optional. Apply a background color for transparent images.", + "schema": { + "type": "string" + } + }, + { + "name": "foregroundLayer", + "in": "query", + "description": "Optional. Apply a foreground layer on top of the image.", + "schema": { + "type": "string" + } + }, + { + "name": "imageIndex", + "in": "query", + "description": "Image index.", + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "Image stream returned.", + "content": { + "image/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "404": { + "description": "Item not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + } + } + }, + "/Persons/{name}/Images/{imageType}/{imageIndex}": { + "get": { + "tags": [ + "Image" + ], + "summary": "Get person image by name.", + "operationId": "GetPersonImageByIndex", + "parameters": [ + { + "name": "name", + "in": "path", + "description": "Person name.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "imageType", + "in": "path", + "description": "Image type.", + "required": true, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ImageType" + } + ], + "description": "Enum ImageType." + } + }, + { + "name": "imageIndex", + "in": "path", + "description": "Image index.", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "tag", + "in": "query", + "description": "Optional. Supply the cache tag from the item object to receive strong caching headers.", + "schema": { + "type": "string" + } + }, + { + "name": "format", + "in": "query", + "description": "Determines the output format of the image - original,gif,jpg,png.", + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ImageFormat" + } + ] + } + }, + { + "name": "maxWidth", + "in": "query", + "description": "The maximum image width to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxHeight", + "in": "query", + "description": "The maximum image height to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "percentPlayed", + "in": "query", + "description": "Optional. Percent to render for the percent played overlay.", + "schema": { + "type": "number", + "format": "double" + } + }, + { + "name": "unplayedCount", + "in": "query", + "description": "Optional. Unplayed count overlay to render.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "width", + "in": "query", + "description": "The fixed image width to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "height", + "in": "query", + "description": "The fixed image height to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "quality", + "in": "query", + "description": "Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "fillWidth", + "in": "query", + "description": "Width of box to fill.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "fillHeight", + "in": "query", + "description": "Height of box to fill.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "cropWhitespace", + "in": "query", + "description": "Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art.", + "deprecated": true, + "schema": { + "type": "boolean" + } + }, + { + "name": "addPlayedIndicator", + "in": "query", + "description": "Optional. Add a played indicator.", + "schema": { + "type": "boolean" + } + }, + { + "name": "blur", + "in": "query", + "description": "Optional. Blur image.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "backgroundColor", + "in": "query", + "description": "Optional. Apply a background color for transparent images.", + "schema": { + "type": "string" + } + }, + { + "name": "foregroundLayer", + "in": "query", + "description": "Optional. Apply a foreground layer on top of the image.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Image stream returned.", + "content": { + "image/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "404": { + "description": "Item not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + } + }, + "head": { + "tags": [ + "Image" + ], + "summary": "Get person image by name.", + "operationId": "HeadPersonImageByIndex", + "parameters": [ + { + "name": "name", + "in": "path", + "description": "Person name.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "imageType", + "in": "path", + "description": "Image type.", + "required": true, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ImageType" + } + ], + "description": "Enum ImageType." + } + }, + { + "name": "imageIndex", + "in": "path", + "description": "Image index.", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "tag", + "in": "query", + "description": "Optional. Supply the cache tag from the item object to receive strong caching headers.", + "schema": { + "type": "string" + } + }, + { + "name": "format", + "in": "query", + "description": "Determines the output format of the image - original,gif,jpg,png.", + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ImageFormat" + } + ] + } + }, + { + "name": "maxWidth", + "in": "query", + "description": "The maximum image width to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxHeight", + "in": "query", + "description": "The maximum image height to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "percentPlayed", + "in": "query", + "description": "Optional. Percent to render for the percent played overlay.", + "schema": { + "type": "number", + "format": "double" + } + }, + { + "name": "unplayedCount", + "in": "query", + "description": "Optional. Unplayed count overlay to render.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "width", + "in": "query", + "description": "The fixed image width to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "height", + "in": "query", + "description": "The fixed image height to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "quality", + "in": "query", + "description": "Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "fillWidth", + "in": "query", + "description": "Width of box to fill.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "fillHeight", + "in": "query", + "description": "Height of box to fill.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "cropWhitespace", + "in": "query", + "description": "Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art.", + "deprecated": true, + "schema": { + "type": "boolean" + } + }, + { + "name": "addPlayedIndicator", + "in": "query", + "description": "Optional. Add a played indicator.", + "schema": { + "type": "boolean" + } + }, + { + "name": "blur", + "in": "query", + "description": "Optional. Blur image.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "backgroundColor", + "in": "query", + "description": "Optional. Apply a background color for transparent images.", + "schema": { + "type": "string" + } + }, + { + "name": "foregroundLayer", + "in": "query", + "description": "Optional. Apply a foreground layer on top of the image.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Image stream returned.", + "content": { + "image/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "404": { + "description": "Item not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + } + } + }, + "/Studios/{name}/Images/{imageType}": { + "get": { + "tags": [ + "Image" + ], + "summary": "Get studio image by name.", + "operationId": "GetStudioImage", + "parameters": [ + { + "name": "name", + "in": "path", + "description": "Studio name.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "imageType", + "in": "path", + "description": "Image type.", + "required": true, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ImageType" + } + ], + "description": "Enum ImageType." + } + }, + { + "name": "tag", + "in": "query", + "description": "Optional. Supply the cache tag from the item object to receive strong caching headers.", + "schema": { + "type": "string" + } + }, + { + "name": "format", + "in": "query", + "description": "Determines the output format of the image - original,gif,jpg,png.", + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ImageFormat" + } + ] + } + }, + { + "name": "maxWidth", + "in": "query", + "description": "The maximum image width to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxHeight", + "in": "query", + "description": "The maximum image height to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "percentPlayed", + "in": "query", + "description": "Optional. Percent to render for the percent played overlay.", + "schema": { + "type": "number", + "format": "double" + } + }, + { + "name": "unplayedCount", + "in": "query", + "description": "Optional. Unplayed count overlay to render.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "width", + "in": "query", + "description": "The fixed image width to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "height", + "in": "query", + "description": "The fixed image height to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "quality", + "in": "query", + "description": "Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "fillWidth", + "in": "query", + "description": "Width of box to fill.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "fillHeight", + "in": "query", + "description": "Height of box to fill.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "cropWhitespace", + "in": "query", + "description": "Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art.", + "deprecated": true, + "schema": { + "type": "boolean" + } + }, + { + "name": "addPlayedIndicator", + "in": "query", + "description": "Optional. Add a played indicator.", + "schema": { + "type": "boolean" + } + }, + { + "name": "blur", + "in": "query", + "description": "Optional. Blur image.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "backgroundColor", + "in": "query", + "description": "Optional. Apply a background color for transparent images.", + "schema": { + "type": "string" + } + }, + { + "name": "foregroundLayer", + "in": "query", + "description": "Optional. Apply a foreground layer on top of the image.", + "schema": { + "type": "string" + } + }, + { + "name": "imageIndex", + "in": "query", + "description": "Image index.", + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "Image stream returned.", + "content": { + "image/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "404": { + "description": "Item not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + } + }, + "head": { + "tags": [ + "Image" + ], + "summary": "Get studio image by name.", + "operationId": "HeadStudioImage", + "parameters": [ + { + "name": "name", + "in": "path", + "description": "Studio name.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "imageType", + "in": "path", + "description": "Image type.", + "required": true, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ImageType" + } + ], + "description": "Enum ImageType." + } + }, + { + "name": "tag", + "in": "query", + "description": "Optional. Supply the cache tag from the item object to receive strong caching headers.", + "schema": { + "type": "string" + } + }, + { + "name": "format", + "in": "query", + "description": "Determines the output format of the image - original,gif,jpg,png.", + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ImageFormat" + } + ] + } + }, + { + "name": "maxWidth", + "in": "query", + "description": "The maximum image width to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxHeight", + "in": "query", + "description": "The maximum image height to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "percentPlayed", + "in": "query", + "description": "Optional. Percent to render for the percent played overlay.", + "schema": { + "type": "number", + "format": "double" + } + }, + { + "name": "unplayedCount", + "in": "query", + "description": "Optional. Unplayed count overlay to render.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "width", + "in": "query", + "description": "The fixed image width to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "height", + "in": "query", + "description": "The fixed image height to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "quality", + "in": "query", + "description": "Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "fillWidth", + "in": "query", + "description": "Width of box to fill.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "fillHeight", + "in": "query", + "description": "Height of box to fill.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "cropWhitespace", + "in": "query", + "description": "Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art.", + "deprecated": true, + "schema": { + "type": "boolean" + } + }, + { + "name": "addPlayedIndicator", + "in": "query", + "description": "Optional. Add a played indicator.", + "schema": { + "type": "boolean" + } + }, + { + "name": "blur", + "in": "query", + "description": "Optional. Blur image.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "backgroundColor", + "in": "query", + "description": "Optional. Apply a background color for transparent images.", + "schema": { + "type": "string" + } + }, + { + "name": "foregroundLayer", + "in": "query", + "description": "Optional. Apply a foreground layer on top of the image.", + "schema": { + "type": "string" + } + }, + { + "name": "imageIndex", + "in": "query", + "description": "Image index.", + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "Image stream returned.", + "content": { + "image/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "404": { + "description": "Item not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + } + } + }, + "/Studios/{name}/Images/{imageType}/{imageIndex}": { + "get": { + "tags": [ + "Image" + ], + "summary": "Get studio image by name.", + "operationId": "GetStudioImageByIndex", + "parameters": [ + { + "name": "name", + "in": "path", + "description": "Studio name.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "imageType", + "in": "path", + "description": "Image type.", + "required": true, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ImageType" + } + ], + "description": "Enum ImageType." + } + }, + { + "name": "imageIndex", + "in": "path", + "description": "Image index.", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "tag", + "in": "query", + "description": "Optional. Supply the cache tag from the item object to receive strong caching headers.", + "schema": { + "type": "string" + } + }, + { + "name": "format", + "in": "query", + "description": "Determines the output format of the image - original,gif,jpg,png.", + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ImageFormat" + } + ] + } + }, + { + "name": "maxWidth", + "in": "query", + "description": "The maximum image width to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxHeight", + "in": "query", + "description": "The maximum image height to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "percentPlayed", + "in": "query", + "description": "Optional. Percent to render for the percent played overlay.", + "schema": { + "type": "number", + "format": "double" + } + }, + { + "name": "unplayedCount", + "in": "query", + "description": "Optional. Unplayed count overlay to render.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "width", + "in": "query", + "description": "The fixed image width to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "height", + "in": "query", + "description": "The fixed image height to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "quality", + "in": "query", + "description": "Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "fillWidth", + "in": "query", + "description": "Width of box to fill.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "fillHeight", + "in": "query", + "description": "Height of box to fill.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "cropWhitespace", + "in": "query", + "description": "Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art.", + "deprecated": true, + "schema": { + "type": "boolean" + } + }, + { + "name": "addPlayedIndicator", + "in": "query", + "description": "Optional. Add a played indicator.", + "schema": { + "type": "boolean" + } + }, + { + "name": "blur", + "in": "query", + "description": "Optional. Blur image.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "backgroundColor", + "in": "query", + "description": "Optional. Apply a background color for transparent images.", + "schema": { + "type": "string" + } + }, + { + "name": "foregroundLayer", + "in": "query", + "description": "Optional. Apply a foreground layer on top of the image.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Image stream returned.", + "content": { + "image/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "404": { + "description": "Item not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + } + }, + "head": { + "tags": [ + "Image" + ], + "summary": "Get studio image by name.", + "operationId": "HeadStudioImageByIndex", + "parameters": [ + { + "name": "name", + "in": "path", + "description": "Studio name.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "imageType", + "in": "path", + "description": "Image type.", + "required": true, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ImageType" + } + ], + "description": "Enum ImageType." + } + }, + { + "name": "imageIndex", + "in": "path", + "description": "Image index.", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "tag", + "in": "query", + "description": "Optional. Supply the cache tag from the item object to receive strong caching headers.", + "schema": { + "type": "string" + } + }, + { + "name": "format", + "in": "query", + "description": "Determines the output format of the image - original,gif,jpg,png.", + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ImageFormat" + } + ] + } + }, + { + "name": "maxWidth", + "in": "query", + "description": "The maximum image width to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxHeight", + "in": "query", + "description": "The maximum image height to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "percentPlayed", + "in": "query", + "description": "Optional. Percent to render for the percent played overlay.", + "schema": { + "type": "number", + "format": "double" + } + }, + { + "name": "unplayedCount", + "in": "query", + "description": "Optional. Unplayed count overlay to render.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "width", + "in": "query", + "description": "The fixed image width to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "height", + "in": "query", + "description": "The fixed image height to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "quality", + "in": "query", + "description": "Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "fillWidth", + "in": "query", + "description": "Width of box to fill.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "fillHeight", + "in": "query", + "description": "Height of box to fill.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "cropWhitespace", + "in": "query", + "description": "Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art.", + "deprecated": true, + "schema": { + "type": "boolean" + } + }, + { + "name": "addPlayedIndicator", + "in": "query", + "description": "Optional. Add a played indicator.", + "schema": { + "type": "boolean" + } + }, + { + "name": "blur", + "in": "query", + "description": "Optional. Blur image.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "backgroundColor", + "in": "query", + "description": "Optional. Apply a background color for transparent images.", + "schema": { + "type": "string" + } + }, + { + "name": "foregroundLayer", + "in": "query", + "description": "Optional. Apply a foreground layer on top of the image.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Image stream returned.", + "content": { + "image/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "404": { + "description": "Item not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + } + } + }, + "/Users/{userId}/Images/{imageType}": { + "post": { + "tags": [ + "Image" + ], + "summary": "Sets the user image.", + "operationId": "PostUserImage", + "parameters": [ + { + "name": "userId", + "in": "path", + "description": "User Id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "imageType", + "in": "path", + "description": "(Unused) Image type.", + "required": true, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ImageType" + } + ], + "description": "Enum ImageType." + } + }, + { + "name": "index", + "in": "query", + "description": "(Unused) Image index.", + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "requestBody": { + "content": { + "image/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "responses": { + "204": { + "description": "Image updated." + }, + "403": { + "description": "User does not have permission to delete the image.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + }, + "delete": { + "tags": [ + "Image" + ], + "summary": "Delete the user's image.", + "operationId": "DeleteUserImage", + "parameters": [ + { + "name": "userId", + "in": "path", + "description": "User Id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "imageType", + "in": "path", + "description": "(Unused) Image type.", + "required": true, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ImageType" + } + ], + "description": "Enum ImageType." + } + }, + { + "name": "index", + "in": "query", + "description": "(Unused) Image index.", + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "204": { + "description": "Image deleted." + }, + "403": { + "description": "User does not have permission to delete the image.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + }, + "get": { + "tags": [ + "Image" + ], + "summary": "Get user profile image.", + "operationId": "GetUserImage", + "parameters": [ + { + "name": "userId", + "in": "path", + "description": "User id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "imageType", + "in": "path", + "description": "Image type.", + "required": true, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ImageType" + } + ], + "description": "Enum ImageType." + } + }, + { + "name": "tag", + "in": "query", + "description": "Optional. Supply the cache tag from the item object to receive strong caching headers.", + "schema": { + "type": "string" + } + }, + { + "name": "format", + "in": "query", + "description": "Determines the output format of the image - original,gif,jpg,png.", + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ImageFormat" + } + ] + } + }, + { + "name": "maxWidth", + "in": "query", + "description": "The maximum image width to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxHeight", + "in": "query", + "description": "The maximum image height to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "percentPlayed", + "in": "query", + "description": "Optional. Percent to render for the percent played overlay.", + "schema": { + "type": "number", + "format": "double" + } + }, + { + "name": "unplayedCount", + "in": "query", + "description": "Optional. Unplayed count overlay to render.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "width", + "in": "query", + "description": "The fixed image width to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "height", + "in": "query", + "description": "The fixed image height to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "quality", + "in": "query", + "description": "Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "fillWidth", + "in": "query", + "description": "Width of box to fill.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "fillHeight", + "in": "query", + "description": "Height of box to fill.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "cropWhitespace", + "in": "query", + "description": "Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art.", + "deprecated": true, + "schema": { + "type": "boolean" + } + }, + { + "name": "addPlayedIndicator", + "in": "query", + "description": "Optional. Add a played indicator.", + "schema": { + "type": "boolean" + } + }, + { + "name": "blur", + "in": "query", + "description": "Optional. Blur image.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "backgroundColor", + "in": "query", + "description": "Optional. Apply a background color for transparent images.", + "schema": { + "type": "string" + } + }, + { + "name": "foregroundLayer", + "in": "query", + "description": "Optional. Apply a foreground layer on top of the image.", + "schema": { + "type": "string" + } + }, + { + "name": "imageIndex", + "in": "query", + "description": "Image index.", + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "Image stream returned.", + "content": { + "image/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "404": { + "description": "Item not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + } + }, + "head": { + "tags": [ + "Image" + ], + "summary": "Get user profile image.", + "operationId": "HeadUserImage", + "parameters": [ + { + "name": "userId", + "in": "path", + "description": "User id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "imageType", + "in": "path", + "description": "Image type.", + "required": true, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ImageType" + } + ], + "description": "Enum ImageType." + } + }, + { + "name": "tag", + "in": "query", + "description": "Optional. Supply the cache tag from the item object to receive strong caching headers.", + "schema": { + "type": "string" + } + }, + { + "name": "format", + "in": "query", + "description": "Determines the output format of the image - original,gif,jpg,png.", + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ImageFormat" + } + ] + } + }, + { + "name": "maxWidth", + "in": "query", + "description": "The maximum image width to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxHeight", + "in": "query", + "description": "The maximum image height to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "percentPlayed", + "in": "query", + "description": "Optional. Percent to render for the percent played overlay.", + "schema": { + "type": "number", + "format": "double" + } + }, + { + "name": "unplayedCount", + "in": "query", + "description": "Optional. Unplayed count overlay to render.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "width", + "in": "query", + "description": "The fixed image width to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "height", + "in": "query", + "description": "The fixed image height to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "quality", + "in": "query", + "description": "Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "fillWidth", + "in": "query", + "description": "Width of box to fill.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "fillHeight", + "in": "query", + "description": "Height of box to fill.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "cropWhitespace", + "in": "query", + "description": "Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art.", + "deprecated": true, + "schema": { + "type": "boolean" + } + }, + { + "name": "addPlayedIndicator", + "in": "query", + "description": "Optional. Add a played indicator.", + "schema": { + "type": "boolean" + } + }, + { + "name": "blur", + "in": "query", + "description": "Optional. Blur image.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "backgroundColor", + "in": "query", + "description": "Optional. Apply a background color for transparent images.", + "schema": { + "type": "string" + } + }, + { + "name": "foregroundLayer", + "in": "query", + "description": "Optional. Apply a foreground layer on top of the image.", + "schema": { + "type": "string" + } + }, + { + "name": "imageIndex", + "in": "query", + "description": "Image index.", + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "Image stream returned.", + "content": { + "image/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "404": { + "description": "Item not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + } + } + }, + "/Users/{userId}/Images/{imageType}/{imageIndex}": { + "get": { + "tags": [ + "Image" + ], + "summary": "Get user profile image.", + "operationId": "GetUserImageByIndex", + "parameters": [ + { + "name": "userId", + "in": "path", + "description": "User id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "imageType", + "in": "path", + "description": "Image type.", + "required": true, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ImageType" + } + ], + "description": "Enum ImageType." + } + }, + { + "name": "imageIndex", + "in": "path", + "description": "Image index.", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "tag", + "in": "query", + "description": "Optional. Supply the cache tag from the item object to receive strong caching headers.", + "schema": { + "type": "string" + } + }, + { + "name": "format", + "in": "query", + "description": "Determines the output format of the image - original,gif,jpg,png.", + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ImageFormat" + } + ] + } + }, + { + "name": "maxWidth", + "in": "query", + "description": "The maximum image width to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxHeight", + "in": "query", + "description": "The maximum image height to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "percentPlayed", + "in": "query", + "description": "Optional. Percent to render for the percent played overlay.", + "schema": { + "type": "number", + "format": "double" + } + }, + { + "name": "unplayedCount", + "in": "query", + "description": "Optional. Unplayed count overlay to render.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "width", + "in": "query", + "description": "The fixed image width to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "height", + "in": "query", + "description": "The fixed image height to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "quality", + "in": "query", + "description": "Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "fillWidth", + "in": "query", + "description": "Width of box to fill.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "fillHeight", + "in": "query", + "description": "Height of box to fill.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "cropWhitespace", + "in": "query", + "description": "Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art.", + "deprecated": true, + "schema": { + "type": "boolean" + } + }, + { + "name": "addPlayedIndicator", + "in": "query", + "description": "Optional. Add a played indicator.", + "schema": { + "type": "boolean" + } + }, + { + "name": "blur", + "in": "query", + "description": "Optional. Blur image.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "backgroundColor", + "in": "query", + "description": "Optional. Apply a background color for transparent images.", + "schema": { + "type": "string" + } + }, + { + "name": "foregroundLayer", + "in": "query", + "description": "Optional. Apply a foreground layer on top of the image.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Image stream returned.", + "content": { + "image/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "404": { + "description": "Item not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + } + }, + "head": { + "tags": [ + "Image" + ], + "summary": "Get user profile image.", + "operationId": "HeadUserImageByIndex", + "parameters": [ + { + "name": "userId", + "in": "path", + "description": "User id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "imageType", + "in": "path", + "description": "Image type.", + "required": true, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ImageType" + } + ], + "description": "Enum ImageType." + } + }, + { + "name": "imageIndex", + "in": "path", + "description": "Image index.", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "tag", + "in": "query", + "description": "Optional. Supply the cache tag from the item object to receive strong caching headers.", + "schema": { + "type": "string" + } + }, + { + "name": "format", + "in": "query", + "description": "Determines the output format of the image - original,gif,jpg,png.", + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ImageFormat" + } + ] + } + }, + { + "name": "maxWidth", + "in": "query", + "description": "The maximum image width to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxHeight", + "in": "query", + "description": "The maximum image height to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "percentPlayed", + "in": "query", + "description": "Optional. Percent to render for the percent played overlay.", + "schema": { + "type": "number", + "format": "double" + } + }, + { + "name": "unplayedCount", + "in": "query", + "description": "Optional. Unplayed count overlay to render.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "width", + "in": "query", + "description": "The fixed image width to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "height", + "in": "query", + "description": "The fixed image height to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "quality", + "in": "query", + "description": "Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "fillWidth", + "in": "query", + "description": "Width of box to fill.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "fillHeight", + "in": "query", + "description": "Height of box to fill.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "cropWhitespace", + "in": "query", + "description": "Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art.", + "deprecated": true, + "schema": { + "type": "boolean" + } + }, + { + "name": "addPlayedIndicator", + "in": "query", + "description": "Optional. Add a played indicator.", + "schema": { + "type": "boolean" + } + }, + { + "name": "blur", + "in": "query", + "description": "Optional. Blur image.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "backgroundColor", + "in": "query", + "description": "Optional. Apply a background color for transparent images.", + "schema": { + "type": "string" + } + }, + { + "name": "foregroundLayer", + "in": "query", + "description": "Optional. Apply a foreground layer on top of the image.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Image stream returned.", + "content": { + "image/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "404": { + "description": "Item not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + } + } + }, + "/Users/{userId}/Images/{imageType}/{index}": { + "post": { + "tags": [ + "Image" + ], + "summary": "Sets the user image.", + "operationId": "PostUserImageByIndex", + "parameters": [ + { + "name": "userId", + "in": "path", + "description": "User Id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "imageType", + "in": "path", + "description": "(Unused) Image type.", + "required": true, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ImageType" + } + ], + "description": "Enum ImageType." + } + }, + { + "name": "index", + "in": "path", + "description": "(Unused) Image index.", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "requestBody": { + "content": { + "image/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "responses": { + "204": { + "description": "Image updated." + }, + "403": { + "description": "User does not have permission to delete the image.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + }, + "delete": { + "tags": [ + "Image" + ], + "summary": "Delete the user's image.", + "operationId": "DeleteUserImageByIndex", + "parameters": [ + { + "name": "userId", + "in": "path", + "description": "User Id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "imageType", + "in": "path", + "description": "(Unused) Image type.", + "required": true, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ImageType" + } + ], + "description": "Enum ImageType." + } + }, + { + "name": "index", + "in": "path", + "description": "(Unused) Image index.", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "204": { + "description": "Image deleted." + }, + "403": { + "description": "User does not have permission to delete the image.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Images/General": { + "get": { + "tags": [ + "ImageByName" + ], + "summary": "Get all general images.", + "operationId": "GetGeneralImages", + "responses": { + "200": { + "description": "Retrieved list of images.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ImageByNameInfo" + } + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ImageByNameInfo" + } + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ImageByNameInfo" + } + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Images/General/{name}/{type}": { + "get": { + "tags": [ + "ImageByName" + ], + "summary": "Get General Image.", + "operationId": "GetGeneralImage", + "parameters": [ + { + "name": "name", + "in": "path", + "description": "The name of the image.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "type", + "in": "path", + "description": "Image Type (primary, backdrop, logo, etc).", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Image stream retrieved.", + "content": { + "image/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "404": { + "description": "Image not found.", + "content": { + "application/octet-stream": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + } + } + }, + "/Images/MediaInfo": { + "get": { + "tags": [ + "ImageByName" + ], + "summary": "Get all media info images.", + "operationId": "GetMediaInfoImages", + "responses": { + "200": { + "description": "Image list retrieved.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ImageByNameInfo" + } + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ImageByNameInfo" + } + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ImageByNameInfo" + } + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Images/MediaInfo/{theme}/{name}": { + "get": { + "tags": [ + "ImageByName" + ], + "summary": "Get media info image.", + "operationId": "GetMediaInfoImage", + "parameters": [ + { + "name": "theme", + "in": "path", + "description": "The theme to get the image from.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "name", + "in": "path", + "description": "The name of the image.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Image stream retrieved.", + "content": { + "image/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "404": { + "description": "Image not found.", + "content": { + "application/octet-stream": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + } + } + }, + "/Images/Ratings": { + "get": { + "tags": [ + "ImageByName" + ], + "summary": "Get all general images.", + "operationId": "GetRatingImages", + "responses": { + "200": { + "description": "Retrieved list of images.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ImageByNameInfo" + } + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ImageByNameInfo" + } + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ImageByNameInfo" + } + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Images/Ratings/{theme}/{name}": { + "get": { + "tags": [ + "ImageByName" + ], + "summary": "Get rating image.", + "operationId": "GetRatingImage", + "parameters": [ + { + "name": "theme", + "in": "path", + "description": "The theme to get the image from.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "name", + "in": "path", + "description": "The name of the image.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Image stream retrieved.", + "content": { + "image/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "404": { + "description": "Image not found.", + "content": { + "application/octet-stream": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + } + } + }, + "/Albums/{id}/InstantMix": { + "get": { + "tags": [ + "InstantMix" + ], + "summary": "Creates an instant playlist based on a given album.", + "operationId": "GetInstantMixFromAlbum", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "The item id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "userId", + "in": "query", + "description": "Optional. Filter by user id, and attach user data.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "limit", + "in": "query", + "description": "Optional. The maximum number of records to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "fields", + "in": "query", + "description": "Optional. Specify additional fields of information to return in the output.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ItemFields" + } + } + }, + { + "name": "enableImages", + "in": "query", + "description": "Optional. Include image information in output.", + "schema": { + "type": "boolean" + } + }, + { + "name": "enableUserData", + "in": "query", + "description": "Optional. Include user data.", + "schema": { + "type": "boolean" + } + }, + { + "name": "imageTypeLimit", + "in": "query", + "description": "Optional. The max number of images to return, per image type.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "enableImageTypes", + "in": "query", + "description": "Optional. The image types to include in the output.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ImageType" + } + } + } + ], + "responses": { + "200": { + "description": "Instant playlist returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Artists/{id}/InstantMix": { + "get": { + "tags": [ + "InstantMix" + ], + "summary": "Creates an instant playlist based on a given artist.", + "operationId": "GetInstantMixFromArtists", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "The item id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "userId", + "in": "query", + "description": "Optional. Filter by user id, and attach user data.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "limit", + "in": "query", + "description": "Optional. The maximum number of records to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "fields", + "in": "query", + "description": "Optional. Specify additional fields of information to return in the output.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ItemFields" + } + } + }, + { + "name": "enableImages", + "in": "query", + "description": "Optional. Include image information in output.", + "schema": { + "type": "boolean" + } + }, + { + "name": "enableUserData", + "in": "query", + "description": "Optional. Include user data.", + "schema": { + "type": "boolean" + } + }, + { + "name": "imageTypeLimit", + "in": "query", + "description": "Optional. The max number of images to return, per image type.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "enableImageTypes", + "in": "query", + "description": "Optional. The image types to include in the output.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ImageType" + } + } + } + ], + "responses": { + "200": { + "description": "Instant playlist returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Artists/InstantMix": { + "get": { + "tags": [ + "InstantMix" + ], + "summary": "Creates an instant playlist based on a given artist.", + "operationId": "GetInstantMixFromArtists2", + "parameters": [ + { + "name": "id", + "in": "query", + "description": "The item id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "userId", + "in": "query", + "description": "Optional. Filter by user id, and attach user data.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "limit", + "in": "query", + "description": "Optional. The maximum number of records to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "fields", + "in": "query", + "description": "Optional. Specify additional fields of information to return in the output.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ItemFields" + } + } + }, + { + "name": "enableImages", + "in": "query", + "description": "Optional. Include image information in output.", + "schema": { + "type": "boolean" + } + }, + { + "name": "enableUserData", + "in": "query", + "description": "Optional. Include user data.", + "schema": { + "type": "boolean" + } + }, + { + "name": "imageTypeLimit", + "in": "query", + "description": "Optional. The max number of images to return, per image type.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "enableImageTypes", + "in": "query", + "description": "Optional. The image types to include in the output.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ImageType" + } + } + } + ], + "responses": { + "200": { + "description": "Instant playlist returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "deprecated": true, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Items/{id}/InstantMix": { + "get": { + "tags": [ + "InstantMix" + ], + "summary": "Creates an instant playlist based on a given item.", + "operationId": "GetInstantMixFromItem", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "The item id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "userId", + "in": "query", + "description": "Optional. Filter by user id, and attach user data.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "limit", + "in": "query", + "description": "Optional. The maximum number of records to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "fields", + "in": "query", + "description": "Optional. Specify additional fields of information to return in the output.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ItemFields" + } + } + }, + { + "name": "enableImages", + "in": "query", + "description": "Optional. Include image information in output.", + "schema": { + "type": "boolean" + } + }, + { + "name": "enableUserData", + "in": "query", + "description": "Optional. Include user data.", + "schema": { + "type": "boolean" + } + }, + { + "name": "imageTypeLimit", + "in": "query", + "description": "Optional. The max number of images to return, per image type.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "enableImageTypes", + "in": "query", + "description": "Optional. The image types to include in the output.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ImageType" + } + } + } + ], + "responses": { + "200": { + "description": "Instant playlist returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/MusicGenres/{name}/InstantMix": { + "get": { + "tags": [ + "InstantMix" + ], + "summary": "Creates an instant playlist based on a given genre.", + "operationId": "GetInstantMixFromMusicGenreByName", + "parameters": [ + { + "name": "name", + "in": "path", + "description": "The genre name.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "userId", + "in": "query", + "description": "Optional. Filter by user id, and attach user data.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "limit", + "in": "query", + "description": "Optional. The maximum number of records to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "fields", + "in": "query", + "description": "Optional. Specify additional fields of information to return in the output.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ItemFields" + } + } + }, + { + "name": "enableImages", + "in": "query", + "description": "Optional. Include image information in output.", + "schema": { + "type": "boolean" + } + }, + { + "name": "enableUserData", + "in": "query", + "description": "Optional. Include user data.", + "schema": { + "type": "boolean" + } + }, + { + "name": "imageTypeLimit", + "in": "query", + "description": "Optional. The max number of images to return, per image type.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "enableImageTypes", + "in": "query", + "description": "Optional. The image types to include in the output.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ImageType" + } + } + } + ], + "responses": { + "200": { + "description": "Instant playlist returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/MusicGenres/InstantMix": { + "get": { + "tags": [ + "InstantMix" + ], + "summary": "Creates an instant playlist based on a given genre.", + "operationId": "GetInstantMixFromMusicGenreById", + "parameters": [ + { + "name": "id", + "in": "query", + "description": "The item id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "userId", + "in": "query", + "description": "Optional. Filter by user id, and attach user data.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "limit", + "in": "query", + "description": "Optional. The maximum number of records to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "fields", + "in": "query", + "description": "Optional. Specify additional fields of information to return in the output.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ItemFields" + } + } + }, + { + "name": "enableImages", + "in": "query", + "description": "Optional. Include image information in output.", + "schema": { + "type": "boolean" + } + }, + { + "name": "enableUserData", + "in": "query", + "description": "Optional. Include user data.", + "schema": { + "type": "boolean" + } + }, + { + "name": "imageTypeLimit", + "in": "query", + "description": "Optional. The max number of images to return, per image type.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "enableImageTypes", + "in": "query", + "description": "Optional. The image types to include in the output.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ImageType" + } + } + } + ], + "responses": { + "200": { + "description": "Instant playlist returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Playlists/{id}/InstantMix": { + "get": { + "tags": [ + "InstantMix" + ], + "summary": "Creates an instant playlist based on a given playlist.", + "operationId": "GetInstantMixFromPlaylist", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "The item id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "userId", + "in": "query", + "description": "Optional. Filter by user id, and attach user data.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "limit", + "in": "query", + "description": "Optional. The maximum number of records to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "fields", + "in": "query", + "description": "Optional. Specify additional fields of information to return in the output.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ItemFields" + } + } + }, + { + "name": "enableImages", + "in": "query", + "description": "Optional. Include image information in output.", + "schema": { + "type": "boolean" + } + }, + { + "name": "enableUserData", + "in": "query", + "description": "Optional. Include user data.", + "schema": { + "type": "boolean" + } + }, + { + "name": "imageTypeLimit", + "in": "query", + "description": "Optional. The max number of images to return, per image type.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "enableImageTypes", + "in": "query", + "description": "Optional. The image types to include in the output.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ImageType" + } + } + } + ], + "responses": { + "200": { + "description": "Instant playlist returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Songs/{id}/InstantMix": { + "get": { + "tags": [ + "InstantMix" + ], + "summary": "Creates an instant playlist based on a given song.", + "operationId": "GetInstantMixFromSong", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "The item id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "userId", + "in": "query", + "description": "Optional. Filter by user id, and attach user data.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "limit", + "in": "query", + "description": "Optional. The maximum number of records to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "fields", + "in": "query", + "description": "Optional. Specify additional fields of information to return in the output.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ItemFields" + } + } + }, + { + "name": "enableImages", + "in": "query", + "description": "Optional. Include image information in output.", + "schema": { + "type": "boolean" + } + }, + { + "name": "enableUserData", + "in": "query", + "description": "Optional. Include user data.", + "schema": { + "type": "boolean" + } + }, + { + "name": "imageTypeLimit", + "in": "query", + "description": "Optional. The max number of images to return, per image type.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "enableImageTypes", + "in": "query", + "description": "Optional. The image types to include in the output.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ImageType" + } + } + } + ], + "responses": { + "200": { + "description": "Instant playlist returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Items/{itemId}/ExternalIdInfos": { + "get": { + "tags": [ + "ItemLookup" + ], + "summary": "Get the item's external id info.", + "operationId": "GetExternalIdInfos", + "parameters": [ + { + "name": "itemId", + "in": "path", + "description": "Item id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "External id info retrieved.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExternalIdInfo" + } + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExternalIdInfo" + } + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExternalIdInfo" + } + } + } + } + }, + "404": { + "description": "Item not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "RequiresElevation", + "DefaultAuthorization" + ] + } + ] + } + }, + "/Items/RemoteSearch/Apply/{itemId}": { + "post": { + "tags": [ + "ItemLookup" + ], + "summary": "Applies search criteria to an item and refreshes metadata.", + "operationId": "ApplySearchCriteria", + "parameters": [ + { + "name": "itemId", + "in": "path", + "description": "Item id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "replaceAllImages", + "in": "query", + "description": "Optional. Whether or not to replace all images. Default: True.", + "schema": { + "type": "boolean", + "default": true + } + } + ], + "requestBody": { + "description": "The remote search result.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/RemoteSearchResult" + } + ] + } + }, + "text/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/RemoteSearchResult" + } + ] + } + }, + "application/*+json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/RemoteSearchResult" + } + ] + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Item metadata refreshed." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "RequiresElevation", + "DefaultAuthorization" + ] + } + ] + } + }, + "/Items/RemoteSearch/Book": { + "post": { + "tags": [ + "ItemLookup" + ], + "summary": "Get book remote search.", + "operationId": "GetBookRemoteSearchResults", + "requestBody": { + "description": "Remote search query.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/BookInfoRemoteSearchQuery" + } + ] + } + }, + "text/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/BookInfoRemoteSearchQuery" + } + ] + } + }, + "application/*+json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/BookInfoRemoteSearchQuery" + } + ] + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Book remote search executed.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteSearchResult" + } + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteSearchResult" + } + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteSearchResult" + } + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Items/RemoteSearch/BoxSet": { + "post": { + "tags": [ + "ItemLookup" + ], + "summary": "Get box set remote search.", + "operationId": "GetBoxSetRemoteSearchResults", + "requestBody": { + "description": "Remote search query.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/BoxSetInfoRemoteSearchQuery" + } + ] + } + }, + "text/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/BoxSetInfoRemoteSearchQuery" + } + ] + } + }, + "application/*+json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/BoxSetInfoRemoteSearchQuery" + } + ] + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Box set remote search executed.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteSearchResult" + } + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteSearchResult" + } + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteSearchResult" + } + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Items/RemoteSearch/Movie": { + "post": { + "tags": [ + "ItemLookup" + ], + "summary": "Get movie remote search.", + "operationId": "GetMovieRemoteSearchResults", + "requestBody": { + "description": "Remote search query.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/MovieInfoRemoteSearchQuery" + } + ] + } + }, + "text/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/MovieInfoRemoteSearchQuery" + } + ] + } + }, + "application/*+json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/MovieInfoRemoteSearchQuery" + } + ] + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Movie remote search executed.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteSearchResult" + } + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteSearchResult" + } + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteSearchResult" + } + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Items/RemoteSearch/MusicAlbum": { + "post": { + "tags": [ + "ItemLookup" + ], + "summary": "Get music album remote search.", + "operationId": "GetMusicAlbumRemoteSearchResults", + "requestBody": { + "description": "Remote search query.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/AlbumInfoRemoteSearchQuery" + } + ] + } + }, + "text/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/AlbumInfoRemoteSearchQuery" + } + ] + } + }, + "application/*+json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/AlbumInfoRemoteSearchQuery" + } + ] + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Music album remote search executed.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteSearchResult" + } + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteSearchResult" + } + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteSearchResult" + } + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Items/RemoteSearch/MusicArtist": { + "post": { + "tags": [ + "ItemLookup" + ], + "summary": "Get music artist remote search.", + "operationId": "GetMusicArtistRemoteSearchResults", + "requestBody": { + "description": "Remote search query.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ArtistInfoRemoteSearchQuery" + } + ] + } + }, + "text/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ArtistInfoRemoteSearchQuery" + } + ] + } + }, + "application/*+json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ArtistInfoRemoteSearchQuery" + } + ] + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Music artist remote search executed.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteSearchResult" + } + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteSearchResult" + } + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteSearchResult" + } + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Items/RemoteSearch/MusicVideo": { + "post": { + "tags": [ + "ItemLookup" + ], + "summary": "Get music video remote search.", + "operationId": "GetMusicVideoRemoteSearchResults", + "requestBody": { + "description": "Remote search query.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/MusicVideoInfoRemoteSearchQuery" + } + ] + } + }, + "text/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/MusicVideoInfoRemoteSearchQuery" + } + ] + } + }, + "application/*+json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/MusicVideoInfoRemoteSearchQuery" + } + ] + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Music video remote search executed.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteSearchResult" + } + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteSearchResult" + } + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteSearchResult" + } + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Items/RemoteSearch/Person": { + "post": { + "tags": [ + "ItemLookup" + ], + "summary": "Get person remote search.", + "operationId": "GetPersonRemoteSearchResults", + "requestBody": { + "description": "Remote search query.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/PersonLookupInfoRemoteSearchQuery" + } + ] + } + }, + "text/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/PersonLookupInfoRemoteSearchQuery" + } + ] + } + }, + "application/*+json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/PersonLookupInfoRemoteSearchQuery" + } + ] + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Person remote search executed.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteSearchResult" + } + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteSearchResult" + } + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteSearchResult" + } + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "RequiresElevation", + "DefaultAuthorization" + ] + } + ] + } + }, + "/Items/RemoteSearch/Series": { + "post": { + "tags": [ + "ItemLookup" + ], + "summary": "Get series remote search.", + "operationId": "GetSeriesRemoteSearchResults", + "requestBody": { + "description": "Remote search query.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SeriesInfoRemoteSearchQuery" + } + ] + } + }, + "text/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SeriesInfoRemoteSearchQuery" + } + ] + } + }, + "application/*+json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SeriesInfoRemoteSearchQuery" + } + ] + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Series remote search executed.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteSearchResult" + } + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteSearchResult" + } + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteSearchResult" + } + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Items/RemoteSearch/Trailer": { + "post": { + "tags": [ + "ItemLookup" + ], + "summary": "Get trailer remote search.", + "operationId": "GetTrailerRemoteSearchResults", + "requestBody": { + "description": "Remote search query.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/TrailerInfoRemoteSearchQuery" + } + ] + } + }, + "text/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/TrailerInfoRemoteSearchQuery" + } + ] + } + }, + "application/*+json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/TrailerInfoRemoteSearchQuery" + } + ] + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Trailer remote search executed.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteSearchResult" + } + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteSearchResult" + } + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteSearchResult" + } + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Items/{itemId}/Refresh": { + "post": { + "tags": [ + "ItemRefresh" + ], + "summary": "Refreshes metadata for an item.", + "operationId": "RefreshItem", + "parameters": [ + { + "name": "itemId", + "in": "path", + "description": "Item id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "metadataRefreshMode", + "in": "query", + "description": "(Optional) Specifies the metadata refresh mode.", + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/MetadataRefreshMode" + } + ], + "default": "None" + } + }, + { + "name": "imageRefreshMode", + "in": "query", + "description": "(Optional) Specifies the image refresh mode.", + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/MetadataRefreshMode" + } + ], + "default": "None" + } + }, + { + "name": "replaceAllMetadata", + "in": "query", + "description": "(Optional) Determines if metadata should be replaced. Only applicable if mode is FullRefresh.", + "schema": { + "type": "boolean", + "default": false + } + }, + { + "name": "replaceAllImages", + "in": "query", + "description": "(Optional) Determines if images should be replaced. Only applicable if mode is FullRefresh.", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "204": { + "description": "Item metadata refresh queued." + }, + "404": { + "description": "Item to refresh not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "RequiresElevation" + ] + } + ] + } + }, + "/Items": { + "get": { + "tags": [ + "Items" + ], + "summary": "Gets items based on a query.", + "operationId": "GetItems", + "parameters": [ + { + "name": "userId", + "in": "query", + "description": "The user id supplied as query parameter.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "maxOfficialRating", + "in": "query", + "description": "Optional filter by maximum official rating (PG, PG-13, TV-MA, etc).", + "schema": { + "type": "string" + } + }, + { + "name": "hasThemeSong", + "in": "query", + "description": "Optional filter by items with theme songs.", + "schema": { + "type": "boolean" + } + }, + { + "name": "hasThemeVideo", + "in": "query", + "description": "Optional filter by items with theme videos.", + "schema": { + "type": "boolean" + } + }, + { + "name": "hasSubtitles", + "in": "query", + "description": "Optional filter by items with subtitles.", + "schema": { + "type": "boolean" + } + }, + { + "name": "hasSpecialFeature", + "in": "query", + "description": "Optional filter by items with special features.", + "schema": { + "type": "boolean" + } + }, + { + "name": "hasTrailer", + "in": "query", + "description": "Optional filter by items with trailers.", + "schema": { + "type": "boolean" + } + }, + { + "name": "adjacentTo", + "in": "query", + "description": "Optional. Return items that are siblings of a supplied item.", + "schema": { + "type": "string" + } + }, + { + "name": "parentIndexNumber", + "in": "query", + "description": "Optional filter by parent index number.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "hasParentalRating", + "in": "query", + "description": "Optional filter by items that have or do not have a parental rating.", + "schema": { + "type": "boolean" + } + }, + { + "name": "isHd", + "in": "query", + "description": "Optional filter by items that are HD or not.", + "schema": { + "type": "boolean" + } + }, + { + "name": "is4K", + "in": "query", + "description": "Optional filter by items that are 4K or not.", + "schema": { + "type": "boolean" + } + }, + { + "name": "locationTypes", + "in": "query", + "description": "Optional. If specified, results will be filtered based on LocationType. This allows multiple, comma delimited.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LocationType" + } + } + }, + { + "name": "excludeLocationTypes", + "in": "query", + "description": "Optional. If specified, results will be filtered based on the LocationType. This allows multiple, comma delimited.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LocationType" + } + } + }, + { + "name": "isMissing", + "in": "query", + "description": "Optional filter by items that are missing episodes or not.", + "schema": { + "type": "boolean" + } + }, + { + "name": "isUnaired", + "in": "query", + "description": "Optional filter by items that are unaired episodes or not.", + "schema": { + "type": "boolean" + } + }, + { + "name": "minCommunityRating", + "in": "query", + "description": "Optional filter by minimum community rating.", + "schema": { + "type": "number", + "format": "double" + } + }, + { + "name": "minCriticRating", + "in": "query", + "description": "Optional filter by minimum critic rating.", + "schema": { + "type": "number", + "format": "double" + } + }, + { + "name": "minPremiereDate", + "in": "query", + "description": "Optional. The minimum premiere date. Format = ISO.", + "schema": { + "type": "string", + "format": "date-time" + } + }, + { + "name": "minDateLastSaved", + "in": "query", + "description": "Optional. The minimum last saved date. Format = ISO.", + "schema": { + "type": "string", + "format": "date-time" + } + }, + { + "name": "minDateLastSavedForUser", + "in": "query", + "description": "Optional. The minimum last saved date for the current user. Format = ISO.", + "schema": { + "type": "string", + "format": "date-time" + } + }, + { + "name": "maxPremiereDate", + "in": "query", + "description": "Optional. The maximum premiere date. Format = ISO.", + "schema": { + "type": "string", + "format": "date-time" + } + }, + { + "name": "hasOverview", + "in": "query", + "description": "Optional filter by items that have an overview or not.", + "schema": { + "type": "boolean" + } + }, + { + "name": "hasImdbId", + "in": "query", + "description": "Optional filter by items that have an imdb id or not.", + "schema": { + "type": "boolean" + } + }, + { + "name": "hasTmdbId", + "in": "query", + "description": "Optional filter by items that have a tmdb id or not.", + "schema": { + "type": "boolean" + } + }, + { + "name": "hasTvdbId", + "in": "query", + "description": "Optional filter by items that have a tvdb id or not.", + "schema": { + "type": "boolean" + } + }, + { + "name": "isMovie", + "in": "query", + "description": "Optional filter for live tv movies.", + "schema": { + "type": "boolean" + } + }, + { + "name": "isSeries", + "in": "query", + "description": "Optional filter for live tv series.", + "schema": { + "type": "boolean" + } + }, + { + "name": "isNews", + "in": "query", + "description": "Optional filter for live tv news.", + "schema": { + "type": "boolean" + } + }, + { + "name": "isKids", + "in": "query", + "description": "Optional filter for live tv kids.", + "schema": { + "type": "boolean" + } + }, + { + "name": "isSports", + "in": "query", + "description": "Optional filter for live tv sports.", + "schema": { + "type": "boolean" + } + }, + { + "name": "excludeItemIds", + "in": "query", + "description": "Optional. If specified, results will be filtered by excluding item ids. This allows multiple, comma delimited.", + "schema": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + }, + { + "name": "startIndex", + "in": "query", + "description": "Optional. The record index to start at. All items with a lower index will be dropped from the results.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "limit", + "in": "query", + "description": "Optional. The maximum number of records to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "recursive", + "in": "query", + "description": "When searching within folders, this determines whether or not the search will be recursive. true/false.", + "schema": { + "type": "boolean" + } + }, + { + "name": "searchTerm", + "in": "query", + "description": "Optional. Filter based on a search term.", + "schema": { + "type": "string" + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort Order - Ascending,Descending.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SortOrder" + } + } + }, + { + "name": "parentId", + "in": "query", + "description": "Specify this to localize the search to a specific item or folder. Omit to use the root.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "fields", + "in": "query", + "description": "Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimited. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ItemFields" + } + } + }, + { + "name": "excludeItemTypes", + "in": "query", + "description": "Optional. If specified, results will be filtered based on item type. This allows multiple, comma delimited.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseItemKind" + } + } + }, + { + "name": "includeItemTypes", + "in": "query", + "description": "Optional. If specified, results will be filtered based on the item type. This allows multiple, comma delimited.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseItemKind" + } + } + }, + { + "name": "filters", + "in": "query", + "description": "Optional. Specify additional filters to apply. This allows multiple, comma delimited. Options: IsFolder, IsNotFolder, IsUnplayed, IsPlayed, IsFavorite, IsResumable, Likes, Dislikes.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ItemFilter" + } + } + }, + { + "name": "isFavorite", + "in": "query", + "description": "Optional filter by items that are marked as favorite, or not.", + "schema": { + "type": "boolean" + } + }, + { + "name": "mediaTypes", + "in": "query", + "description": "Optional filter by MediaType. Allows multiple, comma delimited.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "imageTypes", + "in": "query", + "description": "Optional. If specified, results will be filtered based on those containing image types. This allows multiple, comma delimited.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ImageType" + } + } + }, + { + "name": "sortBy", + "in": "query", + "description": "Optional. Specify one or more sort orders, comma delimited. Options: Album, AlbumArtist, Artist, Budget, CommunityRating, CriticRating, DateCreated, DatePlayed, PlayCount, PremiereDate, ProductionYear, SortName, Random, Revenue, Runtime.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "isPlayed", + "in": "query", + "description": "Optional filter by items that are played, or not.", + "schema": { + "type": "boolean" + } + }, + { + "name": "genres", + "in": "query", + "description": "Optional. If specified, results will be filtered based on genre. This allows multiple, pipe delimited.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "officialRatings", + "in": "query", + "description": "Optional. If specified, results will be filtered based on OfficialRating. This allows multiple, pipe delimited.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "tags", + "in": "query", + "description": "Optional. If specified, results will be filtered based on tag. This allows multiple, pipe delimited.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "years", + "in": "query", + "description": "Optional. If specified, results will be filtered based on production year. This allows multiple, comma delimited.", + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + }, + { + "name": "enableUserData", + "in": "query", + "description": "Optional, include user data.", + "schema": { + "type": "boolean" + } + }, + { + "name": "imageTypeLimit", + "in": "query", + "description": "Optional, the max number of images to return, per image type.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "enableImageTypes", + "in": "query", + "description": "Optional. The image types to include in the output.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ImageType" + } + } + }, + { + "name": "person", + "in": "query", + "description": "Optional. If specified, results will be filtered to include only those containing the specified person.", + "schema": { + "type": "string" + } + }, + { + "name": "personIds", + "in": "query", + "description": "Optional. If specified, results will be filtered to include only those containing the specified person id.", + "schema": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + }, + { + "name": "personTypes", + "in": "query", + "description": "Optional. If specified, along with Person, results will be filtered to include only those containing the specified person and PersonType. Allows multiple, comma-delimited.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "studios", + "in": "query", + "description": "Optional. If specified, results will be filtered based on studio. This allows multiple, pipe delimited.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "artists", + "in": "query", + "description": "Optional. If specified, results will be filtered based on artists. This allows multiple, pipe delimited.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "excludeArtistIds", + "in": "query", + "description": "Optional. If specified, results will be filtered based on artist id. This allows multiple, pipe delimited.", + "schema": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + }, + { + "name": "artistIds", + "in": "query", + "description": "Optional. If specified, results will be filtered to include only those containing the specified artist id.", + "schema": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + }, + { + "name": "albumArtistIds", + "in": "query", + "description": "Optional. If specified, results will be filtered to include only those containing the specified album artist id.", + "schema": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + }, + { + "name": "contributingArtistIds", + "in": "query", + "description": "Optional. If specified, results will be filtered to include only those containing the specified contributing artist id.", + "schema": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + }, + { + "name": "albums", + "in": "query", + "description": "Optional. If specified, results will be filtered based on album. This allows multiple, pipe delimited.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "albumIds", + "in": "query", + "description": "Optional. If specified, results will be filtered based on album id. This allows multiple, pipe delimited.", + "schema": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + }, + { + "name": "ids", + "in": "query", + "description": "Optional. If specific items are needed, specify a list of item id's to retrieve. This allows multiple, comma delimited.", + "schema": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + }, + { + "name": "videoTypes", + "in": "query", + "description": "Optional filter by VideoType (videofile, dvd, bluray, iso). Allows multiple, comma delimited.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/VideoType" + } + } + }, + { + "name": "minOfficialRating", + "in": "query", + "description": "Optional filter by minimum official rating (PG, PG-13, TV-MA, etc).", + "schema": { + "type": "string" + } + }, + { + "name": "isLocked", + "in": "query", + "description": "Optional filter by items that are locked.", + "schema": { + "type": "boolean" + } + }, + { + "name": "isPlaceHolder", + "in": "query", + "description": "Optional filter by items that are placeholders.", + "schema": { + "type": "boolean" + } + }, + { + "name": "hasOfficialRating", + "in": "query", + "description": "Optional filter by items that have official ratings.", + "schema": { + "type": "boolean" + } + }, + { + "name": "collapseBoxSetItems", + "in": "query", + "description": "Whether or not to hide items behind their boxsets.", + "schema": { + "type": "boolean" + } + }, + { + "name": "minWidth", + "in": "query", + "description": "Optional. Filter by the minimum width of the item.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "minHeight", + "in": "query", + "description": "Optional. Filter by the minimum height of the item.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxWidth", + "in": "query", + "description": "Optional. Filter by the maximum width of the item.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxHeight", + "in": "query", + "description": "Optional. Filter by the maximum height of the item.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "is3D", + "in": "query", + "description": "Optional filter by items that are 3D, or not.", + "schema": { + "type": "boolean" + } + }, + { + "name": "seriesStatus", + "in": "query", + "description": "Optional filter by Series Status. Allows multiple, comma delimited.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SeriesStatus" + } + } + }, + { + "name": "nameStartsWithOrGreater", + "in": "query", + "description": "Optional filter by items whose name is sorted equally or greater than a given input string.", + "schema": { + "type": "string" + } + }, + { + "name": "nameStartsWith", + "in": "query", + "description": "Optional filter by items whose name is sorted equally than a given input string.", + "schema": { + "type": "string" + } + }, + { + "name": "nameLessThan", + "in": "query", + "description": "Optional filter by items whose name is equally or lesser than a given input string.", + "schema": { + "type": "string" + } + }, + { + "name": "studioIds", + "in": "query", + "description": "Optional. If specified, results will be filtered based on studio id. This allows multiple, pipe delimited.", + "schema": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + }, + { + "name": "genreIds", + "in": "query", + "description": "Optional. If specified, results will be filtered based on genre id. This allows multiple, pipe delimited.", + "schema": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + }, + { + "name": "enableTotalRecordCount", + "in": "query", + "description": "Optional. Enable the total record count.", + "schema": { + "type": "boolean", + "default": true + } + }, + { + "name": "enableImages", + "in": "query", + "description": "Optional, include image information in output.", + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + }, + "delete": { + "tags": [ + "Library" + ], + "summary": "Deletes items from the library and filesystem.", + "operationId": "DeleteItems", + "parameters": [ + { + "name": "ids", + "in": "query", + "description": "The item ids.", + "schema": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + } + ], + "responses": { + "204": { + "description": "Items deleted." + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Users/{userId}/Items": { + "get": { + "tags": [ + "Items" + ], + "summary": "Gets items based on a query.", + "operationId": "GetItemsByUserId", + "parameters": [ + { + "name": "userId", + "in": "path", + "description": "The user id supplied as query parameter.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "maxOfficialRating", + "in": "query", + "description": "Optional filter by maximum official rating (PG, PG-13, TV-MA, etc).", + "schema": { + "type": "string" + } + }, + { + "name": "hasThemeSong", + "in": "query", + "description": "Optional filter by items with theme songs.", + "schema": { + "type": "boolean" + } + }, + { + "name": "hasThemeVideo", + "in": "query", + "description": "Optional filter by items with theme videos.", + "schema": { + "type": "boolean" + } + }, + { + "name": "hasSubtitles", + "in": "query", + "description": "Optional filter by items with subtitles.", + "schema": { + "type": "boolean" + } + }, + { + "name": "hasSpecialFeature", + "in": "query", + "description": "Optional filter by items with special features.", + "schema": { + "type": "boolean" + } + }, + { + "name": "hasTrailer", + "in": "query", + "description": "Optional filter by items with trailers.", + "schema": { + "type": "boolean" + } + }, + { + "name": "adjacentTo", + "in": "query", + "description": "Optional. Return items that are siblings of a supplied item.", + "schema": { + "type": "string" + } + }, + { + "name": "parentIndexNumber", + "in": "query", + "description": "Optional filter by parent index number.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "hasParentalRating", + "in": "query", + "description": "Optional filter by items that have or do not have a parental rating.", + "schema": { + "type": "boolean" + } + }, + { + "name": "isHd", + "in": "query", + "description": "Optional filter by items that are HD or not.", + "schema": { + "type": "boolean" + } + }, + { + "name": "is4K", + "in": "query", + "description": "Optional filter by items that are 4K or not.", + "schema": { + "type": "boolean" + } + }, + { + "name": "locationTypes", + "in": "query", + "description": "Optional. If specified, results will be filtered based on LocationType. This allows multiple, comma delimited.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LocationType" + } + } + }, + { + "name": "excludeLocationTypes", + "in": "query", + "description": "Optional. If specified, results will be filtered based on the LocationType. This allows multiple, comma delimited.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LocationType" + } + } + }, + { + "name": "isMissing", + "in": "query", + "description": "Optional filter by items that are missing episodes or not.", + "schema": { + "type": "boolean" + } + }, + { + "name": "isUnaired", + "in": "query", + "description": "Optional filter by items that are unaired episodes or not.", + "schema": { + "type": "boolean" + } + }, + { + "name": "minCommunityRating", + "in": "query", + "description": "Optional filter by minimum community rating.", + "schema": { + "type": "number", + "format": "double" + } + }, + { + "name": "minCriticRating", + "in": "query", + "description": "Optional filter by minimum critic rating.", + "schema": { + "type": "number", + "format": "double" + } + }, + { + "name": "minPremiereDate", + "in": "query", + "description": "Optional. The minimum premiere date. Format = ISO.", + "schema": { + "type": "string", + "format": "date-time" + } + }, + { + "name": "minDateLastSaved", + "in": "query", + "description": "Optional. The minimum last saved date. Format = ISO.", + "schema": { + "type": "string", + "format": "date-time" + } + }, + { + "name": "minDateLastSavedForUser", + "in": "query", + "description": "Optional. The minimum last saved date for the current user. Format = ISO.", + "schema": { + "type": "string", + "format": "date-time" + } + }, + { + "name": "maxPremiereDate", + "in": "query", + "description": "Optional. The maximum premiere date. Format = ISO.", + "schema": { + "type": "string", + "format": "date-time" + } + }, + { + "name": "hasOverview", + "in": "query", + "description": "Optional filter by items that have an overview or not.", + "schema": { + "type": "boolean" + } + }, + { + "name": "hasImdbId", + "in": "query", + "description": "Optional filter by items that have an imdb id or not.", + "schema": { + "type": "boolean" + } + }, + { + "name": "hasTmdbId", + "in": "query", + "description": "Optional filter by items that have a tmdb id or not.", + "schema": { + "type": "boolean" + } + }, + { + "name": "hasTvdbId", + "in": "query", + "description": "Optional filter by items that have a tvdb id or not.", + "schema": { + "type": "boolean" + } + }, + { + "name": "isMovie", + "in": "query", + "description": "Optional filter for live tv movies.", + "schema": { + "type": "boolean" + } + }, + { + "name": "isSeries", + "in": "query", + "description": "Optional filter for live tv series.", + "schema": { + "type": "boolean" + } + }, + { + "name": "isNews", + "in": "query", + "description": "Optional filter for live tv news.", + "schema": { + "type": "boolean" + } + }, + { + "name": "isKids", + "in": "query", + "description": "Optional filter for live tv kids.", + "schema": { + "type": "boolean" + } + }, + { + "name": "isSports", + "in": "query", + "description": "Optional filter for live tv sports.", + "schema": { + "type": "boolean" + } + }, + { + "name": "excludeItemIds", + "in": "query", + "description": "Optional. If specified, results will be filtered by excluding item ids. This allows multiple, comma delimited.", + "schema": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + }, + { + "name": "startIndex", + "in": "query", + "description": "Optional. The record index to start at. All items with a lower index will be dropped from the results.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "limit", + "in": "query", + "description": "Optional. The maximum number of records to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "recursive", + "in": "query", + "description": "When searching within folders, this determines whether or not the search will be recursive. true/false.", + "schema": { + "type": "boolean" + } + }, + { + "name": "searchTerm", + "in": "query", + "description": "Optional. Filter based on a search term.", + "schema": { + "type": "string" + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort Order - Ascending,Descending.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SortOrder" + } + } + }, + { + "name": "parentId", + "in": "query", + "description": "Specify this to localize the search to a specific item or folder. Omit to use the root.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "fields", + "in": "query", + "description": "Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimited. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ItemFields" + } + } + }, + { + "name": "excludeItemTypes", + "in": "query", + "description": "Optional. If specified, results will be filtered based on item type. This allows multiple, comma delimited.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseItemKind" + } + } + }, + { + "name": "includeItemTypes", + "in": "query", + "description": "Optional. If specified, results will be filtered based on the item type. This allows multiple, comma delimited.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseItemKind" + } + } + }, + { + "name": "filters", + "in": "query", + "description": "Optional. Specify additional filters to apply. This allows multiple, comma delimited. Options: IsFolder, IsNotFolder, IsUnplayed, IsPlayed, IsFavorite, IsResumable, Likes, Dislikes.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ItemFilter" + } + } + }, + { + "name": "isFavorite", + "in": "query", + "description": "Optional filter by items that are marked as favorite, or not.", + "schema": { + "type": "boolean" + } + }, + { + "name": "mediaTypes", + "in": "query", + "description": "Optional filter by MediaType. Allows multiple, comma delimited.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "imageTypes", + "in": "query", + "description": "Optional. If specified, results will be filtered based on those containing image types. This allows multiple, comma delimited.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ImageType" + } + } + }, + { + "name": "sortBy", + "in": "query", + "description": "Optional. Specify one or more sort orders, comma delimited. Options: Album, AlbumArtist, Artist, Budget, CommunityRating, CriticRating, DateCreated, DatePlayed, PlayCount, PremiereDate, ProductionYear, SortName, Random, Revenue, Runtime.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "isPlayed", + "in": "query", + "description": "Optional filter by items that are played, or not.", + "schema": { + "type": "boolean" + } + }, + { + "name": "genres", + "in": "query", + "description": "Optional. If specified, results will be filtered based on genre. This allows multiple, pipe delimited.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "officialRatings", + "in": "query", + "description": "Optional. If specified, results will be filtered based on OfficialRating. This allows multiple, pipe delimited.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "tags", + "in": "query", + "description": "Optional. If specified, results will be filtered based on tag. This allows multiple, pipe delimited.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "years", + "in": "query", + "description": "Optional. If specified, results will be filtered based on production year. This allows multiple, comma delimited.", + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + }, + { + "name": "enableUserData", + "in": "query", + "description": "Optional, include user data.", + "schema": { + "type": "boolean" + } + }, + { + "name": "imageTypeLimit", + "in": "query", + "description": "Optional, the max number of images to return, per image type.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "enableImageTypes", + "in": "query", + "description": "Optional. The image types to include in the output.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ImageType" + } + } + }, + { + "name": "person", + "in": "query", + "description": "Optional. If specified, results will be filtered to include only those containing the specified person.", + "schema": { + "type": "string" + } + }, + { + "name": "personIds", + "in": "query", + "description": "Optional. If specified, results will be filtered to include only those containing the specified person id.", + "schema": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + }, + { + "name": "personTypes", + "in": "query", + "description": "Optional. If specified, along with Person, results will be filtered to include only those containing the specified person and PersonType. Allows multiple, comma-delimited.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "studios", + "in": "query", + "description": "Optional. If specified, results will be filtered based on studio. This allows multiple, pipe delimited.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "artists", + "in": "query", + "description": "Optional. If specified, results will be filtered based on artists. This allows multiple, pipe delimited.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "excludeArtistIds", + "in": "query", + "description": "Optional. If specified, results will be filtered based on artist id. This allows multiple, pipe delimited.", + "schema": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + }, + { + "name": "artistIds", + "in": "query", + "description": "Optional. If specified, results will be filtered to include only those containing the specified artist id.", + "schema": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + }, + { + "name": "albumArtistIds", + "in": "query", + "description": "Optional. If specified, results will be filtered to include only those containing the specified album artist id.", + "schema": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + }, + { + "name": "contributingArtistIds", + "in": "query", + "description": "Optional. If specified, results will be filtered to include only those containing the specified contributing artist id.", + "schema": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + }, + { + "name": "albums", + "in": "query", + "description": "Optional. If specified, results will be filtered based on album. This allows multiple, pipe delimited.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "albumIds", + "in": "query", + "description": "Optional. If specified, results will be filtered based on album id. This allows multiple, pipe delimited.", + "schema": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + }, + { + "name": "ids", + "in": "query", + "description": "Optional. If specific items are needed, specify a list of item id's to retrieve. This allows multiple, comma delimited.", + "schema": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + }, + { + "name": "videoTypes", + "in": "query", + "description": "Optional filter by VideoType (videofile, dvd, bluray, iso). Allows multiple, comma delimited.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/VideoType" + } + } + }, + { + "name": "minOfficialRating", + "in": "query", + "description": "Optional filter by minimum official rating (PG, PG-13, TV-MA, etc).", + "schema": { + "type": "string" + } + }, + { + "name": "isLocked", + "in": "query", + "description": "Optional filter by items that are locked.", + "schema": { + "type": "boolean" + } + }, + { + "name": "isPlaceHolder", + "in": "query", + "description": "Optional filter by items that are placeholders.", + "schema": { + "type": "boolean" + } + }, + { + "name": "hasOfficialRating", + "in": "query", + "description": "Optional filter by items that have official ratings.", + "schema": { + "type": "boolean" + } + }, + { + "name": "collapseBoxSetItems", + "in": "query", + "description": "Whether or not to hide items behind their boxsets.", + "schema": { + "type": "boolean" + } + }, + { + "name": "minWidth", + "in": "query", + "description": "Optional. Filter by the minimum width of the item.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "minHeight", + "in": "query", + "description": "Optional. Filter by the minimum height of the item.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxWidth", + "in": "query", + "description": "Optional. Filter by the maximum width of the item.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxHeight", + "in": "query", + "description": "Optional. Filter by the maximum height of the item.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "is3D", + "in": "query", + "description": "Optional filter by items that are 3D, or not.", + "schema": { + "type": "boolean" + } + }, + { + "name": "seriesStatus", + "in": "query", + "description": "Optional filter by Series Status. Allows multiple, comma delimited.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SeriesStatus" + } + } + }, + { + "name": "nameStartsWithOrGreater", + "in": "query", + "description": "Optional filter by items whose name is sorted equally or greater than a given input string.", + "schema": { + "type": "string" + } + }, + { + "name": "nameStartsWith", + "in": "query", + "description": "Optional filter by items whose name is sorted equally than a given input string.", + "schema": { + "type": "string" + } + }, + { + "name": "nameLessThan", + "in": "query", + "description": "Optional filter by items whose name is equally or lesser than a given input string.", + "schema": { + "type": "string" + } + }, + { + "name": "studioIds", + "in": "query", + "description": "Optional. If specified, results will be filtered based on studio id. This allows multiple, pipe delimited.", + "schema": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + }, + { + "name": "genreIds", + "in": "query", + "description": "Optional. If specified, results will be filtered based on genre id. This allows multiple, pipe delimited.", + "schema": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + }, + { + "name": "enableTotalRecordCount", + "in": "query", + "description": "Optional. Enable the total record count.", + "schema": { + "type": "boolean", + "default": true + } + }, + { + "name": "enableImages", + "in": "query", + "description": "Optional, include image information in output.", + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Users/{userId}/Items/Resume": { + "get": { + "tags": [ + "Items" + ], + "summary": "Gets items based on a query.", + "operationId": "GetResumeItems", + "parameters": [ + { + "name": "userId", + "in": "path", + "description": "The user id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "startIndex", + "in": "query", + "description": "The start index.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "limit", + "in": "query", + "description": "The item limit.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "searchTerm", + "in": "query", + "description": "The search term.", + "schema": { + "type": "string" + } + }, + { + "name": "parentId", + "in": "query", + "description": "Specify this to localize the search to a specific item or folder. Omit to use the root.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "fields", + "in": "query", + "description": "Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimited. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ItemFields" + } + } + }, + { + "name": "mediaTypes", + "in": "query", + "description": "Optional. Filter by MediaType. Allows multiple, comma delimited.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "enableUserData", + "in": "query", + "description": "Optional. Include user data.", + "schema": { + "type": "boolean" + } + }, + { + "name": "imageTypeLimit", + "in": "query", + "description": "Optional. The max number of images to return, per image type.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "enableImageTypes", + "in": "query", + "description": "Optional. The image types to include in the output.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ImageType" + } + } + }, + { + "name": "excludeItemTypes", + "in": "query", + "description": "Optional. If specified, results will be filtered based on item type. This allows multiple, comma delimited.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseItemKind" + } + } + }, + { + "name": "includeItemTypes", + "in": "query", + "description": "Optional. If specified, results will be filtered based on the item type. This allows multiple, comma delimited.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseItemKind" + } + } + }, + { + "name": "enableTotalRecordCount", + "in": "query", + "description": "Optional. Enable the total record count.", + "schema": { + "type": "boolean", + "default": true + } + }, + { + "name": "enableImages", + "in": "query", + "description": "Optional. Include image information in output.", + "schema": { + "type": "boolean", + "default": true + } + }, + { + "name": "excludeActiveSessions", + "in": "query", + "description": "Optional. Whether to exclude the currently active sessions.", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "200": { + "description": "Items returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Items/{itemId}": { + "post": { + "tags": [ + "ItemUpdate" + ], + "summary": "Updates an item.", + "operationId": "UpdateItem", + "parameters": [ + { + "name": "itemId", + "in": "path", + "description": "The item id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "description": "The new item properties.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseItemDto" + } + ], + "description": "This is strictly used as a data transfer object from the api layer.\r\nThis holds information about a BaseItem in a format that is convenient for the client." + } + }, + "text/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseItemDto" + } + ], + "description": "This is strictly used as a data transfer object from the api layer.\r\nThis holds information about a BaseItem in a format that is convenient for the client." + } + }, + "application/*+json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseItemDto" + } + ], + "description": "This is strictly used as a data transfer object from the api layer.\r\nThis holds information about a BaseItem in a format that is convenient for the client." + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Item updated." + }, + "404": { + "description": "Item not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "RequiresElevation" + ] + } + ] + }, + "delete": { + "tags": [ + "Library" + ], + "summary": "Deletes an item from the library and filesystem.", + "operationId": "DeleteItem", + "parameters": [ + { + "name": "itemId", + "in": "path", + "description": "The item id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "204": { + "description": "Item deleted." + }, + "401": { + "description": "Unauthorized access.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Items/{itemId}/ContentType": { + "post": { + "tags": [ + "ItemUpdate" + ], + "summary": "Updates an item's content type.", + "operationId": "UpdateItemContentType", + "parameters": [ + { + "name": "itemId", + "in": "path", + "description": "The item id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "contentType", + "in": "query", + "description": "The content type of the item.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Item content type updated." + }, + "404": { + "description": "Item not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "RequiresElevation" + ] + } + ] + } + }, + "/Items/{itemId}/MetadataEditor": { + "get": { + "tags": [ + "ItemUpdate" + ], + "summary": "Gets metadata editor info for an item.", + "operationId": "GetMetadataEditorInfo", + "parameters": [ + { + "name": "itemId", + "in": "path", + "description": "The item id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Item metadata editor returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MetadataEditorInfo" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/MetadataEditorInfo" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/MetadataEditorInfo" + } + } + } + }, + "404": { + "description": "Item not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "RequiresElevation" + ] + } + ] + } + }, + "/Albums/{itemId}/Similar": { + "get": { + "tags": [ + "Library" + ], + "summary": "Gets similar items.", + "operationId": "GetSimilarAlbums", + "parameters": [ + { + "name": "itemId", + "in": "path", + "description": "The item id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "excludeArtistIds", + "in": "query", + "description": "Exclude artist ids.", + "schema": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + }, + { + "name": "userId", + "in": "query", + "description": "Optional. Filter by user id, and attach user data.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "limit", + "in": "query", + "description": "Optional. The maximum number of records to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "fields", + "in": "query", + "description": "Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimited. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines, TrailerUrls.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ItemFields" + } + } + } + ], + "responses": { + "200": { + "description": "Similar items returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Artists/{itemId}/Similar": { + "get": { + "tags": [ + "Library" + ], + "summary": "Gets similar items.", + "operationId": "GetSimilarArtists", + "parameters": [ + { + "name": "itemId", + "in": "path", + "description": "The item id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "excludeArtistIds", + "in": "query", + "description": "Exclude artist ids.", + "schema": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + }, + { + "name": "userId", + "in": "query", + "description": "Optional. Filter by user id, and attach user data.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "limit", + "in": "query", + "description": "Optional. The maximum number of records to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "fields", + "in": "query", + "description": "Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimited. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines, TrailerUrls.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ItemFields" + } + } + } + ], + "responses": { + "200": { + "description": "Similar items returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Items/{itemId}/Ancestors": { + "get": { + "tags": [ + "Library" + ], + "summary": "Gets all parents of an item.", + "operationId": "GetAncestors", + "parameters": [ + { + "name": "itemId", + "in": "path", + "description": "The item id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "userId", + "in": "query", + "description": "Optional. Filter by user id, and attach user data.", + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Item parents returned.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseItemDto" + } + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseItemDto" + } + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseItemDto" + } + } + } + } + }, + "404": { + "description": "Item not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Items/{itemId}/CriticReviews": { + "get": { + "tags": [ + "Library" + ], + "summary": "Gets critic review for an item.", + "operationId": "GetCriticReviews", + "parameters": [ + { + "name": "itemId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Critic reviews returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "deprecated": true, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Items/{itemId}/Download": { + "get": { + "tags": [ + "Library" + ], + "summary": "Downloads item media.", + "operationId": "GetDownload", + "parameters": [ + { + "name": "itemId", + "in": "path", + "description": "The item id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Media downloaded.", + "content": { + "video/*": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "audio/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "404": { + "description": "Item not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "Download" + ] + } + ] + } + }, + "/Items/{itemId}/File": { + "get": { + "tags": [ + "Library" + ], + "summary": "Get the original file of an item.", + "operationId": "GetFile", + "parameters": [ + { + "name": "itemId", + "in": "path", + "description": "The item id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "File stream returned.", + "content": { + "video/*": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "audio/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "404": { + "description": "Item not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Items/{itemId}/Similar": { + "get": { + "tags": [ + "Library" + ], + "summary": "Gets similar items.", + "operationId": "GetSimilarItems", + "parameters": [ + { + "name": "itemId", + "in": "path", + "description": "The item id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "excludeArtistIds", + "in": "query", + "description": "Exclude artist ids.", + "schema": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + }, + { + "name": "userId", + "in": "query", + "description": "Optional. Filter by user id, and attach user data.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "limit", + "in": "query", + "description": "Optional. The maximum number of records to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "fields", + "in": "query", + "description": "Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimited. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines, TrailerUrls.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ItemFields" + } + } + } + ], + "responses": { + "200": { + "description": "Similar items returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Items/{itemId}/ThemeMedia": { + "get": { + "tags": [ + "Library" + ], + "summary": "Get theme songs and videos for an item.", + "operationId": "GetThemeMedia", + "parameters": [ + { + "name": "itemId", + "in": "path", + "description": "The item id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "userId", + "in": "query", + "description": "Optional. Filter by user id, and attach user data.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "inheritFromParent", + "in": "query", + "description": "Optional. Determines whether or not parent items should be searched for theme media.", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "200": { + "description": "Theme songs and videos returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AllThemeMediaResult" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/AllThemeMediaResult" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/AllThemeMediaResult" + } + } + } + }, + "404": { + "description": "Item not found." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Items/{itemId}/ThemeSongs": { + "get": { + "tags": [ + "Library" + ], + "summary": "Get theme songs for an item.", + "operationId": "GetThemeSongs", + "parameters": [ + { + "name": "itemId", + "in": "path", + "description": "The item id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "userId", + "in": "query", + "description": "Optional. Filter by user id, and attach user data.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "inheritFromParent", + "in": "query", + "description": "Optional. Determines whether or not parent items should be searched for theme media.", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "200": { + "description": "Theme songs returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThemeMediaResult" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ThemeMediaResult" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ThemeMediaResult" + } + } + } + }, + "404": { + "description": "Item not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Items/{itemId}/ThemeVideos": { + "get": { + "tags": [ + "Library" + ], + "summary": "Get theme videos for an item.", + "operationId": "GetThemeVideos", + "parameters": [ + { + "name": "itemId", + "in": "path", + "description": "The item id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "userId", + "in": "query", + "description": "Optional. Filter by user id, and attach user data.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "inheritFromParent", + "in": "query", + "description": "Optional. Determines whether or not parent items should be searched for theme media.", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "200": { + "description": "Theme videos returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThemeMediaResult" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ThemeMediaResult" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ThemeMediaResult" + } + } + } + }, + "404": { + "description": "Item not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Items/Counts": { + "get": { + "tags": [ + "Library" + ], + "summary": "Get item counts.", + "operationId": "GetItemCounts", + "parameters": [ + { + "name": "userId", + "in": "query", + "description": "Optional. Get counts from a specific user's library.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "isFavorite", + "in": "query", + "description": "Optional. Get counts of favorite items.", + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "Item counts returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ItemCounts" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ItemCounts" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ItemCounts" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Libraries/AvailableOptions": { + "get": { + "tags": [ + "Library" + ], + "summary": "Gets the library options info.", + "operationId": "GetLibraryOptionsInfo", + "parameters": [ + { + "name": "libraryContentType", + "in": "query", + "description": "Library content type.", + "schema": { + "type": "string" + } + }, + { + "name": "isNewLibrary", + "in": "query", + "description": "Whether this is a new library.", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "200": { + "description": "Library options info returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LibraryOptionsResultDto" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/LibraryOptionsResultDto" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/LibraryOptionsResultDto" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "FirstTimeSetupOrDefault" + ] + } + ] + } + }, + "/Library/Media/Updated": { + "post": { + "tags": [ + "Library" + ], + "summary": "Reports that new movies have been added by an external source.", + "operationId": "PostUpdatedMedia", + "requestBody": { + "description": "The update paths.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/MediaUpdateInfoDto" + } + ], + "description": "Media Update Info Dto." + } + }, + "text/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/MediaUpdateInfoDto" + } + ], + "description": "Media Update Info Dto." + } + }, + "application/*+json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/MediaUpdateInfoDto" + } + ], + "description": "Media Update Info Dto." + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Report success." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Library/MediaFolders": { + "get": { + "tags": [ + "Library" + ], + "summary": "Gets all user media folders.", + "operationId": "GetMediaFolders", + "parameters": [ + { + "name": "isHidden", + "in": "query", + "description": "Optional. Filter by folders that are marked hidden, or not.", + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "Media folders returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "RequiresElevation" + ] + } + ] + } + }, + "/Library/Movies/Added": { + "post": { + "tags": [ + "Library" + ], + "summary": "Reports that new movies have been added by an external source.", + "operationId": "PostAddedMovies", + "parameters": [ + { + "name": "tmdbId", + "in": "query", + "description": "The tmdbId.", + "schema": { + "type": "string" + } + }, + { + "name": "imdbId", + "in": "query", + "description": "The imdbId.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Report success." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Library/Movies/Updated": { + "post": { + "tags": [ + "Library" + ], + "summary": "Reports that new movies have been added by an external source.", + "operationId": "PostUpdatedMovies", + "parameters": [ + { + "name": "tmdbId", + "in": "query", + "description": "The tmdbId.", + "schema": { + "type": "string" + } + }, + { + "name": "imdbId", + "in": "query", + "description": "The imdbId.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Report success." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Library/PhysicalPaths": { + "get": { + "tags": [ + "Library" + ], + "summary": "Gets a list of physical paths from virtual folders.", + "operationId": "GetPhysicalPaths", + "responses": { + "200": { + "description": "Physical paths returned.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "RequiresElevation" + ] + } + ] + } + }, + "/Library/Refresh": { + "post": { + "tags": [ + "Library" + ], + "summary": "Starts a library scan.", + "operationId": "RefreshLibrary", + "responses": { + "204": { + "description": "Library scan started." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "RequiresElevation" + ] + } + ] + } + }, + "/Library/Series/Added": { + "post": { + "tags": [ + "Library" + ], + "summary": "Reports that new episodes of a series have been added by an external source.", + "operationId": "PostAddedSeries", + "parameters": [ + { + "name": "tvdbId", + "in": "query", + "description": "The tvdbId.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Report success." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Library/Series/Updated": { + "post": { + "tags": [ + "Library" + ], + "summary": "Reports that new episodes of a series have been added by an external source.", + "operationId": "PostUpdatedSeries", + "parameters": [ + { + "name": "tvdbId", + "in": "query", + "description": "The tvdbId.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Report success." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Movies/{itemId}/Similar": { + "get": { + "tags": [ + "Library" + ], + "summary": "Gets similar items.", + "operationId": "GetSimilarMovies", + "parameters": [ + { + "name": "itemId", + "in": "path", + "description": "The item id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "excludeArtistIds", + "in": "query", + "description": "Exclude artist ids.", + "schema": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + }, + { + "name": "userId", + "in": "query", + "description": "Optional. Filter by user id, and attach user data.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "limit", + "in": "query", + "description": "Optional. The maximum number of records to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "fields", + "in": "query", + "description": "Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimited. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines, TrailerUrls.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ItemFields" + } + } + } + ], + "responses": { + "200": { + "description": "Similar items returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Shows/{itemId}/Similar": { + "get": { + "tags": [ + "Library" + ], + "summary": "Gets similar items.", + "operationId": "GetSimilarShows", + "parameters": [ + { + "name": "itemId", + "in": "path", + "description": "The item id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "excludeArtistIds", + "in": "query", + "description": "Exclude artist ids.", + "schema": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + }, + { + "name": "userId", + "in": "query", + "description": "Optional. Filter by user id, and attach user data.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "limit", + "in": "query", + "description": "Optional. The maximum number of records to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "fields", + "in": "query", + "description": "Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimited. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines, TrailerUrls.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ItemFields" + } + } + } + ], + "responses": { + "200": { + "description": "Similar items returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Trailers/{itemId}/Similar": { + "get": { + "tags": [ + "Library" + ], + "summary": "Gets similar items.", + "operationId": "GetSimilarTrailers", + "parameters": [ + { + "name": "itemId", + "in": "path", + "description": "The item id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "excludeArtistIds", + "in": "query", + "description": "Exclude artist ids.", + "schema": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + }, + { + "name": "userId", + "in": "query", + "description": "Optional. Filter by user id, and attach user data.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "limit", + "in": "query", + "description": "Optional. The maximum number of records to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "fields", + "in": "query", + "description": "Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimited. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines, TrailerUrls.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ItemFields" + } + } + } + ], + "responses": { + "200": { + "description": "Similar items returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Library/VirtualFolders": { + "get": { + "tags": [ + "LibraryStructure" + ], + "summary": "Gets all virtual folders.", + "operationId": "GetVirtualFolders", + "responses": { + "200": { + "description": "Virtual folders retrieved.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/VirtualFolderInfo" + } + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/VirtualFolderInfo" + } + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/VirtualFolderInfo" + } + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "FirstTimeSetupOrElevated" + ] + } + ] + }, + "post": { + "tags": [ + "LibraryStructure" + ], + "summary": "Adds a virtual folder.", + "operationId": "AddVirtualFolder", + "parameters": [ + { + "name": "name", + "in": "query", + "description": "The name of the virtual folder.", + "schema": { + "type": "string" + } + }, + { + "name": "collectionType", + "in": "query", + "description": "The type of the collection.", + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/CollectionTypeOptions" + } + ] + } + }, + { + "name": "paths", + "in": "query", + "description": "The paths of the virtual folder.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "refreshLibrary", + "in": "query", + "description": "Whether to refresh the library.", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "requestBody": { + "description": "The library options.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/AddVirtualFolderDto" + } + ], + "description": "Add virtual folder dto." + } + }, + "text/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/AddVirtualFolderDto" + } + ], + "description": "Add virtual folder dto." + } + }, + "application/*+json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/AddVirtualFolderDto" + } + ], + "description": "Add virtual folder dto." + } + } + } + }, + "responses": { + "204": { + "description": "Folder added." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "FirstTimeSetupOrElevated" + ] + } + ] + }, + "delete": { + "tags": [ + "LibraryStructure" + ], + "summary": "Removes a virtual folder.", + "operationId": "RemoveVirtualFolder", + "parameters": [ + { + "name": "name", + "in": "query", + "description": "The name of the folder.", + "schema": { + "type": "string" + } + }, + { + "name": "refreshLibrary", + "in": "query", + "description": "Whether to refresh the library.", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "204": { + "description": "Folder removed." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "FirstTimeSetupOrElevated" + ] + } + ] + } + }, + "/Library/VirtualFolders/LibraryOptions": { + "post": { + "tags": [ + "LibraryStructure" + ], + "summary": "Update library options.", + "operationId": "UpdateLibraryOptions", + "requestBody": { + "description": "The library name and options.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/UpdateLibraryOptionsDto" + } + ], + "description": "Update library options dto." + } + }, + "text/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/UpdateLibraryOptionsDto" + } + ], + "description": "Update library options dto." + } + }, + "application/*+json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/UpdateLibraryOptionsDto" + } + ], + "description": "Update library options dto." + } + } + } + }, + "responses": { + "204": { + "description": "Library updated." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "FirstTimeSetupOrElevated" + ] + } + ] + } + }, + "/Library/VirtualFolders/Name": { + "post": { + "tags": [ + "LibraryStructure" + ], + "summary": "Renames a virtual folder.", + "operationId": "RenameVirtualFolder", + "parameters": [ + { + "name": "name", + "in": "query", + "description": "The name of the virtual folder.", + "schema": { + "type": "string" + } + }, + { + "name": "newName", + "in": "query", + "description": "The new name.", + "schema": { + "type": "string" + } + }, + { + "name": "refreshLibrary", + "in": "query", + "description": "Whether to refresh the library.", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "204": { + "description": "Folder renamed." + }, + "404": { + "description": "Library doesn't exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "409": { + "description": "Library already exists.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "FirstTimeSetupOrElevated" + ] + } + ] + } + }, + "/Library/VirtualFolders/Paths": { + "post": { + "tags": [ + "LibraryStructure" + ], + "summary": "Add a media path to a library.", + "operationId": "AddMediaPath", + "parameters": [ + { + "name": "refreshLibrary", + "in": "query", + "description": "Whether to refresh the library.", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "requestBody": { + "description": "The media path dto.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/MediaPathDto" + } + ], + "description": "Media Path dto." + } + }, + "text/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/MediaPathDto" + } + ], + "description": "Media Path dto." + } + }, + "application/*+json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/MediaPathDto" + } + ], + "description": "Media Path dto." + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Media path added." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "FirstTimeSetupOrElevated" + ] + } + ] + }, + "delete": { + "tags": [ + "LibraryStructure" + ], + "summary": "Remove a media path.", + "operationId": "RemoveMediaPath", + "parameters": [ + { + "name": "name", + "in": "query", + "description": "The name of the library.", + "schema": { + "type": "string" + } + }, + { + "name": "path", + "in": "query", + "description": "The path to remove.", + "schema": { + "type": "string" + } + }, + { + "name": "refreshLibrary", + "in": "query", + "description": "Whether to refresh the library.", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "204": { + "description": "Media path removed." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "FirstTimeSetupOrElevated" + ] + } + ] + } + }, + "/Library/VirtualFolders/Paths/Update": { + "post": { + "tags": [ + "LibraryStructure" + ], + "summary": "Updates a media path.", + "operationId": "UpdateMediaPath", + "requestBody": { + "description": "The name of the library and path infos.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/UpdateMediaPathRequestDto" + } + ], + "description": "Update library options dto." + } + }, + "text/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/UpdateMediaPathRequestDto" + } + ], + "description": "Update library options dto." + } + }, + "application/*+json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/UpdateMediaPathRequestDto" + } + ], + "description": "Update library options dto." + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Media path updated." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "FirstTimeSetupOrElevated" + ] + } + ] + } + }, + "/LiveTv/ChannelMappingOptions": { + "get": { + "tags": [ + "LiveTv" + ], + "summary": "Get channel mapping options.", + "operationId": "GetChannelMappingOptions", + "parameters": [ + { + "name": "providerId", + "in": "query", + "description": "Provider id.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Channel mapping options returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChannelMappingOptionsDto" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ChannelMappingOptionsDto" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ChannelMappingOptionsDto" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "LiveTvAccess" + ] + } + ] + } + }, + "/LiveTv/ChannelMappings": { + "post": { + "tags": [ + "LiveTv" + ], + "summary": "Set channel mappings.", + "operationId": "SetChannelMapping", + "requestBody": { + "description": "The set channel mapping dto.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SetChannelMappingDto" + } + ], + "description": "Set channel mapping dto." + } + }, + "text/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SetChannelMappingDto" + } + ], + "description": "Set channel mapping dto." + } + }, + "application/*+json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SetChannelMappingDto" + } + ], + "description": "Set channel mapping dto." + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Created channel mapping returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TunerChannelMapping" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/TunerChannelMapping" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/TunerChannelMapping" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "LiveTvManagement" + ] + } + ] + } + }, + "/LiveTv/Channels": { + "get": { + "tags": [ + "LiveTv" + ], + "summary": "Gets available live tv channels.", + "operationId": "GetLiveTvChannels", + "parameters": [ + { + "name": "type", + "in": "query", + "description": "Optional. Filter by channel type.", + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ChannelType" + } + ] + } + }, + { + "name": "userId", + "in": "query", + "description": "Optional. Filter by user and attach user data.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "startIndex", + "in": "query", + "description": "Optional. The record index to start at. All items with a lower index will be dropped from the results.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "isMovie", + "in": "query", + "description": "Optional. Filter for movies.", + "schema": { + "type": "boolean" + } + }, + { + "name": "isSeries", + "in": "query", + "description": "Optional. Filter for series.", + "schema": { + "type": "boolean" + } + }, + { + "name": "isNews", + "in": "query", + "description": "Optional. Filter for news.", + "schema": { + "type": "boolean" + } + }, + { + "name": "isKids", + "in": "query", + "description": "Optional. Filter for kids.", + "schema": { + "type": "boolean" + } + }, + { + "name": "isSports", + "in": "query", + "description": "Optional. Filter for sports.", + "schema": { + "type": "boolean" + } + }, + { + "name": "limit", + "in": "query", + "description": "Optional. The maximum number of records to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "isFavorite", + "in": "query", + "description": "Optional. Filter by channels that are favorites, or not.", + "schema": { + "type": "boolean" + } + }, + { + "name": "isLiked", + "in": "query", + "description": "Optional. Filter by channels that are liked, or not.", + "schema": { + "type": "boolean" + } + }, + { + "name": "isDisliked", + "in": "query", + "description": "Optional. Filter by channels that are disliked, or not.", + "schema": { + "type": "boolean" + } + }, + { + "name": "enableImages", + "in": "query", + "description": "Optional. Include image information in output.", + "schema": { + "type": "boolean" + } + }, + { + "name": "imageTypeLimit", + "in": "query", + "description": "Optional. The max number of images to return, per image type.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "enableImageTypes", + "in": "query", + "description": "\"Optional. The image types to include in the output.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ImageType" + } + } + }, + { + "name": "fields", + "in": "query", + "description": "Optional. Specify additional fields of information to return in the output.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ItemFields" + } + } + }, + { + "name": "enableUserData", + "in": "query", + "description": "Optional. Include user data.", + "schema": { + "type": "boolean" + } + }, + { + "name": "sortBy", + "in": "query", + "description": "Optional. Key to sort by.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Optional. Sort order.", + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SortOrder" + } + ] + } + }, + { + "name": "enableFavoriteSorting", + "in": "query", + "description": "Optional. Incorporate favorite and like status into channel sorting.", + "schema": { + "type": "boolean", + "default": false + } + }, + { + "name": "addCurrentProgram", + "in": "query", + "description": "Optional. Adds current program info to each channel.", + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Available live tv channels returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "LiveTvAccess" + ] + } + ] + } + }, + "/LiveTv/Channels/{channelId}": { + "get": { + "tags": [ + "LiveTv" + ], + "summary": "Gets a live tv channel.", + "operationId": "GetChannel", + "parameters": [ + { + "name": "channelId", + "in": "path", + "description": "Channel id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "userId", + "in": "query", + "description": "Optional. Attach user data.", + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Live tv channel returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BaseItemDto" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDto" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDto" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "LiveTvAccess" + ] + } + ] + } + }, + "/LiveTv/GuideInfo": { + "get": { + "tags": [ + "LiveTv" + ], + "summary": "Get guid info.", + "operationId": "GetGuideInfo", + "responses": { + "200": { + "description": "Guid info returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GuideInfo" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/GuideInfo" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/GuideInfo" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "LiveTvAccess" + ] + } + ] + } + }, + "/LiveTv/Info": { + "get": { + "tags": [ + "LiveTv" + ], + "summary": "Gets available live tv services.", + "operationId": "GetLiveTvInfo", + "responses": { + "200": { + "description": "Available live tv services returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LiveTvInfo" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/LiveTvInfo" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/LiveTvInfo" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "LiveTvAccess" + ] + } + ] + } + }, + "/LiveTv/ListingProviders": { + "post": { + "tags": [ + "LiveTv" + ], + "summary": "Adds a listings provider.", + "operationId": "AddListingProvider", + "parameters": [ + { + "name": "pw", + "in": "query", + "description": "Password.", + "schema": { + "type": "string" + } + }, + { + "name": "validateListings", + "in": "query", + "description": "Validate listings.", + "schema": { + "type": "boolean", + "default": false + } + }, + { + "name": "validateLogin", + "in": "query", + "description": "Validate login.", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "requestBody": { + "description": "New listings info.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ListingsProviderInfo" + } + ] + } + }, + "text/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ListingsProviderInfo" + } + ] + } + }, + "application/*+json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ListingsProviderInfo" + } + ] + } + } + } + }, + "responses": { + "200": { + "description": "Created listings provider returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListingsProviderInfo" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ListingsProviderInfo" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ListingsProviderInfo" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "LiveTvManagement" + ] + } + ] + }, + "delete": { + "tags": [ + "LiveTv" + ], + "summary": "Delete listing provider.", + "operationId": "DeleteListingProvider", + "parameters": [ + { + "name": "id", + "in": "query", + "description": "Listing provider id.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Listing provider deleted." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "LiveTvManagement" + ] + } + ] + } + }, + "/LiveTv/ListingProviders/Default": { + "get": { + "tags": [ + "LiveTv" + ], + "summary": "Gets default listings provider info.", + "operationId": "GetDefaultListingProvider", + "responses": { + "200": { + "description": "Default listings provider info returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListingsProviderInfo" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ListingsProviderInfo" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ListingsProviderInfo" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "LiveTvAccess" + ] + } + ] + } + }, + "/LiveTv/ListingProviders/Lineups": { + "get": { + "tags": [ + "LiveTv" + ], + "summary": "Gets available lineups.", + "operationId": "GetLineups", + "parameters": [ + { + "name": "id", + "in": "query", + "description": "Provider id.", + "schema": { + "type": "string" + } + }, + { + "name": "type", + "in": "query", + "description": "Provider type.", + "schema": { + "type": "string" + } + }, + { + "name": "location", + "in": "query", + "description": "Location.", + "schema": { + "type": "string" + } + }, + { + "name": "country", + "in": "query", + "description": "Country.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Available lineups returned.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NameIdPair" + } + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NameIdPair" + } + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NameIdPair" + } + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "LiveTvAccess" + ] + } + ] + } + }, + "/LiveTv/ListingProviders/SchedulesDirect/Countries": { + "get": { + "tags": [ + "LiveTv" + ], + "summary": "Gets available countries.", + "operationId": "GetSchedulesDirectCountries", + "responses": { + "200": { + "description": "Available countries returned.", + "content": { + "application/json": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "LiveTvAccess" + ] + } + ] + } + }, + "/LiveTv/LiveRecordings/{recordingId}/stream": { + "get": { + "tags": [ + "LiveTv" + ], + "summary": "Gets a live tv recording stream.", + "operationId": "GetLiveRecordingFile", + "parameters": [ + { + "name": "recordingId", + "in": "path", + "description": "Recording id.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Recording stream returned.", + "content": { + "video/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "404": { + "description": "Recording not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + } + } + }, + "/LiveTv/LiveStreamFiles/{streamId}/stream.{container}": { + "get": { + "tags": [ + "LiveTv" + ], + "summary": "Gets a live tv channel stream.", + "operationId": "GetLiveStreamFile", + "parameters": [ + { + "name": "streamId", + "in": "path", + "description": "Stream id.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "container", + "in": "path", + "description": "Container type.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Stream returned.", + "content": { + "video/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "404": { + "description": "Stream not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + } + } + }, + "/LiveTv/Programs": { + "get": { + "tags": [ + "LiveTv" + ], + "summary": "Gets available live tv epgs.", + "operationId": "GetLiveTvPrograms", + "parameters": [ + { + "name": "channelIds", + "in": "query", + "description": "The channels to return guide information for.", + "schema": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + }, + { + "name": "userId", + "in": "query", + "description": "Optional. Filter by user id.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "minStartDate", + "in": "query", + "description": "Optional. The minimum premiere start date.", + "schema": { + "type": "string", + "format": "date-time" + } + }, + { + "name": "hasAired", + "in": "query", + "description": "Optional. Filter by programs that have completed airing, or not.", + "schema": { + "type": "boolean" + } + }, + { + "name": "isAiring", + "in": "query", + "description": "Optional. Filter by programs that are currently airing, or not.", + "schema": { + "type": "boolean" + } + }, + { + "name": "maxStartDate", + "in": "query", + "description": "Optional. The maximum premiere start date.", + "schema": { + "type": "string", + "format": "date-time" + } + }, + { + "name": "minEndDate", + "in": "query", + "description": "Optional. The minimum premiere end date.", + "schema": { + "type": "string", + "format": "date-time" + } + }, + { + "name": "maxEndDate", + "in": "query", + "description": "Optional. The maximum premiere end date.", + "schema": { + "type": "string", + "format": "date-time" + } + }, + { + "name": "isMovie", + "in": "query", + "description": "Optional. Filter for movies.", + "schema": { + "type": "boolean" + } + }, + { + "name": "isSeries", + "in": "query", + "description": "Optional. Filter for series.", + "schema": { + "type": "boolean" + } + }, + { + "name": "isNews", + "in": "query", + "description": "Optional. Filter for news.", + "schema": { + "type": "boolean" + } + }, + { + "name": "isKids", + "in": "query", + "description": "Optional. Filter for kids.", + "schema": { + "type": "boolean" + } + }, + { + "name": "isSports", + "in": "query", + "description": "Optional. Filter for sports.", + "schema": { + "type": "boolean" + } + }, + { + "name": "startIndex", + "in": "query", + "description": "Optional. The record index to start at. All items with a lower index will be dropped from the results.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "limit", + "in": "query", + "description": "Optional. The maximum number of records to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "sortBy", + "in": "query", + "description": "Optional. Specify one or more sort orders, comma delimited. Options: Name, StartDate.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort Order - Ascending,Descending.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SortOrder" + } + } + }, + { + "name": "genres", + "in": "query", + "description": "The genres to return guide information for.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "genreIds", + "in": "query", + "description": "The genre ids to return guide information for.", + "schema": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + }, + { + "name": "enableImages", + "in": "query", + "description": "Optional. Include image information in output.", + "schema": { + "type": "boolean" + } + }, + { + "name": "imageTypeLimit", + "in": "query", + "description": "Optional. The max number of images to return, per image type.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "enableImageTypes", + "in": "query", + "description": "Optional. The image types to include in the output.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ImageType" + } + } + }, + { + "name": "enableUserData", + "in": "query", + "description": "Optional. Include user data.", + "schema": { + "type": "boolean" + } + }, + { + "name": "seriesTimerId", + "in": "query", + "description": "Optional. Filter by series timer id.", + "schema": { + "type": "string" + } + }, + { + "name": "librarySeriesId", + "in": "query", + "description": "Optional. Filter by library series id.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "fields", + "in": "query", + "description": "Optional. Specify additional fields of information to return in the output.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ItemFields" + } + } + }, + { + "name": "enableTotalRecordCount", + "in": "query", + "description": "Retrieve total record count.", + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Live tv epgs returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "LiveTvAccess" + ] + } + ] + }, + "post": { + "tags": [ + "LiveTv" + ], + "summary": "Gets available live tv epgs.", + "operationId": "GetPrograms", + "requestBody": { + "description": "Request body.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/GetProgramsDto" + } + ], + "description": "Get programs dto." + } + }, + "text/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/GetProgramsDto" + } + ], + "description": "Get programs dto." + } + }, + "application/*+json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/GetProgramsDto" + } + ], + "description": "Get programs dto." + } + } + } + }, + "responses": { + "200": { + "description": "Live tv epgs returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "LiveTvAccess" + ] + } + ] + } + }, + "/LiveTv/Programs/{programId}": { + "get": { + "tags": [ + "LiveTv" + ], + "summary": "Gets a live tv program.", + "operationId": "GetProgram", + "parameters": [ + { + "name": "programId", + "in": "path", + "description": "Program id.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "userId", + "in": "query", + "description": "Optional. Attach user data.", + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Program returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BaseItemDto" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDto" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDto" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "LiveTvAccess" + ] + } + ] + } + }, + "/LiveTv/Programs/Recommended": { + "get": { + "tags": [ + "LiveTv" + ], + "summary": "Gets recommended live tv epgs.", + "operationId": "GetRecommendedPrograms", + "parameters": [ + { + "name": "userId", + "in": "query", + "description": "Optional. filter by user id.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "limit", + "in": "query", + "description": "Optional. The maximum number of records to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "isAiring", + "in": "query", + "description": "Optional. Filter by programs that are currently airing, or not.", + "schema": { + "type": "boolean" + } + }, + { + "name": "hasAired", + "in": "query", + "description": "Optional. Filter by programs that have completed airing, or not.", + "schema": { + "type": "boolean" + } + }, + { + "name": "isSeries", + "in": "query", + "description": "Optional. Filter for series.", + "schema": { + "type": "boolean" + } + }, + { + "name": "isMovie", + "in": "query", + "description": "Optional. Filter for movies.", + "schema": { + "type": "boolean" + } + }, + { + "name": "isNews", + "in": "query", + "description": "Optional. Filter for news.", + "schema": { + "type": "boolean" + } + }, + { + "name": "isKids", + "in": "query", + "description": "Optional. Filter for kids.", + "schema": { + "type": "boolean" + } + }, + { + "name": "isSports", + "in": "query", + "description": "Optional. Filter for sports.", + "schema": { + "type": "boolean" + } + }, + { + "name": "enableImages", + "in": "query", + "description": "Optional. Include image information in output.", + "schema": { + "type": "boolean" + } + }, + { + "name": "imageTypeLimit", + "in": "query", + "description": "Optional. The max number of images to return, per image type.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "enableImageTypes", + "in": "query", + "description": "Optional. The image types to include in the output.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ImageType" + } + } + }, + { + "name": "genreIds", + "in": "query", + "description": "The genres to return guide information for.", + "schema": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + }, + { + "name": "fields", + "in": "query", + "description": "Optional. Specify additional fields of information to return in the output.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ItemFields" + } + } + }, + { + "name": "enableUserData", + "in": "query", + "description": "Optional. include user data.", + "schema": { + "type": "boolean" + } + }, + { + "name": "enableTotalRecordCount", + "in": "query", + "description": "Retrieve total record count.", + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Recommended epgs returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "LiveTvAccess" + ] + } + ] + } + }, + "/LiveTv/Recordings": { + "get": { + "tags": [ + "LiveTv" + ], + "summary": "Gets live tv recordings.", + "operationId": "GetRecordings", + "parameters": [ + { + "name": "channelId", + "in": "query", + "description": "Optional. Filter by channel id.", + "schema": { + "type": "string" + } + }, + { + "name": "userId", + "in": "query", + "description": "Optional. Filter by user and attach user data.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "startIndex", + "in": "query", + "description": "Optional. The record index to start at. All items with a lower index will be dropped from the results.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "limit", + "in": "query", + "description": "Optional. The maximum number of records to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "status", + "in": "query", + "description": "Optional. Filter by recording status.", + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/RecordingStatus" + } + ] + } + }, + { + "name": "isInProgress", + "in": "query", + "description": "Optional. Filter by recordings that are in progress, or not.", + "schema": { + "type": "boolean" + } + }, + { + "name": "seriesTimerId", + "in": "query", + "description": "Optional. Filter by recordings belonging to a series timer.", + "schema": { + "type": "string" + } + }, + { + "name": "enableImages", + "in": "query", + "description": "Optional. Include image information in output.", + "schema": { + "type": "boolean" + } + }, + { + "name": "imageTypeLimit", + "in": "query", + "description": "Optional. The max number of images to return, per image type.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "enableImageTypes", + "in": "query", + "description": "Optional. The image types to include in the output.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ImageType" + } + } + }, + { + "name": "fields", + "in": "query", + "description": "Optional. Specify additional fields of information to return in the output.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ItemFields" + } + } + }, + { + "name": "enableUserData", + "in": "query", + "description": "Optional. Include user data.", + "schema": { + "type": "boolean" + } + }, + { + "name": "isMovie", + "in": "query", + "description": "Optional. Filter for movies.", + "schema": { + "type": "boolean" + } + }, + { + "name": "isSeries", + "in": "query", + "description": "Optional. Filter for series.", + "schema": { + "type": "boolean" + } + }, + { + "name": "isKids", + "in": "query", + "description": "Optional. Filter for kids.", + "schema": { + "type": "boolean" + } + }, + { + "name": "isSports", + "in": "query", + "description": "Optional. Filter for sports.", + "schema": { + "type": "boolean" + } + }, + { + "name": "isNews", + "in": "query", + "description": "Optional. Filter for news.", + "schema": { + "type": "boolean" + } + }, + { + "name": "isLibraryItem", + "in": "query", + "description": "Optional. Filter for is library item.", + "schema": { + "type": "boolean" + } + }, + { + "name": "enableTotalRecordCount", + "in": "query", + "description": "Optional. Return total record count.", + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Live tv recordings returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "LiveTvAccess" + ] + } + ] + } + }, + "/LiveTv/Recordings/{recordingId}": { + "get": { + "tags": [ + "LiveTv" + ], + "summary": "Gets a live tv recording.", + "operationId": "GetRecording", + "parameters": [ + { + "name": "recordingId", + "in": "path", + "description": "Recording id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "userId", + "in": "query", + "description": "Optional. Attach user data.", + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Recording returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BaseItemDto" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDto" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDto" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "LiveTvAccess" + ] + } + ] + }, + "delete": { + "tags": [ + "LiveTv" + ], + "summary": "Deletes a live tv recording.", + "operationId": "DeleteRecording", + "parameters": [ + { + "name": "recordingId", + "in": "path", + "description": "Recording id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "204": { + "description": "Recording deleted." + }, + "404": { + "description": "Item not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "LiveTvManagement" + ] + } + ] + } + }, + "/LiveTv/Recordings/Folders": { + "get": { + "tags": [ + "LiveTv" + ], + "summary": "Gets recording folders.", + "operationId": "GetRecordingFolders", + "parameters": [ + { + "name": "userId", + "in": "query", + "description": "Optional. Filter by user and attach user data.", + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Recording folders returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "LiveTvAccess" + ] + } + ] + } + }, + "/LiveTv/Recordings/Groups": { + "get": { + "tags": [ + "LiveTv" + ], + "summary": "Gets live tv recording groups.", + "operationId": "GetRecordingGroups", + "parameters": [ + { + "name": "userId", + "in": "query", + "description": "Optional. Filter by user and attach user data.", + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Recording groups returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "deprecated": true, + "security": [ + { + "CustomAuthentication": [ + "LiveTvAccess" + ] + } + ] + } + }, + "/LiveTv/Recordings/Groups/{groupId}": { + "get": { + "tags": [ + "LiveTv" + ], + "summary": "Get recording group.", + "operationId": "GetRecordingGroup", + "parameters": [ + { + "name": "groupId", + "in": "path", + "description": "Group id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "deprecated": true, + "security": [ + { + "CustomAuthentication": [ + "LiveTvAccess" + ] + } + ] + } + }, + "/LiveTv/Recordings/Series": { + "get": { + "tags": [ + "LiveTv" + ], + "summary": "Gets live tv recording series.", + "operationId": "GetRecordingsSeries", + "parameters": [ + { + "name": "channelId", + "in": "query", + "description": "Optional. Filter by channel id.", + "schema": { + "type": "string" + } + }, + { + "name": "userId", + "in": "query", + "description": "Optional. Filter by user and attach user data.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "groupId", + "in": "query", + "description": "Optional. Filter by recording group.", + "schema": { + "type": "string" + } + }, + { + "name": "startIndex", + "in": "query", + "description": "Optional. The record index to start at. All items with a lower index will be dropped from the results.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "limit", + "in": "query", + "description": "Optional. The maximum number of records to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "status", + "in": "query", + "description": "Optional. Filter by recording status.", + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/RecordingStatus" + } + ] + } + }, + { + "name": "isInProgress", + "in": "query", + "description": "Optional. Filter by recordings that are in progress, or not.", + "schema": { + "type": "boolean" + } + }, + { + "name": "seriesTimerId", + "in": "query", + "description": "Optional. Filter by recordings belonging to a series timer.", + "schema": { + "type": "string" + } + }, + { + "name": "enableImages", + "in": "query", + "description": "Optional. Include image information in output.", + "schema": { + "type": "boolean" + } + }, + { + "name": "imageTypeLimit", + "in": "query", + "description": "Optional. The max number of images to return, per image type.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "enableImageTypes", + "in": "query", + "description": "Optional. The image types to include in the output.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ImageType" + } + } + }, + { + "name": "fields", + "in": "query", + "description": "Optional. Specify additional fields of information to return in the output.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ItemFields" + } + } + }, + { + "name": "enableUserData", + "in": "query", + "description": "Optional. Include user data.", + "schema": { + "type": "boolean" + } + }, + { + "name": "enableTotalRecordCount", + "in": "query", + "description": "Optional. Return total record count.", + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Live tv recordings returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "deprecated": true, + "security": [ + { + "CustomAuthentication": [ + "LiveTvAccess" + ] + } + ] + } + }, + "/LiveTv/SeriesTimers": { + "get": { + "tags": [ + "LiveTv" + ], + "summary": "Gets live tv series timers.", + "operationId": "GetSeriesTimers", + "parameters": [ + { + "name": "sortBy", + "in": "query", + "description": "Optional. Sort by SortName or Priority.", + "schema": { + "type": "string" + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Optional. Sort in Ascending or Descending order.", + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SortOrder" + } + ] + } + } + ], + "responses": { + "200": { + "description": "Timers returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SeriesTimerInfoDtoQueryResult" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/SeriesTimerInfoDtoQueryResult" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/SeriesTimerInfoDtoQueryResult" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "LiveTvAccess" + ] + } + ] + }, + "post": { + "tags": [ + "LiveTv" + ], + "summary": "Creates a live tv series timer.", + "operationId": "CreateSeriesTimer", + "requestBody": { + "description": "New series timer info.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SeriesTimerInfoDto" + } + ], + "description": "Class SeriesTimerInfoDto." + } + }, + "text/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SeriesTimerInfoDto" + } + ], + "description": "Class SeriesTimerInfoDto." + } + }, + "application/*+json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SeriesTimerInfoDto" + } + ], + "description": "Class SeriesTimerInfoDto." + } + } + } + }, + "responses": { + "204": { + "description": "Series timer info created." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "LiveTvManagement" + ] + } + ] + } + }, + "/LiveTv/SeriesTimers/{timerId}": { + "get": { + "tags": [ + "LiveTv" + ], + "summary": "Gets a live tv series timer.", + "operationId": "GetSeriesTimer", + "parameters": [ + { + "name": "timerId", + "in": "path", + "description": "Timer id.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Series timer returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SeriesTimerInfoDto" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/SeriesTimerInfoDto" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/SeriesTimerInfoDto" + } + } + } + }, + "404": { + "description": "Series timer not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "LiveTvAccess" + ] + } + ] + }, + "delete": { + "tags": [ + "LiveTv" + ], + "summary": "Cancels a live tv series timer.", + "operationId": "CancelSeriesTimer", + "parameters": [ + { + "name": "timerId", + "in": "path", + "description": "Timer id.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Timer cancelled." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "LiveTvManagement" + ] + } + ] + }, + "post": { + "tags": [ + "LiveTv" + ], + "summary": "Updates a live tv series timer.", + "operationId": "UpdateSeriesTimer", + "parameters": [ + { + "name": "timerId", + "in": "path", + "description": "Timer id.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "New series timer info.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SeriesTimerInfoDto" + } + ], + "description": "Class SeriesTimerInfoDto." + } + }, + "text/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SeriesTimerInfoDto" + } + ], + "description": "Class SeriesTimerInfoDto." + } + }, + "application/*+json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SeriesTimerInfoDto" + } + ], + "description": "Class SeriesTimerInfoDto." + } + } + } + }, + "responses": { + "204": { + "description": "Series timer updated." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "LiveTvManagement" + ] + } + ] + } + }, + "/LiveTv/Timers": { + "get": { + "tags": [ + "LiveTv" + ], + "summary": "Gets the live tv timers.", + "operationId": "GetTimers", + "parameters": [ + { + "name": "channelId", + "in": "query", + "description": "Optional. Filter by channel id.", + "schema": { + "type": "string" + } + }, + { + "name": "seriesTimerId", + "in": "query", + "description": "Optional. Filter by timers belonging to a series timer.", + "schema": { + "type": "string" + } + }, + { + "name": "isActive", + "in": "query", + "description": "Optional. Filter by timers that are active.", + "schema": { + "type": "boolean" + } + }, + { + "name": "isScheduled", + "in": "query", + "description": "Optional. Filter by timers that are scheduled.", + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TimerInfoDtoQueryResult" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/TimerInfoDtoQueryResult" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/TimerInfoDtoQueryResult" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "LiveTvAccess" + ] + } + ] + }, + "post": { + "tags": [ + "LiveTv" + ], + "summary": "Creates a live tv timer.", + "operationId": "CreateTimer", + "requestBody": { + "description": "New timer info.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/TimerInfoDto" + } + ] + } + }, + "text/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/TimerInfoDto" + } + ] + } + }, + "application/*+json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/TimerInfoDto" + } + ] + } + } + } + }, + "responses": { + "204": { + "description": "Timer created." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "LiveTvManagement" + ] + } + ] + } + }, + "/LiveTv/Timers/{timerId}": { + "get": { + "tags": [ + "LiveTv" + ], + "summary": "Gets a timer.", + "operationId": "GetTimer", + "parameters": [ + { + "name": "timerId", + "in": "path", + "description": "Timer id.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Timer returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TimerInfoDto" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/TimerInfoDto" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/TimerInfoDto" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "LiveTvAccess" + ] + } + ] + }, + "delete": { + "tags": [ + "LiveTv" + ], + "summary": "Cancels a live tv timer.", + "operationId": "CancelTimer", + "parameters": [ + { + "name": "timerId", + "in": "path", + "description": "Timer id.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Timer deleted." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "LiveTvManagement" + ] + } + ] + }, + "post": { + "tags": [ + "LiveTv" + ], + "summary": "Updates a live tv timer.", + "operationId": "UpdateTimer", + "parameters": [ + { + "name": "timerId", + "in": "path", + "description": "Timer id.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "New timer info.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/TimerInfoDto" + } + ] + } + }, + "text/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/TimerInfoDto" + } + ] + } + }, + "application/*+json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/TimerInfoDto" + } + ] + } + } + } + }, + "responses": { + "204": { + "description": "Timer updated." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "LiveTvManagement" + ] + } + ] + } + }, + "/LiveTv/Timers/Defaults": { + "get": { + "tags": [ + "LiveTv" + ], + "summary": "Gets the default values for a new timer.", + "operationId": "GetDefaultTimer", + "parameters": [ + { + "name": "programId", + "in": "query", + "description": "Optional. To attach default values based on a program.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Default values returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SeriesTimerInfoDto" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/SeriesTimerInfoDto" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/SeriesTimerInfoDto" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "LiveTvAccess" + ] + } + ] + } + }, + "/LiveTv/TunerHosts": { + "post": { + "tags": [ + "LiveTv" + ], + "summary": "Adds a tuner host.", + "operationId": "AddTunerHost", + "requestBody": { + "description": "New tuner host.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/TunerHostInfo" + } + ] + } + }, + "text/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/TunerHostInfo" + } + ] + } + }, + "application/*+json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/TunerHostInfo" + } + ] + } + } + } + }, + "responses": { + "200": { + "description": "Created tuner host returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TunerHostInfo" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/TunerHostInfo" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/TunerHostInfo" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "LiveTvManagement" + ] + } + ] + }, + "delete": { + "tags": [ + "LiveTv" + ], + "summary": "Deletes a tuner host.", + "operationId": "DeleteTunerHost", + "parameters": [ + { + "name": "id", + "in": "query", + "description": "Tuner host id.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Tuner host deleted." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "LiveTvManagement" + ] + } + ] + } + }, + "/LiveTv/TunerHosts/Types": { + "get": { + "tags": [ + "LiveTv" + ], + "summary": "Get tuner host types.", + "operationId": "GetTunerHostTypes", + "responses": { + "200": { + "description": "Tuner host types returned.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NameIdPair" + } + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NameIdPair" + } + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NameIdPair" + } + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "LiveTvAccess" + ] + } + ] + } + }, + "/LiveTv/Tuners/{tunerId}/Reset": { + "post": { + "tags": [ + "LiveTv" + ], + "summary": "Resets a tv tuner.", + "operationId": "ResetTuner", + "parameters": [ + { + "name": "tunerId", + "in": "path", + "description": "Tuner id.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Tuner reset." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "LiveTvManagement" + ] + } + ] + } + }, + "/LiveTv/Tuners/Discover": { + "get": { + "tags": [ + "LiveTv" + ], + "summary": "Discover tuners.", + "operationId": "DiscoverTuners", + "parameters": [ + { + "name": "newDevicesOnly", + "in": "query", + "description": "Only discover new tuners.", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "200": { + "description": "Tuners returned.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TunerHostInfo" + } + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TunerHostInfo" + } + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TunerHostInfo" + } + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "LiveTvManagement" + ] + } + ] + } + }, + "/LiveTv/Tuners/Discvover": { + "get": { + "tags": [ + "LiveTv" + ], + "summary": "Discover tuners.", + "operationId": "DiscvoverTuners", + "parameters": [ + { + "name": "newDevicesOnly", + "in": "query", + "description": "Only discover new tuners.", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "200": { + "description": "Tuners returned.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TunerHostInfo" + } + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TunerHostInfo" + } + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TunerHostInfo" + } + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "LiveTvManagement" + ] + } + ] + } + }, + "/Localization/Countries": { + "get": { + "tags": [ + "Localization" + ], + "summary": "Gets known countries.", + "operationId": "GetCountries", + "responses": { + "200": { + "description": "Known countries returned.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CountryInfo" + } + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CountryInfo" + } + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CountryInfo" + } + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "FirstTimeSetupOrDefault" + ] + } + ] + } + }, + "/Localization/Cultures": { + "get": { + "tags": [ + "Localization" + ], + "summary": "Gets known cultures.", + "operationId": "GetCultures", + "responses": { + "200": { + "description": "Known cultures returned.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CultureDto" + } + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CultureDto" + } + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CultureDto" + } + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "FirstTimeSetupOrDefault" + ] + } + ] + } + }, + "/Localization/Options": { + "get": { + "tags": [ + "Localization" + ], + "summary": "Gets localization options.", + "operationId": "GetLocalizationOptions", + "responses": { + "200": { + "description": "Localization options returned.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LocalizationOption" + } + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LocalizationOption" + } + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LocalizationOption" + } + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "FirstTimeSetupOrDefault" + ] + } + ] + } + }, + "/Localization/ParentalRatings": { + "get": { + "tags": [ + "Localization" + ], + "summary": "Gets known parental ratings.", + "operationId": "GetParentalRatings", + "responses": { + "200": { + "description": "Known parental ratings returned.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ParentalRating" + } + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ParentalRating" + } + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ParentalRating" + } + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "FirstTimeSetupOrDefault" + ] + } + ] + } + }, + "/Items/{itemId}/PlaybackInfo": { + "get": { + "tags": [ + "MediaInfo" + ], + "summary": "Gets live playback media info for an item.", + "operationId": "GetPlaybackInfo", + "parameters": [ + { + "name": "itemId", + "in": "path", + "description": "The item id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "userId", + "in": "query", + "description": "The user id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Playback info returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PlaybackInfoResponse" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/PlaybackInfoResponse" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/PlaybackInfoResponse" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + }, + "post": { + "tags": [ + "MediaInfo" + ], + "summary": "Gets live playback media info for an item.", + "description": "For backwards compatibility parameters can be sent via Query or Body, with Query having higher precedence.\r\nQuery parameters are obsolete.", + "operationId": "GetPostedPlaybackInfo", + "parameters": [ + { + "name": "itemId", + "in": "path", + "description": "The item id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "userId", + "in": "query", + "description": "The user id.", + "deprecated": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "maxStreamingBitrate", + "in": "query", + "description": "The maximum streaming bitrate.", + "deprecated": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "startTimeTicks", + "in": "query", + "description": "The start time in ticks.", + "deprecated": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "audioStreamIndex", + "in": "query", + "description": "The audio stream index.", + "deprecated": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "subtitleStreamIndex", + "in": "query", + "description": "The subtitle stream index.", + "deprecated": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxAudioChannels", + "in": "query", + "description": "The maximum number of audio channels.", + "deprecated": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "mediaSourceId", + "in": "query", + "description": "The media source id.", + "deprecated": true, + "schema": { + "type": "string" + } + }, + { + "name": "liveStreamId", + "in": "query", + "description": "The livestream id.", + "deprecated": true, + "schema": { + "type": "string" + } + }, + { + "name": "autoOpenLiveStream", + "in": "query", + "description": "Whether to auto open the livestream.", + "deprecated": true, + "schema": { + "type": "boolean" + } + }, + { + "name": "enableDirectPlay", + "in": "query", + "description": "Whether to enable direct play. Default: true.", + "deprecated": true, + "schema": { + "type": "boolean" + } + }, + { + "name": "enableDirectStream", + "in": "query", + "description": "Whether to enable direct stream. Default: true.", + "deprecated": true, + "schema": { + "type": "boolean" + } + }, + { + "name": "enableTranscoding", + "in": "query", + "description": "Whether to enable transcoding. Default: true.", + "deprecated": true, + "schema": { + "type": "boolean" + } + }, + { + "name": "allowVideoStreamCopy", + "in": "query", + "description": "Whether to allow to copy the video stream. Default: true.", + "deprecated": true, + "schema": { + "type": "boolean" + } + }, + { + "name": "allowAudioStreamCopy", + "in": "query", + "description": "Whether to allow to copy the audio stream. Default: true.", + "deprecated": true, + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "description": "The playback info.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/PlaybackInfoDto" + } + ], + "description": "Plabyback info dto." + } + }, + "text/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/PlaybackInfoDto" + } + ], + "description": "Plabyback info dto." + } + }, + "application/*+json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/PlaybackInfoDto" + } + ], + "description": "Plabyback info dto." + } + } + } + }, + "responses": { + "200": { + "description": "Playback info returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PlaybackInfoResponse" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/PlaybackInfoResponse" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/PlaybackInfoResponse" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/LiveStreams/Close": { + "post": { + "tags": [ + "MediaInfo" + ], + "summary": "Closes a media source.", + "operationId": "CloseLiveStream", + "parameters": [ + { + "name": "liveStreamId", + "in": "query", + "description": "The livestream id.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Livestream closed." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/LiveStreams/Open": { + "post": { + "tags": [ + "MediaInfo" + ], + "summary": "Opens a media source.", + "operationId": "OpenLiveStream", + "parameters": [ + { + "name": "openToken", + "in": "query", + "description": "The open token.", + "schema": { + "type": "string" + } + }, + { + "name": "userId", + "in": "query", + "description": "The user id.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "playSessionId", + "in": "query", + "description": "The play session id.", + "schema": { + "type": "string" + } + }, + { + "name": "maxStreamingBitrate", + "in": "query", + "description": "The maximum streaming bitrate.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "startTimeTicks", + "in": "query", + "description": "The start time in ticks.", + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "audioStreamIndex", + "in": "query", + "description": "The audio stream index.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "subtitleStreamIndex", + "in": "query", + "description": "The subtitle stream index.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxAudioChannels", + "in": "query", + "description": "The maximum number of audio channels.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "itemId", + "in": "query", + "description": "The item id.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "enableDirectPlay", + "in": "query", + "description": "Whether to enable direct play. Default: true.", + "schema": { + "type": "boolean" + } + }, + { + "name": "enableDirectStream", + "in": "query", + "description": "Whether to enable direct stream. Default: true.", + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "description": "The open live stream dto.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenLiveStreamDto" + } + ], + "description": "Open live stream dto." + } + }, + "text/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenLiveStreamDto" + } + ], + "description": "Open live stream dto." + } + }, + "application/*+json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/OpenLiveStreamDto" + } + ], + "description": "Open live stream dto." + } + } + } + }, + "responses": { + "200": { + "description": "Media source opened.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LiveStreamResponse" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/LiveStreamResponse" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/LiveStreamResponse" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Playback/BitrateTest": { + "get": { + "tags": [ + "MediaInfo" + ], + "summary": "Tests the network with a request with the size of the bitrate.", + "operationId": "GetBitrateTestBytes", + "parameters": [ + { + "name": "size", + "in": "query", + "description": "The bitrate. Defaults to 102400.", + "schema": { + "maximum": 100000000, + "minimum": 1, + "type": "integer", + "format": "int32", + "default": 102400 + } + } + ], + "responses": { + "200": { + "description": "Test buffer returned.", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Movies/Recommendations": { + "get": { + "tags": [ + "Movies" + ], + "summary": "Gets movie recommendations.", + "operationId": "GetMovieRecommendations", + "parameters": [ + { + "name": "userId", + "in": "query", + "description": "Optional. Filter by user id, and attach user data.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "parentId", + "in": "query", + "description": "Specify this to localize the search to a specific item or folder. Omit to use the root.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "fields", + "in": "query", + "description": "Optional. The fields to return.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ItemFields" + } + } + }, + { + "name": "categoryLimit", + "in": "query", + "description": "The max number of categories to return.", + "schema": { + "type": "integer", + "format": "int32", + "default": 5 + } + }, + { + "name": "itemLimit", + "in": "query", + "description": "The max number of items to return per category.", + "schema": { + "type": "integer", + "format": "int32", + "default": 8 + } + } + ], + "responses": { + "200": { + "description": "Movie recommendations returned.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RecommendationDto" + } + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RecommendationDto" + } + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RecommendationDto" + } + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/MusicGenres": { + "get": { + "tags": [ + "MusicGenres" + ], + "summary": "Gets all music genres from a given item, folder, or the entire library.", + "operationId": "GetMusicGenres", + "parameters": [ + { + "name": "startIndex", + "in": "query", + "description": "Optional. The record index to start at. All items with a lower index will be dropped from the results.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "limit", + "in": "query", + "description": "Optional. The maximum number of records to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "searchTerm", + "in": "query", + "description": "The search term.", + "schema": { + "type": "string" + } + }, + { + "name": "parentId", + "in": "query", + "description": "Specify this to localize the search to a specific item or folder. Omit to use the root.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "fields", + "in": "query", + "description": "Optional. Specify additional fields of information to return in the output.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ItemFields" + } + } + }, + { + "name": "excludeItemTypes", + "in": "query", + "description": "Optional. If specified, results will be filtered out based on item type. This allows multiple, comma delimited.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseItemKind" + } + } + }, + { + "name": "includeItemTypes", + "in": "query", + "description": "Optional. If specified, results will be filtered in based on item type. This allows multiple, comma delimited.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseItemKind" + } + } + }, + { + "name": "isFavorite", + "in": "query", + "description": "Optional filter by items that are marked as favorite, or not.", + "schema": { + "type": "boolean" + } + }, + { + "name": "imageTypeLimit", + "in": "query", + "description": "Optional, the max number of images to return, per image type.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "enableImageTypes", + "in": "query", + "description": "Optional. The image types to include in the output.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ImageType" + } + } + }, + { + "name": "userId", + "in": "query", + "description": "User id.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "nameStartsWithOrGreater", + "in": "query", + "description": "Optional filter by items whose name is sorted equally or greater than a given input string.", + "schema": { + "type": "string" + } + }, + { + "name": "nameStartsWith", + "in": "query", + "description": "Optional filter by items whose name is sorted equally than a given input string.", + "schema": { + "type": "string" + } + }, + { + "name": "nameLessThan", + "in": "query", + "description": "Optional filter by items whose name is equally or lesser than a given input string.", + "schema": { + "type": "string" + } + }, + { + "name": "sortBy", + "in": "query", + "description": "Optional. Specify one or more sort orders, comma delimited.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort Order - Ascending,Descending.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SortOrder" + } + } + }, + { + "name": "enableImages", + "in": "query", + "description": "Optional, include image information in output.", + "schema": { + "type": "boolean", + "default": true + } + }, + { + "name": "enableTotalRecordCount", + "in": "query", + "description": "Optional. Include total record count.", + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Music genres returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "deprecated": true, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/MusicGenres/{genreName}": { + "get": { + "tags": [ + "MusicGenres" + ], + "summary": "Gets a music genre, by name.", + "operationId": "GetMusicGenre", + "parameters": [ + { + "name": "genreName", + "in": "path", + "description": "The genre name.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "userId", + "in": "query", + "description": "Optional. Filter by user id, and attach user data.", + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BaseItemDto" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDto" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDto" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Notifications/{userId}": { + "get": { + "tags": [ + "Notifications" + ], + "summary": "Gets a user's notifications.", + "operationId": "GetNotifications", + "parameters": [ + { + "name": "userId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Notifications returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotificationResultDto" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/NotificationResultDto" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/NotificationResultDto" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Notifications/{userId}/Read": { + "post": { + "tags": [ + "Notifications" + ], + "summary": "Sets notifications as read.", + "operationId": "SetRead", + "parameters": [ + { + "name": "userId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Notifications set as read." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Notifications/{userId}/Summary": { + "get": { + "tags": [ + "Notifications" + ], + "summary": "Gets a user's notification summary.", + "operationId": "GetNotificationsSummary", + "parameters": [ + { + "name": "userId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Summary of user's notifications returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotificationsSummaryDto" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/NotificationsSummaryDto" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/NotificationsSummaryDto" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Notifications/{userId}/Unread": { + "post": { + "tags": [ + "Notifications" + ], + "summary": "Sets notifications as unread.", + "operationId": "SetUnread", + "parameters": [ + { + "name": "userId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Notifications set as unread." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Notifications/Admin": { + "post": { + "tags": [ + "Notifications" + ], + "summary": "Sends a notification to all admins.", + "operationId": "CreateAdminNotification", + "requestBody": { + "description": "The notification request.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/AdminNotificationDto" + } + ], + "description": "The admin notification dto." + } + }, + "text/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/AdminNotificationDto" + } + ], + "description": "The admin notification dto." + } + }, + "application/*+json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/AdminNotificationDto" + } + ], + "description": "The admin notification dto." + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Notification sent." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Notifications/Services": { + "get": { + "tags": [ + "Notifications" + ], + "summary": "Gets notification services.", + "operationId": "GetNotificationServices", + "responses": { + "200": { + "description": "All notification services returned.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NameIdPair" + } + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NameIdPair" + } + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NameIdPair" + } + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Notifications/Types": { + "get": { + "tags": [ + "Notifications" + ], + "summary": "Gets notification types.", + "operationId": "GetNotificationTypes", + "responses": { + "200": { + "description": "All notification types returned.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NotificationTypeInfo" + } + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NotificationTypeInfo" + } + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NotificationTypeInfo" + } + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Packages": { + "get": { + "tags": [ + "Package" + ], + "summary": "Gets available packages.", + "operationId": "GetPackages", + "responses": { + "200": { + "description": "Available packages returned.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PackageInfo" + } + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PackageInfo" + } + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PackageInfo" + } + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Packages/{name}": { + "get": { + "tags": [ + "Package" + ], + "summary": "Gets a package by name or assembly GUID.", + "operationId": "GetPackageInfo", + "parameters": [ + { + "name": "name", + "in": "path", + "description": "The name of the package.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "assemblyGuid", + "in": "query", + "description": "The GUID of the associated assembly.", + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Package retrieved.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PackageInfo" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/PackageInfo" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/PackageInfo" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Packages/Installed/{name}": { + "post": { + "tags": [ + "Package" + ], + "summary": "Installs a package.", + "operationId": "InstallPackage", + "parameters": [ + { + "name": "name", + "in": "path", + "description": "Package name.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "assemblyGuid", + "in": "query", + "description": "GUID of the associated assembly.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "version", + "in": "query", + "description": "Optional version. Defaults to latest version.", + "schema": { + "type": "string" + } + }, + { + "name": "repositoryUrl", + "in": "query", + "description": "Optional. Specify the repository to install from.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Package found." + }, + "404": { + "description": "Package not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "RequiresElevation", + "DefaultAuthorization" + ] + } + ] + } + }, + "/Packages/Installing/{packageId}": { + "delete": { + "tags": [ + "Package" + ], + "summary": "Cancels a package installation.", + "operationId": "CancelPackageInstallation", + "parameters": [ + { + "name": "packageId", + "in": "path", + "description": "Installation Id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "204": { + "description": "Installation cancelled." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "RequiresElevation", + "DefaultAuthorization" + ] + } + ] + } + }, + "/Repositories": { + "get": { + "tags": [ + "Package" + ], + "summary": "Gets all package repositories.", + "operationId": "GetRepositories", + "responses": { + "200": { + "description": "Package repositories returned.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RepositoryInfo" + } + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RepositoryInfo" + } + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RepositoryInfo" + } + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + }, + "post": { + "tags": [ + "Package" + ], + "summary": "Sets the enabled and existing package repositories.", + "operationId": "SetRepositories", + "requestBody": { + "description": "The list of package repositories.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RepositoryInfo" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RepositoryInfo" + } + } + }, + "application/*+json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RepositoryInfo" + } + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Package repositories saved." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "RequiresElevation", + "DefaultAuthorization" + ] + } + ] + } + }, + "/Persons": { + "get": { + "tags": [ + "Persons" + ], + "summary": "Gets all persons.", + "operationId": "GetPersons", + "parameters": [ + { + "name": "limit", + "in": "query", + "description": "Optional. The maximum number of records to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "searchTerm", + "in": "query", + "description": "The search term.", + "schema": { + "type": "string" + } + }, + { + "name": "fields", + "in": "query", + "description": "Optional. Specify additional fields of information to return in the output.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ItemFields" + } + } + }, + { + "name": "filters", + "in": "query", + "description": "Optional. Specify additional filters to apply.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ItemFilter" + } + } + }, + { + "name": "isFavorite", + "in": "query", + "description": "Optional filter by items that are marked as favorite, or not. userId is required.", + "schema": { + "type": "boolean" + } + }, + { + "name": "enableUserData", + "in": "query", + "description": "Optional, include user data.", + "schema": { + "type": "boolean" + } + }, + { + "name": "imageTypeLimit", + "in": "query", + "description": "Optional, the max number of images to return, per image type.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "enableImageTypes", + "in": "query", + "description": "Optional. The image types to include in the output.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ImageType" + } + } + }, + { + "name": "excludePersonTypes", + "in": "query", + "description": "Optional. If specified results will be filtered to exclude those containing the specified PersonType. Allows multiple, comma-delimited.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "personTypes", + "in": "query", + "description": "Optional. If specified results will be filtered to include only those containing the specified PersonType. Allows multiple, comma-delimited.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "appearsInItemId", + "in": "query", + "description": "Optional. If specified, person results will be filtered on items related to said persons.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "userId", + "in": "query", + "description": "User id.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "enableImages", + "in": "query", + "description": "Optional, include image information in output.", + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Persons returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Persons/{name}": { + "get": { + "tags": [ + "Persons" + ], + "summary": "Get person by name.", + "operationId": "GetPerson", + "parameters": [ + { + "name": "name", + "in": "path", + "description": "Person name.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "userId", + "in": "query", + "description": "Optional. Filter by user id, and attach user data.", + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Person returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BaseItemDto" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDto" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDto" + } + } + } + }, + "404": { + "description": "Person not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Playlists": { + "post": { + "tags": [ + "Playlists" + ], + "summary": "Creates a new playlist.", + "description": "For backwards compatibility parameters can be sent via Query or Body, with Query having higher precedence.\r\nQuery parameters are obsolete.", + "operationId": "CreatePlaylist", + "parameters": [ + { + "name": "name", + "in": "query", + "description": "The playlist name.", + "deprecated": true, + "schema": { + "type": "string" + } + }, + { + "name": "ids", + "in": "query", + "description": "The item ids.", + "deprecated": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + }, + { + "name": "userId", + "in": "query", + "description": "The user id.", + "deprecated": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "mediaType", + "in": "query", + "description": "The media type.", + "deprecated": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "The create playlist payload.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/CreatePlaylistDto" + } + ], + "description": "Create new playlist dto." + } + }, + "text/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/CreatePlaylistDto" + } + ], + "description": "Create new playlist dto." + } + }, + "application/*+json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/CreatePlaylistDto" + } + ], + "description": "Create new playlist dto." + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PlaylistCreationResult" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/PlaylistCreationResult" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/PlaylistCreationResult" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Playlists/{playlistId}/Items": { + "post": { + "tags": [ + "Playlists" + ], + "summary": "Adds items to a playlist.", + "operationId": "AddToPlaylist", + "parameters": [ + { + "name": "playlistId", + "in": "path", + "description": "The playlist id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "ids", + "in": "query", + "description": "Item id, comma delimited.", + "schema": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + }, + { + "name": "userId", + "in": "query", + "description": "The userId.", + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "204": { + "description": "Items added to playlist." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + }, + "delete": { + "tags": [ + "Playlists" + ], + "summary": "Removes items from a playlist.", + "operationId": "RemoveFromPlaylist", + "parameters": [ + { + "name": "playlistId", + "in": "path", + "description": "The playlist id.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "entryIds", + "in": "query", + "description": "The item ids, comma delimited.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "204": { + "description": "Items removed." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + }, + "get": { + "tags": [ + "Playlists" + ], + "summary": "Gets the original items of a playlist.", + "operationId": "GetPlaylistItems", + "parameters": [ + { + "name": "playlistId", + "in": "path", + "description": "The playlist id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "userId", + "in": "query", + "description": "User id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "startIndex", + "in": "query", + "description": "Optional. The record index to start at. All items with a lower index will be dropped from the results.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "limit", + "in": "query", + "description": "Optional. The maximum number of records to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "fields", + "in": "query", + "description": "Optional. Specify additional fields of information to return in the output.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ItemFields" + } + } + }, + { + "name": "enableImages", + "in": "query", + "description": "Optional. Include image information in output.", + "schema": { + "type": "boolean" + } + }, + { + "name": "enableUserData", + "in": "query", + "description": "Optional. Include user data.", + "schema": { + "type": "boolean" + } + }, + { + "name": "imageTypeLimit", + "in": "query", + "description": "Optional. The max number of images to return, per image type.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "enableImageTypes", + "in": "query", + "description": "Optional. The image types to include in the output.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ImageType" + } + } + } + ], + "responses": { + "200": { + "description": "Original playlist returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + } + } + }, + "404": { + "description": "Playlist not found." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Playlists/{playlistId}/Items/{itemId}/Move/{newIndex}": { + "post": { + "tags": [ + "Playlists" + ], + "summary": "Moves a playlist item.", + "operationId": "MoveItem", + "parameters": [ + { + "name": "playlistId", + "in": "path", + "description": "The playlist id.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "itemId", + "in": "path", + "description": "The item id.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "newIndex", + "in": "path", + "description": "The new index.", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "204": { + "description": "Item moved to new index." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Sessions/Playing": { + "post": { + "tags": [ + "Playstate" + ], + "summary": "Reports playback has started within a session.", + "operationId": "ReportPlaybackStart", + "requestBody": { + "description": "The playback start info.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/PlaybackStartInfo" + } + ], + "description": "Class PlaybackStartInfo." + } + }, + "text/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/PlaybackStartInfo" + } + ], + "description": "Class PlaybackStartInfo." + } + }, + "application/*+json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/PlaybackStartInfo" + } + ], + "description": "Class PlaybackStartInfo." + } + } + } + }, + "responses": { + "204": { + "description": "Playback start recorded." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Sessions/Playing/Ping": { + "post": { + "tags": [ + "Playstate" + ], + "summary": "Pings a playback session.", + "operationId": "PingPlaybackSession", + "parameters": [ + { + "name": "playSessionId", + "in": "query", + "description": "Playback session id.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Playback session pinged." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Sessions/Playing/Progress": { + "post": { + "tags": [ + "Playstate" + ], + "summary": "Reports playback progress within a session.", + "operationId": "ReportPlaybackProgress", + "requestBody": { + "description": "The playback progress info.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/PlaybackProgressInfo" + } + ], + "description": "Class PlaybackProgressInfo." + } + }, + "text/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/PlaybackProgressInfo" + } + ], + "description": "Class PlaybackProgressInfo." + } + }, + "application/*+json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/PlaybackProgressInfo" + } + ], + "description": "Class PlaybackProgressInfo." + } + } + } + }, + "responses": { + "204": { + "description": "Playback progress recorded." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Sessions/Playing/Stopped": { + "post": { + "tags": [ + "Playstate" + ], + "summary": "Reports playback has stopped within a session.", + "operationId": "ReportPlaybackStopped", + "requestBody": { + "description": "The playback stop info.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/PlaybackStopInfo" + } + ], + "description": "Class PlaybackStopInfo." + } + }, + "text/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/PlaybackStopInfo" + } + ], + "description": "Class PlaybackStopInfo." + } + }, + "application/*+json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/PlaybackStopInfo" + } + ], + "description": "Class PlaybackStopInfo." + } + } + } + }, + "responses": { + "204": { + "description": "Playback stop recorded." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Users/{userId}/PlayedItems/{itemId}": { + "post": { + "tags": [ + "Playstate" + ], + "summary": "Marks an item as played for user.", + "operationId": "MarkPlayedItem", + "parameters": [ + { + "name": "userId", + "in": "path", + "description": "User id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "itemId", + "in": "path", + "description": "Item id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "datePlayed", + "in": "query", + "description": "Optional. The date the item was played.", + "schema": { + "type": "string", + "format": "date-time" + } + } + ], + "responses": { + "200": { + "description": "Item marked as played.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserItemDataDto" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/UserItemDataDto" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/UserItemDataDto" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + }, + "delete": { + "tags": [ + "Playstate" + ], + "summary": "Marks an item as unplayed for user.", + "operationId": "MarkUnplayedItem", + "parameters": [ + { + "name": "userId", + "in": "path", + "description": "User id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "itemId", + "in": "path", + "description": "Item id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Item marked as unplayed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserItemDataDto" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/UserItemDataDto" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/UserItemDataDto" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Users/{userId}/PlayingItems/{itemId}": { + "post": { + "tags": [ + "Playstate" + ], + "summary": "Reports that a user has begun playing an item.", + "operationId": "OnPlaybackStart", + "parameters": [ + { + "name": "userId", + "in": "path", + "description": "User id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "itemId", + "in": "path", + "description": "Item id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "mediaSourceId", + "in": "query", + "description": "The id of the MediaSource.", + "schema": { + "type": "string" + } + }, + { + "name": "audioStreamIndex", + "in": "query", + "description": "The audio stream index.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "subtitleStreamIndex", + "in": "query", + "description": "The subtitle stream index.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "playMethod", + "in": "query", + "description": "The play method.", + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/PlayMethod" + } + ] + } + }, + { + "name": "liveStreamId", + "in": "query", + "description": "The live stream id.", + "schema": { + "type": "string" + } + }, + { + "name": "playSessionId", + "in": "query", + "description": "The play session id.", + "schema": { + "type": "string" + } + }, + { + "name": "canSeek", + "in": "query", + "description": "Indicates if the client can seek.", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "204": { + "description": "Play start recorded." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + }, + "delete": { + "tags": [ + "Playstate" + ], + "summary": "Reports that a user has stopped playing an item.", + "operationId": "OnPlaybackStopped", + "parameters": [ + { + "name": "userId", + "in": "path", + "description": "User id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "itemId", + "in": "path", + "description": "Item id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "mediaSourceId", + "in": "query", + "description": "The id of the MediaSource.", + "schema": { + "type": "string" + } + }, + { + "name": "nextMediaType", + "in": "query", + "description": "The next media type that will play.", + "schema": { + "type": "string" + } + }, + { + "name": "positionTicks", + "in": "query", + "description": "Optional. The position, in ticks, where playback stopped. 1 tick = 10000 ms.", + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "liveStreamId", + "in": "query", + "description": "The live stream id.", + "schema": { + "type": "string" + } + }, + { + "name": "playSessionId", + "in": "query", + "description": "The play session id.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Playback stop recorded." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Users/{userId}/PlayingItems/{itemId}/Progress": { + "post": { + "tags": [ + "Playstate" + ], + "summary": "Reports a user's playback progress.", + "operationId": "OnPlaybackProgress", + "parameters": [ + { + "name": "userId", + "in": "path", + "description": "User id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "itemId", + "in": "path", + "description": "Item id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "mediaSourceId", + "in": "query", + "description": "The id of the MediaSource.", + "schema": { + "type": "string" + } + }, + { + "name": "positionTicks", + "in": "query", + "description": "Optional. The current position, in ticks. 1 tick = 10000 ms.", + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "audioStreamIndex", + "in": "query", + "description": "The audio stream index.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "subtitleStreamIndex", + "in": "query", + "description": "The subtitle stream index.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "volumeLevel", + "in": "query", + "description": "Scale of 0-100.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "playMethod", + "in": "query", + "description": "The play method.", + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/PlayMethod" + } + ] + } + }, + { + "name": "liveStreamId", + "in": "query", + "description": "The live stream id.", + "schema": { + "type": "string" + } + }, + { + "name": "playSessionId", + "in": "query", + "description": "The play session id.", + "schema": { + "type": "string" + } + }, + { + "name": "repeatMode", + "in": "query", + "description": "The repeat mode.", + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/RepeatMode" + } + ] + } + }, + { + "name": "isPaused", + "in": "query", + "description": "Indicates if the player is paused.", + "schema": { + "type": "boolean", + "default": false + } + }, + { + "name": "isMuted", + "in": "query", + "description": "Indicates if the player is muted.", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "204": { + "description": "Play progress recorded." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Plugins": { + "get": { + "tags": [ + "Plugins" + ], + "summary": "Gets a list of currently installed plugins.", + "operationId": "GetPlugins", + "responses": { + "200": { + "description": "Installed plugins returned.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PluginInfo" + } + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PluginInfo" + } + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PluginInfo" + } + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Plugins/{pluginId}": { + "delete": { + "tags": [ + "Plugins" + ], + "summary": "Uninstalls a plugin.", + "operationId": "UninstallPlugin", + "parameters": [ + { + "name": "pluginId", + "in": "path", + "description": "Plugin id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "204": { + "description": "Plugin uninstalled." + }, + "404": { + "description": "Plugin not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "deprecated": true, + "security": [ + { + "CustomAuthentication": [ + "RequiresElevation", + "DefaultAuthorization" + ] + } + ] + } + }, + "/Plugins/{pluginId}/{version}": { + "delete": { + "tags": [ + "Plugins" + ], + "summary": "Uninstalls a plugin by version.", + "operationId": "UninstallPluginByVersion", + "parameters": [ + { + "name": "pluginId", + "in": "path", + "description": "Plugin id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "version", + "in": "path", + "description": "Plugin version.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Plugin uninstalled." + }, + "404": { + "description": "Plugin not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "RequiresElevation", + "DefaultAuthorization" + ] + } + ] + } + }, + "/Plugins/{pluginId}/{version}/Disable": { + "post": { + "tags": [ + "Plugins" + ], + "summary": "Disable a plugin.", + "operationId": "DisablePlugin", + "parameters": [ + { + "name": "pluginId", + "in": "path", + "description": "Plugin id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "version", + "in": "path", + "description": "Plugin version.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Plugin disabled." + }, + "404": { + "description": "Plugin not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "RequiresElevation", + "DefaultAuthorization" + ] + } + ] + } + }, + "/Plugins/{pluginId}/{version}/Enable": { + "post": { + "tags": [ + "Plugins" + ], + "summary": "Enables a disabled plugin.", + "operationId": "EnablePlugin", + "parameters": [ + { + "name": "pluginId", + "in": "path", + "description": "Plugin id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "version", + "in": "path", + "description": "Plugin version.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Plugin enabled." + }, + "404": { + "description": "Plugin not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "RequiresElevation", + "DefaultAuthorization" + ] + } + ] + } + }, + "/Plugins/{pluginId}/{version}/Image": { + "get": { + "tags": [ + "Plugins" + ], + "summary": "Gets a plugin's image.", + "operationId": "GetPluginImage", + "parameters": [ + { + "name": "pluginId", + "in": "path", + "description": "Plugin id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "version", + "in": "path", + "description": "Plugin version.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Plugin image returned.", + "content": { + "image/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Plugins/{pluginId}/Configuration": { + "get": { + "tags": [ + "Plugins" + ], + "summary": "Gets plugin configuration.", + "operationId": "GetPluginConfiguration", + "parameters": [ + { + "name": "pluginId", + "in": "path", + "description": "Plugin id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Plugin configuration returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BasePluginConfiguration" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/BasePluginConfiguration" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/BasePluginConfiguration" + } + } + } + }, + "404": { + "description": "Plugin not found or plugin configuration not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + }, + "post": { + "tags": [ + "Plugins" + ], + "summary": "Updates plugin configuration.", + "description": "Accepts plugin configuration as JSON body.", + "operationId": "UpdatePluginConfiguration", + "parameters": [ + { + "name": "pluginId", + "in": "path", + "description": "Plugin id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "204": { + "description": "Plugin configuration updated." + }, + "404": { + "description": "Plugin not found or plugin does not have configuration.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Plugins/{pluginId}/Manifest": { + "post": { + "tags": [ + "Plugins" + ], + "summary": "Gets a plugin's manifest.", + "operationId": "GetPluginManifest", + "parameters": [ + { + "name": "pluginId", + "in": "path", + "description": "Plugin id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "204": { + "description": "Plugin manifest returned." + }, + "404": { + "description": "Plugin not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/QuickConnect/Authorize": { + "post": { + "tags": [ + "QuickConnect" + ], + "summary": "Authorizes a pending quick connect request.", + "operationId": "Authorize", + "parameters": [ + { + "name": "code", + "in": "query", + "description": "Quick connect code to authorize.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Quick connect result authorized successfully.", + "content": { + "application/json": { + "schema": { + "type": "boolean" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "type": "boolean" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "type": "boolean" + } + } + } + }, + "403": { + "description": "Unknown user id.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/QuickConnect/Connect": { + "get": { + "tags": [ + "QuickConnect" + ], + "summary": "Attempts to retrieve authentication information.", + "operationId": "Connect", + "parameters": [ + { + "name": "secret", + "in": "query", + "description": "Secret previously returned from the Initiate endpoint.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Quick connect result returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QuickConnectResult" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/QuickConnectResult" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/QuickConnectResult" + } + } + } + }, + "404": { + "description": "Unknown quick connect secret.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + } + } + }, + "/QuickConnect/Enabled": { + "get": { + "tags": [ + "QuickConnect" + ], + "summary": "Gets the current quick connect state.", + "operationId": "GetEnabled", + "responses": { + "200": { + "description": "Quick connect state returned.", + "content": { + "application/json": { + "schema": { + "type": "boolean" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "type": "boolean" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "type": "boolean" + } + } + } + } + } + } + }, + "/QuickConnect/Initiate": { + "get": { + "tags": [ + "QuickConnect" + ], + "summary": "Initiate a new quick connect request.", + "operationId": "Initiate", + "responses": { + "200": { + "description": "Quick connect request successfully created.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QuickConnectResult" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/QuickConnectResult" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/QuickConnectResult" + } + } + } + }, + "401": { + "description": "Quick connect is not active on this server." + } + } + } + }, + "/Items/{itemId}/RemoteImages": { + "get": { + "tags": [ + "RemoteImage" + ], + "summary": "Gets available remote images for an item.", + "operationId": "GetRemoteImages", + "parameters": [ + { + "name": "itemId", + "in": "path", + "description": "Item Id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "type", + "in": "query", + "description": "The image type.", + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ImageType" + } + ] + } + }, + { + "name": "startIndex", + "in": "query", + "description": "Optional. The record index to start at. All items with a lower index will be dropped from the results.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "limit", + "in": "query", + "description": "Optional. The maximum number of records to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "providerName", + "in": "query", + "description": "Optional. The image provider to use.", + "schema": { + "type": "string" + } + }, + { + "name": "includeAllLanguages", + "in": "query", + "description": "Optional. Include all languages.", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "200": { + "description": "Remote Images returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RemoteImageResult" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/RemoteImageResult" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/RemoteImageResult" + } + } + } + }, + "404": { + "description": "Item not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Items/{itemId}/RemoteImages/Download": { + "post": { + "tags": [ + "RemoteImage" + ], + "summary": "Downloads a remote image for an item.", + "operationId": "DownloadRemoteImage", + "parameters": [ + { + "name": "itemId", + "in": "path", + "description": "Item Id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "type", + "in": "query", + "description": "The image type.", + "required": true, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ImageType" + } + ], + "description": "Enum ImageType." + } + }, + { + "name": "imageUrl", + "in": "query", + "description": "The image url.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Remote image downloaded." + }, + "404": { + "description": "Remote image not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "RequiresElevation" + ] + } + ] + } + }, + "/Items/{itemId}/RemoteImages/Providers": { + "get": { + "tags": [ + "RemoteImage" + ], + "summary": "Gets available remote image providers for an item.", + "operationId": "GetRemoteImageProviders", + "parameters": [ + { + "name": "itemId", + "in": "path", + "description": "Item Id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Returned remote image providers.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ImageProviderInfo" + } + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ImageProviderInfo" + } + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ImageProviderInfo" + } + } + } + } + }, + "404": { + "description": "Item not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/ScheduledTasks": { + "get": { + "tags": [ + "ScheduledTasks" + ], + "summary": "Get tasks.", + "operationId": "GetTasks", + "parameters": [ + { + "name": "isHidden", + "in": "query", + "description": "Optional filter tasks that are hidden, or not.", + "schema": { + "type": "boolean" + } + }, + { + "name": "isEnabled", + "in": "query", + "description": "Optional filter tasks that are enabled, or not.", + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "Scheduled tasks retrieved.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TaskInfo" + } + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TaskInfo" + } + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TaskInfo" + } + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "RequiresElevation" + ] + } + ] + } + }, + "/ScheduledTasks/{taskId}": { + "get": { + "tags": [ + "ScheduledTasks" + ], + "summary": "Get task by id.", + "operationId": "GetTask", + "parameters": [ + { + "name": "taskId", + "in": "path", + "description": "Task Id.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Task retrieved.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TaskInfo" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/TaskInfo" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/TaskInfo" + } + } + } + }, + "404": { + "description": "Task not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "RequiresElevation" + ] + } + ] + } + }, + "/ScheduledTasks/{taskId}/Triggers": { + "post": { + "tags": [ + "ScheduledTasks" + ], + "summary": "Update specified task triggers.", + "operationId": "UpdateTask", + "parameters": [ + { + "name": "taskId", + "in": "path", + "description": "Task Id.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "Triggers.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TaskTriggerInfo" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TaskTriggerInfo" + } + } + }, + "application/*+json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TaskTriggerInfo" + } + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Task triggers updated." + }, + "404": { + "description": "Task not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "RequiresElevation" + ] + } + ] + } + }, + "/ScheduledTasks/Running/{taskId}": { + "post": { + "tags": [ + "ScheduledTasks" + ], + "summary": "Start specified task.", + "operationId": "StartTask", + "parameters": [ + { + "name": "taskId", + "in": "path", + "description": "Task Id.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Task started." + }, + "404": { + "description": "Task not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "RequiresElevation" + ] + } + ] + }, + "delete": { + "tags": [ + "ScheduledTasks" + ], + "summary": "Stop specified task.", + "operationId": "StopTask", + "parameters": [ + { + "name": "taskId", + "in": "path", + "description": "Task Id.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Task stopped." + }, + "404": { + "description": "Task not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "RequiresElevation" + ] + } + ] + } + }, + "/Search/Hints": { + "get": { + "tags": [ + "Search" + ], + "summary": "Gets the search hint result.", + "operationId": "Get", + "parameters": [ + { + "name": "startIndex", + "in": "query", + "description": "Optional. The record index to start at. All items with a lower index will be dropped from the results.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "limit", + "in": "query", + "description": "Optional. The maximum number of records to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "userId", + "in": "query", + "description": "Optional. Supply a user id to search within a user's library or omit to search all.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "searchTerm", + "in": "query", + "description": "The search term to filter on.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "includeItemTypes", + "in": "query", + "description": "If specified, only results with the specified item types are returned. This allows multiple, comma delimeted.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseItemKind" + } + } + }, + { + "name": "excludeItemTypes", + "in": "query", + "description": "If specified, results with these item types are filtered out. This allows multiple, comma delimeted.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseItemKind" + } + } + }, + { + "name": "mediaTypes", + "in": "query", + "description": "If specified, only results with the specified media types are returned. This allows multiple, comma delimeted.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "parentId", + "in": "query", + "description": "If specified, only children of the parent are returned.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "isMovie", + "in": "query", + "description": "Optional filter for movies.", + "schema": { + "type": "boolean" + } + }, + { + "name": "isSeries", + "in": "query", + "description": "Optional filter for series.", + "schema": { + "type": "boolean" + } + }, + { + "name": "isNews", + "in": "query", + "description": "Optional filter for news.", + "schema": { + "type": "boolean" + } + }, + { + "name": "isKids", + "in": "query", + "description": "Optional filter for kids.", + "schema": { + "type": "boolean" + } + }, + { + "name": "isSports", + "in": "query", + "description": "Optional filter for sports.", + "schema": { + "type": "boolean" + } + }, + { + "name": "includePeople", + "in": "query", + "description": "Optional filter whether to include people.", + "schema": { + "type": "boolean", + "default": true + } + }, + { + "name": "includeMedia", + "in": "query", + "description": "Optional filter whether to include media.", + "schema": { + "type": "boolean", + "default": true + } + }, + { + "name": "includeGenres", + "in": "query", + "description": "Optional filter whether to include genres.", + "schema": { + "type": "boolean", + "default": true + } + }, + { + "name": "includeStudios", + "in": "query", + "description": "Optional filter whether to include studios.", + "schema": { + "type": "boolean", + "default": true + } + }, + { + "name": "includeArtists", + "in": "query", + "description": "Optional filter whether to include artists.", + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Search hint returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchHintResult" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/SearchHintResult" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/SearchHintResult" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Auth/PasswordResetProviders": { + "get": { + "tags": [ + "Session" + ], + "summary": "Get all password reset providers.", + "operationId": "GetPasswordResetProviders", + "responses": { + "200": { + "description": "Password reset providers retrieved.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NameIdPair" + } + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NameIdPair" + } + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NameIdPair" + } + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "RequiresElevation" + ] + } + ] + } + }, + "/Auth/Providers": { + "get": { + "tags": [ + "Session" + ], + "summary": "Get all auth providers.", + "operationId": "GetAuthProviders", + "responses": { + "200": { + "description": "Auth providers retrieved.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NameIdPair" + } + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NameIdPair" + } + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NameIdPair" + } + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "RequiresElevation" + ] + } + ] + } + }, + "/Sessions": { + "get": { + "tags": [ + "Session" + ], + "summary": "Gets a list of sessions.", + "operationId": "GetSessions", + "parameters": [ + { + "name": "controllableByUserId", + "in": "query", + "description": "Filter by sessions that a given user is allowed to remote control.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "deviceId", + "in": "query", + "description": "Filter by device Id.", + "schema": { + "type": "string" + } + }, + { + "name": "activeWithinSeconds", + "in": "query", + "description": "Optional. Filter by sessions that were active in the last n seconds.", + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "List of sessions returned.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SessionInfo" + } + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SessionInfo" + } + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SessionInfo" + } + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Sessions/{sessionId}/Command": { + "post": { + "tags": [ + "Session" + ], + "summary": "Issues a full general command to a client.", + "operationId": "SendFullGeneralCommand", + "parameters": [ + { + "name": "sessionId", + "in": "path", + "description": "The session id.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "The MediaBrowser.Model.Session.GeneralCommand.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/GeneralCommand" + } + ] + } + }, + "text/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/GeneralCommand" + } + ] + } + }, + "application/*+json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/GeneralCommand" + } + ] + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Full general command sent to session." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Sessions/{sessionId}/Command/{command}": { + "post": { + "tags": [ + "Session" + ], + "summary": "Issues a general command to a client.", + "operationId": "SendGeneralCommand", + "parameters": [ + { + "name": "sessionId", + "in": "path", + "description": "The session id.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "command", + "in": "path", + "description": "The command to send.", + "required": true, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/GeneralCommandType" + } + ], + "description": "This exists simply to identify a set of known commands." + } + } + ], + "responses": { + "204": { + "description": "General command sent to session." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Sessions/{sessionId}/Message": { + "post": { + "tags": [ + "Session" + ], + "summary": "Issues a command to a client to display a message to the user.", + "operationId": "SendMessageCommand", + "parameters": [ + { + "name": "sessionId", + "in": "path", + "description": "The session id.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "The MediaBrowser.Model.Session.MessageCommand object containing Header, Message Text, and TimeoutMs.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/MessageCommand" + } + ] + } + }, + "text/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/MessageCommand" + } + ] + } + }, + "application/*+json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/MessageCommand" + } + ] + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Message sent." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Sessions/{sessionId}/Playing": { + "post": { + "tags": [ + "Session" + ], + "summary": "Instructs a session to play an item.", + "operationId": "Play", + "parameters": [ + { + "name": "sessionId", + "in": "path", + "description": "The session id.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "playCommand", + "in": "query", + "description": "The type of play command to issue (PlayNow, PlayNext, PlayLast). Clients who have not yet implemented play next and play last may play now.", + "required": true, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/PlayCommand" + } + ], + "description": "Enum PlayCommand." + } + }, + { + "name": "itemIds", + "in": "query", + "description": "The ids of the items to play, comma delimited.", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + }, + { + "name": "startPositionTicks", + "in": "query", + "description": "The starting position of the first item.", + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "mediaSourceId", + "in": "query", + "description": "Optional. The media source id.", + "schema": { + "type": "string" + } + }, + { + "name": "audioStreamIndex", + "in": "query", + "description": "Optional. The index of the audio stream to play.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "subtitleStreamIndex", + "in": "query", + "description": "Optional. The index of the subtitle stream to play.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "startIndex", + "in": "query", + "description": "Optional. The start index.", + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "204": { + "description": "Instruction sent to session." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Sessions/{sessionId}/Playing/{command}": { + "post": { + "tags": [ + "Session" + ], + "summary": "Issues a playstate command to a client.", + "operationId": "SendPlaystateCommand", + "parameters": [ + { + "name": "sessionId", + "in": "path", + "description": "The session id.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "command", + "in": "path", + "description": "The MediaBrowser.Model.Session.PlaystateCommand.", + "required": true, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/PlaystateCommand" + } + ], + "description": "Enum PlaystateCommand." + } + }, + { + "name": "seekPositionTicks", + "in": "query", + "description": "The optional position ticks.", + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "controllingUserId", + "in": "query", + "description": "The optional controlling user id.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Playstate command sent to session." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Sessions/{sessionId}/System/{command}": { + "post": { + "tags": [ + "Session" + ], + "summary": "Issues a system command to a client.", + "operationId": "SendSystemCommand", + "parameters": [ + { + "name": "sessionId", + "in": "path", + "description": "The session id.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "command", + "in": "path", + "description": "The command to send.", + "required": true, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/GeneralCommandType" + } + ], + "description": "This exists simply to identify a set of known commands." + } + } + ], + "responses": { + "204": { + "description": "System command sent to session." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Sessions/{sessionId}/User/{userId}": { + "post": { + "tags": [ + "Session" + ], + "summary": "Adds an additional user to a session.", + "operationId": "AddUserToSession", + "parameters": [ + { + "name": "sessionId", + "in": "path", + "description": "The session id.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "userId", + "in": "path", + "description": "The user id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "204": { + "description": "User added to session." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + }, + "delete": { + "tags": [ + "Session" + ], + "summary": "Removes an additional user from a session.", + "operationId": "RemoveUserFromSession", + "parameters": [ + { + "name": "sessionId", + "in": "path", + "description": "The session id.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "userId", + "in": "path", + "description": "The user id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "204": { + "description": "User removed from session." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Sessions/{sessionId}/Viewing": { + "post": { + "tags": [ + "Session" + ], + "summary": "Instructs a session to browse to an item or view.", + "operationId": "DisplayContent", + "parameters": [ + { + "name": "sessionId", + "in": "path", + "description": "The session Id.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "itemType", + "in": "query", + "description": "The type of item to browse to.", + "required": true, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseItemKind" + } + ], + "description": "The base item kind." + } + }, + { + "name": "itemId", + "in": "query", + "description": "The Id of the item.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "itemName", + "in": "query", + "description": "The name of the item.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Instruction sent to session." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Sessions/Capabilities": { + "post": { + "tags": [ + "Session" + ], + "summary": "Updates capabilities for a device.", + "operationId": "PostCapabilities", + "parameters": [ + { + "name": "id", + "in": "query", + "description": "The session id.", + "schema": { + "type": "string" + } + }, + { + "name": "playableMediaTypes", + "in": "query", + "description": "A list of playable media types, comma delimited. Audio, Video, Book, Photo.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "supportedCommands", + "in": "query", + "description": "A list of supported remote control commands, comma delimited.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GeneralCommandType" + } + } + }, + { + "name": "supportsMediaControl", + "in": "query", + "description": "Determines whether media can be played remotely..", + "schema": { + "type": "boolean", + "default": false + } + }, + { + "name": "supportsSync", + "in": "query", + "description": "Determines whether sync is supported.", + "schema": { + "type": "boolean", + "default": false + } + }, + { + "name": "supportsPersistentIdentifier", + "in": "query", + "description": "Determines whether the device supports a unique identifier.", + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "204": { + "description": "Capabilities posted." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Sessions/Capabilities/Full": { + "post": { + "tags": [ + "Session" + ], + "summary": "Updates capabilities for a device.", + "operationId": "PostFullCapabilities", + "parameters": [ + { + "name": "id", + "in": "query", + "description": "The session id.", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "The MediaBrowser.Model.Session.ClientCapabilities.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ClientCapabilitiesDto" + } + ], + "description": "Client capabilities dto." + } + }, + "text/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ClientCapabilitiesDto" + } + ], + "description": "Client capabilities dto." + } + }, + "application/*+json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ClientCapabilitiesDto" + } + ], + "description": "Client capabilities dto." + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Capabilities updated." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Sessions/Logout": { + "post": { + "tags": [ + "Session" + ], + "summary": "Reports that a session has ended.", + "operationId": "ReportSessionEnded", + "responses": { + "204": { + "description": "Session end reported to server." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Sessions/Viewing": { + "post": { + "tags": [ + "Session" + ], + "summary": "Reports that a session is viewing an item.", + "operationId": "ReportViewing", + "parameters": [ + { + "name": "sessionId", + "in": "query", + "description": "The session id.", + "schema": { + "type": "string" + } + }, + { + "name": "itemId", + "in": "query", + "description": "The item id.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Session reported to server." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Startup/Complete": { + "post": { + "tags": [ + "Startup" + ], + "summary": "Completes the startup wizard.", + "operationId": "CompleteWizard", + "responses": { + "204": { + "description": "Startup wizard completed." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "FirstTimeSetupOrElevated" + ] + } + ] + } + }, + "/Startup/Configuration": { + "get": { + "tags": [ + "Startup" + ], + "summary": "Gets the initial startup wizard configuration.", + "operationId": "GetStartupConfiguration", + "responses": { + "200": { + "description": "Initial startup wizard configuration retrieved.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StartupConfigurationDto" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/StartupConfigurationDto" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/StartupConfigurationDto" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "FirstTimeSetupOrElevated" + ] + } + ] + }, + "post": { + "tags": [ + "Startup" + ], + "summary": "Sets the initial startup wizard configuration.", + "operationId": "UpdateInitialConfiguration", + "requestBody": { + "description": "The updated startup configuration.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/StartupConfigurationDto" + } + ], + "description": "The startup configuration DTO." + } + }, + "text/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/StartupConfigurationDto" + } + ], + "description": "The startup configuration DTO." + } + }, + "application/*+json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/StartupConfigurationDto" + } + ], + "description": "The startup configuration DTO." + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Configuration saved." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "FirstTimeSetupOrElevated" + ] + } + ] + } + }, + "/Startup/FirstUser": { + "get": { + "tags": [ + "Startup" + ], + "summary": "Gets the first user.", + "operationId": "GetFirstUser_2", + "responses": { + "200": { + "description": "Initial user retrieved.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StartupUserDto" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/StartupUserDto" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/StartupUserDto" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "FirstTimeSetupOrElevated" + ] + } + ] + } + }, + "/Startup/RemoteAccess": { + "post": { + "tags": [ + "Startup" + ], + "summary": "Sets remote access and UPnP.", + "operationId": "SetRemoteAccess", + "requestBody": { + "description": "The startup remote access dto.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/StartupRemoteAccessDto" + } + ], + "description": "Startup remote access dto." + } + }, + "text/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/StartupRemoteAccessDto" + } + ], + "description": "Startup remote access dto." + } + }, + "application/*+json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/StartupRemoteAccessDto" + } + ], + "description": "Startup remote access dto." + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Configuration saved." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "FirstTimeSetupOrElevated" + ] + } + ] + } + }, + "/Startup/User": { + "get": { + "tags": [ + "Startup" + ], + "summary": "Gets the first user.", + "operationId": "GetFirstUser", + "responses": { + "200": { + "description": "Initial user retrieved.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StartupUserDto" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/StartupUserDto" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/StartupUserDto" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "FirstTimeSetupOrElevated" + ] + } + ] + }, + "post": { + "tags": [ + "Startup" + ], + "summary": "Sets the user name and password.", + "operationId": "UpdateStartupUser", + "requestBody": { + "description": "The DTO containing username and password.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/StartupUserDto" + } + ], + "description": "The startup user DTO." + } + }, + "text/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/StartupUserDto" + } + ], + "description": "The startup user DTO." + } + }, + "application/*+json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/StartupUserDto" + } + ], + "description": "The startup user DTO." + } + } + } + }, + "responses": { + "204": { + "description": "Updated user name and password." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "FirstTimeSetupOrElevated" + ] + } + ] + } + }, + "/Studios": { + "get": { + "tags": [ + "Studios" + ], + "summary": "Gets all studios from a given item, folder, or the entire library.", + "operationId": "GetStudios", + "parameters": [ + { + "name": "startIndex", + "in": "query", + "description": "Optional. The record index to start at. All items with a lower index will be dropped from the results.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "limit", + "in": "query", + "description": "Optional. The maximum number of records to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "searchTerm", + "in": "query", + "description": "Optional. Search term.", + "schema": { + "type": "string" + } + }, + { + "name": "parentId", + "in": "query", + "description": "Specify this to localize the search to a specific item or folder. Omit to use the root.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "fields", + "in": "query", + "description": "Optional. Specify additional fields of information to return in the output.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ItemFields" + } + } + }, + { + "name": "excludeItemTypes", + "in": "query", + "description": "Optional. If specified, results will be filtered out based on item type. This allows multiple, comma delimited.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseItemKind" + } + } + }, + { + "name": "includeItemTypes", + "in": "query", + "description": "Optional. If specified, results will be filtered based on item type. This allows multiple, comma delimited.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseItemKind" + } + } + }, + { + "name": "isFavorite", + "in": "query", + "description": "Optional filter by items that are marked as favorite, or not.", + "schema": { + "type": "boolean" + } + }, + { + "name": "enableUserData", + "in": "query", + "description": "Optional, include user data.", + "schema": { + "type": "boolean" + } + }, + { + "name": "imageTypeLimit", + "in": "query", + "description": "Optional, the max number of images to return, per image type.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "enableImageTypes", + "in": "query", + "description": "Optional. The image types to include in the output.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ImageType" + } + } + }, + { + "name": "userId", + "in": "query", + "description": "User id.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "nameStartsWithOrGreater", + "in": "query", + "description": "Optional filter by items whose name is sorted equally or greater than a given input string.", + "schema": { + "type": "string" + } + }, + { + "name": "nameStartsWith", + "in": "query", + "description": "Optional filter by items whose name is sorted equally than a given input string.", + "schema": { + "type": "string" + } + }, + { + "name": "nameLessThan", + "in": "query", + "description": "Optional filter by items whose name is equally or lesser than a given input string.", + "schema": { + "type": "string" + } + }, + { + "name": "enableImages", + "in": "query", + "description": "Optional, include image information in output.", + "schema": { + "type": "boolean", + "default": true + } + }, + { + "name": "enableTotalRecordCount", + "in": "query", + "description": "Total record count.", + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Studios returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Studios/{name}": { + "get": { + "tags": [ + "Studios" + ], + "summary": "Gets a studio by name.", + "operationId": "GetStudio", + "parameters": [ + { + "name": "name", + "in": "path", + "description": "Studio name.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "userId", + "in": "query", + "description": "Optional. Filter by user id, and attach user data.", + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Studio returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BaseItemDto" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDto" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDto" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/FallbackFont/Fonts": { + "get": { + "tags": [ + "Subtitle" + ], + "summary": "Gets a list of available fallback font files.", + "operationId": "GetFallbackFontList", + "responses": { + "200": { + "description": "Information retrieved.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FontFile" + } + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FontFile" + } + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FontFile" + } + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/FallbackFont/Fonts/{name}": { + "get": { + "tags": [ + "Subtitle" + ], + "summary": "Gets a fallback font file.", + "operationId": "GetFallbackFont", + "parameters": [ + { + "name": "name", + "in": "path", + "description": "The name of the fallback font file to get.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Fallback font file retrieved.", + "content": { + "font/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Items/{itemId}/RemoteSearch/Subtitles/{language}": { + "get": { + "tags": [ + "Subtitle" + ], + "summary": "Search remote subtitles.", + "operationId": "SearchRemoteSubtitles", + "parameters": [ + { + "name": "itemId", + "in": "path", + "description": "The item id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "language", + "in": "path", + "description": "The language of the subtitles.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "isPerfectMatch", + "in": "query", + "description": "Optional. Only show subtitles which are a perfect match.", + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "Subtitles retrieved.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteSubtitleInfo" + } + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteSubtitleInfo" + } + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteSubtitleInfo" + } + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Items/{itemId}/RemoteSearch/Subtitles/{subtitleId}": { + "post": { + "tags": [ + "Subtitle" + ], + "summary": "Downloads a remote subtitle.", + "operationId": "DownloadRemoteSubtitles", + "parameters": [ + { + "name": "itemId", + "in": "path", + "description": "The item id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "subtitleId", + "in": "path", + "description": "The subtitle id.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Subtitle downloaded." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Providers/Subtitles/Subtitles/{id}": { + "get": { + "tags": [ + "Subtitle" + ], + "summary": "Gets the remote subtitles.", + "operationId": "GetRemoteSubtitles", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "The item id.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "File returned.", + "content": { + "text/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Videos/{itemId}/{mediaSourceId}/Subtitles/{index}/subtitles.m3u8": { + "get": { + "tags": [ + "Subtitle" + ], + "summary": "Gets an HLS subtitle playlist.", + "operationId": "GetSubtitlePlaylist", + "parameters": [ + { + "name": "itemId", + "in": "path", + "description": "The item id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "index", + "in": "path", + "description": "The subtitle stream index.", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "mediaSourceId", + "in": "path", + "description": "The media source id.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "segmentLength", + "in": "query", + "description": "The subtitle segment length.", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "Subtitle playlist retrieved.", + "content": { + "application/x-mpegURL": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Videos/{itemId}/Subtitles": { + "post": { + "tags": [ + "Subtitle" + ], + "summary": "Upload an external subtitle file.", + "operationId": "UploadSubtitle", + "parameters": [ + { + "name": "itemId", + "in": "path", + "description": "The item the subtitle belongs to.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "description": "The request body.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/UploadSubtitleDto" + } + ], + "description": "Upload subtitles dto." + } + }, + "text/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/UploadSubtitleDto" + } + ], + "description": "Upload subtitles dto." + } + }, + "application/*+json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/UploadSubtitleDto" + } + ], + "description": "Upload subtitles dto." + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Subtitle uploaded." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "RequiresElevation" + ] + } + ] + } + }, + "/Videos/{itemId}/Subtitles/{index}": { + "delete": { + "tags": [ + "Subtitle" + ], + "summary": "Deletes an external subtitle file.", + "operationId": "DeleteSubtitle", + "parameters": [ + { + "name": "itemId", + "in": "path", + "description": "The item id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "index", + "in": "path", + "description": "The index of the subtitle file.", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "204": { + "description": "Subtitle deleted." + }, + "404": { + "description": "Item not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "RequiresElevation" + ] + } + ] + } + }, + "/Videos/{routeItemId}/{routeMediaSourceId}/Subtitles/{routeIndex}/{routeStartPositionTicks}/Stream.{routeFormat}": { + "get": { + "tags": [ + "Subtitle" + ], + "summary": "Gets subtitles in a specified format.", + "operationId": "GetSubtitleWithTicks", + "parameters": [ + { + "name": "routeItemId", + "in": "path", + "description": "The (route) item id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "routeMediaSourceId", + "in": "path", + "description": "The (route) media source id.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "routeIndex", + "in": "path", + "description": "The (route) subtitle stream index.", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "routeStartPositionTicks", + "in": "path", + "description": "The (route) start position of the subtitle in ticks.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "routeFormat", + "in": "path", + "description": "The (route) format of the returned subtitle.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "itemId", + "in": "query", + "description": "The item id.", + "deprecated": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "mediaSourceId", + "in": "query", + "description": "The media source id.", + "deprecated": true, + "schema": { + "type": "string" + } + }, + { + "name": "index", + "in": "query", + "description": "The subtitle stream index.", + "deprecated": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "startPositionTicks", + "in": "query", + "description": "The start position of the subtitle in ticks.", + "deprecated": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "format", + "in": "query", + "description": "The format of the returned subtitle.", + "deprecated": true, + "schema": { + "type": "string" + } + }, + { + "name": "endPositionTicks", + "in": "query", + "description": "Optional. The end position of the subtitle in ticks.", + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "copyTimestamps", + "in": "query", + "description": "Optional. Whether to copy the timestamps.", + "schema": { + "type": "boolean", + "default": false + } + }, + { + "name": "addVttTimeMap", + "in": "query", + "description": "Optional. Whether to add a VTT time map.", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "200": { + "description": "File returned.", + "content": { + "text/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/Videos/{routeItemId}/{routeMediaSourceId}/Subtitles/{routeIndex}/Stream.{routeFormat}": { + "get": { + "tags": [ + "Subtitle" + ], + "summary": "Gets subtitles in a specified format.", + "operationId": "GetSubtitle", + "parameters": [ + { + "name": "routeItemId", + "in": "path", + "description": "The (route) item id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "routeMediaSourceId", + "in": "path", + "description": "The (route) media source id.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "routeIndex", + "in": "path", + "description": "The (route) subtitle stream index.", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "routeFormat", + "in": "path", + "description": "The (route) format of the returned subtitle.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "itemId", + "in": "query", + "description": "The item id.", + "deprecated": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "mediaSourceId", + "in": "query", + "description": "The media source id.", + "deprecated": true, + "schema": { + "type": "string" + } + }, + { + "name": "index", + "in": "query", + "description": "The subtitle stream index.", + "deprecated": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "format", + "in": "query", + "description": "The format of the returned subtitle.", + "deprecated": true, + "schema": { + "type": "string" + } + }, + { + "name": "endPositionTicks", + "in": "query", + "description": "Optional. The end position of the subtitle in ticks.", + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "copyTimestamps", + "in": "query", + "description": "Optional. Whether to copy the timestamps.", + "schema": { + "type": "boolean", + "default": false + } + }, + { + "name": "addVttTimeMap", + "in": "query", + "description": "Optional. Whether to add a VTT time map.", + "schema": { + "type": "boolean", + "default": false + } + }, + { + "name": "startPositionTicks", + "in": "query", + "description": "The start position of the subtitle in ticks.", + "schema": { + "type": "integer", + "format": "int64", + "default": 0 + } + } + ], + "responses": { + "200": { + "description": "File returned.", + "content": { + "text/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/Users/{userId}/Suggestions": { + "get": { + "tags": [ + "Suggestions" + ], + "summary": "Gets suggestions.", + "operationId": "GetSuggestions", + "parameters": [ + { + "name": "userId", + "in": "path", + "description": "The user id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "mediaType", + "in": "query", + "description": "The media types.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "type", + "in": "query", + "description": "The type.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseItemKind" + } + } + }, + { + "name": "startIndex", + "in": "query", + "description": "Optional. The start index.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "limit", + "in": "query", + "description": "Optional. The limit.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "enableTotalRecordCount", + "in": "query", + "description": "Whether to enable the total record count.", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "200": { + "description": "Suggestions returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/SyncPlay/Buffering": { + "post": { + "tags": [ + "SyncPlay" + ], + "summary": "Notify SyncPlay group that member is buffering.", + "operationId": "SyncPlayBuffering", + "requestBody": { + "description": "The player status.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/BufferRequestDto" + } + ], + "description": "Class BufferRequestDto." + } + }, + "text/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/BufferRequestDto" + } + ], + "description": "Class BufferRequestDto." + } + }, + "application/*+json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/BufferRequestDto" + } + ], + "description": "Class BufferRequestDto." + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Group state update sent to all group members." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "SyncPlayIsInGroup", + "SyncPlayHasAccess" + ] + } + ] + } + }, + "/SyncPlay/Join": { + "post": { + "tags": [ + "SyncPlay" + ], + "summary": "Join an existing SyncPlay group.", + "operationId": "SyncPlayJoinGroup", + "requestBody": { + "description": "The group to join.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/JoinGroupRequestDto" + } + ], + "description": "Class JoinGroupRequestDto." + } + }, + "text/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/JoinGroupRequestDto" + } + ], + "description": "Class JoinGroupRequestDto." + } + }, + "application/*+json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/JoinGroupRequestDto" + } + ], + "description": "Class JoinGroupRequestDto." + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Group join successful." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "SyncPlayJoinGroup", + "SyncPlayHasAccess" + ] + } + ] + } + }, + "/SyncPlay/Leave": { + "post": { + "tags": [ + "SyncPlay" + ], + "summary": "Leave the joined SyncPlay group.", + "operationId": "SyncPlayLeaveGroup", + "responses": { + "204": { + "description": "Group leave successful." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "SyncPlayIsInGroup", + "SyncPlayHasAccess" + ] + } + ] + } + }, + "/SyncPlay/List": { + "get": { + "tags": [ + "SyncPlay" + ], + "summary": "Gets all SyncPlay groups.", + "operationId": "SyncPlayGetGroups", + "responses": { + "200": { + "description": "Groups returned.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GroupInfoDto" + } + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GroupInfoDto" + } + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GroupInfoDto" + } + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "SyncPlayJoinGroup", + "SyncPlayHasAccess" + ] + } + ] + } + }, + "/SyncPlay/MovePlaylistItem": { + "post": { + "tags": [ + "SyncPlay" + ], + "summary": "Request to move an item in the playlist in SyncPlay group.", + "operationId": "SyncPlayMovePlaylistItem", + "requestBody": { + "description": "The new position for the item.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/MovePlaylistItemRequestDto" + } + ], + "description": "Class MovePlaylistItemRequestDto." + } + }, + "text/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/MovePlaylistItemRequestDto" + } + ], + "description": "Class MovePlaylistItemRequestDto." + } + }, + "application/*+json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/MovePlaylistItemRequestDto" + } + ], + "description": "Class MovePlaylistItemRequestDto." + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Queue update sent to all group members." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "SyncPlayIsInGroup", + "SyncPlayHasAccess" + ] + } + ] + } + }, + "/SyncPlay/New": { + "post": { + "tags": [ + "SyncPlay" + ], + "summary": "Create a new SyncPlay group.", + "operationId": "SyncPlayCreateGroup", + "requestBody": { + "description": "The settings of the new group.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/NewGroupRequestDto" + } + ], + "description": "Class NewGroupRequestDto." + } + }, + "text/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/NewGroupRequestDto" + } + ], + "description": "Class NewGroupRequestDto." + } + }, + "application/*+json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/NewGroupRequestDto" + } + ], + "description": "Class NewGroupRequestDto." + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "New group created." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "SyncPlayCreateGroup", + "SyncPlayHasAccess" + ] + } + ] + } + }, + "/SyncPlay/NextItem": { + "post": { + "tags": [ + "SyncPlay" + ], + "summary": "Request next item in SyncPlay group.", + "operationId": "SyncPlayNextItem", + "requestBody": { + "description": "The current item information.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/NextItemRequestDto" + } + ], + "description": "Class NextItemRequestDto." + } + }, + "text/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/NextItemRequestDto" + } + ], + "description": "Class NextItemRequestDto." + } + }, + "application/*+json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/NextItemRequestDto" + } + ], + "description": "Class NextItemRequestDto." + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Next item update sent to all group members." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "SyncPlayIsInGroup", + "SyncPlayHasAccess" + ] + } + ] + } + }, + "/SyncPlay/Pause": { + "post": { + "tags": [ + "SyncPlay" + ], + "summary": "Request pause in SyncPlay group.", + "operationId": "SyncPlayPause", + "responses": { + "204": { + "description": "Pause update sent to all group members." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "SyncPlayIsInGroup", + "SyncPlayHasAccess" + ] + } + ] + } + }, + "/SyncPlay/Ping": { + "post": { + "tags": [ + "SyncPlay" + ], + "summary": "Update session ping.", + "operationId": "SyncPlayPing", + "requestBody": { + "description": "The new ping.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/PingRequestDto" + } + ], + "description": "Class PingRequestDto." + } + }, + "text/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/PingRequestDto" + } + ], + "description": "Class PingRequestDto." + } + }, + "application/*+json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/PingRequestDto" + } + ], + "description": "Class PingRequestDto." + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Ping updated." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "SyncPlayHasAccess" + ] + } + ] + } + }, + "/SyncPlay/PreviousItem": { + "post": { + "tags": [ + "SyncPlay" + ], + "summary": "Request previous item in SyncPlay group.", + "operationId": "SyncPlayPreviousItem", + "requestBody": { + "description": "The current item information.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/PreviousItemRequestDto" + } + ], + "description": "Class PreviousItemRequestDto." + } + }, + "text/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/PreviousItemRequestDto" + } + ], + "description": "Class PreviousItemRequestDto." + } + }, + "application/*+json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/PreviousItemRequestDto" + } + ], + "description": "Class PreviousItemRequestDto." + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Previous item update sent to all group members." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "SyncPlayIsInGroup", + "SyncPlayHasAccess" + ] + } + ] + } + }, + "/SyncPlay/Queue": { + "post": { + "tags": [ + "SyncPlay" + ], + "summary": "Request to queue items to the playlist of a SyncPlay group.", + "operationId": "SyncPlayQueue", + "requestBody": { + "description": "The items to add.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/QueueRequestDto" + } + ], + "description": "Class QueueRequestDto." + } + }, + "text/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/QueueRequestDto" + } + ], + "description": "Class QueueRequestDto." + } + }, + "application/*+json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/QueueRequestDto" + } + ], + "description": "Class QueueRequestDto." + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Queue update sent to all group members." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "SyncPlayIsInGroup", + "SyncPlayHasAccess" + ] + } + ] + } + }, + "/SyncPlay/Ready": { + "post": { + "tags": [ + "SyncPlay" + ], + "summary": "Notify SyncPlay group that member is ready for playback.", + "operationId": "SyncPlayReady", + "requestBody": { + "description": "The player status.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ReadyRequestDto" + } + ], + "description": "Class ReadyRequest." + } + }, + "text/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ReadyRequestDto" + } + ], + "description": "Class ReadyRequest." + } + }, + "application/*+json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ReadyRequestDto" + } + ], + "description": "Class ReadyRequest." + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Group state update sent to all group members." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "SyncPlayIsInGroup", + "SyncPlayHasAccess" + ] + } + ] + } + }, + "/SyncPlay/RemoveFromPlaylist": { + "post": { + "tags": [ + "SyncPlay" + ], + "summary": "Request to remove items from the playlist in SyncPlay group.", + "operationId": "SyncPlayRemoveFromPlaylist", + "requestBody": { + "description": "The items to remove.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/RemoveFromPlaylistRequestDto" + } + ], + "description": "Class RemoveFromPlaylistRequestDto." + } + }, + "text/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/RemoveFromPlaylistRequestDto" + } + ], + "description": "Class RemoveFromPlaylistRequestDto." + } + }, + "application/*+json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/RemoveFromPlaylistRequestDto" + } + ], + "description": "Class RemoveFromPlaylistRequestDto." + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Queue update sent to all group members." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "SyncPlayIsInGroup", + "SyncPlayHasAccess" + ] + } + ] + } + }, + "/SyncPlay/Seek": { + "post": { + "tags": [ + "SyncPlay" + ], + "summary": "Request seek in SyncPlay group.", + "operationId": "SyncPlaySeek", + "requestBody": { + "description": "The new playback position.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SeekRequestDto" + } + ], + "description": "Class SeekRequestDto." + } + }, + "text/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SeekRequestDto" + } + ], + "description": "Class SeekRequestDto." + } + }, + "application/*+json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SeekRequestDto" + } + ], + "description": "Class SeekRequestDto." + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Seek update sent to all group members." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "SyncPlayIsInGroup", + "SyncPlayHasAccess" + ] + } + ] + } + }, + "/SyncPlay/SetIgnoreWait": { + "post": { + "tags": [ + "SyncPlay" + ], + "summary": "Request SyncPlay group to ignore member during group-wait.", + "operationId": "SyncPlaySetIgnoreWait", + "requestBody": { + "description": "The settings to set.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/IgnoreWaitRequestDto" + } + ], + "description": "Class IgnoreWaitRequestDto." + } + }, + "text/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/IgnoreWaitRequestDto" + } + ], + "description": "Class IgnoreWaitRequestDto." + } + }, + "application/*+json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/IgnoreWaitRequestDto" + } + ], + "description": "Class IgnoreWaitRequestDto." + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Member state updated." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "SyncPlayIsInGroup", + "SyncPlayHasAccess" + ] + } + ] + } + }, + "/SyncPlay/SetNewQueue": { + "post": { + "tags": [ + "SyncPlay" + ], + "summary": "Request to set new playlist in SyncPlay group.", + "operationId": "SyncPlaySetNewQueue", + "requestBody": { + "description": "The new playlist to play in the group.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/PlayRequestDto" + } + ], + "description": "Class PlayRequestDto." + } + }, + "text/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/PlayRequestDto" + } + ], + "description": "Class PlayRequestDto." + } + }, + "application/*+json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/PlayRequestDto" + } + ], + "description": "Class PlayRequestDto." + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Queue update sent to all group members." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "SyncPlayIsInGroup", + "SyncPlayHasAccess" + ] + } + ] + } + }, + "/SyncPlay/SetPlaylistItem": { + "post": { + "tags": [ + "SyncPlay" + ], + "summary": "Request to change playlist item in SyncPlay group.", + "operationId": "SyncPlaySetPlaylistItem", + "requestBody": { + "description": "The new item to play.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SetPlaylistItemRequestDto" + } + ], + "description": "Class SetPlaylistItemRequestDto." + } + }, + "text/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SetPlaylistItemRequestDto" + } + ], + "description": "Class SetPlaylistItemRequestDto." + } + }, + "application/*+json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SetPlaylistItemRequestDto" + } + ], + "description": "Class SetPlaylistItemRequestDto." + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Queue update sent to all group members." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "SyncPlayIsInGroup", + "SyncPlayHasAccess" + ] + } + ] + } + }, + "/SyncPlay/SetRepeatMode": { + "post": { + "tags": [ + "SyncPlay" + ], + "summary": "Request to set repeat mode in SyncPlay group.", + "operationId": "SyncPlaySetRepeatMode", + "requestBody": { + "description": "The new repeat mode.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SetRepeatModeRequestDto" + } + ], + "description": "Class SetRepeatModeRequestDto." + } + }, + "text/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SetRepeatModeRequestDto" + } + ], + "description": "Class SetRepeatModeRequestDto." + } + }, + "application/*+json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SetRepeatModeRequestDto" + } + ], + "description": "Class SetRepeatModeRequestDto." + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Play queue update sent to all group members." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "SyncPlayIsInGroup", + "SyncPlayHasAccess" + ] + } + ] + } + }, + "/SyncPlay/SetShuffleMode": { + "post": { + "tags": [ + "SyncPlay" + ], + "summary": "Request to set shuffle mode in SyncPlay group.", + "operationId": "SyncPlaySetShuffleMode", + "requestBody": { + "description": "The new shuffle mode.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SetShuffleModeRequestDto" + } + ], + "description": "Class SetShuffleModeRequestDto." + } + }, + "text/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SetShuffleModeRequestDto" + } + ], + "description": "Class SetShuffleModeRequestDto." + } + }, + "application/*+json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SetShuffleModeRequestDto" + } + ], + "description": "Class SetShuffleModeRequestDto." + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Play queue update sent to all group members." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "SyncPlayIsInGroup", + "SyncPlayHasAccess" + ] + } + ] + } + }, + "/SyncPlay/Stop": { + "post": { + "tags": [ + "SyncPlay" + ], + "summary": "Request stop in SyncPlay group.", + "operationId": "SyncPlayStop", + "responses": { + "204": { + "description": "Stop update sent to all group members." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "SyncPlayIsInGroup", + "SyncPlayHasAccess" + ] + } + ] + } + }, + "/SyncPlay/Unpause": { + "post": { + "tags": [ + "SyncPlay" + ], + "summary": "Request unpause in SyncPlay group.", + "operationId": "SyncPlayUnpause", + "responses": { + "204": { + "description": "Unpause update sent to all group members." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "SyncPlayIsInGroup", + "SyncPlayHasAccess" + ] + } + ] + } + }, + "/System/Endpoint": { + "get": { + "tags": [ + "System" + ], + "summary": "Gets information about the request endpoint.", + "operationId": "GetEndpointInfo", + "responses": { + "200": { + "description": "Information retrieved.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EndPointInfo" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/EndPointInfo" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/EndPointInfo" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/System/Info": { + "get": { + "tags": [ + "System" + ], + "summary": "Gets information about the server.", + "operationId": "GetSystemInfo", + "responses": { + "200": { + "description": "Information retrieved.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SystemInfo" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/SystemInfo" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/SystemInfo" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "FirstTimeSetupOrIgnoreParentalControl" + ] + } + ] + } + }, + "/System/Info/Public": { + "get": { + "tags": [ + "System" + ], + "summary": "Gets public information about the server.", + "operationId": "GetPublicSystemInfo", + "responses": { + "200": { + "description": "Information retrieved.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PublicSystemInfo" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/PublicSystemInfo" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/PublicSystemInfo" + } + } + } + } + } + } + }, + "/System/Logs": { + "get": { + "tags": [ + "System" + ], + "summary": "Gets a list of available server log files.", + "operationId": "GetServerLogs", + "responses": { + "200": { + "description": "Information retrieved.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LogFile" + } + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LogFile" + } + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LogFile" + } + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "RequiresElevation" + ] + } + ] + } + }, + "/System/Logs/Log": { + "get": { + "tags": [ + "System" + ], + "summary": "Gets a log file.", + "operationId": "GetLogFile", + "parameters": [ + { + "name": "name", + "in": "query", + "description": "The name of the log file to get.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Log file retrieved.", + "content": { + "text/plain": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "RequiresElevation" + ] + } + ] + } + }, + "/System/Ping": { + "get": { + "tags": [ + "System" + ], + "summary": "Pings the system.", + "operationId": "GetPingSystem", + "responses": { + "200": { + "description": "Information retrieved.", + "content": { + "application/json": { + "schema": { + "type": "string" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "type": "string" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "type": "string" + } + } + } + } + } + }, + "post": { + "tags": [ + "System" + ], + "summary": "Pings the system.", + "operationId": "PostPingSystem", + "responses": { + "200": { + "description": "Information retrieved.", + "content": { + "application/json": { + "schema": { + "type": "string" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "type": "string" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "type": "string" + } + } + } + } + } + } + }, + "/System/Restart": { + "post": { + "tags": [ + "System" + ], + "summary": "Restarts the application.", + "operationId": "RestartApplication", + "responses": { + "204": { + "description": "Server restarted." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "LocalAccessOrRequiresElevation" + ] + } + ] + } + }, + "/System/Shutdown": { + "post": { + "tags": [ + "System" + ], + "summary": "Shuts down the application.", + "operationId": "ShutdownApplication", + "responses": { + "204": { + "description": "Server shut down." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "RequiresElevation" + ] + } + ] + } + }, + "/System/WakeOnLanInfo": { + "get": { + "tags": [ + "System" + ], + "summary": "Gets wake on lan information.", + "operationId": "GetWakeOnLanInfo", + "responses": { + "200": { + "description": "Information retrieved.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WakeOnLanInfo" + } + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WakeOnLanInfo" + } + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WakeOnLanInfo" + } + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "deprecated": true, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/GetUtcTime": { + "get": { + "tags": [ + "TimeSync" + ], + "summary": "Gets the current UTC time.", + "operationId": "GetUtcTime", + "responses": { + "200": { + "description": "Time returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UtcTimeResponse" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/UtcTimeResponse" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/UtcTimeResponse" + } + } + } + } + } + } + }, + "/Tmdb/ClientConfiguration": { + "get": { + "tags": [ + "Tmdb" + ], + "summary": "Gets the TMDb image configuration options.", + "operationId": "TmdbClientConfiguration", + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConfigImageTypes" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Trailers": { + "get": { + "tags": [ + "Trailers" + ], + "summary": "Finds movies and trailers similar to a given trailer.", + "operationId": "GetTrailers", + "parameters": [ + { + "name": "userId", + "in": "query", + "description": "The user id.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "maxOfficialRating", + "in": "query", + "description": "Optional filter by maximum official rating (PG, PG-13, TV-MA, etc).", + "schema": { + "type": "string" + } + }, + { + "name": "hasThemeSong", + "in": "query", + "description": "Optional filter by items with theme songs.", + "schema": { + "type": "boolean" + } + }, + { + "name": "hasThemeVideo", + "in": "query", + "description": "Optional filter by items with theme videos.", + "schema": { + "type": "boolean" + } + }, + { + "name": "hasSubtitles", + "in": "query", + "description": "Optional filter by items with subtitles.", + "schema": { + "type": "boolean" + } + }, + { + "name": "hasSpecialFeature", + "in": "query", + "description": "Optional filter by items with special features.", + "schema": { + "type": "boolean" + } + }, + { + "name": "hasTrailer", + "in": "query", + "description": "Optional filter by items with trailers.", + "schema": { + "type": "boolean" + } + }, + { + "name": "adjacentTo", + "in": "query", + "description": "Optional. Return items that are siblings of a supplied item.", + "schema": { + "type": "string" + } + }, + { + "name": "parentIndexNumber", + "in": "query", + "description": "Optional filter by parent index number.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "hasParentalRating", + "in": "query", + "description": "Optional filter by items that have or do not have a parental rating.", + "schema": { + "type": "boolean" + } + }, + { + "name": "isHd", + "in": "query", + "description": "Optional filter by items that are HD or not.", + "schema": { + "type": "boolean" + } + }, + { + "name": "is4K", + "in": "query", + "description": "Optional filter by items that are 4K or not.", + "schema": { + "type": "boolean" + } + }, + { + "name": "locationTypes", + "in": "query", + "description": "Optional. If specified, results will be filtered based on LocationType. This allows multiple, comma delimited.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LocationType" + } + } + }, + { + "name": "excludeLocationTypes", + "in": "query", + "description": "Optional. If specified, results will be filtered based on the LocationType. This allows multiple, comma delimited.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LocationType" + } + } + }, + { + "name": "isMissing", + "in": "query", + "description": "Optional filter by items that are missing episodes or not.", + "schema": { + "type": "boolean" + } + }, + { + "name": "isUnaired", + "in": "query", + "description": "Optional filter by items that are unaired episodes or not.", + "schema": { + "type": "boolean" + } + }, + { + "name": "minCommunityRating", + "in": "query", + "description": "Optional filter by minimum community rating.", + "schema": { + "type": "number", + "format": "double" + } + }, + { + "name": "minCriticRating", + "in": "query", + "description": "Optional filter by minimum critic rating.", + "schema": { + "type": "number", + "format": "double" + } + }, + { + "name": "minPremiereDate", + "in": "query", + "description": "Optional. The minimum premiere date. Format = ISO.", + "schema": { + "type": "string", + "format": "date-time" + } + }, + { + "name": "minDateLastSaved", + "in": "query", + "description": "Optional. The minimum last saved date. Format = ISO.", + "schema": { + "type": "string", + "format": "date-time" + } + }, + { + "name": "minDateLastSavedForUser", + "in": "query", + "description": "Optional. The minimum last saved date for the current user. Format = ISO.", + "schema": { + "type": "string", + "format": "date-time" + } + }, + { + "name": "maxPremiereDate", + "in": "query", + "description": "Optional. The maximum premiere date. Format = ISO.", + "schema": { + "type": "string", + "format": "date-time" + } + }, + { + "name": "hasOverview", + "in": "query", + "description": "Optional filter by items that have an overview or not.", + "schema": { + "type": "boolean" + } + }, + { + "name": "hasImdbId", + "in": "query", + "description": "Optional filter by items that have an imdb id or not.", + "schema": { + "type": "boolean" + } + }, + { + "name": "hasTmdbId", + "in": "query", + "description": "Optional filter by items that have a tmdb id or not.", + "schema": { + "type": "boolean" + } + }, + { + "name": "hasTvdbId", + "in": "query", + "description": "Optional filter by items that have a tvdb id or not.", + "schema": { + "type": "boolean" + } + }, + { + "name": "isMovie", + "in": "query", + "description": "Optional filter for live tv movies.", + "schema": { + "type": "boolean" + } + }, + { + "name": "isSeries", + "in": "query", + "description": "Optional filter for live tv series.", + "schema": { + "type": "boolean" + } + }, + { + "name": "isNews", + "in": "query", + "description": "Optional filter for live tv news.", + "schema": { + "type": "boolean" + } + }, + { + "name": "isKids", + "in": "query", + "description": "Optional filter for live tv kids.", + "schema": { + "type": "boolean" + } + }, + { + "name": "isSports", + "in": "query", + "description": "Optional filter for live tv sports.", + "schema": { + "type": "boolean" + } + }, + { + "name": "excludeItemIds", + "in": "query", + "description": "Optional. If specified, results will be filtered by excluding item ids. This allows multiple, comma delimited.", + "schema": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + }, + { + "name": "startIndex", + "in": "query", + "description": "Optional. The record index to start at. All items with a lower index will be dropped from the results.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "limit", + "in": "query", + "description": "Optional. The maximum number of records to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "recursive", + "in": "query", + "description": "When searching within folders, this determines whether or not the search will be recursive. true/false.", + "schema": { + "type": "boolean" + } + }, + { + "name": "searchTerm", + "in": "query", + "description": "Optional. Filter based on a search term.", + "schema": { + "type": "string" + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort Order - Ascending,Descending.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SortOrder" + } + } + }, + { + "name": "parentId", + "in": "query", + "description": "Specify this to localize the search to a specific item or folder. Omit to use the root.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "fields", + "in": "query", + "description": "Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimited. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ItemFields" + } + } + }, + { + "name": "excludeItemTypes", + "in": "query", + "description": "Optional. If specified, results will be filtered based on item type. This allows multiple, comma delimited.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseItemKind" + } + } + }, + { + "name": "filters", + "in": "query", + "description": "Optional. Specify additional filters to apply. This allows multiple, comma delimited. Options: IsFolder, IsNotFolder, IsUnplayed, IsPlayed, IsFavorite, IsResumable, Likes, Dislikes.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ItemFilter" + } + } + }, + { + "name": "isFavorite", + "in": "query", + "description": "Optional filter by items that are marked as favorite, or not.", + "schema": { + "type": "boolean" + } + }, + { + "name": "mediaTypes", + "in": "query", + "description": "Optional filter by MediaType. Allows multiple, comma delimited.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "imageTypes", + "in": "query", + "description": "Optional. If specified, results will be filtered based on those containing image types. This allows multiple, comma delimited.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ImageType" + } + } + }, + { + "name": "sortBy", + "in": "query", + "description": "Optional. Specify one or more sort orders, comma delimited. Options: Album, AlbumArtist, Artist, Budget, CommunityRating, CriticRating, DateCreated, DatePlayed, PlayCount, PremiereDate, ProductionYear, SortName, Random, Revenue, Runtime.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "isPlayed", + "in": "query", + "description": "Optional filter by items that are played, or not.", + "schema": { + "type": "boolean" + } + }, + { + "name": "genres", + "in": "query", + "description": "Optional. If specified, results will be filtered based on genre. This allows multiple, pipe delimited.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "officialRatings", + "in": "query", + "description": "Optional. If specified, results will be filtered based on OfficialRating. This allows multiple, pipe delimited.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "tags", + "in": "query", + "description": "Optional. If specified, results will be filtered based on tag. This allows multiple, pipe delimited.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "years", + "in": "query", + "description": "Optional. If specified, results will be filtered based on production year. This allows multiple, comma delimited.", + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + }, + { + "name": "enableUserData", + "in": "query", + "description": "Optional, include user data.", + "schema": { + "type": "boolean" + } + }, + { + "name": "imageTypeLimit", + "in": "query", + "description": "Optional, the max number of images to return, per image type.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "enableImageTypes", + "in": "query", + "description": "Optional. The image types to include in the output.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ImageType" + } + } + }, + { + "name": "person", + "in": "query", + "description": "Optional. If specified, results will be filtered to include only those containing the specified person.", + "schema": { + "type": "string" + } + }, + { + "name": "personIds", + "in": "query", + "description": "Optional. If specified, results will be filtered to include only those containing the specified person id.", + "schema": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + }, + { + "name": "personTypes", + "in": "query", + "description": "Optional. If specified, along with Person, results will be filtered to include only those containing the specified person and PersonType. Allows multiple, comma-delimited.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "studios", + "in": "query", + "description": "Optional. If specified, results will be filtered based on studio. This allows multiple, pipe delimited.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "artists", + "in": "query", + "description": "Optional. If specified, results will be filtered based on artists. This allows multiple, pipe delimited.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "excludeArtistIds", + "in": "query", + "description": "Optional. If specified, results will be filtered based on artist id. This allows multiple, pipe delimited.", + "schema": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + }, + { + "name": "artistIds", + "in": "query", + "description": "Optional. If specified, results will be filtered to include only those containing the specified artist id.", + "schema": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + }, + { + "name": "albumArtistIds", + "in": "query", + "description": "Optional. If specified, results will be filtered to include only those containing the specified album artist id.", + "schema": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + }, + { + "name": "contributingArtistIds", + "in": "query", + "description": "Optional. If specified, results will be filtered to include only those containing the specified contributing artist id.", + "schema": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + }, + { + "name": "albums", + "in": "query", + "description": "Optional. If specified, results will be filtered based on album. This allows multiple, pipe delimited.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "albumIds", + "in": "query", + "description": "Optional. If specified, results will be filtered based on album id. This allows multiple, pipe delimited.", + "schema": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + }, + { + "name": "ids", + "in": "query", + "description": "Optional. If specific items are needed, specify a list of item id's to retrieve. This allows multiple, comma delimited.", + "schema": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + }, + { + "name": "videoTypes", + "in": "query", + "description": "Optional filter by VideoType (videofile, dvd, bluray, iso). Allows multiple, comma delimited.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/VideoType" + } + } + }, + { + "name": "minOfficialRating", + "in": "query", + "description": "Optional filter by minimum official rating (PG, PG-13, TV-MA, etc).", + "schema": { + "type": "string" + } + }, + { + "name": "isLocked", + "in": "query", + "description": "Optional filter by items that are locked.", + "schema": { + "type": "boolean" + } + }, + { + "name": "isPlaceHolder", + "in": "query", + "description": "Optional filter by items that are placeholders.", + "schema": { + "type": "boolean" + } + }, + { + "name": "hasOfficialRating", + "in": "query", + "description": "Optional filter by items that have official ratings.", + "schema": { + "type": "boolean" + } + }, + { + "name": "collapseBoxSetItems", + "in": "query", + "description": "Whether or not to hide items behind their boxsets.", + "schema": { + "type": "boolean" + } + }, + { + "name": "minWidth", + "in": "query", + "description": "Optional. Filter by the minimum width of the item.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "minHeight", + "in": "query", + "description": "Optional. Filter by the minimum height of the item.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxWidth", + "in": "query", + "description": "Optional. Filter by the maximum width of the item.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxHeight", + "in": "query", + "description": "Optional. Filter by the maximum height of the item.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "is3D", + "in": "query", + "description": "Optional filter by items that are 3D, or not.", + "schema": { + "type": "boolean" + } + }, + { + "name": "seriesStatus", + "in": "query", + "description": "Optional filter by Series Status. Allows multiple, comma delimited.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SeriesStatus" + } + } + }, + { + "name": "nameStartsWithOrGreater", + "in": "query", + "description": "Optional filter by items whose name is sorted equally or greater than a given input string.", + "schema": { + "type": "string" + } + }, + { + "name": "nameStartsWith", + "in": "query", + "description": "Optional filter by items whose name is sorted equally than a given input string.", + "schema": { + "type": "string" + } + }, + { + "name": "nameLessThan", + "in": "query", + "description": "Optional filter by items whose name is equally or lesser than a given input string.", + "schema": { + "type": "string" + } + }, + { + "name": "studioIds", + "in": "query", + "description": "Optional. If specified, results will be filtered based on studio id. This allows multiple, pipe delimited.", + "schema": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + }, + { + "name": "genreIds", + "in": "query", + "description": "Optional. If specified, results will be filtered based on genre id. This allows multiple, pipe delimited.", + "schema": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + }, + { + "name": "enableTotalRecordCount", + "in": "query", + "description": "Optional. Enable the total record count.", + "schema": { + "type": "boolean", + "default": true + } + }, + { + "name": "enableImages", + "in": "query", + "description": "Optional, include image information in output.", + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Shows/{seriesId}/Episodes": { + "get": { + "tags": [ + "TvShows" + ], + "summary": "Gets episodes for a tv season.", + "operationId": "GetEpisodes", + "parameters": [ + { + "name": "seriesId", + "in": "path", + "description": "The series id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "userId", + "in": "query", + "description": "The user id.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "fields", + "in": "query", + "description": "Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimited. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines, TrailerUrls.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ItemFields" + } + } + }, + { + "name": "season", + "in": "query", + "description": "Optional filter by season number.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "seasonId", + "in": "query", + "description": "Optional. Filter by season id.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "isMissing", + "in": "query", + "description": "Optional. Filter by items that are missing episodes or not.", + "schema": { + "type": "boolean" + } + }, + { + "name": "adjacentTo", + "in": "query", + "description": "Optional. Return items that are siblings of a supplied item.", + "schema": { + "type": "string" + } + }, + { + "name": "startItemId", + "in": "query", + "description": "Optional. Skip through the list until a given item is found.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "startIndex", + "in": "query", + "description": "Optional. The record index to start at. All items with a lower index will be dropped from the results.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "limit", + "in": "query", + "description": "Optional. The maximum number of records to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "enableImages", + "in": "query", + "description": "Optional, include image information in output.", + "schema": { + "type": "boolean" + } + }, + { + "name": "imageTypeLimit", + "in": "query", + "description": "Optional, the max number of images to return, per image type.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "enableImageTypes", + "in": "query", + "description": "Optional. The image types to include in the output.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ImageType" + } + } + }, + { + "name": "enableUserData", + "in": "query", + "description": "Optional. Include user data.", + "schema": { + "type": "boolean" + } + }, + { + "name": "sortBy", + "in": "query", + "description": "Optional. Specify one or more sort orders, comma delimited. Options: Album, AlbumArtist, Artist, Budget, CommunityRating, CriticRating, DateCreated, DatePlayed, PlayCount, PremiereDate, ProductionYear, SortName, Random, Revenue, Runtime.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Shows/{seriesId}/Seasons": { + "get": { + "tags": [ + "TvShows" + ], + "summary": "Gets seasons for a tv series.", + "operationId": "GetSeasons", + "parameters": [ + { + "name": "seriesId", + "in": "path", + "description": "The series id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "userId", + "in": "query", + "description": "The user id.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "fields", + "in": "query", + "description": "Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimited. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines, TrailerUrls.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ItemFields" + } + } + }, + { + "name": "isSpecialSeason", + "in": "query", + "description": "Optional. Filter by special season.", + "schema": { + "type": "boolean" + } + }, + { + "name": "isMissing", + "in": "query", + "description": "Optional. Filter by items that are missing episodes or not.", + "schema": { + "type": "boolean" + } + }, + { + "name": "adjacentTo", + "in": "query", + "description": "Optional. Return items that are siblings of a supplied item.", + "schema": { + "type": "string" + } + }, + { + "name": "enableImages", + "in": "query", + "description": "Optional. Include image information in output.", + "schema": { + "type": "boolean" + } + }, + { + "name": "imageTypeLimit", + "in": "query", + "description": "Optional. The max number of images to return, per image type.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "enableImageTypes", + "in": "query", + "description": "Optional. The image types to include in the output.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ImageType" + } + } + }, + { + "name": "enableUserData", + "in": "query", + "description": "Optional. Include user data.", + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Shows/NextUp": { + "get": { + "tags": [ + "TvShows" + ], + "summary": "Gets a list of next up episodes.", + "operationId": "GetNextUp", + "parameters": [ + { + "name": "userId", + "in": "query", + "description": "The user id of the user to get the next up episodes for.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "startIndex", + "in": "query", + "description": "Optional. The record index to start at. All items with a lower index will be dropped from the results.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "limit", + "in": "query", + "description": "Optional. The maximum number of records to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "fields", + "in": "query", + "description": "Optional. Specify additional fields of information to return in the output.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ItemFields" + } + } + }, + { + "name": "seriesId", + "in": "query", + "description": "Optional. Filter by series id.", + "schema": { + "type": "string" + } + }, + { + "name": "parentId", + "in": "query", + "description": "Optional. Specify this to localize the search to a specific item or folder. Omit to use the root.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "enableImages", + "in": "query", + "description": "Optional. Include image information in output.", + "schema": { + "type": "boolean" + } + }, + { + "name": "imageTypeLimit", + "in": "query", + "description": "Optional. The max number of images to return, per image type.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "enableImageTypes", + "in": "query", + "description": "Optional. The image types to include in the output.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ImageType" + } + } + }, + { + "name": "enableUserData", + "in": "query", + "description": "Optional. Include user data.", + "schema": { + "type": "boolean" + } + }, + { + "name": "nextUpDateCutoff", + "in": "query", + "description": "Optional. Starting date of shows to show in Next Up section.", + "schema": { + "type": "string", + "format": "date-time" + } + }, + { + "name": "enableTotalRecordCount", + "in": "query", + "description": "Whether to enable the total records count. Defaults to true.", + "schema": { + "type": "boolean", + "default": true + } + }, + { + "name": "disableFirstEpisode", + "in": "query", + "description": "Whether to disable sending the first episode in a series as next up.", + "schema": { + "type": "boolean", + "default": false + } + }, + { + "name": "enableRewatching", + "in": "query", + "description": "Whether to include watched episode in next up results.", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Shows/Upcoming": { + "get": { + "tags": [ + "TvShows" + ], + "summary": "Gets a list of upcoming episodes.", + "operationId": "GetUpcomingEpisodes", + "parameters": [ + { + "name": "userId", + "in": "query", + "description": "The user id of the user to get the upcoming episodes for.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "startIndex", + "in": "query", + "description": "Optional. The record index to start at. All items with a lower index will be dropped from the results.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "limit", + "in": "query", + "description": "Optional. The maximum number of records to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "fields", + "in": "query", + "description": "Optional. Specify additional fields of information to return in the output.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ItemFields" + } + } + }, + { + "name": "parentId", + "in": "query", + "description": "Optional. Specify this to localize the search to a specific item or folder. Omit to use the root.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "enableImages", + "in": "query", + "description": "Optional. Include image information in output.", + "schema": { + "type": "boolean" + } + }, + { + "name": "imageTypeLimit", + "in": "query", + "description": "Optional. The max number of images to return, per image type.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "enableImageTypes", + "in": "query", + "description": "Optional. The image types to include in the output.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ImageType" + } + } + }, + { + "name": "enableUserData", + "in": "query", + "description": "Optional. Include user data.", + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Audio/{itemId}/universal": { + "get": { + "tags": [ + "UniversalAudio" + ], + "summary": "Gets an audio stream.", + "operationId": "GetUniversalAudioStream", + "parameters": [ + { + "name": "itemId", + "in": "path", + "description": "The item id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "container", + "in": "query", + "description": "Optional. The audio container.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "mediaSourceId", + "in": "query", + "description": "The media version id, if playing an alternate version.", + "schema": { + "type": "string" + } + }, + { + "name": "deviceId", + "in": "query", + "description": "The device id of the client requesting. Used to stop encoding processes when needed.", + "schema": { + "type": "string" + } + }, + { + "name": "userId", + "in": "query", + "description": "Optional. The user id.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "audioCodec", + "in": "query", + "description": "Optional. The audio codec to transcode to.", + "schema": { + "type": "string" + } + }, + { + "name": "maxAudioChannels", + "in": "query", + "description": "Optional. The maximum number of audio channels.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "transcodingAudioChannels", + "in": "query", + "description": "Optional. The number of how many audio channels to transcode to.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxStreamingBitrate", + "in": "query", + "description": "Optional. The maximum streaming bitrate.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "audioBitRate", + "in": "query", + "description": "Optional. Specify an audio bitrate to encode to, e.g. 128000. If omitted this will be left to encoder defaults.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "startTimeTicks", + "in": "query", + "description": "Optional. Specify a starting offset, in ticks. 1 tick = 10000 ms.", + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "transcodingContainer", + "in": "query", + "description": "Optional. The container to transcode to.", + "schema": { + "type": "string" + } + }, + { + "name": "transcodingProtocol", + "in": "query", + "description": "Optional. The transcoding protocol.", + "schema": { + "type": "string" + } + }, + { + "name": "maxAudioSampleRate", + "in": "query", + "description": "Optional. The maximum audio sample rate.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxAudioBitDepth", + "in": "query", + "description": "Optional. The maximum audio bit depth.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "enableRemoteMedia", + "in": "query", + "description": "Optional. Whether to enable remote media.", + "schema": { + "type": "boolean" + } + }, + { + "name": "breakOnNonKeyFrames", + "in": "query", + "description": "Optional. Whether to break on non key frames.", + "schema": { + "type": "boolean", + "default": false + } + }, + { + "name": "enableRedirection", + "in": "query", + "description": "Whether to enable redirection. Defaults to true.", + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Audio stream returned.", + "content": { + "audio/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "302": { + "description": "Redirected to remote audio stream." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + }, + "head": { + "tags": [ + "UniversalAudio" + ], + "summary": "Gets an audio stream.", + "operationId": "HeadUniversalAudioStream", + "parameters": [ + { + "name": "itemId", + "in": "path", + "description": "The item id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "container", + "in": "query", + "description": "Optional. The audio container.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "mediaSourceId", + "in": "query", + "description": "The media version id, if playing an alternate version.", + "schema": { + "type": "string" + } + }, + { + "name": "deviceId", + "in": "query", + "description": "The device id of the client requesting. Used to stop encoding processes when needed.", + "schema": { + "type": "string" + } + }, + { + "name": "userId", + "in": "query", + "description": "Optional. The user id.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "audioCodec", + "in": "query", + "description": "Optional. The audio codec to transcode to.", + "schema": { + "type": "string" + } + }, + { + "name": "maxAudioChannels", + "in": "query", + "description": "Optional. The maximum number of audio channels.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "transcodingAudioChannels", + "in": "query", + "description": "Optional. The number of how many audio channels to transcode to.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxStreamingBitrate", + "in": "query", + "description": "Optional. The maximum streaming bitrate.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "audioBitRate", + "in": "query", + "description": "Optional. Specify an audio bitrate to encode to, e.g. 128000. If omitted this will be left to encoder defaults.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "startTimeTicks", + "in": "query", + "description": "Optional. Specify a starting offset, in ticks. 1 tick = 10000 ms.", + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "transcodingContainer", + "in": "query", + "description": "Optional. The container to transcode to.", + "schema": { + "type": "string" + } + }, + { + "name": "transcodingProtocol", + "in": "query", + "description": "Optional. The transcoding protocol.", + "schema": { + "type": "string" + } + }, + { + "name": "maxAudioSampleRate", + "in": "query", + "description": "Optional. The maximum audio sample rate.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxAudioBitDepth", + "in": "query", + "description": "Optional. The maximum audio bit depth.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "enableRemoteMedia", + "in": "query", + "description": "Optional. Whether to enable remote media.", + "schema": { + "type": "boolean" + } + }, + { + "name": "breakOnNonKeyFrames", + "in": "query", + "description": "Optional. Whether to break on non key frames.", + "schema": { + "type": "boolean", + "default": false + } + }, + { + "name": "enableRedirection", + "in": "query", + "description": "Whether to enable redirection. Defaults to true.", + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Audio stream returned.", + "content": { + "audio/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "302": { + "description": "Redirected to remote audio stream." + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Users": { + "get": { + "tags": [ + "User" + ], + "summary": "Gets a list of users.", + "operationId": "GetUsers", + "parameters": [ + { + "name": "isHidden", + "in": "query", + "description": "Optional filter by IsHidden=true or false.", + "schema": { + "type": "boolean" + } + }, + { + "name": "isDisabled", + "in": "query", + "description": "Optional filter by IsDisabled=true or false.", + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "Users returned.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserDto" + } + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserDto" + } + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserDto" + } + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Users/{userId}": { + "get": { + "tags": [ + "User" + ], + "summary": "Gets a user by Id.", + "operationId": "GetUserById", + "parameters": [ + { + "name": "userId", + "in": "path", + "description": "The user id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "User returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserDto" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/UserDto" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/UserDto" + } + } + } + }, + "404": { + "description": "User not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "IgnoreParentalControl" + ] + } + ] + }, + "delete": { + "tags": [ + "User" + ], + "summary": "Deletes a user.", + "operationId": "DeleteUser", + "parameters": [ + { + "name": "userId", + "in": "path", + "description": "The user id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "204": { + "description": "User deleted." + }, + "404": { + "description": "User not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "RequiresElevation" + ] + } + ] + }, + "post": { + "tags": [ + "User" + ], + "summary": "Updates a user.", + "operationId": "UpdateUser", + "parameters": [ + { + "name": "userId", + "in": "path", + "description": "The user id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "description": "The updated user model.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/UserDto" + } + ], + "description": "Class UserDto." + } + }, + "text/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/UserDto" + } + ], + "description": "Class UserDto." + } + }, + "application/*+json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/UserDto" + } + ], + "description": "Class UserDto." + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "User updated." + }, + "400": { + "description": "User information was not supplied.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "403": { + "description": "User update forbidden.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Users/{userId}/Authenticate": { + "post": { + "tags": [ + "User" + ], + "summary": "Authenticates a user.", + "operationId": "AuthenticateUser", + "parameters": [ + { + "name": "userId", + "in": "path", + "description": "The user id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "pw", + "in": "query", + "description": "The password as plain text.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "password", + "in": "query", + "description": "The password sha1-hash.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "User authenticated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthenticationResult" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/AuthenticationResult" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/AuthenticationResult" + } + } + } + }, + "403": { + "description": "Sha1-hashed password only is not allowed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "User not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + } + } + }, + "/Users/{userId}/Configuration": { + "post": { + "tags": [ + "User" + ], + "summary": "Updates a user configuration.", + "operationId": "UpdateUserConfiguration", + "parameters": [ + { + "name": "userId", + "in": "path", + "description": "The user id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "description": "The new user configuration.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/UserConfiguration" + } + ], + "description": "Class UserConfiguration." + } + }, + "text/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/UserConfiguration" + } + ], + "description": "Class UserConfiguration." + } + }, + "application/*+json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/UserConfiguration" + } + ], + "description": "Class UserConfiguration." + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "User configuration updated." + }, + "403": { + "description": "User configuration update forbidden.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Users/{userId}/EasyPassword": { + "post": { + "tags": [ + "User" + ], + "summary": "Updates a user's easy password.", + "operationId": "UpdateUserEasyPassword", + "parameters": [ + { + "name": "userId", + "in": "path", + "description": "The user id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "description": "The M:Jellyfin.Api.Controllers.UserController.UpdateUserEasyPassword(System.Guid,Jellyfin.Api.Models.UserDtos.UpdateUserEasyPassword) request.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/UpdateUserEasyPassword" + } + ], + "description": "The update user easy password request body." + } + }, + "text/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/UpdateUserEasyPassword" + } + ], + "description": "The update user easy password request body." + } + }, + "application/*+json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/UpdateUserEasyPassword" + } + ], + "description": "The update user easy password request body." + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Password successfully reset." + }, + "403": { + "description": "User is not allowed to update the password.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "User not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Users/{userId}/Password": { + "post": { + "tags": [ + "User" + ], + "summary": "Updates a user's password.", + "operationId": "UpdateUserPassword", + "parameters": [ + { + "name": "userId", + "in": "path", + "description": "The user id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "description": "The M:Jellyfin.Api.Controllers.UserController.UpdateUserPassword(System.Guid,Jellyfin.Api.Models.UserDtos.UpdateUserPassword) request.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/UpdateUserPassword" + } + ], + "description": "The update user password request body." + } + }, + "text/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/UpdateUserPassword" + } + ], + "description": "The update user password request body." + } + }, + "application/*+json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/UpdateUserPassword" + } + ], + "description": "The update user password request body." + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Password successfully reset." + }, + "403": { + "description": "User is not allowed to update the password.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "User not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Users/{userId}/Policy": { + "post": { + "tags": [ + "User" + ], + "summary": "Updates a user policy.", + "operationId": "UpdateUserPolicy", + "parameters": [ + { + "name": "userId", + "in": "path", + "description": "The user id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "description": "The new user policy.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/UserPolicy" + } + ] + } + }, + "text/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/UserPolicy" + } + ] + } + }, + "application/*+json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/UserPolicy" + } + ] + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "User policy updated." + }, + "400": { + "description": "User policy was not supplied.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "403": { + "description": "User policy update forbidden.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + } + }, + "security": [ + { + "CustomAuthentication": [ + "RequiresElevation" + ] + } + ] + } + }, + "/Users/AuthenticateByName": { + "post": { + "tags": [ + "User" + ], + "summary": "Authenticates a user by name.", + "operationId": "AuthenticateUserByName", + "requestBody": { + "description": "The M:Jellyfin.Api.Controllers.UserController.AuthenticateUserByName(Jellyfin.Api.Models.UserDtos.AuthenticateUserByName) request.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/AuthenticateUserByName" + } + ], + "description": "The authenticate user by name request body." + } + }, + "text/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/AuthenticateUserByName" + } + ], + "description": "The authenticate user by name request body." + } + }, + "application/*+json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/AuthenticateUserByName" + } + ], + "description": "The authenticate user by name request body." + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "User authenticated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthenticationResult" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/AuthenticationResult" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/AuthenticationResult" + } + } + } + } + } + } + }, + "/Users/AuthenticateWithQuickConnect": { + "post": { + "tags": [ + "User" + ], + "summary": "Authenticates a user with quick connect.", + "operationId": "AuthenticateWithQuickConnect", + "requestBody": { + "description": "The Jellyfin.Api.Models.UserDtos.QuickConnectDto request.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/QuickConnectDto" + } + ], + "description": "The quick connect request body." + } + }, + "text/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/QuickConnectDto" + } + ], + "description": "The quick connect request body." + } + }, + "application/*+json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/QuickConnectDto" + } + ], + "description": "The quick connect request body." + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "User authenticated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthenticationResult" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/AuthenticationResult" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/AuthenticationResult" + } + } + } + }, + "400": { + "description": "Missing token." + } + } + } + }, + "/Users/ForgotPassword": { + "post": { + "tags": [ + "User" + ], + "summary": "Initiates the forgot password process for a local user.", + "operationId": "ForgotPassword", + "requestBody": { + "description": "The forgot password request containing the entered username.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ForgotPasswordDto" + } + ], + "description": "Forgot Password request body DTO." + } + }, + "text/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ForgotPasswordDto" + } + ], + "description": "Forgot Password request body DTO." + } + }, + "application/*+json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ForgotPasswordDto" + } + ], + "description": "Forgot Password request body DTO." + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Password reset process started.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ForgotPasswordResult" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ForgotPasswordResult" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ForgotPasswordResult" + } + } + } + } + } + } + }, + "/Users/ForgotPassword/Pin": { + "post": { + "tags": [ + "User" + ], + "summary": "Redeems a forgot password pin.", + "operationId": "ForgotPasswordPin", + "requestBody": { + "description": "The forgot password pin request containing the entered pin.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ForgotPasswordPinDto" + } + ], + "description": "Forgot Password Pin enter request body DTO." + } + }, + "text/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ForgotPasswordPinDto" + } + ], + "description": "Forgot Password Pin enter request body DTO." + } + }, + "application/*+json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ForgotPasswordPinDto" + } + ], + "description": "Forgot Password Pin enter request body DTO." + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Pin reset process started.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PinRedeemResult" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/PinRedeemResult" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/PinRedeemResult" + } + } + } + } + } + } + }, + "/Users/Me": { + "get": { + "tags": [ + "User" + ], + "summary": "Gets the user based on auth token.", + "operationId": "GetCurrentUser", + "responses": { + "200": { + "description": "User returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserDto" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/UserDto" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/UserDto" + } + } + } + }, + "400": { + "description": "Token is not owned by a user.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Users/New": { + "post": { + "tags": [ + "User" + ], + "summary": "Creates a user.", + "operationId": "CreateUserByName", + "requestBody": { + "description": "The create user by name request body.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/CreateUserByName" + } + ], + "description": "The create user by name request body." + } + }, + "text/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/CreateUserByName" + } + ], + "description": "The create user by name request body." + } + }, + "application/*+json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/CreateUserByName" + } + ], + "description": "The create user by name request body." + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "User created.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserDto" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/UserDto" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/UserDto" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "RequiresElevation" + ] + } + ] + } + }, + "/Users/Public": { + "get": { + "tags": [ + "User" + ], + "summary": "Gets a list of publicly visible users for display on a login screen.", + "operationId": "GetPublicUsers", + "responses": { + "200": { + "description": "Public users returned.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserDto" + } + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserDto" + } + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserDto" + } + } + } + } + } + } + } + }, + "/Users/{userId}/FavoriteItems/{itemId}": { + "post": { + "tags": [ + "UserLibrary" + ], + "summary": "Marks an item as a favorite.", + "operationId": "MarkFavoriteItem", + "parameters": [ + { + "name": "userId", + "in": "path", + "description": "User id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "itemId", + "in": "path", + "description": "Item id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Item marked as favorite.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserItemDataDto" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/UserItemDataDto" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/UserItemDataDto" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + }, + "delete": { + "tags": [ + "UserLibrary" + ], + "summary": "Unmarks item as a favorite.", + "operationId": "UnmarkFavoriteItem", + "parameters": [ + { + "name": "userId", + "in": "path", + "description": "User id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "itemId", + "in": "path", + "description": "Item id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Item unmarked as favorite.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserItemDataDto" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/UserItemDataDto" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/UserItemDataDto" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Users/{userId}/Items/{itemId}": { + "get": { + "tags": [ + "UserLibrary" + ], + "summary": "Gets an item from a user's library.", + "operationId": "GetItem", + "parameters": [ + { + "name": "userId", + "in": "path", + "description": "User id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "itemId", + "in": "path", + "description": "Item id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Item returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BaseItemDto" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDto" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDto" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Users/{userId}/Items/{itemId}/Intros": { + "get": { + "tags": [ + "UserLibrary" + ], + "summary": "Gets intros to play before the main media item plays.", + "operationId": "GetIntros", + "parameters": [ + { + "name": "userId", + "in": "path", + "description": "User id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "itemId", + "in": "path", + "description": "Item id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Intros returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Users/{userId}/Items/{itemId}/LocalTrailers": { + "get": { + "tags": [ + "UserLibrary" + ], + "summary": "Gets local trailers for an item.", + "operationId": "GetLocalTrailers", + "parameters": [ + { + "name": "userId", + "in": "path", + "description": "User id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "itemId", + "in": "path", + "description": "Item id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "An Microsoft.AspNetCore.Mvc.OkResult containing the item's local trailers.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseItemDto" + } + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseItemDto" + } + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseItemDto" + } + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Users/{userId}/Items/{itemId}/Rating": { + "delete": { + "tags": [ + "UserLibrary" + ], + "summary": "Deletes a user's saved personal rating for an item.", + "operationId": "DeleteUserItemRating", + "parameters": [ + { + "name": "userId", + "in": "path", + "description": "User id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "itemId", + "in": "path", + "description": "Item id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Personal rating removed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserItemDataDto" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/UserItemDataDto" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/UserItemDataDto" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + }, + "post": { + "tags": [ + "UserLibrary" + ], + "summary": "Updates a user's rating for an item.", + "operationId": "UpdateUserItemRating", + "parameters": [ + { + "name": "userId", + "in": "path", + "description": "User id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "itemId", + "in": "path", + "description": "Item id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "likes", + "in": "query", + "description": "Whether this M:Jellyfin.Api.Controllers.UserLibraryController.UpdateUserItemRating(System.Guid,System.Guid,System.Nullable{System.Boolean}) is likes.", + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "Item rating updated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserItemDataDto" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/UserItemDataDto" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/UserItemDataDto" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Users/{userId}/Items/{itemId}/SpecialFeatures": { + "get": { + "tags": [ + "UserLibrary" + ], + "summary": "Gets special features for an item.", + "operationId": "GetSpecialFeatures", + "parameters": [ + { + "name": "userId", + "in": "path", + "description": "User id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "itemId", + "in": "path", + "description": "Item id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Special features returned.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseItemDto" + } + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseItemDto" + } + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseItemDto" + } + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Users/{userId}/Items/Latest": { + "get": { + "tags": [ + "UserLibrary" + ], + "summary": "Gets latest media.", + "operationId": "GetLatestMedia", + "parameters": [ + { + "name": "userId", + "in": "path", + "description": "User id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "parentId", + "in": "query", + "description": "Specify this to localize the search to a specific item or folder. Omit to use the root.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "fields", + "in": "query", + "description": "Optional. Specify additional fields of information to return in the output.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ItemFields" + } + } + }, + { + "name": "includeItemTypes", + "in": "query", + "description": "Optional. If specified, results will be filtered based on item type. This allows multiple, comma delimited.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseItemKind" + } + } + }, + { + "name": "isPlayed", + "in": "query", + "description": "Filter by items that are played, or not.", + "schema": { + "type": "boolean" + } + }, + { + "name": "enableImages", + "in": "query", + "description": "Optional. include image information in output.", + "schema": { + "type": "boolean" + } + }, + { + "name": "imageTypeLimit", + "in": "query", + "description": "Optional. the max number of images to return, per image type.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "enableImageTypes", + "in": "query", + "description": "Optional. The image types to include in the output.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ImageType" + } + } + }, + { + "name": "enableUserData", + "in": "query", + "description": "Optional. include user data.", + "schema": { + "type": "boolean" + } + }, + { + "name": "limit", + "in": "query", + "description": "Return item limit.", + "schema": { + "type": "integer", + "format": "int32", + "default": 20 + } + }, + { + "name": "groupItems", + "in": "query", + "description": "Whether or not to group items into a parent container.", + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Latest media returned.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseItemDto" + } + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseItemDto" + } + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseItemDto" + } + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Users/{userId}/Items/Root": { + "get": { + "tags": [ + "UserLibrary" + ], + "summary": "Gets the root folder from a user's library.", + "operationId": "GetRootFolder", + "parameters": [ + { + "name": "userId", + "in": "path", + "description": "User id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Root folder returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BaseItemDto" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDto" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDto" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Users/{userId}/GroupingOptions": { + "get": { + "tags": [ + "UserViews" + ], + "summary": "Get user view grouping options.", + "operationId": "GetGroupingOptions", + "parameters": [ + { + "name": "userId", + "in": "path", + "description": "User id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "User view grouping options returned.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SpecialViewOptionDto" + } + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SpecialViewOptionDto" + } + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SpecialViewOptionDto" + } + } + } + } + }, + "404": { + "description": "User not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Users/{userId}/Views": { + "get": { + "tags": [ + "UserViews" + ], + "summary": "Get user views.", + "operationId": "GetUserViews", + "parameters": [ + { + "name": "userId", + "in": "path", + "description": "User id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "includeExternalContent", + "in": "query", + "description": "Whether or not to include external views such as channels or live tv.", + "schema": { + "type": "boolean" + } + }, + { + "name": "presetViews", + "in": "query", + "description": "Preset views.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "includeHidden", + "in": "query", + "description": "Whether or not to include hidden content.", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "200": { + "description": "User views returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Videos/{videoId}/{mediaSourceId}/Attachments/{index}": { + "get": { + "tags": [ + "VideoAttachments" + ], + "summary": "Get video attachment.", + "operationId": "GetAttachment", + "parameters": [ + { + "name": "videoId", + "in": "path", + "description": "Video ID.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "mediaSourceId", + "in": "path", + "description": "Media Source ID.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "index", + "in": "path", + "description": "Attachment Index.", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "Attachment retrieved.", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "404": { + "description": "Video or attachment not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + } + } + } + }, + "/Videos/{itemId}/AdditionalParts": { + "get": { + "tags": [ + "Videos" + ], + "summary": "Gets additional parts for a video.", + "operationId": "GetAdditionalPart", + "parameters": [ + { + "name": "itemId", + "in": "path", + "description": "The item id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "userId", + "in": "query", + "description": "Optional. Filter by user id, and attach user data.", + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Additional parts returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Videos/{itemId}/AlternateSources": { + "delete": { + "tags": [ + "Videos" + ], + "summary": "Removes alternate video sources.", + "operationId": "DeleteAlternateSources", + "parameters": [ + { + "name": "itemId", + "in": "path", + "description": "The item id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "204": { + "description": "Alternate sources deleted." + }, + "404": { + "description": "Video not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "RequiresElevation" + ] + } + ] + } + }, + "/Videos/{itemId}/stream": { + "get": { + "tags": [ + "Videos" + ], + "summary": "Gets a video stream.", + "operationId": "GetVideoStream", + "parameters": [ + { + "name": "itemId", + "in": "path", + "description": "The item id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "container", + "in": "query", + "description": "The video container. Possible values are: ts, webm, asf, wmv, ogv, mp4, m4v, mkv, mpeg, mpg, avi, 3gp, wmv, wtv, m2ts, mov, iso, flv.", + "schema": { + "type": "string" + } + }, + { + "name": "static", + "in": "query", + "description": "Optional. If true, the original file will be streamed statically without any encoding. Use either no url extension or the original file extension. true/false.", + "schema": { + "type": "boolean" + } + }, + { + "name": "params", + "in": "query", + "description": "The streaming parameters.", + "schema": { + "type": "string" + } + }, + { + "name": "tag", + "in": "query", + "description": "The tag.", + "schema": { + "type": "string" + } + }, + { + "name": "deviceProfileId", + "in": "query", + "description": "Optional. The dlna device profile id to utilize.", + "schema": { + "type": "string" + } + }, + { + "name": "playSessionId", + "in": "query", + "description": "The play session id.", + "schema": { + "type": "string" + } + }, + { + "name": "segmentContainer", + "in": "query", + "description": "The segment container.", + "schema": { + "type": "string" + } + }, + { + "name": "segmentLength", + "in": "query", + "description": "The segment length.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "minSegments", + "in": "query", + "description": "The minimum number of segments.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "mediaSourceId", + "in": "query", + "description": "The media version id, if playing an alternate version.", + "schema": { + "type": "string" + } + }, + { + "name": "deviceId", + "in": "query", + "description": "The device id of the client requesting. Used to stop encoding processes when needed.", + "schema": { + "type": "string" + } + }, + { + "name": "audioCodec", + "in": "query", + "description": "Optional. Specify a audio codec to encode to, e.g. mp3. If omitted the server will auto-select using the url's extension. Options: aac, mp3, vorbis, wma.", + "schema": { + "type": "string" + } + }, + { + "name": "enableAutoStreamCopy", + "in": "query", + "description": "Whether or not to allow automatic stream copy if requested values match the original source. Defaults to true.", + "schema": { + "type": "boolean" + } + }, + { + "name": "allowVideoStreamCopy", + "in": "query", + "description": "Whether or not to allow copying of the video stream url.", + "schema": { + "type": "boolean" + } + }, + { + "name": "allowAudioStreamCopy", + "in": "query", + "description": "Whether or not to allow copying of the audio stream url.", + "schema": { + "type": "boolean" + } + }, + { + "name": "breakOnNonKeyFrames", + "in": "query", + "description": "Optional. Whether to break on non key frames.", + "schema": { + "type": "boolean" + } + }, + { + "name": "audioSampleRate", + "in": "query", + "description": "Optional. Specify a specific audio sample rate, e.g. 44100.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxAudioBitDepth", + "in": "query", + "description": "Optional. The maximum audio bit depth.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "audioBitRate", + "in": "query", + "description": "Optional. Specify an audio bitrate to encode to, e.g. 128000. If omitted this will be left to encoder defaults.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "audioChannels", + "in": "query", + "description": "Optional. Specify a specific number of audio channels to encode to, e.g. 2.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxAudioChannels", + "in": "query", + "description": "Optional. Specify a maximum number of audio channels to encode to, e.g. 2.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "profile", + "in": "query", + "description": "Optional. Specify a specific an encoder profile (varies by encoder), e.g. main, baseline, high.", + "schema": { + "type": "string" + } + }, + { + "name": "level", + "in": "query", + "description": "Optional. Specify a level for the encoder profile (varies by encoder), e.g. 3, 3.1.", + "schema": { + "type": "string" + } + }, + { + "name": "framerate", + "in": "query", + "description": "Optional. A specific video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements.", + "schema": { + "type": "number", + "format": "float" + } + }, + { + "name": "maxFramerate", + "in": "query", + "description": "Optional. A specific maximum video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements.", + "schema": { + "type": "number", + "format": "float" + } + }, + { + "name": "copyTimestamps", + "in": "query", + "description": "Whether or not to copy timestamps when transcoding with an offset. Defaults to false.", + "schema": { + "type": "boolean" + } + }, + { + "name": "startTimeTicks", + "in": "query", + "description": "Optional. Specify a starting offset, in ticks. 1 tick = 10000 ms.", + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "width", + "in": "query", + "description": "Optional. The fixed horizontal resolution of the encoded video.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "height", + "in": "query", + "description": "Optional. The fixed vertical resolution of the encoded video.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxWidth", + "in": "query", + "description": "Optional. The maximum horizontal resolution of the encoded video.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxHeight", + "in": "query", + "description": "Optional. The maximum vertical resolution of the encoded video.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "videoBitRate", + "in": "query", + "description": "Optional. Specify a video bitrate to encode to, e.g. 500000. If omitted this will be left to encoder defaults.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "subtitleStreamIndex", + "in": "query", + "description": "Optional. The index of the subtitle stream to use. If omitted no subtitles will be used.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "subtitleMethod", + "in": "query", + "description": "Optional. Specify the subtitle delivery method.", + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SubtitleDeliveryMethod" + } + ] + } + }, + { + "name": "maxRefFrames", + "in": "query", + "description": "Optional.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxVideoBitDepth", + "in": "query", + "description": "Optional. The maximum video bit depth.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "requireAvc", + "in": "query", + "description": "Optional. Whether to require avc.", + "schema": { + "type": "boolean" + } + }, + { + "name": "deInterlace", + "in": "query", + "description": "Optional. Whether to deinterlace the video.", + "schema": { + "type": "boolean" + } + }, + { + "name": "requireNonAnamorphic", + "in": "query", + "description": "Optional. Whether to require a non anamorphic stream.", + "schema": { + "type": "boolean" + } + }, + { + "name": "transcodingMaxAudioChannels", + "in": "query", + "description": "Optional. The maximum number of audio channels to transcode.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "cpuCoreLimit", + "in": "query", + "description": "Optional. The limit of how many cpu cores to use.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "liveStreamId", + "in": "query", + "description": "The live stream id.", + "schema": { + "type": "string" + } + }, + { + "name": "enableMpegtsM2TsMode", + "in": "query", + "description": "Optional. Whether to enable the MpegtsM2Ts mode.", + "schema": { + "type": "boolean" + } + }, + { + "name": "videoCodec", + "in": "query", + "description": "Optional. Specify a video codec to encode to, e.g. h264. If omitted the server will auto-select using the url's extension. Options: h265, h264, mpeg4, theora, vp8, vp9, vpx (deprecated), wmv.", + "schema": { + "type": "string" + } + }, + { + "name": "subtitleCodec", + "in": "query", + "description": "Optional. Specify a subtitle codec to encode to.", + "schema": { + "type": "string" + } + }, + { + "name": "transcodeReasons", + "in": "query", + "description": "Optional. The transcoding reason.", + "schema": { + "type": "string" + } + }, + { + "name": "audioStreamIndex", + "in": "query", + "description": "Optional. The index of the audio stream to use. If omitted the first audio stream will be used.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "videoStreamIndex", + "in": "query", + "description": "Optional. The index of the video stream to use. If omitted the first video stream will be used.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "context", + "in": "query", + "description": "Optional. The MediaBrowser.Model.Dlna.EncodingContext.", + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/EncodingContext" + } + ] + } + }, + { + "name": "streamOptions", + "in": "query", + "description": "Optional. The streaming options.", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + } + } + } + ], + "responses": { + "200": { + "description": "Video stream returned.", + "content": { + "video/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + }, + "head": { + "tags": [ + "Videos" + ], + "summary": "Gets a video stream.", + "operationId": "HeadVideoStream", + "parameters": [ + { + "name": "itemId", + "in": "path", + "description": "The item id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "container", + "in": "query", + "description": "The video container. Possible values are: ts, webm, asf, wmv, ogv, mp4, m4v, mkv, mpeg, mpg, avi, 3gp, wmv, wtv, m2ts, mov, iso, flv.", + "schema": { + "type": "string" + } + }, + { + "name": "static", + "in": "query", + "description": "Optional. If true, the original file will be streamed statically without any encoding. Use either no url extension or the original file extension. true/false.", + "schema": { + "type": "boolean" + } + }, + { + "name": "params", + "in": "query", + "description": "The streaming parameters.", + "schema": { + "type": "string" + } + }, + { + "name": "tag", + "in": "query", + "description": "The tag.", + "schema": { + "type": "string" + } + }, + { + "name": "deviceProfileId", + "in": "query", + "description": "Optional. The dlna device profile id to utilize.", + "schema": { + "type": "string" + } + }, + { + "name": "playSessionId", + "in": "query", + "description": "The play session id.", + "schema": { + "type": "string" + } + }, + { + "name": "segmentContainer", + "in": "query", + "description": "The segment container.", + "schema": { + "type": "string" + } + }, + { + "name": "segmentLength", + "in": "query", + "description": "The segment length.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "minSegments", + "in": "query", + "description": "The minimum number of segments.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "mediaSourceId", + "in": "query", + "description": "The media version id, if playing an alternate version.", + "schema": { + "type": "string" + } + }, + { + "name": "deviceId", + "in": "query", + "description": "The device id of the client requesting. Used to stop encoding processes when needed.", + "schema": { + "type": "string" + } + }, + { + "name": "audioCodec", + "in": "query", + "description": "Optional. Specify a audio codec to encode to, e.g. mp3. If omitted the server will auto-select using the url's extension. Options: aac, mp3, vorbis, wma.", + "schema": { + "type": "string" + } + }, + { + "name": "enableAutoStreamCopy", + "in": "query", + "description": "Whether or not to allow automatic stream copy if requested values match the original source. Defaults to true.", + "schema": { + "type": "boolean" + } + }, + { + "name": "allowVideoStreamCopy", + "in": "query", + "description": "Whether or not to allow copying of the video stream url.", + "schema": { + "type": "boolean" + } + }, + { + "name": "allowAudioStreamCopy", + "in": "query", + "description": "Whether or not to allow copying of the audio stream url.", + "schema": { + "type": "boolean" + } + }, + { + "name": "breakOnNonKeyFrames", + "in": "query", + "description": "Optional. Whether to break on non key frames.", + "schema": { + "type": "boolean" + } + }, + { + "name": "audioSampleRate", + "in": "query", + "description": "Optional. Specify a specific audio sample rate, e.g. 44100.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxAudioBitDepth", + "in": "query", + "description": "Optional. The maximum audio bit depth.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "audioBitRate", + "in": "query", + "description": "Optional. Specify an audio bitrate to encode to, e.g. 128000. If omitted this will be left to encoder defaults.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "audioChannels", + "in": "query", + "description": "Optional. Specify a specific number of audio channels to encode to, e.g. 2.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxAudioChannels", + "in": "query", + "description": "Optional. Specify a maximum number of audio channels to encode to, e.g. 2.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "profile", + "in": "query", + "description": "Optional. Specify a specific an encoder profile (varies by encoder), e.g. main, baseline, high.", + "schema": { + "type": "string" + } + }, + { + "name": "level", + "in": "query", + "description": "Optional. Specify a level for the encoder profile (varies by encoder), e.g. 3, 3.1.", + "schema": { + "type": "string" + } + }, + { + "name": "framerate", + "in": "query", + "description": "Optional. A specific video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements.", + "schema": { + "type": "number", + "format": "float" + } + }, + { + "name": "maxFramerate", + "in": "query", + "description": "Optional. A specific maximum video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements.", + "schema": { + "type": "number", + "format": "float" + } + }, + { + "name": "copyTimestamps", + "in": "query", + "description": "Whether or not to copy timestamps when transcoding with an offset. Defaults to false.", + "schema": { + "type": "boolean" + } + }, + { + "name": "startTimeTicks", + "in": "query", + "description": "Optional. Specify a starting offset, in ticks. 1 tick = 10000 ms.", + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "width", + "in": "query", + "description": "Optional. The fixed horizontal resolution of the encoded video.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "height", + "in": "query", + "description": "Optional. The fixed vertical resolution of the encoded video.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxWidth", + "in": "query", + "description": "Optional. The maximum horizontal resolution of the encoded video.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxHeight", + "in": "query", + "description": "Optional. The maximum vertical resolution of the encoded video.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "videoBitRate", + "in": "query", + "description": "Optional. Specify a video bitrate to encode to, e.g. 500000. If omitted this will be left to encoder defaults.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "subtitleStreamIndex", + "in": "query", + "description": "Optional. The index of the subtitle stream to use. If omitted no subtitles will be used.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "subtitleMethod", + "in": "query", + "description": "Optional. Specify the subtitle delivery method.", + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SubtitleDeliveryMethod" + } + ] + } + }, + { + "name": "maxRefFrames", + "in": "query", + "description": "Optional.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxVideoBitDepth", + "in": "query", + "description": "Optional. The maximum video bit depth.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "requireAvc", + "in": "query", + "description": "Optional. Whether to require avc.", + "schema": { + "type": "boolean" + } + }, + { + "name": "deInterlace", + "in": "query", + "description": "Optional. Whether to deinterlace the video.", + "schema": { + "type": "boolean" + } + }, + { + "name": "requireNonAnamorphic", + "in": "query", + "description": "Optional. Whether to require a non anamorphic stream.", + "schema": { + "type": "boolean" + } + }, + { + "name": "transcodingMaxAudioChannels", + "in": "query", + "description": "Optional. The maximum number of audio channels to transcode.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "cpuCoreLimit", + "in": "query", + "description": "Optional. The limit of how many cpu cores to use.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "liveStreamId", + "in": "query", + "description": "The live stream id.", + "schema": { + "type": "string" + } + }, + { + "name": "enableMpegtsM2TsMode", + "in": "query", + "description": "Optional. Whether to enable the MpegtsM2Ts mode.", + "schema": { + "type": "boolean" + } + }, + { + "name": "videoCodec", + "in": "query", + "description": "Optional. Specify a video codec to encode to, e.g. h264. If omitted the server will auto-select using the url's extension. Options: h265, h264, mpeg4, theora, vp8, vp9, vpx (deprecated), wmv.", + "schema": { + "type": "string" + } + }, + { + "name": "subtitleCodec", + "in": "query", + "description": "Optional. Specify a subtitle codec to encode to.", + "schema": { + "type": "string" + } + }, + { + "name": "transcodeReasons", + "in": "query", + "description": "Optional. The transcoding reason.", + "schema": { + "type": "string" + } + }, + { + "name": "audioStreamIndex", + "in": "query", + "description": "Optional. The index of the audio stream to use. If omitted the first audio stream will be used.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "videoStreamIndex", + "in": "query", + "description": "Optional. The index of the video stream to use. If omitted the first video stream will be used.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "context", + "in": "query", + "description": "Optional. The MediaBrowser.Model.Dlna.EncodingContext.", + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/EncodingContext" + } + ] + } + }, + { + "name": "streamOptions", + "in": "query", + "description": "Optional. The streaming options.", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + } + } + } + ], + "responses": { + "200": { + "description": "Video stream returned.", + "content": { + "video/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/Videos/{itemId}/stream.{container}": { + "get": { + "tags": [ + "Videos" + ], + "summary": "Gets a video stream.", + "operationId": "GetVideoStreamByContainer", + "parameters": [ + { + "name": "itemId", + "in": "path", + "description": "The item id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "container", + "in": "path", + "description": "The video container. Possible values are: ts, webm, asf, wmv, ogv, mp4, m4v, mkv, mpeg, mpg, avi, 3gp, wmv, wtv, m2ts, mov, iso, flv.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "static", + "in": "query", + "description": "Optional. If true, the original file will be streamed statically without any encoding. Use either no url extension or the original file extension. true/false.", + "schema": { + "type": "boolean" + } + }, + { + "name": "params", + "in": "query", + "description": "The streaming parameters.", + "schema": { + "type": "string" + } + }, + { + "name": "tag", + "in": "query", + "description": "The tag.", + "schema": { + "type": "string" + } + }, + { + "name": "deviceProfileId", + "in": "query", + "description": "Optional. The dlna device profile id to utilize.", + "schema": { + "type": "string" + } + }, + { + "name": "playSessionId", + "in": "query", + "description": "The play session id.", + "schema": { + "type": "string" + } + }, + { + "name": "segmentContainer", + "in": "query", + "description": "The segment container.", + "schema": { + "type": "string" + } + }, + { + "name": "segmentLength", + "in": "query", + "description": "The segment length.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "minSegments", + "in": "query", + "description": "The minimum number of segments.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "mediaSourceId", + "in": "query", + "description": "The media version id, if playing an alternate version.", + "schema": { + "type": "string" + } + }, + { + "name": "deviceId", + "in": "query", + "description": "The device id of the client requesting. Used to stop encoding processes when needed.", + "schema": { + "type": "string" + } + }, + { + "name": "audioCodec", + "in": "query", + "description": "Optional. Specify a audio codec to encode to, e.g. mp3. If omitted the server will auto-select using the url's extension. Options: aac, mp3, vorbis, wma.", + "schema": { + "type": "string" + } + }, + { + "name": "enableAutoStreamCopy", + "in": "query", + "description": "Whether or not to allow automatic stream copy if requested values match the original source. Defaults to true.", + "schema": { + "type": "boolean" + } + }, + { + "name": "allowVideoStreamCopy", + "in": "query", + "description": "Whether or not to allow copying of the video stream url.", + "schema": { + "type": "boolean" + } + }, + { + "name": "allowAudioStreamCopy", + "in": "query", + "description": "Whether or not to allow copying of the audio stream url.", + "schema": { + "type": "boolean" + } + }, + { + "name": "breakOnNonKeyFrames", + "in": "query", + "description": "Optional. Whether to break on non key frames.", + "schema": { + "type": "boolean" + } + }, + { + "name": "audioSampleRate", + "in": "query", + "description": "Optional. Specify a specific audio sample rate, e.g. 44100.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxAudioBitDepth", + "in": "query", + "description": "Optional. The maximum audio bit depth.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "audioBitRate", + "in": "query", + "description": "Optional. Specify an audio bitrate to encode to, e.g. 128000. If omitted this will be left to encoder defaults.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "audioChannels", + "in": "query", + "description": "Optional. Specify a specific number of audio channels to encode to, e.g. 2.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxAudioChannels", + "in": "query", + "description": "Optional. Specify a maximum number of audio channels to encode to, e.g. 2.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "profile", + "in": "query", + "description": "Optional. Specify a specific an encoder profile (varies by encoder), e.g. main, baseline, high.", + "schema": { + "type": "string" + } + }, + { + "name": "level", + "in": "query", + "description": "Optional. Specify a level for the encoder profile (varies by encoder), e.g. 3, 3.1.", + "schema": { + "type": "string" + } + }, + { + "name": "framerate", + "in": "query", + "description": "Optional. A specific video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements.", + "schema": { + "type": "number", + "format": "float" + } + }, + { + "name": "maxFramerate", + "in": "query", + "description": "Optional. A specific maximum video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements.", + "schema": { + "type": "number", + "format": "float" + } + }, + { + "name": "copyTimestamps", + "in": "query", + "description": "Whether or not to copy timestamps when transcoding with an offset. Defaults to false.", + "schema": { + "type": "boolean" + } + }, + { + "name": "startTimeTicks", + "in": "query", + "description": "Optional. Specify a starting offset, in ticks. 1 tick = 10000 ms.", + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "width", + "in": "query", + "description": "Optional. The fixed horizontal resolution of the encoded video.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "height", + "in": "query", + "description": "Optional. The fixed vertical resolution of the encoded video.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxWidth", + "in": "query", + "description": "Optional. The maximum horizontal resolution of the encoded video.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxHeight", + "in": "query", + "description": "Optional. The maximum vertical resolution of the encoded video.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "videoBitRate", + "in": "query", + "description": "Optional. Specify a video bitrate to encode to, e.g. 500000. If omitted this will be left to encoder defaults.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "subtitleStreamIndex", + "in": "query", + "description": "Optional. The index of the subtitle stream to use. If omitted no subtitles will be used.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "subtitleMethod", + "in": "query", + "description": "Optional. Specify the subtitle delivery method.", + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SubtitleDeliveryMethod" + } + ] + } + }, + { + "name": "maxRefFrames", + "in": "query", + "description": "Optional.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxVideoBitDepth", + "in": "query", + "description": "Optional. The maximum video bit depth.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "requireAvc", + "in": "query", + "description": "Optional. Whether to require avc.", + "schema": { + "type": "boolean" + } + }, + { + "name": "deInterlace", + "in": "query", + "description": "Optional. Whether to deinterlace the video.", + "schema": { + "type": "boolean" + } + }, + { + "name": "requireNonAnamorphic", + "in": "query", + "description": "Optional. Whether to require a non anamorphic stream.", + "schema": { + "type": "boolean" + } + }, + { + "name": "transcodingMaxAudioChannels", + "in": "query", + "description": "Optional. The maximum number of audio channels to transcode.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "cpuCoreLimit", + "in": "query", + "description": "Optional. The limit of how many cpu cores to use.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "liveStreamId", + "in": "query", + "description": "The live stream id.", + "schema": { + "type": "string" + } + }, + { + "name": "enableMpegtsM2TsMode", + "in": "query", + "description": "Optional. Whether to enable the MpegtsM2Ts mode.", + "schema": { + "type": "boolean" + } + }, + { + "name": "videoCodec", + "in": "query", + "description": "Optional. Specify a video codec to encode to, e.g. h264. If omitted the server will auto-select using the url's extension. Options: h265, h264, mpeg4, theora, vp8, vp9, vpx (deprecated), wmv.", + "schema": { + "type": "string" + } + }, + { + "name": "subtitleCodec", + "in": "query", + "description": "Optional. Specify a subtitle codec to encode to.", + "schema": { + "type": "string" + } + }, + { + "name": "transcodeReasons", + "in": "query", + "description": "Optional. The transcoding reason.", + "schema": { + "type": "string" + } + }, + { + "name": "audioStreamIndex", + "in": "query", + "description": "Optional. The index of the audio stream to use. If omitted the first audio stream will be used.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "videoStreamIndex", + "in": "query", + "description": "Optional. The index of the video stream to use. If omitted the first video stream will be used.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "context", + "in": "query", + "description": "Optional. The MediaBrowser.Model.Dlna.EncodingContext.", + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/EncodingContext" + } + ] + } + }, + { + "name": "streamOptions", + "in": "query", + "description": "Optional. The streaming options.", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + } + } + } + ], + "responses": { + "200": { + "description": "Video stream returned.", + "content": { + "video/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + }, + "head": { + "tags": [ + "Videos" + ], + "summary": "Gets a video stream.", + "operationId": "HeadVideoStreamByContainer", + "parameters": [ + { + "name": "itemId", + "in": "path", + "description": "The item id.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "container", + "in": "path", + "description": "The video container. Possible values are: ts, webm, asf, wmv, ogv, mp4, m4v, mkv, mpeg, mpg, avi, 3gp, wmv, wtv, m2ts, mov, iso, flv.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "static", + "in": "query", + "description": "Optional. If true, the original file will be streamed statically without any encoding. Use either no url extension or the original file extension. true/false.", + "schema": { + "type": "boolean" + } + }, + { + "name": "params", + "in": "query", + "description": "The streaming parameters.", + "schema": { + "type": "string" + } + }, + { + "name": "tag", + "in": "query", + "description": "The tag.", + "schema": { + "type": "string" + } + }, + { + "name": "deviceProfileId", + "in": "query", + "description": "Optional. The dlna device profile id to utilize.", + "schema": { + "type": "string" + } + }, + { + "name": "playSessionId", + "in": "query", + "description": "The play session id.", + "schema": { + "type": "string" + } + }, + { + "name": "segmentContainer", + "in": "query", + "description": "The segment container.", + "schema": { + "type": "string" + } + }, + { + "name": "segmentLength", + "in": "query", + "description": "The segment length.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "minSegments", + "in": "query", + "description": "The minimum number of segments.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "mediaSourceId", + "in": "query", + "description": "The media version id, if playing an alternate version.", + "schema": { + "type": "string" + } + }, + { + "name": "deviceId", + "in": "query", + "description": "The device id of the client requesting. Used to stop encoding processes when needed.", + "schema": { + "type": "string" + } + }, + { + "name": "audioCodec", + "in": "query", + "description": "Optional. Specify a audio codec to encode to, e.g. mp3. If omitted the server will auto-select using the url's extension. Options: aac, mp3, vorbis, wma.", + "schema": { + "type": "string" + } + }, + { + "name": "enableAutoStreamCopy", + "in": "query", + "description": "Whether or not to allow automatic stream copy if requested values match the original source. Defaults to true.", + "schema": { + "type": "boolean" + } + }, + { + "name": "allowVideoStreamCopy", + "in": "query", + "description": "Whether or not to allow copying of the video stream url.", + "schema": { + "type": "boolean" + } + }, + { + "name": "allowAudioStreamCopy", + "in": "query", + "description": "Whether or not to allow copying of the audio stream url.", + "schema": { + "type": "boolean" + } + }, + { + "name": "breakOnNonKeyFrames", + "in": "query", + "description": "Optional. Whether to break on non key frames.", + "schema": { + "type": "boolean" + } + }, + { + "name": "audioSampleRate", + "in": "query", + "description": "Optional. Specify a specific audio sample rate, e.g. 44100.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxAudioBitDepth", + "in": "query", + "description": "Optional. The maximum audio bit depth.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "audioBitRate", + "in": "query", + "description": "Optional. Specify an audio bitrate to encode to, e.g. 128000. If omitted this will be left to encoder defaults.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "audioChannels", + "in": "query", + "description": "Optional. Specify a specific number of audio channels to encode to, e.g. 2.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxAudioChannels", + "in": "query", + "description": "Optional. Specify a maximum number of audio channels to encode to, e.g. 2.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "profile", + "in": "query", + "description": "Optional. Specify a specific an encoder profile (varies by encoder), e.g. main, baseline, high.", + "schema": { + "type": "string" + } + }, + { + "name": "level", + "in": "query", + "description": "Optional. Specify a level for the encoder profile (varies by encoder), e.g. 3, 3.1.", + "schema": { + "type": "string" + } + }, + { + "name": "framerate", + "in": "query", + "description": "Optional. A specific video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements.", + "schema": { + "type": "number", + "format": "float" + } + }, + { + "name": "maxFramerate", + "in": "query", + "description": "Optional. A specific maximum video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements.", + "schema": { + "type": "number", + "format": "float" + } + }, + { + "name": "copyTimestamps", + "in": "query", + "description": "Whether or not to copy timestamps when transcoding with an offset. Defaults to false.", + "schema": { + "type": "boolean" + } + }, + { + "name": "startTimeTicks", + "in": "query", + "description": "Optional. Specify a starting offset, in ticks. 1 tick = 10000 ms.", + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "width", + "in": "query", + "description": "Optional. The fixed horizontal resolution of the encoded video.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "height", + "in": "query", + "description": "Optional. The fixed vertical resolution of the encoded video.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxWidth", + "in": "query", + "description": "Optional. The maximum horizontal resolution of the encoded video.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxHeight", + "in": "query", + "description": "Optional. The maximum vertical resolution of the encoded video.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "videoBitRate", + "in": "query", + "description": "Optional. Specify a video bitrate to encode to, e.g. 500000. If omitted this will be left to encoder defaults.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "subtitleStreamIndex", + "in": "query", + "description": "Optional. The index of the subtitle stream to use. If omitted no subtitles will be used.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "subtitleMethod", + "in": "query", + "description": "Optional. Specify the subtitle delivery method.", + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/SubtitleDeliveryMethod" + } + ] + } + }, + { + "name": "maxRefFrames", + "in": "query", + "description": "Optional.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "maxVideoBitDepth", + "in": "query", + "description": "Optional. The maximum video bit depth.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "requireAvc", + "in": "query", + "description": "Optional. Whether to require avc.", + "schema": { + "type": "boolean" + } + }, + { + "name": "deInterlace", + "in": "query", + "description": "Optional. Whether to deinterlace the video.", + "schema": { + "type": "boolean" + } + }, + { + "name": "requireNonAnamorphic", + "in": "query", + "description": "Optional. Whether to require a non anamorphic stream.", + "schema": { + "type": "boolean" + } + }, + { + "name": "transcodingMaxAudioChannels", + "in": "query", + "description": "Optional. The maximum number of audio channels to transcode.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "cpuCoreLimit", + "in": "query", + "description": "Optional. The limit of how many cpu cores to use.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "liveStreamId", + "in": "query", + "description": "The live stream id.", + "schema": { + "type": "string" + } + }, + { + "name": "enableMpegtsM2TsMode", + "in": "query", + "description": "Optional. Whether to enable the MpegtsM2Ts mode.", + "schema": { + "type": "boolean" + } + }, + { + "name": "videoCodec", + "in": "query", + "description": "Optional. Specify a video codec to encode to, e.g. h264. If omitted the server will auto-select using the url's extension. Options: h265, h264, mpeg4, theora, vp8, vp9, vpx (deprecated), wmv.", + "schema": { + "type": "string" + } + }, + { + "name": "subtitleCodec", + "in": "query", + "description": "Optional. Specify a subtitle codec to encode to.", + "schema": { + "type": "string" + } + }, + { + "name": "transcodeReasons", + "in": "query", + "description": "Optional. The transcoding reason.", + "schema": { + "type": "string" + } + }, + { + "name": "audioStreamIndex", + "in": "query", + "description": "Optional. The index of the audio stream to use. If omitted the first audio stream will be used.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "videoStreamIndex", + "in": "query", + "description": "Optional. The index of the video stream to use. If omitted the first video stream will be used.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "context", + "in": "query", + "description": "Optional. The MediaBrowser.Model.Dlna.EncodingContext.", + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/EncodingContext" + } + ] + } + }, + { + "name": "streamOptions", + "in": "query", + "description": "Optional. The streaming options.", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + } + } + } + ], + "responses": { + "200": { + "description": "Video stream returned.", + "content": { + "video/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + } + }, + "/Videos/MergeVersions": { + "post": { + "tags": [ + "Videos" + ], + "summary": "Merges videos into a single record.", + "operationId": "MergeVersions", + "parameters": [ + { + "name": "ids", + "in": "query", + "description": "Item id list. This allows multiple, comma delimited.", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + } + ], + "responses": { + "204": { + "description": "Videos merged." + }, + "400": { + "description": "Supply at least 2 video ids.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "RequiresElevation" + ] + } + ] + } + }, + "/Years": { + "get": { + "tags": [ + "Years" + ], + "summary": "Get years.", + "operationId": "GetYears", + "parameters": [ + { + "name": "startIndex", + "in": "query", + "description": "Skips over a given number of items within the results. Use for paging.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "limit", + "in": "query", + "description": "Optional. The maximum number of records to return.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort Order - Ascending,Descending.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SortOrder" + } + } + }, + { + "name": "parentId", + "in": "query", + "description": "Specify this to localize the search to a specific item or folder. Omit to use the root.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "fields", + "in": "query", + "description": "Optional. Specify additional fields of information to return in the output.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ItemFields" + } + } + }, + { + "name": "excludeItemTypes", + "in": "query", + "description": "Optional. If specified, results will be excluded based on item type. This allows multiple, comma delimited.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseItemKind" + } + } + }, + { + "name": "includeItemTypes", + "in": "query", + "description": "Optional. If specified, results will be included based on item type. This allows multiple, comma delimited.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseItemKind" + } + } + }, + { + "name": "mediaTypes", + "in": "query", + "description": "Optional. Filter by MediaType. Allows multiple, comma delimited.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "sortBy", + "in": "query", + "description": "Optional. Specify one or more sort orders, comma delimited. Options: Album, AlbumArtist, Artist, Budget, CommunityRating, CriticRating, DateCreated, DatePlayed, PlayCount, PremiereDate, ProductionYear, SortName, Random, Revenue, Runtime.", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "enableUserData", + "in": "query", + "description": "Optional. Include user data.", + "schema": { + "type": "boolean" + } + }, + { + "name": "imageTypeLimit", + "in": "query", + "description": "Optional. The max number of images to return, per image type.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "enableImageTypes", + "in": "query", + "description": "Optional. The image types to include in the output.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ImageType" + } + } + }, + { + "name": "userId", + "in": "query", + "description": "User Id.", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "recursive", + "in": "query", + "description": "Search recursively.", + "schema": { + "type": "boolean", + "default": true + } + }, + { + "name": "enableImages", + "in": "query", + "description": "Optional. Include image information in output.", + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Year query returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDtoQueryResult" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + }, + "/Years/{year}": { + "get": { + "tags": [ + "Years" + ], + "summary": "Gets a year.", + "operationId": "GetYear", + "parameters": [ + { + "name": "year", + "in": "path", + "description": "The year.", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "userId", + "in": "query", + "description": "Optional. Filter by user id, and attach user data.", + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Year returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BaseItemDto" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDto" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/BaseItemDto" + } + } + } + }, + "404": { + "description": "Year not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"CamelCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + }, + "application/json; profile=\"PascalCase\"": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "CustomAuthentication": [ + "DefaultAuthorization" + ] + } + ] + } + } + }, + "components": { + "schemas": { + "AccessSchedule": { + "type": "object", + "properties": { + "Id": { + "type": "integer", + "description": "Gets the id of this instance.", + "format": "int32", + "readOnly": true + }, + "UserId": { + "type": "string", + "description": "Gets the id of the associated user.", + "format": "uuid" + }, + "DayOfWeek": { + "allOf": [ + { + "$ref": "#/components/schemas/DynamicDayOfWeek" + } + ], + "description": "Gets or sets the day of week." + }, + "StartHour": { + "type": "number", + "description": "Gets or sets the start hour.", + "format": "double" + }, + "EndHour": { + "type": "number", + "description": "Gets or sets the end hour.", + "format": "double" + } + }, + "additionalProperties": false, + "description": "An entity representing a user's access schedule." + }, + "ActivityLogEntry": { + "type": "object", + "properties": { + "Id": { + "type": "integer", + "description": "Gets or sets the identifier.", + "format": "int64" + }, + "Name": { + "type": "string", + "description": "Gets or sets the name." + }, + "Overview": { + "type": "string", + "description": "Gets or sets the overview.", + "nullable": true + }, + "ShortOverview": { + "type": "string", + "description": "Gets or sets the short overview.", + "nullable": true + }, + "Type": { + "type": "string", + "description": "Gets or sets the type." + }, + "ItemId": { + "type": "string", + "description": "Gets or sets the item identifier.", + "nullable": true + }, + "Date": { + "type": "string", + "description": "Gets or sets the date.", + "format": "date-time" + }, + "UserId": { + "type": "string", + "description": "Gets or sets the user identifier.", + "format": "uuid" + }, + "UserPrimaryImageTag": { + "type": "string", + "description": "Gets or sets the user primary image tag.", + "nullable": true, + "deprecated": true + }, + "Severity": { + "allOf": [ + { + "$ref": "#/components/schemas/LogLevel" + } + ], + "description": "Gets or sets the log severity." + } + }, + "additionalProperties": false, + "description": "An activity log entry." + }, + "ActivityLogEntryQueryResult": { + "type": "object", + "properties": { + "Items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ActivityLogEntry" + }, + "description": "Gets or sets the items.", + "nullable": true + }, + "TotalRecordCount": { + "type": "integer", + "description": "Gets or sets the total number of records available.", + "format": "int32" + }, + "StartIndex": { + "type": "integer", + "description": "Gets or sets the index of the first record in Items.", + "format": "int32" + } + }, + "additionalProperties": false + }, + "AddVirtualFolderDto": { + "type": "object", + "properties": { + "LibraryOptions": { + "allOf": [ + { + "$ref": "#/components/schemas/LibraryOptions" + } + ], + "description": "Gets or sets library options.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Add virtual folder dto." + }, + "AdminNotificationDto": { + "type": "object", + "properties": { + "Name": { + "type": "string", + "description": "Gets or sets the notification name.", + "nullable": true + }, + "Description": { + "type": "string", + "description": "Gets or sets the notification description.", + "nullable": true + }, + "NotificationLevel": { + "allOf": [ + { + "$ref": "#/components/schemas/NotificationLevel" + } + ], + "description": "Gets or sets the notification level.", + "nullable": true + }, + "Url": { + "type": "string", + "description": "Gets or sets the notification url.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "The admin notification dto." + }, + "AlbumInfo": { + "type": "object", + "properties": { + "Name": { + "type": "string", + "description": "Gets or sets the name.", + "nullable": true + }, + "OriginalTitle": { + "type": "string", + "description": "Gets or sets the original title.", + "nullable": true + }, + "Path": { + "type": "string", + "description": "Gets or sets the path.", + "nullable": true + }, + "MetadataLanguage": { + "type": "string", + "description": "Gets or sets the metadata language.", + "nullable": true + }, + "MetadataCountryCode": { + "type": "string", + "description": "Gets or sets the metadata country code.", + "nullable": true + }, + "ProviderIds": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "description": "Gets or sets the provider ids.", + "nullable": true + }, + "Year": { + "type": "integer", + "description": "Gets or sets the year.", + "format": "int32", + "nullable": true + }, + "IndexNumber": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "ParentIndexNumber": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "PremiereDate": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "IsAutomated": { + "type": "boolean" + }, + "AlbumArtists": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Gets or sets the album artist." + }, + "ArtistProviderIds": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "description": "Gets or sets the artist provider ids." + }, + "SongInfos": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SongInfo" + } + } + }, + "additionalProperties": false + }, + "AlbumInfoRemoteSearchQuery": { + "type": "object", + "properties": { + "SearchInfo": { + "allOf": [ + { + "$ref": "#/components/schemas/AlbumInfo" + } + ], + "nullable": true + }, + "ItemId": { + "type": "string", + "format": "uuid" + }, + "SearchProviderName": { + "type": "string", + "description": "Gets or sets the provider name to search within if set.", + "nullable": true + }, + "IncludeDisabledProviders": { + "type": "boolean", + "description": "Gets or sets a value indicating whether disabled providers should be included." + } + }, + "additionalProperties": false + }, + "AllThemeMediaResult": { + "type": "object", + "properties": { + "ThemeVideosResult": { + "allOf": [ + { + "$ref": "#/components/schemas/ThemeMediaResult" + } + ], + "description": "Class ThemeMediaResult.", + "nullable": true + }, + "ThemeSongsResult": { + "allOf": [ + { + "$ref": "#/components/schemas/ThemeMediaResult" + } + ], + "description": "Class ThemeMediaResult.", + "nullable": true + }, + "SoundtrackSongsResult": { + "allOf": [ + { + "$ref": "#/components/schemas/ThemeMediaResult" + } + ], + "description": "Class ThemeMediaResult.", + "nullable": true + } + }, + "additionalProperties": false + }, + "Architecture": { + "enum": [ + "X86", + "X64", + "Arm", + "Arm64", + "Wasm", + "S390x" + ], + "type": "string" + }, + "ArtistInfo": { + "type": "object", + "properties": { + "Name": { + "type": "string", + "description": "Gets or sets the name.", + "nullable": true + }, + "OriginalTitle": { + "type": "string", + "description": "Gets or sets the original title.", + "nullable": true + }, + "Path": { + "type": "string", + "description": "Gets or sets the path.", + "nullable": true + }, + "MetadataLanguage": { + "type": "string", + "description": "Gets or sets the metadata language.", + "nullable": true + }, + "MetadataCountryCode": { + "type": "string", + "description": "Gets or sets the metadata country code.", + "nullable": true + }, + "ProviderIds": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "description": "Gets or sets the provider ids.", + "nullable": true + }, + "Year": { + "type": "integer", + "description": "Gets or sets the year.", + "format": "int32", + "nullable": true + }, + "IndexNumber": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "ParentIndexNumber": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "PremiereDate": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "IsAutomated": { + "type": "boolean" + }, + "SongInfos": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SongInfo" + } + } + }, + "additionalProperties": false + }, + "ArtistInfoRemoteSearchQuery": { + "type": "object", + "properties": { + "SearchInfo": { + "allOf": [ + { + "$ref": "#/components/schemas/ArtistInfo" + } + ], + "nullable": true + }, + "ItemId": { + "type": "string", + "format": "uuid" + }, + "SearchProviderName": { + "type": "string", + "description": "Gets or sets the provider name to search within if set.", + "nullable": true + }, + "IncludeDisabledProviders": { + "type": "boolean", + "description": "Gets or sets a value indicating whether disabled providers should be included." + } + }, + "additionalProperties": false + }, + "AuthenticateUserByName": { + "type": "object", + "properties": { + "Username": { + "type": "string", + "description": "Gets or sets the username.", + "nullable": true + }, + "Pw": { + "type": "string", + "description": "Gets or sets the plain text password.", + "nullable": true + }, + "Password": { + "type": "string", + "description": "Gets or sets the sha1-hashed password.", + "nullable": true, + "deprecated": true + } + }, + "additionalProperties": false, + "description": "The authenticate user by name request body." + }, + "AuthenticationInfo": { + "type": "object", + "properties": { + "Id": { + "type": "integer", + "description": "Gets or sets the identifier.", + "format": "int64" + }, + "AccessToken": { + "type": "string", + "description": "Gets or sets the access token.", + "nullable": true + }, + "DeviceId": { + "type": "string", + "description": "Gets or sets the device identifier.", + "nullable": true + }, + "AppName": { + "type": "string", + "description": "Gets or sets the name of the application.", + "nullable": true + }, + "AppVersion": { + "type": "string", + "description": "Gets or sets the application version.", + "nullable": true + }, + "DeviceName": { + "type": "string", + "description": "Gets or sets the name of the device.", + "nullable": true + }, + "UserId": { + "type": "string", + "description": "Gets or sets the user identifier.", + "format": "uuid" + }, + "IsActive": { + "type": "boolean", + "description": "Gets or sets a value indicating whether this instance is active." + }, + "DateCreated": { + "type": "string", + "description": "Gets or sets the date created.", + "format": "date-time" + }, + "DateRevoked": { + "type": "string", + "description": "Gets or sets the date revoked.", + "format": "date-time", + "nullable": true + }, + "DateLastActivity": { + "type": "string", + "format": "date-time" + }, + "UserName": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "AuthenticationInfoQueryResult": { + "type": "object", + "properties": { + "Items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AuthenticationInfo" + }, + "description": "Gets or sets the items.", + "nullable": true + }, + "TotalRecordCount": { + "type": "integer", + "description": "Gets or sets the total number of records available.", + "format": "int32" + }, + "StartIndex": { + "type": "integer", + "description": "Gets or sets the index of the first record in Items.", + "format": "int32" + } + }, + "additionalProperties": false + }, + "AuthenticationResult": { + "type": "object", + "properties": { + "User": { + "allOf": [ + { + "$ref": "#/components/schemas/UserDto" + } + ], + "description": "Class UserDto.", + "nullable": true + }, + "SessionInfo": { + "allOf": [ + { + "$ref": "#/components/schemas/SessionInfo" + } + ], + "description": "Class SessionInfo.", + "nullable": true + }, + "AccessToken": { + "type": "string", + "nullable": true + }, + "ServerId": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "BaseItem": { + "type": "object", + "properties": { + "Size": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "Container": { + "type": "string", + "nullable": true + }, + "IsHD": { + "type": "boolean", + "readOnly": true + }, + "IsShortcut": { + "type": "boolean" + }, + "ShortcutPath": { + "type": "string", + "nullable": true + }, + "Width": { + "type": "integer", + "format": "int32" + }, + "Height": { + "type": "integer", + "format": "int32" + }, + "ExtraIds": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "nullable": true + }, + "DateLastSaved": { + "type": "string", + "format": "date-time" + }, + "RemoteTrailers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MediaUrl" + }, + "description": "Gets or sets the remote trailers.", + "nullable": true + }, + "SupportsExternalTransfer": { + "type": "boolean", + "readOnly": true + } + }, + "additionalProperties": false, + "description": "Class BaseItem." + }, + "BaseItemDto": { + "type": "object", + "properties": { + "Name": { + "type": "string", + "description": "Gets or sets the name.", + "nullable": true + }, + "OriginalTitle": { + "type": "string", + "nullable": true + }, + "ServerId": { + "type": "string", + "description": "Gets or sets the server identifier.", + "nullable": true + }, + "Id": { + "type": "string", + "description": "Gets or sets the id.", + "format": "uuid" + }, + "Etag": { + "type": "string", + "description": "Gets or sets the etag.", + "nullable": true + }, + "SourceType": { + "type": "string", + "description": "Gets or sets the type of the source.", + "nullable": true + }, + "PlaylistItemId": { + "type": "string", + "description": "Gets or sets the playlist item identifier.", + "nullable": true + }, + "DateCreated": { + "type": "string", + "description": "Gets or sets the date created.", + "format": "date-time", + "nullable": true + }, + "DateLastMediaAdded": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "ExtraType": { + "type": "string", + "nullable": true + }, + "AirsBeforeSeasonNumber": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "AirsAfterSeasonNumber": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "AirsBeforeEpisodeNumber": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "CanDelete": { + "type": "boolean", + "nullable": true + }, + "CanDownload": { + "type": "boolean", + "nullable": true + }, + "HasSubtitles": { + "type": "boolean", + "nullable": true + }, + "PreferredMetadataLanguage": { + "type": "string", + "nullable": true + }, + "PreferredMetadataCountryCode": { + "type": "string", + "nullable": true + }, + "SupportsSync": { + "type": "boolean", + "description": "Gets or sets a value indicating whether [supports synchronize].", + "nullable": true + }, + "Container": { + "type": "string", + "nullable": true + }, + "SortName": { + "type": "string", + "description": "Gets or sets the name of the sort.", + "nullable": true + }, + "ForcedSortName": { + "type": "string", + "nullable": true + }, + "Video3DFormat": { + "allOf": [ + { + "$ref": "#/components/schemas/Video3DFormat" + } + ], + "description": "Gets or sets the video3 D format.", + "nullable": true + }, + "PremiereDate": { + "type": "string", + "description": "Gets or sets the premiere date.", + "format": "date-time", + "nullable": true + }, + "ExternalUrls": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExternalUrl" + }, + "description": "Gets or sets the external urls.", + "nullable": true + }, + "MediaSources": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MediaSourceInfo" + }, + "description": "Gets or sets the media versions.", + "nullable": true + }, + "CriticRating": { + "type": "number", + "description": "Gets or sets the critic rating.", + "format": "float", + "nullable": true + }, + "ProductionLocations": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "Path": { + "type": "string", + "description": "Gets or sets the path.", + "nullable": true + }, + "EnableMediaSourceDisplay": { + "type": "boolean", + "nullable": true + }, + "OfficialRating": { + "type": "string", + "description": "Gets or sets the official rating.", + "nullable": true + }, + "CustomRating": { + "type": "string", + "description": "Gets or sets the custom rating.", + "nullable": true + }, + "ChannelId": { + "type": "string", + "description": "Gets or sets the channel identifier.", + "format": "uuid", + "nullable": true + }, + "ChannelName": { + "type": "string", + "nullable": true + }, + "Overview": { + "type": "string", + "description": "Gets or sets the overview.", + "nullable": true + }, + "Taglines": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Gets or sets the taglines.", + "nullable": true + }, + "Genres": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Gets or sets the genres.", + "nullable": true + }, + "CommunityRating": { + "type": "number", + "description": "Gets or sets the community rating.", + "format": "float", + "nullable": true + }, + "CumulativeRunTimeTicks": { + "type": "integer", + "description": "Gets or sets the cumulative run time ticks.", + "format": "int64", + "nullable": true + }, + "RunTimeTicks": { + "type": "integer", + "description": "Gets or sets the run time ticks.", + "format": "int64", + "nullable": true + }, + "PlayAccess": { + "allOf": [ + { + "$ref": "#/components/schemas/PlayAccess" + } + ], + "description": "Gets or sets the play access.", + "nullable": true + }, + "AspectRatio": { + "type": "string", + "description": "Gets or sets the aspect ratio.", + "nullable": true + }, + "ProductionYear": { + "type": "integer", + "description": "Gets or sets the production year.", + "format": "int32", + "nullable": true + }, + "IsPlaceHolder": { + "type": "boolean", + "description": "Gets or sets a value indicating whether this instance is place holder.", + "nullable": true + }, + "Number": { + "type": "string", + "description": "Gets or sets the number.", + "nullable": true + }, + "ChannelNumber": { + "type": "string", + "nullable": true + }, + "IndexNumber": { + "type": "integer", + "description": "Gets or sets the index number.", + "format": "int32", + "nullable": true + }, + "IndexNumberEnd": { + "type": "integer", + "description": "Gets or sets the index number end.", + "format": "int32", + "nullable": true + }, + "ParentIndexNumber": { + "type": "integer", + "description": "Gets or sets the parent index number.", + "format": "int32", + "nullable": true + }, + "RemoteTrailers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MediaUrl" + }, + "description": "Gets or sets the trailer urls.", + "nullable": true + }, + "ProviderIds": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "description": "Gets or sets the provider ids.", + "nullable": true + }, + "IsHD": { + "type": "boolean", + "description": "Gets or sets a value indicating whether this instance is HD.", + "nullable": true + }, + "IsFolder": { + "type": "boolean", + "description": "Gets or sets a value indicating whether this instance is folder.", + "nullable": true + }, + "ParentId": { + "type": "string", + "description": "Gets or sets the parent id.", + "format": "uuid", + "nullable": true + }, + "Type": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseItemKind" + } + ], + "description": "Gets or sets the type." + }, + "People": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseItemPerson" + }, + "description": "Gets or sets the people.", + "nullable": true + }, + "Studios": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NameGuidPair" + }, + "description": "Gets or sets the studios.", + "nullable": true + }, + "GenreItems": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NameGuidPair" + }, + "nullable": true + }, + "ParentLogoItemId": { + "type": "string", + "description": "Gets or sets wether the item has a logo, this will hold the Id of the Parent that has one.", + "format": "uuid", + "nullable": true + }, + "ParentBackdropItemId": { + "type": "string", + "description": "Gets or sets wether the item has any backdrops, this will hold the Id of the Parent that has one.", + "format": "uuid", + "nullable": true + }, + "ParentBackdropImageTags": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Gets or sets the parent backdrop image tags.", + "nullable": true + }, + "LocalTrailerCount": { + "type": "integer", + "description": "Gets or sets the local trailer count.", + "format": "int32", + "nullable": true + }, + "UserData": { + "allOf": [ + { + "$ref": "#/components/schemas/UserItemDataDto" + } + ], + "description": "Gets or sets the user data for this item based on the user it's being requested for.", + "nullable": true + }, + "RecursiveItemCount": { + "type": "integer", + "description": "Gets or sets the recursive item count.", + "format": "int32", + "nullable": true + }, + "ChildCount": { + "type": "integer", + "description": "Gets or sets the child count.", + "format": "int32", + "nullable": true + }, + "SeriesName": { + "type": "string", + "description": "Gets or sets the name of the series.", + "nullable": true + }, + "SeriesId": { + "type": "string", + "description": "Gets or sets the series id.", + "format": "uuid", + "nullable": true + }, + "SeasonId": { + "type": "string", + "description": "Gets or sets the season identifier.", + "format": "uuid", + "nullable": true + }, + "SpecialFeatureCount": { + "type": "integer", + "description": "Gets or sets the special feature count.", + "format": "int32", + "nullable": true + }, + "DisplayPreferencesId": { + "type": "string", + "description": "Gets or sets the display preferences id.", + "nullable": true + }, + "Status": { + "type": "string", + "description": "Gets or sets the status.", + "nullable": true + }, + "AirTime": { + "type": "string", + "description": "Gets or sets the air time.", + "nullable": true + }, + "AirDays": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DayOfWeek" + }, + "description": "Gets or sets the air days.", + "nullable": true + }, + "Tags": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Gets or sets the tags.", + "nullable": true + }, + "PrimaryImageAspectRatio": { + "type": "number", + "description": "Gets or sets the primary image aspect ratio, after image enhancements.", + "format": "double", + "nullable": true + }, + "Artists": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Gets or sets the artists.", + "nullable": true + }, + "ArtistItems": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NameGuidPair" + }, + "description": "Gets or sets the artist items.", + "nullable": true + }, + "Album": { + "type": "string", + "description": "Gets or sets the album.", + "nullable": true + }, + "CollectionType": { + "type": "string", + "description": "Gets or sets the type of the collection.", + "nullable": true + }, + "DisplayOrder": { + "type": "string", + "description": "Gets or sets the display order.", + "nullable": true + }, + "AlbumId": { + "type": "string", + "description": "Gets or sets the album id.", + "format": "uuid", + "nullable": true + }, + "AlbumPrimaryImageTag": { + "type": "string", + "description": "Gets or sets the album image tag.", + "nullable": true + }, + "SeriesPrimaryImageTag": { + "type": "string", + "description": "Gets or sets the series primary image tag.", + "nullable": true + }, + "AlbumArtist": { + "type": "string", + "description": "Gets or sets the album artist.", + "nullable": true + }, + "AlbumArtists": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NameGuidPair" + }, + "description": "Gets or sets the album artists.", + "nullable": true + }, + "SeasonName": { + "type": "string", + "description": "Gets or sets the name of the season.", + "nullable": true + }, + "MediaStreams": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MediaStream" + }, + "description": "Gets or sets the media streams.", + "nullable": true + }, + "VideoType": { + "allOf": [ + { + "$ref": "#/components/schemas/VideoType" + } + ], + "description": "Gets or sets the type of the video.", + "nullable": true + }, + "PartCount": { + "type": "integer", + "description": "Gets or sets the part count.", + "format": "int32", + "nullable": true + }, + "MediaSourceCount": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "ImageTags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Gets or sets the image tags.", + "nullable": true + }, + "BackdropImageTags": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Gets or sets the backdrop image tags.", + "nullable": true + }, + "ScreenshotImageTags": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Gets or sets the screenshot image tags.", + "nullable": true + }, + "ParentLogoImageTag": { + "type": "string", + "description": "Gets or sets the parent logo image tag.", + "nullable": true + }, + "ParentArtItemId": { + "type": "string", + "description": "Gets or sets wether the item has fan art, this will hold the Id of the Parent that has one.", + "format": "uuid", + "nullable": true + }, + "ParentArtImageTag": { + "type": "string", + "description": "Gets or sets the parent art image tag.", + "nullable": true + }, + "SeriesThumbImageTag": { + "type": "string", + "description": "Gets or sets the series thumb image tag.", + "nullable": true + }, + "ImageBlurHashes": { + "type": "object", + "properties": { + "Primary": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "Art": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "Backdrop": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "Banner": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "Logo": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "Thumb": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "Disc": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "Box": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "Screenshot": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "Menu": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "Chapter": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "BoxRear": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "Profile": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "description": "Gets or sets the blurhashes for the image tags.\r\nMaps image type to dictionary mapping image tag to blurhash value.", + "nullable": true + }, + "SeriesStudio": { + "type": "string", + "description": "Gets or sets the series studio.", + "nullable": true + }, + "ParentThumbItemId": { + "type": "string", + "description": "Gets or sets the parent thumb item id.", + "format": "uuid", + "nullable": true + }, + "ParentThumbImageTag": { + "type": "string", + "description": "Gets or sets the parent thumb image tag.", + "nullable": true + }, + "ParentPrimaryImageItemId": { + "type": "string", + "description": "Gets or sets the parent primary image item identifier.", + "nullable": true + }, + "ParentPrimaryImageTag": { + "type": "string", + "description": "Gets or sets the parent primary image tag.", + "nullable": true + }, + "Chapters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ChapterInfo" + }, + "description": "Gets or sets the chapters.", + "nullable": true + }, + "LocationType": { + "allOf": [ + { + "$ref": "#/components/schemas/LocationType" + } + ], + "description": "Gets or sets the type of the location.", + "nullable": true + }, + "IsoType": { + "allOf": [ + { + "$ref": "#/components/schemas/IsoType" + } + ], + "description": "Gets or sets the type of the iso.", + "nullable": true + }, + "MediaType": { + "type": "string", + "description": "Gets or sets the type of the media.", + "nullable": true + }, + "EndDate": { + "type": "string", + "description": "Gets or sets the end date.", + "format": "date-time", + "nullable": true + }, + "LockedFields": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MetadataField" + }, + "description": "Gets or sets the locked fields.", + "nullable": true + }, + "TrailerCount": { + "type": "integer", + "description": "Gets or sets the trailer count.", + "format": "int32", + "nullable": true + }, + "MovieCount": { + "type": "integer", + "description": "Gets or sets the movie count.", + "format": "int32", + "nullable": true + }, + "SeriesCount": { + "type": "integer", + "description": "Gets or sets the series count.", + "format": "int32", + "nullable": true + }, + "ProgramCount": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "EpisodeCount": { + "type": "integer", + "description": "Gets or sets the episode count.", + "format": "int32", + "nullable": true + }, + "SongCount": { + "type": "integer", + "description": "Gets or sets the song count.", + "format": "int32", + "nullable": true + }, + "AlbumCount": { + "type": "integer", + "description": "Gets or sets the album count.", + "format": "int32", + "nullable": true + }, + "ArtistCount": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "MusicVideoCount": { + "type": "integer", + "description": "Gets or sets the music video count.", + "format": "int32", + "nullable": true + }, + "LockData": { + "type": "boolean", + "description": "Gets or sets a value indicating whether [enable internet providers].", + "nullable": true + }, + "Width": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "Height": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "CameraMake": { + "type": "string", + "nullable": true + }, + "CameraModel": { + "type": "string", + "nullable": true + }, + "Software": { + "type": "string", + "nullable": true + }, + "ExposureTime": { + "type": "number", + "format": "double", + "nullable": true + }, + "FocalLength": { + "type": "number", + "format": "double", + "nullable": true + }, + "ImageOrientation": { + "allOf": [ + { + "$ref": "#/components/schemas/ImageOrientation" + } + ], + "nullable": true + }, + "Aperture": { + "type": "number", + "format": "double", + "nullable": true + }, + "ShutterSpeed": { + "type": "number", + "format": "double", + "nullable": true + }, + "Latitude": { + "type": "number", + "format": "double", + "nullable": true + }, + "Longitude": { + "type": "number", + "format": "double", + "nullable": true + }, + "Altitude": { + "type": "number", + "format": "double", + "nullable": true + }, + "IsoSpeedRating": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "SeriesTimerId": { + "type": "string", + "description": "Gets or sets the series timer identifier.", + "nullable": true + }, + "ProgramId": { + "type": "string", + "description": "Gets or sets the program identifier.", + "nullable": true + }, + "ChannelPrimaryImageTag": { + "type": "string", + "description": "Gets or sets the channel primary image tag.", + "nullable": true + }, + "StartDate": { + "type": "string", + "description": "Gets or sets the start date of the recording, in UTC.", + "format": "date-time", + "nullable": true + }, + "CompletionPercentage": { + "type": "number", + "description": "Gets or sets the completion percentage.", + "format": "double", + "nullable": true + }, + "IsRepeat": { + "type": "boolean", + "description": "Gets or sets a value indicating whether this instance is repeat.", + "nullable": true + }, + "EpisodeTitle": { + "type": "string", + "description": "Gets or sets the episode title.", + "nullable": true + }, + "ChannelType": { + "allOf": [ + { + "$ref": "#/components/schemas/ChannelType" + } + ], + "description": "Gets or sets the type of the channel.", + "nullable": true + }, + "Audio": { + "allOf": [ + { + "$ref": "#/components/schemas/ProgramAudio" + } + ], + "description": "Gets or sets the audio.", + "nullable": true + }, + "IsMovie": { + "type": "boolean", + "description": "Gets or sets a value indicating whether this instance is movie.", + "nullable": true + }, + "IsSports": { + "type": "boolean", + "description": "Gets or sets a value indicating whether this instance is sports.", + "nullable": true + }, + "IsSeries": { + "type": "boolean", + "description": "Gets or sets a value indicating whether this instance is series.", + "nullable": true + }, + "IsLive": { + "type": "boolean", + "description": "Gets or sets a value indicating whether this instance is live.", + "nullable": true + }, + "IsNews": { + "type": "boolean", + "description": "Gets or sets a value indicating whether this instance is news.", + "nullable": true + }, + "IsKids": { + "type": "boolean", + "description": "Gets or sets a value indicating whether this instance is kids.", + "nullable": true + }, + "IsPremiere": { + "type": "boolean", + "description": "Gets or sets a value indicating whether this instance is premiere.", + "nullable": true + }, + "TimerId": { + "type": "string", + "description": "Gets or sets the timer identifier.", + "nullable": true + }, + "CurrentProgram": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseItemDto" + } + ], + "description": "Gets or sets the current program.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "This is strictly used as a data transfer object from the api layer.\r\nThis holds information about a BaseItem in a format that is convenient for the client." + }, + "BaseItemDtoQueryResult": { + "type": "object", + "properties": { + "Items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseItemDto" + }, + "description": "Gets or sets the items.", + "nullable": true + }, + "TotalRecordCount": { + "type": "integer", + "description": "Gets or sets the total number of records available.", + "format": "int32" + }, + "StartIndex": { + "type": "integer", + "description": "Gets or sets the index of the first record in Items.", + "format": "int32" + } + }, + "additionalProperties": false + }, + "BaseItemKind": { + "enum": [ + "AggregateFolder", + "Audio", + "AudioBook", + "BasePluginFolder", + "Book", + "BoxSet", + "Channel", + "ChannelFolderItem", + "CollectionFolder", + "Episode", + "Folder", + "Genre", + "ManualPlaylistsFolder", + "Movie", + "LiveTvChannel", + "LiveTvProgram", + "MusicAlbum", + "MusicArtist", + "MusicGenre", + "MusicVideo", + "Person", + "Photo", + "PhotoAlbum", + "Playlist", + "PlaylistsFolder", + "Program", + "Recording", + "Season", + "Series", + "Studio", + "Trailer", + "TvChannel", + "TvProgram", + "UserRootFolder", + "UserView", + "Video", + "Year" + ], + "type": "string", + "description": "The base item kind." + }, + "BaseItemPerson": { + "type": "object", + "properties": { + "Name": { + "type": "string", + "description": "Gets or sets the name.", + "nullable": true + }, + "Id": { + "type": "string", + "description": "Gets or sets the identifier.", + "format": "uuid" + }, + "Role": { + "type": "string", + "description": "Gets or sets the role.", + "nullable": true + }, + "Type": { + "type": "string", + "description": "Gets or sets the type.", + "nullable": true + }, + "PrimaryImageTag": { + "type": "string", + "description": "Gets or sets the primary image tag.", + "nullable": true + }, + "ImageBlurHashes": { + "type": "object", + "properties": { + "Primary": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "Art": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "Backdrop": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "Banner": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "Logo": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "Thumb": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "Disc": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "Box": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "Screenshot": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "Menu": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "Chapter": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "BoxRear": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "Profile": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "description": "Gets or sets the primary image blurhash.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "This is used by the api to get information about a Person within a BaseItem." + }, + "BasePluginConfiguration": { + "type": "object", + "additionalProperties": false, + "description": "Class BasePluginConfiguration." + }, + "BookInfo": { + "type": "object", + "properties": { + "Name": { + "type": "string", + "description": "Gets or sets the name.", + "nullable": true + }, + "OriginalTitle": { + "type": "string", + "description": "Gets or sets the original title.", + "nullable": true + }, + "Path": { + "type": "string", + "description": "Gets or sets the path.", + "nullable": true + }, + "MetadataLanguage": { + "type": "string", + "description": "Gets or sets the metadata language.", + "nullable": true + }, + "MetadataCountryCode": { + "type": "string", + "description": "Gets or sets the metadata country code.", + "nullable": true + }, + "ProviderIds": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "description": "Gets or sets the provider ids.", + "nullable": true + }, + "Year": { + "type": "integer", + "description": "Gets or sets the year.", + "format": "int32", + "nullable": true + }, + "IndexNumber": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "ParentIndexNumber": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "PremiereDate": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "IsAutomated": { + "type": "boolean" + }, + "SeriesName": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "BookInfoRemoteSearchQuery": { + "type": "object", + "properties": { + "SearchInfo": { + "allOf": [ + { + "$ref": "#/components/schemas/BookInfo" + } + ], + "nullable": true + }, + "ItemId": { + "type": "string", + "format": "uuid" + }, + "SearchProviderName": { + "type": "string", + "description": "Gets or sets the provider name to search within if set.", + "nullable": true + }, + "IncludeDisabledProviders": { + "type": "boolean", + "description": "Gets or sets a value indicating whether disabled providers should be included." + } + }, + "additionalProperties": false + }, + "BoxSetInfo": { + "type": "object", + "properties": { + "Name": { + "type": "string", + "description": "Gets or sets the name.", + "nullable": true + }, + "OriginalTitle": { + "type": "string", + "description": "Gets or sets the original title.", + "nullable": true + }, + "Path": { + "type": "string", + "description": "Gets or sets the path.", + "nullable": true + }, + "MetadataLanguage": { + "type": "string", + "description": "Gets or sets the metadata language.", + "nullable": true + }, + "MetadataCountryCode": { + "type": "string", + "description": "Gets or sets the metadata country code.", + "nullable": true + }, + "ProviderIds": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "description": "Gets or sets the provider ids.", + "nullable": true + }, + "Year": { + "type": "integer", + "description": "Gets or sets the year.", + "format": "int32", + "nullable": true + }, + "IndexNumber": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "ParentIndexNumber": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "PremiereDate": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "IsAutomated": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "BoxSetInfoRemoteSearchQuery": { + "type": "object", + "properties": { + "SearchInfo": { + "allOf": [ + { + "$ref": "#/components/schemas/BoxSetInfo" + } + ], + "nullable": true + }, + "ItemId": { + "type": "string", + "format": "uuid" + }, + "SearchProviderName": { + "type": "string", + "description": "Gets or sets the provider name to search within if set.", + "nullable": true + }, + "IncludeDisabledProviders": { + "type": "boolean", + "description": "Gets or sets a value indicating whether disabled providers should be included." + } + }, + "additionalProperties": false + }, + "BrandingOptions": { + "type": "object", + "properties": { + "LoginDisclaimer": { + "type": "string", + "description": "Gets or sets the login disclaimer.", + "nullable": true + }, + "CustomCss": { + "type": "string", + "description": "Gets or sets the custom CSS.", + "nullable": true + }, + "SplashscreenEnabled": { + "type": "boolean", + "description": "Gets or sets a value indicating whether to enable the splashscreen." + } + }, + "additionalProperties": false, + "description": "The branding options." + }, + "BufferRequestDto": { + "type": "object", + "properties": { + "When": { + "type": "string", + "description": "Gets or sets when the request has been made by the client.", + "format": "date-time" + }, + "PositionTicks": { + "type": "integer", + "description": "Gets or sets the position ticks.", + "format": "int64" + }, + "IsPlaying": { + "type": "boolean", + "description": "Gets or sets a value indicating whether the client playback is unpaused." + }, + "PlaylistItemId": { + "type": "string", + "description": "Gets or sets the playlist item identifier of the playing item.", + "format": "uuid" + } + }, + "additionalProperties": false, + "description": "Class BufferRequestDto." + }, + "ChannelFeatures": { + "type": "object", + "properties": { + "Name": { + "type": "string", + "description": "Gets or sets the name." + }, + "Id": { + "type": "string", + "description": "Gets or sets the identifier.", + "format": "uuid" + }, + "CanSearch": { + "type": "boolean", + "description": "Gets or sets a value indicating whether this instance can search." + }, + "MediaTypes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ChannelMediaType" + }, + "description": "Gets or sets the media types." + }, + "ContentTypes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ChannelMediaContentType" + }, + "description": "Gets or sets the content types." + }, + "MaxPageSize": { + "type": "integer", + "description": "Gets or sets the maximum number of records the channel allows retrieving at a time.", + "format": "int32", + "nullable": true + }, + "AutoRefreshLevels": { + "type": "integer", + "description": "Gets or sets the automatic refresh levels.", + "format": "int32", + "nullable": true + }, + "DefaultSortFields": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ChannelItemSortField" + }, + "description": "Gets or sets the default sort orders." + }, + "SupportsSortOrderToggle": { + "type": "boolean", + "description": "Gets or sets a value indicating whether a sort ascending/descending toggle is supported." + }, + "SupportsLatestMedia": { + "type": "boolean", + "description": "Gets or sets a value indicating whether [supports latest media]." + }, + "CanFilter": { + "type": "boolean", + "description": "Gets or sets a value indicating whether this instance can filter." + }, + "SupportsContentDownloading": { + "type": "boolean", + "description": "Gets or sets a value indicating whether [supports content downloading]." + } + }, + "additionalProperties": false + }, + "ChannelItemSortField": { + "enum": [ + "Name", + "CommunityRating", + "PremiereDate", + "DateCreated", + "Runtime", + "PlayCount", + "CommunityPlayCount" + ], + "type": "string" + }, + "ChannelMappingOptionsDto": { + "type": "object", + "properties": { + "TunerChannels": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TunerChannelMapping" + }, + "description": "Gets or sets list of tuner channels." + }, + "ProviderChannels": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NameIdPair" + }, + "description": "Gets or sets list of provider channels." + }, + "Mappings": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NameValuePair" + }, + "description": "Gets or sets list of mappings." + }, + "ProviderName": { + "type": "string", + "description": "Gets or sets provider name.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Channel mapping options dto." + }, + "ChannelMediaContentType": { + "enum": [ + "Clip", + "Podcast", + "Trailer", + "Movie", + "Episode", + "Song", + "MovieExtra", + "TvExtra" + ], + "type": "string" + }, + "ChannelMediaType": { + "enum": [ + "Audio", + "Video", + "Photo" + ], + "type": "string" + }, + "ChannelType": { + "enum": [ + "TV", + "Radio" + ], + "type": "string", + "description": "Enum ChannelType." + }, + "ChapterInfo": { + "type": "object", + "properties": { + "StartPositionTicks": { + "type": "integer", + "description": "Gets or sets the start position ticks.", + "format": "int64" + }, + "Name": { + "type": "string", + "description": "Gets or sets the name.", + "nullable": true + }, + "ImagePath": { + "type": "string", + "description": "Gets or sets the image path.", + "nullable": true + }, + "ImageDateModified": { + "type": "string", + "format": "date-time" + }, + "ImageTag": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Class ChapterInfo." + }, + "ClientCapabilities": { + "type": "object", + "properties": { + "PlayableMediaTypes": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "SupportedCommands": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GeneralCommandType" + }, + "nullable": true + }, + "SupportsMediaControl": { + "type": "boolean" + }, + "SupportsContentUploading": { + "type": "boolean" + }, + "MessageCallbackUrl": { + "type": "string", + "nullable": true + }, + "SupportsPersistentIdentifier": { + "type": "boolean" + }, + "SupportsSync": { + "type": "boolean" + }, + "DeviceProfile": { + "allOf": [ + { + "$ref": "#/components/schemas/DeviceProfile" + } + ], + "description": "A MediaBrowser.Model.Dlna.DeviceProfile represents a set of metadata which determines which content a certain device is able to play.\r\n
\r\nSpecifically, it defines the supported containers and\r\ncodecs (video and/or audio, including codec profiles and levels)\r\nthe device is able to direct play (without transcoding or remuxing),\r\nas well as which containers/codecs to transcode to in case it isn't.", + "nullable": true + }, + "AppStoreUrl": { + "type": "string", + "nullable": true + }, + "IconUrl": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "ClientCapabilitiesDto": { + "type": "object", + "properties": { + "PlayableMediaTypes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Gets or sets the list of playable media types." + }, + "SupportedCommands": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GeneralCommandType" + }, + "description": "Gets or sets the list of supported commands." + }, + "SupportsMediaControl": { + "type": "boolean", + "description": "Gets or sets a value indicating whether session supports media control." + }, + "SupportsContentUploading": { + "type": "boolean", + "description": "Gets or sets a value indicating whether session supports content uploading." + }, + "MessageCallbackUrl": { + "type": "string", + "description": "Gets or sets the message callback url.", + "nullable": true + }, + "SupportsPersistentIdentifier": { + "type": "boolean", + "description": "Gets or sets a value indicating whether session supports a persistent identifier." + }, + "SupportsSync": { + "type": "boolean", + "description": "Gets or sets a value indicating whether session supports sync." + }, + "DeviceProfile": { + "allOf": [ + { + "$ref": "#/components/schemas/DeviceProfile" + } + ], + "description": "Gets or sets the device profile.", + "nullable": true + }, + "AppStoreUrl": { + "type": "string", + "description": "Gets or sets the app store url.", + "nullable": true + }, + "IconUrl": { + "type": "string", + "description": "Gets or sets the icon url.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Client capabilities dto." + }, + "ClientLogDocumentResponseDto": { + "type": "object", + "properties": { + "FileName": { + "type": "string", + "description": "Gets the resulting filename." + } + }, + "additionalProperties": false, + "description": "Client log document response dto." + }, + "CodecProfile": { + "type": "object", + "properties": { + "Type": { + "allOf": [ + { + "$ref": "#/components/schemas/CodecType" + } + ] + }, + "Conditions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ProfileCondition" + }, + "nullable": true + }, + "ApplyConditions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ProfileCondition" + }, + "nullable": true + }, + "Codec": { + "type": "string", + "nullable": true + }, + "Container": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "CodecType": { + "enum": [ + "Video", + "VideoAudio", + "Audio" + ], + "type": "string" + }, + "CollectionCreationResult": { + "type": "object", + "properties": { + "Id": { + "type": "string", + "format": "uuid" + } + }, + "additionalProperties": false + }, + "CollectionTypeOptions": { + "enum": [ + "Movies", + "TvShows", + "Music", + "MusicVideos", + "HomeVideos", + "BoxSets", + "Books", + "Mixed" + ], + "type": "string" + }, + "ConfigImageTypes": { + "type": "object", + "properties": { + "BackdropSizes": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "BaseUrl": { + "type": "string", + "nullable": true + }, + "LogoSizes": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "PosterSizes": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "ProfileSizes": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "SecureBaseUrl": { + "type": "string", + "nullable": true + }, + "StillSizes": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "ConfigurationPageInfo": { + "type": "object", + "properties": { + "Name": { + "type": "string", + "description": "Gets or sets the name." + }, + "EnableInMainMenu": { + "type": "boolean", + "description": "Gets or sets a value indicating whether the configurations page is enabled in the main menu." + }, + "MenuSection": { + "type": "string", + "description": "Gets or sets the menu section.", + "nullable": true + }, + "MenuIcon": { + "type": "string", + "description": "Gets or sets the menu icon.", + "nullable": true + }, + "DisplayName": { + "type": "string", + "description": "Gets or sets the display name.", + "nullable": true + }, + "PluginId": { + "type": "string", + "description": "Gets or sets the plugin id.", + "format": "uuid", + "nullable": true + } + }, + "additionalProperties": false, + "description": "The configuration page info." + }, + "ContainerProfile": { + "type": "object", + "properties": { + "Type": { + "allOf": [ + { + "$ref": "#/components/schemas/DlnaProfileType" + } + ] + }, + "Conditions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ProfileCondition" + }, + "nullable": true + }, + "Container": { + "type": "string" + } + }, + "additionalProperties": false + }, + "ControlResponse": { + "type": "object", + "properties": { + "Headers": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "readOnly": true + }, + "Xml": { + "type": "string" + }, + "IsSuccessful": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "CountryInfo": { + "type": "object", + "properties": { + "Name": { + "type": "string", + "description": "Gets or sets the name.", + "nullable": true + }, + "DisplayName": { + "type": "string", + "description": "Gets or sets the display name.", + "nullable": true + }, + "TwoLetterISORegionName": { + "type": "string", + "description": "Gets or sets the name of the two letter ISO region.", + "nullable": true + }, + "ThreeLetterISORegionName": { + "type": "string", + "description": "Gets or sets the name of the three letter ISO region.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Class CountryInfo." + }, + "CreatePlaylistDto": { + "type": "object", + "properties": { + "Name": { + "type": "string", + "description": "Gets or sets the name of the new playlist.", + "nullable": true + }, + "Ids": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "description": "Gets or sets item ids to add to the playlist." + }, + "UserId": { + "type": "string", + "description": "Gets or sets the user id.", + "format": "uuid", + "nullable": true + }, + "MediaType": { + "type": "string", + "description": "Gets or sets the media type.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Create new playlist dto." + }, + "CreateUserByName": { + "type": "object", + "properties": { + "Name": { + "type": "string", + "description": "Gets or sets the username.", + "nullable": true + }, + "Password": { + "type": "string", + "description": "Gets or sets the password.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "The create user by name request body." + }, + "CultureDto": { + "type": "object", + "properties": { + "Name": { + "type": "string", + "description": "Gets the name." + }, + "DisplayName": { + "type": "string", + "description": "Gets the display name." + }, + "TwoLetterISOLanguageName": { + "type": "string", + "description": "Gets the name of the two letter ISO language." + }, + "ThreeLetterISOLanguageName": { + "type": "string", + "description": "Gets the name of the three letter ISO language.", + "nullable": true, + "readOnly": true + }, + "ThreeLetterISOLanguageNames": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "description": "Class CultureDto." + }, + "DayOfWeek": { + "enum": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "type": "string" + }, + "DayPattern": { + "enum": [ + "Daily", + "Weekdays", + "Weekends" + ], + "type": "string" + }, + "DefaultDirectoryBrowserInfoDto": { + "type": "object", + "properties": { + "Path": { + "type": "string", + "description": "Gets or sets the path.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Default directory browser info." + }, + "DeviceIdentification": { + "type": "object", + "properties": { + "FriendlyName": { + "type": "string", + "description": "Gets or sets the name of the friendly." + }, + "ModelNumber": { + "type": "string", + "description": "Gets or sets the model number." + }, + "SerialNumber": { + "type": "string", + "description": "Gets or sets the serial number." + }, + "ModelName": { + "type": "string", + "description": "Gets or sets the name of the model." + }, + "ModelDescription": { + "type": "string", + "description": "Gets or sets the model description." + }, + "ModelUrl": { + "type": "string", + "description": "Gets or sets the model URL." + }, + "Manufacturer": { + "type": "string", + "description": "Gets or sets the manufacturer." + }, + "ManufacturerUrl": { + "type": "string", + "description": "Gets or sets the manufacturer URL." + }, + "Headers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/HttpHeaderInfo" + }, + "description": "Gets or sets the headers." + } + }, + "additionalProperties": false + }, + "DeviceInfo": { + "type": "object", + "properties": { + "Name": { + "type": "string", + "nullable": true + }, + "AccessToken": { + "type": "string", + "description": "Gets or sets the access token.", + "nullable": true + }, + "Id": { + "type": "string", + "description": "Gets or sets the identifier.", + "nullable": true + }, + "LastUserName": { + "type": "string", + "description": "Gets or sets the last name of the user.", + "nullable": true + }, + "AppName": { + "type": "string", + "description": "Gets or sets the name of the application.", + "nullable": true + }, + "AppVersion": { + "type": "string", + "description": "Gets or sets the application version.", + "nullable": true + }, + "LastUserId": { + "type": "string", + "description": "Gets or sets the last user identifier.", + "format": "uuid" + }, + "DateLastActivity": { + "type": "string", + "description": "Gets or sets the date last modified.", + "format": "date-time" + }, + "Capabilities": { + "allOf": [ + { + "$ref": "#/components/schemas/ClientCapabilities" + } + ], + "description": "Gets or sets the capabilities.", + "nullable": true + }, + "IconUrl": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "DeviceInfoQueryResult": { + "type": "object", + "properties": { + "Items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DeviceInfo" + }, + "description": "Gets or sets the items.", + "nullable": true + }, + "TotalRecordCount": { + "type": "integer", + "description": "Gets or sets the total number of records available.", + "format": "int32" + }, + "StartIndex": { + "type": "integer", + "description": "Gets or sets the index of the first record in Items.", + "format": "int32" + } + }, + "additionalProperties": false + }, + "DeviceOptions": { + "type": "object", + "properties": { + "Id": { + "type": "integer", + "description": "Gets the id.", + "format": "int32", + "readOnly": true + }, + "DeviceId": { + "type": "string", + "description": "Gets the device id." + }, + "CustomName": { + "type": "string", + "description": "Gets or sets the custom name.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "An entity representing custom options for a device." + }, + "DeviceOptionsDto": { + "type": "object", + "properties": { + "Id": { + "type": "integer", + "description": "Gets or sets the id.", + "format": "int32" + }, + "DeviceId": { + "type": "string", + "description": "Gets or sets the device id.", + "nullable": true + }, + "CustomName": { + "type": "string", + "description": "Gets or sets the custom name.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "A dto representing custom options for a device." + }, + "DeviceProfile": { + "type": "object", + "properties": { + "Name": { + "type": "string", + "description": "Gets or sets the name of this device profile.", + "nullable": true + }, + "Id": { + "type": "string", + "description": "Gets or sets the Id.", + "nullable": true + }, + "Identification": { + "allOf": [ + { + "$ref": "#/components/schemas/DeviceIdentification" + } + ], + "description": "Gets or sets the Identification.", + "nullable": true + }, + "FriendlyName": { + "type": "string", + "description": "Gets or sets the friendly name of the device profile, which can be shown to users.", + "nullable": true + }, + "Manufacturer": { + "type": "string", + "description": "Gets or sets the manufacturer of the device which this profile represents.", + "nullable": true + }, + "ManufacturerUrl": { + "type": "string", + "description": "Gets or sets an url for the manufacturer of the device which this profile represents.", + "nullable": true + }, + "ModelName": { + "type": "string", + "description": "Gets or sets the model name of the device which this profile represents.", + "nullable": true + }, + "ModelDescription": { + "type": "string", + "description": "Gets or sets the model description of the device which this profile represents.", + "nullable": true + }, + "ModelNumber": { + "type": "string", + "description": "Gets or sets the model number of the device which this profile represents.", + "nullable": true + }, + "ModelUrl": { + "type": "string", + "description": "Gets or sets the ModelUrl.", + "nullable": true + }, + "SerialNumber": { + "type": "string", + "description": "Gets or sets the serial number of the device which this profile represents.", + "nullable": true + }, + "EnableAlbumArtInDidl": { + "type": "boolean", + "description": "Gets or sets a value indicating whether EnableAlbumArtInDidl.", + "default": false + }, + "EnableSingleAlbumArtLimit": { + "type": "boolean", + "description": "Gets or sets a value indicating whether EnableSingleAlbumArtLimit.", + "default": false + }, + "EnableSingleSubtitleLimit": { + "type": "boolean", + "description": "Gets or sets a value indicating whether EnableSingleSubtitleLimit.", + "default": false + }, + "SupportedMediaTypes": { + "type": "string", + "description": "Gets or sets the SupportedMediaTypes." + }, + "UserId": { + "type": "string", + "description": "Gets or sets the UserId.", + "nullable": true + }, + "AlbumArtPn": { + "type": "string", + "description": "Gets or sets the AlbumArtPn.", + "nullable": true + }, + "MaxAlbumArtWidth": { + "type": "integer", + "description": "Gets or sets the MaxAlbumArtWidth.", + "format": "int32", + "nullable": true + }, + "MaxAlbumArtHeight": { + "type": "integer", + "description": "Gets or sets the MaxAlbumArtHeight.", + "format": "int32", + "nullable": true + }, + "MaxIconWidth": { + "type": "integer", + "description": "Gets or sets the maximum allowed width of embedded icons.", + "format": "int32", + "nullable": true + }, + "MaxIconHeight": { + "type": "integer", + "description": "Gets or sets the maximum allowed height of embedded icons.", + "format": "int32", + "nullable": true + }, + "MaxStreamingBitrate": { + "type": "integer", + "description": "Gets or sets the maximum allowed bitrate for all streamed content.", + "format": "int32", + "nullable": true + }, + "MaxStaticBitrate": { + "type": "integer", + "description": "Gets or sets the maximum allowed bitrate for statically streamed content (= direct played files).", + "format": "int32", + "nullable": true + }, + "MusicStreamingTranscodingBitrate": { + "type": "integer", + "description": "Gets or sets the maximum allowed bitrate for transcoded music streams.", + "format": "int32", + "nullable": true + }, + "MaxStaticMusicBitrate": { + "type": "integer", + "description": "Gets or sets the maximum allowed bitrate for statically streamed (= direct played) music files.", + "format": "int32", + "nullable": true + }, + "SonyAggregationFlags": { + "type": "string", + "description": "Gets or sets the content of the aggregationFlags element in the urn:schemas-sonycom:av namespace.", + "nullable": true + }, + "ProtocolInfo": { + "type": "string", + "description": "Gets or sets the ProtocolInfo.", + "nullable": true + }, + "TimelineOffsetSeconds": { + "type": "integer", + "description": "Gets or sets the TimelineOffsetSeconds.", + "format": "int32", + "default": 0 + }, + "RequiresPlainVideoItems": { + "type": "boolean", + "description": "Gets or sets a value indicating whether RequiresPlainVideoItems.", + "default": false + }, + "RequiresPlainFolders": { + "type": "boolean", + "description": "Gets or sets a value indicating whether RequiresPlainFolders.", + "default": false + }, + "EnableMSMediaReceiverRegistrar": { + "type": "boolean", + "description": "Gets or sets a value indicating whether EnableMSMediaReceiverRegistrar.", + "default": false + }, + "IgnoreTranscodeByteRangeRequests": { + "type": "boolean", + "description": "Gets or sets a value indicating whether IgnoreTranscodeByteRangeRequests.", + "default": false + }, + "XmlRootAttributes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/XmlAttribute" + }, + "description": "Gets or sets the XmlRootAttributes." + }, + "DirectPlayProfiles": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DirectPlayProfile" + }, + "description": "Gets or sets the direct play profiles." + }, + "TranscodingProfiles": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TranscodingProfile" + }, + "description": "Gets or sets the transcoding profiles." + }, + "ContainerProfiles": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ContainerProfile" + }, + "description": "Gets or sets the container profiles." + }, + "CodecProfiles": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CodecProfile" + }, + "description": "Gets or sets the codec profiles." + }, + "ResponseProfiles": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ResponseProfile" + }, + "description": "Gets or sets the ResponseProfiles." + }, + "SubtitleProfiles": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SubtitleProfile" + }, + "description": "Gets or sets the subtitle profiles." + } + }, + "additionalProperties": false, + "description": "A MediaBrowser.Model.Dlna.DeviceProfile represents a set of metadata which determines which content a certain device is able to play.\r\n
\r\nSpecifically, it defines the supported containers and\r\ncodecs (video and/or audio, including codec profiles and levels)\r\nthe device is able to direct play (without transcoding or remuxing),\r\nas well as which containers/codecs to transcode to in case it isn't." + }, + "DeviceProfileInfo": { + "type": "object", + "properties": { + "Id": { + "type": "string", + "description": "Gets or sets the identifier.", + "nullable": true + }, + "Name": { + "type": "string", + "description": "Gets or sets the name.", + "nullable": true + }, + "Type": { + "allOf": [ + { + "$ref": "#/components/schemas/DeviceProfileType" + } + ], + "description": "Gets or sets the type." + } + }, + "additionalProperties": false + }, + "DeviceProfileType": { + "enum": [ + "System", + "User" + ], + "type": "string" + }, + "DirectPlayProfile": { + "type": "object", + "properties": { + "Container": { + "type": "string", + "nullable": true + }, + "AudioCodec": { + "type": "string", + "nullable": true + }, + "VideoCodec": { + "type": "string", + "nullable": true + }, + "Type": { + "allOf": [ + { + "$ref": "#/components/schemas/DlnaProfileType" + } + ] + } + }, + "additionalProperties": false + }, + "DisplayPreferencesDto": { + "type": "object", + "properties": { + "Id": { + "type": "string", + "description": "Gets or sets the user id.", + "nullable": true + }, + "ViewType": { + "type": "string", + "description": "Gets or sets the type of the view.", + "nullable": true + }, + "SortBy": { + "type": "string", + "description": "Gets or sets the sort by.", + "nullable": true + }, + "IndexBy": { + "type": "string", + "description": "Gets or sets the index by.", + "nullable": true + }, + "RememberIndexing": { + "type": "boolean", + "description": "Gets or sets a value indicating whether [remember indexing]." + }, + "PrimaryImageHeight": { + "type": "integer", + "description": "Gets or sets the height of the primary image.", + "format": "int32" + }, + "PrimaryImageWidth": { + "type": "integer", + "description": "Gets or sets the width of the primary image.", + "format": "int32" + }, + "CustomPrefs": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "description": "Gets or sets the custom prefs." + }, + "ScrollDirection": { + "allOf": [ + { + "$ref": "#/components/schemas/ScrollDirection" + } + ], + "description": "Gets or sets the scroll direction." + }, + "ShowBackdrop": { + "type": "boolean", + "description": "Gets or sets a value indicating whether to show backdrops on this item." + }, + "RememberSorting": { + "type": "boolean", + "description": "Gets or sets a value indicating whether [remember sorting]." + }, + "SortOrder": { + "allOf": [ + { + "$ref": "#/components/schemas/SortOrder" + } + ], + "description": "Gets or sets the sort order." + }, + "ShowSidebar": { + "type": "boolean", + "description": "Gets or sets a value indicating whether [show sidebar]." + }, + "Client": { + "type": "string", + "description": "Gets or sets the client.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Defines the display preferences for any item that supports them (usually Folders)." + }, + "DlnaOptions": { + "type": "object", + "properties": { + "EnablePlayTo": { + "type": "boolean", + "description": "Gets or sets a value indicating whether gets or sets a value to indicate the status of the dlna playTo subsystem." + }, + "EnableServer": { + "type": "boolean", + "description": "Gets or sets a value indicating whether gets or sets a value to indicate the status of the dlna server subsystem." + }, + "EnableDebugLog": { + "type": "boolean", + "description": "Gets or sets a value indicating whether detailed dlna server logs are sent to the console/log.\r\nIf the setting \"Emby.Dlna\": \"Debug\" msut be set in logging.default.json for this property to work." + }, + "EnablePlayToTracing": { + "type": "boolean", + "description": "Gets or sets a value indicating whether whether detailed playTo debug logs are sent to the console/log.\r\nIf the setting \"Emby.Dlna.PlayTo\": \"Debug\" msut be set in logging.default.json for this property to work." + }, + "ClientDiscoveryIntervalSeconds": { + "type": "integer", + "description": "Gets or sets the ssdp client discovery interval time (in seconds).\r\nThis is the time after which the server will send a ssdp search request.", + "format": "int32" + }, + "AliveMessageIntervalSeconds": { + "type": "integer", + "description": "Gets or sets the frequency at which ssdp alive notifications are transmitted.", + "format": "int32" + }, + "BlastAliveMessageIntervalSeconds": { + "type": "integer", + "description": "Gets or sets the frequency at which ssdp alive notifications are transmitted. MIGRATING - TO BE REMOVED ONCE WEB HAS BEEN ALTERED.", + "format": "int32" + }, + "DefaultUserId": { + "type": "string", + "description": "Gets or sets the default user account that the dlna server uses.", + "nullable": true + }, + "AutoCreatePlayToProfiles": { + "type": "boolean", + "description": "Gets or sets a value indicating whether playTo device profiles should be created." + }, + "BlastAliveMessages": { + "type": "boolean", + "description": "Gets or sets a value indicating whether to blast alive messages." + }, + "SendOnlyMatchedHost": { + "type": "boolean", + "description": "gets or sets a value indicating whether to send only matched host." + } + }, + "additionalProperties": false, + "description": "The DlnaOptions class contains the user definable parameters for the dlna subsystems." + }, + "DlnaProfileType": { + "enum": [ + "Audio", + "Video", + "Photo", + "Subtitle" + ], + "type": "string" + }, + "DynamicDayOfWeek": { + "enum": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday", + "Everyday", + "Weekday", + "Weekend" + ], + "type": "string", + "description": "An enum that represents a day of the week, weekdays, weekends, or all days." + }, + "EmbeddedSubtitleOptions": { + "enum": [ + "AllowAll", + "AllowText", + "AllowImage", + "AllowNone" + ], + "type": "string", + "description": "An enum representing the options to disable embedded subs." + }, + "EncodingContext": { + "enum": [ + "Streaming", + "Static" + ], + "type": "string" + }, + "EncodingOptions": { + "type": "object", + "properties": { + "EncodingThreadCount": { + "type": "integer", + "format": "int32" + }, + "TranscodingTempPath": { + "type": "string", + "nullable": true + }, + "FallbackFontPath": { + "type": "string", + "nullable": true + }, + "EnableFallbackFont": { + "type": "boolean" + }, + "DownMixAudioBoost": { + "type": "number", + "format": "double" + }, + "MaxMuxingQueueSize": { + "type": "integer", + "format": "int32" + }, + "EnableThrottling": { + "type": "boolean" + }, + "ThrottleDelaySeconds": { + "type": "integer", + "format": "int32" + }, + "HardwareAccelerationType": { + "type": "string", + "nullable": true + }, + "EncoderAppPath": { + "type": "string", + "description": "Gets or sets the FFmpeg path as set by the user via the UI.", + "nullable": true + }, + "EncoderAppPathDisplay": { + "type": "string", + "description": "Gets or sets the current FFmpeg path being used by the system and displayed on the transcode page.", + "nullable": true + }, + "VaapiDevice": { + "type": "string", + "nullable": true + }, + "EnableTonemapping": { + "type": "boolean" + }, + "EnableVppTonemapping": { + "type": "boolean" + }, + "TonemappingAlgorithm": { + "type": "string", + "nullable": true + }, + "TonemappingRange": { + "type": "string", + "nullable": true + }, + "TonemappingDesat": { + "type": "number", + "format": "double" + }, + "TonemappingThreshold": { + "type": "number", + "format": "double" + }, + "TonemappingPeak": { + "type": "number", + "format": "double" + }, + "TonemappingParam": { + "type": "number", + "format": "double" + }, + "VppTonemappingBrightness": { + "type": "number", + "format": "double" + }, + "VppTonemappingContrast": { + "type": "number", + "format": "double" + }, + "H264Crf": { + "type": "integer", + "format": "int32" + }, + "H265Crf": { + "type": "integer", + "format": "int32" + }, + "EncoderPreset": { + "type": "string", + "nullable": true + }, + "DeinterlaceDoubleRate": { + "type": "boolean" + }, + "DeinterlaceMethod": { + "type": "string", + "nullable": true + }, + "EnableDecodingColorDepth10Hevc": { + "type": "boolean" + }, + "EnableDecodingColorDepth10Vp9": { + "type": "boolean" + }, + "EnableEnhancedNvdecDecoder": { + "type": "boolean" + }, + "PreferSystemNativeHwDecoder": { + "type": "boolean" + }, + "EnableIntelLowPowerH264HwEncoder": { + "type": "boolean" + }, + "EnableIntelLowPowerHevcHwEncoder": { + "type": "boolean" + }, + "EnableHardwareEncoding": { + "type": "boolean" + }, + "AllowHevcEncoding": { + "type": "boolean" + }, + "EnableSubtitleExtraction": { + "type": "boolean" + }, + "HardwareDecodingCodecs": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "AllowOnDemandMetadataBasedKeyframeExtractionForExtensions": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "EndPointInfo": { + "type": "object", + "properties": { + "IsLocal": { + "type": "boolean" + }, + "IsInNetwork": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "ExternalIdInfo": { + "type": "object", + "properties": { + "Name": { + "type": "string", + "description": "Gets or sets the display name of the external id provider (IE: IMDB, MusicBrainz, etc)." + }, + "Key": { + "type": "string", + "description": "Gets or sets the unique key for this id. This key should be unique across all providers." + }, + "Type": { + "allOf": [ + { + "$ref": "#/components/schemas/ExternalIdMediaType" + } + ], + "description": "Gets or sets the specific media type for this id. This is used to distinguish between the different\r\nexternal id types for providers with multiple ids.\r\nA null value indicates there is no specific media type associated with the external id, or this is the\r\ndefault id for the external provider so there is no need to specify a type.", + "nullable": true + }, + "UrlFormatString": { + "type": "string", + "description": "Gets or sets the URL format string.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Represents the external id information for serialization to the client." + }, + "ExternalIdMediaType": { + "enum": [ + "Album", + "AlbumArtist", + "Artist", + "BoxSet", + "Episode", + "Movie", + "OtherArtist", + "Person", + "ReleaseGroup", + "Season", + "Series", + "Track" + ], + "type": "string", + "description": "The specific media type of an MediaBrowser.Model.Providers.ExternalIdInfo." + }, + "ExternalUrl": { + "type": "object", + "properties": { + "Name": { + "type": "string", + "description": "Gets or sets the name.", + "nullable": true + }, + "Url": { + "type": "string", + "description": "Gets or sets the type of the item.", + "nullable": true + } + }, + "additionalProperties": false + }, + "FFmpegLocation": { + "enum": [ + "NotFound", + "SetByArgument", + "Custom", + "System" + ], + "type": "string", + "description": "Enum describing the location of the FFmpeg tool." + }, + "FileSystemEntryInfo": { + "type": "object", + "properties": { + "Name": { + "type": "string", + "description": "Gets the name." + }, + "Path": { + "type": "string", + "description": "Gets the path." + }, + "Type": { + "allOf": [ + { + "$ref": "#/components/schemas/FileSystemEntryType" + } + ], + "description": "Gets the type." + } + }, + "additionalProperties": false, + "description": "Class FileSystemEntryInfo." + }, + "FileSystemEntryType": { + "enum": [ + "File", + "Directory", + "NetworkComputer", + "NetworkShare" + ], + "type": "string", + "description": "Enum FileSystemEntryType." + }, + "FontFile": { + "type": "object", + "properties": { + "Name": { + "type": "string", + "description": "Gets or sets the name.", + "nullable": true + }, + "Size": { + "type": "integer", + "description": "Gets or sets the size.", + "format": "int64" + }, + "DateCreated": { + "type": "string", + "description": "Gets or sets the date created.", + "format": "date-time" + }, + "DateModified": { + "type": "string", + "description": "Gets or sets the date modified.", + "format": "date-time" + } + }, + "additionalProperties": false, + "description": "Class FontFile." + }, + "ForgotPasswordAction": { + "enum": [ + "ContactAdmin", + "PinCode", + "InNetworkRequired" + ], + "type": "string" + }, + "ForgotPasswordDto": { + "required": [ + "EnteredUsername" + ], + "type": "object", + "properties": { + "EnteredUsername": { + "type": "string", + "description": "Gets or sets the entered username to have its password reset." + } + }, + "additionalProperties": false, + "description": "Forgot Password request body DTO." + }, + "ForgotPasswordPinDto": { + "required": [ + "Pin" + ], + "type": "object", + "properties": { + "Pin": { + "type": "string", + "description": "Gets or sets the entered pin to have the password reset." + } + }, + "additionalProperties": false, + "description": "Forgot Password Pin enter request body DTO." + }, + "ForgotPasswordResult": { + "type": "object", + "properties": { + "Action": { + "allOf": [ + { + "$ref": "#/components/schemas/ForgotPasswordAction" + } + ], + "description": "Gets or sets the action." + }, + "PinFile": { + "type": "string", + "description": "Gets or sets the pin file.", + "nullable": true + }, + "PinExpirationDate": { + "type": "string", + "description": "Gets or sets the pin expiration date.", + "format": "date-time", + "nullable": true + } + }, + "additionalProperties": false + }, + "GeneralCommand": { + "type": "object", + "properties": { + "Name": { + "allOf": [ + { + "$ref": "#/components/schemas/GeneralCommandType" + } + ], + "description": "This exists simply to identify a set of known commands." + }, + "ControllingUserId": { + "type": "string", + "format": "uuid" + }, + "Arguments": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + } + } + }, + "additionalProperties": false + }, + "GeneralCommandType": { + "enum": [ + "MoveUp", + "MoveDown", + "MoveLeft", + "MoveRight", + "PageUp", + "PageDown", + "PreviousLetter", + "NextLetter", + "ToggleOsd", + "ToggleContextMenu", + "Select", + "Back", + "TakeScreenshot", + "SendKey", + "SendString", + "GoHome", + "GoToSettings", + "VolumeUp", + "VolumeDown", + "Mute", + "Unmute", + "ToggleMute", + "SetVolume", + "SetAudioStreamIndex", + "SetSubtitleStreamIndex", + "ToggleFullscreen", + "DisplayContent", + "GoToSearch", + "DisplayMessage", + "SetRepeatMode", + "ChannelUp", + "ChannelDown", + "Guide", + "ToggleStats", + "PlayMediaSource", + "PlayTrailers", + "SetShuffleQueue", + "PlayState", + "PlayNext", + "ToggleOsdMenu", + "Play", + "SetMaxStreamingBitrate" + ], + "type": "string", + "description": "This exists simply to identify a set of known commands." + }, + "GetProgramsDto": { + "type": "object", + "properties": { + "ChannelIds": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "description": "Gets or sets the channels to return guide information for." + }, + "UserId": { + "type": "string", + "description": "Gets or sets optional. Filter by user id.", + "format": "uuid" + }, + "MinStartDate": { + "type": "string", + "description": "Gets or sets the minimum premiere start date.\r\nOptional.", + "format": "date-time", + "nullable": true + }, + "HasAired": { + "type": "boolean", + "description": "Gets or sets filter by programs that have completed airing, or not.\r\nOptional.", + "nullable": true + }, + "IsAiring": { + "type": "boolean", + "description": "Gets or sets filter by programs that are currently airing, or not.\r\nOptional.", + "nullable": true + }, + "MaxStartDate": { + "type": "string", + "description": "Gets or sets the maximum premiere start date.\r\nOptional.", + "format": "date-time", + "nullable": true + }, + "MinEndDate": { + "type": "string", + "description": "Gets or sets the minimum premiere end date.\r\nOptional.", + "format": "date-time", + "nullable": true + }, + "MaxEndDate": { + "type": "string", + "description": "Gets or sets the maximum premiere end date.\r\nOptional.", + "format": "date-time", + "nullable": true + }, + "IsMovie": { + "type": "boolean", + "description": "Gets or sets filter for movies.\r\nOptional.", + "nullable": true + }, + "IsSeries": { + "type": "boolean", + "description": "Gets or sets filter for series.\r\nOptional.", + "nullable": true + }, + "IsNews": { + "type": "boolean", + "description": "Gets or sets filter for news.\r\nOptional.", + "nullable": true + }, + "IsKids": { + "type": "boolean", + "description": "Gets or sets filter for kids.\r\nOptional.", + "nullable": true + }, + "IsSports": { + "type": "boolean", + "description": "Gets or sets filter for sports.\r\nOptional.", + "nullable": true + }, + "StartIndex": { + "type": "integer", + "description": "Gets or sets the record index to start at. All items with a lower index will be dropped from the results.\r\nOptional.", + "format": "int32", + "nullable": true + }, + "Limit": { + "type": "integer", + "description": "Gets or sets the maximum number of records to return.\r\nOptional.", + "format": "int32", + "nullable": true + }, + "SortBy": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Gets or sets specify one or more sort orders, comma delimited. Options: Name, StartDate.\r\nOptional." + }, + "SortOrder": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SortOrder" + }, + "description": "Gets or sets sort Order - Ascending,Descending." + }, + "Genres": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Gets or sets the genres to return guide information for." + }, + "GenreIds": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "description": "Gets or sets the genre ids to return guide information for." + }, + "EnableImages": { + "type": "boolean", + "description": "Gets or sets include image information in output.\r\nOptional.", + "nullable": true + }, + "EnableTotalRecordCount": { + "type": "boolean", + "description": "Gets or sets a value indicating whether retrieve total record count." + }, + "ImageTypeLimit": { + "type": "integer", + "description": "Gets or sets the max number of images to return, per image type.\r\nOptional.", + "format": "int32", + "nullable": true + }, + "EnableImageTypes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ImageType" + }, + "description": "Gets or sets the image types to include in the output.\r\nOptional." + }, + "EnableUserData": { + "type": "boolean", + "description": "Gets or sets include user data.\r\nOptional.", + "nullable": true + }, + "SeriesTimerId": { + "type": "string", + "description": "Gets or sets filter by series timer id.\r\nOptional.", + "nullable": true + }, + "LibrarySeriesId": { + "type": "string", + "description": "Gets or sets filter by library series id.\r\nOptional.", + "format": "uuid" + }, + "Fields": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ItemFields" + }, + "description": "Gets or sets specify additional fields of information to return in the output. This allows multiple, comma delimited. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines.\r\nOptional." + } + }, + "additionalProperties": false, + "description": "Get programs dto." + }, + "GroupInfoDto": { + "type": "object", + "properties": { + "GroupId": { + "type": "string", + "description": "Gets the group identifier.", + "format": "uuid" + }, + "GroupName": { + "type": "string", + "description": "Gets the group name." + }, + "State": { + "allOf": [ + { + "$ref": "#/components/schemas/GroupStateType" + } + ], + "description": "Gets the group state." + }, + "Participants": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Gets the participants." + }, + "LastUpdatedAt": { + "type": "string", + "description": "Gets the date when this DTO has been created.", + "format": "date-time" + } + }, + "additionalProperties": false, + "description": "Class GroupInfoDto." + }, + "GroupQueueMode": { + "enum": [ + "Queue", + "QueueNext" + ], + "type": "string", + "description": "Enum GroupQueueMode." + }, + "GroupRepeatMode": { + "enum": [ + "RepeatOne", + "RepeatAll", + "RepeatNone" + ], + "type": "string", + "description": "Enum GroupRepeatMode." + }, + "GroupShuffleMode": { + "enum": [ + "Sorted", + "Shuffle" + ], + "type": "string", + "description": "Enum GroupShuffleMode." + }, + "GroupStateType": { + "enum": [ + "Idle", + "Waiting", + "Paused", + "Playing" + ], + "type": "string", + "description": "Enum GroupState." + }, + "GroupUpdateType": { + "enum": [ + "UserJoined", + "UserLeft", + "GroupJoined", + "GroupLeft", + "StateUpdate", + "PlayQueue", + "NotInGroup", + "GroupDoesNotExist", + "CreateGroupDenied", + "JoinGroupDenied", + "LibraryAccessDenied" + ], + "type": "string", + "description": "Enum GroupUpdateType." + }, + "GuideInfo": { + "type": "object", + "properties": { + "StartDate": { + "type": "string", + "description": "Gets or sets the start date.", + "format": "date-time" + }, + "EndDate": { + "type": "string", + "description": "Gets or sets the end date.", + "format": "date-time" + } + }, + "additionalProperties": false + }, + "HardwareEncodingType": { + "enum": [ + "AMF", + "QSV", + "NVENC", + "V4L2M2M", + "VAAPI", + "VideoToolBox" + ], + "type": "string", + "description": "Enum HardwareEncodingType." + }, + "HeaderMatchType": { + "enum": [ + "Equals", + "Regex", + "Substring" + ], + "type": "string" + }, + "HttpHeaderInfo": { + "type": "object", + "properties": { + "Name": { + "type": "string", + "nullable": true + }, + "Value": { + "type": "string", + "nullable": true + }, + "Match": { + "allOf": [ + { + "$ref": "#/components/schemas/HeaderMatchType" + } + ] + } + }, + "additionalProperties": false + }, + "IgnoreWaitRequestDto": { + "type": "object", + "properties": { + "IgnoreWait": { + "type": "boolean", + "description": "Gets or sets a value indicating whether the client should be ignored." + } + }, + "additionalProperties": false, + "description": "Class IgnoreWaitRequestDto." + }, + "ImageByNameInfo": { + "type": "object", + "properties": { + "Name": { + "type": "string", + "description": "Gets or sets the name.", + "nullable": true + }, + "Theme": { + "type": "string", + "description": "Gets or sets the theme.", + "nullable": true + }, + "Context": { + "type": "string", + "description": "Gets or sets the context.", + "nullable": true + }, + "FileLength": { + "type": "integer", + "description": "Gets or sets the length of the file.", + "format": "int64" + }, + "Format": { + "type": "string", + "description": "Gets or sets the format.", + "nullable": true + } + }, + "additionalProperties": false + }, + "ImageFormat": { + "enum": [ + "Bmp", + "Gif", + "Jpg", + "Png", + "Webp" + ], + "type": "string", + "description": "Enum ImageOutputFormat." + }, + "ImageInfo": { + "type": "object", + "properties": { + "ImageType": { + "allOf": [ + { + "$ref": "#/components/schemas/ImageType" + } + ], + "description": "Gets or sets the type of the image." + }, + "ImageIndex": { + "type": "integer", + "description": "Gets or sets the index of the image.", + "format": "int32", + "nullable": true + }, + "ImageTag": { + "type": "string", + "description": "Gets or sets the image tag.", + "nullable": true + }, + "Path": { + "type": "string", + "description": "Gets or sets the path.", + "nullable": true + }, + "BlurHash": { + "type": "string", + "description": "Gets or sets the blurhash.", + "nullable": true + }, + "Height": { + "type": "integer", + "description": "Gets or sets the height.", + "format": "int32", + "nullable": true + }, + "Width": { + "type": "integer", + "description": "Gets or sets the width.", + "format": "int32", + "nullable": true + }, + "Size": { + "type": "integer", + "description": "Gets or sets the size.", + "format": "int64" + } + }, + "additionalProperties": false, + "description": "Class ImageInfo." + }, + "ImageOption": { + "type": "object", + "properties": { + "Type": { + "allOf": [ + { + "$ref": "#/components/schemas/ImageType" + } + ], + "description": "Gets or sets the type." + }, + "Limit": { + "type": "integer", + "description": "Gets or sets the limit.", + "format": "int32" + }, + "MinWidth": { + "type": "integer", + "description": "Gets or sets the minimum width.", + "format": "int32" + } + }, + "additionalProperties": false + }, + "ImageOrientation": { + "enum": [ + "TopLeft", + "TopRight", + "BottomRight", + "BottomLeft", + "LeftTop", + "RightTop", + "RightBottom", + "LeftBottom" + ], + "type": "string" + }, + "ImageProviderInfo": { + "type": "object", + "properties": { + "Name": { + "type": "string", + "description": "Gets the name." + }, + "SupportedImages": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ImageType" + }, + "description": "Gets the supported image types." + } + }, + "additionalProperties": false, + "description": "Class ImageProviderInfo." + }, + "ImageSavingConvention": { + "enum": [ + "Legacy", + "Compatible" + ], + "type": "string" + }, + "ImageType": { + "enum": [ + "Primary", + "Art", + "Backdrop", + "Banner", + "Logo", + "Thumb", + "Disc", + "Box", + "Screenshot", + "Menu", + "Chapter", + "BoxRear", + "Profile" + ], + "type": "string", + "description": "Enum ImageType." + }, + "InstallationInfo": { + "type": "object", + "properties": { + "Guid": { + "type": "string", + "description": "Gets or sets the Id.", + "format": "uuid" + }, + "Name": { + "type": "string", + "description": "Gets or sets the name.", + "nullable": true + }, + "Version": { + "type": "string", + "description": "Gets or sets the version.", + "nullable": true + }, + "Changelog": { + "type": "string", + "description": "Gets or sets the changelog for this version.", + "nullable": true + }, + "SourceUrl": { + "type": "string", + "description": "Gets or sets the source URL.", + "nullable": true + }, + "Checksum": { + "type": "string", + "description": "Gets or sets a checksum for the binary.", + "nullable": true + }, + "PackageInfo": { + "allOf": [ + { + "$ref": "#/components/schemas/PackageInfo" + } + ], + "description": "Gets or sets package information for the installation.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Class InstallationInfo." + }, + "IPlugin": { + "type": "object", + "properties": { + "Name": { + "type": "string", + "description": "Gets the name of the plugin.", + "nullable": true, + "readOnly": true + }, + "Description": { + "type": "string", + "description": "Gets the Description.", + "nullable": true, + "readOnly": true + }, + "Id": { + "type": "string", + "description": "Gets the unique id.", + "format": "uuid", + "readOnly": true + }, + "Version": { + "type": "string", + "description": "Gets the plugin version.", + "nullable": true, + "readOnly": true + }, + "AssemblyFilePath": { + "type": "string", + "description": "Gets the path to the assembly file.", + "nullable": true, + "readOnly": true + }, + "CanUninstall": { + "type": "boolean", + "description": "Gets a value indicating whether the plugin can be uninstalled.", + "readOnly": true + }, + "DataFolderPath": { + "type": "string", + "description": "Gets the full path to the data folder, where the plugin can store any miscellaneous files needed.", + "nullable": true, + "readOnly": true + } + }, + "additionalProperties": false, + "description": "Defines the MediaBrowser.Common.Plugins.IPlugin." + }, + "IsoType": { + "enum": [ + "Dvd", + "BluRay" + ], + "type": "string", + "description": "Enum IsoType." + }, + "ItemCounts": { + "type": "object", + "properties": { + "MovieCount": { + "type": "integer", + "description": "Gets or sets the movie count.", + "format": "int32" + }, + "SeriesCount": { + "type": "integer", + "description": "Gets or sets the series count.", + "format": "int32" + }, + "EpisodeCount": { + "type": "integer", + "description": "Gets or sets the episode count.", + "format": "int32" + }, + "ArtistCount": { + "type": "integer", + "description": "Gets or sets the artist count.", + "format": "int32" + }, + "ProgramCount": { + "type": "integer", + "description": "Gets or sets the program count.", + "format": "int32" + }, + "TrailerCount": { + "type": "integer", + "description": "Gets or sets the trailer count.", + "format": "int32" + }, + "SongCount": { + "type": "integer", + "description": "Gets or sets the song count.", + "format": "int32" + }, + "AlbumCount": { + "type": "integer", + "description": "Gets or sets the album count.", + "format": "int32" + }, + "MusicVideoCount": { + "type": "integer", + "description": "Gets or sets the music video count.", + "format": "int32" + }, + "BoxSetCount": { + "type": "integer", + "description": "Gets or sets the box set count.", + "format": "int32" + }, + "BookCount": { + "type": "integer", + "description": "Gets or sets the book count.", + "format": "int32" + }, + "ItemCount": { + "type": "integer", + "description": "Gets or sets the item count.", + "format": "int32" + } + }, + "additionalProperties": false, + "description": "Class LibrarySummary." + }, + "ItemFields": { + "enum": [ + "AirTime", + "CanDelete", + "CanDownload", + "ChannelInfo", + "Chapters", + "ChildCount", + "CumulativeRunTimeTicks", + "CustomRating", + "DateCreated", + "DateLastMediaAdded", + "DisplayPreferencesId", + "Etag", + "ExternalUrls", + "Genres", + "HomePageUrl", + "ItemCounts", + "MediaSourceCount", + "MediaSources", + "OriginalTitle", + "Overview", + "ParentId", + "Path", + "People", + "PlayAccess", + "ProductionLocations", + "ProviderIds", + "PrimaryImageAspectRatio", + "RecursiveItemCount", + "Settings", + "ScreenshotImageTags", + "SeriesPrimaryImage", + "SeriesStudio", + "SortName", + "SpecialEpisodeNumbers", + "Studios", + "BasicSyncInfo", + "SyncInfo", + "Taglines", + "Tags", + "RemoteTrailers", + "MediaStreams", + "SeasonUserData", + "ServiceName", + "ThemeSongIds", + "ThemeVideoIds", + "ExternalEtag", + "PresentationUniqueKey", + "InheritedParentalRatingValue", + "ExternalSeriesId", + "SeriesPresentationUniqueKey", + "DateLastRefreshed", + "DateLastSaved", + "RefreshState", + "ChannelImage", + "EnableMediaSourceDisplay", + "Width", + "Height", + "ExtraIds", + "LocalTrailerCount", + "IsHD", + "SpecialFeatureCount" + ], + "type": "string", + "description": "Used to control the data that gets attached to DtoBaseItems." + }, + "ItemFilter": { + "enum": [ + "IsFolder", + "IsNotFolder", + "IsUnplayed", + "IsPlayed", + "IsFavorite", + "IsResumable", + "Likes", + "Dislikes", + "IsFavoriteOrLikes" + ], + "type": "string", + "description": "Enum ItemFilter." + }, + "JoinGroupRequestDto": { + "type": "object", + "properties": { + "GroupId": { + "type": "string", + "description": "Gets or sets the group identifier.", + "format": "uuid" + } + }, + "additionalProperties": false, + "description": "Class JoinGroupRequestDto." + }, + "KeepUntil": { + "enum": [ + "UntilDeleted", + "UntilSpaceNeeded", + "UntilWatched", + "UntilDate" + ], + "type": "string" + }, + "LibraryOptionInfoDto": { + "type": "object", + "properties": { + "Name": { + "type": "string", + "description": "Gets or sets name.", + "nullable": true + }, + "DefaultEnabled": { + "type": "boolean", + "description": "Gets or sets a value indicating whether default enabled." + } + }, + "additionalProperties": false, + "description": "Library option info dto." + }, + "LibraryOptions": { + "type": "object", + "properties": { + "EnablePhotos": { + "type": "boolean" + }, + "EnableRealtimeMonitor": { + "type": "boolean" + }, + "EnableChapterImageExtraction": { + "type": "boolean" + }, + "ExtractChapterImagesDuringLibraryScan": { + "type": "boolean" + }, + "PathInfos": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MediaPathInfo" + } + }, + "SaveLocalMetadata": { + "type": "boolean" + }, + "EnableInternetProviders": { + "type": "boolean", + "deprecated": true + }, + "EnableAutomaticSeriesGrouping": { + "type": "boolean" + }, + "EnableEmbeddedTitles": { + "type": "boolean" + }, + "EnableEmbeddedEpisodeInfos": { + "type": "boolean" + }, + "AutomaticRefreshIntervalDays": { + "type": "integer", + "format": "int32" + }, + "PreferredMetadataLanguage": { + "type": "string", + "description": "Gets or sets the preferred metadata language.", + "nullable": true + }, + "MetadataCountryCode": { + "type": "string", + "description": "Gets or sets the metadata country code.", + "nullable": true + }, + "SeasonZeroDisplayName": { + "type": "string" + }, + "MetadataSavers": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "DisabledLocalMetadataReaders": { + "type": "array", + "items": { + "type": "string" + } + }, + "LocalMetadataReaderOrder": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "DisabledSubtitleFetchers": { + "type": "array", + "items": { + "type": "string" + } + }, + "SubtitleFetcherOrder": { + "type": "array", + "items": { + "type": "string" + } + }, + "SkipSubtitlesIfEmbeddedSubtitlesPresent": { + "type": "boolean" + }, + "SkipSubtitlesIfAudioTrackMatches": { + "type": "boolean" + }, + "SubtitleDownloadLanguages": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "RequirePerfectSubtitleMatch": { + "type": "boolean" + }, + "SaveSubtitlesWithMedia": { + "type": "boolean" + }, + "AutomaticallyAddToCollection": { + "type": "boolean" + }, + "AllowEmbeddedSubtitles": { + "allOf": [ + { + "$ref": "#/components/schemas/EmbeddedSubtitleOptions" + } + ], + "description": "An enum representing the options to disable embedded subs." + }, + "TypeOptions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TypeOptions" + } + } + }, + "additionalProperties": false + }, + "LibraryOptionsResultDto": { + "type": "object", + "properties": { + "MetadataSavers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LibraryOptionInfoDto" + }, + "description": "Gets or sets the metadata savers." + }, + "MetadataReaders": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LibraryOptionInfoDto" + }, + "description": "Gets or sets the metadata readers." + }, + "SubtitleFetchers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LibraryOptionInfoDto" + }, + "description": "Gets or sets the subtitle fetchers." + }, + "TypeOptions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LibraryTypeOptionsDto" + }, + "description": "Gets or sets the type options." + } + }, + "additionalProperties": false, + "description": "Library options result dto." + }, + "LibraryTypeOptionsDto": { + "type": "object", + "properties": { + "Type": { + "type": "string", + "description": "Gets or sets the type.", + "nullable": true + }, + "MetadataFetchers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LibraryOptionInfoDto" + }, + "description": "Gets or sets the metadata fetchers." + }, + "ImageFetchers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LibraryOptionInfoDto" + }, + "description": "Gets or sets the image fetchers." + }, + "SupportedImageTypes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ImageType" + }, + "description": "Gets or sets the supported image types." + }, + "DefaultImageOptions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ImageOption" + }, + "description": "Gets or sets the default image options." + } + }, + "additionalProperties": false, + "description": "Library type options dto." + }, + "LibraryUpdateInfo": { + "type": "object", + "properties": { + "FoldersAddedTo": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Gets or sets the folders added to." + }, + "FoldersRemovedFrom": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Gets or sets the folders removed from." + }, + "ItemsAdded": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Gets or sets the items added." + }, + "ItemsRemoved": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Gets or sets the items removed." + }, + "ItemsUpdated": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Gets or sets the items updated." + }, + "CollectionFolders": { + "type": "array", + "items": { + "type": "string" + } + }, + "IsEmpty": { + "type": "boolean", + "readOnly": true + } + }, + "additionalProperties": false, + "description": "Class LibraryUpdateInfo." + }, + "ListingsProviderInfo": { + "type": "object", + "properties": { + "Id": { + "type": "string", + "nullable": true + }, + "Type": { + "type": "string", + "nullable": true + }, + "Username": { + "type": "string", + "nullable": true + }, + "Password": { + "type": "string", + "nullable": true + }, + "ListingsId": { + "type": "string", + "nullable": true + }, + "ZipCode": { + "type": "string", + "nullable": true + }, + "Country": { + "type": "string", + "nullable": true + }, + "Path": { + "type": "string", + "nullable": true + }, + "EnabledTuners": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "EnableAllTuners": { + "type": "boolean" + }, + "NewsCategories": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "SportsCategories": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "KidsCategories": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "MovieCategories": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "ChannelMappings": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NameValuePair" + }, + "nullable": true + }, + "MoviePrefix": { + "type": "string", + "nullable": true + }, + "PreferredLanguage": { + "type": "string", + "nullable": true + }, + "UserAgent": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "LiveStreamResponse": { + "type": "object", + "properties": { + "MediaSource": { + "allOf": [ + { + "$ref": "#/components/schemas/MediaSourceInfo" + } + ] + } + }, + "additionalProperties": false + }, + "LiveTvInfo": { + "type": "object", + "properties": { + "Services": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LiveTvServiceInfo" + }, + "description": "Gets or sets the services." + }, + "IsEnabled": { + "type": "boolean", + "description": "Gets or sets a value indicating whether this instance is enabled." + }, + "EnabledUsers": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Gets or sets the enabled users." + } + }, + "additionalProperties": false + }, + "LiveTvOptions": { + "type": "object", + "properties": { + "GuideDays": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "RecordingPath": { + "type": "string", + "nullable": true + }, + "MovieRecordingPath": { + "type": "string", + "nullable": true + }, + "SeriesRecordingPath": { + "type": "string", + "nullable": true + }, + "EnableRecordingSubfolders": { + "type": "boolean" + }, + "EnableOriginalAudioWithEncodedRecordings": { + "type": "boolean" + }, + "TunerHosts": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TunerHostInfo" + }, + "nullable": true + }, + "ListingProviders": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ListingsProviderInfo" + }, + "nullable": true + }, + "PrePaddingSeconds": { + "type": "integer", + "format": "int32" + }, + "PostPaddingSeconds": { + "type": "integer", + "format": "int32" + }, + "MediaLocationsCreated": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "RecordingPostProcessor": { + "type": "string", + "nullable": true + }, + "RecordingPostProcessorArguments": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "LiveTvServiceInfo": { + "type": "object", + "properties": { + "Name": { + "type": "string", + "description": "Gets or sets the name.", + "nullable": true + }, + "HomePageUrl": { + "type": "string", + "description": "Gets or sets the home page URL.", + "nullable": true + }, + "Status": { + "allOf": [ + { + "$ref": "#/components/schemas/LiveTvServiceStatus" + } + ], + "description": "Gets or sets the status." + }, + "StatusMessage": { + "type": "string", + "description": "Gets or sets the status message.", + "nullable": true + }, + "Version": { + "type": "string", + "description": "Gets or sets the version.", + "nullable": true + }, + "HasUpdateAvailable": { + "type": "boolean", + "description": "Gets or sets a value indicating whether this instance has update available." + }, + "IsVisible": { + "type": "boolean", + "description": "Gets or sets a value indicating whether this instance is visible." + }, + "Tuners": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + } + }, + "additionalProperties": false, + "description": "Class ServiceInfo." + }, + "LiveTvServiceStatus": { + "enum": [ + "Ok", + "Unavailable" + ], + "type": "string" + }, + "LocalizationOption": { + "type": "object", + "properties": { + "Name": { + "type": "string", + "nullable": true + }, + "Value": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "LocationType": { + "enum": [ + "FileSystem", + "Remote", + "Virtual", + "Offline" + ], + "type": "string", + "description": "Enum LocationType." + }, + "LogFile": { + "type": "object", + "properties": { + "DateCreated": { + "type": "string", + "description": "Gets or sets the date created.", + "format": "date-time" + }, + "DateModified": { + "type": "string", + "description": "Gets or sets the date modified.", + "format": "date-time" + }, + "Size": { + "type": "integer", + "description": "Gets or sets the size.", + "format": "int64" + }, + "Name": { + "type": "string", + "description": "Gets or sets the name.", + "nullable": true + } + }, + "additionalProperties": false + }, + "LogLevel": { + "enum": [ + "Trace", + "Debug", + "Information", + "Warning", + "Error", + "Critical", + "None" + ], + "type": "string" + }, + "MediaAttachment": { + "type": "object", + "properties": { + "Codec": { + "type": "string", + "description": "Gets or sets the codec.", + "nullable": true + }, + "CodecTag": { + "type": "string", + "description": "Gets or sets the codec tag.", + "nullable": true + }, + "Comment": { + "type": "string", + "description": "Gets or sets the comment.", + "nullable": true + }, + "Index": { + "type": "integer", + "description": "Gets or sets the index.", + "format": "int32" + }, + "FileName": { + "type": "string", + "description": "Gets or sets the filename.", + "nullable": true + }, + "MimeType": { + "type": "string", + "description": "Gets or sets the MIME type.", + "nullable": true + }, + "DeliveryUrl": { + "type": "string", + "description": "Gets or sets the delivery URL.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Class MediaAttachment." + }, + "MediaEncoderPathDto": { + "type": "object", + "properties": { + "Path": { + "type": "string", + "description": "Gets or sets media encoder path." + }, + "PathType": { + "type": "string", + "description": "Gets or sets media encoder path type." + } + }, + "additionalProperties": false, + "description": "Media Encoder Path Dto." + }, + "MediaPathDto": { + "required": [ + "Name" + ], + "type": "object", + "properties": { + "Name": { + "type": "string", + "description": "Gets or sets the name of the library." + }, + "Path": { + "type": "string", + "description": "Gets or sets the path to add.", + "nullable": true + }, + "PathInfo": { + "allOf": [ + { + "$ref": "#/components/schemas/MediaPathInfo" + } + ], + "description": "Gets or sets the path info.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Media Path dto." + }, + "MediaPathInfo": { + "type": "object", + "properties": { + "Path": { + "type": "string" + }, + "NetworkPath": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "MediaProtocol": { + "enum": [ + "File", + "Http", + "Rtmp", + "Rtsp", + "Udp", + "Rtp", + "Ftp" + ], + "type": "string" + }, + "MediaSourceInfo": { + "type": "object", + "properties": { + "Protocol": { + "allOf": [ + { + "$ref": "#/components/schemas/MediaProtocol" + } + ] + }, + "Id": { + "type": "string", + "nullable": true + }, + "Path": { + "type": "string", + "nullable": true + }, + "EncoderPath": { + "type": "string", + "nullable": true + }, + "EncoderProtocol": { + "allOf": [ + { + "$ref": "#/components/schemas/MediaProtocol" + } + ], + "nullable": true + }, + "Type": { + "allOf": [ + { + "$ref": "#/components/schemas/MediaSourceType" + } + ] + }, + "Container": { + "type": "string", + "nullable": true + }, + "Size": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "Name": { + "type": "string", + "nullable": true + }, + "IsRemote": { + "type": "boolean", + "description": "Gets or sets a value indicating whether the media is remote.\r\nDifferentiate internet url vs local network." + }, + "ETag": { + "type": "string", + "nullable": true + }, + "RunTimeTicks": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "ReadAtNativeFramerate": { + "type": "boolean" + }, + "IgnoreDts": { + "type": "boolean" + }, + "IgnoreIndex": { + "type": "boolean" + }, + "GenPtsInput": { + "type": "boolean" + }, + "SupportsTranscoding": { + "type": "boolean" + }, + "SupportsDirectStream": { + "type": "boolean" + }, + "SupportsDirectPlay": { + "type": "boolean" + }, + "IsInfiniteStream": { + "type": "boolean" + }, + "RequiresOpening": { + "type": "boolean" + }, + "OpenToken": { + "type": "string", + "nullable": true + }, + "RequiresClosing": { + "type": "boolean" + }, + "LiveStreamId": { + "type": "string", + "nullable": true + }, + "BufferMs": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "RequiresLooping": { + "type": "boolean" + }, + "SupportsProbing": { + "type": "boolean" + }, + "VideoType": { + "allOf": [ + { + "$ref": "#/components/schemas/VideoType" + } + ], + "nullable": true + }, + "IsoType": { + "allOf": [ + { + "$ref": "#/components/schemas/IsoType" + } + ], + "nullable": true + }, + "Video3DFormat": { + "allOf": [ + { + "$ref": "#/components/schemas/Video3DFormat" + } + ], + "nullable": true + }, + "MediaStreams": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MediaStream" + }, + "nullable": true + }, + "MediaAttachments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MediaAttachment" + }, + "nullable": true + }, + "Formats": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "Bitrate": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "Timestamp": { + "allOf": [ + { + "$ref": "#/components/schemas/TransportStreamTimestamp" + } + ], + "nullable": true + }, + "RequiredHttpHeaders": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "nullable": true + }, + "TranscodingUrl": { + "type": "string", + "nullable": true + }, + "TranscodingSubProtocol": { + "type": "string", + "nullable": true + }, + "TranscodingContainer": { + "type": "string", + "nullable": true + }, + "AnalyzeDurationMs": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "DefaultAudioStreamIndex": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "DefaultSubtitleStreamIndex": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + "additionalProperties": false + }, + "MediaSourceType": { + "enum": [ + "Default", + "Grouping", + "Placeholder" + ], + "type": "string" + }, + "MediaStream": { + "type": "object", + "properties": { + "Codec": { + "type": "string", + "description": "Gets or sets the codec.", + "nullable": true + }, + "CodecTag": { + "type": "string", + "description": "Gets or sets the codec tag.", + "nullable": true + }, + "Language": { + "type": "string", + "description": "Gets or sets the language.", + "nullable": true + }, + "ColorRange": { + "type": "string", + "description": "Gets or sets the color range.", + "nullable": true + }, + "ColorSpace": { + "type": "string", + "description": "Gets or sets the color space.", + "nullable": true + }, + "ColorTransfer": { + "type": "string", + "description": "Gets or sets the color transfer.", + "nullable": true + }, + "ColorPrimaries": { + "type": "string", + "description": "Gets or sets the color primaries.", + "nullable": true + }, + "DvVersionMajor": { + "type": "integer", + "description": "Gets or sets the Dolby Vision version major.", + "format": "int32", + "nullable": true + }, + "DvVersionMinor": { + "type": "integer", + "description": "Gets or sets the Dolby Vision version minor.", + "format": "int32", + "nullable": true + }, + "DvProfile": { + "type": "integer", + "description": "Gets or sets the Dolby Vision profile.", + "format": "int32", + "nullable": true + }, + "DvLevel": { + "type": "integer", + "description": "Gets or sets the Dolby Vision level.", + "format": "int32", + "nullable": true + }, + "RpuPresentFlag": { + "type": "integer", + "description": "Gets or sets the Dolby Vision rpu present flag.", + "format": "int32", + "nullable": true + }, + "ElPresentFlag": { + "type": "integer", + "description": "Gets or sets the Dolby Vision el present flag.", + "format": "int32", + "nullable": true + }, + "BlPresentFlag": { + "type": "integer", + "description": "Gets or sets the Dolby Vision bl present flag.", + "format": "int32", + "nullable": true + }, + "DvBlSignalCompatibilityId": { + "type": "integer", + "description": "Gets or sets the Dolby Vision bl signal compatibility id.", + "format": "int32", + "nullable": true + }, + "Comment": { + "type": "string", + "description": "Gets or sets the comment.", + "nullable": true + }, + "TimeBase": { + "type": "string", + "description": "Gets or sets the time base.", + "nullable": true + }, + "CodecTimeBase": { + "type": "string", + "description": "Gets or sets the codec time base.", + "nullable": true + }, + "Title": { + "type": "string", + "description": "Gets or sets the title.", + "nullable": true + }, + "VideoRange": { + "type": "string", + "description": "Gets the video range.", + "nullable": true, + "readOnly": true + }, + "VideoRangeType": { + "type": "string", + "description": "Gets the video range type.", + "nullable": true, + "readOnly": true + }, + "VideoDoViTitle": { + "type": "string", + "description": "Gets the video dovi title.", + "nullable": true, + "readOnly": true + }, + "LocalizedUndefined": { + "type": "string", + "nullable": true + }, + "LocalizedDefault": { + "type": "string", + "nullable": true + }, + "LocalizedForced": { + "type": "string", + "nullable": true + }, + "LocalizedExternal": { + "type": "string", + "nullable": true + }, + "DisplayTitle": { + "type": "string", + "nullable": true, + "readOnly": true + }, + "NalLengthSize": { + "type": "string", + "nullable": true + }, + "IsInterlaced": { + "type": "boolean", + "description": "Gets or sets a value indicating whether this instance is interlaced." + }, + "IsAVC": { + "type": "boolean", + "nullable": true + }, + "ChannelLayout": { + "type": "string", + "description": "Gets or sets the channel layout.", + "nullable": true + }, + "BitRate": { + "type": "integer", + "description": "Gets or sets the bit rate.", + "format": "int32", + "nullable": true + }, + "BitDepth": { + "type": "integer", + "description": "Gets or sets the bit depth.", + "format": "int32", + "nullable": true + }, + "RefFrames": { + "type": "integer", + "description": "Gets or sets the reference frames.", + "format": "int32", + "nullable": true + }, + "PacketLength": { + "type": "integer", + "description": "Gets or sets the length of the packet.", + "format": "int32", + "nullable": true + }, + "Channels": { + "type": "integer", + "description": "Gets or sets the channels.", + "format": "int32", + "nullable": true + }, + "SampleRate": { + "type": "integer", + "description": "Gets or sets the sample rate.", + "format": "int32", + "nullable": true + }, + "IsDefault": { + "type": "boolean", + "description": "Gets or sets a value indicating whether this instance is default." + }, + "IsForced": { + "type": "boolean", + "description": "Gets or sets a value indicating whether this instance is forced." + }, + "Height": { + "type": "integer", + "description": "Gets or sets the height.", + "format": "int32", + "nullable": true + }, + "Width": { + "type": "integer", + "description": "Gets or sets the width.", + "format": "int32", + "nullable": true + }, + "AverageFrameRate": { + "type": "number", + "description": "Gets or sets the average frame rate.", + "format": "float", + "nullable": true + }, + "RealFrameRate": { + "type": "number", + "description": "Gets or sets the real frame rate.", + "format": "float", + "nullable": true + }, + "Profile": { + "type": "string", + "description": "Gets or sets the profile.", + "nullable": true + }, + "Type": { + "allOf": [ + { + "$ref": "#/components/schemas/MediaStreamType" + } + ], + "description": "Gets or sets the type." + }, + "AspectRatio": { + "type": "string", + "description": "Gets or sets the aspect ratio.", + "nullable": true + }, + "Index": { + "type": "integer", + "description": "Gets or sets the index.", + "format": "int32" + }, + "Score": { + "type": "integer", + "description": "Gets or sets the score.", + "format": "int32", + "nullable": true + }, + "IsExternal": { + "type": "boolean", + "description": "Gets or sets a value indicating whether this instance is external." + }, + "DeliveryMethod": { + "allOf": [ + { + "$ref": "#/components/schemas/SubtitleDeliveryMethod" + } + ], + "description": "Gets or sets the method.", + "nullable": true + }, + "DeliveryUrl": { + "type": "string", + "description": "Gets or sets the delivery URL.", + "nullable": true + }, + "IsExternalUrl": { + "type": "boolean", + "description": "Gets or sets a value indicating whether this instance is external URL.", + "nullable": true + }, + "IsTextSubtitleStream": { + "type": "boolean", + "readOnly": true + }, + "SupportsExternalStream": { + "type": "boolean", + "description": "Gets or sets a value indicating whether [supports external stream]." + }, + "Path": { + "type": "string", + "description": "Gets or sets the filename.", + "nullable": true + }, + "PixelFormat": { + "type": "string", + "description": "Gets or sets the pixel format.", + "nullable": true + }, + "Level": { + "type": "number", + "description": "Gets or sets the level.", + "format": "double", + "nullable": true + }, + "IsAnamorphic": { + "type": "boolean", + "description": "Gets or sets whether this instance is anamorphic.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Class MediaStream." + }, + "MediaStreamType": { + "enum": [ + "Audio", + "Video", + "Subtitle", + "EmbeddedImage", + "Data" + ], + "type": "string", + "description": "Enum MediaStreamType." + }, + "MediaUpdateInfoDto": { + "type": "object", + "properties": { + "Updates": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MediaUpdateInfoPathDto" + }, + "description": "Gets or sets the list of updates." + } + }, + "additionalProperties": false, + "description": "Media Update Info Dto." + }, + "MediaUpdateInfoPathDto": { + "type": "object", + "properties": { + "Path": { + "type": "string", + "description": "Gets or sets media path.", + "nullable": true + }, + "UpdateType": { + "type": "string", + "description": "Gets or sets media update type.\r\nCreated, Modified, Deleted.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "The media update info path." + }, + "MediaUrl": { + "type": "object", + "properties": { + "Url": { + "type": "string", + "nullable": true + }, + "Name": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "MessageCommand": { + "required": [ + "Text" + ], + "type": "object", + "properties": { + "Header": { + "type": "string", + "nullable": true + }, + "Text": { + "type": "string" + }, + "TimeoutMs": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + "additionalProperties": false + }, + "MetadataConfiguration": { + "type": "object", + "properties": { + "UseFileCreationTimeForDateAdded": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "MetadataEditorInfo": { + "type": "object", + "properties": { + "ParentalRatingOptions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ParentalRating" + } + }, + "Countries": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CountryInfo" + } + }, + "Cultures": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CultureDto" + } + }, + "ExternalIdInfos": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExternalIdInfo" + } + }, + "ContentType": { + "type": "string", + "nullable": true + }, + "ContentTypeOptions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NameValuePair" + } + } + }, + "additionalProperties": false + }, + "MetadataField": { + "enum": [ + "Cast", + "Genres", + "ProductionLocations", + "Studios", + "Tags", + "Name", + "Overview", + "Runtime", + "OfficialRating" + ], + "type": "string", + "description": "Enum MetadataFields." + }, + "MetadataOptions": { + "type": "object", + "properties": { + "ItemType": { + "type": "string", + "nullable": true + }, + "DisabledMetadataSavers": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "LocalMetadataReaderOrder": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "DisabledMetadataFetchers": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "MetadataFetcherOrder": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "DisabledImageFetchers": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "ImageFetcherOrder": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + } + }, + "additionalProperties": false, + "description": "Class MetadataOptions." + }, + "MetadataRefreshMode": { + "enum": [ + "None", + "ValidationOnly", + "Default", + "FullRefresh" + ], + "type": "string" + }, + "MovePlaylistItemRequestDto": { + "type": "object", + "properties": { + "PlaylistItemId": { + "type": "string", + "description": "Gets or sets the playlist identifier of the item.", + "format": "uuid" + }, + "NewIndex": { + "type": "integer", + "description": "Gets or sets the new position.", + "format": "int32" + } + }, + "additionalProperties": false, + "description": "Class MovePlaylistItemRequestDto." + }, + "MovieInfo": { + "type": "object", + "properties": { + "Name": { + "type": "string", + "description": "Gets or sets the name.", + "nullable": true + }, + "OriginalTitle": { + "type": "string", + "description": "Gets or sets the original title.", + "nullable": true + }, + "Path": { + "type": "string", + "description": "Gets or sets the path.", + "nullable": true + }, + "MetadataLanguage": { + "type": "string", + "description": "Gets or sets the metadata language.", + "nullable": true + }, + "MetadataCountryCode": { + "type": "string", + "description": "Gets or sets the metadata country code.", + "nullable": true + }, + "ProviderIds": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "description": "Gets or sets the provider ids.", + "nullable": true + }, + "Year": { + "type": "integer", + "description": "Gets or sets the year.", + "format": "int32", + "nullable": true + }, + "IndexNumber": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "ParentIndexNumber": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "PremiereDate": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "IsAutomated": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "MovieInfoRemoteSearchQuery": { + "type": "object", + "properties": { + "SearchInfo": { + "allOf": [ + { + "$ref": "#/components/schemas/MovieInfo" + } + ], + "nullable": true + }, + "ItemId": { + "type": "string", + "format": "uuid" + }, + "SearchProviderName": { + "type": "string", + "description": "Gets or sets the provider name to search within if set.", + "nullable": true + }, + "IncludeDisabledProviders": { + "type": "boolean", + "description": "Gets or sets a value indicating whether disabled providers should be included." + } + }, + "additionalProperties": false + }, + "MusicVideoInfo": { + "type": "object", + "properties": { + "Name": { + "type": "string", + "description": "Gets or sets the name.", + "nullable": true + }, + "OriginalTitle": { + "type": "string", + "description": "Gets or sets the original title.", + "nullable": true + }, + "Path": { + "type": "string", + "description": "Gets or sets the path.", + "nullable": true + }, + "MetadataLanguage": { + "type": "string", + "description": "Gets or sets the metadata language.", + "nullable": true + }, + "MetadataCountryCode": { + "type": "string", + "description": "Gets or sets the metadata country code.", + "nullable": true + }, + "ProviderIds": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "description": "Gets or sets the provider ids.", + "nullable": true + }, + "Year": { + "type": "integer", + "description": "Gets or sets the year.", + "format": "int32", + "nullable": true + }, + "IndexNumber": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "ParentIndexNumber": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "PremiereDate": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "IsAutomated": { + "type": "boolean" + }, + "Artists": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "MusicVideoInfoRemoteSearchQuery": { + "type": "object", + "properties": { + "SearchInfo": { + "allOf": [ + { + "$ref": "#/components/schemas/MusicVideoInfo" + } + ], + "nullable": true + }, + "ItemId": { + "type": "string", + "format": "uuid" + }, + "SearchProviderName": { + "type": "string", + "description": "Gets or sets the provider name to search within if set.", + "nullable": true + }, + "IncludeDisabledProviders": { + "type": "boolean", + "description": "Gets or sets a value indicating whether disabled providers should be included." + } + }, + "additionalProperties": false + }, + "NameGuidPair": { + "type": "object", + "properties": { + "Name": { + "type": "string", + "nullable": true + }, + "Id": { + "type": "string", + "format": "uuid" + } + }, + "additionalProperties": false + }, + "NameIdPair": { + "type": "object", + "properties": { + "Name": { + "type": "string", + "description": "Gets or sets the name.", + "nullable": true + }, + "Id": { + "type": "string", + "description": "Gets or sets the identifier.", + "nullable": true + } + }, + "additionalProperties": false + }, + "NameValuePair": { + "type": "object", + "properties": { + "Name": { + "type": "string", + "description": "Gets or sets the name.", + "nullable": true + }, + "Value": { + "type": "string", + "description": "Gets or sets the value.", + "nullable": true + } + }, + "additionalProperties": false + }, + "NetworkConfiguration": { + "type": "object", + "properties": { + "RequireHttps": { + "type": "boolean", + "description": "Gets or sets a value indicating whether the server should force connections over HTTPS." + }, + "CertificatePath": { + "type": "string", + "description": "Gets or sets the filesystem path of an X.509 certificate to use for SSL." + }, + "CertificatePassword": { + "type": "string", + "description": "Gets or sets the password required to access the X.509 certificate data in the file specified by Jellyfin.Networking.Configuration.NetworkConfiguration.CertificatePath." + }, + "BaseUrl": { + "type": "string", + "description": "Gets or sets a value used to specify the URL prefix that your Jellyfin instance can be accessed at." + }, + "PublicHttpsPort": { + "type": "integer", + "description": "Gets or sets the public HTTPS port.", + "format": "int32" + }, + "HttpServerPortNumber": { + "type": "integer", + "description": "Gets or sets the HTTP server port number.", + "format": "int32" + }, + "HttpsPortNumber": { + "type": "integer", + "description": "Gets or sets the HTTPS server port number.", + "format": "int32" + }, + "EnableHttps": { + "type": "boolean", + "description": "Gets or sets a value indicating whether to use HTTPS." + }, + "PublicPort": { + "type": "integer", + "description": "Gets or sets the public mapped port.", + "format": "int32" + }, + "UPnPCreateHttpPortMap": { + "type": "boolean", + "description": "Gets or sets a value indicating whether the http port should be mapped as part of UPnP automatic port forwarding." + }, + "UDPPortRange": { + "type": "string", + "description": "Gets or sets the UDPPortRange." + }, + "EnableIPV6": { + "type": "boolean", + "description": "Gets or sets a value indicating whether gets or sets IPV6 capability." + }, + "EnableIPV4": { + "type": "boolean", + "description": "Gets or sets a value indicating whether gets or sets IPV4 capability." + }, + "EnableSSDPTracing": { + "type": "boolean", + "description": "Gets or sets a value indicating whether detailed SSDP logs are sent to the console/log.\r\n\"Emby.Dlna\": \"Debug\" must be set in logging.default.json for this property to have any effect." + }, + "SSDPTracingFilter": { + "type": "string", + "description": "Gets or sets the SSDPTracingFilter\r\nGets or sets a value indicating whether an IP address is to be used to filter the detailed ssdp logs that are being sent to the console/log.\r\nIf the setting \"Emby.Dlna\": \"Debug\" msut be set in logging.default.json for this property to work." + }, + "UDPSendCount": { + "type": "integer", + "description": "Gets or sets the number of times SSDP UDP messages are sent.", + "format": "int32" + }, + "UDPSendDelay": { + "type": "integer", + "description": "Gets or sets the delay between each groups of SSDP messages (in ms).", + "format": "int32" + }, + "IgnoreVirtualInterfaces": { + "type": "boolean", + "description": "Gets or sets a value indicating whether address names that match Jellyfin.Networking.Configuration.NetworkConfiguration.VirtualInterfaceNames should be Ignore for the purposes of binding." + }, + "VirtualInterfaceNames": { + "type": "string", + "description": "Gets or sets a value indicating the interfaces that should be ignored. The list can be comma separated. ." + }, + "GatewayMonitorPeriod": { + "type": "integer", + "description": "Gets or sets the time (in seconds) between the pings of SSDP gateway monitor.", + "format": "int32" + }, + "EnableMultiSocketBinding": { + "type": "boolean", + "description": "Gets a value indicating whether multi-socket binding is available.", + "readOnly": true + }, + "TrustAllIP6Interfaces": { + "type": "boolean", + "description": "Gets or sets a value indicating whether all IPv6 interfaces should be treated as on the internal network.\r\nDepending on the address range implemented ULA ranges might not be used." + }, + "HDHomerunPortRange": { + "type": "string", + "description": "Gets or sets the ports that HDHomerun uses." + }, + "PublishedServerUriBySubnet": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Gets or sets the PublishedServerUriBySubnet\r\nGets or sets PublishedServerUri to advertise for specific subnets." + }, + "AutoDiscoveryTracing": { + "type": "boolean", + "description": "Gets or sets a value indicating whether Autodiscovery tracing is enabled." + }, + "AutoDiscovery": { + "type": "boolean", + "description": "Gets or sets a value indicating whether Autodiscovery is enabled." + }, + "RemoteIPFilter": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Gets or sets the filter for remote IP connectivity. Used in conjuntion with ." + }, + "IsRemoteIPFilterBlacklist": { + "type": "boolean", + "description": "Gets or sets a value indicating whether contains a blacklist or a whitelist. Default is a whitelist." + }, + "EnableUPnP": { + "type": "boolean", + "description": "Gets or sets a value indicating whether to enable automatic port forwarding." + }, + "EnableRemoteAccess": { + "type": "boolean", + "description": "Gets or sets a value indicating whether access outside of the LAN is permitted." + }, + "LocalNetworkSubnets": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Gets or sets the subnets that are deemed to make up the LAN." + }, + "LocalNetworkAddresses": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Gets or sets the interface addresses which Jellyfin will bind to. If empty, all interfaces will be used." + }, + "KnownProxies": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Gets or sets the known proxies. If the proxy is a network, it's added to the KnownNetworks." + }, + "EnablePublishedServerUriByRequest": { + "type": "boolean", + "description": "Gets or sets a value indicating whether the published server uri is based on information in HTTP requests." + } + }, + "additionalProperties": false, + "description": "Defines the Jellyfin.Networking.Configuration.NetworkConfiguration." + }, + "NewGroupRequestDto": { + "type": "object", + "properties": { + "GroupName": { + "type": "string", + "description": "Gets or sets the group name." + } + }, + "additionalProperties": false, + "description": "Class NewGroupRequestDto." + }, + "NextItemRequestDto": { + "type": "object", + "properties": { + "PlaylistItemId": { + "type": "string", + "description": "Gets or sets the playing item identifier.", + "format": "uuid" + } + }, + "additionalProperties": false, + "description": "Class NextItemRequestDto." + }, + "NotificationDto": { + "type": "object", + "properties": { + "Id": { + "type": "string", + "description": "Gets or sets the notification ID. Defaults to an empty string." + }, + "UserId": { + "type": "string", + "description": "Gets or sets the notification's user ID. Defaults to an empty string." + }, + "Date": { + "type": "string", + "description": "Gets or sets the notification date.", + "format": "date-time" + }, + "IsRead": { + "type": "boolean", + "description": "Gets or sets a value indicating whether the notification has been read. Defaults to false." + }, + "Name": { + "type": "string", + "description": "Gets or sets the notification's name. Defaults to an empty string." + }, + "Description": { + "type": "string", + "description": "Gets or sets the notification's description. Defaults to an empty string." + }, + "Url": { + "type": "string", + "description": "Gets or sets the notification's URL. Defaults to an empty string." + }, + "Level": { + "allOf": [ + { + "$ref": "#/components/schemas/NotificationLevel" + } + ], + "description": "Gets or sets the notification level." + } + }, + "additionalProperties": false, + "description": "The notification DTO." + }, + "NotificationLevel": { + "enum": [ + "Normal", + "Warning", + "Error" + ], + "type": "string" + }, + "NotificationOption": { + "type": "object", + "properties": { + "Type": { + "type": "string", + "nullable": true + }, + "DisabledMonitorUsers": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Gets or sets user Ids to not monitor (it's opt out)." + }, + "SendToUsers": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Gets or sets user Ids to send to (if SendToUserMode == Custom)." + }, + "Enabled": { + "type": "boolean", + "description": "Gets or sets a value indicating whether this MediaBrowser.Model.Notifications.NotificationOption is enabled." + }, + "DisabledServices": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Gets or sets the disabled services." + }, + "SendToUserMode": { + "allOf": [ + { + "$ref": "#/components/schemas/SendToUserType" + } + ], + "description": "Gets or sets the send to user mode." + } + }, + "additionalProperties": false + }, + "NotificationOptions": { + "type": "object", + "properties": { + "Options": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NotificationOption" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "NotificationResultDto": { + "type": "object", + "properties": { + "Notifications": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NotificationDto" + }, + "description": "Gets or sets the current page of notifications." + }, + "TotalRecordCount": { + "type": "integer", + "description": "Gets or sets the total number of notifications.", + "format": "int32" + } + }, + "additionalProperties": false, + "description": "A list of notifications with the total record count for pagination." + }, + "NotificationsSummaryDto": { + "type": "object", + "properties": { + "UnreadCount": { + "type": "integer", + "description": "Gets or sets the number of unread notifications.", + "format": "int32" + }, + "MaxUnreadNotificationLevel": { + "allOf": [ + { + "$ref": "#/components/schemas/NotificationLevel" + } + ], + "description": "Gets or sets the maximum unread notification level.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "The notification summary DTO." + }, + "NotificationTypeInfo": { + "type": "object", + "properties": { + "Type": { + "type": "string", + "nullable": true + }, + "Name": { + "type": "string", + "nullable": true + }, + "Enabled": { + "type": "boolean" + }, + "Category": { + "type": "string", + "nullable": true + }, + "IsBasedOnUserEvent": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "ObjectGroupUpdate": { + "type": "object", + "properties": { + "GroupId": { + "type": "string", + "description": "Gets the group identifier.", + "format": "uuid" + }, + "Type": { + "allOf": [ + { + "$ref": "#/components/schemas/GroupUpdateType" + } + ], + "description": "Gets the update type." + }, + "Data": { + "description": "Gets the update data." + } + }, + "additionalProperties": false, + "description": "Class GroupUpdate." + }, + "OpenLiveStreamDto": { + "type": "object", + "properties": { + "OpenToken": { + "type": "string", + "description": "Gets or sets the open token.", + "nullable": true + }, + "UserId": { + "type": "string", + "description": "Gets or sets the user id.", + "format": "uuid", + "nullable": true + }, + "PlaySessionId": { + "type": "string", + "description": "Gets or sets the play session id.", + "nullable": true + }, + "MaxStreamingBitrate": { + "type": "integer", + "description": "Gets or sets the max streaming bitrate.", + "format": "int32", + "nullable": true + }, + "StartTimeTicks": { + "type": "integer", + "description": "Gets or sets the start time in ticks.", + "format": "int64", + "nullable": true + }, + "AudioStreamIndex": { + "type": "integer", + "description": "Gets or sets the audio stream index.", + "format": "int32", + "nullable": true + }, + "SubtitleStreamIndex": { + "type": "integer", + "description": "Gets or sets the subtitle stream index.", + "format": "int32", + "nullable": true + }, + "MaxAudioChannels": { + "type": "integer", + "description": "Gets or sets the max audio channels.", + "format": "int32", + "nullable": true + }, + "ItemId": { + "type": "string", + "description": "Gets or sets the item id.", + "format": "uuid", + "nullable": true + }, + "EnableDirectPlay": { + "type": "boolean", + "description": "Gets or sets a value indicating whether to enable direct play.", + "nullable": true + }, + "EnableDirectStream": { + "type": "boolean", + "description": "Gets or sets a value indicating whether to enale direct stream.", + "nullable": true + }, + "DeviceProfile": { + "allOf": [ + { + "$ref": "#/components/schemas/DeviceProfile" + } + ], + "description": "Gets or sets the device profile.", + "nullable": true + }, + "DirectPlayProtocols": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MediaProtocol" + }, + "description": "Gets or sets the device play protocols." + } + }, + "additionalProperties": false, + "description": "Open live stream dto." + }, + "PackageInfo": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Gets or sets the name." + }, + "description": { + "type": "string", + "description": "Gets or sets a long description of the plugin containing features or helpful explanations." + }, + "overview": { + "type": "string", + "description": "Gets or sets a short overview of what the plugin does." + }, + "owner": { + "type": "string", + "description": "Gets or sets the owner." + }, + "category": { + "type": "string", + "description": "Gets or sets the category." + }, + "guid": { + "type": "string", + "description": "Gets or sets the guid of the assembly associated with this plugin.\r\nThis is used to identify the proper item for automatic updates.", + "format": "uuid" + }, + "versions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/VersionInfo" + }, + "description": "Gets or sets the versions." + }, + "imageUrl": { + "type": "string", + "description": "Gets or sets the image url for the package.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Class PackageInfo." + }, + "ParentalRating": { + "type": "object", + "properties": { + "Name": { + "type": "string", + "description": "Gets or sets the name.", + "nullable": true + }, + "Value": { + "type": "integer", + "description": "Gets or sets the value.", + "format": "int32" + } + }, + "additionalProperties": false, + "description": "Class ParentalRating." + }, + "PathSubstitution": { + "type": "object", + "properties": { + "From": { + "type": "string", + "description": "Gets or sets the value to substitute." + }, + "To": { + "type": "string", + "description": "Gets or sets the value to substitution with." + } + }, + "additionalProperties": false, + "description": "Defines the MediaBrowser.Model.Configuration.PathSubstitution." + }, + "PersonLookupInfo": { + "type": "object", + "properties": { + "Name": { + "type": "string", + "description": "Gets or sets the name.", + "nullable": true + }, + "OriginalTitle": { + "type": "string", + "description": "Gets or sets the original title.", + "nullable": true + }, + "Path": { + "type": "string", + "description": "Gets or sets the path.", + "nullable": true + }, + "MetadataLanguage": { + "type": "string", + "description": "Gets or sets the metadata language.", + "nullable": true + }, + "MetadataCountryCode": { + "type": "string", + "description": "Gets or sets the metadata country code.", + "nullable": true + }, + "ProviderIds": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "description": "Gets or sets the provider ids.", + "nullable": true + }, + "Year": { + "type": "integer", + "description": "Gets or sets the year.", + "format": "int32", + "nullable": true + }, + "IndexNumber": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "ParentIndexNumber": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "PremiereDate": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "IsAutomated": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "PersonLookupInfoRemoteSearchQuery": { + "type": "object", + "properties": { + "SearchInfo": { + "allOf": [ + { + "$ref": "#/components/schemas/PersonLookupInfo" + } + ], + "nullable": true + }, + "ItemId": { + "type": "string", + "format": "uuid" + }, + "SearchProviderName": { + "type": "string", + "description": "Gets or sets the provider name to search within if set.", + "nullable": true + }, + "IncludeDisabledProviders": { + "type": "boolean", + "description": "Gets or sets a value indicating whether disabled providers should be included." + } + }, + "additionalProperties": false + }, + "PingRequestDto": { + "type": "object", + "properties": { + "Ping": { + "type": "integer", + "description": "Gets or sets the ping time.", + "format": "int64" + } + }, + "additionalProperties": false, + "description": "Class PingRequestDto." + }, + "PinRedeemResult": { + "type": "object", + "properties": { + "Success": { + "type": "boolean", + "description": "Gets or sets a value indicating whether this MediaBrowser.Model.Users.PinRedeemResult is success." + }, + "UsersReset": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Gets or sets the users reset." + } + }, + "additionalProperties": false + }, + "PlayAccess": { + "enum": [ + "Full", + "None" + ], + "type": "string" + }, + "PlaybackErrorCode": { + "enum": [ + "NotAllowed", + "NoCompatibleStream", + "RateLimitExceeded" + ], + "type": "string" + }, + "PlaybackInfoDto": { + "type": "object", + "properties": { + "UserId": { + "type": "string", + "description": "Gets or sets the playback userId.", + "format": "uuid", + "nullable": true + }, + "MaxStreamingBitrate": { + "type": "integer", + "description": "Gets or sets the max streaming bitrate.", + "format": "int32", + "nullable": true + }, + "StartTimeTicks": { + "type": "integer", + "description": "Gets or sets the start time in ticks.", + "format": "int64", + "nullable": true + }, + "AudioStreamIndex": { + "type": "integer", + "description": "Gets or sets the audio stream index.", + "format": "int32", + "nullable": true + }, + "SubtitleStreamIndex": { + "type": "integer", + "description": "Gets or sets the subtitle stream index.", + "format": "int32", + "nullable": true + }, + "MaxAudioChannels": { + "type": "integer", + "description": "Gets or sets the max audio channels.", + "format": "int32", + "nullable": true + }, + "MediaSourceId": { + "type": "string", + "description": "Gets or sets the media source id.", + "nullable": true + }, + "LiveStreamId": { + "type": "string", + "description": "Gets or sets the live stream id.", + "nullable": true + }, + "DeviceProfile": { + "allOf": [ + { + "$ref": "#/components/schemas/DeviceProfile" + } + ], + "description": "Gets or sets the device profile.", + "nullable": true + }, + "EnableDirectPlay": { + "type": "boolean", + "description": "Gets or sets a value indicating whether to enable direct play.", + "nullable": true + }, + "EnableDirectStream": { + "type": "boolean", + "description": "Gets or sets a value indicating whether to enable direct stream.", + "nullable": true + }, + "EnableTranscoding": { + "type": "boolean", + "description": "Gets or sets a value indicating whether to enable transcoding.", + "nullable": true + }, + "AllowVideoStreamCopy": { + "type": "boolean", + "description": "Gets or sets a value indicating whether to enable video stream copy.", + "nullable": true + }, + "AllowAudioStreamCopy": { + "type": "boolean", + "description": "Gets or sets a value indicating whether to allow audio stream copy.", + "nullable": true + }, + "AutoOpenLiveStream": { + "type": "boolean", + "description": "Gets or sets a value indicating whether to auto open the live stream.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Plabyback info dto." + }, + "PlaybackInfoResponse": { + "type": "object", + "properties": { + "MediaSources": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MediaSourceInfo" + }, + "description": "Gets or sets the media sources." + }, + "PlaySessionId": { + "type": "string", + "description": "Gets or sets the play session identifier.", + "nullable": true + }, + "ErrorCode": { + "allOf": [ + { + "$ref": "#/components/schemas/PlaybackErrorCode" + } + ], + "description": "Gets or sets the error code.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Class PlaybackInfoResponse." + }, + "PlaybackProgressInfo": { + "type": "object", + "properties": { + "CanSeek": { + "type": "boolean", + "description": "Gets or sets a value indicating whether this instance can seek." + }, + "Item": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseItemDto" + } + ], + "description": "Gets or sets the item.", + "nullable": true + }, + "ItemId": { + "type": "string", + "description": "Gets or sets the item identifier.", + "format": "uuid" + }, + "SessionId": { + "type": "string", + "description": "Gets or sets the session id.", + "nullable": true + }, + "MediaSourceId": { + "type": "string", + "description": "Gets or sets the media version identifier.", + "nullable": true + }, + "AudioStreamIndex": { + "type": "integer", + "description": "Gets or sets the index of the audio stream.", + "format": "int32", + "nullable": true + }, + "SubtitleStreamIndex": { + "type": "integer", + "description": "Gets or sets the index of the subtitle stream.", + "format": "int32", + "nullable": true + }, + "IsPaused": { + "type": "boolean", + "description": "Gets or sets a value indicating whether this instance is paused." + }, + "IsMuted": { + "type": "boolean", + "description": "Gets or sets a value indicating whether this instance is muted." + }, + "PositionTicks": { + "type": "integer", + "description": "Gets or sets the position ticks.", + "format": "int64", + "nullable": true + }, + "PlaybackStartTimeTicks": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "VolumeLevel": { + "type": "integer", + "description": "Gets or sets the volume level.", + "format": "int32", + "nullable": true + }, + "Brightness": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "AspectRatio": { + "type": "string", + "nullable": true + }, + "PlayMethod": { + "allOf": [ + { + "$ref": "#/components/schemas/PlayMethod" + } + ], + "description": "Gets or sets the play method." + }, + "LiveStreamId": { + "type": "string", + "description": "Gets or sets the live stream identifier.", + "nullable": true + }, + "PlaySessionId": { + "type": "string", + "description": "Gets or sets the play session identifier.", + "nullable": true + }, + "RepeatMode": { + "allOf": [ + { + "$ref": "#/components/schemas/RepeatMode" + } + ], + "description": "Gets or sets the repeat mode." + }, + "NowPlayingQueue": { + "type": "array", + "items": { + "$ref": "#/components/schemas/QueueItem" + }, + "nullable": true + }, + "PlaylistItemId": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Class PlaybackProgressInfo." + }, + "PlaybackStartInfo": { + "type": "object", + "properties": { + "CanSeek": { + "type": "boolean", + "description": "Gets or sets a value indicating whether this instance can seek." + }, + "Item": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseItemDto" + } + ], + "description": "Gets or sets the item.", + "nullable": true + }, + "ItemId": { + "type": "string", + "description": "Gets or sets the item identifier.", + "format": "uuid" + }, + "SessionId": { + "type": "string", + "description": "Gets or sets the session id.", + "nullable": true + }, + "MediaSourceId": { + "type": "string", + "description": "Gets or sets the media version identifier.", + "nullable": true + }, + "AudioStreamIndex": { + "type": "integer", + "description": "Gets or sets the index of the audio stream.", + "format": "int32", + "nullable": true + }, + "SubtitleStreamIndex": { + "type": "integer", + "description": "Gets or sets the index of the subtitle stream.", + "format": "int32", + "nullable": true + }, + "IsPaused": { + "type": "boolean", + "description": "Gets or sets a value indicating whether this instance is paused." + }, + "IsMuted": { + "type": "boolean", + "description": "Gets or sets a value indicating whether this instance is muted." + }, + "PositionTicks": { + "type": "integer", + "description": "Gets or sets the position ticks.", + "format": "int64", + "nullable": true + }, + "PlaybackStartTimeTicks": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "VolumeLevel": { + "type": "integer", + "description": "Gets or sets the volume level.", + "format": "int32", + "nullable": true + }, + "Brightness": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "AspectRatio": { + "type": "string", + "nullable": true + }, + "PlayMethod": { + "allOf": [ + { + "$ref": "#/components/schemas/PlayMethod" + } + ], + "description": "Gets or sets the play method." + }, + "LiveStreamId": { + "type": "string", + "description": "Gets or sets the live stream identifier.", + "nullable": true + }, + "PlaySessionId": { + "type": "string", + "description": "Gets or sets the play session identifier.", + "nullable": true + }, + "RepeatMode": { + "allOf": [ + { + "$ref": "#/components/schemas/RepeatMode" + } + ], + "description": "Gets or sets the repeat mode." + }, + "NowPlayingQueue": { + "type": "array", + "items": { + "$ref": "#/components/schemas/QueueItem" + }, + "nullable": true + }, + "PlaylistItemId": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Class PlaybackStartInfo." + }, + "PlaybackStopInfo": { + "type": "object", + "properties": { + "Item": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseItemDto" + } + ], + "description": "Gets or sets the item.", + "nullable": true + }, + "ItemId": { + "type": "string", + "description": "Gets or sets the item identifier.", + "format": "uuid" + }, + "SessionId": { + "type": "string", + "description": "Gets or sets the session id.", + "nullable": true + }, + "MediaSourceId": { + "type": "string", + "description": "Gets or sets the media version identifier.", + "nullable": true + }, + "PositionTicks": { + "type": "integer", + "description": "Gets or sets the position ticks.", + "format": "int64", + "nullable": true + }, + "LiveStreamId": { + "type": "string", + "description": "Gets or sets the live stream identifier.", + "nullable": true + }, + "PlaySessionId": { + "type": "string", + "description": "Gets or sets the play session identifier.", + "nullable": true + }, + "Failed": { + "type": "boolean", + "description": "Gets or sets a value indicating whether this MediaBrowser.Model.Session.PlaybackStopInfo is failed." + }, + "NextMediaType": { + "type": "string", + "nullable": true + }, + "PlaylistItemId": { + "type": "string", + "nullable": true + }, + "NowPlayingQueue": { + "type": "array", + "items": { + "$ref": "#/components/schemas/QueueItem" + }, + "nullable": true + } + }, + "additionalProperties": false, + "description": "Class PlaybackStopInfo." + }, + "PlayCommand": { + "enum": [ + "PlayNow", + "PlayNext", + "PlayLast", + "PlayInstantMix", + "PlayShuffle" + ], + "type": "string", + "description": "Enum PlayCommand." + }, + "PlayerStateInfo": { + "type": "object", + "properties": { + "PositionTicks": { + "type": "integer", + "description": "Gets or sets the now playing position ticks.", + "format": "int64", + "nullable": true + }, + "CanSeek": { + "type": "boolean", + "description": "Gets or sets a value indicating whether this instance can seek." + }, + "IsPaused": { + "type": "boolean", + "description": "Gets or sets a value indicating whether this instance is paused." + }, + "IsMuted": { + "type": "boolean", + "description": "Gets or sets a value indicating whether this instance is muted." + }, + "VolumeLevel": { + "type": "integer", + "description": "Gets or sets the volume level.", + "format": "int32", + "nullable": true + }, + "AudioStreamIndex": { + "type": "integer", + "description": "Gets or sets the index of the now playing audio stream.", + "format": "int32", + "nullable": true + }, + "SubtitleStreamIndex": { + "type": "integer", + "description": "Gets or sets the index of the now playing subtitle stream.", + "format": "int32", + "nullable": true + }, + "MediaSourceId": { + "type": "string", + "description": "Gets or sets the now playing media version identifier.", + "nullable": true + }, + "PlayMethod": { + "allOf": [ + { + "$ref": "#/components/schemas/PlayMethod" + } + ], + "description": "Gets or sets the play method.", + "nullable": true + }, + "RepeatMode": { + "allOf": [ + { + "$ref": "#/components/schemas/RepeatMode" + } + ], + "description": "Gets or sets the repeat mode." + }, + "LiveStreamId": { + "type": "string", + "description": "Gets or sets the now playing live stream identifier.", + "nullable": true + } + }, + "additionalProperties": false + }, + "PlaylistCreationResult": { + "type": "object", + "properties": { + "Id": { + "type": "string" + } + }, + "additionalProperties": false + }, + "PlayMethod": { + "enum": [ + "Transcode", + "DirectStream", + "DirectPlay" + ], + "type": "string" + }, + "PlayRequest": { + "type": "object", + "properties": { + "ItemIds": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "description": "Gets or sets the item ids.", + "nullable": true + }, + "StartPositionTicks": { + "type": "integer", + "description": "Gets or sets the start position ticks that the first item should be played at.", + "format": "int64", + "nullable": true + }, + "PlayCommand": { + "allOf": [ + { + "$ref": "#/components/schemas/PlayCommand" + } + ], + "description": "Gets or sets the play command." + }, + "ControllingUserId": { + "type": "string", + "description": "Gets or sets the controlling user identifier.", + "format": "uuid" + }, + "SubtitleStreamIndex": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "AudioStreamIndex": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "MediaSourceId": { + "type": "string", + "nullable": true + }, + "StartIndex": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Class PlayRequest." + }, + "PlayRequestDto": { + "type": "object", + "properties": { + "PlayingQueue": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "description": "Gets or sets the playing queue." + }, + "PlayingItemPosition": { + "type": "integer", + "description": "Gets or sets the position of the playing item in the queue.", + "format": "int32" + }, + "StartPositionTicks": { + "type": "integer", + "description": "Gets or sets the start position ticks.", + "format": "int64" + } + }, + "additionalProperties": false, + "description": "Class PlayRequestDto." + }, + "PlaystateCommand": { + "enum": [ + "Stop", + "Pause", + "Unpause", + "NextTrack", + "PreviousTrack", + "Seek", + "Rewind", + "FastForward", + "PlayPause" + ], + "type": "string", + "description": "Enum PlaystateCommand." + }, + "PlaystateRequest": { + "type": "object", + "properties": { + "Command": { + "allOf": [ + { + "$ref": "#/components/schemas/PlaystateCommand" + } + ], + "description": "Enum PlaystateCommand." + }, + "SeekPositionTicks": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "ControllingUserId": { + "type": "string", + "description": "Gets or sets the controlling user identifier.", + "nullable": true + } + }, + "additionalProperties": false + }, + "PluginInfo": { + "type": "object", + "properties": { + "Name": { + "type": "string", + "description": "Gets or sets the name." + }, + "Version": { + "type": "string", + "description": "Gets or sets the version." + }, + "ConfigurationFileName": { + "type": "string", + "description": "Gets or sets the name of the configuration file.", + "nullable": true + }, + "Description": { + "type": "string", + "description": "Gets or sets the description." + }, + "Id": { + "type": "string", + "description": "Gets or sets the unique id.", + "format": "uuid" + }, + "CanUninstall": { + "type": "boolean", + "description": "Gets or sets a value indicating whether the plugin can be uninstalled." + }, + "HasImage": { + "type": "boolean", + "description": "Gets or sets a value indicating whether this plugin has a valid image." + }, + "Status": { + "allOf": [ + { + "$ref": "#/components/schemas/PluginStatus" + } + ], + "description": "Gets or sets a value indicating the status of the plugin." + } + }, + "additionalProperties": false, + "description": "This is a serializable stub class that is used by the api to provide information about installed plugins." + }, + "PluginStatus": { + "enum": [ + "Active", + "Restart", + "Deleted", + "Superceded", + "Malfunctioned", + "NotSupported", + "Disabled" + ], + "type": "string", + "description": "Plugin load status." + }, + "PreviousItemRequestDto": { + "type": "object", + "properties": { + "PlaylistItemId": { + "type": "string", + "description": "Gets or sets the playing item identifier.", + "format": "uuid" + } + }, + "additionalProperties": false, + "description": "Class PreviousItemRequestDto." + }, + "ProblemDetails": { + "type": "object", + "properties": { + "type": { + "type": "string", + "nullable": true + }, + "title": { + "type": "string", + "nullable": true + }, + "status": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "detail": { + "type": "string", + "nullable": true + }, + "instance": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": { } + }, + "ProfileCondition": { + "type": "object", + "properties": { + "Condition": { + "allOf": [ + { + "$ref": "#/components/schemas/ProfileConditionType" + } + ] + }, + "Property": { + "allOf": [ + { + "$ref": "#/components/schemas/ProfileConditionValue" + } + ] + }, + "Value": { + "type": "string", + "nullable": true + }, + "IsRequired": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "ProfileConditionType": { + "enum": [ + "Equals", + "NotEquals", + "LessThanEqual", + "GreaterThanEqual", + "EqualsAny" + ], + "type": "string" + }, + "ProfileConditionValue": { + "enum": [ + "AudioChannels", + "AudioBitrate", + "AudioProfile", + "Width", + "Height", + "Has64BitOffsets", + "PacketLength", + "VideoBitDepth", + "VideoBitrate", + "VideoFramerate", + "VideoLevel", + "VideoProfile", + "VideoTimestamp", + "IsAnamorphic", + "RefFrames", + "NumAudioStreams", + "NumVideoStreams", + "IsSecondaryAudio", + "VideoCodecTag", + "IsAvc", + "IsInterlaced", + "AudioSampleRate", + "AudioBitDepth", + "VideoRangeType" + ], + "type": "string" + }, + "ProgramAudio": { + "enum": [ + "Mono", + "Stereo", + "Dolby", + "DolbyDigital", + "Thx", + "Atmos" + ], + "type": "string" + }, + "PublicSystemInfo": { + "type": "object", + "properties": { + "LocalAddress": { + "type": "string", + "description": "Gets or sets the local address.", + "nullable": true + }, + "ServerName": { + "type": "string", + "description": "Gets or sets the name of the server.", + "nullable": true + }, + "Version": { + "type": "string", + "description": "Gets or sets the server version.", + "nullable": true + }, + "ProductName": { + "type": "string", + "description": "Gets or sets the product name. This is the AssemblyProduct name.", + "nullable": true + }, + "OperatingSystem": { + "type": "string", + "description": "Gets or sets the operating system.", + "nullable": true + }, + "Id": { + "type": "string", + "description": "Gets or sets the id.", + "nullable": true + }, + "StartupWizardCompleted": { + "type": "boolean", + "description": "Gets or sets a value indicating whether the startup wizard is completed.", + "nullable": true + } + }, + "additionalProperties": false + }, + "QueryFilters": { + "type": "object", + "properties": { + "Genres": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NameGuidPair" + }, + "nullable": true + }, + "Tags": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "QueryFiltersLegacy": { + "type": "object", + "properties": { + "Genres": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "Tags": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "OfficialRatings": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "Years": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "QueueItem": { + "type": "object", + "properties": { + "Id": { + "type": "string", + "format": "uuid" + }, + "PlaylistItemId": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "QueueRequestDto": { + "type": "object", + "properties": { + "ItemIds": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "description": "Gets or sets the items to enqueue." + }, + "Mode": { + "allOf": [ + { + "$ref": "#/components/schemas/GroupQueueMode" + } + ], + "description": "Gets or sets the mode in which to add the new items." + } + }, + "additionalProperties": false, + "description": "Class QueueRequestDto." + }, + "QuickConnectDto": { + "required": [ + "Secret" + ], + "type": "object", + "properties": { + "Secret": { + "type": "string", + "description": "Gets or sets the quick connect secret." + } + }, + "additionalProperties": false, + "description": "The quick connect request body." + }, + "QuickConnectResult": { + "type": "object", + "properties": { + "Authenticated": { + "type": "boolean", + "description": "Gets or sets a value indicating whether this request is authorized." + }, + "Secret": { + "type": "string", + "description": "Gets the secret value used to uniquely identify this request. Can be used to retrieve authentication information." + }, + "Code": { + "type": "string", + "description": "Gets the user facing code used so the user can quickly differentiate this request from others." + }, + "DeviceId": { + "type": "string", + "description": "Gets the requesting device id." + }, + "DeviceName": { + "type": "string", + "description": "Gets the requesting device name." + }, + "AppName": { + "type": "string", + "description": "Gets the requesting app name." + }, + "AppVersion": { + "type": "string", + "description": "Gets the requesting app version." + }, + "DateAdded": { + "type": "string", + "description": "Gets or sets the DateTime that this request was created.", + "format": "date-time" + } + }, + "additionalProperties": false, + "description": "Stores the state of an quick connect request." + }, + "RatingType": { + "enum": [ + "Score", + "Likes" + ], + "type": "string" + }, + "ReadyRequestDto": { + "type": "object", + "properties": { + "When": { + "type": "string", + "description": "Gets or sets when the request has been made by the client.", + "format": "date-time" + }, + "PositionTicks": { + "type": "integer", + "description": "Gets or sets the position ticks.", + "format": "int64" + }, + "IsPlaying": { + "type": "boolean", + "description": "Gets or sets a value indicating whether the client playback is unpaused." + }, + "PlaylistItemId": { + "type": "string", + "description": "Gets or sets the playlist item identifier of the playing item.", + "format": "uuid" + } + }, + "additionalProperties": false, + "description": "Class ReadyRequest." + }, + "RecommendationDto": { + "type": "object", + "properties": { + "Items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseItemDto" + }, + "nullable": true + }, + "RecommendationType": { + "allOf": [ + { + "$ref": "#/components/schemas/RecommendationType" + } + ] + }, + "BaselineItemName": { + "type": "string", + "nullable": true + }, + "CategoryId": { + "type": "string", + "format": "uuid" + } + }, + "additionalProperties": false + }, + "RecommendationType": { + "enum": [ + "SimilarToRecentlyPlayed", + "SimilarToLikedItem", + "HasDirectorFromRecentlyPlayed", + "HasActorFromRecentlyPlayed", + "HasLikedDirector", + "HasLikedActor" + ], + "type": "string" + }, + "RecordingStatus": { + "enum": [ + "New", + "InProgress", + "Completed", + "Cancelled", + "ConflictedOk", + "ConflictedNotOk", + "Error" + ], + "type": "string" + }, + "RemoteImageInfo": { + "type": "object", + "properties": { + "ProviderName": { + "type": "string", + "description": "Gets or sets the name of the provider.", + "nullable": true + }, + "Url": { + "type": "string", + "description": "Gets or sets the URL.", + "nullable": true + }, + "ThumbnailUrl": { + "type": "string", + "description": "Gets or sets a url used for previewing a smaller version.", + "nullable": true + }, + "Height": { + "type": "integer", + "description": "Gets or sets the height.", + "format": "int32", + "nullable": true + }, + "Width": { + "type": "integer", + "description": "Gets or sets the width.", + "format": "int32", + "nullable": true + }, + "CommunityRating": { + "type": "number", + "description": "Gets or sets the community rating.", + "format": "double", + "nullable": true + }, + "VoteCount": { + "type": "integer", + "description": "Gets or sets the vote count.", + "format": "int32", + "nullable": true + }, + "Language": { + "type": "string", + "description": "Gets or sets the language.", + "nullable": true + }, + "Type": { + "allOf": [ + { + "$ref": "#/components/schemas/ImageType" + } + ], + "description": "Gets or sets the type." + }, + "RatingType": { + "allOf": [ + { + "$ref": "#/components/schemas/RatingType" + } + ], + "description": "Gets or sets the type of the rating." + } + }, + "additionalProperties": false, + "description": "Class RemoteImageInfo." + }, + "RemoteImageResult": { + "type": "object", + "properties": { + "Images": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteImageInfo" + }, + "description": "Gets or sets the images.", + "nullable": true + }, + "TotalRecordCount": { + "type": "integer", + "description": "Gets or sets the total record count.", + "format": "int32" + }, + "Providers": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Gets or sets the providers.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Class RemoteImageResult." + }, + "RemoteSearchResult": { + "type": "object", + "properties": { + "Name": { + "type": "string", + "description": "Gets or sets the name.", + "nullable": true + }, + "ProviderIds": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "description": "Gets or sets the provider ids.", + "nullable": true + }, + "ProductionYear": { + "type": "integer", + "description": "Gets or sets the year.", + "format": "int32", + "nullable": true + }, + "IndexNumber": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "IndexNumberEnd": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "ParentIndexNumber": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "PremiereDate": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "ImageUrl": { + "type": "string", + "nullable": true + }, + "SearchProviderName": { + "type": "string", + "nullable": true + }, + "Overview": { + "type": "string", + "nullable": true + }, + "AlbumArtist": { + "allOf": [ + { + "$ref": "#/components/schemas/RemoteSearchResult" + } + ], + "nullable": true + }, + "Artists": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RemoteSearchResult" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "RemoteSubtitleInfo": { + "type": "object", + "properties": { + "ThreeLetterISOLanguageName": { + "type": "string", + "nullable": true + }, + "Id": { + "type": "string", + "nullable": true + }, + "ProviderName": { + "type": "string", + "nullable": true + }, + "Name": { + "type": "string", + "nullable": true + }, + "Format": { + "type": "string", + "nullable": true + }, + "Author": { + "type": "string", + "nullable": true + }, + "Comment": { + "type": "string", + "nullable": true + }, + "DateCreated": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "CommunityRating": { + "type": "number", + "format": "float", + "nullable": true + }, + "DownloadCount": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "IsHashMatch": { + "type": "boolean", + "nullable": true + } + }, + "additionalProperties": false + }, + "RemoveFromPlaylistRequestDto": { + "type": "object", + "properties": { + "PlaylistItemIds": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "description": "Gets or sets the playlist identifiers ot the items. Ignored when clearing the playlist." + }, + "ClearPlaylist": { + "type": "boolean", + "description": "Gets or sets a value indicating whether the entire playlist should be cleared." + }, + "ClearPlayingItem": { + "type": "boolean", + "description": "Gets or sets a value indicating whether the playing item should be removed as well. Used only when clearing the playlist." + } + }, + "additionalProperties": false, + "description": "Class RemoveFromPlaylistRequestDto." + }, + "RepeatMode": { + "enum": [ + "RepeatNone", + "RepeatAll", + "RepeatOne" + ], + "type": "string" + }, + "RepositoryInfo": { + "type": "object", + "properties": { + "Name": { + "type": "string", + "description": "Gets or sets the name.", + "nullable": true + }, + "Url": { + "type": "string", + "description": "Gets or sets the URL.", + "nullable": true + }, + "Enabled": { + "type": "boolean", + "description": "Gets or sets a value indicating whether the repository is enabled." + } + }, + "additionalProperties": false, + "description": "Class RepositoryInfo." + }, + "ResponseProfile": { + "type": "object", + "properties": { + "Container": { + "type": "string", + "nullable": true + }, + "AudioCodec": { + "type": "string", + "nullable": true + }, + "VideoCodec": { + "type": "string", + "nullable": true + }, + "Type": { + "allOf": [ + { + "$ref": "#/components/schemas/DlnaProfileType" + } + ] + }, + "OrgPn": { + "type": "string", + "nullable": true + }, + "MimeType": { + "type": "string", + "nullable": true + }, + "Conditions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ProfileCondition" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "ScrollDirection": { + "enum": [ + "Horizontal", + "Vertical" + ], + "type": "string", + "description": "An enum representing the axis that should be scrolled." + }, + "SearchHint": { + "type": "object", + "properties": { + "ItemId": { + "type": "string", + "description": "Gets or sets the item id.", + "format": "uuid" + }, + "Id": { + "type": "string", + "format": "uuid" + }, + "Name": { + "type": "string", + "description": "Gets or sets the name.", + "nullable": true + }, + "MatchedTerm": { + "type": "string", + "description": "Gets or sets the matched term.", + "nullable": true + }, + "IndexNumber": { + "type": "integer", + "description": "Gets or sets the index number.", + "format": "int32", + "nullable": true + }, + "ProductionYear": { + "type": "integer", + "description": "Gets or sets the production year.", + "format": "int32", + "nullable": true + }, + "ParentIndexNumber": { + "type": "integer", + "description": "Gets or sets the parent index number.", + "format": "int32", + "nullable": true + }, + "PrimaryImageTag": { + "type": "string", + "description": "Gets or sets the image tag.", + "nullable": true + }, + "ThumbImageTag": { + "type": "string", + "description": "Gets or sets the thumb image tag.", + "nullable": true + }, + "ThumbImageItemId": { + "type": "string", + "description": "Gets or sets the thumb image item identifier.", + "nullable": true + }, + "BackdropImageTag": { + "type": "string", + "description": "Gets or sets the backdrop image tag.", + "nullable": true + }, + "BackdropImageItemId": { + "type": "string", + "description": "Gets or sets the backdrop image item identifier.", + "nullable": true + }, + "Type": { + "type": "string", + "description": "Gets or sets the type.", + "nullable": true + }, + "IsFolder": { + "type": "boolean", + "nullable": true + }, + "RunTimeTicks": { + "type": "integer", + "description": "Gets or sets the run time ticks.", + "format": "int64", + "nullable": true + }, + "MediaType": { + "type": "string", + "description": "Gets or sets the type of the media.", + "nullable": true + }, + "StartDate": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "EndDate": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "Series": { + "type": "string", + "description": "Gets or sets the series.", + "nullable": true + }, + "Status": { + "type": "string", + "nullable": true + }, + "Album": { + "type": "string", + "description": "Gets or sets the album.", + "nullable": true + }, + "AlbumId": { + "type": "string", + "format": "uuid" + }, + "AlbumArtist": { + "type": "string", + "description": "Gets or sets the album artist.", + "nullable": true + }, + "Artists": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Gets or sets the artists.", + "nullable": true + }, + "SongCount": { + "type": "integer", + "description": "Gets or sets the song count.", + "format": "int32", + "nullable": true + }, + "EpisodeCount": { + "type": "integer", + "description": "Gets or sets the episode count.", + "format": "int32", + "nullable": true + }, + "ChannelId": { + "type": "string", + "description": "Gets or sets the channel identifier.", + "format": "uuid" + }, + "ChannelName": { + "type": "string", + "description": "Gets or sets the name of the channel.", + "nullable": true + }, + "PrimaryImageAspectRatio": { + "type": "number", + "description": "Gets or sets the primary image aspect ratio.", + "format": "double", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Class SearchHintResult." + }, + "SearchHintResult": { + "type": "object", + "properties": { + "SearchHints": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SearchHint" + }, + "description": "Gets the search hints." + }, + "TotalRecordCount": { + "type": "integer", + "description": "Gets the total record count.", + "format": "int32" + } + }, + "additionalProperties": false, + "description": "Class SearchHintResult." + }, + "SeekRequestDto": { + "type": "object", + "properties": { + "PositionTicks": { + "type": "integer", + "description": "Gets or sets the position ticks.", + "format": "int64" + } + }, + "additionalProperties": false, + "description": "Class SeekRequestDto." + }, + "SendCommand": { + "type": "object", + "properties": { + "GroupId": { + "type": "string", + "description": "Gets the group identifier.", + "format": "uuid" + }, + "PlaylistItemId": { + "type": "string", + "description": "Gets the playlist identifier of the playing item.", + "format": "uuid" + }, + "When": { + "type": "string", + "description": "Gets or sets the UTC time when to execute the command.", + "format": "date-time" + }, + "PositionTicks": { + "type": "integer", + "description": "Gets the position ticks.", + "format": "int64", + "nullable": true + }, + "Command": { + "allOf": [ + { + "$ref": "#/components/schemas/SendCommandType" + } + ], + "description": "Gets the command." + }, + "EmittedAt": { + "type": "string", + "description": "Gets the UTC time when this command has been emitted.", + "format": "date-time" + } + }, + "additionalProperties": false, + "description": "Class SendCommand." + }, + "SendCommandType": { + "enum": [ + "Unpause", + "Pause", + "Stop", + "Seek" + ], + "type": "string", + "description": "Enum SendCommandType." + }, + "SendToUserType": { + "enum": [ + "All", + "Admins", + "Custom" + ], + "type": "string" + }, + "SeriesInfo": { + "type": "object", + "properties": { + "Name": { + "type": "string", + "description": "Gets or sets the name.", + "nullable": true + }, + "OriginalTitle": { + "type": "string", + "description": "Gets or sets the original title.", + "nullable": true + }, + "Path": { + "type": "string", + "description": "Gets or sets the path.", + "nullable": true + }, + "MetadataLanguage": { + "type": "string", + "description": "Gets or sets the metadata language.", + "nullable": true + }, + "MetadataCountryCode": { + "type": "string", + "description": "Gets or sets the metadata country code.", + "nullable": true + }, + "ProviderIds": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "description": "Gets or sets the provider ids.", + "nullable": true + }, + "Year": { + "type": "integer", + "description": "Gets or sets the year.", + "format": "int32", + "nullable": true + }, + "IndexNumber": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "ParentIndexNumber": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "PremiereDate": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "IsAutomated": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "SeriesInfoRemoteSearchQuery": { + "type": "object", + "properties": { + "SearchInfo": { + "allOf": [ + { + "$ref": "#/components/schemas/SeriesInfo" + } + ], + "nullable": true + }, + "ItemId": { + "type": "string", + "format": "uuid" + }, + "SearchProviderName": { + "type": "string", + "description": "Gets or sets the provider name to search within if set.", + "nullable": true + }, + "IncludeDisabledProviders": { + "type": "boolean", + "description": "Gets or sets a value indicating whether disabled providers should be included." + } + }, + "additionalProperties": false + }, + "SeriesStatus": { + "enum": [ + "Continuing", + "Ended" + ], + "type": "string", + "description": "Enum SeriesStatus." + }, + "SeriesTimerInfoDto": { + "type": "object", + "properties": { + "Id": { + "type": "string", + "description": "Gets or sets the Id of the recording.", + "nullable": true + }, + "Type": { + "type": "string", + "nullable": true + }, + "ServerId": { + "type": "string", + "description": "Gets or sets the server identifier.", + "nullable": true + }, + "ExternalId": { + "type": "string", + "description": "Gets or sets the external identifier.", + "nullable": true + }, + "ChannelId": { + "type": "string", + "description": "Gets or sets the channel id of the recording.", + "format": "uuid" + }, + "ExternalChannelId": { + "type": "string", + "description": "Gets or sets the external channel identifier.", + "nullable": true + }, + "ChannelName": { + "type": "string", + "description": "Gets or sets the channel name of the recording.", + "nullable": true + }, + "ChannelPrimaryImageTag": { + "type": "string", + "nullable": true + }, + "ProgramId": { + "type": "string", + "description": "Gets or sets the program identifier.", + "nullable": true + }, + "ExternalProgramId": { + "type": "string", + "description": "Gets or sets the external program identifier.", + "nullable": true + }, + "Name": { + "type": "string", + "description": "Gets or sets the name of the recording.", + "nullable": true + }, + "Overview": { + "type": "string", + "description": "Gets or sets the description of the recording.", + "nullable": true + }, + "StartDate": { + "type": "string", + "description": "Gets or sets the start date of the recording, in UTC.", + "format": "date-time" + }, + "EndDate": { + "type": "string", + "description": "Gets or sets the end date of the recording, in UTC.", + "format": "date-time" + }, + "ServiceName": { + "type": "string", + "description": "Gets or sets the name of the service.", + "nullable": true + }, + "Priority": { + "type": "integer", + "description": "Gets or sets the priority.", + "format": "int32" + }, + "PrePaddingSeconds": { + "type": "integer", + "description": "Gets or sets the pre padding seconds.", + "format": "int32" + }, + "PostPaddingSeconds": { + "type": "integer", + "description": "Gets or sets the post padding seconds.", + "format": "int32" + }, + "IsPrePaddingRequired": { + "type": "boolean", + "description": "Gets or sets a value indicating whether this instance is pre padding required." + }, + "ParentBackdropItemId": { + "type": "string", + "description": "Gets or sets the Id of the Parent that has a backdrop if the item does not have one.", + "nullable": true + }, + "ParentBackdropImageTags": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Gets or sets the parent backdrop image tags.", + "nullable": true + }, + "IsPostPaddingRequired": { + "type": "boolean", + "description": "Gets or sets a value indicating whether this instance is post padding required." + }, + "KeepUntil": { + "allOf": [ + { + "$ref": "#/components/schemas/KeepUntil" + } + ] + }, + "RecordAnyTime": { + "type": "boolean", + "description": "Gets or sets a value indicating whether [record any time]." + }, + "SkipEpisodesInLibrary": { + "type": "boolean" + }, + "RecordAnyChannel": { + "type": "boolean", + "description": "Gets or sets a value indicating whether [record any channel]." + }, + "KeepUpTo": { + "type": "integer", + "format": "int32" + }, + "RecordNewOnly": { + "type": "boolean", + "description": "Gets or sets a value indicating whether [record new only]." + }, + "Days": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DayOfWeek" + }, + "description": "Gets or sets the days.", + "nullable": true + }, + "DayPattern": { + "allOf": [ + { + "$ref": "#/components/schemas/DayPattern" + } + ], + "description": "Gets or sets the day pattern.", + "nullable": true + }, + "ImageTags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Gets or sets the image tags.", + "nullable": true + }, + "ParentThumbItemId": { + "type": "string", + "description": "Gets or sets the parent thumb item id.", + "nullable": true + }, + "ParentThumbImageTag": { + "type": "string", + "description": "Gets or sets the parent thumb image tag.", + "nullable": true + }, + "ParentPrimaryImageItemId": { + "type": "string", + "description": "Gets or sets the parent primary image item identifier.", + "nullable": true + }, + "ParentPrimaryImageTag": { + "type": "string", + "description": "Gets or sets the parent primary image tag.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Class SeriesTimerInfoDto." + }, + "SeriesTimerInfoDtoQueryResult": { + "type": "object", + "properties": { + "Items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SeriesTimerInfoDto" + }, + "description": "Gets or sets the items.", + "nullable": true + }, + "TotalRecordCount": { + "type": "integer", + "description": "Gets or sets the total number of records available.", + "format": "int32" + }, + "StartIndex": { + "type": "integer", + "description": "Gets or sets the index of the first record in Items.", + "format": "int32" + } + }, + "additionalProperties": false + }, + "ServerConfiguration": { + "type": "object", + "properties": { + "LogFileRetentionDays": { + "type": "integer", + "description": "Gets or sets the number of days we should retain log files.", + "format": "int32" + }, + "IsStartupWizardCompleted": { + "type": "boolean", + "description": "Gets or sets a value indicating whether this instance is first run." + }, + "CachePath": { + "type": "string", + "description": "Gets or sets the cache path.", + "nullable": true + }, + "PreviousVersion": { + "type": "string", + "description": "Gets or sets the last known version that was ran using the configuration.", + "nullable": true + }, + "PreviousVersionStr": { + "type": "string", + "description": "Gets or sets the stringified PreviousVersion to be stored/loaded,\r\nbecause System.Version itself isn't xml-serializable.", + "nullable": true + }, + "EnableMetrics": { + "type": "boolean", + "description": "Gets or sets a value indicating whether to enable prometheus metrics exporting." + }, + "EnableNormalizedItemByNameIds": { + "type": "boolean" + }, + "IsPortAuthorized": { + "type": "boolean", + "description": "Gets or sets a value indicating whether this instance is port authorized." + }, + "QuickConnectAvailable": { + "type": "boolean", + "description": "Gets or sets a value indicating whether quick connect is available for use on this server." + }, + "EnableCaseSensitiveItemIds": { + "type": "boolean", + "description": "Gets or sets a value indicating whether [enable case sensitive item ids]." + }, + "DisableLiveTvChannelUserDataName": { + "type": "boolean" + }, + "MetadataPath": { + "type": "string", + "description": "Gets or sets the metadata path." + }, + "MetadataNetworkPath": { + "type": "string" + }, + "PreferredMetadataLanguage": { + "type": "string", + "description": "Gets or sets the preferred metadata language." + }, + "MetadataCountryCode": { + "type": "string", + "description": "Gets or sets the metadata country code." + }, + "SortReplaceCharacters": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Gets or sets characters to be replaced with a ' ' in strings to create a sort name." + }, + "SortRemoveCharacters": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Gets or sets characters to be removed from strings to create a sort name." + }, + "SortRemoveWords": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Gets or sets words to be removed from strings to create a sort name." + }, + "MinResumePct": { + "type": "integer", + "description": "Gets or sets the minimum percentage of an item that must be played in order for playstate to be updated.", + "format": "int32" + }, + "MaxResumePct": { + "type": "integer", + "description": "Gets or sets the maximum percentage of an item that can be played while still saving playstate. If this percentage is crossed playstate will be reset to the beginning and the item will be marked watched.", + "format": "int32" + }, + "MinResumeDurationSeconds": { + "type": "integer", + "description": "Gets or sets the minimum duration that an item must have in order to be eligible for playstate updates..", + "format": "int32" + }, + "MinAudiobookResume": { + "type": "integer", + "description": "Gets or sets the minimum minutes of a book that must be played in order for playstate to be updated.", + "format": "int32" + }, + "MaxAudiobookResume": { + "type": "integer", + "description": "Gets or sets the remaining minutes of a book that can be played while still saving playstate. If this percentage is crossed playstate will be reset to the beginning and the item will be marked watched.", + "format": "int32" + }, + "LibraryMonitorDelay": { + "type": "integer", + "description": "Gets or sets the delay in seconds that we will wait after a file system change to try and discover what has been added/removed\r\nSome delay is necessary with some items because their creation is not atomic. It involves the creation of several\r\ndifferent directories and files.", + "format": "int32" + }, + "ImageSavingConvention": { + "allOf": [ + { + "$ref": "#/components/schemas/ImageSavingConvention" + } + ], + "description": "Gets or sets the image saving convention." + }, + "MetadataOptions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MetadataOptions" + } + }, + "SkipDeserializationForBasicTypes": { + "type": "boolean" + }, + "ServerName": { + "type": "string" + }, + "UICulture": { + "type": "string" + }, + "SaveMetadataHidden": { + "type": "boolean" + }, + "ContentTypes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NameValuePair" + } + }, + "RemoteClientBitrateLimit": { + "type": "integer", + "format": "int32" + }, + "EnableFolderView": { + "type": "boolean" + }, + "EnableGroupingIntoCollections": { + "type": "boolean" + }, + "DisplaySpecialsWithinSeasons": { + "type": "boolean" + }, + "CodecsUsed": { + "type": "array", + "items": { + "type": "string" + } + }, + "PluginRepositories": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RepositoryInfo" + } + }, + "EnableExternalContentInSuggestions": { + "type": "boolean" + }, + "ImageExtractionTimeoutMs": { + "type": "integer", + "format": "int32" + }, + "PathSubstitutions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PathSubstitution" + } + }, + "EnableSlowResponseWarning": { + "type": "boolean", + "description": "Gets or sets a value indicating whether slow server responses should be logged as a warning." + }, + "SlowResponseThresholdMs": { + "type": "integer", + "description": "Gets or sets the threshold for the slow response time warning in ms.", + "format": "int64" + }, + "CorsHosts": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Gets or sets the cors hosts." + }, + "ActivityLogRetentionDays": { + "type": "integer", + "description": "Gets or sets the number of days we should retain activity logs.", + "format": "int32", + "nullable": true + }, + "LibraryScanFanoutConcurrency": { + "type": "integer", + "description": "Gets or sets the how the library scan fans out.", + "format": "int32" + }, + "LibraryMetadataRefreshConcurrency": { + "type": "integer", + "description": "Gets or sets the how many metadata refreshes can run concurrently.", + "format": "int32" + }, + "RemoveOldPlugins": { + "type": "boolean", + "description": "Gets or sets a value indicating whether older plugins should automatically be deleted from the plugin folder." + }, + "AllowClientLogUpload": { + "type": "boolean", + "description": "Gets or sets a value indicating whether clients should be allowed to upload logs." + } + }, + "additionalProperties": false, + "description": "Represents the server configuration." + }, + "ServerDiscoveryInfo": { + "type": "object", + "properties": { + "Address": { + "type": "string", + "description": "Gets the address." + }, + "Id": { + "type": "string", + "description": "Gets the server identifier." + }, + "Name": { + "type": "string", + "description": "Gets the name." + }, + "EndpointAddress": { + "type": "string", + "description": "Gets the endpoint address.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "The server discovery info model." + }, + "SessionInfo": { + "type": "object", + "properties": { + "PlayState": { + "allOf": [ + { + "$ref": "#/components/schemas/PlayerStateInfo" + } + ], + "nullable": true + }, + "AdditionalUsers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SessionUserInfo" + }, + "nullable": true + }, + "Capabilities": { + "allOf": [ + { + "$ref": "#/components/schemas/ClientCapabilities" + } + ], + "nullable": true + }, + "RemoteEndPoint": { + "type": "string", + "description": "Gets or sets the remote end point.", + "nullable": true + }, + "PlayableMediaTypes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Gets the playable media types.", + "nullable": true, + "readOnly": true + }, + "Id": { + "type": "string", + "description": "Gets or sets the id.", + "nullable": true + }, + "UserId": { + "type": "string", + "description": "Gets or sets the user id.", + "format": "uuid" + }, + "UserName": { + "type": "string", + "description": "Gets or sets the username.", + "nullable": true + }, + "Client": { + "type": "string", + "description": "Gets or sets the type of the client.", + "nullable": true + }, + "LastActivityDate": { + "type": "string", + "description": "Gets or sets the last activity date.", + "format": "date-time" + }, + "LastPlaybackCheckIn": { + "type": "string", + "description": "Gets or sets the last playback check in.", + "format": "date-time" + }, + "DeviceName": { + "type": "string", + "description": "Gets or sets the name of the device.", + "nullable": true + }, + "DeviceType": { + "type": "string", + "description": "Gets or sets the type of the device.", + "nullable": true + }, + "NowPlayingItem": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseItemDto" + } + ], + "description": "This is strictly used as a data transfer object from the api layer.\r\nThis holds information about a BaseItem in a format that is convenient for the client.", + "nullable": true + }, + "FullNowPlayingItem": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseItem" + } + ], + "description": "Class BaseItem.", + "nullable": true + }, + "NowViewingItem": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseItemDto" + } + ], + "description": "This is strictly used as a data transfer object from the api layer.\r\nThis holds information about a BaseItem in a format that is convenient for the client.", + "nullable": true + }, + "DeviceId": { + "type": "string", + "description": "Gets or sets the device id.", + "nullable": true + }, + "ApplicationVersion": { + "type": "string", + "description": "Gets or sets the application version.", + "nullable": true + }, + "TranscodingInfo": { + "allOf": [ + { + "$ref": "#/components/schemas/TranscodingInfo" + } + ], + "nullable": true + }, + "IsActive": { + "type": "boolean", + "description": "Gets a value indicating whether this instance is active.", + "readOnly": true + }, + "SupportsMediaControl": { + "type": "boolean", + "readOnly": true + }, + "SupportsRemoteControl": { + "type": "boolean", + "readOnly": true + }, + "NowPlayingQueue": { + "type": "array", + "items": { + "$ref": "#/components/schemas/QueueItem" + }, + "nullable": true + }, + "NowPlayingQueueFullItems": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseItemDto" + }, + "nullable": true + }, + "HasCustomDeviceName": { + "type": "boolean" + }, + "PlaylistItemId": { + "type": "string", + "nullable": true + }, + "ServerId": { + "type": "string", + "nullable": true + }, + "UserPrimaryImageTag": { + "type": "string", + "nullable": true + }, + "SupportedCommands": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GeneralCommandType" + }, + "description": "Gets the supported commands.", + "nullable": true, + "readOnly": true + } + }, + "additionalProperties": false, + "description": "Class SessionInfo." + }, + "SessionMessageType": { + "enum": [ + "ForceKeepAlive", + "GeneralCommand", + "UserDataChanged", + "Sessions", + "Play", + "SyncPlayCommand", + "SyncPlayGroupUpdate", + "Playstate", + "RestartRequired", + "ServerShuttingDown", + "ServerRestarting", + "LibraryChanged", + "UserDeleted", + "UserUpdated", + "SeriesTimerCreated", + "TimerCreated", + "SeriesTimerCancelled", + "TimerCancelled", + "RefreshProgress", + "ScheduledTaskEnded", + "PackageInstallationCancelled", + "PackageInstallationFailed", + "PackageInstallationCompleted", + "PackageInstalling", + "PackageUninstalled", + "ActivityLogEntry", + "ScheduledTasksInfo", + "ActivityLogEntryStart", + "ActivityLogEntryStop", + "SessionsStart", + "SessionsStop", + "ScheduledTasksInfoStart", + "ScheduledTasksInfoStop", + "KeepAlive" + ], + "type": "string", + "description": "The different kinds of messages that are used in the WebSocket api." + }, + "SessionUserInfo": { + "type": "object", + "properties": { + "UserId": { + "type": "string", + "description": "Gets or sets the user identifier.", + "format": "uuid" + }, + "UserName": { + "type": "string", + "description": "Gets or sets the name of the user.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Class SessionUserInfo." + }, + "SetChannelMappingDto": { + "required": [ + "ProviderChannelId", + "ProviderId", + "TunerChannelId" + ], + "type": "object", + "properties": { + "ProviderId": { + "type": "string", + "description": "Gets or sets the provider id." + }, + "TunerChannelId": { + "type": "string", + "description": "Gets or sets the tuner channel id." + }, + "ProviderChannelId": { + "type": "string", + "description": "Gets or sets the provider channel id." + } + }, + "additionalProperties": false, + "description": "Set channel mapping dto." + }, + "SetPlaylistItemRequestDto": { + "type": "object", + "properties": { + "PlaylistItemId": { + "type": "string", + "description": "Gets or sets the playlist identifier of the playing item.", + "format": "uuid" + } + }, + "additionalProperties": false, + "description": "Class SetPlaylistItemRequestDto." + }, + "SetRepeatModeRequestDto": { + "type": "object", + "properties": { + "Mode": { + "allOf": [ + { + "$ref": "#/components/schemas/GroupRepeatMode" + } + ], + "description": "Gets or sets the repeat mode." + } + }, + "additionalProperties": false, + "description": "Class SetRepeatModeRequestDto." + }, + "SetShuffleModeRequestDto": { + "type": "object", + "properties": { + "Mode": { + "allOf": [ + { + "$ref": "#/components/schemas/GroupShuffleMode" + } + ], + "description": "Gets or sets the shuffle mode." + } + }, + "additionalProperties": false, + "description": "Class SetShuffleModeRequestDto." + }, + "SongInfo": { + "type": "object", + "properties": { + "Name": { + "type": "string", + "description": "Gets or sets the name.", + "nullable": true + }, + "OriginalTitle": { + "type": "string", + "description": "Gets or sets the original title.", + "nullable": true + }, + "Path": { + "type": "string", + "description": "Gets or sets the path.", + "nullable": true + }, + "MetadataLanguage": { + "type": "string", + "description": "Gets or sets the metadata language.", + "nullable": true + }, + "MetadataCountryCode": { + "type": "string", + "description": "Gets or sets the metadata country code.", + "nullable": true + }, + "ProviderIds": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "description": "Gets or sets the provider ids.", + "nullable": true + }, + "Year": { + "type": "integer", + "description": "Gets or sets the year.", + "format": "int32", + "nullable": true + }, + "IndexNumber": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "ParentIndexNumber": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "PremiereDate": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "IsAutomated": { + "type": "boolean" + }, + "AlbumArtists": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "Album": { + "type": "string", + "nullable": true + }, + "Artists": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "SortOrder": { + "enum": [ + "Ascending", + "Descending" + ], + "type": "string", + "description": "An enum representing the sorting order." + }, + "SpecialViewOptionDto": { + "type": "object", + "properties": { + "Name": { + "type": "string", + "description": "Gets or sets view option name.", + "nullable": true + }, + "Id": { + "type": "string", + "description": "Gets or sets view option id.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Special view option dto." + }, + "StartupConfigurationDto": { + "type": "object", + "properties": { + "UICulture": { + "type": "string", + "description": "Gets or sets UI language culture.", + "nullable": true + }, + "MetadataCountryCode": { + "type": "string", + "description": "Gets or sets the metadata country code.", + "nullable": true + }, + "PreferredMetadataLanguage": { + "type": "string", + "description": "Gets or sets the preferred language for the metadata.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "The startup configuration DTO." + }, + "StartupRemoteAccessDto": { + "required": [ + "EnableAutomaticPortMapping", + "EnableRemoteAccess" + ], + "type": "object", + "properties": { + "EnableRemoteAccess": { + "type": "boolean", + "description": "Gets or sets a value indicating whether enable remote access." + }, + "EnableAutomaticPortMapping": { + "type": "boolean", + "description": "Gets or sets a value indicating whether enable automatic port mapping." + } + }, + "additionalProperties": false, + "description": "Startup remote access dto." + }, + "StartupUserDto": { + "type": "object", + "properties": { + "Name": { + "type": "string", + "description": "Gets or sets the username.", + "nullable": true + }, + "Password": { + "type": "string", + "description": "Gets or sets the user's password.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "The startup user DTO." + }, + "SubtitleDeliveryMethod": { + "enum": [ + "Encode", + "Embed", + "External", + "Hls", + "Drop" + ], + "type": "string", + "description": "Delivery method to use during playback of a specific subtitle format." + }, + "SubtitleOptions": { + "type": "object", + "properties": { + "SkipIfEmbeddedSubtitlesPresent": { + "type": "boolean" + }, + "SkipIfAudioTrackMatches": { + "type": "boolean" + }, + "DownloadLanguages": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "DownloadMovieSubtitles": { + "type": "boolean" + }, + "DownloadEpisodeSubtitles": { + "type": "boolean" + }, + "OpenSubtitlesUsername": { + "type": "string", + "nullable": true + }, + "OpenSubtitlesPasswordHash": { + "type": "string", + "nullable": true + }, + "IsOpenSubtitleVipAccount": { + "type": "boolean" + }, + "RequirePerfectMatch": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "SubtitlePlaybackMode": { + "enum": [ + "Default", + "Always", + "OnlyForced", + "None", + "Smart" + ], + "type": "string", + "description": "An enum representing a subtitle playback mode." + }, + "SubtitleProfile": { + "type": "object", + "properties": { + "Format": { + "type": "string", + "nullable": true + }, + "Method": { + "allOf": [ + { + "$ref": "#/components/schemas/SubtitleDeliveryMethod" + } + ], + "description": "Delivery method to use during playback of a specific subtitle format." + }, + "DidlMode": { + "type": "string", + "nullable": true + }, + "Language": { + "type": "string", + "nullable": true + }, + "Container": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "SyncPlayUserAccessType": { + "enum": [ + "CreateAndJoinGroups", + "JoinGroups", + "None" + ], + "type": "string", + "description": "Enum SyncPlayUserAccessType." + }, + "SystemInfo": { + "type": "object", + "properties": { + "LocalAddress": { + "type": "string", + "description": "Gets or sets the local address.", + "nullable": true + }, + "ServerName": { + "type": "string", + "description": "Gets or sets the name of the server.", + "nullable": true + }, + "Version": { + "type": "string", + "description": "Gets or sets the server version.", + "nullable": true + }, + "ProductName": { + "type": "string", + "description": "Gets or sets the product name. This is the AssemblyProduct name.", + "nullable": true + }, + "OperatingSystem": { + "type": "string", + "description": "Gets or sets the operating system.", + "nullable": true + }, + "Id": { + "type": "string", + "description": "Gets or sets the id.", + "nullable": true + }, + "StartupWizardCompleted": { + "type": "boolean", + "description": "Gets or sets a value indicating whether the startup wizard is completed.", + "nullable": true + }, + "OperatingSystemDisplayName": { + "type": "string", + "description": "Gets or sets the display name of the operating system.", + "nullable": true + }, + "PackageName": { + "type": "string", + "description": "Gets or sets the package name.", + "nullable": true + }, + "HasPendingRestart": { + "type": "boolean", + "description": "Gets or sets a value indicating whether this instance has pending restart." + }, + "IsShuttingDown": { + "type": "boolean" + }, + "SupportsLibraryMonitor": { + "type": "boolean", + "description": "Gets or sets a value indicating whether [supports library monitor]." + }, + "WebSocketPortNumber": { + "type": "integer", + "description": "Gets or sets the web socket port number.", + "format": "int32" + }, + "CompletedInstallations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/InstallationInfo" + }, + "description": "Gets or sets the completed installations.", + "nullable": true + }, + "CanSelfRestart": { + "type": "boolean", + "description": "Gets or sets a value indicating whether this instance can self restart." + }, + "CanLaunchWebBrowser": { + "type": "boolean" + }, + "ProgramDataPath": { + "type": "string", + "description": "Gets or sets the program data path.", + "nullable": true + }, + "WebPath": { + "type": "string", + "description": "Gets or sets the web UI resources path.", + "nullable": true + }, + "ItemsByNamePath": { + "type": "string", + "description": "Gets or sets the items by name path.", + "nullable": true + }, + "CachePath": { + "type": "string", + "description": "Gets or sets the cache path.", + "nullable": true + }, + "LogPath": { + "type": "string", + "description": "Gets or sets the log path.", + "nullable": true + }, + "InternalMetadataPath": { + "type": "string", + "description": "Gets or sets the internal metadata path.", + "nullable": true + }, + "TranscodingTempPath": { + "type": "string", + "description": "Gets or sets the transcode path.", + "nullable": true + }, + "HasUpdateAvailable": { + "type": "boolean", + "description": "Gets or sets a value indicating whether this instance has update available.", + "deprecated": true + }, + "EncoderLocation": { + "allOf": [ + { + "$ref": "#/components/schemas/FFmpegLocation" + } + ], + "description": "Enum describing the location of the FFmpeg tool.", + "deprecated": true + }, + "SystemArchitecture": { + "allOf": [ + { + "$ref": "#/components/schemas/Architecture" + } + ] + } + }, + "additionalProperties": false, + "description": "Class SystemInfo." + }, + "TaskCompletionStatus": { + "enum": [ + "Completed", + "Failed", + "Cancelled", + "Aborted" + ], + "type": "string", + "description": "Enum TaskCompletionStatus." + }, + "TaskInfo": { + "type": "object", + "properties": { + "Name": { + "type": "string", + "description": "Gets or sets the name.", + "nullable": true + }, + "State": { + "allOf": [ + { + "$ref": "#/components/schemas/TaskState" + } + ], + "description": "Gets or sets the state of the task." + }, + "CurrentProgressPercentage": { + "type": "number", + "description": "Gets or sets the progress.", + "format": "double", + "nullable": true + }, + "Id": { + "type": "string", + "description": "Gets or sets the id.", + "nullable": true + }, + "LastExecutionResult": { + "allOf": [ + { + "$ref": "#/components/schemas/TaskResult" + } + ], + "description": "Gets or sets the last execution result.", + "nullable": true + }, + "Triggers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TaskTriggerInfo" + }, + "description": "Gets or sets the triggers.", + "nullable": true + }, + "Description": { + "type": "string", + "description": "Gets or sets the description.", + "nullable": true + }, + "Category": { + "type": "string", + "description": "Gets or sets the category.", + "nullable": true + }, + "IsHidden": { + "type": "boolean", + "description": "Gets or sets a value indicating whether this instance is hidden." + }, + "Key": { + "type": "string", + "description": "Gets or sets the key.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Class TaskInfo." + }, + "TaskResult": { + "type": "object", + "properties": { + "StartTimeUtc": { + "type": "string", + "description": "Gets or sets the start time UTC.", + "format": "date-time" + }, + "EndTimeUtc": { + "type": "string", + "description": "Gets or sets the end time UTC.", + "format": "date-time" + }, + "Status": { + "allOf": [ + { + "$ref": "#/components/schemas/TaskCompletionStatus" + } + ], + "description": "Gets or sets the status." + }, + "Name": { + "type": "string", + "description": "Gets or sets the name.", + "nullable": true + }, + "Key": { + "type": "string", + "description": "Gets or sets the key.", + "nullable": true + }, + "Id": { + "type": "string", + "description": "Gets or sets the id.", + "nullable": true + }, + "ErrorMessage": { + "type": "string", + "description": "Gets or sets the error message.", + "nullable": true + }, + "LongErrorMessage": { + "type": "string", + "description": "Gets or sets the long error message.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Class TaskExecutionInfo." + }, + "TaskState": { + "enum": [ + "Idle", + "Cancelling", + "Running" + ], + "type": "string", + "description": "Enum TaskState." + }, + "TaskTriggerInfo": { + "type": "object", + "properties": { + "Type": { + "type": "string", + "description": "Gets or sets the type.", + "nullable": true + }, + "TimeOfDayTicks": { + "type": "integer", + "description": "Gets or sets the time of day.", + "format": "int64", + "nullable": true + }, + "IntervalTicks": { + "type": "integer", + "description": "Gets or sets the interval.", + "format": "int64", + "nullable": true + }, + "DayOfWeek": { + "allOf": [ + { + "$ref": "#/components/schemas/DayOfWeek" + } + ], + "description": "Gets or sets the day of week.", + "nullable": true + }, + "MaxRuntimeTicks": { + "type": "integer", + "description": "Gets or sets the maximum runtime ticks.", + "format": "int64", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Class TaskTriggerInfo." + }, + "ThemeMediaResult": { + "type": "object", + "properties": { + "Items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BaseItemDto" + }, + "description": "Gets or sets the items.", + "nullable": true + }, + "TotalRecordCount": { + "type": "integer", + "description": "Gets or sets the total number of records available.", + "format": "int32" + }, + "StartIndex": { + "type": "integer", + "description": "Gets or sets the index of the first record in Items.", + "format": "int32" + }, + "OwnerId": { + "type": "string", + "description": "Gets or sets the owner id.", + "format": "uuid" + } + }, + "additionalProperties": false, + "description": "Class ThemeMediaResult." + }, + "TimerEventInfo": { + "type": "object", + "properties": { + "Id": { + "type": "string" + }, + "ProgramId": { + "type": "string", + "format": "uuid", + "nullable": true + } + }, + "additionalProperties": false + }, + "TimerInfoDto": { + "type": "object", + "properties": { + "Id": { + "type": "string", + "description": "Gets or sets the Id of the recording.", + "nullable": true + }, + "Type": { + "type": "string", + "nullable": true + }, + "ServerId": { + "type": "string", + "description": "Gets or sets the server identifier.", + "nullable": true + }, + "ExternalId": { + "type": "string", + "description": "Gets or sets the external identifier.", + "nullable": true + }, + "ChannelId": { + "type": "string", + "description": "Gets or sets the channel id of the recording.", + "format": "uuid" + }, + "ExternalChannelId": { + "type": "string", + "description": "Gets or sets the external channel identifier.", + "nullable": true + }, + "ChannelName": { + "type": "string", + "description": "Gets or sets the channel name of the recording.", + "nullable": true + }, + "ChannelPrimaryImageTag": { + "type": "string", + "nullable": true + }, + "ProgramId": { + "type": "string", + "description": "Gets or sets the program identifier.", + "nullable": true + }, + "ExternalProgramId": { + "type": "string", + "description": "Gets or sets the external program identifier.", + "nullable": true + }, + "Name": { + "type": "string", + "description": "Gets or sets the name of the recording.", + "nullable": true + }, + "Overview": { + "type": "string", + "description": "Gets or sets the description of the recording.", + "nullable": true + }, + "StartDate": { + "type": "string", + "description": "Gets or sets the start date of the recording, in UTC.", + "format": "date-time" + }, + "EndDate": { + "type": "string", + "description": "Gets or sets the end date of the recording, in UTC.", + "format": "date-time" + }, + "ServiceName": { + "type": "string", + "description": "Gets or sets the name of the service.", + "nullable": true + }, + "Priority": { + "type": "integer", + "description": "Gets or sets the priority.", + "format": "int32" + }, + "PrePaddingSeconds": { + "type": "integer", + "description": "Gets or sets the pre padding seconds.", + "format": "int32" + }, + "PostPaddingSeconds": { + "type": "integer", + "description": "Gets or sets the post padding seconds.", + "format": "int32" + }, + "IsPrePaddingRequired": { + "type": "boolean", + "description": "Gets or sets a value indicating whether this instance is pre padding required." + }, + "ParentBackdropItemId": { + "type": "string", + "description": "Gets or sets the Id of the Parent that has a backdrop if the item does not have one.", + "nullable": true + }, + "ParentBackdropImageTags": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Gets or sets the parent backdrop image tags.", + "nullable": true + }, + "IsPostPaddingRequired": { + "type": "boolean", + "description": "Gets or sets a value indicating whether this instance is post padding required." + }, + "KeepUntil": { + "allOf": [ + { + "$ref": "#/components/schemas/KeepUntil" + } + ] + }, + "Status": { + "allOf": [ + { + "$ref": "#/components/schemas/RecordingStatus" + } + ], + "description": "Gets or sets the status." + }, + "SeriesTimerId": { + "type": "string", + "description": "Gets or sets the series timer identifier.", + "nullable": true + }, + "ExternalSeriesTimerId": { + "type": "string", + "description": "Gets or sets the external series timer identifier.", + "nullable": true + }, + "RunTimeTicks": { + "type": "integer", + "description": "Gets or sets the run time ticks.", + "format": "int64", + "nullable": true + }, + "ProgramInfo": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseItemDto" + } + ], + "description": "Gets or sets the program information.", + "nullable": true + } + }, + "additionalProperties": false + }, + "TimerInfoDtoQueryResult": { + "type": "object", + "properties": { + "Items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TimerInfoDto" + }, + "description": "Gets or sets the items.", + "nullable": true + }, + "TotalRecordCount": { + "type": "integer", + "description": "Gets or sets the total number of records available.", + "format": "int32" + }, + "StartIndex": { + "type": "integer", + "description": "Gets or sets the index of the first record in Items.", + "format": "int32" + } + }, + "additionalProperties": false + }, + "TrailerInfo": { + "type": "object", + "properties": { + "Name": { + "type": "string", + "description": "Gets or sets the name.", + "nullable": true + }, + "OriginalTitle": { + "type": "string", + "description": "Gets or sets the original title.", + "nullable": true + }, + "Path": { + "type": "string", + "description": "Gets or sets the path.", + "nullable": true + }, + "MetadataLanguage": { + "type": "string", + "description": "Gets or sets the metadata language.", + "nullable": true + }, + "MetadataCountryCode": { + "type": "string", + "description": "Gets or sets the metadata country code.", + "nullable": true + }, + "ProviderIds": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "description": "Gets or sets the provider ids.", + "nullable": true + }, + "Year": { + "type": "integer", + "description": "Gets or sets the year.", + "format": "int32", + "nullable": true + }, + "IndexNumber": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "ParentIndexNumber": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "PremiereDate": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "IsAutomated": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "TrailerInfoRemoteSearchQuery": { + "type": "object", + "properties": { + "SearchInfo": { + "allOf": [ + { + "$ref": "#/components/schemas/TrailerInfo" + } + ], + "nullable": true + }, + "ItemId": { + "type": "string", + "format": "uuid" + }, + "SearchProviderName": { + "type": "string", + "description": "Gets or sets the provider name to search within if set.", + "nullable": true + }, + "IncludeDisabledProviders": { + "type": "boolean", + "description": "Gets or sets a value indicating whether disabled providers should be included." + } + }, + "additionalProperties": false + }, + "TranscodeReason": { + "enum": [ + "ContainerNotSupported", + "VideoCodecNotSupported", + "AudioCodecNotSupported", + "SubtitleCodecNotSupported", + "AudioIsExternal", + "SecondaryAudioNotSupported", + "VideoProfileNotSupported", + "VideoLevelNotSupported", + "VideoResolutionNotSupported", + "VideoBitDepthNotSupported", + "VideoFramerateNotSupported", + "RefFramesNotSupported", + "AnamorphicVideoNotSupported", + "InterlacedVideoNotSupported", + "AudioChannelsNotSupported", + "AudioProfileNotSupported", + "AudioSampleRateNotSupported", + "AudioBitDepthNotSupported", + "ContainerBitrateExceedsLimit", + "VideoBitrateNotSupported", + "AudioBitrateNotSupported", + "UnknownVideoStreamInfo", + "UnknownAudioStreamInfo", + "DirectPlayError", + "VideoRangeTypeNotSupported" + ], + "type": "string" + }, + "TranscodeSeekInfo": { + "enum": [ + "Auto", + "Bytes" + ], + "type": "string" + }, + "TranscodingInfo": { + "type": "object", + "properties": { + "AudioCodec": { + "type": "string", + "nullable": true + }, + "VideoCodec": { + "type": "string", + "nullable": true + }, + "Container": { + "type": "string", + "nullable": true + }, + "IsVideoDirect": { + "type": "boolean" + }, + "IsAudioDirect": { + "type": "boolean" + }, + "Bitrate": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "Framerate": { + "type": "number", + "format": "float", + "nullable": true + }, + "CompletionPercentage": { + "type": "number", + "format": "double", + "nullable": true + }, + "Width": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "Height": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "AudioChannels": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "HardwareAccelerationType": { + "allOf": [ + { + "$ref": "#/components/schemas/HardwareEncodingType" + } + ], + "nullable": true + }, + "TranscodeReasons": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TranscodeReason" + } + } + }, + "additionalProperties": false + }, + "TranscodingProfile": { + "type": "object", + "properties": { + "Container": { + "type": "string" + }, + "Type": { + "allOf": [ + { + "$ref": "#/components/schemas/DlnaProfileType" + } + ] + }, + "VideoCodec": { + "type": "string" + }, + "AudioCodec": { + "type": "string" + }, + "Protocol": { + "type": "string" + }, + "EstimateContentLength": { + "type": "boolean", + "default": false + }, + "EnableMpegtsM2TsMode": { + "type": "boolean", + "default": false + }, + "TranscodeSeekInfo": { + "allOf": [ + { + "$ref": "#/components/schemas/TranscodeSeekInfo" + } + ], + "default": "Auto" + }, + "CopyTimestamps": { + "type": "boolean", + "default": false + }, + "Context": { + "allOf": [ + { + "$ref": "#/components/schemas/EncodingContext" + } + ], + "default": "Streaming" + }, + "EnableSubtitlesInManifest": { + "type": "boolean", + "default": false + }, + "MaxAudioChannels": { + "type": "string", + "nullable": true + }, + "MinSegments": { + "type": "integer", + "format": "int32", + "default": 0 + }, + "SegmentLength": { + "type": "integer", + "format": "int32", + "default": 0 + }, + "BreakOnNonKeyFrames": { + "type": "boolean", + "default": false + }, + "Conditions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ProfileCondition" + } + } + }, + "additionalProperties": false + }, + "TransportStreamTimestamp": { + "enum": [ + "None", + "Zero", + "Valid" + ], + "type": "string" + }, + "TunerChannelMapping": { + "type": "object", + "properties": { + "Name": { + "type": "string", + "nullable": true + }, + "ProviderChannelName": { + "type": "string", + "nullable": true + }, + "ProviderChannelId": { + "type": "string", + "nullable": true + }, + "Id": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "TunerHostInfo": { + "type": "object", + "properties": { + "Id": { + "type": "string", + "nullable": true + }, + "Url": { + "type": "string", + "nullable": true + }, + "Type": { + "type": "string", + "nullable": true + }, + "DeviceId": { + "type": "string", + "nullable": true + }, + "FriendlyName": { + "type": "string", + "nullable": true + }, + "ImportFavoritesOnly": { + "type": "boolean" + }, + "AllowHWTranscoding": { + "type": "boolean" + }, + "EnableStreamLooping": { + "type": "boolean" + }, + "Source": { + "type": "string", + "nullable": true + }, + "TunerCount": { + "type": "integer", + "format": "int32" + }, + "UserAgent": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "TypeOptions": { + "type": "object", + "properties": { + "Type": { + "type": "string", + "nullable": true + }, + "MetadataFetchers": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "MetadataFetcherOrder": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "ImageFetchers": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "ImageFetcherOrder": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "ImageOptions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ImageOption" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "UnratedItem": { + "enum": [ + "Movie", + "Trailer", + "Series", + "Music", + "Book", + "LiveTvChannel", + "LiveTvProgram", + "ChannelContent", + "Other" + ], + "type": "string", + "description": "An enum representing an unrated item." + }, + "UpdateLibraryOptionsDto": { + "type": "object", + "properties": { + "Id": { + "type": "string", + "description": "Gets or sets the library item id.", + "format": "uuid" + }, + "LibraryOptions": { + "allOf": [ + { + "$ref": "#/components/schemas/LibraryOptions" + } + ], + "description": "Gets or sets library options.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Update library options dto." + }, + "UpdateMediaPathRequestDto": { + "required": [ + "Name", + "PathInfo" + ], + "type": "object", + "properties": { + "Name": { + "type": "string", + "description": "Gets or sets the library name." + }, + "PathInfo": { + "allOf": [ + { + "$ref": "#/components/schemas/MediaPathInfo" + } + ], + "description": "Gets or sets library folder path information." + } + }, + "additionalProperties": false, + "description": "Update library options dto." + }, + "UpdateUserEasyPassword": { + "type": "object", + "properties": { + "NewPassword": { + "type": "string", + "description": "Gets or sets the new sha1-hashed password.", + "nullable": true + }, + "NewPw": { + "type": "string", + "description": "Gets or sets the new password.", + "nullable": true + }, + "ResetPassword": { + "type": "boolean", + "description": "Gets or sets a value indicating whether to reset the password." + } + }, + "additionalProperties": false, + "description": "The update user easy password request body." + }, + "UpdateUserPassword": { + "type": "object", + "properties": { + "CurrentPassword": { + "type": "string", + "description": "Gets or sets the current sha1-hashed password.", + "nullable": true + }, + "CurrentPw": { + "type": "string", + "description": "Gets or sets the current plain text password.", + "nullable": true + }, + "NewPw": { + "type": "string", + "description": "Gets or sets the new plain text password.", + "nullable": true + }, + "ResetPassword": { + "type": "boolean", + "description": "Gets or sets a value indicating whether to reset the password." + } + }, + "additionalProperties": false, + "description": "The update user password request body." + }, + "UploadSubtitleDto": { + "required": [ + "Data", + "Format", + "IsForced", + "Language" + ], + "type": "object", + "properties": { + "Language": { + "type": "string", + "description": "Gets or sets the subtitle language." + }, + "Format": { + "type": "string", + "description": "Gets or sets the subtitle format." + }, + "IsForced": { + "type": "boolean", + "description": "Gets or sets a value indicating whether the subtitle is forced." + }, + "Data": { + "type": "string", + "description": "Gets or sets the subtitle data." + } + }, + "additionalProperties": false, + "description": "Upload subtitles dto." + }, + "UserConfiguration": { + "type": "object", + "properties": { + "AudioLanguagePreference": { + "type": "string", + "description": "Gets or sets the audio language preference.", + "nullable": true + }, + "PlayDefaultAudioTrack": { + "type": "boolean", + "description": "Gets or sets a value indicating whether [play default audio track]." + }, + "SubtitleLanguagePreference": { + "type": "string", + "description": "Gets or sets the subtitle language preference.", + "nullable": true + }, + "DisplayMissingEpisodes": { + "type": "boolean" + }, + "GroupedFolders": { + "type": "array", + "items": { + "type": "string" + } + }, + "SubtitleMode": { + "allOf": [ + { + "$ref": "#/components/schemas/SubtitlePlaybackMode" + } + ], + "description": "An enum representing a subtitle playback mode." + }, + "DisplayCollectionsView": { + "type": "boolean" + }, + "EnableLocalPassword": { + "type": "boolean" + }, + "OrderedViews": { + "type": "array", + "items": { + "type": "string" + } + }, + "LatestItemsExcludes": { + "type": "array", + "items": { + "type": "string" + } + }, + "MyMediaExcludes": { + "type": "array", + "items": { + "type": "string" + } + }, + "HidePlayedInLatest": { + "type": "boolean" + }, + "RememberAudioSelections": { + "type": "boolean" + }, + "RememberSubtitleSelections": { + "type": "boolean" + }, + "EnableNextEpisodeAutoPlay": { + "type": "boolean" + } + }, + "additionalProperties": false, + "description": "Class UserConfiguration." + }, + "UserDto": { + "type": "object", + "properties": { + "Name": { + "type": "string", + "description": "Gets or sets the name.", + "nullable": true + }, + "ServerId": { + "type": "string", + "description": "Gets or sets the server identifier.", + "nullable": true + }, + "ServerName": { + "type": "string", + "description": "Gets or sets the name of the server.\r\nThis is not used by the server and is for client-side usage only.", + "nullable": true + }, + "Id": { + "type": "string", + "description": "Gets or sets the id.", + "format": "uuid" + }, + "PrimaryImageTag": { + "type": "string", + "description": "Gets or sets the primary image tag.", + "nullable": true + }, + "HasPassword": { + "type": "boolean", + "description": "Gets or sets a value indicating whether this instance has password." + }, + "HasConfiguredPassword": { + "type": "boolean", + "description": "Gets or sets a value indicating whether this instance has configured password." + }, + "HasConfiguredEasyPassword": { + "type": "boolean", + "description": "Gets or sets a value indicating whether this instance has configured easy password." + }, + "EnableAutoLogin": { + "type": "boolean", + "description": "Gets or sets whether async login is enabled or not.", + "nullable": true + }, + "LastLoginDate": { + "type": "string", + "description": "Gets or sets the last login date.", + "format": "date-time", + "nullable": true + }, + "LastActivityDate": { + "type": "string", + "description": "Gets or sets the last activity date.", + "format": "date-time", + "nullable": true + }, + "Configuration": { + "allOf": [ + { + "$ref": "#/components/schemas/UserConfiguration" + } + ], + "description": "Gets or sets the configuration.", + "nullable": true + }, + "Policy": { + "allOf": [ + { + "$ref": "#/components/schemas/UserPolicy" + } + ], + "description": "Gets or sets the policy.", + "nullable": true + }, + "PrimaryImageAspectRatio": { + "type": "number", + "description": "Gets or sets the primary image aspect ratio.", + "format": "double", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Class UserDto." + }, + "UserItemDataDto": { + "type": "object", + "properties": { + "Rating": { + "type": "number", + "description": "Gets or sets the rating.", + "format": "double", + "nullable": true + }, + "PlayedPercentage": { + "type": "number", + "description": "Gets or sets the played percentage.", + "format": "double", + "nullable": true + }, + "UnplayedItemCount": { + "type": "integer", + "description": "Gets or sets the unplayed item count.", + "format": "int32", + "nullable": true + }, + "PlaybackPositionTicks": { + "type": "integer", + "description": "Gets or sets the playback position ticks.", + "format": "int64" + }, + "PlayCount": { + "type": "integer", + "description": "Gets or sets the play count.", + "format": "int32" + }, + "IsFavorite": { + "type": "boolean", + "description": "Gets or sets a value indicating whether this instance is favorite." + }, + "Likes": { + "type": "boolean", + "description": "Gets or sets a value indicating whether this MediaBrowser.Model.Dto.UserItemDataDto is likes.", + "nullable": true + }, + "LastPlayedDate": { + "type": "string", + "description": "Gets or sets the last played date.", + "format": "date-time", + "nullable": true + }, + "Played": { + "type": "boolean", + "description": "Gets or sets a value indicating whether this MediaBrowser.Model.Dto.UserItemDataDto is played." + }, + "Key": { + "type": "string", + "description": "Gets or sets the key.", + "nullable": true + }, + "ItemId": { + "type": "string", + "description": "Gets or sets the item identifier.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Class UserItemDataDto." + }, + "UserPolicy": { + "type": "object", + "properties": { + "IsAdministrator": { + "type": "boolean", + "description": "Gets or sets a value indicating whether this instance is administrator." + }, + "IsHidden": { + "type": "boolean", + "description": "Gets or sets a value indicating whether this instance is hidden." + }, + "IsDisabled": { + "type": "boolean", + "description": "Gets or sets a value indicating whether this instance is disabled." + }, + "MaxParentalRating": { + "type": "integer", + "description": "Gets or sets the max parental rating.", + "format": "int32", + "nullable": true + }, + "BlockedTags": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "EnableUserPreferenceAccess": { + "type": "boolean" + }, + "AccessSchedules": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AccessSchedule" + }, + "nullable": true + }, + "BlockUnratedItems": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UnratedItem" + }, + "nullable": true + }, + "EnableRemoteControlOfOtherUsers": { + "type": "boolean" + }, + "EnableSharedDeviceControl": { + "type": "boolean" + }, + "EnableRemoteAccess": { + "type": "boolean" + }, + "EnableLiveTvManagement": { + "type": "boolean" + }, + "EnableLiveTvAccess": { + "type": "boolean" + }, + "EnableMediaPlayback": { + "type": "boolean" + }, + "EnableAudioPlaybackTranscoding": { + "type": "boolean" + }, + "EnableVideoPlaybackTranscoding": { + "type": "boolean" + }, + "EnablePlaybackRemuxing": { + "type": "boolean" + }, + "ForceRemoteSourceTranscoding": { + "type": "boolean" + }, + "EnableContentDeletion": { + "type": "boolean" + }, + "EnableContentDeletionFromFolders": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "EnableContentDownloading": { + "type": "boolean" + }, + "EnableSyncTranscoding": { + "type": "boolean", + "description": "Gets or sets a value indicating whether [enable synchronize]." + }, + "EnableMediaConversion": { + "type": "boolean" + }, + "EnabledDevices": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "EnableAllDevices": { + "type": "boolean" + }, + "EnabledChannels": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "nullable": true + }, + "EnableAllChannels": { + "type": "boolean" + }, + "EnabledFolders": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "nullable": true + }, + "EnableAllFolders": { + "type": "boolean" + }, + "InvalidLoginAttemptCount": { + "type": "integer", + "format": "int32" + }, + "LoginAttemptsBeforeLockout": { + "type": "integer", + "format": "int32" + }, + "MaxActiveSessions": { + "type": "integer", + "format": "int32" + }, + "EnablePublicSharing": { + "type": "boolean" + }, + "BlockedMediaFolders": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "nullable": true + }, + "BlockedChannels": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "nullable": true + }, + "RemoteClientBitrateLimit": { + "type": "integer", + "format": "int32" + }, + "AuthenticationProviderId": { + "type": "string", + "nullable": true + }, + "PasswordResetProviderId": { + "type": "string", + "nullable": true + }, + "SyncPlayAccess": { + "allOf": [ + { + "$ref": "#/components/schemas/SyncPlayUserAccessType" + } + ], + "description": "Gets or sets a value indicating what SyncPlay features the user can access." + } + }, + "additionalProperties": false + }, + "UtcTimeResponse": { + "type": "object", + "properties": { + "RequestReceptionTime": { + "type": "string", + "description": "Gets the UTC time when request has been received.", + "format": "date-time" + }, + "ResponseTransmissionTime": { + "type": "string", + "description": "Gets the UTC time when response has been sent.", + "format": "date-time" + } + }, + "additionalProperties": false, + "description": "Class UtcTimeResponse." + }, + "ValidatePathDto": { + "type": "object", + "properties": { + "ValidateWritable": { + "type": "boolean", + "description": "Gets or sets a value indicating whether validate if path is writable." + }, + "Path": { + "type": "string", + "description": "Gets or sets the path.", + "nullable": true + }, + "IsFile": { + "type": "boolean", + "description": "Gets or sets is path file.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Validate path object." + }, + "VersionInfo": { + "type": "object", + "properties": { + "version": { + "type": "string", + "description": "Gets or sets the version." + }, + "VersionNumber": { + "type": "string", + "description": "Gets the version as a System.Version.", + "readOnly": true + }, + "changelog": { + "type": "string", + "description": "Gets or sets the changelog for this version.", + "nullable": true + }, + "targetAbi": { + "type": "string", + "description": "Gets or sets the ABI that this version was built against.", + "nullable": true + }, + "sourceUrl": { + "type": "string", + "description": "Gets or sets the source URL.", + "nullable": true + }, + "checksum": { + "type": "string", + "description": "Gets or sets a checksum for the binary.", + "nullable": true + }, + "timestamp": { + "type": "string", + "description": "Gets or sets a timestamp of when the binary was built.", + "nullable": true + }, + "repositoryName": { + "type": "string", + "description": "Gets or sets the repository name." + }, + "repositoryUrl": { + "type": "string", + "description": "Gets or sets the repository url." + } + }, + "additionalProperties": false, + "description": "Defines the MediaBrowser.Model.Updates.VersionInfo class." + }, + "Video3DFormat": { + "enum": [ + "HalfSideBySide", + "FullSideBySide", + "FullTopAndBottom", + "HalfTopAndBottom", + "MVC" + ], + "type": "string" + }, + "VideoType": { + "enum": [ + "VideoFile", + "Iso", + "Dvd", + "BluRay" + ], + "type": "string", + "description": "Enum VideoType." + }, + "VirtualFolderInfo": { + "type": "object", + "properties": { + "Name": { + "type": "string", + "description": "Gets or sets the name.", + "nullable": true + }, + "Locations": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Gets or sets the locations.", + "nullable": true + }, + "CollectionType": { + "allOf": [ + { + "$ref": "#/components/schemas/CollectionTypeOptions" + } + ], + "description": "Gets or sets the type of the collection.", + "nullable": true + }, + "LibraryOptions": { + "allOf": [ + { + "$ref": "#/components/schemas/LibraryOptions" + } + ], + "nullable": true + }, + "ItemId": { + "type": "string", + "description": "Gets or sets the item identifier.", + "nullable": true + }, + "PrimaryImageItemId": { + "type": "string", + "description": "Gets or sets the primary image item identifier.", + "nullable": true + }, + "RefreshProgress": { + "type": "number", + "format": "double", + "nullable": true + }, + "RefreshStatus": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Used to hold information about a user's list of configured virtual folders." + }, + "WakeOnLanInfo": { + "type": "object", + "properties": { + "MacAddress": { + "type": "string", + "description": "Gets the MAC address of the device.", + "nullable": true + }, + "Port": { + "type": "integer", + "description": "Gets or sets the wake-on-LAN port.", + "format": "int32" + } + }, + "additionalProperties": false, + "description": "Provides the MAC address and port for wake-on-LAN functionality." + }, + "XbmcMetadataOptions": { + "type": "object", + "properties": { + "UserId": { + "type": "string", + "nullable": true + }, + "ReleaseDateFormat": { + "type": "string" + }, + "SaveImagePathsInNfo": { + "type": "boolean" + }, + "EnablePathSubstitution": { + "type": "boolean" + }, + "EnableExtraThumbsDuplication": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "XmlAttribute": { + "type": "object", + "properties": { + "Name": { + "type": "string", + "description": "Gets or sets the name of the attribute.", + "nullable": true + }, + "Value": { + "type": "string", + "description": "Gets or sets the value of the attribute.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Defines the MediaBrowser.Model.Dlna.XmlAttribute." + } + }, + "securitySchemes": { + "CustomAuthentication": { + "type": "apiKey", + "description": "API key header parameter", + "name": "Authorization", + "in": "header" + } + } + } +} \ No newline at end of file diff --git a/jellyfin/.gitignore b/jellyfin/.gitignore new file mode 100644 index 0000000..149b576 --- /dev/null +++ b/jellyfin/.gitignore @@ -0,0 +1,4 @@ +wwwroot/*.js +node_modules +typings +dist diff --git a/jellyfin/.openapi-generator-ignore b/jellyfin/.openapi-generator-ignore new file mode 100644 index 0000000..7484ee5 --- /dev/null +++ b/jellyfin/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/jellyfin/.openapi-generator/FILES b/jellyfin/.openapi-generator/FILES new file mode 100644 index 0000000..08a46af --- /dev/null +++ b/jellyfin/.openapi-generator/FILES @@ -0,0 +1,441 @@ +.gitignore +.openapi-generator-ignore +api.ts +api/activityLogApi.ts +api/apiKeyApi.ts +api/apis.ts +api/artistsApi.ts +api/audioApi.ts +api/brandingApi.ts +api/channelsApi.ts +api/clientLogApi.ts +api/collectionApi.ts +api/configurationApi.ts +api/dashboardApi.ts +api/devicesApi.ts +api/displayPreferencesApi.ts +api/dlnaApi.ts +api/dlnaServerApi.ts +api/dynamicHlsApi.ts +api/environmentApi.ts +api/filterApi.ts +api/genresApi.ts +api/hlsSegmentApi.ts +api/imageApi.ts +api/imageByNameApi.ts +api/instantMixApi.ts +api/itemLookupApi.ts +api/itemRefreshApi.ts +api/itemUpdateApi.ts +api/itemsApi.ts +api/libraryApi.ts +api/libraryStructureApi.ts +api/liveTvApi.ts +api/localizationApi.ts +api/mediaInfoApi.ts +api/moviesApi.ts +api/musicGenresApi.ts +api/notificationsApi.ts +api/packageApi.ts +api/personsApi.ts +api/playlistsApi.ts +api/playstateApi.ts +api/pluginsApi.ts +api/quickConnectApi.ts +api/remoteImageApi.ts +api/scheduledTasksApi.ts +api/searchApi.ts +api/sessionApi.ts +api/startupApi.ts +api/studiosApi.ts +api/subtitleApi.ts +api/suggestionsApi.ts +api/syncPlayApi.ts +api/systemApi.ts +api/timeSyncApi.ts +api/tmdbApi.ts +api/trailersApi.ts +api/tvShowsApi.ts +api/universalAudioApi.ts +api/userApi.ts +api/userLibraryApi.ts +api/userViewsApi.ts +api/videoAttachmentsApi.ts +api/videosApi.ts +api/yearsApi.ts +git_push.sh +model/accessSchedule.ts +model/activityLogEntry.ts +model/activityLogEntryQueryResult.ts +model/addListingProviderRequest.ts +model/addMediaPathRequest.ts +model/addTunerHostRequest.ts +model/addVirtualFolderDto.ts +model/addVirtualFolderDtoLibraryOptions.ts +model/addVirtualFolderRequest.ts +model/adminNotificationDto.ts +model/albumInfo.ts +model/albumInfoRemoteSearchQuery.ts +model/allThemeMediaResult.ts +model/allThemeMediaResultThemeVideosResult.ts +model/applySearchCriteriaRequest.ts +model/architecture.ts +model/artistInfo.ts +model/artistInfoRemoteSearchQuery.ts +model/authenticateUserByName.ts +model/authenticateUserByNameRequest.ts +model/authenticateWithQuickConnectRequest.ts +model/authenticationInfo.ts +model/authenticationInfoQueryResult.ts +model/authenticationResult.ts +model/authenticationResultSessionInfo.ts +model/authenticationResultUser.ts +model/baseItem.ts +model/baseItemDto.ts +model/baseItemDtoCurrentProgram.ts +model/baseItemDtoImageBlurHashes.ts +model/baseItemDtoQueryResult.ts +model/baseItemDtoUserData.ts +model/baseItemKind.ts +model/baseItemPerson.ts +model/baseItemPersonImageBlurHashes.ts +model/bookInfo.ts +model/bookInfoRemoteSearchQuery.ts +model/boxSetInfo.ts +model/boxSetInfoRemoteSearchQuery.ts +model/brandingOptions.ts +model/bufferRequestDto.ts +model/channelFeatures.ts +model/channelItemSortField.ts +model/channelMappingOptionsDto.ts +model/channelMediaContentType.ts +model/channelMediaType.ts +model/channelType.ts +model/chapterInfo.ts +model/clientCapabilities.ts +model/clientCapabilitiesDeviceProfile.ts +model/clientCapabilitiesDto.ts +model/clientCapabilitiesDtoDeviceProfile.ts +model/clientLogDocumentResponseDto.ts +model/codecProfile.ts +model/codecType.ts +model/collectionCreationResult.ts +model/collectionTypeOptions.ts +model/configImageTypes.ts +model/configurationPageInfo.ts +model/containerProfile.ts +model/controlResponse.ts +model/countryInfo.ts +model/createAdminNotificationRequest.ts +model/createPlaylistDto.ts +model/createPlaylistRequest.ts +model/createProfileRequest.ts +model/createSeriesTimerRequest.ts +model/createTimerRequest.ts +model/createUserByName.ts +model/createUserByNameRequest.ts +model/cultureDto.ts +model/dayOfWeek.ts +model/dayPattern.ts +model/defaultDirectoryBrowserInfoDto.ts +model/deviceIdentification.ts +model/deviceInfo.ts +model/deviceInfoCapabilities.ts +model/deviceInfoQueryResult.ts +model/deviceOptions.ts +model/deviceOptionsDto.ts +model/deviceProfile.ts +model/deviceProfileIdentification.ts +model/deviceProfileInfo.ts +model/deviceProfileType.ts +model/directPlayProfile.ts +model/displayPreferencesDto.ts +model/dlnaOptions.ts +model/dlnaProfileType.ts +model/dynamicDayOfWeek.ts +model/embeddedSubtitleOptions.ts +model/encodingContext.ts +model/encodingOptions.ts +model/endPointInfo.ts +model/externalIdInfo.ts +model/externalIdMediaType.ts +model/externalUrl.ts +model/fFmpegLocation.ts +model/fileSystemEntryInfo.ts +model/fileSystemEntryType.ts +model/fontFile.ts +model/forgotPasswordAction.ts +model/forgotPasswordDto.ts +model/forgotPasswordPinDto.ts +model/forgotPasswordPinRequest.ts +model/forgotPasswordRequest.ts +model/forgotPasswordResult.ts +model/generalCommand.ts +model/generalCommandType.ts +model/getBookRemoteSearchResultsRequest.ts +model/getBoxSetRemoteSearchResultsRequest.ts +model/getMovieRemoteSearchResultsRequest.ts +model/getMusicAlbumRemoteSearchResultsRequest.ts +model/getMusicArtistRemoteSearchResultsRequest.ts +model/getMusicVideoRemoteSearchResultsRequest.ts +model/getPersonRemoteSearchResultsRequest.ts +model/getPostedPlaybackInfoRequest.ts +model/getProgramsDto.ts +model/getProgramsRequest.ts +model/getSeriesRemoteSearchResultsRequest.ts +model/getTrailerRemoteSearchResultsRequest.ts +model/groupInfoDto.ts +model/groupQueueMode.ts +model/groupRepeatMode.ts +model/groupShuffleMode.ts +model/groupStateType.ts +model/groupUpdateType.ts +model/guideInfo.ts +model/hardwareEncodingType.ts +model/headerMatchType.ts +model/httpHeaderInfo.ts +model/iPlugin.ts +model/ignoreWaitRequestDto.ts +model/imageByNameInfo.ts +model/imageFormat.ts +model/imageInfo.ts +model/imageOption.ts +model/imageOrientation.ts +model/imageProviderInfo.ts +model/imageSavingConvention.ts +model/imageType.ts +model/installationInfo.ts +model/installationInfoPackageInfo.ts +model/isoType.ts +model/itemCounts.ts +model/itemFields.ts +model/itemFilter.ts +model/joinGroupRequestDto.ts +model/keepUntil.ts +model/libraryOptionInfoDto.ts +model/libraryOptions.ts +model/libraryOptionsResultDto.ts +model/libraryTypeOptionsDto.ts +model/libraryUpdateInfo.ts +model/listingsProviderInfo.ts +model/liveStreamResponse.ts +model/liveStreamResponseMediaSource.ts +model/liveTvInfo.ts +model/liveTvOptions.ts +model/liveTvServiceInfo.ts +model/liveTvServiceStatus.ts +model/localizationOption.ts +model/locationType.ts +model/logFile.ts +model/logLevel.ts +model/mediaAttachment.ts +model/mediaEncoderPathDto.ts +model/mediaPathDto.ts +model/mediaPathDtoPathInfo.ts +model/mediaPathInfo.ts +model/mediaProtocol.ts +model/mediaSourceInfo.ts +model/mediaSourceType.ts +model/mediaStream.ts +model/mediaStreamType.ts +model/mediaUpdateInfoDto.ts +model/mediaUpdateInfoPathDto.ts +model/mediaUrl.ts +model/messageCommand.ts +model/metadataConfiguration.ts +model/metadataEditorInfo.ts +model/metadataField.ts +model/metadataOptions.ts +model/metadataRefreshMode.ts +model/models.ts +model/movePlaylistItemRequestDto.ts +model/movieInfo.ts +model/movieInfoRemoteSearchQuery.ts +model/musicVideoInfo.ts +model/musicVideoInfoRemoteSearchQuery.ts +model/nameGuidPair.ts +model/nameIdPair.ts +model/nameValuePair.ts +model/networkConfiguration.ts +model/newGroupRequestDto.ts +model/nextItemRequestDto.ts +model/notificationDto.ts +model/notificationLevel.ts +model/notificationOption.ts +model/notificationOptions.ts +model/notificationResultDto.ts +model/notificationTypeInfo.ts +model/notificationsSummaryDto.ts +model/objectGroupUpdate.ts +model/openLiveStreamDto.ts +model/openLiveStreamRequest.ts +model/packageInfo.ts +model/parentalRating.ts +model/pathSubstitution.ts +model/personLookupInfo.ts +model/personLookupInfoRemoteSearchQuery.ts +model/pinRedeemResult.ts +model/pingRequestDto.ts +model/playAccess.ts +model/playCommand.ts +model/playMethod.ts +model/playRequest.ts +model/playRequestDto.ts +model/playbackErrorCode.ts +model/playbackInfoDto.ts +model/playbackInfoResponse.ts +model/playbackProgressInfo.ts +model/playbackProgressInfoItem.ts +model/playbackStartInfo.ts +model/playbackStopInfo.ts +model/playerStateInfo.ts +model/playlistCreationResult.ts +model/playstateCommand.ts +model/playstateRequest.ts +model/pluginInfo.ts +model/pluginStatus.ts +model/postFullCapabilitiesRequest.ts +model/postUpdatedMediaRequest.ts +model/previousItemRequestDto.ts +model/problemDetails.ts +model/profileCondition.ts +model/profileConditionType.ts +model/profileConditionValue.ts +model/programAudio.ts +model/publicSystemInfo.ts +model/queryFilters.ts +model/queryFiltersLegacy.ts +model/queueItem.ts +model/queueRequestDto.ts +model/quickConnectDto.ts +model/quickConnectResult.ts +model/ratingType.ts +model/readyRequestDto.ts +model/recommendationDto.ts +model/recommendationType.ts +model/recordingStatus.ts +model/remoteImageInfo.ts +model/remoteImageResult.ts +model/remoteSearchResult.ts +model/remoteSubtitleInfo.ts +model/removeFromPlaylistRequestDto.ts +model/repeatMode.ts +model/reportPlaybackProgressRequest.ts +model/reportPlaybackStartRequest.ts +model/reportPlaybackStoppedRequest.ts +model/repositoryInfo.ts +model/responseProfile.ts +model/scrollDirection.ts +model/searchHint.ts +model/searchHintResult.ts +model/seekRequestDto.ts +model/sendCommand.ts +model/sendCommandType.ts +model/sendFullGeneralCommandRequest.ts +model/sendMessageCommandRequest.ts +model/sendToUserType.ts +model/seriesInfo.ts +model/seriesInfoRemoteSearchQuery.ts +model/seriesStatus.ts +model/seriesTimerInfoDto.ts +model/seriesTimerInfoDtoQueryResult.ts +model/serverConfiguration.ts +model/serverDiscoveryInfo.ts +model/sessionInfo.ts +model/sessionInfoFullNowPlayingItem.ts +model/sessionInfoNowPlayingItem.ts +model/sessionMessageType.ts +model/sessionUserInfo.ts +model/setChannelMappingDto.ts +model/setChannelMappingRequest.ts +model/setPlaylistItemRequestDto.ts +model/setRemoteAccessRequest.ts +model/setRepeatModeRequestDto.ts +model/setShuffleModeRequestDto.ts +model/songInfo.ts +model/sortOrder.ts +model/specialViewOptionDto.ts +model/startupConfigurationDto.ts +model/startupRemoteAccessDto.ts +model/startupUserDto.ts +model/subtitleDeliveryMethod.ts +model/subtitleOptions.ts +model/subtitlePlaybackMode.ts +model/subtitleProfile.ts +model/syncPlayBufferingRequest.ts +model/syncPlayCreateGroupRequest.ts +model/syncPlayJoinGroupRequest.ts +model/syncPlayMovePlaylistItemRequest.ts +model/syncPlayNextItemRequest.ts +model/syncPlayPingRequest.ts +model/syncPlayPreviousItemRequest.ts +model/syncPlayQueueRequest.ts +model/syncPlayReadyRequest.ts +model/syncPlayRemoveFromPlaylistRequest.ts +model/syncPlaySeekRequest.ts +model/syncPlaySetIgnoreWaitRequest.ts +model/syncPlaySetNewQueueRequest.ts +model/syncPlaySetPlaylistItemRequest.ts +model/syncPlaySetRepeatModeRequest.ts +model/syncPlaySetShuffleModeRequest.ts +model/syncPlayUserAccessType.ts +model/systemInfo.ts +model/taskCompletionStatus.ts +model/taskInfo.ts +model/taskInfoLastExecutionResult.ts +model/taskResult.ts +model/taskState.ts +model/taskTriggerInfo.ts +model/themeMediaResult.ts +model/timerEventInfo.ts +model/timerInfoDto.ts +model/timerInfoDtoProgramInfo.ts +model/timerInfoDtoQueryResult.ts +model/trailerInfo.ts +model/trailerInfoRemoteSearchQuery.ts +model/transcodeReason.ts +model/transcodeSeekInfo.ts +model/transcodingInfo.ts +model/transcodingProfile.ts +model/transportStreamTimestamp.ts +model/tunerChannelMapping.ts +model/tunerHostInfo.ts +model/typeOptions.ts +model/unratedItem.ts +model/updateConfigurationRequest.ts +model/updateDeviceOptionsRequest.ts +model/updateDisplayPreferencesRequest.ts +model/updateInitialConfigurationRequest.ts +model/updateItemRequest.ts +model/updateLibraryOptionsDto.ts +model/updateLibraryOptionsRequest.ts +model/updateMediaEncoderPathRequest.ts +model/updateMediaPathRequest.ts +model/updateMediaPathRequestDto.ts +model/updateMediaPathRequestDtoPathInfo.ts +model/updateStartupUserRequest.ts +model/updateUserConfigurationRequest.ts +model/updateUserEasyPassword.ts +model/updateUserEasyPasswordRequest.ts +model/updateUserPassword.ts +model/updateUserPasswordRequest.ts +model/updateUserPolicyRequest.ts +model/updateUserRequest.ts +model/uploadSubtitleDto.ts +model/uploadSubtitleRequest.ts +model/userConfiguration.ts +model/userDto.ts +model/userDtoConfiguration.ts +model/userDtoPolicy.ts +model/userItemDataDto.ts +model/userPolicy.ts +model/utcTimeResponse.ts +model/validatePathDto.ts +model/validatePathRequest.ts +model/versionInfo.ts +model/video3DFormat.ts +model/videoType.ts +model/virtualFolderInfo.ts +model/wakeOnLanInfo.ts +model/xbmcMetadataOptions.ts +model/xmlAttribute.ts diff --git a/jellyfin/.openapi-generator/VERSION b/jellyfin/.openapi-generator/VERSION new file mode 100644 index 0000000..4be2c72 --- /dev/null +++ b/jellyfin/.openapi-generator/VERSION @@ -0,0 +1 @@ +6.5.0 \ No newline at end of file diff --git a/jellyfin/api.ts b/jellyfin/api.ts new file mode 100644 index 0000000..b9c7cfd --- /dev/null +++ b/jellyfin/api.ts @@ -0,0 +1,3 @@ +// This is the entrypoint for the package +export * as JellyfinAPI from './api/apis'; +export * from './model/models'; diff --git a/jellyfin/api/activityLogApi.ts b/jellyfin/api/activityLogApi.ts new file mode 100644 index 0000000..c8c6b85 --- /dev/null +++ b/jellyfin/api/activityLogApi.ts @@ -0,0 +1,177 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import localVarRequest from 'request'; +import http from 'http'; + +/* tslint:disable:no-unused-locals */ +import { ActivityLogEntryQueryResult } from '../model/activityLogEntryQueryResult'; + +import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; +import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; + +import { HttpError, RequestFile } from './apis'; + +let defaultBasePath = 'http://localhost'; + +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== + +export enum ActivityLogApiApiKeys { + CustomAuthentication, +} + +export class ActivityLogApi { + protected _basePath = defaultBasePath; + protected _defaultHeaders : any = {}; + protected _useQuerystring : boolean = false; + + protected authentications = { + 'default': new VoidAuth(), + 'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'), + } + + protected interceptors: Interceptor[] = []; + + constructor(basePath?: string); + constructor(basePathOrUsername: string, password?: string, basePath?: string) { + if (password) { + if (basePath) { + this.basePath = basePath; + } + } else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername + } + } + } + + set useQuerystring(value: boolean) { + this._useQuerystring = value; + } + + set basePath(basePath: string) { + this._basePath = basePath; + } + + set defaultHeaders(defaultHeaders: any) { + this._defaultHeaders = defaultHeaders; + } + + get defaultHeaders() { + return this._defaultHeaders; + } + + get basePath() { + return this._basePath; + } + + public setDefaultAuthentication(auth: Authentication) { + this.authentications.default = auth; + } + + public setApiKey(key: ActivityLogApiApiKeys, value: string) { + (this.authentications as any)[ActivityLogApiApiKeys[key]].apiKey = value; + } + + public addInterceptor(interceptor: Interceptor) { + this.interceptors.push(interceptor); + } + + /** + * + * @summary Gets activity log entries. + * @param startIndex Optional. The record index to start at. All items with a lower index will be dropped from the results. + * @param limit Optional. The maximum number of records to return. + * @param minDate Optional. The minimum date. Format = ISO. + * @param hasUserId Optional. Filter log entries if it has user id, or not. + */ + public async getLogEntries (startIndex?: number, limit?: number, minDate?: Date, hasUserId?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: ActivityLogEntryQueryResult; }> { + const localVarPath = this.basePath + '/System/ActivityLog/Entries'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + if (startIndex !== undefined) { + localVarQueryParameters['startIndex'] = ObjectSerializer.serialize(startIndex, "number"); + } + + if (limit !== undefined) { + localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); + } + + if (minDate !== undefined) { + localVarQueryParameters['minDate'] = ObjectSerializer.serialize(minDate, "Date"); + } + + if (hasUserId !== undefined) { + localVarQueryParameters['hasUserId'] = ObjectSerializer.serialize(hasUserId, "boolean"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: ActivityLogEntryQueryResult; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "ActivityLogEntryQueryResult"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} diff --git a/jellyfin/api/apiKeyApi.ts b/jellyfin/api/apiKeyApi.ts new file mode 100644 index 0000000..531639c --- /dev/null +++ b/jellyfin/api/apiKeyApi.ts @@ -0,0 +1,288 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import localVarRequest from 'request'; +import http from 'http'; + +/* tslint:disable:no-unused-locals */ +import { AuthenticationInfoQueryResult } from '../model/authenticationInfoQueryResult'; + +import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; +import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; + +import { HttpError, RequestFile } from './apis'; + +let defaultBasePath = 'http://localhost'; + +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== + +export enum ApiKeyApiApiKeys { + CustomAuthentication, +} + +export class ApiKeyApi { + protected _basePath = defaultBasePath; + protected _defaultHeaders : any = {}; + protected _useQuerystring : boolean = false; + + protected authentications = { + 'default': new VoidAuth(), + 'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'), + } + + protected interceptors: Interceptor[] = []; + + constructor(basePath?: string); + constructor(basePathOrUsername: string, password?: string, basePath?: string) { + if (password) { + if (basePath) { + this.basePath = basePath; + } + } else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername + } + } + } + + set useQuerystring(value: boolean) { + this._useQuerystring = value; + } + + set basePath(basePath: string) { + this._basePath = basePath; + } + + set defaultHeaders(defaultHeaders: any) { + this._defaultHeaders = defaultHeaders; + } + + get defaultHeaders() { + return this._defaultHeaders; + } + + get basePath() { + return this._basePath; + } + + public setDefaultAuthentication(auth: Authentication) { + this.authentications.default = auth; + } + + public setApiKey(key: ApiKeyApiApiKeys, value: string) { + (this.authentications as any)[ApiKeyApiApiKeys[key]].apiKey = value; + } + + public addInterceptor(interceptor: Interceptor) { + this.interceptors.push(interceptor); + } + + /** + * + * @summary Create a new api key. + * @param app Name of the app using the authentication key. + */ + public async createKey (app: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Auth/Keys'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + // verify required parameter 'app' is not null or undefined + if (app === null || app === undefined) { + throw new Error('Required parameter app was null or undefined when calling createKey.'); + } + + if (app !== undefined) { + localVarQueryParameters['app'] = ObjectSerializer.serialize(app, "string"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Get all keys. + */ + public async getKeys (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: AuthenticationInfoQueryResult; }> { + const localVarPath = this.basePath + '/Auth/Keys'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: AuthenticationInfoQueryResult; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "AuthenticationInfoQueryResult"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Remove an api key. + * @param key The access token to delete. + */ + public async revokeKey (key: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Auth/Keys/{key}' + .replace('{' + 'key' + '}', encodeURIComponent(String(key))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + // verify required parameter 'key' is not null or undefined + if (key === null || key === undefined) { + throw new Error('Required parameter key was null or undefined when calling revokeKey.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} diff --git a/jellyfin/api/apis.ts b/jellyfin/api/apis.ts new file mode 100644 index 0000000..21ca817 --- /dev/null +++ b/jellyfin/api/apis.ts @@ -0,0 +1,134 @@ +export * from './activityLogApi'; +import { ActivityLogApi } from './activityLogApi'; +export * from './apiKeyApi'; +import { ApiKeyApi } from './apiKeyApi'; +export * from './artistsApi'; +import { ArtistsApi } from './artistsApi'; +export * from './audioApi'; +import { AudioApi } from './audioApi'; +export * from './brandingApi'; +import { BrandingApi } from './brandingApi'; +export * from './channelsApi'; +import { ChannelsApi } from './channelsApi'; +export * from './clientLogApi'; +import { ClientLogApi } from './clientLogApi'; +export * from './collectionApi'; +import { CollectionApi } from './collectionApi'; +export * from './configurationApi'; +import { ConfigurationApi } from './configurationApi'; +export * from './dashboardApi'; +import { DashboardApi } from './dashboardApi'; +export * from './devicesApi'; +import { DevicesApi } from './devicesApi'; +export * from './displayPreferencesApi'; +import { DisplayPreferencesApi } from './displayPreferencesApi'; +export * from './dlnaApi'; +import { DlnaApi } from './dlnaApi'; +export * from './dlnaServerApi'; +import { DlnaServerApi } from './dlnaServerApi'; +export * from './dynamicHlsApi'; +import { DynamicHlsApi } from './dynamicHlsApi'; +export * from './environmentApi'; +import { EnvironmentApi } from './environmentApi'; +export * from './filterApi'; +import { FilterApi } from './filterApi'; +export * from './genresApi'; +import { GenresApi } from './genresApi'; +export * from './hlsSegmentApi'; +import { HlsSegmentApi } from './hlsSegmentApi'; +export * from './imageApi'; +import { ImageApi } from './imageApi'; +export * from './imageByNameApi'; +import { ImageByNameApi } from './imageByNameApi'; +export * from './instantMixApi'; +import { InstantMixApi } from './instantMixApi'; +export * from './itemLookupApi'; +import { ItemLookupApi } from './itemLookupApi'; +export * from './itemRefreshApi'; +import { ItemRefreshApi } from './itemRefreshApi'; +export * from './itemUpdateApi'; +import { ItemUpdateApi } from './itemUpdateApi'; +export * from './itemsApi'; +import { ItemsApi } from './itemsApi'; +export * from './libraryApi'; +import { LibraryApi } from './libraryApi'; +export * from './libraryStructureApi'; +import { LibraryStructureApi } from './libraryStructureApi'; +export * from './liveTvApi'; +import { LiveTvApi } from './liveTvApi'; +export * from './localizationApi'; +import { LocalizationApi } from './localizationApi'; +export * from './mediaInfoApi'; +import { MediaInfoApi } from './mediaInfoApi'; +export * from './moviesApi'; +import { MoviesApi } from './moviesApi'; +export * from './musicGenresApi'; +import { MusicGenresApi } from './musicGenresApi'; +export * from './notificationsApi'; +import { NotificationsApi } from './notificationsApi'; +export * from './packageApi'; +import { PackageApi } from './packageApi'; +export * from './personsApi'; +import { PersonsApi } from './personsApi'; +export * from './playlistsApi'; +import { PlaylistsApi } from './playlistsApi'; +export * from './playstateApi'; +import { PlaystateApi } from './playstateApi'; +export * from './pluginsApi'; +import { PluginsApi } from './pluginsApi'; +export * from './quickConnectApi'; +import { QuickConnectApi } from './quickConnectApi'; +export * from './remoteImageApi'; +import { RemoteImageApi } from './remoteImageApi'; +export * from './scheduledTasksApi'; +import { ScheduledTasksApi } from './scheduledTasksApi'; +export * from './searchApi'; +import { SearchApi } from './searchApi'; +export * from './sessionApi'; +import { SessionApi } from './sessionApi'; +export * from './startupApi'; +import { StartupApi } from './startupApi'; +export * from './studiosApi'; +import { StudiosApi } from './studiosApi'; +export * from './subtitleApi'; +import { SubtitleApi } from './subtitleApi'; +export * from './suggestionsApi'; +import { SuggestionsApi } from './suggestionsApi'; +export * from './syncPlayApi'; +import { SyncPlayApi } from './syncPlayApi'; +export * from './systemApi'; +import { SystemApi } from './systemApi'; +export * from './timeSyncApi'; +import { TimeSyncApi } from './timeSyncApi'; +export * from './tmdbApi'; +import { TmdbApi } from './tmdbApi'; +export * from './trailersApi'; +import { TrailersApi } from './trailersApi'; +export * from './tvShowsApi'; +import { TvShowsApi } from './tvShowsApi'; +export * from './universalAudioApi'; +import { UniversalAudioApi } from './universalAudioApi'; +export * from './userApi'; +import { UserApi } from './userApi'; +export * from './userLibraryApi'; +import { UserLibraryApi } from './userLibraryApi'; +export * from './userViewsApi'; +import { UserViewsApi } from './userViewsApi'; +export * from './videoAttachmentsApi'; +import { VideoAttachmentsApi } from './videoAttachmentsApi'; +export * from './videosApi'; +import { VideosApi } from './videosApi'; +export * from './yearsApi'; +import { YearsApi } from './yearsApi'; +import * as http from 'http'; + +export class HttpError extends Error { + constructor (public response: http.IncomingMessage, public body: any, public statusCode?: number) { + super('HTTP request failed'); + this.name = 'HttpError'; + } +} + +export { RequestFile } from '../model/models'; + +export const APIS = [ActivityLogApi, ApiKeyApi, ArtistsApi, AudioApi, BrandingApi, ChannelsApi, ClientLogApi, CollectionApi, ConfigurationApi, DashboardApi, DevicesApi, DisplayPreferencesApi, DlnaApi, DlnaServerApi, DynamicHlsApi, EnvironmentApi, FilterApi, GenresApi, HlsSegmentApi, ImageApi, ImageByNameApi, InstantMixApi, ItemLookupApi, ItemRefreshApi, ItemUpdateApi, ItemsApi, LibraryApi, LibraryStructureApi, LiveTvApi, LocalizationApi, MediaInfoApi, MoviesApi, MusicGenresApi, NotificationsApi, PackageApi, PersonsApi, PlaylistsApi, PlaystateApi, PluginsApi, QuickConnectApi, RemoteImageApi, ScheduledTasksApi, SearchApi, SessionApi, StartupApi, StudiosApi, SubtitleApi, SuggestionsApi, SyncPlayApi, SystemApi, TimeSyncApi, TmdbApi, TrailersApi, TvShowsApi, UniversalAudioApi, UserApi, UserLibraryApi, UserViewsApi, VideoAttachmentsApi, VideosApi, YearsApi]; diff --git a/jellyfin/api/artistsApi.ts b/jellyfin/api/artistsApi.ts new file mode 100644 index 0000000..bf09158 --- /dev/null +++ b/jellyfin/api/artistsApi.ts @@ -0,0 +1,625 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import localVarRequest from 'request'; +import http from 'http'; + +/* tslint:disable:no-unused-locals */ +import { BaseItemDto } from '../model/baseItemDto'; +import { BaseItemDtoQueryResult } from '../model/baseItemDtoQueryResult'; +import { BaseItemKind } from '../model/baseItemKind'; +import { ImageType } from '../model/imageType'; +import { ItemFields } from '../model/itemFields'; +import { ItemFilter } from '../model/itemFilter'; +import { SortOrder } from '../model/sortOrder'; + +import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; +import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; + +import { HttpError, RequestFile } from './apis'; + +let defaultBasePath = 'http://localhost'; + +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== + +export enum ArtistsApiApiKeys { + CustomAuthentication, +} + +export class ArtistsApi { + protected _basePath = defaultBasePath; + protected _defaultHeaders : any = {}; + protected _useQuerystring : boolean = false; + + protected authentications = { + 'default': new VoidAuth(), + 'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'), + } + + protected interceptors: Interceptor[] = []; + + constructor(basePath?: string); + constructor(basePathOrUsername: string, password?: string, basePath?: string) { + if (password) { + if (basePath) { + this.basePath = basePath; + } + } else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername + } + } + } + + set useQuerystring(value: boolean) { + this._useQuerystring = value; + } + + set basePath(basePath: string) { + this._basePath = basePath; + } + + set defaultHeaders(defaultHeaders: any) { + this._defaultHeaders = defaultHeaders; + } + + get defaultHeaders() { + return this._defaultHeaders; + } + + get basePath() { + return this._basePath; + } + + public setDefaultAuthentication(auth: Authentication) { + this.authentications.default = auth; + } + + public setApiKey(key: ArtistsApiApiKeys, value: string) { + (this.authentications as any)[ArtistsApiApiKeys[key]].apiKey = value; + } + + public addInterceptor(interceptor: Interceptor) { + this.interceptors.push(interceptor); + } + + /** + * + * @summary Gets all album artists from a given item, folder, or the entire library. + * @param minCommunityRating Optional filter by minimum community rating. + * @param startIndex Optional. The record index to start at. All items with a lower index will be dropped from the results. + * @param limit Optional. The maximum number of records to return. + * @param searchTerm Optional. Search term. + * @param parentId Specify this to localize the search to a specific item or folder. Omit to use the root. + * @param fields Optional. Specify additional fields of information to return in the output. + * @param excludeItemTypes Optional. If specified, results will be filtered out based on item type. This allows multiple, comma delimited. + * @param includeItemTypes Optional. If specified, results will be filtered based on item type. This allows multiple, comma delimited. + * @param filters Optional. Specify additional filters to apply. + * @param isFavorite Optional filter by items that are marked as favorite, or not. + * @param mediaTypes Optional filter by MediaType. Allows multiple, comma delimited. + * @param genres Optional. If specified, results will be filtered based on genre. This allows multiple, pipe delimited. + * @param genreIds Optional. If specified, results will be filtered based on genre id. This allows multiple, pipe delimited. + * @param officialRatings Optional. If specified, results will be filtered based on OfficialRating. This allows multiple, pipe delimited. + * @param tags Optional. If specified, results will be filtered based on tag. This allows multiple, pipe delimited. + * @param years Optional. If specified, results will be filtered based on production year. This allows multiple, comma delimited. + * @param enableUserData Optional, include user data. + * @param imageTypeLimit Optional, the max number of images to return, per image type. + * @param enableImageTypes Optional. The image types to include in the output. + * @param person Optional. If specified, results will be filtered to include only those containing the specified person. + * @param personIds Optional. If specified, results will be filtered to include only those containing the specified person ids. + * @param personTypes Optional. If specified, along with Person, results will be filtered to include only those containing the specified person and PersonType. Allows multiple, comma-delimited. + * @param studios Optional. If specified, results will be filtered based on studio. This allows multiple, pipe delimited. + * @param studioIds Optional. If specified, results will be filtered based on studio id. This allows multiple, pipe delimited. + * @param userId User id. + * @param nameStartsWithOrGreater Optional filter by items whose name is sorted equally or greater than a given input string. + * @param nameStartsWith Optional filter by items whose name is sorted equally than a given input string. + * @param nameLessThan Optional filter by items whose name is equally or lesser than a given input string. + * @param sortBy Optional. Specify one or more sort orders, comma delimited. + * @param sortOrder Sort Order - Ascending,Descending. + * @param enableImages Optional, include image information in output. + * @param enableTotalRecordCount Total record count. + */ + public async getAlbumArtists (minCommunityRating?: number, startIndex?: number, limit?: number, searchTerm?: string, parentId?: string, fields?: Array, excludeItemTypes?: Array, includeItemTypes?: Array, filters?: Array, isFavorite?: boolean, mediaTypes?: Array, genres?: Array, genreIds?: Array, officialRatings?: Array, tags?: Array, years?: Array, enableUserData?: boolean, imageTypeLimit?: number, enableImageTypes?: Array, person?: string, personIds?: Array, personTypes?: Array, studios?: Array, studioIds?: Array, userId?: string, nameStartsWithOrGreater?: string, nameStartsWith?: string, nameLessThan?: string, sortBy?: Array, sortOrder?: Array, enableImages?: boolean, enableTotalRecordCount?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }> { + const localVarPath = this.basePath + '/Artists/AlbumArtists'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + if (minCommunityRating !== undefined) { + localVarQueryParameters['minCommunityRating'] = ObjectSerializer.serialize(minCommunityRating, "number"); + } + + if (startIndex !== undefined) { + localVarQueryParameters['startIndex'] = ObjectSerializer.serialize(startIndex, "number"); + } + + if (limit !== undefined) { + localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); + } + + if (searchTerm !== undefined) { + localVarQueryParameters['searchTerm'] = ObjectSerializer.serialize(searchTerm, "string"); + } + + if (parentId !== undefined) { + localVarQueryParameters['parentId'] = ObjectSerializer.serialize(parentId, "string"); + } + + if (fields !== undefined) { + localVarQueryParameters['fields'] = ObjectSerializer.serialize(fields, "Array"); + } + + if (excludeItemTypes !== undefined) { + localVarQueryParameters['excludeItemTypes'] = ObjectSerializer.serialize(excludeItemTypes, "Array"); + } + + if (includeItemTypes !== undefined) { + localVarQueryParameters['includeItemTypes'] = ObjectSerializer.serialize(includeItemTypes, "Array"); + } + + if (filters !== undefined) { + localVarQueryParameters['filters'] = ObjectSerializer.serialize(filters, "Array"); + } + + if (isFavorite !== undefined) { + localVarQueryParameters['isFavorite'] = ObjectSerializer.serialize(isFavorite, "boolean"); + } + + if (mediaTypes !== undefined) { + localVarQueryParameters['mediaTypes'] = ObjectSerializer.serialize(mediaTypes, "Array"); + } + + if (genres !== undefined) { + localVarQueryParameters['genres'] = ObjectSerializer.serialize(genres, "Array"); + } + + if (genreIds !== undefined) { + localVarQueryParameters['genreIds'] = ObjectSerializer.serialize(genreIds, "Array"); + } + + if (officialRatings !== undefined) { + localVarQueryParameters['officialRatings'] = ObjectSerializer.serialize(officialRatings, "Array"); + } + + if (tags !== undefined) { + localVarQueryParameters['tags'] = ObjectSerializer.serialize(tags, "Array"); + } + + if (years !== undefined) { + localVarQueryParameters['years'] = ObjectSerializer.serialize(years, "Array"); + } + + if (enableUserData !== undefined) { + localVarQueryParameters['enableUserData'] = ObjectSerializer.serialize(enableUserData, "boolean"); + } + + if (imageTypeLimit !== undefined) { + localVarQueryParameters['imageTypeLimit'] = ObjectSerializer.serialize(imageTypeLimit, "number"); + } + + if (enableImageTypes !== undefined) { + localVarQueryParameters['enableImageTypes'] = ObjectSerializer.serialize(enableImageTypes, "Array"); + } + + if (person !== undefined) { + localVarQueryParameters['person'] = ObjectSerializer.serialize(person, "string"); + } + + if (personIds !== undefined) { + localVarQueryParameters['personIds'] = ObjectSerializer.serialize(personIds, "Array"); + } + + if (personTypes !== undefined) { + localVarQueryParameters['personTypes'] = ObjectSerializer.serialize(personTypes, "Array"); + } + + if (studios !== undefined) { + localVarQueryParameters['studios'] = ObjectSerializer.serialize(studios, "Array"); + } + + if (studioIds !== undefined) { + localVarQueryParameters['studioIds'] = ObjectSerializer.serialize(studioIds, "Array"); + } + + if (userId !== undefined) { + localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string"); + } + + if (nameStartsWithOrGreater !== undefined) { + localVarQueryParameters['nameStartsWithOrGreater'] = ObjectSerializer.serialize(nameStartsWithOrGreater, "string"); + } + + if (nameStartsWith !== undefined) { + localVarQueryParameters['nameStartsWith'] = ObjectSerializer.serialize(nameStartsWith, "string"); + } + + if (nameLessThan !== undefined) { + localVarQueryParameters['nameLessThan'] = ObjectSerializer.serialize(nameLessThan, "string"); + } + + if (sortBy !== undefined) { + localVarQueryParameters['sortBy'] = ObjectSerializer.serialize(sortBy, "Array"); + } + + if (sortOrder !== undefined) { + localVarQueryParameters['sortOrder'] = ObjectSerializer.serialize(sortOrder, "Array"); + } + + if (enableImages !== undefined) { + localVarQueryParameters['enableImages'] = ObjectSerializer.serialize(enableImages, "boolean"); + } + + if (enableTotalRecordCount !== undefined) { + localVarQueryParameters['enableTotalRecordCount'] = ObjectSerializer.serialize(enableTotalRecordCount, "boolean"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "BaseItemDtoQueryResult"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets an artist by name. + * @param name Studio name. + * @param userId Optional. Filter by user id, and attach user data. + */ + public async getArtistByName (name: string, userId?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDto; }> { + const localVarPath = this.basePath + '/Artists/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling getArtistByName.'); + } + + if (userId !== undefined) { + localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: BaseItemDto; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "BaseItemDto"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets all artists from a given item, folder, or the entire library. + * @param minCommunityRating Optional filter by minimum community rating. + * @param startIndex Optional. The record index to start at. All items with a lower index will be dropped from the results. + * @param limit Optional. The maximum number of records to return. + * @param searchTerm Optional. Search term. + * @param parentId Specify this to localize the search to a specific item or folder. Omit to use the root. + * @param fields Optional. Specify additional fields of information to return in the output. + * @param excludeItemTypes Optional. If specified, results will be filtered out based on item type. This allows multiple, comma delimited. + * @param includeItemTypes Optional. If specified, results will be filtered based on item type. This allows multiple, comma delimited. + * @param filters Optional. Specify additional filters to apply. + * @param isFavorite Optional filter by items that are marked as favorite, or not. + * @param mediaTypes Optional filter by MediaType. Allows multiple, comma delimited. + * @param genres Optional. If specified, results will be filtered based on genre. This allows multiple, pipe delimited. + * @param genreIds Optional. If specified, results will be filtered based on genre id. This allows multiple, pipe delimited. + * @param officialRatings Optional. If specified, results will be filtered based on OfficialRating. This allows multiple, pipe delimited. + * @param tags Optional. If specified, results will be filtered based on tag. This allows multiple, pipe delimited. + * @param years Optional. If specified, results will be filtered based on production year. This allows multiple, comma delimited. + * @param enableUserData Optional, include user data. + * @param imageTypeLimit Optional, the max number of images to return, per image type. + * @param enableImageTypes Optional. The image types to include in the output. + * @param person Optional. If specified, results will be filtered to include only those containing the specified person. + * @param personIds Optional. If specified, results will be filtered to include only those containing the specified person ids. + * @param personTypes Optional. If specified, along with Person, results will be filtered to include only those containing the specified person and PersonType. Allows multiple, comma-delimited. + * @param studios Optional. If specified, results will be filtered based on studio. This allows multiple, pipe delimited. + * @param studioIds Optional. If specified, results will be filtered based on studio id. This allows multiple, pipe delimited. + * @param userId User id. + * @param nameStartsWithOrGreater Optional filter by items whose name is sorted equally or greater than a given input string. + * @param nameStartsWith Optional filter by items whose name is sorted equally than a given input string. + * @param nameLessThan Optional filter by items whose name is equally or lesser than a given input string. + * @param sortBy Optional. Specify one or more sort orders, comma delimited. + * @param sortOrder Sort Order - Ascending,Descending. + * @param enableImages Optional, include image information in output. + * @param enableTotalRecordCount Total record count. + */ + public async getArtists (minCommunityRating?: number, startIndex?: number, limit?: number, searchTerm?: string, parentId?: string, fields?: Array, excludeItemTypes?: Array, includeItemTypes?: Array, filters?: Array, isFavorite?: boolean, mediaTypes?: Array, genres?: Array, genreIds?: Array, officialRatings?: Array, tags?: Array, years?: Array, enableUserData?: boolean, imageTypeLimit?: number, enableImageTypes?: Array, person?: string, personIds?: Array, personTypes?: Array, studios?: Array, studioIds?: Array, userId?: string, nameStartsWithOrGreater?: string, nameStartsWith?: string, nameLessThan?: string, sortBy?: Array, sortOrder?: Array, enableImages?: boolean, enableTotalRecordCount?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }> { + const localVarPath = this.basePath + '/Artists'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + if (minCommunityRating !== undefined) { + localVarQueryParameters['minCommunityRating'] = ObjectSerializer.serialize(minCommunityRating, "number"); + } + + if (startIndex !== undefined) { + localVarQueryParameters['startIndex'] = ObjectSerializer.serialize(startIndex, "number"); + } + + if (limit !== undefined) { + localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); + } + + if (searchTerm !== undefined) { + localVarQueryParameters['searchTerm'] = ObjectSerializer.serialize(searchTerm, "string"); + } + + if (parentId !== undefined) { + localVarQueryParameters['parentId'] = ObjectSerializer.serialize(parentId, "string"); + } + + if (fields !== undefined) { + localVarQueryParameters['fields'] = ObjectSerializer.serialize(fields, "Array"); + } + + if (excludeItemTypes !== undefined) { + localVarQueryParameters['excludeItemTypes'] = ObjectSerializer.serialize(excludeItemTypes, "Array"); + } + + if (includeItemTypes !== undefined) { + localVarQueryParameters['includeItemTypes'] = ObjectSerializer.serialize(includeItemTypes, "Array"); + } + + if (filters !== undefined) { + localVarQueryParameters['filters'] = ObjectSerializer.serialize(filters, "Array"); + } + + if (isFavorite !== undefined) { + localVarQueryParameters['isFavorite'] = ObjectSerializer.serialize(isFavorite, "boolean"); + } + + if (mediaTypes !== undefined) { + localVarQueryParameters['mediaTypes'] = ObjectSerializer.serialize(mediaTypes, "Array"); + } + + if (genres !== undefined) { + localVarQueryParameters['genres'] = ObjectSerializer.serialize(genres, "Array"); + } + + if (genreIds !== undefined) { + localVarQueryParameters['genreIds'] = ObjectSerializer.serialize(genreIds, "Array"); + } + + if (officialRatings !== undefined) { + localVarQueryParameters['officialRatings'] = ObjectSerializer.serialize(officialRatings, "Array"); + } + + if (tags !== undefined) { + localVarQueryParameters['tags'] = ObjectSerializer.serialize(tags, "Array"); + } + + if (years !== undefined) { + localVarQueryParameters['years'] = ObjectSerializer.serialize(years, "Array"); + } + + if (enableUserData !== undefined) { + localVarQueryParameters['enableUserData'] = ObjectSerializer.serialize(enableUserData, "boolean"); + } + + if (imageTypeLimit !== undefined) { + localVarQueryParameters['imageTypeLimit'] = ObjectSerializer.serialize(imageTypeLimit, "number"); + } + + if (enableImageTypes !== undefined) { + localVarQueryParameters['enableImageTypes'] = ObjectSerializer.serialize(enableImageTypes, "Array"); + } + + if (person !== undefined) { + localVarQueryParameters['person'] = ObjectSerializer.serialize(person, "string"); + } + + if (personIds !== undefined) { + localVarQueryParameters['personIds'] = ObjectSerializer.serialize(personIds, "Array"); + } + + if (personTypes !== undefined) { + localVarQueryParameters['personTypes'] = ObjectSerializer.serialize(personTypes, "Array"); + } + + if (studios !== undefined) { + localVarQueryParameters['studios'] = ObjectSerializer.serialize(studios, "Array"); + } + + if (studioIds !== undefined) { + localVarQueryParameters['studioIds'] = ObjectSerializer.serialize(studioIds, "Array"); + } + + if (userId !== undefined) { + localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string"); + } + + if (nameStartsWithOrGreater !== undefined) { + localVarQueryParameters['nameStartsWithOrGreater'] = ObjectSerializer.serialize(nameStartsWithOrGreater, "string"); + } + + if (nameStartsWith !== undefined) { + localVarQueryParameters['nameStartsWith'] = ObjectSerializer.serialize(nameStartsWith, "string"); + } + + if (nameLessThan !== undefined) { + localVarQueryParameters['nameLessThan'] = ObjectSerializer.serialize(nameLessThan, "string"); + } + + if (sortBy !== undefined) { + localVarQueryParameters['sortBy'] = ObjectSerializer.serialize(sortBy, "Array"); + } + + if (sortOrder !== undefined) { + localVarQueryParameters['sortOrder'] = ObjectSerializer.serialize(sortOrder, "Array"); + } + + if (enableImages !== undefined) { + localVarQueryParameters['enableImages'] = ObjectSerializer.serialize(enableImages, "boolean"); + } + + if (enableTotalRecordCount !== undefined) { + localVarQueryParameters['enableTotalRecordCount'] = ObjectSerializer.serialize(enableTotalRecordCount, "boolean"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "BaseItemDtoQueryResult"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} diff --git a/jellyfin/api/audioApi.ts b/jellyfin/api/audioApi.ts new file mode 100644 index 0000000..8dc367e --- /dev/null +++ b/jellyfin/api/audioApi.ts @@ -0,0 +1,1333 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import localVarRequest from 'request'; +import http from 'http'; + +/* tslint:disable:no-unused-locals */ +import { EncodingContext } from '../model/encodingContext'; +import { SubtitleDeliveryMethod } from '../model/subtitleDeliveryMethod'; + +import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; +import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; + +import { HttpError, RequestFile } from './apis'; + +let defaultBasePath = 'http://localhost'; + +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== + +export enum AudioApiApiKeys { + CustomAuthentication, +} + +export class AudioApi { + protected _basePath = defaultBasePath; + protected _defaultHeaders : any = {}; + protected _useQuerystring : boolean = false; + + protected authentications = { + 'default': new VoidAuth(), + 'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'), + } + + protected interceptors: Interceptor[] = []; + + constructor(basePath?: string); + constructor(basePathOrUsername: string, password?: string, basePath?: string) { + if (password) { + if (basePath) { + this.basePath = basePath; + } + } else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername + } + } + } + + set useQuerystring(value: boolean) { + this._useQuerystring = value; + } + + set basePath(basePath: string) { + this._basePath = basePath; + } + + set defaultHeaders(defaultHeaders: any) { + this._defaultHeaders = defaultHeaders; + } + + get defaultHeaders() { + return this._defaultHeaders; + } + + get basePath() { + return this._basePath; + } + + public setDefaultAuthentication(auth: Authentication) { + this.authentications.default = auth; + } + + public setApiKey(key: AudioApiApiKeys, value: string) { + (this.authentications as any)[AudioApiApiKeys[key]].apiKey = value; + } + + public addInterceptor(interceptor: Interceptor) { + this.interceptors.push(interceptor); + } + + /** + * + * @summary Gets an audio stream. + * @param itemId The item id. + * @param container The audio container. + * @param _static Optional. If true, the original file will be streamed statically without any encoding. Use either no url extension or the original file extension. true/false. + * @param params The streaming parameters. + * @param tag The tag. + * @param deviceProfileId Optional. The dlna device profile id to utilize. + * @param playSessionId The play session id. + * @param segmentContainer The segment container. + * @param segmentLength The segment length. + * @param minSegments The minimum number of segments. + * @param mediaSourceId The media version id, if playing an alternate version. + * @param deviceId The device id of the client requesting. Used to stop encoding processes when needed. + * @param audioCodec Optional. Specify a audio codec to encode to, e.g. mp3. If omitted the server will auto-select using the url\'s extension. Options: aac, mp3, vorbis, wma. + * @param enableAutoStreamCopy Whether or not to allow automatic stream copy if requested values match the original source. Defaults to true. + * @param allowVideoStreamCopy Whether or not to allow copying of the video stream url. + * @param allowAudioStreamCopy Whether or not to allow copying of the audio stream url. + * @param breakOnNonKeyFrames Optional. Whether to break on non key frames. + * @param audioSampleRate Optional. Specify a specific audio sample rate, e.g. 44100. + * @param maxAudioBitDepth Optional. The maximum audio bit depth. + * @param audioBitRate Optional. Specify an audio bitrate to encode to, e.g. 128000. If omitted this will be left to encoder defaults. + * @param audioChannels Optional. Specify a specific number of audio channels to encode to, e.g. 2. + * @param maxAudioChannels Optional. Specify a maximum number of audio channels to encode to, e.g. 2. + * @param profile Optional. Specify a specific an encoder profile (varies by encoder), e.g. main, baseline, high. + * @param level Optional. Specify a level for the encoder profile (varies by encoder), e.g. 3, 3.1. + * @param framerate Optional. A specific video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. + * @param maxFramerate Optional. A specific maximum video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. + * @param copyTimestamps Whether or not to copy timestamps when transcoding with an offset. Defaults to false. + * @param startTimeTicks Optional. Specify a starting offset, in ticks. 1 tick = 10000 ms. + * @param width Optional. The fixed horizontal resolution of the encoded video. + * @param height Optional. The fixed vertical resolution of the encoded video. + * @param videoBitRate Optional. Specify a video bitrate to encode to, e.g. 500000. If omitted this will be left to encoder defaults. + * @param subtitleStreamIndex Optional. The index of the subtitle stream to use. If omitted no subtitles will be used. + * @param subtitleMethod Optional. Specify the subtitle delivery method. + * @param maxRefFrames Optional. + * @param maxVideoBitDepth Optional. The maximum video bit depth. + * @param requireAvc Optional. Whether to require avc. + * @param deInterlace Optional. Whether to deinterlace the video. + * @param requireNonAnamorphic Optional. Whether to require a non anamorphic stream. + * @param transcodingMaxAudioChannels Optional. The maximum number of audio channels to transcode. + * @param cpuCoreLimit Optional. The limit of how many cpu cores to use. + * @param liveStreamId The live stream id. + * @param enableMpegtsM2TsMode Optional. Whether to enable the MpegtsM2Ts mode. + * @param videoCodec Optional. Specify a video codec to encode to, e.g. h264. If omitted the server will auto-select using the url\'s extension. Options: h265, h264, mpeg4, theora, vp8, vp9, vpx (deprecated), wmv. + * @param subtitleCodec Optional. Specify a subtitle codec to encode to. + * @param transcodeReasons Optional. The transcoding reason. + * @param audioStreamIndex Optional. The index of the audio stream to use. If omitted the first audio stream will be used. + * @param videoStreamIndex Optional. The index of the video stream to use. If omitted the first video stream will be used. + * @param context Optional. The MediaBrowser.Model.Dlna.EncodingContext. + * @param streamOptions Optional. The streaming options. + */ + public async getAudioStream (itemId: string, container?: string, _static?: boolean, params?: string, tag?: string, deviceProfileId?: string, playSessionId?: string, segmentContainer?: string, segmentLength?: number, minSegments?: number, mediaSourceId?: string, deviceId?: string, audioCodec?: string, enableAutoStreamCopy?: boolean, allowVideoStreamCopy?: boolean, allowAudioStreamCopy?: boolean, breakOnNonKeyFrames?: boolean, audioSampleRate?: number, maxAudioBitDepth?: number, audioBitRate?: number, audioChannels?: number, maxAudioChannels?: number, profile?: string, level?: string, framerate?: number, maxFramerate?: number, copyTimestamps?: boolean, startTimeTicks?: number, width?: number, height?: number, videoBitRate?: number, subtitleStreamIndex?: number, subtitleMethod?: SubtitleDeliveryMethod, maxRefFrames?: number, maxVideoBitDepth?: number, requireAvc?: boolean, deInterlace?: boolean, requireNonAnamorphic?: boolean, transcodingMaxAudioChannels?: number, cpuCoreLimit?: number, liveStreamId?: string, enableMpegtsM2TsMode?: boolean, videoCodec?: string, subtitleCodec?: string, transcodeReasons?: string, audioStreamIndex?: number, videoStreamIndex?: number, context?: EncodingContext, streamOptions?: { [key: string]: string; }, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/Audio/{itemId}/stream' + .replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['audio/*']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'itemId' is not null or undefined + if (itemId === null || itemId === undefined) { + throw new Error('Required parameter itemId was null or undefined when calling getAudioStream.'); + } + + if (container !== undefined) { + localVarQueryParameters['container'] = ObjectSerializer.serialize(container, "string"); + } + + if (_static !== undefined) { + localVarQueryParameters['static'] = ObjectSerializer.serialize(_static, "boolean"); + } + + if (params !== undefined) { + localVarQueryParameters['params'] = ObjectSerializer.serialize(params, "string"); + } + + if (tag !== undefined) { + localVarQueryParameters['tag'] = ObjectSerializer.serialize(tag, "string"); + } + + if (deviceProfileId !== undefined) { + localVarQueryParameters['deviceProfileId'] = ObjectSerializer.serialize(deviceProfileId, "string"); + } + + if (playSessionId !== undefined) { + localVarQueryParameters['playSessionId'] = ObjectSerializer.serialize(playSessionId, "string"); + } + + if (segmentContainer !== undefined) { + localVarQueryParameters['segmentContainer'] = ObjectSerializer.serialize(segmentContainer, "string"); + } + + if (segmentLength !== undefined) { + localVarQueryParameters['segmentLength'] = ObjectSerializer.serialize(segmentLength, "number"); + } + + if (minSegments !== undefined) { + localVarQueryParameters['minSegments'] = ObjectSerializer.serialize(minSegments, "number"); + } + + if (mediaSourceId !== undefined) { + localVarQueryParameters['mediaSourceId'] = ObjectSerializer.serialize(mediaSourceId, "string"); + } + + if (deviceId !== undefined) { + localVarQueryParameters['deviceId'] = ObjectSerializer.serialize(deviceId, "string"); + } + + if (audioCodec !== undefined) { + localVarQueryParameters['audioCodec'] = ObjectSerializer.serialize(audioCodec, "string"); + } + + if (enableAutoStreamCopy !== undefined) { + localVarQueryParameters['enableAutoStreamCopy'] = ObjectSerializer.serialize(enableAutoStreamCopy, "boolean"); + } + + if (allowVideoStreamCopy !== undefined) { + localVarQueryParameters['allowVideoStreamCopy'] = ObjectSerializer.serialize(allowVideoStreamCopy, "boolean"); + } + + if (allowAudioStreamCopy !== undefined) { + localVarQueryParameters['allowAudioStreamCopy'] = ObjectSerializer.serialize(allowAudioStreamCopy, "boolean"); + } + + if (breakOnNonKeyFrames !== undefined) { + localVarQueryParameters['breakOnNonKeyFrames'] = ObjectSerializer.serialize(breakOnNonKeyFrames, "boolean"); + } + + if (audioSampleRate !== undefined) { + localVarQueryParameters['audioSampleRate'] = ObjectSerializer.serialize(audioSampleRate, "number"); + } + + if (maxAudioBitDepth !== undefined) { + localVarQueryParameters['maxAudioBitDepth'] = ObjectSerializer.serialize(maxAudioBitDepth, "number"); + } + + if (audioBitRate !== undefined) { + localVarQueryParameters['audioBitRate'] = ObjectSerializer.serialize(audioBitRate, "number"); + } + + if (audioChannels !== undefined) { + localVarQueryParameters['audioChannels'] = ObjectSerializer.serialize(audioChannels, "number"); + } + + if (maxAudioChannels !== undefined) { + localVarQueryParameters['maxAudioChannels'] = ObjectSerializer.serialize(maxAudioChannels, "number"); + } + + if (profile !== undefined) { + localVarQueryParameters['profile'] = ObjectSerializer.serialize(profile, "string"); + } + + if (level !== undefined) { + localVarQueryParameters['level'] = ObjectSerializer.serialize(level, "string"); + } + + if (framerate !== undefined) { + localVarQueryParameters['framerate'] = ObjectSerializer.serialize(framerate, "number"); + } + + if (maxFramerate !== undefined) { + localVarQueryParameters['maxFramerate'] = ObjectSerializer.serialize(maxFramerate, "number"); + } + + if (copyTimestamps !== undefined) { + localVarQueryParameters['copyTimestamps'] = ObjectSerializer.serialize(copyTimestamps, "boolean"); + } + + if (startTimeTicks !== undefined) { + localVarQueryParameters['startTimeTicks'] = ObjectSerializer.serialize(startTimeTicks, "number"); + } + + if (width !== undefined) { + localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number"); + } + + if (height !== undefined) { + localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number"); + } + + if (videoBitRate !== undefined) { + localVarQueryParameters['videoBitRate'] = ObjectSerializer.serialize(videoBitRate, "number"); + } + + if (subtitleStreamIndex !== undefined) { + localVarQueryParameters['subtitleStreamIndex'] = ObjectSerializer.serialize(subtitleStreamIndex, "number"); + } + + if (subtitleMethod !== undefined) { + localVarQueryParameters['subtitleMethod'] = ObjectSerializer.serialize(subtitleMethod, "SubtitleDeliveryMethod"); + } + + if (maxRefFrames !== undefined) { + localVarQueryParameters['maxRefFrames'] = ObjectSerializer.serialize(maxRefFrames, "number"); + } + + if (maxVideoBitDepth !== undefined) { + localVarQueryParameters['maxVideoBitDepth'] = ObjectSerializer.serialize(maxVideoBitDepth, "number"); + } + + if (requireAvc !== undefined) { + localVarQueryParameters['requireAvc'] = ObjectSerializer.serialize(requireAvc, "boolean"); + } + + if (deInterlace !== undefined) { + localVarQueryParameters['deInterlace'] = ObjectSerializer.serialize(deInterlace, "boolean"); + } + + if (requireNonAnamorphic !== undefined) { + localVarQueryParameters['requireNonAnamorphic'] = ObjectSerializer.serialize(requireNonAnamorphic, "boolean"); + } + + if (transcodingMaxAudioChannels !== undefined) { + localVarQueryParameters['transcodingMaxAudioChannels'] = ObjectSerializer.serialize(transcodingMaxAudioChannels, "number"); + } + + if (cpuCoreLimit !== undefined) { + localVarQueryParameters['cpuCoreLimit'] = ObjectSerializer.serialize(cpuCoreLimit, "number"); + } + + if (liveStreamId !== undefined) { + localVarQueryParameters['liveStreamId'] = ObjectSerializer.serialize(liveStreamId, "string"); + } + + if (enableMpegtsM2TsMode !== undefined) { + localVarQueryParameters['enableMpegtsM2TsMode'] = ObjectSerializer.serialize(enableMpegtsM2TsMode, "boolean"); + } + + if (videoCodec !== undefined) { + localVarQueryParameters['videoCodec'] = ObjectSerializer.serialize(videoCodec, "string"); + } + + if (subtitleCodec !== undefined) { + localVarQueryParameters['subtitleCodec'] = ObjectSerializer.serialize(subtitleCodec, "string"); + } + + if (transcodeReasons !== undefined) { + localVarQueryParameters['transcodeReasons'] = ObjectSerializer.serialize(transcodeReasons, "string"); + } + + if (audioStreamIndex !== undefined) { + localVarQueryParameters['audioStreamIndex'] = ObjectSerializer.serialize(audioStreamIndex, "number"); + } + + if (videoStreamIndex !== undefined) { + localVarQueryParameters['videoStreamIndex'] = ObjectSerializer.serialize(videoStreamIndex, "number"); + } + + if (context !== undefined) { + localVarQueryParameters['context'] = ObjectSerializer.serialize(context, "EncodingContext"); + } + + if (streamOptions !== undefined) { + localVarQueryParameters['streamOptions'] = ObjectSerializer.serialize(streamOptions, "{ [key: string]: string; }"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets an audio stream. + * @param itemId The item id. + * @param container The audio container. + * @param _static Optional. If true, the original file will be streamed statically without any encoding. Use either no url extension or the original file extension. true/false. + * @param params The streaming parameters. + * @param tag The tag. + * @param deviceProfileId Optional. The dlna device profile id to utilize. + * @param playSessionId The play session id. + * @param segmentContainer The segment container. + * @param segmentLength The segment lenght. + * @param minSegments The minimum number of segments. + * @param mediaSourceId The media version id, if playing an alternate version. + * @param deviceId The device id of the client requesting. Used to stop encoding processes when needed. + * @param audioCodec Optional. Specify a audio codec to encode to, e.g. mp3. If omitted the server will auto-select using the url\'s extension. Options: aac, mp3, vorbis, wma. + * @param enableAutoStreamCopy Whether or not to allow automatic stream copy if requested values match the original source. Defaults to true. + * @param allowVideoStreamCopy Whether or not to allow copying of the video stream url. + * @param allowAudioStreamCopy Whether or not to allow copying of the audio stream url. + * @param breakOnNonKeyFrames Optional. Whether to break on non key frames. + * @param audioSampleRate Optional. Specify a specific audio sample rate, e.g. 44100. + * @param maxAudioBitDepth Optional. The maximum audio bit depth. + * @param audioBitRate Optional. Specify an audio bitrate to encode to, e.g. 128000. If omitted this will be left to encoder defaults. + * @param audioChannels Optional. Specify a specific number of audio channels to encode to, e.g. 2. + * @param maxAudioChannels Optional. Specify a maximum number of audio channels to encode to, e.g. 2. + * @param profile Optional. Specify a specific an encoder profile (varies by encoder), e.g. main, baseline, high. + * @param level Optional. Specify a level for the encoder profile (varies by encoder), e.g. 3, 3.1. + * @param framerate Optional. A specific video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. + * @param maxFramerate Optional. A specific maximum video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. + * @param copyTimestamps Whether or not to copy timestamps when transcoding with an offset. Defaults to false. + * @param startTimeTicks Optional. Specify a starting offset, in ticks. 1 tick = 10000 ms. + * @param width Optional. The fixed horizontal resolution of the encoded video. + * @param height Optional. The fixed vertical resolution of the encoded video. + * @param videoBitRate Optional. Specify a video bitrate to encode to, e.g. 500000. If omitted this will be left to encoder defaults. + * @param subtitleStreamIndex Optional. The index of the subtitle stream to use. If omitted no subtitles will be used. + * @param subtitleMethod Optional. Specify the subtitle delivery method. + * @param maxRefFrames Optional. + * @param maxVideoBitDepth Optional. The maximum video bit depth. + * @param requireAvc Optional. Whether to require avc. + * @param deInterlace Optional. Whether to deinterlace the video. + * @param requireNonAnamorphic Optional. Whether to require a non anamporphic stream. + * @param transcodingMaxAudioChannels Optional. The maximum number of audio channels to transcode. + * @param cpuCoreLimit Optional. The limit of how many cpu cores to use. + * @param liveStreamId The live stream id. + * @param enableMpegtsM2TsMode Optional. Whether to enable the MpegtsM2Ts mode. + * @param videoCodec Optional. Specify a video codec to encode to, e.g. h264. If omitted the server will auto-select using the url\'s extension. Options: h265, h264, mpeg4, theora, vp8, vp9, vpx (deprecated), wmv. + * @param subtitleCodec Optional. Specify a subtitle codec to encode to. + * @param transcodeReasons Optional. The transcoding reason. + * @param audioStreamIndex Optional. The index of the audio stream to use. If omitted the first audio stream will be used. + * @param videoStreamIndex Optional. The index of the video stream to use. If omitted the first video stream will be used. + * @param context Optional. The MediaBrowser.Model.Dlna.EncodingContext. + * @param streamOptions Optional. The streaming options. + */ + public async getAudioStreamByContainer (itemId: string, container: string, _static?: boolean, params?: string, tag?: string, deviceProfileId?: string, playSessionId?: string, segmentContainer?: string, segmentLength?: number, minSegments?: number, mediaSourceId?: string, deviceId?: string, audioCodec?: string, enableAutoStreamCopy?: boolean, allowVideoStreamCopy?: boolean, allowAudioStreamCopy?: boolean, breakOnNonKeyFrames?: boolean, audioSampleRate?: number, maxAudioBitDepth?: number, audioBitRate?: number, audioChannels?: number, maxAudioChannels?: number, profile?: string, level?: string, framerate?: number, maxFramerate?: number, copyTimestamps?: boolean, startTimeTicks?: number, width?: number, height?: number, videoBitRate?: number, subtitleStreamIndex?: number, subtitleMethod?: SubtitleDeliveryMethod, maxRefFrames?: number, maxVideoBitDepth?: number, requireAvc?: boolean, deInterlace?: boolean, requireNonAnamorphic?: boolean, transcodingMaxAudioChannels?: number, cpuCoreLimit?: number, liveStreamId?: string, enableMpegtsM2TsMode?: boolean, videoCodec?: string, subtitleCodec?: string, transcodeReasons?: string, audioStreamIndex?: number, videoStreamIndex?: number, context?: EncodingContext, streamOptions?: { [key: string]: string; }, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/Audio/{itemId}/stream.{container}' + .replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId))) + .replace('{' + 'container' + '}', encodeURIComponent(String(container))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['audio/*']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'itemId' is not null or undefined + if (itemId === null || itemId === undefined) { + throw new Error('Required parameter itemId was null or undefined when calling getAudioStreamByContainer.'); + } + + // verify required parameter 'container' is not null or undefined + if (container === null || container === undefined) { + throw new Error('Required parameter container was null or undefined when calling getAudioStreamByContainer.'); + } + + if (_static !== undefined) { + localVarQueryParameters['static'] = ObjectSerializer.serialize(_static, "boolean"); + } + + if (params !== undefined) { + localVarQueryParameters['params'] = ObjectSerializer.serialize(params, "string"); + } + + if (tag !== undefined) { + localVarQueryParameters['tag'] = ObjectSerializer.serialize(tag, "string"); + } + + if (deviceProfileId !== undefined) { + localVarQueryParameters['deviceProfileId'] = ObjectSerializer.serialize(deviceProfileId, "string"); + } + + if (playSessionId !== undefined) { + localVarQueryParameters['playSessionId'] = ObjectSerializer.serialize(playSessionId, "string"); + } + + if (segmentContainer !== undefined) { + localVarQueryParameters['segmentContainer'] = ObjectSerializer.serialize(segmentContainer, "string"); + } + + if (segmentLength !== undefined) { + localVarQueryParameters['segmentLength'] = ObjectSerializer.serialize(segmentLength, "number"); + } + + if (minSegments !== undefined) { + localVarQueryParameters['minSegments'] = ObjectSerializer.serialize(minSegments, "number"); + } + + if (mediaSourceId !== undefined) { + localVarQueryParameters['mediaSourceId'] = ObjectSerializer.serialize(mediaSourceId, "string"); + } + + if (deviceId !== undefined) { + localVarQueryParameters['deviceId'] = ObjectSerializer.serialize(deviceId, "string"); + } + + if (audioCodec !== undefined) { + localVarQueryParameters['audioCodec'] = ObjectSerializer.serialize(audioCodec, "string"); + } + + if (enableAutoStreamCopy !== undefined) { + localVarQueryParameters['enableAutoStreamCopy'] = ObjectSerializer.serialize(enableAutoStreamCopy, "boolean"); + } + + if (allowVideoStreamCopy !== undefined) { + localVarQueryParameters['allowVideoStreamCopy'] = ObjectSerializer.serialize(allowVideoStreamCopy, "boolean"); + } + + if (allowAudioStreamCopy !== undefined) { + localVarQueryParameters['allowAudioStreamCopy'] = ObjectSerializer.serialize(allowAudioStreamCopy, "boolean"); + } + + if (breakOnNonKeyFrames !== undefined) { + localVarQueryParameters['breakOnNonKeyFrames'] = ObjectSerializer.serialize(breakOnNonKeyFrames, "boolean"); + } + + if (audioSampleRate !== undefined) { + localVarQueryParameters['audioSampleRate'] = ObjectSerializer.serialize(audioSampleRate, "number"); + } + + if (maxAudioBitDepth !== undefined) { + localVarQueryParameters['maxAudioBitDepth'] = ObjectSerializer.serialize(maxAudioBitDepth, "number"); + } + + if (audioBitRate !== undefined) { + localVarQueryParameters['audioBitRate'] = ObjectSerializer.serialize(audioBitRate, "number"); + } + + if (audioChannels !== undefined) { + localVarQueryParameters['audioChannels'] = ObjectSerializer.serialize(audioChannels, "number"); + } + + if (maxAudioChannels !== undefined) { + localVarQueryParameters['maxAudioChannels'] = ObjectSerializer.serialize(maxAudioChannels, "number"); + } + + if (profile !== undefined) { + localVarQueryParameters['profile'] = ObjectSerializer.serialize(profile, "string"); + } + + if (level !== undefined) { + localVarQueryParameters['level'] = ObjectSerializer.serialize(level, "string"); + } + + if (framerate !== undefined) { + localVarQueryParameters['framerate'] = ObjectSerializer.serialize(framerate, "number"); + } + + if (maxFramerate !== undefined) { + localVarQueryParameters['maxFramerate'] = ObjectSerializer.serialize(maxFramerate, "number"); + } + + if (copyTimestamps !== undefined) { + localVarQueryParameters['copyTimestamps'] = ObjectSerializer.serialize(copyTimestamps, "boolean"); + } + + if (startTimeTicks !== undefined) { + localVarQueryParameters['startTimeTicks'] = ObjectSerializer.serialize(startTimeTicks, "number"); + } + + if (width !== undefined) { + localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number"); + } + + if (height !== undefined) { + localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number"); + } + + if (videoBitRate !== undefined) { + localVarQueryParameters['videoBitRate'] = ObjectSerializer.serialize(videoBitRate, "number"); + } + + if (subtitleStreamIndex !== undefined) { + localVarQueryParameters['subtitleStreamIndex'] = ObjectSerializer.serialize(subtitleStreamIndex, "number"); + } + + if (subtitleMethod !== undefined) { + localVarQueryParameters['subtitleMethod'] = ObjectSerializer.serialize(subtitleMethod, "SubtitleDeliveryMethod"); + } + + if (maxRefFrames !== undefined) { + localVarQueryParameters['maxRefFrames'] = ObjectSerializer.serialize(maxRefFrames, "number"); + } + + if (maxVideoBitDepth !== undefined) { + localVarQueryParameters['maxVideoBitDepth'] = ObjectSerializer.serialize(maxVideoBitDepth, "number"); + } + + if (requireAvc !== undefined) { + localVarQueryParameters['requireAvc'] = ObjectSerializer.serialize(requireAvc, "boolean"); + } + + if (deInterlace !== undefined) { + localVarQueryParameters['deInterlace'] = ObjectSerializer.serialize(deInterlace, "boolean"); + } + + if (requireNonAnamorphic !== undefined) { + localVarQueryParameters['requireNonAnamorphic'] = ObjectSerializer.serialize(requireNonAnamorphic, "boolean"); + } + + if (transcodingMaxAudioChannels !== undefined) { + localVarQueryParameters['transcodingMaxAudioChannels'] = ObjectSerializer.serialize(transcodingMaxAudioChannels, "number"); + } + + if (cpuCoreLimit !== undefined) { + localVarQueryParameters['cpuCoreLimit'] = ObjectSerializer.serialize(cpuCoreLimit, "number"); + } + + if (liveStreamId !== undefined) { + localVarQueryParameters['liveStreamId'] = ObjectSerializer.serialize(liveStreamId, "string"); + } + + if (enableMpegtsM2TsMode !== undefined) { + localVarQueryParameters['enableMpegtsM2TsMode'] = ObjectSerializer.serialize(enableMpegtsM2TsMode, "boolean"); + } + + if (videoCodec !== undefined) { + localVarQueryParameters['videoCodec'] = ObjectSerializer.serialize(videoCodec, "string"); + } + + if (subtitleCodec !== undefined) { + localVarQueryParameters['subtitleCodec'] = ObjectSerializer.serialize(subtitleCodec, "string"); + } + + if (transcodeReasons !== undefined) { + localVarQueryParameters['transcodeReasons'] = ObjectSerializer.serialize(transcodeReasons, "string"); + } + + if (audioStreamIndex !== undefined) { + localVarQueryParameters['audioStreamIndex'] = ObjectSerializer.serialize(audioStreamIndex, "number"); + } + + if (videoStreamIndex !== undefined) { + localVarQueryParameters['videoStreamIndex'] = ObjectSerializer.serialize(videoStreamIndex, "number"); + } + + if (context !== undefined) { + localVarQueryParameters['context'] = ObjectSerializer.serialize(context, "EncodingContext"); + } + + if (streamOptions !== undefined) { + localVarQueryParameters['streamOptions'] = ObjectSerializer.serialize(streamOptions, "{ [key: string]: string; }"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets an audio stream. + * @param itemId The item id. + * @param container The audio container. + * @param _static Optional. If true, the original file will be streamed statically without any encoding. Use either no url extension or the original file extension. true/false. + * @param params The streaming parameters. + * @param tag The tag. + * @param deviceProfileId Optional. The dlna device profile id to utilize. + * @param playSessionId The play session id. + * @param segmentContainer The segment container. + * @param segmentLength The segment length. + * @param minSegments The minimum number of segments. + * @param mediaSourceId The media version id, if playing an alternate version. + * @param deviceId The device id of the client requesting. Used to stop encoding processes when needed. + * @param audioCodec Optional. Specify a audio codec to encode to, e.g. mp3. If omitted the server will auto-select using the url\'s extension. Options: aac, mp3, vorbis, wma. + * @param enableAutoStreamCopy Whether or not to allow automatic stream copy if requested values match the original source. Defaults to true. + * @param allowVideoStreamCopy Whether or not to allow copying of the video stream url. + * @param allowAudioStreamCopy Whether or not to allow copying of the audio stream url. + * @param breakOnNonKeyFrames Optional. Whether to break on non key frames. + * @param audioSampleRate Optional. Specify a specific audio sample rate, e.g. 44100. + * @param maxAudioBitDepth Optional. The maximum audio bit depth. + * @param audioBitRate Optional. Specify an audio bitrate to encode to, e.g. 128000. If omitted this will be left to encoder defaults. + * @param audioChannels Optional. Specify a specific number of audio channels to encode to, e.g. 2. + * @param maxAudioChannels Optional. Specify a maximum number of audio channels to encode to, e.g. 2. + * @param profile Optional. Specify a specific an encoder profile (varies by encoder), e.g. main, baseline, high. + * @param level Optional. Specify a level for the encoder profile (varies by encoder), e.g. 3, 3.1. + * @param framerate Optional. A specific video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. + * @param maxFramerate Optional. A specific maximum video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. + * @param copyTimestamps Whether or not to copy timestamps when transcoding with an offset. Defaults to false. + * @param startTimeTicks Optional. Specify a starting offset, in ticks. 1 tick = 10000 ms. + * @param width Optional. The fixed horizontal resolution of the encoded video. + * @param height Optional. The fixed vertical resolution of the encoded video. + * @param videoBitRate Optional. Specify a video bitrate to encode to, e.g. 500000. If omitted this will be left to encoder defaults. + * @param subtitleStreamIndex Optional. The index of the subtitle stream to use. If omitted no subtitles will be used. + * @param subtitleMethod Optional. Specify the subtitle delivery method. + * @param maxRefFrames Optional. + * @param maxVideoBitDepth Optional. The maximum video bit depth. + * @param requireAvc Optional. Whether to require avc. + * @param deInterlace Optional. Whether to deinterlace the video. + * @param requireNonAnamorphic Optional. Whether to require a non anamorphic stream. + * @param transcodingMaxAudioChannels Optional. The maximum number of audio channels to transcode. + * @param cpuCoreLimit Optional. The limit of how many cpu cores to use. + * @param liveStreamId The live stream id. + * @param enableMpegtsM2TsMode Optional. Whether to enable the MpegtsM2Ts mode. + * @param videoCodec Optional. Specify a video codec to encode to, e.g. h264. If omitted the server will auto-select using the url\'s extension. Options: h265, h264, mpeg4, theora, vp8, vp9, vpx (deprecated), wmv. + * @param subtitleCodec Optional. Specify a subtitle codec to encode to. + * @param transcodeReasons Optional. The transcoding reason. + * @param audioStreamIndex Optional. The index of the audio stream to use. If omitted the first audio stream will be used. + * @param videoStreamIndex Optional. The index of the video stream to use. If omitted the first video stream will be used. + * @param context Optional. The MediaBrowser.Model.Dlna.EncodingContext. + * @param streamOptions Optional. The streaming options. + */ + public async headAudioStream (itemId: string, container?: string, _static?: boolean, params?: string, tag?: string, deviceProfileId?: string, playSessionId?: string, segmentContainer?: string, segmentLength?: number, minSegments?: number, mediaSourceId?: string, deviceId?: string, audioCodec?: string, enableAutoStreamCopy?: boolean, allowVideoStreamCopy?: boolean, allowAudioStreamCopy?: boolean, breakOnNonKeyFrames?: boolean, audioSampleRate?: number, maxAudioBitDepth?: number, audioBitRate?: number, audioChannels?: number, maxAudioChannels?: number, profile?: string, level?: string, framerate?: number, maxFramerate?: number, copyTimestamps?: boolean, startTimeTicks?: number, width?: number, height?: number, videoBitRate?: number, subtitleStreamIndex?: number, subtitleMethod?: SubtitleDeliveryMethod, maxRefFrames?: number, maxVideoBitDepth?: number, requireAvc?: boolean, deInterlace?: boolean, requireNonAnamorphic?: boolean, transcodingMaxAudioChannels?: number, cpuCoreLimit?: number, liveStreamId?: string, enableMpegtsM2TsMode?: boolean, videoCodec?: string, subtitleCodec?: string, transcodeReasons?: string, audioStreamIndex?: number, videoStreamIndex?: number, context?: EncodingContext, streamOptions?: { [key: string]: string; }, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/Audio/{itemId}/stream' + .replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['audio/*']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'itemId' is not null or undefined + if (itemId === null || itemId === undefined) { + throw new Error('Required parameter itemId was null or undefined when calling headAudioStream.'); + } + + if (container !== undefined) { + localVarQueryParameters['container'] = ObjectSerializer.serialize(container, "string"); + } + + if (_static !== undefined) { + localVarQueryParameters['static'] = ObjectSerializer.serialize(_static, "boolean"); + } + + if (params !== undefined) { + localVarQueryParameters['params'] = ObjectSerializer.serialize(params, "string"); + } + + if (tag !== undefined) { + localVarQueryParameters['tag'] = ObjectSerializer.serialize(tag, "string"); + } + + if (deviceProfileId !== undefined) { + localVarQueryParameters['deviceProfileId'] = ObjectSerializer.serialize(deviceProfileId, "string"); + } + + if (playSessionId !== undefined) { + localVarQueryParameters['playSessionId'] = ObjectSerializer.serialize(playSessionId, "string"); + } + + if (segmentContainer !== undefined) { + localVarQueryParameters['segmentContainer'] = ObjectSerializer.serialize(segmentContainer, "string"); + } + + if (segmentLength !== undefined) { + localVarQueryParameters['segmentLength'] = ObjectSerializer.serialize(segmentLength, "number"); + } + + if (minSegments !== undefined) { + localVarQueryParameters['minSegments'] = ObjectSerializer.serialize(minSegments, "number"); + } + + if (mediaSourceId !== undefined) { + localVarQueryParameters['mediaSourceId'] = ObjectSerializer.serialize(mediaSourceId, "string"); + } + + if (deviceId !== undefined) { + localVarQueryParameters['deviceId'] = ObjectSerializer.serialize(deviceId, "string"); + } + + if (audioCodec !== undefined) { + localVarQueryParameters['audioCodec'] = ObjectSerializer.serialize(audioCodec, "string"); + } + + if (enableAutoStreamCopy !== undefined) { + localVarQueryParameters['enableAutoStreamCopy'] = ObjectSerializer.serialize(enableAutoStreamCopy, "boolean"); + } + + if (allowVideoStreamCopy !== undefined) { + localVarQueryParameters['allowVideoStreamCopy'] = ObjectSerializer.serialize(allowVideoStreamCopy, "boolean"); + } + + if (allowAudioStreamCopy !== undefined) { + localVarQueryParameters['allowAudioStreamCopy'] = ObjectSerializer.serialize(allowAudioStreamCopy, "boolean"); + } + + if (breakOnNonKeyFrames !== undefined) { + localVarQueryParameters['breakOnNonKeyFrames'] = ObjectSerializer.serialize(breakOnNonKeyFrames, "boolean"); + } + + if (audioSampleRate !== undefined) { + localVarQueryParameters['audioSampleRate'] = ObjectSerializer.serialize(audioSampleRate, "number"); + } + + if (maxAudioBitDepth !== undefined) { + localVarQueryParameters['maxAudioBitDepth'] = ObjectSerializer.serialize(maxAudioBitDepth, "number"); + } + + if (audioBitRate !== undefined) { + localVarQueryParameters['audioBitRate'] = ObjectSerializer.serialize(audioBitRate, "number"); + } + + if (audioChannels !== undefined) { + localVarQueryParameters['audioChannels'] = ObjectSerializer.serialize(audioChannels, "number"); + } + + if (maxAudioChannels !== undefined) { + localVarQueryParameters['maxAudioChannels'] = ObjectSerializer.serialize(maxAudioChannels, "number"); + } + + if (profile !== undefined) { + localVarQueryParameters['profile'] = ObjectSerializer.serialize(profile, "string"); + } + + if (level !== undefined) { + localVarQueryParameters['level'] = ObjectSerializer.serialize(level, "string"); + } + + if (framerate !== undefined) { + localVarQueryParameters['framerate'] = ObjectSerializer.serialize(framerate, "number"); + } + + if (maxFramerate !== undefined) { + localVarQueryParameters['maxFramerate'] = ObjectSerializer.serialize(maxFramerate, "number"); + } + + if (copyTimestamps !== undefined) { + localVarQueryParameters['copyTimestamps'] = ObjectSerializer.serialize(copyTimestamps, "boolean"); + } + + if (startTimeTicks !== undefined) { + localVarQueryParameters['startTimeTicks'] = ObjectSerializer.serialize(startTimeTicks, "number"); + } + + if (width !== undefined) { + localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number"); + } + + if (height !== undefined) { + localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number"); + } + + if (videoBitRate !== undefined) { + localVarQueryParameters['videoBitRate'] = ObjectSerializer.serialize(videoBitRate, "number"); + } + + if (subtitleStreamIndex !== undefined) { + localVarQueryParameters['subtitleStreamIndex'] = ObjectSerializer.serialize(subtitleStreamIndex, "number"); + } + + if (subtitleMethod !== undefined) { + localVarQueryParameters['subtitleMethod'] = ObjectSerializer.serialize(subtitleMethod, "SubtitleDeliveryMethod"); + } + + if (maxRefFrames !== undefined) { + localVarQueryParameters['maxRefFrames'] = ObjectSerializer.serialize(maxRefFrames, "number"); + } + + if (maxVideoBitDepth !== undefined) { + localVarQueryParameters['maxVideoBitDepth'] = ObjectSerializer.serialize(maxVideoBitDepth, "number"); + } + + if (requireAvc !== undefined) { + localVarQueryParameters['requireAvc'] = ObjectSerializer.serialize(requireAvc, "boolean"); + } + + if (deInterlace !== undefined) { + localVarQueryParameters['deInterlace'] = ObjectSerializer.serialize(deInterlace, "boolean"); + } + + if (requireNonAnamorphic !== undefined) { + localVarQueryParameters['requireNonAnamorphic'] = ObjectSerializer.serialize(requireNonAnamorphic, "boolean"); + } + + if (transcodingMaxAudioChannels !== undefined) { + localVarQueryParameters['transcodingMaxAudioChannels'] = ObjectSerializer.serialize(transcodingMaxAudioChannels, "number"); + } + + if (cpuCoreLimit !== undefined) { + localVarQueryParameters['cpuCoreLimit'] = ObjectSerializer.serialize(cpuCoreLimit, "number"); + } + + if (liveStreamId !== undefined) { + localVarQueryParameters['liveStreamId'] = ObjectSerializer.serialize(liveStreamId, "string"); + } + + if (enableMpegtsM2TsMode !== undefined) { + localVarQueryParameters['enableMpegtsM2TsMode'] = ObjectSerializer.serialize(enableMpegtsM2TsMode, "boolean"); + } + + if (videoCodec !== undefined) { + localVarQueryParameters['videoCodec'] = ObjectSerializer.serialize(videoCodec, "string"); + } + + if (subtitleCodec !== undefined) { + localVarQueryParameters['subtitleCodec'] = ObjectSerializer.serialize(subtitleCodec, "string"); + } + + if (transcodeReasons !== undefined) { + localVarQueryParameters['transcodeReasons'] = ObjectSerializer.serialize(transcodeReasons, "string"); + } + + if (audioStreamIndex !== undefined) { + localVarQueryParameters['audioStreamIndex'] = ObjectSerializer.serialize(audioStreamIndex, "number"); + } + + if (videoStreamIndex !== undefined) { + localVarQueryParameters['videoStreamIndex'] = ObjectSerializer.serialize(videoStreamIndex, "number"); + } + + if (context !== undefined) { + localVarQueryParameters['context'] = ObjectSerializer.serialize(context, "EncodingContext"); + } + + if (streamOptions !== undefined) { + localVarQueryParameters['streamOptions'] = ObjectSerializer.serialize(streamOptions, "{ [key: string]: string; }"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'HEAD', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets an audio stream. + * @param itemId The item id. + * @param container The audio container. + * @param _static Optional. If true, the original file will be streamed statically without any encoding. Use either no url extension or the original file extension. true/false. + * @param params The streaming parameters. + * @param tag The tag. + * @param deviceProfileId Optional. The dlna device profile id to utilize. + * @param playSessionId The play session id. + * @param segmentContainer The segment container. + * @param segmentLength The segment lenght. + * @param minSegments The minimum number of segments. + * @param mediaSourceId The media version id, if playing an alternate version. + * @param deviceId The device id of the client requesting. Used to stop encoding processes when needed. + * @param audioCodec Optional. Specify a audio codec to encode to, e.g. mp3. If omitted the server will auto-select using the url\'s extension. Options: aac, mp3, vorbis, wma. + * @param enableAutoStreamCopy Whether or not to allow automatic stream copy if requested values match the original source. Defaults to true. + * @param allowVideoStreamCopy Whether or not to allow copying of the video stream url. + * @param allowAudioStreamCopy Whether or not to allow copying of the audio stream url. + * @param breakOnNonKeyFrames Optional. Whether to break on non key frames. + * @param audioSampleRate Optional. Specify a specific audio sample rate, e.g. 44100. + * @param maxAudioBitDepth Optional. The maximum audio bit depth. + * @param audioBitRate Optional. Specify an audio bitrate to encode to, e.g. 128000. If omitted this will be left to encoder defaults. + * @param audioChannels Optional. Specify a specific number of audio channels to encode to, e.g. 2. + * @param maxAudioChannels Optional. Specify a maximum number of audio channels to encode to, e.g. 2. + * @param profile Optional. Specify a specific an encoder profile (varies by encoder), e.g. main, baseline, high. + * @param level Optional. Specify a level for the encoder profile (varies by encoder), e.g. 3, 3.1. + * @param framerate Optional. A specific video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. + * @param maxFramerate Optional. A specific maximum video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. + * @param copyTimestamps Whether or not to copy timestamps when transcoding with an offset. Defaults to false. + * @param startTimeTicks Optional. Specify a starting offset, in ticks. 1 tick = 10000 ms. + * @param width Optional. The fixed horizontal resolution of the encoded video. + * @param height Optional. The fixed vertical resolution of the encoded video. + * @param videoBitRate Optional. Specify a video bitrate to encode to, e.g. 500000. If omitted this will be left to encoder defaults. + * @param subtitleStreamIndex Optional. The index of the subtitle stream to use. If omitted no subtitles will be used. + * @param subtitleMethod Optional. Specify the subtitle delivery method. + * @param maxRefFrames Optional. + * @param maxVideoBitDepth Optional. The maximum video bit depth. + * @param requireAvc Optional. Whether to require avc. + * @param deInterlace Optional. Whether to deinterlace the video. + * @param requireNonAnamorphic Optional. Whether to require a non anamporphic stream. + * @param transcodingMaxAudioChannels Optional. The maximum number of audio channels to transcode. + * @param cpuCoreLimit Optional. The limit of how many cpu cores to use. + * @param liveStreamId The live stream id. + * @param enableMpegtsM2TsMode Optional. Whether to enable the MpegtsM2Ts mode. + * @param videoCodec Optional. Specify a video codec to encode to, e.g. h264. If omitted the server will auto-select using the url\'s extension. Options: h265, h264, mpeg4, theora, vp8, vp9, vpx (deprecated), wmv. + * @param subtitleCodec Optional. Specify a subtitle codec to encode to. + * @param transcodeReasons Optional. The transcoding reason. + * @param audioStreamIndex Optional. The index of the audio stream to use. If omitted the first audio stream will be used. + * @param videoStreamIndex Optional. The index of the video stream to use. If omitted the first video stream will be used. + * @param context Optional. The MediaBrowser.Model.Dlna.EncodingContext. + * @param streamOptions Optional. The streaming options. + */ + public async headAudioStreamByContainer (itemId: string, container: string, _static?: boolean, params?: string, tag?: string, deviceProfileId?: string, playSessionId?: string, segmentContainer?: string, segmentLength?: number, minSegments?: number, mediaSourceId?: string, deviceId?: string, audioCodec?: string, enableAutoStreamCopy?: boolean, allowVideoStreamCopy?: boolean, allowAudioStreamCopy?: boolean, breakOnNonKeyFrames?: boolean, audioSampleRate?: number, maxAudioBitDepth?: number, audioBitRate?: number, audioChannels?: number, maxAudioChannels?: number, profile?: string, level?: string, framerate?: number, maxFramerate?: number, copyTimestamps?: boolean, startTimeTicks?: number, width?: number, height?: number, videoBitRate?: number, subtitleStreamIndex?: number, subtitleMethod?: SubtitleDeliveryMethod, maxRefFrames?: number, maxVideoBitDepth?: number, requireAvc?: boolean, deInterlace?: boolean, requireNonAnamorphic?: boolean, transcodingMaxAudioChannels?: number, cpuCoreLimit?: number, liveStreamId?: string, enableMpegtsM2TsMode?: boolean, videoCodec?: string, subtitleCodec?: string, transcodeReasons?: string, audioStreamIndex?: number, videoStreamIndex?: number, context?: EncodingContext, streamOptions?: { [key: string]: string; }, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/Audio/{itemId}/stream.{container}' + .replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId))) + .replace('{' + 'container' + '}', encodeURIComponent(String(container))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['audio/*']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'itemId' is not null or undefined + if (itemId === null || itemId === undefined) { + throw new Error('Required parameter itemId was null or undefined when calling headAudioStreamByContainer.'); + } + + // verify required parameter 'container' is not null or undefined + if (container === null || container === undefined) { + throw new Error('Required parameter container was null or undefined when calling headAudioStreamByContainer.'); + } + + if (_static !== undefined) { + localVarQueryParameters['static'] = ObjectSerializer.serialize(_static, "boolean"); + } + + if (params !== undefined) { + localVarQueryParameters['params'] = ObjectSerializer.serialize(params, "string"); + } + + if (tag !== undefined) { + localVarQueryParameters['tag'] = ObjectSerializer.serialize(tag, "string"); + } + + if (deviceProfileId !== undefined) { + localVarQueryParameters['deviceProfileId'] = ObjectSerializer.serialize(deviceProfileId, "string"); + } + + if (playSessionId !== undefined) { + localVarQueryParameters['playSessionId'] = ObjectSerializer.serialize(playSessionId, "string"); + } + + if (segmentContainer !== undefined) { + localVarQueryParameters['segmentContainer'] = ObjectSerializer.serialize(segmentContainer, "string"); + } + + if (segmentLength !== undefined) { + localVarQueryParameters['segmentLength'] = ObjectSerializer.serialize(segmentLength, "number"); + } + + if (minSegments !== undefined) { + localVarQueryParameters['minSegments'] = ObjectSerializer.serialize(minSegments, "number"); + } + + if (mediaSourceId !== undefined) { + localVarQueryParameters['mediaSourceId'] = ObjectSerializer.serialize(mediaSourceId, "string"); + } + + if (deviceId !== undefined) { + localVarQueryParameters['deviceId'] = ObjectSerializer.serialize(deviceId, "string"); + } + + if (audioCodec !== undefined) { + localVarQueryParameters['audioCodec'] = ObjectSerializer.serialize(audioCodec, "string"); + } + + if (enableAutoStreamCopy !== undefined) { + localVarQueryParameters['enableAutoStreamCopy'] = ObjectSerializer.serialize(enableAutoStreamCopy, "boolean"); + } + + if (allowVideoStreamCopy !== undefined) { + localVarQueryParameters['allowVideoStreamCopy'] = ObjectSerializer.serialize(allowVideoStreamCopy, "boolean"); + } + + if (allowAudioStreamCopy !== undefined) { + localVarQueryParameters['allowAudioStreamCopy'] = ObjectSerializer.serialize(allowAudioStreamCopy, "boolean"); + } + + if (breakOnNonKeyFrames !== undefined) { + localVarQueryParameters['breakOnNonKeyFrames'] = ObjectSerializer.serialize(breakOnNonKeyFrames, "boolean"); + } + + if (audioSampleRate !== undefined) { + localVarQueryParameters['audioSampleRate'] = ObjectSerializer.serialize(audioSampleRate, "number"); + } + + if (maxAudioBitDepth !== undefined) { + localVarQueryParameters['maxAudioBitDepth'] = ObjectSerializer.serialize(maxAudioBitDepth, "number"); + } + + if (audioBitRate !== undefined) { + localVarQueryParameters['audioBitRate'] = ObjectSerializer.serialize(audioBitRate, "number"); + } + + if (audioChannels !== undefined) { + localVarQueryParameters['audioChannels'] = ObjectSerializer.serialize(audioChannels, "number"); + } + + if (maxAudioChannels !== undefined) { + localVarQueryParameters['maxAudioChannels'] = ObjectSerializer.serialize(maxAudioChannels, "number"); + } + + if (profile !== undefined) { + localVarQueryParameters['profile'] = ObjectSerializer.serialize(profile, "string"); + } + + if (level !== undefined) { + localVarQueryParameters['level'] = ObjectSerializer.serialize(level, "string"); + } + + if (framerate !== undefined) { + localVarQueryParameters['framerate'] = ObjectSerializer.serialize(framerate, "number"); + } + + if (maxFramerate !== undefined) { + localVarQueryParameters['maxFramerate'] = ObjectSerializer.serialize(maxFramerate, "number"); + } + + if (copyTimestamps !== undefined) { + localVarQueryParameters['copyTimestamps'] = ObjectSerializer.serialize(copyTimestamps, "boolean"); + } + + if (startTimeTicks !== undefined) { + localVarQueryParameters['startTimeTicks'] = ObjectSerializer.serialize(startTimeTicks, "number"); + } + + if (width !== undefined) { + localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number"); + } + + if (height !== undefined) { + localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number"); + } + + if (videoBitRate !== undefined) { + localVarQueryParameters['videoBitRate'] = ObjectSerializer.serialize(videoBitRate, "number"); + } + + if (subtitleStreamIndex !== undefined) { + localVarQueryParameters['subtitleStreamIndex'] = ObjectSerializer.serialize(subtitleStreamIndex, "number"); + } + + if (subtitleMethod !== undefined) { + localVarQueryParameters['subtitleMethod'] = ObjectSerializer.serialize(subtitleMethod, "SubtitleDeliveryMethod"); + } + + if (maxRefFrames !== undefined) { + localVarQueryParameters['maxRefFrames'] = ObjectSerializer.serialize(maxRefFrames, "number"); + } + + if (maxVideoBitDepth !== undefined) { + localVarQueryParameters['maxVideoBitDepth'] = ObjectSerializer.serialize(maxVideoBitDepth, "number"); + } + + if (requireAvc !== undefined) { + localVarQueryParameters['requireAvc'] = ObjectSerializer.serialize(requireAvc, "boolean"); + } + + if (deInterlace !== undefined) { + localVarQueryParameters['deInterlace'] = ObjectSerializer.serialize(deInterlace, "boolean"); + } + + if (requireNonAnamorphic !== undefined) { + localVarQueryParameters['requireNonAnamorphic'] = ObjectSerializer.serialize(requireNonAnamorphic, "boolean"); + } + + if (transcodingMaxAudioChannels !== undefined) { + localVarQueryParameters['transcodingMaxAudioChannels'] = ObjectSerializer.serialize(transcodingMaxAudioChannels, "number"); + } + + if (cpuCoreLimit !== undefined) { + localVarQueryParameters['cpuCoreLimit'] = ObjectSerializer.serialize(cpuCoreLimit, "number"); + } + + if (liveStreamId !== undefined) { + localVarQueryParameters['liveStreamId'] = ObjectSerializer.serialize(liveStreamId, "string"); + } + + if (enableMpegtsM2TsMode !== undefined) { + localVarQueryParameters['enableMpegtsM2TsMode'] = ObjectSerializer.serialize(enableMpegtsM2TsMode, "boolean"); + } + + if (videoCodec !== undefined) { + localVarQueryParameters['videoCodec'] = ObjectSerializer.serialize(videoCodec, "string"); + } + + if (subtitleCodec !== undefined) { + localVarQueryParameters['subtitleCodec'] = ObjectSerializer.serialize(subtitleCodec, "string"); + } + + if (transcodeReasons !== undefined) { + localVarQueryParameters['transcodeReasons'] = ObjectSerializer.serialize(transcodeReasons, "string"); + } + + if (audioStreamIndex !== undefined) { + localVarQueryParameters['audioStreamIndex'] = ObjectSerializer.serialize(audioStreamIndex, "number"); + } + + if (videoStreamIndex !== undefined) { + localVarQueryParameters['videoStreamIndex'] = ObjectSerializer.serialize(videoStreamIndex, "number"); + } + + if (context !== undefined) { + localVarQueryParameters['context'] = ObjectSerializer.serialize(context, "EncodingContext"); + } + + if (streamOptions !== undefined) { + localVarQueryParameters['streamOptions'] = ObjectSerializer.serialize(streamOptions, "{ [key: string]: string; }"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'HEAD', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} diff --git a/jellyfin/api/brandingApi.ts b/jellyfin/api/brandingApi.ts new file mode 100644 index 0000000..df86af7 --- /dev/null +++ b/jellyfin/api/brandingApi.ts @@ -0,0 +1,278 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import localVarRequest from 'request'; +import http from 'http'; + +/* tslint:disable:no-unused-locals */ +import { BrandingOptions } from '../model/brandingOptions'; + +import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; +import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; + +import { HttpError, RequestFile } from './apis'; + +let defaultBasePath = 'http://localhost'; + +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== + +export enum BrandingApiApiKeys { + CustomAuthentication, +} + +export class BrandingApi { + protected _basePath = defaultBasePath; + protected _defaultHeaders : any = {}; + protected _useQuerystring : boolean = false; + + protected authentications = { + 'default': new VoidAuth(), + 'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'), + } + + protected interceptors: Interceptor[] = []; + + constructor(basePath?: string); + constructor(basePathOrUsername: string, password?: string, basePath?: string) { + if (password) { + if (basePath) { + this.basePath = basePath; + } + } else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername + } + } + } + + set useQuerystring(value: boolean) { + this._useQuerystring = value; + } + + set basePath(basePath: string) { + this._basePath = basePath; + } + + set defaultHeaders(defaultHeaders: any) { + this._defaultHeaders = defaultHeaders; + } + + get defaultHeaders() { + return this._defaultHeaders; + } + + get basePath() { + return this._basePath; + } + + public setDefaultAuthentication(auth: Authentication) { + this.authentications.default = auth; + } + + public setApiKey(key: BrandingApiApiKeys, value: string) { + (this.authentications as any)[BrandingApiApiKeys[key]].apiKey = value; + } + + public addInterceptor(interceptor: Interceptor) { + this.interceptors.push(interceptor); + } + + /** + * + * @summary Gets branding css. + */ + public async getBrandingCss (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: string; }> { + const localVarPath = this.basePath + '/Branding/Css'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['text/css', 'application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: string; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "string"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets branding css. + */ + public async getBrandingCss2 (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: string; }> { + const localVarPath = this.basePath + '/Branding/Css.css'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['text/css', 'application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: string; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "string"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets branding configuration. + */ + public async getBrandingOptions (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BrandingOptions; }> { + const localVarPath = this.basePath + '/Branding/Configuration'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: BrandingOptions; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "BrandingOptions"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} diff --git a/jellyfin/api/channelsApi.ts b/jellyfin/api/channelsApi.ts new file mode 100644 index 0000000..e7eb156 --- /dev/null +++ b/jellyfin/api/channelsApi.ts @@ -0,0 +1,535 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import localVarRequest from 'request'; +import http from 'http'; + +/* tslint:disable:no-unused-locals */ +import { BaseItemDtoQueryResult } from '../model/baseItemDtoQueryResult'; +import { ChannelFeatures } from '../model/channelFeatures'; +import { ItemFields } from '../model/itemFields'; +import { ItemFilter } from '../model/itemFilter'; +import { SortOrder } from '../model/sortOrder'; + +import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; +import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; + +import { HttpError, RequestFile } from './apis'; + +let defaultBasePath = 'http://localhost'; + +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== + +export enum ChannelsApiApiKeys { + CustomAuthentication, +} + +export class ChannelsApi { + protected _basePath = defaultBasePath; + protected _defaultHeaders : any = {}; + protected _useQuerystring : boolean = false; + + protected authentications = { + 'default': new VoidAuth(), + 'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'), + } + + protected interceptors: Interceptor[] = []; + + constructor(basePath?: string); + constructor(basePathOrUsername: string, password?: string, basePath?: string) { + if (password) { + if (basePath) { + this.basePath = basePath; + } + } else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername + } + } + } + + set useQuerystring(value: boolean) { + this._useQuerystring = value; + } + + set basePath(basePath: string) { + this._basePath = basePath; + } + + set defaultHeaders(defaultHeaders: any) { + this._defaultHeaders = defaultHeaders; + } + + get defaultHeaders() { + return this._defaultHeaders; + } + + get basePath() { + return this._basePath; + } + + public setDefaultAuthentication(auth: Authentication) { + this.authentications.default = auth; + } + + public setApiKey(key: ChannelsApiApiKeys, value: string) { + (this.authentications as any)[ChannelsApiApiKeys[key]].apiKey = value; + } + + public addInterceptor(interceptor: Interceptor) { + this.interceptors.push(interceptor); + } + + /** + * + * @summary Get all channel features. + */ + public async getAllChannelFeatures (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array; }> { + const localVarPath = this.basePath + '/Channels/Features'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Array; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Array"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Get channel features. + * @param channelId Channel id. + */ + public async getChannelFeatures (channelId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: ChannelFeatures; }> { + const localVarPath = this.basePath + '/Channels/{channelId}/Features' + .replace('{' + 'channelId' + '}', encodeURIComponent(String(channelId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'channelId' is not null or undefined + if (channelId === null || channelId === undefined) { + throw new Error('Required parameter channelId was null or undefined when calling getChannelFeatures.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: ChannelFeatures; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "ChannelFeatures"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Get channel items. + * @param channelId Channel Id. + * @param folderId Optional. Folder Id. + * @param userId Optional. User Id. + * @param startIndex Optional. The record index to start at. All items with a lower index will be dropped from the results. + * @param limit Optional. The maximum number of records to return. + * @param sortOrder Optional. Sort Order - Ascending,Descending. + * @param filters Optional. Specify additional filters to apply. + * @param sortBy Optional. Specify one or more sort orders, comma delimited. Options: Album, AlbumArtist, Artist, Budget, CommunityRating, CriticRating, DateCreated, DatePlayed, PlayCount, PremiereDate, ProductionYear, SortName, Random, Revenue, Runtime. + * @param fields Optional. Specify additional fields of information to return in the output. + */ + public async getChannelItems (channelId: string, folderId?: string, userId?: string, startIndex?: number, limit?: number, sortOrder?: Array, filters?: Array, sortBy?: Array, fields?: Array, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }> { + const localVarPath = this.basePath + '/Channels/{channelId}/Items' + .replace('{' + 'channelId' + '}', encodeURIComponent(String(channelId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'channelId' is not null or undefined + if (channelId === null || channelId === undefined) { + throw new Error('Required parameter channelId was null or undefined when calling getChannelItems.'); + } + + if (folderId !== undefined) { + localVarQueryParameters['folderId'] = ObjectSerializer.serialize(folderId, "string"); + } + + if (userId !== undefined) { + localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string"); + } + + if (startIndex !== undefined) { + localVarQueryParameters['startIndex'] = ObjectSerializer.serialize(startIndex, "number"); + } + + if (limit !== undefined) { + localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); + } + + if (sortOrder !== undefined) { + localVarQueryParameters['sortOrder'] = ObjectSerializer.serialize(sortOrder, "Array"); + } + + if (filters !== undefined) { + localVarQueryParameters['filters'] = ObjectSerializer.serialize(filters, "Array"); + } + + if (sortBy !== undefined) { + localVarQueryParameters['sortBy'] = ObjectSerializer.serialize(sortBy, "Array"); + } + + if (fields !== undefined) { + localVarQueryParameters['fields'] = ObjectSerializer.serialize(fields, "Array"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "BaseItemDtoQueryResult"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets available channels. + * @param userId User Id to filter by. Use System.Guid.Empty to not filter by user. + * @param startIndex Optional. The record index to start at. All items with a lower index will be dropped from the results. + * @param limit Optional. The maximum number of records to return. + * @param supportsLatestItems Optional. Filter by channels that support getting latest items. + * @param supportsMediaDeletion Optional. Filter by channels that support media deletion. + * @param isFavorite Optional. Filter by channels that are favorite. + */ + public async getChannels (userId?: string, startIndex?: number, limit?: number, supportsLatestItems?: boolean, supportsMediaDeletion?: boolean, isFavorite?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }> { + const localVarPath = this.basePath + '/Channels'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + if (userId !== undefined) { + localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string"); + } + + if (startIndex !== undefined) { + localVarQueryParameters['startIndex'] = ObjectSerializer.serialize(startIndex, "number"); + } + + if (limit !== undefined) { + localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); + } + + if (supportsLatestItems !== undefined) { + localVarQueryParameters['supportsLatestItems'] = ObjectSerializer.serialize(supportsLatestItems, "boolean"); + } + + if (supportsMediaDeletion !== undefined) { + localVarQueryParameters['supportsMediaDeletion'] = ObjectSerializer.serialize(supportsMediaDeletion, "boolean"); + } + + if (isFavorite !== undefined) { + localVarQueryParameters['isFavorite'] = ObjectSerializer.serialize(isFavorite, "boolean"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "BaseItemDtoQueryResult"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets latest channel items. + * @param userId Optional. User Id. + * @param startIndex Optional. The record index to start at. All items with a lower index will be dropped from the results. + * @param limit Optional. The maximum number of records to return. + * @param filters Optional. Specify additional filters to apply. + * @param fields Optional. Specify additional fields of information to return in the output. + * @param channelIds Optional. Specify one or more channel id\'s, comma delimited. + */ + public async getLatestChannelItems (userId?: string, startIndex?: number, limit?: number, filters?: Array, fields?: Array, channelIds?: Array, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }> { + const localVarPath = this.basePath + '/Channels/Items/Latest'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + if (userId !== undefined) { + localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string"); + } + + if (startIndex !== undefined) { + localVarQueryParameters['startIndex'] = ObjectSerializer.serialize(startIndex, "number"); + } + + if (limit !== undefined) { + localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); + } + + if (filters !== undefined) { + localVarQueryParameters['filters'] = ObjectSerializer.serialize(filters, "Array"); + } + + if (fields !== undefined) { + localVarQueryParameters['fields'] = ObjectSerializer.serialize(fields, "Array"); + } + + if (channelIds !== undefined) { + localVarQueryParameters['channelIds'] = ObjectSerializer.serialize(channelIds, "Array"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "BaseItemDtoQueryResult"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} diff --git a/jellyfin/api/clientLogApi.ts b/jellyfin/api/clientLogApi.ts new file mode 100644 index 0000000..9438b09 --- /dev/null +++ b/jellyfin/api/clientLogApi.ts @@ -0,0 +1,160 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import localVarRequest from 'request'; +import http from 'http'; + +/* tslint:disable:no-unused-locals */ +import { ClientLogDocumentResponseDto } from '../model/clientLogDocumentResponseDto'; +import { ProblemDetails } from '../model/problemDetails'; + +import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; +import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; + +import { HttpError, RequestFile } from './apis'; + +let defaultBasePath = 'http://localhost'; + +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== + +export enum ClientLogApiApiKeys { + CustomAuthentication, +} + +export class ClientLogApi { + protected _basePath = defaultBasePath; + protected _defaultHeaders : any = {}; + protected _useQuerystring : boolean = false; + + protected authentications = { + 'default': new VoidAuth(), + 'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'), + } + + protected interceptors: Interceptor[] = []; + + constructor(basePath?: string); + constructor(basePathOrUsername: string, password?: string, basePath?: string) { + if (password) { + if (basePath) { + this.basePath = basePath; + } + } else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername + } + } + } + + set useQuerystring(value: boolean) { + this._useQuerystring = value; + } + + set basePath(basePath: string) { + this._basePath = basePath; + } + + set defaultHeaders(defaultHeaders: any) { + this._defaultHeaders = defaultHeaders; + } + + get defaultHeaders() { + return this._defaultHeaders; + } + + get basePath() { + return this._basePath; + } + + public setDefaultAuthentication(auth: Authentication) { + this.authentications.default = auth; + } + + public setApiKey(key: ClientLogApiApiKeys, value: string) { + (this.authentications as any)[ClientLogApiApiKeys[key]].apiKey = value; + } + + public addInterceptor(interceptor: Interceptor) { + this.interceptors.push(interceptor); + } + + /** + * + * @summary Upload a document. + * @param body + */ + public async logFile (body?: RequestFile, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: ClientLogDocumentResponseDto; }> { + const localVarPath = this.basePath + '/ClientLog/Document'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: ObjectSerializer.serialize(body, "RequestFile") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: ClientLogDocumentResponseDto; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "ClientLogDocumentResponseDto"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} diff --git a/jellyfin/api/collectionApi.ts b/jellyfin/api/collectionApi.ts new file mode 100644 index 0000000..cdc0dbc --- /dev/null +++ b/jellyfin/api/collectionApi.ts @@ -0,0 +1,325 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import localVarRequest from 'request'; +import http from 'http'; + +/* tslint:disable:no-unused-locals */ +import { CollectionCreationResult } from '../model/collectionCreationResult'; + +import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; +import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; + +import { HttpError, RequestFile } from './apis'; + +let defaultBasePath = 'http://localhost'; + +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== + +export enum CollectionApiApiKeys { + CustomAuthentication, +} + +export class CollectionApi { + protected _basePath = defaultBasePath; + protected _defaultHeaders : any = {}; + protected _useQuerystring : boolean = false; + + protected authentications = { + 'default': new VoidAuth(), + 'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'), + } + + protected interceptors: Interceptor[] = []; + + constructor(basePath?: string); + constructor(basePathOrUsername: string, password?: string, basePath?: string) { + if (password) { + if (basePath) { + this.basePath = basePath; + } + } else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername + } + } + } + + set useQuerystring(value: boolean) { + this._useQuerystring = value; + } + + set basePath(basePath: string) { + this._basePath = basePath; + } + + set defaultHeaders(defaultHeaders: any) { + this._defaultHeaders = defaultHeaders; + } + + get defaultHeaders() { + return this._defaultHeaders; + } + + get basePath() { + return this._basePath; + } + + public setDefaultAuthentication(auth: Authentication) { + this.authentications.default = auth; + } + + public setApiKey(key: CollectionApiApiKeys, value: string) { + (this.authentications as any)[CollectionApiApiKeys[key]].apiKey = value; + } + + public addInterceptor(interceptor: Interceptor) { + this.interceptors.push(interceptor); + } + + /** + * + * @summary Adds items to a collection. + * @param collectionId The collection id. + * @param ids Item ids, comma delimited. + */ + public async addToCollection (collectionId: string, ids: Array, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Collections/{collectionId}/Items' + .replace('{' + 'collectionId' + '}', encodeURIComponent(String(collectionId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + // verify required parameter 'collectionId' is not null or undefined + if (collectionId === null || collectionId === undefined) { + throw new Error('Required parameter collectionId was null or undefined when calling addToCollection.'); + } + + // verify required parameter 'ids' is not null or undefined + if (ids === null || ids === undefined) { + throw new Error('Required parameter ids was null or undefined when calling addToCollection.'); + } + + if (ids !== undefined) { + localVarQueryParameters['ids'] = ObjectSerializer.serialize(ids, "Array"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Creates a new collection. + * @param name The name of the collection. + * @param ids Item Ids to add to the collection. + * @param parentId Optional. Create the collection within a specific folder. + * @param isLocked Whether or not to lock the new collection. + */ + public async createCollection (name?: string, ids?: Array, parentId?: string, isLocked?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: CollectionCreationResult; }> { + const localVarPath = this.basePath + '/Collections'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + if (name !== undefined) { + localVarQueryParameters['name'] = ObjectSerializer.serialize(name, "string"); + } + + if (ids !== undefined) { + localVarQueryParameters['ids'] = ObjectSerializer.serialize(ids, "Array"); + } + + if (parentId !== undefined) { + localVarQueryParameters['parentId'] = ObjectSerializer.serialize(parentId, "string"); + } + + if (isLocked !== undefined) { + localVarQueryParameters['isLocked'] = ObjectSerializer.serialize(isLocked, "boolean"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: CollectionCreationResult; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "CollectionCreationResult"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Removes items from a collection. + * @param collectionId The collection id. + * @param ids Item ids, comma delimited. + */ + public async removeFromCollection (collectionId: string, ids: Array, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Collections/{collectionId}/Items' + .replace('{' + 'collectionId' + '}', encodeURIComponent(String(collectionId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + // verify required parameter 'collectionId' is not null or undefined + if (collectionId === null || collectionId === undefined) { + throw new Error('Required parameter collectionId was null or undefined when calling removeFromCollection.'); + } + + // verify required parameter 'ids' is not null or undefined + if (ids === null || ids === undefined) { + throw new Error('Required parameter ids was null or undefined when calling removeFromCollection.'); + } + + if (ids !== undefined) { + localVarQueryParameters['ids'] = ObjectSerializer.serialize(ids, "Array"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} diff --git a/jellyfin/api/configurationApi.ts b/jellyfin/api/configurationApi.ts new file mode 100644 index 0000000..1931a7d --- /dev/null +++ b/jellyfin/api/configurationApi.ts @@ -0,0 +1,496 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import localVarRequest from 'request'; +import http from 'http'; + +/* tslint:disable:no-unused-locals */ +import { MetadataOptions } from '../model/metadataOptions'; +import { ServerConfiguration } from '../model/serverConfiguration'; +import { UpdateConfigurationRequest } from '../model/updateConfigurationRequest'; +import { UpdateMediaEncoderPathRequest } from '../model/updateMediaEncoderPathRequest'; + +import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; +import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; + +import { HttpError, RequestFile } from './apis'; + +let defaultBasePath = 'http://localhost'; + +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== + +export enum ConfigurationApiApiKeys { + CustomAuthentication, +} + +export class ConfigurationApi { + protected _basePath = defaultBasePath; + protected _defaultHeaders : any = {}; + protected _useQuerystring : boolean = false; + + protected authentications = { + 'default': new VoidAuth(), + 'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'), + } + + protected interceptors: Interceptor[] = []; + + constructor(basePath?: string); + constructor(basePathOrUsername: string, password?: string, basePath?: string) { + if (password) { + if (basePath) { + this.basePath = basePath; + } + } else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername + } + } + } + + set useQuerystring(value: boolean) { + this._useQuerystring = value; + } + + set basePath(basePath: string) { + this._basePath = basePath; + } + + set defaultHeaders(defaultHeaders: any) { + this._defaultHeaders = defaultHeaders; + } + + get defaultHeaders() { + return this._defaultHeaders; + } + + get basePath() { + return this._basePath; + } + + public setDefaultAuthentication(auth: Authentication) { + this.authentications.default = auth; + } + + public setApiKey(key: ConfigurationApiApiKeys, value: string) { + (this.authentications as any)[ConfigurationApiApiKeys[key]].apiKey = value; + } + + public addInterceptor(interceptor: Interceptor) { + this.interceptors.push(interceptor); + } + + /** + * + * @summary Gets application configuration. + */ + public async getConfiguration (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: ServerConfiguration; }> { + const localVarPath = this.basePath + '/System/Configuration'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: ServerConfiguration; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "ServerConfiguration"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets a default MetadataOptions object. + */ + public async getDefaultMetadataOptions (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: MetadataOptions; }> { + const localVarPath = this.basePath + '/System/Configuration/MetadataOptions/Default'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: MetadataOptions; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "MetadataOptions"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets a named configuration. + * @param key Configuration key. + */ + public async getNamedConfiguration (key: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/System/Configuration/{key}' + .replace('{' + 'key' + '}', encodeURIComponent(String(key))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'key' is not null or undefined + if (key === null || key === undefined) { + throw new Error('Required parameter key was null or undefined when calling getNamedConfiguration.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Updates application configuration. + * @param updateConfigurationRequest Configuration. + */ + public async updateConfiguration (updateConfigurationRequest: UpdateConfigurationRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/System/Configuration'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + // verify required parameter 'updateConfigurationRequest' is not null or undefined + if (updateConfigurationRequest === null || updateConfigurationRequest === undefined) { + throw new Error('Required parameter updateConfigurationRequest was null or undefined when calling updateConfiguration.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: ObjectSerializer.serialize(updateConfigurationRequest, "UpdateConfigurationRequest") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Updates the path to the media encoder. + * @param updateMediaEncoderPathRequest Media encoder path form body. + */ + public async updateMediaEncoderPath (updateMediaEncoderPathRequest: UpdateMediaEncoderPathRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/System/MediaEncoder/Path'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + // verify required parameter 'updateMediaEncoderPathRequest' is not null or undefined + if (updateMediaEncoderPathRequest === null || updateMediaEncoderPathRequest === undefined) { + throw new Error('Required parameter updateMediaEncoderPathRequest was null or undefined when calling updateMediaEncoderPath.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: ObjectSerializer.serialize(updateMediaEncoderPathRequest, "UpdateMediaEncoderPathRequest") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Updates named configuration. + * @param key Configuration key. + * @param body Configuration. + */ + public async updateNamedConfiguration (key: string, body: any, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/System/Configuration/{key}' + .replace('{' + 'key' + '}', encodeURIComponent(String(key))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + // verify required parameter 'key' is not null or undefined + if (key === null || key === undefined) { + throw new Error('Required parameter key was null or undefined when calling updateNamedConfiguration.'); + } + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new Error('Required parameter body was null or undefined when calling updateNamedConfiguration.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: ObjectSerializer.serialize(body, "any") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} diff --git a/jellyfin/api/dashboardApi.ts b/jellyfin/api/dashboardApi.ts new file mode 100644 index 0000000..6656b98 --- /dev/null +++ b/jellyfin/api/dashboardApi.ts @@ -0,0 +1,230 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import localVarRequest from 'request'; +import http from 'http'; + +/* tslint:disable:no-unused-locals */ +import { ConfigurationPageInfo } from '../model/configurationPageInfo'; +import { ProblemDetails } from '../model/problemDetails'; + +import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; +import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; + +import { HttpError, RequestFile } from './apis'; + +let defaultBasePath = 'http://localhost'; + +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== + +export enum DashboardApiApiKeys { + CustomAuthentication, +} + +export class DashboardApi { + protected _basePath = defaultBasePath; + protected _defaultHeaders : any = {}; + protected _useQuerystring : boolean = false; + + protected authentications = { + 'default': new VoidAuth(), + 'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'), + } + + protected interceptors: Interceptor[] = []; + + constructor(basePath?: string); + constructor(basePathOrUsername: string, password?: string, basePath?: string) { + if (password) { + if (basePath) { + this.basePath = basePath; + } + } else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername + } + } + } + + set useQuerystring(value: boolean) { + this._useQuerystring = value; + } + + set basePath(basePath: string) { + this._basePath = basePath; + } + + set defaultHeaders(defaultHeaders: any) { + this._defaultHeaders = defaultHeaders; + } + + get defaultHeaders() { + return this._defaultHeaders; + } + + get basePath() { + return this._basePath; + } + + public setDefaultAuthentication(auth: Authentication) { + this.authentications.default = auth; + } + + public setApiKey(key: DashboardApiApiKeys, value: string) { + (this.authentications as any)[DashboardApiApiKeys[key]].apiKey = value; + } + + public addInterceptor(interceptor: Interceptor) { + this.interceptors.push(interceptor); + } + + /** + * + * @summary Gets the configuration pages. + * @param enableInMainMenu Whether to enable in the main menu. + */ + public async getConfigurationPages (enableInMainMenu?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array; }> { + const localVarPath = this.basePath + '/web/ConfigurationPages'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + if (enableInMainMenu !== undefined) { + localVarQueryParameters['enableInMainMenu'] = ObjectSerializer.serialize(enableInMainMenu, "boolean"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Array; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Array"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets a dashboard configuration page. + * @param name The name of the page. + */ + public async getDashboardConfigurationPage (name?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/web/ConfigurationPage'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['text/html', 'application/x-javascript', 'application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + if (name !== undefined) { + localVarQueryParameters['name'] = ObjectSerializer.serialize(name, "string"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} diff --git a/jellyfin/api/devicesApi.ts b/jellyfin/api/devicesApi.ts new file mode 100644 index 0000000..e9de40f --- /dev/null +++ b/jellyfin/api/devicesApi.ts @@ -0,0 +1,469 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import localVarRequest from 'request'; +import http from 'http'; + +/* tslint:disable:no-unused-locals */ +import { DeviceInfo } from '../model/deviceInfo'; +import { DeviceInfoQueryResult } from '../model/deviceInfoQueryResult'; +import { DeviceOptions } from '../model/deviceOptions'; +import { ProblemDetails } from '../model/problemDetails'; +import { UpdateDeviceOptionsRequest } from '../model/updateDeviceOptionsRequest'; + +import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; +import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; + +import { HttpError, RequestFile } from './apis'; + +let defaultBasePath = 'http://localhost'; + +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== + +export enum DevicesApiApiKeys { + CustomAuthentication, +} + +export class DevicesApi { + protected _basePath = defaultBasePath; + protected _defaultHeaders : any = {}; + protected _useQuerystring : boolean = false; + + protected authentications = { + 'default': new VoidAuth(), + 'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'), + } + + protected interceptors: Interceptor[] = []; + + constructor(basePath?: string); + constructor(basePathOrUsername: string, password?: string, basePath?: string) { + if (password) { + if (basePath) { + this.basePath = basePath; + } + } else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername + } + } + } + + set useQuerystring(value: boolean) { + this._useQuerystring = value; + } + + set basePath(basePath: string) { + this._basePath = basePath; + } + + set defaultHeaders(defaultHeaders: any) { + this._defaultHeaders = defaultHeaders; + } + + get defaultHeaders() { + return this._defaultHeaders; + } + + get basePath() { + return this._basePath; + } + + public setDefaultAuthentication(auth: Authentication) { + this.authentications.default = auth; + } + + public setApiKey(key: DevicesApiApiKeys, value: string) { + (this.authentications as any)[DevicesApiApiKeys[key]].apiKey = value; + } + + public addInterceptor(interceptor: Interceptor) { + this.interceptors.push(interceptor); + } + + /** + * + * @summary Deletes a device. + * @param id Device Id. + */ + public async deleteDevice (id: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Devices'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'id' is not null or undefined + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling deleteDevice.'); + } + + if (id !== undefined) { + localVarQueryParameters['id'] = ObjectSerializer.serialize(id, "string"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Get info for a device. + * @param id Device Id. + */ + public async getDeviceInfo (id: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: DeviceInfo; }> { + const localVarPath = this.basePath + '/Devices/Info'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'id' is not null or undefined + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling getDeviceInfo.'); + } + + if (id !== undefined) { + localVarQueryParameters['id'] = ObjectSerializer.serialize(id, "string"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: DeviceInfo; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "DeviceInfo"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Get options for a device. + * @param id Device Id. + */ + public async getDeviceOptions (id: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: DeviceOptions; }> { + const localVarPath = this.basePath + '/Devices/Options'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'id' is not null or undefined + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling getDeviceOptions.'); + } + + if (id !== undefined) { + localVarQueryParameters['id'] = ObjectSerializer.serialize(id, "string"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: DeviceOptions; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "DeviceOptions"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Get Devices. + * @param supportsSync Gets or sets a value indicating whether [supports synchronize]. + * @param userId Gets or sets the user identifier. + */ + public async getDevices (supportsSync?: boolean, userId?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: DeviceInfoQueryResult; }> { + const localVarPath = this.basePath + '/Devices'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + if (supportsSync !== undefined) { + localVarQueryParameters['supportsSync'] = ObjectSerializer.serialize(supportsSync, "boolean"); + } + + if (userId !== undefined) { + localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: DeviceInfoQueryResult; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "DeviceInfoQueryResult"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Update device options. + * @param id Device Id. + * @param updateDeviceOptionsRequest Device Options. + */ + public async updateDeviceOptions (id: string, updateDeviceOptionsRequest: UpdateDeviceOptionsRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Devices/Options'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + // verify required parameter 'id' is not null or undefined + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling updateDeviceOptions.'); + } + + // verify required parameter 'updateDeviceOptionsRequest' is not null or undefined + if (updateDeviceOptionsRequest === null || updateDeviceOptionsRequest === undefined) { + throw new Error('Required parameter updateDeviceOptionsRequest was null or undefined when calling updateDeviceOptions.'); + } + + if (id !== undefined) { + localVarQueryParameters['id'] = ObjectSerializer.serialize(id, "string"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: ObjectSerializer.serialize(updateDeviceOptionsRequest, "UpdateDeviceOptionsRequest") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} diff --git a/jellyfin/api/displayPreferencesApi.ts b/jellyfin/api/displayPreferencesApi.ts new file mode 100644 index 0000000..9d06633 --- /dev/null +++ b/jellyfin/api/displayPreferencesApi.ts @@ -0,0 +1,276 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import localVarRequest from 'request'; +import http from 'http'; + +/* tslint:disable:no-unused-locals */ +import { DisplayPreferencesDto } from '../model/displayPreferencesDto'; +import { UpdateDisplayPreferencesRequest } from '../model/updateDisplayPreferencesRequest'; + +import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; +import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; + +import { HttpError, RequestFile } from './apis'; + +let defaultBasePath = 'http://localhost'; + +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== + +export enum DisplayPreferencesApiApiKeys { + CustomAuthentication, +} + +export class DisplayPreferencesApi { + protected _basePath = defaultBasePath; + protected _defaultHeaders : any = {}; + protected _useQuerystring : boolean = false; + + protected authentications = { + 'default': new VoidAuth(), + 'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'), + } + + protected interceptors: Interceptor[] = []; + + constructor(basePath?: string); + constructor(basePathOrUsername: string, password?: string, basePath?: string) { + if (password) { + if (basePath) { + this.basePath = basePath; + } + } else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername + } + } + } + + set useQuerystring(value: boolean) { + this._useQuerystring = value; + } + + set basePath(basePath: string) { + this._basePath = basePath; + } + + set defaultHeaders(defaultHeaders: any) { + this._defaultHeaders = defaultHeaders; + } + + get defaultHeaders() { + return this._defaultHeaders; + } + + get basePath() { + return this._basePath; + } + + public setDefaultAuthentication(auth: Authentication) { + this.authentications.default = auth; + } + + public setApiKey(key: DisplayPreferencesApiApiKeys, value: string) { + (this.authentications as any)[DisplayPreferencesApiApiKeys[key]].apiKey = value; + } + + public addInterceptor(interceptor: Interceptor) { + this.interceptors.push(interceptor); + } + + /** + * + * @summary Get Display Preferences. + * @param displayPreferencesId Display preferences id. + * @param userId User id. + * @param client Client. + */ + public async getDisplayPreferences (displayPreferencesId: string, userId: string, client: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: DisplayPreferencesDto; }> { + const localVarPath = this.basePath + '/DisplayPreferences/{displayPreferencesId}' + .replace('{' + 'displayPreferencesId' + '}', encodeURIComponent(String(displayPreferencesId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'displayPreferencesId' is not null or undefined + if (displayPreferencesId === null || displayPreferencesId === undefined) { + throw new Error('Required parameter displayPreferencesId was null or undefined when calling getDisplayPreferences.'); + } + + // verify required parameter 'userId' is not null or undefined + if (userId === null || userId === undefined) { + throw new Error('Required parameter userId was null or undefined when calling getDisplayPreferences.'); + } + + // verify required parameter 'client' is not null or undefined + if (client === null || client === undefined) { + throw new Error('Required parameter client was null or undefined when calling getDisplayPreferences.'); + } + + if (userId !== undefined) { + localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string"); + } + + if (client !== undefined) { + localVarQueryParameters['client'] = ObjectSerializer.serialize(client, "string"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: DisplayPreferencesDto; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "DisplayPreferencesDto"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Update Display Preferences. + * @param displayPreferencesId Display preferences id. + * @param userId User Id. + * @param client Client. + * @param updateDisplayPreferencesRequest New Display Preferences object. + */ + public async updateDisplayPreferences (displayPreferencesId: string, userId: string, client: string, updateDisplayPreferencesRequest: UpdateDisplayPreferencesRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/DisplayPreferences/{displayPreferencesId}' + .replace('{' + 'displayPreferencesId' + '}', encodeURIComponent(String(displayPreferencesId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + // verify required parameter 'displayPreferencesId' is not null or undefined + if (displayPreferencesId === null || displayPreferencesId === undefined) { + throw new Error('Required parameter displayPreferencesId was null or undefined when calling updateDisplayPreferences.'); + } + + // verify required parameter 'userId' is not null or undefined + if (userId === null || userId === undefined) { + throw new Error('Required parameter userId was null or undefined when calling updateDisplayPreferences.'); + } + + // verify required parameter 'client' is not null or undefined + if (client === null || client === undefined) { + throw new Error('Required parameter client was null or undefined when calling updateDisplayPreferences.'); + } + + // verify required parameter 'updateDisplayPreferencesRequest' is not null or undefined + if (updateDisplayPreferencesRequest === null || updateDisplayPreferencesRequest === undefined) { + throw new Error('Required parameter updateDisplayPreferencesRequest was null or undefined when calling updateDisplayPreferences.'); + } + + if (userId !== undefined) { + localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string"); + } + + if (client !== undefined) { + localVarQueryParameters['client'] = ObjectSerializer.serialize(client, "string"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: ObjectSerializer.serialize(updateDisplayPreferencesRequest, "UpdateDisplayPreferencesRequest") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} diff --git a/jellyfin/api/dlnaApi.ts b/jellyfin/api/dlnaApi.ts new file mode 100644 index 0000000..fc1ae5d --- /dev/null +++ b/jellyfin/api/dlnaApi.ts @@ -0,0 +1,500 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import localVarRequest from 'request'; +import http from 'http'; + +/* tslint:disable:no-unused-locals */ +import { CreateProfileRequest } from '../model/createProfileRequest'; +import { DeviceProfile } from '../model/deviceProfile'; +import { DeviceProfileInfo } from '../model/deviceProfileInfo'; +import { ProblemDetails } from '../model/problemDetails'; + +import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; +import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; + +import { HttpError, RequestFile } from './apis'; + +let defaultBasePath = 'http://localhost'; + +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== + +export enum DlnaApiApiKeys { + CustomAuthentication, +} + +export class DlnaApi { + protected _basePath = defaultBasePath; + protected _defaultHeaders : any = {}; + protected _useQuerystring : boolean = false; + + protected authentications = { + 'default': new VoidAuth(), + 'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'), + } + + protected interceptors: Interceptor[] = []; + + constructor(basePath?: string); + constructor(basePathOrUsername: string, password?: string, basePath?: string) { + if (password) { + if (basePath) { + this.basePath = basePath; + } + } else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername + } + } + } + + set useQuerystring(value: boolean) { + this._useQuerystring = value; + } + + set basePath(basePath: string) { + this._basePath = basePath; + } + + set defaultHeaders(defaultHeaders: any) { + this._defaultHeaders = defaultHeaders; + } + + get defaultHeaders() { + return this._defaultHeaders; + } + + get basePath() { + return this._basePath; + } + + public setDefaultAuthentication(auth: Authentication) { + this.authentications.default = auth; + } + + public setApiKey(key: DlnaApiApiKeys, value: string) { + (this.authentications as any)[DlnaApiApiKeys[key]].apiKey = value; + } + + public addInterceptor(interceptor: Interceptor) { + this.interceptors.push(interceptor); + } + + /** + * + * @summary Creates a profile. + * @param createProfileRequest Device profile. + */ + public async createProfile (createProfileRequest?: CreateProfileRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Dlna/Profiles'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: ObjectSerializer.serialize(createProfileRequest, "CreateProfileRequest") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Deletes a profile. + * @param profileId Profile id. + */ + public async deleteProfile (profileId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Dlna/Profiles/{profileId}' + .replace('{' + 'profileId' + '}', encodeURIComponent(String(profileId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'profileId' is not null or undefined + if (profileId === null || profileId === undefined) { + throw new Error('Required parameter profileId was null or undefined when calling deleteProfile.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets the default profile. + */ + public async getDefaultProfile (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: DeviceProfile; }> { + const localVarPath = this.basePath + '/Dlna/Profiles/Default'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: DeviceProfile; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "DeviceProfile"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets a single profile. + * @param profileId Profile Id. + */ + public async getProfile (profileId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: DeviceProfile; }> { + const localVarPath = this.basePath + '/Dlna/Profiles/{profileId}' + .replace('{' + 'profileId' + '}', encodeURIComponent(String(profileId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'profileId' is not null or undefined + if (profileId === null || profileId === undefined) { + throw new Error('Required parameter profileId was null or undefined when calling getProfile.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: DeviceProfile; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "DeviceProfile"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Get profile infos. + */ + public async getProfileInfos (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array; }> { + const localVarPath = this.basePath + '/Dlna/ProfileInfos'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Array; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Array"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Updates a profile. + * @param profileId Profile id. + * @param createProfileRequest Device profile. + */ + public async updateProfile (profileId: string, createProfileRequest?: CreateProfileRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Dlna/Profiles/{profileId}' + .replace('{' + 'profileId' + '}', encodeURIComponent(String(profileId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'profileId' is not null or undefined + if (profileId === null || profileId === undefined) { + throw new Error('Required parameter profileId was null or undefined when calling updateProfile.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: ObjectSerializer.serialize(createProfileRequest, "CreateProfileRequest") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} diff --git a/jellyfin/api/dlnaServerApi.ts b/jellyfin/api/dlnaServerApi.ts new file mode 100644 index 0000000..e73fbe5 --- /dev/null +++ b/jellyfin/api/dlnaServerApi.ts @@ -0,0 +1,1251 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import localVarRequest from 'request'; +import http from 'http'; + +/* tslint:disable:no-unused-locals */ +import { ProblemDetails } from '../model/problemDetails'; + +import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; +import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; + +import { HttpError, RequestFile } from './apis'; + +let defaultBasePath = 'http://localhost'; + +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== + +export enum DlnaServerApiApiKeys { + CustomAuthentication, +} + +export class DlnaServerApi { + protected _basePath = defaultBasePath; + protected _defaultHeaders : any = {}; + protected _useQuerystring : boolean = false; + + protected authentications = { + 'default': new VoidAuth(), + 'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'), + } + + protected interceptors: Interceptor[] = []; + + constructor(basePath?: string); + constructor(basePathOrUsername: string, password?: string, basePath?: string) { + if (password) { + if (basePath) { + this.basePath = basePath; + } + } else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername + } + } + } + + set useQuerystring(value: boolean) { + this._useQuerystring = value; + } + + set basePath(basePath: string) { + this._basePath = basePath; + } + + set defaultHeaders(defaultHeaders: any) { + this._defaultHeaders = defaultHeaders; + } + + get defaultHeaders() { + return this._defaultHeaders; + } + + get basePath() { + return this._basePath; + } + + public setDefaultAuthentication(auth: Authentication) { + this.authentications.default = auth; + } + + public setApiKey(key: DlnaServerApiApiKeys, value: string) { + (this.authentications as any)[DlnaServerApiApiKeys[key]].apiKey = value; + } + + public addInterceptor(interceptor: Interceptor) { + this.interceptors.push(interceptor); + } + + /** + * + * @summary Gets Dlna media receiver registrar xml. + * @param serverId Server UUID. + */ + public async getConnectionManager (serverId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/Dlna/{serverId}/ConnectionManager' + .replace('{' + 'serverId' + '}', encodeURIComponent(String(serverId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['text/xml']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'serverId' is not null or undefined + if (serverId === null || serverId === undefined) { + throw new Error('Required parameter serverId was null or undefined when calling getConnectionManager.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets Dlna media receiver registrar xml. + * @param serverId Server UUID. + */ + public async getConnectionManager2 (serverId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/Dlna/{serverId}/ConnectionManager/ConnectionManager' + .replace('{' + 'serverId' + '}', encodeURIComponent(String(serverId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['text/xml']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'serverId' is not null or undefined + if (serverId === null || serverId === undefined) { + throw new Error('Required parameter serverId was null or undefined when calling getConnectionManager2.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets Dlna media receiver registrar xml. + * @param serverId Server UUID. + */ + public async getConnectionManager3 (serverId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/Dlna/{serverId}/ConnectionManager/ConnectionManager.xml' + .replace('{' + 'serverId' + '}', encodeURIComponent(String(serverId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['text/xml']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'serverId' is not null or undefined + if (serverId === null || serverId === undefined) { + throw new Error('Required parameter serverId was null or undefined when calling getConnectionManager3.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets Dlna content directory xml. + * @param serverId Server UUID. + */ + public async getContentDirectory (serverId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/Dlna/{serverId}/ContentDirectory' + .replace('{' + 'serverId' + '}', encodeURIComponent(String(serverId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['text/xml']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'serverId' is not null or undefined + if (serverId === null || serverId === undefined) { + throw new Error('Required parameter serverId was null or undefined when calling getContentDirectory.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets Dlna content directory xml. + * @param serverId Server UUID. + */ + public async getContentDirectory2 (serverId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/Dlna/{serverId}/ContentDirectory/ContentDirectory' + .replace('{' + 'serverId' + '}', encodeURIComponent(String(serverId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['text/xml']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'serverId' is not null or undefined + if (serverId === null || serverId === undefined) { + throw new Error('Required parameter serverId was null or undefined when calling getContentDirectory2.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets Dlna content directory xml. + * @param serverId Server UUID. + */ + public async getContentDirectory3 (serverId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/Dlna/{serverId}/ContentDirectory/ContentDirectory.xml' + .replace('{' + 'serverId' + '}', encodeURIComponent(String(serverId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['text/xml']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'serverId' is not null or undefined + if (serverId === null || serverId === undefined) { + throw new Error('Required parameter serverId was null or undefined when calling getContentDirectory3.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Get Description Xml. + * @param serverId Server UUID. + */ + public async getDescriptionXml (serverId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/Dlna/{serverId}/description' + .replace('{' + 'serverId' + '}', encodeURIComponent(String(serverId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['text/xml']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'serverId' is not null or undefined + if (serverId === null || serverId === undefined) { + throw new Error('Required parameter serverId was null or undefined when calling getDescriptionXml.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Get Description Xml. + * @param serverId Server UUID. + */ + public async getDescriptionXml2 (serverId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/Dlna/{serverId}/description.xml' + .replace('{' + 'serverId' + '}', encodeURIComponent(String(serverId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['text/xml']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'serverId' is not null or undefined + if (serverId === null || serverId === undefined) { + throw new Error('Required parameter serverId was null or undefined when calling getDescriptionXml2.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets a server icon. + * @param fileName The icon filename. + */ + public async getIcon (fileName: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/Dlna/icons/{fileName}' + .replace('{' + 'fileName' + '}', encodeURIComponent(String(fileName))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['image/*', 'application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'fileName' is not null or undefined + if (fileName === null || fileName === undefined) { + throw new Error('Required parameter fileName was null or undefined when calling getIcon.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets a server icon. + * @param serverId Server UUID. + * @param fileName The icon filename. + */ + public async getIconId (serverId: string, fileName: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/Dlna/{serverId}/icons/{fileName}' + .replace('{' + 'serverId' + '}', encodeURIComponent(String(serverId))) + .replace('{' + 'fileName' + '}', encodeURIComponent(String(fileName))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['image/*', 'application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'serverId' is not null or undefined + if (serverId === null || serverId === undefined) { + throw new Error('Required parameter serverId was null or undefined when calling getIconId.'); + } + + // verify required parameter 'fileName' is not null or undefined + if (fileName === null || fileName === undefined) { + throw new Error('Required parameter fileName was null or undefined when calling getIconId.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets Dlna media receiver registrar xml. + * @param serverId Server UUID. + */ + public async getMediaReceiverRegistrar (serverId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/Dlna/{serverId}/MediaReceiverRegistrar' + .replace('{' + 'serverId' + '}', encodeURIComponent(String(serverId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['text/xml']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'serverId' is not null or undefined + if (serverId === null || serverId === undefined) { + throw new Error('Required parameter serverId was null or undefined when calling getMediaReceiverRegistrar.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets Dlna media receiver registrar xml. + * @param serverId Server UUID. + */ + public async getMediaReceiverRegistrar2 (serverId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/Dlna/{serverId}/MediaReceiverRegistrar/MediaReceiverRegistrar' + .replace('{' + 'serverId' + '}', encodeURIComponent(String(serverId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['text/xml']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'serverId' is not null or undefined + if (serverId === null || serverId === undefined) { + throw new Error('Required parameter serverId was null or undefined when calling getMediaReceiverRegistrar2.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets Dlna media receiver registrar xml. + * @param serverId Server UUID. + */ + public async getMediaReceiverRegistrar3 (serverId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/Dlna/{serverId}/MediaReceiverRegistrar/MediaReceiverRegistrar.xml' + .replace('{' + 'serverId' + '}', encodeURIComponent(String(serverId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['text/xml']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'serverId' is not null or undefined + if (serverId === null || serverId === undefined) { + throw new Error('Required parameter serverId was null or undefined when calling getMediaReceiverRegistrar3.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Process a connection manager control request. + * @param serverId Server UUID. + */ + public async processConnectionManagerControlRequest (serverId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/Dlna/{serverId}/ConnectionManager/Control' + .replace('{' + 'serverId' + '}', encodeURIComponent(String(serverId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['text/xml']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'serverId' is not null or undefined + if (serverId === null || serverId === undefined) { + throw new Error('Required parameter serverId was null or undefined when calling processConnectionManagerControlRequest.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Process a content directory control request. + * @param serverId Server UUID. + */ + public async processContentDirectoryControlRequest (serverId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/Dlna/{serverId}/ContentDirectory/Control' + .replace('{' + 'serverId' + '}', encodeURIComponent(String(serverId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['text/xml']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'serverId' is not null or undefined + if (serverId === null || serverId === undefined) { + throw new Error('Required parameter serverId was null or undefined when calling processContentDirectoryControlRequest.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Process a media receiver registrar control request. + * @param serverId Server UUID. + */ + public async processMediaReceiverRegistrarControlRequest (serverId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/Dlna/{serverId}/MediaReceiverRegistrar/Control' + .replace('{' + 'serverId' + '}', encodeURIComponent(String(serverId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['text/xml']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'serverId' is not null or undefined + if (serverId === null || serverId === undefined) { + throw new Error('Required parameter serverId was null or undefined when calling processMediaReceiverRegistrarControlRequest.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} diff --git a/jellyfin/api/dynamicHlsApi.ts b/jellyfin/api/dynamicHlsApi.ts new file mode 100644 index 0000000..fd9bce4 --- /dev/null +++ b/jellyfin/api/dynamicHlsApi.ts @@ -0,0 +1,3058 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import localVarRequest from 'request'; +import http from 'http'; + +/* tslint:disable:no-unused-locals */ +import { EncodingContext } from '../model/encodingContext'; +import { SubtitleDeliveryMethod } from '../model/subtitleDeliveryMethod'; + +import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; +import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; + +import { HttpError, RequestFile } from './apis'; + +let defaultBasePath = 'http://localhost'; + +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== + +export enum DynamicHlsApiApiKeys { + CustomAuthentication, +} + +export class DynamicHlsApi { + protected _basePath = defaultBasePath; + protected _defaultHeaders : any = {}; + protected _useQuerystring : boolean = false; + + protected authentications = { + 'default': new VoidAuth(), + 'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'), + } + + protected interceptors: Interceptor[] = []; + + constructor(basePath?: string); + constructor(basePathOrUsername: string, password?: string, basePath?: string) { + if (password) { + if (basePath) { + this.basePath = basePath; + } + } else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername + } + } + } + + set useQuerystring(value: boolean) { + this._useQuerystring = value; + } + + set basePath(basePath: string) { + this._basePath = basePath; + } + + set defaultHeaders(defaultHeaders: any) { + this._defaultHeaders = defaultHeaders; + } + + get defaultHeaders() { + return this._defaultHeaders; + } + + get basePath() { + return this._basePath; + } + + public setDefaultAuthentication(auth: Authentication) { + this.authentications.default = auth; + } + + public setApiKey(key: DynamicHlsApiApiKeys, value: string) { + (this.authentications as any)[DynamicHlsApiApiKeys[key]].apiKey = value; + } + + public addInterceptor(interceptor: Interceptor) { + this.interceptors.push(interceptor); + } + + /** + * + * @summary Gets a video stream using HTTP live streaming. + * @param itemId The item id. + * @param playlistId The playlist id. + * @param segmentId The segment id. + * @param container The video container. Possible values are: ts, webm, asf, wmv, ogv, mp4, m4v, mkv, mpeg, mpg, avi, 3gp, wmv, wtv, m2ts, mov, iso, flv. + * @param runtimeTicks The position of the requested segment in ticks. + * @param actualSegmentLengthTicks The length of the requested segment in ticks. + * @param _static Optional. If true, the original file will be streamed statically without any encoding. Use either no url extension or the original file extension. true/false. + * @param params The streaming parameters. + * @param tag The tag. + * @param deviceProfileId Optional. The dlna device profile id to utilize. + * @param playSessionId The play session id. + * @param segmentContainer The segment container. + * @param segmentLength The segment length. + * @param minSegments The minimum number of segments. + * @param mediaSourceId The media version id, if playing an alternate version. + * @param deviceId The device id of the client requesting. Used to stop encoding processes when needed. + * @param audioCodec Optional. Specify a audio codec to encode to, e.g. mp3. If omitted the server will auto-select using the url\'s extension. Options: aac, mp3, vorbis, wma. + * @param enableAutoStreamCopy Whether or not to allow automatic stream copy if requested values match the original source. Defaults to true. + * @param allowVideoStreamCopy Whether or not to allow copying of the video stream url. + * @param allowAudioStreamCopy Whether or not to allow copying of the audio stream url. + * @param breakOnNonKeyFrames Optional. Whether to break on non key frames. + * @param audioSampleRate Optional. Specify a specific audio sample rate, e.g. 44100. + * @param maxAudioBitDepth Optional. The maximum audio bit depth. + * @param maxStreamingBitrate Optional. The maximum streaming bitrate. + * @param audioBitRate Optional. Specify an audio bitrate to encode to, e.g. 128000. If omitted this will be left to encoder defaults. + * @param audioChannels Optional. Specify a specific number of audio channels to encode to, e.g. 2. + * @param maxAudioChannels Optional. Specify a maximum number of audio channels to encode to, e.g. 2. + * @param profile Optional. Specify a specific an encoder profile (varies by encoder), e.g. main, baseline, high. + * @param level Optional. Specify a level for the encoder profile (varies by encoder), e.g. 3, 3.1. + * @param framerate Optional. A specific video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. + * @param maxFramerate Optional. A specific maximum video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. + * @param copyTimestamps Whether or not to copy timestamps when transcoding with an offset. Defaults to false. + * @param startTimeTicks Optional. Specify a starting offset, in ticks. 1 tick = 10000 ms. + * @param width Optional. The fixed horizontal resolution of the encoded video. + * @param height Optional. The fixed vertical resolution of the encoded video. + * @param videoBitRate Optional. Specify a video bitrate to encode to, e.g. 500000. If omitted this will be left to encoder defaults. + * @param subtitleStreamIndex Optional. The index of the subtitle stream to use. If omitted no subtitles will be used. + * @param subtitleMethod Optional. Specify the subtitle delivery method. + * @param maxRefFrames Optional. + * @param maxVideoBitDepth Optional. The maximum video bit depth. + * @param requireAvc Optional. Whether to require avc. + * @param deInterlace Optional. Whether to deinterlace the video. + * @param requireNonAnamorphic Optional. Whether to require a non anamorphic stream. + * @param transcodingMaxAudioChannels Optional. The maximum number of audio channels to transcode. + * @param cpuCoreLimit Optional. The limit of how many cpu cores to use. + * @param liveStreamId The live stream id. + * @param enableMpegtsM2TsMode Optional. Whether to enable the MpegtsM2Ts mode. + * @param videoCodec Optional. Specify a video codec to encode to, e.g. h264. If omitted the server will auto-select using the url\'s extension. Options: h265, h264, mpeg4, theora, vpx, wmv. + * @param subtitleCodec Optional. Specify a subtitle codec to encode to. + * @param transcodeReasons Optional. The transcoding reason. + * @param audioStreamIndex Optional. The index of the audio stream to use. If omitted the first audio stream will be used. + * @param videoStreamIndex Optional. The index of the video stream to use. If omitted the first video stream will be used. + * @param context Optional. The MediaBrowser.Model.Dlna.EncodingContext. + * @param streamOptions Optional. The streaming options. + */ + public async getHlsAudioSegment (itemId: string, playlistId: string, segmentId: number, container: string, runtimeTicks: number, actualSegmentLengthTicks: number, _static?: boolean, params?: string, tag?: string, deviceProfileId?: string, playSessionId?: string, segmentContainer?: string, segmentLength?: number, minSegments?: number, mediaSourceId?: string, deviceId?: string, audioCodec?: string, enableAutoStreamCopy?: boolean, allowVideoStreamCopy?: boolean, allowAudioStreamCopy?: boolean, breakOnNonKeyFrames?: boolean, audioSampleRate?: number, maxAudioBitDepth?: number, maxStreamingBitrate?: number, audioBitRate?: number, audioChannels?: number, maxAudioChannels?: number, profile?: string, level?: string, framerate?: number, maxFramerate?: number, copyTimestamps?: boolean, startTimeTicks?: number, width?: number, height?: number, videoBitRate?: number, subtitleStreamIndex?: number, subtitleMethod?: SubtitleDeliveryMethod, maxRefFrames?: number, maxVideoBitDepth?: number, requireAvc?: boolean, deInterlace?: boolean, requireNonAnamorphic?: boolean, transcodingMaxAudioChannels?: number, cpuCoreLimit?: number, liveStreamId?: string, enableMpegtsM2TsMode?: boolean, videoCodec?: string, subtitleCodec?: string, transcodeReasons?: string, audioStreamIndex?: number, videoStreamIndex?: number, context?: EncodingContext, streamOptions?: { [key: string]: string; }, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/Audio/{itemId}/hls1/{playlistId}/{segmentId}.{container}' + .replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId))) + .replace('{' + 'playlistId' + '}', encodeURIComponent(String(playlistId))) + .replace('{' + 'segmentId' + '}', encodeURIComponent(String(segmentId))) + .replace('{' + 'container' + '}', encodeURIComponent(String(container))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['audio/*']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'itemId' is not null or undefined + if (itemId === null || itemId === undefined) { + throw new Error('Required parameter itemId was null or undefined when calling getHlsAudioSegment.'); + } + + // verify required parameter 'playlistId' is not null or undefined + if (playlistId === null || playlistId === undefined) { + throw new Error('Required parameter playlistId was null or undefined when calling getHlsAudioSegment.'); + } + + // verify required parameter 'segmentId' is not null or undefined + if (segmentId === null || segmentId === undefined) { + throw new Error('Required parameter segmentId was null or undefined when calling getHlsAudioSegment.'); + } + + // verify required parameter 'container' is not null or undefined + if (container === null || container === undefined) { + throw new Error('Required parameter container was null or undefined when calling getHlsAudioSegment.'); + } + + // verify required parameter 'runtimeTicks' is not null or undefined + if (runtimeTicks === null || runtimeTicks === undefined) { + throw new Error('Required parameter runtimeTicks was null or undefined when calling getHlsAudioSegment.'); + } + + // verify required parameter 'actualSegmentLengthTicks' is not null or undefined + if (actualSegmentLengthTicks === null || actualSegmentLengthTicks === undefined) { + throw new Error('Required parameter actualSegmentLengthTicks was null or undefined when calling getHlsAudioSegment.'); + } + + if (runtimeTicks !== undefined) { + localVarQueryParameters['runtimeTicks'] = ObjectSerializer.serialize(runtimeTicks, "number"); + } + + if (actualSegmentLengthTicks !== undefined) { + localVarQueryParameters['actualSegmentLengthTicks'] = ObjectSerializer.serialize(actualSegmentLengthTicks, "number"); + } + + if (_static !== undefined) { + localVarQueryParameters['static'] = ObjectSerializer.serialize(_static, "boolean"); + } + + if (params !== undefined) { + localVarQueryParameters['params'] = ObjectSerializer.serialize(params, "string"); + } + + if (tag !== undefined) { + localVarQueryParameters['tag'] = ObjectSerializer.serialize(tag, "string"); + } + + if (deviceProfileId !== undefined) { + localVarQueryParameters['deviceProfileId'] = ObjectSerializer.serialize(deviceProfileId, "string"); + } + + if (playSessionId !== undefined) { + localVarQueryParameters['playSessionId'] = ObjectSerializer.serialize(playSessionId, "string"); + } + + if (segmentContainer !== undefined) { + localVarQueryParameters['segmentContainer'] = ObjectSerializer.serialize(segmentContainer, "string"); + } + + if (segmentLength !== undefined) { + localVarQueryParameters['segmentLength'] = ObjectSerializer.serialize(segmentLength, "number"); + } + + if (minSegments !== undefined) { + localVarQueryParameters['minSegments'] = ObjectSerializer.serialize(minSegments, "number"); + } + + if (mediaSourceId !== undefined) { + localVarQueryParameters['mediaSourceId'] = ObjectSerializer.serialize(mediaSourceId, "string"); + } + + if (deviceId !== undefined) { + localVarQueryParameters['deviceId'] = ObjectSerializer.serialize(deviceId, "string"); + } + + if (audioCodec !== undefined) { + localVarQueryParameters['audioCodec'] = ObjectSerializer.serialize(audioCodec, "string"); + } + + if (enableAutoStreamCopy !== undefined) { + localVarQueryParameters['enableAutoStreamCopy'] = ObjectSerializer.serialize(enableAutoStreamCopy, "boolean"); + } + + if (allowVideoStreamCopy !== undefined) { + localVarQueryParameters['allowVideoStreamCopy'] = ObjectSerializer.serialize(allowVideoStreamCopy, "boolean"); + } + + if (allowAudioStreamCopy !== undefined) { + localVarQueryParameters['allowAudioStreamCopy'] = ObjectSerializer.serialize(allowAudioStreamCopy, "boolean"); + } + + if (breakOnNonKeyFrames !== undefined) { + localVarQueryParameters['breakOnNonKeyFrames'] = ObjectSerializer.serialize(breakOnNonKeyFrames, "boolean"); + } + + if (audioSampleRate !== undefined) { + localVarQueryParameters['audioSampleRate'] = ObjectSerializer.serialize(audioSampleRate, "number"); + } + + if (maxAudioBitDepth !== undefined) { + localVarQueryParameters['maxAudioBitDepth'] = ObjectSerializer.serialize(maxAudioBitDepth, "number"); + } + + if (maxStreamingBitrate !== undefined) { + localVarQueryParameters['maxStreamingBitrate'] = ObjectSerializer.serialize(maxStreamingBitrate, "number"); + } + + if (audioBitRate !== undefined) { + localVarQueryParameters['audioBitRate'] = ObjectSerializer.serialize(audioBitRate, "number"); + } + + if (audioChannels !== undefined) { + localVarQueryParameters['audioChannels'] = ObjectSerializer.serialize(audioChannels, "number"); + } + + if (maxAudioChannels !== undefined) { + localVarQueryParameters['maxAudioChannels'] = ObjectSerializer.serialize(maxAudioChannels, "number"); + } + + if (profile !== undefined) { + localVarQueryParameters['profile'] = ObjectSerializer.serialize(profile, "string"); + } + + if (level !== undefined) { + localVarQueryParameters['level'] = ObjectSerializer.serialize(level, "string"); + } + + if (framerate !== undefined) { + localVarQueryParameters['framerate'] = ObjectSerializer.serialize(framerate, "number"); + } + + if (maxFramerate !== undefined) { + localVarQueryParameters['maxFramerate'] = ObjectSerializer.serialize(maxFramerate, "number"); + } + + if (copyTimestamps !== undefined) { + localVarQueryParameters['copyTimestamps'] = ObjectSerializer.serialize(copyTimestamps, "boolean"); + } + + if (startTimeTicks !== undefined) { + localVarQueryParameters['startTimeTicks'] = ObjectSerializer.serialize(startTimeTicks, "number"); + } + + if (width !== undefined) { + localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number"); + } + + if (height !== undefined) { + localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number"); + } + + if (videoBitRate !== undefined) { + localVarQueryParameters['videoBitRate'] = ObjectSerializer.serialize(videoBitRate, "number"); + } + + if (subtitleStreamIndex !== undefined) { + localVarQueryParameters['subtitleStreamIndex'] = ObjectSerializer.serialize(subtitleStreamIndex, "number"); + } + + if (subtitleMethod !== undefined) { + localVarQueryParameters['subtitleMethod'] = ObjectSerializer.serialize(subtitleMethod, "SubtitleDeliveryMethod"); + } + + if (maxRefFrames !== undefined) { + localVarQueryParameters['maxRefFrames'] = ObjectSerializer.serialize(maxRefFrames, "number"); + } + + if (maxVideoBitDepth !== undefined) { + localVarQueryParameters['maxVideoBitDepth'] = ObjectSerializer.serialize(maxVideoBitDepth, "number"); + } + + if (requireAvc !== undefined) { + localVarQueryParameters['requireAvc'] = ObjectSerializer.serialize(requireAvc, "boolean"); + } + + if (deInterlace !== undefined) { + localVarQueryParameters['deInterlace'] = ObjectSerializer.serialize(deInterlace, "boolean"); + } + + if (requireNonAnamorphic !== undefined) { + localVarQueryParameters['requireNonAnamorphic'] = ObjectSerializer.serialize(requireNonAnamorphic, "boolean"); + } + + if (transcodingMaxAudioChannels !== undefined) { + localVarQueryParameters['transcodingMaxAudioChannels'] = ObjectSerializer.serialize(transcodingMaxAudioChannels, "number"); + } + + if (cpuCoreLimit !== undefined) { + localVarQueryParameters['cpuCoreLimit'] = ObjectSerializer.serialize(cpuCoreLimit, "number"); + } + + if (liveStreamId !== undefined) { + localVarQueryParameters['liveStreamId'] = ObjectSerializer.serialize(liveStreamId, "string"); + } + + if (enableMpegtsM2TsMode !== undefined) { + localVarQueryParameters['enableMpegtsM2TsMode'] = ObjectSerializer.serialize(enableMpegtsM2TsMode, "boolean"); + } + + if (videoCodec !== undefined) { + localVarQueryParameters['videoCodec'] = ObjectSerializer.serialize(videoCodec, "string"); + } + + if (subtitleCodec !== undefined) { + localVarQueryParameters['subtitleCodec'] = ObjectSerializer.serialize(subtitleCodec, "string"); + } + + if (transcodeReasons !== undefined) { + localVarQueryParameters['transcodeReasons'] = ObjectSerializer.serialize(transcodeReasons, "string"); + } + + if (audioStreamIndex !== undefined) { + localVarQueryParameters['audioStreamIndex'] = ObjectSerializer.serialize(audioStreamIndex, "number"); + } + + if (videoStreamIndex !== undefined) { + localVarQueryParameters['videoStreamIndex'] = ObjectSerializer.serialize(videoStreamIndex, "number"); + } + + if (context !== undefined) { + localVarQueryParameters['context'] = ObjectSerializer.serialize(context, "EncodingContext"); + } + + if (streamOptions !== undefined) { + localVarQueryParameters['streamOptions'] = ObjectSerializer.serialize(streamOptions, "{ [key: string]: string; }"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets a video stream using HTTP live streaming. + * @param itemId The item id. + * @param playlistId The playlist id. + * @param segmentId The segment id. + * @param container The video container. Possible values are: ts, webm, asf, wmv, ogv, mp4, m4v, mkv, mpeg, mpg, avi, 3gp, wmv, wtv, m2ts, mov, iso, flv. + * @param runtimeTicks The position of the requested segment in ticks. + * @param actualSegmentLengthTicks The length of the requested segment in ticks. + * @param _static Optional. If true, the original file will be streamed statically without any encoding. Use either no url extension or the original file extension. true/false. + * @param params The streaming parameters. + * @param tag The tag. + * @param deviceProfileId Optional. The dlna device profile id to utilize. + * @param playSessionId The play session id. + * @param segmentContainer The segment container. + * @param segmentLength The desired segment length. + * @param minSegments The minimum number of segments. + * @param mediaSourceId The media version id, if playing an alternate version. + * @param deviceId The device id of the client requesting. Used to stop encoding processes when needed. + * @param audioCodec Optional. Specify a audio codec to encode to, e.g. mp3. If omitted the server will auto-select using the url\'s extension. Options: aac, mp3, vorbis, wma. + * @param enableAutoStreamCopy Whether or not to allow automatic stream copy if requested values match the original source. Defaults to true. + * @param allowVideoStreamCopy Whether or not to allow copying of the video stream url. + * @param allowAudioStreamCopy Whether or not to allow copying of the audio stream url. + * @param breakOnNonKeyFrames Optional. Whether to break on non key frames. + * @param audioSampleRate Optional. Specify a specific audio sample rate, e.g. 44100. + * @param maxAudioBitDepth Optional. The maximum audio bit depth. + * @param audioBitRate Optional. Specify an audio bitrate to encode to, e.g. 128000. If omitted this will be left to encoder defaults. + * @param audioChannels Optional. Specify a specific number of audio channels to encode to, e.g. 2. + * @param maxAudioChannels Optional. Specify a maximum number of audio channels to encode to, e.g. 2. + * @param profile Optional. Specify a specific an encoder profile (varies by encoder), e.g. main, baseline, high. + * @param level Optional. Specify a level for the encoder profile (varies by encoder), e.g. 3, 3.1. + * @param framerate Optional. A specific video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. + * @param maxFramerate Optional. A specific maximum video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. + * @param copyTimestamps Whether or not to copy timestamps when transcoding with an offset. Defaults to false. + * @param startTimeTicks Optional. Specify a starting offset, in ticks. 1 tick = 10000 ms. + * @param width Optional. The fixed horizontal resolution of the encoded video. + * @param height Optional. The fixed vertical resolution of the encoded video. + * @param maxWidth Optional. The maximum horizontal resolution of the encoded video. + * @param maxHeight Optional. The maximum vertical resolution of the encoded video. + * @param videoBitRate Optional. Specify a video bitrate to encode to, e.g. 500000. If omitted this will be left to encoder defaults. + * @param subtitleStreamIndex Optional. The index of the subtitle stream to use. If omitted no subtitles will be used. + * @param subtitleMethod Optional. Specify the subtitle delivery method. + * @param maxRefFrames Optional. + * @param maxVideoBitDepth Optional. The maximum video bit depth. + * @param requireAvc Optional. Whether to require avc. + * @param deInterlace Optional. Whether to deinterlace the video. + * @param requireNonAnamorphic Optional. Whether to require a non anamorphic stream. + * @param transcodingMaxAudioChannels Optional. The maximum number of audio channels to transcode. + * @param cpuCoreLimit Optional. The limit of how many cpu cores to use. + * @param liveStreamId The live stream id. + * @param enableMpegtsM2TsMode Optional. Whether to enable the MpegtsM2Ts mode. + * @param videoCodec Optional. Specify a video codec to encode to, e.g. h264. If omitted the server will auto-select using the url\'s extension. Options: h265, h264, mpeg4, theora, vp8, vp9, vpx (deprecated), wmv. + * @param subtitleCodec Optional. Specify a subtitle codec to encode to. + * @param transcodeReasons Optional. The transcoding reason. + * @param audioStreamIndex Optional. The index of the audio stream to use. If omitted the first audio stream will be used. + * @param videoStreamIndex Optional. The index of the video stream to use. If omitted the first video stream will be used. + * @param context Optional. The MediaBrowser.Model.Dlna.EncodingContext. + * @param streamOptions Optional. The streaming options. + */ + public async getHlsVideoSegment (itemId: string, playlistId: string, segmentId: number, container: string, runtimeTicks: number, actualSegmentLengthTicks: number, _static?: boolean, params?: string, tag?: string, deviceProfileId?: string, playSessionId?: string, segmentContainer?: string, segmentLength?: number, minSegments?: number, mediaSourceId?: string, deviceId?: string, audioCodec?: string, enableAutoStreamCopy?: boolean, allowVideoStreamCopy?: boolean, allowAudioStreamCopy?: boolean, breakOnNonKeyFrames?: boolean, audioSampleRate?: number, maxAudioBitDepth?: number, audioBitRate?: number, audioChannels?: number, maxAudioChannels?: number, profile?: string, level?: string, framerate?: number, maxFramerate?: number, copyTimestamps?: boolean, startTimeTicks?: number, width?: number, height?: number, maxWidth?: number, maxHeight?: number, videoBitRate?: number, subtitleStreamIndex?: number, subtitleMethod?: SubtitleDeliveryMethod, maxRefFrames?: number, maxVideoBitDepth?: number, requireAvc?: boolean, deInterlace?: boolean, requireNonAnamorphic?: boolean, transcodingMaxAudioChannels?: number, cpuCoreLimit?: number, liveStreamId?: string, enableMpegtsM2TsMode?: boolean, videoCodec?: string, subtitleCodec?: string, transcodeReasons?: string, audioStreamIndex?: number, videoStreamIndex?: number, context?: EncodingContext, streamOptions?: { [key: string]: string; }, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/Videos/{itemId}/hls1/{playlistId}/{segmentId}.{container}' + .replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId))) + .replace('{' + 'playlistId' + '}', encodeURIComponent(String(playlistId))) + .replace('{' + 'segmentId' + '}', encodeURIComponent(String(segmentId))) + .replace('{' + 'container' + '}', encodeURIComponent(String(container))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['video/*']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'itemId' is not null or undefined + if (itemId === null || itemId === undefined) { + throw new Error('Required parameter itemId was null or undefined when calling getHlsVideoSegment.'); + } + + // verify required parameter 'playlistId' is not null or undefined + if (playlistId === null || playlistId === undefined) { + throw new Error('Required parameter playlistId was null or undefined when calling getHlsVideoSegment.'); + } + + // verify required parameter 'segmentId' is not null or undefined + if (segmentId === null || segmentId === undefined) { + throw new Error('Required parameter segmentId was null or undefined when calling getHlsVideoSegment.'); + } + + // verify required parameter 'container' is not null or undefined + if (container === null || container === undefined) { + throw new Error('Required parameter container was null or undefined when calling getHlsVideoSegment.'); + } + + // verify required parameter 'runtimeTicks' is not null or undefined + if (runtimeTicks === null || runtimeTicks === undefined) { + throw new Error('Required parameter runtimeTicks was null or undefined when calling getHlsVideoSegment.'); + } + + // verify required parameter 'actualSegmentLengthTicks' is not null or undefined + if (actualSegmentLengthTicks === null || actualSegmentLengthTicks === undefined) { + throw new Error('Required parameter actualSegmentLengthTicks was null or undefined when calling getHlsVideoSegment.'); + } + + if (runtimeTicks !== undefined) { + localVarQueryParameters['runtimeTicks'] = ObjectSerializer.serialize(runtimeTicks, "number"); + } + + if (actualSegmentLengthTicks !== undefined) { + localVarQueryParameters['actualSegmentLengthTicks'] = ObjectSerializer.serialize(actualSegmentLengthTicks, "number"); + } + + if (_static !== undefined) { + localVarQueryParameters['static'] = ObjectSerializer.serialize(_static, "boolean"); + } + + if (params !== undefined) { + localVarQueryParameters['params'] = ObjectSerializer.serialize(params, "string"); + } + + if (tag !== undefined) { + localVarQueryParameters['tag'] = ObjectSerializer.serialize(tag, "string"); + } + + if (deviceProfileId !== undefined) { + localVarQueryParameters['deviceProfileId'] = ObjectSerializer.serialize(deviceProfileId, "string"); + } + + if (playSessionId !== undefined) { + localVarQueryParameters['playSessionId'] = ObjectSerializer.serialize(playSessionId, "string"); + } + + if (segmentContainer !== undefined) { + localVarQueryParameters['segmentContainer'] = ObjectSerializer.serialize(segmentContainer, "string"); + } + + if (segmentLength !== undefined) { + localVarQueryParameters['segmentLength'] = ObjectSerializer.serialize(segmentLength, "number"); + } + + if (minSegments !== undefined) { + localVarQueryParameters['minSegments'] = ObjectSerializer.serialize(minSegments, "number"); + } + + if (mediaSourceId !== undefined) { + localVarQueryParameters['mediaSourceId'] = ObjectSerializer.serialize(mediaSourceId, "string"); + } + + if (deviceId !== undefined) { + localVarQueryParameters['deviceId'] = ObjectSerializer.serialize(deviceId, "string"); + } + + if (audioCodec !== undefined) { + localVarQueryParameters['audioCodec'] = ObjectSerializer.serialize(audioCodec, "string"); + } + + if (enableAutoStreamCopy !== undefined) { + localVarQueryParameters['enableAutoStreamCopy'] = ObjectSerializer.serialize(enableAutoStreamCopy, "boolean"); + } + + if (allowVideoStreamCopy !== undefined) { + localVarQueryParameters['allowVideoStreamCopy'] = ObjectSerializer.serialize(allowVideoStreamCopy, "boolean"); + } + + if (allowAudioStreamCopy !== undefined) { + localVarQueryParameters['allowAudioStreamCopy'] = ObjectSerializer.serialize(allowAudioStreamCopy, "boolean"); + } + + if (breakOnNonKeyFrames !== undefined) { + localVarQueryParameters['breakOnNonKeyFrames'] = ObjectSerializer.serialize(breakOnNonKeyFrames, "boolean"); + } + + if (audioSampleRate !== undefined) { + localVarQueryParameters['audioSampleRate'] = ObjectSerializer.serialize(audioSampleRate, "number"); + } + + if (maxAudioBitDepth !== undefined) { + localVarQueryParameters['maxAudioBitDepth'] = ObjectSerializer.serialize(maxAudioBitDepth, "number"); + } + + if (audioBitRate !== undefined) { + localVarQueryParameters['audioBitRate'] = ObjectSerializer.serialize(audioBitRate, "number"); + } + + if (audioChannels !== undefined) { + localVarQueryParameters['audioChannels'] = ObjectSerializer.serialize(audioChannels, "number"); + } + + if (maxAudioChannels !== undefined) { + localVarQueryParameters['maxAudioChannels'] = ObjectSerializer.serialize(maxAudioChannels, "number"); + } + + if (profile !== undefined) { + localVarQueryParameters['profile'] = ObjectSerializer.serialize(profile, "string"); + } + + if (level !== undefined) { + localVarQueryParameters['level'] = ObjectSerializer.serialize(level, "string"); + } + + if (framerate !== undefined) { + localVarQueryParameters['framerate'] = ObjectSerializer.serialize(framerate, "number"); + } + + if (maxFramerate !== undefined) { + localVarQueryParameters['maxFramerate'] = ObjectSerializer.serialize(maxFramerate, "number"); + } + + if (copyTimestamps !== undefined) { + localVarQueryParameters['copyTimestamps'] = ObjectSerializer.serialize(copyTimestamps, "boolean"); + } + + if (startTimeTicks !== undefined) { + localVarQueryParameters['startTimeTicks'] = ObjectSerializer.serialize(startTimeTicks, "number"); + } + + if (width !== undefined) { + localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number"); + } + + if (height !== undefined) { + localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number"); + } + + if (maxWidth !== undefined) { + localVarQueryParameters['maxWidth'] = ObjectSerializer.serialize(maxWidth, "number"); + } + + if (maxHeight !== undefined) { + localVarQueryParameters['maxHeight'] = ObjectSerializer.serialize(maxHeight, "number"); + } + + if (videoBitRate !== undefined) { + localVarQueryParameters['videoBitRate'] = ObjectSerializer.serialize(videoBitRate, "number"); + } + + if (subtitleStreamIndex !== undefined) { + localVarQueryParameters['subtitleStreamIndex'] = ObjectSerializer.serialize(subtitleStreamIndex, "number"); + } + + if (subtitleMethod !== undefined) { + localVarQueryParameters['subtitleMethod'] = ObjectSerializer.serialize(subtitleMethod, "SubtitleDeliveryMethod"); + } + + if (maxRefFrames !== undefined) { + localVarQueryParameters['maxRefFrames'] = ObjectSerializer.serialize(maxRefFrames, "number"); + } + + if (maxVideoBitDepth !== undefined) { + localVarQueryParameters['maxVideoBitDepth'] = ObjectSerializer.serialize(maxVideoBitDepth, "number"); + } + + if (requireAvc !== undefined) { + localVarQueryParameters['requireAvc'] = ObjectSerializer.serialize(requireAvc, "boolean"); + } + + if (deInterlace !== undefined) { + localVarQueryParameters['deInterlace'] = ObjectSerializer.serialize(deInterlace, "boolean"); + } + + if (requireNonAnamorphic !== undefined) { + localVarQueryParameters['requireNonAnamorphic'] = ObjectSerializer.serialize(requireNonAnamorphic, "boolean"); + } + + if (transcodingMaxAudioChannels !== undefined) { + localVarQueryParameters['transcodingMaxAudioChannels'] = ObjectSerializer.serialize(transcodingMaxAudioChannels, "number"); + } + + if (cpuCoreLimit !== undefined) { + localVarQueryParameters['cpuCoreLimit'] = ObjectSerializer.serialize(cpuCoreLimit, "number"); + } + + if (liveStreamId !== undefined) { + localVarQueryParameters['liveStreamId'] = ObjectSerializer.serialize(liveStreamId, "string"); + } + + if (enableMpegtsM2TsMode !== undefined) { + localVarQueryParameters['enableMpegtsM2TsMode'] = ObjectSerializer.serialize(enableMpegtsM2TsMode, "boolean"); + } + + if (videoCodec !== undefined) { + localVarQueryParameters['videoCodec'] = ObjectSerializer.serialize(videoCodec, "string"); + } + + if (subtitleCodec !== undefined) { + localVarQueryParameters['subtitleCodec'] = ObjectSerializer.serialize(subtitleCodec, "string"); + } + + if (transcodeReasons !== undefined) { + localVarQueryParameters['transcodeReasons'] = ObjectSerializer.serialize(transcodeReasons, "string"); + } + + if (audioStreamIndex !== undefined) { + localVarQueryParameters['audioStreamIndex'] = ObjectSerializer.serialize(audioStreamIndex, "number"); + } + + if (videoStreamIndex !== undefined) { + localVarQueryParameters['videoStreamIndex'] = ObjectSerializer.serialize(videoStreamIndex, "number"); + } + + if (context !== undefined) { + localVarQueryParameters['context'] = ObjectSerializer.serialize(context, "EncodingContext"); + } + + if (streamOptions !== undefined) { + localVarQueryParameters['streamOptions'] = ObjectSerializer.serialize(streamOptions, "{ [key: string]: string; }"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets a hls live stream. + * @param itemId The item id. + * @param container The audio container. + * @param _static Optional. If true, the original file will be streamed statically without any encoding. Use either no url extension or the original file extension. true/false. + * @param params The streaming parameters. + * @param tag The tag. + * @param deviceProfileId Optional. The dlna device profile id to utilize. + * @param playSessionId The play session id. + * @param segmentContainer The segment container. + * @param segmentLength The segment lenght. + * @param minSegments The minimum number of segments. + * @param mediaSourceId The media version id, if playing an alternate version. + * @param deviceId The device id of the client requesting. Used to stop encoding processes when needed. + * @param audioCodec Optional. Specify a audio codec to encode to, e.g. mp3. If omitted the server will auto-select using the url\'s extension. Options: aac, mp3, vorbis, wma. + * @param enableAutoStreamCopy Whether or not to allow automatic stream copy if requested values match the original source. Defaults to true. + * @param allowVideoStreamCopy Whether or not to allow copying of the video stream url. + * @param allowAudioStreamCopy Whether or not to allow copying of the audio stream url. + * @param breakOnNonKeyFrames Optional. Whether to break on non key frames. + * @param audioSampleRate Optional. Specify a specific audio sample rate, e.g. 44100. + * @param maxAudioBitDepth Optional. The maximum audio bit depth. + * @param audioBitRate Optional. Specify an audio bitrate to encode to, e.g. 128000. If omitted this will be left to encoder defaults. + * @param audioChannels Optional. Specify a specific number of audio channels to encode to, e.g. 2. + * @param maxAudioChannels Optional. Specify a maximum number of audio channels to encode to, e.g. 2. + * @param profile Optional. Specify a specific an encoder profile (varies by encoder), e.g. main, baseline, high. + * @param level Optional. Specify a level for the encoder profile (varies by encoder), e.g. 3, 3.1. + * @param framerate Optional. A specific video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. + * @param maxFramerate Optional. A specific maximum video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. + * @param copyTimestamps Whether or not to copy timestamps when transcoding with an offset. Defaults to false. + * @param startTimeTicks Optional. Specify a starting offset, in ticks. 1 tick = 10000 ms. + * @param width Optional. The fixed horizontal resolution of the encoded video. + * @param height Optional. The fixed vertical resolution of the encoded video. + * @param videoBitRate Optional. Specify a video bitrate to encode to, e.g. 500000. If omitted this will be left to encoder defaults. + * @param subtitleStreamIndex Optional. The index of the subtitle stream to use. If omitted no subtitles will be used. + * @param subtitleMethod Optional. Specify the subtitle delivery method. + * @param maxRefFrames Optional. + * @param maxVideoBitDepth Optional. The maximum video bit depth. + * @param requireAvc Optional. Whether to require avc. + * @param deInterlace Optional. Whether to deinterlace the video. + * @param requireNonAnamorphic Optional. Whether to require a non anamorphic stream. + * @param transcodingMaxAudioChannels Optional. The maximum number of audio channels to transcode. + * @param cpuCoreLimit Optional. The limit of how many cpu cores to use. + * @param liveStreamId The live stream id. + * @param enableMpegtsM2TsMode Optional. Whether to enable the MpegtsM2Ts mode. + * @param videoCodec Optional. Specify a video codec to encode to, e.g. h264. If omitted the server will auto-select using the url\'s extension. Options: h265, h264, mpeg4, theora, vp8, vp9, vpx (deprecated), wmv. + * @param subtitleCodec Optional. Specify a subtitle codec to encode to. + * @param transcodeReasons Optional. The transcoding reason. + * @param audioStreamIndex Optional. The index of the audio stream to use. If omitted the first audio stream will be used. + * @param videoStreamIndex Optional. The index of the video stream to use. If omitted the first video stream will be used. + * @param context Optional. The MediaBrowser.Model.Dlna.EncodingContext. + * @param streamOptions Optional. The streaming options. + * @param maxWidth Optional. The max width. + * @param maxHeight Optional. The max height. + * @param enableSubtitlesInManifest Optional. Whether to enable subtitles in the manifest. + */ + public async getLiveHlsStream (itemId: string, container?: string, _static?: boolean, params?: string, tag?: string, deviceProfileId?: string, playSessionId?: string, segmentContainer?: string, segmentLength?: number, minSegments?: number, mediaSourceId?: string, deviceId?: string, audioCodec?: string, enableAutoStreamCopy?: boolean, allowVideoStreamCopy?: boolean, allowAudioStreamCopy?: boolean, breakOnNonKeyFrames?: boolean, audioSampleRate?: number, maxAudioBitDepth?: number, audioBitRate?: number, audioChannels?: number, maxAudioChannels?: number, profile?: string, level?: string, framerate?: number, maxFramerate?: number, copyTimestamps?: boolean, startTimeTicks?: number, width?: number, height?: number, videoBitRate?: number, subtitleStreamIndex?: number, subtitleMethod?: SubtitleDeliveryMethod, maxRefFrames?: number, maxVideoBitDepth?: number, requireAvc?: boolean, deInterlace?: boolean, requireNonAnamorphic?: boolean, transcodingMaxAudioChannels?: number, cpuCoreLimit?: number, liveStreamId?: string, enableMpegtsM2TsMode?: boolean, videoCodec?: string, subtitleCodec?: string, transcodeReasons?: string, audioStreamIndex?: number, videoStreamIndex?: number, context?: EncodingContext, streamOptions?: { [key: string]: string; }, maxWidth?: number, maxHeight?: number, enableSubtitlesInManifest?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/Videos/{itemId}/live.m3u8' + .replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/x-mpegURL']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'itemId' is not null or undefined + if (itemId === null || itemId === undefined) { + throw new Error('Required parameter itemId was null or undefined when calling getLiveHlsStream.'); + } + + if (container !== undefined) { + localVarQueryParameters['container'] = ObjectSerializer.serialize(container, "string"); + } + + if (_static !== undefined) { + localVarQueryParameters['static'] = ObjectSerializer.serialize(_static, "boolean"); + } + + if (params !== undefined) { + localVarQueryParameters['params'] = ObjectSerializer.serialize(params, "string"); + } + + if (tag !== undefined) { + localVarQueryParameters['tag'] = ObjectSerializer.serialize(tag, "string"); + } + + if (deviceProfileId !== undefined) { + localVarQueryParameters['deviceProfileId'] = ObjectSerializer.serialize(deviceProfileId, "string"); + } + + if (playSessionId !== undefined) { + localVarQueryParameters['playSessionId'] = ObjectSerializer.serialize(playSessionId, "string"); + } + + if (segmentContainer !== undefined) { + localVarQueryParameters['segmentContainer'] = ObjectSerializer.serialize(segmentContainer, "string"); + } + + if (segmentLength !== undefined) { + localVarQueryParameters['segmentLength'] = ObjectSerializer.serialize(segmentLength, "number"); + } + + if (minSegments !== undefined) { + localVarQueryParameters['minSegments'] = ObjectSerializer.serialize(minSegments, "number"); + } + + if (mediaSourceId !== undefined) { + localVarQueryParameters['mediaSourceId'] = ObjectSerializer.serialize(mediaSourceId, "string"); + } + + if (deviceId !== undefined) { + localVarQueryParameters['deviceId'] = ObjectSerializer.serialize(deviceId, "string"); + } + + if (audioCodec !== undefined) { + localVarQueryParameters['audioCodec'] = ObjectSerializer.serialize(audioCodec, "string"); + } + + if (enableAutoStreamCopy !== undefined) { + localVarQueryParameters['enableAutoStreamCopy'] = ObjectSerializer.serialize(enableAutoStreamCopy, "boolean"); + } + + if (allowVideoStreamCopy !== undefined) { + localVarQueryParameters['allowVideoStreamCopy'] = ObjectSerializer.serialize(allowVideoStreamCopy, "boolean"); + } + + if (allowAudioStreamCopy !== undefined) { + localVarQueryParameters['allowAudioStreamCopy'] = ObjectSerializer.serialize(allowAudioStreamCopy, "boolean"); + } + + if (breakOnNonKeyFrames !== undefined) { + localVarQueryParameters['breakOnNonKeyFrames'] = ObjectSerializer.serialize(breakOnNonKeyFrames, "boolean"); + } + + if (audioSampleRate !== undefined) { + localVarQueryParameters['audioSampleRate'] = ObjectSerializer.serialize(audioSampleRate, "number"); + } + + if (maxAudioBitDepth !== undefined) { + localVarQueryParameters['maxAudioBitDepth'] = ObjectSerializer.serialize(maxAudioBitDepth, "number"); + } + + if (audioBitRate !== undefined) { + localVarQueryParameters['audioBitRate'] = ObjectSerializer.serialize(audioBitRate, "number"); + } + + if (audioChannels !== undefined) { + localVarQueryParameters['audioChannels'] = ObjectSerializer.serialize(audioChannels, "number"); + } + + if (maxAudioChannels !== undefined) { + localVarQueryParameters['maxAudioChannels'] = ObjectSerializer.serialize(maxAudioChannels, "number"); + } + + if (profile !== undefined) { + localVarQueryParameters['profile'] = ObjectSerializer.serialize(profile, "string"); + } + + if (level !== undefined) { + localVarQueryParameters['level'] = ObjectSerializer.serialize(level, "string"); + } + + if (framerate !== undefined) { + localVarQueryParameters['framerate'] = ObjectSerializer.serialize(framerate, "number"); + } + + if (maxFramerate !== undefined) { + localVarQueryParameters['maxFramerate'] = ObjectSerializer.serialize(maxFramerate, "number"); + } + + if (copyTimestamps !== undefined) { + localVarQueryParameters['copyTimestamps'] = ObjectSerializer.serialize(copyTimestamps, "boolean"); + } + + if (startTimeTicks !== undefined) { + localVarQueryParameters['startTimeTicks'] = ObjectSerializer.serialize(startTimeTicks, "number"); + } + + if (width !== undefined) { + localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number"); + } + + if (height !== undefined) { + localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number"); + } + + if (videoBitRate !== undefined) { + localVarQueryParameters['videoBitRate'] = ObjectSerializer.serialize(videoBitRate, "number"); + } + + if (subtitleStreamIndex !== undefined) { + localVarQueryParameters['subtitleStreamIndex'] = ObjectSerializer.serialize(subtitleStreamIndex, "number"); + } + + if (subtitleMethod !== undefined) { + localVarQueryParameters['subtitleMethod'] = ObjectSerializer.serialize(subtitleMethod, "SubtitleDeliveryMethod"); + } + + if (maxRefFrames !== undefined) { + localVarQueryParameters['maxRefFrames'] = ObjectSerializer.serialize(maxRefFrames, "number"); + } + + if (maxVideoBitDepth !== undefined) { + localVarQueryParameters['maxVideoBitDepth'] = ObjectSerializer.serialize(maxVideoBitDepth, "number"); + } + + if (requireAvc !== undefined) { + localVarQueryParameters['requireAvc'] = ObjectSerializer.serialize(requireAvc, "boolean"); + } + + if (deInterlace !== undefined) { + localVarQueryParameters['deInterlace'] = ObjectSerializer.serialize(deInterlace, "boolean"); + } + + if (requireNonAnamorphic !== undefined) { + localVarQueryParameters['requireNonAnamorphic'] = ObjectSerializer.serialize(requireNonAnamorphic, "boolean"); + } + + if (transcodingMaxAudioChannels !== undefined) { + localVarQueryParameters['transcodingMaxAudioChannels'] = ObjectSerializer.serialize(transcodingMaxAudioChannels, "number"); + } + + if (cpuCoreLimit !== undefined) { + localVarQueryParameters['cpuCoreLimit'] = ObjectSerializer.serialize(cpuCoreLimit, "number"); + } + + if (liveStreamId !== undefined) { + localVarQueryParameters['liveStreamId'] = ObjectSerializer.serialize(liveStreamId, "string"); + } + + if (enableMpegtsM2TsMode !== undefined) { + localVarQueryParameters['enableMpegtsM2TsMode'] = ObjectSerializer.serialize(enableMpegtsM2TsMode, "boolean"); + } + + if (videoCodec !== undefined) { + localVarQueryParameters['videoCodec'] = ObjectSerializer.serialize(videoCodec, "string"); + } + + if (subtitleCodec !== undefined) { + localVarQueryParameters['subtitleCodec'] = ObjectSerializer.serialize(subtitleCodec, "string"); + } + + if (transcodeReasons !== undefined) { + localVarQueryParameters['transcodeReasons'] = ObjectSerializer.serialize(transcodeReasons, "string"); + } + + if (audioStreamIndex !== undefined) { + localVarQueryParameters['audioStreamIndex'] = ObjectSerializer.serialize(audioStreamIndex, "number"); + } + + if (videoStreamIndex !== undefined) { + localVarQueryParameters['videoStreamIndex'] = ObjectSerializer.serialize(videoStreamIndex, "number"); + } + + if (context !== undefined) { + localVarQueryParameters['context'] = ObjectSerializer.serialize(context, "EncodingContext"); + } + + if (streamOptions !== undefined) { + localVarQueryParameters['streamOptions'] = ObjectSerializer.serialize(streamOptions, "{ [key: string]: string; }"); + } + + if (maxWidth !== undefined) { + localVarQueryParameters['maxWidth'] = ObjectSerializer.serialize(maxWidth, "number"); + } + + if (maxHeight !== undefined) { + localVarQueryParameters['maxHeight'] = ObjectSerializer.serialize(maxHeight, "number"); + } + + if (enableSubtitlesInManifest !== undefined) { + localVarQueryParameters['enableSubtitlesInManifest'] = ObjectSerializer.serialize(enableSubtitlesInManifest, "boolean"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets an audio hls playlist stream. + * @param itemId The item id. + * @param mediaSourceId The media version id, if playing an alternate version. + * @param _static Optional. If true, the original file will be streamed statically without any encoding. Use either no url extension or the original file extension. true/false. + * @param params The streaming parameters. + * @param tag The tag. + * @param deviceProfileId Optional. The dlna device profile id to utilize. + * @param playSessionId The play session id. + * @param segmentContainer The segment container. + * @param segmentLength The segment length. + * @param minSegments The minimum number of segments. + * @param deviceId The device id of the client requesting. Used to stop encoding processes when needed. + * @param audioCodec Optional. Specify a audio codec to encode to, e.g. mp3. If omitted the server will auto-select using the url\'s extension. Options: aac, mp3, vorbis, wma. + * @param enableAutoStreamCopy Whether or not to allow automatic stream copy if requested values match the original source. Defaults to true. + * @param allowVideoStreamCopy Whether or not to allow copying of the video stream url. + * @param allowAudioStreamCopy Whether or not to allow copying of the audio stream url. + * @param breakOnNonKeyFrames Optional. Whether to break on non key frames. + * @param audioSampleRate Optional. Specify a specific audio sample rate, e.g. 44100. + * @param maxAudioBitDepth Optional. The maximum audio bit depth. + * @param maxStreamingBitrate Optional. The maximum streaming bitrate. + * @param audioBitRate Optional. Specify an audio bitrate to encode to, e.g. 128000. If omitted this will be left to encoder defaults. + * @param audioChannels Optional. Specify a specific number of audio channels to encode to, e.g. 2. + * @param maxAudioChannels Optional. Specify a maximum number of audio channels to encode to, e.g. 2. + * @param profile Optional. Specify a specific an encoder profile (varies by encoder), e.g. main, baseline, high. + * @param level Optional. Specify a level for the encoder profile (varies by encoder), e.g. 3, 3.1. + * @param framerate Optional. A specific video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. + * @param maxFramerate Optional. A specific maximum video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. + * @param copyTimestamps Whether or not to copy timestamps when transcoding with an offset. Defaults to false. + * @param startTimeTicks Optional. Specify a starting offset, in ticks. 1 tick = 10000 ms. + * @param width Optional. The fixed horizontal resolution of the encoded video. + * @param height Optional. The fixed vertical resolution of the encoded video. + * @param videoBitRate Optional. Specify a video bitrate to encode to, e.g. 500000. If omitted this will be left to encoder defaults. + * @param subtitleStreamIndex Optional. The index of the subtitle stream to use. If omitted no subtitles will be used. + * @param subtitleMethod Optional. Specify the subtitle delivery method. + * @param maxRefFrames Optional. + * @param maxVideoBitDepth Optional. The maximum video bit depth. + * @param requireAvc Optional. Whether to require avc. + * @param deInterlace Optional. Whether to deinterlace the video. + * @param requireNonAnamorphic Optional. Whether to require a non anamorphic stream. + * @param transcodingMaxAudioChannels Optional. The maximum number of audio channels to transcode. + * @param cpuCoreLimit Optional. The limit of how many cpu cores to use. + * @param liveStreamId The live stream id. + * @param enableMpegtsM2TsMode Optional. Whether to enable the MpegtsM2Ts mode. + * @param videoCodec Optional. Specify a video codec to encode to, e.g. h264. If omitted the server will auto-select using the url\'s extension. Options: h265, h264, mpeg4, theora, vp8, vp9, vpx (deprecated), wmv. + * @param subtitleCodec Optional. Specify a subtitle codec to encode to. + * @param transcodeReasons Optional. The transcoding reason. + * @param audioStreamIndex Optional. The index of the audio stream to use. If omitted the first audio stream will be used. + * @param videoStreamIndex Optional. The index of the video stream to use. If omitted the first video stream will be used. + * @param context Optional. The MediaBrowser.Model.Dlna.EncodingContext. + * @param streamOptions Optional. The streaming options. + * @param enableAdaptiveBitrateStreaming Enable adaptive bitrate streaming. + */ + public async getMasterHlsAudioPlaylist (itemId: string, mediaSourceId: string, _static?: boolean, params?: string, tag?: string, deviceProfileId?: string, playSessionId?: string, segmentContainer?: string, segmentLength?: number, minSegments?: number, deviceId?: string, audioCodec?: string, enableAutoStreamCopy?: boolean, allowVideoStreamCopy?: boolean, allowAudioStreamCopy?: boolean, breakOnNonKeyFrames?: boolean, audioSampleRate?: number, maxAudioBitDepth?: number, maxStreamingBitrate?: number, audioBitRate?: number, audioChannels?: number, maxAudioChannels?: number, profile?: string, level?: string, framerate?: number, maxFramerate?: number, copyTimestamps?: boolean, startTimeTicks?: number, width?: number, height?: number, videoBitRate?: number, subtitleStreamIndex?: number, subtitleMethod?: SubtitleDeliveryMethod, maxRefFrames?: number, maxVideoBitDepth?: number, requireAvc?: boolean, deInterlace?: boolean, requireNonAnamorphic?: boolean, transcodingMaxAudioChannels?: number, cpuCoreLimit?: number, liveStreamId?: string, enableMpegtsM2TsMode?: boolean, videoCodec?: string, subtitleCodec?: string, transcodeReasons?: string, audioStreamIndex?: number, videoStreamIndex?: number, context?: EncodingContext, streamOptions?: { [key: string]: string; }, enableAdaptiveBitrateStreaming?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/Audio/{itemId}/master.m3u8' + .replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/x-mpegURL']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'itemId' is not null or undefined + if (itemId === null || itemId === undefined) { + throw new Error('Required parameter itemId was null or undefined when calling getMasterHlsAudioPlaylist.'); + } + + // verify required parameter 'mediaSourceId' is not null or undefined + if (mediaSourceId === null || mediaSourceId === undefined) { + throw new Error('Required parameter mediaSourceId was null or undefined when calling getMasterHlsAudioPlaylist.'); + } + + if (_static !== undefined) { + localVarQueryParameters['static'] = ObjectSerializer.serialize(_static, "boolean"); + } + + if (params !== undefined) { + localVarQueryParameters['params'] = ObjectSerializer.serialize(params, "string"); + } + + if (tag !== undefined) { + localVarQueryParameters['tag'] = ObjectSerializer.serialize(tag, "string"); + } + + if (deviceProfileId !== undefined) { + localVarQueryParameters['deviceProfileId'] = ObjectSerializer.serialize(deviceProfileId, "string"); + } + + if (playSessionId !== undefined) { + localVarQueryParameters['playSessionId'] = ObjectSerializer.serialize(playSessionId, "string"); + } + + if (segmentContainer !== undefined) { + localVarQueryParameters['segmentContainer'] = ObjectSerializer.serialize(segmentContainer, "string"); + } + + if (segmentLength !== undefined) { + localVarQueryParameters['segmentLength'] = ObjectSerializer.serialize(segmentLength, "number"); + } + + if (minSegments !== undefined) { + localVarQueryParameters['minSegments'] = ObjectSerializer.serialize(minSegments, "number"); + } + + if (mediaSourceId !== undefined) { + localVarQueryParameters['mediaSourceId'] = ObjectSerializer.serialize(mediaSourceId, "string"); + } + + if (deviceId !== undefined) { + localVarQueryParameters['deviceId'] = ObjectSerializer.serialize(deviceId, "string"); + } + + if (audioCodec !== undefined) { + localVarQueryParameters['audioCodec'] = ObjectSerializer.serialize(audioCodec, "string"); + } + + if (enableAutoStreamCopy !== undefined) { + localVarQueryParameters['enableAutoStreamCopy'] = ObjectSerializer.serialize(enableAutoStreamCopy, "boolean"); + } + + if (allowVideoStreamCopy !== undefined) { + localVarQueryParameters['allowVideoStreamCopy'] = ObjectSerializer.serialize(allowVideoStreamCopy, "boolean"); + } + + if (allowAudioStreamCopy !== undefined) { + localVarQueryParameters['allowAudioStreamCopy'] = ObjectSerializer.serialize(allowAudioStreamCopy, "boolean"); + } + + if (breakOnNonKeyFrames !== undefined) { + localVarQueryParameters['breakOnNonKeyFrames'] = ObjectSerializer.serialize(breakOnNonKeyFrames, "boolean"); + } + + if (audioSampleRate !== undefined) { + localVarQueryParameters['audioSampleRate'] = ObjectSerializer.serialize(audioSampleRate, "number"); + } + + if (maxAudioBitDepth !== undefined) { + localVarQueryParameters['maxAudioBitDepth'] = ObjectSerializer.serialize(maxAudioBitDepth, "number"); + } + + if (maxStreamingBitrate !== undefined) { + localVarQueryParameters['maxStreamingBitrate'] = ObjectSerializer.serialize(maxStreamingBitrate, "number"); + } + + if (audioBitRate !== undefined) { + localVarQueryParameters['audioBitRate'] = ObjectSerializer.serialize(audioBitRate, "number"); + } + + if (audioChannels !== undefined) { + localVarQueryParameters['audioChannels'] = ObjectSerializer.serialize(audioChannels, "number"); + } + + if (maxAudioChannels !== undefined) { + localVarQueryParameters['maxAudioChannels'] = ObjectSerializer.serialize(maxAudioChannels, "number"); + } + + if (profile !== undefined) { + localVarQueryParameters['profile'] = ObjectSerializer.serialize(profile, "string"); + } + + if (level !== undefined) { + localVarQueryParameters['level'] = ObjectSerializer.serialize(level, "string"); + } + + if (framerate !== undefined) { + localVarQueryParameters['framerate'] = ObjectSerializer.serialize(framerate, "number"); + } + + if (maxFramerate !== undefined) { + localVarQueryParameters['maxFramerate'] = ObjectSerializer.serialize(maxFramerate, "number"); + } + + if (copyTimestamps !== undefined) { + localVarQueryParameters['copyTimestamps'] = ObjectSerializer.serialize(copyTimestamps, "boolean"); + } + + if (startTimeTicks !== undefined) { + localVarQueryParameters['startTimeTicks'] = ObjectSerializer.serialize(startTimeTicks, "number"); + } + + if (width !== undefined) { + localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number"); + } + + if (height !== undefined) { + localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number"); + } + + if (videoBitRate !== undefined) { + localVarQueryParameters['videoBitRate'] = ObjectSerializer.serialize(videoBitRate, "number"); + } + + if (subtitleStreamIndex !== undefined) { + localVarQueryParameters['subtitleStreamIndex'] = ObjectSerializer.serialize(subtitleStreamIndex, "number"); + } + + if (subtitleMethod !== undefined) { + localVarQueryParameters['subtitleMethod'] = ObjectSerializer.serialize(subtitleMethod, "SubtitleDeliveryMethod"); + } + + if (maxRefFrames !== undefined) { + localVarQueryParameters['maxRefFrames'] = ObjectSerializer.serialize(maxRefFrames, "number"); + } + + if (maxVideoBitDepth !== undefined) { + localVarQueryParameters['maxVideoBitDepth'] = ObjectSerializer.serialize(maxVideoBitDepth, "number"); + } + + if (requireAvc !== undefined) { + localVarQueryParameters['requireAvc'] = ObjectSerializer.serialize(requireAvc, "boolean"); + } + + if (deInterlace !== undefined) { + localVarQueryParameters['deInterlace'] = ObjectSerializer.serialize(deInterlace, "boolean"); + } + + if (requireNonAnamorphic !== undefined) { + localVarQueryParameters['requireNonAnamorphic'] = ObjectSerializer.serialize(requireNonAnamorphic, "boolean"); + } + + if (transcodingMaxAudioChannels !== undefined) { + localVarQueryParameters['transcodingMaxAudioChannels'] = ObjectSerializer.serialize(transcodingMaxAudioChannels, "number"); + } + + if (cpuCoreLimit !== undefined) { + localVarQueryParameters['cpuCoreLimit'] = ObjectSerializer.serialize(cpuCoreLimit, "number"); + } + + if (liveStreamId !== undefined) { + localVarQueryParameters['liveStreamId'] = ObjectSerializer.serialize(liveStreamId, "string"); + } + + if (enableMpegtsM2TsMode !== undefined) { + localVarQueryParameters['enableMpegtsM2TsMode'] = ObjectSerializer.serialize(enableMpegtsM2TsMode, "boolean"); + } + + if (videoCodec !== undefined) { + localVarQueryParameters['videoCodec'] = ObjectSerializer.serialize(videoCodec, "string"); + } + + if (subtitleCodec !== undefined) { + localVarQueryParameters['subtitleCodec'] = ObjectSerializer.serialize(subtitleCodec, "string"); + } + + if (transcodeReasons !== undefined) { + localVarQueryParameters['transcodeReasons'] = ObjectSerializer.serialize(transcodeReasons, "string"); + } + + if (audioStreamIndex !== undefined) { + localVarQueryParameters['audioStreamIndex'] = ObjectSerializer.serialize(audioStreamIndex, "number"); + } + + if (videoStreamIndex !== undefined) { + localVarQueryParameters['videoStreamIndex'] = ObjectSerializer.serialize(videoStreamIndex, "number"); + } + + if (context !== undefined) { + localVarQueryParameters['context'] = ObjectSerializer.serialize(context, "EncodingContext"); + } + + if (streamOptions !== undefined) { + localVarQueryParameters['streamOptions'] = ObjectSerializer.serialize(streamOptions, "{ [key: string]: string; }"); + } + + if (enableAdaptiveBitrateStreaming !== undefined) { + localVarQueryParameters['enableAdaptiveBitrateStreaming'] = ObjectSerializer.serialize(enableAdaptiveBitrateStreaming, "boolean"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets a video hls playlist stream. + * @param itemId The item id. + * @param mediaSourceId The media version id, if playing an alternate version. + * @param _static Optional. If true, the original file will be streamed statically without any encoding. Use either no url extension or the original file extension. true/false. + * @param params The streaming parameters. + * @param tag The tag. + * @param deviceProfileId Optional. The dlna device profile id to utilize. + * @param playSessionId The play session id. + * @param segmentContainer The segment container. + * @param segmentLength The segment length. + * @param minSegments The minimum number of segments. + * @param deviceId The device id of the client requesting. Used to stop encoding processes when needed. + * @param audioCodec Optional. Specify a audio codec to encode to, e.g. mp3. If omitted the server will auto-select using the url\'s extension. Options: aac, mp3, vorbis, wma. + * @param enableAutoStreamCopy Whether or not to allow automatic stream copy if requested values match the original source. Defaults to true. + * @param allowVideoStreamCopy Whether or not to allow copying of the video stream url. + * @param allowAudioStreamCopy Whether or not to allow copying of the audio stream url. + * @param breakOnNonKeyFrames Optional. Whether to break on non key frames. + * @param audioSampleRate Optional. Specify a specific audio sample rate, e.g. 44100. + * @param maxAudioBitDepth Optional. The maximum audio bit depth. + * @param audioBitRate Optional. Specify an audio bitrate to encode to, e.g. 128000. If omitted this will be left to encoder defaults. + * @param audioChannels Optional. Specify a specific number of audio channels to encode to, e.g. 2. + * @param maxAudioChannels Optional. Specify a maximum number of audio channels to encode to, e.g. 2. + * @param profile Optional. Specify a specific an encoder profile (varies by encoder), e.g. main, baseline, high. + * @param level Optional. Specify a level for the encoder profile (varies by encoder), e.g. 3, 3.1. + * @param framerate Optional. A specific video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. + * @param maxFramerate Optional. A specific maximum video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. + * @param copyTimestamps Whether or not to copy timestamps when transcoding with an offset. Defaults to false. + * @param startTimeTicks Optional. Specify a starting offset, in ticks. 1 tick = 10000 ms. + * @param width Optional. The fixed horizontal resolution of the encoded video. + * @param height Optional. The fixed vertical resolution of the encoded video. + * @param maxWidth Optional. The maximum horizontal resolution of the encoded video. + * @param maxHeight Optional. The maximum vertical resolution of the encoded video. + * @param videoBitRate Optional. Specify a video bitrate to encode to, e.g. 500000. If omitted this will be left to encoder defaults. + * @param subtitleStreamIndex Optional. The index of the subtitle stream to use. If omitted no subtitles will be used. + * @param subtitleMethod Optional. Specify the subtitle delivery method. + * @param maxRefFrames Optional. + * @param maxVideoBitDepth Optional. The maximum video bit depth. + * @param requireAvc Optional. Whether to require avc. + * @param deInterlace Optional. Whether to deinterlace the video. + * @param requireNonAnamorphic Optional. Whether to require a non anamorphic stream. + * @param transcodingMaxAudioChannels Optional. The maximum number of audio channels to transcode. + * @param cpuCoreLimit Optional. The limit of how many cpu cores to use. + * @param liveStreamId The live stream id. + * @param enableMpegtsM2TsMode Optional. Whether to enable the MpegtsM2Ts mode. + * @param videoCodec Optional. Specify a video codec to encode to, e.g. h264. If omitted the server will auto-select using the url\'s extension. Options: h265, h264, mpeg4, theora, vp8, vp9, vpx (deprecated), wmv. + * @param subtitleCodec Optional. Specify a subtitle codec to encode to. + * @param transcodeReasons Optional. The transcoding reason. + * @param audioStreamIndex Optional. The index of the audio stream to use. If omitted the first audio stream will be used. + * @param videoStreamIndex Optional. The index of the video stream to use. If omitted the first video stream will be used. + * @param context Optional. The MediaBrowser.Model.Dlna.EncodingContext. + * @param streamOptions Optional. The streaming options. + * @param enableAdaptiveBitrateStreaming Enable adaptive bitrate streaming. + */ + public async getMasterHlsVideoPlaylist (itemId: string, mediaSourceId: string, _static?: boolean, params?: string, tag?: string, deviceProfileId?: string, playSessionId?: string, segmentContainer?: string, segmentLength?: number, minSegments?: number, deviceId?: string, audioCodec?: string, enableAutoStreamCopy?: boolean, allowVideoStreamCopy?: boolean, allowAudioStreamCopy?: boolean, breakOnNonKeyFrames?: boolean, audioSampleRate?: number, maxAudioBitDepth?: number, audioBitRate?: number, audioChannels?: number, maxAudioChannels?: number, profile?: string, level?: string, framerate?: number, maxFramerate?: number, copyTimestamps?: boolean, startTimeTicks?: number, width?: number, height?: number, maxWidth?: number, maxHeight?: number, videoBitRate?: number, subtitleStreamIndex?: number, subtitleMethod?: SubtitleDeliveryMethod, maxRefFrames?: number, maxVideoBitDepth?: number, requireAvc?: boolean, deInterlace?: boolean, requireNonAnamorphic?: boolean, transcodingMaxAudioChannels?: number, cpuCoreLimit?: number, liveStreamId?: string, enableMpegtsM2TsMode?: boolean, videoCodec?: string, subtitleCodec?: string, transcodeReasons?: string, audioStreamIndex?: number, videoStreamIndex?: number, context?: EncodingContext, streamOptions?: { [key: string]: string; }, enableAdaptiveBitrateStreaming?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/Videos/{itemId}/master.m3u8' + .replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/x-mpegURL']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'itemId' is not null or undefined + if (itemId === null || itemId === undefined) { + throw new Error('Required parameter itemId was null or undefined when calling getMasterHlsVideoPlaylist.'); + } + + // verify required parameter 'mediaSourceId' is not null or undefined + if (mediaSourceId === null || mediaSourceId === undefined) { + throw new Error('Required parameter mediaSourceId was null or undefined when calling getMasterHlsVideoPlaylist.'); + } + + if (_static !== undefined) { + localVarQueryParameters['static'] = ObjectSerializer.serialize(_static, "boolean"); + } + + if (params !== undefined) { + localVarQueryParameters['params'] = ObjectSerializer.serialize(params, "string"); + } + + if (tag !== undefined) { + localVarQueryParameters['tag'] = ObjectSerializer.serialize(tag, "string"); + } + + if (deviceProfileId !== undefined) { + localVarQueryParameters['deviceProfileId'] = ObjectSerializer.serialize(deviceProfileId, "string"); + } + + if (playSessionId !== undefined) { + localVarQueryParameters['playSessionId'] = ObjectSerializer.serialize(playSessionId, "string"); + } + + if (segmentContainer !== undefined) { + localVarQueryParameters['segmentContainer'] = ObjectSerializer.serialize(segmentContainer, "string"); + } + + if (segmentLength !== undefined) { + localVarQueryParameters['segmentLength'] = ObjectSerializer.serialize(segmentLength, "number"); + } + + if (minSegments !== undefined) { + localVarQueryParameters['minSegments'] = ObjectSerializer.serialize(minSegments, "number"); + } + + if (mediaSourceId !== undefined) { + localVarQueryParameters['mediaSourceId'] = ObjectSerializer.serialize(mediaSourceId, "string"); + } + + if (deviceId !== undefined) { + localVarQueryParameters['deviceId'] = ObjectSerializer.serialize(deviceId, "string"); + } + + if (audioCodec !== undefined) { + localVarQueryParameters['audioCodec'] = ObjectSerializer.serialize(audioCodec, "string"); + } + + if (enableAutoStreamCopy !== undefined) { + localVarQueryParameters['enableAutoStreamCopy'] = ObjectSerializer.serialize(enableAutoStreamCopy, "boolean"); + } + + if (allowVideoStreamCopy !== undefined) { + localVarQueryParameters['allowVideoStreamCopy'] = ObjectSerializer.serialize(allowVideoStreamCopy, "boolean"); + } + + if (allowAudioStreamCopy !== undefined) { + localVarQueryParameters['allowAudioStreamCopy'] = ObjectSerializer.serialize(allowAudioStreamCopy, "boolean"); + } + + if (breakOnNonKeyFrames !== undefined) { + localVarQueryParameters['breakOnNonKeyFrames'] = ObjectSerializer.serialize(breakOnNonKeyFrames, "boolean"); + } + + if (audioSampleRate !== undefined) { + localVarQueryParameters['audioSampleRate'] = ObjectSerializer.serialize(audioSampleRate, "number"); + } + + if (maxAudioBitDepth !== undefined) { + localVarQueryParameters['maxAudioBitDepth'] = ObjectSerializer.serialize(maxAudioBitDepth, "number"); + } + + if (audioBitRate !== undefined) { + localVarQueryParameters['audioBitRate'] = ObjectSerializer.serialize(audioBitRate, "number"); + } + + if (audioChannels !== undefined) { + localVarQueryParameters['audioChannels'] = ObjectSerializer.serialize(audioChannels, "number"); + } + + if (maxAudioChannels !== undefined) { + localVarQueryParameters['maxAudioChannels'] = ObjectSerializer.serialize(maxAudioChannels, "number"); + } + + if (profile !== undefined) { + localVarQueryParameters['profile'] = ObjectSerializer.serialize(profile, "string"); + } + + if (level !== undefined) { + localVarQueryParameters['level'] = ObjectSerializer.serialize(level, "string"); + } + + if (framerate !== undefined) { + localVarQueryParameters['framerate'] = ObjectSerializer.serialize(framerate, "number"); + } + + if (maxFramerate !== undefined) { + localVarQueryParameters['maxFramerate'] = ObjectSerializer.serialize(maxFramerate, "number"); + } + + if (copyTimestamps !== undefined) { + localVarQueryParameters['copyTimestamps'] = ObjectSerializer.serialize(copyTimestamps, "boolean"); + } + + if (startTimeTicks !== undefined) { + localVarQueryParameters['startTimeTicks'] = ObjectSerializer.serialize(startTimeTicks, "number"); + } + + if (width !== undefined) { + localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number"); + } + + if (height !== undefined) { + localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number"); + } + + if (maxWidth !== undefined) { + localVarQueryParameters['maxWidth'] = ObjectSerializer.serialize(maxWidth, "number"); + } + + if (maxHeight !== undefined) { + localVarQueryParameters['maxHeight'] = ObjectSerializer.serialize(maxHeight, "number"); + } + + if (videoBitRate !== undefined) { + localVarQueryParameters['videoBitRate'] = ObjectSerializer.serialize(videoBitRate, "number"); + } + + if (subtitleStreamIndex !== undefined) { + localVarQueryParameters['subtitleStreamIndex'] = ObjectSerializer.serialize(subtitleStreamIndex, "number"); + } + + if (subtitleMethod !== undefined) { + localVarQueryParameters['subtitleMethod'] = ObjectSerializer.serialize(subtitleMethod, "SubtitleDeliveryMethod"); + } + + if (maxRefFrames !== undefined) { + localVarQueryParameters['maxRefFrames'] = ObjectSerializer.serialize(maxRefFrames, "number"); + } + + if (maxVideoBitDepth !== undefined) { + localVarQueryParameters['maxVideoBitDepth'] = ObjectSerializer.serialize(maxVideoBitDepth, "number"); + } + + if (requireAvc !== undefined) { + localVarQueryParameters['requireAvc'] = ObjectSerializer.serialize(requireAvc, "boolean"); + } + + if (deInterlace !== undefined) { + localVarQueryParameters['deInterlace'] = ObjectSerializer.serialize(deInterlace, "boolean"); + } + + if (requireNonAnamorphic !== undefined) { + localVarQueryParameters['requireNonAnamorphic'] = ObjectSerializer.serialize(requireNonAnamorphic, "boolean"); + } + + if (transcodingMaxAudioChannels !== undefined) { + localVarQueryParameters['transcodingMaxAudioChannels'] = ObjectSerializer.serialize(transcodingMaxAudioChannels, "number"); + } + + if (cpuCoreLimit !== undefined) { + localVarQueryParameters['cpuCoreLimit'] = ObjectSerializer.serialize(cpuCoreLimit, "number"); + } + + if (liveStreamId !== undefined) { + localVarQueryParameters['liveStreamId'] = ObjectSerializer.serialize(liveStreamId, "string"); + } + + if (enableMpegtsM2TsMode !== undefined) { + localVarQueryParameters['enableMpegtsM2TsMode'] = ObjectSerializer.serialize(enableMpegtsM2TsMode, "boolean"); + } + + if (videoCodec !== undefined) { + localVarQueryParameters['videoCodec'] = ObjectSerializer.serialize(videoCodec, "string"); + } + + if (subtitleCodec !== undefined) { + localVarQueryParameters['subtitleCodec'] = ObjectSerializer.serialize(subtitleCodec, "string"); + } + + if (transcodeReasons !== undefined) { + localVarQueryParameters['transcodeReasons'] = ObjectSerializer.serialize(transcodeReasons, "string"); + } + + if (audioStreamIndex !== undefined) { + localVarQueryParameters['audioStreamIndex'] = ObjectSerializer.serialize(audioStreamIndex, "number"); + } + + if (videoStreamIndex !== undefined) { + localVarQueryParameters['videoStreamIndex'] = ObjectSerializer.serialize(videoStreamIndex, "number"); + } + + if (context !== undefined) { + localVarQueryParameters['context'] = ObjectSerializer.serialize(context, "EncodingContext"); + } + + if (streamOptions !== undefined) { + localVarQueryParameters['streamOptions'] = ObjectSerializer.serialize(streamOptions, "{ [key: string]: string; }"); + } + + if (enableAdaptiveBitrateStreaming !== undefined) { + localVarQueryParameters['enableAdaptiveBitrateStreaming'] = ObjectSerializer.serialize(enableAdaptiveBitrateStreaming, "boolean"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets an audio stream using HTTP live streaming. + * @param itemId The item id. + * @param _static Optional. If true, the original file will be streamed statically without any encoding. Use either no url extension or the original file extension. true/false. + * @param params The streaming parameters. + * @param tag The tag. + * @param deviceProfileId Optional. The dlna device profile id to utilize. + * @param playSessionId The play session id. + * @param segmentContainer The segment container. + * @param segmentLength The segment length. + * @param minSegments The minimum number of segments. + * @param mediaSourceId The media version id, if playing an alternate version. + * @param deviceId The device id of the client requesting. Used to stop encoding processes when needed. + * @param audioCodec Optional. Specify a audio codec to encode to, e.g. mp3. If omitted the server will auto-select using the url\'s extension. Options: aac, mp3, vorbis, wma. + * @param enableAutoStreamCopy Whether or not to allow automatic stream copy if requested values match the original source. Defaults to true. + * @param allowVideoStreamCopy Whether or not to allow copying of the video stream url. + * @param allowAudioStreamCopy Whether or not to allow copying of the audio stream url. + * @param breakOnNonKeyFrames Optional. Whether to break on non key frames. + * @param audioSampleRate Optional. Specify a specific audio sample rate, e.g. 44100. + * @param maxAudioBitDepth Optional. The maximum audio bit depth. + * @param maxStreamingBitrate Optional. The maximum streaming bitrate. + * @param audioBitRate Optional. Specify an audio bitrate to encode to, e.g. 128000. If omitted this will be left to encoder defaults. + * @param audioChannels Optional. Specify a specific number of audio channels to encode to, e.g. 2. + * @param maxAudioChannels Optional. Specify a maximum number of audio channels to encode to, e.g. 2. + * @param profile Optional. Specify a specific an encoder profile (varies by encoder), e.g. main, baseline, high. + * @param level Optional. Specify a level for the encoder profile (varies by encoder), e.g. 3, 3.1. + * @param framerate Optional. A specific video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. + * @param maxFramerate Optional. A specific maximum video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. + * @param copyTimestamps Whether or not to copy timestamps when transcoding with an offset. Defaults to false. + * @param startTimeTicks Optional. Specify a starting offset, in ticks. 1 tick = 10000 ms. + * @param width Optional. The fixed horizontal resolution of the encoded video. + * @param height Optional. The fixed vertical resolution of the encoded video. + * @param videoBitRate Optional. Specify a video bitrate to encode to, e.g. 500000. If omitted this will be left to encoder defaults. + * @param subtitleStreamIndex Optional. The index of the subtitle stream to use. If omitted no subtitles will be used. + * @param subtitleMethod Optional. Specify the subtitle delivery method. + * @param maxRefFrames Optional. + * @param maxVideoBitDepth Optional. The maximum video bit depth. + * @param requireAvc Optional. Whether to require avc. + * @param deInterlace Optional. Whether to deinterlace the video. + * @param requireNonAnamorphic Optional. Whether to require a non anamorphic stream. + * @param transcodingMaxAudioChannels Optional. The maximum number of audio channels to transcode. + * @param cpuCoreLimit Optional. The limit of how many cpu cores to use. + * @param liveStreamId The live stream id. + * @param enableMpegtsM2TsMode Optional. Whether to enable the MpegtsM2Ts mode. + * @param videoCodec Optional. Specify a video codec to encode to, e.g. h264. If omitted the server will auto-select using the url\'s extension. Options: h265, h264, mpeg4, theora, vpx, wmv. + * @param subtitleCodec Optional. Specify a subtitle codec to encode to. + * @param transcodeReasons Optional. The transcoding reason. + * @param audioStreamIndex Optional. The index of the audio stream to use. If omitted the first audio stream will be used. + * @param videoStreamIndex Optional. The index of the video stream to use. If omitted the first video stream will be used. + * @param context Optional. The MediaBrowser.Model.Dlna.EncodingContext. + * @param streamOptions Optional. The streaming options. + */ + public async getVariantHlsAudioPlaylist (itemId: string, _static?: boolean, params?: string, tag?: string, deviceProfileId?: string, playSessionId?: string, segmentContainer?: string, segmentLength?: number, minSegments?: number, mediaSourceId?: string, deviceId?: string, audioCodec?: string, enableAutoStreamCopy?: boolean, allowVideoStreamCopy?: boolean, allowAudioStreamCopy?: boolean, breakOnNonKeyFrames?: boolean, audioSampleRate?: number, maxAudioBitDepth?: number, maxStreamingBitrate?: number, audioBitRate?: number, audioChannels?: number, maxAudioChannels?: number, profile?: string, level?: string, framerate?: number, maxFramerate?: number, copyTimestamps?: boolean, startTimeTicks?: number, width?: number, height?: number, videoBitRate?: number, subtitleStreamIndex?: number, subtitleMethod?: SubtitleDeliveryMethod, maxRefFrames?: number, maxVideoBitDepth?: number, requireAvc?: boolean, deInterlace?: boolean, requireNonAnamorphic?: boolean, transcodingMaxAudioChannels?: number, cpuCoreLimit?: number, liveStreamId?: string, enableMpegtsM2TsMode?: boolean, videoCodec?: string, subtitleCodec?: string, transcodeReasons?: string, audioStreamIndex?: number, videoStreamIndex?: number, context?: EncodingContext, streamOptions?: { [key: string]: string; }, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/Audio/{itemId}/main.m3u8' + .replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/x-mpegURL']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'itemId' is not null or undefined + if (itemId === null || itemId === undefined) { + throw new Error('Required parameter itemId was null or undefined when calling getVariantHlsAudioPlaylist.'); + } + + if (_static !== undefined) { + localVarQueryParameters['static'] = ObjectSerializer.serialize(_static, "boolean"); + } + + if (params !== undefined) { + localVarQueryParameters['params'] = ObjectSerializer.serialize(params, "string"); + } + + if (tag !== undefined) { + localVarQueryParameters['tag'] = ObjectSerializer.serialize(tag, "string"); + } + + if (deviceProfileId !== undefined) { + localVarQueryParameters['deviceProfileId'] = ObjectSerializer.serialize(deviceProfileId, "string"); + } + + if (playSessionId !== undefined) { + localVarQueryParameters['playSessionId'] = ObjectSerializer.serialize(playSessionId, "string"); + } + + if (segmentContainer !== undefined) { + localVarQueryParameters['segmentContainer'] = ObjectSerializer.serialize(segmentContainer, "string"); + } + + if (segmentLength !== undefined) { + localVarQueryParameters['segmentLength'] = ObjectSerializer.serialize(segmentLength, "number"); + } + + if (minSegments !== undefined) { + localVarQueryParameters['minSegments'] = ObjectSerializer.serialize(minSegments, "number"); + } + + if (mediaSourceId !== undefined) { + localVarQueryParameters['mediaSourceId'] = ObjectSerializer.serialize(mediaSourceId, "string"); + } + + if (deviceId !== undefined) { + localVarQueryParameters['deviceId'] = ObjectSerializer.serialize(deviceId, "string"); + } + + if (audioCodec !== undefined) { + localVarQueryParameters['audioCodec'] = ObjectSerializer.serialize(audioCodec, "string"); + } + + if (enableAutoStreamCopy !== undefined) { + localVarQueryParameters['enableAutoStreamCopy'] = ObjectSerializer.serialize(enableAutoStreamCopy, "boolean"); + } + + if (allowVideoStreamCopy !== undefined) { + localVarQueryParameters['allowVideoStreamCopy'] = ObjectSerializer.serialize(allowVideoStreamCopy, "boolean"); + } + + if (allowAudioStreamCopy !== undefined) { + localVarQueryParameters['allowAudioStreamCopy'] = ObjectSerializer.serialize(allowAudioStreamCopy, "boolean"); + } + + if (breakOnNonKeyFrames !== undefined) { + localVarQueryParameters['breakOnNonKeyFrames'] = ObjectSerializer.serialize(breakOnNonKeyFrames, "boolean"); + } + + if (audioSampleRate !== undefined) { + localVarQueryParameters['audioSampleRate'] = ObjectSerializer.serialize(audioSampleRate, "number"); + } + + if (maxAudioBitDepth !== undefined) { + localVarQueryParameters['maxAudioBitDepth'] = ObjectSerializer.serialize(maxAudioBitDepth, "number"); + } + + if (maxStreamingBitrate !== undefined) { + localVarQueryParameters['maxStreamingBitrate'] = ObjectSerializer.serialize(maxStreamingBitrate, "number"); + } + + if (audioBitRate !== undefined) { + localVarQueryParameters['audioBitRate'] = ObjectSerializer.serialize(audioBitRate, "number"); + } + + if (audioChannels !== undefined) { + localVarQueryParameters['audioChannels'] = ObjectSerializer.serialize(audioChannels, "number"); + } + + if (maxAudioChannels !== undefined) { + localVarQueryParameters['maxAudioChannels'] = ObjectSerializer.serialize(maxAudioChannels, "number"); + } + + if (profile !== undefined) { + localVarQueryParameters['profile'] = ObjectSerializer.serialize(profile, "string"); + } + + if (level !== undefined) { + localVarQueryParameters['level'] = ObjectSerializer.serialize(level, "string"); + } + + if (framerate !== undefined) { + localVarQueryParameters['framerate'] = ObjectSerializer.serialize(framerate, "number"); + } + + if (maxFramerate !== undefined) { + localVarQueryParameters['maxFramerate'] = ObjectSerializer.serialize(maxFramerate, "number"); + } + + if (copyTimestamps !== undefined) { + localVarQueryParameters['copyTimestamps'] = ObjectSerializer.serialize(copyTimestamps, "boolean"); + } + + if (startTimeTicks !== undefined) { + localVarQueryParameters['startTimeTicks'] = ObjectSerializer.serialize(startTimeTicks, "number"); + } + + if (width !== undefined) { + localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number"); + } + + if (height !== undefined) { + localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number"); + } + + if (videoBitRate !== undefined) { + localVarQueryParameters['videoBitRate'] = ObjectSerializer.serialize(videoBitRate, "number"); + } + + if (subtitleStreamIndex !== undefined) { + localVarQueryParameters['subtitleStreamIndex'] = ObjectSerializer.serialize(subtitleStreamIndex, "number"); + } + + if (subtitleMethod !== undefined) { + localVarQueryParameters['subtitleMethod'] = ObjectSerializer.serialize(subtitleMethod, "SubtitleDeliveryMethod"); + } + + if (maxRefFrames !== undefined) { + localVarQueryParameters['maxRefFrames'] = ObjectSerializer.serialize(maxRefFrames, "number"); + } + + if (maxVideoBitDepth !== undefined) { + localVarQueryParameters['maxVideoBitDepth'] = ObjectSerializer.serialize(maxVideoBitDepth, "number"); + } + + if (requireAvc !== undefined) { + localVarQueryParameters['requireAvc'] = ObjectSerializer.serialize(requireAvc, "boolean"); + } + + if (deInterlace !== undefined) { + localVarQueryParameters['deInterlace'] = ObjectSerializer.serialize(deInterlace, "boolean"); + } + + if (requireNonAnamorphic !== undefined) { + localVarQueryParameters['requireNonAnamorphic'] = ObjectSerializer.serialize(requireNonAnamorphic, "boolean"); + } + + if (transcodingMaxAudioChannels !== undefined) { + localVarQueryParameters['transcodingMaxAudioChannels'] = ObjectSerializer.serialize(transcodingMaxAudioChannels, "number"); + } + + if (cpuCoreLimit !== undefined) { + localVarQueryParameters['cpuCoreLimit'] = ObjectSerializer.serialize(cpuCoreLimit, "number"); + } + + if (liveStreamId !== undefined) { + localVarQueryParameters['liveStreamId'] = ObjectSerializer.serialize(liveStreamId, "string"); + } + + if (enableMpegtsM2TsMode !== undefined) { + localVarQueryParameters['enableMpegtsM2TsMode'] = ObjectSerializer.serialize(enableMpegtsM2TsMode, "boolean"); + } + + if (videoCodec !== undefined) { + localVarQueryParameters['videoCodec'] = ObjectSerializer.serialize(videoCodec, "string"); + } + + if (subtitleCodec !== undefined) { + localVarQueryParameters['subtitleCodec'] = ObjectSerializer.serialize(subtitleCodec, "string"); + } + + if (transcodeReasons !== undefined) { + localVarQueryParameters['transcodeReasons'] = ObjectSerializer.serialize(transcodeReasons, "string"); + } + + if (audioStreamIndex !== undefined) { + localVarQueryParameters['audioStreamIndex'] = ObjectSerializer.serialize(audioStreamIndex, "number"); + } + + if (videoStreamIndex !== undefined) { + localVarQueryParameters['videoStreamIndex'] = ObjectSerializer.serialize(videoStreamIndex, "number"); + } + + if (context !== undefined) { + localVarQueryParameters['context'] = ObjectSerializer.serialize(context, "EncodingContext"); + } + + if (streamOptions !== undefined) { + localVarQueryParameters['streamOptions'] = ObjectSerializer.serialize(streamOptions, "{ [key: string]: string; }"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets a video stream using HTTP live streaming. + * @param itemId The item id. + * @param _static Optional. If true, the original file will be streamed statically without any encoding. Use either no url extension or the original file extension. true/false. + * @param params The streaming parameters. + * @param tag The tag. + * @param deviceProfileId Optional. The dlna device profile id to utilize. + * @param playSessionId The play session id. + * @param segmentContainer The segment container. + * @param segmentLength The segment length. + * @param minSegments The minimum number of segments. + * @param mediaSourceId The media version id, if playing an alternate version. + * @param deviceId The device id of the client requesting. Used to stop encoding processes when needed. + * @param audioCodec Optional. Specify a audio codec to encode to, e.g. mp3. If omitted the server will auto-select using the url\'s extension. Options: aac, mp3, vorbis, wma. + * @param enableAutoStreamCopy Whether or not to allow automatic stream copy if requested values match the original source. Defaults to true. + * @param allowVideoStreamCopy Whether or not to allow copying of the video stream url. + * @param allowAudioStreamCopy Whether or not to allow copying of the audio stream url. + * @param breakOnNonKeyFrames Optional. Whether to break on non key frames. + * @param audioSampleRate Optional. Specify a specific audio sample rate, e.g. 44100. + * @param maxAudioBitDepth Optional. The maximum audio bit depth. + * @param audioBitRate Optional. Specify an audio bitrate to encode to, e.g. 128000. If omitted this will be left to encoder defaults. + * @param audioChannels Optional. Specify a specific number of audio channels to encode to, e.g. 2. + * @param maxAudioChannels Optional. Specify a maximum number of audio channels to encode to, e.g. 2. + * @param profile Optional. Specify a specific an encoder profile (varies by encoder), e.g. main, baseline, high. + * @param level Optional. Specify a level for the encoder profile (varies by encoder), e.g. 3, 3.1. + * @param framerate Optional. A specific video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. + * @param maxFramerate Optional. A specific maximum video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. + * @param copyTimestamps Whether or not to copy timestamps when transcoding with an offset. Defaults to false. + * @param startTimeTicks Optional. Specify a starting offset, in ticks. 1 tick = 10000 ms. + * @param width Optional. The fixed horizontal resolution of the encoded video. + * @param height Optional. The fixed vertical resolution of the encoded video. + * @param maxWidth Optional. The maximum horizontal resolution of the encoded video. + * @param maxHeight Optional. The maximum vertical resolution of the encoded video. + * @param videoBitRate Optional. Specify a video bitrate to encode to, e.g. 500000. If omitted this will be left to encoder defaults. + * @param subtitleStreamIndex Optional. The index of the subtitle stream to use. If omitted no subtitles will be used. + * @param subtitleMethod Optional. Specify the subtitle delivery method. + * @param maxRefFrames Optional. + * @param maxVideoBitDepth Optional. The maximum video bit depth. + * @param requireAvc Optional. Whether to require avc. + * @param deInterlace Optional. Whether to deinterlace the video. + * @param requireNonAnamorphic Optional. Whether to require a non anamorphic stream. + * @param transcodingMaxAudioChannels Optional. The maximum number of audio channels to transcode. + * @param cpuCoreLimit Optional. The limit of how many cpu cores to use. + * @param liveStreamId The live stream id. + * @param enableMpegtsM2TsMode Optional. Whether to enable the MpegtsM2Ts mode. + * @param videoCodec Optional. Specify a video codec to encode to, e.g. h264. If omitted the server will auto-select using the url\'s extension. Options: h265, h264, mpeg4, theora, vp8, vp9, vpx (deprecated), wmv. + * @param subtitleCodec Optional. Specify a subtitle codec to encode to. + * @param transcodeReasons Optional. The transcoding reason. + * @param audioStreamIndex Optional. The index of the audio stream to use. If omitted the first audio stream will be used. + * @param videoStreamIndex Optional. The index of the video stream to use. If omitted the first video stream will be used. + * @param context Optional. The MediaBrowser.Model.Dlna.EncodingContext. + * @param streamOptions Optional. The streaming options. + */ + public async getVariantHlsVideoPlaylist (itemId: string, _static?: boolean, params?: string, tag?: string, deviceProfileId?: string, playSessionId?: string, segmentContainer?: string, segmentLength?: number, minSegments?: number, mediaSourceId?: string, deviceId?: string, audioCodec?: string, enableAutoStreamCopy?: boolean, allowVideoStreamCopy?: boolean, allowAudioStreamCopy?: boolean, breakOnNonKeyFrames?: boolean, audioSampleRate?: number, maxAudioBitDepth?: number, audioBitRate?: number, audioChannels?: number, maxAudioChannels?: number, profile?: string, level?: string, framerate?: number, maxFramerate?: number, copyTimestamps?: boolean, startTimeTicks?: number, width?: number, height?: number, maxWidth?: number, maxHeight?: number, videoBitRate?: number, subtitleStreamIndex?: number, subtitleMethod?: SubtitleDeliveryMethod, maxRefFrames?: number, maxVideoBitDepth?: number, requireAvc?: boolean, deInterlace?: boolean, requireNonAnamorphic?: boolean, transcodingMaxAudioChannels?: number, cpuCoreLimit?: number, liveStreamId?: string, enableMpegtsM2TsMode?: boolean, videoCodec?: string, subtitleCodec?: string, transcodeReasons?: string, audioStreamIndex?: number, videoStreamIndex?: number, context?: EncodingContext, streamOptions?: { [key: string]: string; }, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/Videos/{itemId}/main.m3u8' + .replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/x-mpegURL']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'itemId' is not null or undefined + if (itemId === null || itemId === undefined) { + throw new Error('Required parameter itemId was null or undefined when calling getVariantHlsVideoPlaylist.'); + } + + if (_static !== undefined) { + localVarQueryParameters['static'] = ObjectSerializer.serialize(_static, "boolean"); + } + + if (params !== undefined) { + localVarQueryParameters['params'] = ObjectSerializer.serialize(params, "string"); + } + + if (tag !== undefined) { + localVarQueryParameters['tag'] = ObjectSerializer.serialize(tag, "string"); + } + + if (deviceProfileId !== undefined) { + localVarQueryParameters['deviceProfileId'] = ObjectSerializer.serialize(deviceProfileId, "string"); + } + + if (playSessionId !== undefined) { + localVarQueryParameters['playSessionId'] = ObjectSerializer.serialize(playSessionId, "string"); + } + + if (segmentContainer !== undefined) { + localVarQueryParameters['segmentContainer'] = ObjectSerializer.serialize(segmentContainer, "string"); + } + + if (segmentLength !== undefined) { + localVarQueryParameters['segmentLength'] = ObjectSerializer.serialize(segmentLength, "number"); + } + + if (minSegments !== undefined) { + localVarQueryParameters['minSegments'] = ObjectSerializer.serialize(minSegments, "number"); + } + + if (mediaSourceId !== undefined) { + localVarQueryParameters['mediaSourceId'] = ObjectSerializer.serialize(mediaSourceId, "string"); + } + + if (deviceId !== undefined) { + localVarQueryParameters['deviceId'] = ObjectSerializer.serialize(deviceId, "string"); + } + + if (audioCodec !== undefined) { + localVarQueryParameters['audioCodec'] = ObjectSerializer.serialize(audioCodec, "string"); + } + + if (enableAutoStreamCopy !== undefined) { + localVarQueryParameters['enableAutoStreamCopy'] = ObjectSerializer.serialize(enableAutoStreamCopy, "boolean"); + } + + if (allowVideoStreamCopy !== undefined) { + localVarQueryParameters['allowVideoStreamCopy'] = ObjectSerializer.serialize(allowVideoStreamCopy, "boolean"); + } + + if (allowAudioStreamCopy !== undefined) { + localVarQueryParameters['allowAudioStreamCopy'] = ObjectSerializer.serialize(allowAudioStreamCopy, "boolean"); + } + + if (breakOnNonKeyFrames !== undefined) { + localVarQueryParameters['breakOnNonKeyFrames'] = ObjectSerializer.serialize(breakOnNonKeyFrames, "boolean"); + } + + if (audioSampleRate !== undefined) { + localVarQueryParameters['audioSampleRate'] = ObjectSerializer.serialize(audioSampleRate, "number"); + } + + if (maxAudioBitDepth !== undefined) { + localVarQueryParameters['maxAudioBitDepth'] = ObjectSerializer.serialize(maxAudioBitDepth, "number"); + } + + if (audioBitRate !== undefined) { + localVarQueryParameters['audioBitRate'] = ObjectSerializer.serialize(audioBitRate, "number"); + } + + if (audioChannels !== undefined) { + localVarQueryParameters['audioChannels'] = ObjectSerializer.serialize(audioChannels, "number"); + } + + if (maxAudioChannels !== undefined) { + localVarQueryParameters['maxAudioChannels'] = ObjectSerializer.serialize(maxAudioChannels, "number"); + } + + if (profile !== undefined) { + localVarQueryParameters['profile'] = ObjectSerializer.serialize(profile, "string"); + } + + if (level !== undefined) { + localVarQueryParameters['level'] = ObjectSerializer.serialize(level, "string"); + } + + if (framerate !== undefined) { + localVarQueryParameters['framerate'] = ObjectSerializer.serialize(framerate, "number"); + } + + if (maxFramerate !== undefined) { + localVarQueryParameters['maxFramerate'] = ObjectSerializer.serialize(maxFramerate, "number"); + } + + if (copyTimestamps !== undefined) { + localVarQueryParameters['copyTimestamps'] = ObjectSerializer.serialize(copyTimestamps, "boolean"); + } + + if (startTimeTicks !== undefined) { + localVarQueryParameters['startTimeTicks'] = ObjectSerializer.serialize(startTimeTicks, "number"); + } + + if (width !== undefined) { + localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number"); + } + + if (height !== undefined) { + localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number"); + } + + if (maxWidth !== undefined) { + localVarQueryParameters['maxWidth'] = ObjectSerializer.serialize(maxWidth, "number"); + } + + if (maxHeight !== undefined) { + localVarQueryParameters['maxHeight'] = ObjectSerializer.serialize(maxHeight, "number"); + } + + if (videoBitRate !== undefined) { + localVarQueryParameters['videoBitRate'] = ObjectSerializer.serialize(videoBitRate, "number"); + } + + if (subtitleStreamIndex !== undefined) { + localVarQueryParameters['subtitleStreamIndex'] = ObjectSerializer.serialize(subtitleStreamIndex, "number"); + } + + if (subtitleMethod !== undefined) { + localVarQueryParameters['subtitleMethod'] = ObjectSerializer.serialize(subtitleMethod, "SubtitleDeliveryMethod"); + } + + if (maxRefFrames !== undefined) { + localVarQueryParameters['maxRefFrames'] = ObjectSerializer.serialize(maxRefFrames, "number"); + } + + if (maxVideoBitDepth !== undefined) { + localVarQueryParameters['maxVideoBitDepth'] = ObjectSerializer.serialize(maxVideoBitDepth, "number"); + } + + if (requireAvc !== undefined) { + localVarQueryParameters['requireAvc'] = ObjectSerializer.serialize(requireAvc, "boolean"); + } + + if (deInterlace !== undefined) { + localVarQueryParameters['deInterlace'] = ObjectSerializer.serialize(deInterlace, "boolean"); + } + + if (requireNonAnamorphic !== undefined) { + localVarQueryParameters['requireNonAnamorphic'] = ObjectSerializer.serialize(requireNonAnamorphic, "boolean"); + } + + if (transcodingMaxAudioChannels !== undefined) { + localVarQueryParameters['transcodingMaxAudioChannels'] = ObjectSerializer.serialize(transcodingMaxAudioChannels, "number"); + } + + if (cpuCoreLimit !== undefined) { + localVarQueryParameters['cpuCoreLimit'] = ObjectSerializer.serialize(cpuCoreLimit, "number"); + } + + if (liveStreamId !== undefined) { + localVarQueryParameters['liveStreamId'] = ObjectSerializer.serialize(liveStreamId, "string"); + } + + if (enableMpegtsM2TsMode !== undefined) { + localVarQueryParameters['enableMpegtsM2TsMode'] = ObjectSerializer.serialize(enableMpegtsM2TsMode, "boolean"); + } + + if (videoCodec !== undefined) { + localVarQueryParameters['videoCodec'] = ObjectSerializer.serialize(videoCodec, "string"); + } + + if (subtitleCodec !== undefined) { + localVarQueryParameters['subtitleCodec'] = ObjectSerializer.serialize(subtitleCodec, "string"); + } + + if (transcodeReasons !== undefined) { + localVarQueryParameters['transcodeReasons'] = ObjectSerializer.serialize(transcodeReasons, "string"); + } + + if (audioStreamIndex !== undefined) { + localVarQueryParameters['audioStreamIndex'] = ObjectSerializer.serialize(audioStreamIndex, "number"); + } + + if (videoStreamIndex !== undefined) { + localVarQueryParameters['videoStreamIndex'] = ObjectSerializer.serialize(videoStreamIndex, "number"); + } + + if (context !== undefined) { + localVarQueryParameters['context'] = ObjectSerializer.serialize(context, "EncodingContext"); + } + + if (streamOptions !== undefined) { + localVarQueryParameters['streamOptions'] = ObjectSerializer.serialize(streamOptions, "{ [key: string]: string; }"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets an audio hls playlist stream. + * @param itemId The item id. + * @param mediaSourceId The media version id, if playing an alternate version. + * @param _static Optional. If true, the original file will be streamed statically without any encoding. Use either no url extension or the original file extension. true/false. + * @param params The streaming parameters. + * @param tag The tag. + * @param deviceProfileId Optional. The dlna device profile id to utilize. + * @param playSessionId The play session id. + * @param segmentContainer The segment container. + * @param segmentLength The segment length. + * @param minSegments The minimum number of segments. + * @param deviceId The device id of the client requesting. Used to stop encoding processes when needed. + * @param audioCodec Optional. Specify a audio codec to encode to, e.g. mp3. If omitted the server will auto-select using the url\'s extension. Options: aac, mp3, vorbis, wma. + * @param enableAutoStreamCopy Whether or not to allow automatic stream copy if requested values match the original source. Defaults to true. + * @param allowVideoStreamCopy Whether or not to allow copying of the video stream url. + * @param allowAudioStreamCopy Whether or not to allow copying of the audio stream url. + * @param breakOnNonKeyFrames Optional. Whether to break on non key frames. + * @param audioSampleRate Optional. Specify a specific audio sample rate, e.g. 44100. + * @param maxAudioBitDepth Optional. The maximum audio bit depth. + * @param maxStreamingBitrate Optional. The maximum streaming bitrate. + * @param audioBitRate Optional. Specify an audio bitrate to encode to, e.g. 128000. If omitted this will be left to encoder defaults. + * @param audioChannels Optional. Specify a specific number of audio channels to encode to, e.g. 2. + * @param maxAudioChannels Optional. Specify a maximum number of audio channels to encode to, e.g. 2. + * @param profile Optional. Specify a specific an encoder profile (varies by encoder), e.g. main, baseline, high. + * @param level Optional. Specify a level for the encoder profile (varies by encoder), e.g. 3, 3.1. + * @param framerate Optional. A specific video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. + * @param maxFramerate Optional. A specific maximum video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. + * @param copyTimestamps Whether or not to copy timestamps when transcoding with an offset. Defaults to false. + * @param startTimeTicks Optional. Specify a starting offset, in ticks. 1 tick = 10000 ms. + * @param width Optional. The fixed horizontal resolution of the encoded video. + * @param height Optional. The fixed vertical resolution of the encoded video. + * @param videoBitRate Optional. Specify a video bitrate to encode to, e.g. 500000. If omitted this will be left to encoder defaults. + * @param subtitleStreamIndex Optional. The index of the subtitle stream to use. If omitted no subtitles will be used. + * @param subtitleMethod Optional. Specify the subtitle delivery method. + * @param maxRefFrames Optional. + * @param maxVideoBitDepth Optional. The maximum video bit depth. + * @param requireAvc Optional. Whether to require avc. + * @param deInterlace Optional. Whether to deinterlace the video. + * @param requireNonAnamorphic Optional. Whether to require a non anamorphic stream. + * @param transcodingMaxAudioChannels Optional. The maximum number of audio channels to transcode. + * @param cpuCoreLimit Optional. The limit of how many cpu cores to use. + * @param liveStreamId The live stream id. + * @param enableMpegtsM2TsMode Optional. Whether to enable the MpegtsM2Ts mode. + * @param videoCodec Optional. Specify a video codec to encode to, e.g. h264. If omitted the server will auto-select using the url\'s extension. Options: h265, h264, mpeg4, theora, vp8, vp9, vpx (deprecated), wmv. + * @param subtitleCodec Optional. Specify a subtitle codec to encode to. + * @param transcodeReasons Optional. The transcoding reason. + * @param audioStreamIndex Optional. The index of the audio stream to use. If omitted the first audio stream will be used. + * @param videoStreamIndex Optional. The index of the video stream to use. If omitted the first video stream will be used. + * @param context Optional. The MediaBrowser.Model.Dlna.EncodingContext. + * @param streamOptions Optional. The streaming options. + * @param enableAdaptiveBitrateStreaming Enable adaptive bitrate streaming. + */ + public async headMasterHlsAudioPlaylist (itemId: string, mediaSourceId: string, _static?: boolean, params?: string, tag?: string, deviceProfileId?: string, playSessionId?: string, segmentContainer?: string, segmentLength?: number, minSegments?: number, deviceId?: string, audioCodec?: string, enableAutoStreamCopy?: boolean, allowVideoStreamCopy?: boolean, allowAudioStreamCopy?: boolean, breakOnNonKeyFrames?: boolean, audioSampleRate?: number, maxAudioBitDepth?: number, maxStreamingBitrate?: number, audioBitRate?: number, audioChannels?: number, maxAudioChannels?: number, profile?: string, level?: string, framerate?: number, maxFramerate?: number, copyTimestamps?: boolean, startTimeTicks?: number, width?: number, height?: number, videoBitRate?: number, subtitleStreamIndex?: number, subtitleMethod?: SubtitleDeliveryMethod, maxRefFrames?: number, maxVideoBitDepth?: number, requireAvc?: boolean, deInterlace?: boolean, requireNonAnamorphic?: boolean, transcodingMaxAudioChannels?: number, cpuCoreLimit?: number, liveStreamId?: string, enableMpegtsM2TsMode?: boolean, videoCodec?: string, subtitleCodec?: string, transcodeReasons?: string, audioStreamIndex?: number, videoStreamIndex?: number, context?: EncodingContext, streamOptions?: { [key: string]: string; }, enableAdaptiveBitrateStreaming?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/Audio/{itemId}/master.m3u8' + .replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/x-mpegURL']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'itemId' is not null or undefined + if (itemId === null || itemId === undefined) { + throw new Error('Required parameter itemId was null or undefined when calling headMasterHlsAudioPlaylist.'); + } + + // verify required parameter 'mediaSourceId' is not null or undefined + if (mediaSourceId === null || mediaSourceId === undefined) { + throw new Error('Required parameter mediaSourceId was null or undefined when calling headMasterHlsAudioPlaylist.'); + } + + if (_static !== undefined) { + localVarQueryParameters['static'] = ObjectSerializer.serialize(_static, "boolean"); + } + + if (params !== undefined) { + localVarQueryParameters['params'] = ObjectSerializer.serialize(params, "string"); + } + + if (tag !== undefined) { + localVarQueryParameters['tag'] = ObjectSerializer.serialize(tag, "string"); + } + + if (deviceProfileId !== undefined) { + localVarQueryParameters['deviceProfileId'] = ObjectSerializer.serialize(deviceProfileId, "string"); + } + + if (playSessionId !== undefined) { + localVarQueryParameters['playSessionId'] = ObjectSerializer.serialize(playSessionId, "string"); + } + + if (segmentContainer !== undefined) { + localVarQueryParameters['segmentContainer'] = ObjectSerializer.serialize(segmentContainer, "string"); + } + + if (segmentLength !== undefined) { + localVarQueryParameters['segmentLength'] = ObjectSerializer.serialize(segmentLength, "number"); + } + + if (minSegments !== undefined) { + localVarQueryParameters['minSegments'] = ObjectSerializer.serialize(minSegments, "number"); + } + + if (mediaSourceId !== undefined) { + localVarQueryParameters['mediaSourceId'] = ObjectSerializer.serialize(mediaSourceId, "string"); + } + + if (deviceId !== undefined) { + localVarQueryParameters['deviceId'] = ObjectSerializer.serialize(deviceId, "string"); + } + + if (audioCodec !== undefined) { + localVarQueryParameters['audioCodec'] = ObjectSerializer.serialize(audioCodec, "string"); + } + + if (enableAutoStreamCopy !== undefined) { + localVarQueryParameters['enableAutoStreamCopy'] = ObjectSerializer.serialize(enableAutoStreamCopy, "boolean"); + } + + if (allowVideoStreamCopy !== undefined) { + localVarQueryParameters['allowVideoStreamCopy'] = ObjectSerializer.serialize(allowVideoStreamCopy, "boolean"); + } + + if (allowAudioStreamCopy !== undefined) { + localVarQueryParameters['allowAudioStreamCopy'] = ObjectSerializer.serialize(allowAudioStreamCopy, "boolean"); + } + + if (breakOnNonKeyFrames !== undefined) { + localVarQueryParameters['breakOnNonKeyFrames'] = ObjectSerializer.serialize(breakOnNonKeyFrames, "boolean"); + } + + if (audioSampleRate !== undefined) { + localVarQueryParameters['audioSampleRate'] = ObjectSerializer.serialize(audioSampleRate, "number"); + } + + if (maxAudioBitDepth !== undefined) { + localVarQueryParameters['maxAudioBitDepth'] = ObjectSerializer.serialize(maxAudioBitDepth, "number"); + } + + if (maxStreamingBitrate !== undefined) { + localVarQueryParameters['maxStreamingBitrate'] = ObjectSerializer.serialize(maxStreamingBitrate, "number"); + } + + if (audioBitRate !== undefined) { + localVarQueryParameters['audioBitRate'] = ObjectSerializer.serialize(audioBitRate, "number"); + } + + if (audioChannels !== undefined) { + localVarQueryParameters['audioChannels'] = ObjectSerializer.serialize(audioChannels, "number"); + } + + if (maxAudioChannels !== undefined) { + localVarQueryParameters['maxAudioChannels'] = ObjectSerializer.serialize(maxAudioChannels, "number"); + } + + if (profile !== undefined) { + localVarQueryParameters['profile'] = ObjectSerializer.serialize(profile, "string"); + } + + if (level !== undefined) { + localVarQueryParameters['level'] = ObjectSerializer.serialize(level, "string"); + } + + if (framerate !== undefined) { + localVarQueryParameters['framerate'] = ObjectSerializer.serialize(framerate, "number"); + } + + if (maxFramerate !== undefined) { + localVarQueryParameters['maxFramerate'] = ObjectSerializer.serialize(maxFramerate, "number"); + } + + if (copyTimestamps !== undefined) { + localVarQueryParameters['copyTimestamps'] = ObjectSerializer.serialize(copyTimestamps, "boolean"); + } + + if (startTimeTicks !== undefined) { + localVarQueryParameters['startTimeTicks'] = ObjectSerializer.serialize(startTimeTicks, "number"); + } + + if (width !== undefined) { + localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number"); + } + + if (height !== undefined) { + localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number"); + } + + if (videoBitRate !== undefined) { + localVarQueryParameters['videoBitRate'] = ObjectSerializer.serialize(videoBitRate, "number"); + } + + if (subtitleStreamIndex !== undefined) { + localVarQueryParameters['subtitleStreamIndex'] = ObjectSerializer.serialize(subtitleStreamIndex, "number"); + } + + if (subtitleMethod !== undefined) { + localVarQueryParameters['subtitleMethod'] = ObjectSerializer.serialize(subtitleMethod, "SubtitleDeliveryMethod"); + } + + if (maxRefFrames !== undefined) { + localVarQueryParameters['maxRefFrames'] = ObjectSerializer.serialize(maxRefFrames, "number"); + } + + if (maxVideoBitDepth !== undefined) { + localVarQueryParameters['maxVideoBitDepth'] = ObjectSerializer.serialize(maxVideoBitDepth, "number"); + } + + if (requireAvc !== undefined) { + localVarQueryParameters['requireAvc'] = ObjectSerializer.serialize(requireAvc, "boolean"); + } + + if (deInterlace !== undefined) { + localVarQueryParameters['deInterlace'] = ObjectSerializer.serialize(deInterlace, "boolean"); + } + + if (requireNonAnamorphic !== undefined) { + localVarQueryParameters['requireNonAnamorphic'] = ObjectSerializer.serialize(requireNonAnamorphic, "boolean"); + } + + if (transcodingMaxAudioChannels !== undefined) { + localVarQueryParameters['transcodingMaxAudioChannels'] = ObjectSerializer.serialize(transcodingMaxAudioChannels, "number"); + } + + if (cpuCoreLimit !== undefined) { + localVarQueryParameters['cpuCoreLimit'] = ObjectSerializer.serialize(cpuCoreLimit, "number"); + } + + if (liveStreamId !== undefined) { + localVarQueryParameters['liveStreamId'] = ObjectSerializer.serialize(liveStreamId, "string"); + } + + if (enableMpegtsM2TsMode !== undefined) { + localVarQueryParameters['enableMpegtsM2TsMode'] = ObjectSerializer.serialize(enableMpegtsM2TsMode, "boolean"); + } + + if (videoCodec !== undefined) { + localVarQueryParameters['videoCodec'] = ObjectSerializer.serialize(videoCodec, "string"); + } + + if (subtitleCodec !== undefined) { + localVarQueryParameters['subtitleCodec'] = ObjectSerializer.serialize(subtitleCodec, "string"); + } + + if (transcodeReasons !== undefined) { + localVarQueryParameters['transcodeReasons'] = ObjectSerializer.serialize(transcodeReasons, "string"); + } + + if (audioStreamIndex !== undefined) { + localVarQueryParameters['audioStreamIndex'] = ObjectSerializer.serialize(audioStreamIndex, "number"); + } + + if (videoStreamIndex !== undefined) { + localVarQueryParameters['videoStreamIndex'] = ObjectSerializer.serialize(videoStreamIndex, "number"); + } + + if (context !== undefined) { + localVarQueryParameters['context'] = ObjectSerializer.serialize(context, "EncodingContext"); + } + + if (streamOptions !== undefined) { + localVarQueryParameters['streamOptions'] = ObjectSerializer.serialize(streamOptions, "{ [key: string]: string; }"); + } + + if (enableAdaptiveBitrateStreaming !== undefined) { + localVarQueryParameters['enableAdaptiveBitrateStreaming'] = ObjectSerializer.serialize(enableAdaptiveBitrateStreaming, "boolean"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'HEAD', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets a video hls playlist stream. + * @param itemId The item id. + * @param mediaSourceId The media version id, if playing an alternate version. + * @param _static Optional. If true, the original file will be streamed statically without any encoding. Use either no url extension or the original file extension. true/false. + * @param params The streaming parameters. + * @param tag The tag. + * @param deviceProfileId Optional. The dlna device profile id to utilize. + * @param playSessionId The play session id. + * @param segmentContainer The segment container. + * @param segmentLength The segment length. + * @param minSegments The minimum number of segments. + * @param deviceId The device id of the client requesting. Used to stop encoding processes when needed. + * @param audioCodec Optional. Specify a audio codec to encode to, e.g. mp3. If omitted the server will auto-select using the url\'s extension. Options: aac, mp3, vorbis, wma. + * @param enableAutoStreamCopy Whether or not to allow automatic stream copy if requested values match the original source. Defaults to true. + * @param allowVideoStreamCopy Whether or not to allow copying of the video stream url. + * @param allowAudioStreamCopy Whether or not to allow copying of the audio stream url. + * @param breakOnNonKeyFrames Optional. Whether to break on non key frames. + * @param audioSampleRate Optional. Specify a specific audio sample rate, e.g. 44100. + * @param maxAudioBitDepth Optional. The maximum audio bit depth. + * @param audioBitRate Optional. Specify an audio bitrate to encode to, e.g. 128000. If omitted this will be left to encoder defaults. + * @param audioChannels Optional. Specify a specific number of audio channels to encode to, e.g. 2. + * @param maxAudioChannels Optional. Specify a maximum number of audio channels to encode to, e.g. 2. + * @param profile Optional. Specify a specific an encoder profile (varies by encoder), e.g. main, baseline, high. + * @param level Optional. Specify a level for the encoder profile (varies by encoder), e.g. 3, 3.1. + * @param framerate Optional. A specific video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. + * @param maxFramerate Optional. A specific maximum video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. + * @param copyTimestamps Whether or not to copy timestamps when transcoding with an offset. Defaults to false. + * @param startTimeTicks Optional. Specify a starting offset, in ticks. 1 tick = 10000 ms. + * @param width Optional. The fixed horizontal resolution of the encoded video. + * @param height Optional. The fixed vertical resolution of the encoded video. + * @param maxWidth Optional. The maximum horizontal resolution of the encoded video. + * @param maxHeight Optional. The maximum vertical resolution of the encoded video. + * @param videoBitRate Optional. Specify a video bitrate to encode to, e.g. 500000. If omitted this will be left to encoder defaults. + * @param subtitleStreamIndex Optional. The index of the subtitle stream to use. If omitted no subtitles will be used. + * @param subtitleMethod Optional. Specify the subtitle delivery method. + * @param maxRefFrames Optional. + * @param maxVideoBitDepth Optional. The maximum video bit depth. + * @param requireAvc Optional. Whether to require avc. + * @param deInterlace Optional. Whether to deinterlace the video. + * @param requireNonAnamorphic Optional. Whether to require a non anamorphic stream. + * @param transcodingMaxAudioChannels Optional. The maximum number of audio channels to transcode. + * @param cpuCoreLimit Optional. The limit of how many cpu cores to use. + * @param liveStreamId The live stream id. + * @param enableMpegtsM2TsMode Optional. Whether to enable the MpegtsM2Ts mode. + * @param videoCodec Optional. Specify a video codec to encode to, e.g. h264. If omitted the server will auto-select using the url\'s extension. Options: h265, h264, mpeg4, theora, vp8, vp9, vpx (deprecated), wmv. + * @param subtitleCodec Optional. Specify a subtitle codec to encode to. + * @param transcodeReasons Optional. The transcoding reason. + * @param audioStreamIndex Optional. The index of the audio stream to use. If omitted the first audio stream will be used. + * @param videoStreamIndex Optional. The index of the video stream to use. If omitted the first video stream will be used. + * @param context Optional. The MediaBrowser.Model.Dlna.EncodingContext. + * @param streamOptions Optional. The streaming options. + * @param enableAdaptiveBitrateStreaming Enable adaptive bitrate streaming. + */ + public async headMasterHlsVideoPlaylist (itemId: string, mediaSourceId: string, _static?: boolean, params?: string, tag?: string, deviceProfileId?: string, playSessionId?: string, segmentContainer?: string, segmentLength?: number, minSegments?: number, deviceId?: string, audioCodec?: string, enableAutoStreamCopy?: boolean, allowVideoStreamCopy?: boolean, allowAudioStreamCopy?: boolean, breakOnNonKeyFrames?: boolean, audioSampleRate?: number, maxAudioBitDepth?: number, audioBitRate?: number, audioChannels?: number, maxAudioChannels?: number, profile?: string, level?: string, framerate?: number, maxFramerate?: number, copyTimestamps?: boolean, startTimeTicks?: number, width?: number, height?: number, maxWidth?: number, maxHeight?: number, videoBitRate?: number, subtitleStreamIndex?: number, subtitleMethod?: SubtitleDeliveryMethod, maxRefFrames?: number, maxVideoBitDepth?: number, requireAvc?: boolean, deInterlace?: boolean, requireNonAnamorphic?: boolean, transcodingMaxAudioChannels?: number, cpuCoreLimit?: number, liveStreamId?: string, enableMpegtsM2TsMode?: boolean, videoCodec?: string, subtitleCodec?: string, transcodeReasons?: string, audioStreamIndex?: number, videoStreamIndex?: number, context?: EncodingContext, streamOptions?: { [key: string]: string; }, enableAdaptiveBitrateStreaming?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/Videos/{itemId}/master.m3u8' + .replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/x-mpegURL']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'itemId' is not null or undefined + if (itemId === null || itemId === undefined) { + throw new Error('Required parameter itemId was null or undefined when calling headMasterHlsVideoPlaylist.'); + } + + // verify required parameter 'mediaSourceId' is not null or undefined + if (mediaSourceId === null || mediaSourceId === undefined) { + throw new Error('Required parameter mediaSourceId was null or undefined when calling headMasterHlsVideoPlaylist.'); + } + + if (_static !== undefined) { + localVarQueryParameters['static'] = ObjectSerializer.serialize(_static, "boolean"); + } + + if (params !== undefined) { + localVarQueryParameters['params'] = ObjectSerializer.serialize(params, "string"); + } + + if (tag !== undefined) { + localVarQueryParameters['tag'] = ObjectSerializer.serialize(tag, "string"); + } + + if (deviceProfileId !== undefined) { + localVarQueryParameters['deviceProfileId'] = ObjectSerializer.serialize(deviceProfileId, "string"); + } + + if (playSessionId !== undefined) { + localVarQueryParameters['playSessionId'] = ObjectSerializer.serialize(playSessionId, "string"); + } + + if (segmentContainer !== undefined) { + localVarQueryParameters['segmentContainer'] = ObjectSerializer.serialize(segmentContainer, "string"); + } + + if (segmentLength !== undefined) { + localVarQueryParameters['segmentLength'] = ObjectSerializer.serialize(segmentLength, "number"); + } + + if (minSegments !== undefined) { + localVarQueryParameters['minSegments'] = ObjectSerializer.serialize(minSegments, "number"); + } + + if (mediaSourceId !== undefined) { + localVarQueryParameters['mediaSourceId'] = ObjectSerializer.serialize(mediaSourceId, "string"); + } + + if (deviceId !== undefined) { + localVarQueryParameters['deviceId'] = ObjectSerializer.serialize(deviceId, "string"); + } + + if (audioCodec !== undefined) { + localVarQueryParameters['audioCodec'] = ObjectSerializer.serialize(audioCodec, "string"); + } + + if (enableAutoStreamCopy !== undefined) { + localVarQueryParameters['enableAutoStreamCopy'] = ObjectSerializer.serialize(enableAutoStreamCopy, "boolean"); + } + + if (allowVideoStreamCopy !== undefined) { + localVarQueryParameters['allowVideoStreamCopy'] = ObjectSerializer.serialize(allowVideoStreamCopy, "boolean"); + } + + if (allowAudioStreamCopy !== undefined) { + localVarQueryParameters['allowAudioStreamCopy'] = ObjectSerializer.serialize(allowAudioStreamCopy, "boolean"); + } + + if (breakOnNonKeyFrames !== undefined) { + localVarQueryParameters['breakOnNonKeyFrames'] = ObjectSerializer.serialize(breakOnNonKeyFrames, "boolean"); + } + + if (audioSampleRate !== undefined) { + localVarQueryParameters['audioSampleRate'] = ObjectSerializer.serialize(audioSampleRate, "number"); + } + + if (maxAudioBitDepth !== undefined) { + localVarQueryParameters['maxAudioBitDepth'] = ObjectSerializer.serialize(maxAudioBitDepth, "number"); + } + + if (audioBitRate !== undefined) { + localVarQueryParameters['audioBitRate'] = ObjectSerializer.serialize(audioBitRate, "number"); + } + + if (audioChannels !== undefined) { + localVarQueryParameters['audioChannels'] = ObjectSerializer.serialize(audioChannels, "number"); + } + + if (maxAudioChannels !== undefined) { + localVarQueryParameters['maxAudioChannels'] = ObjectSerializer.serialize(maxAudioChannels, "number"); + } + + if (profile !== undefined) { + localVarQueryParameters['profile'] = ObjectSerializer.serialize(profile, "string"); + } + + if (level !== undefined) { + localVarQueryParameters['level'] = ObjectSerializer.serialize(level, "string"); + } + + if (framerate !== undefined) { + localVarQueryParameters['framerate'] = ObjectSerializer.serialize(framerate, "number"); + } + + if (maxFramerate !== undefined) { + localVarQueryParameters['maxFramerate'] = ObjectSerializer.serialize(maxFramerate, "number"); + } + + if (copyTimestamps !== undefined) { + localVarQueryParameters['copyTimestamps'] = ObjectSerializer.serialize(copyTimestamps, "boolean"); + } + + if (startTimeTicks !== undefined) { + localVarQueryParameters['startTimeTicks'] = ObjectSerializer.serialize(startTimeTicks, "number"); + } + + if (width !== undefined) { + localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number"); + } + + if (height !== undefined) { + localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number"); + } + + if (maxWidth !== undefined) { + localVarQueryParameters['maxWidth'] = ObjectSerializer.serialize(maxWidth, "number"); + } + + if (maxHeight !== undefined) { + localVarQueryParameters['maxHeight'] = ObjectSerializer.serialize(maxHeight, "number"); + } + + if (videoBitRate !== undefined) { + localVarQueryParameters['videoBitRate'] = ObjectSerializer.serialize(videoBitRate, "number"); + } + + if (subtitleStreamIndex !== undefined) { + localVarQueryParameters['subtitleStreamIndex'] = ObjectSerializer.serialize(subtitleStreamIndex, "number"); + } + + if (subtitleMethod !== undefined) { + localVarQueryParameters['subtitleMethod'] = ObjectSerializer.serialize(subtitleMethod, "SubtitleDeliveryMethod"); + } + + if (maxRefFrames !== undefined) { + localVarQueryParameters['maxRefFrames'] = ObjectSerializer.serialize(maxRefFrames, "number"); + } + + if (maxVideoBitDepth !== undefined) { + localVarQueryParameters['maxVideoBitDepth'] = ObjectSerializer.serialize(maxVideoBitDepth, "number"); + } + + if (requireAvc !== undefined) { + localVarQueryParameters['requireAvc'] = ObjectSerializer.serialize(requireAvc, "boolean"); + } + + if (deInterlace !== undefined) { + localVarQueryParameters['deInterlace'] = ObjectSerializer.serialize(deInterlace, "boolean"); + } + + if (requireNonAnamorphic !== undefined) { + localVarQueryParameters['requireNonAnamorphic'] = ObjectSerializer.serialize(requireNonAnamorphic, "boolean"); + } + + if (transcodingMaxAudioChannels !== undefined) { + localVarQueryParameters['transcodingMaxAudioChannels'] = ObjectSerializer.serialize(transcodingMaxAudioChannels, "number"); + } + + if (cpuCoreLimit !== undefined) { + localVarQueryParameters['cpuCoreLimit'] = ObjectSerializer.serialize(cpuCoreLimit, "number"); + } + + if (liveStreamId !== undefined) { + localVarQueryParameters['liveStreamId'] = ObjectSerializer.serialize(liveStreamId, "string"); + } + + if (enableMpegtsM2TsMode !== undefined) { + localVarQueryParameters['enableMpegtsM2TsMode'] = ObjectSerializer.serialize(enableMpegtsM2TsMode, "boolean"); + } + + if (videoCodec !== undefined) { + localVarQueryParameters['videoCodec'] = ObjectSerializer.serialize(videoCodec, "string"); + } + + if (subtitleCodec !== undefined) { + localVarQueryParameters['subtitleCodec'] = ObjectSerializer.serialize(subtitleCodec, "string"); + } + + if (transcodeReasons !== undefined) { + localVarQueryParameters['transcodeReasons'] = ObjectSerializer.serialize(transcodeReasons, "string"); + } + + if (audioStreamIndex !== undefined) { + localVarQueryParameters['audioStreamIndex'] = ObjectSerializer.serialize(audioStreamIndex, "number"); + } + + if (videoStreamIndex !== undefined) { + localVarQueryParameters['videoStreamIndex'] = ObjectSerializer.serialize(videoStreamIndex, "number"); + } + + if (context !== undefined) { + localVarQueryParameters['context'] = ObjectSerializer.serialize(context, "EncodingContext"); + } + + if (streamOptions !== undefined) { + localVarQueryParameters['streamOptions'] = ObjectSerializer.serialize(streamOptions, "{ [key: string]: string; }"); + } + + if (enableAdaptiveBitrateStreaming !== undefined) { + localVarQueryParameters['enableAdaptiveBitrateStreaming'] = ObjectSerializer.serialize(enableAdaptiveBitrateStreaming, "boolean"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'HEAD', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} diff --git a/jellyfin/api/environmentApi.ts b/jellyfin/api/environmentApi.ts new file mode 100644 index 0000000..4e63646 --- /dev/null +++ b/jellyfin/api/environmentApi.ts @@ -0,0 +1,521 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import localVarRequest from 'request'; +import http from 'http'; + +/* tslint:disable:no-unused-locals */ +import { DefaultDirectoryBrowserInfoDto } from '../model/defaultDirectoryBrowserInfoDto'; +import { FileSystemEntryInfo } from '../model/fileSystemEntryInfo'; +import { ProblemDetails } from '../model/problemDetails'; +import { ValidatePathRequest } from '../model/validatePathRequest'; + +import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; +import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; + +import { HttpError, RequestFile } from './apis'; + +let defaultBasePath = 'http://localhost'; + +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== + +export enum EnvironmentApiApiKeys { + CustomAuthentication, +} + +export class EnvironmentApi { + protected _basePath = defaultBasePath; + protected _defaultHeaders : any = {}; + protected _useQuerystring : boolean = false; + + protected authentications = { + 'default': new VoidAuth(), + 'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'), + } + + protected interceptors: Interceptor[] = []; + + constructor(basePath?: string); + constructor(basePathOrUsername: string, password?: string, basePath?: string) { + if (password) { + if (basePath) { + this.basePath = basePath; + } + } else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername + } + } + } + + set useQuerystring(value: boolean) { + this._useQuerystring = value; + } + + set basePath(basePath: string) { + this._basePath = basePath; + } + + set defaultHeaders(defaultHeaders: any) { + this._defaultHeaders = defaultHeaders; + } + + get defaultHeaders() { + return this._defaultHeaders; + } + + get basePath() { + return this._basePath; + } + + public setDefaultAuthentication(auth: Authentication) { + this.authentications.default = auth; + } + + public setApiKey(key: EnvironmentApiApiKeys, value: string) { + (this.authentications as any)[EnvironmentApiApiKeys[key]].apiKey = value; + } + + public addInterceptor(interceptor: Interceptor) { + this.interceptors.push(interceptor); + } + + /** + * + * @summary Get Default directory browser. + */ + public async getDefaultDirectoryBrowser (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: DefaultDirectoryBrowserInfoDto; }> { + const localVarPath = this.basePath + '/Environment/DefaultDirectoryBrowser'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: DefaultDirectoryBrowserInfoDto; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "DefaultDirectoryBrowserInfoDto"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets the contents of a given directory in the file system. + * @param path The path. + * @param includeFiles An optional filter to include or exclude files from the results. true/false. + * @param includeDirectories An optional filter to include or exclude folders from the results. true/false. + */ + public async getDirectoryContents (path: string, includeFiles?: boolean, includeDirectories?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array; }> { + const localVarPath = this.basePath + '/Environment/DirectoryContents'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'path' is not null or undefined + if (path === null || path === undefined) { + throw new Error('Required parameter path was null or undefined when calling getDirectoryContents.'); + } + + if (path !== undefined) { + localVarQueryParameters['path'] = ObjectSerializer.serialize(path, "string"); + } + + if (includeFiles !== undefined) { + localVarQueryParameters['includeFiles'] = ObjectSerializer.serialize(includeFiles, "boolean"); + } + + if (includeDirectories !== undefined) { + localVarQueryParameters['includeDirectories'] = ObjectSerializer.serialize(includeDirectories, "boolean"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Array; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Array"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets available drives from the server\'s file system. + */ + public async getDrives (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array; }> { + const localVarPath = this.basePath + '/Environment/Drives'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Array; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Array"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets network paths. + */ + public async getNetworkShares (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array; }> { + const localVarPath = this.basePath + '/Environment/NetworkShares'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Array; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Array"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets the parent path of a given path. + * @param path The path. + */ + public async getParentPath (path: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: string; }> { + const localVarPath = this.basePath + '/Environment/ParentPath'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'path' is not null or undefined + if (path === null || path === undefined) { + throw new Error('Required parameter path was null or undefined when calling getParentPath.'); + } + + if (path !== undefined) { + localVarQueryParameters['path'] = ObjectSerializer.serialize(path, "string"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: string; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "string"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Validates path. + * @param validatePathRequest Validate request object. + */ + public async validatePath (validatePathRequest: ValidatePathRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Environment/ValidatePath'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'validatePathRequest' is not null or undefined + if (validatePathRequest === null || validatePathRequest === undefined) { + throw new Error('Required parameter validatePathRequest was null or undefined when calling validatePath.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: ObjectSerializer.serialize(validatePathRequest, "ValidatePathRequest") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} diff --git a/jellyfin/api/filterApi.ts b/jellyfin/api/filterApi.ts new file mode 100644 index 0000000..121bb9a --- /dev/null +++ b/jellyfin/api/filterApi.ts @@ -0,0 +1,294 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import localVarRequest from 'request'; +import http from 'http'; + +/* tslint:disable:no-unused-locals */ +import { BaseItemKind } from '../model/baseItemKind'; +import { QueryFilters } from '../model/queryFilters'; +import { QueryFiltersLegacy } from '../model/queryFiltersLegacy'; + +import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; +import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; + +import { HttpError, RequestFile } from './apis'; + +let defaultBasePath = 'http://localhost'; + +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== + +export enum FilterApiApiKeys { + CustomAuthentication, +} + +export class FilterApi { + protected _basePath = defaultBasePath; + protected _defaultHeaders : any = {}; + protected _useQuerystring : boolean = false; + + protected authentications = { + 'default': new VoidAuth(), + 'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'), + } + + protected interceptors: Interceptor[] = []; + + constructor(basePath?: string); + constructor(basePathOrUsername: string, password?: string, basePath?: string) { + if (password) { + if (basePath) { + this.basePath = basePath; + } + } else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername + } + } + } + + set useQuerystring(value: boolean) { + this._useQuerystring = value; + } + + set basePath(basePath: string) { + this._basePath = basePath; + } + + set defaultHeaders(defaultHeaders: any) { + this._defaultHeaders = defaultHeaders; + } + + get defaultHeaders() { + return this._defaultHeaders; + } + + get basePath() { + return this._basePath; + } + + public setDefaultAuthentication(auth: Authentication) { + this.authentications.default = auth; + } + + public setApiKey(key: FilterApiApiKeys, value: string) { + (this.authentications as any)[FilterApiApiKeys[key]].apiKey = value; + } + + public addInterceptor(interceptor: Interceptor) { + this.interceptors.push(interceptor); + } + + /** + * + * @summary Gets query filters. + * @param userId Optional. User id. + * @param parentId Optional. Specify this to localize the search to a specific item or folder. Omit to use the root. + * @param includeItemTypes Optional. If specified, results will be filtered based on item type. This allows multiple, comma delimited. + * @param isAiring Optional. Is item airing. + * @param isMovie Optional. Is item movie. + * @param isSports Optional. Is item sports. + * @param isKids Optional. Is item kids. + * @param isNews Optional. Is item news. + * @param isSeries Optional. Is item series. + * @param recursive Optional. Search recursive. + */ + public async getQueryFilters (userId?: string, parentId?: string, includeItemTypes?: Array, isAiring?: boolean, isMovie?: boolean, isSports?: boolean, isKids?: boolean, isNews?: boolean, isSeries?: boolean, recursive?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: QueryFilters; }> { + const localVarPath = this.basePath + '/Items/Filters2'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + if (userId !== undefined) { + localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string"); + } + + if (parentId !== undefined) { + localVarQueryParameters['parentId'] = ObjectSerializer.serialize(parentId, "string"); + } + + if (includeItemTypes !== undefined) { + localVarQueryParameters['includeItemTypes'] = ObjectSerializer.serialize(includeItemTypes, "Array"); + } + + if (isAiring !== undefined) { + localVarQueryParameters['isAiring'] = ObjectSerializer.serialize(isAiring, "boolean"); + } + + if (isMovie !== undefined) { + localVarQueryParameters['isMovie'] = ObjectSerializer.serialize(isMovie, "boolean"); + } + + if (isSports !== undefined) { + localVarQueryParameters['isSports'] = ObjectSerializer.serialize(isSports, "boolean"); + } + + if (isKids !== undefined) { + localVarQueryParameters['isKids'] = ObjectSerializer.serialize(isKids, "boolean"); + } + + if (isNews !== undefined) { + localVarQueryParameters['isNews'] = ObjectSerializer.serialize(isNews, "boolean"); + } + + if (isSeries !== undefined) { + localVarQueryParameters['isSeries'] = ObjectSerializer.serialize(isSeries, "boolean"); + } + + if (recursive !== undefined) { + localVarQueryParameters['recursive'] = ObjectSerializer.serialize(recursive, "boolean"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: QueryFilters; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "QueryFilters"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets legacy query filters. + * @param userId Optional. User id. + * @param parentId Optional. Parent id. + * @param includeItemTypes Optional. If specified, results will be filtered based on item type. This allows multiple, comma delimited. + * @param mediaTypes Optional. Filter by MediaType. Allows multiple, comma delimited. + */ + public async getQueryFiltersLegacy (userId?: string, parentId?: string, includeItemTypes?: Array, mediaTypes?: Array, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: QueryFiltersLegacy; }> { + const localVarPath = this.basePath + '/Items/Filters'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + if (userId !== undefined) { + localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string"); + } + + if (parentId !== undefined) { + localVarQueryParameters['parentId'] = ObjectSerializer.serialize(parentId, "string"); + } + + if (includeItemTypes !== undefined) { + localVarQueryParameters['includeItemTypes'] = ObjectSerializer.serialize(includeItemTypes, "Array"); + } + + if (mediaTypes !== undefined) { + localVarQueryParameters['mediaTypes'] = ObjectSerializer.serialize(mediaTypes, "Array"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: QueryFiltersLegacy; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "QueryFiltersLegacy"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} diff --git a/jellyfin/api/genresApi.ts b/jellyfin/api/genresApi.ts new file mode 100644 index 0000000..0f5cfb2 --- /dev/null +++ b/jellyfin/api/genresApi.ts @@ -0,0 +1,329 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import localVarRequest from 'request'; +import http from 'http'; + +/* tslint:disable:no-unused-locals */ +import { BaseItemDto } from '../model/baseItemDto'; +import { BaseItemDtoQueryResult } from '../model/baseItemDtoQueryResult'; +import { BaseItemKind } from '../model/baseItemKind'; +import { ImageType } from '../model/imageType'; +import { ItemFields } from '../model/itemFields'; +import { SortOrder } from '../model/sortOrder'; + +import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; +import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; + +import { HttpError, RequestFile } from './apis'; + +let defaultBasePath = 'http://localhost'; + +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== + +export enum GenresApiApiKeys { + CustomAuthentication, +} + +export class GenresApi { + protected _basePath = defaultBasePath; + protected _defaultHeaders : any = {}; + protected _useQuerystring : boolean = false; + + protected authentications = { + 'default': new VoidAuth(), + 'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'), + } + + protected interceptors: Interceptor[] = []; + + constructor(basePath?: string); + constructor(basePathOrUsername: string, password?: string, basePath?: string) { + if (password) { + if (basePath) { + this.basePath = basePath; + } + } else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername + } + } + } + + set useQuerystring(value: boolean) { + this._useQuerystring = value; + } + + set basePath(basePath: string) { + this._basePath = basePath; + } + + set defaultHeaders(defaultHeaders: any) { + this._defaultHeaders = defaultHeaders; + } + + get defaultHeaders() { + return this._defaultHeaders; + } + + get basePath() { + return this._basePath; + } + + public setDefaultAuthentication(auth: Authentication) { + this.authentications.default = auth; + } + + public setApiKey(key: GenresApiApiKeys, value: string) { + (this.authentications as any)[GenresApiApiKeys[key]].apiKey = value; + } + + public addInterceptor(interceptor: Interceptor) { + this.interceptors.push(interceptor); + } + + /** + * + * @summary Gets a genre, by name. + * @param genreName The genre name. + * @param userId The user id. + */ + public async getGenre (genreName: string, userId?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDto; }> { + const localVarPath = this.basePath + '/Genres/{genreName}' + .replace('{' + 'genreName' + '}', encodeURIComponent(String(genreName))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'genreName' is not null or undefined + if (genreName === null || genreName === undefined) { + throw new Error('Required parameter genreName was null or undefined when calling getGenre.'); + } + + if (userId !== undefined) { + localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: BaseItemDto; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "BaseItemDto"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets all genres from a given item, folder, or the entire library. + * @param startIndex Optional. The record index to start at. All items with a lower index will be dropped from the results. + * @param limit Optional. The maximum number of records to return. + * @param searchTerm The search term. + * @param parentId Specify this to localize the search to a specific item or folder. Omit to use the root. + * @param fields Optional. Specify additional fields of information to return in the output. + * @param excludeItemTypes Optional. If specified, results will be filtered out based on item type. This allows multiple, comma delimited. + * @param includeItemTypes Optional. If specified, results will be filtered in based on item type. This allows multiple, comma delimited. + * @param isFavorite Optional filter by items that are marked as favorite, or not. + * @param imageTypeLimit Optional, the max number of images to return, per image type. + * @param enableImageTypes Optional. The image types to include in the output. + * @param userId User id. + * @param nameStartsWithOrGreater Optional filter by items whose name is sorted equally or greater than a given input string. + * @param nameStartsWith Optional filter by items whose name is sorted equally than a given input string. + * @param nameLessThan Optional filter by items whose name is equally or lesser than a given input string. + * @param sortBy Optional. Specify one or more sort orders, comma delimited. + * @param sortOrder Sort Order - Ascending,Descending. + * @param enableImages Optional, include image information in output. + * @param enableTotalRecordCount Optional. Include total record count. + */ + public async getGenres (startIndex?: number, limit?: number, searchTerm?: string, parentId?: string, fields?: Array, excludeItemTypes?: Array, includeItemTypes?: Array, isFavorite?: boolean, imageTypeLimit?: number, enableImageTypes?: Array, userId?: string, nameStartsWithOrGreater?: string, nameStartsWith?: string, nameLessThan?: string, sortBy?: Array, sortOrder?: Array, enableImages?: boolean, enableTotalRecordCount?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }> { + const localVarPath = this.basePath + '/Genres'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + if (startIndex !== undefined) { + localVarQueryParameters['startIndex'] = ObjectSerializer.serialize(startIndex, "number"); + } + + if (limit !== undefined) { + localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); + } + + if (searchTerm !== undefined) { + localVarQueryParameters['searchTerm'] = ObjectSerializer.serialize(searchTerm, "string"); + } + + if (parentId !== undefined) { + localVarQueryParameters['parentId'] = ObjectSerializer.serialize(parentId, "string"); + } + + if (fields !== undefined) { + localVarQueryParameters['fields'] = ObjectSerializer.serialize(fields, "Array"); + } + + if (excludeItemTypes !== undefined) { + localVarQueryParameters['excludeItemTypes'] = ObjectSerializer.serialize(excludeItemTypes, "Array"); + } + + if (includeItemTypes !== undefined) { + localVarQueryParameters['includeItemTypes'] = ObjectSerializer.serialize(includeItemTypes, "Array"); + } + + if (isFavorite !== undefined) { + localVarQueryParameters['isFavorite'] = ObjectSerializer.serialize(isFavorite, "boolean"); + } + + if (imageTypeLimit !== undefined) { + localVarQueryParameters['imageTypeLimit'] = ObjectSerializer.serialize(imageTypeLimit, "number"); + } + + if (enableImageTypes !== undefined) { + localVarQueryParameters['enableImageTypes'] = ObjectSerializer.serialize(enableImageTypes, "Array"); + } + + if (userId !== undefined) { + localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string"); + } + + if (nameStartsWithOrGreater !== undefined) { + localVarQueryParameters['nameStartsWithOrGreater'] = ObjectSerializer.serialize(nameStartsWithOrGreater, "string"); + } + + if (nameStartsWith !== undefined) { + localVarQueryParameters['nameStartsWith'] = ObjectSerializer.serialize(nameStartsWith, "string"); + } + + if (nameLessThan !== undefined) { + localVarQueryParameters['nameLessThan'] = ObjectSerializer.serialize(nameLessThan, "string"); + } + + if (sortBy !== undefined) { + localVarQueryParameters['sortBy'] = ObjectSerializer.serialize(sortBy, "Array"); + } + + if (sortOrder !== undefined) { + localVarQueryParameters['sortOrder'] = ObjectSerializer.serialize(sortOrder, "Array"); + } + + if (enableImages !== undefined) { + localVarQueryParameters['enableImages'] = ObjectSerializer.serialize(enableImages, "boolean"); + } + + if (enableTotalRecordCount !== undefined) { + localVarQueryParameters['enableTotalRecordCount'] = ObjectSerializer.serialize(enableTotalRecordCount, "boolean"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "BaseItemDtoQueryResult"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} diff --git a/jellyfin/api/hlsSegmentApi.ts b/jellyfin/api/hlsSegmentApi.ts new file mode 100644 index 0000000..7b18b5c --- /dev/null +++ b/jellyfin/api/hlsSegmentApi.ts @@ -0,0 +1,490 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import localVarRequest from 'request'; +import http from 'http'; + +/* tslint:disable:no-unused-locals */ +import { ProblemDetails } from '../model/problemDetails'; + +import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; +import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; + +import { HttpError, RequestFile } from './apis'; + +let defaultBasePath = 'http://localhost'; + +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== + +export enum HlsSegmentApiApiKeys { + CustomAuthentication, +} + +export class HlsSegmentApi { + protected _basePath = defaultBasePath; + protected _defaultHeaders : any = {}; + protected _useQuerystring : boolean = false; + + protected authentications = { + 'default': new VoidAuth(), + 'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'), + } + + protected interceptors: Interceptor[] = []; + + constructor(basePath?: string); + constructor(basePathOrUsername: string, password?: string, basePath?: string) { + if (password) { + if (basePath) { + this.basePath = basePath; + } + } else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername + } + } + } + + set useQuerystring(value: boolean) { + this._useQuerystring = value; + } + + set basePath(basePath: string) { + this._basePath = basePath; + } + + set defaultHeaders(defaultHeaders: any) { + this._defaultHeaders = defaultHeaders; + } + + get defaultHeaders() { + return this._defaultHeaders; + } + + get basePath() { + return this._basePath; + } + + public setDefaultAuthentication(auth: Authentication) { + this.authentications.default = auth; + } + + public setApiKey(key: HlsSegmentApiApiKeys, value: string) { + (this.authentications as any)[HlsSegmentApiApiKeys[key]].apiKey = value; + } + + public addInterceptor(interceptor: Interceptor) { + this.interceptors.push(interceptor); + } + + /** + * + * @summary Gets the specified audio segment for an audio item. + * @param itemId The item id. + * @param segmentId The segment id. + */ + public async getHlsAudioSegmentLegacyAac (itemId: string, segmentId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/Audio/{itemId}/hls/{segmentId}/stream.aac' + .replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId))) + .replace('{' + 'segmentId' + '}', encodeURIComponent(String(segmentId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['audio/*']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'itemId' is not null or undefined + if (itemId === null || itemId === undefined) { + throw new Error('Required parameter itemId was null or undefined when calling getHlsAudioSegmentLegacyAac.'); + } + + // verify required parameter 'segmentId' is not null or undefined + if (segmentId === null || segmentId === undefined) { + throw new Error('Required parameter segmentId was null or undefined when calling getHlsAudioSegmentLegacyAac.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets the specified audio segment for an audio item. + * @param itemId The item id. + * @param segmentId The segment id. + */ + public async getHlsAudioSegmentLegacyMp3 (itemId: string, segmentId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/Audio/{itemId}/hls/{segmentId}/stream.mp3' + .replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId))) + .replace('{' + 'segmentId' + '}', encodeURIComponent(String(segmentId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['audio/*']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'itemId' is not null or undefined + if (itemId === null || itemId === undefined) { + throw new Error('Required parameter itemId was null or undefined when calling getHlsAudioSegmentLegacyMp3.'); + } + + // verify required parameter 'segmentId' is not null or undefined + if (segmentId === null || segmentId === undefined) { + throw new Error('Required parameter segmentId was null or undefined when calling getHlsAudioSegmentLegacyMp3.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets a hls video playlist. + * @param itemId The video id. + * @param playlistId The playlist id. + */ + public async getHlsPlaylistLegacy (itemId: string, playlistId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/Videos/{itemId}/hls/{playlistId}/stream.m3u8' + .replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId))) + .replace('{' + 'playlistId' + '}', encodeURIComponent(String(playlistId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/x-mpegURL']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'itemId' is not null or undefined + if (itemId === null || itemId === undefined) { + throw new Error('Required parameter itemId was null or undefined when calling getHlsPlaylistLegacy.'); + } + + // verify required parameter 'playlistId' is not null or undefined + if (playlistId === null || playlistId === undefined) { + throw new Error('Required parameter playlistId was null or undefined when calling getHlsPlaylistLegacy.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets a hls video segment. + * @param itemId The item id. + * @param playlistId The playlist id. + * @param segmentId The segment id. + * @param segmentContainer The segment container. + */ + public async getHlsVideoSegmentLegacy (itemId: string, playlistId: string, segmentId: string, segmentContainer: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/Videos/{itemId}/hls/{playlistId}/{segmentId}.{segmentContainer}' + .replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId))) + .replace('{' + 'playlistId' + '}', encodeURIComponent(String(playlistId))) + .replace('{' + 'segmentId' + '}', encodeURIComponent(String(segmentId))) + .replace('{' + 'segmentContainer' + '}', encodeURIComponent(String(segmentContainer))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['video/*', 'application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'itemId' is not null or undefined + if (itemId === null || itemId === undefined) { + throw new Error('Required parameter itemId was null or undefined when calling getHlsVideoSegmentLegacy.'); + } + + // verify required parameter 'playlistId' is not null or undefined + if (playlistId === null || playlistId === undefined) { + throw new Error('Required parameter playlistId was null or undefined when calling getHlsVideoSegmentLegacy.'); + } + + // verify required parameter 'segmentId' is not null or undefined + if (segmentId === null || segmentId === undefined) { + throw new Error('Required parameter segmentId was null or undefined when calling getHlsVideoSegmentLegacy.'); + } + + // verify required parameter 'segmentContainer' is not null or undefined + if (segmentContainer === null || segmentContainer === undefined) { + throw new Error('Required parameter segmentContainer was null or undefined when calling getHlsVideoSegmentLegacy.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Stops an active encoding. + * @param deviceId The device id of the client requesting. Used to stop encoding processes when needed. + * @param playSessionId The play session id. + */ + public async stopEncodingProcess (deviceId: string, playSessionId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Videos/ActiveEncodings'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + // verify required parameter 'deviceId' is not null or undefined + if (deviceId === null || deviceId === undefined) { + throw new Error('Required parameter deviceId was null or undefined when calling stopEncodingProcess.'); + } + + // verify required parameter 'playSessionId' is not null or undefined + if (playSessionId === null || playSessionId === undefined) { + throw new Error('Required parameter playSessionId was null or undefined when calling stopEncodingProcess.'); + } + + if (deviceId !== undefined) { + localVarQueryParameters['deviceId'] = ObjectSerializer.serialize(deviceId, "string"); + } + + if (playSessionId !== undefined) { + localVarQueryParameters['playSessionId'] = ObjectSerializer.serialize(playSessionId, "string"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} diff --git a/jellyfin/api/imageApi.ts b/jellyfin/api/imageApi.ts new file mode 100644 index 0000000..3010428 --- /dev/null +++ b/jellyfin/api/imageApi.ts @@ -0,0 +1,5746 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import localVarRequest from 'request'; +import http from 'http'; + +/* tslint:disable:no-unused-locals */ +import { ImageFormat } from '../model/imageFormat'; +import { ImageInfo } from '../model/imageInfo'; +import { ImageType } from '../model/imageType'; +import { ProblemDetails } from '../model/problemDetails'; + +import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; +import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; + +import { HttpError, RequestFile } from './apis'; + +let defaultBasePath = 'http://localhost'; + +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== + +export enum ImageApiApiKeys { + CustomAuthentication, +} + +export class ImageApi { + protected _basePath = defaultBasePath; + protected _defaultHeaders : any = {}; + protected _useQuerystring : boolean = false; + + protected authentications = { + 'default': new VoidAuth(), + 'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'), + } + + protected interceptors: Interceptor[] = []; + + constructor(basePath?: string); + constructor(basePathOrUsername: string, password?: string, basePath?: string) { + if (password) { + if (basePath) { + this.basePath = basePath; + } + } else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername + } + } + } + + set useQuerystring(value: boolean) { + this._useQuerystring = value; + } + + set basePath(basePath: string) { + this._basePath = basePath; + } + + set defaultHeaders(defaultHeaders: any) { + this._defaultHeaders = defaultHeaders; + } + + get defaultHeaders() { + return this._defaultHeaders; + } + + get basePath() { + return this._basePath; + } + + public setDefaultAuthentication(auth: Authentication) { + this.authentications.default = auth; + } + + public setApiKey(key: ImageApiApiKeys, value: string) { + (this.authentications as any)[ImageApiApiKeys[key]].apiKey = value; + } + + public addInterceptor(interceptor: Interceptor) { + this.interceptors.push(interceptor); + } + + /** + * + * @summary Delete a custom splashscreen. + */ + public async deleteCustomSplashscreen (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Branding/Splashscreen'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Delete an item\'s image. + * @param itemId Item id. + * @param imageType Image type. + * @param imageIndex The image index. + */ + public async deleteItemImage (itemId: string, imageType: ImageType, imageIndex?: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Items/{itemId}/Images/{imageType}' + .replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId))) + .replace('{' + 'imageType' + '}', encodeURIComponent(String(imageType))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'itemId' is not null or undefined + if (itemId === null || itemId === undefined) { + throw new Error('Required parameter itemId was null or undefined when calling deleteItemImage.'); + } + + // verify required parameter 'imageType' is not null or undefined + if (imageType === null || imageType === undefined) { + throw new Error('Required parameter imageType was null or undefined when calling deleteItemImage.'); + } + + if (imageIndex !== undefined) { + localVarQueryParameters['imageIndex'] = ObjectSerializer.serialize(imageIndex, "number"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Delete an item\'s image. + * @param itemId Item id. + * @param imageType Image type. + * @param imageIndex The image index. + */ + public async deleteItemImageByIndex (itemId: string, imageType: ImageType, imageIndex: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Items/{itemId}/Images/{imageType}/{imageIndex}' + .replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId))) + .replace('{' + 'imageType' + '}', encodeURIComponent(String(imageType))) + .replace('{' + 'imageIndex' + '}', encodeURIComponent(String(imageIndex))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'itemId' is not null or undefined + if (itemId === null || itemId === undefined) { + throw new Error('Required parameter itemId was null or undefined when calling deleteItemImageByIndex.'); + } + + // verify required parameter 'imageType' is not null or undefined + if (imageType === null || imageType === undefined) { + throw new Error('Required parameter imageType was null or undefined when calling deleteItemImageByIndex.'); + } + + // verify required parameter 'imageIndex' is not null or undefined + if (imageIndex === null || imageIndex === undefined) { + throw new Error('Required parameter imageIndex was null or undefined when calling deleteItemImageByIndex.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Delete the user\'s image. + * @param userId User Id. + * @param imageType (Unused) Image type. + * @param index (Unused) Image index. + */ + public async deleteUserImage (userId: string, imageType: ImageType, index?: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Users/{userId}/Images/{imageType}' + .replace('{' + 'userId' + '}', encodeURIComponent(String(userId))) + .replace('{' + 'imageType' + '}', encodeURIComponent(String(imageType))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'userId' is not null or undefined + if (userId === null || userId === undefined) { + throw new Error('Required parameter userId was null or undefined when calling deleteUserImage.'); + } + + // verify required parameter 'imageType' is not null or undefined + if (imageType === null || imageType === undefined) { + throw new Error('Required parameter imageType was null or undefined when calling deleteUserImage.'); + } + + if (index !== undefined) { + localVarQueryParameters['index'] = ObjectSerializer.serialize(index, "number"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Delete the user\'s image. + * @param userId User Id. + * @param imageType (Unused) Image type. + * @param index (Unused) Image index. + */ + public async deleteUserImageByIndex (userId: string, imageType: ImageType, index: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Users/{userId}/Images/{imageType}/{index}' + .replace('{' + 'userId' + '}', encodeURIComponent(String(userId))) + .replace('{' + 'imageType' + '}', encodeURIComponent(String(imageType))) + .replace('{' + 'index' + '}', encodeURIComponent(String(index))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'userId' is not null or undefined + if (userId === null || userId === undefined) { + throw new Error('Required parameter userId was null or undefined when calling deleteUserImageByIndex.'); + } + + // verify required parameter 'imageType' is not null or undefined + if (imageType === null || imageType === undefined) { + throw new Error('Required parameter imageType was null or undefined when calling deleteUserImageByIndex.'); + } + + // verify required parameter 'index' is not null or undefined + if (index === null || index === undefined) { + throw new Error('Required parameter index was null or undefined when calling deleteUserImageByIndex.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Get artist image by name. + * @param name Artist name. + * @param imageType Image type. + * @param imageIndex Image index. + * @param tag Optional. Supply the cache tag from the item object to receive strong caching headers. + * @param format Determines the output format of the image - original,gif,jpg,png. + * @param maxWidth The maximum image width to return. + * @param maxHeight The maximum image height to return. + * @param percentPlayed Optional. Percent to render for the percent played overlay. + * @param unplayedCount Optional. Unplayed count overlay to render. + * @param width The fixed image width to return. + * @param height The fixed image height to return. + * @param quality Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases. + * @param fillWidth Width of box to fill. + * @param fillHeight Height of box to fill. + * @param cropWhitespace Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art. + * @param addPlayedIndicator Optional. Add a played indicator. + * @param blur Optional. Blur image. + * @param backgroundColor Optional. Apply a background color for transparent images. + * @param foregroundLayer Optional. Apply a foreground layer on top of the image. + */ + public async getArtistImage (name: string, imageType: ImageType, imageIndex: number, tag?: string, format?: ImageFormat, maxWidth?: number, maxHeight?: number, percentPlayed?: number, unplayedCount?: number, width?: number, height?: number, quality?: number, fillWidth?: number, fillHeight?: number, cropWhitespace?: boolean, addPlayedIndicator?: boolean, blur?: number, backgroundColor?: string, foregroundLayer?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/Artists/{name}/Images/{imageType}/{imageIndex}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'imageType' + '}', encodeURIComponent(String(imageType))) + .replace('{' + 'imageIndex' + '}', encodeURIComponent(String(imageIndex))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['image/*', 'application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling getArtistImage.'); + } + + // verify required parameter 'imageType' is not null or undefined + if (imageType === null || imageType === undefined) { + throw new Error('Required parameter imageType was null or undefined when calling getArtistImage.'); + } + + // verify required parameter 'imageIndex' is not null or undefined + if (imageIndex === null || imageIndex === undefined) { + throw new Error('Required parameter imageIndex was null or undefined when calling getArtistImage.'); + } + + if (tag !== undefined) { + localVarQueryParameters['tag'] = ObjectSerializer.serialize(tag, "string"); + } + + if (format !== undefined) { + localVarQueryParameters['format'] = ObjectSerializer.serialize(format, "ImageFormat"); + } + + if (maxWidth !== undefined) { + localVarQueryParameters['maxWidth'] = ObjectSerializer.serialize(maxWidth, "number"); + } + + if (maxHeight !== undefined) { + localVarQueryParameters['maxHeight'] = ObjectSerializer.serialize(maxHeight, "number"); + } + + if (percentPlayed !== undefined) { + localVarQueryParameters['percentPlayed'] = ObjectSerializer.serialize(percentPlayed, "number"); + } + + if (unplayedCount !== undefined) { + localVarQueryParameters['unplayedCount'] = ObjectSerializer.serialize(unplayedCount, "number"); + } + + if (width !== undefined) { + localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number"); + } + + if (height !== undefined) { + localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number"); + } + + if (quality !== undefined) { + localVarQueryParameters['quality'] = ObjectSerializer.serialize(quality, "number"); + } + + if (fillWidth !== undefined) { + localVarQueryParameters['fillWidth'] = ObjectSerializer.serialize(fillWidth, "number"); + } + + if (fillHeight !== undefined) { + localVarQueryParameters['fillHeight'] = ObjectSerializer.serialize(fillHeight, "number"); + } + + if (cropWhitespace !== undefined) { + localVarQueryParameters['cropWhitespace'] = ObjectSerializer.serialize(cropWhitespace, "boolean"); + } + + if (addPlayedIndicator !== undefined) { + localVarQueryParameters['addPlayedIndicator'] = ObjectSerializer.serialize(addPlayedIndicator, "boolean"); + } + + if (blur !== undefined) { + localVarQueryParameters['blur'] = ObjectSerializer.serialize(blur, "number"); + } + + if (backgroundColor !== undefined) { + localVarQueryParameters['backgroundColor'] = ObjectSerializer.serialize(backgroundColor, "string"); + } + + if (foregroundLayer !== undefined) { + localVarQueryParameters['foregroundLayer'] = ObjectSerializer.serialize(foregroundLayer, "string"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Get genre image by name. + * @param name Genre name. + * @param imageType Image type. + * @param tag Optional. Supply the cache tag from the item object to receive strong caching headers. + * @param format Determines the output format of the image - original,gif,jpg,png. + * @param maxWidth The maximum image width to return. + * @param maxHeight The maximum image height to return. + * @param percentPlayed Optional. Percent to render for the percent played overlay. + * @param unplayedCount Optional. Unplayed count overlay to render. + * @param width The fixed image width to return. + * @param height The fixed image height to return. + * @param quality Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases. + * @param fillWidth Width of box to fill. + * @param fillHeight Height of box to fill. + * @param cropWhitespace Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art. + * @param addPlayedIndicator Optional. Add a played indicator. + * @param blur Optional. Blur image. + * @param backgroundColor Optional. Apply a background color for transparent images. + * @param foregroundLayer Optional. Apply a foreground layer on top of the image. + * @param imageIndex Image index. + */ + public async getGenreImage (name: string, imageType: ImageType, tag?: string, format?: ImageFormat, maxWidth?: number, maxHeight?: number, percentPlayed?: number, unplayedCount?: number, width?: number, height?: number, quality?: number, fillWidth?: number, fillHeight?: number, cropWhitespace?: boolean, addPlayedIndicator?: boolean, blur?: number, backgroundColor?: string, foregroundLayer?: string, imageIndex?: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/Genres/{name}/Images/{imageType}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'imageType' + '}', encodeURIComponent(String(imageType))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['image/*', 'application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling getGenreImage.'); + } + + // verify required parameter 'imageType' is not null or undefined + if (imageType === null || imageType === undefined) { + throw new Error('Required parameter imageType was null or undefined when calling getGenreImage.'); + } + + if (tag !== undefined) { + localVarQueryParameters['tag'] = ObjectSerializer.serialize(tag, "string"); + } + + if (format !== undefined) { + localVarQueryParameters['format'] = ObjectSerializer.serialize(format, "ImageFormat"); + } + + if (maxWidth !== undefined) { + localVarQueryParameters['maxWidth'] = ObjectSerializer.serialize(maxWidth, "number"); + } + + if (maxHeight !== undefined) { + localVarQueryParameters['maxHeight'] = ObjectSerializer.serialize(maxHeight, "number"); + } + + if (percentPlayed !== undefined) { + localVarQueryParameters['percentPlayed'] = ObjectSerializer.serialize(percentPlayed, "number"); + } + + if (unplayedCount !== undefined) { + localVarQueryParameters['unplayedCount'] = ObjectSerializer.serialize(unplayedCount, "number"); + } + + if (width !== undefined) { + localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number"); + } + + if (height !== undefined) { + localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number"); + } + + if (quality !== undefined) { + localVarQueryParameters['quality'] = ObjectSerializer.serialize(quality, "number"); + } + + if (fillWidth !== undefined) { + localVarQueryParameters['fillWidth'] = ObjectSerializer.serialize(fillWidth, "number"); + } + + if (fillHeight !== undefined) { + localVarQueryParameters['fillHeight'] = ObjectSerializer.serialize(fillHeight, "number"); + } + + if (cropWhitespace !== undefined) { + localVarQueryParameters['cropWhitespace'] = ObjectSerializer.serialize(cropWhitespace, "boolean"); + } + + if (addPlayedIndicator !== undefined) { + localVarQueryParameters['addPlayedIndicator'] = ObjectSerializer.serialize(addPlayedIndicator, "boolean"); + } + + if (blur !== undefined) { + localVarQueryParameters['blur'] = ObjectSerializer.serialize(blur, "number"); + } + + if (backgroundColor !== undefined) { + localVarQueryParameters['backgroundColor'] = ObjectSerializer.serialize(backgroundColor, "string"); + } + + if (foregroundLayer !== undefined) { + localVarQueryParameters['foregroundLayer'] = ObjectSerializer.serialize(foregroundLayer, "string"); + } + + if (imageIndex !== undefined) { + localVarQueryParameters['imageIndex'] = ObjectSerializer.serialize(imageIndex, "number"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Get genre image by name. + * @param name Genre name. + * @param imageType Image type. + * @param imageIndex Image index. + * @param tag Optional. Supply the cache tag from the item object to receive strong caching headers. + * @param format Determines the output format of the image - original,gif,jpg,png. + * @param maxWidth The maximum image width to return. + * @param maxHeight The maximum image height to return. + * @param percentPlayed Optional. Percent to render for the percent played overlay. + * @param unplayedCount Optional. Unplayed count overlay to render. + * @param width The fixed image width to return. + * @param height The fixed image height to return. + * @param quality Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases. + * @param fillWidth Width of box to fill. + * @param fillHeight Height of box to fill. + * @param cropWhitespace Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art. + * @param addPlayedIndicator Optional. Add a played indicator. + * @param blur Optional. Blur image. + * @param backgroundColor Optional. Apply a background color for transparent images. + * @param foregroundLayer Optional. Apply a foreground layer on top of the image. + */ + public async getGenreImageByIndex (name: string, imageType: ImageType, imageIndex: number, tag?: string, format?: ImageFormat, maxWidth?: number, maxHeight?: number, percentPlayed?: number, unplayedCount?: number, width?: number, height?: number, quality?: number, fillWidth?: number, fillHeight?: number, cropWhitespace?: boolean, addPlayedIndicator?: boolean, blur?: number, backgroundColor?: string, foregroundLayer?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/Genres/{name}/Images/{imageType}/{imageIndex}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'imageType' + '}', encodeURIComponent(String(imageType))) + .replace('{' + 'imageIndex' + '}', encodeURIComponent(String(imageIndex))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['image/*', 'application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling getGenreImageByIndex.'); + } + + // verify required parameter 'imageType' is not null or undefined + if (imageType === null || imageType === undefined) { + throw new Error('Required parameter imageType was null or undefined when calling getGenreImageByIndex.'); + } + + // verify required parameter 'imageIndex' is not null or undefined + if (imageIndex === null || imageIndex === undefined) { + throw new Error('Required parameter imageIndex was null or undefined when calling getGenreImageByIndex.'); + } + + if (tag !== undefined) { + localVarQueryParameters['tag'] = ObjectSerializer.serialize(tag, "string"); + } + + if (format !== undefined) { + localVarQueryParameters['format'] = ObjectSerializer.serialize(format, "ImageFormat"); + } + + if (maxWidth !== undefined) { + localVarQueryParameters['maxWidth'] = ObjectSerializer.serialize(maxWidth, "number"); + } + + if (maxHeight !== undefined) { + localVarQueryParameters['maxHeight'] = ObjectSerializer.serialize(maxHeight, "number"); + } + + if (percentPlayed !== undefined) { + localVarQueryParameters['percentPlayed'] = ObjectSerializer.serialize(percentPlayed, "number"); + } + + if (unplayedCount !== undefined) { + localVarQueryParameters['unplayedCount'] = ObjectSerializer.serialize(unplayedCount, "number"); + } + + if (width !== undefined) { + localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number"); + } + + if (height !== undefined) { + localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number"); + } + + if (quality !== undefined) { + localVarQueryParameters['quality'] = ObjectSerializer.serialize(quality, "number"); + } + + if (fillWidth !== undefined) { + localVarQueryParameters['fillWidth'] = ObjectSerializer.serialize(fillWidth, "number"); + } + + if (fillHeight !== undefined) { + localVarQueryParameters['fillHeight'] = ObjectSerializer.serialize(fillHeight, "number"); + } + + if (cropWhitespace !== undefined) { + localVarQueryParameters['cropWhitespace'] = ObjectSerializer.serialize(cropWhitespace, "boolean"); + } + + if (addPlayedIndicator !== undefined) { + localVarQueryParameters['addPlayedIndicator'] = ObjectSerializer.serialize(addPlayedIndicator, "boolean"); + } + + if (blur !== undefined) { + localVarQueryParameters['blur'] = ObjectSerializer.serialize(blur, "number"); + } + + if (backgroundColor !== undefined) { + localVarQueryParameters['backgroundColor'] = ObjectSerializer.serialize(backgroundColor, "string"); + } + + if (foregroundLayer !== undefined) { + localVarQueryParameters['foregroundLayer'] = ObjectSerializer.serialize(foregroundLayer, "string"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets the item\'s image. + * @param itemId Item id. + * @param imageType Image type. + * @param maxWidth The maximum image width to return. + * @param maxHeight The maximum image height to return. + * @param width The fixed image width to return. + * @param height The fixed image height to return. + * @param quality Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases. + * @param fillWidth Width of box to fill. + * @param fillHeight Height of box to fill. + * @param tag Optional. Supply the cache tag from the item object to receive strong caching headers. + * @param cropWhitespace Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art. + * @param format Optional. The MediaBrowser.Model.Drawing.ImageFormat of the returned image. + * @param addPlayedIndicator Optional. Add a played indicator. + * @param percentPlayed Optional. Percent to render for the percent played overlay. + * @param unplayedCount Optional. Unplayed count overlay to render. + * @param blur Optional. Blur image. + * @param backgroundColor Optional. Apply a background color for transparent images. + * @param foregroundLayer Optional. Apply a foreground layer on top of the image. + * @param imageIndex Image index. + */ + public async getItemImage (itemId: string, imageType: ImageType, maxWidth?: number, maxHeight?: number, width?: number, height?: number, quality?: number, fillWidth?: number, fillHeight?: number, tag?: string, cropWhitespace?: boolean, format?: ImageFormat, addPlayedIndicator?: boolean, percentPlayed?: number, unplayedCount?: number, blur?: number, backgroundColor?: string, foregroundLayer?: string, imageIndex?: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/Items/{itemId}/Images/{imageType}' + .replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId))) + .replace('{' + 'imageType' + '}', encodeURIComponent(String(imageType))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['image/*', 'application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'itemId' is not null or undefined + if (itemId === null || itemId === undefined) { + throw new Error('Required parameter itemId was null or undefined when calling getItemImage.'); + } + + // verify required parameter 'imageType' is not null or undefined + if (imageType === null || imageType === undefined) { + throw new Error('Required parameter imageType was null or undefined when calling getItemImage.'); + } + + if (maxWidth !== undefined) { + localVarQueryParameters['maxWidth'] = ObjectSerializer.serialize(maxWidth, "number"); + } + + if (maxHeight !== undefined) { + localVarQueryParameters['maxHeight'] = ObjectSerializer.serialize(maxHeight, "number"); + } + + if (width !== undefined) { + localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number"); + } + + if (height !== undefined) { + localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number"); + } + + if (quality !== undefined) { + localVarQueryParameters['quality'] = ObjectSerializer.serialize(quality, "number"); + } + + if (fillWidth !== undefined) { + localVarQueryParameters['fillWidth'] = ObjectSerializer.serialize(fillWidth, "number"); + } + + if (fillHeight !== undefined) { + localVarQueryParameters['fillHeight'] = ObjectSerializer.serialize(fillHeight, "number"); + } + + if (tag !== undefined) { + localVarQueryParameters['tag'] = ObjectSerializer.serialize(tag, "string"); + } + + if (cropWhitespace !== undefined) { + localVarQueryParameters['cropWhitespace'] = ObjectSerializer.serialize(cropWhitespace, "boolean"); + } + + if (format !== undefined) { + localVarQueryParameters['format'] = ObjectSerializer.serialize(format, "ImageFormat"); + } + + if (addPlayedIndicator !== undefined) { + localVarQueryParameters['addPlayedIndicator'] = ObjectSerializer.serialize(addPlayedIndicator, "boolean"); + } + + if (percentPlayed !== undefined) { + localVarQueryParameters['percentPlayed'] = ObjectSerializer.serialize(percentPlayed, "number"); + } + + if (unplayedCount !== undefined) { + localVarQueryParameters['unplayedCount'] = ObjectSerializer.serialize(unplayedCount, "number"); + } + + if (blur !== undefined) { + localVarQueryParameters['blur'] = ObjectSerializer.serialize(blur, "number"); + } + + if (backgroundColor !== undefined) { + localVarQueryParameters['backgroundColor'] = ObjectSerializer.serialize(backgroundColor, "string"); + } + + if (foregroundLayer !== undefined) { + localVarQueryParameters['foregroundLayer'] = ObjectSerializer.serialize(foregroundLayer, "string"); + } + + if (imageIndex !== undefined) { + localVarQueryParameters['imageIndex'] = ObjectSerializer.serialize(imageIndex, "number"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets the item\'s image. + * @param itemId Item id. + * @param imageType Image type. + * @param maxWidth The maximum image width to return. + * @param maxHeight The maximum image height to return. + * @param tag Optional. Supply the cache tag from the item object to receive strong caching headers. + * @param format Determines the output format of the image - original,gif,jpg,png. + * @param percentPlayed Optional. Percent to render for the percent played overlay. + * @param unplayedCount Optional. Unplayed count overlay to render. + * @param imageIndex Image index. + * @param width The fixed image width to return. + * @param height The fixed image height to return. + * @param quality Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases. + * @param fillWidth Width of box to fill. + * @param fillHeight Height of box to fill. + * @param cropWhitespace Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art. + * @param addPlayedIndicator Optional. Add a played indicator. + * @param blur Optional. Blur image. + * @param backgroundColor Optional. Apply a background color for transparent images. + * @param foregroundLayer Optional. Apply a foreground layer on top of the image. + */ + public async getItemImage2 (itemId: string, imageType: ImageType, maxWidth: number, maxHeight: number, tag: string, format: ImageFormat, percentPlayed: number, unplayedCount: number, imageIndex: number, width?: number, height?: number, quality?: number, fillWidth?: number, fillHeight?: number, cropWhitespace?: boolean, addPlayedIndicator?: boolean, blur?: number, backgroundColor?: string, foregroundLayer?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/Items/{itemId}/Images/{imageType}/{imageIndex}/{tag}/{format}/{maxWidth}/{maxHeight}/{percentPlayed}/{unplayedCount}' + .replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId))) + .replace('{' + 'imageType' + '}', encodeURIComponent(String(imageType))) + .replace('{' + 'maxWidth' + '}', encodeURIComponent(String(maxWidth))) + .replace('{' + 'maxHeight' + '}', encodeURIComponent(String(maxHeight))) + .replace('{' + 'tag' + '}', encodeURIComponent(String(tag))) + .replace('{' + 'format' + '}', encodeURIComponent(String(format))) + .replace('{' + 'percentPlayed' + '}', encodeURIComponent(String(percentPlayed))) + .replace('{' + 'unplayedCount' + '}', encodeURIComponent(String(unplayedCount))) + .replace('{' + 'imageIndex' + '}', encodeURIComponent(String(imageIndex))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['image/*', 'application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'itemId' is not null or undefined + if (itemId === null || itemId === undefined) { + throw new Error('Required parameter itemId was null or undefined when calling getItemImage2.'); + } + + // verify required parameter 'imageType' is not null or undefined + if (imageType === null || imageType === undefined) { + throw new Error('Required parameter imageType was null or undefined when calling getItemImage2.'); + } + + // verify required parameter 'maxWidth' is not null or undefined + if (maxWidth === null || maxWidth === undefined) { + throw new Error('Required parameter maxWidth was null or undefined when calling getItemImage2.'); + } + + // verify required parameter 'maxHeight' is not null or undefined + if (maxHeight === null || maxHeight === undefined) { + throw new Error('Required parameter maxHeight was null or undefined when calling getItemImage2.'); + } + + // verify required parameter 'tag' is not null or undefined + if (tag === null || tag === undefined) { + throw new Error('Required parameter tag was null or undefined when calling getItemImage2.'); + } + + // verify required parameter 'format' is not null or undefined + if (format === null || format === undefined) { + throw new Error('Required parameter format was null or undefined when calling getItemImage2.'); + } + + // verify required parameter 'percentPlayed' is not null or undefined + if (percentPlayed === null || percentPlayed === undefined) { + throw new Error('Required parameter percentPlayed was null or undefined when calling getItemImage2.'); + } + + // verify required parameter 'unplayedCount' is not null or undefined + if (unplayedCount === null || unplayedCount === undefined) { + throw new Error('Required parameter unplayedCount was null or undefined when calling getItemImage2.'); + } + + // verify required parameter 'imageIndex' is not null or undefined + if (imageIndex === null || imageIndex === undefined) { + throw new Error('Required parameter imageIndex was null or undefined when calling getItemImage2.'); + } + + if (width !== undefined) { + localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number"); + } + + if (height !== undefined) { + localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number"); + } + + if (quality !== undefined) { + localVarQueryParameters['quality'] = ObjectSerializer.serialize(quality, "number"); + } + + if (fillWidth !== undefined) { + localVarQueryParameters['fillWidth'] = ObjectSerializer.serialize(fillWidth, "number"); + } + + if (fillHeight !== undefined) { + localVarQueryParameters['fillHeight'] = ObjectSerializer.serialize(fillHeight, "number"); + } + + if (cropWhitespace !== undefined) { + localVarQueryParameters['cropWhitespace'] = ObjectSerializer.serialize(cropWhitespace, "boolean"); + } + + if (addPlayedIndicator !== undefined) { + localVarQueryParameters['addPlayedIndicator'] = ObjectSerializer.serialize(addPlayedIndicator, "boolean"); + } + + if (blur !== undefined) { + localVarQueryParameters['blur'] = ObjectSerializer.serialize(blur, "number"); + } + + if (backgroundColor !== undefined) { + localVarQueryParameters['backgroundColor'] = ObjectSerializer.serialize(backgroundColor, "string"); + } + + if (foregroundLayer !== undefined) { + localVarQueryParameters['foregroundLayer'] = ObjectSerializer.serialize(foregroundLayer, "string"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets the item\'s image. + * @param itemId Item id. + * @param imageType Image type. + * @param imageIndex Image index. + * @param maxWidth The maximum image width to return. + * @param maxHeight The maximum image height to return. + * @param width The fixed image width to return. + * @param height The fixed image height to return. + * @param quality Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases. + * @param fillWidth Width of box to fill. + * @param fillHeight Height of box to fill. + * @param tag Optional. Supply the cache tag from the item object to receive strong caching headers. + * @param cropWhitespace Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art. + * @param format Optional. The MediaBrowser.Model.Drawing.ImageFormat of the returned image. + * @param addPlayedIndicator Optional. Add a played indicator. + * @param percentPlayed Optional. Percent to render for the percent played overlay. + * @param unplayedCount Optional. Unplayed count overlay to render. + * @param blur Optional. Blur image. + * @param backgroundColor Optional. Apply a background color for transparent images. + * @param foregroundLayer Optional. Apply a foreground layer on top of the image. + */ + public async getItemImageByIndex (itemId: string, imageType: ImageType, imageIndex: number, maxWidth?: number, maxHeight?: number, width?: number, height?: number, quality?: number, fillWidth?: number, fillHeight?: number, tag?: string, cropWhitespace?: boolean, format?: ImageFormat, addPlayedIndicator?: boolean, percentPlayed?: number, unplayedCount?: number, blur?: number, backgroundColor?: string, foregroundLayer?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/Items/{itemId}/Images/{imageType}/{imageIndex}' + .replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId))) + .replace('{' + 'imageType' + '}', encodeURIComponent(String(imageType))) + .replace('{' + 'imageIndex' + '}', encodeURIComponent(String(imageIndex))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['image/*', 'application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'itemId' is not null or undefined + if (itemId === null || itemId === undefined) { + throw new Error('Required parameter itemId was null or undefined when calling getItemImageByIndex.'); + } + + // verify required parameter 'imageType' is not null or undefined + if (imageType === null || imageType === undefined) { + throw new Error('Required parameter imageType was null or undefined when calling getItemImageByIndex.'); + } + + // verify required parameter 'imageIndex' is not null or undefined + if (imageIndex === null || imageIndex === undefined) { + throw new Error('Required parameter imageIndex was null or undefined when calling getItemImageByIndex.'); + } + + if (maxWidth !== undefined) { + localVarQueryParameters['maxWidth'] = ObjectSerializer.serialize(maxWidth, "number"); + } + + if (maxHeight !== undefined) { + localVarQueryParameters['maxHeight'] = ObjectSerializer.serialize(maxHeight, "number"); + } + + if (width !== undefined) { + localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number"); + } + + if (height !== undefined) { + localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number"); + } + + if (quality !== undefined) { + localVarQueryParameters['quality'] = ObjectSerializer.serialize(quality, "number"); + } + + if (fillWidth !== undefined) { + localVarQueryParameters['fillWidth'] = ObjectSerializer.serialize(fillWidth, "number"); + } + + if (fillHeight !== undefined) { + localVarQueryParameters['fillHeight'] = ObjectSerializer.serialize(fillHeight, "number"); + } + + if (tag !== undefined) { + localVarQueryParameters['tag'] = ObjectSerializer.serialize(tag, "string"); + } + + if (cropWhitespace !== undefined) { + localVarQueryParameters['cropWhitespace'] = ObjectSerializer.serialize(cropWhitespace, "boolean"); + } + + if (format !== undefined) { + localVarQueryParameters['format'] = ObjectSerializer.serialize(format, "ImageFormat"); + } + + if (addPlayedIndicator !== undefined) { + localVarQueryParameters['addPlayedIndicator'] = ObjectSerializer.serialize(addPlayedIndicator, "boolean"); + } + + if (percentPlayed !== undefined) { + localVarQueryParameters['percentPlayed'] = ObjectSerializer.serialize(percentPlayed, "number"); + } + + if (unplayedCount !== undefined) { + localVarQueryParameters['unplayedCount'] = ObjectSerializer.serialize(unplayedCount, "number"); + } + + if (blur !== undefined) { + localVarQueryParameters['blur'] = ObjectSerializer.serialize(blur, "number"); + } + + if (backgroundColor !== undefined) { + localVarQueryParameters['backgroundColor'] = ObjectSerializer.serialize(backgroundColor, "string"); + } + + if (foregroundLayer !== undefined) { + localVarQueryParameters['foregroundLayer'] = ObjectSerializer.serialize(foregroundLayer, "string"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Get item image infos. + * @param itemId Item id. + */ + public async getItemImageInfos (itemId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array; }> { + const localVarPath = this.basePath + '/Items/{itemId}/Images' + .replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'itemId' is not null or undefined + if (itemId === null || itemId === undefined) { + throw new Error('Required parameter itemId was null or undefined when calling getItemImageInfos.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Array; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Array"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Get music genre image by name. + * @param name Music genre name. + * @param imageType Image type. + * @param tag Optional. Supply the cache tag from the item object to receive strong caching headers. + * @param format Determines the output format of the image - original,gif,jpg,png. + * @param maxWidth The maximum image width to return. + * @param maxHeight The maximum image height to return. + * @param percentPlayed Optional. Percent to render for the percent played overlay. + * @param unplayedCount Optional. Unplayed count overlay to render. + * @param width The fixed image width to return. + * @param height The fixed image height to return. + * @param quality Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases. + * @param fillWidth Width of box to fill. + * @param fillHeight Height of box to fill. + * @param cropWhitespace Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art. + * @param addPlayedIndicator Optional. Add a played indicator. + * @param blur Optional. Blur image. + * @param backgroundColor Optional. Apply a background color for transparent images. + * @param foregroundLayer Optional. Apply a foreground layer on top of the image. + * @param imageIndex Image index. + */ + public async getMusicGenreImage (name: string, imageType: ImageType, tag?: string, format?: ImageFormat, maxWidth?: number, maxHeight?: number, percentPlayed?: number, unplayedCount?: number, width?: number, height?: number, quality?: number, fillWidth?: number, fillHeight?: number, cropWhitespace?: boolean, addPlayedIndicator?: boolean, blur?: number, backgroundColor?: string, foregroundLayer?: string, imageIndex?: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/MusicGenres/{name}/Images/{imageType}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'imageType' + '}', encodeURIComponent(String(imageType))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['image/*', 'application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling getMusicGenreImage.'); + } + + // verify required parameter 'imageType' is not null or undefined + if (imageType === null || imageType === undefined) { + throw new Error('Required parameter imageType was null or undefined when calling getMusicGenreImage.'); + } + + if (tag !== undefined) { + localVarQueryParameters['tag'] = ObjectSerializer.serialize(tag, "string"); + } + + if (format !== undefined) { + localVarQueryParameters['format'] = ObjectSerializer.serialize(format, "ImageFormat"); + } + + if (maxWidth !== undefined) { + localVarQueryParameters['maxWidth'] = ObjectSerializer.serialize(maxWidth, "number"); + } + + if (maxHeight !== undefined) { + localVarQueryParameters['maxHeight'] = ObjectSerializer.serialize(maxHeight, "number"); + } + + if (percentPlayed !== undefined) { + localVarQueryParameters['percentPlayed'] = ObjectSerializer.serialize(percentPlayed, "number"); + } + + if (unplayedCount !== undefined) { + localVarQueryParameters['unplayedCount'] = ObjectSerializer.serialize(unplayedCount, "number"); + } + + if (width !== undefined) { + localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number"); + } + + if (height !== undefined) { + localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number"); + } + + if (quality !== undefined) { + localVarQueryParameters['quality'] = ObjectSerializer.serialize(quality, "number"); + } + + if (fillWidth !== undefined) { + localVarQueryParameters['fillWidth'] = ObjectSerializer.serialize(fillWidth, "number"); + } + + if (fillHeight !== undefined) { + localVarQueryParameters['fillHeight'] = ObjectSerializer.serialize(fillHeight, "number"); + } + + if (cropWhitespace !== undefined) { + localVarQueryParameters['cropWhitespace'] = ObjectSerializer.serialize(cropWhitespace, "boolean"); + } + + if (addPlayedIndicator !== undefined) { + localVarQueryParameters['addPlayedIndicator'] = ObjectSerializer.serialize(addPlayedIndicator, "boolean"); + } + + if (blur !== undefined) { + localVarQueryParameters['blur'] = ObjectSerializer.serialize(blur, "number"); + } + + if (backgroundColor !== undefined) { + localVarQueryParameters['backgroundColor'] = ObjectSerializer.serialize(backgroundColor, "string"); + } + + if (foregroundLayer !== undefined) { + localVarQueryParameters['foregroundLayer'] = ObjectSerializer.serialize(foregroundLayer, "string"); + } + + if (imageIndex !== undefined) { + localVarQueryParameters['imageIndex'] = ObjectSerializer.serialize(imageIndex, "number"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Get music genre image by name. + * @param name Music genre name. + * @param imageType Image type. + * @param imageIndex Image index. + * @param tag Optional. Supply the cache tag from the item object to receive strong caching headers. + * @param format Determines the output format of the image - original,gif,jpg,png. + * @param maxWidth The maximum image width to return. + * @param maxHeight The maximum image height to return. + * @param percentPlayed Optional. Percent to render for the percent played overlay. + * @param unplayedCount Optional. Unplayed count overlay to render. + * @param width The fixed image width to return. + * @param height The fixed image height to return. + * @param quality Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases. + * @param fillWidth Width of box to fill. + * @param fillHeight Height of box to fill. + * @param cropWhitespace Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art. + * @param addPlayedIndicator Optional. Add a played indicator. + * @param blur Optional. Blur image. + * @param backgroundColor Optional. Apply a background color for transparent images. + * @param foregroundLayer Optional. Apply a foreground layer on top of the image. + */ + public async getMusicGenreImageByIndex (name: string, imageType: ImageType, imageIndex: number, tag?: string, format?: ImageFormat, maxWidth?: number, maxHeight?: number, percentPlayed?: number, unplayedCount?: number, width?: number, height?: number, quality?: number, fillWidth?: number, fillHeight?: number, cropWhitespace?: boolean, addPlayedIndicator?: boolean, blur?: number, backgroundColor?: string, foregroundLayer?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/MusicGenres/{name}/Images/{imageType}/{imageIndex}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'imageType' + '}', encodeURIComponent(String(imageType))) + .replace('{' + 'imageIndex' + '}', encodeURIComponent(String(imageIndex))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['image/*', 'application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling getMusicGenreImageByIndex.'); + } + + // verify required parameter 'imageType' is not null or undefined + if (imageType === null || imageType === undefined) { + throw new Error('Required parameter imageType was null or undefined when calling getMusicGenreImageByIndex.'); + } + + // verify required parameter 'imageIndex' is not null or undefined + if (imageIndex === null || imageIndex === undefined) { + throw new Error('Required parameter imageIndex was null or undefined when calling getMusicGenreImageByIndex.'); + } + + if (tag !== undefined) { + localVarQueryParameters['tag'] = ObjectSerializer.serialize(tag, "string"); + } + + if (format !== undefined) { + localVarQueryParameters['format'] = ObjectSerializer.serialize(format, "ImageFormat"); + } + + if (maxWidth !== undefined) { + localVarQueryParameters['maxWidth'] = ObjectSerializer.serialize(maxWidth, "number"); + } + + if (maxHeight !== undefined) { + localVarQueryParameters['maxHeight'] = ObjectSerializer.serialize(maxHeight, "number"); + } + + if (percentPlayed !== undefined) { + localVarQueryParameters['percentPlayed'] = ObjectSerializer.serialize(percentPlayed, "number"); + } + + if (unplayedCount !== undefined) { + localVarQueryParameters['unplayedCount'] = ObjectSerializer.serialize(unplayedCount, "number"); + } + + if (width !== undefined) { + localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number"); + } + + if (height !== undefined) { + localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number"); + } + + if (quality !== undefined) { + localVarQueryParameters['quality'] = ObjectSerializer.serialize(quality, "number"); + } + + if (fillWidth !== undefined) { + localVarQueryParameters['fillWidth'] = ObjectSerializer.serialize(fillWidth, "number"); + } + + if (fillHeight !== undefined) { + localVarQueryParameters['fillHeight'] = ObjectSerializer.serialize(fillHeight, "number"); + } + + if (cropWhitespace !== undefined) { + localVarQueryParameters['cropWhitespace'] = ObjectSerializer.serialize(cropWhitespace, "boolean"); + } + + if (addPlayedIndicator !== undefined) { + localVarQueryParameters['addPlayedIndicator'] = ObjectSerializer.serialize(addPlayedIndicator, "boolean"); + } + + if (blur !== undefined) { + localVarQueryParameters['blur'] = ObjectSerializer.serialize(blur, "number"); + } + + if (backgroundColor !== undefined) { + localVarQueryParameters['backgroundColor'] = ObjectSerializer.serialize(backgroundColor, "string"); + } + + if (foregroundLayer !== undefined) { + localVarQueryParameters['foregroundLayer'] = ObjectSerializer.serialize(foregroundLayer, "string"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Get person image by name. + * @param name Person name. + * @param imageType Image type. + * @param tag Optional. Supply the cache tag from the item object to receive strong caching headers. + * @param format Determines the output format of the image - original,gif,jpg,png. + * @param maxWidth The maximum image width to return. + * @param maxHeight The maximum image height to return. + * @param percentPlayed Optional. Percent to render for the percent played overlay. + * @param unplayedCount Optional. Unplayed count overlay to render. + * @param width The fixed image width to return. + * @param height The fixed image height to return. + * @param quality Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases. + * @param fillWidth Width of box to fill. + * @param fillHeight Height of box to fill. + * @param cropWhitespace Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art. + * @param addPlayedIndicator Optional. Add a played indicator. + * @param blur Optional. Blur image. + * @param backgroundColor Optional. Apply a background color for transparent images. + * @param foregroundLayer Optional. Apply a foreground layer on top of the image. + * @param imageIndex Image index. + */ + public async getPersonImage (name: string, imageType: ImageType, tag?: string, format?: ImageFormat, maxWidth?: number, maxHeight?: number, percentPlayed?: number, unplayedCount?: number, width?: number, height?: number, quality?: number, fillWidth?: number, fillHeight?: number, cropWhitespace?: boolean, addPlayedIndicator?: boolean, blur?: number, backgroundColor?: string, foregroundLayer?: string, imageIndex?: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/Persons/{name}/Images/{imageType}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'imageType' + '}', encodeURIComponent(String(imageType))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['image/*', 'application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling getPersonImage.'); + } + + // verify required parameter 'imageType' is not null or undefined + if (imageType === null || imageType === undefined) { + throw new Error('Required parameter imageType was null or undefined when calling getPersonImage.'); + } + + if (tag !== undefined) { + localVarQueryParameters['tag'] = ObjectSerializer.serialize(tag, "string"); + } + + if (format !== undefined) { + localVarQueryParameters['format'] = ObjectSerializer.serialize(format, "ImageFormat"); + } + + if (maxWidth !== undefined) { + localVarQueryParameters['maxWidth'] = ObjectSerializer.serialize(maxWidth, "number"); + } + + if (maxHeight !== undefined) { + localVarQueryParameters['maxHeight'] = ObjectSerializer.serialize(maxHeight, "number"); + } + + if (percentPlayed !== undefined) { + localVarQueryParameters['percentPlayed'] = ObjectSerializer.serialize(percentPlayed, "number"); + } + + if (unplayedCount !== undefined) { + localVarQueryParameters['unplayedCount'] = ObjectSerializer.serialize(unplayedCount, "number"); + } + + if (width !== undefined) { + localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number"); + } + + if (height !== undefined) { + localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number"); + } + + if (quality !== undefined) { + localVarQueryParameters['quality'] = ObjectSerializer.serialize(quality, "number"); + } + + if (fillWidth !== undefined) { + localVarQueryParameters['fillWidth'] = ObjectSerializer.serialize(fillWidth, "number"); + } + + if (fillHeight !== undefined) { + localVarQueryParameters['fillHeight'] = ObjectSerializer.serialize(fillHeight, "number"); + } + + if (cropWhitespace !== undefined) { + localVarQueryParameters['cropWhitespace'] = ObjectSerializer.serialize(cropWhitespace, "boolean"); + } + + if (addPlayedIndicator !== undefined) { + localVarQueryParameters['addPlayedIndicator'] = ObjectSerializer.serialize(addPlayedIndicator, "boolean"); + } + + if (blur !== undefined) { + localVarQueryParameters['blur'] = ObjectSerializer.serialize(blur, "number"); + } + + if (backgroundColor !== undefined) { + localVarQueryParameters['backgroundColor'] = ObjectSerializer.serialize(backgroundColor, "string"); + } + + if (foregroundLayer !== undefined) { + localVarQueryParameters['foregroundLayer'] = ObjectSerializer.serialize(foregroundLayer, "string"); + } + + if (imageIndex !== undefined) { + localVarQueryParameters['imageIndex'] = ObjectSerializer.serialize(imageIndex, "number"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Get person image by name. + * @param name Person name. + * @param imageType Image type. + * @param imageIndex Image index. + * @param tag Optional. Supply the cache tag from the item object to receive strong caching headers. + * @param format Determines the output format of the image - original,gif,jpg,png. + * @param maxWidth The maximum image width to return. + * @param maxHeight The maximum image height to return. + * @param percentPlayed Optional. Percent to render for the percent played overlay. + * @param unplayedCount Optional. Unplayed count overlay to render. + * @param width The fixed image width to return. + * @param height The fixed image height to return. + * @param quality Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases. + * @param fillWidth Width of box to fill. + * @param fillHeight Height of box to fill. + * @param cropWhitespace Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art. + * @param addPlayedIndicator Optional. Add a played indicator. + * @param blur Optional. Blur image. + * @param backgroundColor Optional. Apply a background color for transparent images. + * @param foregroundLayer Optional. Apply a foreground layer on top of the image. + */ + public async getPersonImageByIndex (name: string, imageType: ImageType, imageIndex: number, tag?: string, format?: ImageFormat, maxWidth?: number, maxHeight?: number, percentPlayed?: number, unplayedCount?: number, width?: number, height?: number, quality?: number, fillWidth?: number, fillHeight?: number, cropWhitespace?: boolean, addPlayedIndicator?: boolean, blur?: number, backgroundColor?: string, foregroundLayer?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/Persons/{name}/Images/{imageType}/{imageIndex}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'imageType' + '}', encodeURIComponent(String(imageType))) + .replace('{' + 'imageIndex' + '}', encodeURIComponent(String(imageIndex))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['image/*', 'application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling getPersonImageByIndex.'); + } + + // verify required parameter 'imageType' is not null or undefined + if (imageType === null || imageType === undefined) { + throw new Error('Required parameter imageType was null or undefined when calling getPersonImageByIndex.'); + } + + // verify required parameter 'imageIndex' is not null or undefined + if (imageIndex === null || imageIndex === undefined) { + throw new Error('Required parameter imageIndex was null or undefined when calling getPersonImageByIndex.'); + } + + if (tag !== undefined) { + localVarQueryParameters['tag'] = ObjectSerializer.serialize(tag, "string"); + } + + if (format !== undefined) { + localVarQueryParameters['format'] = ObjectSerializer.serialize(format, "ImageFormat"); + } + + if (maxWidth !== undefined) { + localVarQueryParameters['maxWidth'] = ObjectSerializer.serialize(maxWidth, "number"); + } + + if (maxHeight !== undefined) { + localVarQueryParameters['maxHeight'] = ObjectSerializer.serialize(maxHeight, "number"); + } + + if (percentPlayed !== undefined) { + localVarQueryParameters['percentPlayed'] = ObjectSerializer.serialize(percentPlayed, "number"); + } + + if (unplayedCount !== undefined) { + localVarQueryParameters['unplayedCount'] = ObjectSerializer.serialize(unplayedCount, "number"); + } + + if (width !== undefined) { + localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number"); + } + + if (height !== undefined) { + localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number"); + } + + if (quality !== undefined) { + localVarQueryParameters['quality'] = ObjectSerializer.serialize(quality, "number"); + } + + if (fillWidth !== undefined) { + localVarQueryParameters['fillWidth'] = ObjectSerializer.serialize(fillWidth, "number"); + } + + if (fillHeight !== undefined) { + localVarQueryParameters['fillHeight'] = ObjectSerializer.serialize(fillHeight, "number"); + } + + if (cropWhitespace !== undefined) { + localVarQueryParameters['cropWhitespace'] = ObjectSerializer.serialize(cropWhitespace, "boolean"); + } + + if (addPlayedIndicator !== undefined) { + localVarQueryParameters['addPlayedIndicator'] = ObjectSerializer.serialize(addPlayedIndicator, "boolean"); + } + + if (blur !== undefined) { + localVarQueryParameters['blur'] = ObjectSerializer.serialize(blur, "number"); + } + + if (backgroundColor !== undefined) { + localVarQueryParameters['backgroundColor'] = ObjectSerializer.serialize(backgroundColor, "string"); + } + + if (foregroundLayer !== undefined) { + localVarQueryParameters['foregroundLayer'] = ObjectSerializer.serialize(foregroundLayer, "string"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Generates or gets the splashscreen. + * @param tag Supply the cache tag from the item object to receive strong caching headers. + * @param format Determines the output format of the image - original,gif,jpg,png. + * @param maxWidth The maximum image width to return. + * @param maxHeight The maximum image height to return. + * @param width The fixed image width to return. + * @param height The fixed image height to return. + * @param fillWidth Width of box to fill. + * @param fillHeight Height of box to fill. + * @param blur Blur image. + * @param backgroundColor Apply a background color for transparent images. + * @param foregroundLayer Apply a foreground layer on top of the image. + * @param quality Quality setting, from 0-100. + */ + public async getSplashscreen (tag?: string, format?: ImageFormat, maxWidth?: number, maxHeight?: number, width?: number, height?: number, fillWidth?: number, fillHeight?: number, blur?: number, backgroundColor?: string, foregroundLayer?: string, quality?: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/Branding/Splashscreen'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['image/*']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + if (tag !== undefined) { + localVarQueryParameters['tag'] = ObjectSerializer.serialize(tag, "string"); + } + + if (format !== undefined) { + localVarQueryParameters['format'] = ObjectSerializer.serialize(format, "ImageFormat"); + } + + if (maxWidth !== undefined) { + localVarQueryParameters['maxWidth'] = ObjectSerializer.serialize(maxWidth, "number"); + } + + if (maxHeight !== undefined) { + localVarQueryParameters['maxHeight'] = ObjectSerializer.serialize(maxHeight, "number"); + } + + if (width !== undefined) { + localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number"); + } + + if (height !== undefined) { + localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number"); + } + + if (fillWidth !== undefined) { + localVarQueryParameters['fillWidth'] = ObjectSerializer.serialize(fillWidth, "number"); + } + + if (fillHeight !== undefined) { + localVarQueryParameters['fillHeight'] = ObjectSerializer.serialize(fillHeight, "number"); + } + + if (blur !== undefined) { + localVarQueryParameters['blur'] = ObjectSerializer.serialize(blur, "number"); + } + + if (backgroundColor !== undefined) { + localVarQueryParameters['backgroundColor'] = ObjectSerializer.serialize(backgroundColor, "string"); + } + + if (foregroundLayer !== undefined) { + localVarQueryParameters['foregroundLayer'] = ObjectSerializer.serialize(foregroundLayer, "string"); + } + + if (quality !== undefined) { + localVarQueryParameters['quality'] = ObjectSerializer.serialize(quality, "number"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Get studio image by name. + * @param name Studio name. + * @param imageType Image type. + * @param tag Optional. Supply the cache tag from the item object to receive strong caching headers. + * @param format Determines the output format of the image - original,gif,jpg,png. + * @param maxWidth The maximum image width to return. + * @param maxHeight The maximum image height to return. + * @param percentPlayed Optional. Percent to render for the percent played overlay. + * @param unplayedCount Optional. Unplayed count overlay to render. + * @param width The fixed image width to return. + * @param height The fixed image height to return. + * @param quality Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases. + * @param fillWidth Width of box to fill. + * @param fillHeight Height of box to fill. + * @param cropWhitespace Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art. + * @param addPlayedIndicator Optional. Add a played indicator. + * @param blur Optional. Blur image. + * @param backgroundColor Optional. Apply a background color for transparent images. + * @param foregroundLayer Optional. Apply a foreground layer on top of the image. + * @param imageIndex Image index. + */ + public async getStudioImage (name: string, imageType: ImageType, tag?: string, format?: ImageFormat, maxWidth?: number, maxHeight?: number, percentPlayed?: number, unplayedCount?: number, width?: number, height?: number, quality?: number, fillWidth?: number, fillHeight?: number, cropWhitespace?: boolean, addPlayedIndicator?: boolean, blur?: number, backgroundColor?: string, foregroundLayer?: string, imageIndex?: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/Studios/{name}/Images/{imageType}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'imageType' + '}', encodeURIComponent(String(imageType))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['image/*', 'application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling getStudioImage.'); + } + + // verify required parameter 'imageType' is not null or undefined + if (imageType === null || imageType === undefined) { + throw new Error('Required parameter imageType was null or undefined when calling getStudioImage.'); + } + + if (tag !== undefined) { + localVarQueryParameters['tag'] = ObjectSerializer.serialize(tag, "string"); + } + + if (format !== undefined) { + localVarQueryParameters['format'] = ObjectSerializer.serialize(format, "ImageFormat"); + } + + if (maxWidth !== undefined) { + localVarQueryParameters['maxWidth'] = ObjectSerializer.serialize(maxWidth, "number"); + } + + if (maxHeight !== undefined) { + localVarQueryParameters['maxHeight'] = ObjectSerializer.serialize(maxHeight, "number"); + } + + if (percentPlayed !== undefined) { + localVarQueryParameters['percentPlayed'] = ObjectSerializer.serialize(percentPlayed, "number"); + } + + if (unplayedCount !== undefined) { + localVarQueryParameters['unplayedCount'] = ObjectSerializer.serialize(unplayedCount, "number"); + } + + if (width !== undefined) { + localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number"); + } + + if (height !== undefined) { + localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number"); + } + + if (quality !== undefined) { + localVarQueryParameters['quality'] = ObjectSerializer.serialize(quality, "number"); + } + + if (fillWidth !== undefined) { + localVarQueryParameters['fillWidth'] = ObjectSerializer.serialize(fillWidth, "number"); + } + + if (fillHeight !== undefined) { + localVarQueryParameters['fillHeight'] = ObjectSerializer.serialize(fillHeight, "number"); + } + + if (cropWhitespace !== undefined) { + localVarQueryParameters['cropWhitespace'] = ObjectSerializer.serialize(cropWhitespace, "boolean"); + } + + if (addPlayedIndicator !== undefined) { + localVarQueryParameters['addPlayedIndicator'] = ObjectSerializer.serialize(addPlayedIndicator, "boolean"); + } + + if (blur !== undefined) { + localVarQueryParameters['blur'] = ObjectSerializer.serialize(blur, "number"); + } + + if (backgroundColor !== undefined) { + localVarQueryParameters['backgroundColor'] = ObjectSerializer.serialize(backgroundColor, "string"); + } + + if (foregroundLayer !== undefined) { + localVarQueryParameters['foregroundLayer'] = ObjectSerializer.serialize(foregroundLayer, "string"); + } + + if (imageIndex !== undefined) { + localVarQueryParameters['imageIndex'] = ObjectSerializer.serialize(imageIndex, "number"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Get studio image by name. + * @param name Studio name. + * @param imageType Image type. + * @param imageIndex Image index. + * @param tag Optional. Supply the cache tag from the item object to receive strong caching headers. + * @param format Determines the output format of the image - original,gif,jpg,png. + * @param maxWidth The maximum image width to return. + * @param maxHeight The maximum image height to return. + * @param percentPlayed Optional. Percent to render for the percent played overlay. + * @param unplayedCount Optional. Unplayed count overlay to render. + * @param width The fixed image width to return. + * @param height The fixed image height to return. + * @param quality Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases. + * @param fillWidth Width of box to fill. + * @param fillHeight Height of box to fill. + * @param cropWhitespace Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art. + * @param addPlayedIndicator Optional. Add a played indicator. + * @param blur Optional. Blur image. + * @param backgroundColor Optional. Apply a background color for transparent images. + * @param foregroundLayer Optional. Apply a foreground layer on top of the image. + */ + public async getStudioImageByIndex (name: string, imageType: ImageType, imageIndex: number, tag?: string, format?: ImageFormat, maxWidth?: number, maxHeight?: number, percentPlayed?: number, unplayedCount?: number, width?: number, height?: number, quality?: number, fillWidth?: number, fillHeight?: number, cropWhitespace?: boolean, addPlayedIndicator?: boolean, blur?: number, backgroundColor?: string, foregroundLayer?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/Studios/{name}/Images/{imageType}/{imageIndex}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'imageType' + '}', encodeURIComponent(String(imageType))) + .replace('{' + 'imageIndex' + '}', encodeURIComponent(String(imageIndex))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['image/*', 'application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling getStudioImageByIndex.'); + } + + // verify required parameter 'imageType' is not null or undefined + if (imageType === null || imageType === undefined) { + throw new Error('Required parameter imageType was null or undefined when calling getStudioImageByIndex.'); + } + + // verify required parameter 'imageIndex' is not null or undefined + if (imageIndex === null || imageIndex === undefined) { + throw new Error('Required parameter imageIndex was null or undefined when calling getStudioImageByIndex.'); + } + + if (tag !== undefined) { + localVarQueryParameters['tag'] = ObjectSerializer.serialize(tag, "string"); + } + + if (format !== undefined) { + localVarQueryParameters['format'] = ObjectSerializer.serialize(format, "ImageFormat"); + } + + if (maxWidth !== undefined) { + localVarQueryParameters['maxWidth'] = ObjectSerializer.serialize(maxWidth, "number"); + } + + if (maxHeight !== undefined) { + localVarQueryParameters['maxHeight'] = ObjectSerializer.serialize(maxHeight, "number"); + } + + if (percentPlayed !== undefined) { + localVarQueryParameters['percentPlayed'] = ObjectSerializer.serialize(percentPlayed, "number"); + } + + if (unplayedCount !== undefined) { + localVarQueryParameters['unplayedCount'] = ObjectSerializer.serialize(unplayedCount, "number"); + } + + if (width !== undefined) { + localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number"); + } + + if (height !== undefined) { + localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number"); + } + + if (quality !== undefined) { + localVarQueryParameters['quality'] = ObjectSerializer.serialize(quality, "number"); + } + + if (fillWidth !== undefined) { + localVarQueryParameters['fillWidth'] = ObjectSerializer.serialize(fillWidth, "number"); + } + + if (fillHeight !== undefined) { + localVarQueryParameters['fillHeight'] = ObjectSerializer.serialize(fillHeight, "number"); + } + + if (cropWhitespace !== undefined) { + localVarQueryParameters['cropWhitespace'] = ObjectSerializer.serialize(cropWhitespace, "boolean"); + } + + if (addPlayedIndicator !== undefined) { + localVarQueryParameters['addPlayedIndicator'] = ObjectSerializer.serialize(addPlayedIndicator, "boolean"); + } + + if (blur !== undefined) { + localVarQueryParameters['blur'] = ObjectSerializer.serialize(blur, "number"); + } + + if (backgroundColor !== undefined) { + localVarQueryParameters['backgroundColor'] = ObjectSerializer.serialize(backgroundColor, "string"); + } + + if (foregroundLayer !== undefined) { + localVarQueryParameters['foregroundLayer'] = ObjectSerializer.serialize(foregroundLayer, "string"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Get user profile image. + * @param userId User id. + * @param imageType Image type. + * @param tag Optional. Supply the cache tag from the item object to receive strong caching headers. + * @param format Determines the output format of the image - original,gif,jpg,png. + * @param maxWidth The maximum image width to return. + * @param maxHeight The maximum image height to return. + * @param percentPlayed Optional. Percent to render for the percent played overlay. + * @param unplayedCount Optional. Unplayed count overlay to render. + * @param width The fixed image width to return. + * @param height The fixed image height to return. + * @param quality Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases. + * @param fillWidth Width of box to fill. + * @param fillHeight Height of box to fill. + * @param cropWhitespace Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art. + * @param addPlayedIndicator Optional. Add a played indicator. + * @param blur Optional. Blur image. + * @param backgroundColor Optional. Apply a background color for transparent images. + * @param foregroundLayer Optional. Apply a foreground layer on top of the image. + * @param imageIndex Image index. + */ + public async getUserImage (userId: string, imageType: ImageType, tag?: string, format?: ImageFormat, maxWidth?: number, maxHeight?: number, percentPlayed?: number, unplayedCount?: number, width?: number, height?: number, quality?: number, fillWidth?: number, fillHeight?: number, cropWhitespace?: boolean, addPlayedIndicator?: boolean, blur?: number, backgroundColor?: string, foregroundLayer?: string, imageIndex?: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/Users/{userId}/Images/{imageType}' + .replace('{' + 'userId' + '}', encodeURIComponent(String(userId))) + .replace('{' + 'imageType' + '}', encodeURIComponent(String(imageType))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['image/*', 'application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'userId' is not null or undefined + if (userId === null || userId === undefined) { + throw new Error('Required parameter userId was null or undefined when calling getUserImage.'); + } + + // verify required parameter 'imageType' is not null or undefined + if (imageType === null || imageType === undefined) { + throw new Error('Required parameter imageType was null or undefined when calling getUserImage.'); + } + + if (tag !== undefined) { + localVarQueryParameters['tag'] = ObjectSerializer.serialize(tag, "string"); + } + + if (format !== undefined) { + localVarQueryParameters['format'] = ObjectSerializer.serialize(format, "ImageFormat"); + } + + if (maxWidth !== undefined) { + localVarQueryParameters['maxWidth'] = ObjectSerializer.serialize(maxWidth, "number"); + } + + if (maxHeight !== undefined) { + localVarQueryParameters['maxHeight'] = ObjectSerializer.serialize(maxHeight, "number"); + } + + if (percentPlayed !== undefined) { + localVarQueryParameters['percentPlayed'] = ObjectSerializer.serialize(percentPlayed, "number"); + } + + if (unplayedCount !== undefined) { + localVarQueryParameters['unplayedCount'] = ObjectSerializer.serialize(unplayedCount, "number"); + } + + if (width !== undefined) { + localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number"); + } + + if (height !== undefined) { + localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number"); + } + + if (quality !== undefined) { + localVarQueryParameters['quality'] = ObjectSerializer.serialize(quality, "number"); + } + + if (fillWidth !== undefined) { + localVarQueryParameters['fillWidth'] = ObjectSerializer.serialize(fillWidth, "number"); + } + + if (fillHeight !== undefined) { + localVarQueryParameters['fillHeight'] = ObjectSerializer.serialize(fillHeight, "number"); + } + + if (cropWhitespace !== undefined) { + localVarQueryParameters['cropWhitespace'] = ObjectSerializer.serialize(cropWhitespace, "boolean"); + } + + if (addPlayedIndicator !== undefined) { + localVarQueryParameters['addPlayedIndicator'] = ObjectSerializer.serialize(addPlayedIndicator, "boolean"); + } + + if (blur !== undefined) { + localVarQueryParameters['blur'] = ObjectSerializer.serialize(blur, "number"); + } + + if (backgroundColor !== undefined) { + localVarQueryParameters['backgroundColor'] = ObjectSerializer.serialize(backgroundColor, "string"); + } + + if (foregroundLayer !== undefined) { + localVarQueryParameters['foregroundLayer'] = ObjectSerializer.serialize(foregroundLayer, "string"); + } + + if (imageIndex !== undefined) { + localVarQueryParameters['imageIndex'] = ObjectSerializer.serialize(imageIndex, "number"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Get user profile image. + * @param userId User id. + * @param imageType Image type. + * @param imageIndex Image index. + * @param tag Optional. Supply the cache tag from the item object to receive strong caching headers. + * @param format Determines the output format of the image - original,gif,jpg,png. + * @param maxWidth The maximum image width to return. + * @param maxHeight The maximum image height to return. + * @param percentPlayed Optional. Percent to render for the percent played overlay. + * @param unplayedCount Optional. Unplayed count overlay to render. + * @param width The fixed image width to return. + * @param height The fixed image height to return. + * @param quality Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases. + * @param fillWidth Width of box to fill. + * @param fillHeight Height of box to fill. + * @param cropWhitespace Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art. + * @param addPlayedIndicator Optional. Add a played indicator. + * @param blur Optional. Blur image. + * @param backgroundColor Optional. Apply a background color for transparent images. + * @param foregroundLayer Optional. Apply a foreground layer on top of the image. + */ + public async getUserImageByIndex (userId: string, imageType: ImageType, imageIndex: number, tag?: string, format?: ImageFormat, maxWidth?: number, maxHeight?: number, percentPlayed?: number, unplayedCount?: number, width?: number, height?: number, quality?: number, fillWidth?: number, fillHeight?: number, cropWhitespace?: boolean, addPlayedIndicator?: boolean, blur?: number, backgroundColor?: string, foregroundLayer?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/Users/{userId}/Images/{imageType}/{imageIndex}' + .replace('{' + 'userId' + '}', encodeURIComponent(String(userId))) + .replace('{' + 'imageType' + '}', encodeURIComponent(String(imageType))) + .replace('{' + 'imageIndex' + '}', encodeURIComponent(String(imageIndex))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['image/*', 'application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'userId' is not null or undefined + if (userId === null || userId === undefined) { + throw new Error('Required parameter userId was null or undefined when calling getUserImageByIndex.'); + } + + // verify required parameter 'imageType' is not null or undefined + if (imageType === null || imageType === undefined) { + throw new Error('Required parameter imageType was null or undefined when calling getUserImageByIndex.'); + } + + // verify required parameter 'imageIndex' is not null or undefined + if (imageIndex === null || imageIndex === undefined) { + throw new Error('Required parameter imageIndex was null or undefined when calling getUserImageByIndex.'); + } + + if (tag !== undefined) { + localVarQueryParameters['tag'] = ObjectSerializer.serialize(tag, "string"); + } + + if (format !== undefined) { + localVarQueryParameters['format'] = ObjectSerializer.serialize(format, "ImageFormat"); + } + + if (maxWidth !== undefined) { + localVarQueryParameters['maxWidth'] = ObjectSerializer.serialize(maxWidth, "number"); + } + + if (maxHeight !== undefined) { + localVarQueryParameters['maxHeight'] = ObjectSerializer.serialize(maxHeight, "number"); + } + + if (percentPlayed !== undefined) { + localVarQueryParameters['percentPlayed'] = ObjectSerializer.serialize(percentPlayed, "number"); + } + + if (unplayedCount !== undefined) { + localVarQueryParameters['unplayedCount'] = ObjectSerializer.serialize(unplayedCount, "number"); + } + + if (width !== undefined) { + localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number"); + } + + if (height !== undefined) { + localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number"); + } + + if (quality !== undefined) { + localVarQueryParameters['quality'] = ObjectSerializer.serialize(quality, "number"); + } + + if (fillWidth !== undefined) { + localVarQueryParameters['fillWidth'] = ObjectSerializer.serialize(fillWidth, "number"); + } + + if (fillHeight !== undefined) { + localVarQueryParameters['fillHeight'] = ObjectSerializer.serialize(fillHeight, "number"); + } + + if (cropWhitespace !== undefined) { + localVarQueryParameters['cropWhitespace'] = ObjectSerializer.serialize(cropWhitespace, "boolean"); + } + + if (addPlayedIndicator !== undefined) { + localVarQueryParameters['addPlayedIndicator'] = ObjectSerializer.serialize(addPlayedIndicator, "boolean"); + } + + if (blur !== undefined) { + localVarQueryParameters['blur'] = ObjectSerializer.serialize(blur, "number"); + } + + if (backgroundColor !== undefined) { + localVarQueryParameters['backgroundColor'] = ObjectSerializer.serialize(backgroundColor, "string"); + } + + if (foregroundLayer !== undefined) { + localVarQueryParameters['foregroundLayer'] = ObjectSerializer.serialize(foregroundLayer, "string"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Get artist image by name. + * @param name Artist name. + * @param imageType Image type. + * @param imageIndex Image index. + * @param tag Optional. Supply the cache tag from the item object to receive strong caching headers. + * @param format Determines the output format of the image - original,gif,jpg,png. + * @param maxWidth The maximum image width to return. + * @param maxHeight The maximum image height to return. + * @param percentPlayed Optional. Percent to render for the percent played overlay. + * @param unplayedCount Optional. Unplayed count overlay to render. + * @param width The fixed image width to return. + * @param height The fixed image height to return. + * @param quality Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases. + * @param fillWidth Width of box to fill. + * @param fillHeight Height of box to fill. + * @param cropWhitespace Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art. + * @param addPlayedIndicator Optional. Add a played indicator. + * @param blur Optional. Blur image. + * @param backgroundColor Optional. Apply a background color for transparent images. + * @param foregroundLayer Optional. Apply a foreground layer on top of the image. + */ + public async headArtistImage (name: string, imageType: ImageType, imageIndex: number, tag?: string, format?: ImageFormat, maxWidth?: number, maxHeight?: number, percentPlayed?: number, unplayedCount?: number, width?: number, height?: number, quality?: number, fillWidth?: number, fillHeight?: number, cropWhitespace?: boolean, addPlayedIndicator?: boolean, blur?: number, backgroundColor?: string, foregroundLayer?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/Artists/{name}/Images/{imageType}/{imageIndex}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'imageType' + '}', encodeURIComponent(String(imageType))) + .replace('{' + 'imageIndex' + '}', encodeURIComponent(String(imageIndex))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['image/*', 'application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling headArtistImage.'); + } + + // verify required parameter 'imageType' is not null or undefined + if (imageType === null || imageType === undefined) { + throw new Error('Required parameter imageType was null or undefined when calling headArtistImage.'); + } + + // verify required parameter 'imageIndex' is not null or undefined + if (imageIndex === null || imageIndex === undefined) { + throw new Error('Required parameter imageIndex was null or undefined when calling headArtistImage.'); + } + + if (tag !== undefined) { + localVarQueryParameters['tag'] = ObjectSerializer.serialize(tag, "string"); + } + + if (format !== undefined) { + localVarQueryParameters['format'] = ObjectSerializer.serialize(format, "ImageFormat"); + } + + if (maxWidth !== undefined) { + localVarQueryParameters['maxWidth'] = ObjectSerializer.serialize(maxWidth, "number"); + } + + if (maxHeight !== undefined) { + localVarQueryParameters['maxHeight'] = ObjectSerializer.serialize(maxHeight, "number"); + } + + if (percentPlayed !== undefined) { + localVarQueryParameters['percentPlayed'] = ObjectSerializer.serialize(percentPlayed, "number"); + } + + if (unplayedCount !== undefined) { + localVarQueryParameters['unplayedCount'] = ObjectSerializer.serialize(unplayedCount, "number"); + } + + if (width !== undefined) { + localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number"); + } + + if (height !== undefined) { + localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number"); + } + + if (quality !== undefined) { + localVarQueryParameters['quality'] = ObjectSerializer.serialize(quality, "number"); + } + + if (fillWidth !== undefined) { + localVarQueryParameters['fillWidth'] = ObjectSerializer.serialize(fillWidth, "number"); + } + + if (fillHeight !== undefined) { + localVarQueryParameters['fillHeight'] = ObjectSerializer.serialize(fillHeight, "number"); + } + + if (cropWhitespace !== undefined) { + localVarQueryParameters['cropWhitespace'] = ObjectSerializer.serialize(cropWhitespace, "boolean"); + } + + if (addPlayedIndicator !== undefined) { + localVarQueryParameters['addPlayedIndicator'] = ObjectSerializer.serialize(addPlayedIndicator, "boolean"); + } + + if (blur !== undefined) { + localVarQueryParameters['blur'] = ObjectSerializer.serialize(blur, "number"); + } + + if (backgroundColor !== undefined) { + localVarQueryParameters['backgroundColor'] = ObjectSerializer.serialize(backgroundColor, "string"); + } + + if (foregroundLayer !== undefined) { + localVarQueryParameters['foregroundLayer'] = ObjectSerializer.serialize(foregroundLayer, "string"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'HEAD', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Get genre image by name. + * @param name Genre name. + * @param imageType Image type. + * @param tag Optional. Supply the cache tag from the item object to receive strong caching headers. + * @param format Determines the output format of the image - original,gif,jpg,png. + * @param maxWidth The maximum image width to return. + * @param maxHeight The maximum image height to return. + * @param percentPlayed Optional. Percent to render for the percent played overlay. + * @param unplayedCount Optional. Unplayed count overlay to render. + * @param width The fixed image width to return. + * @param height The fixed image height to return. + * @param quality Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases. + * @param fillWidth Width of box to fill. + * @param fillHeight Height of box to fill. + * @param cropWhitespace Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art. + * @param addPlayedIndicator Optional. Add a played indicator. + * @param blur Optional. Blur image. + * @param backgroundColor Optional. Apply a background color for transparent images. + * @param foregroundLayer Optional. Apply a foreground layer on top of the image. + * @param imageIndex Image index. + */ + public async headGenreImage (name: string, imageType: ImageType, tag?: string, format?: ImageFormat, maxWidth?: number, maxHeight?: number, percentPlayed?: number, unplayedCount?: number, width?: number, height?: number, quality?: number, fillWidth?: number, fillHeight?: number, cropWhitespace?: boolean, addPlayedIndicator?: boolean, blur?: number, backgroundColor?: string, foregroundLayer?: string, imageIndex?: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/Genres/{name}/Images/{imageType}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'imageType' + '}', encodeURIComponent(String(imageType))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['image/*', 'application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling headGenreImage.'); + } + + // verify required parameter 'imageType' is not null or undefined + if (imageType === null || imageType === undefined) { + throw new Error('Required parameter imageType was null or undefined when calling headGenreImage.'); + } + + if (tag !== undefined) { + localVarQueryParameters['tag'] = ObjectSerializer.serialize(tag, "string"); + } + + if (format !== undefined) { + localVarQueryParameters['format'] = ObjectSerializer.serialize(format, "ImageFormat"); + } + + if (maxWidth !== undefined) { + localVarQueryParameters['maxWidth'] = ObjectSerializer.serialize(maxWidth, "number"); + } + + if (maxHeight !== undefined) { + localVarQueryParameters['maxHeight'] = ObjectSerializer.serialize(maxHeight, "number"); + } + + if (percentPlayed !== undefined) { + localVarQueryParameters['percentPlayed'] = ObjectSerializer.serialize(percentPlayed, "number"); + } + + if (unplayedCount !== undefined) { + localVarQueryParameters['unplayedCount'] = ObjectSerializer.serialize(unplayedCount, "number"); + } + + if (width !== undefined) { + localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number"); + } + + if (height !== undefined) { + localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number"); + } + + if (quality !== undefined) { + localVarQueryParameters['quality'] = ObjectSerializer.serialize(quality, "number"); + } + + if (fillWidth !== undefined) { + localVarQueryParameters['fillWidth'] = ObjectSerializer.serialize(fillWidth, "number"); + } + + if (fillHeight !== undefined) { + localVarQueryParameters['fillHeight'] = ObjectSerializer.serialize(fillHeight, "number"); + } + + if (cropWhitespace !== undefined) { + localVarQueryParameters['cropWhitespace'] = ObjectSerializer.serialize(cropWhitespace, "boolean"); + } + + if (addPlayedIndicator !== undefined) { + localVarQueryParameters['addPlayedIndicator'] = ObjectSerializer.serialize(addPlayedIndicator, "boolean"); + } + + if (blur !== undefined) { + localVarQueryParameters['blur'] = ObjectSerializer.serialize(blur, "number"); + } + + if (backgroundColor !== undefined) { + localVarQueryParameters['backgroundColor'] = ObjectSerializer.serialize(backgroundColor, "string"); + } + + if (foregroundLayer !== undefined) { + localVarQueryParameters['foregroundLayer'] = ObjectSerializer.serialize(foregroundLayer, "string"); + } + + if (imageIndex !== undefined) { + localVarQueryParameters['imageIndex'] = ObjectSerializer.serialize(imageIndex, "number"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'HEAD', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Get genre image by name. + * @param name Genre name. + * @param imageType Image type. + * @param imageIndex Image index. + * @param tag Optional. Supply the cache tag from the item object to receive strong caching headers. + * @param format Determines the output format of the image - original,gif,jpg,png. + * @param maxWidth The maximum image width to return. + * @param maxHeight The maximum image height to return. + * @param percentPlayed Optional. Percent to render for the percent played overlay. + * @param unplayedCount Optional. Unplayed count overlay to render. + * @param width The fixed image width to return. + * @param height The fixed image height to return. + * @param quality Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases. + * @param fillWidth Width of box to fill. + * @param fillHeight Height of box to fill. + * @param cropWhitespace Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art. + * @param addPlayedIndicator Optional. Add a played indicator. + * @param blur Optional. Blur image. + * @param backgroundColor Optional. Apply a background color for transparent images. + * @param foregroundLayer Optional. Apply a foreground layer on top of the image. + */ + public async headGenreImageByIndex (name: string, imageType: ImageType, imageIndex: number, tag?: string, format?: ImageFormat, maxWidth?: number, maxHeight?: number, percentPlayed?: number, unplayedCount?: number, width?: number, height?: number, quality?: number, fillWidth?: number, fillHeight?: number, cropWhitespace?: boolean, addPlayedIndicator?: boolean, blur?: number, backgroundColor?: string, foregroundLayer?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/Genres/{name}/Images/{imageType}/{imageIndex}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'imageType' + '}', encodeURIComponent(String(imageType))) + .replace('{' + 'imageIndex' + '}', encodeURIComponent(String(imageIndex))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['image/*', 'application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling headGenreImageByIndex.'); + } + + // verify required parameter 'imageType' is not null or undefined + if (imageType === null || imageType === undefined) { + throw new Error('Required parameter imageType was null or undefined when calling headGenreImageByIndex.'); + } + + // verify required parameter 'imageIndex' is not null or undefined + if (imageIndex === null || imageIndex === undefined) { + throw new Error('Required parameter imageIndex was null or undefined when calling headGenreImageByIndex.'); + } + + if (tag !== undefined) { + localVarQueryParameters['tag'] = ObjectSerializer.serialize(tag, "string"); + } + + if (format !== undefined) { + localVarQueryParameters['format'] = ObjectSerializer.serialize(format, "ImageFormat"); + } + + if (maxWidth !== undefined) { + localVarQueryParameters['maxWidth'] = ObjectSerializer.serialize(maxWidth, "number"); + } + + if (maxHeight !== undefined) { + localVarQueryParameters['maxHeight'] = ObjectSerializer.serialize(maxHeight, "number"); + } + + if (percentPlayed !== undefined) { + localVarQueryParameters['percentPlayed'] = ObjectSerializer.serialize(percentPlayed, "number"); + } + + if (unplayedCount !== undefined) { + localVarQueryParameters['unplayedCount'] = ObjectSerializer.serialize(unplayedCount, "number"); + } + + if (width !== undefined) { + localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number"); + } + + if (height !== undefined) { + localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number"); + } + + if (quality !== undefined) { + localVarQueryParameters['quality'] = ObjectSerializer.serialize(quality, "number"); + } + + if (fillWidth !== undefined) { + localVarQueryParameters['fillWidth'] = ObjectSerializer.serialize(fillWidth, "number"); + } + + if (fillHeight !== undefined) { + localVarQueryParameters['fillHeight'] = ObjectSerializer.serialize(fillHeight, "number"); + } + + if (cropWhitespace !== undefined) { + localVarQueryParameters['cropWhitespace'] = ObjectSerializer.serialize(cropWhitespace, "boolean"); + } + + if (addPlayedIndicator !== undefined) { + localVarQueryParameters['addPlayedIndicator'] = ObjectSerializer.serialize(addPlayedIndicator, "boolean"); + } + + if (blur !== undefined) { + localVarQueryParameters['blur'] = ObjectSerializer.serialize(blur, "number"); + } + + if (backgroundColor !== undefined) { + localVarQueryParameters['backgroundColor'] = ObjectSerializer.serialize(backgroundColor, "string"); + } + + if (foregroundLayer !== undefined) { + localVarQueryParameters['foregroundLayer'] = ObjectSerializer.serialize(foregroundLayer, "string"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'HEAD', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets the item\'s image. + * @param itemId Item id. + * @param imageType Image type. + * @param maxWidth The maximum image width to return. + * @param maxHeight The maximum image height to return. + * @param width The fixed image width to return. + * @param height The fixed image height to return. + * @param quality Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases. + * @param fillWidth Width of box to fill. + * @param fillHeight Height of box to fill. + * @param tag Optional. Supply the cache tag from the item object to receive strong caching headers. + * @param cropWhitespace Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art. + * @param format Optional. The MediaBrowser.Model.Drawing.ImageFormat of the returned image. + * @param addPlayedIndicator Optional. Add a played indicator. + * @param percentPlayed Optional. Percent to render for the percent played overlay. + * @param unplayedCount Optional. Unplayed count overlay to render. + * @param blur Optional. Blur image. + * @param backgroundColor Optional. Apply a background color for transparent images. + * @param foregroundLayer Optional. Apply a foreground layer on top of the image. + * @param imageIndex Image index. + */ + public async headItemImage (itemId: string, imageType: ImageType, maxWidth?: number, maxHeight?: number, width?: number, height?: number, quality?: number, fillWidth?: number, fillHeight?: number, tag?: string, cropWhitespace?: boolean, format?: ImageFormat, addPlayedIndicator?: boolean, percentPlayed?: number, unplayedCount?: number, blur?: number, backgroundColor?: string, foregroundLayer?: string, imageIndex?: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/Items/{itemId}/Images/{imageType}' + .replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId))) + .replace('{' + 'imageType' + '}', encodeURIComponent(String(imageType))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['image/*', 'application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'itemId' is not null or undefined + if (itemId === null || itemId === undefined) { + throw new Error('Required parameter itemId was null or undefined when calling headItemImage.'); + } + + // verify required parameter 'imageType' is not null or undefined + if (imageType === null || imageType === undefined) { + throw new Error('Required parameter imageType was null or undefined when calling headItemImage.'); + } + + if (maxWidth !== undefined) { + localVarQueryParameters['maxWidth'] = ObjectSerializer.serialize(maxWidth, "number"); + } + + if (maxHeight !== undefined) { + localVarQueryParameters['maxHeight'] = ObjectSerializer.serialize(maxHeight, "number"); + } + + if (width !== undefined) { + localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number"); + } + + if (height !== undefined) { + localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number"); + } + + if (quality !== undefined) { + localVarQueryParameters['quality'] = ObjectSerializer.serialize(quality, "number"); + } + + if (fillWidth !== undefined) { + localVarQueryParameters['fillWidth'] = ObjectSerializer.serialize(fillWidth, "number"); + } + + if (fillHeight !== undefined) { + localVarQueryParameters['fillHeight'] = ObjectSerializer.serialize(fillHeight, "number"); + } + + if (tag !== undefined) { + localVarQueryParameters['tag'] = ObjectSerializer.serialize(tag, "string"); + } + + if (cropWhitespace !== undefined) { + localVarQueryParameters['cropWhitespace'] = ObjectSerializer.serialize(cropWhitespace, "boolean"); + } + + if (format !== undefined) { + localVarQueryParameters['format'] = ObjectSerializer.serialize(format, "ImageFormat"); + } + + if (addPlayedIndicator !== undefined) { + localVarQueryParameters['addPlayedIndicator'] = ObjectSerializer.serialize(addPlayedIndicator, "boolean"); + } + + if (percentPlayed !== undefined) { + localVarQueryParameters['percentPlayed'] = ObjectSerializer.serialize(percentPlayed, "number"); + } + + if (unplayedCount !== undefined) { + localVarQueryParameters['unplayedCount'] = ObjectSerializer.serialize(unplayedCount, "number"); + } + + if (blur !== undefined) { + localVarQueryParameters['blur'] = ObjectSerializer.serialize(blur, "number"); + } + + if (backgroundColor !== undefined) { + localVarQueryParameters['backgroundColor'] = ObjectSerializer.serialize(backgroundColor, "string"); + } + + if (foregroundLayer !== undefined) { + localVarQueryParameters['foregroundLayer'] = ObjectSerializer.serialize(foregroundLayer, "string"); + } + + if (imageIndex !== undefined) { + localVarQueryParameters['imageIndex'] = ObjectSerializer.serialize(imageIndex, "number"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'HEAD', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets the item\'s image. + * @param itemId Item id. + * @param imageType Image type. + * @param maxWidth The maximum image width to return. + * @param maxHeight The maximum image height to return. + * @param tag Optional. Supply the cache tag from the item object to receive strong caching headers. + * @param format Determines the output format of the image - original,gif,jpg,png. + * @param percentPlayed Optional. Percent to render for the percent played overlay. + * @param unplayedCount Optional. Unplayed count overlay to render. + * @param imageIndex Image index. + * @param width The fixed image width to return. + * @param height The fixed image height to return. + * @param quality Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases. + * @param fillWidth Width of box to fill. + * @param fillHeight Height of box to fill. + * @param cropWhitespace Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art. + * @param addPlayedIndicator Optional. Add a played indicator. + * @param blur Optional. Blur image. + * @param backgroundColor Optional. Apply a background color for transparent images. + * @param foregroundLayer Optional. Apply a foreground layer on top of the image. + */ + public async headItemImage2 (itemId: string, imageType: ImageType, maxWidth: number, maxHeight: number, tag: string, format: ImageFormat, percentPlayed: number, unplayedCount: number, imageIndex: number, width?: number, height?: number, quality?: number, fillWidth?: number, fillHeight?: number, cropWhitespace?: boolean, addPlayedIndicator?: boolean, blur?: number, backgroundColor?: string, foregroundLayer?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/Items/{itemId}/Images/{imageType}/{imageIndex}/{tag}/{format}/{maxWidth}/{maxHeight}/{percentPlayed}/{unplayedCount}' + .replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId))) + .replace('{' + 'imageType' + '}', encodeURIComponent(String(imageType))) + .replace('{' + 'maxWidth' + '}', encodeURIComponent(String(maxWidth))) + .replace('{' + 'maxHeight' + '}', encodeURIComponent(String(maxHeight))) + .replace('{' + 'tag' + '}', encodeURIComponent(String(tag))) + .replace('{' + 'format' + '}', encodeURIComponent(String(format))) + .replace('{' + 'percentPlayed' + '}', encodeURIComponent(String(percentPlayed))) + .replace('{' + 'unplayedCount' + '}', encodeURIComponent(String(unplayedCount))) + .replace('{' + 'imageIndex' + '}', encodeURIComponent(String(imageIndex))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['image/*', 'application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'itemId' is not null or undefined + if (itemId === null || itemId === undefined) { + throw new Error('Required parameter itemId was null or undefined when calling headItemImage2.'); + } + + // verify required parameter 'imageType' is not null or undefined + if (imageType === null || imageType === undefined) { + throw new Error('Required parameter imageType was null or undefined when calling headItemImage2.'); + } + + // verify required parameter 'maxWidth' is not null or undefined + if (maxWidth === null || maxWidth === undefined) { + throw new Error('Required parameter maxWidth was null or undefined when calling headItemImage2.'); + } + + // verify required parameter 'maxHeight' is not null or undefined + if (maxHeight === null || maxHeight === undefined) { + throw new Error('Required parameter maxHeight was null or undefined when calling headItemImage2.'); + } + + // verify required parameter 'tag' is not null or undefined + if (tag === null || tag === undefined) { + throw new Error('Required parameter tag was null or undefined when calling headItemImage2.'); + } + + // verify required parameter 'format' is not null or undefined + if (format === null || format === undefined) { + throw new Error('Required parameter format was null or undefined when calling headItemImage2.'); + } + + // verify required parameter 'percentPlayed' is not null or undefined + if (percentPlayed === null || percentPlayed === undefined) { + throw new Error('Required parameter percentPlayed was null or undefined when calling headItemImage2.'); + } + + // verify required parameter 'unplayedCount' is not null or undefined + if (unplayedCount === null || unplayedCount === undefined) { + throw new Error('Required parameter unplayedCount was null or undefined when calling headItemImage2.'); + } + + // verify required parameter 'imageIndex' is not null or undefined + if (imageIndex === null || imageIndex === undefined) { + throw new Error('Required parameter imageIndex was null or undefined when calling headItemImage2.'); + } + + if (width !== undefined) { + localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number"); + } + + if (height !== undefined) { + localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number"); + } + + if (quality !== undefined) { + localVarQueryParameters['quality'] = ObjectSerializer.serialize(quality, "number"); + } + + if (fillWidth !== undefined) { + localVarQueryParameters['fillWidth'] = ObjectSerializer.serialize(fillWidth, "number"); + } + + if (fillHeight !== undefined) { + localVarQueryParameters['fillHeight'] = ObjectSerializer.serialize(fillHeight, "number"); + } + + if (cropWhitespace !== undefined) { + localVarQueryParameters['cropWhitespace'] = ObjectSerializer.serialize(cropWhitespace, "boolean"); + } + + if (addPlayedIndicator !== undefined) { + localVarQueryParameters['addPlayedIndicator'] = ObjectSerializer.serialize(addPlayedIndicator, "boolean"); + } + + if (blur !== undefined) { + localVarQueryParameters['blur'] = ObjectSerializer.serialize(blur, "number"); + } + + if (backgroundColor !== undefined) { + localVarQueryParameters['backgroundColor'] = ObjectSerializer.serialize(backgroundColor, "string"); + } + + if (foregroundLayer !== undefined) { + localVarQueryParameters['foregroundLayer'] = ObjectSerializer.serialize(foregroundLayer, "string"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'HEAD', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets the item\'s image. + * @param itemId Item id. + * @param imageType Image type. + * @param imageIndex Image index. + * @param maxWidth The maximum image width to return. + * @param maxHeight The maximum image height to return. + * @param width The fixed image width to return. + * @param height The fixed image height to return. + * @param quality Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases. + * @param fillWidth Width of box to fill. + * @param fillHeight Height of box to fill. + * @param tag Optional. Supply the cache tag from the item object to receive strong caching headers. + * @param cropWhitespace Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art. + * @param format Optional. The MediaBrowser.Model.Drawing.ImageFormat of the returned image. + * @param addPlayedIndicator Optional. Add a played indicator. + * @param percentPlayed Optional. Percent to render for the percent played overlay. + * @param unplayedCount Optional. Unplayed count overlay to render. + * @param blur Optional. Blur image. + * @param backgroundColor Optional. Apply a background color for transparent images. + * @param foregroundLayer Optional. Apply a foreground layer on top of the image. + */ + public async headItemImageByIndex (itemId: string, imageType: ImageType, imageIndex: number, maxWidth?: number, maxHeight?: number, width?: number, height?: number, quality?: number, fillWidth?: number, fillHeight?: number, tag?: string, cropWhitespace?: boolean, format?: ImageFormat, addPlayedIndicator?: boolean, percentPlayed?: number, unplayedCount?: number, blur?: number, backgroundColor?: string, foregroundLayer?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/Items/{itemId}/Images/{imageType}/{imageIndex}' + .replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId))) + .replace('{' + 'imageType' + '}', encodeURIComponent(String(imageType))) + .replace('{' + 'imageIndex' + '}', encodeURIComponent(String(imageIndex))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['image/*', 'application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'itemId' is not null or undefined + if (itemId === null || itemId === undefined) { + throw new Error('Required parameter itemId was null or undefined when calling headItemImageByIndex.'); + } + + // verify required parameter 'imageType' is not null or undefined + if (imageType === null || imageType === undefined) { + throw new Error('Required parameter imageType was null or undefined when calling headItemImageByIndex.'); + } + + // verify required parameter 'imageIndex' is not null or undefined + if (imageIndex === null || imageIndex === undefined) { + throw new Error('Required parameter imageIndex was null or undefined when calling headItemImageByIndex.'); + } + + if (maxWidth !== undefined) { + localVarQueryParameters['maxWidth'] = ObjectSerializer.serialize(maxWidth, "number"); + } + + if (maxHeight !== undefined) { + localVarQueryParameters['maxHeight'] = ObjectSerializer.serialize(maxHeight, "number"); + } + + if (width !== undefined) { + localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number"); + } + + if (height !== undefined) { + localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number"); + } + + if (quality !== undefined) { + localVarQueryParameters['quality'] = ObjectSerializer.serialize(quality, "number"); + } + + if (fillWidth !== undefined) { + localVarQueryParameters['fillWidth'] = ObjectSerializer.serialize(fillWidth, "number"); + } + + if (fillHeight !== undefined) { + localVarQueryParameters['fillHeight'] = ObjectSerializer.serialize(fillHeight, "number"); + } + + if (tag !== undefined) { + localVarQueryParameters['tag'] = ObjectSerializer.serialize(tag, "string"); + } + + if (cropWhitespace !== undefined) { + localVarQueryParameters['cropWhitespace'] = ObjectSerializer.serialize(cropWhitespace, "boolean"); + } + + if (format !== undefined) { + localVarQueryParameters['format'] = ObjectSerializer.serialize(format, "ImageFormat"); + } + + if (addPlayedIndicator !== undefined) { + localVarQueryParameters['addPlayedIndicator'] = ObjectSerializer.serialize(addPlayedIndicator, "boolean"); + } + + if (percentPlayed !== undefined) { + localVarQueryParameters['percentPlayed'] = ObjectSerializer.serialize(percentPlayed, "number"); + } + + if (unplayedCount !== undefined) { + localVarQueryParameters['unplayedCount'] = ObjectSerializer.serialize(unplayedCount, "number"); + } + + if (blur !== undefined) { + localVarQueryParameters['blur'] = ObjectSerializer.serialize(blur, "number"); + } + + if (backgroundColor !== undefined) { + localVarQueryParameters['backgroundColor'] = ObjectSerializer.serialize(backgroundColor, "string"); + } + + if (foregroundLayer !== undefined) { + localVarQueryParameters['foregroundLayer'] = ObjectSerializer.serialize(foregroundLayer, "string"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'HEAD', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Get music genre image by name. + * @param name Music genre name. + * @param imageType Image type. + * @param tag Optional. Supply the cache tag from the item object to receive strong caching headers. + * @param format Determines the output format of the image - original,gif,jpg,png. + * @param maxWidth The maximum image width to return. + * @param maxHeight The maximum image height to return. + * @param percentPlayed Optional. Percent to render for the percent played overlay. + * @param unplayedCount Optional. Unplayed count overlay to render. + * @param width The fixed image width to return. + * @param height The fixed image height to return. + * @param quality Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases. + * @param fillWidth Width of box to fill. + * @param fillHeight Height of box to fill. + * @param cropWhitespace Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art. + * @param addPlayedIndicator Optional. Add a played indicator. + * @param blur Optional. Blur image. + * @param backgroundColor Optional. Apply a background color for transparent images. + * @param foregroundLayer Optional. Apply a foreground layer on top of the image. + * @param imageIndex Image index. + */ + public async headMusicGenreImage (name: string, imageType: ImageType, tag?: string, format?: ImageFormat, maxWidth?: number, maxHeight?: number, percentPlayed?: number, unplayedCount?: number, width?: number, height?: number, quality?: number, fillWidth?: number, fillHeight?: number, cropWhitespace?: boolean, addPlayedIndicator?: boolean, blur?: number, backgroundColor?: string, foregroundLayer?: string, imageIndex?: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/MusicGenres/{name}/Images/{imageType}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'imageType' + '}', encodeURIComponent(String(imageType))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['image/*', 'application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling headMusicGenreImage.'); + } + + // verify required parameter 'imageType' is not null or undefined + if (imageType === null || imageType === undefined) { + throw new Error('Required parameter imageType was null or undefined when calling headMusicGenreImage.'); + } + + if (tag !== undefined) { + localVarQueryParameters['tag'] = ObjectSerializer.serialize(tag, "string"); + } + + if (format !== undefined) { + localVarQueryParameters['format'] = ObjectSerializer.serialize(format, "ImageFormat"); + } + + if (maxWidth !== undefined) { + localVarQueryParameters['maxWidth'] = ObjectSerializer.serialize(maxWidth, "number"); + } + + if (maxHeight !== undefined) { + localVarQueryParameters['maxHeight'] = ObjectSerializer.serialize(maxHeight, "number"); + } + + if (percentPlayed !== undefined) { + localVarQueryParameters['percentPlayed'] = ObjectSerializer.serialize(percentPlayed, "number"); + } + + if (unplayedCount !== undefined) { + localVarQueryParameters['unplayedCount'] = ObjectSerializer.serialize(unplayedCount, "number"); + } + + if (width !== undefined) { + localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number"); + } + + if (height !== undefined) { + localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number"); + } + + if (quality !== undefined) { + localVarQueryParameters['quality'] = ObjectSerializer.serialize(quality, "number"); + } + + if (fillWidth !== undefined) { + localVarQueryParameters['fillWidth'] = ObjectSerializer.serialize(fillWidth, "number"); + } + + if (fillHeight !== undefined) { + localVarQueryParameters['fillHeight'] = ObjectSerializer.serialize(fillHeight, "number"); + } + + if (cropWhitespace !== undefined) { + localVarQueryParameters['cropWhitespace'] = ObjectSerializer.serialize(cropWhitespace, "boolean"); + } + + if (addPlayedIndicator !== undefined) { + localVarQueryParameters['addPlayedIndicator'] = ObjectSerializer.serialize(addPlayedIndicator, "boolean"); + } + + if (blur !== undefined) { + localVarQueryParameters['blur'] = ObjectSerializer.serialize(blur, "number"); + } + + if (backgroundColor !== undefined) { + localVarQueryParameters['backgroundColor'] = ObjectSerializer.serialize(backgroundColor, "string"); + } + + if (foregroundLayer !== undefined) { + localVarQueryParameters['foregroundLayer'] = ObjectSerializer.serialize(foregroundLayer, "string"); + } + + if (imageIndex !== undefined) { + localVarQueryParameters['imageIndex'] = ObjectSerializer.serialize(imageIndex, "number"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'HEAD', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Get music genre image by name. + * @param name Music genre name. + * @param imageType Image type. + * @param imageIndex Image index. + * @param tag Optional. Supply the cache tag from the item object to receive strong caching headers. + * @param format Determines the output format of the image - original,gif,jpg,png. + * @param maxWidth The maximum image width to return. + * @param maxHeight The maximum image height to return. + * @param percentPlayed Optional. Percent to render for the percent played overlay. + * @param unplayedCount Optional. Unplayed count overlay to render. + * @param width The fixed image width to return. + * @param height The fixed image height to return. + * @param quality Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases. + * @param fillWidth Width of box to fill. + * @param fillHeight Height of box to fill. + * @param cropWhitespace Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art. + * @param addPlayedIndicator Optional. Add a played indicator. + * @param blur Optional. Blur image. + * @param backgroundColor Optional. Apply a background color for transparent images. + * @param foregroundLayer Optional. Apply a foreground layer on top of the image. + */ + public async headMusicGenreImageByIndex (name: string, imageType: ImageType, imageIndex: number, tag?: string, format?: ImageFormat, maxWidth?: number, maxHeight?: number, percentPlayed?: number, unplayedCount?: number, width?: number, height?: number, quality?: number, fillWidth?: number, fillHeight?: number, cropWhitespace?: boolean, addPlayedIndicator?: boolean, blur?: number, backgroundColor?: string, foregroundLayer?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/MusicGenres/{name}/Images/{imageType}/{imageIndex}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'imageType' + '}', encodeURIComponent(String(imageType))) + .replace('{' + 'imageIndex' + '}', encodeURIComponent(String(imageIndex))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['image/*', 'application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling headMusicGenreImageByIndex.'); + } + + // verify required parameter 'imageType' is not null or undefined + if (imageType === null || imageType === undefined) { + throw new Error('Required parameter imageType was null or undefined when calling headMusicGenreImageByIndex.'); + } + + // verify required parameter 'imageIndex' is not null or undefined + if (imageIndex === null || imageIndex === undefined) { + throw new Error('Required parameter imageIndex was null or undefined when calling headMusicGenreImageByIndex.'); + } + + if (tag !== undefined) { + localVarQueryParameters['tag'] = ObjectSerializer.serialize(tag, "string"); + } + + if (format !== undefined) { + localVarQueryParameters['format'] = ObjectSerializer.serialize(format, "ImageFormat"); + } + + if (maxWidth !== undefined) { + localVarQueryParameters['maxWidth'] = ObjectSerializer.serialize(maxWidth, "number"); + } + + if (maxHeight !== undefined) { + localVarQueryParameters['maxHeight'] = ObjectSerializer.serialize(maxHeight, "number"); + } + + if (percentPlayed !== undefined) { + localVarQueryParameters['percentPlayed'] = ObjectSerializer.serialize(percentPlayed, "number"); + } + + if (unplayedCount !== undefined) { + localVarQueryParameters['unplayedCount'] = ObjectSerializer.serialize(unplayedCount, "number"); + } + + if (width !== undefined) { + localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number"); + } + + if (height !== undefined) { + localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number"); + } + + if (quality !== undefined) { + localVarQueryParameters['quality'] = ObjectSerializer.serialize(quality, "number"); + } + + if (fillWidth !== undefined) { + localVarQueryParameters['fillWidth'] = ObjectSerializer.serialize(fillWidth, "number"); + } + + if (fillHeight !== undefined) { + localVarQueryParameters['fillHeight'] = ObjectSerializer.serialize(fillHeight, "number"); + } + + if (cropWhitespace !== undefined) { + localVarQueryParameters['cropWhitespace'] = ObjectSerializer.serialize(cropWhitespace, "boolean"); + } + + if (addPlayedIndicator !== undefined) { + localVarQueryParameters['addPlayedIndicator'] = ObjectSerializer.serialize(addPlayedIndicator, "boolean"); + } + + if (blur !== undefined) { + localVarQueryParameters['blur'] = ObjectSerializer.serialize(blur, "number"); + } + + if (backgroundColor !== undefined) { + localVarQueryParameters['backgroundColor'] = ObjectSerializer.serialize(backgroundColor, "string"); + } + + if (foregroundLayer !== undefined) { + localVarQueryParameters['foregroundLayer'] = ObjectSerializer.serialize(foregroundLayer, "string"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'HEAD', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Get person image by name. + * @param name Person name. + * @param imageType Image type. + * @param tag Optional. Supply the cache tag from the item object to receive strong caching headers. + * @param format Determines the output format of the image - original,gif,jpg,png. + * @param maxWidth The maximum image width to return. + * @param maxHeight The maximum image height to return. + * @param percentPlayed Optional. Percent to render for the percent played overlay. + * @param unplayedCount Optional. Unplayed count overlay to render. + * @param width The fixed image width to return. + * @param height The fixed image height to return. + * @param quality Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases. + * @param fillWidth Width of box to fill. + * @param fillHeight Height of box to fill. + * @param cropWhitespace Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art. + * @param addPlayedIndicator Optional. Add a played indicator. + * @param blur Optional. Blur image. + * @param backgroundColor Optional. Apply a background color for transparent images. + * @param foregroundLayer Optional. Apply a foreground layer on top of the image. + * @param imageIndex Image index. + */ + public async headPersonImage (name: string, imageType: ImageType, tag?: string, format?: ImageFormat, maxWidth?: number, maxHeight?: number, percentPlayed?: number, unplayedCount?: number, width?: number, height?: number, quality?: number, fillWidth?: number, fillHeight?: number, cropWhitespace?: boolean, addPlayedIndicator?: boolean, blur?: number, backgroundColor?: string, foregroundLayer?: string, imageIndex?: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/Persons/{name}/Images/{imageType}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'imageType' + '}', encodeURIComponent(String(imageType))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['image/*', 'application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling headPersonImage.'); + } + + // verify required parameter 'imageType' is not null or undefined + if (imageType === null || imageType === undefined) { + throw new Error('Required parameter imageType was null or undefined when calling headPersonImage.'); + } + + if (tag !== undefined) { + localVarQueryParameters['tag'] = ObjectSerializer.serialize(tag, "string"); + } + + if (format !== undefined) { + localVarQueryParameters['format'] = ObjectSerializer.serialize(format, "ImageFormat"); + } + + if (maxWidth !== undefined) { + localVarQueryParameters['maxWidth'] = ObjectSerializer.serialize(maxWidth, "number"); + } + + if (maxHeight !== undefined) { + localVarQueryParameters['maxHeight'] = ObjectSerializer.serialize(maxHeight, "number"); + } + + if (percentPlayed !== undefined) { + localVarQueryParameters['percentPlayed'] = ObjectSerializer.serialize(percentPlayed, "number"); + } + + if (unplayedCount !== undefined) { + localVarQueryParameters['unplayedCount'] = ObjectSerializer.serialize(unplayedCount, "number"); + } + + if (width !== undefined) { + localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number"); + } + + if (height !== undefined) { + localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number"); + } + + if (quality !== undefined) { + localVarQueryParameters['quality'] = ObjectSerializer.serialize(quality, "number"); + } + + if (fillWidth !== undefined) { + localVarQueryParameters['fillWidth'] = ObjectSerializer.serialize(fillWidth, "number"); + } + + if (fillHeight !== undefined) { + localVarQueryParameters['fillHeight'] = ObjectSerializer.serialize(fillHeight, "number"); + } + + if (cropWhitespace !== undefined) { + localVarQueryParameters['cropWhitespace'] = ObjectSerializer.serialize(cropWhitespace, "boolean"); + } + + if (addPlayedIndicator !== undefined) { + localVarQueryParameters['addPlayedIndicator'] = ObjectSerializer.serialize(addPlayedIndicator, "boolean"); + } + + if (blur !== undefined) { + localVarQueryParameters['blur'] = ObjectSerializer.serialize(blur, "number"); + } + + if (backgroundColor !== undefined) { + localVarQueryParameters['backgroundColor'] = ObjectSerializer.serialize(backgroundColor, "string"); + } + + if (foregroundLayer !== undefined) { + localVarQueryParameters['foregroundLayer'] = ObjectSerializer.serialize(foregroundLayer, "string"); + } + + if (imageIndex !== undefined) { + localVarQueryParameters['imageIndex'] = ObjectSerializer.serialize(imageIndex, "number"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'HEAD', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Get person image by name. + * @param name Person name. + * @param imageType Image type. + * @param imageIndex Image index. + * @param tag Optional. Supply the cache tag from the item object to receive strong caching headers. + * @param format Determines the output format of the image - original,gif,jpg,png. + * @param maxWidth The maximum image width to return. + * @param maxHeight The maximum image height to return. + * @param percentPlayed Optional. Percent to render for the percent played overlay. + * @param unplayedCount Optional. Unplayed count overlay to render. + * @param width The fixed image width to return. + * @param height The fixed image height to return. + * @param quality Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases. + * @param fillWidth Width of box to fill. + * @param fillHeight Height of box to fill. + * @param cropWhitespace Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art. + * @param addPlayedIndicator Optional. Add a played indicator. + * @param blur Optional. Blur image. + * @param backgroundColor Optional. Apply a background color for transparent images. + * @param foregroundLayer Optional. Apply a foreground layer on top of the image. + */ + public async headPersonImageByIndex (name: string, imageType: ImageType, imageIndex: number, tag?: string, format?: ImageFormat, maxWidth?: number, maxHeight?: number, percentPlayed?: number, unplayedCount?: number, width?: number, height?: number, quality?: number, fillWidth?: number, fillHeight?: number, cropWhitespace?: boolean, addPlayedIndicator?: boolean, blur?: number, backgroundColor?: string, foregroundLayer?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/Persons/{name}/Images/{imageType}/{imageIndex}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'imageType' + '}', encodeURIComponent(String(imageType))) + .replace('{' + 'imageIndex' + '}', encodeURIComponent(String(imageIndex))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['image/*', 'application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling headPersonImageByIndex.'); + } + + // verify required parameter 'imageType' is not null or undefined + if (imageType === null || imageType === undefined) { + throw new Error('Required parameter imageType was null or undefined when calling headPersonImageByIndex.'); + } + + // verify required parameter 'imageIndex' is not null or undefined + if (imageIndex === null || imageIndex === undefined) { + throw new Error('Required parameter imageIndex was null or undefined when calling headPersonImageByIndex.'); + } + + if (tag !== undefined) { + localVarQueryParameters['tag'] = ObjectSerializer.serialize(tag, "string"); + } + + if (format !== undefined) { + localVarQueryParameters['format'] = ObjectSerializer.serialize(format, "ImageFormat"); + } + + if (maxWidth !== undefined) { + localVarQueryParameters['maxWidth'] = ObjectSerializer.serialize(maxWidth, "number"); + } + + if (maxHeight !== undefined) { + localVarQueryParameters['maxHeight'] = ObjectSerializer.serialize(maxHeight, "number"); + } + + if (percentPlayed !== undefined) { + localVarQueryParameters['percentPlayed'] = ObjectSerializer.serialize(percentPlayed, "number"); + } + + if (unplayedCount !== undefined) { + localVarQueryParameters['unplayedCount'] = ObjectSerializer.serialize(unplayedCount, "number"); + } + + if (width !== undefined) { + localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number"); + } + + if (height !== undefined) { + localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number"); + } + + if (quality !== undefined) { + localVarQueryParameters['quality'] = ObjectSerializer.serialize(quality, "number"); + } + + if (fillWidth !== undefined) { + localVarQueryParameters['fillWidth'] = ObjectSerializer.serialize(fillWidth, "number"); + } + + if (fillHeight !== undefined) { + localVarQueryParameters['fillHeight'] = ObjectSerializer.serialize(fillHeight, "number"); + } + + if (cropWhitespace !== undefined) { + localVarQueryParameters['cropWhitespace'] = ObjectSerializer.serialize(cropWhitespace, "boolean"); + } + + if (addPlayedIndicator !== undefined) { + localVarQueryParameters['addPlayedIndicator'] = ObjectSerializer.serialize(addPlayedIndicator, "boolean"); + } + + if (blur !== undefined) { + localVarQueryParameters['blur'] = ObjectSerializer.serialize(blur, "number"); + } + + if (backgroundColor !== undefined) { + localVarQueryParameters['backgroundColor'] = ObjectSerializer.serialize(backgroundColor, "string"); + } + + if (foregroundLayer !== undefined) { + localVarQueryParameters['foregroundLayer'] = ObjectSerializer.serialize(foregroundLayer, "string"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'HEAD', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Get studio image by name. + * @param name Studio name. + * @param imageType Image type. + * @param tag Optional. Supply the cache tag from the item object to receive strong caching headers. + * @param format Determines the output format of the image - original,gif,jpg,png. + * @param maxWidth The maximum image width to return. + * @param maxHeight The maximum image height to return. + * @param percentPlayed Optional. Percent to render for the percent played overlay. + * @param unplayedCount Optional. Unplayed count overlay to render. + * @param width The fixed image width to return. + * @param height The fixed image height to return. + * @param quality Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases. + * @param fillWidth Width of box to fill. + * @param fillHeight Height of box to fill. + * @param cropWhitespace Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art. + * @param addPlayedIndicator Optional. Add a played indicator. + * @param blur Optional. Blur image. + * @param backgroundColor Optional. Apply a background color for transparent images. + * @param foregroundLayer Optional. Apply a foreground layer on top of the image. + * @param imageIndex Image index. + */ + public async headStudioImage (name: string, imageType: ImageType, tag?: string, format?: ImageFormat, maxWidth?: number, maxHeight?: number, percentPlayed?: number, unplayedCount?: number, width?: number, height?: number, quality?: number, fillWidth?: number, fillHeight?: number, cropWhitespace?: boolean, addPlayedIndicator?: boolean, blur?: number, backgroundColor?: string, foregroundLayer?: string, imageIndex?: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/Studios/{name}/Images/{imageType}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'imageType' + '}', encodeURIComponent(String(imageType))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['image/*', 'application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling headStudioImage.'); + } + + // verify required parameter 'imageType' is not null or undefined + if (imageType === null || imageType === undefined) { + throw new Error('Required parameter imageType was null or undefined when calling headStudioImage.'); + } + + if (tag !== undefined) { + localVarQueryParameters['tag'] = ObjectSerializer.serialize(tag, "string"); + } + + if (format !== undefined) { + localVarQueryParameters['format'] = ObjectSerializer.serialize(format, "ImageFormat"); + } + + if (maxWidth !== undefined) { + localVarQueryParameters['maxWidth'] = ObjectSerializer.serialize(maxWidth, "number"); + } + + if (maxHeight !== undefined) { + localVarQueryParameters['maxHeight'] = ObjectSerializer.serialize(maxHeight, "number"); + } + + if (percentPlayed !== undefined) { + localVarQueryParameters['percentPlayed'] = ObjectSerializer.serialize(percentPlayed, "number"); + } + + if (unplayedCount !== undefined) { + localVarQueryParameters['unplayedCount'] = ObjectSerializer.serialize(unplayedCount, "number"); + } + + if (width !== undefined) { + localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number"); + } + + if (height !== undefined) { + localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number"); + } + + if (quality !== undefined) { + localVarQueryParameters['quality'] = ObjectSerializer.serialize(quality, "number"); + } + + if (fillWidth !== undefined) { + localVarQueryParameters['fillWidth'] = ObjectSerializer.serialize(fillWidth, "number"); + } + + if (fillHeight !== undefined) { + localVarQueryParameters['fillHeight'] = ObjectSerializer.serialize(fillHeight, "number"); + } + + if (cropWhitespace !== undefined) { + localVarQueryParameters['cropWhitespace'] = ObjectSerializer.serialize(cropWhitespace, "boolean"); + } + + if (addPlayedIndicator !== undefined) { + localVarQueryParameters['addPlayedIndicator'] = ObjectSerializer.serialize(addPlayedIndicator, "boolean"); + } + + if (blur !== undefined) { + localVarQueryParameters['blur'] = ObjectSerializer.serialize(blur, "number"); + } + + if (backgroundColor !== undefined) { + localVarQueryParameters['backgroundColor'] = ObjectSerializer.serialize(backgroundColor, "string"); + } + + if (foregroundLayer !== undefined) { + localVarQueryParameters['foregroundLayer'] = ObjectSerializer.serialize(foregroundLayer, "string"); + } + + if (imageIndex !== undefined) { + localVarQueryParameters['imageIndex'] = ObjectSerializer.serialize(imageIndex, "number"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'HEAD', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Get studio image by name. + * @param name Studio name. + * @param imageType Image type. + * @param imageIndex Image index. + * @param tag Optional. Supply the cache tag from the item object to receive strong caching headers. + * @param format Determines the output format of the image - original,gif,jpg,png. + * @param maxWidth The maximum image width to return. + * @param maxHeight The maximum image height to return. + * @param percentPlayed Optional. Percent to render for the percent played overlay. + * @param unplayedCount Optional. Unplayed count overlay to render. + * @param width The fixed image width to return. + * @param height The fixed image height to return. + * @param quality Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases. + * @param fillWidth Width of box to fill. + * @param fillHeight Height of box to fill. + * @param cropWhitespace Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art. + * @param addPlayedIndicator Optional. Add a played indicator. + * @param blur Optional. Blur image. + * @param backgroundColor Optional. Apply a background color for transparent images. + * @param foregroundLayer Optional. Apply a foreground layer on top of the image. + */ + public async headStudioImageByIndex (name: string, imageType: ImageType, imageIndex: number, tag?: string, format?: ImageFormat, maxWidth?: number, maxHeight?: number, percentPlayed?: number, unplayedCount?: number, width?: number, height?: number, quality?: number, fillWidth?: number, fillHeight?: number, cropWhitespace?: boolean, addPlayedIndicator?: boolean, blur?: number, backgroundColor?: string, foregroundLayer?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/Studios/{name}/Images/{imageType}/{imageIndex}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'imageType' + '}', encodeURIComponent(String(imageType))) + .replace('{' + 'imageIndex' + '}', encodeURIComponent(String(imageIndex))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['image/*', 'application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling headStudioImageByIndex.'); + } + + // verify required parameter 'imageType' is not null or undefined + if (imageType === null || imageType === undefined) { + throw new Error('Required parameter imageType was null or undefined when calling headStudioImageByIndex.'); + } + + // verify required parameter 'imageIndex' is not null or undefined + if (imageIndex === null || imageIndex === undefined) { + throw new Error('Required parameter imageIndex was null or undefined when calling headStudioImageByIndex.'); + } + + if (tag !== undefined) { + localVarQueryParameters['tag'] = ObjectSerializer.serialize(tag, "string"); + } + + if (format !== undefined) { + localVarQueryParameters['format'] = ObjectSerializer.serialize(format, "ImageFormat"); + } + + if (maxWidth !== undefined) { + localVarQueryParameters['maxWidth'] = ObjectSerializer.serialize(maxWidth, "number"); + } + + if (maxHeight !== undefined) { + localVarQueryParameters['maxHeight'] = ObjectSerializer.serialize(maxHeight, "number"); + } + + if (percentPlayed !== undefined) { + localVarQueryParameters['percentPlayed'] = ObjectSerializer.serialize(percentPlayed, "number"); + } + + if (unplayedCount !== undefined) { + localVarQueryParameters['unplayedCount'] = ObjectSerializer.serialize(unplayedCount, "number"); + } + + if (width !== undefined) { + localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number"); + } + + if (height !== undefined) { + localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number"); + } + + if (quality !== undefined) { + localVarQueryParameters['quality'] = ObjectSerializer.serialize(quality, "number"); + } + + if (fillWidth !== undefined) { + localVarQueryParameters['fillWidth'] = ObjectSerializer.serialize(fillWidth, "number"); + } + + if (fillHeight !== undefined) { + localVarQueryParameters['fillHeight'] = ObjectSerializer.serialize(fillHeight, "number"); + } + + if (cropWhitespace !== undefined) { + localVarQueryParameters['cropWhitespace'] = ObjectSerializer.serialize(cropWhitespace, "boolean"); + } + + if (addPlayedIndicator !== undefined) { + localVarQueryParameters['addPlayedIndicator'] = ObjectSerializer.serialize(addPlayedIndicator, "boolean"); + } + + if (blur !== undefined) { + localVarQueryParameters['blur'] = ObjectSerializer.serialize(blur, "number"); + } + + if (backgroundColor !== undefined) { + localVarQueryParameters['backgroundColor'] = ObjectSerializer.serialize(backgroundColor, "string"); + } + + if (foregroundLayer !== undefined) { + localVarQueryParameters['foregroundLayer'] = ObjectSerializer.serialize(foregroundLayer, "string"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'HEAD', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Get user profile image. + * @param userId User id. + * @param imageType Image type. + * @param tag Optional. Supply the cache tag from the item object to receive strong caching headers. + * @param format Determines the output format of the image - original,gif,jpg,png. + * @param maxWidth The maximum image width to return. + * @param maxHeight The maximum image height to return. + * @param percentPlayed Optional. Percent to render for the percent played overlay. + * @param unplayedCount Optional. Unplayed count overlay to render. + * @param width The fixed image width to return. + * @param height The fixed image height to return. + * @param quality Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases. + * @param fillWidth Width of box to fill. + * @param fillHeight Height of box to fill. + * @param cropWhitespace Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art. + * @param addPlayedIndicator Optional. Add a played indicator. + * @param blur Optional. Blur image. + * @param backgroundColor Optional. Apply a background color for transparent images. + * @param foregroundLayer Optional. Apply a foreground layer on top of the image. + * @param imageIndex Image index. + */ + public async headUserImage (userId: string, imageType: ImageType, tag?: string, format?: ImageFormat, maxWidth?: number, maxHeight?: number, percentPlayed?: number, unplayedCount?: number, width?: number, height?: number, quality?: number, fillWidth?: number, fillHeight?: number, cropWhitespace?: boolean, addPlayedIndicator?: boolean, blur?: number, backgroundColor?: string, foregroundLayer?: string, imageIndex?: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/Users/{userId}/Images/{imageType}' + .replace('{' + 'userId' + '}', encodeURIComponent(String(userId))) + .replace('{' + 'imageType' + '}', encodeURIComponent(String(imageType))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['image/*', 'application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'userId' is not null or undefined + if (userId === null || userId === undefined) { + throw new Error('Required parameter userId was null or undefined when calling headUserImage.'); + } + + // verify required parameter 'imageType' is not null or undefined + if (imageType === null || imageType === undefined) { + throw new Error('Required parameter imageType was null or undefined when calling headUserImage.'); + } + + if (tag !== undefined) { + localVarQueryParameters['tag'] = ObjectSerializer.serialize(tag, "string"); + } + + if (format !== undefined) { + localVarQueryParameters['format'] = ObjectSerializer.serialize(format, "ImageFormat"); + } + + if (maxWidth !== undefined) { + localVarQueryParameters['maxWidth'] = ObjectSerializer.serialize(maxWidth, "number"); + } + + if (maxHeight !== undefined) { + localVarQueryParameters['maxHeight'] = ObjectSerializer.serialize(maxHeight, "number"); + } + + if (percentPlayed !== undefined) { + localVarQueryParameters['percentPlayed'] = ObjectSerializer.serialize(percentPlayed, "number"); + } + + if (unplayedCount !== undefined) { + localVarQueryParameters['unplayedCount'] = ObjectSerializer.serialize(unplayedCount, "number"); + } + + if (width !== undefined) { + localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number"); + } + + if (height !== undefined) { + localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number"); + } + + if (quality !== undefined) { + localVarQueryParameters['quality'] = ObjectSerializer.serialize(quality, "number"); + } + + if (fillWidth !== undefined) { + localVarQueryParameters['fillWidth'] = ObjectSerializer.serialize(fillWidth, "number"); + } + + if (fillHeight !== undefined) { + localVarQueryParameters['fillHeight'] = ObjectSerializer.serialize(fillHeight, "number"); + } + + if (cropWhitespace !== undefined) { + localVarQueryParameters['cropWhitespace'] = ObjectSerializer.serialize(cropWhitespace, "boolean"); + } + + if (addPlayedIndicator !== undefined) { + localVarQueryParameters['addPlayedIndicator'] = ObjectSerializer.serialize(addPlayedIndicator, "boolean"); + } + + if (blur !== undefined) { + localVarQueryParameters['blur'] = ObjectSerializer.serialize(blur, "number"); + } + + if (backgroundColor !== undefined) { + localVarQueryParameters['backgroundColor'] = ObjectSerializer.serialize(backgroundColor, "string"); + } + + if (foregroundLayer !== undefined) { + localVarQueryParameters['foregroundLayer'] = ObjectSerializer.serialize(foregroundLayer, "string"); + } + + if (imageIndex !== undefined) { + localVarQueryParameters['imageIndex'] = ObjectSerializer.serialize(imageIndex, "number"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'HEAD', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Get user profile image. + * @param userId User id. + * @param imageType Image type. + * @param imageIndex Image index. + * @param tag Optional. Supply the cache tag from the item object to receive strong caching headers. + * @param format Determines the output format of the image - original,gif,jpg,png. + * @param maxWidth The maximum image width to return. + * @param maxHeight The maximum image height to return. + * @param percentPlayed Optional. Percent to render for the percent played overlay. + * @param unplayedCount Optional. Unplayed count overlay to render. + * @param width The fixed image width to return. + * @param height The fixed image height to return. + * @param quality Optional. Quality setting, from 0-100. Defaults to 90 and should suffice in most cases. + * @param fillWidth Width of box to fill. + * @param fillHeight Height of box to fill. + * @param cropWhitespace Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art. + * @param addPlayedIndicator Optional. Add a played indicator. + * @param blur Optional. Blur image. + * @param backgroundColor Optional. Apply a background color for transparent images. + * @param foregroundLayer Optional. Apply a foreground layer on top of the image. + */ + public async headUserImageByIndex (userId: string, imageType: ImageType, imageIndex: number, tag?: string, format?: ImageFormat, maxWidth?: number, maxHeight?: number, percentPlayed?: number, unplayedCount?: number, width?: number, height?: number, quality?: number, fillWidth?: number, fillHeight?: number, cropWhitespace?: boolean, addPlayedIndicator?: boolean, blur?: number, backgroundColor?: string, foregroundLayer?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/Users/{userId}/Images/{imageType}/{imageIndex}' + .replace('{' + 'userId' + '}', encodeURIComponent(String(userId))) + .replace('{' + 'imageType' + '}', encodeURIComponent(String(imageType))) + .replace('{' + 'imageIndex' + '}', encodeURIComponent(String(imageIndex))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['image/*', 'application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'userId' is not null or undefined + if (userId === null || userId === undefined) { + throw new Error('Required parameter userId was null or undefined when calling headUserImageByIndex.'); + } + + // verify required parameter 'imageType' is not null or undefined + if (imageType === null || imageType === undefined) { + throw new Error('Required parameter imageType was null or undefined when calling headUserImageByIndex.'); + } + + // verify required parameter 'imageIndex' is not null or undefined + if (imageIndex === null || imageIndex === undefined) { + throw new Error('Required parameter imageIndex was null or undefined when calling headUserImageByIndex.'); + } + + if (tag !== undefined) { + localVarQueryParameters['tag'] = ObjectSerializer.serialize(tag, "string"); + } + + if (format !== undefined) { + localVarQueryParameters['format'] = ObjectSerializer.serialize(format, "ImageFormat"); + } + + if (maxWidth !== undefined) { + localVarQueryParameters['maxWidth'] = ObjectSerializer.serialize(maxWidth, "number"); + } + + if (maxHeight !== undefined) { + localVarQueryParameters['maxHeight'] = ObjectSerializer.serialize(maxHeight, "number"); + } + + if (percentPlayed !== undefined) { + localVarQueryParameters['percentPlayed'] = ObjectSerializer.serialize(percentPlayed, "number"); + } + + if (unplayedCount !== undefined) { + localVarQueryParameters['unplayedCount'] = ObjectSerializer.serialize(unplayedCount, "number"); + } + + if (width !== undefined) { + localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number"); + } + + if (height !== undefined) { + localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number"); + } + + if (quality !== undefined) { + localVarQueryParameters['quality'] = ObjectSerializer.serialize(quality, "number"); + } + + if (fillWidth !== undefined) { + localVarQueryParameters['fillWidth'] = ObjectSerializer.serialize(fillWidth, "number"); + } + + if (fillHeight !== undefined) { + localVarQueryParameters['fillHeight'] = ObjectSerializer.serialize(fillHeight, "number"); + } + + if (cropWhitespace !== undefined) { + localVarQueryParameters['cropWhitespace'] = ObjectSerializer.serialize(cropWhitespace, "boolean"); + } + + if (addPlayedIndicator !== undefined) { + localVarQueryParameters['addPlayedIndicator'] = ObjectSerializer.serialize(addPlayedIndicator, "boolean"); + } + + if (blur !== undefined) { + localVarQueryParameters['blur'] = ObjectSerializer.serialize(blur, "number"); + } + + if (backgroundColor !== undefined) { + localVarQueryParameters['backgroundColor'] = ObjectSerializer.serialize(backgroundColor, "string"); + } + + if (foregroundLayer !== undefined) { + localVarQueryParameters['foregroundLayer'] = ObjectSerializer.serialize(foregroundLayer, "string"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'HEAD', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Sets the user image. + * @param userId User Id. + * @param imageType (Unused) Image type. + * @param index (Unused) Image index. + * @param body + */ + public async postUserImage (userId: string, imageType: ImageType, index?: number, body?: RequestFile, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Users/{userId}/Images/{imageType}' + .replace('{' + 'userId' + '}', encodeURIComponent(String(userId))) + .replace('{' + 'imageType' + '}', encodeURIComponent(String(imageType))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'userId' is not null or undefined + if (userId === null || userId === undefined) { + throw new Error('Required parameter userId was null or undefined when calling postUserImage.'); + } + + // verify required parameter 'imageType' is not null or undefined + if (imageType === null || imageType === undefined) { + throw new Error('Required parameter imageType was null or undefined when calling postUserImage.'); + } + + if (index !== undefined) { + localVarQueryParameters['index'] = ObjectSerializer.serialize(index, "number"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: ObjectSerializer.serialize(body, "RequestFile") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Sets the user image. + * @param userId User Id. + * @param imageType (Unused) Image type. + * @param index (Unused) Image index. + * @param body + */ + public async postUserImageByIndex (userId: string, imageType: ImageType, index: number, body?: RequestFile, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Users/{userId}/Images/{imageType}/{index}' + .replace('{' + 'userId' + '}', encodeURIComponent(String(userId))) + .replace('{' + 'imageType' + '}', encodeURIComponent(String(imageType))) + .replace('{' + 'index' + '}', encodeURIComponent(String(index))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'userId' is not null or undefined + if (userId === null || userId === undefined) { + throw new Error('Required parameter userId was null or undefined when calling postUserImageByIndex.'); + } + + // verify required parameter 'imageType' is not null or undefined + if (imageType === null || imageType === undefined) { + throw new Error('Required parameter imageType was null or undefined when calling postUserImageByIndex.'); + } + + // verify required parameter 'index' is not null or undefined + if (index === null || index === undefined) { + throw new Error('Required parameter index was null or undefined when calling postUserImageByIndex.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: ObjectSerializer.serialize(body, "RequestFile") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Set item image. + * @param itemId Item id. + * @param imageType Image type. + * @param body + */ + public async setItemImage (itemId: string, imageType: ImageType, body?: RequestFile, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Items/{itemId}/Images/{imageType}' + .replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId))) + .replace('{' + 'imageType' + '}', encodeURIComponent(String(imageType))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'itemId' is not null or undefined + if (itemId === null || itemId === undefined) { + throw new Error('Required parameter itemId was null or undefined when calling setItemImage.'); + } + + // verify required parameter 'imageType' is not null or undefined + if (imageType === null || imageType === undefined) { + throw new Error('Required parameter imageType was null or undefined when calling setItemImage.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: ObjectSerializer.serialize(body, "RequestFile") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Set item image. + * @param itemId Item id. + * @param imageType Image type. + * @param imageIndex (Unused) Image index. + * @param body + */ + public async setItemImageByIndex (itemId: string, imageType: ImageType, imageIndex: number, body?: RequestFile, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Items/{itemId}/Images/{imageType}/{imageIndex}' + .replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId))) + .replace('{' + 'imageType' + '}', encodeURIComponent(String(imageType))) + .replace('{' + 'imageIndex' + '}', encodeURIComponent(String(imageIndex))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'itemId' is not null or undefined + if (itemId === null || itemId === undefined) { + throw new Error('Required parameter itemId was null or undefined when calling setItemImageByIndex.'); + } + + // verify required parameter 'imageType' is not null or undefined + if (imageType === null || imageType === undefined) { + throw new Error('Required parameter imageType was null or undefined when calling setItemImageByIndex.'); + } + + // verify required parameter 'imageIndex' is not null or undefined + if (imageIndex === null || imageIndex === undefined) { + throw new Error('Required parameter imageIndex was null or undefined when calling setItemImageByIndex.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: ObjectSerializer.serialize(body, "RequestFile") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Updates the index for an item image. + * @param itemId Item id. + * @param imageType Image type. + * @param imageIndex Old image index. + * @param newIndex New image index. + */ + public async updateItemImageIndex (itemId: string, imageType: ImageType, imageIndex: number, newIndex: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Items/{itemId}/Images/{imageType}/{imageIndex}/Index' + .replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId))) + .replace('{' + 'imageType' + '}', encodeURIComponent(String(imageType))) + .replace('{' + 'imageIndex' + '}', encodeURIComponent(String(imageIndex))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'itemId' is not null or undefined + if (itemId === null || itemId === undefined) { + throw new Error('Required parameter itemId was null or undefined when calling updateItemImageIndex.'); + } + + // verify required parameter 'imageType' is not null or undefined + if (imageType === null || imageType === undefined) { + throw new Error('Required parameter imageType was null or undefined when calling updateItemImageIndex.'); + } + + // verify required parameter 'imageIndex' is not null or undefined + if (imageIndex === null || imageIndex === undefined) { + throw new Error('Required parameter imageIndex was null or undefined when calling updateItemImageIndex.'); + } + + // verify required parameter 'newIndex' is not null or undefined + if (newIndex === null || newIndex === undefined) { + throw new Error('Required parameter newIndex was null or undefined when calling updateItemImageIndex.'); + } + + if (newIndex !== undefined) { + localVarQueryParameters['newIndex'] = ObjectSerializer.serialize(newIndex, "number"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Uploads a custom splashscreen. The body is expected to the image contents base64 encoded. + * @param body + */ + public async uploadCustomSplashscreen (body?: RequestFile, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Branding/Splashscreen'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: ObjectSerializer.serialize(body, "RequestFile") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} diff --git a/jellyfin/api/imageByNameApi.ts b/jellyfin/api/imageByNameApi.ts new file mode 100644 index 0000000..5bdda1e --- /dev/null +++ b/jellyfin/api/imageByNameApi.ts @@ -0,0 +1,516 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import localVarRequest from 'request'; +import http from 'http'; + +/* tslint:disable:no-unused-locals */ +import { ImageByNameInfo } from '../model/imageByNameInfo'; +import { ProblemDetails } from '../model/problemDetails'; + +import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; +import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; + +import { HttpError, RequestFile } from './apis'; + +let defaultBasePath = 'http://localhost'; + +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== + +export enum ImageByNameApiApiKeys { + CustomAuthentication, +} + +export class ImageByNameApi { + protected _basePath = defaultBasePath; + protected _defaultHeaders : any = {}; + protected _useQuerystring : boolean = false; + + protected authentications = { + 'default': new VoidAuth(), + 'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'), + } + + protected interceptors: Interceptor[] = []; + + constructor(basePath?: string); + constructor(basePathOrUsername: string, password?: string, basePath?: string) { + if (password) { + if (basePath) { + this.basePath = basePath; + } + } else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername + } + } + } + + set useQuerystring(value: boolean) { + this._useQuerystring = value; + } + + set basePath(basePath: string) { + this._basePath = basePath; + } + + set defaultHeaders(defaultHeaders: any) { + this._defaultHeaders = defaultHeaders; + } + + get defaultHeaders() { + return this._defaultHeaders; + } + + get basePath() { + return this._basePath; + } + + public setDefaultAuthentication(auth: Authentication) { + this.authentications.default = auth; + } + + public setApiKey(key: ImageByNameApiApiKeys, value: string) { + (this.authentications as any)[ImageByNameApiApiKeys[key]].apiKey = value; + } + + public addInterceptor(interceptor: Interceptor) { + this.interceptors.push(interceptor); + } + + /** + * + * @summary Get General Image. + * @param name The name of the image. + * @param type Image Type (primary, backdrop, logo, etc). + */ + public async getGeneralImage (name: string, type: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/Images/General/{name}/{type}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))) + .replace('{' + 'type' + '}', encodeURIComponent(String(type))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['image/*', 'application/octet-stream', 'application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling getGeneralImage.'); + } + + // verify required parameter 'type' is not null or undefined + if (type === null || type === undefined) { + throw new Error('Required parameter type was null or undefined when calling getGeneralImage.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Get all general images. + */ + public async getGeneralImages (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array; }> { + const localVarPath = this.basePath + '/Images/General'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Array; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Array"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Get media info image. + * @param theme The theme to get the image from. + * @param name The name of the image. + */ + public async getMediaInfoImage (theme: string, name: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/Images/MediaInfo/{theme}/{name}' + .replace('{' + 'theme' + '}', encodeURIComponent(String(theme))) + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['image/*', 'application/octet-stream', 'application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'theme' is not null or undefined + if (theme === null || theme === undefined) { + throw new Error('Required parameter theme was null or undefined when calling getMediaInfoImage.'); + } + + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling getMediaInfoImage.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Get all media info images. + */ + public async getMediaInfoImages (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array; }> { + const localVarPath = this.basePath + '/Images/MediaInfo'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Array; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Array"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Get rating image. + * @param theme The theme to get the image from. + * @param name The name of the image. + */ + public async getRatingImage (theme: string, name: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/Images/Ratings/{theme}/{name}' + .replace('{' + 'theme' + '}', encodeURIComponent(String(theme))) + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['image/*', 'application/octet-stream', 'application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'theme' is not null or undefined + if (theme === null || theme === undefined) { + throw new Error('Required parameter theme was null or undefined when calling getRatingImage.'); + } + + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling getRatingImage.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Get all general images. + */ + public async getRatingImages (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array; }> { + const localVarPath = this.basePath + '/Images/Ratings'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Array; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Array"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} diff --git a/jellyfin/api/instantMixApi.ts b/jellyfin/api/instantMixApi.ts new file mode 100644 index 0000000..73d93c1 --- /dev/null +++ b/jellyfin/api/instantMixApi.ts @@ -0,0 +1,956 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import localVarRequest from 'request'; +import http from 'http'; + +/* tslint:disable:no-unused-locals */ +import { BaseItemDtoQueryResult } from '../model/baseItemDtoQueryResult'; +import { ImageType } from '../model/imageType'; +import { ItemFields } from '../model/itemFields'; + +import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; +import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; + +import { HttpError, RequestFile } from './apis'; + +let defaultBasePath = 'http://localhost'; + +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== + +export enum InstantMixApiApiKeys { + CustomAuthentication, +} + +export class InstantMixApi { + protected _basePath = defaultBasePath; + protected _defaultHeaders : any = {}; + protected _useQuerystring : boolean = false; + + protected authentications = { + 'default': new VoidAuth(), + 'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'), + } + + protected interceptors: Interceptor[] = []; + + constructor(basePath?: string); + constructor(basePathOrUsername: string, password?: string, basePath?: string) { + if (password) { + if (basePath) { + this.basePath = basePath; + } + } else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername + } + } + } + + set useQuerystring(value: boolean) { + this._useQuerystring = value; + } + + set basePath(basePath: string) { + this._basePath = basePath; + } + + set defaultHeaders(defaultHeaders: any) { + this._defaultHeaders = defaultHeaders; + } + + get defaultHeaders() { + return this._defaultHeaders; + } + + get basePath() { + return this._basePath; + } + + public setDefaultAuthentication(auth: Authentication) { + this.authentications.default = auth; + } + + public setApiKey(key: InstantMixApiApiKeys, value: string) { + (this.authentications as any)[InstantMixApiApiKeys[key]].apiKey = value; + } + + public addInterceptor(interceptor: Interceptor) { + this.interceptors.push(interceptor); + } + + /** + * + * @summary Creates an instant playlist based on a given album. + * @param id The item id. + * @param userId Optional. Filter by user id, and attach user data. + * @param limit Optional. The maximum number of records to return. + * @param fields Optional. Specify additional fields of information to return in the output. + * @param enableImages Optional. Include image information in output. + * @param enableUserData Optional. Include user data. + * @param imageTypeLimit Optional. The max number of images to return, per image type. + * @param enableImageTypes Optional. The image types to include in the output. + */ + public async getInstantMixFromAlbum (id: string, userId?: string, limit?: number, fields?: Array, enableImages?: boolean, enableUserData?: boolean, imageTypeLimit?: number, enableImageTypes?: Array, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }> { + const localVarPath = this.basePath + '/Albums/{id}/InstantMix' + .replace('{' + 'id' + '}', encodeURIComponent(String(id))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'id' is not null or undefined + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling getInstantMixFromAlbum.'); + } + + if (userId !== undefined) { + localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string"); + } + + if (limit !== undefined) { + localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); + } + + if (fields !== undefined) { + localVarQueryParameters['fields'] = ObjectSerializer.serialize(fields, "Array"); + } + + if (enableImages !== undefined) { + localVarQueryParameters['enableImages'] = ObjectSerializer.serialize(enableImages, "boolean"); + } + + if (enableUserData !== undefined) { + localVarQueryParameters['enableUserData'] = ObjectSerializer.serialize(enableUserData, "boolean"); + } + + if (imageTypeLimit !== undefined) { + localVarQueryParameters['imageTypeLimit'] = ObjectSerializer.serialize(imageTypeLimit, "number"); + } + + if (enableImageTypes !== undefined) { + localVarQueryParameters['enableImageTypes'] = ObjectSerializer.serialize(enableImageTypes, "Array"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "BaseItemDtoQueryResult"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Creates an instant playlist based on a given artist. + * @param id The item id. + * @param userId Optional. Filter by user id, and attach user data. + * @param limit Optional. The maximum number of records to return. + * @param fields Optional. Specify additional fields of information to return in the output. + * @param enableImages Optional. Include image information in output. + * @param enableUserData Optional. Include user data. + * @param imageTypeLimit Optional. The max number of images to return, per image type. + * @param enableImageTypes Optional. The image types to include in the output. + */ + public async getInstantMixFromArtists (id: string, userId?: string, limit?: number, fields?: Array, enableImages?: boolean, enableUserData?: boolean, imageTypeLimit?: number, enableImageTypes?: Array, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }> { + const localVarPath = this.basePath + '/Artists/{id}/InstantMix' + .replace('{' + 'id' + '}', encodeURIComponent(String(id))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'id' is not null or undefined + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling getInstantMixFromArtists.'); + } + + if (userId !== undefined) { + localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string"); + } + + if (limit !== undefined) { + localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); + } + + if (fields !== undefined) { + localVarQueryParameters['fields'] = ObjectSerializer.serialize(fields, "Array"); + } + + if (enableImages !== undefined) { + localVarQueryParameters['enableImages'] = ObjectSerializer.serialize(enableImages, "boolean"); + } + + if (enableUserData !== undefined) { + localVarQueryParameters['enableUserData'] = ObjectSerializer.serialize(enableUserData, "boolean"); + } + + if (imageTypeLimit !== undefined) { + localVarQueryParameters['imageTypeLimit'] = ObjectSerializer.serialize(imageTypeLimit, "number"); + } + + if (enableImageTypes !== undefined) { + localVarQueryParameters['enableImageTypes'] = ObjectSerializer.serialize(enableImageTypes, "Array"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "BaseItemDtoQueryResult"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Creates an instant playlist based on a given artist. + * @param id The item id. + * @param userId Optional. Filter by user id, and attach user data. + * @param limit Optional. The maximum number of records to return. + * @param fields Optional. Specify additional fields of information to return in the output. + * @param enableImages Optional. Include image information in output. + * @param enableUserData Optional. Include user data. + * @param imageTypeLimit Optional. The max number of images to return, per image type. + * @param enableImageTypes Optional. The image types to include in the output. + */ + public async getInstantMixFromArtists2 (id: string, userId?: string, limit?: number, fields?: Array, enableImages?: boolean, enableUserData?: boolean, imageTypeLimit?: number, enableImageTypes?: Array, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }> { + const localVarPath = this.basePath + '/Artists/InstantMix'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'id' is not null or undefined + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling getInstantMixFromArtists2.'); + } + + if (id !== undefined) { + localVarQueryParameters['id'] = ObjectSerializer.serialize(id, "string"); + } + + if (userId !== undefined) { + localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string"); + } + + if (limit !== undefined) { + localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); + } + + if (fields !== undefined) { + localVarQueryParameters['fields'] = ObjectSerializer.serialize(fields, "Array"); + } + + if (enableImages !== undefined) { + localVarQueryParameters['enableImages'] = ObjectSerializer.serialize(enableImages, "boolean"); + } + + if (enableUserData !== undefined) { + localVarQueryParameters['enableUserData'] = ObjectSerializer.serialize(enableUserData, "boolean"); + } + + if (imageTypeLimit !== undefined) { + localVarQueryParameters['imageTypeLimit'] = ObjectSerializer.serialize(imageTypeLimit, "number"); + } + + if (enableImageTypes !== undefined) { + localVarQueryParameters['enableImageTypes'] = ObjectSerializer.serialize(enableImageTypes, "Array"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "BaseItemDtoQueryResult"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Creates an instant playlist based on a given item. + * @param id The item id. + * @param userId Optional. Filter by user id, and attach user data. + * @param limit Optional. The maximum number of records to return. + * @param fields Optional. Specify additional fields of information to return in the output. + * @param enableImages Optional. Include image information in output. + * @param enableUserData Optional. Include user data. + * @param imageTypeLimit Optional. The max number of images to return, per image type. + * @param enableImageTypes Optional. The image types to include in the output. + */ + public async getInstantMixFromItem (id: string, userId?: string, limit?: number, fields?: Array, enableImages?: boolean, enableUserData?: boolean, imageTypeLimit?: number, enableImageTypes?: Array, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }> { + const localVarPath = this.basePath + '/Items/{id}/InstantMix' + .replace('{' + 'id' + '}', encodeURIComponent(String(id))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'id' is not null or undefined + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling getInstantMixFromItem.'); + } + + if (userId !== undefined) { + localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string"); + } + + if (limit !== undefined) { + localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); + } + + if (fields !== undefined) { + localVarQueryParameters['fields'] = ObjectSerializer.serialize(fields, "Array"); + } + + if (enableImages !== undefined) { + localVarQueryParameters['enableImages'] = ObjectSerializer.serialize(enableImages, "boolean"); + } + + if (enableUserData !== undefined) { + localVarQueryParameters['enableUserData'] = ObjectSerializer.serialize(enableUserData, "boolean"); + } + + if (imageTypeLimit !== undefined) { + localVarQueryParameters['imageTypeLimit'] = ObjectSerializer.serialize(imageTypeLimit, "number"); + } + + if (enableImageTypes !== undefined) { + localVarQueryParameters['enableImageTypes'] = ObjectSerializer.serialize(enableImageTypes, "Array"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "BaseItemDtoQueryResult"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Creates an instant playlist based on a given genre. + * @param id The item id. + * @param userId Optional. Filter by user id, and attach user data. + * @param limit Optional. The maximum number of records to return. + * @param fields Optional. Specify additional fields of information to return in the output. + * @param enableImages Optional. Include image information in output. + * @param enableUserData Optional. Include user data. + * @param imageTypeLimit Optional. The max number of images to return, per image type. + * @param enableImageTypes Optional. The image types to include in the output. + */ + public async getInstantMixFromMusicGenreById (id: string, userId?: string, limit?: number, fields?: Array, enableImages?: boolean, enableUserData?: boolean, imageTypeLimit?: number, enableImageTypes?: Array, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }> { + const localVarPath = this.basePath + '/MusicGenres/InstantMix'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'id' is not null or undefined + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling getInstantMixFromMusicGenreById.'); + } + + if (id !== undefined) { + localVarQueryParameters['id'] = ObjectSerializer.serialize(id, "string"); + } + + if (userId !== undefined) { + localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string"); + } + + if (limit !== undefined) { + localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); + } + + if (fields !== undefined) { + localVarQueryParameters['fields'] = ObjectSerializer.serialize(fields, "Array"); + } + + if (enableImages !== undefined) { + localVarQueryParameters['enableImages'] = ObjectSerializer.serialize(enableImages, "boolean"); + } + + if (enableUserData !== undefined) { + localVarQueryParameters['enableUserData'] = ObjectSerializer.serialize(enableUserData, "boolean"); + } + + if (imageTypeLimit !== undefined) { + localVarQueryParameters['imageTypeLimit'] = ObjectSerializer.serialize(imageTypeLimit, "number"); + } + + if (enableImageTypes !== undefined) { + localVarQueryParameters['enableImageTypes'] = ObjectSerializer.serialize(enableImageTypes, "Array"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "BaseItemDtoQueryResult"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Creates an instant playlist based on a given genre. + * @param name The genre name. + * @param userId Optional. Filter by user id, and attach user data. + * @param limit Optional. The maximum number of records to return. + * @param fields Optional. Specify additional fields of information to return in the output. + * @param enableImages Optional. Include image information in output. + * @param enableUserData Optional. Include user data. + * @param imageTypeLimit Optional. The max number of images to return, per image type. + * @param enableImageTypes Optional. The image types to include in the output. + */ + public async getInstantMixFromMusicGenreByName (name: string, userId?: string, limit?: number, fields?: Array, enableImages?: boolean, enableUserData?: boolean, imageTypeLimit?: number, enableImageTypes?: Array, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }> { + const localVarPath = this.basePath + '/MusicGenres/{name}/InstantMix' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling getInstantMixFromMusicGenreByName.'); + } + + if (userId !== undefined) { + localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string"); + } + + if (limit !== undefined) { + localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); + } + + if (fields !== undefined) { + localVarQueryParameters['fields'] = ObjectSerializer.serialize(fields, "Array"); + } + + if (enableImages !== undefined) { + localVarQueryParameters['enableImages'] = ObjectSerializer.serialize(enableImages, "boolean"); + } + + if (enableUserData !== undefined) { + localVarQueryParameters['enableUserData'] = ObjectSerializer.serialize(enableUserData, "boolean"); + } + + if (imageTypeLimit !== undefined) { + localVarQueryParameters['imageTypeLimit'] = ObjectSerializer.serialize(imageTypeLimit, "number"); + } + + if (enableImageTypes !== undefined) { + localVarQueryParameters['enableImageTypes'] = ObjectSerializer.serialize(enableImageTypes, "Array"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "BaseItemDtoQueryResult"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Creates an instant playlist based on a given playlist. + * @param id The item id. + * @param userId Optional. Filter by user id, and attach user data. + * @param limit Optional. The maximum number of records to return. + * @param fields Optional. Specify additional fields of information to return in the output. + * @param enableImages Optional. Include image information in output. + * @param enableUserData Optional. Include user data. + * @param imageTypeLimit Optional. The max number of images to return, per image type. + * @param enableImageTypes Optional. The image types to include in the output. + */ + public async getInstantMixFromPlaylist (id: string, userId?: string, limit?: number, fields?: Array, enableImages?: boolean, enableUserData?: boolean, imageTypeLimit?: number, enableImageTypes?: Array, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }> { + const localVarPath = this.basePath + '/Playlists/{id}/InstantMix' + .replace('{' + 'id' + '}', encodeURIComponent(String(id))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'id' is not null or undefined + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling getInstantMixFromPlaylist.'); + } + + if (userId !== undefined) { + localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string"); + } + + if (limit !== undefined) { + localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); + } + + if (fields !== undefined) { + localVarQueryParameters['fields'] = ObjectSerializer.serialize(fields, "Array"); + } + + if (enableImages !== undefined) { + localVarQueryParameters['enableImages'] = ObjectSerializer.serialize(enableImages, "boolean"); + } + + if (enableUserData !== undefined) { + localVarQueryParameters['enableUserData'] = ObjectSerializer.serialize(enableUserData, "boolean"); + } + + if (imageTypeLimit !== undefined) { + localVarQueryParameters['imageTypeLimit'] = ObjectSerializer.serialize(imageTypeLimit, "number"); + } + + if (enableImageTypes !== undefined) { + localVarQueryParameters['enableImageTypes'] = ObjectSerializer.serialize(enableImageTypes, "Array"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "BaseItemDtoQueryResult"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Creates an instant playlist based on a given song. + * @param id The item id. + * @param userId Optional. Filter by user id, and attach user data. + * @param limit Optional. The maximum number of records to return. + * @param fields Optional. Specify additional fields of information to return in the output. + * @param enableImages Optional. Include image information in output. + * @param enableUserData Optional. Include user data. + * @param imageTypeLimit Optional. The max number of images to return, per image type. + * @param enableImageTypes Optional. The image types to include in the output. + */ + public async getInstantMixFromSong (id: string, userId?: string, limit?: number, fields?: Array, enableImages?: boolean, enableUserData?: boolean, imageTypeLimit?: number, enableImageTypes?: Array, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }> { + const localVarPath = this.basePath + '/Songs/{id}/InstantMix' + .replace('{' + 'id' + '}', encodeURIComponent(String(id))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'id' is not null or undefined + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling getInstantMixFromSong.'); + } + + if (userId !== undefined) { + localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string"); + } + + if (limit !== undefined) { + localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); + } + + if (fields !== undefined) { + localVarQueryParameters['fields'] = ObjectSerializer.serialize(fields, "Array"); + } + + if (enableImages !== undefined) { + localVarQueryParameters['enableImages'] = ObjectSerializer.serialize(enableImages, "boolean"); + } + + if (enableUserData !== undefined) { + localVarQueryParameters['enableUserData'] = ObjectSerializer.serialize(enableUserData, "boolean"); + } + + if (imageTypeLimit !== undefined) { + localVarQueryParameters['imageTypeLimit'] = ObjectSerializer.serialize(imageTypeLimit, "number"); + } + + if (enableImageTypes !== undefined) { + localVarQueryParameters['enableImageTypes'] = ObjectSerializer.serialize(enableImageTypes, "Array"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "BaseItemDtoQueryResult"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} diff --git a/jellyfin/api/itemLookupApi.ts b/jellyfin/api/itemLookupApi.ts new file mode 100644 index 0000000..ad40b5f --- /dev/null +++ b/jellyfin/api/itemLookupApi.ts @@ -0,0 +1,900 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import localVarRequest from 'request'; +import http from 'http'; + +/* tslint:disable:no-unused-locals */ +import { ApplySearchCriteriaRequest } from '../model/applySearchCriteriaRequest'; +import { ExternalIdInfo } from '../model/externalIdInfo'; +import { GetBookRemoteSearchResultsRequest } from '../model/getBookRemoteSearchResultsRequest'; +import { GetBoxSetRemoteSearchResultsRequest } from '../model/getBoxSetRemoteSearchResultsRequest'; +import { GetMovieRemoteSearchResultsRequest } from '../model/getMovieRemoteSearchResultsRequest'; +import { GetMusicAlbumRemoteSearchResultsRequest } from '../model/getMusicAlbumRemoteSearchResultsRequest'; +import { GetMusicArtistRemoteSearchResultsRequest } from '../model/getMusicArtistRemoteSearchResultsRequest'; +import { GetMusicVideoRemoteSearchResultsRequest } from '../model/getMusicVideoRemoteSearchResultsRequest'; +import { GetPersonRemoteSearchResultsRequest } from '../model/getPersonRemoteSearchResultsRequest'; +import { GetSeriesRemoteSearchResultsRequest } from '../model/getSeriesRemoteSearchResultsRequest'; +import { GetTrailerRemoteSearchResultsRequest } from '../model/getTrailerRemoteSearchResultsRequest'; +import { ProblemDetails } from '../model/problemDetails'; +import { RemoteSearchResult } from '../model/remoteSearchResult'; + +import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; +import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; + +import { HttpError, RequestFile } from './apis'; + +let defaultBasePath = 'http://localhost'; + +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== + +export enum ItemLookupApiApiKeys { + CustomAuthentication, +} + +export class ItemLookupApi { + protected _basePath = defaultBasePath; + protected _defaultHeaders : any = {}; + protected _useQuerystring : boolean = false; + + protected authentications = { + 'default': new VoidAuth(), + 'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'), + } + + protected interceptors: Interceptor[] = []; + + constructor(basePath?: string); + constructor(basePathOrUsername: string, password?: string, basePath?: string) { + if (password) { + if (basePath) { + this.basePath = basePath; + } + } else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername + } + } + } + + set useQuerystring(value: boolean) { + this._useQuerystring = value; + } + + set basePath(basePath: string) { + this._basePath = basePath; + } + + set defaultHeaders(defaultHeaders: any) { + this._defaultHeaders = defaultHeaders; + } + + get defaultHeaders() { + return this._defaultHeaders; + } + + get basePath() { + return this._basePath; + } + + public setDefaultAuthentication(auth: Authentication) { + this.authentications.default = auth; + } + + public setApiKey(key: ItemLookupApiApiKeys, value: string) { + (this.authentications as any)[ItemLookupApiApiKeys[key]].apiKey = value; + } + + public addInterceptor(interceptor: Interceptor) { + this.interceptors.push(interceptor); + } + + /** + * + * @summary Applies search criteria to an item and refreshes metadata. + * @param itemId Item id. + * @param applySearchCriteriaRequest The remote search result. + * @param replaceAllImages Optional. Whether or not to replace all images. Default: True. + */ + public async applySearchCriteria (itemId: string, applySearchCriteriaRequest: ApplySearchCriteriaRequest, replaceAllImages?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Items/RemoteSearch/Apply/{itemId}' + .replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + // verify required parameter 'itemId' is not null or undefined + if (itemId === null || itemId === undefined) { + throw new Error('Required parameter itemId was null or undefined when calling applySearchCriteria.'); + } + + // verify required parameter 'applySearchCriteriaRequest' is not null or undefined + if (applySearchCriteriaRequest === null || applySearchCriteriaRequest === undefined) { + throw new Error('Required parameter applySearchCriteriaRequest was null or undefined when calling applySearchCriteria.'); + } + + if (replaceAllImages !== undefined) { + localVarQueryParameters['replaceAllImages'] = ObjectSerializer.serialize(replaceAllImages, "boolean"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: ObjectSerializer.serialize(applySearchCriteriaRequest, "ApplySearchCriteriaRequest") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Get book remote search. + * @param getBookRemoteSearchResultsRequest Remote search query. + */ + public async getBookRemoteSearchResults (getBookRemoteSearchResultsRequest: GetBookRemoteSearchResultsRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array; }> { + const localVarPath = this.basePath + '/Items/RemoteSearch/Book'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'getBookRemoteSearchResultsRequest' is not null or undefined + if (getBookRemoteSearchResultsRequest === null || getBookRemoteSearchResultsRequest === undefined) { + throw new Error('Required parameter getBookRemoteSearchResultsRequest was null or undefined when calling getBookRemoteSearchResults.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: ObjectSerializer.serialize(getBookRemoteSearchResultsRequest, "GetBookRemoteSearchResultsRequest") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Array; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Array"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Get box set remote search. + * @param getBoxSetRemoteSearchResultsRequest Remote search query. + */ + public async getBoxSetRemoteSearchResults (getBoxSetRemoteSearchResultsRequest: GetBoxSetRemoteSearchResultsRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array; }> { + const localVarPath = this.basePath + '/Items/RemoteSearch/BoxSet'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'getBoxSetRemoteSearchResultsRequest' is not null or undefined + if (getBoxSetRemoteSearchResultsRequest === null || getBoxSetRemoteSearchResultsRequest === undefined) { + throw new Error('Required parameter getBoxSetRemoteSearchResultsRequest was null or undefined when calling getBoxSetRemoteSearchResults.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: ObjectSerializer.serialize(getBoxSetRemoteSearchResultsRequest, "GetBoxSetRemoteSearchResultsRequest") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Array; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Array"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Get the item\'s external id info. + * @param itemId Item id. + */ + public async getExternalIdInfos (itemId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array; }> { + const localVarPath = this.basePath + '/Items/{itemId}/ExternalIdInfos' + .replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'itemId' is not null or undefined + if (itemId === null || itemId === undefined) { + throw new Error('Required parameter itemId was null or undefined when calling getExternalIdInfos.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Array; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Array"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Get movie remote search. + * @param getMovieRemoteSearchResultsRequest Remote search query. + */ + public async getMovieRemoteSearchResults (getMovieRemoteSearchResultsRequest: GetMovieRemoteSearchResultsRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array; }> { + const localVarPath = this.basePath + '/Items/RemoteSearch/Movie'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'getMovieRemoteSearchResultsRequest' is not null or undefined + if (getMovieRemoteSearchResultsRequest === null || getMovieRemoteSearchResultsRequest === undefined) { + throw new Error('Required parameter getMovieRemoteSearchResultsRequest was null or undefined when calling getMovieRemoteSearchResults.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: ObjectSerializer.serialize(getMovieRemoteSearchResultsRequest, "GetMovieRemoteSearchResultsRequest") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Array; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Array"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Get music album remote search. + * @param getMusicAlbumRemoteSearchResultsRequest Remote search query. + */ + public async getMusicAlbumRemoteSearchResults (getMusicAlbumRemoteSearchResultsRequest: GetMusicAlbumRemoteSearchResultsRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array; }> { + const localVarPath = this.basePath + '/Items/RemoteSearch/MusicAlbum'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'getMusicAlbumRemoteSearchResultsRequest' is not null or undefined + if (getMusicAlbumRemoteSearchResultsRequest === null || getMusicAlbumRemoteSearchResultsRequest === undefined) { + throw new Error('Required parameter getMusicAlbumRemoteSearchResultsRequest was null or undefined when calling getMusicAlbumRemoteSearchResults.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: ObjectSerializer.serialize(getMusicAlbumRemoteSearchResultsRequest, "GetMusicAlbumRemoteSearchResultsRequest") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Array; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Array"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Get music artist remote search. + * @param getMusicArtistRemoteSearchResultsRequest Remote search query. + */ + public async getMusicArtistRemoteSearchResults (getMusicArtistRemoteSearchResultsRequest: GetMusicArtistRemoteSearchResultsRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array; }> { + const localVarPath = this.basePath + '/Items/RemoteSearch/MusicArtist'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'getMusicArtistRemoteSearchResultsRequest' is not null or undefined + if (getMusicArtistRemoteSearchResultsRequest === null || getMusicArtistRemoteSearchResultsRequest === undefined) { + throw new Error('Required parameter getMusicArtistRemoteSearchResultsRequest was null or undefined when calling getMusicArtistRemoteSearchResults.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: ObjectSerializer.serialize(getMusicArtistRemoteSearchResultsRequest, "GetMusicArtistRemoteSearchResultsRequest") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Array; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Array"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Get music video remote search. + * @param getMusicVideoRemoteSearchResultsRequest Remote search query. + */ + public async getMusicVideoRemoteSearchResults (getMusicVideoRemoteSearchResultsRequest: GetMusicVideoRemoteSearchResultsRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array; }> { + const localVarPath = this.basePath + '/Items/RemoteSearch/MusicVideo'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'getMusicVideoRemoteSearchResultsRequest' is not null or undefined + if (getMusicVideoRemoteSearchResultsRequest === null || getMusicVideoRemoteSearchResultsRequest === undefined) { + throw new Error('Required parameter getMusicVideoRemoteSearchResultsRequest was null or undefined when calling getMusicVideoRemoteSearchResults.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: ObjectSerializer.serialize(getMusicVideoRemoteSearchResultsRequest, "GetMusicVideoRemoteSearchResultsRequest") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Array; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Array"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Get person remote search. + * @param getPersonRemoteSearchResultsRequest Remote search query. + */ + public async getPersonRemoteSearchResults (getPersonRemoteSearchResultsRequest: GetPersonRemoteSearchResultsRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array; }> { + const localVarPath = this.basePath + '/Items/RemoteSearch/Person'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'getPersonRemoteSearchResultsRequest' is not null or undefined + if (getPersonRemoteSearchResultsRequest === null || getPersonRemoteSearchResultsRequest === undefined) { + throw new Error('Required parameter getPersonRemoteSearchResultsRequest was null or undefined when calling getPersonRemoteSearchResults.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: ObjectSerializer.serialize(getPersonRemoteSearchResultsRequest, "GetPersonRemoteSearchResultsRequest") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Array; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Array"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Get series remote search. + * @param getSeriesRemoteSearchResultsRequest Remote search query. + */ + public async getSeriesRemoteSearchResults (getSeriesRemoteSearchResultsRequest: GetSeriesRemoteSearchResultsRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array; }> { + const localVarPath = this.basePath + '/Items/RemoteSearch/Series'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'getSeriesRemoteSearchResultsRequest' is not null or undefined + if (getSeriesRemoteSearchResultsRequest === null || getSeriesRemoteSearchResultsRequest === undefined) { + throw new Error('Required parameter getSeriesRemoteSearchResultsRequest was null or undefined when calling getSeriesRemoteSearchResults.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: ObjectSerializer.serialize(getSeriesRemoteSearchResultsRequest, "GetSeriesRemoteSearchResultsRequest") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Array; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Array"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Get trailer remote search. + * @param getTrailerRemoteSearchResultsRequest Remote search query. + */ + public async getTrailerRemoteSearchResults (getTrailerRemoteSearchResultsRequest: GetTrailerRemoteSearchResultsRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array; }> { + const localVarPath = this.basePath + '/Items/RemoteSearch/Trailer'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'getTrailerRemoteSearchResultsRequest' is not null or undefined + if (getTrailerRemoteSearchResultsRequest === null || getTrailerRemoteSearchResultsRequest === undefined) { + throw new Error('Required parameter getTrailerRemoteSearchResultsRequest was null or undefined when calling getTrailerRemoteSearchResults.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: ObjectSerializer.serialize(getTrailerRemoteSearchResultsRequest, "GetTrailerRemoteSearchResultsRequest") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Array; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Array"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} diff --git a/jellyfin/api/itemRefreshApi.ts b/jellyfin/api/itemRefreshApi.ts new file mode 100644 index 0000000..d345eff --- /dev/null +++ b/jellyfin/api/itemRefreshApi.ts @@ -0,0 +1,184 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import localVarRequest from 'request'; +import http from 'http'; + +/* tslint:disable:no-unused-locals */ +import { MetadataRefreshMode } from '../model/metadataRefreshMode'; +import { ProblemDetails } from '../model/problemDetails'; + +import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; +import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; + +import { HttpError, RequestFile } from './apis'; + +let defaultBasePath = 'http://localhost'; + +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== + +export enum ItemRefreshApiApiKeys { + CustomAuthentication, +} + +export class ItemRefreshApi { + protected _basePath = defaultBasePath; + protected _defaultHeaders : any = {}; + protected _useQuerystring : boolean = false; + + protected authentications = { + 'default': new VoidAuth(), + 'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'), + } + + protected interceptors: Interceptor[] = []; + + constructor(basePath?: string); + constructor(basePathOrUsername: string, password?: string, basePath?: string) { + if (password) { + if (basePath) { + this.basePath = basePath; + } + } else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername + } + } + } + + set useQuerystring(value: boolean) { + this._useQuerystring = value; + } + + set basePath(basePath: string) { + this._basePath = basePath; + } + + set defaultHeaders(defaultHeaders: any) { + this._defaultHeaders = defaultHeaders; + } + + get defaultHeaders() { + return this._defaultHeaders; + } + + get basePath() { + return this._basePath; + } + + public setDefaultAuthentication(auth: Authentication) { + this.authentications.default = auth; + } + + public setApiKey(key: ItemRefreshApiApiKeys, value: string) { + (this.authentications as any)[ItemRefreshApiApiKeys[key]].apiKey = value; + } + + public addInterceptor(interceptor: Interceptor) { + this.interceptors.push(interceptor); + } + + /** + * + * @summary Refreshes metadata for an item. + * @param itemId Item id. + * @param metadataRefreshMode (Optional) Specifies the metadata refresh mode. + * @param imageRefreshMode (Optional) Specifies the image refresh mode. + * @param replaceAllMetadata (Optional) Determines if metadata should be replaced. Only applicable if mode is FullRefresh. + * @param replaceAllImages (Optional) Determines if images should be replaced. Only applicable if mode is FullRefresh. + */ + public async refreshItem (itemId: string, metadataRefreshMode?: MetadataRefreshMode, imageRefreshMode?: MetadataRefreshMode, replaceAllMetadata?: boolean, replaceAllImages?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Items/{itemId}/Refresh' + .replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'itemId' is not null or undefined + if (itemId === null || itemId === undefined) { + throw new Error('Required parameter itemId was null or undefined when calling refreshItem.'); + } + + if (metadataRefreshMode !== undefined) { + localVarQueryParameters['metadataRefreshMode'] = ObjectSerializer.serialize(metadataRefreshMode, "MetadataRefreshMode"); + } + + if (imageRefreshMode !== undefined) { + localVarQueryParameters['imageRefreshMode'] = ObjectSerializer.serialize(imageRefreshMode, "MetadataRefreshMode"); + } + + if (replaceAllMetadata !== undefined) { + localVarQueryParameters['replaceAllMetadata'] = ObjectSerializer.serialize(replaceAllMetadata, "boolean"); + } + + if (replaceAllImages !== undefined) { + localVarQueryParameters['replaceAllImages'] = ObjectSerializer.serialize(replaceAllImages, "boolean"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} diff --git a/jellyfin/api/itemUpdateApi.ts b/jellyfin/api/itemUpdateApi.ts new file mode 100644 index 0000000..d98ee26 --- /dev/null +++ b/jellyfin/api/itemUpdateApi.ts @@ -0,0 +1,320 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import localVarRequest from 'request'; +import http from 'http'; + +/* tslint:disable:no-unused-locals */ +import { MetadataEditorInfo } from '../model/metadataEditorInfo'; +import { ProblemDetails } from '../model/problemDetails'; +import { UpdateItemRequest } from '../model/updateItemRequest'; + +import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; +import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; + +import { HttpError, RequestFile } from './apis'; + +let defaultBasePath = 'http://localhost'; + +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== + +export enum ItemUpdateApiApiKeys { + CustomAuthentication, +} + +export class ItemUpdateApi { + protected _basePath = defaultBasePath; + protected _defaultHeaders : any = {}; + protected _useQuerystring : boolean = false; + + protected authentications = { + 'default': new VoidAuth(), + 'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'), + } + + protected interceptors: Interceptor[] = []; + + constructor(basePath?: string); + constructor(basePathOrUsername: string, password?: string, basePath?: string) { + if (password) { + if (basePath) { + this.basePath = basePath; + } + } else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername + } + } + } + + set useQuerystring(value: boolean) { + this._useQuerystring = value; + } + + set basePath(basePath: string) { + this._basePath = basePath; + } + + set defaultHeaders(defaultHeaders: any) { + this._defaultHeaders = defaultHeaders; + } + + get defaultHeaders() { + return this._defaultHeaders; + } + + get basePath() { + return this._basePath; + } + + public setDefaultAuthentication(auth: Authentication) { + this.authentications.default = auth; + } + + public setApiKey(key: ItemUpdateApiApiKeys, value: string) { + (this.authentications as any)[ItemUpdateApiApiKeys[key]].apiKey = value; + } + + public addInterceptor(interceptor: Interceptor) { + this.interceptors.push(interceptor); + } + + /** + * + * @summary Gets metadata editor info for an item. + * @param itemId The item id. + */ + public async getMetadataEditorInfo (itemId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: MetadataEditorInfo; }> { + const localVarPath = this.basePath + '/Items/{itemId}/MetadataEditor' + .replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'itemId' is not null or undefined + if (itemId === null || itemId === undefined) { + throw new Error('Required parameter itemId was null or undefined when calling getMetadataEditorInfo.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: MetadataEditorInfo; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "MetadataEditorInfo"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Updates an item. + * @param itemId The item id. + * @param updateItemRequest The new item properties. + */ + public async updateItem (itemId: string, updateItemRequest: UpdateItemRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Items/{itemId}' + .replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'itemId' is not null or undefined + if (itemId === null || itemId === undefined) { + throw new Error('Required parameter itemId was null or undefined when calling updateItem.'); + } + + // verify required parameter 'updateItemRequest' is not null or undefined + if (updateItemRequest === null || updateItemRequest === undefined) { + throw new Error('Required parameter updateItemRequest was null or undefined when calling updateItem.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: ObjectSerializer.serialize(updateItemRequest, "UpdateItemRequest") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Updates an item\'s content type. + * @param itemId The item id. + * @param contentType The content type of the item. + */ + public async updateItemContentType (itemId: string, contentType?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Items/{itemId}/ContentType' + .replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'itemId' is not null or undefined + if (itemId === null || itemId === undefined) { + throw new Error('Required parameter itemId was null or undefined when calling updateItemContentType.'); + } + + if (contentType !== undefined) { + localVarQueryParameters['contentType'] = ObjectSerializer.serialize(contentType, "string"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} diff --git a/jellyfin/api/itemsApi.ts b/jellyfin/api/itemsApi.ts new file mode 100644 index 0000000..6851e4a --- /dev/null +++ b/jellyfin/api/itemsApi.ts @@ -0,0 +1,1224 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import localVarRequest from 'request'; +import http from 'http'; + +/* tslint:disable:no-unused-locals */ +import { BaseItemDtoQueryResult } from '../model/baseItemDtoQueryResult'; +import { BaseItemKind } from '../model/baseItemKind'; +import { ImageType } from '../model/imageType'; +import { ItemFields } from '../model/itemFields'; +import { ItemFilter } from '../model/itemFilter'; +import { LocationType } from '../model/locationType'; +import { SeriesStatus } from '../model/seriesStatus'; +import { SortOrder } from '../model/sortOrder'; +import { VideoType } from '../model/videoType'; + +import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; +import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; + +import { HttpError, RequestFile } from './apis'; + +let defaultBasePath = 'http://localhost'; + +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== + +export enum ItemsApiApiKeys { + CustomAuthentication, +} + +export class ItemsApi { + protected _basePath = defaultBasePath; + protected _defaultHeaders : any = {}; + protected _useQuerystring : boolean = false; + + protected authentications = { + 'default': new VoidAuth(), + 'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'), + } + + protected interceptors: Interceptor[] = []; + + constructor(basePath?: string); + constructor(basePathOrUsername: string, password?: string, basePath?: string) { + if (password) { + if (basePath) { + this.basePath = basePath; + } + } else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername + } + } + } + + set useQuerystring(value: boolean) { + this._useQuerystring = value; + } + + set basePath(basePath: string) { + this._basePath = basePath; + } + + set defaultHeaders(defaultHeaders: any) { + this._defaultHeaders = defaultHeaders; + } + + get defaultHeaders() { + return this._defaultHeaders; + } + + get basePath() { + return this._basePath; + } + + public setDefaultAuthentication(auth: Authentication) { + this.authentications.default = auth; + } + + public setApiKey(key: ItemsApiApiKeys, value: string) { + (this.authentications as any)[ItemsApiApiKeys[key]].apiKey = value; + } + + public addInterceptor(interceptor: Interceptor) { + this.interceptors.push(interceptor); + } + + /** + * + * @summary Gets items based on a query. + * @param userId The user id supplied as query parameter. + * @param maxOfficialRating Optional filter by maximum official rating (PG, PG-13, TV-MA, etc). + * @param hasThemeSong Optional filter by items with theme songs. + * @param hasThemeVideo Optional filter by items with theme videos. + * @param hasSubtitles Optional filter by items with subtitles. + * @param hasSpecialFeature Optional filter by items with special features. + * @param hasTrailer Optional filter by items with trailers. + * @param adjacentTo Optional. Return items that are siblings of a supplied item. + * @param parentIndexNumber Optional filter by parent index number. + * @param hasParentalRating Optional filter by items that have or do not have a parental rating. + * @param isHd Optional filter by items that are HD or not. + * @param is4K Optional filter by items that are 4K or not. + * @param locationTypes Optional. If specified, results will be filtered based on LocationType. This allows multiple, comma delimited. + * @param excludeLocationTypes Optional. If specified, results will be filtered based on the LocationType. This allows multiple, comma delimited. + * @param isMissing Optional filter by items that are missing episodes or not. + * @param isUnaired Optional filter by items that are unaired episodes or not. + * @param minCommunityRating Optional filter by minimum community rating. + * @param minCriticRating Optional filter by minimum critic rating. + * @param minPremiereDate Optional. The minimum premiere date. Format = ISO. + * @param minDateLastSaved Optional. The minimum last saved date. Format = ISO. + * @param minDateLastSavedForUser Optional. The minimum last saved date for the current user. Format = ISO. + * @param maxPremiereDate Optional. The maximum premiere date. Format = ISO. + * @param hasOverview Optional filter by items that have an overview or not. + * @param hasImdbId Optional filter by items that have an imdb id or not. + * @param hasTmdbId Optional filter by items that have a tmdb id or not. + * @param hasTvdbId Optional filter by items that have a tvdb id or not. + * @param isMovie Optional filter for live tv movies. + * @param isSeries Optional filter for live tv series. + * @param isNews Optional filter for live tv news. + * @param isKids Optional filter for live tv kids. + * @param isSports Optional filter for live tv sports. + * @param excludeItemIds Optional. If specified, results will be filtered by excluding item ids. This allows multiple, comma delimited. + * @param startIndex Optional. The record index to start at. All items with a lower index will be dropped from the results. + * @param limit Optional. The maximum number of records to return. + * @param recursive When searching within folders, this determines whether or not the search will be recursive. true/false. + * @param searchTerm Optional. Filter based on a search term. + * @param sortOrder Sort Order - Ascending,Descending. + * @param parentId Specify this to localize the search to a specific item or folder. Omit to use the root. + * @param fields Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimited. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines. + * @param excludeItemTypes Optional. If specified, results will be filtered based on item type. This allows multiple, comma delimited. + * @param includeItemTypes Optional. If specified, results will be filtered based on the item type. This allows multiple, comma delimited. + * @param filters Optional. Specify additional filters to apply. This allows multiple, comma delimited. Options: IsFolder, IsNotFolder, IsUnplayed, IsPlayed, IsFavorite, IsResumable, Likes, Dislikes. + * @param isFavorite Optional filter by items that are marked as favorite, or not. + * @param mediaTypes Optional filter by MediaType. Allows multiple, comma delimited. + * @param imageTypes Optional. If specified, results will be filtered based on those containing image types. This allows multiple, comma delimited. + * @param sortBy Optional. Specify one or more sort orders, comma delimited. Options: Album, AlbumArtist, Artist, Budget, CommunityRating, CriticRating, DateCreated, DatePlayed, PlayCount, PremiereDate, ProductionYear, SortName, Random, Revenue, Runtime. + * @param isPlayed Optional filter by items that are played, or not. + * @param genres Optional. If specified, results will be filtered based on genre. This allows multiple, pipe delimited. + * @param officialRatings Optional. If specified, results will be filtered based on OfficialRating. This allows multiple, pipe delimited. + * @param tags Optional. If specified, results will be filtered based on tag. This allows multiple, pipe delimited. + * @param years Optional. If specified, results will be filtered based on production year. This allows multiple, comma delimited. + * @param enableUserData Optional, include user data. + * @param imageTypeLimit Optional, the max number of images to return, per image type. + * @param enableImageTypes Optional. The image types to include in the output. + * @param person Optional. If specified, results will be filtered to include only those containing the specified person. + * @param personIds Optional. If specified, results will be filtered to include only those containing the specified person id. + * @param personTypes Optional. If specified, along with Person, results will be filtered to include only those containing the specified person and PersonType. Allows multiple, comma-delimited. + * @param studios Optional. If specified, results will be filtered based on studio. This allows multiple, pipe delimited. + * @param artists Optional. If specified, results will be filtered based on artists. This allows multiple, pipe delimited. + * @param excludeArtistIds Optional. If specified, results will be filtered based on artist id. This allows multiple, pipe delimited. + * @param artistIds Optional. If specified, results will be filtered to include only those containing the specified artist id. + * @param albumArtistIds Optional. If specified, results will be filtered to include only those containing the specified album artist id. + * @param contributingArtistIds Optional. If specified, results will be filtered to include only those containing the specified contributing artist id. + * @param albums Optional. If specified, results will be filtered based on album. This allows multiple, pipe delimited. + * @param albumIds Optional. If specified, results will be filtered based on album id. This allows multiple, pipe delimited. + * @param ids Optional. If specific items are needed, specify a list of item id\'s to retrieve. This allows multiple, comma delimited. + * @param videoTypes Optional filter by VideoType (videofile, dvd, bluray, iso). Allows multiple, comma delimited. + * @param minOfficialRating Optional filter by minimum official rating (PG, PG-13, TV-MA, etc). + * @param isLocked Optional filter by items that are locked. + * @param isPlaceHolder Optional filter by items that are placeholders. + * @param hasOfficialRating Optional filter by items that have official ratings. + * @param collapseBoxSetItems Whether or not to hide items behind their boxsets. + * @param minWidth Optional. Filter by the minimum width of the item. + * @param minHeight Optional. Filter by the minimum height of the item. + * @param maxWidth Optional. Filter by the maximum width of the item. + * @param maxHeight Optional. Filter by the maximum height of the item. + * @param is3D Optional filter by items that are 3D, or not. + * @param seriesStatus Optional filter by Series Status. Allows multiple, comma delimited. + * @param nameStartsWithOrGreater Optional filter by items whose name is sorted equally or greater than a given input string. + * @param nameStartsWith Optional filter by items whose name is sorted equally than a given input string. + * @param nameLessThan Optional filter by items whose name is equally or lesser than a given input string. + * @param studioIds Optional. If specified, results will be filtered based on studio id. This allows multiple, pipe delimited. + * @param genreIds Optional. If specified, results will be filtered based on genre id. This allows multiple, pipe delimited. + * @param enableTotalRecordCount Optional. Enable the total record count. + * @param enableImages Optional, include image information in output. + */ + public async getItems (userId?: string, maxOfficialRating?: string, hasThemeSong?: boolean, hasThemeVideo?: boolean, hasSubtitles?: boolean, hasSpecialFeature?: boolean, hasTrailer?: boolean, adjacentTo?: string, parentIndexNumber?: number, hasParentalRating?: boolean, isHd?: boolean, is4K?: boolean, locationTypes?: Array, excludeLocationTypes?: Array, isMissing?: boolean, isUnaired?: boolean, minCommunityRating?: number, minCriticRating?: number, minPremiereDate?: Date, minDateLastSaved?: Date, minDateLastSavedForUser?: Date, maxPremiereDate?: Date, hasOverview?: boolean, hasImdbId?: boolean, hasTmdbId?: boolean, hasTvdbId?: boolean, isMovie?: boolean, isSeries?: boolean, isNews?: boolean, isKids?: boolean, isSports?: boolean, excludeItemIds?: Array, startIndex?: number, limit?: number, recursive?: boolean, searchTerm?: string, sortOrder?: Array, parentId?: string, fields?: Array, excludeItemTypes?: Array, includeItemTypes?: Array, filters?: Array, isFavorite?: boolean, mediaTypes?: Array, imageTypes?: Array, sortBy?: Array, isPlayed?: boolean, genres?: Array, officialRatings?: Array, tags?: Array, years?: Array, enableUserData?: boolean, imageTypeLimit?: number, enableImageTypes?: Array, person?: string, personIds?: Array, personTypes?: Array, studios?: Array, artists?: Array, excludeArtistIds?: Array, artistIds?: Array, albumArtistIds?: Array, contributingArtistIds?: Array, albums?: Array, albumIds?: Array, ids?: Array, videoTypes?: Array, minOfficialRating?: string, isLocked?: boolean, isPlaceHolder?: boolean, hasOfficialRating?: boolean, collapseBoxSetItems?: boolean, minWidth?: number, minHeight?: number, maxWidth?: number, maxHeight?: number, is3D?: boolean, seriesStatus?: Array, nameStartsWithOrGreater?: string, nameStartsWith?: string, nameLessThan?: string, studioIds?: Array, genreIds?: Array, enableTotalRecordCount?: boolean, enableImages?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }> { + const localVarPath = this.basePath + '/Items'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + if (userId !== undefined) { + localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string"); + } + + if (maxOfficialRating !== undefined) { + localVarQueryParameters['maxOfficialRating'] = ObjectSerializer.serialize(maxOfficialRating, "string"); + } + + if (hasThemeSong !== undefined) { + localVarQueryParameters['hasThemeSong'] = ObjectSerializer.serialize(hasThemeSong, "boolean"); + } + + if (hasThemeVideo !== undefined) { + localVarQueryParameters['hasThemeVideo'] = ObjectSerializer.serialize(hasThemeVideo, "boolean"); + } + + if (hasSubtitles !== undefined) { + localVarQueryParameters['hasSubtitles'] = ObjectSerializer.serialize(hasSubtitles, "boolean"); + } + + if (hasSpecialFeature !== undefined) { + localVarQueryParameters['hasSpecialFeature'] = ObjectSerializer.serialize(hasSpecialFeature, "boolean"); + } + + if (hasTrailer !== undefined) { + localVarQueryParameters['hasTrailer'] = ObjectSerializer.serialize(hasTrailer, "boolean"); + } + + if (adjacentTo !== undefined) { + localVarQueryParameters['adjacentTo'] = ObjectSerializer.serialize(adjacentTo, "string"); + } + + if (parentIndexNumber !== undefined) { + localVarQueryParameters['parentIndexNumber'] = ObjectSerializer.serialize(parentIndexNumber, "number"); + } + + if (hasParentalRating !== undefined) { + localVarQueryParameters['hasParentalRating'] = ObjectSerializer.serialize(hasParentalRating, "boolean"); + } + + if (isHd !== undefined) { + localVarQueryParameters['isHd'] = ObjectSerializer.serialize(isHd, "boolean"); + } + + if (is4K !== undefined) { + localVarQueryParameters['is4K'] = ObjectSerializer.serialize(is4K, "boolean"); + } + + if (locationTypes !== undefined) { + localVarQueryParameters['locationTypes'] = ObjectSerializer.serialize(locationTypes, "Array"); + } + + if (excludeLocationTypes !== undefined) { + localVarQueryParameters['excludeLocationTypes'] = ObjectSerializer.serialize(excludeLocationTypes, "Array"); + } + + if (isMissing !== undefined) { + localVarQueryParameters['isMissing'] = ObjectSerializer.serialize(isMissing, "boolean"); + } + + if (isUnaired !== undefined) { + localVarQueryParameters['isUnaired'] = ObjectSerializer.serialize(isUnaired, "boolean"); + } + + if (minCommunityRating !== undefined) { + localVarQueryParameters['minCommunityRating'] = ObjectSerializer.serialize(minCommunityRating, "number"); + } + + if (minCriticRating !== undefined) { + localVarQueryParameters['minCriticRating'] = ObjectSerializer.serialize(minCriticRating, "number"); + } + + if (minPremiereDate !== undefined) { + localVarQueryParameters['minPremiereDate'] = ObjectSerializer.serialize(minPremiereDate, "Date"); + } + + if (minDateLastSaved !== undefined) { + localVarQueryParameters['minDateLastSaved'] = ObjectSerializer.serialize(minDateLastSaved, "Date"); + } + + if (minDateLastSavedForUser !== undefined) { + localVarQueryParameters['minDateLastSavedForUser'] = ObjectSerializer.serialize(minDateLastSavedForUser, "Date"); + } + + if (maxPremiereDate !== undefined) { + localVarQueryParameters['maxPremiereDate'] = ObjectSerializer.serialize(maxPremiereDate, "Date"); + } + + if (hasOverview !== undefined) { + localVarQueryParameters['hasOverview'] = ObjectSerializer.serialize(hasOverview, "boolean"); + } + + if (hasImdbId !== undefined) { + localVarQueryParameters['hasImdbId'] = ObjectSerializer.serialize(hasImdbId, "boolean"); + } + + if (hasTmdbId !== undefined) { + localVarQueryParameters['hasTmdbId'] = ObjectSerializer.serialize(hasTmdbId, "boolean"); + } + + if (hasTvdbId !== undefined) { + localVarQueryParameters['hasTvdbId'] = ObjectSerializer.serialize(hasTvdbId, "boolean"); + } + + if (isMovie !== undefined) { + localVarQueryParameters['isMovie'] = ObjectSerializer.serialize(isMovie, "boolean"); + } + + if (isSeries !== undefined) { + localVarQueryParameters['isSeries'] = ObjectSerializer.serialize(isSeries, "boolean"); + } + + if (isNews !== undefined) { + localVarQueryParameters['isNews'] = ObjectSerializer.serialize(isNews, "boolean"); + } + + if (isKids !== undefined) { + localVarQueryParameters['isKids'] = ObjectSerializer.serialize(isKids, "boolean"); + } + + if (isSports !== undefined) { + localVarQueryParameters['isSports'] = ObjectSerializer.serialize(isSports, "boolean"); + } + + if (excludeItemIds !== undefined) { + localVarQueryParameters['excludeItemIds'] = ObjectSerializer.serialize(excludeItemIds, "Array"); + } + + if (startIndex !== undefined) { + localVarQueryParameters['startIndex'] = ObjectSerializer.serialize(startIndex, "number"); + } + + if (limit !== undefined) { + localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); + } + + if (recursive !== undefined) { + localVarQueryParameters['recursive'] = ObjectSerializer.serialize(recursive, "boolean"); + } + + if (searchTerm !== undefined) { + localVarQueryParameters['searchTerm'] = ObjectSerializer.serialize(searchTerm, "string"); + } + + if (sortOrder !== undefined) { + localVarQueryParameters['sortOrder'] = ObjectSerializer.serialize(sortOrder, "Array"); + } + + if (parentId !== undefined) { + localVarQueryParameters['parentId'] = ObjectSerializer.serialize(parentId, "string"); + } + + if (fields !== undefined) { + localVarQueryParameters['fields'] = ObjectSerializer.serialize(fields, "Array"); + } + + if (excludeItemTypes !== undefined) { + localVarQueryParameters['excludeItemTypes'] = ObjectSerializer.serialize(excludeItemTypes, "Array"); + } + + if (includeItemTypes !== undefined) { + localVarQueryParameters['includeItemTypes'] = ObjectSerializer.serialize(includeItemTypes, "Array"); + } + + if (filters !== undefined) { + localVarQueryParameters['filters'] = ObjectSerializer.serialize(filters, "Array"); + } + + if (isFavorite !== undefined) { + localVarQueryParameters['isFavorite'] = ObjectSerializer.serialize(isFavorite, "boolean"); + } + + if (mediaTypes !== undefined) { + localVarQueryParameters['mediaTypes'] = ObjectSerializer.serialize(mediaTypes, "Array"); + } + + if (imageTypes !== undefined) { + localVarQueryParameters['imageTypes'] = ObjectSerializer.serialize(imageTypes, "Array"); + } + + if (sortBy !== undefined) { + localVarQueryParameters['sortBy'] = ObjectSerializer.serialize(sortBy, "Array"); + } + + if (isPlayed !== undefined) { + localVarQueryParameters['isPlayed'] = ObjectSerializer.serialize(isPlayed, "boolean"); + } + + if (genres !== undefined) { + localVarQueryParameters['genres'] = ObjectSerializer.serialize(genres, "Array"); + } + + if (officialRatings !== undefined) { + localVarQueryParameters['officialRatings'] = ObjectSerializer.serialize(officialRatings, "Array"); + } + + if (tags !== undefined) { + localVarQueryParameters['tags'] = ObjectSerializer.serialize(tags, "Array"); + } + + if (years !== undefined) { + localVarQueryParameters['years'] = ObjectSerializer.serialize(years, "Array"); + } + + if (enableUserData !== undefined) { + localVarQueryParameters['enableUserData'] = ObjectSerializer.serialize(enableUserData, "boolean"); + } + + if (imageTypeLimit !== undefined) { + localVarQueryParameters['imageTypeLimit'] = ObjectSerializer.serialize(imageTypeLimit, "number"); + } + + if (enableImageTypes !== undefined) { + localVarQueryParameters['enableImageTypes'] = ObjectSerializer.serialize(enableImageTypes, "Array"); + } + + if (person !== undefined) { + localVarQueryParameters['person'] = ObjectSerializer.serialize(person, "string"); + } + + if (personIds !== undefined) { + localVarQueryParameters['personIds'] = ObjectSerializer.serialize(personIds, "Array"); + } + + if (personTypes !== undefined) { + localVarQueryParameters['personTypes'] = ObjectSerializer.serialize(personTypes, "Array"); + } + + if (studios !== undefined) { + localVarQueryParameters['studios'] = ObjectSerializer.serialize(studios, "Array"); + } + + if (artists !== undefined) { + localVarQueryParameters['artists'] = ObjectSerializer.serialize(artists, "Array"); + } + + if (excludeArtistIds !== undefined) { + localVarQueryParameters['excludeArtistIds'] = ObjectSerializer.serialize(excludeArtistIds, "Array"); + } + + if (artistIds !== undefined) { + localVarQueryParameters['artistIds'] = ObjectSerializer.serialize(artistIds, "Array"); + } + + if (albumArtistIds !== undefined) { + localVarQueryParameters['albumArtistIds'] = ObjectSerializer.serialize(albumArtistIds, "Array"); + } + + if (contributingArtistIds !== undefined) { + localVarQueryParameters['contributingArtistIds'] = ObjectSerializer.serialize(contributingArtistIds, "Array"); + } + + if (albums !== undefined) { + localVarQueryParameters['albums'] = ObjectSerializer.serialize(albums, "Array"); + } + + if (albumIds !== undefined) { + localVarQueryParameters['albumIds'] = ObjectSerializer.serialize(albumIds, "Array"); + } + + if (ids !== undefined) { + localVarQueryParameters['ids'] = ObjectSerializer.serialize(ids, "Array"); + } + + if (videoTypes !== undefined) { + localVarQueryParameters['videoTypes'] = ObjectSerializer.serialize(videoTypes, "Array"); + } + + if (minOfficialRating !== undefined) { + localVarQueryParameters['minOfficialRating'] = ObjectSerializer.serialize(minOfficialRating, "string"); + } + + if (isLocked !== undefined) { + localVarQueryParameters['isLocked'] = ObjectSerializer.serialize(isLocked, "boolean"); + } + + if (isPlaceHolder !== undefined) { + localVarQueryParameters['isPlaceHolder'] = ObjectSerializer.serialize(isPlaceHolder, "boolean"); + } + + if (hasOfficialRating !== undefined) { + localVarQueryParameters['hasOfficialRating'] = ObjectSerializer.serialize(hasOfficialRating, "boolean"); + } + + if (collapseBoxSetItems !== undefined) { + localVarQueryParameters['collapseBoxSetItems'] = ObjectSerializer.serialize(collapseBoxSetItems, "boolean"); + } + + if (minWidth !== undefined) { + localVarQueryParameters['minWidth'] = ObjectSerializer.serialize(minWidth, "number"); + } + + if (minHeight !== undefined) { + localVarQueryParameters['minHeight'] = ObjectSerializer.serialize(minHeight, "number"); + } + + if (maxWidth !== undefined) { + localVarQueryParameters['maxWidth'] = ObjectSerializer.serialize(maxWidth, "number"); + } + + if (maxHeight !== undefined) { + localVarQueryParameters['maxHeight'] = ObjectSerializer.serialize(maxHeight, "number"); + } + + if (is3D !== undefined) { + localVarQueryParameters['is3D'] = ObjectSerializer.serialize(is3D, "boolean"); + } + + if (seriesStatus !== undefined) { + localVarQueryParameters['seriesStatus'] = ObjectSerializer.serialize(seriesStatus, "Array"); + } + + if (nameStartsWithOrGreater !== undefined) { + localVarQueryParameters['nameStartsWithOrGreater'] = ObjectSerializer.serialize(nameStartsWithOrGreater, "string"); + } + + if (nameStartsWith !== undefined) { + localVarQueryParameters['nameStartsWith'] = ObjectSerializer.serialize(nameStartsWith, "string"); + } + + if (nameLessThan !== undefined) { + localVarQueryParameters['nameLessThan'] = ObjectSerializer.serialize(nameLessThan, "string"); + } + + if (studioIds !== undefined) { + localVarQueryParameters['studioIds'] = ObjectSerializer.serialize(studioIds, "Array"); + } + + if (genreIds !== undefined) { + localVarQueryParameters['genreIds'] = ObjectSerializer.serialize(genreIds, "Array"); + } + + if (enableTotalRecordCount !== undefined) { + localVarQueryParameters['enableTotalRecordCount'] = ObjectSerializer.serialize(enableTotalRecordCount, "boolean"); + } + + if (enableImages !== undefined) { + localVarQueryParameters['enableImages'] = ObjectSerializer.serialize(enableImages, "boolean"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "BaseItemDtoQueryResult"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets items based on a query. + * @param userId The user id supplied as query parameter. + * @param maxOfficialRating Optional filter by maximum official rating (PG, PG-13, TV-MA, etc). + * @param hasThemeSong Optional filter by items with theme songs. + * @param hasThemeVideo Optional filter by items with theme videos. + * @param hasSubtitles Optional filter by items with subtitles. + * @param hasSpecialFeature Optional filter by items with special features. + * @param hasTrailer Optional filter by items with trailers. + * @param adjacentTo Optional. Return items that are siblings of a supplied item. + * @param parentIndexNumber Optional filter by parent index number. + * @param hasParentalRating Optional filter by items that have or do not have a parental rating. + * @param isHd Optional filter by items that are HD or not. + * @param is4K Optional filter by items that are 4K or not. + * @param locationTypes Optional. If specified, results will be filtered based on LocationType. This allows multiple, comma delimited. + * @param excludeLocationTypes Optional. If specified, results will be filtered based on the LocationType. This allows multiple, comma delimited. + * @param isMissing Optional filter by items that are missing episodes or not. + * @param isUnaired Optional filter by items that are unaired episodes or not. + * @param minCommunityRating Optional filter by minimum community rating. + * @param minCriticRating Optional filter by minimum critic rating. + * @param minPremiereDate Optional. The minimum premiere date. Format = ISO. + * @param minDateLastSaved Optional. The minimum last saved date. Format = ISO. + * @param minDateLastSavedForUser Optional. The minimum last saved date for the current user. Format = ISO. + * @param maxPremiereDate Optional. The maximum premiere date. Format = ISO. + * @param hasOverview Optional filter by items that have an overview or not. + * @param hasImdbId Optional filter by items that have an imdb id or not. + * @param hasTmdbId Optional filter by items that have a tmdb id or not. + * @param hasTvdbId Optional filter by items that have a tvdb id or not. + * @param isMovie Optional filter for live tv movies. + * @param isSeries Optional filter for live tv series. + * @param isNews Optional filter for live tv news. + * @param isKids Optional filter for live tv kids. + * @param isSports Optional filter for live tv sports. + * @param excludeItemIds Optional. If specified, results will be filtered by excluding item ids. This allows multiple, comma delimited. + * @param startIndex Optional. The record index to start at. All items with a lower index will be dropped from the results. + * @param limit Optional. The maximum number of records to return. + * @param recursive When searching within folders, this determines whether or not the search will be recursive. true/false. + * @param searchTerm Optional. Filter based on a search term. + * @param sortOrder Sort Order - Ascending,Descending. + * @param parentId Specify this to localize the search to a specific item or folder. Omit to use the root. + * @param fields Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimited. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines. + * @param excludeItemTypes Optional. If specified, results will be filtered based on item type. This allows multiple, comma delimited. + * @param includeItemTypes Optional. If specified, results will be filtered based on the item type. This allows multiple, comma delimited. + * @param filters Optional. Specify additional filters to apply. This allows multiple, comma delimited. Options: IsFolder, IsNotFolder, IsUnplayed, IsPlayed, IsFavorite, IsResumable, Likes, Dislikes. + * @param isFavorite Optional filter by items that are marked as favorite, or not. + * @param mediaTypes Optional filter by MediaType. Allows multiple, comma delimited. + * @param imageTypes Optional. If specified, results will be filtered based on those containing image types. This allows multiple, comma delimited. + * @param sortBy Optional. Specify one or more sort orders, comma delimited. Options: Album, AlbumArtist, Artist, Budget, CommunityRating, CriticRating, DateCreated, DatePlayed, PlayCount, PremiereDate, ProductionYear, SortName, Random, Revenue, Runtime. + * @param isPlayed Optional filter by items that are played, or not. + * @param genres Optional. If specified, results will be filtered based on genre. This allows multiple, pipe delimited. + * @param officialRatings Optional. If specified, results will be filtered based on OfficialRating. This allows multiple, pipe delimited. + * @param tags Optional. If specified, results will be filtered based on tag. This allows multiple, pipe delimited. + * @param years Optional. If specified, results will be filtered based on production year. This allows multiple, comma delimited. + * @param enableUserData Optional, include user data. + * @param imageTypeLimit Optional, the max number of images to return, per image type. + * @param enableImageTypes Optional. The image types to include in the output. + * @param person Optional. If specified, results will be filtered to include only those containing the specified person. + * @param personIds Optional. If specified, results will be filtered to include only those containing the specified person id. + * @param personTypes Optional. If specified, along with Person, results will be filtered to include only those containing the specified person and PersonType. Allows multiple, comma-delimited. + * @param studios Optional. If specified, results will be filtered based on studio. This allows multiple, pipe delimited. + * @param artists Optional. If specified, results will be filtered based on artists. This allows multiple, pipe delimited. + * @param excludeArtistIds Optional. If specified, results will be filtered based on artist id. This allows multiple, pipe delimited. + * @param artistIds Optional. If specified, results will be filtered to include only those containing the specified artist id. + * @param albumArtistIds Optional. If specified, results will be filtered to include only those containing the specified album artist id. + * @param contributingArtistIds Optional. If specified, results will be filtered to include only those containing the specified contributing artist id. + * @param albums Optional. If specified, results will be filtered based on album. This allows multiple, pipe delimited. + * @param albumIds Optional. If specified, results will be filtered based on album id. This allows multiple, pipe delimited. + * @param ids Optional. If specific items are needed, specify a list of item id\'s to retrieve. This allows multiple, comma delimited. + * @param videoTypes Optional filter by VideoType (videofile, dvd, bluray, iso). Allows multiple, comma delimited. + * @param minOfficialRating Optional filter by minimum official rating (PG, PG-13, TV-MA, etc). + * @param isLocked Optional filter by items that are locked. + * @param isPlaceHolder Optional filter by items that are placeholders. + * @param hasOfficialRating Optional filter by items that have official ratings. + * @param collapseBoxSetItems Whether or not to hide items behind their boxsets. + * @param minWidth Optional. Filter by the minimum width of the item. + * @param minHeight Optional. Filter by the minimum height of the item. + * @param maxWidth Optional. Filter by the maximum width of the item. + * @param maxHeight Optional. Filter by the maximum height of the item. + * @param is3D Optional filter by items that are 3D, or not. + * @param seriesStatus Optional filter by Series Status. Allows multiple, comma delimited. + * @param nameStartsWithOrGreater Optional filter by items whose name is sorted equally or greater than a given input string. + * @param nameStartsWith Optional filter by items whose name is sorted equally than a given input string. + * @param nameLessThan Optional filter by items whose name is equally or lesser than a given input string. + * @param studioIds Optional. If specified, results will be filtered based on studio id. This allows multiple, pipe delimited. + * @param genreIds Optional. If specified, results will be filtered based on genre id. This allows multiple, pipe delimited. + * @param enableTotalRecordCount Optional. Enable the total record count. + * @param enableImages Optional, include image information in output. + */ + public async getItemsByUserId (userId: string, maxOfficialRating?: string, hasThemeSong?: boolean, hasThemeVideo?: boolean, hasSubtitles?: boolean, hasSpecialFeature?: boolean, hasTrailer?: boolean, adjacentTo?: string, parentIndexNumber?: number, hasParentalRating?: boolean, isHd?: boolean, is4K?: boolean, locationTypes?: Array, excludeLocationTypes?: Array, isMissing?: boolean, isUnaired?: boolean, minCommunityRating?: number, minCriticRating?: number, minPremiereDate?: Date, minDateLastSaved?: Date, minDateLastSavedForUser?: Date, maxPremiereDate?: Date, hasOverview?: boolean, hasImdbId?: boolean, hasTmdbId?: boolean, hasTvdbId?: boolean, isMovie?: boolean, isSeries?: boolean, isNews?: boolean, isKids?: boolean, isSports?: boolean, excludeItemIds?: Array, startIndex?: number, limit?: number, recursive?: boolean, searchTerm?: string, sortOrder?: Array, parentId?: string, fields?: Array, excludeItemTypes?: Array, includeItemTypes?: Array, filters?: Array, isFavorite?: boolean, mediaTypes?: Array, imageTypes?: Array, sortBy?: Array, isPlayed?: boolean, genres?: Array, officialRatings?: Array, tags?: Array, years?: Array, enableUserData?: boolean, imageTypeLimit?: number, enableImageTypes?: Array, person?: string, personIds?: Array, personTypes?: Array, studios?: Array, artists?: Array, excludeArtistIds?: Array, artistIds?: Array, albumArtistIds?: Array, contributingArtistIds?: Array, albums?: Array, albumIds?: Array, ids?: Array, videoTypes?: Array, minOfficialRating?: string, isLocked?: boolean, isPlaceHolder?: boolean, hasOfficialRating?: boolean, collapseBoxSetItems?: boolean, minWidth?: number, minHeight?: number, maxWidth?: number, maxHeight?: number, is3D?: boolean, seriesStatus?: Array, nameStartsWithOrGreater?: string, nameStartsWith?: string, nameLessThan?: string, studioIds?: Array, genreIds?: Array, enableTotalRecordCount?: boolean, enableImages?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }> { + const localVarPath = this.basePath + '/Users/{userId}/Items' + .replace('{' + 'userId' + '}', encodeURIComponent(String(userId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'userId' is not null or undefined + if (userId === null || userId === undefined) { + throw new Error('Required parameter userId was null or undefined when calling getItemsByUserId.'); + } + + if (maxOfficialRating !== undefined) { + localVarQueryParameters['maxOfficialRating'] = ObjectSerializer.serialize(maxOfficialRating, "string"); + } + + if (hasThemeSong !== undefined) { + localVarQueryParameters['hasThemeSong'] = ObjectSerializer.serialize(hasThemeSong, "boolean"); + } + + if (hasThemeVideo !== undefined) { + localVarQueryParameters['hasThemeVideo'] = ObjectSerializer.serialize(hasThemeVideo, "boolean"); + } + + if (hasSubtitles !== undefined) { + localVarQueryParameters['hasSubtitles'] = ObjectSerializer.serialize(hasSubtitles, "boolean"); + } + + if (hasSpecialFeature !== undefined) { + localVarQueryParameters['hasSpecialFeature'] = ObjectSerializer.serialize(hasSpecialFeature, "boolean"); + } + + if (hasTrailer !== undefined) { + localVarQueryParameters['hasTrailer'] = ObjectSerializer.serialize(hasTrailer, "boolean"); + } + + if (adjacentTo !== undefined) { + localVarQueryParameters['adjacentTo'] = ObjectSerializer.serialize(adjacentTo, "string"); + } + + if (parentIndexNumber !== undefined) { + localVarQueryParameters['parentIndexNumber'] = ObjectSerializer.serialize(parentIndexNumber, "number"); + } + + if (hasParentalRating !== undefined) { + localVarQueryParameters['hasParentalRating'] = ObjectSerializer.serialize(hasParentalRating, "boolean"); + } + + if (isHd !== undefined) { + localVarQueryParameters['isHd'] = ObjectSerializer.serialize(isHd, "boolean"); + } + + if (is4K !== undefined) { + localVarQueryParameters['is4K'] = ObjectSerializer.serialize(is4K, "boolean"); + } + + if (locationTypes !== undefined) { + localVarQueryParameters['locationTypes'] = ObjectSerializer.serialize(locationTypes, "Array"); + } + + if (excludeLocationTypes !== undefined) { + localVarQueryParameters['excludeLocationTypes'] = ObjectSerializer.serialize(excludeLocationTypes, "Array"); + } + + if (isMissing !== undefined) { + localVarQueryParameters['isMissing'] = ObjectSerializer.serialize(isMissing, "boolean"); + } + + if (isUnaired !== undefined) { + localVarQueryParameters['isUnaired'] = ObjectSerializer.serialize(isUnaired, "boolean"); + } + + if (minCommunityRating !== undefined) { + localVarQueryParameters['minCommunityRating'] = ObjectSerializer.serialize(minCommunityRating, "number"); + } + + if (minCriticRating !== undefined) { + localVarQueryParameters['minCriticRating'] = ObjectSerializer.serialize(minCriticRating, "number"); + } + + if (minPremiereDate !== undefined) { + localVarQueryParameters['minPremiereDate'] = ObjectSerializer.serialize(minPremiereDate, "Date"); + } + + if (minDateLastSaved !== undefined) { + localVarQueryParameters['minDateLastSaved'] = ObjectSerializer.serialize(minDateLastSaved, "Date"); + } + + if (minDateLastSavedForUser !== undefined) { + localVarQueryParameters['minDateLastSavedForUser'] = ObjectSerializer.serialize(minDateLastSavedForUser, "Date"); + } + + if (maxPremiereDate !== undefined) { + localVarQueryParameters['maxPremiereDate'] = ObjectSerializer.serialize(maxPremiereDate, "Date"); + } + + if (hasOverview !== undefined) { + localVarQueryParameters['hasOverview'] = ObjectSerializer.serialize(hasOverview, "boolean"); + } + + if (hasImdbId !== undefined) { + localVarQueryParameters['hasImdbId'] = ObjectSerializer.serialize(hasImdbId, "boolean"); + } + + if (hasTmdbId !== undefined) { + localVarQueryParameters['hasTmdbId'] = ObjectSerializer.serialize(hasTmdbId, "boolean"); + } + + if (hasTvdbId !== undefined) { + localVarQueryParameters['hasTvdbId'] = ObjectSerializer.serialize(hasTvdbId, "boolean"); + } + + if (isMovie !== undefined) { + localVarQueryParameters['isMovie'] = ObjectSerializer.serialize(isMovie, "boolean"); + } + + if (isSeries !== undefined) { + localVarQueryParameters['isSeries'] = ObjectSerializer.serialize(isSeries, "boolean"); + } + + if (isNews !== undefined) { + localVarQueryParameters['isNews'] = ObjectSerializer.serialize(isNews, "boolean"); + } + + if (isKids !== undefined) { + localVarQueryParameters['isKids'] = ObjectSerializer.serialize(isKids, "boolean"); + } + + if (isSports !== undefined) { + localVarQueryParameters['isSports'] = ObjectSerializer.serialize(isSports, "boolean"); + } + + if (excludeItemIds !== undefined) { + localVarQueryParameters['excludeItemIds'] = ObjectSerializer.serialize(excludeItemIds, "Array"); + } + + if (startIndex !== undefined) { + localVarQueryParameters['startIndex'] = ObjectSerializer.serialize(startIndex, "number"); + } + + if (limit !== undefined) { + localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); + } + + if (recursive !== undefined) { + localVarQueryParameters['recursive'] = ObjectSerializer.serialize(recursive, "boolean"); + } + + if (searchTerm !== undefined) { + localVarQueryParameters['searchTerm'] = ObjectSerializer.serialize(searchTerm, "string"); + } + + if (sortOrder !== undefined) { + localVarQueryParameters['sortOrder'] = ObjectSerializer.serialize(sortOrder, "Array"); + } + + if (parentId !== undefined) { + localVarQueryParameters['parentId'] = ObjectSerializer.serialize(parentId, "string"); + } + + if (fields !== undefined) { + localVarQueryParameters['fields'] = ObjectSerializer.serialize(fields, "Array"); + } + + if (excludeItemTypes !== undefined) { + localVarQueryParameters['excludeItemTypes'] = ObjectSerializer.serialize(excludeItemTypes, "Array"); + } + + if (includeItemTypes !== undefined) { + localVarQueryParameters['includeItemTypes'] = ObjectSerializer.serialize(includeItemTypes, "Array"); + } + + if (filters !== undefined) { + localVarQueryParameters['filters'] = ObjectSerializer.serialize(filters, "Array"); + } + + if (isFavorite !== undefined) { + localVarQueryParameters['isFavorite'] = ObjectSerializer.serialize(isFavorite, "boolean"); + } + + if (mediaTypes !== undefined) { + localVarQueryParameters['mediaTypes'] = ObjectSerializer.serialize(mediaTypes, "Array"); + } + + if (imageTypes !== undefined) { + localVarQueryParameters['imageTypes'] = ObjectSerializer.serialize(imageTypes, "Array"); + } + + if (sortBy !== undefined) { + localVarQueryParameters['sortBy'] = ObjectSerializer.serialize(sortBy, "Array"); + } + + if (isPlayed !== undefined) { + localVarQueryParameters['isPlayed'] = ObjectSerializer.serialize(isPlayed, "boolean"); + } + + if (genres !== undefined) { + localVarQueryParameters['genres'] = ObjectSerializer.serialize(genres, "Array"); + } + + if (officialRatings !== undefined) { + localVarQueryParameters['officialRatings'] = ObjectSerializer.serialize(officialRatings, "Array"); + } + + if (tags !== undefined) { + localVarQueryParameters['tags'] = ObjectSerializer.serialize(tags, "Array"); + } + + if (years !== undefined) { + localVarQueryParameters['years'] = ObjectSerializer.serialize(years, "Array"); + } + + if (enableUserData !== undefined) { + localVarQueryParameters['enableUserData'] = ObjectSerializer.serialize(enableUserData, "boolean"); + } + + if (imageTypeLimit !== undefined) { + localVarQueryParameters['imageTypeLimit'] = ObjectSerializer.serialize(imageTypeLimit, "number"); + } + + if (enableImageTypes !== undefined) { + localVarQueryParameters['enableImageTypes'] = ObjectSerializer.serialize(enableImageTypes, "Array"); + } + + if (person !== undefined) { + localVarQueryParameters['person'] = ObjectSerializer.serialize(person, "string"); + } + + if (personIds !== undefined) { + localVarQueryParameters['personIds'] = ObjectSerializer.serialize(personIds, "Array"); + } + + if (personTypes !== undefined) { + localVarQueryParameters['personTypes'] = ObjectSerializer.serialize(personTypes, "Array"); + } + + if (studios !== undefined) { + localVarQueryParameters['studios'] = ObjectSerializer.serialize(studios, "Array"); + } + + if (artists !== undefined) { + localVarQueryParameters['artists'] = ObjectSerializer.serialize(artists, "Array"); + } + + if (excludeArtistIds !== undefined) { + localVarQueryParameters['excludeArtistIds'] = ObjectSerializer.serialize(excludeArtistIds, "Array"); + } + + if (artistIds !== undefined) { + localVarQueryParameters['artistIds'] = ObjectSerializer.serialize(artistIds, "Array"); + } + + if (albumArtistIds !== undefined) { + localVarQueryParameters['albumArtistIds'] = ObjectSerializer.serialize(albumArtistIds, "Array"); + } + + if (contributingArtistIds !== undefined) { + localVarQueryParameters['contributingArtistIds'] = ObjectSerializer.serialize(contributingArtistIds, "Array"); + } + + if (albums !== undefined) { + localVarQueryParameters['albums'] = ObjectSerializer.serialize(albums, "Array"); + } + + if (albumIds !== undefined) { + localVarQueryParameters['albumIds'] = ObjectSerializer.serialize(albumIds, "Array"); + } + + if (ids !== undefined) { + localVarQueryParameters['ids'] = ObjectSerializer.serialize(ids, "Array"); + } + + if (videoTypes !== undefined) { + localVarQueryParameters['videoTypes'] = ObjectSerializer.serialize(videoTypes, "Array"); + } + + if (minOfficialRating !== undefined) { + localVarQueryParameters['minOfficialRating'] = ObjectSerializer.serialize(minOfficialRating, "string"); + } + + if (isLocked !== undefined) { + localVarQueryParameters['isLocked'] = ObjectSerializer.serialize(isLocked, "boolean"); + } + + if (isPlaceHolder !== undefined) { + localVarQueryParameters['isPlaceHolder'] = ObjectSerializer.serialize(isPlaceHolder, "boolean"); + } + + if (hasOfficialRating !== undefined) { + localVarQueryParameters['hasOfficialRating'] = ObjectSerializer.serialize(hasOfficialRating, "boolean"); + } + + if (collapseBoxSetItems !== undefined) { + localVarQueryParameters['collapseBoxSetItems'] = ObjectSerializer.serialize(collapseBoxSetItems, "boolean"); + } + + if (minWidth !== undefined) { + localVarQueryParameters['minWidth'] = ObjectSerializer.serialize(minWidth, "number"); + } + + if (minHeight !== undefined) { + localVarQueryParameters['minHeight'] = ObjectSerializer.serialize(minHeight, "number"); + } + + if (maxWidth !== undefined) { + localVarQueryParameters['maxWidth'] = ObjectSerializer.serialize(maxWidth, "number"); + } + + if (maxHeight !== undefined) { + localVarQueryParameters['maxHeight'] = ObjectSerializer.serialize(maxHeight, "number"); + } + + if (is3D !== undefined) { + localVarQueryParameters['is3D'] = ObjectSerializer.serialize(is3D, "boolean"); + } + + if (seriesStatus !== undefined) { + localVarQueryParameters['seriesStatus'] = ObjectSerializer.serialize(seriesStatus, "Array"); + } + + if (nameStartsWithOrGreater !== undefined) { + localVarQueryParameters['nameStartsWithOrGreater'] = ObjectSerializer.serialize(nameStartsWithOrGreater, "string"); + } + + if (nameStartsWith !== undefined) { + localVarQueryParameters['nameStartsWith'] = ObjectSerializer.serialize(nameStartsWith, "string"); + } + + if (nameLessThan !== undefined) { + localVarQueryParameters['nameLessThan'] = ObjectSerializer.serialize(nameLessThan, "string"); + } + + if (studioIds !== undefined) { + localVarQueryParameters['studioIds'] = ObjectSerializer.serialize(studioIds, "Array"); + } + + if (genreIds !== undefined) { + localVarQueryParameters['genreIds'] = ObjectSerializer.serialize(genreIds, "Array"); + } + + if (enableTotalRecordCount !== undefined) { + localVarQueryParameters['enableTotalRecordCount'] = ObjectSerializer.serialize(enableTotalRecordCount, "boolean"); + } + + if (enableImages !== undefined) { + localVarQueryParameters['enableImages'] = ObjectSerializer.serialize(enableImages, "boolean"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "BaseItemDtoQueryResult"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets items based on a query. + * @param userId The user id. + * @param startIndex The start index. + * @param limit The item limit. + * @param searchTerm The search term. + * @param parentId Specify this to localize the search to a specific item or folder. Omit to use the root. + * @param fields Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimited. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines. + * @param mediaTypes Optional. Filter by MediaType. Allows multiple, comma delimited. + * @param enableUserData Optional. Include user data. + * @param imageTypeLimit Optional. The max number of images to return, per image type. + * @param enableImageTypes Optional. The image types to include in the output. + * @param excludeItemTypes Optional. If specified, results will be filtered based on item type. This allows multiple, comma delimited. + * @param includeItemTypes Optional. If specified, results will be filtered based on the item type. This allows multiple, comma delimited. + * @param enableTotalRecordCount Optional. Enable the total record count. + * @param enableImages Optional. Include image information in output. + * @param excludeActiveSessions Optional. Whether to exclude the currently active sessions. + */ + public async getResumeItems (userId: string, startIndex?: number, limit?: number, searchTerm?: string, parentId?: string, fields?: Array, mediaTypes?: Array, enableUserData?: boolean, imageTypeLimit?: number, enableImageTypes?: Array, excludeItemTypes?: Array, includeItemTypes?: Array, enableTotalRecordCount?: boolean, enableImages?: boolean, excludeActiveSessions?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }> { + const localVarPath = this.basePath + '/Users/{userId}/Items/Resume' + .replace('{' + 'userId' + '}', encodeURIComponent(String(userId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'userId' is not null or undefined + if (userId === null || userId === undefined) { + throw new Error('Required parameter userId was null or undefined when calling getResumeItems.'); + } + + if (startIndex !== undefined) { + localVarQueryParameters['startIndex'] = ObjectSerializer.serialize(startIndex, "number"); + } + + if (limit !== undefined) { + localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); + } + + if (searchTerm !== undefined) { + localVarQueryParameters['searchTerm'] = ObjectSerializer.serialize(searchTerm, "string"); + } + + if (parentId !== undefined) { + localVarQueryParameters['parentId'] = ObjectSerializer.serialize(parentId, "string"); + } + + if (fields !== undefined) { + localVarQueryParameters['fields'] = ObjectSerializer.serialize(fields, "Array"); + } + + if (mediaTypes !== undefined) { + localVarQueryParameters['mediaTypes'] = ObjectSerializer.serialize(mediaTypes, "Array"); + } + + if (enableUserData !== undefined) { + localVarQueryParameters['enableUserData'] = ObjectSerializer.serialize(enableUserData, "boolean"); + } + + if (imageTypeLimit !== undefined) { + localVarQueryParameters['imageTypeLimit'] = ObjectSerializer.serialize(imageTypeLimit, "number"); + } + + if (enableImageTypes !== undefined) { + localVarQueryParameters['enableImageTypes'] = ObjectSerializer.serialize(enableImageTypes, "Array"); + } + + if (excludeItemTypes !== undefined) { + localVarQueryParameters['excludeItemTypes'] = ObjectSerializer.serialize(excludeItemTypes, "Array"); + } + + if (includeItemTypes !== undefined) { + localVarQueryParameters['includeItemTypes'] = ObjectSerializer.serialize(includeItemTypes, "Array"); + } + + if (enableTotalRecordCount !== undefined) { + localVarQueryParameters['enableTotalRecordCount'] = ObjectSerializer.serialize(enableTotalRecordCount, "boolean"); + } + + if (enableImages !== undefined) { + localVarQueryParameters['enableImages'] = ObjectSerializer.serialize(enableImages, "boolean"); + } + + if (excludeActiveSessions !== undefined) { + localVarQueryParameters['excludeActiveSessions'] = ObjectSerializer.serialize(excludeActiveSessions, "boolean"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "BaseItemDtoQueryResult"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} diff --git a/jellyfin/api/libraryApi.ts b/jellyfin/api/libraryApi.ts new file mode 100644 index 0000000..6242669 --- /dev/null +++ b/jellyfin/api/libraryApi.ts @@ -0,0 +1,1995 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import localVarRequest from 'request'; +import http from 'http'; + +/* tslint:disable:no-unused-locals */ +import { AllThemeMediaResult } from '../model/allThemeMediaResult'; +import { BaseItemDto } from '../model/baseItemDto'; +import { BaseItemDtoQueryResult } from '../model/baseItemDtoQueryResult'; +import { ItemCounts } from '../model/itemCounts'; +import { ItemFields } from '../model/itemFields'; +import { LibraryOptionsResultDto } from '../model/libraryOptionsResultDto'; +import { PostUpdatedMediaRequest } from '../model/postUpdatedMediaRequest'; +import { ProblemDetails } from '../model/problemDetails'; +import { ThemeMediaResult } from '../model/themeMediaResult'; + +import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; +import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; + +import { HttpError, RequestFile } from './apis'; + +let defaultBasePath = 'http://localhost'; + +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== + +export enum LibraryApiApiKeys { + CustomAuthentication, +} + +export class LibraryApi { + protected _basePath = defaultBasePath; + protected _defaultHeaders : any = {}; + protected _useQuerystring : boolean = false; + + protected authentications = { + 'default': new VoidAuth(), + 'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'), + } + + protected interceptors: Interceptor[] = []; + + constructor(basePath?: string); + constructor(basePathOrUsername: string, password?: string, basePath?: string) { + if (password) { + if (basePath) { + this.basePath = basePath; + } + } else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername + } + } + } + + set useQuerystring(value: boolean) { + this._useQuerystring = value; + } + + set basePath(basePath: string) { + this._basePath = basePath; + } + + set defaultHeaders(defaultHeaders: any) { + this._defaultHeaders = defaultHeaders; + } + + get defaultHeaders() { + return this._defaultHeaders; + } + + get basePath() { + return this._basePath; + } + + public setDefaultAuthentication(auth: Authentication) { + this.authentications.default = auth; + } + + public setApiKey(key: LibraryApiApiKeys, value: string) { + (this.authentications as any)[LibraryApiApiKeys[key]].apiKey = value; + } + + public addInterceptor(interceptor: Interceptor) { + this.interceptors.push(interceptor); + } + + /** + * + * @summary Deletes an item from the library and filesystem. + * @param itemId The item id. + */ + public async deleteItem (itemId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Items/{itemId}' + .replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'itemId' is not null or undefined + if (itemId === null || itemId === undefined) { + throw new Error('Required parameter itemId was null or undefined when calling deleteItem.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Deletes items from the library and filesystem. + * @param ids The item ids. + */ + public async deleteItems (ids?: Array, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Items'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + if (ids !== undefined) { + localVarQueryParameters['ids'] = ObjectSerializer.serialize(ids, "Array"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets all parents of an item. + * @param itemId The item id. + * @param userId Optional. Filter by user id, and attach user data. + */ + public async getAncestors (itemId: string, userId?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array; }> { + const localVarPath = this.basePath + '/Items/{itemId}/Ancestors' + .replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'itemId' is not null or undefined + if (itemId === null || itemId === undefined) { + throw new Error('Required parameter itemId was null or undefined when calling getAncestors.'); + } + + if (userId !== undefined) { + localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Array; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Array"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets critic review for an item. + * @param itemId + */ + public async getCriticReviews (itemId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }> { + const localVarPath = this.basePath + '/Items/{itemId}/CriticReviews' + .replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'itemId' is not null or undefined + if (itemId === null || itemId === undefined) { + throw new Error('Required parameter itemId was null or undefined when calling getCriticReviews.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "BaseItemDtoQueryResult"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Downloads item media. + * @param itemId The item id. + */ + public async getDownload (itemId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/Items/{itemId}/Download' + .replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['video/*', 'audio/*', 'application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'itemId' is not null or undefined + if (itemId === null || itemId === undefined) { + throw new Error('Required parameter itemId was null or undefined when calling getDownload.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Get the original file of an item. + * @param itemId The item id. + */ + public async getFile (itemId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/Items/{itemId}/File' + .replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['video/*', 'audio/*', 'application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'itemId' is not null or undefined + if (itemId === null || itemId === undefined) { + throw new Error('Required parameter itemId was null or undefined when calling getFile.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Get item counts. + * @param userId Optional. Get counts from a specific user\'s library. + * @param isFavorite Optional. Get counts of favorite items. + */ + public async getItemCounts (userId?: string, isFavorite?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: ItemCounts; }> { + const localVarPath = this.basePath + '/Items/Counts'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + if (userId !== undefined) { + localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string"); + } + + if (isFavorite !== undefined) { + localVarQueryParameters['isFavorite'] = ObjectSerializer.serialize(isFavorite, "boolean"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: ItemCounts; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "ItemCounts"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets the library options info. + * @param libraryContentType Library content type. + * @param isNewLibrary Whether this is a new library. + */ + public async getLibraryOptionsInfo (libraryContentType?: string, isNewLibrary?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: LibraryOptionsResultDto; }> { + const localVarPath = this.basePath + '/Libraries/AvailableOptions'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + if (libraryContentType !== undefined) { + localVarQueryParameters['libraryContentType'] = ObjectSerializer.serialize(libraryContentType, "string"); + } + + if (isNewLibrary !== undefined) { + localVarQueryParameters['isNewLibrary'] = ObjectSerializer.serialize(isNewLibrary, "boolean"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: LibraryOptionsResultDto; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "LibraryOptionsResultDto"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets all user media folders. + * @param isHidden Optional. Filter by folders that are marked hidden, or not. + */ + public async getMediaFolders (isHidden?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }> { + const localVarPath = this.basePath + '/Library/MediaFolders'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + if (isHidden !== undefined) { + localVarQueryParameters['isHidden'] = ObjectSerializer.serialize(isHidden, "boolean"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "BaseItemDtoQueryResult"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets a list of physical paths from virtual folders. + */ + public async getPhysicalPaths (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array; }> { + const localVarPath = this.basePath + '/Library/PhysicalPaths'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Array; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Array"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets similar items. + * @param itemId The item id. + * @param excludeArtistIds Exclude artist ids. + * @param userId Optional. Filter by user id, and attach user data. + * @param limit Optional. The maximum number of records to return. + * @param fields Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimited. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines, TrailerUrls. + */ + public async getSimilarAlbums (itemId: string, excludeArtistIds?: Array, userId?: string, limit?: number, fields?: Array, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }> { + const localVarPath = this.basePath + '/Albums/{itemId}/Similar' + .replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'itemId' is not null or undefined + if (itemId === null || itemId === undefined) { + throw new Error('Required parameter itemId was null or undefined when calling getSimilarAlbums.'); + } + + if (excludeArtistIds !== undefined) { + localVarQueryParameters['excludeArtistIds'] = ObjectSerializer.serialize(excludeArtistIds, "Array"); + } + + if (userId !== undefined) { + localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string"); + } + + if (limit !== undefined) { + localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); + } + + if (fields !== undefined) { + localVarQueryParameters['fields'] = ObjectSerializer.serialize(fields, "Array"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "BaseItemDtoQueryResult"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets similar items. + * @param itemId The item id. + * @param excludeArtistIds Exclude artist ids. + * @param userId Optional. Filter by user id, and attach user data. + * @param limit Optional. The maximum number of records to return. + * @param fields Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimited. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines, TrailerUrls. + */ + public async getSimilarArtists (itemId: string, excludeArtistIds?: Array, userId?: string, limit?: number, fields?: Array, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }> { + const localVarPath = this.basePath + '/Artists/{itemId}/Similar' + .replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'itemId' is not null or undefined + if (itemId === null || itemId === undefined) { + throw new Error('Required parameter itemId was null or undefined when calling getSimilarArtists.'); + } + + if (excludeArtistIds !== undefined) { + localVarQueryParameters['excludeArtistIds'] = ObjectSerializer.serialize(excludeArtistIds, "Array"); + } + + if (userId !== undefined) { + localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string"); + } + + if (limit !== undefined) { + localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); + } + + if (fields !== undefined) { + localVarQueryParameters['fields'] = ObjectSerializer.serialize(fields, "Array"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "BaseItemDtoQueryResult"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets similar items. + * @param itemId The item id. + * @param excludeArtistIds Exclude artist ids. + * @param userId Optional. Filter by user id, and attach user data. + * @param limit Optional. The maximum number of records to return. + * @param fields Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimited. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines, TrailerUrls. + */ + public async getSimilarItems (itemId: string, excludeArtistIds?: Array, userId?: string, limit?: number, fields?: Array, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }> { + const localVarPath = this.basePath + '/Items/{itemId}/Similar' + .replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'itemId' is not null or undefined + if (itemId === null || itemId === undefined) { + throw new Error('Required parameter itemId was null or undefined when calling getSimilarItems.'); + } + + if (excludeArtistIds !== undefined) { + localVarQueryParameters['excludeArtistIds'] = ObjectSerializer.serialize(excludeArtistIds, "Array"); + } + + if (userId !== undefined) { + localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string"); + } + + if (limit !== undefined) { + localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); + } + + if (fields !== undefined) { + localVarQueryParameters['fields'] = ObjectSerializer.serialize(fields, "Array"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "BaseItemDtoQueryResult"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets similar items. + * @param itemId The item id. + * @param excludeArtistIds Exclude artist ids. + * @param userId Optional. Filter by user id, and attach user data. + * @param limit Optional. The maximum number of records to return. + * @param fields Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimited. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines, TrailerUrls. + */ + public async getSimilarMovies (itemId: string, excludeArtistIds?: Array, userId?: string, limit?: number, fields?: Array, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }> { + const localVarPath = this.basePath + '/Movies/{itemId}/Similar' + .replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'itemId' is not null or undefined + if (itemId === null || itemId === undefined) { + throw new Error('Required parameter itemId was null or undefined when calling getSimilarMovies.'); + } + + if (excludeArtistIds !== undefined) { + localVarQueryParameters['excludeArtistIds'] = ObjectSerializer.serialize(excludeArtistIds, "Array"); + } + + if (userId !== undefined) { + localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string"); + } + + if (limit !== undefined) { + localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); + } + + if (fields !== undefined) { + localVarQueryParameters['fields'] = ObjectSerializer.serialize(fields, "Array"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "BaseItemDtoQueryResult"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets similar items. + * @param itemId The item id. + * @param excludeArtistIds Exclude artist ids. + * @param userId Optional. Filter by user id, and attach user data. + * @param limit Optional. The maximum number of records to return. + * @param fields Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimited. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines, TrailerUrls. + */ + public async getSimilarShows (itemId: string, excludeArtistIds?: Array, userId?: string, limit?: number, fields?: Array, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }> { + const localVarPath = this.basePath + '/Shows/{itemId}/Similar' + .replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'itemId' is not null or undefined + if (itemId === null || itemId === undefined) { + throw new Error('Required parameter itemId was null or undefined when calling getSimilarShows.'); + } + + if (excludeArtistIds !== undefined) { + localVarQueryParameters['excludeArtistIds'] = ObjectSerializer.serialize(excludeArtistIds, "Array"); + } + + if (userId !== undefined) { + localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string"); + } + + if (limit !== undefined) { + localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); + } + + if (fields !== undefined) { + localVarQueryParameters['fields'] = ObjectSerializer.serialize(fields, "Array"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "BaseItemDtoQueryResult"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets similar items. + * @param itemId The item id. + * @param excludeArtistIds Exclude artist ids. + * @param userId Optional. Filter by user id, and attach user data. + * @param limit Optional. The maximum number of records to return. + * @param fields Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimited. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines, TrailerUrls. + */ + public async getSimilarTrailers (itemId: string, excludeArtistIds?: Array, userId?: string, limit?: number, fields?: Array, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }> { + const localVarPath = this.basePath + '/Trailers/{itemId}/Similar' + .replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'itemId' is not null or undefined + if (itemId === null || itemId === undefined) { + throw new Error('Required parameter itemId was null or undefined when calling getSimilarTrailers.'); + } + + if (excludeArtistIds !== undefined) { + localVarQueryParameters['excludeArtistIds'] = ObjectSerializer.serialize(excludeArtistIds, "Array"); + } + + if (userId !== undefined) { + localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string"); + } + + if (limit !== undefined) { + localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); + } + + if (fields !== undefined) { + localVarQueryParameters['fields'] = ObjectSerializer.serialize(fields, "Array"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "BaseItemDtoQueryResult"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Get theme songs and videos for an item. + * @param itemId The item id. + * @param userId Optional. Filter by user id, and attach user data. + * @param inheritFromParent Optional. Determines whether or not parent items should be searched for theme media. + */ + public async getThemeMedia (itemId: string, userId?: string, inheritFromParent?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: AllThemeMediaResult; }> { + const localVarPath = this.basePath + '/Items/{itemId}/ThemeMedia' + .replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'itemId' is not null or undefined + if (itemId === null || itemId === undefined) { + throw new Error('Required parameter itemId was null or undefined when calling getThemeMedia.'); + } + + if (userId !== undefined) { + localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string"); + } + + if (inheritFromParent !== undefined) { + localVarQueryParameters['inheritFromParent'] = ObjectSerializer.serialize(inheritFromParent, "boolean"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: AllThemeMediaResult; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "AllThemeMediaResult"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Get theme songs for an item. + * @param itemId The item id. + * @param userId Optional. Filter by user id, and attach user data. + * @param inheritFromParent Optional. Determines whether or not parent items should be searched for theme media. + */ + public async getThemeSongs (itemId: string, userId?: string, inheritFromParent?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: ThemeMediaResult; }> { + const localVarPath = this.basePath + '/Items/{itemId}/ThemeSongs' + .replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'itemId' is not null or undefined + if (itemId === null || itemId === undefined) { + throw new Error('Required parameter itemId was null or undefined when calling getThemeSongs.'); + } + + if (userId !== undefined) { + localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string"); + } + + if (inheritFromParent !== undefined) { + localVarQueryParameters['inheritFromParent'] = ObjectSerializer.serialize(inheritFromParent, "boolean"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: ThemeMediaResult; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "ThemeMediaResult"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Get theme videos for an item. + * @param itemId The item id. + * @param userId Optional. Filter by user id, and attach user data. + * @param inheritFromParent Optional. Determines whether or not parent items should be searched for theme media. + */ + public async getThemeVideos (itemId: string, userId?: string, inheritFromParent?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: ThemeMediaResult; }> { + const localVarPath = this.basePath + '/Items/{itemId}/ThemeVideos' + .replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'itemId' is not null or undefined + if (itemId === null || itemId === undefined) { + throw new Error('Required parameter itemId was null or undefined when calling getThemeVideos.'); + } + + if (userId !== undefined) { + localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string"); + } + + if (inheritFromParent !== undefined) { + localVarQueryParameters['inheritFromParent'] = ObjectSerializer.serialize(inheritFromParent, "boolean"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: ThemeMediaResult; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "ThemeMediaResult"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Reports that new movies have been added by an external source. + * @param tmdbId The tmdbId. + * @param imdbId The imdbId. + */ + public async postAddedMovies (tmdbId?: string, imdbId?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Library/Movies/Added'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + if (tmdbId !== undefined) { + localVarQueryParameters['tmdbId'] = ObjectSerializer.serialize(tmdbId, "string"); + } + + if (imdbId !== undefined) { + localVarQueryParameters['imdbId'] = ObjectSerializer.serialize(imdbId, "string"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Reports that new episodes of a series have been added by an external source. + * @param tvdbId The tvdbId. + */ + public async postAddedSeries (tvdbId?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Library/Series/Added'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + if (tvdbId !== undefined) { + localVarQueryParameters['tvdbId'] = ObjectSerializer.serialize(tvdbId, "string"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Reports that new movies have been added by an external source. + * @param postUpdatedMediaRequest The update paths. + */ + public async postUpdatedMedia (postUpdatedMediaRequest: PostUpdatedMediaRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Library/Media/Updated'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + // verify required parameter 'postUpdatedMediaRequest' is not null or undefined + if (postUpdatedMediaRequest === null || postUpdatedMediaRequest === undefined) { + throw new Error('Required parameter postUpdatedMediaRequest was null or undefined when calling postUpdatedMedia.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: ObjectSerializer.serialize(postUpdatedMediaRequest, "PostUpdatedMediaRequest") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Reports that new movies have been added by an external source. + * @param tmdbId The tmdbId. + * @param imdbId The imdbId. + */ + public async postUpdatedMovies (tmdbId?: string, imdbId?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Library/Movies/Updated'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + if (tmdbId !== undefined) { + localVarQueryParameters['tmdbId'] = ObjectSerializer.serialize(tmdbId, "string"); + } + + if (imdbId !== undefined) { + localVarQueryParameters['imdbId'] = ObjectSerializer.serialize(imdbId, "string"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Reports that new episodes of a series have been added by an external source. + * @param tvdbId The tvdbId. + */ + public async postUpdatedSeries (tvdbId?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Library/Series/Updated'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + if (tvdbId !== undefined) { + localVarQueryParameters['tvdbId'] = ObjectSerializer.serialize(tvdbId, "string"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Starts a library scan. + */ + public async refreshLibrary (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Library/Refresh'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} diff --git a/jellyfin/api/libraryStructureApi.ts b/jellyfin/api/libraryStructureApi.ts new file mode 100644 index 0000000..4cee243 --- /dev/null +++ b/jellyfin/api/libraryStructureApi.ts @@ -0,0 +1,652 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import localVarRequest from 'request'; +import http from 'http'; + +/* tslint:disable:no-unused-locals */ +import { AddMediaPathRequest } from '../model/addMediaPathRequest'; +import { AddVirtualFolderRequest } from '../model/addVirtualFolderRequest'; +import { CollectionTypeOptions } from '../model/collectionTypeOptions'; +import { ProblemDetails } from '../model/problemDetails'; +import { UpdateLibraryOptionsRequest } from '../model/updateLibraryOptionsRequest'; +import { UpdateMediaPathRequest } from '../model/updateMediaPathRequest'; +import { VirtualFolderInfo } from '../model/virtualFolderInfo'; + +import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; +import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; + +import { HttpError, RequestFile } from './apis'; + +let defaultBasePath = 'http://localhost'; + +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== + +export enum LibraryStructureApiApiKeys { + CustomAuthentication, +} + +export class LibraryStructureApi { + protected _basePath = defaultBasePath; + protected _defaultHeaders : any = {}; + protected _useQuerystring : boolean = false; + + protected authentications = { + 'default': new VoidAuth(), + 'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'), + } + + protected interceptors: Interceptor[] = []; + + constructor(basePath?: string); + constructor(basePathOrUsername: string, password?: string, basePath?: string) { + if (password) { + if (basePath) { + this.basePath = basePath; + } + } else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername + } + } + } + + set useQuerystring(value: boolean) { + this._useQuerystring = value; + } + + set basePath(basePath: string) { + this._basePath = basePath; + } + + set defaultHeaders(defaultHeaders: any) { + this._defaultHeaders = defaultHeaders; + } + + get defaultHeaders() { + return this._defaultHeaders; + } + + get basePath() { + return this._basePath; + } + + public setDefaultAuthentication(auth: Authentication) { + this.authentications.default = auth; + } + + public setApiKey(key: LibraryStructureApiApiKeys, value: string) { + (this.authentications as any)[LibraryStructureApiApiKeys[key]].apiKey = value; + } + + public addInterceptor(interceptor: Interceptor) { + this.interceptors.push(interceptor); + } + + /** + * + * @summary Add a media path to a library. + * @param addMediaPathRequest The media path dto. + * @param refreshLibrary Whether to refresh the library. + */ + public async addMediaPath (addMediaPathRequest: AddMediaPathRequest, refreshLibrary?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Library/VirtualFolders/Paths'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + // verify required parameter 'addMediaPathRequest' is not null or undefined + if (addMediaPathRequest === null || addMediaPathRequest === undefined) { + throw new Error('Required parameter addMediaPathRequest was null or undefined when calling addMediaPath.'); + } + + if (refreshLibrary !== undefined) { + localVarQueryParameters['refreshLibrary'] = ObjectSerializer.serialize(refreshLibrary, "boolean"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: ObjectSerializer.serialize(addMediaPathRequest, "AddMediaPathRequest") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Adds a virtual folder. + * @param name The name of the virtual folder. + * @param collectionType The type of the collection. + * @param paths The paths of the virtual folder. + * @param refreshLibrary Whether to refresh the library. + * @param addVirtualFolderRequest The library options. + */ + public async addVirtualFolder (name?: string, collectionType?: CollectionTypeOptions, paths?: Array, refreshLibrary?: boolean, addVirtualFolderRequest?: AddVirtualFolderRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Library/VirtualFolders'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + if (name !== undefined) { + localVarQueryParameters['name'] = ObjectSerializer.serialize(name, "string"); + } + + if (collectionType !== undefined) { + localVarQueryParameters['collectionType'] = ObjectSerializer.serialize(collectionType, "CollectionTypeOptions"); + } + + if (paths !== undefined) { + localVarQueryParameters['paths'] = ObjectSerializer.serialize(paths, "Array"); + } + + if (refreshLibrary !== undefined) { + localVarQueryParameters['refreshLibrary'] = ObjectSerializer.serialize(refreshLibrary, "boolean"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: ObjectSerializer.serialize(addVirtualFolderRequest, "AddVirtualFolderRequest") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets all virtual folders. + */ + public async getVirtualFolders (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array; }> { + const localVarPath = this.basePath + '/Library/VirtualFolders'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Array; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Array"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Remove a media path. + * @param name The name of the library. + * @param path The path to remove. + * @param refreshLibrary Whether to refresh the library. + */ + public async removeMediaPath (name?: string, path?: string, refreshLibrary?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Library/VirtualFolders/Paths'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + if (name !== undefined) { + localVarQueryParameters['name'] = ObjectSerializer.serialize(name, "string"); + } + + if (path !== undefined) { + localVarQueryParameters['path'] = ObjectSerializer.serialize(path, "string"); + } + + if (refreshLibrary !== undefined) { + localVarQueryParameters['refreshLibrary'] = ObjectSerializer.serialize(refreshLibrary, "boolean"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Removes a virtual folder. + * @param name The name of the folder. + * @param refreshLibrary Whether to refresh the library. + */ + public async removeVirtualFolder (name?: string, refreshLibrary?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Library/VirtualFolders'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + if (name !== undefined) { + localVarQueryParameters['name'] = ObjectSerializer.serialize(name, "string"); + } + + if (refreshLibrary !== undefined) { + localVarQueryParameters['refreshLibrary'] = ObjectSerializer.serialize(refreshLibrary, "boolean"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Renames a virtual folder. + * @param name The name of the virtual folder. + * @param newName The new name. + * @param refreshLibrary Whether to refresh the library. + */ + public async renameVirtualFolder (name?: string, newName?: string, refreshLibrary?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Library/VirtualFolders/Name'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + if (name !== undefined) { + localVarQueryParameters['name'] = ObjectSerializer.serialize(name, "string"); + } + + if (newName !== undefined) { + localVarQueryParameters['newName'] = ObjectSerializer.serialize(newName, "string"); + } + + if (refreshLibrary !== undefined) { + localVarQueryParameters['refreshLibrary'] = ObjectSerializer.serialize(refreshLibrary, "boolean"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Update library options. + * @param updateLibraryOptionsRequest The library name and options. + */ + public async updateLibraryOptions (updateLibraryOptionsRequest?: UpdateLibraryOptionsRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Library/VirtualFolders/LibraryOptions'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: ObjectSerializer.serialize(updateLibraryOptionsRequest, "UpdateLibraryOptionsRequest") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Updates a media path. + * @param updateMediaPathRequest The name of the library and path infos. + */ + public async updateMediaPath (updateMediaPathRequest: UpdateMediaPathRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Library/VirtualFolders/Paths/Update'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + // verify required parameter 'updateMediaPathRequest' is not null or undefined + if (updateMediaPathRequest === null || updateMediaPathRequest === undefined) { + throw new Error('Required parameter updateMediaPathRequest was null or undefined when calling updateMediaPath.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: ObjectSerializer.serialize(updateMediaPathRequest, "UpdateMediaPathRequest") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} diff --git a/jellyfin/api/liveTvApi.ts b/jellyfin/api/liveTvApi.ts new file mode 100644 index 0000000..0653089 --- /dev/null +++ b/jellyfin/api/liveTvApi.ts @@ -0,0 +1,3432 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import localVarRequest from 'request'; +import http from 'http'; + +/* tslint:disable:no-unused-locals */ +import { AddListingProviderRequest } from '../model/addListingProviderRequest'; +import { AddTunerHostRequest } from '../model/addTunerHostRequest'; +import { BaseItemDto } from '../model/baseItemDto'; +import { BaseItemDtoQueryResult } from '../model/baseItemDtoQueryResult'; +import { ChannelMappingOptionsDto } from '../model/channelMappingOptionsDto'; +import { ChannelType } from '../model/channelType'; +import { CreateSeriesTimerRequest } from '../model/createSeriesTimerRequest'; +import { CreateTimerRequest } from '../model/createTimerRequest'; +import { GetProgramsRequest } from '../model/getProgramsRequest'; +import { GuideInfo } from '../model/guideInfo'; +import { ImageType } from '../model/imageType'; +import { ItemFields } from '../model/itemFields'; +import { ListingsProviderInfo } from '../model/listingsProviderInfo'; +import { LiveTvInfo } from '../model/liveTvInfo'; +import { NameIdPair } from '../model/nameIdPair'; +import { ProblemDetails } from '../model/problemDetails'; +import { RecordingStatus } from '../model/recordingStatus'; +import { SeriesTimerInfoDto } from '../model/seriesTimerInfoDto'; +import { SeriesTimerInfoDtoQueryResult } from '../model/seriesTimerInfoDtoQueryResult'; +import { SetChannelMappingRequest } from '../model/setChannelMappingRequest'; +import { SortOrder } from '../model/sortOrder'; +import { TimerInfoDto } from '../model/timerInfoDto'; +import { TimerInfoDtoQueryResult } from '../model/timerInfoDtoQueryResult'; +import { TunerChannelMapping } from '../model/tunerChannelMapping'; +import { TunerHostInfo } from '../model/tunerHostInfo'; + +import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; +import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; + +import { HttpError, RequestFile } from './apis'; + +let defaultBasePath = 'http://localhost'; + +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== + +export enum LiveTvApiApiKeys { + CustomAuthentication, +} + +export class LiveTvApi { + protected _basePath = defaultBasePath; + protected _defaultHeaders : any = {}; + protected _useQuerystring : boolean = false; + + protected authentications = { + 'default': new VoidAuth(), + 'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'), + } + + protected interceptors: Interceptor[] = []; + + constructor(basePath?: string); + constructor(basePathOrUsername: string, password?: string, basePath?: string) { + if (password) { + if (basePath) { + this.basePath = basePath; + } + } else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername + } + } + } + + set useQuerystring(value: boolean) { + this._useQuerystring = value; + } + + set basePath(basePath: string) { + this._basePath = basePath; + } + + set defaultHeaders(defaultHeaders: any) { + this._defaultHeaders = defaultHeaders; + } + + get defaultHeaders() { + return this._defaultHeaders; + } + + get basePath() { + return this._basePath; + } + + public setDefaultAuthentication(auth: Authentication) { + this.authentications.default = auth; + } + + public setApiKey(key: LiveTvApiApiKeys, value: string) { + (this.authentications as any)[LiveTvApiApiKeys[key]].apiKey = value; + } + + public addInterceptor(interceptor: Interceptor) { + this.interceptors.push(interceptor); + } + + /** + * + * @summary Adds a listings provider. + * @param pw Password. + * @param validateListings Validate listings. + * @param validateLogin Validate login. + * @param addListingProviderRequest New listings info. + */ + public async addListingProvider (pw?: string, validateListings?: boolean, validateLogin?: boolean, addListingProviderRequest?: AddListingProviderRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: ListingsProviderInfo; }> { + const localVarPath = this.basePath + '/LiveTv/ListingProviders'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + if (pw !== undefined) { + localVarQueryParameters['pw'] = ObjectSerializer.serialize(pw, "string"); + } + + if (validateListings !== undefined) { + localVarQueryParameters['validateListings'] = ObjectSerializer.serialize(validateListings, "boolean"); + } + + if (validateLogin !== undefined) { + localVarQueryParameters['validateLogin'] = ObjectSerializer.serialize(validateLogin, "boolean"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: ObjectSerializer.serialize(addListingProviderRequest, "AddListingProviderRequest") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: ListingsProviderInfo; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "ListingsProviderInfo"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Adds a tuner host. + * @param addTunerHostRequest New tuner host. + */ + public async addTunerHost (addTunerHostRequest?: AddTunerHostRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: TunerHostInfo; }> { + const localVarPath = this.basePath + '/LiveTv/TunerHosts'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: ObjectSerializer.serialize(addTunerHostRequest, "AddTunerHostRequest") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: TunerHostInfo; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "TunerHostInfo"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Cancels a live tv series timer. + * @param timerId Timer id. + */ + public async cancelSeriesTimer (timerId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/LiveTv/SeriesTimers/{timerId}' + .replace('{' + 'timerId' + '}', encodeURIComponent(String(timerId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + // verify required parameter 'timerId' is not null or undefined + if (timerId === null || timerId === undefined) { + throw new Error('Required parameter timerId was null or undefined when calling cancelSeriesTimer.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Cancels a live tv timer. + * @param timerId Timer id. + */ + public async cancelTimer (timerId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/LiveTv/Timers/{timerId}' + .replace('{' + 'timerId' + '}', encodeURIComponent(String(timerId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + // verify required parameter 'timerId' is not null or undefined + if (timerId === null || timerId === undefined) { + throw new Error('Required parameter timerId was null or undefined when calling cancelTimer.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Creates a live tv series timer. + * @param createSeriesTimerRequest New series timer info. + */ + public async createSeriesTimer (createSeriesTimerRequest?: CreateSeriesTimerRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/LiveTv/SeriesTimers'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: ObjectSerializer.serialize(createSeriesTimerRequest, "CreateSeriesTimerRequest") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Creates a live tv timer. + * @param createTimerRequest New timer info. + */ + public async createTimer (createTimerRequest?: CreateTimerRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/LiveTv/Timers'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: ObjectSerializer.serialize(createTimerRequest, "CreateTimerRequest") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Delete listing provider. + * @param id Listing provider id. + */ + public async deleteListingProvider (id?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/LiveTv/ListingProviders'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + if (id !== undefined) { + localVarQueryParameters['id'] = ObjectSerializer.serialize(id, "string"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Deletes a live tv recording. + * @param recordingId Recording id. + */ + public async deleteRecording (recordingId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/LiveTv/Recordings/{recordingId}' + .replace('{' + 'recordingId' + '}', encodeURIComponent(String(recordingId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'recordingId' is not null or undefined + if (recordingId === null || recordingId === undefined) { + throw new Error('Required parameter recordingId was null or undefined when calling deleteRecording.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Deletes a tuner host. + * @param id Tuner host id. + */ + public async deleteTunerHost (id?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/LiveTv/TunerHosts'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + if (id !== undefined) { + localVarQueryParameters['id'] = ObjectSerializer.serialize(id, "string"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Discover tuners. + * @param newDevicesOnly Only discover new tuners. + */ + public async discoverTuners (newDevicesOnly?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array; }> { + const localVarPath = this.basePath + '/LiveTv/Tuners/Discover'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + if (newDevicesOnly !== undefined) { + localVarQueryParameters['newDevicesOnly'] = ObjectSerializer.serialize(newDevicesOnly, "boolean"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Array; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Array"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Discover tuners. + * @param newDevicesOnly Only discover new tuners. + */ + public async discvoverTuners (newDevicesOnly?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array; }> { + const localVarPath = this.basePath + '/LiveTv/Tuners/Discvover'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + if (newDevicesOnly !== undefined) { + localVarQueryParameters['newDevicesOnly'] = ObjectSerializer.serialize(newDevicesOnly, "boolean"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Array; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Array"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets a live tv channel. + * @param channelId Channel id. + * @param userId Optional. Attach user data. + */ + public async getChannel (channelId: string, userId?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDto; }> { + const localVarPath = this.basePath + '/LiveTv/Channels/{channelId}' + .replace('{' + 'channelId' + '}', encodeURIComponent(String(channelId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'channelId' is not null or undefined + if (channelId === null || channelId === undefined) { + throw new Error('Required parameter channelId was null or undefined when calling getChannel.'); + } + + if (userId !== undefined) { + localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: BaseItemDto; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "BaseItemDto"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Get channel mapping options. + * @param providerId Provider id. + */ + public async getChannelMappingOptions (providerId?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: ChannelMappingOptionsDto; }> { + const localVarPath = this.basePath + '/LiveTv/ChannelMappingOptions'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + if (providerId !== undefined) { + localVarQueryParameters['providerId'] = ObjectSerializer.serialize(providerId, "string"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: ChannelMappingOptionsDto; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "ChannelMappingOptionsDto"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets default listings provider info. + */ + public async getDefaultListingProvider (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: ListingsProviderInfo; }> { + const localVarPath = this.basePath + '/LiveTv/ListingProviders/Default'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: ListingsProviderInfo; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "ListingsProviderInfo"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets the default values for a new timer. + * @param programId Optional. To attach default values based on a program. + */ + public async getDefaultTimer (programId?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: SeriesTimerInfoDto; }> { + const localVarPath = this.basePath + '/LiveTv/Timers/Defaults'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + if (programId !== undefined) { + localVarQueryParameters['programId'] = ObjectSerializer.serialize(programId, "string"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: SeriesTimerInfoDto; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "SeriesTimerInfoDto"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Get guid info. + */ + public async getGuideInfo (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: GuideInfo; }> { + const localVarPath = this.basePath + '/LiveTv/GuideInfo'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: GuideInfo; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "GuideInfo"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets available lineups. + * @param id Provider id. + * @param type Provider type. + * @param location Location. + * @param country Country. + */ + public async getLineups (id?: string, type?: string, location?: string, country?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array; }> { + const localVarPath = this.basePath + '/LiveTv/ListingProviders/Lineups'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + if (id !== undefined) { + localVarQueryParameters['id'] = ObjectSerializer.serialize(id, "string"); + } + + if (type !== undefined) { + localVarQueryParameters['type'] = ObjectSerializer.serialize(type, "string"); + } + + if (location !== undefined) { + localVarQueryParameters['location'] = ObjectSerializer.serialize(location, "string"); + } + + if (country !== undefined) { + localVarQueryParameters['country'] = ObjectSerializer.serialize(country, "string"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Array; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Array"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets a live tv recording stream. + * @param recordingId Recording id. + */ + public async getLiveRecordingFile (recordingId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/LiveTv/LiveRecordings/{recordingId}/stream' + .replace('{' + 'recordingId' + '}', encodeURIComponent(String(recordingId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['video/*', 'application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'recordingId' is not null or undefined + if (recordingId === null || recordingId === undefined) { + throw new Error('Required parameter recordingId was null or undefined when calling getLiveRecordingFile.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets a live tv channel stream. + * @param streamId Stream id. + * @param container Container type. + */ + public async getLiveStreamFile (streamId: string, container: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/LiveTv/LiveStreamFiles/{streamId}/stream.{container}' + .replace('{' + 'streamId' + '}', encodeURIComponent(String(streamId))) + .replace('{' + 'container' + '}', encodeURIComponent(String(container))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['video/*', 'application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'streamId' is not null or undefined + if (streamId === null || streamId === undefined) { + throw new Error('Required parameter streamId was null or undefined when calling getLiveStreamFile.'); + } + + // verify required parameter 'container' is not null or undefined + if (container === null || container === undefined) { + throw new Error('Required parameter container was null or undefined when calling getLiveStreamFile.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets available live tv channels. + * @param type Optional. Filter by channel type. + * @param userId Optional. Filter by user and attach user data. + * @param startIndex Optional. The record index to start at. All items with a lower index will be dropped from the results. + * @param isMovie Optional. Filter for movies. + * @param isSeries Optional. Filter for series. + * @param isNews Optional. Filter for news. + * @param isKids Optional. Filter for kids. + * @param isSports Optional. Filter for sports. + * @param limit Optional. The maximum number of records to return. + * @param isFavorite Optional. Filter by channels that are favorites, or not. + * @param isLiked Optional. Filter by channels that are liked, or not. + * @param isDisliked Optional. Filter by channels that are disliked, or not. + * @param enableImages Optional. Include image information in output. + * @param imageTypeLimit Optional. The max number of images to return, per image type. + * @param enableImageTypes \"Optional. The image types to include in the output. + * @param fields Optional. Specify additional fields of information to return in the output. + * @param enableUserData Optional. Include user data. + * @param sortBy Optional. Key to sort by. + * @param sortOrder Optional. Sort order. + * @param enableFavoriteSorting Optional. Incorporate favorite and like status into channel sorting. + * @param addCurrentProgram Optional. Adds current program info to each channel. + */ + public async getLiveTvChannels (type?: ChannelType, userId?: string, startIndex?: number, isMovie?: boolean, isSeries?: boolean, isNews?: boolean, isKids?: boolean, isSports?: boolean, limit?: number, isFavorite?: boolean, isLiked?: boolean, isDisliked?: boolean, enableImages?: boolean, imageTypeLimit?: number, enableImageTypes?: Array, fields?: Array, enableUserData?: boolean, sortBy?: Array, sortOrder?: SortOrder, enableFavoriteSorting?: boolean, addCurrentProgram?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }> { + const localVarPath = this.basePath + '/LiveTv/Channels'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + if (type !== undefined) { + localVarQueryParameters['type'] = ObjectSerializer.serialize(type, "ChannelType"); + } + + if (userId !== undefined) { + localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string"); + } + + if (startIndex !== undefined) { + localVarQueryParameters['startIndex'] = ObjectSerializer.serialize(startIndex, "number"); + } + + if (isMovie !== undefined) { + localVarQueryParameters['isMovie'] = ObjectSerializer.serialize(isMovie, "boolean"); + } + + if (isSeries !== undefined) { + localVarQueryParameters['isSeries'] = ObjectSerializer.serialize(isSeries, "boolean"); + } + + if (isNews !== undefined) { + localVarQueryParameters['isNews'] = ObjectSerializer.serialize(isNews, "boolean"); + } + + if (isKids !== undefined) { + localVarQueryParameters['isKids'] = ObjectSerializer.serialize(isKids, "boolean"); + } + + if (isSports !== undefined) { + localVarQueryParameters['isSports'] = ObjectSerializer.serialize(isSports, "boolean"); + } + + if (limit !== undefined) { + localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); + } + + if (isFavorite !== undefined) { + localVarQueryParameters['isFavorite'] = ObjectSerializer.serialize(isFavorite, "boolean"); + } + + if (isLiked !== undefined) { + localVarQueryParameters['isLiked'] = ObjectSerializer.serialize(isLiked, "boolean"); + } + + if (isDisliked !== undefined) { + localVarQueryParameters['isDisliked'] = ObjectSerializer.serialize(isDisliked, "boolean"); + } + + if (enableImages !== undefined) { + localVarQueryParameters['enableImages'] = ObjectSerializer.serialize(enableImages, "boolean"); + } + + if (imageTypeLimit !== undefined) { + localVarQueryParameters['imageTypeLimit'] = ObjectSerializer.serialize(imageTypeLimit, "number"); + } + + if (enableImageTypes !== undefined) { + localVarQueryParameters['enableImageTypes'] = ObjectSerializer.serialize(enableImageTypes, "Array"); + } + + if (fields !== undefined) { + localVarQueryParameters['fields'] = ObjectSerializer.serialize(fields, "Array"); + } + + if (enableUserData !== undefined) { + localVarQueryParameters['enableUserData'] = ObjectSerializer.serialize(enableUserData, "boolean"); + } + + if (sortBy !== undefined) { + localVarQueryParameters['sortBy'] = ObjectSerializer.serialize(sortBy, "Array"); + } + + if (sortOrder !== undefined) { + localVarQueryParameters['sortOrder'] = ObjectSerializer.serialize(sortOrder, "SortOrder"); + } + + if (enableFavoriteSorting !== undefined) { + localVarQueryParameters['enableFavoriteSorting'] = ObjectSerializer.serialize(enableFavoriteSorting, "boolean"); + } + + if (addCurrentProgram !== undefined) { + localVarQueryParameters['addCurrentProgram'] = ObjectSerializer.serialize(addCurrentProgram, "boolean"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "BaseItemDtoQueryResult"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets available live tv services. + */ + public async getLiveTvInfo (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: LiveTvInfo; }> { + const localVarPath = this.basePath + '/LiveTv/Info'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: LiveTvInfo; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "LiveTvInfo"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets available live tv epgs. + * @param channelIds The channels to return guide information for. + * @param userId Optional. Filter by user id. + * @param minStartDate Optional. The minimum premiere start date. + * @param hasAired Optional. Filter by programs that have completed airing, or not. + * @param isAiring Optional. Filter by programs that are currently airing, or not. + * @param maxStartDate Optional. The maximum premiere start date. + * @param minEndDate Optional. The minimum premiere end date. + * @param maxEndDate Optional. The maximum premiere end date. + * @param isMovie Optional. Filter for movies. + * @param isSeries Optional. Filter for series. + * @param isNews Optional. Filter for news. + * @param isKids Optional. Filter for kids. + * @param isSports Optional. Filter for sports. + * @param startIndex Optional. The record index to start at. All items with a lower index will be dropped from the results. + * @param limit Optional. The maximum number of records to return. + * @param sortBy Optional. Specify one or more sort orders, comma delimited. Options: Name, StartDate. + * @param sortOrder Sort Order - Ascending,Descending. + * @param genres The genres to return guide information for. + * @param genreIds The genre ids to return guide information for. + * @param enableImages Optional. Include image information in output. + * @param imageTypeLimit Optional. The max number of images to return, per image type. + * @param enableImageTypes Optional. The image types to include in the output. + * @param enableUserData Optional. Include user data. + * @param seriesTimerId Optional. Filter by series timer id. + * @param librarySeriesId Optional. Filter by library series id. + * @param fields Optional. Specify additional fields of information to return in the output. + * @param enableTotalRecordCount Retrieve total record count. + */ + public async getLiveTvPrograms (channelIds?: Array, userId?: string, minStartDate?: Date, hasAired?: boolean, isAiring?: boolean, maxStartDate?: Date, minEndDate?: Date, maxEndDate?: Date, isMovie?: boolean, isSeries?: boolean, isNews?: boolean, isKids?: boolean, isSports?: boolean, startIndex?: number, limit?: number, sortBy?: Array, sortOrder?: Array, genres?: Array, genreIds?: Array, enableImages?: boolean, imageTypeLimit?: number, enableImageTypes?: Array, enableUserData?: boolean, seriesTimerId?: string, librarySeriesId?: string, fields?: Array, enableTotalRecordCount?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }> { + const localVarPath = this.basePath + '/LiveTv/Programs'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + if (channelIds !== undefined) { + localVarQueryParameters['channelIds'] = ObjectSerializer.serialize(channelIds, "Array"); + } + + if (userId !== undefined) { + localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string"); + } + + if (minStartDate !== undefined) { + localVarQueryParameters['minStartDate'] = ObjectSerializer.serialize(minStartDate, "Date"); + } + + if (hasAired !== undefined) { + localVarQueryParameters['hasAired'] = ObjectSerializer.serialize(hasAired, "boolean"); + } + + if (isAiring !== undefined) { + localVarQueryParameters['isAiring'] = ObjectSerializer.serialize(isAiring, "boolean"); + } + + if (maxStartDate !== undefined) { + localVarQueryParameters['maxStartDate'] = ObjectSerializer.serialize(maxStartDate, "Date"); + } + + if (minEndDate !== undefined) { + localVarQueryParameters['minEndDate'] = ObjectSerializer.serialize(minEndDate, "Date"); + } + + if (maxEndDate !== undefined) { + localVarQueryParameters['maxEndDate'] = ObjectSerializer.serialize(maxEndDate, "Date"); + } + + if (isMovie !== undefined) { + localVarQueryParameters['isMovie'] = ObjectSerializer.serialize(isMovie, "boolean"); + } + + if (isSeries !== undefined) { + localVarQueryParameters['isSeries'] = ObjectSerializer.serialize(isSeries, "boolean"); + } + + if (isNews !== undefined) { + localVarQueryParameters['isNews'] = ObjectSerializer.serialize(isNews, "boolean"); + } + + if (isKids !== undefined) { + localVarQueryParameters['isKids'] = ObjectSerializer.serialize(isKids, "boolean"); + } + + if (isSports !== undefined) { + localVarQueryParameters['isSports'] = ObjectSerializer.serialize(isSports, "boolean"); + } + + if (startIndex !== undefined) { + localVarQueryParameters['startIndex'] = ObjectSerializer.serialize(startIndex, "number"); + } + + if (limit !== undefined) { + localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); + } + + if (sortBy !== undefined) { + localVarQueryParameters['sortBy'] = ObjectSerializer.serialize(sortBy, "Array"); + } + + if (sortOrder !== undefined) { + localVarQueryParameters['sortOrder'] = ObjectSerializer.serialize(sortOrder, "Array"); + } + + if (genres !== undefined) { + localVarQueryParameters['genres'] = ObjectSerializer.serialize(genres, "Array"); + } + + if (genreIds !== undefined) { + localVarQueryParameters['genreIds'] = ObjectSerializer.serialize(genreIds, "Array"); + } + + if (enableImages !== undefined) { + localVarQueryParameters['enableImages'] = ObjectSerializer.serialize(enableImages, "boolean"); + } + + if (imageTypeLimit !== undefined) { + localVarQueryParameters['imageTypeLimit'] = ObjectSerializer.serialize(imageTypeLimit, "number"); + } + + if (enableImageTypes !== undefined) { + localVarQueryParameters['enableImageTypes'] = ObjectSerializer.serialize(enableImageTypes, "Array"); + } + + if (enableUserData !== undefined) { + localVarQueryParameters['enableUserData'] = ObjectSerializer.serialize(enableUserData, "boolean"); + } + + if (seriesTimerId !== undefined) { + localVarQueryParameters['seriesTimerId'] = ObjectSerializer.serialize(seriesTimerId, "string"); + } + + if (librarySeriesId !== undefined) { + localVarQueryParameters['librarySeriesId'] = ObjectSerializer.serialize(librarySeriesId, "string"); + } + + if (fields !== undefined) { + localVarQueryParameters['fields'] = ObjectSerializer.serialize(fields, "Array"); + } + + if (enableTotalRecordCount !== undefined) { + localVarQueryParameters['enableTotalRecordCount'] = ObjectSerializer.serialize(enableTotalRecordCount, "boolean"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "BaseItemDtoQueryResult"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets a live tv program. + * @param programId Program id. + * @param userId Optional. Attach user data. + */ + public async getProgram (programId: string, userId?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDto; }> { + const localVarPath = this.basePath + '/LiveTv/Programs/{programId}' + .replace('{' + 'programId' + '}', encodeURIComponent(String(programId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'programId' is not null or undefined + if (programId === null || programId === undefined) { + throw new Error('Required parameter programId was null or undefined when calling getProgram.'); + } + + if (userId !== undefined) { + localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: BaseItemDto; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "BaseItemDto"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets available live tv epgs. + * @param getProgramsRequest Request body. + */ + public async getPrograms (getProgramsRequest?: GetProgramsRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }> { + const localVarPath = this.basePath + '/LiveTv/Programs'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: ObjectSerializer.serialize(getProgramsRequest, "GetProgramsRequest") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "BaseItemDtoQueryResult"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets recommended live tv epgs. + * @param userId Optional. filter by user id. + * @param limit Optional. The maximum number of records to return. + * @param isAiring Optional. Filter by programs that are currently airing, or not. + * @param hasAired Optional. Filter by programs that have completed airing, or not. + * @param isSeries Optional. Filter for series. + * @param isMovie Optional. Filter for movies. + * @param isNews Optional. Filter for news. + * @param isKids Optional. Filter for kids. + * @param isSports Optional. Filter for sports. + * @param enableImages Optional. Include image information in output. + * @param imageTypeLimit Optional. The max number of images to return, per image type. + * @param enableImageTypes Optional. The image types to include in the output. + * @param genreIds The genres to return guide information for. + * @param fields Optional. Specify additional fields of information to return in the output. + * @param enableUserData Optional. include user data. + * @param enableTotalRecordCount Retrieve total record count. + */ + public async getRecommendedPrograms (userId?: string, limit?: number, isAiring?: boolean, hasAired?: boolean, isSeries?: boolean, isMovie?: boolean, isNews?: boolean, isKids?: boolean, isSports?: boolean, enableImages?: boolean, imageTypeLimit?: number, enableImageTypes?: Array, genreIds?: Array, fields?: Array, enableUserData?: boolean, enableTotalRecordCount?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }> { + const localVarPath = this.basePath + '/LiveTv/Programs/Recommended'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + if (userId !== undefined) { + localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string"); + } + + if (limit !== undefined) { + localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); + } + + if (isAiring !== undefined) { + localVarQueryParameters['isAiring'] = ObjectSerializer.serialize(isAiring, "boolean"); + } + + if (hasAired !== undefined) { + localVarQueryParameters['hasAired'] = ObjectSerializer.serialize(hasAired, "boolean"); + } + + if (isSeries !== undefined) { + localVarQueryParameters['isSeries'] = ObjectSerializer.serialize(isSeries, "boolean"); + } + + if (isMovie !== undefined) { + localVarQueryParameters['isMovie'] = ObjectSerializer.serialize(isMovie, "boolean"); + } + + if (isNews !== undefined) { + localVarQueryParameters['isNews'] = ObjectSerializer.serialize(isNews, "boolean"); + } + + if (isKids !== undefined) { + localVarQueryParameters['isKids'] = ObjectSerializer.serialize(isKids, "boolean"); + } + + if (isSports !== undefined) { + localVarQueryParameters['isSports'] = ObjectSerializer.serialize(isSports, "boolean"); + } + + if (enableImages !== undefined) { + localVarQueryParameters['enableImages'] = ObjectSerializer.serialize(enableImages, "boolean"); + } + + if (imageTypeLimit !== undefined) { + localVarQueryParameters['imageTypeLimit'] = ObjectSerializer.serialize(imageTypeLimit, "number"); + } + + if (enableImageTypes !== undefined) { + localVarQueryParameters['enableImageTypes'] = ObjectSerializer.serialize(enableImageTypes, "Array"); + } + + if (genreIds !== undefined) { + localVarQueryParameters['genreIds'] = ObjectSerializer.serialize(genreIds, "Array"); + } + + if (fields !== undefined) { + localVarQueryParameters['fields'] = ObjectSerializer.serialize(fields, "Array"); + } + + if (enableUserData !== undefined) { + localVarQueryParameters['enableUserData'] = ObjectSerializer.serialize(enableUserData, "boolean"); + } + + if (enableTotalRecordCount !== undefined) { + localVarQueryParameters['enableTotalRecordCount'] = ObjectSerializer.serialize(enableTotalRecordCount, "boolean"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "BaseItemDtoQueryResult"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets a live tv recording. + * @param recordingId Recording id. + * @param userId Optional. Attach user data. + */ + public async getRecording (recordingId: string, userId?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDto; }> { + const localVarPath = this.basePath + '/LiveTv/Recordings/{recordingId}' + .replace('{' + 'recordingId' + '}', encodeURIComponent(String(recordingId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'recordingId' is not null or undefined + if (recordingId === null || recordingId === undefined) { + throw new Error('Required parameter recordingId was null or undefined when calling getRecording.'); + } + + if (userId !== undefined) { + localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: BaseItemDto; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "BaseItemDto"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets recording folders. + * @param userId Optional. Filter by user and attach user data. + */ + public async getRecordingFolders (userId?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }> { + const localVarPath = this.basePath + '/LiveTv/Recordings/Folders'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + if (userId !== undefined) { + localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "BaseItemDtoQueryResult"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Get recording group. + * @param groupId Group id. + */ + public async getRecordingGroup (groupId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/LiveTv/Recordings/Groups/{groupId}' + .replace('{' + 'groupId' + '}', encodeURIComponent(String(groupId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'groupId' is not null or undefined + if (groupId === null || groupId === undefined) { + throw new Error('Required parameter groupId was null or undefined when calling getRecordingGroup.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets live tv recording groups. + * @param userId Optional. Filter by user and attach user data. + */ + public async getRecordingGroups (userId?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }> { + const localVarPath = this.basePath + '/LiveTv/Recordings/Groups'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + if (userId !== undefined) { + localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "BaseItemDtoQueryResult"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets live tv recordings. + * @param channelId Optional. Filter by channel id. + * @param userId Optional. Filter by user and attach user data. + * @param startIndex Optional. The record index to start at. All items with a lower index will be dropped from the results. + * @param limit Optional. The maximum number of records to return. + * @param status Optional. Filter by recording status. + * @param isInProgress Optional. Filter by recordings that are in progress, or not. + * @param seriesTimerId Optional. Filter by recordings belonging to a series timer. + * @param enableImages Optional. Include image information in output. + * @param imageTypeLimit Optional. The max number of images to return, per image type. + * @param enableImageTypes Optional. The image types to include in the output. + * @param fields Optional. Specify additional fields of information to return in the output. + * @param enableUserData Optional. Include user data. + * @param isMovie Optional. Filter for movies. + * @param isSeries Optional. Filter for series. + * @param isKids Optional. Filter for kids. + * @param isSports Optional. Filter for sports. + * @param isNews Optional. Filter for news. + * @param isLibraryItem Optional. Filter for is library item. + * @param enableTotalRecordCount Optional. Return total record count. + */ + public async getRecordings (channelId?: string, userId?: string, startIndex?: number, limit?: number, status?: RecordingStatus, isInProgress?: boolean, seriesTimerId?: string, enableImages?: boolean, imageTypeLimit?: number, enableImageTypes?: Array, fields?: Array, enableUserData?: boolean, isMovie?: boolean, isSeries?: boolean, isKids?: boolean, isSports?: boolean, isNews?: boolean, isLibraryItem?: boolean, enableTotalRecordCount?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }> { + const localVarPath = this.basePath + '/LiveTv/Recordings'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + if (channelId !== undefined) { + localVarQueryParameters['channelId'] = ObjectSerializer.serialize(channelId, "string"); + } + + if (userId !== undefined) { + localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string"); + } + + if (startIndex !== undefined) { + localVarQueryParameters['startIndex'] = ObjectSerializer.serialize(startIndex, "number"); + } + + if (limit !== undefined) { + localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); + } + + if (status !== undefined) { + localVarQueryParameters['status'] = ObjectSerializer.serialize(status, "RecordingStatus"); + } + + if (isInProgress !== undefined) { + localVarQueryParameters['isInProgress'] = ObjectSerializer.serialize(isInProgress, "boolean"); + } + + if (seriesTimerId !== undefined) { + localVarQueryParameters['seriesTimerId'] = ObjectSerializer.serialize(seriesTimerId, "string"); + } + + if (enableImages !== undefined) { + localVarQueryParameters['enableImages'] = ObjectSerializer.serialize(enableImages, "boolean"); + } + + if (imageTypeLimit !== undefined) { + localVarQueryParameters['imageTypeLimit'] = ObjectSerializer.serialize(imageTypeLimit, "number"); + } + + if (enableImageTypes !== undefined) { + localVarQueryParameters['enableImageTypes'] = ObjectSerializer.serialize(enableImageTypes, "Array"); + } + + if (fields !== undefined) { + localVarQueryParameters['fields'] = ObjectSerializer.serialize(fields, "Array"); + } + + if (enableUserData !== undefined) { + localVarQueryParameters['enableUserData'] = ObjectSerializer.serialize(enableUserData, "boolean"); + } + + if (isMovie !== undefined) { + localVarQueryParameters['isMovie'] = ObjectSerializer.serialize(isMovie, "boolean"); + } + + if (isSeries !== undefined) { + localVarQueryParameters['isSeries'] = ObjectSerializer.serialize(isSeries, "boolean"); + } + + if (isKids !== undefined) { + localVarQueryParameters['isKids'] = ObjectSerializer.serialize(isKids, "boolean"); + } + + if (isSports !== undefined) { + localVarQueryParameters['isSports'] = ObjectSerializer.serialize(isSports, "boolean"); + } + + if (isNews !== undefined) { + localVarQueryParameters['isNews'] = ObjectSerializer.serialize(isNews, "boolean"); + } + + if (isLibraryItem !== undefined) { + localVarQueryParameters['isLibraryItem'] = ObjectSerializer.serialize(isLibraryItem, "boolean"); + } + + if (enableTotalRecordCount !== undefined) { + localVarQueryParameters['enableTotalRecordCount'] = ObjectSerializer.serialize(enableTotalRecordCount, "boolean"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "BaseItemDtoQueryResult"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets live tv recording series. + * @param channelId Optional. Filter by channel id. + * @param userId Optional. Filter by user and attach user data. + * @param groupId Optional. Filter by recording group. + * @param startIndex Optional. The record index to start at. All items with a lower index will be dropped from the results. + * @param limit Optional. The maximum number of records to return. + * @param status Optional. Filter by recording status. + * @param isInProgress Optional. Filter by recordings that are in progress, or not. + * @param seriesTimerId Optional. Filter by recordings belonging to a series timer. + * @param enableImages Optional. Include image information in output. + * @param imageTypeLimit Optional. The max number of images to return, per image type. + * @param enableImageTypes Optional. The image types to include in the output. + * @param fields Optional. Specify additional fields of information to return in the output. + * @param enableUserData Optional. Include user data. + * @param enableTotalRecordCount Optional. Return total record count. + */ + public async getRecordingsSeries (channelId?: string, userId?: string, groupId?: string, startIndex?: number, limit?: number, status?: RecordingStatus, isInProgress?: boolean, seriesTimerId?: string, enableImages?: boolean, imageTypeLimit?: number, enableImageTypes?: Array, fields?: Array, enableUserData?: boolean, enableTotalRecordCount?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }> { + const localVarPath = this.basePath + '/LiveTv/Recordings/Series'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + if (channelId !== undefined) { + localVarQueryParameters['channelId'] = ObjectSerializer.serialize(channelId, "string"); + } + + if (userId !== undefined) { + localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string"); + } + + if (groupId !== undefined) { + localVarQueryParameters['groupId'] = ObjectSerializer.serialize(groupId, "string"); + } + + if (startIndex !== undefined) { + localVarQueryParameters['startIndex'] = ObjectSerializer.serialize(startIndex, "number"); + } + + if (limit !== undefined) { + localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); + } + + if (status !== undefined) { + localVarQueryParameters['status'] = ObjectSerializer.serialize(status, "RecordingStatus"); + } + + if (isInProgress !== undefined) { + localVarQueryParameters['isInProgress'] = ObjectSerializer.serialize(isInProgress, "boolean"); + } + + if (seriesTimerId !== undefined) { + localVarQueryParameters['seriesTimerId'] = ObjectSerializer.serialize(seriesTimerId, "string"); + } + + if (enableImages !== undefined) { + localVarQueryParameters['enableImages'] = ObjectSerializer.serialize(enableImages, "boolean"); + } + + if (imageTypeLimit !== undefined) { + localVarQueryParameters['imageTypeLimit'] = ObjectSerializer.serialize(imageTypeLimit, "number"); + } + + if (enableImageTypes !== undefined) { + localVarQueryParameters['enableImageTypes'] = ObjectSerializer.serialize(enableImageTypes, "Array"); + } + + if (fields !== undefined) { + localVarQueryParameters['fields'] = ObjectSerializer.serialize(fields, "Array"); + } + + if (enableUserData !== undefined) { + localVarQueryParameters['enableUserData'] = ObjectSerializer.serialize(enableUserData, "boolean"); + } + + if (enableTotalRecordCount !== undefined) { + localVarQueryParameters['enableTotalRecordCount'] = ObjectSerializer.serialize(enableTotalRecordCount, "boolean"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "BaseItemDtoQueryResult"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets available countries. + */ + public async getSchedulesDirectCountries (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/LiveTv/ListingProviders/SchedulesDirect/Countries'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets a live tv series timer. + * @param timerId Timer id. + */ + public async getSeriesTimer (timerId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: SeriesTimerInfoDto; }> { + const localVarPath = this.basePath + '/LiveTv/SeriesTimers/{timerId}' + .replace('{' + 'timerId' + '}', encodeURIComponent(String(timerId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'timerId' is not null or undefined + if (timerId === null || timerId === undefined) { + throw new Error('Required parameter timerId was null or undefined when calling getSeriesTimer.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: SeriesTimerInfoDto; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "SeriesTimerInfoDto"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets live tv series timers. + * @param sortBy Optional. Sort by SortName or Priority. + * @param sortOrder Optional. Sort in Ascending or Descending order. + */ + public async getSeriesTimers (sortBy?: string, sortOrder?: SortOrder, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: SeriesTimerInfoDtoQueryResult; }> { + const localVarPath = this.basePath + '/LiveTv/SeriesTimers'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + if (sortBy !== undefined) { + localVarQueryParameters['sortBy'] = ObjectSerializer.serialize(sortBy, "string"); + } + + if (sortOrder !== undefined) { + localVarQueryParameters['sortOrder'] = ObjectSerializer.serialize(sortOrder, "SortOrder"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: SeriesTimerInfoDtoQueryResult; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "SeriesTimerInfoDtoQueryResult"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets a timer. + * @param timerId Timer id. + */ + public async getTimer (timerId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: TimerInfoDto; }> { + const localVarPath = this.basePath + '/LiveTv/Timers/{timerId}' + .replace('{' + 'timerId' + '}', encodeURIComponent(String(timerId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'timerId' is not null or undefined + if (timerId === null || timerId === undefined) { + throw new Error('Required parameter timerId was null or undefined when calling getTimer.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: TimerInfoDto; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "TimerInfoDto"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets the live tv timers. + * @param channelId Optional. Filter by channel id. + * @param seriesTimerId Optional. Filter by timers belonging to a series timer. + * @param isActive Optional. Filter by timers that are active. + * @param isScheduled Optional. Filter by timers that are scheduled. + */ + public async getTimers (channelId?: string, seriesTimerId?: string, isActive?: boolean, isScheduled?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: TimerInfoDtoQueryResult; }> { + const localVarPath = this.basePath + '/LiveTv/Timers'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + if (channelId !== undefined) { + localVarQueryParameters['channelId'] = ObjectSerializer.serialize(channelId, "string"); + } + + if (seriesTimerId !== undefined) { + localVarQueryParameters['seriesTimerId'] = ObjectSerializer.serialize(seriesTimerId, "string"); + } + + if (isActive !== undefined) { + localVarQueryParameters['isActive'] = ObjectSerializer.serialize(isActive, "boolean"); + } + + if (isScheduled !== undefined) { + localVarQueryParameters['isScheduled'] = ObjectSerializer.serialize(isScheduled, "boolean"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: TimerInfoDtoQueryResult; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "TimerInfoDtoQueryResult"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Get tuner host types. + */ + public async getTunerHostTypes (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array; }> { + const localVarPath = this.basePath + '/LiveTv/TunerHosts/Types'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Array; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Array"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Resets a tv tuner. + * @param tunerId Tuner id. + */ + public async resetTuner (tunerId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/LiveTv/Tuners/{tunerId}/Reset' + .replace('{' + 'tunerId' + '}', encodeURIComponent(String(tunerId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + // verify required parameter 'tunerId' is not null or undefined + if (tunerId === null || tunerId === undefined) { + throw new Error('Required parameter tunerId was null or undefined when calling resetTuner.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Set channel mappings. + * @param setChannelMappingRequest The set channel mapping dto. + */ + public async setChannelMapping (setChannelMappingRequest: SetChannelMappingRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: TunerChannelMapping; }> { + const localVarPath = this.basePath + '/LiveTv/ChannelMappings'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'setChannelMappingRequest' is not null or undefined + if (setChannelMappingRequest === null || setChannelMappingRequest === undefined) { + throw new Error('Required parameter setChannelMappingRequest was null or undefined when calling setChannelMapping.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: ObjectSerializer.serialize(setChannelMappingRequest, "SetChannelMappingRequest") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: TunerChannelMapping; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "TunerChannelMapping"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Updates a live tv series timer. + * @param timerId Timer id. + * @param createSeriesTimerRequest New series timer info. + */ + public async updateSeriesTimer (timerId: string, createSeriesTimerRequest?: CreateSeriesTimerRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/LiveTv/SeriesTimers/{timerId}' + .replace('{' + 'timerId' + '}', encodeURIComponent(String(timerId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + // verify required parameter 'timerId' is not null or undefined + if (timerId === null || timerId === undefined) { + throw new Error('Required parameter timerId was null or undefined when calling updateSeriesTimer.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: ObjectSerializer.serialize(createSeriesTimerRequest, "CreateSeriesTimerRequest") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Updates a live tv timer. + * @param timerId Timer id. + * @param createTimerRequest New timer info. + */ + public async updateTimer (timerId: string, createTimerRequest?: CreateTimerRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/LiveTv/Timers/{timerId}' + .replace('{' + 'timerId' + '}', encodeURIComponent(String(timerId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + // verify required parameter 'timerId' is not null or undefined + if (timerId === null || timerId === undefined) { + throw new Error('Required parameter timerId was null or undefined when calling updateTimer.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: ObjectSerializer.serialize(createTimerRequest, "CreateTimerRequest") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} diff --git a/jellyfin/api/localizationApi.ts b/jellyfin/api/localizationApi.ts new file mode 100644 index 0000000..e436318 --- /dev/null +++ b/jellyfin/api/localizationApi.ts @@ -0,0 +1,355 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import localVarRequest from 'request'; +import http from 'http'; + +/* tslint:disable:no-unused-locals */ +import { CountryInfo } from '../model/countryInfo'; +import { CultureDto } from '../model/cultureDto'; +import { LocalizationOption } from '../model/localizationOption'; +import { ParentalRating } from '../model/parentalRating'; + +import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; +import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; + +import { HttpError, RequestFile } from './apis'; + +let defaultBasePath = 'http://localhost'; + +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== + +export enum LocalizationApiApiKeys { + CustomAuthentication, +} + +export class LocalizationApi { + protected _basePath = defaultBasePath; + protected _defaultHeaders : any = {}; + protected _useQuerystring : boolean = false; + + protected authentications = { + 'default': new VoidAuth(), + 'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'), + } + + protected interceptors: Interceptor[] = []; + + constructor(basePath?: string); + constructor(basePathOrUsername: string, password?: string, basePath?: string) { + if (password) { + if (basePath) { + this.basePath = basePath; + } + } else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername + } + } + } + + set useQuerystring(value: boolean) { + this._useQuerystring = value; + } + + set basePath(basePath: string) { + this._basePath = basePath; + } + + set defaultHeaders(defaultHeaders: any) { + this._defaultHeaders = defaultHeaders; + } + + get defaultHeaders() { + return this._defaultHeaders; + } + + get basePath() { + return this._basePath; + } + + public setDefaultAuthentication(auth: Authentication) { + this.authentications.default = auth; + } + + public setApiKey(key: LocalizationApiApiKeys, value: string) { + (this.authentications as any)[LocalizationApiApiKeys[key]].apiKey = value; + } + + public addInterceptor(interceptor: Interceptor) { + this.interceptors.push(interceptor); + } + + /** + * + * @summary Gets known countries. + */ + public async getCountries (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array; }> { + const localVarPath = this.basePath + '/Localization/Countries'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Array; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Array"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets known cultures. + */ + public async getCultures (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array; }> { + const localVarPath = this.basePath + '/Localization/Cultures'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Array; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Array"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets localization options. + */ + public async getLocalizationOptions (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array; }> { + const localVarPath = this.basePath + '/Localization/Options'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Array; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Array"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets known parental ratings. + */ + public async getParentalRatings (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array; }> { + const localVarPath = this.basePath + '/Localization/ParentalRatings'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Array; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Array"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} diff --git a/jellyfin/api/mediaInfoApi.ts b/jellyfin/api/mediaInfoApi.ts new file mode 100644 index 0000000..41403a7 --- /dev/null +++ b/jellyfin/api/mediaInfoApi.ts @@ -0,0 +1,580 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import localVarRequest from 'request'; +import http from 'http'; + +/* tslint:disable:no-unused-locals */ +import { GetPostedPlaybackInfoRequest } from '../model/getPostedPlaybackInfoRequest'; +import { LiveStreamResponse } from '../model/liveStreamResponse'; +import { OpenLiveStreamRequest } from '../model/openLiveStreamRequest'; +import { PlaybackInfoResponse } from '../model/playbackInfoResponse'; + +import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; +import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; + +import { HttpError, RequestFile } from './apis'; + +let defaultBasePath = 'http://localhost'; + +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== + +export enum MediaInfoApiApiKeys { + CustomAuthentication, +} + +export class MediaInfoApi { + protected _basePath = defaultBasePath; + protected _defaultHeaders : any = {}; + protected _useQuerystring : boolean = false; + + protected authentications = { + 'default': new VoidAuth(), + 'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'), + } + + protected interceptors: Interceptor[] = []; + + constructor(basePath?: string); + constructor(basePathOrUsername: string, password?: string, basePath?: string) { + if (password) { + if (basePath) { + this.basePath = basePath; + } + } else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername + } + } + } + + set useQuerystring(value: boolean) { + this._useQuerystring = value; + } + + set basePath(basePath: string) { + this._basePath = basePath; + } + + set defaultHeaders(defaultHeaders: any) { + this._defaultHeaders = defaultHeaders; + } + + get defaultHeaders() { + return this._defaultHeaders; + } + + get basePath() { + return this._basePath; + } + + public setDefaultAuthentication(auth: Authentication) { + this.authentications.default = auth; + } + + public setApiKey(key: MediaInfoApiApiKeys, value: string) { + (this.authentications as any)[MediaInfoApiApiKeys[key]].apiKey = value; + } + + public addInterceptor(interceptor: Interceptor) { + this.interceptors.push(interceptor); + } + + /** + * + * @summary Closes a media source. + * @param liveStreamId The livestream id. + */ + public async closeLiveStream (liveStreamId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/LiveStreams/Close'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + // verify required parameter 'liveStreamId' is not null or undefined + if (liveStreamId === null || liveStreamId === undefined) { + throw new Error('Required parameter liveStreamId was null or undefined when calling closeLiveStream.'); + } + + if (liveStreamId !== undefined) { + localVarQueryParameters['liveStreamId'] = ObjectSerializer.serialize(liveStreamId, "string"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Tests the network with a request with the size of the bitrate. + * @param size The bitrate. Defaults to 102400. + */ + public async getBitrateTestBytes (size?: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/Playback/BitrateTest'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/octet-stream']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + if (size !== undefined) { + localVarQueryParameters['size'] = ObjectSerializer.serialize(size, "number"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets live playback media info for an item. + * @param itemId The item id. + * @param userId The user id. + */ + public async getPlaybackInfo (itemId: string, userId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: PlaybackInfoResponse; }> { + const localVarPath = this.basePath + '/Items/{itemId}/PlaybackInfo' + .replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'itemId' is not null or undefined + if (itemId === null || itemId === undefined) { + throw new Error('Required parameter itemId was null or undefined when calling getPlaybackInfo.'); + } + + // verify required parameter 'userId' is not null or undefined + if (userId === null || userId === undefined) { + throw new Error('Required parameter userId was null or undefined when calling getPlaybackInfo.'); + } + + if (userId !== undefined) { + localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: PlaybackInfoResponse; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "PlaybackInfoResponse"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * For backwards compatibility parameters can be sent via Query or Body, with Query having higher precedence. Query parameters are obsolete. + * @summary Gets live playback media info for an item. + * @param itemId The item id. + * @param userId The user id. + * @param maxStreamingBitrate The maximum streaming bitrate. + * @param startTimeTicks The start time in ticks. + * @param audioStreamIndex The audio stream index. + * @param subtitleStreamIndex The subtitle stream index. + * @param maxAudioChannels The maximum number of audio channels. + * @param mediaSourceId The media source id. + * @param liveStreamId The livestream id. + * @param autoOpenLiveStream Whether to auto open the livestream. + * @param enableDirectPlay Whether to enable direct play. Default: true. + * @param enableDirectStream Whether to enable direct stream. Default: true. + * @param enableTranscoding Whether to enable transcoding. Default: true. + * @param allowVideoStreamCopy Whether to allow to copy the video stream. Default: true. + * @param allowAudioStreamCopy Whether to allow to copy the audio stream. Default: true. + * @param getPostedPlaybackInfoRequest The playback info. + */ + public async getPostedPlaybackInfo (itemId: string, userId?: string, maxStreamingBitrate?: number, startTimeTicks?: number, audioStreamIndex?: number, subtitleStreamIndex?: number, maxAudioChannels?: number, mediaSourceId?: string, liveStreamId?: string, autoOpenLiveStream?: boolean, enableDirectPlay?: boolean, enableDirectStream?: boolean, enableTranscoding?: boolean, allowVideoStreamCopy?: boolean, allowAudioStreamCopy?: boolean, getPostedPlaybackInfoRequest?: GetPostedPlaybackInfoRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: PlaybackInfoResponse; }> { + const localVarPath = this.basePath + '/Items/{itemId}/PlaybackInfo' + .replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'itemId' is not null or undefined + if (itemId === null || itemId === undefined) { + throw new Error('Required parameter itemId was null or undefined when calling getPostedPlaybackInfo.'); + } + + if (userId !== undefined) { + localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string"); + } + + if (maxStreamingBitrate !== undefined) { + localVarQueryParameters['maxStreamingBitrate'] = ObjectSerializer.serialize(maxStreamingBitrate, "number"); + } + + if (startTimeTicks !== undefined) { + localVarQueryParameters['startTimeTicks'] = ObjectSerializer.serialize(startTimeTicks, "number"); + } + + if (audioStreamIndex !== undefined) { + localVarQueryParameters['audioStreamIndex'] = ObjectSerializer.serialize(audioStreamIndex, "number"); + } + + if (subtitleStreamIndex !== undefined) { + localVarQueryParameters['subtitleStreamIndex'] = ObjectSerializer.serialize(subtitleStreamIndex, "number"); + } + + if (maxAudioChannels !== undefined) { + localVarQueryParameters['maxAudioChannels'] = ObjectSerializer.serialize(maxAudioChannels, "number"); + } + + if (mediaSourceId !== undefined) { + localVarQueryParameters['mediaSourceId'] = ObjectSerializer.serialize(mediaSourceId, "string"); + } + + if (liveStreamId !== undefined) { + localVarQueryParameters['liveStreamId'] = ObjectSerializer.serialize(liveStreamId, "string"); + } + + if (autoOpenLiveStream !== undefined) { + localVarQueryParameters['autoOpenLiveStream'] = ObjectSerializer.serialize(autoOpenLiveStream, "boolean"); + } + + if (enableDirectPlay !== undefined) { + localVarQueryParameters['enableDirectPlay'] = ObjectSerializer.serialize(enableDirectPlay, "boolean"); + } + + if (enableDirectStream !== undefined) { + localVarQueryParameters['enableDirectStream'] = ObjectSerializer.serialize(enableDirectStream, "boolean"); + } + + if (enableTranscoding !== undefined) { + localVarQueryParameters['enableTranscoding'] = ObjectSerializer.serialize(enableTranscoding, "boolean"); + } + + if (allowVideoStreamCopy !== undefined) { + localVarQueryParameters['allowVideoStreamCopy'] = ObjectSerializer.serialize(allowVideoStreamCopy, "boolean"); + } + + if (allowAudioStreamCopy !== undefined) { + localVarQueryParameters['allowAudioStreamCopy'] = ObjectSerializer.serialize(allowAudioStreamCopy, "boolean"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: ObjectSerializer.serialize(getPostedPlaybackInfoRequest, "GetPostedPlaybackInfoRequest") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: PlaybackInfoResponse; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "PlaybackInfoResponse"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Opens a media source. + * @param openToken The open token. + * @param userId The user id. + * @param playSessionId The play session id. + * @param maxStreamingBitrate The maximum streaming bitrate. + * @param startTimeTicks The start time in ticks. + * @param audioStreamIndex The audio stream index. + * @param subtitleStreamIndex The subtitle stream index. + * @param maxAudioChannels The maximum number of audio channels. + * @param itemId The item id. + * @param enableDirectPlay Whether to enable direct play. Default: true. + * @param enableDirectStream Whether to enable direct stream. Default: true. + * @param openLiveStreamRequest The open live stream dto. + */ + public async openLiveStream (openToken?: string, userId?: string, playSessionId?: string, maxStreamingBitrate?: number, startTimeTicks?: number, audioStreamIndex?: number, subtitleStreamIndex?: number, maxAudioChannels?: number, itemId?: string, enableDirectPlay?: boolean, enableDirectStream?: boolean, openLiveStreamRequest?: OpenLiveStreamRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: LiveStreamResponse; }> { + const localVarPath = this.basePath + '/LiveStreams/Open'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + if (openToken !== undefined) { + localVarQueryParameters['openToken'] = ObjectSerializer.serialize(openToken, "string"); + } + + if (userId !== undefined) { + localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string"); + } + + if (playSessionId !== undefined) { + localVarQueryParameters['playSessionId'] = ObjectSerializer.serialize(playSessionId, "string"); + } + + if (maxStreamingBitrate !== undefined) { + localVarQueryParameters['maxStreamingBitrate'] = ObjectSerializer.serialize(maxStreamingBitrate, "number"); + } + + if (startTimeTicks !== undefined) { + localVarQueryParameters['startTimeTicks'] = ObjectSerializer.serialize(startTimeTicks, "number"); + } + + if (audioStreamIndex !== undefined) { + localVarQueryParameters['audioStreamIndex'] = ObjectSerializer.serialize(audioStreamIndex, "number"); + } + + if (subtitleStreamIndex !== undefined) { + localVarQueryParameters['subtitleStreamIndex'] = ObjectSerializer.serialize(subtitleStreamIndex, "number"); + } + + if (maxAudioChannels !== undefined) { + localVarQueryParameters['maxAudioChannels'] = ObjectSerializer.serialize(maxAudioChannels, "number"); + } + + if (itemId !== undefined) { + localVarQueryParameters['itemId'] = ObjectSerializer.serialize(itemId, "string"); + } + + if (enableDirectPlay !== undefined) { + localVarQueryParameters['enableDirectPlay'] = ObjectSerializer.serialize(enableDirectPlay, "boolean"); + } + + if (enableDirectStream !== undefined) { + localVarQueryParameters['enableDirectStream'] = ObjectSerializer.serialize(enableDirectStream, "boolean"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: ObjectSerializer.serialize(openLiveStreamRequest, "OpenLiveStreamRequest") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: LiveStreamResponse; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "LiveStreamResponse"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} diff --git a/jellyfin/api/moviesApi.ts b/jellyfin/api/moviesApi.ts new file mode 100644 index 0000000..18eefaa --- /dev/null +++ b/jellyfin/api/moviesApi.ts @@ -0,0 +1,183 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import localVarRequest from 'request'; +import http from 'http'; + +/* tslint:disable:no-unused-locals */ +import { ItemFields } from '../model/itemFields'; +import { RecommendationDto } from '../model/recommendationDto'; + +import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; +import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; + +import { HttpError, RequestFile } from './apis'; + +let defaultBasePath = 'http://localhost'; + +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== + +export enum MoviesApiApiKeys { + CustomAuthentication, +} + +export class MoviesApi { + protected _basePath = defaultBasePath; + protected _defaultHeaders : any = {}; + protected _useQuerystring : boolean = false; + + protected authentications = { + 'default': new VoidAuth(), + 'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'), + } + + protected interceptors: Interceptor[] = []; + + constructor(basePath?: string); + constructor(basePathOrUsername: string, password?: string, basePath?: string) { + if (password) { + if (basePath) { + this.basePath = basePath; + } + } else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername + } + } + } + + set useQuerystring(value: boolean) { + this._useQuerystring = value; + } + + set basePath(basePath: string) { + this._basePath = basePath; + } + + set defaultHeaders(defaultHeaders: any) { + this._defaultHeaders = defaultHeaders; + } + + get defaultHeaders() { + return this._defaultHeaders; + } + + get basePath() { + return this._basePath; + } + + public setDefaultAuthentication(auth: Authentication) { + this.authentications.default = auth; + } + + public setApiKey(key: MoviesApiApiKeys, value: string) { + (this.authentications as any)[MoviesApiApiKeys[key]].apiKey = value; + } + + public addInterceptor(interceptor: Interceptor) { + this.interceptors.push(interceptor); + } + + /** + * + * @summary Gets movie recommendations. + * @param userId Optional. Filter by user id, and attach user data. + * @param parentId Specify this to localize the search to a specific item or folder. Omit to use the root. + * @param fields Optional. The fields to return. + * @param categoryLimit The max number of categories to return. + * @param itemLimit The max number of items to return per category. + */ + public async getMovieRecommendations (userId?: string, parentId?: string, fields?: Array, categoryLimit?: number, itemLimit?: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array; }> { + const localVarPath = this.basePath + '/Movies/Recommendations'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + if (userId !== undefined) { + localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string"); + } + + if (parentId !== undefined) { + localVarQueryParameters['parentId'] = ObjectSerializer.serialize(parentId, "string"); + } + + if (fields !== undefined) { + localVarQueryParameters['fields'] = ObjectSerializer.serialize(fields, "Array"); + } + + if (categoryLimit !== undefined) { + localVarQueryParameters['categoryLimit'] = ObjectSerializer.serialize(categoryLimit, "number"); + } + + if (itemLimit !== undefined) { + localVarQueryParameters['itemLimit'] = ObjectSerializer.serialize(itemLimit, "number"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Array; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Array"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} diff --git a/jellyfin/api/musicGenresApi.ts b/jellyfin/api/musicGenresApi.ts new file mode 100644 index 0000000..a30cdd1 --- /dev/null +++ b/jellyfin/api/musicGenresApi.ts @@ -0,0 +1,329 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import localVarRequest from 'request'; +import http from 'http'; + +/* tslint:disable:no-unused-locals */ +import { BaseItemDto } from '../model/baseItemDto'; +import { BaseItemDtoQueryResult } from '../model/baseItemDtoQueryResult'; +import { BaseItemKind } from '../model/baseItemKind'; +import { ImageType } from '../model/imageType'; +import { ItemFields } from '../model/itemFields'; +import { SortOrder } from '../model/sortOrder'; + +import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; +import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; + +import { HttpError, RequestFile } from './apis'; + +let defaultBasePath = 'http://localhost'; + +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== + +export enum MusicGenresApiApiKeys { + CustomAuthentication, +} + +export class MusicGenresApi { + protected _basePath = defaultBasePath; + protected _defaultHeaders : any = {}; + protected _useQuerystring : boolean = false; + + protected authentications = { + 'default': new VoidAuth(), + 'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'), + } + + protected interceptors: Interceptor[] = []; + + constructor(basePath?: string); + constructor(basePathOrUsername: string, password?: string, basePath?: string) { + if (password) { + if (basePath) { + this.basePath = basePath; + } + } else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername + } + } + } + + set useQuerystring(value: boolean) { + this._useQuerystring = value; + } + + set basePath(basePath: string) { + this._basePath = basePath; + } + + set defaultHeaders(defaultHeaders: any) { + this._defaultHeaders = defaultHeaders; + } + + get defaultHeaders() { + return this._defaultHeaders; + } + + get basePath() { + return this._basePath; + } + + public setDefaultAuthentication(auth: Authentication) { + this.authentications.default = auth; + } + + public setApiKey(key: MusicGenresApiApiKeys, value: string) { + (this.authentications as any)[MusicGenresApiApiKeys[key]].apiKey = value; + } + + public addInterceptor(interceptor: Interceptor) { + this.interceptors.push(interceptor); + } + + /** + * + * @summary Gets a music genre, by name. + * @param genreName The genre name. + * @param userId Optional. Filter by user id, and attach user data. + */ + public async getMusicGenre (genreName: string, userId?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDto; }> { + const localVarPath = this.basePath + '/MusicGenres/{genreName}' + .replace('{' + 'genreName' + '}', encodeURIComponent(String(genreName))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'genreName' is not null or undefined + if (genreName === null || genreName === undefined) { + throw new Error('Required parameter genreName was null or undefined when calling getMusicGenre.'); + } + + if (userId !== undefined) { + localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: BaseItemDto; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "BaseItemDto"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets all music genres from a given item, folder, or the entire library. + * @param startIndex Optional. The record index to start at. All items with a lower index will be dropped from the results. + * @param limit Optional. The maximum number of records to return. + * @param searchTerm The search term. + * @param parentId Specify this to localize the search to a specific item or folder. Omit to use the root. + * @param fields Optional. Specify additional fields of information to return in the output. + * @param excludeItemTypes Optional. If specified, results will be filtered out based on item type. This allows multiple, comma delimited. + * @param includeItemTypes Optional. If specified, results will be filtered in based on item type. This allows multiple, comma delimited. + * @param isFavorite Optional filter by items that are marked as favorite, or not. + * @param imageTypeLimit Optional, the max number of images to return, per image type. + * @param enableImageTypes Optional. The image types to include in the output. + * @param userId User id. + * @param nameStartsWithOrGreater Optional filter by items whose name is sorted equally or greater than a given input string. + * @param nameStartsWith Optional filter by items whose name is sorted equally than a given input string. + * @param nameLessThan Optional filter by items whose name is equally or lesser than a given input string. + * @param sortBy Optional. Specify one or more sort orders, comma delimited. + * @param sortOrder Sort Order - Ascending,Descending. + * @param enableImages Optional, include image information in output. + * @param enableTotalRecordCount Optional. Include total record count. + */ + public async getMusicGenres (startIndex?: number, limit?: number, searchTerm?: string, parentId?: string, fields?: Array, excludeItemTypes?: Array, includeItemTypes?: Array, isFavorite?: boolean, imageTypeLimit?: number, enableImageTypes?: Array, userId?: string, nameStartsWithOrGreater?: string, nameStartsWith?: string, nameLessThan?: string, sortBy?: Array, sortOrder?: Array, enableImages?: boolean, enableTotalRecordCount?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }> { + const localVarPath = this.basePath + '/MusicGenres'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + if (startIndex !== undefined) { + localVarQueryParameters['startIndex'] = ObjectSerializer.serialize(startIndex, "number"); + } + + if (limit !== undefined) { + localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); + } + + if (searchTerm !== undefined) { + localVarQueryParameters['searchTerm'] = ObjectSerializer.serialize(searchTerm, "string"); + } + + if (parentId !== undefined) { + localVarQueryParameters['parentId'] = ObjectSerializer.serialize(parentId, "string"); + } + + if (fields !== undefined) { + localVarQueryParameters['fields'] = ObjectSerializer.serialize(fields, "Array"); + } + + if (excludeItemTypes !== undefined) { + localVarQueryParameters['excludeItemTypes'] = ObjectSerializer.serialize(excludeItemTypes, "Array"); + } + + if (includeItemTypes !== undefined) { + localVarQueryParameters['includeItemTypes'] = ObjectSerializer.serialize(includeItemTypes, "Array"); + } + + if (isFavorite !== undefined) { + localVarQueryParameters['isFavorite'] = ObjectSerializer.serialize(isFavorite, "boolean"); + } + + if (imageTypeLimit !== undefined) { + localVarQueryParameters['imageTypeLimit'] = ObjectSerializer.serialize(imageTypeLimit, "number"); + } + + if (enableImageTypes !== undefined) { + localVarQueryParameters['enableImageTypes'] = ObjectSerializer.serialize(enableImageTypes, "Array"); + } + + if (userId !== undefined) { + localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string"); + } + + if (nameStartsWithOrGreater !== undefined) { + localVarQueryParameters['nameStartsWithOrGreater'] = ObjectSerializer.serialize(nameStartsWithOrGreater, "string"); + } + + if (nameStartsWith !== undefined) { + localVarQueryParameters['nameStartsWith'] = ObjectSerializer.serialize(nameStartsWith, "string"); + } + + if (nameLessThan !== undefined) { + localVarQueryParameters['nameLessThan'] = ObjectSerializer.serialize(nameLessThan, "string"); + } + + if (sortBy !== undefined) { + localVarQueryParameters['sortBy'] = ObjectSerializer.serialize(sortBy, "Array"); + } + + if (sortOrder !== undefined) { + localVarQueryParameters['sortOrder'] = ObjectSerializer.serialize(sortOrder, "Array"); + } + + if (enableImages !== undefined) { + localVarQueryParameters['enableImages'] = ObjectSerializer.serialize(enableImages, "boolean"); + } + + if (enableTotalRecordCount !== undefined) { + localVarQueryParameters['enableTotalRecordCount'] = ObjectSerializer.serialize(enableTotalRecordCount, "boolean"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "BaseItemDtoQueryResult"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} diff --git a/jellyfin/api/notificationsApi.ts b/jellyfin/api/notificationsApi.ts new file mode 100644 index 0000000..272ce38 --- /dev/null +++ b/jellyfin/api/notificationsApi.ts @@ -0,0 +1,562 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import localVarRequest from 'request'; +import http from 'http'; + +/* tslint:disable:no-unused-locals */ +import { CreateAdminNotificationRequest } from '../model/createAdminNotificationRequest'; +import { NameIdPair } from '../model/nameIdPair'; +import { NotificationResultDto } from '../model/notificationResultDto'; +import { NotificationTypeInfo } from '../model/notificationTypeInfo'; +import { NotificationsSummaryDto } from '../model/notificationsSummaryDto'; + +import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; +import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; + +import { HttpError, RequestFile } from './apis'; + +let defaultBasePath = 'http://localhost'; + +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== + +export enum NotificationsApiApiKeys { + CustomAuthentication, +} + +export class NotificationsApi { + protected _basePath = defaultBasePath; + protected _defaultHeaders : any = {}; + protected _useQuerystring : boolean = false; + + protected authentications = { + 'default': new VoidAuth(), + 'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'), + } + + protected interceptors: Interceptor[] = []; + + constructor(basePath?: string); + constructor(basePathOrUsername: string, password?: string, basePath?: string) { + if (password) { + if (basePath) { + this.basePath = basePath; + } + } else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername + } + } + } + + set useQuerystring(value: boolean) { + this._useQuerystring = value; + } + + set basePath(basePath: string) { + this._basePath = basePath; + } + + set defaultHeaders(defaultHeaders: any) { + this._defaultHeaders = defaultHeaders; + } + + get defaultHeaders() { + return this._defaultHeaders; + } + + get basePath() { + return this._basePath; + } + + public setDefaultAuthentication(auth: Authentication) { + this.authentications.default = auth; + } + + public setApiKey(key: NotificationsApiApiKeys, value: string) { + (this.authentications as any)[NotificationsApiApiKeys[key]].apiKey = value; + } + + public addInterceptor(interceptor: Interceptor) { + this.interceptors.push(interceptor); + } + + /** + * + * @summary Sends a notification to all admins. + * @param createAdminNotificationRequest The notification request. + */ + public async createAdminNotification (createAdminNotificationRequest: CreateAdminNotificationRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Notifications/Admin'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + // verify required parameter 'createAdminNotificationRequest' is not null or undefined + if (createAdminNotificationRequest === null || createAdminNotificationRequest === undefined) { + throw new Error('Required parameter createAdminNotificationRequest was null or undefined when calling createAdminNotification.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: ObjectSerializer.serialize(createAdminNotificationRequest, "CreateAdminNotificationRequest") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets notification services. + */ + public async getNotificationServices (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array; }> { + const localVarPath = this.basePath + '/Notifications/Services'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Array; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Array"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets notification types. + */ + public async getNotificationTypes (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array; }> { + const localVarPath = this.basePath + '/Notifications/Types'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Array; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Array"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets a user\'s notifications. + * @param userId + */ + public async getNotifications (userId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: NotificationResultDto; }> { + const localVarPath = this.basePath + '/Notifications/{userId}' + .replace('{' + 'userId' + '}', encodeURIComponent(String(userId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'userId' is not null or undefined + if (userId === null || userId === undefined) { + throw new Error('Required parameter userId was null or undefined when calling getNotifications.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: NotificationResultDto; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "NotificationResultDto"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets a user\'s notification summary. + * @param userId + */ + public async getNotificationsSummary (userId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: NotificationsSummaryDto; }> { + const localVarPath = this.basePath + '/Notifications/{userId}/Summary' + .replace('{' + 'userId' + '}', encodeURIComponent(String(userId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'userId' is not null or undefined + if (userId === null || userId === undefined) { + throw new Error('Required parameter userId was null or undefined when calling getNotificationsSummary.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: NotificationsSummaryDto; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "NotificationsSummaryDto"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Sets notifications as read. + * @param userId + */ + public async setRead (userId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Notifications/{userId}/Read' + .replace('{' + 'userId' + '}', encodeURIComponent(String(userId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + // verify required parameter 'userId' is not null or undefined + if (userId === null || userId === undefined) { + throw new Error('Required parameter userId was null or undefined when calling setRead.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Sets notifications as unread. + * @param userId + */ + public async setUnread (userId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Notifications/{userId}/Unread' + .replace('{' + 'userId' + '}', encodeURIComponent(String(userId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + // verify required parameter 'userId' is not null or undefined + if (userId === null || userId === undefined) { + throw new Error('Required parameter userId was null or undefined when calling setUnread.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} diff --git a/jellyfin/api/packageApi.ts b/jellyfin/api/packageApi.ts new file mode 100644 index 0000000..28a40aa --- /dev/null +++ b/jellyfin/api/packageApi.ts @@ -0,0 +1,515 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import localVarRequest from 'request'; +import http from 'http'; + +/* tslint:disable:no-unused-locals */ +import { PackageInfo } from '../model/packageInfo'; +import { ProblemDetails } from '../model/problemDetails'; +import { RepositoryInfo } from '../model/repositoryInfo'; + +import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; +import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; + +import { HttpError, RequestFile } from './apis'; + +let defaultBasePath = 'http://localhost'; + +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== + +export enum PackageApiApiKeys { + CustomAuthentication, +} + +export class PackageApi { + protected _basePath = defaultBasePath; + protected _defaultHeaders : any = {}; + protected _useQuerystring : boolean = false; + + protected authentications = { + 'default': new VoidAuth(), + 'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'), + } + + protected interceptors: Interceptor[] = []; + + constructor(basePath?: string); + constructor(basePathOrUsername: string, password?: string, basePath?: string) { + if (password) { + if (basePath) { + this.basePath = basePath; + } + } else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername + } + } + } + + set useQuerystring(value: boolean) { + this._useQuerystring = value; + } + + set basePath(basePath: string) { + this._basePath = basePath; + } + + set defaultHeaders(defaultHeaders: any) { + this._defaultHeaders = defaultHeaders; + } + + get defaultHeaders() { + return this._defaultHeaders; + } + + get basePath() { + return this._basePath; + } + + public setDefaultAuthentication(auth: Authentication) { + this.authentications.default = auth; + } + + public setApiKey(key: PackageApiApiKeys, value: string) { + (this.authentications as any)[PackageApiApiKeys[key]].apiKey = value; + } + + public addInterceptor(interceptor: Interceptor) { + this.interceptors.push(interceptor); + } + + /** + * + * @summary Cancels a package installation. + * @param packageId Installation Id. + */ + public async cancelPackageInstallation (packageId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Packages/Installing/{packageId}' + .replace('{' + 'packageId' + '}', encodeURIComponent(String(packageId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + // verify required parameter 'packageId' is not null or undefined + if (packageId === null || packageId === undefined) { + throw new Error('Required parameter packageId was null or undefined when calling cancelPackageInstallation.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets a package by name or assembly GUID. + * @param name The name of the package. + * @param assemblyGuid The GUID of the associated assembly. + */ + public async getPackageInfo (name: string, assemblyGuid?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: PackageInfo; }> { + const localVarPath = this.basePath + '/Packages/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling getPackageInfo.'); + } + + if (assemblyGuid !== undefined) { + localVarQueryParameters['assemblyGuid'] = ObjectSerializer.serialize(assemblyGuid, "string"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: PackageInfo; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "PackageInfo"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets available packages. + */ + public async getPackages (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array; }> { + const localVarPath = this.basePath + '/Packages'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Array; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Array"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets all package repositories. + */ + public async getRepositories (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array; }> { + const localVarPath = this.basePath + '/Repositories'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Array; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Array"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Installs a package. + * @param name Package name. + * @param assemblyGuid GUID of the associated assembly. + * @param version Optional version. Defaults to latest version. + * @param repositoryUrl Optional. Specify the repository to install from. + */ + public async installPackage (name: string, assemblyGuid?: string, version?: string, repositoryUrl?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Packages/Installed/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling installPackage.'); + } + + if (assemblyGuid !== undefined) { + localVarQueryParameters['assemblyGuid'] = ObjectSerializer.serialize(assemblyGuid, "string"); + } + + if (version !== undefined) { + localVarQueryParameters['version'] = ObjectSerializer.serialize(version, "string"); + } + + if (repositoryUrl !== undefined) { + localVarQueryParameters['repositoryUrl'] = ObjectSerializer.serialize(repositoryUrl, "string"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Sets the enabled and existing package repositories. + * @param repositoryInfo The list of package repositories. + */ + public async setRepositories (repositoryInfo: Array, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Repositories'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + // verify required parameter 'repositoryInfo' is not null or undefined + if (repositoryInfo === null || repositoryInfo === undefined) { + throw new Error('Required parameter repositoryInfo was null or undefined when calling setRepositories.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: ObjectSerializer.serialize(repositoryInfo, "Array") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} diff --git a/jellyfin/api/personsApi.ts b/jellyfin/api/personsApi.ts new file mode 100644 index 0000000..49b0839 --- /dev/null +++ b/jellyfin/api/personsApi.ts @@ -0,0 +1,304 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import localVarRequest from 'request'; +import http from 'http'; + +/* tslint:disable:no-unused-locals */ +import { BaseItemDto } from '../model/baseItemDto'; +import { BaseItemDtoQueryResult } from '../model/baseItemDtoQueryResult'; +import { ImageType } from '../model/imageType'; +import { ItemFields } from '../model/itemFields'; +import { ItemFilter } from '../model/itemFilter'; +import { ProblemDetails } from '../model/problemDetails'; + +import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; +import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; + +import { HttpError, RequestFile } from './apis'; + +let defaultBasePath = 'http://localhost'; + +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== + +export enum PersonsApiApiKeys { + CustomAuthentication, +} + +export class PersonsApi { + protected _basePath = defaultBasePath; + protected _defaultHeaders : any = {}; + protected _useQuerystring : boolean = false; + + protected authentications = { + 'default': new VoidAuth(), + 'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'), + } + + protected interceptors: Interceptor[] = []; + + constructor(basePath?: string); + constructor(basePathOrUsername: string, password?: string, basePath?: string) { + if (password) { + if (basePath) { + this.basePath = basePath; + } + } else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername + } + } + } + + set useQuerystring(value: boolean) { + this._useQuerystring = value; + } + + set basePath(basePath: string) { + this._basePath = basePath; + } + + set defaultHeaders(defaultHeaders: any) { + this._defaultHeaders = defaultHeaders; + } + + get defaultHeaders() { + return this._defaultHeaders; + } + + get basePath() { + return this._basePath; + } + + public setDefaultAuthentication(auth: Authentication) { + this.authentications.default = auth; + } + + public setApiKey(key: PersonsApiApiKeys, value: string) { + (this.authentications as any)[PersonsApiApiKeys[key]].apiKey = value; + } + + public addInterceptor(interceptor: Interceptor) { + this.interceptors.push(interceptor); + } + + /** + * + * @summary Get person by name. + * @param name Person name. + * @param userId Optional. Filter by user id, and attach user data. + */ + public async getPerson (name: string, userId?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDto; }> { + const localVarPath = this.basePath + '/Persons/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling getPerson.'); + } + + if (userId !== undefined) { + localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: BaseItemDto; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "BaseItemDto"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets all persons. + * @param limit Optional. The maximum number of records to return. + * @param searchTerm The search term. + * @param fields Optional. Specify additional fields of information to return in the output. + * @param filters Optional. Specify additional filters to apply. + * @param isFavorite Optional filter by items that are marked as favorite, or not. userId is required. + * @param enableUserData Optional, include user data. + * @param imageTypeLimit Optional, the max number of images to return, per image type. + * @param enableImageTypes Optional. The image types to include in the output. + * @param excludePersonTypes Optional. If specified results will be filtered to exclude those containing the specified PersonType. Allows multiple, comma-delimited. + * @param personTypes Optional. If specified results will be filtered to include only those containing the specified PersonType. Allows multiple, comma-delimited. + * @param appearsInItemId Optional. If specified, person results will be filtered on items related to said persons. + * @param userId User id. + * @param enableImages Optional, include image information in output. + */ + public async getPersons (limit?: number, searchTerm?: string, fields?: Array, filters?: Array, isFavorite?: boolean, enableUserData?: boolean, imageTypeLimit?: number, enableImageTypes?: Array, excludePersonTypes?: Array, personTypes?: Array, appearsInItemId?: string, userId?: string, enableImages?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }> { + const localVarPath = this.basePath + '/Persons'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + if (limit !== undefined) { + localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); + } + + if (searchTerm !== undefined) { + localVarQueryParameters['searchTerm'] = ObjectSerializer.serialize(searchTerm, "string"); + } + + if (fields !== undefined) { + localVarQueryParameters['fields'] = ObjectSerializer.serialize(fields, "Array"); + } + + if (filters !== undefined) { + localVarQueryParameters['filters'] = ObjectSerializer.serialize(filters, "Array"); + } + + if (isFavorite !== undefined) { + localVarQueryParameters['isFavorite'] = ObjectSerializer.serialize(isFavorite, "boolean"); + } + + if (enableUserData !== undefined) { + localVarQueryParameters['enableUserData'] = ObjectSerializer.serialize(enableUserData, "boolean"); + } + + if (imageTypeLimit !== undefined) { + localVarQueryParameters['imageTypeLimit'] = ObjectSerializer.serialize(imageTypeLimit, "number"); + } + + if (enableImageTypes !== undefined) { + localVarQueryParameters['enableImageTypes'] = ObjectSerializer.serialize(enableImageTypes, "Array"); + } + + if (excludePersonTypes !== undefined) { + localVarQueryParameters['excludePersonTypes'] = ObjectSerializer.serialize(excludePersonTypes, "Array"); + } + + if (personTypes !== undefined) { + localVarQueryParameters['personTypes'] = ObjectSerializer.serialize(personTypes, "Array"); + } + + if (appearsInItemId !== undefined) { + localVarQueryParameters['appearsInItemId'] = ObjectSerializer.serialize(appearsInItemId, "string"); + } + + if (userId !== undefined) { + localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string"); + } + + if (enableImages !== undefined) { + localVarQueryParameters['enableImages'] = ObjectSerializer.serialize(enableImages, "boolean"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "BaseItemDtoQueryResult"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} diff --git a/jellyfin/api/playlistsApi.ts b/jellyfin/api/playlistsApi.ts new file mode 100644 index 0000000..cafde39 --- /dev/null +++ b/jellyfin/api/playlistsApi.ts @@ -0,0 +1,521 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import localVarRequest from 'request'; +import http from 'http'; + +/* tslint:disable:no-unused-locals */ +import { BaseItemDtoQueryResult } from '../model/baseItemDtoQueryResult'; +import { CreatePlaylistRequest } from '../model/createPlaylistRequest'; +import { ImageType } from '../model/imageType'; +import { ItemFields } from '../model/itemFields'; +import { PlaylistCreationResult } from '../model/playlistCreationResult'; + +import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; +import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; + +import { HttpError, RequestFile } from './apis'; + +let defaultBasePath = 'http://localhost'; + +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== + +export enum PlaylistsApiApiKeys { + CustomAuthentication, +} + +export class PlaylistsApi { + protected _basePath = defaultBasePath; + protected _defaultHeaders : any = {}; + protected _useQuerystring : boolean = false; + + protected authentications = { + 'default': new VoidAuth(), + 'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'), + } + + protected interceptors: Interceptor[] = []; + + constructor(basePath?: string); + constructor(basePathOrUsername: string, password?: string, basePath?: string) { + if (password) { + if (basePath) { + this.basePath = basePath; + } + } else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername + } + } + } + + set useQuerystring(value: boolean) { + this._useQuerystring = value; + } + + set basePath(basePath: string) { + this._basePath = basePath; + } + + set defaultHeaders(defaultHeaders: any) { + this._defaultHeaders = defaultHeaders; + } + + get defaultHeaders() { + return this._defaultHeaders; + } + + get basePath() { + return this._basePath; + } + + public setDefaultAuthentication(auth: Authentication) { + this.authentications.default = auth; + } + + public setApiKey(key: PlaylistsApiApiKeys, value: string) { + (this.authentications as any)[PlaylistsApiApiKeys[key]].apiKey = value; + } + + public addInterceptor(interceptor: Interceptor) { + this.interceptors.push(interceptor); + } + + /** + * + * @summary Adds items to a playlist. + * @param playlistId The playlist id. + * @param ids Item id, comma delimited. + * @param userId The userId. + */ + public async addToPlaylist (playlistId: string, ids?: Array, userId?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Playlists/{playlistId}/Items' + .replace('{' + 'playlistId' + '}', encodeURIComponent(String(playlistId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + // verify required parameter 'playlistId' is not null or undefined + if (playlistId === null || playlistId === undefined) { + throw new Error('Required parameter playlistId was null or undefined when calling addToPlaylist.'); + } + + if (ids !== undefined) { + localVarQueryParameters['ids'] = ObjectSerializer.serialize(ids, "Array"); + } + + if (userId !== undefined) { + localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * For backwards compatibility parameters can be sent via Query or Body, with Query having higher precedence. Query parameters are obsolete. + * @summary Creates a new playlist. + * @param name The playlist name. + * @param ids The item ids. + * @param userId The user id. + * @param mediaType The media type. + * @param createPlaylistRequest The create playlist payload. + */ + public async createPlaylist (name?: string, ids?: Array, userId?: string, mediaType?: string, createPlaylistRequest?: CreatePlaylistRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: PlaylistCreationResult; }> { + const localVarPath = this.basePath + '/Playlists'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + if (name !== undefined) { + localVarQueryParameters['name'] = ObjectSerializer.serialize(name, "string"); + } + + if (ids !== undefined) { + localVarQueryParameters['ids'] = ObjectSerializer.serialize(ids, "Array"); + } + + if (userId !== undefined) { + localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string"); + } + + if (mediaType !== undefined) { + localVarQueryParameters['mediaType'] = ObjectSerializer.serialize(mediaType, "string"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: ObjectSerializer.serialize(createPlaylistRequest, "CreatePlaylistRequest") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: PlaylistCreationResult; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "PlaylistCreationResult"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets the original items of a playlist. + * @param playlistId The playlist id. + * @param userId User id. + * @param startIndex Optional. The record index to start at. All items with a lower index will be dropped from the results. + * @param limit Optional. The maximum number of records to return. + * @param fields Optional. Specify additional fields of information to return in the output. + * @param enableImages Optional. Include image information in output. + * @param enableUserData Optional. Include user data. + * @param imageTypeLimit Optional. The max number of images to return, per image type. + * @param enableImageTypes Optional. The image types to include in the output. + */ + public async getPlaylistItems (playlistId: string, userId: string, startIndex?: number, limit?: number, fields?: Array, enableImages?: boolean, enableUserData?: boolean, imageTypeLimit?: number, enableImageTypes?: Array, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }> { + const localVarPath = this.basePath + '/Playlists/{playlistId}/Items' + .replace('{' + 'playlistId' + '}', encodeURIComponent(String(playlistId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'playlistId' is not null or undefined + if (playlistId === null || playlistId === undefined) { + throw new Error('Required parameter playlistId was null or undefined when calling getPlaylistItems.'); + } + + // verify required parameter 'userId' is not null or undefined + if (userId === null || userId === undefined) { + throw new Error('Required parameter userId was null or undefined when calling getPlaylistItems.'); + } + + if (userId !== undefined) { + localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string"); + } + + if (startIndex !== undefined) { + localVarQueryParameters['startIndex'] = ObjectSerializer.serialize(startIndex, "number"); + } + + if (limit !== undefined) { + localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); + } + + if (fields !== undefined) { + localVarQueryParameters['fields'] = ObjectSerializer.serialize(fields, "Array"); + } + + if (enableImages !== undefined) { + localVarQueryParameters['enableImages'] = ObjectSerializer.serialize(enableImages, "boolean"); + } + + if (enableUserData !== undefined) { + localVarQueryParameters['enableUserData'] = ObjectSerializer.serialize(enableUserData, "boolean"); + } + + if (imageTypeLimit !== undefined) { + localVarQueryParameters['imageTypeLimit'] = ObjectSerializer.serialize(imageTypeLimit, "number"); + } + + if (enableImageTypes !== undefined) { + localVarQueryParameters['enableImageTypes'] = ObjectSerializer.serialize(enableImageTypes, "Array"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "BaseItemDtoQueryResult"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Moves a playlist item. + * @param playlistId The playlist id. + * @param itemId The item id. + * @param newIndex The new index. + */ + public async moveItem (playlistId: string, itemId: string, newIndex: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Playlists/{playlistId}/Items/{itemId}/Move/{newIndex}' + .replace('{' + 'playlistId' + '}', encodeURIComponent(String(playlistId))) + .replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId))) + .replace('{' + 'newIndex' + '}', encodeURIComponent(String(newIndex))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + // verify required parameter 'playlistId' is not null or undefined + if (playlistId === null || playlistId === undefined) { + throw new Error('Required parameter playlistId was null or undefined when calling moveItem.'); + } + + // verify required parameter 'itemId' is not null or undefined + if (itemId === null || itemId === undefined) { + throw new Error('Required parameter itemId was null or undefined when calling moveItem.'); + } + + // verify required parameter 'newIndex' is not null or undefined + if (newIndex === null || newIndex === undefined) { + throw new Error('Required parameter newIndex was null or undefined when calling moveItem.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Removes items from a playlist. + * @param playlistId The playlist id. + * @param entryIds The item ids, comma delimited. + */ + public async removeFromPlaylist (playlistId: string, entryIds?: Array, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Playlists/{playlistId}/Items' + .replace('{' + 'playlistId' + '}', encodeURIComponent(String(playlistId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + // verify required parameter 'playlistId' is not null or undefined + if (playlistId === null || playlistId === undefined) { + throw new Error('Required parameter playlistId was null or undefined when calling removeFromPlaylist.'); + } + + if (entryIds !== undefined) { + localVarQueryParameters['entryIds'] = ObjectSerializer.serialize(entryIds, "Array"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} diff --git a/jellyfin/api/playstateApi.ts b/jellyfin/api/playstateApi.ts new file mode 100644 index 0000000..a3db4c3 --- /dev/null +++ b/jellyfin/api/playstateApi.ts @@ -0,0 +1,832 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import localVarRequest from 'request'; +import http from 'http'; + +/* tslint:disable:no-unused-locals */ +import { PlayMethod } from '../model/playMethod'; +import { RepeatMode } from '../model/repeatMode'; +import { ReportPlaybackProgressRequest } from '../model/reportPlaybackProgressRequest'; +import { ReportPlaybackStartRequest } from '../model/reportPlaybackStartRequest'; +import { ReportPlaybackStoppedRequest } from '../model/reportPlaybackStoppedRequest'; +import { UserItemDataDto } from '../model/userItemDataDto'; + +import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; +import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; + +import { HttpError, RequestFile } from './apis'; + +let defaultBasePath = 'http://localhost'; + +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== + +export enum PlaystateApiApiKeys { + CustomAuthentication, +} + +export class PlaystateApi { + protected _basePath = defaultBasePath; + protected _defaultHeaders : any = {}; + protected _useQuerystring : boolean = false; + + protected authentications = { + 'default': new VoidAuth(), + 'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'), + } + + protected interceptors: Interceptor[] = []; + + constructor(basePath?: string); + constructor(basePathOrUsername: string, password?: string, basePath?: string) { + if (password) { + if (basePath) { + this.basePath = basePath; + } + } else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername + } + } + } + + set useQuerystring(value: boolean) { + this._useQuerystring = value; + } + + set basePath(basePath: string) { + this._basePath = basePath; + } + + set defaultHeaders(defaultHeaders: any) { + this._defaultHeaders = defaultHeaders; + } + + get defaultHeaders() { + return this._defaultHeaders; + } + + get basePath() { + return this._basePath; + } + + public setDefaultAuthentication(auth: Authentication) { + this.authentications.default = auth; + } + + public setApiKey(key: PlaystateApiApiKeys, value: string) { + (this.authentications as any)[PlaystateApiApiKeys[key]].apiKey = value; + } + + public addInterceptor(interceptor: Interceptor) { + this.interceptors.push(interceptor); + } + + /** + * + * @summary Marks an item as played for user. + * @param userId User id. + * @param itemId Item id. + * @param datePlayed Optional. The date the item was played. + */ + public async markPlayedItem (userId: string, itemId: string, datePlayed?: Date, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: UserItemDataDto; }> { + const localVarPath = this.basePath + '/Users/{userId}/PlayedItems/{itemId}' + .replace('{' + 'userId' + '}', encodeURIComponent(String(userId))) + .replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'userId' is not null or undefined + if (userId === null || userId === undefined) { + throw new Error('Required parameter userId was null or undefined when calling markPlayedItem.'); + } + + // verify required parameter 'itemId' is not null or undefined + if (itemId === null || itemId === undefined) { + throw new Error('Required parameter itemId was null or undefined when calling markPlayedItem.'); + } + + if (datePlayed !== undefined) { + localVarQueryParameters['datePlayed'] = ObjectSerializer.serialize(datePlayed, "Date"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: UserItemDataDto; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "UserItemDataDto"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Marks an item as unplayed for user. + * @param userId User id. + * @param itemId Item id. + */ + public async markUnplayedItem (userId: string, itemId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: UserItemDataDto; }> { + const localVarPath = this.basePath + '/Users/{userId}/PlayedItems/{itemId}' + .replace('{' + 'userId' + '}', encodeURIComponent(String(userId))) + .replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'userId' is not null or undefined + if (userId === null || userId === undefined) { + throw new Error('Required parameter userId was null or undefined when calling markUnplayedItem.'); + } + + // verify required parameter 'itemId' is not null or undefined + if (itemId === null || itemId === undefined) { + throw new Error('Required parameter itemId was null or undefined when calling markUnplayedItem.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: UserItemDataDto; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "UserItemDataDto"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Reports a user\'s playback progress. + * @param userId User id. + * @param itemId Item id. + * @param mediaSourceId The id of the MediaSource. + * @param positionTicks Optional. The current position, in ticks. 1 tick = 10000 ms. + * @param audioStreamIndex The audio stream index. + * @param subtitleStreamIndex The subtitle stream index. + * @param volumeLevel Scale of 0-100. + * @param playMethod The play method. + * @param liveStreamId The live stream id. + * @param playSessionId The play session id. + * @param repeatMode The repeat mode. + * @param isPaused Indicates if the player is paused. + * @param isMuted Indicates if the player is muted. + */ + public async onPlaybackProgress (userId: string, itemId: string, mediaSourceId?: string, positionTicks?: number, audioStreamIndex?: number, subtitleStreamIndex?: number, volumeLevel?: number, playMethod?: PlayMethod, liveStreamId?: string, playSessionId?: string, repeatMode?: RepeatMode, isPaused?: boolean, isMuted?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Users/{userId}/PlayingItems/{itemId}/Progress' + .replace('{' + 'userId' + '}', encodeURIComponent(String(userId))) + .replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + // verify required parameter 'userId' is not null or undefined + if (userId === null || userId === undefined) { + throw new Error('Required parameter userId was null or undefined when calling onPlaybackProgress.'); + } + + // verify required parameter 'itemId' is not null or undefined + if (itemId === null || itemId === undefined) { + throw new Error('Required parameter itemId was null or undefined when calling onPlaybackProgress.'); + } + + if (mediaSourceId !== undefined) { + localVarQueryParameters['mediaSourceId'] = ObjectSerializer.serialize(mediaSourceId, "string"); + } + + if (positionTicks !== undefined) { + localVarQueryParameters['positionTicks'] = ObjectSerializer.serialize(positionTicks, "number"); + } + + if (audioStreamIndex !== undefined) { + localVarQueryParameters['audioStreamIndex'] = ObjectSerializer.serialize(audioStreamIndex, "number"); + } + + if (subtitleStreamIndex !== undefined) { + localVarQueryParameters['subtitleStreamIndex'] = ObjectSerializer.serialize(subtitleStreamIndex, "number"); + } + + if (volumeLevel !== undefined) { + localVarQueryParameters['volumeLevel'] = ObjectSerializer.serialize(volumeLevel, "number"); + } + + if (playMethod !== undefined) { + localVarQueryParameters['playMethod'] = ObjectSerializer.serialize(playMethod, "PlayMethod"); + } + + if (liveStreamId !== undefined) { + localVarQueryParameters['liveStreamId'] = ObjectSerializer.serialize(liveStreamId, "string"); + } + + if (playSessionId !== undefined) { + localVarQueryParameters['playSessionId'] = ObjectSerializer.serialize(playSessionId, "string"); + } + + if (repeatMode !== undefined) { + localVarQueryParameters['repeatMode'] = ObjectSerializer.serialize(repeatMode, "RepeatMode"); + } + + if (isPaused !== undefined) { + localVarQueryParameters['isPaused'] = ObjectSerializer.serialize(isPaused, "boolean"); + } + + if (isMuted !== undefined) { + localVarQueryParameters['isMuted'] = ObjectSerializer.serialize(isMuted, "boolean"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Reports that a user has begun playing an item. + * @param userId User id. + * @param itemId Item id. + * @param mediaSourceId The id of the MediaSource. + * @param audioStreamIndex The audio stream index. + * @param subtitleStreamIndex The subtitle stream index. + * @param playMethod The play method. + * @param liveStreamId The live stream id. + * @param playSessionId The play session id. + * @param canSeek Indicates if the client can seek. + */ + public async onPlaybackStart (userId: string, itemId: string, mediaSourceId?: string, audioStreamIndex?: number, subtitleStreamIndex?: number, playMethod?: PlayMethod, liveStreamId?: string, playSessionId?: string, canSeek?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Users/{userId}/PlayingItems/{itemId}' + .replace('{' + 'userId' + '}', encodeURIComponent(String(userId))) + .replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + // verify required parameter 'userId' is not null or undefined + if (userId === null || userId === undefined) { + throw new Error('Required parameter userId was null or undefined when calling onPlaybackStart.'); + } + + // verify required parameter 'itemId' is not null or undefined + if (itemId === null || itemId === undefined) { + throw new Error('Required parameter itemId was null or undefined when calling onPlaybackStart.'); + } + + if (mediaSourceId !== undefined) { + localVarQueryParameters['mediaSourceId'] = ObjectSerializer.serialize(mediaSourceId, "string"); + } + + if (audioStreamIndex !== undefined) { + localVarQueryParameters['audioStreamIndex'] = ObjectSerializer.serialize(audioStreamIndex, "number"); + } + + if (subtitleStreamIndex !== undefined) { + localVarQueryParameters['subtitleStreamIndex'] = ObjectSerializer.serialize(subtitleStreamIndex, "number"); + } + + if (playMethod !== undefined) { + localVarQueryParameters['playMethod'] = ObjectSerializer.serialize(playMethod, "PlayMethod"); + } + + if (liveStreamId !== undefined) { + localVarQueryParameters['liveStreamId'] = ObjectSerializer.serialize(liveStreamId, "string"); + } + + if (playSessionId !== undefined) { + localVarQueryParameters['playSessionId'] = ObjectSerializer.serialize(playSessionId, "string"); + } + + if (canSeek !== undefined) { + localVarQueryParameters['canSeek'] = ObjectSerializer.serialize(canSeek, "boolean"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Reports that a user has stopped playing an item. + * @param userId User id. + * @param itemId Item id. + * @param mediaSourceId The id of the MediaSource. + * @param nextMediaType The next media type that will play. + * @param positionTicks Optional. The position, in ticks, where playback stopped. 1 tick = 10000 ms. + * @param liveStreamId The live stream id. + * @param playSessionId The play session id. + */ + public async onPlaybackStopped (userId: string, itemId: string, mediaSourceId?: string, nextMediaType?: string, positionTicks?: number, liveStreamId?: string, playSessionId?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Users/{userId}/PlayingItems/{itemId}' + .replace('{' + 'userId' + '}', encodeURIComponent(String(userId))) + .replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + // verify required parameter 'userId' is not null or undefined + if (userId === null || userId === undefined) { + throw new Error('Required parameter userId was null or undefined when calling onPlaybackStopped.'); + } + + // verify required parameter 'itemId' is not null or undefined + if (itemId === null || itemId === undefined) { + throw new Error('Required parameter itemId was null or undefined when calling onPlaybackStopped.'); + } + + if (mediaSourceId !== undefined) { + localVarQueryParameters['mediaSourceId'] = ObjectSerializer.serialize(mediaSourceId, "string"); + } + + if (nextMediaType !== undefined) { + localVarQueryParameters['nextMediaType'] = ObjectSerializer.serialize(nextMediaType, "string"); + } + + if (positionTicks !== undefined) { + localVarQueryParameters['positionTicks'] = ObjectSerializer.serialize(positionTicks, "number"); + } + + if (liveStreamId !== undefined) { + localVarQueryParameters['liveStreamId'] = ObjectSerializer.serialize(liveStreamId, "string"); + } + + if (playSessionId !== undefined) { + localVarQueryParameters['playSessionId'] = ObjectSerializer.serialize(playSessionId, "string"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Pings a playback session. + * @param playSessionId Playback session id. + */ + public async pingPlaybackSession (playSessionId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Sessions/Playing/Ping'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + // verify required parameter 'playSessionId' is not null or undefined + if (playSessionId === null || playSessionId === undefined) { + throw new Error('Required parameter playSessionId was null or undefined when calling pingPlaybackSession.'); + } + + if (playSessionId !== undefined) { + localVarQueryParameters['playSessionId'] = ObjectSerializer.serialize(playSessionId, "string"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Reports playback progress within a session. + * @param reportPlaybackProgressRequest The playback progress info. + */ + public async reportPlaybackProgress (reportPlaybackProgressRequest?: ReportPlaybackProgressRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Sessions/Playing/Progress'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: ObjectSerializer.serialize(reportPlaybackProgressRequest, "ReportPlaybackProgressRequest") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Reports playback has started within a session. + * @param reportPlaybackStartRequest The playback start info. + */ + public async reportPlaybackStart (reportPlaybackStartRequest?: ReportPlaybackStartRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Sessions/Playing'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: ObjectSerializer.serialize(reportPlaybackStartRequest, "ReportPlaybackStartRequest") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Reports playback has stopped within a session. + * @param reportPlaybackStoppedRequest The playback stop info. + */ + public async reportPlaybackStopped (reportPlaybackStoppedRequest?: ReportPlaybackStoppedRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Sessions/Playing/Stopped'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: ObjectSerializer.serialize(reportPlaybackStoppedRequest, "ReportPlaybackStoppedRequest") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} diff --git a/jellyfin/api/pluginsApi.ts b/jellyfin/api/pluginsApi.ts new file mode 100644 index 0000000..e065e80 --- /dev/null +++ b/jellyfin/api/pluginsApi.ts @@ -0,0 +1,756 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import localVarRequest from 'request'; +import http from 'http'; + +/* tslint:disable:no-unused-locals */ +import { PluginInfo } from '../model/pluginInfo'; +import { ProblemDetails } from '../model/problemDetails'; + +import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; +import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; + +import { HttpError, RequestFile } from './apis'; + +let defaultBasePath = 'http://localhost'; + +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== + +export enum PluginsApiApiKeys { + CustomAuthentication, +} + +export class PluginsApi { + protected _basePath = defaultBasePath; + protected _defaultHeaders : any = {}; + protected _useQuerystring : boolean = false; + + protected authentications = { + 'default': new VoidAuth(), + 'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'), + } + + protected interceptors: Interceptor[] = []; + + constructor(basePath?: string); + constructor(basePathOrUsername: string, password?: string, basePath?: string) { + if (password) { + if (basePath) { + this.basePath = basePath; + } + } else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername + } + } + } + + set useQuerystring(value: boolean) { + this._useQuerystring = value; + } + + set basePath(basePath: string) { + this._basePath = basePath; + } + + set defaultHeaders(defaultHeaders: any) { + this._defaultHeaders = defaultHeaders; + } + + get defaultHeaders() { + return this._defaultHeaders; + } + + get basePath() { + return this._basePath; + } + + public setDefaultAuthentication(auth: Authentication) { + this.authentications.default = auth; + } + + public setApiKey(key: PluginsApiApiKeys, value: string) { + (this.authentications as any)[PluginsApiApiKeys[key]].apiKey = value; + } + + public addInterceptor(interceptor: Interceptor) { + this.interceptors.push(interceptor); + } + + /** + * + * @summary Disable a plugin. + * @param pluginId Plugin id. + * @param version Plugin version. + */ + public async disablePlugin (pluginId: string, version: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Plugins/{pluginId}/{version}/Disable' + .replace('{' + 'pluginId' + '}', encodeURIComponent(String(pluginId))) + .replace('{' + 'version' + '}', encodeURIComponent(String(version))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'pluginId' is not null or undefined + if (pluginId === null || pluginId === undefined) { + throw new Error('Required parameter pluginId was null or undefined when calling disablePlugin.'); + } + + // verify required parameter 'version' is not null or undefined + if (version === null || version === undefined) { + throw new Error('Required parameter version was null or undefined when calling disablePlugin.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Enables a disabled plugin. + * @param pluginId Plugin id. + * @param version Plugin version. + */ + public async enablePlugin (pluginId: string, version: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Plugins/{pluginId}/{version}/Enable' + .replace('{' + 'pluginId' + '}', encodeURIComponent(String(pluginId))) + .replace('{' + 'version' + '}', encodeURIComponent(String(version))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'pluginId' is not null or undefined + if (pluginId === null || pluginId === undefined) { + throw new Error('Required parameter pluginId was null or undefined when calling enablePlugin.'); + } + + // verify required parameter 'version' is not null or undefined + if (version === null || version === undefined) { + throw new Error('Required parameter version was null or undefined when calling enablePlugin.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets plugin configuration. + * @param pluginId Plugin id. + */ + public async getPluginConfiguration (pluginId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: object; }> { + const localVarPath = this.basePath + '/Plugins/{pluginId}/Configuration' + .replace('{' + 'pluginId' + '}', encodeURIComponent(String(pluginId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'pluginId' is not null or undefined + if (pluginId === null || pluginId === undefined) { + throw new Error('Required parameter pluginId was null or undefined when calling getPluginConfiguration.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: object; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "object"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets a plugin\'s image. + * @param pluginId Plugin id. + * @param version Plugin version. + */ + public async getPluginImage (pluginId: string, version: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/Plugins/{pluginId}/{version}/Image' + .replace('{' + 'pluginId' + '}', encodeURIComponent(String(pluginId))) + .replace('{' + 'version' + '}', encodeURIComponent(String(version))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['image/*', 'application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'pluginId' is not null or undefined + if (pluginId === null || pluginId === undefined) { + throw new Error('Required parameter pluginId was null or undefined when calling getPluginImage.'); + } + + // verify required parameter 'version' is not null or undefined + if (version === null || version === undefined) { + throw new Error('Required parameter version was null or undefined when calling getPluginImage.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets a plugin\'s manifest. + * @param pluginId Plugin id. + */ + public async getPluginManifest (pluginId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Plugins/{pluginId}/Manifest' + .replace('{' + 'pluginId' + '}', encodeURIComponent(String(pluginId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'pluginId' is not null or undefined + if (pluginId === null || pluginId === undefined) { + throw new Error('Required parameter pluginId was null or undefined when calling getPluginManifest.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets a list of currently installed plugins. + */ + public async getPlugins (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array; }> { + const localVarPath = this.basePath + '/Plugins'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Array; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Array"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Uninstalls a plugin. + * @param pluginId Plugin id. + */ + public async uninstallPlugin (pluginId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Plugins/{pluginId}' + .replace('{' + 'pluginId' + '}', encodeURIComponent(String(pluginId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'pluginId' is not null or undefined + if (pluginId === null || pluginId === undefined) { + throw new Error('Required parameter pluginId was null or undefined when calling uninstallPlugin.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Uninstalls a plugin by version. + * @param pluginId Plugin id. + * @param version Plugin version. + */ + public async uninstallPluginByVersion (pluginId: string, version: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Plugins/{pluginId}/{version}' + .replace('{' + 'pluginId' + '}', encodeURIComponent(String(pluginId))) + .replace('{' + 'version' + '}', encodeURIComponent(String(version))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'pluginId' is not null or undefined + if (pluginId === null || pluginId === undefined) { + throw new Error('Required parameter pluginId was null or undefined when calling uninstallPluginByVersion.'); + } + + // verify required parameter 'version' is not null or undefined + if (version === null || version === undefined) { + throw new Error('Required parameter version was null or undefined when calling uninstallPluginByVersion.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * Accepts plugin configuration as JSON body. + * @summary Updates plugin configuration. + * @param pluginId Plugin id. + */ + public async updatePluginConfiguration (pluginId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Plugins/{pluginId}/Configuration' + .replace('{' + 'pluginId' + '}', encodeURIComponent(String(pluginId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'pluginId' is not null or undefined + if (pluginId === null || pluginId === undefined) { + throw new Error('Required parameter pluginId was null or undefined when calling updatePluginConfiguration.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} diff --git a/jellyfin/api/quickConnectApi.ts b/jellyfin/api/quickConnectApi.ts new file mode 100644 index 0000000..ff08548 --- /dev/null +++ b/jellyfin/api/quickConnectApi.ts @@ -0,0 +1,364 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import localVarRequest from 'request'; +import http from 'http'; + +/* tslint:disable:no-unused-locals */ +import { ProblemDetails } from '../model/problemDetails'; +import { QuickConnectResult } from '../model/quickConnectResult'; + +import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; +import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; + +import { HttpError, RequestFile } from './apis'; + +let defaultBasePath = 'http://localhost'; + +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== + +export enum QuickConnectApiApiKeys { + CustomAuthentication, +} + +export class QuickConnectApi { + protected _basePath = defaultBasePath; + protected _defaultHeaders : any = {}; + protected _useQuerystring : boolean = false; + + protected authentications = { + 'default': new VoidAuth(), + 'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'), + } + + protected interceptors: Interceptor[] = []; + + constructor(basePath?: string); + constructor(basePathOrUsername: string, password?: string, basePath?: string) { + if (password) { + if (basePath) { + this.basePath = basePath; + } + } else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername + } + } + } + + set useQuerystring(value: boolean) { + this._useQuerystring = value; + } + + set basePath(basePath: string) { + this._basePath = basePath; + } + + set defaultHeaders(defaultHeaders: any) { + this._defaultHeaders = defaultHeaders; + } + + get defaultHeaders() { + return this._defaultHeaders; + } + + get basePath() { + return this._basePath; + } + + public setDefaultAuthentication(auth: Authentication) { + this.authentications.default = auth; + } + + public setApiKey(key: QuickConnectApiApiKeys, value: string) { + (this.authentications as any)[QuickConnectApiApiKeys[key]].apiKey = value; + } + + public addInterceptor(interceptor: Interceptor) { + this.interceptors.push(interceptor); + } + + /** + * + * @summary Authorizes a pending quick connect request. + * @param code Quick connect code to authorize. + */ + public async authorize (code: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: boolean; }> { + const localVarPath = this.basePath + '/QuickConnect/Authorize'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'code' is not null or undefined + if (code === null || code === undefined) { + throw new Error('Required parameter code was null or undefined when calling authorize.'); + } + + if (code !== undefined) { + localVarQueryParameters['code'] = ObjectSerializer.serialize(code, "string"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: boolean; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "boolean"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Attempts to retrieve authentication information. + * @param secret Secret previously returned from the Initiate endpoint. + */ + public async connect (secret: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: QuickConnectResult; }> { + const localVarPath = this.basePath + '/QuickConnect/Connect'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'secret' is not null or undefined + if (secret === null || secret === undefined) { + throw new Error('Required parameter secret was null or undefined when calling connect.'); + } + + if (secret !== undefined) { + localVarQueryParameters['secret'] = ObjectSerializer.serialize(secret, "string"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: QuickConnectResult; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "QuickConnectResult"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets the current quick connect state. + */ + public async getEnabled (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: boolean; }> { + const localVarPath = this.basePath + '/QuickConnect/Enabled'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: boolean; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "boolean"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Initiate a new quick connect request. + */ + public async initiate (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: QuickConnectResult; }> { + const localVarPath = this.basePath + '/QuickConnect/Initiate'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: QuickConnectResult; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "QuickConnectResult"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} diff --git a/jellyfin/api/remoteImageApi.ts b/jellyfin/api/remoteImageApi.ts new file mode 100644 index 0000000..8399226 --- /dev/null +++ b/jellyfin/api/remoteImageApi.ts @@ -0,0 +1,350 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import localVarRequest from 'request'; +import http from 'http'; + +/* tslint:disable:no-unused-locals */ +import { ImageProviderInfo } from '../model/imageProviderInfo'; +import { ImageType } from '../model/imageType'; +import { ProblemDetails } from '../model/problemDetails'; +import { RemoteImageResult } from '../model/remoteImageResult'; + +import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; +import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; + +import { HttpError, RequestFile } from './apis'; + +let defaultBasePath = 'http://localhost'; + +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== + +export enum RemoteImageApiApiKeys { + CustomAuthentication, +} + +export class RemoteImageApi { + protected _basePath = defaultBasePath; + protected _defaultHeaders : any = {}; + protected _useQuerystring : boolean = false; + + protected authentications = { + 'default': new VoidAuth(), + 'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'), + } + + protected interceptors: Interceptor[] = []; + + constructor(basePath?: string); + constructor(basePathOrUsername: string, password?: string, basePath?: string) { + if (password) { + if (basePath) { + this.basePath = basePath; + } + } else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername + } + } + } + + set useQuerystring(value: boolean) { + this._useQuerystring = value; + } + + set basePath(basePath: string) { + this._basePath = basePath; + } + + set defaultHeaders(defaultHeaders: any) { + this._defaultHeaders = defaultHeaders; + } + + get defaultHeaders() { + return this._defaultHeaders; + } + + get basePath() { + return this._basePath; + } + + public setDefaultAuthentication(auth: Authentication) { + this.authentications.default = auth; + } + + public setApiKey(key: RemoteImageApiApiKeys, value: string) { + (this.authentications as any)[RemoteImageApiApiKeys[key]].apiKey = value; + } + + public addInterceptor(interceptor: Interceptor) { + this.interceptors.push(interceptor); + } + + /** + * + * @summary Downloads a remote image for an item. + * @param itemId Item Id. + * @param type The image type. + * @param imageUrl The image url. + */ + public async downloadRemoteImage (itemId: string, type: ImageType, imageUrl?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Items/{itemId}/RemoteImages/Download' + .replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'itemId' is not null or undefined + if (itemId === null || itemId === undefined) { + throw new Error('Required parameter itemId was null or undefined when calling downloadRemoteImage.'); + } + + // verify required parameter 'type' is not null or undefined + if (type === null || type === undefined) { + throw new Error('Required parameter type was null or undefined when calling downloadRemoteImage.'); + } + + if (type !== undefined) { + localVarQueryParameters['type'] = ObjectSerializer.serialize(type, "ImageType"); + } + + if (imageUrl !== undefined) { + localVarQueryParameters['imageUrl'] = ObjectSerializer.serialize(imageUrl, "string"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets available remote image providers for an item. + * @param itemId Item Id. + */ + public async getRemoteImageProviders (itemId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array; }> { + const localVarPath = this.basePath + '/Items/{itemId}/RemoteImages/Providers' + .replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'itemId' is not null or undefined + if (itemId === null || itemId === undefined) { + throw new Error('Required parameter itemId was null or undefined when calling getRemoteImageProviders.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Array; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Array"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets available remote images for an item. + * @param itemId Item Id. + * @param type The image type. + * @param startIndex Optional. The record index to start at. All items with a lower index will be dropped from the results. + * @param limit Optional. The maximum number of records to return. + * @param providerName Optional. The image provider to use. + * @param includeAllLanguages Optional. Include all languages. + */ + public async getRemoteImages (itemId: string, type?: ImageType, startIndex?: number, limit?: number, providerName?: string, includeAllLanguages?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: RemoteImageResult; }> { + const localVarPath = this.basePath + '/Items/{itemId}/RemoteImages' + .replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'itemId' is not null or undefined + if (itemId === null || itemId === undefined) { + throw new Error('Required parameter itemId was null or undefined when calling getRemoteImages.'); + } + + if (type !== undefined) { + localVarQueryParameters['type'] = ObjectSerializer.serialize(type, "ImageType"); + } + + if (startIndex !== undefined) { + localVarQueryParameters['startIndex'] = ObjectSerializer.serialize(startIndex, "number"); + } + + if (limit !== undefined) { + localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); + } + + if (providerName !== undefined) { + localVarQueryParameters['providerName'] = ObjectSerializer.serialize(providerName, "string"); + } + + if (includeAllLanguages !== undefined) { + localVarQueryParameters['includeAllLanguages'] = ObjectSerializer.serialize(includeAllLanguages, "boolean"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: RemoteImageResult; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "RemoteImageResult"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} diff --git a/jellyfin/api/scheduledTasksApi.ts b/jellyfin/api/scheduledTasksApi.ts new file mode 100644 index 0000000..96ca42a --- /dev/null +++ b/jellyfin/api/scheduledTasksApi.ts @@ -0,0 +1,461 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import localVarRequest from 'request'; +import http from 'http'; + +/* tslint:disable:no-unused-locals */ +import { ProblemDetails } from '../model/problemDetails'; +import { TaskInfo } from '../model/taskInfo'; +import { TaskTriggerInfo } from '../model/taskTriggerInfo'; + +import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; +import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; + +import { HttpError, RequestFile } from './apis'; + +let defaultBasePath = 'http://localhost'; + +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== + +export enum ScheduledTasksApiApiKeys { + CustomAuthentication, +} + +export class ScheduledTasksApi { + protected _basePath = defaultBasePath; + protected _defaultHeaders : any = {}; + protected _useQuerystring : boolean = false; + + protected authentications = { + 'default': new VoidAuth(), + 'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'), + } + + protected interceptors: Interceptor[] = []; + + constructor(basePath?: string); + constructor(basePathOrUsername: string, password?: string, basePath?: string) { + if (password) { + if (basePath) { + this.basePath = basePath; + } + } else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername + } + } + } + + set useQuerystring(value: boolean) { + this._useQuerystring = value; + } + + set basePath(basePath: string) { + this._basePath = basePath; + } + + set defaultHeaders(defaultHeaders: any) { + this._defaultHeaders = defaultHeaders; + } + + get defaultHeaders() { + return this._defaultHeaders; + } + + get basePath() { + return this._basePath; + } + + public setDefaultAuthentication(auth: Authentication) { + this.authentications.default = auth; + } + + public setApiKey(key: ScheduledTasksApiApiKeys, value: string) { + (this.authentications as any)[ScheduledTasksApiApiKeys[key]].apiKey = value; + } + + public addInterceptor(interceptor: Interceptor) { + this.interceptors.push(interceptor); + } + + /** + * + * @summary Get task by id. + * @param taskId Task Id. + */ + public async getTask (taskId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: TaskInfo; }> { + const localVarPath = this.basePath + '/ScheduledTasks/{taskId}' + .replace('{' + 'taskId' + '}', encodeURIComponent(String(taskId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'taskId' is not null or undefined + if (taskId === null || taskId === undefined) { + throw new Error('Required parameter taskId was null or undefined when calling getTask.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: TaskInfo; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "TaskInfo"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Get tasks. + * @param isHidden Optional filter tasks that are hidden, or not. + * @param isEnabled Optional filter tasks that are enabled, or not. + */ + public async getTasks (isHidden?: boolean, isEnabled?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array; }> { + const localVarPath = this.basePath + '/ScheduledTasks'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + if (isHidden !== undefined) { + localVarQueryParameters['isHidden'] = ObjectSerializer.serialize(isHidden, "boolean"); + } + + if (isEnabled !== undefined) { + localVarQueryParameters['isEnabled'] = ObjectSerializer.serialize(isEnabled, "boolean"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Array; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Array"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Start specified task. + * @param taskId Task Id. + */ + public async startTask (taskId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/ScheduledTasks/Running/{taskId}' + .replace('{' + 'taskId' + '}', encodeURIComponent(String(taskId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'taskId' is not null or undefined + if (taskId === null || taskId === undefined) { + throw new Error('Required parameter taskId was null or undefined when calling startTask.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Stop specified task. + * @param taskId Task Id. + */ + public async stopTask (taskId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/ScheduledTasks/Running/{taskId}' + .replace('{' + 'taskId' + '}', encodeURIComponent(String(taskId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'taskId' is not null or undefined + if (taskId === null || taskId === undefined) { + throw new Error('Required parameter taskId was null or undefined when calling stopTask.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Update specified task triggers. + * @param taskId Task Id. + * @param taskTriggerInfo Triggers. + */ + public async updateTask (taskId: string, taskTriggerInfo: Array, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/ScheduledTasks/{taskId}/Triggers' + .replace('{' + 'taskId' + '}', encodeURIComponent(String(taskId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'taskId' is not null or undefined + if (taskId === null || taskId === undefined) { + throw new Error('Required parameter taskId was null or undefined when calling updateTask.'); + } + + // verify required parameter 'taskTriggerInfo' is not null or undefined + if (taskTriggerInfo === null || taskTriggerInfo === undefined) { + throw new Error('Required parameter taskTriggerInfo was null or undefined when calling updateTask.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: ObjectSerializer.serialize(taskTriggerInfo, "Array") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} diff --git a/jellyfin/api/searchApi.ts b/jellyfin/api/searchApi.ts new file mode 100644 index 0000000..c3fbe70 --- /dev/null +++ b/jellyfin/api/searchApi.ts @@ -0,0 +1,253 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import localVarRequest from 'request'; +import http from 'http'; + +/* tslint:disable:no-unused-locals */ +import { BaseItemKind } from '../model/baseItemKind'; +import { SearchHintResult } from '../model/searchHintResult'; + +import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; +import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; + +import { HttpError, RequestFile } from './apis'; + +let defaultBasePath = 'http://localhost'; + +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== + +export enum SearchApiApiKeys { + CustomAuthentication, +} + +export class SearchApi { + protected _basePath = defaultBasePath; + protected _defaultHeaders : any = {}; + protected _useQuerystring : boolean = false; + + protected authentications = { + 'default': new VoidAuth(), + 'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'), + } + + protected interceptors: Interceptor[] = []; + + constructor(basePath?: string); + constructor(basePathOrUsername: string, password?: string, basePath?: string) { + if (password) { + if (basePath) { + this.basePath = basePath; + } + } else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername + } + } + } + + set useQuerystring(value: boolean) { + this._useQuerystring = value; + } + + set basePath(basePath: string) { + this._basePath = basePath; + } + + set defaultHeaders(defaultHeaders: any) { + this._defaultHeaders = defaultHeaders; + } + + get defaultHeaders() { + return this._defaultHeaders; + } + + get basePath() { + return this._basePath; + } + + public setDefaultAuthentication(auth: Authentication) { + this.authentications.default = auth; + } + + public setApiKey(key: SearchApiApiKeys, value: string) { + (this.authentications as any)[SearchApiApiKeys[key]].apiKey = value; + } + + public addInterceptor(interceptor: Interceptor) { + this.interceptors.push(interceptor); + } + + /** + * + * @summary Gets the search hint result. + * @param searchTerm The search term to filter on. + * @param startIndex Optional. The record index to start at. All items with a lower index will be dropped from the results. + * @param limit Optional. The maximum number of records to return. + * @param userId Optional. Supply a user id to search within a user\'s library or omit to search all. + * @param includeItemTypes If specified, only results with the specified item types are returned. This allows multiple, comma delimeted. + * @param excludeItemTypes If specified, results with these item types are filtered out. This allows multiple, comma delimeted. + * @param mediaTypes If specified, only results with the specified media types are returned. This allows multiple, comma delimeted. + * @param parentId If specified, only children of the parent are returned. + * @param isMovie Optional filter for movies. + * @param isSeries Optional filter for series. + * @param isNews Optional filter for news. + * @param isKids Optional filter for kids. + * @param isSports Optional filter for sports. + * @param includePeople Optional filter whether to include people. + * @param includeMedia Optional filter whether to include media. + * @param includeGenres Optional filter whether to include genres. + * @param includeStudios Optional filter whether to include studios. + * @param includeArtists Optional filter whether to include artists. + */ + public async get (searchTerm: string, startIndex?: number, limit?: number, userId?: string, includeItemTypes?: Array, excludeItemTypes?: Array, mediaTypes?: Array, parentId?: string, isMovie?: boolean, isSeries?: boolean, isNews?: boolean, isKids?: boolean, isSports?: boolean, includePeople?: boolean, includeMedia?: boolean, includeGenres?: boolean, includeStudios?: boolean, includeArtists?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: SearchHintResult; }> { + const localVarPath = this.basePath + '/Search/Hints'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'searchTerm' is not null or undefined + if (searchTerm === null || searchTerm === undefined) { + throw new Error('Required parameter searchTerm was null or undefined when calling get.'); + } + + if (startIndex !== undefined) { + localVarQueryParameters['startIndex'] = ObjectSerializer.serialize(startIndex, "number"); + } + + if (limit !== undefined) { + localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); + } + + if (userId !== undefined) { + localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string"); + } + + if (searchTerm !== undefined) { + localVarQueryParameters['searchTerm'] = ObjectSerializer.serialize(searchTerm, "string"); + } + + if (includeItemTypes !== undefined) { + localVarQueryParameters['includeItemTypes'] = ObjectSerializer.serialize(includeItemTypes, "Array"); + } + + if (excludeItemTypes !== undefined) { + localVarQueryParameters['excludeItemTypes'] = ObjectSerializer.serialize(excludeItemTypes, "Array"); + } + + if (mediaTypes !== undefined) { + localVarQueryParameters['mediaTypes'] = ObjectSerializer.serialize(mediaTypes, "Array"); + } + + if (parentId !== undefined) { + localVarQueryParameters['parentId'] = ObjectSerializer.serialize(parentId, "string"); + } + + if (isMovie !== undefined) { + localVarQueryParameters['isMovie'] = ObjectSerializer.serialize(isMovie, "boolean"); + } + + if (isSeries !== undefined) { + localVarQueryParameters['isSeries'] = ObjectSerializer.serialize(isSeries, "boolean"); + } + + if (isNews !== undefined) { + localVarQueryParameters['isNews'] = ObjectSerializer.serialize(isNews, "boolean"); + } + + if (isKids !== undefined) { + localVarQueryParameters['isKids'] = ObjectSerializer.serialize(isKids, "boolean"); + } + + if (isSports !== undefined) { + localVarQueryParameters['isSports'] = ObjectSerializer.serialize(isSports, "boolean"); + } + + if (includePeople !== undefined) { + localVarQueryParameters['includePeople'] = ObjectSerializer.serialize(includePeople, "boolean"); + } + + if (includeMedia !== undefined) { + localVarQueryParameters['includeMedia'] = ObjectSerializer.serialize(includeMedia, "boolean"); + } + + if (includeGenres !== undefined) { + localVarQueryParameters['includeGenres'] = ObjectSerializer.serialize(includeGenres, "boolean"); + } + + if (includeStudios !== undefined) { + localVarQueryParameters['includeStudios'] = ObjectSerializer.serialize(includeStudios, "boolean"); + } + + if (includeArtists !== undefined) { + localVarQueryParameters['includeArtists'] = ObjectSerializer.serialize(includeArtists, "boolean"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: SearchHintResult; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "SearchHintResult"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} diff --git a/jellyfin/api/sessionApi.ts b/jellyfin/api/sessionApi.ts new file mode 100644 index 0000000..68bcc66 --- /dev/null +++ b/jellyfin/api/sessionApi.ts @@ -0,0 +1,1305 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import localVarRequest from 'request'; +import http from 'http'; + +/* tslint:disable:no-unused-locals */ +import { BaseItemKind } from '../model/baseItemKind'; +import { GeneralCommandType } from '../model/generalCommandType'; +import { NameIdPair } from '../model/nameIdPair'; +import { PlayCommand } from '../model/playCommand'; +import { PlaystateCommand } from '../model/playstateCommand'; +import { PostFullCapabilitiesRequest } from '../model/postFullCapabilitiesRequest'; +import { SendFullGeneralCommandRequest } from '../model/sendFullGeneralCommandRequest'; +import { SendMessageCommandRequest } from '../model/sendMessageCommandRequest'; +import { SessionInfo } from '../model/sessionInfo'; + +import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; +import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; + +import { HttpError, RequestFile } from './apis'; + +let defaultBasePath = 'http://localhost'; + +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== + +export enum SessionApiApiKeys { + CustomAuthentication, +} + +export class SessionApi { + protected _basePath = defaultBasePath; + protected _defaultHeaders : any = {}; + protected _useQuerystring : boolean = false; + + protected authentications = { + 'default': new VoidAuth(), + 'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'), + } + + protected interceptors: Interceptor[] = []; + + constructor(basePath?: string); + constructor(basePathOrUsername: string, password?: string, basePath?: string) { + if (password) { + if (basePath) { + this.basePath = basePath; + } + } else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername + } + } + } + + set useQuerystring(value: boolean) { + this._useQuerystring = value; + } + + set basePath(basePath: string) { + this._basePath = basePath; + } + + set defaultHeaders(defaultHeaders: any) { + this._defaultHeaders = defaultHeaders; + } + + get defaultHeaders() { + return this._defaultHeaders; + } + + get basePath() { + return this._basePath; + } + + public setDefaultAuthentication(auth: Authentication) { + this.authentications.default = auth; + } + + public setApiKey(key: SessionApiApiKeys, value: string) { + (this.authentications as any)[SessionApiApiKeys[key]].apiKey = value; + } + + public addInterceptor(interceptor: Interceptor) { + this.interceptors.push(interceptor); + } + + /** + * + * @summary Adds an additional user to a session. + * @param sessionId The session id. + * @param userId The user id. + */ + public async addUserToSession (sessionId: string, userId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Sessions/{sessionId}/User/{userId}' + .replace('{' + 'sessionId' + '}', encodeURIComponent(String(sessionId))) + .replace('{' + 'userId' + '}', encodeURIComponent(String(userId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + // verify required parameter 'sessionId' is not null or undefined + if (sessionId === null || sessionId === undefined) { + throw new Error('Required parameter sessionId was null or undefined when calling addUserToSession.'); + } + + // verify required parameter 'userId' is not null or undefined + if (userId === null || userId === undefined) { + throw new Error('Required parameter userId was null or undefined when calling addUserToSession.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Instructs a session to browse to an item or view. + * @param sessionId The session Id. + * @param itemType The type of item to browse to. + * @param itemId The Id of the item. + * @param itemName The name of the item. + */ + public async displayContent (sessionId: string, itemType: BaseItemKind, itemId: string, itemName: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Sessions/{sessionId}/Viewing' + .replace('{' + 'sessionId' + '}', encodeURIComponent(String(sessionId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + // verify required parameter 'sessionId' is not null or undefined + if (sessionId === null || sessionId === undefined) { + throw new Error('Required parameter sessionId was null or undefined when calling displayContent.'); + } + + // verify required parameter 'itemType' is not null or undefined + if (itemType === null || itemType === undefined) { + throw new Error('Required parameter itemType was null or undefined when calling displayContent.'); + } + + // verify required parameter 'itemId' is not null or undefined + if (itemId === null || itemId === undefined) { + throw new Error('Required parameter itemId was null or undefined when calling displayContent.'); + } + + // verify required parameter 'itemName' is not null or undefined + if (itemName === null || itemName === undefined) { + throw new Error('Required parameter itemName was null or undefined when calling displayContent.'); + } + + if (itemType !== undefined) { + localVarQueryParameters['itemType'] = ObjectSerializer.serialize(itemType, "BaseItemKind"); + } + + if (itemId !== undefined) { + localVarQueryParameters['itemId'] = ObjectSerializer.serialize(itemId, "string"); + } + + if (itemName !== undefined) { + localVarQueryParameters['itemName'] = ObjectSerializer.serialize(itemName, "string"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Get all auth providers. + */ + public async getAuthProviders (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array; }> { + const localVarPath = this.basePath + '/Auth/Providers'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Array; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Array"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Get all password reset providers. + */ + public async getPasswordResetProviders (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array; }> { + const localVarPath = this.basePath + '/Auth/PasswordResetProviders'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Array; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Array"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets a list of sessions. + * @param controllableByUserId Filter by sessions that a given user is allowed to remote control. + * @param deviceId Filter by device Id. + * @param activeWithinSeconds Optional. Filter by sessions that were active in the last n seconds. + */ + public async getSessions (controllableByUserId?: string, deviceId?: string, activeWithinSeconds?: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array; }> { + const localVarPath = this.basePath + '/Sessions'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + if (controllableByUserId !== undefined) { + localVarQueryParameters['controllableByUserId'] = ObjectSerializer.serialize(controllableByUserId, "string"); + } + + if (deviceId !== undefined) { + localVarQueryParameters['deviceId'] = ObjectSerializer.serialize(deviceId, "string"); + } + + if (activeWithinSeconds !== undefined) { + localVarQueryParameters['activeWithinSeconds'] = ObjectSerializer.serialize(activeWithinSeconds, "number"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Array; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Array"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Instructs a session to play an item. + * @param sessionId The session id. + * @param playCommand The type of play command to issue (PlayNow, PlayNext, PlayLast). Clients who have not yet implemented play next and play last may play now. + * @param itemIds The ids of the items to play, comma delimited. + * @param startPositionTicks The starting position of the first item. + * @param mediaSourceId Optional. The media source id. + * @param audioStreamIndex Optional. The index of the audio stream to play. + * @param subtitleStreamIndex Optional. The index of the subtitle stream to play. + * @param startIndex Optional. The start index. + */ + public async play (sessionId: string, playCommand: PlayCommand, itemIds: Array, startPositionTicks?: number, mediaSourceId?: string, audioStreamIndex?: number, subtitleStreamIndex?: number, startIndex?: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Sessions/{sessionId}/Playing' + .replace('{' + 'sessionId' + '}', encodeURIComponent(String(sessionId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + // verify required parameter 'sessionId' is not null or undefined + if (sessionId === null || sessionId === undefined) { + throw new Error('Required parameter sessionId was null or undefined when calling play.'); + } + + // verify required parameter 'playCommand' is not null or undefined + if (playCommand === null || playCommand === undefined) { + throw new Error('Required parameter playCommand was null or undefined when calling play.'); + } + + // verify required parameter 'itemIds' is not null or undefined + if (itemIds === null || itemIds === undefined) { + throw new Error('Required parameter itemIds was null or undefined when calling play.'); + } + + if (playCommand !== undefined) { + localVarQueryParameters['playCommand'] = ObjectSerializer.serialize(playCommand, "PlayCommand"); + } + + if (itemIds !== undefined) { + localVarQueryParameters['itemIds'] = ObjectSerializer.serialize(itemIds, "Array"); + } + + if (startPositionTicks !== undefined) { + localVarQueryParameters['startPositionTicks'] = ObjectSerializer.serialize(startPositionTicks, "number"); + } + + if (mediaSourceId !== undefined) { + localVarQueryParameters['mediaSourceId'] = ObjectSerializer.serialize(mediaSourceId, "string"); + } + + if (audioStreamIndex !== undefined) { + localVarQueryParameters['audioStreamIndex'] = ObjectSerializer.serialize(audioStreamIndex, "number"); + } + + if (subtitleStreamIndex !== undefined) { + localVarQueryParameters['subtitleStreamIndex'] = ObjectSerializer.serialize(subtitleStreamIndex, "number"); + } + + if (startIndex !== undefined) { + localVarQueryParameters['startIndex'] = ObjectSerializer.serialize(startIndex, "number"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Updates capabilities for a device. + * @param id The session id. + * @param playableMediaTypes A list of playable media types, comma delimited. Audio, Video, Book, Photo. + * @param supportedCommands A list of supported remote control commands, comma delimited. + * @param supportsMediaControl Determines whether media can be played remotely.. + * @param supportsSync Determines whether sync is supported. + * @param supportsPersistentIdentifier Determines whether the device supports a unique identifier. + */ + public async postCapabilities (id?: string, playableMediaTypes?: Array, supportedCommands?: Array, supportsMediaControl?: boolean, supportsSync?: boolean, supportsPersistentIdentifier?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Sessions/Capabilities'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + if (id !== undefined) { + localVarQueryParameters['id'] = ObjectSerializer.serialize(id, "string"); + } + + if (playableMediaTypes !== undefined) { + localVarQueryParameters['playableMediaTypes'] = ObjectSerializer.serialize(playableMediaTypes, "Array"); + } + + if (supportedCommands !== undefined) { + localVarQueryParameters['supportedCommands'] = ObjectSerializer.serialize(supportedCommands, "Array"); + } + + if (supportsMediaControl !== undefined) { + localVarQueryParameters['supportsMediaControl'] = ObjectSerializer.serialize(supportsMediaControl, "boolean"); + } + + if (supportsSync !== undefined) { + localVarQueryParameters['supportsSync'] = ObjectSerializer.serialize(supportsSync, "boolean"); + } + + if (supportsPersistentIdentifier !== undefined) { + localVarQueryParameters['supportsPersistentIdentifier'] = ObjectSerializer.serialize(supportsPersistentIdentifier, "boolean"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Updates capabilities for a device. + * @param postFullCapabilitiesRequest The MediaBrowser.Model.Session.ClientCapabilities. + * @param id The session id. + */ + public async postFullCapabilities (postFullCapabilitiesRequest: PostFullCapabilitiesRequest, id?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Sessions/Capabilities/Full'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + // verify required parameter 'postFullCapabilitiesRequest' is not null or undefined + if (postFullCapabilitiesRequest === null || postFullCapabilitiesRequest === undefined) { + throw new Error('Required parameter postFullCapabilitiesRequest was null or undefined when calling postFullCapabilities.'); + } + + if (id !== undefined) { + localVarQueryParameters['id'] = ObjectSerializer.serialize(id, "string"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: ObjectSerializer.serialize(postFullCapabilitiesRequest, "PostFullCapabilitiesRequest") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Removes an additional user from a session. + * @param sessionId The session id. + * @param userId The user id. + */ + public async removeUserFromSession (sessionId: string, userId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Sessions/{sessionId}/User/{userId}' + .replace('{' + 'sessionId' + '}', encodeURIComponent(String(sessionId))) + .replace('{' + 'userId' + '}', encodeURIComponent(String(userId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + // verify required parameter 'sessionId' is not null or undefined + if (sessionId === null || sessionId === undefined) { + throw new Error('Required parameter sessionId was null or undefined when calling removeUserFromSession.'); + } + + // verify required parameter 'userId' is not null or undefined + if (userId === null || userId === undefined) { + throw new Error('Required parameter userId was null or undefined when calling removeUserFromSession.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Reports that a session has ended. + */ + public async reportSessionEnded (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Sessions/Logout'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Reports that a session is viewing an item. + * @param itemId The item id. + * @param sessionId The session id. + */ + public async reportViewing (itemId: string, sessionId?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Sessions/Viewing'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + // verify required parameter 'itemId' is not null or undefined + if (itemId === null || itemId === undefined) { + throw new Error('Required parameter itemId was null or undefined when calling reportViewing.'); + } + + if (sessionId !== undefined) { + localVarQueryParameters['sessionId'] = ObjectSerializer.serialize(sessionId, "string"); + } + + if (itemId !== undefined) { + localVarQueryParameters['itemId'] = ObjectSerializer.serialize(itemId, "string"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Issues a full general command to a client. + * @param sessionId The session id. + * @param sendFullGeneralCommandRequest The MediaBrowser.Model.Session.GeneralCommand. + */ + public async sendFullGeneralCommand (sessionId: string, sendFullGeneralCommandRequest: SendFullGeneralCommandRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Sessions/{sessionId}/Command' + .replace('{' + 'sessionId' + '}', encodeURIComponent(String(sessionId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + // verify required parameter 'sessionId' is not null or undefined + if (sessionId === null || sessionId === undefined) { + throw new Error('Required parameter sessionId was null or undefined when calling sendFullGeneralCommand.'); + } + + // verify required parameter 'sendFullGeneralCommandRequest' is not null or undefined + if (sendFullGeneralCommandRequest === null || sendFullGeneralCommandRequest === undefined) { + throw new Error('Required parameter sendFullGeneralCommandRequest was null or undefined when calling sendFullGeneralCommand.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: ObjectSerializer.serialize(sendFullGeneralCommandRequest, "SendFullGeneralCommandRequest") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Issues a general command to a client. + * @param sessionId The session id. + * @param command The command to send. + */ + public async sendGeneralCommand (sessionId: string, command: GeneralCommandType, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Sessions/{sessionId}/Command/{command}' + .replace('{' + 'sessionId' + '}', encodeURIComponent(String(sessionId))) + .replace('{' + 'command' + '}', encodeURIComponent(String(command))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + // verify required parameter 'sessionId' is not null or undefined + if (sessionId === null || sessionId === undefined) { + throw new Error('Required parameter sessionId was null or undefined when calling sendGeneralCommand.'); + } + + // verify required parameter 'command' is not null or undefined + if (command === null || command === undefined) { + throw new Error('Required parameter command was null or undefined when calling sendGeneralCommand.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Issues a command to a client to display a message to the user. + * @param sessionId The session id. + * @param sendMessageCommandRequest The MediaBrowser.Model.Session.MessageCommand object containing Header, Message Text, and TimeoutMs. + */ + public async sendMessageCommand (sessionId: string, sendMessageCommandRequest: SendMessageCommandRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Sessions/{sessionId}/Message' + .replace('{' + 'sessionId' + '}', encodeURIComponent(String(sessionId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + // verify required parameter 'sessionId' is not null or undefined + if (sessionId === null || sessionId === undefined) { + throw new Error('Required parameter sessionId was null or undefined when calling sendMessageCommand.'); + } + + // verify required parameter 'sendMessageCommandRequest' is not null or undefined + if (sendMessageCommandRequest === null || sendMessageCommandRequest === undefined) { + throw new Error('Required parameter sendMessageCommandRequest was null or undefined when calling sendMessageCommand.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: ObjectSerializer.serialize(sendMessageCommandRequest, "SendMessageCommandRequest") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Issues a playstate command to a client. + * @param sessionId The session id. + * @param command The MediaBrowser.Model.Session.PlaystateCommand. + * @param seekPositionTicks The optional position ticks. + * @param controllingUserId The optional controlling user id. + */ + public async sendPlaystateCommand (sessionId: string, command: PlaystateCommand, seekPositionTicks?: number, controllingUserId?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Sessions/{sessionId}/Playing/{command}' + .replace('{' + 'sessionId' + '}', encodeURIComponent(String(sessionId))) + .replace('{' + 'command' + '}', encodeURIComponent(String(command))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + // verify required parameter 'sessionId' is not null or undefined + if (sessionId === null || sessionId === undefined) { + throw new Error('Required parameter sessionId was null or undefined when calling sendPlaystateCommand.'); + } + + // verify required parameter 'command' is not null or undefined + if (command === null || command === undefined) { + throw new Error('Required parameter command was null or undefined when calling sendPlaystateCommand.'); + } + + if (seekPositionTicks !== undefined) { + localVarQueryParameters['seekPositionTicks'] = ObjectSerializer.serialize(seekPositionTicks, "number"); + } + + if (controllingUserId !== undefined) { + localVarQueryParameters['controllingUserId'] = ObjectSerializer.serialize(controllingUserId, "string"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Issues a system command to a client. + * @param sessionId The session id. + * @param command The command to send. + */ + public async sendSystemCommand (sessionId: string, command: GeneralCommandType, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Sessions/{sessionId}/System/{command}' + .replace('{' + 'sessionId' + '}', encodeURIComponent(String(sessionId))) + .replace('{' + 'command' + '}', encodeURIComponent(String(command))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + // verify required parameter 'sessionId' is not null or undefined + if (sessionId === null || sessionId === undefined) { + throw new Error('Required parameter sessionId was null or undefined when calling sendSystemCommand.'); + } + + // verify required parameter 'command' is not null or undefined + if (command === null || command === undefined) { + throw new Error('Required parameter command was null or undefined when calling sendSystemCommand.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} diff --git a/jellyfin/api/startupApi.ts b/jellyfin/api/startupApi.ts new file mode 100644 index 0000000..aace332 --- /dev/null +++ b/jellyfin/api/startupApi.ts @@ -0,0 +1,535 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import localVarRequest from 'request'; +import http from 'http'; + +/* tslint:disable:no-unused-locals */ +import { SetRemoteAccessRequest } from '../model/setRemoteAccessRequest'; +import { StartupConfigurationDto } from '../model/startupConfigurationDto'; +import { StartupUserDto } from '../model/startupUserDto'; +import { UpdateInitialConfigurationRequest } from '../model/updateInitialConfigurationRequest'; +import { UpdateStartupUserRequest } from '../model/updateStartupUserRequest'; + +import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; +import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; + +import { HttpError, RequestFile } from './apis'; + +let defaultBasePath = 'http://localhost'; + +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== + +export enum StartupApiApiKeys { + CustomAuthentication, +} + +export class StartupApi { + protected _basePath = defaultBasePath; + protected _defaultHeaders : any = {}; + protected _useQuerystring : boolean = false; + + protected authentications = { + 'default': new VoidAuth(), + 'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'), + } + + protected interceptors: Interceptor[] = []; + + constructor(basePath?: string); + constructor(basePathOrUsername: string, password?: string, basePath?: string) { + if (password) { + if (basePath) { + this.basePath = basePath; + } + } else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername + } + } + } + + set useQuerystring(value: boolean) { + this._useQuerystring = value; + } + + set basePath(basePath: string) { + this._basePath = basePath; + } + + set defaultHeaders(defaultHeaders: any) { + this._defaultHeaders = defaultHeaders; + } + + get defaultHeaders() { + return this._defaultHeaders; + } + + get basePath() { + return this._basePath; + } + + public setDefaultAuthentication(auth: Authentication) { + this.authentications.default = auth; + } + + public setApiKey(key: StartupApiApiKeys, value: string) { + (this.authentications as any)[StartupApiApiKeys[key]].apiKey = value; + } + + public addInterceptor(interceptor: Interceptor) { + this.interceptors.push(interceptor); + } + + /** + * + * @summary Completes the startup wizard. + */ + public async completeWizard (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Startup/Complete'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets the first user. + */ + public async getFirstUser (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: StartupUserDto; }> { + const localVarPath = this.basePath + '/Startup/User'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: StartupUserDto; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "StartupUserDto"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets the first user. + */ + public async getFirstUser2 (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: StartupUserDto; }> { + const localVarPath = this.basePath + '/Startup/FirstUser'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: StartupUserDto; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "StartupUserDto"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets the initial startup wizard configuration. + */ + public async getStartupConfiguration (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: StartupConfigurationDto; }> { + const localVarPath = this.basePath + '/Startup/Configuration'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: StartupConfigurationDto; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "StartupConfigurationDto"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Sets remote access and UPnP. + * @param setRemoteAccessRequest The startup remote access dto. + */ + public async setRemoteAccess (setRemoteAccessRequest: SetRemoteAccessRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Startup/RemoteAccess'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + // verify required parameter 'setRemoteAccessRequest' is not null or undefined + if (setRemoteAccessRequest === null || setRemoteAccessRequest === undefined) { + throw new Error('Required parameter setRemoteAccessRequest was null or undefined when calling setRemoteAccess.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: ObjectSerializer.serialize(setRemoteAccessRequest, "SetRemoteAccessRequest") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Sets the initial startup wizard configuration. + * @param updateInitialConfigurationRequest The updated startup configuration. + */ + public async updateInitialConfiguration (updateInitialConfigurationRequest: UpdateInitialConfigurationRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Startup/Configuration'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + // verify required parameter 'updateInitialConfigurationRequest' is not null or undefined + if (updateInitialConfigurationRequest === null || updateInitialConfigurationRequest === undefined) { + throw new Error('Required parameter updateInitialConfigurationRequest was null or undefined when calling updateInitialConfiguration.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: ObjectSerializer.serialize(updateInitialConfigurationRequest, "UpdateInitialConfigurationRequest") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Sets the user name and password. + * @param updateStartupUserRequest The DTO containing username and password. + */ + public async updateStartupUser (updateStartupUserRequest?: UpdateStartupUserRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Startup/User'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: ObjectSerializer.serialize(updateStartupUserRequest, "UpdateStartupUserRequest") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} diff --git a/jellyfin/api/studiosApi.ts b/jellyfin/api/studiosApi.ts new file mode 100644 index 0000000..c49c541 --- /dev/null +++ b/jellyfin/api/studiosApi.ts @@ -0,0 +1,323 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import localVarRequest from 'request'; +import http from 'http'; + +/* tslint:disable:no-unused-locals */ +import { BaseItemDto } from '../model/baseItemDto'; +import { BaseItemDtoQueryResult } from '../model/baseItemDtoQueryResult'; +import { BaseItemKind } from '../model/baseItemKind'; +import { ImageType } from '../model/imageType'; +import { ItemFields } from '../model/itemFields'; + +import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; +import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; + +import { HttpError, RequestFile } from './apis'; + +let defaultBasePath = 'http://localhost'; + +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== + +export enum StudiosApiApiKeys { + CustomAuthentication, +} + +export class StudiosApi { + protected _basePath = defaultBasePath; + protected _defaultHeaders : any = {}; + protected _useQuerystring : boolean = false; + + protected authentications = { + 'default': new VoidAuth(), + 'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'), + } + + protected interceptors: Interceptor[] = []; + + constructor(basePath?: string); + constructor(basePathOrUsername: string, password?: string, basePath?: string) { + if (password) { + if (basePath) { + this.basePath = basePath; + } + } else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername + } + } + } + + set useQuerystring(value: boolean) { + this._useQuerystring = value; + } + + set basePath(basePath: string) { + this._basePath = basePath; + } + + set defaultHeaders(defaultHeaders: any) { + this._defaultHeaders = defaultHeaders; + } + + get defaultHeaders() { + return this._defaultHeaders; + } + + get basePath() { + return this._basePath; + } + + public setDefaultAuthentication(auth: Authentication) { + this.authentications.default = auth; + } + + public setApiKey(key: StudiosApiApiKeys, value: string) { + (this.authentications as any)[StudiosApiApiKeys[key]].apiKey = value; + } + + public addInterceptor(interceptor: Interceptor) { + this.interceptors.push(interceptor); + } + + /** + * + * @summary Gets a studio by name. + * @param name Studio name. + * @param userId Optional. Filter by user id, and attach user data. + */ + public async getStudio (name: string, userId?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDto; }> { + const localVarPath = this.basePath + '/Studios/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling getStudio.'); + } + + if (userId !== undefined) { + localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: BaseItemDto; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "BaseItemDto"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets all studios from a given item, folder, or the entire library. + * @param startIndex Optional. The record index to start at. All items with a lower index will be dropped from the results. + * @param limit Optional. The maximum number of records to return. + * @param searchTerm Optional. Search term. + * @param parentId Specify this to localize the search to a specific item or folder. Omit to use the root. + * @param fields Optional. Specify additional fields of information to return in the output. + * @param excludeItemTypes Optional. If specified, results will be filtered out based on item type. This allows multiple, comma delimited. + * @param includeItemTypes Optional. If specified, results will be filtered based on item type. This allows multiple, comma delimited. + * @param isFavorite Optional filter by items that are marked as favorite, or not. + * @param enableUserData Optional, include user data. + * @param imageTypeLimit Optional, the max number of images to return, per image type. + * @param enableImageTypes Optional. The image types to include in the output. + * @param userId User id. + * @param nameStartsWithOrGreater Optional filter by items whose name is sorted equally or greater than a given input string. + * @param nameStartsWith Optional filter by items whose name is sorted equally than a given input string. + * @param nameLessThan Optional filter by items whose name is equally or lesser than a given input string. + * @param enableImages Optional, include image information in output. + * @param enableTotalRecordCount Total record count. + */ + public async getStudios (startIndex?: number, limit?: number, searchTerm?: string, parentId?: string, fields?: Array, excludeItemTypes?: Array, includeItemTypes?: Array, isFavorite?: boolean, enableUserData?: boolean, imageTypeLimit?: number, enableImageTypes?: Array, userId?: string, nameStartsWithOrGreater?: string, nameStartsWith?: string, nameLessThan?: string, enableImages?: boolean, enableTotalRecordCount?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }> { + const localVarPath = this.basePath + '/Studios'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + if (startIndex !== undefined) { + localVarQueryParameters['startIndex'] = ObjectSerializer.serialize(startIndex, "number"); + } + + if (limit !== undefined) { + localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); + } + + if (searchTerm !== undefined) { + localVarQueryParameters['searchTerm'] = ObjectSerializer.serialize(searchTerm, "string"); + } + + if (parentId !== undefined) { + localVarQueryParameters['parentId'] = ObjectSerializer.serialize(parentId, "string"); + } + + if (fields !== undefined) { + localVarQueryParameters['fields'] = ObjectSerializer.serialize(fields, "Array"); + } + + if (excludeItemTypes !== undefined) { + localVarQueryParameters['excludeItemTypes'] = ObjectSerializer.serialize(excludeItemTypes, "Array"); + } + + if (includeItemTypes !== undefined) { + localVarQueryParameters['includeItemTypes'] = ObjectSerializer.serialize(includeItemTypes, "Array"); + } + + if (isFavorite !== undefined) { + localVarQueryParameters['isFavorite'] = ObjectSerializer.serialize(isFavorite, "boolean"); + } + + if (enableUserData !== undefined) { + localVarQueryParameters['enableUserData'] = ObjectSerializer.serialize(enableUserData, "boolean"); + } + + if (imageTypeLimit !== undefined) { + localVarQueryParameters['imageTypeLimit'] = ObjectSerializer.serialize(imageTypeLimit, "number"); + } + + if (enableImageTypes !== undefined) { + localVarQueryParameters['enableImageTypes'] = ObjectSerializer.serialize(enableImageTypes, "Array"); + } + + if (userId !== undefined) { + localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string"); + } + + if (nameStartsWithOrGreater !== undefined) { + localVarQueryParameters['nameStartsWithOrGreater'] = ObjectSerializer.serialize(nameStartsWithOrGreater, "string"); + } + + if (nameStartsWith !== undefined) { + localVarQueryParameters['nameStartsWith'] = ObjectSerializer.serialize(nameStartsWith, "string"); + } + + if (nameLessThan !== undefined) { + localVarQueryParameters['nameLessThan'] = ObjectSerializer.serialize(nameLessThan, "string"); + } + + if (enableImages !== undefined) { + localVarQueryParameters['enableImages'] = ObjectSerializer.serialize(enableImages, "boolean"); + } + + if (enableTotalRecordCount !== undefined) { + localVarQueryParameters['enableTotalRecordCount'] = ObjectSerializer.serialize(enableTotalRecordCount, "boolean"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "BaseItemDtoQueryResult"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} diff --git a/jellyfin/api/subtitleApi.ts b/jellyfin/api/subtitleApi.ts new file mode 100644 index 0000000..136a20b --- /dev/null +++ b/jellyfin/api/subtitleApi.ts @@ -0,0 +1,971 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import localVarRequest from 'request'; +import http from 'http'; + +/* tslint:disable:no-unused-locals */ +import { FontFile } from '../model/fontFile'; +import { ProblemDetails } from '../model/problemDetails'; +import { RemoteSubtitleInfo } from '../model/remoteSubtitleInfo'; +import { UploadSubtitleRequest } from '../model/uploadSubtitleRequest'; + +import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; +import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; + +import { HttpError, RequestFile } from './apis'; + +let defaultBasePath = 'http://localhost'; + +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== + +export enum SubtitleApiApiKeys { + CustomAuthentication, +} + +export class SubtitleApi { + protected _basePath = defaultBasePath; + protected _defaultHeaders : any = {}; + protected _useQuerystring : boolean = false; + + protected authentications = { + 'default': new VoidAuth(), + 'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'), + } + + protected interceptors: Interceptor[] = []; + + constructor(basePath?: string); + constructor(basePathOrUsername: string, password?: string, basePath?: string) { + if (password) { + if (basePath) { + this.basePath = basePath; + } + } else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername + } + } + } + + set useQuerystring(value: boolean) { + this._useQuerystring = value; + } + + set basePath(basePath: string) { + this._basePath = basePath; + } + + set defaultHeaders(defaultHeaders: any) { + this._defaultHeaders = defaultHeaders; + } + + get defaultHeaders() { + return this._defaultHeaders; + } + + get basePath() { + return this._basePath; + } + + public setDefaultAuthentication(auth: Authentication) { + this.authentications.default = auth; + } + + public setApiKey(key: SubtitleApiApiKeys, value: string) { + (this.authentications as any)[SubtitleApiApiKeys[key]].apiKey = value; + } + + public addInterceptor(interceptor: Interceptor) { + this.interceptors.push(interceptor); + } + + /** + * + * @summary Deletes an external subtitle file. + * @param itemId The item id. + * @param index The index of the subtitle file. + */ + public async deleteSubtitle (itemId: string, index: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Videos/{itemId}/Subtitles/{index}' + .replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId))) + .replace('{' + 'index' + '}', encodeURIComponent(String(index))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'itemId' is not null or undefined + if (itemId === null || itemId === undefined) { + throw new Error('Required parameter itemId was null or undefined when calling deleteSubtitle.'); + } + + // verify required parameter 'index' is not null or undefined + if (index === null || index === undefined) { + throw new Error('Required parameter index was null or undefined when calling deleteSubtitle.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Downloads a remote subtitle. + * @param itemId The item id. + * @param subtitleId The subtitle id. + */ + public async downloadRemoteSubtitles (itemId: string, subtitleId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Items/{itemId}/RemoteSearch/Subtitles/{subtitleId}' + .replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId))) + .replace('{' + 'subtitleId' + '}', encodeURIComponent(String(subtitleId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + // verify required parameter 'itemId' is not null or undefined + if (itemId === null || itemId === undefined) { + throw new Error('Required parameter itemId was null or undefined when calling downloadRemoteSubtitles.'); + } + + // verify required parameter 'subtitleId' is not null or undefined + if (subtitleId === null || subtitleId === undefined) { + throw new Error('Required parameter subtitleId was null or undefined when calling downloadRemoteSubtitles.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets a fallback font file. + * @param name The name of the fallback font file to get. + */ + public async getFallbackFont (name: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/FallbackFont/Fonts/{name}' + .replace('{' + 'name' + '}', encodeURIComponent(String(name))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['font/*']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling getFallbackFont.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets a list of available fallback font files. + */ + public async getFallbackFontList (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array; }> { + const localVarPath = this.basePath + '/FallbackFont/Fonts'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Array; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Array"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets the remote subtitles. + * @param id The item id. + */ + public async getRemoteSubtitles (id: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/Providers/Subtitles/Subtitles/{id}' + .replace('{' + 'id' + '}', encodeURIComponent(String(id))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['text/*']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'id' is not null or undefined + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling getRemoteSubtitles.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets subtitles in a specified format. + * @param routeItemId The (route) item id. + * @param routeMediaSourceId The (route) media source id. + * @param routeIndex The (route) subtitle stream index. + * @param routeFormat The (route) format of the returned subtitle. + * @param itemId The item id. + * @param mediaSourceId The media source id. + * @param index The subtitle stream index. + * @param format The format of the returned subtitle. + * @param endPositionTicks Optional. The end position of the subtitle in ticks. + * @param copyTimestamps Optional. Whether to copy the timestamps. + * @param addVttTimeMap Optional. Whether to add a VTT time map. + * @param startPositionTicks The start position of the subtitle in ticks. + */ + public async getSubtitle (routeItemId: string, routeMediaSourceId: string, routeIndex: number, routeFormat: string, itemId?: string, mediaSourceId?: string, index?: number, format?: string, endPositionTicks?: number, copyTimestamps?: boolean, addVttTimeMap?: boolean, startPositionTicks?: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/Videos/{routeItemId}/{routeMediaSourceId}/Subtitles/{routeIndex}/Stream.{routeFormat}' + .replace('{' + 'routeItemId' + '}', encodeURIComponent(String(routeItemId))) + .replace('{' + 'routeMediaSourceId' + '}', encodeURIComponent(String(routeMediaSourceId))) + .replace('{' + 'routeIndex' + '}', encodeURIComponent(String(routeIndex))) + .replace('{' + 'routeFormat' + '}', encodeURIComponent(String(routeFormat))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['text/*']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'routeItemId' is not null or undefined + if (routeItemId === null || routeItemId === undefined) { + throw new Error('Required parameter routeItemId was null or undefined when calling getSubtitle.'); + } + + // verify required parameter 'routeMediaSourceId' is not null or undefined + if (routeMediaSourceId === null || routeMediaSourceId === undefined) { + throw new Error('Required parameter routeMediaSourceId was null or undefined when calling getSubtitle.'); + } + + // verify required parameter 'routeIndex' is not null or undefined + if (routeIndex === null || routeIndex === undefined) { + throw new Error('Required parameter routeIndex was null or undefined when calling getSubtitle.'); + } + + // verify required parameter 'routeFormat' is not null or undefined + if (routeFormat === null || routeFormat === undefined) { + throw new Error('Required parameter routeFormat was null or undefined when calling getSubtitle.'); + } + + if (itemId !== undefined) { + localVarQueryParameters['itemId'] = ObjectSerializer.serialize(itemId, "string"); + } + + if (mediaSourceId !== undefined) { + localVarQueryParameters['mediaSourceId'] = ObjectSerializer.serialize(mediaSourceId, "string"); + } + + if (index !== undefined) { + localVarQueryParameters['index'] = ObjectSerializer.serialize(index, "number"); + } + + if (format !== undefined) { + localVarQueryParameters['format'] = ObjectSerializer.serialize(format, "string"); + } + + if (endPositionTicks !== undefined) { + localVarQueryParameters['endPositionTicks'] = ObjectSerializer.serialize(endPositionTicks, "number"); + } + + if (copyTimestamps !== undefined) { + localVarQueryParameters['copyTimestamps'] = ObjectSerializer.serialize(copyTimestamps, "boolean"); + } + + if (addVttTimeMap !== undefined) { + localVarQueryParameters['addVttTimeMap'] = ObjectSerializer.serialize(addVttTimeMap, "boolean"); + } + + if (startPositionTicks !== undefined) { + localVarQueryParameters['startPositionTicks'] = ObjectSerializer.serialize(startPositionTicks, "number"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets an HLS subtitle playlist. + * @param itemId The item id. + * @param index The subtitle stream index. + * @param mediaSourceId The media source id. + * @param segmentLength The subtitle segment length. + */ + public async getSubtitlePlaylist (itemId: string, index: number, mediaSourceId: string, segmentLength: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/Videos/{itemId}/{mediaSourceId}/Subtitles/{index}/subtitles.m3u8' + .replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId))) + .replace('{' + 'index' + '}', encodeURIComponent(String(index))) + .replace('{' + 'mediaSourceId' + '}', encodeURIComponent(String(mediaSourceId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/x-mpegURL']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'itemId' is not null or undefined + if (itemId === null || itemId === undefined) { + throw new Error('Required parameter itemId was null or undefined when calling getSubtitlePlaylist.'); + } + + // verify required parameter 'index' is not null or undefined + if (index === null || index === undefined) { + throw new Error('Required parameter index was null or undefined when calling getSubtitlePlaylist.'); + } + + // verify required parameter 'mediaSourceId' is not null or undefined + if (mediaSourceId === null || mediaSourceId === undefined) { + throw new Error('Required parameter mediaSourceId was null or undefined when calling getSubtitlePlaylist.'); + } + + // verify required parameter 'segmentLength' is not null or undefined + if (segmentLength === null || segmentLength === undefined) { + throw new Error('Required parameter segmentLength was null or undefined when calling getSubtitlePlaylist.'); + } + + if (segmentLength !== undefined) { + localVarQueryParameters['segmentLength'] = ObjectSerializer.serialize(segmentLength, "number"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets subtitles in a specified format. + * @param routeItemId The (route) item id. + * @param routeMediaSourceId The (route) media source id. + * @param routeIndex The (route) subtitle stream index. + * @param routeStartPositionTicks The (route) start position of the subtitle in ticks. + * @param routeFormat The (route) format of the returned subtitle. + * @param itemId The item id. + * @param mediaSourceId The media source id. + * @param index The subtitle stream index. + * @param startPositionTicks The start position of the subtitle in ticks. + * @param format The format of the returned subtitle. + * @param endPositionTicks Optional. The end position of the subtitle in ticks. + * @param copyTimestamps Optional. Whether to copy the timestamps. + * @param addVttTimeMap Optional. Whether to add a VTT time map. + */ + public async getSubtitleWithTicks (routeItemId: string, routeMediaSourceId: string, routeIndex: number, routeStartPositionTicks: number, routeFormat: string, itemId?: string, mediaSourceId?: string, index?: number, startPositionTicks?: number, format?: string, endPositionTicks?: number, copyTimestamps?: boolean, addVttTimeMap?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/Videos/{routeItemId}/{routeMediaSourceId}/Subtitles/{routeIndex}/{routeStartPositionTicks}/Stream.{routeFormat}' + .replace('{' + 'routeItemId' + '}', encodeURIComponent(String(routeItemId))) + .replace('{' + 'routeMediaSourceId' + '}', encodeURIComponent(String(routeMediaSourceId))) + .replace('{' + 'routeIndex' + '}', encodeURIComponent(String(routeIndex))) + .replace('{' + 'routeStartPositionTicks' + '}', encodeURIComponent(String(routeStartPositionTicks))) + .replace('{' + 'routeFormat' + '}', encodeURIComponent(String(routeFormat))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['text/*']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'routeItemId' is not null or undefined + if (routeItemId === null || routeItemId === undefined) { + throw new Error('Required parameter routeItemId was null or undefined when calling getSubtitleWithTicks.'); + } + + // verify required parameter 'routeMediaSourceId' is not null or undefined + if (routeMediaSourceId === null || routeMediaSourceId === undefined) { + throw new Error('Required parameter routeMediaSourceId was null or undefined when calling getSubtitleWithTicks.'); + } + + // verify required parameter 'routeIndex' is not null or undefined + if (routeIndex === null || routeIndex === undefined) { + throw new Error('Required parameter routeIndex was null or undefined when calling getSubtitleWithTicks.'); + } + + // verify required parameter 'routeStartPositionTicks' is not null or undefined + if (routeStartPositionTicks === null || routeStartPositionTicks === undefined) { + throw new Error('Required parameter routeStartPositionTicks was null or undefined when calling getSubtitleWithTicks.'); + } + + // verify required parameter 'routeFormat' is not null or undefined + if (routeFormat === null || routeFormat === undefined) { + throw new Error('Required parameter routeFormat was null or undefined when calling getSubtitleWithTicks.'); + } + + if (itemId !== undefined) { + localVarQueryParameters['itemId'] = ObjectSerializer.serialize(itemId, "string"); + } + + if (mediaSourceId !== undefined) { + localVarQueryParameters['mediaSourceId'] = ObjectSerializer.serialize(mediaSourceId, "string"); + } + + if (index !== undefined) { + localVarQueryParameters['index'] = ObjectSerializer.serialize(index, "number"); + } + + if (startPositionTicks !== undefined) { + localVarQueryParameters['startPositionTicks'] = ObjectSerializer.serialize(startPositionTicks, "number"); + } + + if (format !== undefined) { + localVarQueryParameters['format'] = ObjectSerializer.serialize(format, "string"); + } + + if (endPositionTicks !== undefined) { + localVarQueryParameters['endPositionTicks'] = ObjectSerializer.serialize(endPositionTicks, "number"); + } + + if (copyTimestamps !== undefined) { + localVarQueryParameters['copyTimestamps'] = ObjectSerializer.serialize(copyTimestamps, "boolean"); + } + + if (addVttTimeMap !== undefined) { + localVarQueryParameters['addVttTimeMap'] = ObjectSerializer.serialize(addVttTimeMap, "boolean"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Search remote subtitles. + * @param itemId The item id. + * @param language The language of the subtitles. + * @param isPerfectMatch Optional. Only show subtitles which are a perfect match. + */ + public async searchRemoteSubtitles (itemId: string, language: string, isPerfectMatch?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array; }> { + const localVarPath = this.basePath + '/Items/{itemId}/RemoteSearch/Subtitles/{language}' + .replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId))) + .replace('{' + 'language' + '}', encodeURIComponent(String(language))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'itemId' is not null or undefined + if (itemId === null || itemId === undefined) { + throw new Error('Required parameter itemId was null or undefined when calling searchRemoteSubtitles.'); + } + + // verify required parameter 'language' is not null or undefined + if (language === null || language === undefined) { + throw new Error('Required parameter language was null or undefined when calling searchRemoteSubtitles.'); + } + + if (isPerfectMatch !== undefined) { + localVarQueryParameters['isPerfectMatch'] = ObjectSerializer.serialize(isPerfectMatch, "boolean"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Array; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Array"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Upload an external subtitle file. + * @param itemId The item the subtitle belongs to. + * @param uploadSubtitleRequest The request body. + */ + public async uploadSubtitle (itemId: string, uploadSubtitleRequest: UploadSubtitleRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Videos/{itemId}/Subtitles' + .replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + // verify required parameter 'itemId' is not null or undefined + if (itemId === null || itemId === undefined) { + throw new Error('Required parameter itemId was null or undefined when calling uploadSubtitle.'); + } + + // verify required parameter 'uploadSubtitleRequest' is not null or undefined + if (uploadSubtitleRequest === null || uploadSubtitleRequest === undefined) { + throw new Error('Required parameter uploadSubtitleRequest was null or undefined when calling uploadSubtitle.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: ObjectSerializer.serialize(uploadSubtitleRequest, "UploadSubtitleRequest") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} diff --git a/jellyfin/api/suggestionsApi.ts b/jellyfin/api/suggestionsApi.ts new file mode 100644 index 0000000..a403b45 --- /dev/null +++ b/jellyfin/api/suggestionsApi.ts @@ -0,0 +1,190 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import localVarRequest from 'request'; +import http from 'http'; + +/* tslint:disable:no-unused-locals */ +import { BaseItemDtoQueryResult } from '../model/baseItemDtoQueryResult'; +import { BaseItemKind } from '../model/baseItemKind'; + +import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; +import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; + +import { HttpError, RequestFile } from './apis'; + +let defaultBasePath = 'http://localhost'; + +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== + +export enum SuggestionsApiApiKeys { + CustomAuthentication, +} + +export class SuggestionsApi { + protected _basePath = defaultBasePath; + protected _defaultHeaders : any = {}; + protected _useQuerystring : boolean = false; + + protected authentications = { + 'default': new VoidAuth(), + 'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'), + } + + protected interceptors: Interceptor[] = []; + + constructor(basePath?: string); + constructor(basePathOrUsername: string, password?: string, basePath?: string) { + if (password) { + if (basePath) { + this.basePath = basePath; + } + } else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername + } + } + } + + set useQuerystring(value: boolean) { + this._useQuerystring = value; + } + + set basePath(basePath: string) { + this._basePath = basePath; + } + + set defaultHeaders(defaultHeaders: any) { + this._defaultHeaders = defaultHeaders; + } + + get defaultHeaders() { + return this._defaultHeaders; + } + + get basePath() { + return this._basePath; + } + + public setDefaultAuthentication(auth: Authentication) { + this.authentications.default = auth; + } + + public setApiKey(key: SuggestionsApiApiKeys, value: string) { + (this.authentications as any)[SuggestionsApiApiKeys[key]].apiKey = value; + } + + public addInterceptor(interceptor: Interceptor) { + this.interceptors.push(interceptor); + } + + /** + * + * @summary Gets suggestions. + * @param userId The user id. + * @param mediaType The media types. + * @param type The type. + * @param startIndex Optional. The start index. + * @param limit Optional. The limit. + * @param enableTotalRecordCount Whether to enable the total record count. + */ + public async getSuggestions (userId: string, mediaType?: Array, type?: Array, startIndex?: number, limit?: number, enableTotalRecordCount?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }> { + const localVarPath = this.basePath + '/Users/{userId}/Suggestions' + .replace('{' + 'userId' + '}', encodeURIComponent(String(userId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'userId' is not null or undefined + if (userId === null || userId === undefined) { + throw new Error('Required parameter userId was null or undefined when calling getSuggestions.'); + } + + if (mediaType !== undefined) { + localVarQueryParameters['mediaType'] = ObjectSerializer.serialize(mediaType, "Array"); + } + + if (type !== undefined) { + localVarQueryParameters['type'] = ObjectSerializer.serialize(type, "Array"); + } + + if (startIndex !== undefined) { + localVarQueryParameters['startIndex'] = ObjectSerializer.serialize(startIndex, "number"); + } + + if (limit !== undefined) { + localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); + } + + if (enableTotalRecordCount !== undefined) { + localVarQueryParameters['enableTotalRecordCount'] = ObjectSerializer.serialize(enableTotalRecordCount, "boolean"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "BaseItemDtoQueryResult"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} diff --git a/jellyfin/api/syncPlayApi.ts b/jellyfin/api/syncPlayApi.ts new file mode 100644 index 0000000..79040eb --- /dev/null +++ b/jellyfin/api/syncPlayApi.ts @@ -0,0 +1,1425 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import localVarRequest from 'request'; +import http from 'http'; + +/* tslint:disable:no-unused-locals */ +import { GroupInfoDto } from '../model/groupInfoDto'; +import { SyncPlayBufferingRequest } from '../model/syncPlayBufferingRequest'; +import { SyncPlayCreateGroupRequest } from '../model/syncPlayCreateGroupRequest'; +import { SyncPlayJoinGroupRequest } from '../model/syncPlayJoinGroupRequest'; +import { SyncPlayMovePlaylistItemRequest } from '../model/syncPlayMovePlaylistItemRequest'; +import { SyncPlayNextItemRequest } from '../model/syncPlayNextItemRequest'; +import { SyncPlayPingRequest } from '../model/syncPlayPingRequest'; +import { SyncPlayPreviousItemRequest } from '../model/syncPlayPreviousItemRequest'; +import { SyncPlayQueueRequest } from '../model/syncPlayQueueRequest'; +import { SyncPlayReadyRequest } from '../model/syncPlayReadyRequest'; +import { SyncPlayRemoveFromPlaylistRequest } from '../model/syncPlayRemoveFromPlaylistRequest'; +import { SyncPlaySeekRequest } from '../model/syncPlaySeekRequest'; +import { SyncPlaySetIgnoreWaitRequest } from '../model/syncPlaySetIgnoreWaitRequest'; +import { SyncPlaySetNewQueueRequest } from '../model/syncPlaySetNewQueueRequest'; +import { SyncPlaySetPlaylistItemRequest } from '../model/syncPlaySetPlaylistItemRequest'; +import { SyncPlaySetRepeatModeRequest } from '../model/syncPlaySetRepeatModeRequest'; +import { SyncPlaySetShuffleModeRequest } from '../model/syncPlaySetShuffleModeRequest'; + +import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; +import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; + +import { HttpError, RequestFile } from './apis'; + +let defaultBasePath = 'http://localhost'; + +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== + +export enum SyncPlayApiApiKeys { + CustomAuthentication, +} + +export class SyncPlayApi { + protected _basePath = defaultBasePath; + protected _defaultHeaders : any = {}; + protected _useQuerystring : boolean = false; + + protected authentications = { + 'default': new VoidAuth(), + 'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'), + } + + protected interceptors: Interceptor[] = []; + + constructor(basePath?: string); + constructor(basePathOrUsername: string, password?: string, basePath?: string) { + if (password) { + if (basePath) { + this.basePath = basePath; + } + } else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername + } + } + } + + set useQuerystring(value: boolean) { + this._useQuerystring = value; + } + + set basePath(basePath: string) { + this._basePath = basePath; + } + + set defaultHeaders(defaultHeaders: any) { + this._defaultHeaders = defaultHeaders; + } + + get defaultHeaders() { + return this._defaultHeaders; + } + + get basePath() { + return this._basePath; + } + + public setDefaultAuthentication(auth: Authentication) { + this.authentications.default = auth; + } + + public setApiKey(key: SyncPlayApiApiKeys, value: string) { + (this.authentications as any)[SyncPlayApiApiKeys[key]].apiKey = value; + } + + public addInterceptor(interceptor: Interceptor) { + this.interceptors.push(interceptor); + } + + /** + * + * @summary Notify SyncPlay group that member is buffering. + * @param syncPlayBufferingRequest The player status. + */ + public async syncPlayBuffering (syncPlayBufferingRequest: SyncPlayBufferingRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/SyncPlay/Buffering'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + // verify required parameter 'syncPlayBufferingRequest' is not null or undefined + if (syncPlayBufferingRequest === null || syncPlayBufferingRequest === undefined) { + throw new Error('Required parameter syncPlayBufferingRequest was null or undefined when calling syncPlayBuffering.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: ObjectSerializer.serialize(syncPlayBufferingRequest, "SyncPlayBufferingRequest") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Create a new SyncPlay group. + * @param syncPlayCreateGroupRequest The settings of the new group. + */ + public async syncPlayCreateGroup (syncPlayCreateGroupRequest: SyncPlayCreateGroupRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/SyncPlay/New'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + // verify required parameter 'syncPlayCreateGroupRequest' is not null or undefined + if (syncPlayCreateGroupRequest === null || syncPlayCreateGroupRequest === undefined) { + throw new Error('Required parameter syncPlayCreateGroupRequest was null or undefined when calling syncPlayCreateGroup.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: ObjectSerializer.serialize(syncPlayCreateGroupRequest, "SyncPlayCreateGroupRequest") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets all SyncPlay groups. + */ + public async syncPlayGetGroups (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array; }> { + const localVarPath = this.basePath + '/SyncPlay/List'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Array; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Array"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Join an existing SyncPlay group. + * @param syncPlayJoinGroupRequest The group to join. + */ + public async syncPlayJoinGroup (syncPlayJoinGroupRequest: SyncPlayJoinGroupRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/SyncPlay/Join'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + // verify required parameter 'syncPlayJoinGroupRequest' is not null or undefined + if (syncPlayJoinGroupRequest === null || syncPlayJoinGroupRequest === undefined) { + throw new Error('Required parameter syncPlayJoinGroupRequest was null or undefined when calling syncPlayJoinGroup.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: ObjectSerializer.serialize(syncPlayJoinGroupRequest, "SyncPlayJoinGroupRequest") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Leave the joined SyncPlay group. + */ + public async syncPlayLeaveGroup (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/SyncPlay/Leave'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Request to move an item in the playlist in SyncPlay group. + * @param syncPlayMovePlaylistItemRequest The new position for the item. + */ + public async syncPlayMovePlaylistItem (syncPlayMovePlaylistItemRequest: SyncPlayMovePlaylistItemRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/SyncPlay/MovePlaylistItem'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + // verify required parameter 'syncPlayMovePlaylistItemRequest' is not null or undefined + if (syncPlayMovePlaylistItemRequest === null || syncPlayMovePlaylistItemRequest === undefined) { + throw new Error('Required parameter syncPlayMovePlaylistItemRequest was null or undefined when calling syncPlayMovePlaylistItem.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: ObjectSerializer.serialize(syncPlayMovePlaylistItemRequest, "SyncPlayMovePlaylistItemRequest") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Request next item in SyncPlay group. + * @param syncPlayNextItemRequest The current item information. + */ + public async syncPlayNextItem (syncPlayNextItemRequest: SyncPlayNextItemRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/SyncPlay/NextItem'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + // verify required parameter 'syncPlayNextItemRequest' is not null or undefined + if (syncPlayNextItemRequest === null || syncPlayNextItemRequest === undefined) { + throw new Error('Required parameter syncPlayNextItemRequest was null or undefined when calling syncPlayNextItem.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: ObjectSerializer.serialize(syncPlayNextItemRequest, "SyncPlayNextItemRequest") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Request pause in SyncPlay group. + */ + public async syncPlayPause (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/SyncPlay/Pause'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Update session ping. + * @param syncPlayPingRequest The new ping. + */ + public async syncPlayPing (syncPlayPingRequest: SyncPlayPingRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/SyncPlay/Ping'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + // verify required parameter 'syncPlayPingRequest' is not null or undefined + if (syncPlayPingRequest === null || syncPlayPingRequest === undefined) { + throw new Error('Required parameter syncPlayPingRequest was null or undefined when calling syncPlayPing.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: ObjectSerializer.serialize(syncPlayPingRequest, "SyncPlayPingRequest") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Request previous item in SyncPlay group. + * @param syncPlayPreviousItemRequest The current item information. + */ + public async syncPlayPreviousItem (syncPlayPreviousItemRequest: SyncPlayPreviousItemRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/SyncPlay/PreviousItem'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + // verify required parameter 'syncPlayPreviousItemRequest' is not null or undefined + if (syncPlayPreviousItemRequest === null || syncPlayPreviousItemRequest === undefined) { + throw new Error('Required parameter syncPlayPreviousItemRequest was null or undefined when calling syncPlayPreviousItem.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: ObjectSerializer.serialize(syncPlayPreviousItemRequest, "SyncPlayPreviousItemRequest") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Request to queue items to the playlist of a SyncPlay group. + * @param syncPlayQueueRequest The items to add. + */ + public async syncPlayQueue (syncPlayQueueRequest: SyncPlayQueueRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/SyncPlay/Queue'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + // verify required parameter 'syncPlayQueueRequest' is not null or undefined + if (syncPlayQueueRequest === null || syncPlayQueueRequest === undefined) { + throw new Error('Required parameter syncPlayQueueRequest was null or undefined when calling syncPlayQueue.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: ObjectSerializer.serialize(syncPlayQueueRequest, "SyncPlayQueueRequest") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Notify SyncPlay group that member is ready for playback. + * @param syncPlayReadyRequest The player status. + */ + public async syncPlayReady (syncPlayReadyRequest: SyncPlayReadyRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/SyncPlay/Ready'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + // verify required parameter 'syncPlayReadyRequest' is not null or undefined + if (syncPlayReadyRequest === null || syncPlayReadyRequest === undefined) { + throw new Error('Required parameter syncPlayReadyRequest was null or undefined when calling syncPlayReady.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: ObjectSerializer.serialize(syncPlayReadyRequest, "SyncPlayReadyRequest") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Request to remove items from the playlist in SyncPlay group. + * @param syncPlayRemoveFromPlaylistRequest The items to remove. + */ + public async syncPlayRemoveFromPlaylist (syncPlayRemoveFromPlaylistRequest: SyncPlayRemoveFromPlaylistRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/SyncPlay/RemoveFromPlaylist'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + // verify required parameter 'syncPlayRemoveFromPlaylistRequest' is not null or undefined + if (syncPlayRemoveFromPlaylistRequest === null || syncPlayRemoveFromPlaylistRequest === undefined) { + throw new Error('Required parameter syncPlayRemoveFromPlaylistRequest was null or undefined when calling syncPlayRemoveFromPlaylist.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: ObjectSerializer.serialize(syncPlayRemoveFromPlaylistRequest, "SyncPlayRemoveFromPlaylistRequest") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Request seek in SyncPlay group. + * @param syncPlaySeekRequest The new playback position. + */ + public async syncPlaySeek (syncPlaySeekRequest: SyncPlaySeekRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/SyncPlay/Seek'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + // verify required parameter 'syncPlaySeekRequest' is not null or undefined + if (syncPlaySeekRequest === null || syncPlaySeekRequest === undefined) { + throw new Error('Required parameter syncPlaySeekRequest was null or undefined when calling syncPlaySeek.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: ObjectSerializer.serialize(syncPlaySeekRequest, "SyncPlaySeekRequest") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Request SyncPlay group to ignore member during group-wait. + * @param syncPlaySetIgnoreWaitRequest The settings to set. + */ + public async syncPlaySetIgnoreWait (syncPlaySetIgnoreWaitRequest: SyncPlaySetIgnoreWaitRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/SyncPlay/SetIgnoreWait'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + // verify required parameter 'syncPlaySetIgnoreWaitRequest' is not null or undefined + if (syncPlaySetIgnoreWaitRequest === null || syncPlaySetIgnoreWaitRequest === undefined) { + throw new Error('Required parameter syncPlaySetIgnoreWaitRequest was null or undefined when calling syncPlaySetIgnoreWait.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: ObjectSerializer.serialize(syncPlaySetIgnoreWaitRequest, "SyncPlaySetIgnoreWaitRequest") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Request to set new playlist in SyncPlay group. + * @param syncPlaySetNewQueueRequest The new playlist to play in the group. + */ + public async syncPlaySetNewQueue (syncPlaySetNewQueueRequest: SyncPlaySetNewQueueRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/SyncPlay/SetNewQueue'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + // verify required parameter 'syncPlaySetNewQueueRequest' is not null or undefined + if (syncPlaySetNewQueueRequest === null || syncPlaySetNewQueueRequest === undefined) { + throw new Error('Required parameter syncPlaySetNewQueueRequest was null or undefined when calling syncPlaySetNewQueue.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: ObjectSerializer.serialize(syncPlaySetNewQueueRequest, "SyncPlaySetNewQueueRequest") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Request to change playlist item in SyncPlay group. + * @param syncPlaySetPlaylistItemRequest The new item to play. + */ + public async syncPlaySetPlaylistItem (syncPlaySetPlaylistItemRequest: SyncPlaySetPlaylistItemRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/SyncPlay/SetPlaylistItem'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + // verify required parameter 'syncPlaySetPlaylistItemRequest' is not null or undefined + if (syncPlaySetPlaylistItemRequest === null || syncPlaySetPlaylistItemRequest === undefined) { + throw new Error('Required parameter syncPlaySetPlaylistItemRequest was null or undefined when calling syncPlaySetPlaylistItem.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: ObjectSerializer.serialize(syncPlaySetPlaylistItemRequest, "SyncPlaySetPlaylistItemRequest") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Request to set repeat mode in SyncPlay group. + * @param syncPlaySetRepeatModeRequest The new repeat mode. + */ + public async syncPlaySetRepeatMode (syncPlaySetRepeatModeRequest: SyncPlaySetRepeatModeRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/SyncPlay/SetRepeatMode'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + // verify required parameter 'syncPlaySetRepeatModeRequest' is not null or undefined + if (syncPlaySetRepeatModeRequest === null || syncPlaySetRepeatModeRequest === undefined) { + throw new Error('Required parameter syncPlaySetRepeatModeRequest was null or undefined when calling syncPlaySetRepeatMode.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: ObjectSerializer.serialize(syncPlaySetRepeatModeRequest, "SyncPlaySetRepeatModeRequest") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Request to set shuffle mode in SyncPlay group. + * @param syncPlaySetShuffleModeRequest The new shuffle mode. + */ + public async syncPlaySetShuffleMode (syncPlaySetShuffleModeRequest: SyncPlaySetShuffleModeRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/SyncPlay/SetShuffleMode'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + // verify required parameter 'syncPlaySetShuffleModeRequest' is not null or undefined + if (syncPlaySetShuffleModeRequest === null || syncPlaySetShuffleModeRequest === undefined) { + throw new Error('Required parameter syncPlaySetShuffleModeRequest was null or undefined when calling syncPlaySetShuffleMode.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: ObjectSerializer.serialize(syncPlaySetShuffleModeRequest, "SyncPlaySetShuffleModeRequest") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Request stop in SyncPlay group. + */ + public async syncPlayStop (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/SyncPlay/Stop'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Request unpause in SyncPlay group. + */ + public async syncPlayUnpause (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/SyncPlay/Unpause'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} diff --git a/jellyfin/api/systemApi.ts b/jellyfin/api/systemApi.ts new file mode 100644 index 0000000..45f355e --- /dev/null +++ b/jellyfin/api/systemApi.ts @@ -0,0 +1,731 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import localVarRequest from 'request'; +import http from 'http'; + +/* tslint:disable:no-unused-locals */ +import { EndPointInfo } from '../model/endPointInfo'; +import { LogFile } from '../model/logFile'; +import { PublicSystemInfo } from '../model/publicSystemInfo'; +import { SystemInfo } from '../model/systemInfo'; +import { WakeOnLanInfo } from '../model/wakeOnLanInfo'; + +import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; +import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; + +import { HttpError, RequestFile } from './apis'; + +let defaultBasePath = 'http://localhost'; + +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== + +export enum SystemApiApiKeys { + CustomAuthentication, +} + +export class SystemApi { + protected _basePath = defaultBasePath; + protected _defaultHeaders : any = {}; + protected _useQuerystring : boolean = false; + + protected authentications = { + 'default': new VoidAuth(), + 'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'), + } + + protected interceptors: Interceptor[] = []; + + constructor(basePath?: string); + constructor(basePathOrUsername: string, password?: string, basePath?: string) { + if (password) { + if (basePath) { + this.basePath = basePath; + } + } else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername + } + } + } + + set useQuerystring(value: boolean) { + this._useQuerystring = value; + } + + set basePath(basePath: string) { + this._basePath = basePath; + } + + set defaultHeaders(defaultHeaders: any) { + this._defaultHeaders = defaultHeaders; + } + + get defaultHeaders() { + return this._defaultHeaders; + } + + get basePath() { + return this._basePath; + } + + public setDefaultAuthentication(auth: Authentication) { + this.authentications.default = auth; + } + + public setApiKey(key: SystemApiApiKeys, value: string) { + (this.authentications as any)[SystemApiApiKeys[key]].apiKey = value; + } + + public addInterceptor(interceptor: Interceptor) { + this.interceptors.push(interceptor); + } + + /** + * + * @summary Gets information about the request endpoint. + */ + public async getEndpointInfo (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: EndPointInfo; }> { + const localVarPath = this.basePath + '/System/Endpoint'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: EndPointInfo; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "EndPointInfo"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets a log file. + * @param name The name of the log file to get. + */ + public async getLogFile (name: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/System/Logs/Log'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['text/plain']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new Error('Required parameter name was null or undefined when calling getLogFile.'); + } + + if (name !== undefined) { + localVarQueryParameters['name'] = ObjectSerializer.serialize(name, "string"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Pings the system. + */ + public async getPingSystem (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: string; }> { + const localVarPath = this.basePath + '/System/Ping'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: string; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "string"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets public information about the server. + */ + public async getPublicSystemInfo (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: PublicSystemInfo; }> { + const localVarPath = this.basePath + '/System/Info/Public'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: PublicSystemInfo; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "PublicSystemInfo"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets a list of available server log files. + */ + public async getServerLogs (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array; }> { + const localVarPath = this.basePath + '/System/Logs'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Array; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Array"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets information about the server. + */ + public async getSystemInfo (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: SystemInfo; }> { + const localVarPath = this.basePath + '/System/Info'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: SystemInfo; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "SystemInfo"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets wake on lan information. + */ + public async getWakeOnLanInfo (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array; }> { + const localVarPath = this.basePath + '/System/WakeOnLanInfo'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Array; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Array"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Pings the system. + */ + public async postPingSystem (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: string; }> { + const localVarPath = this.basePath + '/System/Ping'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: string; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "string"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Restarts the application. + */ + public async restartApplication (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/System/Restart'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Shuts down the application. + */ + public async shutdownApplication (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/System/Shutdown'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + let localVarFormParams: any = {}; + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} diff --git a/jellyfin/api/timeSyncApi.ts b/jellyfin/api/timeSyncApi.ts new file mode 100644 index 0000000..8af311e --- /dev/null +++ b/jellyfin/api/timeSyncApi.ts @@ -0,0 +1,154 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import localVarRequest from 'request'; +import http from 'http'; + +/* tslint:disable:no-unused-locals */ +import { UtcTimeResponse } from '../model/utcTimeResponse'; + +import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; +import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; + +import { HttpError, RequestFile } from './apis'; + +let defaultBasePath = 'http://localhost'; + +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== + +export enum TimeSyncApiApiKeys { + CustomAuthentication, +} + +export class TimeSyncApi { + protected _basePath = defaultBasePath; + protected _defaultHeaders : any = {}; + protected _useQuerystring : boolean = false; + + protected authentications = { + 'default': new VoidAuth(), + 'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'), + } + + protected interceptors: Interceptor[] = []; + + constructor(basePath?: string); + constructor(basePathOrUsername: string, password?: string, basePath?: string) { + if (password) { + if (basePath) { + this.basePath = basePath; + } + } else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername + } + } + } + + set useQuerystring(value: boolean) { + this._useQuerystring = value; + } + + set basePath(basePath: string) { + this._basePath = basePath; + } + + set defaultHeaders(defaultHeaders: any) { + this._defaultHeaders = defaultHeaders; + } + + get defaultHeaders() { + return this._defaultHeaders; + } + + get basePath() { + return this._basePath; + } + + public setDefaultAuthentication(auth: Authentication) { + this.authentications.default = auth; + } + + public setApiKey(key: TimeSyncApiApiKeys, value: string) { + (this.authentications as any)[TimeSyncApiApiKeys[key]].apiKey = value; + } + + public addInterceptor(interceptor: Interceptor) { + this.interceptors.push(interceptor); + } + + /** + * + * @summary Gets the current UTC time. + */ + public async getUtcTime (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: UtcTimeResponse; }> { + const localVarPath = this.basePath + '/GetUtcTime'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: UtcTimeResponse; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "UtcTimeResponse"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} diff --git a/jellyfin/api/tmdbApi.ts b/jellyfin/api/tmdbApi.ts new file mode 100644 index 0000000..01ffb7a --- /dev/null +++ b/jellyfin/api/tmdbApi.ts @@ -0,0 +1,157 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import localVarRequest from 'request'; +import http from 'http'; + +/* tslint:disable:no-unused-locals */ +import { ConfigImageTypes } from '../model/configImageTypes'; + +import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; +import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; + +import { HttpError, RequestFile } from './apis'; + +let defaultBasePath = 'http://localhost'; + +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== + +export enum TmdbApiApiKeys { + CustomAuthentication, +} + +export class TmdbApi { + protected _basePath = defaultBasePath; + protected _defaultHeaders : any = {}; + protected _useQuerystring : boolean = false; + + protected authentications = { + 'default': new VoidAuth(), + 'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'), + } + + protected interceptors: Interceptor[] = []; + + constructor(basePath?: string); + constructor(basePathOrUsername: string, password?: string, basePath?: string) { + if (password) { + if (basePath) { + this.basePath = basePath; + } + } else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername + } + } + } + + set useQuerystring(value: boolean) { + this._useQuerystring = value; + } + + set basePath(basePath: string) { + this._basePath = basePath; + } + + set defaultHeaders(defaultHeaders: any) { + this._defaultHeaders = defaultHeaders; + } + + get defaultHeaders() { + return this._defaultHeaders; + } + + get basePath() { + return this._basePath; + } + + public setDefaultAuthentication(auth: Authentication) { + this.authentications.default = auth; + } + + public setApiKey(key: TmdbApiApiKeys, value: string) { + (this.authentications as any)[TmdbApiApiKeys[key]].apiKey = value; + } + + public addInterceptor(interceptor: Interceptor) { + this.interceptors.push(interceptor); + } + + /** + * + * @summary Gets the TMDb image configuration options. + */ + public async tmdbClientConfiguration (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: ConfigImageTypes; }> { + const localVarPath = this.basePath + '/Tmdb/ClientConfiguration'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: ConfigImageTypes; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "ConfigImageTypes"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} diff --git a/jellyfin/api/trailersApi.ts b/jellyfin/api/trailersApi.ts new file mode 100644 index 0000000..a2a22b6 --- /dev/null +++ b/jellyfin/api/trailersApi.ts @@ -0,0 +1,585 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import localVarRequest from 'request'; +import http from 'http'; + +/* tslint:disable:no-unused-locals */ +import { BaseItemDtoQueryResult } from '../model/baseItemDtoQueryResult'; +import { BaseItemKind } from '../model/baseItemKind'; +import { ImageType } from '../model/imageType'; +import { ItemFields } from '../model/itemFields'; +import { ItemFilter } from '../model/itemFilter'; +import { LocationType } from '../model/locationType'; +import { SeriesStatus } from '../model/seriesStatus'; +import { SortOrder } from '../model/sortOrder'; +import { VideoType } from '../model/videoType'; + +import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; +import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; + +import { HttpError, RequestFile } from './apis'; + +let defaultBasePath = 'http://localhost'; + +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== + +export enum TrailersApiApiKeys { + CustomAuthentication, +} + +export class TrailersApi { + protected _basePath = defaultBasePath; + protected _defaultHeaders : any = {}; + protected _useQuerystring : boolean = false; + + protected authentications = { + 'default': new VoidAuth(), + 'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'), + } + + protected interceptors: Interceptor[] = []; + + constructor(basePath?: string); + constructor(basePathOrUsername: string, password?: string, basePath?: string) { + if (password) { + if (basePath) { + this.basePath = basePath; + } + } else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername + } + } + } + + set useQuerystring(value: boolean) { + this._useQuerystring = value; + } + + set basePath(basePath: string) { + this._basePath = basePath; + } + + set defaultHeaders(defaultHeaders: any) { + this._defaultHeaders = defaultHeaders; + } + + get defaultHeaders() { + return this._defaultHeaders; + } + + get basePath() { + return this._basePath; + } + + public setDefaultAuthentication(auth: Authentication) { + this.authentications.default = auth; + } + + public setApiKey(key: TrailersApiApiKeys, value: string) { + (this.authentications as any)[TrailersApiApiKeys[key]].apiKey = value; + } + + public addInterceptor(interceptor: Interceptor) { + this.interceptors.push(interceptor); + } + + /** + * + * @summary Finds movies and trailers similar to a given trailer. + * @param userId The user id. + * @param maxOfficialRating Optional filter by maximum official rating (PG, PG-13, TV-MA, etc). + * @param hasThemeSong Optional filter by items with theme songs. + * @param hasThemeVideo Optional filter by items with theme videos. + * @param hasSubtitles Optional filter by items with subtitles. + * @param hasSpecialFeature Optional filter by items with special features. + * @param hasTrailer Optional filter by items with trailers. + * @param adjacentTo Optional. Return items that are siblings of a supplied item. + * @param parentIndexNumber Optional filter by parent index number. + * @param hasParentalRating Optional filter by items that have or do not have a parental rating. + * @param isHd Optional filter by items that are HD or not. + * @param is4K Optional filter by items that are 4K or not. + * @param locationTypes Optional. If specified, results will be filtered based on LocationType. This allows multiple, comma delimited. + * @param excludeLocationTypes Optional. If specified, results will be filtered based on the LocationType. This allows multiple, comma delimited. + * @param isMissing Optional filter by items that are missing episodes or not. + * @param isUnaired Optional filter by items that are unaired episodes or not. + * @param minCommunityRating Optional filter by minimum community rating. + * @param minCriticRating Optional filter by minimum critic rating. + * @param minPremiereDate Optional. The minimum premiere date. Format = ISO. + * @param minDateLastSaved Optional. The minimum last saved date. Format = ISO. + * @param minDateLastSavedForUser Optional. The minimum last saved date for the current user. Format = ISO. + * @param maxPremiereDate Optional. The maximum premiere date. Format = ISO. + * @param hasOverview Optional filter by items that have an overview or not. + * @param hasImdbId Optional filter by items that have an imdb id or not. + * @param hasTmdbId Optional filter by items that have a tmdb id or not. + * @param hasTvdbId Optional filter by items that have a tvdb id or not. + * @param isMovie Optional filter for live tv movies. + * @param isSeries Optional filter for live tv series. + * @param isNews Optional filter for live tv news. + * @param isKids Optional filter for live tv kids. + * @param isSports Optional filter for live tv sports. + * @param excludeItemIds Optional. If specified, results will be filtered by excluding item ids. This allows multiple, comma delimited. + * @param startIndex Optional. The record index to start at. All items with a lower index will be dropped from the results. + * @param limit Optional. The maximum number of records to return. + * @param recursive When searching within folders, this determines whether or not the search will be recursive. true/false. + * @param searchTerm Optional. Filter based on a search term. + * @param sortOrder Sort Order - Ascending,Descending. + * @param parentId Specify this to localize the search to a specific item or folder. Omit to use the root. + * @param fields Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimited. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines. + * @param excludeItemTypes Optional. If specified, results will be filtered based on item type. This allows multiple, comma delimited. + * @param filters Optional. Specify additional filters to apply. This allows multiple, comma delimited. Options: IsFolder, IsNotFolder, IsUnplayed, IsPlayed, IsFavorite, IsResumable, Likes, Dislikes. + * @param isFavorite Optional filter by items that are marked as favorite, or not. + * @param mediaTypes Optional filter by MediaType. Allows multiple, comma delimited. + * @param imageTypes Optional. If specified, results will be filtered based on those containing image types. This allows multiple, comma delimited. + * @param sortBy Optional. Specify one or more sort orders, comma delimited. Options: Album, AlbumArtist, Artist, Budget, CommunityRating, CriticRating, DateCreated, DatePlayed, PlayCount, PremiereDate, ProductionYear, SortName, Random, Revenue, Runtime. + * @param isPlayed Optional filter by items that are played, or not. + * @param genres Optional. If specified, results will be filtered based on genre. This allows multiple, pipe delimited. + * @param officialRatings Optional. If specified, results will be filtered based on OfficialRating. This allows multiple, pipe delimited. + * @param tags Optional. If specified, results will be filtered based on tag. This allows multiple, pipe delimited. + * @param years Optional. If specified, results will be filtered based on production year. This allows multiple, comma delimited. + * @param enableUserData Optional, include user data. + * @param imageTypeLimit Optional, the max number of images to return, per image type. + * @param enableImageTypes Optional. The image types to include in the output. + * @param person Optional. If specified, results will be filtered to include only those containing the specified person. + * @param personIds Optional. If specified, results will be filtered to include only those containing the specified person id. + * @param personTypes Optional. If specified, along with Person, results will be filtered to include only those containing the specified person and PersonType. Allows multiple, comma-delimited. + * @param studios Optional. If specified, results will be filtered based on studio. This allows multiple, pipe delimited. + * @param artists Optional. If specified, results will be filtered based on artists. This allows multiple, pipe delimited. + * @param excludeArtistIds Optional. If specified, results will be filtered based on artist id. This allows multiple, pipe delimited. + * @param artistIds Optional. If specified, results will be filtered to include only those containing the specified artist id. + * @param albumArtistIds Optional. If specified, results will be filtered to include only those containing the specified album artist id. + * @param contributingArtistIds Optional. If specified, results will be filtered to include only those containing the specified contributing artist id. + * @param albums Optional. If specified, results will be filtered based on album. This allows multiple, pipe delimited. + * @param albumIds Optional. If specified, results will be filtered based on album id. This allows multiple, pipe delimited. + * @param ids Optional. If specific items are needed, specify a list of item id\'s to retrieve. This allows multiple, comma delimited. + * @param videoTypes Optional filter by VideoType (videofile, dvd, bluray, iso). Allows multiple, comma delimited. + * @param minOfficialRating Optional filter by minimum official rating (PG, PG-13, TV-MA, etc). + * @param isLocked Optional filter by items that are locked. + * @param isPlaceHolder Optional filter by items that are placeholders. + * @param hasOfficialRating Optional filter by items that have official ratings. + * @param collapseBoxSetItems Whether or not to hide items behind their boxsets. + * @param minWidth Optional. Filter by the minimum width of the item. + * @param minHeight Optional. Filter by the minimum height of the item. + * @param maxWidth Optional. Filter by the maximum width of the item. + * @param maxHeight Optional. Filter by the maximum height of the item. + * @param is3D Optional filter by items that are 3D, or not. + * @param seriesStatus Optional filter by Series Status. Allows multiple, comma delimited. + * @param nameStartsWithOrGreater Optional filter by items whose name is sorted equally or greater than a given input string. + * @param nameStartsWith Optional filter by items whose name is sorted equally than a given input string. + * @param nameLessThan Optional filter by items whose name is equally or lesser than a given input string. + * @param studioIds Optional. If specified, results will be filtered based on studio id. This allows multiple, pipe delimited. + * @param genreIds Optional. If specified, results will be filtered based on genre id. This allows multiple, pipe delimited. + * @param enableTotalRecordCount Optional. Enable the total record count. + * @param enableImages Optional, include image information in output. + */ + public async getTrailers (userId?: string, maxOfficialRating?: string, hasThemeSong?: boolean, hasThemeVideo?: boolean, hasSubtitles?: boolean, hasSpecialFeature?: boolean, hasTrailer?: boolean, adjacentTo?: string, parentIndexNumber?: number, hasParentalRating?: boolean, isHd?: boolean, is4K?: boolean, locationTypes?: Array, excludeLocationTypes?: Array, isMissing?: boolean, isUnaired?: boolean, minCommunityRating?: number, minCriticRating?: number, minPremiereDate?: Date, minDateLastSaved?: Date, minDateLastSavedForUser?: Date, maxPremiereDate?: Date, hasOverview?: boolean, hasImdbId?: boolean, hasTmdbId?: boolean, hasTvdbId?: boolean, isMovie?: boolean, isSeries?: boolean, isNews?: boolean, isKids?: boolean, isSports?: boolean, excludeItemIds?: Array, startIndex?: number, limit?: number, recursive?: boolean, searchTerm?: string, sortOrder?: Array, parentId?: string, fields?: Array, excludeItemTypes?: Array, filters?: Array, isFavorite?: boolean, mediaTypes?: Array, imageTypes?: Array, sortBy?: Array, isPlayed?: boolean, genres?: Array, officialRatings?: Array, tags?: Array, years?: Array, enableUserData?: boolean, imageTypeLimit?: number, enableImageTypes?: Array, person?: string, personIds?: Array, personTypes?: Array, studios?: Array, artists?: Array, excludeArtistIds?: Array, artistIds?: Array, albumArtistIds?: Array, contributingArtistIds?: Array, albums?: Array, albumIds?: Array, ids?: Array, videoTypes?: Array, minOfficialRating?: string, isLocked?: boolean, isPlaceHolder?: boolean, hasOfficialRating?: boolean, collapseBoxSetItems?: boolean, minWidth?: number, minHeight?: number, maxWidth?: number, maxHeight?: number, is3D?: boolean, seriesStatus?: Array, nameStartsWithOrGreater?: string, nameStartsWith?: string, nameLessThan?: string, studioIds?: Array, genreIds?: Array, enableTotalRecordCount?: boolean, enableImages?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }> { + const localVarPath = this.basePath + '/Trailers'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + if (userId !== undefined) { + localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string"); + } + + if (maxOfficialRating !== undefined) { + localVarQueryParameters['maxOfficialRating'] = ObjectSerializer.serialize(maxOfficialRating, "string"); + } + + if (hasThemeSong !== undefined) { + localVarQueryParameters['hasThemeSong'] = ObjectSerializer.serialize(hasThemeSong, "boolean"); + } + + if (hasThemeVideo !== undefined) { + localVarQueryParameters['hasThemeVideo'] = ObjectSerializer.serialize(hasThemeVideo, "boolean"); + } + + if (hasSubtitles !== undefined) { + localVarQueryParameters['hasSubtitles'] = ObjectSerializer.serialize(hasSubtitles, "boolean"); + } + + if (hasSpecialFeature !== undefined) { + localVarQueryParameters['hasSpecialFeature'] = ObjectSerializer.serialize(hasSpecialFeature, "boolean"); + } + + if (hasTrailer !== undefined) { + localVarQueryParameters['hasTrailer'] = ObjectSerializer.serialize(hasTrailer, "boolean"); + } + + if (adjacentTo !== undefined) { + localVarQueryParameters['adjacentTo'] = ObjectSerializer.serialize(adjacentTo, "string"); + } + + if (parentIndexNumber !== undefined) { + localVarQueryParameters['parentIndexNumber'] = ObjectSerializer.serialize(parentIndexNumber, "number"); + } + + if (hasParentalRating !== undefined) { + localVarQueryParameters['hasParentalRating'] = ObjectSerializer.serialize(hasParentalRating, "boolean"); + } + + if (isHd !== undefined) { + localVarQueryParameters['isHd'] = ObjectSerializer.serialize(isHd, "boolean"); + } + + if (is4K !== undefined) { + localVarQueryParameters['is4K'] = ObjectSerializer.serialize(is4K, "boolean"); + } + + if (locationTypes !== undefined) { + localVarQueryParameters['locationTypes'] = ObjectSerializer.serialize(locationTypes, "Array"); + } + + if (excludeLocationTypes !== undefined) { + localVarQueryParameters['excludeLocationTypes'] = ObjectSerializer.serialize(excludeLocationTypes, "Array"); + } + + if (isMissing !== undefined) { + localVarQueryParameters['isMissing'] = ObjectSerializer.serialize(isMissing, "boolean"); + } + + if (isUnaired !== undefined) { + localVarQueryParameters['isUnaired'] = ObjectSerializer.serialize(isUnaired, "boolean"); + } + + if (minCommunityRating !== undefined) { + localVarQueryParameters['minCommunityRating'] = ObjectSerializer.serialize(minCommunityRating, "number"); + } + + if (minCriticRating !== undefined) { + localVarQueryParameters['minCriticRating'] = ObjectSerializer.serialize(minCriticRating, "number"); + } + + if (minPremiereDate !== undefined) { + localVarQueryParameters['minPremiereDate'] = ObjectSerializer.serialize(minPremiereDate, "Date"); + } + + if (minDateLastSaved !== undefined) { + localVarQueryParameters['minDateLastSaved'] = ObjectSerializer.serialize(minDateLastSaved, "Date"); + } + + if (minDateLastSavedForUser !== undefined) { + localVarQueryParameters['minDateLastSavedForUser'] = ObjectSerializer.serialize(minDateLastSavedForUser, "Date"); + } + + if (maxPremiereDate !== undefined) { + localVarQueryParameters['maxPremiereDate'] = ObjectSerializer.serialize(maxPremiereDate, "Date"); + } + + if (hasOverview !== undefined) { + localVarQueryParameters['hasOverview'] = ObjectSerializer.serialize(hasOverview, "boolean"); + } + + if (hasImdbId !== undefined) { + localVarQueryParameters['hasImdbId'] = ObjectSerializer.serialize(hasImdbId, "boolean"); + } + + if (hasTmdbId !== undefined) { + localVarQueryParameters['hasTmdbId'] = ObjectSerializer.serialize(hasTmdbId, "boolean"); + } + + if (hasTvdbId !== undefined) { + localVarQueryParameters['hasTvdbId'] = ObjectSerializer.serialize(hasTvdbId, "boolean"); + } + + if (isMovie !== undefined) { + localVarQueryParameters['isMovie'] = ObjectSerializer.serialize(isMovie, "boolean"); + } + + if (isSeries !== undefined) { + localVarQueryParameters['isSeries'] = ObjectSerializer.serialize(isSeries, "boolean"); + } + + if (isNews !== undefined) { + localVarQueryParameters['isNews'] = ObjectSerializer.serialize(isNews, "boolean"); + } + + if (isKids !== undefined) { + localVarQueryParameters['isKids'] = ObjectSerializer.serialize(isKids, "boolean"); + } + + if (isSports !== undefined) { + localVarQueryParameters['isSports'] = ObjectSerializer.serialize(isSports, "boolean"); + } + + if (excludeItemIds !== undefined) { + localVarQueryParameters['excludeItemIds'] = ObjectSerializer.serialize(excludeItemIds, "Array"); + } + + if (startIndex !== undefined) { + localVarQueryParameters['startIndex'] = ObjectSerializer.serialize(startIndex, "number"); + } + + if (limit !== undefined) { + localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); + } + + if (recursive !== undefined) { + localVarQueryParameters['recursive'] = ObjectSerializer.serialize(recursive, "boolean"); + } + + if (searchTerm !== undefined) { + localVarQueryParameters['searchTerm'] = ObjectSerializer.serialize(searchTerm, "string"); + } + + if (sortOrder !== undefined) { + localVarQueryParameters['sortOrder'] = ObjectSerializer.serialize(sortOrder, "Array"); + } + + if (parentId !== undefined) { + localVarQueryParameters['parentId'] = ObjectSerializer.serialize(parentId, "string"); + } + + if (fields !== undefined) { + localVarQueryParameters['fields'] = ObjectSerializer.serialize(fields, "Array"); + } + + if (excludeItemTypes !== undefined) { + localVarQueryParameters['excludeItemTypes'] = ObjectSerializer.serialize(excludeItemTypes, "Array"); + } + + if (filters !== undefined) { + localVarQueryParameters['filters'] = ObjectSerializer.serialize(filters, "Array"); + } + + if (isFavorite !== undefined) { + localVarQueryParameters['isFavorite'] = ObjectSerializer.serialize(isFavorite, "boolean"); + } + + if (mediaTypes !== undefined) { + localVarQueryParameters['mediaTypes'] = ObjectSerializer.serialize(mediaTypes, "Array"); + } + + if (imageTypes !== undefined) { + localVarQueryParameters['imageTypes'] = ObjectSerializer.serialize(imageTypes, "Array"); + } + + if (sortBy !== undefined) { + localVarQueryParameters['sortBy'] = ObjectSerializer.serialize(sortBy, "Array"); + } + + if (isPlayed !== undefined) { + localVarQueryParameters['isPlayed'] = ObjectSerializer.serialize(isPlayed, "boolean"); + } + + if (genres !== undefined) { + localVarQueryParameters['genres'] = ObjectSerializer.serialize(genres, "Array"); + } + + if (officialRatings !== undefined) { + localVarQueryParameters['officialRatings'] = ObjectSerializer.serialize(officialRatings, "Array"); + } + + if (tags !== undefined) { + localVarQueryParameters['tags'] = ObjectSerializer.serialize(tags, "Array"); + } + + if (years !== undefined) { + localVarQueryParameters['years'] = ObjectSerializer.serialize(years, "Array"); + } + + if (enableUserData !== undefined) { + localVarQueryParameters['enableUserData'] = ObjectSerializer.serialize(enableUserData, "boolean"); + } + + if (imageTypeLimit !== undefined) { + localVarQueryParameters['imageTypeLimit'] = ObjectSerializer.serialize(imageTypeLimit, "number"); + } + + if (enableImageTypes !== undefined) { + localVarQueryParameters['enableImageTypes'] = ObjectSerializer.serialize(enableImageTypes, "Array"); + } + + if (person !== undefined) { + localVarQueryParameters['person'] = ObjectSerializer.serialize(person, "string"); + } + + if (personIds !== undefined) { + localVarQueryParameters['personIds'] = ObjectSerializer.serialize(personIds, "Array"); + } + + if (personTypes !== undefined) { + localVarQueryParameters['personTypes'] = ObjectSerializer.serialize(personTypes, "Array"); + } + + if (studios !== undefined) { + localVarQueryParameters['studios'] = ObjectSerializer.serialize(studios, "Array"); + } + + if (artists !== undefined) { + localVarQueryParameters['artists'] = ObjectSerializer.serialize(artists, "Array"); + } + + if (excludeArtistIds !== undefined) { + localVarQueryParameters['excludeArtistIds'] = ObjectSerializer.serialize(excludeArtistIds, "Array"); + } + + if (artistIds !== undefined) { + localVarQueryParameters['artistIds'] = ObjectSerializer.serialize(artistIds, "Array"); + } + + if (albumArtistIds !== undefined) { + localVarQueryParameters['albumArtistIds'] = ObjectSerializer.serialize(albumArtistIds, "Array"); + } + + if (contributingArtistIds !== undefined) { + localVarQueryParameters['contributingArtistIds'] = ObjectSerializer.serialize(contributingArtistIds, "Array"); + } + + if (albums !== undefined) { + localVarQueryParameters['albums'] = ObjectSerializer.serialize(albums, "Array"); + } + + if (albumIds !== undefined) { + localVarQueryParameters['albumIds'] = ObjectSerializer.serialize(albumIds, "Array"); + } + + if (ids !== undefined) { + localVarQueryParameters['ids'] = ObjectSerializer.serialize(ids, "Array"); + } + + if (videoTypes !== undefined) { + localVarQueryParameters['videoTypes'] = ObjectSerializer.serialize(videoTypes, "Array"); + } + + if (minOfficialRating !== undefined) { + localVarQueryParameters['minOfficialRating'] = ObjectSerializer.serialize(minOfficialRating, "string"); + } + + if (isLocked !== undefined) { + localVarQueryParameters['isLocked'] = ObjectSerializer.serialize(isLocked, "boolean"); + } + + if (isPlaceHolder !== undefined) { + localVarQueryParameters['isPlaceHolder'] = ObjectSerializer.serialize(isPlaceHolder, "boolean"); + } + + if (hasOfficialRating !== undefined) { + localVarQueryParameters['hasOfficialRating'] = ObjectSerializer.serialize(hasOfficialRating, "boolean"); + } + + if (collapseBoxSetItems !== undefined) { + localVarQueryParameters['collapseBoxSetItems'] = ObjectSerializer.serialize(collapseBoxSetItems, "boolean"); + } + + if (minWidth !== undefined) { + localVarQueryParameters['minWidth'] = ObjectSerializer.serialize(minWidth, "number"); + } + + if (minHeight !== undefined) { + localVarQueryParameters['minHeight'] = ObjectSerializer.serialize(minHeight, "number"); + } + + if (maxWidth !== undefined) { + localVarQueryParameters['maxWidth'] = ObjectSerializer.serialize(maxWidth, "number"); + } + + if (maxHeight !== undefined) { + localVarQueryParameters['maxHeight'] = ObjectSerializer.serialize(maxHeight, "number"); + } + + if (is3D !== undefined) { + localVarQueryParameters['is3D'] = ObjectSerializer.serialize(is3D, "boolean"); + } + + if (seriesStatus !== undefined) { + localVarQueryParameters['seriesStatus'] = ObjectSerializer.serialize(seriesStatus, "Array"); + } + + if (nameStartsWithOrGreater !== undefined) { + localVarQueryParameters['nameStartsWithOrGreater'] = ObjectSerializer.serialize(nameStartsWithOrGreater, "string"); + } + + if (nameStartsWith !== undefined) { + localVarQueryParameters['nameStartsWith'] = ObjectSerializer.serialize(nameStartsWith, "string"); + } + + if (nameLessThan !== undefined) { + localVarQueryParameters['nameLessThan'] = ObjectSerializer.serialize(nameLessThan, "string"); + } + + if (studioIds !== undefined) { + localVarQueryParameters['studioIds'] = ObjectSerializer.serialize(studioIds, "Array"); + } + + if (genreIds !== undefined) { + localVarQueryParameters['genreIds'] = ObjectSerializer.serialize(genreIds, "Array"); + } + + if (enableTotalRecordCount !== undefined) { + localVarQueryParameters['enableTotalRecordCount'] = ObjectSerializer.serialize(enableTotalRecordCount, "boolean"); + } + + if (enableImages !== undefined) { + localVarQueryParameters['enableImages'] = ObjectSerializer.serialize(enableImages, "boolean"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "BaseItemDtoQueryResult"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} diff --git a/jellyfin/api/tvShowsApi.ts b/jellyfin/api/tvShowsApi.ts new file mode 100644 index 0000000..a169ca6 --- /dev/null +++ b/jellyfin/api/tvShowsApi.ts @@ -0,0 +1,599 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import localVarRequest from 'request'; +import http from 'http'; + +/* tslint:disable:no-unused-locals */ +import { BaseItemDtoQueryResult } from '../model/baseItemDtoQueryResult'; +import { ImageType } from '../model/imageType'; +import { ItemFields } from '../model/itemFields'; +import { ProblemDetails } from '../model/problemDetails'; + +import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; +import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; + +import { HttpError, RequestFile } from './apis'; + +let defaultBasePath = 'http://localhost'; + +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== + +export enum TvShowsApiApiKeys { + CustomAuthentication, +} + +export class TvShowsApi { + protected _basePath = defaultBasePath; + protected _defaultHeaders : any = {}; + protected _useQuerystring : boolean = false; + + protected authentications = { + 'default': new VoidAuth(), + 'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'), + } + + protected interceptors: Interceptor[] = []; + + constructor(basePath?: string); + constructor(basePathOrUsername: string, password?: string, basePath?: string) { + if (password) { + if (basePath) { + this.basePath = basePath; + } + } else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername + } + } + } + + set useQuerystring(value: boolean) { + this._useQuerystring = value; + } + + set basePath(basePath: string) { + this._basePath = basePath; + } + + set defaultHeaders(defaultHeaders: any) { + this._defaultHeaders = defaultHeaders; + } + + get defaultHeaders() { + return this._defaultHeaders; + } + + get basePath() { + return this._basePath; + } + + public setDefaultAuthentication(auth: Authentication) { + this.authentications.default = auth; + } + + public setApiKey(key: TvShowsApiApiKeys, value: string) { + (this.authentications as any)[TvShowsApiApiKeys[key]].apiKey = value; + } + + public addInterceptor(interceptor: Interceptor) { + this.interceptors.push(interceptor); + } + + /** + * + * @summary Gets episodes for a tv season. + * @param seriesId The series id. + * @param userId The user id. + * @param fields Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimited. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines, TrailerUrls. + * @param season Optional filter by season number. + * @param seasonId Optional. Filter by season id. + * @param isMissing Optional. Filter by items that are missing episodes or not. + * @param adjacentTo Optional. Return items that are siblings of a supplied item. + * @param startItemId Optional. Skip through the list until a given item is found. + * @param startIndex Optional. The record index to start at. All items with a lower index will be dropped from the results. + * @param limit Optional. The maximum number of records to return. + * @param enableImages Optional, include image information in output. + * @param imageTypeLimit Optional, the max number of images to return, per image type. + * @param enableImageTypes Optional. The image types to include in the output. + * @param enableUserData Optional. Include user data. + * @param sortBy Optional. Specify one or more sort orders, comma delimited. Options: Album, AlbumArtist, Artist, Budget, CommunityRating, CriticRating, DateCreated, DatePlayed, PlayCount, PremiereDate, ProductionYear, SortName, Random, Revenue, Runtime. + */ + public async getEpisodes (seriesId: string, userId?: string, fields?: Array, season?: number, seasonId?: string, isMissing?: boolean, adjacentTo?: string, startItemId?: string, startIndex?: number, limit?: number, enableImages?: boolean, imageTypeLimit?: number, enableImageTypes?: Array, enableUserData?: boolean, sortBy?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }> { + const localVarPath = this.basePath + '/Shows/{seriesId}/Episodes' + .replace('{' + 'seriesId' + '}', encodeURIComponent(String(seriesId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'seriesId' is not null or undefined + if (seriesId === null || seriesId === undefined) { + throw new Error('Required parameter seriesId was null or undefined when calling getEpisodes.'); + } + + if (userId !== undefined) { + localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string"); + } + + if (fields !== undefined) { + localVarQueryParameters['fields'] = ObjectSerializer.serialize(fields, "Array"); + } + + if (season !== undefined) { + localVarQueryParameters['season'] = ObjectSerializer.serialize(season, "number"); + } + + if (seasonId !== undefined) { + localVarQueryParameters['seasonId'] = ObjectSerializer.serialize(seasonId, "string"); + } + + if (isMissing !== undefined) { + localVarQueryParameters['isMissing'] = ObjectSerializer.serialize(isMissing, "boolean"); + } + + if (adjacentTo !== undefined) { + localVarQueryParameters['adjacentTo'] = ObjectSerializer.serialize(adjacentTo, "string"); + } + + if (startItemId !== undefined) { + localVarQueryParameters['startItemId'] = ObjectSerializer.serialize(startItemId, "string"); + } + + if (startIndex !== undefined) { + localVarQueryParameters['startIndex'] = ObjectSerializer.serialize(startIndex, "number"); + } + + if (limit !== undefined) { + localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); + } + + if (enableImages !== undefined) { + localVarQueryParameters['enableImages'] = ObjectSerializer.serialize(enableImages, "boolean"); + } + + if (imageTypeLimit !== undefined) { + localVarQueryParameters['imageTypeLimit'] = ObjectSerializer.serialize(imageTypeLimit, "number"); + } + + if (enableImageTypes !== undefined) { + localVarQueryParameters['enableImageTypes'] = ObjectSerializer.serialize(enableImageTypes, "Array"); + } + + if (enableUserData !== undefined) { + localVarQueryParameters['enableUserData'] = ObjectSerializer.serialize(enableUserData, "boolean"); + } + + if (sortBy !== undefined) { + localVarQueryParameters['sortBy'] = ObjectSerializer.serialize(sortBy, "string"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "BaseItemDtoQueryResult"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets a list of next up episodes. + * @param userId The user id of the user to get the next up episodes for. + * @param startIndex Optional. The record index to start at. All items with a lower index will be dropped from the results. + * @param limit Optional. The maximum number of records to return. + * @param fields Optional. Specify additional fields of information to return in the output. + * @param seriesId Optional. Filter by series id. + * @param parentId Optional. Specify this to localize the search to a specific item or folder. Omit to use the root. + * @param enableImages Optional. Include image information in output. + * @param imageTypeLimit Optional. The max number of images to return, per image type. + * @param enableImageTypes Optional. The image types to include in the output. + * @param enableUserData Optional. Include user data. + * @param nextUpDateCutoff Optional. Starting date of shows to show in Next Up section. + * @param enableTotalRecordCount Whether to enable the total records count. Defaults to true. + * @param disableFirstEpisode Whether to disable sending the first episode in a series as next up. + * @param enableRewatching Whether to include watched episode in next up results. + */ + public async getNextUp (userId?: string, startIndex?: number, limit?: number, fields?: Array, seriesId?: string, parentId?: string, enableImages?: boolean, imageTypeLimit?: number, enableImageTypes?: Array, enableUserData?: boolean, nextUpDateCutoff?: Date, enableTotalRecordCount?: boolean, disableFirstEpisode?: boolean, enableRewatching?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }> { + const localVarPath = this.basePath + '/Shows/NextUp'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + if (userId !== undefined) { + localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string"); + } + + if (startIndex !== undefined) { + localVarQueryParameters['startIndex'] = ObjectSerializer.serialize(startIndex, "number"); + } + + if (limit !== undefined) { + localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); + } + + if (fields !== undefined) { + localVarQueryParameters['fields'] = ObjectSerializer.serialize(fields, "Array"); + } + + if (seriesId !== undefined) { + localVarQueryParameters['seriesId'] = ObjectSerializer.serialize(seriesId, "string"); + } + + if (parentId !== undefined) { + localVarQueryParameters['parentId'] = ObjectSerializer.serialize(parentId, "string"); + } + + if (enableImages !== undefined) { + localVarQueryParameters['enableImages'] = ObjectSerializer.serialize(enableImages, "boolean"); + } + + if (imageTypeLimit !== undefined) { + localVarQueryParameters['imageTypeLimit'] = ObjectSerializer.serialize(imageTypeLimit, "number"); + } + + if (enableImageTypes !== undefined) { + localVarQueryParameters['enableImageTypes'] = ObjectSerializer.serialize(enableImageTypes, "Array"); + } + + if (enableUserData !== undefined) { + localVarQueryParameters['enableUserData'] = ObjectSerializer.serialize(enableUserData, "boolean"); + } + + if (nextUpDateCutoff !== undefined) { + localVarQueryParameters['nextUpDateCutoff'] = ObjectSerializer.serialize(nextUpDateCutoff, "Date"); + } + + if (enableTotalRecordCount !== undefined) { + localVarQueryParameters['enableTotalRecordCount'] = ObjectSerializer.serialize(enableTotalRecordCount, "boolean"); + } + + if (disableFirstEpisode !== undefined) { + localVarQueryParameters['disableFirstEpisode'] = ObjectSerializer.serialize(disableFirstEpisode, "boolean"); + } + + if (enableRewatching !== undefined) { + localVarQueryParameters['enableRewatching'] = ObjectSerializer.serialize(enableRewatching, "boolean"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "BaseItemDtoQueryResult"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets seasons for a tv series. + * @param seriesId The series id. + * @param userId The user id. + * @param fields Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimited. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines, TrailerUrls. + * @param isSpecialSeason Optional. Filter by special season. + * @param isMissing Optional. Filter by items that are missing episodes or not. + * @param adjacentTo Optional. Return items that are siblings of a supplied item. + * @param enableImages Optional. Include image information in output. + * @param imageTypeLimit Optional. The max number of images to return, per image type. + * @param enableImageTypes Optional. The image types to include in the output. + * @param enableUserData Optional. Include user data. + */ + public async getSeasons (seriesId: string, userId?: string, fields?: Array, isSpecialSeason?: boolean, isMissing?: boolean, adjacentTo?: string, enableImages?: boolean, imageTypeLimit?: number, enableImageTypes?: Array, enableUserData?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }> { + const localVarPath = this.basePath + '/Shows/{seriesId}/Seasons' + .replace('{' + 'seriesId' + '}', encodeURIComponent(String(seriesId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'seriesId' is not null or undefined + if (seriesId === null || seriesId === undefined) { + throw new Error('Required parameter seriesId was null or undefined when calling getSeasons.'); + } + + if (userId !== undefined) { + localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string"); + } + + if (fields !== undefined) { + localVarQueryParameters['fields'] = ObjectSerializer.serialize(fields, "Array"); + } + + if (isSpecialSeason !== undefined) { + localVarQueryParameters['isSpecialSeason'] = ObjectSerializer.serialize(isSpecialSeason, "boolean"); + } + + if (isMissing !== undefined) { + localVarQueryParameters['isMissing'] = ObjectSerializer.serialize(isMissing, "boolean"); + } + + if (adjacentTo !== undefined) { + localVarQueryParameters['adjacentTo'] = ObjectSerializer.serialize(adjacentTo, "string"); + } + + if (enableImages !== undefined) { + localVarQueryParameters['enableImages'] = ObjectSerializer.serialize(enableImages, "boolean"); + } + + if (imageTypeLimit !== undefined) { + localVarQueryParameters['imageTypeLimit'] = ObjectSerializer.serialize(imageTypeLimit, "number"); + } + + if (enableImageTypes !== undefined) { + localVarQueryParameters['enableImageTypes'] = ObjectSerializer.serialize(enableImageTypes, "Array"); + } + + if (enableUserData !== undefined) { + localVarQueryParameters['enableUserData'] = ObjectSerializer.serialize(enableUserData, "boolean"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "BaseItemDtoQueryResult"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets a list of upcoming episodes. + * @param userId The user id of the user to get the upcoming episodes for. + * @param startIndex Optional. The record index to start at. All items with a lower index will be dropped from the results. + * @param limit Optional. The maximum number of records to return. + * @param fields Optional. Specify additional fields of information to return in the output. + * @param parentId Optional. Specify this to localize the search to a specific item or folder. Omit to use the root. + * @param enableImages Optional. Include image information in output. + * @param imageTypeLimit Optional. The max number of images to return, per image type. + * @param enableImageTypes Optional. The image types to include in the output. + * @param enableUserData Optional. Include user data. + */ + public async getUpcomingEpisodes (userId?: string, startIndex?: number, limit?: number, fields?: Array, parentId?: string, enableImages?: boolean, imageTypeLimit?: number, enableImageTypes?: Array, enableUserData?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }> { + const localVarPath = this.basePath + '/Shows/Upcoming'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + if (userId !== undefined) { + localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string"); + } + + if (startIndex !== undefined) { + localVarQueryParameters['startIndex'] = ObjectSerializer.serialize(startIndex, "number"); + } + + if (limit !== undefined) { + localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); + } + + if (fields !== undefined) { + localVarQueryParameters['fields'] = ObjectSerializer.serialize(fields, "Array"); + } + + if (parentId !== undefined) { + localVarQueryParameters['parentId'] = ObjectSerializer.serialize(parentId, "string"); + } + + if (enableImages !== undefined) { + localVarQueryParameters['enableImages'] = ObjectSerializer.serialize(enableImages, "boolean"); + } + + if (imageTypeLimit !== undefined) { + localVarQueryParameters['imageTypeLimit'] = ObjectSerializer.serialize(imageTypeLimit, "number"); + } + + if (enableImageTypes !== undefined) { + localVarQueryParameters['enableImageTypes'] = ObjectSerializer.serialize(enableImageTypes, "Array"); + } + + if (enableUserData !== undefined) { + localVarQueryParameters['enableUserData'] = ObjectSerializer.serialize(enableUserData, "boolean"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "BaseItemDtoQueryResult"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} diff --git a/jellyfin/api/universalAudioApi.ts b/jellyfin/api/universalAudioApi.ts new file mode 100644 index 0000000..1030466 --- /dev/null +++ b/jellyfin/api/universalAudioApi.ts @@ -0,0 +1,405 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import localVarRequest from 'request'; +import http from 'http'; + +/* tslint:disable:no-unused-locals */ + +import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; +import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; + +import { HttpError, RequestFile } from './apis'; + +let defaultBasePath = 'http://localhost'; + +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== + +export enum UniversalAudioApiApiKeys { + CustomAuthentication, +} + +export class UniversalAudioApi { + protected _basePath = defaultBasePath; + protected _defaultHeaders : any = {}; + protected _useQuerystring : boolean = false; + + protected authentications = { + 'default': new VoidAuth(), + 'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'), + } + + protected interceptors: Interceptor[] = []; + + constructor(basePath?: string); + constructor(basePathOrUsername: string, password?: string, basePath?: string) { + if (password) { + if (basePath) { + this.basePath = basePath; + } + } else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername + } + } + } + + set useQuerystring(value: boolean) { + this._useQuerystring = value; + } + + set basePath(basePath: string) { + this._basePath = basePath; + } + + set defaultHeaders(defaultHeaders: any) { + this._defaultHeaders = defaultHeaders; + } + + get defaultHeaders() { + return this._defaultHeaders; + } + + get basePath() { + return this._basePath; + } + + public setDefaultAuthentication(auth: Authentication) { + this.authentications.default = auth; + } + + public setApiKey(key: UniversalAudioApiApiKeys, value: string) { + (this.authentications as any)[UniversalAudioApiApiKeys[key]].apiKey = value; + } + + public addInterceptor(interceptor: Interceptor) { + this.interceptors.push(interceptor); + } + + /** + * + * @summary Gets an audio stream. + * @param itemId The item id. + * @param container Optional. The audio container. + * @param mediaSourceId The media version id, if playing an alternate version. + * @param deviceId The device id of the client requesting. Used to stop encoding processes when needed. + * @param userId Optional. The user id. + * @param audioCodec Optional. The audio codec to transcode to. + * @param maxAudioChannels Optional. The maximum number of audio channels. + * @param transcodingAudioChannels Optional. The number of how many audio channels to transcode to. + * @param maxStreamingBitrate Optional. The maximum streaming bitrate. + * @param audioBitRate Optional. Specify an audio bitrate to encode to, e.g. 128000. If omitted this will be left to encoder defaults. + * @param startTimeTicks Optional. Specify a starting offset, in ticks. 1 tick = 10000 ms. + * @param transcodingContainer Optional. The container to transcode to. + * @param transcodingProtocol Optional. The transcoding protocol. + * @param maxAudioSampleRate Optional. The maximum audio sample rate. + * @param maxAudioBitDepth Optional. The maximum audio bit depth. + * @param enableRemoteMedia Optional. Whether to enable remote media. + * @param breakOnNonKeyFrames Optional. Whether to break on non key frames. + * @param enableRedirection Whether to enable redirection. Defaults to true. + */ + public async getUniversalAudioStream (itemId: string, container?: Array, mediaSourceId?: string, deviceId?: string, userId?: string, audioCodec?: string, maxAudioChannels?: number, transcodingAudioChannels?: number, maxStreamingBitrate?: number, audioBitRate?: number, startTimeTicks?: number, transcodingContainer?: string, transcodingProtocol?: string, maxAudioSampleRate?: number, maxAudioBitDepth?: number, enableRemoteMedia?: boolean, breakOnNonKeyFrames?: boolean, enableRedirection?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/Audio/{itemId}/universal' + .replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['audio/*']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'itemId' is not null or undefined + if (itemId === null || itemId === undefined) { + throw new Error('Required parameter itemId was null or undefined when calling getUniversalAudioStream.'); + } + + if (container !== undefined) { + localVarQueryParameters['container'] = ObjectSerializer.serialize(container, "Array"); + } + + if (mediaSourceId !== undefined) { + localVarQueryParameters['mediaSourceId'] = ObjectSerializer.serialize(mediaSourceId, "string"); + } + + if (deviceId !== undefined) { + localVarQueryParameters['deviceId'] = ObjectSerializer.serialize(deviceId, "string"); + } + + if (userId !== undefined) { + localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string"); + } + + if (audioCodec !== undefined) { + localVarQueryParameters['audioCodec'] = ObjectSerializer.serialize(audioCodec, "string"); + } + + if (maxAudioChannels !== undefined) { + localVarQueryParameters['maxAudioChannels'] = ObjectSerializer.serialize(maxAudioChannels, "number"); + } + + if (transcodingAudioChannels !== undefined) { + localVarQueryParameters['transcodingAudioChannels'] = ObjectSerializer.serialize(transcodingAudioChannels, "number"); + } + + if (maxStreamingBitrate !== undefined) { + localVarQueryParameters['maxStreamingBitrate'] = ObjectSerializer.serialize(maxStreamingBitrate, "number"); + } + + if (audioBitRate !== undefined) { + localVarQueryParameters['audioBitRate'] = ObjectSerializer.serialize(audioBitRate, "number"); + } + + if (startTimeTicks !== undefined) { + localVarQueryParameters['startTimeTicks'] = ObjectSerializer.serialize(startTimeTicks, "number"); + } + + if (transcodingContainer !== undefined) { + localVarQueryParameters['transcodingContainer'] = ObjectSerializer.serialize(transcodingContainer, "string"); + } + + if (transcodingProtocol !== undefined) { + localVarQueryParameters['transcodingProtocol'] = ObjectSerializer.serialize(transcodingProtocol, "string"); + } + + if (maxAudioSampleRate !== undefined) { + localVarQueryParameters['maxAudioSampleRate'] = ObjectSerializer.serialize(maxAudioSampleRate, "number"); + } + + if (maxAudioBitDepth !== undefined) { + localVarQueryParameters['maxAudioBitDepth'] = ObjectSerializer.serialize(maxAudioBitDepth, "number"); + } + + if (enableRemoteMedia !== undefined) { + localVarQueryParameters['enableRemoteMedia'] = ObjectSerializer.serialize(enableRemoteMedia, "boolean"); + } + + if (breakOnNonKeyFrames !== undefined) { + localVarQueryParameters['breakOnNonKeyFrames'] = ObjectSerializer.serialize(breakOnNonKeyFrames, "boolean"); + } + + if (enableRedirection !== undefined) { + localVarQueryParameters['enableRedirection'] = ObjectSerializer.serialize(enableRedirection, "boolean"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets an audio stream. + * @param itemId The item id. + * @param container Optional. The audio container. + * @param mediaSourceId The media version id, if playing an alternate version. + * @param deviceId The device id of the client requesting. Used to stop encoding processes when needed. + * @param userId Optional. The user id. + * @param audioCodec Optional. The audio codec to transcode to. + * @param maxAudioChannels Optional. The maximum number of audio channels. + * @param transcodingAudioChannels Optional. The number of how many audio channels to transcode to. + * @param maxStreamingBitrate Optional. The maximum streaming bitrate. + * @param audioBitRate Optional. Specify an audio bitrate to encode to, e.g. 128000. If omitted this will be left to encoder defaults. + * @param startTimeTicks Optional. Specify a starting offset, in ticks. 1 tick = 10000 ms. + * @param transcodingContainer Optional. The container to transcode to. + * @param transcodingProtocol Optional. The transcoding protocol. + * @param maxAudioSampleRate Optional. The maximum audio sample rate. + * @param maxAudioBitDepth Optional. The maximum audio bit depth. + * @param enableRemoteMedia Optional. Whether to enable remote media. + * @param breakOnNonKeyFrames Optional. Whether to break on non key frames. + * @param enableRedirection Whether to enable redirection. Defaults to true. + */ + public async headUniversalAudioStream (itemId: string, container?: Array, mediaSourceId?: string, deviceId?: string, userId?: string, audioCodec?: string, maxAudioChannels?: number, transcodingAudioChannels?: number, maxStreamingBitrate?: number, audioBitRate?: number, startTimeTicks?: number, transcodingContainer?: string, transcodingProtocol?: string, maxAudioSampleRate?: number, maxAudioBitDepth?: number, enableRemoteMedia?: boolean, breakOnNonKeyFrames?: boolean, enableRedirection?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/Audio/{itemId}/universal' + .replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['audio/*']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'itemId' is not null or undefined + if (itemId === null || itemId === undefined) { + throw new Error('Required parameter itemId was null or undefined when calling headUniversalAudioStream.'); + } + + if (container !== undefined) { + localVarQueryParameters['container'] = ObjectSerializer.serialize(container, "Array"); + } + + if (mediaSourceId !== undefined) { + localVarQueryParameters['mediaSourceId'] = ObjectSerializer.serialize(mediaSourceId, "string"); + } + + if (deviceId !== undefined) { + localVarQueryParameters['deviceId'] = ObjectSerializer.serialize(deviceId, "string"); + } + + if (userId !== undefined) { + localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string"); + } + + if (audioCodec !== undefined) { + localVarQueryParameters['audioCodec'] = ObjectSerializer.serialize(audioCodec, "string"); + } + + if (maxAudioChannels !== undefined) { + localVarQueryParameters['maxAudioChannels'] = ObjectSerializer.serialize(maxAudioChannels, "number"); + } + + if (transcodingAudioChannels !== undefined) { + localVarQueryParameters['transcodingAudioChannels'] = ObjectSerializer.serialize(transcodingAudioChannels, "number"); + } + + if (maxStreamingBitrate !== undefined) { + localVarQueryParameters['maxStreamingBitrate'] = ObjectSerializer.serialize(maxStreamingBitrate, "number"); + } + + if (audioBitRate !== undefined) { + localVarQueryParameters['audioBitRate'] = ObjectSerializer.serialize(audioBitRate, "number"); + } + + if (startTimeTicks !== undefined) { + localVarQueryParameters['startTimeTicks'] = ObjectSerializer.serialize(startTimeTicks, "number"); + } + + if (transcodingContainer !== undefined) { + localVarQueryParameters['transcodingContainer'] = ObjectSerializer.serialize(transcodingContainer, "string"); + } + + if (transcodingProtocol !== undefined) { + localVarQueryParameters['transcodingProtocol'] = ObjectSerializer.serialize(transcodingProtocol, "string"); + } + + if (maxAudioSampleRate !== undefined) { + localVarQueryParameters['maxAudioSampleRate'] = ObjectSerializer.serialize(maxAudioSampleRate, "number"); + } + + if (maxAudioBitDepth !== undefined) { + localVarQueryParameters['maxAudioBitDepth'] = ObjectSerializer.serialize(maxAudioBitDepth, "number"); + } + + if (enableRemoteMedia !== undefined) { + localVarQueryParameters['enableRemoteMedia'] = ObjectSerializer.serialize(enableRemoteMedia, "boolean"); + } + + if (breakOnNonKeyFrames !== undefined) { + localVarQueryParameters['breakOnNonKeyFrames'] = ObjectSerializer.serialize(breakOnNonKeyFrames, "boolean"); + } + + if (enableRedirection !== undefined) { + localVarQueryParameters['enableRedirection'] = ObjectSerializer.serialize(enableRedirection, "boolean"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'HEAD', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} diff --git a/jellyfin/api/userApi.ts b/jellyfin/api/userApi.ts new file mode 100644 index 0000000..9da7f7c --- /dev/null +++ b/jellyfin/api/userApi.ts @@ -0,0 +1,1273 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import localVarRequest from 'request'; +import http from 'http'; + +/* tslint:disable:no-unused-locals */ +import { AuthenticateUserByNameRequest } from '../model/authenticateUserByNameRequest'; +import { AuthenticateWithQuickConnectRequest } from '../model/authenticateWithQuickConnectRequest'; +import { AuthenticationResult } from '../model/authenticationResult'; +import { CreateUserByNameRequest } from '../model/createUserByNameRequest'; +import { ForgotPasswordPinRequest } from '../model/forgotPasswordPinRequest'; +import { ForgotPasswordRequest } from '../model/forgotPasswordRequest'; +import { ForgotPasswordResult } from '../model/forgotPasswordResult'; +import { PinRedeemResult } from '../model/pinRedeemResult'; +import { ProblemDetails } from '../model/problemDetails'; +import { UpdateUserConfigurationRequest } from '../model/updateUserConfigurationRequest'; +import { UpdateUserEasyPasswordRequest } from '../model/updateUserEasyPasswordRequest'; +import { UpdateUserPasswordRequest } from '../model/updateUserPasswordRequest'; +import { UpdateUserPolicyRequest } from '../model/updateUserPolicyRequest'; +import { UpdateUserRequest } from '../model/updateUserRequest'; +import { UserDto } from '../model/userDto'; + +import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; +import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; + +import { HttpError, RequestFile } from './apis'; + +let defaultBasePath = 'http://localhost'; + +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== + +export enum UserApiApiKeys { + CustomAuthentication, +} + +export class UserApi { + protected _basePath = defaultBasePath; + protected _defaultHeaders : any = {}; + protected _useQuerystring : boolean = false; + + protected authentications = { + 'default': new VoidAuth(), + 'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'), + } + + protected interceptors: Interceptor[] = []; + + constructor(basePath?: string); + constructor(basePathOrUsername: string, password?: string, basePath?: string) { + if (password) { + if (basePath) { + this.basePath = basePath; + } + } else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername + } + } + } + + set useQuerystring(value: boolean) { + this._useQuerystring = value; + } + + set basePath(basePath: string) { + this._basePath = basePath; + } + + set defaultHeaders(defaultHeaders: any) { + this._defaultHeaders = defaultHeaders; + } + + get defaultHeaders() { + return this._defaultHeaders; + } + + get basePath() { + return this._basePath; + } + + public setDefaultAuthentication(auth: Authentication) { + this.authentications.default = auth; + } + + public setApiKey(key: UserApiApiKeys, value: string) { + (this.authentications as any)[UserApiApiKeys[key]].apiKey = value; + } + + public addInterceptor(interceptor: Interceptor) { + this.interceptors.push(interceptor); + } + + /** + * + * @summary Authenticates a user. + * @param userId The user id. + * @param pw The password as plain text. + * @param password The password sha1-hash. + */ + public async authenticateUser (userId: string, pw: string, password?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: AuthenticationResult; }> { + const localVarPath = this.basePath + '/Users/{userId}/Authenticate' + .replace('{' + 'userId' + '}', encodeURIComponent(String(userId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'userId' is not null or undefined + if (userId === null || userId === undefined) { + throw new Error('Required parameter userId was null or undefined when calling authenticateUser.'); + } + + // verify required parameter 'pw' is not null or undefined + if (pw === null || pw === undefined) { + throw new Error('Required parameter pw was null or undefined when calling authenticateUser.'); + } + + if (pw !== undefined) { + localVarQueryParameters['pw'] = ObjectSerializer.serialize(pw, "string"); + } + + if (password !== undefined) { + localVarQueryParameters['password'] = ObjectSerializer.serialize(password, "string"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: AuthenticationResult; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "AuthenticationResult"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Authenticates a user by name. + * @param authenticateUserByNameRequest The M:Jellyfin.Api.Controllers.UserController.AuthenticateUserByName(Jellyfin.Api.Models.UserDtos.AuthenticateUserByName) request. + */ + public async authenticateUserByName (authenticateUserByNameRequest: AuthenticateUserByNameRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: AuthenticationResult; }> { + const localVarPath = this.basePath + '/Users/AuthenticateByName'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'authenticateUserByNameRequest' is not null or undefined + if (authenticateUserByNameRequest === null || authenticateUserByNameRequest === undefined) { + throw new Error('Required parameter authenticateUserByNameRequest was null or undefined when calling authenticateUserByName.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: ObjectSerializer.serialize(authenticateUserByNameRequest, "AuthenticateUserByNameRequest") + }; + + let authenticationPromise = Promise.resolve(); + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: AuthenticationResult; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "AuthenticationResult"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Authenticates a user with quick connect. + * @param authenticateWithQuickConnectRequest The Jellyfin.Api.Models.UserDtos.QuickConnectDto request. + */ + public async authenticateWithQuickConnect (authenticateWithQuickConnectRequest: AuthenticateWithQuickConnectRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: AuthenticationResult; }> { + const localVarPath = this.basePath + '/Users/AuthenticateWithQuickConnect'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'authenticateWithQuickConnectRequest' is not null or undefined + if (authenticateWithQuickConnectRequest === null || authenticateWithQuickConnectRequest === undefined) { + throw new Error('Required parameter authenticateWithQuickConnectRequest was null or undefined when calling authenticateWithQuickConnect.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: ObjectSerializer.serialize(authenticateWithQuickConnectRequest, "AuthenticateWithQuickConnectRequest") + }; + + let authenticationPromise = Promise.resolve(); + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: AuthenticationResult; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "AuthenticationResult"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Creates a user. + * @param createUserByNameRequest The create user by name request body. + */ + public async createUserByName (createUserByNameRequest: CreateUserByNameRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: UserDto; }> { + const localVarPath = this.basePath + '/Users/New'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'createUserByNameRequest' is not null or undefined + if (createUserByNameRequest === null || createUserByNameRequest === undefined) { + throw new Error('Required parameter createUserByNameRequest was null or undefined when calling createUserByName.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: ObjectSerializer.serialize(createUserByNameRequest, "CreateUserByNameRequest") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: UserDto; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "UserDto"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Deletes a user. + * @param userId The user id. + */ + public async deleteUser (userId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Users/{userId}' + .replace('{' + 'userId' + '}', encodeURIComponent(String(userId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'userId' is not null or undefined + if (userId === null || userId === undefined) { + throw new Error('Required parameter userId was null or undefined when calling deleteUser.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Initiates the forgot password process for a local user. + * @param forgotPasswordRequest The forgot password request containing the entered username. + */ + public async forgotPassword (forgotPasswordRequest: ForgotPasswordRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: ForgotPasswordResult; }> { + const localVarPath = this.basePath + '/Users/ForgotPassword'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'forgotPasswordRequest' is not null or undefined + if (forgotPasswordRequest === null || forgotPasswordRequest === undefined) { + throw new Error('Required parameter forgotPasswordRequest was null or undefined when calling forgotPassword.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: ObjectSerializer.serialize(forgotPasswordRequest, "ForgotPasswordRequest") + }; + + let authenticationPromise = Promise.resolve(); + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: ForgotPasswordResult; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "ForgotPasswordResult"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Redeems a forgot password pin. + * @param forgotPasswordPinRequest The forgot password pin request containing the entered pin. + */ + public async forgotPasswordPin (forgotPasswordPinRequest: ForgotPasswordPinRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: PinRedeemResult; }> { + const localVarPath = this.basePath + '/Users/ForgotPassword/Pin'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'forgotPasswordPinRequest' is not null or undefined + if (forgotPasswordPinRequest === null || forgotPasswordPinRequest === undefined) { + throw new Error('Required parameter forgotPasswordPinRequest was null or undefined when calling forgotPasswordPin.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: ObjectSerializer.serialize(forgotPasswordPinRequest, "ForgotPasswordPinRequest") + }; + + let authenticationPromise = Promise.resolve(); + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: PinRedeemResult; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "PinRedeemResult"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets the user based on auth token. + */ + public async getCurrentUser (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: UserDto; }> { + const localVarPath = this.basePath + '/Users/Me'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: UserDto; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "UserDto"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets a list of publicly visible users for display on a login screen. + */ + public async getPublicUsers (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array; }> { + const localVarPath = this.basePath + '/Users/Public'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Array; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Array"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets a user by Id. + * @param userId The user id. + */ + public async getUserById (userId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: UserDto; }> { + const localVarPath = this.basePath + '/Users/{userId}' + .replace('{' + 'userId' + '}', encodeURIComponent(String(userId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'userId' is not null or undefined + if (userId === null || userId === undefined) { + throw new Error('Required parameter userId was null or undefined when calling getUserById.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: UserDto; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "UserDto"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets a list of users. + * @param isHidden Optional filter by IsHidden=true or false. + * @param isDisabled Optional filter by IsDisabled=true or false. + */ + public async getUsers (isHidden?: boolean, isDisabled?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array; }> { + const localVarPath = this.basePath + '/Users'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + if (isHidden !== undefined) { + localVarQueryParameters['isHidden'] = ObjectSerializer.serialize(isHidden, "boolean"); + } + + if (isDisabled !== undefined) { + localVarQueryParameters['isDisabled'] = ObjectSerializer.serialize(isDisabled, "boolean"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Array; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Array"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Updates a user. + * @param userId The user id. + * @param updateUserRequest The updated user model. + */ + public async updateUser (userId: string, updateUserRequest: UpdateUserRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Users/{userId}' + .replace('{' + 'userId' + '}', encodeURIComponent(String(userId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'userId' is not null or undefined + if (userId === null || userId === undefined) { + throw new Error('Required parameter userId was null or undefined when calling updateUser.'); + } + + // verify required parameter 'updateUserRequest' is not null or undefined + if (updateUserRequest === null || updateUserRequest === undefined) { + throw new Error('Required parameter updateUserRequest was null or undefined when calling updateUser.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: ObjectSerializer.serialize(updateUserRequest, "UpdateUserRequest") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Updates a user configuration. + * @param userId The user id. + * @param updateUserConfigurationRequest The new user configuration. + */ + public async updateUserConfiguration (userId: string, updateUserConfigurationRequest: UpdateUserConfigurationRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Users/{userId}/Configuration' + .replace('{' + 'userId' + '}', encodeURIComponent(String(userId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'userId' is not null or undefined + if (userId === null || userId === undefined) { + throw new Error('Required parameter userId was null or undefined when calling updateUserConfiguration.'); + } + + // verify required parameter 'updateUserConfigurationRequest' is not null or undefined + if (updateUserConfigurationRequest === null || updateUserConfigurationRequest === undefined) { + throw new Error('Required parameter updateUserConfigurationRequest was null or undefined when calling updateUserConfiguration.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: ObjectSerializer.serialize(updateUserConfigurationRequest, "UpdateUserConfigurationRequest") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Updates a user\'s easy password. + * @param userId The user id. + * @param updateUserEasyPasswordRequest The M:Jellyfin.Api.Controllers.UserController.UpdateUserEasyPassword(System.Guid,Jellyfin.Api.Models.UserDtos.UpdateUserEasyPassword) request. + */ + public async updateUserEasyPassword (userId: string, updateUserEasyPasswordRequest: UpdateUserEasyPasswordRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Users/{userId}/EasyPassword' + .replace('{' + 'userId' + '}', encodeURIComponent(String(userId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'userId' is not null or undefined + if (userId === null || userId === undefined) { + throw new Error('Required parameter userId was null or undefined when calling updateUserEasyPassword.'); + } + + // verify required parameter 'updateUserEasyPasswordRequest' is not null or undefined + if (updateUserEasyPasswordRequest === null || updateUserEasyPasswordRequest === undefined) { + throw new Error('Required parameter updateUserEasyPasswordRequest was null or undefined when calling updateUserEasyPassword.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: ObjectSerializer.serialize(updateUserEasyPasswordRequest, "UpdateUserEasyPasswordRequest") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Updates a user\'s password. + * @param userId The user id. + * @param updateUserPasswordRequest The M:Jellyfin.Api.Controllers.UserController.UpdateUserPassword(System.Guid,Jellyfin.Api.Models.UserDtos.UpdateUserPassword) request. + */ + public async updateUserPassword (userId: string, updateUserPasswordRequest: UpdateUserPasswordRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Users/{userId}/Password' + .replace('{' + 'userId' + '}', encodeURIComponent(String(userId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'userId' is not null or undefined + if (userId === null || userId === undefined) { + throw new Error('Required parameter userId was null or undefined when calling updateUserPassword.'); + } + + // verify required parameter 'updateUserPasswordRequest' is not null or undefined + if (updateUserPasswordRequest === null || updateUserPasswordRequest === undefined) { + throw new Error('Required parameter updateUserPasswordRequest was null or undefined when calling updateUserPassword.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: ObjectSerializer.serialize(updateUserPasswordRequest, "UpdateUserPasswordRequest") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Updates a user policy. + * @param userId The user id. + * @param updateUserPolicyRequest The new user policy. + */ + public async updateUserPolicy (userId: string, updateUserPolicyRequest: UpdateUserPolicyRequest, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Users/{userId}/Policy' + .replace('{' + 'userId' + '}', encodeURIComponent(String(userId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'userId' is not null or undefined + if (userId === null || userId === undefined) { + throw new Error('Required parameter userId was null or undefined when calling updateUserPolicy.'); + } + + // verify required parameter 'updateUserPolicyRequest' is not null or undefined + if (updateUserPolicyRequest === null || updateUserPolicyRequest === undefined) { + throw new Error('Required parameter updateUserPolicyRequest was null or undefined when calling updateUserPolicy.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + body: ObjectSerializer.serialize(updateUserPolicyRequest, "UpdateUserPolicyRequest") + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} diff --git a/jellyfin/api/userLibraryApi.ts b/jellyfin/api/userLibraryApi.ts new file mode 100644 index 0000000..4b3be9d --- /dev/null +++ b/jellyfin/api/userLibraryApi.ts @@ -0,0 +1,928 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import localVarRequest from 'request'; +import http from 'http'; + +/* tslint:disable:no-unused-locals */ +import { BaseItemDto } from '../model/baseItemDto'; +import { BaseItemDtoQueryResult } from '../model/baseItemDtoQueryResult'; +import { BaseItemKind } from '../model/baseItemKind'; +import { ImageType } from '../model/imageType'; +import { ItemFields } from '../model/itemFields'; +import { UserItemDataDto } from '../model/userItemDataDto'; + +import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; +import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; + +import { HttpError, RequestFile } from './apis'; + +let defaultBasePath = 'http://localhost'; + +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== + +export enum UserLibraryApiApiKeys { + CustomAuthentication, +} + +export class UserLibraryApi { + protected _basePath = defaultBasePath; + protected _defaultHeaders : any = {}; + protected _useQuerystring : boolean = false; + + protected authentications = { + 'default': new VoidAuth(), + 'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'), + } + + protected interceptors: Interceptor[] = []; + + constructor(basePath?: string); + constructor(basePathOrUsername: string, password?: string, basePath?: string) { + if (password) { + if (basePath) { + this.basePath = basePath; + } + } else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername + } + } + } + + set useQuerystring(value: boolean) { + this._useQuerystring = value; + } + + set basePath(basePath: string) { + this._basePath = basePath; + } + + set defaultHeaders(defaultHeaders: any) { + this._defaultHeaders = defaultHeaders; + } + + get defaultHeaders() { + return this._defaultHeaders; + } + + get basePath() { + return this._basePath; + } + + public setDefaultAuthentication(auth: Authentication) { + this.authentications.default = auth; + } + + public setApiKey(key: UserLibraryApiApiKeys, value: string) { + (this.authentications as any)[UserLibraryApiApiKeys[key]].apiKey = value; + } + + public addInterceptor(interceptor: Interceptor) { + this.interceptors.push(interceptor); + } + + /** + * + * @summary Deletes a user\'s saved personal rating for an item. + * @param userId User id. + * @param itemId Item id. + */ + public async deleteUserItemRating (userId: string, itemId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: UserItemDataDto; }> { + const localVarPath = this.basePath + '/Users/{userId}/Items/{itemId}/Rating' + .replace('{' + 'userId' + '}', encodeURIComponent(String(userId))) + .replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'userId' is not null or undefined + if (userId === null || userId === undefined) { + throw new Error('Required parameter userId was null or undefined when calling deleteUserItemRating.'); + } + + // verify required parameter 'itemId' is not null or undefined + if (itemId === null || itemId === undefined) { + throw new Error('Required parameter itemId was null or undefined when calling deleteUserItemRating.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: UserItemDataDto; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "UserItemDataDto"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets intros to play before the main media item plays. + * @param userId User id. + * @param itemId Item id. + */ + public async getIntros (userId: string, itemId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }> { + const localVarPath = this.basePath + '/Users/{userId}/Items/{itemId}/Intros' + .replace('{' + 'userId' + '}', encodeURIComponent(String(userId))) + .replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'userId' is not null or undefined + if (userId === null || userId === undefined) { + throw new Error('Required parameter userId was null or undefined when calling getIntros.'); + } + + // verify required parameter 'itemId' is not null or undefined + if (itemId === null || itemId === undefined) { + throw new Error('Required parameter itemId was null or undefined when calling getIntros.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "BaseItemDtoQueryResult"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets an item from a user\'s library. + * @param userId User id. + * @param itemId Item id. + */ + public async getItem (userId: string, itemId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDto; }> { + const localVarPath = this.basePath + '/Users/{userId}/Items/{itemId}' + .replace('{' + 'userId' + '}', encodeURIComponent(String(userId))) + .replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'userId' is not null or undefined + if (userId === null || userId === undefined) { + throw new Error('Required parameter userId was null or undefined when calling getItem.'); + } + + // verify required parameter 'itemId' is not null or undefined + if (itemId === null || itemId === undefined) { + throw new Error('Required parameter itemId was null or undefined when calling getItem.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: BaseItemDto; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "BaseItemDto"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets latest media. + * @param userId User id. + * @param parentId Specify this to localize the search to a specific item or folder. Omit to use the root. + * @param fields Optional. Specify additional fields of information to return in the output. + * @param includeItemTypes Optional. If specified, results will be filtered based on item type. This allows multiple, comma delimited. + * @param isPlayed Filter by items that are played, or not. + * @param enableImages Optional. include image information in output. + * @param imageTypeLimit Optional. the max number of images to return, per image type. + * @param enableImageTypes Optional. The image types to include in the output. + * @param enableUserData Optional. include user data. + * @param limit Return item limit. + * @param groupItems Whether or not to group items into a parent container. + */ + public async getLatestMedia (userId: string, parentId?: string, fields?: Array, includeItemTypes?: Array, isPlayed?: boolean, enableImages?: boolean, imageTypeLimit?: number, enableImageTypes?: Array, enableUserData?: boolean, limit?: number, groupItems?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array; }> { + const localVarPath = this.basePath + '/Users/{userId}/Items/Latest' + .replace('{' + 'userId' + '}', encodeURIComponent(String(userId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'userId' is not null or undefined + if (userId === null || userId === undefined) { + throw new Error('Required parameter userId was null or undefined when calling getLatestMedia.'); + } + + if (parentId !== undefined) { + localVarQueryParameters['parentId'] = ObjectSerializer.serialize(parentId, "string"); + } + + if (fields !== undefined) { + localVarQueryParameters['fields'] = ObjectSerializer.serialize(fields, "Array"); + } + + if (includeItemTypes !== undefined) { + localVarQueryParameters['includeItemTypes'] = ObjectSerializer.serialize(includeItemTypes, "Array"); + } + + if (isPlayed !== undefined) { + localVarQueryParameters['isPlayed'] = ObjectSerializer.serialize(isPlayed, "boolean"); + } + + if (enableImages !== undefined) { + localVarQueryParameters['enableImages'] = ObjectSerializer.serialize(enableImages, "boolean"); + } + + if (imageTypeLimit !== undefined) { + localVarQueryParameters['imageTypeLimit'] = ObjectSerializer.serialize(imageTypeLimit, "number"); + } + + if (enableImageTypes !== undefined) { + localVarQueryParameters['enableImageTypes'] = ObjectSerializer.serialize(enableImageTypes, "Array"); + } + + if (enableUserData !== undefined) { + localVarQueryParameters['enableUserData'] = ObjectSerializer.serialize(enableUserData, "boolean"); + } + + if (limit !== undefined) { + localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); + } + + if (groupItems !== undefined) { + localVarQueryParameters['groupItems'] = ObjectSerializer.serialize(groupItems, "boolean"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Array; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Array"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets local trailers for an item. + * @param userId User id. + * @param itemId Item id. + */ + public async getLocalTrailers (userId: string, itemId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array; }> { + const localVarPath = this.basePath + '/Users/{userId}/Items/{itemId}/LocalTrailers' + .replace('{' + 'userId' + '}', encodeURIComponent(String(userId))) + .replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'userId' is not null or undefined + if (userId === null || userId === undefined) { + throw new Error('Required parameter userId was null or undefined when calling getLocalTrailers.'); + } + + // verify required parameter 'itemId' is not null or undefined + if (itemId === null || itemId === undefined) { + throw new Error('Required parameter itemId was null or undefined when calling getLocalTrailers.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Array; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Array"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets the root folder from a user\'s library. + * @param userId User id. + */ + public async getRootFolder (userId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDto; }> { + const localVarPath = this.basePath + '/Users/{userId}/Items/Root' + .replace('{' + 'userId' + '}', encodeURIComponent(String(userId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'userId' is not null or undefined + if (userId === null || userId === undefined) { + throw new Error('Required parameter userId was null or undefined when calling getRootFolder.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: BaseItemDto; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "BaseItemDto"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets special features for an item. + * @param userId User id. + * @param itemId Item id. + */ + public async getSpecialFeatures (userId: string, itemId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array; }> { + const localVarPath = this.basePath + '/Users/{userId}/Items/{itemId}/SpecialFeatures' + .replace('{' + 'userId' + '}', encodeURIComponent(String(userId))) + .replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'userId' is not null or undefined + if (userId === null || userId === undefined) { + throw new Error('Required parameter userId was null or undefined when calling getSpecialFeatures.'); + } + + // verify required parameter 'itemId' is not null or undefined + if (itemId === null || itemId === undefined) { + throw new Error('Required parameter itemId was null or undefined when calling getSpecialFeatures.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Array; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Array"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Marks an item as a favorite. + * @param userId User id. + * @param itemId Item id. + */ + public async markFavoriteItem (userId: string, itemId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: UserItemDataDto; }> { + const localVarPath = this.basePath + '/Users/{userId}/FavoriteItems/{itemId}' + .replace('{' + 'userId' + '}', encodeURIComponent(String(userId))) + .replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'userId' is not null or undefined + if (userId === null || userId === undefined) { + throw new Error('Required parameter userId was null or undefined when calling markFavoriteItem.'); + } + + // verify required parameter 'itemId' is not null or undefined + if (itemId === null || itemId === undefined) { + throw new Error('Required parameter itemId was null or undefined when calling markFavoriteItem.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: UserItemDataDto; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "UserItemDataDto"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Unmarks item as a favorite. + * @param userId User id. + * @param itemId Item id. + */ + public async unmarkFavoriteItem (userId: string, itemId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: UserItemDataDto; }> { + const localVarPath = this.basePath + '/Users/{userId}/FavoriteItems/{itemId}' + .replace('{' + 'userId' + '}', encodeURIComponent(String(userId))) + .replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'userId' is not null or undefined + if (userId === null || userId === undefined) { + throw new Error('Required parameter userId was null or undefined when calling unmarkFavoriteItem.'); + } + + // verify required parameter 'itemId' is not null or undefined + if (itemId === null || itemId === undefined) { + throw new Error('Required parameter itemId was null or undefined when calling unmarkFavoriteItem.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: UserItemDataDto; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "UserItemDataDto"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Updates a user\'s rating for an item. + * @param userId User id. + * @param itemId Item id. + * @param likes Whether this M:Jellyfin.Api.Controllers.UserLibraryController.UpdateUserItemRating(System.Guid,System.Guid,System.Nullable{System.Boolean}) is likes. + */ + public async updateUserItemRating (userId: string, itemId: string, likes?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: UserItemDataDto; }> { + const localVarPath = this.basePath + '/Users/{userId}/Items/{itemId}/Rating' + .replace('{' + 'userId' + '}', encodeURIComponent(String(userId))) + .replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'userId' is not null or undefined + if (userId === null || userId === undefined) { + throw new Error('Required parameter userId was null or undefined when calling updateUserItemRating.'); + } + + // verify required parameter 'itemId' is not null or undefined + if (itemId === null || itemId === undefined) { + throw new Error('Required parameter itemId was null or undefined when calling updateUserItemRating.'); + } + + if (likes !== undefined) { + localVarQueryParameters['likes'] = ObjectSerializer.serialize(likes, "boolean"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: UserItemDataDto; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "UserItemDataDto"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} diff --git a/jellyfin/api/userViewsApi.ts b/jellyfin/api/userViewsApi.ts new file mode 100644 index 0000000..a92c5dc --- /dev/null +++ b/jellyfin/api/userViewsApi.ts @@ -0,0 +1,253 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import localVarRequest from 'request'; +import http from 'http'; + +/* tslint:disable:no-unused-locals */ +import { BaseItemDtoQueryResult } from '../model/baseItemDtoQueryResult'; +import { ProblemDetails } from '../model/problemDetails'; +import { SpecialViewOptionDto } from '../model/specialViewOptionDto'; + +import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; +import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; + +import { HttpError, RequestFile } from './apis'; + +let defaultBasePath = 'http://localhost'; + +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== + +export enum UserViewsApiApiKeys { + CustomAuthentication, +} + +export class UserViewsApi { + protected _basePath = defaultBasePath; + protected _defaultHeaders : any = {}; + protected _useQuerystring : boolean = false; + + protected authentications = { + 'default': new VoidAuth(), + 'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'), + } + + protected interceptors: Interceptor[] = []; + + constructor(basePath?: string); + constructor(basePathOrUsername: string, password?: string, basePath?: string) { + if (password) { + if (basePath) { + this.basePath = basePath; + } + } else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername + } + } + } + + set useQuerystring(value: boolean) { + this._useQuerystring = value; + } + + set basePath(basePath: string) { + this._basePath = basePath; + } + + set defaultHeaders(defaultHeaders: any) { + this._defaultHeaders = defaultHeaders; + } + + get defaultHeaders() { + return this._defaultHeaders; + } + + get basePath() { + return this._basePath; + } + + public setDefaultAuthentication(auth: Authentication) { + this.authentications.default = auth; + } + + public setApiKey(key: UserViewsApiApiKeys, value: string) { + (this.authentications as any)[UserViewsApiApiKeys[key]].apiKey = value; + } + + public addInterceptor(interceptor: Interceptor) { + this.interceptors.push(interceptor); + } + + /** + * + * @summary Get user view grouping options. + * @param userId User id. + */ + public async getGroupingOptions (userId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array; }> { + const localVarPath = this.basePath + '/Users/{userId}/GroupingOptions' + .replace('{' + 'userId' + '}', encodeURIComponent(String(userId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'userId' is not null or undefined + if (userId === null || userId === undefined) { + throw new Error('Required parameter userId was null or undefined when calling getGroupingOptions.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Array; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Array"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Get user views. + * @param userId User id. + * @param includeExternalContent Whether or not to include external views such as channels or live tv. + * @param presetViews Preset views. + * @param includeHidden Whether or not to include hidden content. + */ + public async getUserViews (userId: string, includeExternalContent?: boolean, presetViews?: Array, includeHidden?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }> { + const localVarPath = this.basePath + '/Users/{userId}/Views' + .replace('{' + 'userId' + '}', encodeURIComponent(String(userId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'userId' is not null or undefined + if (userId === null || userId === undefined) { + throw new Error('Required parameter userId was null or undefined when calling getUserViews.'); + } + + if (includeExternalContent !== undefined) { + localVarQueryParameters['includeExternalContent'] = ObjectSerializer.serialize(includeExternalContent, "boolean"); + } + + if (presetViews !== undefined) { + localVarQueryParameters['presetViews'] = ObjectSerializer.serialize(presetViews, "Array"); + } + + if (includeHidden !== undefined) { + localVarQueryParameters['includeHidden'] = ObjectSerializer.serialize(includeHidden, "boolean"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "BaseItemDtoQueryResult"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} diff --git a/jellyfin/api/videoAttachmentsApi.ts b/jellyfin/api/videoAttachmentsApi.ts new file mode 100644 index 0000000..29dfe48 --- /dev/null +++ b/jellyfin/api/videoAttachmentsApi.ts @@ -0,0 +1,175 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import localVarRequest from 'request'; +import http from 'http'; + +/* tslint:disable:no-unused-locals */ +import { ProblemDetails } from '../model/problemDetails'; + +import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; +import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; + +import { HttpError, RequestFile } from './apis'; + +let defaultBasePath = 'http://localhost'; + +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== + +export enum VideoAttachmentsApiApiKeys { + CustomAuthentication, +} + +export class VideoAttachmentsApi { + protected _basePath = defaultBasePath; + protected _defaultHeaders : any = {}; + protected _useQuerystring : boolean = false; + + protected authentications = { + 'default': new VoidAuth(), + 'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'), + } + + protected interceptors: Interceptor[] = []; + + constructor(basePath?: string); + constructor(basePathOrUsername: string, password?: string, basePath?: string) { + if (password) { + if (basePath) { + this.basePath = basePath; + } + } else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername + } + } + } + + set useQuerystring(value: boolean) { + this._useQuerystring = value; + } + + set basePath(basePath: string) { + this._basePath = basePath; + } + + set defaultHeaders(defaultHeaders: any) { + this._defaultHeaders = defaultHeaders; + } + + get defaultHeaders() { + return this._defaultHeaders; + } + + get basePath() { + return this._basePath; + } + + public setDefaultAuthentication(auth: Authentication) { + this.authentications.default = auth; + } + + public setApiKey(key: VideoAttachmentsApiApiKeys, value: string) { + (this.authentications as any)[VideoAttachmentsApiApiKeys[key]].apiKey = value; + } + + public addInterceptor(interceptor: Interceptor) { + this.interceptors.push(interceptor); + } + + /** + * + * @summary Get video attachment. + * @param videoId Video ID. + * @param mediaSourceId Media Source ID. + * @param index Attachment Index. + */ + public async getAttachment (videoId: string, mediaSourceId: string, index: number, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/Videos/{videoId}/{mediaSourceId}/Attachments/{index}' + .replace('{' + 'videoId' + '}', encodeURIComponent(String(videoId))) + .replace('{' + 'mediaSourceId' + '}', encodeURIComponent(String(mediaSourceId))) + .replace('{' + 'index' + '}', encodeURIComponent(String(index))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/octet-stream', 'application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'videoId' is not null or undefined + if (videoId === null || videoId === undefined) { + throw new Error('Required parameter videoId was null or undefined when calling getAttachment.'); + } + + // verify required parameter 'mediaSourceId' is not null or undefined + if (mediaSourceId === null || mediaSourceId === undefined) { + throw new Error('Required parameter mediaSourceId was null or undefined when calling getAttachment.'); + } + + // verify required parameter 'index' is not null or undefined + if (index === null || index === undefined) { + throw new Error('Required parameter index was null or undefined when calling getAttachment.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} diff --git a/jellyfin/api/videosApi.ts b/jellyfin/api/videosApi.ts new file mode 100644 index 0000000..55dbf58 --- /dev/null +++ b/jellyfin/api/videosApi.ts @@ -0,0 +1,1597 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import localVarRequest from 'request'; +import http from 'http'; + +/* tslint:disable:no-unused-locals */ +import { BaseItemDtoQueryResult } from '../model/baseItemDtoQueryResult'; +import { EncodingContext } from '../model/encodingContext'; +import { ProblemDetails } from '../model/problemDetails'; +import { SubtitleDeliveryMethod } from '../model/subtitleDeliveryMethod'; + +import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; +import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; + +import { HttpError, RequestFile } from './apis'; + +let defaultBasePath = 'http://localhost'; + +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== + +export enum VideosApiApiKeys { + CustomAuthentication, +} + +export class VideosApi { + protected _basePath = defaultBasePath; + protected _defaultHeaders : any = {}; + protected _useQuerystring : boolean = false; + + protected authentications = { + 'default': new VoidAuth(), + 'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'), + } + + protected interceptors: Interceptor[] = []; + + constructor(basePath?: string); + constructor(basePathOrUsername: string, password?: string, basePath?: string) { + if (password) { + if (basePath) { + this.basePath = basePath; + } + } else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername + } + } + } + + set useQuerystring(value: boolean) { + this._useQuerystring = value; + } + + set basePath(basePath: string) { + this._basePath = basePath; + } + + set defaultHeaders(defaultHeaders: any) { + this._defaultHeaders = defaultHeaders; + } + + get defaultHeaders() { + return this._defaultHeaders; + } + + get basePath() { + return this._basePath; + } + + public setDefaultAuthentication(auth: Authentication) { + this.authentications.default = auth; + } + + public setApiKey(key: VideosApiApiKeys, value: string) { + (this.authentications as any)[VideosApiApiKeys[key]].apiKey = value; + } + + public addInterceptor(interceptor: Interceptor) { + this.interceptors.push(interceptor); + } + + /** + * + * @summary Removes alternate video sources. + * @param itemId The item id. + */ + public async deleteAlternateSources (itemId: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Videos/{itemId}/AlternateSources' + .replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'itemId' is not null or undefined + if (itemId === null || itemId === undefined) { + throw new Error('Required parameter itemId was null or undefined when calling deleteAlternateSources.'); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'DELETE', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets additional parts for a video. + * @param itemId The item id. + * @param userId Optional. Filter by user id, and attach user data. + */ + public async getAdditionalPart (itemId: string, userId?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }> { + const localVarPath = this.basePath + '/Videos/{itemId}/AdditionalParts' + .replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'itemId' is not null or undefined + if (itemId === null || itemId === undefined) { + throw new Error('Required parameter itemId was null or undefined when calling getAdditionalPart.'); + } + + if (userId !== undefined) { + localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "BaseItemDtoQueryResult"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets a video stream. + * @param itemId The item id. + * @param container The video container. Possible values are: ts, webm, asf, wmv, ogv, mp4, m4v, mkv, mpeg, mpg, avi, 3gp, wmv, wtv, m2ts, mov, iso, flv. + * @param _static Optional. If true, the original file will be streamed statically without any encoding. Use either no url extension or the original file extension. true/false. + * @param params The streaming parameters. + * @param tag The tag. + * @param deviceProfileId Optional. The dlna device profile id to utilize. + * @param playSessionId The play session id. + * @param segmentContainer The segment container. + * @param segmentLength The segment length. + * @param minSegments The minimum number of segments. + * @param mediaSourceId The media version id, if playing an alternate version. + * @param deviceId The device id of the client requesting. Used to stop encoding processes when needed. + * @param audioCodec Optional. Specify a audio codec to encode to, e.g. mp3. If omitted the server will auto-select using the url\'s extension. Options: aac, mp3, vorbis, wma. + * @param enableAutoStreamCopy Whether or not to allow automatic stream copy if requested values match the original source. Defaults to true. + * @param allowVideoStreamCopy Whether or not to allow copying of the video stream url. + * @param allowAudioStreamCopy Whether or not to allow copying of the audio stream url. + * @param breakOnNonKeyFrames Optional. Whether to break on non key frames. + * @param audioSampleRate Optional. Specify a specific audio sample rate, e.g. 44100. + * @param maxAudioBitDepth Optional. The maximum audio bit depth. + * @param audioBitRate Optional. Specify an audio bitrate to encode to, e.g. 128000. If omitted this will be left to encoder defaults. + * @param audioChannels Optional. Specify a specific number of audio channels to encode to, e.g. 2. + * @param maxAudioChannels Optional. Specify a maximum number of audio channels to encode to, e.g. 2. + * @param profile Optional. Specify a specific an encoder profile (varies by encoder), e.g. main, baseline, high. + * @param level Optional. Specify a level for the encoder profile (varies by encoder), e.g. 3, 3.1. + * @param framerate Optional. A specific video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. + * @param maxFramerate Optional. A specific maximum video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. + * @param copyTimestamps Whether or not to copy timestamps when transcoding with an offset. Defaults to false. + * @param startTimeTicks Optional. Specify a starting offset, in ticks. 1 tick = 10000 ms. + * @param width Optional. The fixed horizontal resolution of the encoded video. + * @param height Optional. The fixed vertical resolution of the encoded video. + * @param maxWidth Optional. The maximum horizontal resolution of the encoded video. + * @param maxHeight Optional. The maximum vertical resolution of the encoded video. + * @param videoBitRate Optional. Specify a video bitrate to encode to, e.g. 500000. If omitted this will be left to encoder defaults. + * @param subtitleStreamIndex Optional. The index of the subtitle stream to use. If omitted no subtitles will be used. + * @param subtitleMethod Optional. Specify the subtitle delivery method. + * @param maxRefFrames Optional. + * @param maxVideoBitDepth Optional. The maximum video bit depth. + * @param requireAvc Optional. Whether to require avc. + * @param deInterlace Optional. Whether to deinterlace the video. + * @param requireNonAnamorphic Optional. Whether to require a non anamorphic stream. + * @param transcodingMaxAudioChannels Optional. The maximum number of audio channels to transcode. + * @param cpuCoreLimit Optional. The limit of how many cpu cores to use. + * @param liveStreamId The live stream id. + * @param enableMpegtsM2TsMode Optional. Whether to enable the MpegtsM2Ts mode. + * @param videoCodec Optional. Specify a video codec to encode to, e.g. h264. If omitted the server will auto-select using the url\'s extension. Options: h265, h264, mpeg4, theora, vp8, vp9, vpx (deprecated), wmv. + * @param subtitleCodec Optional. Specify a subtitle codec to encode to. + * @param transcodeReasons Optional. The transcoding reason. + * @param audioStreamIndex Optional. The index of the audio stream to use. If omitted the first audio stream will be used. + * @param videoStreamIndex Optional. The index of the video stream to use. If omitted the first video stream will be used. + * @param context Optional. The MediaBrowser.Model.Dlna.EncodingContext. + * @param streamOptions Optional. The streaming options. + */ + public async getVideoStream (itemId: string, container?: string, _static?: boolean, params?: string, tag?: string, deviceProfileId?: string, playSessionId?: string, segmentContainer?: string, segmentLength?: number, minSegments?: number, mediaSourceId?: string, deviceId?: string, audioCodec?: string, enableAutoStreamCopy?: boolean, allowVideoStreamCopy?: boolean, allowAudioStreamCopy?: boolean, breakOnNonKeyFrames?: boolean, audioSampleRate?: number, maxAudioBitDepth?: number, audioBitRate?: number, audioChannels?: number, maxAudioChannels?: number, profile?: string, level?: string, framerate?: number, maxFramerate?: number, copyTimestamps?: boolean, startTimeTicks?: number, width?: number, height?: number, maxWidth?: number, maxHeight?: number, videoBitRate?: number, subtitleStreamIndex?: number, subtitleMethod?: SubtitleDeliveryMethod, maxRefFrames?: number, maxVideoBitDepth?: number, requireAvc?: boolean, deInterlace?: boolean, requireNonAnamorphic?: boolean, transcodingMaxAudioChannels?: number, cpuCoreLimit?: number, liveStreamId?: string, enableMpegtsM2TsMode?: boolean, videoCodec?: string, subtitleCodec?: string, transcodeReasons?: string, audioStreamIndex?: number, videoStreamIndex?: number, context?: EncodingContext, streamOptions?: { [key: string]: string; }, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/Videos/{itemId}/stream' + .replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['video/*']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'itemId' is not null or undefined + if (itemId === null || itemId === undefined) { + throw new Error('Required parameter itemId was null or undefined when calling getVideoStream.'); + } + + if (container !== undefined) { + localVarQueryParameters['container'] = ObjectSerializer.serialize(container, "string"); + } + + if (_static !== undefined) { + localVarQueryParameters['static'] = ObjectSerializer.serialize(_static, "boolean"); + } + + if (params !== undefined) { + localVarQueryParameters['params'] = ObjectSerializer.serialize(params, "string"); + } + + if (tag !== undefined) { + localVarQueryParameters['tag'] = ObjectSerializer.serialize(tag, "string"); + } + + if (deviceProfileId !== undefined) { + localVarQueryParameters['deviceProfileId'] = ObjectSerializer.serialize(deviceProfileId, "string"); + } + + if (playSessionId !== undefined) { + localVarQueryParameters['playSessionId'] = ObjectSerializer.serialize(playSessionId, "string"); + } + + if (segmentContainer !== undefined) { + localVarQueryParameters['segmentContainer'] = ObjectSerializer.serialize(segmentContainer, "string"); + } + + if (segmentLength !== undefined) { + localVarQueryParameters['segmentLength'] = ObjectSerializer.serialize(segmentLength, "number"); + } + + if (minSegments !== undefined) { + localVarQueryParameters['minSegments'] = ObjectSerializer.serialize(minSegments, "number"); + } + + if (mediaSourceId !== undefined) { + localVarQueryParameters['mediaSourceId'] = ObjectSerializer.serialize(mediaSourceId, "string"); + } + + if (deviceId !== undefined) { + localVarQueryParameters['deviceId'] = ObjectSerializer.serialize(deviceId, "string"); + } + + if (audioCodec !== undefined) { + localVarQueryParameters['audioCodec'] = ObjectSerializer.serialize(audioCodec, "string"); + } + + if (enableAutoStreamCopy !== undefined) { + localVarQueryParameters['enableAutoStreamCopy'] = ObjectSerializer.serialize(enableAutoStreamCopy, "boolean"); + } + + if (allowVideoStreamCopy !== undefined) { + localVarQueryParameters['allowVideoStreamCopy'] = ObjectSerializer.serialize(allowVideoStreamCopy, "boolean"); + } + + if (allowAudioStreamCopy !== undefined) { + localVarQueryParameters['allowAudioStreamCopy'] = ObjectSerializer.serialize(allowAudioStreamCopy, "boolean"); + } + + if (breakOnNonKeyFrames !== undefined) { + localVarQueryParameters['breakOnNonKeyFrames'] = ObjectSerializer.serialize(breakOnNonKeyFrames, "boolean"); + } + + if (audioSampleRate !== undefined) { + localVarQueryParameters['audioSampleRate'] = ObjectSerializer.serialize(audioSampleRate, "number"); + } + + if (maxAudioBitDepth !== undefined) { + localVarQueryParameters['maxAudioBitDepth'] = ObjectSerializer.serialize(maxAudioBitDepth, "number"); + } + + if (audioBitRate !== undefined) { + localVarQueryParameters['audioBitRate'] = ObjectSerializer.serialize(audioBitRate, "number"); + } + + if (audioChannels !== undefined) { + localVarQueryParameters['audioChannels'] = ObjectSerializer.serialize(audioChannels, "number"); + } + + if (maxAudioChannels !== undefined) { + localVarQueryParameters['maxAudioChannels'] = ObjectSerializer.serialize(maxAudioChannels, "number"); + } + + if (profile !== undefined) { + localVarQueryParameters['profile'] = ObjectSerializer.serialize(profile, "string"); + } + + if (level !== undefined) { + localVarQueryParameters['level'] = ObjectSerializer.serialize(level, "string"); + } + + if (framerate !== undefined) { + localVarQueryParameters['framerate'] = ObjectSerializer.serialize(framerate, "number"); + } + + if (maxFramerate !== undefined) { + localVarQueryParameters['maxFramerate'] = ObjectSerializer.serialize(maxFramerate, "number"); + } + + if (copyTimestamps !== undefined) { + localVarQueryParameters['copyTimestamps'] = ObjectSerializer.serialize(copyTimestamps, "boolean"); + } + + if (startTimeTicks !== undefined) { + localVarQueryParameters['startTimeTicks'] = ObjectSerializer.serialize(startTimeTicks, "number"); + } + + if (width !== undefined) { + localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number"); + } + + if (height !== undefined) { + localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number"); + } + + if (maxWidth !== undefined) { + localVarQueryParameters['maxWidth'] = ObjectSerializer.serialize(maxWidth, "number"); + } + + if (maxHeight !== undefined) { + localVarQueryParameters['maxHeight'] = ObjectSerializer.serialize(maxHeight, "number"); + } + + if (videoBitRate !== undefined) { + localVarQueryParameters['videoBitRate'] = ObjectSerializer.serialize(videoBitRate, "number"); + } + + if (subtitleStreamIndex !== undefined) { + localVarQueryParameters['subtitleStreamIndex'] = ObjectSerializer.serialize(subtitleStreamIndex, "number"); + } + + if (subtitleMethod !== undefined) { + localVarQueryParameters['subtitleMethod'] = ObjectSerializer.serialize(subtitleMethod, "SubtitleDeliveryMethod"); + } + + if (maxRefFrames !== undefined) { + localVarQueryParameters['maxRefFrames'] = ObjectSerializer.serialize(maxRefFrames, "number"); + } + + if (maxVideoBitDepth !== undefined) { + localVarQueryParameters['maxVideoBitDepth'] = ObjectSerializer.serialize(maxVideoBitDepth, "number"); + } + + if (requireAvc !== undefined) { + localVarQueryParameters['requireAvc'] = ObjectSerializer.serialize(requireAvc, "boolean"); + } + + if (deInterlace !== undefined) { + localVarQueryParameters['deInterlace'] = ObjectSerializer.serialize(deInterlace, "boolean"); + } + + if (requireNonAnamorphic !== undefined) { + localVarQueryParameters['requireNonAnamorphic'] = ObjectSerializer.serialize(requireNonAnamorphic, "boolean"); + } + + if (transcodingMaxAudioChannels !== undefined) { + localVarQueryParameters['transcodingMaxAudioChannels'] = ObjectSerializer.serialize(transcodingMaxAudioChannels, "number"); + } + + if (cpuCoreLimit !== undefined) { + localVarQueryParameters['cpuCoreLimit'] = ObjectSerializer.serialize(cpuCoreLimit, "number"); + } + + if (liveStreamId !== undefined) { + localVarQueryParameters['liveStreamId'] = ObjectSerializer.serialize(liveStreamId, "string"); + } + + if (enableMpegtsM2TsMode !== undefined) { + localVarQueryParameters['enableMpegtsM2TsMode'] = ObjectSerializer.serialize(enableMpegtsM2TsMode, "boolean"); + } + + if (videoCodec !== undefined) { + localVarQueryParameters['videoCodec'] = ObjectSerializer.serialize(videoCodec, "string"); + } + + if (subtitleCodec !== undefined) { + localVarQueryParameters['subtitleCodec'] = ObjectSerializer.serialize(subtitleCodec, "string"); + } + + if (transcodeReasons !== undefined) { + localVarQueryParameters['transcodeReasons'] = ObjectSerializer.serialize(transcodeReasons, "string"); + } + + if (audioStreamIndex !== undefined) { + localVarQueryParameters['audioStreamIndex'] = ObjectSerializer.serialize(audioStreamIndex, "number"); + } + + if (videoStreamIndex !== undefined) { + localVarQueryParameters['videoStreamIndex'] = ObjectSerializer.serialize(videoStreamIndex, "number"); + } + + if (context !== undefined) { + localVarQueryParameters['context'] = ObjectSerializer.serialize(context, "EncodingContext"); + } + + if (streamOptions !== undefined) { + localVarQueryParameters['streamOptions'] = ObjectSerializer.serialize(streamOptions, "{ [key: string]: string; }"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets a video stream. + * @param itemId The item id. + * @param container The video container. Possible values are: ts, webm, asf, wmv, ogv, mp4, m4v, mkv, mpeg, mpg, avi, 3gp, wmv, wtv, m2ts, mov, iso, flv. + * @param _static Optional. If true, the original file will be streamed statically without any encoding. Use either no url extension or the original file extension. true/false. + * @param params The streaming parameters. + * @param tag The tag. + * @param deviceProfileId Optional. The dlna device profile id to utilize. + * @param playSessionId The play session id. + * @param segmentContainer The segment container. + * @param segmentLength The segment length. + * @param minSegments The minimum number of segments. + * @param mediaSourceId The media version id, if playing an alternate version. + * @param deviceId The device id of the client requesting. Used to stop encoding processes when needed. + * @param audioCodec Optional. Specify a audio codec to encode to, e.g. mp3. If omitted the server will auto-select using the url\'s extension. Options: aac, mp3, vorbis, wma. + * @param enableAutoStreamCopy Whether or not to allow automatic stream copy if requested values match the original source. Defaults to true. + * @param allowVideoStreamCopy Whether or not to allow copying of the video stream url. + * @param allowAudioStreamCopy Whether or not to allow copying of the audio stream url. + * @param breakOnNonKeyFrames Optional. Whether to break on non key frames. + * @param audioSampleRate Optional. Specify a specific audio sample rate, e.g. 44100. + * @param maxAudioBitDepth Optional. The maximum audio bit depth. + * @param audioBitRate Optional. Specify an audio bitrate to encode to, e.g. 128000. If omitted this will be left to encoder defaults. + * @param audioChannels Optional. Specify a specific number of audio channels to encode to, e.g. 2. + * @param maxAudioChannels Optional. Specify a maximum number of audio channels to encode to, e.g. 2. + * @param profile Optional. Specify a specific an encoder profile (varies by encoder), e.g. main, baseline, high. + * @param level Optional. Specify a level for the encoder profile (varies by encoder), e.g. 3, 3.1. + * @param framerate Optional. A specific video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. + * @param maxFramerate Optional. A specific maximum video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. + * @param copyTimestamps Whether or not to copy timestamps when transcoding with an offset. Defaults to false. + * @param startTimeTicks Optional. Specify a starting offset, in ticks. 1 tick = 10000 ms. + * @param width Optional. The fixed horizontal resolution of the encoded video. + * @param height Optional. The fixed vertical resolution of the encoded video. + * @param maxWidth Optional. The maximum horizontal resolution of the encoded video. + * @param maxHeight Optional. The maximum vertical resolution of the encoded video. + * @param videoBitRate Optional. Specify a video bitrate to encode to, e.g. 500000. If omitted this will be left to encoder defaults. + * @param subtitleStreamIndex Optional. The index of the subtitle stream to use. If omitted no subtitles will be used. + * @param subtitleMethod Optional. Specify the subtitle delivery method. + * @param maxRefFrames Optional. + * @param maxVideoBitDepth Optional. The maximum video bit depth. + * @param requireAvc Optional. Whether to require avc. + * @param deInterlace Optional. Whether to deinterlace the video. + * @param requireNonAnamorphic Optional. Whether to require a non anamorphic stream. + * @param transcodingMaxAudioChannels Optional. The maximum number of audio channels to transcode. + * @param cpuCoreLimit Optional. The limit of how many cpu cores to use. + * @param liveStreamId The live stream id. + * @param enableMpegtsM2TsMode Optional. Whether to enable the MpegtsM2Ts mode. + * @param videoCodec Optional. Specify a video codec to encode to, e.g. h264. If omitted the server will auto-select using the url\'s extension. Options: h265, h264, mpeg4, theora, vp8, vp9, vpx (deprecated), wmv. + * @param subtitleCodec Optional. Specify a subtitle codec to encode to. + * @param transcodeReasons Optional. The transcoding reason. + * @param audioStreamIndex Optional. The index of the audio stream to use. If omitted the first audio stream will be used. + * @param videoStreamIndex Optional. The index of the video stream to use. If omitted the first video stream will be used. + * @param context Optional. The MediaBrowser.Model.Dlna.EncodingContext. + * @param streamOptions Optional. The streaming options. + */ + public async getVideoStreamByContainer (itemId: string, container: string, _static?: boolean, params?: string, tag?: string, deviceProfileId?: string, playSessionId?: string, segmentContainer?: string, segmentLength?: number, minSegments?: number, mediaSourceId?: string, deviceId?: string, audioCodec?: string, enableAutoStreamCopy?: boolean, allowVideoStreamCopy?: boolean, allowAudioStreamCopy?: boolean, breakOnNonKeyFrames?: boolean, audioSampleRate?: number, maxAudioBitDepth?: number, audioBitRate?: number, audioChannels?: number, maxAudioChannels?: number, profile?: string, level?: string, framerate?: number, maxFramerate?: number, copyTimestamps?: boolean, startTimeTicks?: number, width?: number, height?: number, maxWidth?: number, maxHeight?: number, videoBitRate?: number, subtitleStreamIndex?: number, subtitleMethod?: SubtitleDeliveryMethod, maxRefFrames?: number, maxVideoBitDepth?: number, requireAvc?: boolean, deInterlace?: boolean, requireNonAnamorphic?: boolean, transcodingMaxAudioChannels?: number, cpuCoreLimit?: number, liveStreamId?: string, enableMpegtsM2TsMode?: boolean, videoCodec?: string, subtitleCodec?: string, transcodeReasons?: string, audioStreamIndex?: number, videoStreamIndex?: number, context?: EncodingContext, streamOptions?: { [key: string]: string; }, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/Videos/{itemId}/stream.{container}' + .replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId))) + .replace('{' + 'container' + '}', encodeURIComponent(String(container))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['video/*']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'itemId' is not null or undefined + if (itemId === null || itemId === undefined) { + throw new Error('Required parameter itemId was null or undefined when calling getVideoStreamByContainer.'); + } + + // verify required parameter 'container' is not null or undefined + if (container === null || container === undefined) { + throw new Error('Required parameter container was null or undefined when calling getVideoStreamByContainer.'); + } + + if (_static !== undefined) { + localVarQueryParameters['static'] = ObjectSerializer.serialize(_static, "boolean"); + } + + if (params !== undefined) { + localVarQueryParameters['params'] = ObjectSerializer.serialize(params, "string"); + } + + if (tag !== undefined) { + localVarQueryParameters['tag'] = ObjectSerializer.serialize(tag, "string"); + } + + if (deviceProfileId !== undefined) { + localVarQueryParameters['deviceProfileId'] = ObjectSerializer.serialize(deviceProfileId, "string"); + } + + if (playSessionId !== undefined) { + localVarQueryParameters['playSessionId'] = ObjectSerializer.serialize(playSessionId, "string"); + } + + if (segmentContainer !== undefined) { + localVarQueryParameters['segmentContainer'] = ObjectSerializer.serialize(segmentContainer, "string"); + } + + if (segmentLength !== undefined) { + localVarQueryParameters['segmentLength'] = ObjectSerializer.serialize(segmentLength, "number"); + } + + if (minSegments !== undefined) { + localVarQueryParameters['minSegments'] = ObjectSerializer.serialize(minSegments, "number"); + } + + if (mediaSourceId !== undefined) { + localVarQueryParameters['mediaSourceId'] = ObjectSerializer.serialize(mediaSourceId, "string"); + } + + if (deviceId !== undefined) { + localVarQueryParameters['deviceId'] = ObjectSerializer.serialize(deviceId, "string"); + } + + if (audioCodec !== undefined) { + localVarQueryParameters['audioCodec'] = ObjectSerializer.serialize(audioCodec, "string"); + } + + if (enableAutoStreamCopy !== undefined) { + localVarQueryParameters['enableAutoStreamCopy'] = ObjectSerializer.serialize(enableAutoStreamCopy, "boolean"); + } + + if (allowVideoStreamCopy !== undefined) { + localVarQueryParameters['allowVideoStreamCopy'] = ObjectSerializer.serialize(allowVideoStreamCopy, "boolean"); + } + + if (allowAudioStreamCopy !== undefined) { + localVarQueryParameters['allowAudioStreamCopy'] = ObjectSerializer.serialize(allowAudioStreamCopy, "boolean"); + } + + if (breakOnNonKeyFrames !== undefined) { + localVarQueryParameters['breakOnNonKeyFrames'] = ObjectSerializer.serialize(breakOnNonKeyFrames, "boolean"); + } + + if (audioSampleRate !== undefined) { + localVarQueryParameters['audioSampleRate'] = ObjectSerializer.serialize(audioSampleRate, "number"); + } + + if (maxAudioBitDepth !== undefined) { + localVarQueryParameters['maxAudioBitDepth'] = ObjectSerializer.serialize(maxAudioBitDepth, "number"); + } + + if (audioBitRate !== undefined) { + localVarQueryParameters['audioBitRate'] = ObjectSerializer.serialize(audioBitRate, "number"); + } + + if (audioChannels !== undefined) { + localVarQueryParameters['audioChannels'] = ObjectSerializer.serialize(audioChannels, "number"); + } + + if (maxAudioChannels !== undefined) { + localVarQueryParameters['maxAudioChannels'] = ObjectSerializer.serialize(maxAudioChannels, "number"); + } + + if (profile !== undefined) { + localVarQueryParameters['profile'] = ObjectSerializer.serialize(profile, "string"); + } + + if (level !== undefined) { + localVarQueryParameters['level'] = ObjectSerializer.serialize(level, "string"); + } + + if (framerate !== undefined) { + localVarQueryParameters['framerate'] = ObjectSerializer.serialize(framerate, "number"); + } + + if (maxFramerate !== undefined) { + localVarQueryParameters['maxFramerate'] = ObjectSerializer.serialize(maxFramerate, "number"); + } + + if (copyTimestamps !== undefined) { + localVarQueryParameters['copyTimestamps'] = ObjectSerializer.serialize(copyTimestamps, "boolean"); + } + + if (startTimeTicks !== undefined) { + localVarQueryParameters['startTimeTicks'] = ObjectSerializer.serialize(startTimeTicks, "number"); + } + + if (width !== undefined) { + localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number"); + } + + if (height !== undefined) { + localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number"); + } + + if (maxWidth !== undefined) { + localVarQueryParameters['maxWidth'] = ObjectSerializer.serialize(maxWidth, "number"); + } + + if (maxHeight !== undefined) { + localVarQueryParameters['maxHeight'] = ObjectSerializer.serialize(maxHeight, "number"); + } + + if (videoBitRate !== undefined) { + localVarQueryParameters['videoBitRate'] = ObjectSerializer.serialize(videoBitRate, "number"); + } + + if (subtitleStreamIndex !== undefined) { + localVarQueryParameters['subtitleStreamIndex'] = ObjectSerializer.serialize(subtitleStreamIndex, "number"); + } + + if (subtitleMethod !== undefined) { + localVarQueryParameters['subtitleMethod'] = ObjectSerializer.serialize(subtitleMethod, "SubtitleDeliveryMethod"); + } + + if (maxRefFrames !== undefined) { + localVarQueryParameters['maxRefFrames'] = ObjectSerializer.serialize(maxRefFrames, "number"); + } + + if (maxVideoBitDepth !== undefined) { + localVarQueryParameters['maxVideoBitDepth'] = ObjectSerializer.serialize(maxVideoBitDepth, "number"); + } + + if (requireAvc !== undefined) { + localVarQueryParameters['requireAvc'] = ObjectSerializer.serialize(requireAvc, "boolean"); + } + + if (deInterlace !== undefined) { + localVarQueryParameters['deInterlace'] = ObjectSerializer.serialize(deInterlace, "boolean"); + } + + if (requireNonAnamorphic !== undefined) { + localVarQueryParameters['requireNonAnamorphic'] = ObjectSerializer.serialize(requireNonAnamorphic, "boolean"); + } + + if (transcodingMaxAudioChannels !== undefined) { + localVarQueryParameters['transcodingMaxAudioChannels'] = ObjectSerializer.serialize(transcodingMaxAudioChannels, "number"); + } + + if (cpuCoreLimit !== undefined) { + localVarQueryParameters['cpuCoreLimit'] = ObjectSerializer.serialize(cpuCoreLimit, "number"); + } + + if (liveStreamId !== undefined) { + localVarQueryParameters['liveStreamId'] = ObjectSerializer.serialize(liveStreamId, "string"); + } + + if (enableMpegtsM2TsMode !== undefined) { + localVarQueryParameters['enableMpegtsM2TsMode'] = ObjectSerializer.serialize(enableMpegtsM2TsMode, "boolean"); + } + + if (videoCodec !== undefined) { + localVarQueryParameters['videoCodec'] = ObjectSerializer.serialize(videoCodec, "string"); + } + + if (subtitleCodec !== undefined) { + localVarQueryParameters['subtitleCodec'] = ObjectSerializer.serialize(subtitleCodec, "string"); + } + + if (transcodeReasons !== undefined) { + localVarQueryParameters['transcodeReasons'] = ObjectSerializer.serialize(transcodeReasons, "string"); + } + + if (audioStreamIndex !== undefined) { + localVarQueryParameters['audioStreamIndex'] = ObjectSerializer.serialize(audioStreamIndex, "number"); + } + + if (videoStreamIndex !== undefined) { + localVarQueryParameters['videoStreamIndex'] = ObjectSerializer.serialize(videoStreamIndex, "number"); + } + + if (context !== undefined) { + localVarQueryParameters['context'] = ObjectSerializer.serialize(context, "EncodingContext"); + } + + if (streamOptions !== undefined) { + localVarQueryParameters['streamOptions'] = ObjectSerializer.serialize(streamOptions, "{ [key: string]: string; }"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets a video stream. + * @param itemId The item id. + * @param container The video container. Possible values are: ts, webm, asf, wmv, ogv, mp4, m4v, mkv, mpeg, mpg, avi, 3gp, wmv, wtv, m2ts, mov, iso, flv. + * @param _static Optional. If true, the original file will be streamed statically without any encoding. Use either no url extension or the original file extension. true/false. + * @param params The streaming parameters. + * @param tag The tag. + * @param deviceProfileId Optional. The dlna device profile id to utilize. + * @param playSessionId The play session id. + * @param segmentContainer The segment container. + * @param segmentLength The segment length. + * @param minSegments The minimum number of segments. + * @param mediaSourceId The media version id, if playing an alternate version. + * @param deviceId The device id of the client requesting. Used to stop encoding processes when needed. + * @param audioCodec Optional. Specify a audio codec to encode to, e.g. mp3. If omitted the server will auto-select using the url\'s extension. Options: aac, mp3, vorbis, wma. + * @param enableAutoStreamCopy Whether or not to allow automatic stream copy if requested values match the original source. Defaults to true. + * @param allowVideoStreamCopy Whether or not to allow copying of the video stream url. + * @param allowAudioStreamCopy Whether or not to allow copying of the audio stream url. + * @param breakOnNonKeyFrames Optional. Whether to break on non key frames. + * @param audioSampleRate Optional. Specify a specific audio sample rate, e.g. 44100. + * @param maxAudioBitDepth Optional. The maximum audio bit depth. + * @param audioBitRate Optional. Specify an audio bitrate to encode to, e.g. 128000. If omitted this will be left to encoder defaults. + * @param audioChannels Optional. Specify a specific number of audio channels to encode to, e.g. 2. + * @param maxAudioChannels Optional. Specify a maximum number of audio channels to encode to, e.g. 2. + * @param profile Optional. Specify a specific an encoder profile (varies by encoder), e.g. main, baseline, high. + * @param level Optional. Specify a level for the encoder profile (varies by encoder), e.g. 3, 3.1. + * @param framerate Optional. A specific video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. + * @param maxFramerate Optional. A specific maximum video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. + * @param copyTimestamps Whether or not to copy timestamps when transcoding with an offset. Defaults to false. + * @param startTimeTicks Optional. Specify a starting offset, in ticks. 1 tick = 10000 ms. + * @param width Optional. The fixed horizontal resolution of the encoded video. + * @param height Optional. The fixed vertical resolution of the encoded video. + * @param maxWidth Optional. The maximum horizontal resolution of the encoded video. + * @param maxHeight Optional. The maximum vertical resolution of the encoded video. + * @param videoBitRate Optional. Specify a video bitrate to encode to, e.g. 500000. If omitted this will be left to encoder defaults. + * @param subtitleStreamIndex Optional. The index of the subtitle stream to use. If omitted no subtitles will be used. + * @param subtitleMethod Optional. Specify the subtitle delivery method. + * @param maxRefFrames Optional. + * @param maxVideoBitDepth Optional. The maximum video bit depth. + * @param requireAvc Optional. Whether to require avc. + * @param deInterlace Optional. Whether to deinterlace the video. + * @param requireNonAnamorphic Optional. Whether to require a non anamorphic stream. + * @param transcodingMaxAudioChannels Optional. The maximum number of audio channels to transcode. + * @param cpuCoreLimit Optional. The limit of how many cpu cores to use. + * @param liveStreamId The live stream id. + * @param enableMpegtsM2TsMode Optional. Whether to enable the MpegtsM2Ts mode. + * @param videoCodec Optional. Specify a video codec to encode to, e.g. h264. If omitted the server will auto-select using the url\'s extension. Options: h265, h264, mpeg4, theora, vp8, vp9, vpx (deprecated), wmv. + * @param subtitleCodec Optional. Specify a subtitle codec to encode to. + * @param transcodeReasons Optional. The transcoding reason. + * @param audioStreamIndex Optional. The index of the audio stream to use. If omitted the first audio stream will be used. + * @param videoStreamIndex Optional. The index of the video stream to use. If omitted the first video stream will be used. + * @param context Optional. The MediaBrowser.Model.Dlna.EncodingContext. + * @param streamOptions Optional. The streaming options. + */ + public async headVideoStream (itemId: string, container?: string, _static?: boolean, params?: string, tag?: string, deviceProfileId?: string, playSessionId?: string, segmentContainer?: string, segmentLength?: number, minSegments?: number, mediaSourceId?: string, deviceId?: string, audioCodec?: string, enableAutoStreamCopy?: boolean, allowVideoStreamCopy?: boolean, allowAudioStreamCopy?: boolean, breakOnNonKeyFrames?: boolean, audioSampleRate?: number, maxAudioBitDepth?: number, audioBitRate?: number, audioChannels?: number, maxAudioChannels?: number, profile?: string, level?: string, framerate?: number, maxFramerate?: number, copyTimestamps?: boolean, startTimeTicks?: number, width?: number, height?: number, maxWidth?: number, maxHeight?: number, videoBitRate?: number, subtitleStreamIndex?: number, subtitleMethod?: SubtitleDeliveryMethod, maxRefFrames?: number, maxVideoBitDepth?: number, requireAvc?: boolean, deInterlace?: boolean, requireNonAnamorphic?: boolean, transcodingMaxAudioChannels?: number, cpuCoreLimit?: number, liveStreamId?: string, enableMpegtsM2TsMode?: boolean, videoCodec?: string, subtitleCodec?: string, transcodeReasons?: string, audioStreamIndex?: number, videoStreamIndex?: number, context?: EncodingContext, streamOptions?: { [key: string]: string; }, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/Videos/{itemId}/stream' + .replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['video/*']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'itemId' is not null or undefined + if (itemId === null || itemId === undefined) { + throw new Error('Required parameter itemId was null or undefined when calling headVideoStream.'); + } + + if (container !== undefined) { + localVarQueryParameters['container'] = ObjectSerializer.serialize(container, "string"); + } + + if (_static !== undefined) { + localVarQueryParameters['static'] = ObjectSerializer.serialize(_static, "boolean"); + } + + if (params !== undefined) { + localVarQueryParameters['params'] = ObjectSerializer.serialize(params, "string"); + } + + if (tag !== undefined) { + localVarQueryParameters['tag'] = ObjectSerializer.serialize(tag, "string"); + } + + if (deviceProfileId !== undefined) { + localVarQueryParameters['deviceProfileId'] = ObjectSerializer.serialize(deviceProfileId, "string"); + } + + if (playSessionId !== undefined) { + localVarQueryParameters['playSessionId'] = ObjectSerializer.serialize(playSessionId, "string"); + } + + if (segmentContainer !== undefined) { + localVarQueryParameters['segmentContainer'] = ObjectSerializer.serialize(segmentContainer, "string"); + } + + if (segmentLength !== undefined) { + localVarQueryParameters['segmentLength'] = ObjectSerializer.serialize(segmentLength, "number"); + } + + if (minSegments !== undefined) { + localVarQueryParameters['minSegments'] = ObjectSerializer.serialize(minSegments, "number"); + } + + if (mediaSourceId !== undefined) { + localVarQueryParameters['mediaSourceId'] = ObjectSerializer.serialize(mediaSourceId, "string"); + } + + if (deviceId !== undefined) { + localVarQueryParameters['deviceId'] = ObjectSerializer.serialize(deviceId, "string"); + } + + if (audioCodec !== undefined) { + localVarQueryParameters['audioCodec'] = ObjectSerializer.serialize(audioCodec, "string"); + } + + if (enableAutoStreamCopy !== undefined) { + localVarQueryParameters['enableAutoStreamCopy'] = ObjectSerializer.serialize(enableAutoStreamCopy, "boolean"); + } + + if (allowVideoStreamCopy !== undefined) { + localVarQueryParameters['allowVideoStreamCopy'] = ObjectSerializer.serialize(allowVideoStreamCopy, "boolean"); + } + + if (allowAudioStreamCopy !== undefined) { + localVarQueryParameters['allowAudioStreamCopy'] = ObjectSerializer.serialize(allowAudioStreamCopy, "boolean"); + } + + if (breakOnNonKeyFrames !== undefined) { + localVarQueryParameters['breakOnNonKeyFrames'] = ObjectSerializer.serialize(breakOnNonKeyFrames, "boolean"); + } + + if (audioSampleRate !== undefined) { + localVarQueryParameters['audioSampleRate'] = ObjectSerializer.serialize(audioSampleRate, "number"); + } + + if (maxAudioBitDepth !== undefined) { + localVarQueryParameters['maxAudioBitDepth'] = ObjectSerializer.serialize(maxAudioBitDepth, "number"); + } + + if (audioBitRate !== undefined) { + localVarQueryParameters['audioBitRate'] = ObjectSerializer.serialize(audioBitRate, "number"); + } + + if (audioChannels !== undefined) { + localVarQueryParameters['audioChannels'] = ObjectSerializer.serialize(audioChannels, "number"); + } + + if (maxAudioChannels !== undefined) { + localVarQueryParameters['maxAudioChannels'] = ObjectSerializer.serialize(maxAudioChannels, "number"); + } + + if (profile !== undefined) { + localVarQueryParameters['profile'] = ObjectSerializer.serialize(profile, "string"); + } + + if (level !== undefined) { + localVarQueryParameters['level'] = ObjectSerializer.serialize(level, "string"); + } + + if (framerate !== undefined) { + localVarQueryParameters['framerate'] = ObjectSerializer.serialize(framerate, "number"); + } + + if (maxFramerate !== undefined) { + localVarQueryParameters['maxFramerate'] = ObjectSerializer.serialize(maxFramerate, "number"); + } + + if (copyTimestamps !== undefined) { + localVarQueryParameters['copyTimestamps'] = ObjectSerializer.serialize(copyTimestamps, "boolean"); + } + + if (startTimeTicks !== undefined) { + localVarQueryParameters['startTimeTicks'] = ObjectSerializer.serialize(startTimeTicks, "number"); + } + + if (width !== undefined) { + localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number"); + } + + if (height !== undefined) { + localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number"); + } + + if (maxWidth !== undefined) { + localVarQueryParameters['maxWidth'] = ObjectSerializer.serialize(maxWidth, "number"); + } + + if (maxHeight !== undefined) { + localVarQueryParameters['maxHeight'] = ObjectSerializer.serialize(maxHeight, "number"); + } + + if (videoBitRate !== undefined) { + localVarQueryParameters['videoBitRate'] = ObjectSerializer.serialize(videoBitRate, "number"); + } + + if (subtitleStreamIndex !== undefined) { + localVarQueryParameters['subtitleStreamIndex'] = ObjectSerializer.serialize(subtitleStreamIndex, "number"); + } + + if (subtitleMethod !== undefined) { + localVarQueryParameters['subtitleMethod'] = ObjectSerializer.serialize(subtitleMethod, "SubtitleDeliveryMethod"); + } + + if (maxRefFrames !== undefined) { + localVarQueryParameters['maxRefFrames'] = ObjectSerializer.serialize(maxRefFrames, "number"); + } + + if (maxVideoBitDepth !== undefined) { + localVarQueryParameters['maxVideoBitDepth'] = ObjectSerializer.serialize(maxVideoBitDepth, "number"); + } + + if (requireAvc !== undefined) { + localVarQueryParameters['requireAvc'] = ObjectSerializer.serialize(requireAvc, "boolean"); + } + + if (deInterlace !== undefined) { + localVarQueryParameters['deInterlace'] = ObjectSerializer.serialize(deInterlace, "boolean"); + } + + if (requireNonAnamorphic !== undefined) { + localVarQueryParameters['requireNonAnamorphic'] = ObjectSerializer.serialize(requireNonAnamorphic, "boolean"); + } + + if (transcodingMaxAudioChannels !== undefined) { + localVarQueryParameters['transcodingMaxAudioChannels'] = ObjectSerializer.serialize(transcodingMaxAudioChannels, "number"); + } + + if (cpuCoreLimit !== undefined) { + localVarQueryParameters['cpuCoreLimit'] = ObjectSerializer.serialize(cpuCoreLimit, "number"); + } + + if (liveStreamId !== undefined) { + localVarQueryParameters['liveStreamId'] = ObjectSerializer.serialize(liveStreamId, "string"); + } + + if (enableMpegtsM2TsMode !== undefined) { + localVarQueryParameters['enableMpegtsM2TsMode'] = ObjectSerializer.serialize(enableMpegtsM2TsMode, "boolean"); + } + + if (videoCodec !== undefined) { + localVarQueryParameters['videoCodec'] = ObjectSerializer.serialize(videoCodec, "string"); + } + + if (subtitleCodec !== undefined) { + localVarQueryParameters['subtitleCodec'] = ObjectSerializer.serialize(subtitleCodec, "string"); + } + + if (transcodeReasons !== undefined) { + localVarQueryParameters['transcodeReasons'] = ObjectSerializer.serialize(transcodeReasons, "string"); + } + + if (audioStreamIndex !== undefined) { + localVarQueryParameters['audioStreamIndex'] = ObjectSerializer.serialize(audioStreamIndex, "number"); + } + + if (videoStreamIndex !== undefined) { + localVarQueryParameters['videoStreamIndex'] = ObjectSerializer.serialize(videoStreamIndex, "number"); + } + + if (context !== undefined) { + localVarQueryParameters['context'] = ObjectSerializer.serialize(context, "EncodingContext"); + } + + if (streamOptions !== undefined) { + localVarQueryParameters['streamOptions'] = ObjectSerializer.serialize(streamOptions, "{ [key: string]: string; }"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'HEAD', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Gets a video stream. + * @param itemId The item id. + * @param container The video container. Possible values are: ts, webm, asf, wmv, ogv, mp4, m4v, mkv, mpeg, mpg, avi, 3gp, wmv, wtv, m2ts, mov, iso, flv. + * @param _static Optional. If true, the original file will be streamed statically without any encoding. Use either no url extension or the original file extension. true/false. + * @param params The streaming parameters. + * @param tag The tag. + * @param deviceProfileId Optional. The dlna device profile id to utilize. + * @param playSessionId The play session id. + * @param segmentContainer The segment container. + * @param segmentLength The segment length. + * @param minSegments The minimum number of segments. + * @param mediaSourceId The media version id, if playing an alternate version. + * @param deviceId The device id of the client requesting. Used to stop encoding processes when needed. + * @param audioCodec Optional. Specify a audio codec to encode to, e.g. mp3. If omitted the server will auto-select using the url\'s extension. Options: aac, mp3, vorbis, wma. + * @param enableAutoStreamCopy Whether or not to allow automatic stream copy if requested values match the original source. Defaults to true. + * @param allowVideoStreamCopy Whether or not to allow copying of the video stream url. + * @param allowAudioStreamCopy Whether or not to allow copying of the audio stream url. + * @param breakOnNonKeyFrames Optional. Whether to break on non key frames. + * @param audioSampleRate Optional. Specify a specific audio sample rate, e.g. 44100. + * @param maxAudioBitDepth Optional. The maximum audio bit depth. + * @param audioBitRate Optional. Specify an audio bitrate to encode to, e.g. 128000. If omitted this will be left to encoder defaults. + * @param audioChannels Optional. Specify a specific number of audio channels to encode to, e.g. 2. + * @param maxAudioChannels Optional. Specify a maximum number of audio channels to encode to, e.g. 2. + * @param profile Optional. Specify a specific an encoder profile (varies by encoder), e.g. main, baseline, high. + * @param level Optional. Specify a level for the encoder profile (varies by encoder), e.g. 3, 3.1. + * @param framerate Optional. A specific video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. + * @param maxFramerate Optional. A specific maximum video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. + * @param copyTimestamps Whether or not to copy timestamps when transcoding with an offset. Defaults to false. + * @param startTimeTicks Optional. Specify a starting offset, in ticks. 1 tick = 10000 ms. + * @param width Optional. The fixed horizontal resolution of the encoded video. + * @param height Optional. The fixed vertical resolution of the encoded video. + * @param maxWidth Optional. The maximum horizontal resolution of the encoded video. + * @param maxHeight Optional. The maximum vertical resolution of the encoded video. + * @param videoBitRate Optional. Specify a video bitrate to encode to, e.g. 500000. If omitted this will be left to encoder defaults. + * @param subtitleStreamIndex Optional. The index of the subtitle stream to use. If omitted no subtitles will be used. + * @param subtitleMethod Optional. Specify the subtitle delivery method. + * @param maxRefFrames Optional. + * @param maxVideoBitDepth Optional. The maximum video bit depth. + * @param requireAvc Optional. Whether to require avc. + * @param deInterlace Optional. Whether to deinterlace the video. + * @param requireNonAnamorphic Optional. Whether to require a non anamorphic stream. + * @param transcodingMaxAudioChannels Optional. The maximum number of audio channels to transcode. + * @param cpuCoreLimit Optional. The limit of how many cpu cores to use. + * @param liveStreamId The live stream id. + * @param enableMpegtsM2TsMode Optional. Whether to enable the MpegtsM2Ts mode. + * @param videoCodec Optional. Specify a video codec to encode to, e.g. h264. If omitted the server will auto-select using the url\'s extension. Options: h265, h264, mpeg4, theora, vp8, vp9, vpx (deprecated), wmv. + * @param subtitleCodec Optional. Specify a subtitle codec to encode to. + * @param transcodeReasons Optional. The transcoding reason. + * @param audioStreamIndex Optional. The index of the audio stream to use. If omitted the first audio stream will be used. + * @param videoStreamIndex Optional. The index of the video stream to use. If omitted the first video stream will be used. + * @param context Optional. The MediaBrowser.Model.Dlna.EncodingContext. + * @param streamOptions Optional. The streaming options. + */ + public async headVideoStreamByContainer (itemId: string, container: string, _static?: boolean, params?: string, tag?: string, deviceProfileId?: string, playSessionId?: string, segmentContainer?: string, segmentLength?: number, minSegments?: number, mediaSourceId?: string, deviceId?: string, audioCodec?: string, enableAutoStreamCopy?: boolean, allowVideoStreamCopy?: boolean, allowAudioStreamCopy?: boolean, breakOnNonKeyFrames?: boolean, audioSampleRate?: number, maxAudioBitDepth?: number, audioBitRate?: number, audioChannels?: number, maxAudioChannels?: number, profile?: string, level?: string, framerate?: number, maxFramerate?: number, copyTimestamps?: boolean, startTimeTicks?: number, width?: number, height?: number, maxWidth?: number, maxHeight?: number, videoBitRate?: number, subtitleStreamIndex?: number, subtitleMethod?: SubtitleDeliveryMethod, maxRefFrames?: number, maxVideoBitDepth?: number, requireAvc?: boolean, deInterlace?: boolean, requireNonAnamorphic?: boolean, transcodingMaxAudioChannels?: number, cpuCoreLimit?: number, liveStreamId?: string, enableMpegtsM2TsMode?: boolean, videoCodec?: string, subtitleCodec?: string, transcodeReasons?: string, audioStreamIndex?: number, videoStreamIndex?: number, context?: EncodingContext, streamOptions?: { [key: string]: string; }, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Buffer; }> { + const localVarPath = this.basePath + '/Videos/{itemId}/stream.{container}' + .replace('{' + 'itemId' + '}', encodeURIComponent(String(itemId))) + .replace('{' + 'container' + '}', encodeURIComponent(String(container))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['video/*']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'itemId' is not null or undefined + if (itemId === null || itemId === undefined) { + throw new Error('Required parameter itemId was null or undefined when calling headVideoStreamByContainer.'); + } + + // verify required parameter 'container' is not null or undefined + if (container === null || container === undefined) { + throw new Error('Required parameter container was null or undefined when calling headVideoStreamByContainer.'); + } + + if (_static !== undefined) { + localVarQueryParameters['static'] = ObjectSerializer.serialize(_static, "boolean"); + } + + if (params !== undefined) { + localVarQueryParameters['params'] = ObjectSerializer.serialize(params, "string"); + } + + if (tag !== undefined) { + localVarQueryParameters['tag'] = ObjectSerializer.serialize(tag, "string"); + } + + if (deviceProfileId !== undefined) { + localVarQueryParameters['deviceProfileId'] = ObjectSerializer.serialize(deviceProfileId, "string"); + } + + if (playSessionId !== undefined) { + localVarQueryParameters['playSessionId'] = ObjectSerializer.serialize(playSessionId, "string"); + } + + if (segmentContainer !== undefined) { + localVarQueryParameters['segmentContainer'] = ObjectSerializer.serialize(segmentContainer, "string"); + } + + if (segmentLength !== undefined) { + localVarQueryParameters['segmentLength'] = ObjectSerializer.serialize(segmentLength, "number"); + } + + if (minSegments !== undefined) { + localVarQueryParameters['minSegments'] = ObjectSerializer.serialize(minSegments, "number"); + } + + if (mediaSourceId !== undefined) { + localVarQueryParameters['mediaSourceId'] = ObjectSerializer.serialize(mediaSourceId, "string"); + } + + if (deviceId !== undefined) { + localVarQueryParameters['deviceId'] = ObjectSerializer.serialize(deviceId, "string"); + } + + if (audioCodec !== undefined) { + localVarQueryParameters['audioCodec'] = ObjectSerializer.serialize(audioCodec, "string"); + } + + if (enableAutoStreamCopy !== undefined) { + localVarQueryParameters['enableAutoStreamCopy'] = ObjectSerializer.serialize(enableAutoStreamCopy, "boolean"); + } + + if (allowVideoStreamCopy !== undefined) { + localVarQueryParameters['allowVideoStreamCopy'] = ObjectSerializer.serialize(allowVideoStreamCopy, "boolean"); + } + + if (allowAudioStreamCopy !== undefined) { + localVarQueryParameters['allowAudioStreamCopy'] = ObjectSerializer.serialize(allowAudioStreamCopy, "boolean"); + } + + if (breakOnNonKeyFrames !== undefined) { + localVarQueryParameters['breakOnNonKeyFrames'] = ObjectSerializer.serialize(breakOnNonKeyFrames, "boolean"); + } + + if (audioSampleRate !== undefined) { + localVarQueryParameters['audioSampleRate'] = ObjectSerializer.serialize(audioSampleRate, "number"); + } + + if (maxAudioBitDepth !== undefined) { + localVarQueryParameters['maxAudioBitDepth'] = ObjectSerializer.serialize(maxAudioBitDepth, "number"); + } + + if (audioBitRate !== undefined) { + localVarQueryParameters['audioBitRate'] = ObjectSerializer.serialize(audioBitRate, "number"); + } + + if (audioChannels !== undefined) { + localVarQueryParameters['audioChannels'] = ObjectSerializer.serialize(audioChannels, "number"); + } + + if (maxAudioChannels !== undefined) { + localVarQueryParameters['maxAudioChannels'] = ObjectSerializer.serialize(maxAudioChannels, "number"); + } + + if (profile !== undefined) { + localVarQueryParameters['profile'] = ObjectSerializer.serialize(profile, "string"); + } + + if (level !== undefined) { + localVarQueryParameters['level'] = ObjectSerializer.serialize(level, "string"); + } + + if (framerate !== undefined) { + localVarQueryParameters['framerate'] = ObjectSerializer.serialize(framerate, "number"); + } + + if (maxFramerate !== undefined) { + localVarQueryParameters['maxFramerate'] = ObjectSerializer.serialize(maxFramerate, "number"); + } + + if (copyTimestamps !== undefined) { + localVarQueryParameters['copyTimestamps'] = ObjectSerializer.serialize(copyTimestamps, "boolean"); + } + + if (startTimeTicks !== undefined) { + localVarQueryParameters['startTimeTicks'] = ObjectSerializer.serialize(startTimeTicks, "number"); + } + + if (width !== undefined) { + localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number"); + } + + if (height !== undefined) { + localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number"); + } + + if (maxWidth !== undefined) { + localVarQueryParameters['maxWidth'] = ObjectSerializer.serialize(maxWidth, "number"); + } + + if (maxHeight !== undefined) { + localVarQueryParameters['maxHeight'] = ObjectSerializer.serialize(maxHeight, "number"); + } + + if (videoBitRate !== undefined) { + localVarQueryParameters['videoBitRate'] = ObjectSerializer.serialize(videoBitRate, "number"); + } + + if (subtitleStreamIndex !== undefined) { + localVarQueryParameters['subtitleStreamIndex'] = ObjectSerializer.serialize(subtitleStreamIndex, "number"); + } + + if (subtitleMethod !== undefined) { + localVarQueryParameters['subtitleMethod'] = ObjectSerializer.serialize(subtitleMethod, "SubtitleDeliveryMethod"); + } + + if (maxRefFrames !== undefined) { + localVarQueryParameters['maxRefFrames'] = ObjectSerializer.serialize(maxRefFrames, "number"); + } + + if (maxVideoBitDepth !== undefined) { + localVarQueryParameters['maxVideoBitDepth'] = ObjectSerializer.serialize(maxVideoBitDepth, "number"); + } + + if (requireAvc !== undefined) { + localVarQueryParameters['requireAvc'] = ObjectSerializer.serialize(requireAvc, "boolean"); + } + + if (deInterlace !== undefined) { + localVarQueryParameters['deInterlace'] = ObjectSerializer.serialize(deInterlace, "boolean"); + } + + if (requireNonAnamorphic !== undefined) { + localVarQueryParameters['requireNonAnamorphic'] = ObjectSerializer.serialize(requireNonAnamorphic, "boolean"); + } + + if (transcodingMaxAudioChannels !== undefined) { + localVarQueryParameters['transcodingMaxAudioChannels'] = ObjectSerializer.serialize(transcodingMaxAudioChannels, "number"); + } + + if (cpuCoreLimit !== undefined) { + localVarQueryParameters['cpuCoreLimit'] = ObjectSerializer.serialize(cpuCoreLimit, "number"); + } + + if (liveStreamId !== undefined) { + localVarQueryParameters['liveStreamId'] = ObjectSerializer.serialize(liveStreamId, "string"); + } + + if (enableMpegtsM2TsMode !== undefined) { + localVarQueryParameters['enableMpegtsM2TsMode'] = ObjectSerializer.serialize(enableMpegtsM2TsMode, "boolean"); + } + + if (videoCodec !== undefined) { + localVarQueryParameters['videoCodec'] = ObjectSerializer.serialize(videoCodec, "string"); + } + + if (subtitleCodec !== undefined) { + localVarQueryParameters['subtitleCodec'] = ObjectSerializer.serialize(subtitleCodec, "string"); + } + + if (transcodeReasons !== undefined) { + localVarQueryParameters['transcodeReasons'] = ObjectSerializer.serialize(transcodeReasons, "string"); + } + + if (audioStreamIndex !== undefined) { + localVarQueryParameters['audioStreamIndex'] = ObjectSerializer.serialize(audioStreamIndex, "number"); + } + + if (videoStreamIndex !== undefined) { + localVarQueryParameters['videoStreamIndex'] = ObjectSerializer.serialize(videoStreamIndex, "number"); + } + + if (context !== undefined) { + localVarQueryParameters['context'] = ObjectSerializer.serialize(context, "EncodingContext"); + } + + if (streamOptions !== undefined) { + localVarQueryParameters['streamOptions'] = ObjectSerializer.serialize(streamOptions, "{ [key: string]: string; }"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'HEAD', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + encoding: null, + }; + + let authenticationPromise = Promise.resolve(); + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: Buffer; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "Buffer"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Merges videos into a single record. + * @param ids Item id list. This allows multiple, comma delimited. + */ + public async mergeVersions (ids: Array, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body?: any; }> { + const localVarPath = this.basePath + '/Videos/MergeVersions'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'ids' is not null or undefined + if (ids === null || ids === undefined) { + throw new Error('Required parameter ids was null or undefined when calling mergeVersions.'); + } + + if (ids !== undefined) { + localVarQueryParameters['ids'] = ObjectSerializer.serialize(ids, "Array"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'POST', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body?: any; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} diff --git a/jellyfin/api/yearsApi.ts b/jellyfin/api/yearsApi.ts new file mode 100644 index 0000000..99ac9b2 --- /dev/null +++ b/jellyfin/api/yearsApi.ts @@ -0,0 +1,315 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import localVarRequest from 'request'; +import http from 'http'; + +/* tslint:disable:no-unused-locals */ +import { BaseItemDto } from '../model/baseItemDto'; +import { BaseItemDtoQueryResult } from '../model/baseItemDtoQueryResult'; +import { BaseItemKind } from '../model/baseItemKind'; +import { ImageType } from '../model/imageType'; +import { ItemFields } from '../model/itemFields'; +import { ProblemDetails } from '../model/problemDetails'; +import { SortOrder } from '../model/sortOrder'; + +import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models'; +import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models'; + +import { HttpError, RequestFile } from './apis'; + +let defaultBasePath = 'http://localhost'; + +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== + +export enum YearsApiApiKeys { + CustomAuthentication, +} + +export class YearsApi { + protected _basePath = defaultBasePath; + protected _defaultHeaders : any = {}; + protected _useQuerystring : boolean = false; + + protected authentications = { + 'default': new VoidAuth(), + 'CustomAuthentication': new ApiKeyAuth('header', 'Authorization'), + } + + protected interceptors: Interceptor[] = []; + + constructor(basePath?: string); + constructor(basePathOrUsername: string, password?: string, basePath?: string) { + if (password) { + if (basePath) { + this.basePath = basePath; + } + } else { + if (basePathOrUsername) { + this.basePath = basePathOrUsername + } + } + } + + set useQuerystring(value: boolean) { + this._useQuerystring = value; + } + + set basePath(basePath: string) { + this._basePath = basePath; + } + + set defaultHeaders(defaultHeaders: any) { + this._defaultHeaders = defaultHeaders; + } + + get defaultHeaders() { + return this._defaultHeaders; + } + + get basePath() { + return this._basePath; + } + + public setDefaultAuthentication(auth: Authentication) { + this.authentications.default = auth; + } + + public setApiKey(key: YearsApiApiKeys, value: string) { + (this.authentications as any)[YearsApiApiKeys[key]].apiKey = value; + } + + public addInterceptor(interceptor: Interceptor) { + this.interceptors.push(interceptor); + } + + /** + * + * @summary Gets a year. + * @param year The year. + * @param userId Optional. Filter by user id, and attach user data. + */ + public async getYear (year: number, userId?: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDto; }> { + const localVarPath = this.basePath + '/Years/{year}' + .replace('{' + 'year' + '}', encodeURIComponent(String(year))); + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + // verify required parameter 'year' is not null or undefined + if (year === null || year === undefined) { + throw new Error('Required parameter year was null or undefined when calling getYear.'); + } + + if (userId !== undefined) { + localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: BaseItemDto; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "BaseItemDto"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } + /** + * + * @summary Get years. + * @param startIndex Skips over a given number of items within the results. Use for paging. + * @param limit Optional. The maximum number of records to return. + * @param sortOrder Sort Order - Ascending,Descending. + * @param parentId Specify this to localize the search to a specific item or folder. Omit to use the root. + * @param fields Optional. Specify additional fields of information to return in the output. + * @param excludeItemTypes Optional. If specified, results will be excluded based on item type. This allows multiple, comma delimited. + * @param includeItemTypes Optional. If specified, results will be included based on item type. This allows multiple, comma delimited. + * @param mediaTypes Optional. Filter by MediaType. Allows multiple, comma delimited. + * @param sortBy Optional. Specify one or more sort orders, comma delimited. Options: Album, AlbumArtist, Artist, Budget, CommunityRating, CriticRating, DateCreated, DatePlayed, PlayCount, PremiereDate, ProductionYear, SortName, Random, Revenue, Runtime. + * @param enableUserData Optional. Include user data. + * @param imageTypeLimit Optional. The max number of images to return, per image type. + * @param enableImageTypes Optional. The image types to include in the output. + * @param userId User Id. + * @param recursive Search recursively. + * @param enableImages Optional. Include image information in output. + */ + public async getYears (startIndex?: number, limit?: number, sortOrder?: Array, parentId?: string, fields?: Array, excludeItemTypes?: Array, includeItemTypes?: Array, mediaTypes?: Array, sortBy?: Array, enableUserData?: boolean, imageTypeLimit?: number, enableImageTypes?: Array, userId?: string, recursive?: boolean, enableImages?: boolean, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }> { + const localVarPath = this.basePath + '/Years'; + let localVarQueryParameters: any = {}; + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); + const produces = ['application/json', 'application/json; profile=CamelCase', 'application/json; profile=PascalCase']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + let localVarFormParams: any = {}; + + if (startIndex !== undefined) { + localVarQueryParameters['startIndex'] = ObjectSerializer.serialize(startIndex, "number"); + } + + if (limit !== undefined) { + localVarQueryParameters['limit'] = ObjectSerializer.serialize(limit, "number"); + } + + if (sortOrder !== undefined) { + localVarQueryParameters['sortOrder'] = ObjectSerializer.serialize(sortOrder, "Array"); + } + + if (parentId !== undefined) { + localVarQueryParameters['parentId'] = ObjectSerializer.serialize(parentId, "string"); + } + + if (fields !== undefined) { + localVarQueryParameters['fields'] = ObjectSerializer.serialize(fields, "Array"); + } + + if (excludeItemTypes !== undefined) { + localVarQueryParameters['excludeItemTypes'] = ObjectSerializer.serialize(excludeItemTypes, "Array"); + } + + if (includeItemTypes !== undefined) { + localVarQueryParameters['includeItemTypes'] = ObjectSerializer.serialize(includeItemTypes, "Array"); + } + + if (mediaTypes !== undefined) { + localVarQueryParameters['mediaTypes'] = ObjectSerializer.serialize(mediaTypes, "Array"); + } + + if (sortBy !== undefined) { + localVarQueryParameters['sortBy'] = ObjectSerializer.serialize(sortBy, "Array"); + } + + if (enableUserData !== undefined) { + localVarQueryParameters['enableUserData'] = ObjectSerializer.serialize(enableUserData, "boolean"); + } + + if (imageTypeLimit !== undefined) { + localVarQueryParameters['imageTypeLimit'] = ObjectSerializer.serialize(imageTypeLimit, "number"); + } + + if (enableImageTypes !== undefined) { + localVarQueryParameters['enableImageTypes'] = ObjectSerializer.serialize(enableImageTypes, "Array"); + } + + if (userId !== undefined) { + localVarQueryParameters['userId'] = ObjectSerializer.serialize(userId, "string"); + } + + if (recursive !== undefined) { + localVarQueryParameters['recursive'] = ObjectSerializer.serialize(recursive, "boolean"); + } + + if (enableImages !== undefined) { + localVarQueryParameters['enableImages'] = ObjectSerializer.serialize(enableImages, "boolean"); + } + + (Object).assign(localVarHeaderParams, options.headers); + + let localVarUseFormData = false; + + let localVarRequestOptions: localVarRequest.Options = { + method: 'GET', + qs: localVarQueryParameters, + headers: localVarHeaderParams, + uri: localVarPath, + useQuerystring: this._useQuerystring, + json: true, + }; + + let authenticationPromise = Promise.resolve(); + if (this.authentications.CustomAuthentication.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.CustomAuthentication.applyToRequest(localVarRequestOptions)); + } + authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); + + let interceptorPromise = authenticationPromise; + for (const interceptor of this.interceptors) { + interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions)); + } + + return interceptorPromise.then(() => { + if (Object.keys(localVarFormParams).length) { + if (localVarUseFormData) { + (localVarRequestOptions).formData = localVarFormParams; + } else { + localVarRequestOptions.form = localVarFormParams; + } + } + return new Promise<{ response: http.IncomingMessage; body: BaseItemDtoQueryResult; }>((resolve, reject) => { + localVarRequest(localVarRequestOptions, (error, response, body) => { + if (error) { + reject(error); + } else { + if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) { + body = ObjectSerializer.deserialize(body, "BaseItemDtoQueryResult"); + resolve({ response: response, body: body }); + } else { + reject(new HttpError(response, body, response.statusCode)); + } + } + }); + }); + }); + } +} diff --git a/jellyfin/git_push.sh b/jellyfin/git_push.sh new file mode 100644 index 0000000..f53a75d --- /dev/null +++ b/jellyfin/git_push.sh @@ -0,0 +1,57 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' diff --git a/jellyfin/model/accessSchedule.ts b/jellyfin/model/accessSchedule.ts new file mode 100644 index 0000000..2af2005 --- /dev/null +++ b/jellyfin/model/accessSchedule.ts @@ -0,0 +1,73 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { DynamicDayOfWeek } from './dynamicDayOfWeek'; + +/** +* An entity representing a user\'s access schedule. +*/ +export class AccessSchedule { + /** + * Gets the id of this instance. + */ + 'id'?: number; + /** + * Gets the id of the associated user. + */ + 'userId'?: string; + 'dayOfWeek'?: DynamicDayOfWeek; + /** + * Gets or sets the start hour. + */ + 'startHour'?: number; + /** + * Gets or sets the end hour. + */ + 'endHour'?: number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "id", + "baseName": "Id", + "type": "number" + }, + { + "name": "userId", + "baseName": "UserId", + "type": "string" + }, + { + "name": "dayOfWeek", + "baseName": "DayOfWeek", + "type": "DynamicDayOfWeek" + }, + { + "name": "startHour", + "baseName": "StartHour", + "type": "number" + }, + { + "name": "endHour", + "baseName": "EndHour", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return AccessSchedule.attributeTypeMap; + } +} + +export namespace AccessSchedule { +} diff --git a/jellyfin/model/activityLogEntry.ts b/jellyfin/model/activityLogEntry.ts new file mode 100644 index 0000000..0f7e864 --- /dev/null +++ b/jellyfin/model/activityLogEntry.ts @@ -0,0 +1,118 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { LogLevel } from './logLevel'; + +/** +* An activity log entry. +*/ +export class ActivityLogEntry { + /** + * Gets or sets the identifier. + */ + 'id'?: number; + /** + * Gets or sets the name. + */ + 'name'?: string; + /** + * Gets or sets the overview. + */ + 'overview'?: string | null; + /** + * Gets or sets the short overview. + */ + 'shortOverview'?: string | null; + /** + * Gets or sets the type. + */ + 'type'?: string; + /** + * Gets or sets the item identifier. + */ + 'itemId'?: string | null; + /** + * Gets or sets the date. + */ + 'date'?: Date; + /** + * Gets or sets the user identifier. + */ + 'userId'?: string; + /** + * Gets or sets the user primary image tag. + */ + 'userPrimaryImageTag'?: string | null; + 'severity'?: LogLevel; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "id", + "baseName": "Id", + "type": "number" + }, + { + "name": "name", + "baseName": "Name", + "type": "string" + }, + { + "name": "overview", + "baseName": "Overview", + "type": "string" + }, + { + "name": "shortOverview", + "baseName": "ShortOverview", + "type": "string" + }, + { + "name": "type", + "baseName": "Type", + "type": "string" + }, + { + "name": "itemId", + "baseName": "ItemId", + "type": "string" + }, + { + "name": "date", + "baseName": "Date", + "type": "Date" + }, + { + "name": "userId", + "baseName": "UserId", + "type": "string" + }, + { + "name": "userPrimaryImageTag", + "baseName": "UserPrimaryImageTag", + "type": "string" + }, + { + "name": "severity", + "baseName": "Severity", + "type": "LogLevel" + } ]; + + static getAttributeTypeMap() { + return ActivityLogEntry.attributeTypeMap; + } +} + +export namespace ActivityLogEntry { +} diff --git a/jellyfin/model/activityLogEntryQueryResult.ts b/jellyfin/model/activityLogEntryQueryResult.ts new file mode 100644 index 0000000..427c6f5 --- /dev/null +++ b/jellyfin/model/activityLogEntryQueryResult.ts @@ -0,0 +1,53 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { ActivityLogEntry } from './activityLogEntry'; + +export class ActivityLogEntryQueryResult { + /** + * Gets or sets the items. + */ + 'items'?: Array | null; + /** + * Gets or sets the total number of records available. + */ + 'totalRecordCount'?: number; + /** + * Gets or sets the index of the first record in Items. + */ + 'startIndex'?: number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "items", + "baseName": "Items", + "type": "Array" + }, + { + "name": "totalRecordCount", + "baseName": "TotalRecordCount", + "type": "number" + }, + { + "name": "startIndex", + "baseName": "StartIndex", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return ActivityLogEntryQueryResult.attributeTypeMap; + } +} + diff --git a/jellyfin/model/addListingProviderRequest.ts b/jellyfin/model/addListingProviderRequest.ts new file mode 100644 index 0000000..35d6e2e --- /dev/null +++ b/jellyfin/model/addListingProviderRequest.ts @@ -0,0 +1,134 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { NameValuePair } from './nameValuePair'; + +export class AddListingProviderRequest { + 'id'?: string | null; + 'type'?: string | null; + 'username'?: string | null; + 'password'?: string | null; + 'listingsId'?: string | null; + 'zipCode'?: string | null; + 'country'?: string | null; + 'path'?: string | null; + 'enabledTuners'?: Array | null; + 'enableAllTuners'?: boolean; + 'newsCategories'?: Array | null; + 'sportsCategories'?: Array | null; + 'kidsCategories'?: Array | null; + 'movieCategories'?: Array | null; + 'channelMappings'?: Array | null; + 'moviePrefix'?: string | null; + 'preferredLanguage'?: string | null; + 'userAgent'?: string | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "id", + "baseName": "Id", + "type": "string" + }, + { + "name": "type", + "baseName": "Type", + "type": "string" + }, + { + "name": "username", + "baseName": "Username", + "type": "string" + }, + { + "name": "password", + "baseName": "Password", + "type": "string" + }, + { + "name": "listingsId", + "baseName": "ListingsId", + "type": "string" + }, + { + "name": "zipCode", + "baseName": "ZipCode", + "type": "string" + }, + { + "name": "country", + "baseName": "Country", + "type": "string" + }, + { + "name": "path", + "baseName": "Path", + "type": "string" + }, + { + "name": "enabledTuners", + "baseName": "EnabledTuners", + "type": "Array" + }, + { + "name": "enableAllTuners", + "baseName": "EnableAllTuners", + "type": "boolean" + }, + { + "name": "newsCategories", + "baseName": "NewsCategories", + "type": "Array" + }, + { + "name": "sportsCategories", + "baseName": "SportsCategories", + "type": "Array" + }, + { + "name": "kidsCategories", + "baseName": "KidsCategories", + "type": "Array" + }, + { + "name": "movieCategories", + "baseName": "MovieCategories", + "type": "Array" + }, + { + "name": "channelMappings", + "baseName": "ChannelMappings", + "type": "Array" + }, + { + "name": "moviePrefix", + "baseName": "MoviePrefix", + "type": "string" + }, + { + "name": "preferredLanguage", + "baseName": "PreferredLanguage", + "type": "string" + }, + { + "name": "userAgent", + "baseName": "UserAgent", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return AddListingProviderRequest.attributeTypeMap; + } +} + diff --git a/jellyfin/model/addMediaPathRequest.ts b/jellyfin/model/addMediaPathRequest.ts new file mode 100644 index 0000000..1b12ee2 --- /dev/null +++ b/jellyfin/model/addMediaPathRequest.ts @@ -0,0 +1,53 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { MediaPathDtoPathInfo } from './mediaPathDtoPathInfo'; + +/** +* Media Path dto. +*/ +export class AddMediaPathRequest { + /** + * Gets or sets the name of the library. + */ + 'name': string; + /** + * Gets or sets the path to add. + */ + 'path'?: string | null; + 'pathInfo'?: MediaPathDtoPathInfo | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "Name", + "type": "string" + }, + { + "name": "path", + "baseName": "Path", + "type": "string" + }, + { + "name": "pathInfo", + "baseName": "PathInfo", + "type": "MediaPathDtoPathInfo" + } ]; + + static getAttributeTypeMap() { + return AddMediaPathRequest.attributeTypeMap; + } +} + diff --git a/jellyfin/model/addTunerHostRequest.ts b/jellyfin/model/addTunerHostRequest.ts new file mode 100644 index 0000000..86c855f --- /dev/null +++ b/jellyfin/model/addTunerHostRequest.ts @@ -0,0 +1,91 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class AddTunerHostRequest { + 'id'?: string | null; + 'url'?: string | null; + 'type'?: string | null; + 'deviceId'?: string | null; + 'friendlyName'?: string | null; + 'importFavoritesOnly'?: boolean; + 'allowHWTranscoding'?: boolean; + 'enableStreamLooping'?: boolean; + 'source'?: string | null; + 'tunerCount'?: number; + 'userAgent'?: string | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "id", + "baseName": "Id", + "type": "string" + }, + { + "name": "url", + "baseName": "Url", + "type": "string" + }, + { + "name": "type", + "baseName": "Type", + "type": "string" + }, + { + "name": "deviceId", + "baseName": "DeviceId", + "type": "string" + }, + { + "name": "friendlyName", + "baseName": "FriendlyName", + "type": "string" + }, + { + "name": "importFavoritesOnly", + "baseName": "ImportFavoritesOnly", + "type": "boolean" + }, + { + "name": "allowHWTranscoding", + "baseName": "AllowHWTranscoding", + "type": "boolean" + }, + { + "name": "enableStreamLooping", + "baseName": "EnableStreamLooping", + "type": "boolean" + }, + { + "name": "source", + "baseName": "Source", + "type": "string" + }, + { + "name": "tunerCount", + "baseName": "TunerCount", + "type": "number" + }, + { + "name": "userAgent", + "baseName": "UserAgent", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return AddTunerHostRequest.attributeTypeMap; + } +} + diff --git a/jellyfin/model/addVirtualFolderDto.ts b/jellyfin/model/addVirtualFolderDto.ts new file mode 100644 index 0000000..93ad1c5 --- /dev/null +++ b/jellyfin/model/addVirtualFolderDto.ts @@ -0,0 +1,35 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { AddVirtualFolderDtoLibraryOptions } from './addVirtualFolderDtoLibraryOptions'; + +/** +* Add virtual folder dto. +*/ +export class AddVirtualFolderDto { + 'libraryOptions'?: AddVirtualFolderDtoLibraryOptions | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "libraryOptions", + "baseName": "LibraryOptions", + "type": "AddVirtualFolderDtoLibraryOptions" + } ]; + + static getAttributeTypeMap() { + return AddVirtualFolderDto.attributeTypeMap; + } +} + diff --git a/jellyfin/model/addVirtualFolderDtoLibraryOptions.ts b/jellyfin/model/addVirtualFolderDtoLibraryOptions.ts new file mode 100644 index 0000000..56064a3 --- /dev/null +++ b/jellyfin/model/addVirtualFolderDtoLibraryOptions.ts @@ -0,0 +1,201 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { EmbeddedSubtitleOptions } from './embeddedSubtitleOptions'; +import { MediaPathInfo } from './mediaPathInfo'; +import { TypeOptions } from './typeOptions'; + +/** +* Gets or sets library options. +*/ +export class AddVirtualFolderDtoLibraryOptions { + 'enablePhotos'?: boolean; + 'enableRealtimeMonitor'?: boolean; + 'enableChapterImageExtraction'?: boolean; + 'extractChapterImagesDuringLibraryScan'?: boolean; + 'pathInfos'?: Array; + 'saveLocalMetadata'?: boolean; + 'enableInternetProviders'?: boolean; + 'enableAutomaticSeriesGrouping'?: boolean; + 'enableEmbeddedTitles'?: boolean; + 'enableEmbeddedEpisodeInfos'?: boolean; + 'automaticRefreshIntervalDays'?: number; + /** + * Gets or sets the preferred metadata language. + */ + 'preferredMetadataLanguage'?: string | null; + /** + * Gets or sets the metadata country code. + */ + 'metadataCountryCode'?: string | null; + 'seasonZeroDisplayName'?: string; + 'metadataSavers'?: Array | null; + 'disabledLocalMetadataReaders'?: Array; + 'localMetadataReaderOrder'?: Array | null; + 'disabledSubtitleFetchers'?: Array; + 'subtitleFetcherOrder'?: Array; + 'skipSubtitlesIfEmbeddedSubtitlesPresent'?: boolean; + 'skipSubtitlesIfAudioTrackMatches'?: boolean; + 'subtitleDownloadLanguages'?: Array | null; + 'requirePerfectSubtitleMatch'?: boolean; + 'saveSubtitlesWithMedia'?: boolean; + 'automaticallyAddToCollection'?: boolean; + 'allowEmbeddedSubtitles'?: EmbeddedSubtitleOptions; + 'typeOptions'?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "enablePhotos", + "baseName": "EnablePhotos", + "type": "boolean" + }, + { + "name": "enableRealtimeMonitor", + "baseName": "EnableRealtimeMonitor", + "type": "boolean" + }, + { + "name": "enableChapterImageExtraction", + "baseName": "EnableChapterImageExtraction", + "type": "boolean" + }, + { + "name": "extractChapterImagesDuringLibraryScan", + "baseName": "ExtractChapterImagesDuringLibraryScan", + "type": "boolean" + }, + { + "name": "pathInfos", + "baseName": "PathInfos", + "type": "Array" + }, + { + "name": "saveLocalMetadata", + "baseName": "SaveLocalMetadata", + "type": "boolean" + }, + { + "name": "enableInternetProviders", + "baseName": "EnableInternetProviders", + "type": "boolean" + }, + { + "name": "enableAutomaticSeriesGrouping", + "baseName": "EnableAutomaticSeriesGrouping", + "type": "boolean" + }, + { + "name": "enableEmbeddedTitles", + "baseName": "EnableEmbeddedTitles", + "type": "boolean" + }, + { + "name": "enableEmbeddedEpisodeInfos", + "baseName": "EnableEmbeddedEpisodeInfos", + "type": "boolean" + }, + { + "name": "automaticRefreshIntervalDays", + "baseName": "AutomaticRefreshIntervalDays", + "type": "number" + }, + { + "name": "preferredMetadataLanguage", + "baseName": "PreferredMetadataLanguage", + "type": "string" + }, + { + "name": "metadataCountryCode", + "baseName": "MetadataCountryCode", + "type": "string" + }, + { + "name": "seasonZeroDisplayName", + "baseName": "SeasonZeroDisplayName", + "type": "string" + }, + { + "name": "metadataSavers", + "baseName": "MetadataSavers", + "type": "Array" + }, + { + "name": "disabledLocalMetadataReaders", + "baseName": "DisabledLocalMetadataReaders", + "type": "Array" + }, + { + "name": "localMetadataReaderOrder", + "baseName": "LocalMetadataReaderOrder", + "type": "Array" + }, + { + "name": "disabledSubtitleFetchers", + "baseName": "DisabledSubtitleFetchers", + "type": "Array" + }, + { + "name": "subtitleFetcherOrder", + "baseName": "SubtitleFetcherOrder", + "type": "Array" + }, + { + "name": "skipSubtitlesIfEmbeddedSubtitlesPresent", + "baseName": "SkipSubtitlesIfEmbeddedSubtitlesPresent", + "type": "boolean" + }, + { + "name": "skipSubtitlesIfAudioTrackMatches", + "baseName": "SkipSubtitlesIfAudioTrackMatches", + "type": "boolean" + }, + { + "name": "subtitleDownloadLanguages", + "baseName": "SubtitleDownloadLanguages", + "type": "Array" + }, + { + "name": "requirePerfectSubtitleMatch", + "baseName": "RequirePerfectSubtitleMatch", + "type": "boolean" + }, + { + "name": "saveSubtitlesWithMedia", + "baseName": "SaveSubtitlesWithMedia", + "type": "boolean" + }, + { + "name": "automaticallyAddToCollection", + "baseName": "AutomaticallyAddToCollection", + "type": "boolean" + }, + { + "name": "allowEmbeddedSubtitles", + "baseName": "AllowEmbeddedSubtitles", + "type": "EmbeddedSubtitleOptions" + }, + { + "name": "typeOptions", + "baseName": "TypeOptions", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return AddVirtualFolderDtoLibraryOptions.attributeTypeMap; + } +} + +export namespace AddVirtualFolderDtoLibraryOptions { +} diff --git a/jellyfin/model/addVirtualFolderRequest.ts b/jellyfin/model/addVirtualFolderRequest.ts new file mode 100644 index 0000000..2349d31 --- /dev/null +++ b/jellyfin/model/addVirtualFolderRequest.ts @@ -0,0 +1,35 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { AddVirtualFolderDtoLibraryOptions } from './addVirtualFolderDtoLibraryOptions'; + +/** +* Add virtual folder dto. +*/ +export class AddVirtualFolderRequest { + 'libraryOptions'?: AddVirtualFolderDtoLibraryOptions | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "libraryOptions", + "baseName": "LibraryOptions", + "type": "AddVirtualFolderDtoLibraryOptions" + } ]; + + static getAttributeTypeMap() { + return AddVirtualFolderRequest.attributeTypeMap; + } +} + diff --git a/jellyfin/model/adminNotificationDto.ts b/jellyfin/model/adminNotificationDto.ts new file mode 100644 index 0000000..5b32fc5 --- /dev/null +++ b/jellyfin/model/adminNotificationDto.ts @@ -0,0 +1,64 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { NotificationLevel } from './notificationLevel'; + +/** +* The admin notification dto. +*/ +export class AdminNotificationDto { + /** + * Gets or sets the notification name. + */ + 'name'?: string | null; + /** + * Gets or sets the notification description. + */ + 'description'?: string | null; + 'notificationLevel'?: NotificationLevel | null; + /** + * Gets or sets the notification url. + */ + 'url'?: string | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "Name", + "type": "string" + }, + { + "name": "description", + "baseName": "Description", + "type": "string" + }, + { + "name": "notificationLevel", + "baseName": "NotificationLevel", + "type": "NotificationLevel" + }, + { + "name": "url", + "baseName": "Url", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return AdminNotificationDto.attributeTypeMap; + } +} + +export namespace AdminNotificationDto { +} diff --git a/jellyfin/model/albumInfo.ts b/jellyfin/model/albumInfo.ts new file mode 100644 index 0000000..b8355e8 --- /dev/null +++ b/jellyfin/model/albumInfo.ts @@ -0,0 +1,137 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { SongInfo } from './songInfo'; + +export class AlbumInfo { + /** + * Gets or sets the name. + */ + 'name'?: string | null; + /** + * Gets or sets the original title. + */ + 'originalTitle'?: string | null; + /** + * Gets or sets the path. + */ + 'path'?: string | null; + /** + * Gets or sets the metadata language. + */ + 'metadataLanguage'?: string | null; + /** + * Gets or sets the metadata country code. + */ + 'metadataCountryCode'?: string | null; + /** + * Gets or sets the provider ids. + */ + 'providerIds'?: { [key: string]: string; } | null; + /** + * Gets or sets the year. + */ + 'year'?: number | null; + 'indexNumber'?: number | null; + 'parentIndexNumber'?: number | null; + 'premiereDate'?: Date | null; + 'isAutomated'?: boolean; + /** + * Gets or sets the album artist. + */ + 'albumArtists'?: Array; + /** + * Gets or sets the artist provider ids. + */ + 'artistProviderIds'?: { [key: string]: string; }; + 'songInfos'?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "Name", + "type": "string" + }, + { + "name": "originalTitle", + "baseName": "OriginalTitle", + "type": "string" + }, + { + "name": "path", + "baseName": "Path", + "type": "string" + }, + { + "name": "metadataLanguage", + "baseName": "MetadataLanguage", + "type": "string" + }, + { + "name": "metadataCountryCode", + "baseName": "MetadataCountryCode", + "type": "string" + }, + { + "name": "providerIds", + "baseName": "ProviderIds", + "type": "{ [key: string]: string; }" + }, + { + "name": "year", + "baseName": "Year", + "type": "number" + }, + { + "name": "indexNumber", + "baseName": "IndexNumber", + "type": "number" + }, + { + "name": "parentIndexNumber", + "baseName": "ParentIndexNumber", + "type": "number" + }, + { + "name": "premiereDate", + "baseName": "PremiereDate", + "type": "Date" + }, + { + "name": "isAutomated", + "baseName": "IsAutomated", + "type": "boolean" + }, + { + "name": "albumArtists", + "baseName": "AlbumArtists", + "type": "Array" + }, + { + "name": "artistProviderIds", + "baseName": "ArtistProviderIds", + "type": "{ [key: string]: string; }" + }, + { + "name": "songInfos", + "baseName": "SongInfos", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return AlbumInfo.attributeTypeMap; + } +} + diff --git a/jellyfin/model/albumInfoRemoteSearchQuery.ts b/jellyfin/model/albumInfoRemoteSearchQuery.ts new file mode 100644 index 0000000..9ec41e4 --- /dev/null +++ b/jellyfin/model/albumInfoRemoteSearchQuery.ts @@ -0,0 +1,56 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { AlbumInfo } from './albumInfo'; + +export class AlbumInfoRemoteSearchQuery { + 'searchInfo'?: AlbumInfo | null; + 'itemId'?: string; + /** + * Gets or sets the provider name to search within if set. + */ + 'searchProviderName'?: string | null; + /** + * Gets or sets a value indicating whether disabled providers should be included. + */ + 'includeDisabledProviders'?: boolean; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "searchInfo", + "baseName": "SearchInfo", + "type": "AlbumInfo" + }, + { + "name": "itemId", + "baseName": "ItemId", + "type": "string" + }, + { + "name": "searchProviderName", + "baseName": "SearchProviderName", + "type": "string" + }, + { + "name": "includeDisabledProviders", + "baseName": "IncludeDisabledProviders", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return AlbumInfoRemoteSearchQuery.attributeTypeMap; + } +} + diff --git a/jellyfin/model/allThemeMediaResult.ts b/jellyfin/model/allThemeMediaResult.ts new file mode 100644 index 0000000..a1ed9d2 --- /dev/null +++ b/jellyfin/model/allThemeMediaResult.ts @@ -0,0 +1,44 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { AllThemeMediaResultThemeVideosResult } from './allThemeMediaResultThemeVideosResult'; + +export class AllThemeMediaResult { + 'themeVideosResult'?: AllThemeMediaResultThemeVideosResult | null; + 'themeSongsResult'?: AllThemeMediaResultThemeVideosResult | null; + 'soundtrackSongsResult'?: AllThemeMediaResultThemeVideosResult | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "themeVideosResult", + "baseName": "ThemeVideosResult", + "type": "AllThemeMediaResultThemeVideosResult" + }, + { + "name": "themeSongsResult", + "baseName": "ThemeSongsResult", + "type": "AllThemeMediaResultThemeVideosResult" + }, + { + "name": "soundtrackSongsResult", + "baseName": "SoundtrackSongsResult", + "type": "AllThemeMediaResultThemeVideosResult" + } ]; + + static getAttributeTypeMap() { + return AllThemeMediaResult.attributeTypeMap; + } +} + diff --git a/jellyfin/model/allThemeMediaResultThemeVideosResult.ts b/jellyfin/model/allThemeMediaResultThemeVideosResult.ts new file mode 100644 index 0000000..0be90b1 --- /dev/null +++ b/jellyfin/model/allThemeMediaResultThemeVideosResult.ts @@ -0,0 +1,65 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { BaseItemDto } from './baseItemDto'; + +/** +* Class ThemeMediaResult. +*/ +export class AllThemeMediaResultThemeVideosResult { + /** + * Gets or sets the items. + */ + 'items'?: Array | null; + /** + * Gets or sets the total number of records available. + */ + 'totalRecordCount'?: number; + /** + * Gets or sets the index of the first record in Items. + */ + 'startIndex'?: number; + /** + * Gets or sets the owner id. + */ + 'ownerId'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "items", + "baseName": "Items", + "type": "Array" + }, + { + "name": "totalRecordCount", + "baseName": "TotalRecordCount", + "type": "number" + }, + { + "name": "startIndex", + "baseName": "StartIndex", + "type": "number" + }, + { + "name": "ownerId", + "baseName": "OwnerId", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return AllThemeMediaResultThemeVideosResult.attributeTypeMap; + } +} + diff --git a/jellyfin/model/applySearchCriteriaRequest.ts b/jellyfin/model/applySearchCriteriaRequest.ts new file mode 100644 index 0000000..c934dc0 --- /dev/null +++ b/jellyfin/model/applySearchCriteriaRequest.ts @@ -0,0 +1,107 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { RemoteSearchResult } from './remoteSearchResult'; + +export class ApplySearchCriteriaRequest { + /** + * Gets or sets the name. + */ + 'name'?: string | null; + /** + * Gets or sets the provider ids. + */ + 'providerIds'?: { [key: string]: string; } | null; + /** + * Gets or sets the year. + */ + 'productionYear'?: number | null; + 'indexNumber'?: number | null; + 'indexNumberEnd'?: number | null; + 'parentIndexNumber'?: number | null; + 'premiereDate'?: Date | null; + 'imageUrl'?: string | null; + 'searchProviderName'?: string | null; + 'overview'?: string | null; + 'albumArtist'?: RemoteSearchResult | null; + 'artists'?: Array | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "Name", + "type": "string" + }, + { + "name": "providerIds", + "baseName": "ProviderIds", + "type": "{ [key: string]: string; }" + }, + { + "name": "productionYear", + "baseName": "ProductionYear", + "type": "number" + }, + { + "name": "indexNumber", + "baseName": "IndexNumber", + "type": "number" + }, + { + "name": "indexNumberEnd", + "baseName": "IndexNumberEnd", + "type": "number" + }, + { + "name": "parentIndexNumber", + "baseName": "ParentIndexNumber", + "type": "number" + }, + { + "name": "premiereDate", + "baseName": "PremiereDate", + "type": "Date" + }, + { + "name": "imageUrl", + "baseName": "ImageUrl", + "type": "string" + }, + { + "name": "searchProviderName", + "baseName": "SearchProviderName", + "type": "string" + }, + { + "name": "overview", + "baseName": "Overview", + "type": "string" + }, + { + "name": "albumArtist", + "baseName": "AlbumArtist", + "type": "RemoteSearchResult" + }, + { + "name": "artists", + "baseName": "Artists", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return ApplySearchCriteriaRequest.attributeTypeMap; + } +} + diff --git a/jellyfin/model/architecture.ts b/jellyfin/model/architecture.ts new file mode 100644 index 0000000..b621576 --- /dev/null +++ b/jellyfin/model/architecture.ts @@ -0,0 +1,22 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export enum Architecture { + X86 = 'X86', + X64 = 'X64', + Arm = 'Arm', + Arm64 = 'Arm64', + Wasm = 'Wasm', + S390x = 'S390x' +} diff --git a/jellyfin/model/artistInfo.ts b/jellyfin/model/artistInfo.ts new file mode 100644 index 0000000..c7b6578 --- /dev/null +++ b/jellyfin/model/artistInfo.ts @@ -0,0 +1,119 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { SongInfo } from './songInfo'; + +export class ArtistInfo { + /** + * Gets or sets the name. + */ + 'name'?: string | null; + /** + * Gets or sets the original title. + */ + 'originalTitle'?: string | null; + /** + * Gets or sets the path. + */ + 'path'?: string | null; + /** + * Gets or sets the metadata language. + */ + 'metadataLanguage'?: string | null; + /** + * Gets or sets the metadata country code. + */ + 'metadataCountryCode'?: string | null; + /** + * Gets or sets the provider ids. + */ + 'providerIds'?: { [key: string]: string; } | null; + /** + * Gets or sets the year. + */ + 'year'?: number | null; + 'indexNumber'?: number | null; + 'parentIndexNumber'?: number | null; + 'premiereDate'?: Date | null; + 'isAutomated'?: boolean; + 'songInfos'?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "Name", + "type": "string" + }, + { + "name": "originalTitle", + "baseName": "OriginalTitle", + "type": "string" + }, + { + "name": "path", + "baseName": "Path", + "type": "string" + }, + { + "name": "metadataLanguage", + "baseName": "MetadataLanguage", + "type": "string" + }, + { + "name": "metadataCountryCode", + "baseName": "MetadataCountryCode", + "type": "string" + }, + { + "name": "providerIds", + "baseName": "ProviderIds", + "type": "{ [key: string]: string; }" + }, + { + "name": "year", + "baseName": "Year", + "type": "number" + }, + { + "name": "indexNumber", + "baseName": "IndexNumber", + "type": "number" + }, + { + "name": "parentIndexNumber", + "baseName": "ParentIndexNumber", + "type": "number" + }, + { + "name": "premiereDate", + "baseName": "PremiereDate", + "type": "Date" + }, + { + "name": "isAutomated", + "baseName": "IsAutomated", + "type": "boolean" + }, + { + "name": "songInfos", + "baseName": "SongInfos", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return ArtistInfo.attributeTypeMap; + } +} + diff --git a/jellyfin/model/artistInfoRemoteSearchQuery.ts b/jellyfin/model/artistInfoRemoteSearchQuery.ts new file mode 100644 index 0000000..0af3165 --- /dev/null +++ b/jellyfin/model/artistInfoRemoteSearchQuery.ts @@ -0,0 +1,56 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { ArtistInfo } from './artistInfo'; + +export class ArtistInfoRemoteSearchQuery { + 'searchInfo'?: ArtistInfo | null; + 'itemId'?: string; + /** + * Gets or sets the provider name to search within if set. + */ + 'searchProviderName'?: string | null; + /** + * Gets or sets a value indicating whether disabled providers should be included. + */ + 'includeDisabledProviders'?: boolean; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "searchInfo", + "baseName": "SearchInfo", + "type": "ArtistInfo" + }, + { + "name": "itemId", + "baseName": "ItemId", + "type": "string" + }, + { + "name": "searchProviderName", + "baseName": "SearchProviderName", + "type": "string" + }, + { + "name": "includeDisabledProviders", + "baseName": "IncludeDisabledProviders", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return ArtistInfoRemoteSearchQuery.attributeTypeMap; + } +} + diff --git a/jellyfin/model/authenticateUserByName.ts b/jellyfin/model/authenticateUserByName.ts new file mode 100644 index 0000000..99055b6 --- /dev/null +++ b/jellyfin/model/authenticateUserByName.ts @@ -0,0 +1,55 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* The authenticate user by name request body. +*/ +export class AuthenticateUserByName { + /** + * Gets or sets the username. + */ + 'username'?: string | null; + /** + * Gets or sets the plain text password. + */ + 'pw'?: string | null; + /** + * Gets or sets the sha1-hashed password. + */ + 'password'?: string | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "username", + "baseName": "Username", + "type": "string" + }, + { + "name": "pw", + "baseName": "Pw", + "type": "string" + }, + { + "name": "password", + "baseName": "Password", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return AuthenticateUserByName.attributeTypeMap; + } +} + diff --git a/jellyfin/model/authenticateUserByNameRequest.ts b/jellyfin/model/authenticateUserByNameRequest.ts new file mode 100644 index 0000000..d19b839 --- /dev/null +++ b/jellyfin/model/authenticateUserByNameRequest.ts @@ -0,0 +1,55 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* The authenticate user by name request body. +*/ +export class AuthenticateUserByNameRequest { + /** + * Gets or sets the username. + */ + 'username'?: string | null; + /** + * Gets or sets the plain text password. + */ + 'pw'?: string | null; + /** + * Gets or sets the sha1-hashed password. + */ + 'password'?: string | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "username", + "baseName": "Username", + "type": "string" + }, + { + "name": "pw", + "baseName": "Pw", + "type": "string" + }, + { + "name": "password", + "baseName": "Password", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return AuthenticateUserByNameRequest.attributeTypeMap; + } +} + diff --git a/jellyfin/model/authenticateWithQuickConnectRequest.ts b/jellyfin/model/authenticateWithQuickConnectRequest.ts new file mode 100644 index 0000000..2b4f744 --- /dev/null +++ b/jellyfin/model/authenticateWithQuickConnectRequest.ts @@ -0,0 +1,37 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* The quick connect request body. +*/ +export class AuthenticateWithQuickConnectRequest { + /** + * Gets or sets the quick connect secret. + */ + 'secret': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "secret", + "baseName": "Secret", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return AuthenticateWithQuickConnectRequest.attributeTypeMap; + } +} + diff --git a/jellyfin/model/authenticationInfo.ts b/jellyfin/model/authenticationInfo.ts new file mode 100644 index 0000000..294994f --- /dev/null +++ b/jellyfin/model/authenticationInfo.ts @@ -0,0 +1,127 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class AuthenticationInfo { + /** + * Gets or sets the identifier. + */ + 'id'?: number; + /** + * Gets or sets the access token. + */ + 'accessToken'?: string | null; + /** + * Gets or sets the device identifier. + */ + 'deviceId'?: string | null; + /** + * Gets or sets the name of the application. + */ + 'appName'?: string | null; + /** + * Gets or sets the application version. + */ + 'appVersion'?: string | null; + /** + * Gets or sets the name of the device. + */ + 'deviceName'?: string | null; + /** + * Gets or sets the user identifier. + */ + 'userId'?: string; + /** + * Gets or sets a value indicating whether this instance is active. + */ + 'isActive'?: boolean; + /** + * Gets or sets the date created. + */ + 'dateCreated'?: Date; + /** + * Gets or sets the date revoked. + */ + 'dateRevoked'?: Date | null; + 'dateLastActivity'?: Date; + 'userName'?: string | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "id", + "baseName": "Id", + "type": "number" + }, + { + "name": "accessToken", + "baseName": "AccessToken", + "type": "string" + }, + { + "name": "deviceId", + "baseName": "DeviceId", + "type": "string" + }, + { + "name": "appName", + "baseName": "AppName", + "type": "string" + }, + { + "name": "appVersion", + "baseName": "AppVersion", + "type": "string" + }, + { + "name": "deviceName", + "baseName": "DeviceName", + "type": "string" + }, + { + "name": "userId", + "baseName": "UserId", + "type": "string" + }, + { + "name": "isActive", + "baseName": "IsActive", + "type": "boolean" + }, + { + "name": "dateCreated", + "baseName": "DateCreated", + "type": "Date" + }, + { + "name": "dateRevoked", + "baseName": "DateRevoked", + "type": "Date" + }, + { + "name": "dateLastActivity", + "baseName": "DateLastActivity", + "type": "Date" + }, + { + "name": "userName", + "baseName": "UserName", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return AuthenticationInfo.attributeTypeMap; + } +} + diff --git a/jellyfin/model/authenticationInfoQueryResult.ts b/jellyfin/model/authenticationInfoQueryResult.ts new file mode 100644 index 0000000..95dafb0 --- /dev/null +++ b/jellyfin/model/authenticationInfoQueryResult.ts @@ -0,0 +1,53 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { AuthenticationInfo } from './authenticationInfo'; + +export class AuthenticationInfoQueryResult { + /** + * Gets or sets the items. + */ + 'items'?: Array | null; + /** + * Gets or sets the total number of records available. + */ + 'totalRecordCount'?: number; + /** + * Gets or sets the index of the first record in Items. + */ + 'startIndex'?: number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "items", + "baseName": "Items", + "type": "Array" + }, + { + "name": "totalRecordCount", + "baseName": "TotalRecordCount", + "type": "number" + }, + { + "name": "startIndex", + "baseName": "StartIndex", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return AuthenticationInfoQueryResult.attributeTypeMap; + } +} + diff --git a/jellyfin/model/authenticationResult.ts b/jellyfin/model/authenticationResult.ts new file mode 100644 index 0000000..b64a9e6 --- /dev/null +++ b/jellyfin/model/authenticationResult.ts @@ -0,0 +1,51 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { AuthenticationResultSessionInfo } from './authenticationResultSessionInfo'; +import { AuthenticationResultUser } from './authenticationResultUser'; + +export class AuthenticationResult { + 'user'?: AuthenticationResultUser | null; + 'sessionInfo'?: AuthenticationResultSessionInfo | null; + 'accessToken'?: string | null; + 'serverId'?: string | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "user", + "baseName": "User", + "type": "AuthenticationResultUser" + }, + { + "name": "sessionInfo", + "baseName": "SessionInfo", + "type": "AuthenticationResultSessionInfo" + }, + { + "name": "accessToken", + "baseName": "AccessToken", + "type": "string" + }, + { + "name": "serverId", + "baseName": "ServerId", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return AuthenticationResult.attributeTypeMap; + } +} + diff --git a/jellyfin/model/authenticationResultSessionInfo.ts b/jellyfin/model/authenticationResultSessionInfo.ts new file mode 100644 index 0000000..3fdc36d --- /dev/null +++ b/jellyfin/model/authenticationResultSessionInfo.ts @@ -0,0 +1,253 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { BaseItemDto } from './baseItemDto'; +import { ClientCapabilities } from './clientCapabilities'; +import { GeneralCommandType } from './generalCommandType'; +import { PlayerStateInfo } from './playerStateInfo'; +import { QueueItem } from './queueItem'; +import { SessionInfoFullNowPlayingItem } from './sessionInfoFullNowPlayingItem'; +import { SessionInfoNowPlayingItem } from './sessionInfoNowPlayingItem'; +import { SessionUserInfo } from './sessionUserInfo'; +import { TranscodingInfo } from './transcodingInfo'; + +/** +* Class SessionInfo. +*/ +export class AuthenticationResultSessionInfo { + 'playState'?: PlayerStateInfo | null; + 'additionalUsers'?: Array | null; + 'capabilities'?: ClientCapabilities | null; + /** + * Gets or sets the remote end point. + */ + 'remoteEndPoint'?: string | null; + /** + * Gets the playable media types. + */ + 'playableMediaTypes'?: Array | null; + /** + * Gets or sets the id. + */ + 'id'?: string | null; + /** + * Gets or sets the user id. + */ + 'userId'?: string; + /** + * Gets or sets the username. + */ + 'userName'?: string | null; + /** + * Gets or sets the type of the client. + */ + 'client'?: string | null; + /** + * Gets or sets the last activity date. + */ + 'lastActivityDate'?: Date; + /** + * Gets or sets the last playback check in. + */ + 'lastPlaybackCheckIn'?: Date; + /** + * Gets or sets the name of the device. + */ + 'deviceName'?: string | null; + /** + * Gets or sets the type of the device. + */ + 'deviceType'?: string | null; + 'nowPlayingItem'?: SessionInfoNowPlayingItem | null; + 'fullNowPlayingItem'?: SessionInfoFullNowPlayingItem | null; + 'nowViewingItem'?: SessionInfoNowPlayingItem | null; + /** + * Gets or sets the device id. + */ + 'deviceId'?: string | null; + /** + * Gets or sets the application version. + */ + 'applicationVersion'?: string | null; + 'transcodingInfo'?: TranscodingInfo | null; + /** + * Gets a value indicating whether this instance is active. + */ + 'isActive'?: boolean; + 'supportsMediaControl'?: boolean; + 'supportsRemoteControl'?: boolean; + 'nowPlayingQueue'?: Array | null; + 'nowPlayingQueueFullItems'?: Array | null; + 'hasCustomDeviceName'?: boolean; + 'playlistItemId'?: string | null; + 'serverId'?: string | null; + 'userPrimaryImageTag'?: string | null; + /** + * Gets the supported commands. + */ + 'supportedCommands'?: Array | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "playState", + "baseName": "PlayState", + "type": "PlayerStateInfo" + }, + { + "name": "additionalUsers", + "baseName": "AdditionalUsers", + "type": "Array" + }, + { + "name": "capabilities", + "baseName": "Capabilities", + "type": "ClientCapabilities" + }, + { + "name": "remoteEndPoint", + "baseName": "RemoteEndPoint", + "type": "string" + }, + { + "name": "playableMediaTypes", + "baseName": "PlayableMediaTypes", + "type": "Array" + }, + { + "name": "id", + "baseName": "Id", + "type": "string" + }, + { + "name": "userId", + "baseName": "UserId", + "type": "string" + }, + { + "name": "userName", + "baseName": "UserName", + "type": "string" + }, + { + "name": "client", + "baseName": "Client", + "type": "string" + }, + { + "name": "lastActivityDate", + "baseName": "LastActivityDate", + "type": "Date" + }, + { + "name": "lastPlaybackCheckIn", + "baseName": "LastPlaybackCheckIn", + "type": "Date" + }, + { + "name": "deviceName", + "baseName": "DeviceName", + "type": "string" + }, + { + "name": "deviceType", + "baseName": "DeviceType", + "type": "string" + }, + { + "name": "nowPlayingItem", + "baseName": "NowPlayingItem", + "type": "SessionInfoNowPlayingItem" + }, + { + "name": "fullNowPlayingItem", + "baseName": "FullNowPlayingItem", + "type": "SessionInfoFullNowPlayingItem" + }, + { + "name": "nowViewingItem", + "baseName": "NowViewingItem", + "type": "SessionInfoNowPlayingItem" + }, + { + "name": "deviceId", + "baseName": "DeviceId", + "type": "string" + }, + { + "name": "applicationVersion", + "baseName": "ApplicationVersion", + "type": "string" + }, + { + "name": "transcodingInfo", + "baseName": "TranscodingInfo", + "type": "TranscodingInfo" + }, + { + "name": "isActive", + "baseName": "IsActive", + "type": "boolean" + }, + { + "name": "supportsMediaControl", + "baseName": "SupportsMediaControl", + "type": "boolean" + }, + { + "name": "supportsRemoteControl", + "baseName": "SupportsRemoteControl", + "type": "boolean" + }, + { + "name": "nowPlayingQueue", + "baseName": "NowPlayingQueue", + "type": "Array" + }, + { + "name": "nowPlayingQueueFullItems", + "baseName": "NowPlayingQueueFullItems", + "type": "Array" + }, + { + "name": "hasCustomDeviceName", + "baseName": "HasCustomDeviceName", + "type": "boolean" + }, + { + "name": "playlistItemId", + "baseName": "PlaylistItemId", + "type": "string" + }, + { + "name": "serverId", + "baseName": "ServerId", + "type": "string" + }, + { + "name": "userPrimaryImageTag", + "baseName": "UserPrimaryImageTag", + "type": "string" + }, + { + "name": "supportedCommands", + "baseName": "SupportedCommands", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return AuthenticationResultSessionInfo.attributeTypeMap; + } +} + diff --git a/jellyfin/model/authenticationResultUser.ts b/jellyfin/model/authenticationResultUser.ts new file mode 100644 index 0000000..9a8ec80 --- /dev/null +++ b/jellyfin/model/authenticationResultUser.ts @@ -0,0 +1,150 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { UserDtoConfiguration } from './userDtoConfiguration'; +import { UserDtoPolicy } from './userDtoPolicy'; + +/** +* Class UserDto. +*/ +export class AuthenticationResultUser { + /** + * Gets or sets the name. + */ + 'name'?: string | null; + /** + * Gets or sets the server identifier. + */ + 'serverId'?: string | null; + /** + * Gets or sets the name of the server. This is not used by the server and is for client-side usage only. + */ + 'serverName'?: string | null; + /** + * Gets or sets the id. + */ + 'id'?: string; + /** + * Gets or sets the primary image tag. + */ + 'primaryImageTag'?: string | null; + /** + * Gets or sets a value indicating whether this instance has password. + */ + 'hasPassword'?: boolean; + /** + * Gets or sets a value indicating whether this instance has configured password. + */ + 'hasConfiguredPassword'?: boolean; + /** + * Gets or sets a value indicating whether this instance has configured easy password. + */ + 'hasConfiguredEasyPassword'?: boolean; + /** + * Gets or sets whether async login is enabled or not. + */ + 'enableAutoLogin'?: boolean | null; + /** + * Gets or sets the last login date. + */ + 'lastLoginDate'?: Date | null; + /** + * Gets or sets the last activity date. + */ + 'lastActivityDate'?: Date | null; + 'configuration'?: UserDtoConfiguration | null; + 'policy'?: UserDtoPolicy | null; + /** + * Gets or sets the primary image aspect ratio. + */ + 'primaryImageAspectRatio'?: number | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "Name", + "type": "string" + }, + { + "name": "serverId", + "baseName": "ServerId", + "type": "string" + }, + { + "name": "serverName", + "baseName": "ServerName", + "type": "string" + }, + { + "name": "id", + "baseName": "Id", + "type": "string" + }, + { + "name": "primaryImageTag", + "baseName": "PrimaryImageTag", + "type": "string" + }, + { + "name": "hasPassword", + "baseName": "HasPassword", + "type": "boolean" + }, + { + "name": "hasConfiguredPassword", + "baseName": "HasConfiguredPassword", + "type": "boolean" + }, + { + "name": "hasConfiguredEasyPassword", + "baseName": "HasConfiguredEasyPassword", + "type": "boolean" + }, + { + "name": "enableAutoLogin", + "baseName": "EnableAutoLogin", + "type": "boolean" + }, + { + "name": "lastLoginDate", + "baseName": "LastLoginDate", + "type": "Date" + }, + { + "name": "lastActivityDate", + "baseName": "LastActivityDate", + "type": "Date" + }, + { + "name": "configuration", + "baseName": "Configuration", + "type": "UserDtoConfiguration" + }, + { + "name": "policy", + "baseName": "Policy", + "type": "UserDtoPolicy" + }, + { + "name": "primaryImageAspectRatio", + "baseName": "PrimaryImageAspectRatio", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return AuthenticationResultUser.attributeTypeMap; + } +} + diff --git a/jellyfin/model/baseItem.ts b/jellyfin/model/baseItem.ts new file mode 100644 index 0000000..77b14a5 --- /dev/null +++ b/jellyfin/model/baseItem.ts @@ -0,0 +1,98 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { MediaUrl } from './mediaUrl'; + +/** +* Class BaseItem. +*/ +export class BaseItem { + 'size'?: number | null; + 'container'?: string | null; + 'isHD'?: boolean; + 'isShortcut'?: boolean; + 'shortcutPath'?: string | null; + 'width'?: number; + 'height'?: number; + 'extraIds'?: Array | null; + 'dateLastSaved'?: Date; + /** + * Gets or sets the remote trailers. + */ + 'remoteTrailers'?: Array | null; + 'supportsExternalTransfer'?: boolean; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "size", + "baseName": "Size", + "type": "number" + }, + { + "name": "container", + "baseName": "Container", + "type": "string" + }, + { + "name": "isHD", + "baseName": "IsHD", + "type": "boolean" + }, + { + "name": "isShortcut", + "baseName": "IsShortcut", + "type": "boolean" + }, + { + "name": "shortcutPath", + "baseName": "ShortcutPath", + "type": "string" + }, + { + "name": "width", + "baseName": "Width", + "type": "number" + }, + { + "name": "height", + "baseName": "Height", + "type": "number" + }, + { + "name": "extraIds", + "baseName": "ExtraIds", + "type": "Array" + }, + { + "name": "dateLastSaved", + "baseName": "DateLastSaved", + "type": "Date" + }, + { + "name": "remoteTrailers", + "baseName": "RemoteTrailers", + "type": "Array" + }, + { + "name": "supportsExternalTransfer", + "baseName": "SupportsExternalTransfer", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return BaseItem.attributeTypeMap; + } +} + diff --git a/jellyfin/model/baseItemDto.ts b/jellyfin/model/baseItemDto.ts new file mode 100644 index 0000000..cbf5090 --- /dev/null +++ b/jellyfin/model/baseItemDto.ts @@ -0,0 +1,1272 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { BaseItemDtoCurrentProgram } from './baseItemDtoCurrentProgram'; +import { BaseItemDtoImageBlurHashes } from './baseItemDtoImageBlurHashes'; +import { BaseItemDtoUserData } from './baseItemDtoUserData'; +import { BaseItemKind } from './baseItemKind'; +import { BaseItemPerson } from './baseItemPerson'; +import { ChannelType } from './channelType'; +import { ChapterInfo } from './chapterInfo'; +import { DayOfWeek } from './dayOfWeek'; +import { ExternalUrl } from './externalUrl'; +import { ImageOrientation } from './imageOrientation'; +import { IsoType } from './isoType'; +import { LocationType } from './locationType'; +import { MediaSourceInfo } from './mediaSourceInfo'; +import { MediaStream } from './mediaStream'; +import { MediaUrl } from './mediaUrl'; +import { MetadataField } from './metadataField'; +import { NameGuidPair } from './nameGuidPair'; +import { PlayAccess } from './playAccess'; +import { ProgramAudio } from './programAudio'; +import { Video3DFormat } from './video3DFormat'; +import { VideoType } from './videoType'; + +/** +* This is strictly used as a data transfer object from the api layer. This holds information about a BaseItem in a format that is convenient for the client. +*/ +export class BaseItemDto { + /** + * Gets or sets the name. + */ + 'name'?: string | null; + 'originalTitle'?: string | null; + /** + * Gets or sets the server identifier. + */ + 'serverId'?: string | null; + /** + * Gets or sets the id. + */ + 'id'?: string; + /** + * Gets or sets the etag. + */ + 'etag'?: string | null; + /** + * Gets or sets the type of the source. + */ + 'sourceType'?: string | null; + /** + * Gets or sets the playlist item identifier. + */ + 'playlistItemId'?: string | null; + /** + * Gets or sets the date created. + */ + 'dateCreated'?: Date | null; + 'dateLastMediaAdded'?: Date | null; + 'extraType'?: string | null; + 'airsBeforeSeasonNumber'?: number | null; + 'airsAfterSeasonNumber'?: number | null; + 'airsBeforeEpisodeNumber'?: number | null; + 'canDelete'?: boolean | null; + 'canDownload'?: boolean | null; + 'hasSubtitles'?: boolean | null; + 'preferredMetadataLanguage'?: string | null; + 'preferredMetadataCountryCode'?: string | null; + /** + * Gets or sets a value indicating whether [supports synchronize]. + */ + 'supportsSync'?: boolean | null; + 'container'?: string | null; + /** + * Gets or sets the name of the sort. + */ + 'sortName'?: string | null; + 'forcedSortName'?: string | null; + 'video3DFormat'?: Video3DFormat | null; + /** + * Gets or sets the premiere date. + */ + 'premiereDate'?: Date | null; + /** + * Gets or sets the external urls. + */ + 'externalUrls'?: Array | null; + /** + * Gets or sets the media versions. + */ + 'mediaSources'?: Array | null; + /** + * Gets or sets the critic rating. + */ + 'criticRating'?: number | null; + 'productionLocations'?: Array | null; + /** + * Gets or sets the path. + */ + 'path'?: string | null; + 'enableMediaSourceDisplay'?: boolean | null; + /** + * Gets or sets the official rating. + */ + 'officialRating'?: string | null; + /** + * Gets or sets the custom rating. + */ + 'customRating'?: string | null; + /** + * Gets or sets the channel identifier. + */ + 'channelId'?: string | null; + 'channelName'?: string | null; + /** + * Gets or sets the overview. + */ + 'overview'?: string | null; + /** + * Gets or sets the taglines. + */ + 'taglines'?: Array | null; + /** + * Gets or sets the genres. + */ + 'genres'?: Array | null; + /** + * Gets or sets the community rating. + */ + 'communityRating'?: number | null; + /** + * Gets or sets the cumulative run time ticks. + */ + 'cumulativeRunTimeTicks'?: number | null; + /** + * Gets or sets the run time ticks. + */ + 'runTimeTicks'?: number | null; + 'playAccess'?: PlayAccess | null; + /** + * Gets or sets the aspect ratio. + */ + 'aspectRatio'?: string | null; + /** + * Gets or sets the production year. + */ + 'productionYear'?: number | null; + /** + * Gets or sets a value indicating whether this instance is place holder. + */ + 'isPlaceHolder'?: boolean | null; + /** + * Gets or sets the number. + */ + 'number'?: string | null; + 'channelNumber'?: string | null; + /** + * Gets or sets the index number. + */ + 'indexNumber'?: number | null; + /** + * Gets or sets the index number end. + */ + 'indexNumberEnd'?: number | null; + /** + * Gets or sets the parent index number. + */ + 'parentIndexNumber'?: number | null; + /** + * Gets or sets the trailer urls. + */ + 'remoteTrailers'?: Array | null; + /** + * Gets or sets the provider ids. + */ + 'providerIds'?: { [key: string]: string; } | null; + /** + * Gets or sets a value indicating whether this instance is HD. + */ + 'isHD'?: boolean | null; + /** + * Gets or sets a value indicating whether this instance is folder. + */ + 'isFolder'?: boolean | null; + /** + * Gets or sets the parent id. + */ + 'parentId'?: string | null; + 'type'?: BaseItemKind; + /** + * Gets or sets the people. + */ + 'people'?: Array | null; + /** + * Gets or sets the studios. + */ + 'studios'?: Array | null; + 'genreItems'?: Array | null; + /** + * Gets or sets wether the item has a logo, this will hold the Id of the Parent that has one. + */ + 'parentLogoItemId'?: string | null; + /** + * Gets or sets wether the item has any backdrops, this will hold the Id of the Parent that has one. + */ + 'parentBackdropItemId'?: string | null; + /** + * Gets or sets the parent backdrop image tags. + */ + 'parentBackdropImageTags'?: Array | null; + /** + * Gets or sets the local trailer count. + */ + 'localTrailerCount'?: number | null; + 'userData'?: BaseItemDtoUserData | null; + /** + * Gets or sets the recursive item count. + */ + 'recursiveItemCount'?: number | null; + /** + * Gets or sets the child count. + */ + 'childCount'?: number | null; + /** + * Gets or sets the name of the series. + */ + 'seriesName'?: string | null; + /** + * Gets or sets the series id. + */ + 'seriesId'?: string | null; + /** + * Gets or sets the season identifier. + */ + 'seasonId'?: string | null; + /** + * Gets or sets the special feature count. + */ + 'specialFeatureCount'?: number | null; + /** + * Gets or sets the display preferences id. + */ + 'displayPreferencesId'?: string | null; + /** + * Gets or sets the status. + */ + 'status'?: string | null; + /** + * Gets or sets the air time. + */ + 'airTime'?: string | null; + /** + * Gets or sets the air days. + */ + 'airDays'?: Array | null; + /** + * Gets or sets the tags. + */ + 'tags'?: Array | null; + /** + * Gets or sets the primary image aspect ratio, after image enhancements. + */ + 'primaryImageAspectRatio'?: number | null; + /** + * Gets or sets the artists. + */ + 'artists'?: Array | null; + /** + * Gets or sets the artist items. + */ + 'artistItems'?: Array | null; + /** + * Gets or sets the album. + */ + 'album'?: string | null; + /** + * Gets or sets the type of the collection. + */ + 'collectionType'?: string | null; + /** + * Gets or sets the display order. + */ + 'displayOrder'?: string | null; + /** + * Gets or sets the album id. + */ + 'albumId'?: string | null; + /** + * Gets or sets the album image tag. + */ + 'albumPrimaryImageTag'?: string | null; + /** + * Gets or sets the series primary image tag. + */ + 'seriesPrimaryImageTag'?: string | null; + /** + * Gets or sets the album artist. + */ + 'albumArtist'?: string | null; + /** + * Gets or sets the album artists. + */ + 'albumArtists'?: Array | null; + /** + * Gets or sets the name of the season. + */ + 'seasonName'?: string | null; + /** + * Gets or sets the media streams. + */ + 'mediaStreams'?: Array | null; + 'videoType'?: VideoType | null; + /** + * Gets or sets the part count. + */ + 'partCount'?: number | null; + 'mediaSourceCount'?: number | null; + /** + * Gets or sets the image tags. + */ + 'imageTags'?: { [key: string]: string; } | null; + /** + * Gets or sets the backdrop image tags. + */ + 'backdropImageTags'?: Array | null; + /** + * Gets or sets the screenshot image tags. + */ + 'screenshotImageTags'?: Array | null; + /** + * Gets or sets the parent logo image tag. + */ + 'parentLogoImageTag'?: string | null; + /** + * Gets or sets wether the item has fan art, this will hold the Id of the Parent that has one. + */ + 'parentArtItemId'?: string | null; + /** + * Gets or sets the parent art image tag. + */ + 'parentArtImageTag'?: string | null; + /** + * Gets or sets the series thumb image tag. + */ + 'seriesThumbImageTag'?: string | null; + 'imageBlurHashes'?: BaseItemDtoImageBlurHashes | null; + /** + * Gets or sets the series studio. + */ + 'seriesStudio'?: string | null; + /** + * Gets or sets the parent thumb item id. + */ + 'parentThumbItemId'?: string | null; + /** + * Gets or sets the parent thumb image tag. + */ + 'parentThumbImageTag'?: string | null; + /** + * Gets or sets the parent primary image item identifier. + */ + 'parentPrimaryImageItemId'?: string | null; + /** + * Gets or sets the parent primary image tag. + */ + 'parentPrimaryImageTag'?: string | null; + /** + * Gets or sets the chapters. + */ + 'chapters'?: Array | null; + 'locationType'?: LocationType | null; + 'isoType'?: IsoType | null; + /** + * Gets or sets the type of the media. + */ + 'mediaType'?: string | null; + /** + * Gets or sets the end date. + */ + 'endDate'?: Date | null; + /** + * Gets or sets the locked fields. + */ + 'lockedFields'?: Array | null; + /** + * Gets or sets the trailer count. + */ + 'trailerCount'?: number | null; + /** + * Gets or sets the movie count. + */ + 'movieCount'?: number | null; + /** + * Gets or sets the series count. + */ + 'seriesCount'?: number | null; + 'programCount'?: number | null; + /** + * Gets or sets the episode count. + */ + 'episodeCount'?: number | null; + /** + * Gets or sets the song count. + */ + 'songCount'?: number | null; + /** + * Gets or sets the album count. + */ + 'albumCount'?: number | null; + 'artistCount'?: number | null; + /** + * Gets or sets the music video count. + */ + 'musicVideoCount'?: number | null; + /** + * Gets or sets a value indicating whether [enable internet providers]. + */ + 'lockData'?: boolean | null; + 'width'?: number | null; + 'height'?: number | null; + 'cameraMake'?: string | null; + 'cameraModel'?: string | null; + 'software'?: string | null; + 'exposureTime'?: number | null; + 'focalLength'?: number | null; + 'imageOrientation'?: ImageOrientation | null; + 'aperture'?: number | null; + 'shutterSpeed'?: number | null; + 'latitude'?: number | null; + 'longitude'?: number | null; + 'altitude'?: number | null; + 'isoSpeedRating'?: number | null; + /** + * Gets or sets the series timer identifier. + */ + 'seriesTimerId'?: string | null; + /** + * Gets or sets the program identifier. + */ + 'programId'?: string | null; + /** + * Gets or sets the channel primary image tag. + */ + 'channelPrimaryImageTag'?: string | null; + /** + * Gets or sets the start date of the recording, in UTC. + */ + 'startDate'?: Date | null; + /** + * Gets or sets the completion percentage. + */ + 'completionPercentage'?: number | null; + /** + * Gets or sets a value indicating whether this instance is repeat. + */ + 'isRepeat'?: boolean | null; + /** + * Gets or sets the episode title. + */ + 'episodeTitle'?: string | null; + 'channelType'?: ChannelType | null; + 'audio'?: ProgramAudio | null; + /** + * Gets or sets a value indicating whether this instance is movie. + */ + 'isMovie'?: boolean | null; + /** + * Gets or sets a value indicating whether this instance is sports. + */ + 'isSports'?: boolean | null; + /** + * Gets or sets a value indicating whether this instance is series. + */ + 'isSeries'?: boolean | null; + /** + * Gets or sets a value indicating whether this instance is live. + */ + 'isLive'?: boolean | null; + /** + * Gets or sets a value indicating whether this instance is news. + */ + 'isNews'?: boolean | null; + /** + * Gets or sets a value indicating whether this instance is kids. + */ + 'isKids'?: boolean | null; + /** + * Gets or sets a value indicating whether this instance is premiere. + */ + 'isPremiere'?: boolean | null; + /** + * Gets or sets the timer identifier. + */ + 'timerId'?: string | null; + 'currentProgram'?: BaseItemDtoCurrentProgram | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "Name", + "type": "string" + }, + { + "name": "originalTitle", + "baseName": "OriginalTitle", + "type": "string" + }, + { + "name": "serverId", + "baseName": "ServerId", + "type": "string" + }, + { + "name": "id", + "baseName": "Id", + "type": "string" + }, + { + "name": "etag", + "baseName": "Etag", + "type": "string" + }, + { + "name": "sourceType", + "baseName": "SourceType", + "type": "string" + }, + { + "name": "playlistItemId", + "baseName": "PlaylistItemId", + "type": "string" + }, + { + "name": "dateCreated", + "baseName": "DateCreated", + "type": "Date" + }, + { + "name": "dateLastMediaAdded", + "baseName": "DateLastMediaAdded", + "type": "Date" + }, + { + "name": "extraType", + "baseName": "ExtraType", + "type": "string" + }, + { + "name": "airsBeforeSeasonNumber", + "baseName": "AirsBeforeSeasonNumber", + "type": "number" + }, + { + "name": "airsAfterSeasonNumber", + "baseName": "AirsAfterSeasonNumber", + "type": "number" + }, + { + "name": "airsBeforeEpisodeNumber", + "baseName": "AirsBeforeEpisodeNumber", + "type": "number" + }, + { + "name": "canDelete", + "baseName": "CanDelete", + "type": "boolean" + }, + { + "name": "canDownload", + "baseName": "CanDownload", + "type": "boolean" + }, + { + "name": "hasSubtitles", + "baseName": "HasSubtitles", + "type": "boolean" + }, + { + "name": "preferredMetadataLanguage", + "baseName": "PreferredMetadataLanguage", + "type": "string" + }, + { + "name": "preferredMetadataCountryCode", + "baseName": "PreferredMetadataCountryCode", + "type": "string" + }, + { + "name": "supportsSync", + "baseName": "SupportsSync", + "type": "boolean" + }, + { + "name": "container", + "baseName": "Container", + "type": "string" + }, + { + "name": "sortName", + "baseName": "SortName", + "type": "string" + }, + { + "name": "forcedSortName", + "baseName": "ForcedSortName", + "type": "string" + }, + { + "name": "video3DFormat", + "baseName": "Video3DFormat", + "type": "Video3DFormat" + }, + { + "name": "premiereDate", + "baseName": "PremiereDate", + "type": "Date" + }, + { + "name": "externalUrls", + "baseName": "ExternalUrls", + "type": "Array" + }, + { + "name": "mediaSources", + "baseName": "MediaSources", + "type": "Array" + }, + { + "name": "criticRating", + "baseName": "CriticRating", + "type": "number" + }, + { + "name": "productionLocations", + "baseName": "ProductionLocations", + "type": "Array" + }, + { + "name": "path", + "baseName": "Path", + "type": "string" + }, + { + "name": "enableMediaSourceDisplay", + "baseName": "EnableMediaSourceDisplay", + "type": "boolean" + }, + { + "name": "officialRating", + "baseName": "OfficialRating", + "type": "string" + }, + { + "name": "customRating", + "baseName": "CustomRating", + "type": "string" + }, + { + "name": "channelId", + "baseName": "ChannelId", + "type": "string" + }, + { + "name": "channelName", + "baseName": "ChannelName", + "type": "string" + }, + { + "name": "overview", + "baseName": "Overview", + "type": "string" + }, + { + "name": "taglines", + "baseName": "Taglines", + "type": "Array" + }, + { + "name": "genres", + "baseName": "Genres", + "type": "Array" + }, + { + "name": "communityRating", + "baseName": "CommunityRating", + "type": "number" + }, + { + "name": "cumulativeRunTimeTicks", + "baseName": "CumulativeRunTimeTicks", + "type": "number" + }, + { + "name": "runTimeTicks", + "baseName": "RunTimeTicks", + "type": "number" + }, + { + "name": "playAccess", + "baseName": "PlayAccess", + "type": "PlayAccess" + }, + { + "name": "aspectRatio", + "baseName": "AspectRatio", + "type": "string" + }, + { + "name": "productionYear", + "baseName": "ProductionYear", + "type": "number" + }, + { + "name": "isPlaceHolder", + "baseName": "IsPlaceHolder", + "type": "boolean" + }, + { + "name": "number", + "baseName": "Number", + "type": "string" + }, + { + "name": "channelNumber", + "baseName": "ChannelNumber", + "type": "string" + }, + { + "name": "indexNumber", + "baseName": "IndexNumber", + "type": "number" + }, + { + "name": "indexNumberEnd", + "baseName": "IndexNumberEnd", + "type": "number" + }, + { + "name": "parentIndexNumber", + "baseName": "ParentIndexNumber", + "type": "number" + }, + { + "name": "remoteTrailers", + "baseName": "RemoteTrailers", + "type": "Array" + }, + { + "name": "providerIds", + "baseName": "ProviderIds", + "type": "{ [key: string]: string; }" + }, + { + "name": "isHD", + "baseName": "IsHD", + "type": "boolean" + }, + { + "name": "isFolder", + "baseName": "IsFolder", + "type": "boolean" + }, + { + "name": "parentId", + "baseName": "ParentId", + "type": "string" + }, + { + "name": "type", + "baseName": "Type", + "type": "BaseItemKind" + }, + { + "name": "people", + "baseName": "People", + "type": "Array" + }, + { + "name": "studios", + "baseName": "Studios", + "type": "Array" + }, + { + "name": "genreItems", + "baseName": "GenreItems", + "type": "Array" + }, + { + "name": "parentLogoItemId", + "baseName": "ParentLogoItemId", + "type": "string" + }, + { + "name": "parentBackdropItemId", + "baseName": "ParentBackdropItemId", + "type": "string" + }, + { + "name": "parentBackdropImageTags", + "baseName": "ParentBackdropImageTags", + "type": "Array" + }, + { + "name": "localTrailerCount", + "baseName": "LocalTrailerCount", + "type": "number" + }, + { + "name": "userData", + "baseName": "UserData", + "type": "BaseItemDtoUserData" + }, + { + "name": "recursiveItemCount", + "baseName": "RecursiveItemCount", + "type": "number" + }, + { + "name": "childCount", + "baseName": "ChildCount", + "type": "number" + }, + { + "name": "seriesName", + "baseName": "SeriesName", + "type": "string" + }, + { + "name": "seriesId", + "baseName": "SeriesId", + "type": "string" + }, + { + "name": "seasonId", + "baseName": "SeasonId", + "type": "string" + }, + { + "name": "specialFeatureCount", + "baseName": "SpecialFeatureCount", + "type": "number" + }, + { + "name": "displayPreferencesId", + "baseName": "DisplayPreferencesId", + "type": "string" + }, + { + "name": "status", + "baseName": "Status", + "type": "string" + }, + { + "name": "airTime", + "baseName": "AirTime", + "type": "string" + }, + { + "name": "airDays", + "baseName": "AirDays", + "type": "Array" + }, + { + "name": "tags", + "baseName": "Tags", + "type": "Array" + }, + { + "name": "primaryImageAspectRatio", + "baseName": "PrimaryImageAspectRatio", + "type": "number" + }, + { + "name": "artists", + "baseName": "Artists", + "type": "Array" + }, + { + "name": "artistItems", + "baseName": "ArtistItems", + "type": "Array" + }, + { + "name": "album", + "baseName": "Album", + "type": "string" + }, + { + "name": "collectionType", + "baseName": "CollectionType", + "type": "string" + }, + { + "name": "displayOrder", + "baseName": "DisplayOrder", + "type": "string" + }, + { + "name": "albumId", + "baseName": "AlbumId", + "type": "string" + }, + { + "name": "albumPrimaryImageTag", + "baseName": "AlbumPrimaryImageTag", + "type": "string" + }, + { + "name": "seriesPrimaryImageTag", + "baseName": "SeriesPrimaryImageTag", + "type": "string" + }, + { + "name": "albumArtist", + "baseName": "AlbumArtist", + "type": "string" + }, + { + "name": "albumArtists", + "baseName": "AlbumArtists", + "type": "Array" + }, + { + "name": "seasonName", + "baseName": "SeasonName", + "type": "string" + }, + { + "name": "mediaStreams", + "baseName": "MediaStreams", + "type": "Array" + }, + { + "name": "videoType", + "baseName": "VideoType", + "type": "VideoType" + }, + { + "name": "partCount", + "baseName": "PartCount", + "type": "number" + }, + { + "name": "mediaSourceCount", + "baseName": "MediaSourceCount", + "type": "number" + }, + { + "name": "imageTags", + "baseName": "ImageTags", + "type": "{ [key: string]: string; }" + }, + { + "name": "backdropImageTags", + "baseName": "BackdropImageTags", + "type": "Array" + }, + { + "name": "screenshotImageTags", + "baseName": "ScreenshotImageTags", + "type": "Array" + }, + { + "name": "parentLogoImageTag", + "baseName": "ParentLogoImageTag", + "type": "string" + }, + { + "name": "parentArtItemId", + "baseName": "ParentArtItemId", + "type": "string" + }, + { + "name": "parentArtImageTag", + "baseName": "ParentArtImageTag", + "type": "string" + }, + { + "name": "seriesThumbImageTag", + "baseName": "SeriesThumbImageTag", + "type": "string" + }, + { + "name": "imageBlurHashes", + "baseName": "ImageBlurHashes", + "type": "BaseItemDtoImageBlurHashes" + }, + { + "name": "seriesStudio", + "baseName": "SeriesStudio", + "type": "string" + }, + { + "name": "parentThumbItemId", + "baseName": "ParentThumbItemId", + "type": "string" + }, + { + "name": "parentThumbImageTag", + "baseName": "ParentThumbImageTag", + "type": "string" + }, + { + "name": "parentPrimaryImageItemId", + "baseName": "ParentPrimaryImageItemId", + "type": "string" + }, + { + "name": "parentPrimaryImageTag", + "baseName": "ParentPrimaryImageTag", + "type": "string" + }, + { + "name": "chapters", + "baseName": "Chapters", + "type": "Array" + }, + { + "name": "locationType", + "baseName": "LocationType", + "type": "LocationType" + }, + { + "name": "isoType", + "baseName": "IsoType", + "type": "IsoType" + }, + { + "name": "mediaType", + "baseName": "MediaType", + "type": "string" + }, + { + "name": "endDate", + "baseName": "EndDate", + "type": "Date" + }, + { + "name": "lockedFields", + "baseName": "LockedFields", + "type": "Array" + }, + { + "name": "trailerCount", + "baseName": "TrailerCount", + "type": "number" + }, + { + "name": "movieCount", + "baseName": "MovieCount", + "type": "number" + }, + { + "name": "seriesCount", + "baseName": "SeriesCount", + "type": "number" + }, + { + "name": "programCount", + "baseName": "ProgramCount", + "type": "number" + }, + { + "name": "episodeCount", + "baseName": "EpisodeCount", + "type": "number" + }, + { + "name": "songCount", + "baseName": "SongCount", + "type": "number" + }, + { + "name": "albumCount", + "baseName": "AlbumCount", + "type": "number" + }, + { + "name": "artistCount", + "baseName": "ArtistCount", + "type": "number" + }, + { + "name": "musicVideoCount", + "baseName": "MusicVideoCount", + "type": "number" + }, + { + "name": "lockData", + "baseName": "LockData", + "type": "boolean" + }, + { + "name": "width", + "baseName": "Width", + "type": "number" + }, + { + "name": "height", + "baseName": "Height", + "type": "number" + }, + { + "name": "cameraMake", + "baseName": "CameraMake", + "type": "string" + }, + { + "name": "cameraModel", + "baseName": "CameraModel", + "type": "string" + }, + { + "name": "software", + "baseName": "Software", + "type": "string" + }, + { + "name": "exposureTime", + "baseName": "ExposureTime", + "type": "number" + }, + { + "name": "focalLength", + "baseName": "FocalLength", + "type": "number" + }, + { + "name": "imageOrientation", + "baseName": "ImageOrientation", + "type": "ImageOrientation" + }, + { + "name": "aperture", + "baseName": "Aperture", + "type": "number" + }, + { + "name": "shutterSpeed", + "baseName": "ShutterSpeed", + "type": "number" + }, + { + "name": "latitude", + "baseName": "Latitude", + "type": "number" + }, + { + "name": "longitude", + "baseName": "Longitude", + "type": "number" + }, + { + "name": "altitude", + "baseName": "Altitude", + "type": "number" + }, + { + "name": "isoSpeedRating", + "baseName": "IsoSpeedRating", + "type": "number" + }, + { + "name": "seriesTimerId", + "baseName": "SeriesTimerId", + "type": "string" + }, + { + "name": "programId", + "baseName": "ProgramId", + "type": "string" + }, + { + "name": "channelPrimaryImageTag", + "baseName": "ChannelPrimaryImageTag", + "type": "string" + }, + { + "name": "startDate", + "baseName": "StartDate", + "type": "Date" + }, + { + "name": "completionPercentage", + "baseName": "CompletionPercentage", + "type": "number" + }, + { + "name": "isRepeat", + "baseName": "IsRepeat", + "type": "boolean" + }, + { + "name": "episodeTitle", + "baseName": "EpisodeTitle", + "type": "string" + }, + { + "name": "channelType", + "baseName": "ChannelType", + "type": "ChannelType" + }, + { + "name": "audio", + "baseName": "Audio", + "type": "ProgramAudio" + }, + { + "name": "isMovie", + "baseName": "IsMovie", + "type": "boolean" + }, + { + "name": "isSports", + "baseName": "IsSports", + "type": "boolean" + }, + { + "name": "isSeries", + "baseName": "IsSeries", + "type": "boolean" + }, + { + "name": "isLive", + "baseName": "IsLive", + "type": "boolean" + }, + { + "name": "isNews", + "baseName": "IsNews", + "type": "boolean" + }, + { + "name": "isKids", + "baseName": "IsKids", + "type": "boolean" + }, + { + "name": "isPremiere", + "baseName": "IsPremiere", + "type": "boolean" + }, + { + "name": "timerId", + "baseName": "TimerId", + "type": "string" + }, + { + "name": "currentProgram", + "baseName": "CurrentProgram", + "type": "BaseItemDtoCurrentProgram" + } ]; + + static getAttributeTypeMap() { + return BaseItemDto.attributeTypeMap; + } +} + +export namespace BaseItemDto { +} diff --git a/jellyfin/model/baseItemDtoCurrentProgram.ts b/jellyfin/model/baseItemDtoCurrentProgram.ts new file mode 100644 index 0000000..0d7b938 --- /dev/null +++ b/jellyfin/model/baseItemDtoCurrentProgram.ts @@ -0,0 +1,1271 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { BaseItemDtoImageBlurHashes } from './baseItemDtoImageBlurHashes'; +import { BaseItemDtoUserData } from './baseItemDtoUserData'; +import { BaseItemKind } from './baseItemKind'; +import { BaseItemPerson } from './baseItemPerson'; +import { ChannelType } from './channelType'; +import { ChapterInfo } from './chapterInfo'; +import { DayOfWeek } from './dayOfWeek'; +import { ExternalUrl } from './externalUrl'; +import { ImageOrientation } from './imageOrientation'; +import { IsoType } from './isoType'; +import { LocationType } from './locationType'; +import { MediaSourceInfo } from './mediaSourceInfo'; +import { MediaStream } from './mediaStream'; +import { MediaUrl } from './mediaUrl'; +import { MetadataField } from './metadataField'; +import { NameGuidPair } from './nameGuidPair'; +import { PlayAccess } from './playAccess'; +import { ProgramAudio } from './programAudio'; +import { Video3DFormat } from './video3DFormat'; +import { VideoType } from './videoType'; + +/** +* Gets or sets the current program. +*/ +export class BaseItemDtoCurrentProgram { + /** + * Gets or sets the name. + */ + 'name'?: string | null; + 'originalTitle'?: string | null; + /** + * Gets or sets the server identifier. + */ + 'serverId'?: string | null; + /** + * Gets or sets the id. + */ + 'id'?: string; + /** + * Gets or sets the etag. + */ + 'etag'?: string | null; + /** + * Gets or sets the type of the source. + */ + 'sourceType'?: string | null; + /** + * Gets or sets the playlist item identifier. + */ + 'playlistItemId'?: string | null; + /** + * Gets or sets the date created. + */ + 'dateCreated'?: Date | null; + 'dateLastMediaAdded'?: Date | null; + 'extraType'?: string | null; + 'airsBeforeSeasonNumber'?: number | null; + 'airsAfterSeasonNumber'?: number | null; + 'airsBeforeEpisodeNumber'?: number | null; + 'canDelete'?: boolean | null; + 'canDownload'?: boolean | null; + 'hasSubtitles'?: boolean | null; + 'preferredMetadataLanguage'?: string | null; + 'preferredMetadataCountryCode'?: string | null; + /** + * Gets or sets a value indicating whether [supports synchronize]. + */ + 'supportsSync'?: boolean | null; + 'container'?: string | null; + /** + * Gets or sets the name of the sort. + */ + 'sortName'?: string | null; + 'forcedSortName'?: string | null; + 'video3DFormat'?: Video3DFormat | null; + /** + * Gets or sets the premiere date. + */ + 'premiereDate'?: Date | null; + /** + * Gets or sets the external urls. + */ + 'externalUrls'?: Array | null; + /** + * Gets or sets the media versions. + */ + 'mediaSources'?: Array | null; + /** + * Gets or sets the critic rating. + */ + 'criticRating'?: number | null; + 'productionLocations'?: Array | null; + /** + * Gets or sets the path. + */ + 'path'?: string | null; + 'enableMediaSourceDisplay'?: boolean | null; + /** + * Gets or sets the official rating. + */ + 'officialRating'?: string | null; + /** + * Gets or sets the custom rating. + */ + 'customRating'?: string | null; + /** + * Gets or sets the channel identifier. + */ + 'channelId'?: string | null; + 'channelName'?: string | null; + /** + * Gets or sets the overview. + */ + 'overview'?: string | null; + /** + * Gets or sets the taglines. + */ + 'taglines'?: Array | null; + /** + * Gets or sets the genres. + */ + 'genres'?: Array | null; + /** + * Gets or sets the community rating. + */ + 'communityRating'?: number | null; + /** + * Gets or sets the cumulative run time ticks. + */ + 'cumulativeRunTimeTicks'?: number | null; + /** + * Gets or sets the run time ticks. + */ + 'runTimeTicks'?: number | null; + 'playAccess'?: PlayAccess | null; + /** + * Gets or sets the aspect ratio. + */ + 'aspectRatio'?: string | null; + /** + * Gets or sets the production year. + */ + 'productionYear'?: number | null; + /** + * Gets or sets a value indicating whether this instance is place holder. + */ + 'isPlaceHolder'?: boolean | null; + /** + * Gets or sets the number. + */ + 'number'?: string | null; + 'channelNumber'?: string | null; + /** + * Gets or sets the index number. + */ + 'indexNumber'?: number | null; + /** + * Gets or sets the index number end. + */ + 'indexNumberEnd'?: number | null; + /** + * Gets or sets the parent index number. + */ + 'parentIndexNumber'?: number | null; + /** + * Gets or sets the trailer urls. + */ + 'remoteTrailers'?: Array | null; + /** + * Gets or sets the provider ids. + */ + 'providerIds'?: { [key: string]: string; } | null; + /** + * Gets or sets a value indicating whether this instance is HD. + */ + 'isHD'?: boolean | null; + /** + * Gets or sets a value indicating whether this instance is folder. + */ + 'isFolder'?: boolean | null; + /** + * Gets or sets the parent id. + */ + 'parentId'?: string | null; + 'type'?: BaseItemKind; + /** + * Gets or sets the people. + */ + 'people'?: Array | null; + /** + * Gets or sets the studios. + */ + 'studios'?: Array | null; + 'genreItems'?: Array | null; + /** + * Gets or sets wether the item has a logo, this will hold the Id of the Parent that has one. + */ + 'parentLogoItemId'?: string | null; + /** + * Gets or sets wether the item has any backdrops, this will hold the Id of the Parent that has one. + */ + 'parentBackdropItemId'?: string | null; + /** + * Gets or sets the parent backdrop image tags. + */ + 'parentBackdropImageTags'?: Array | null; + /** + * Gets or sets the local trailer count. + */ + 'localTrailerCount'?: number | null; + 'userData'?: BaseItemDtoUserData | null; + /** + * Gets or sets the recursive item count. + */ + 'recursiveItemCount'?: number | null; + /** + * Gets or sets the child count. + */ + 'childCount'?: number | null; + /** + * Gets or sets the name of the series. + */ + 'seriesName'?: string | null; + /** + * Gets or sets the series id. + */ + 'seriesId'?: string | null; + /** + * Gets or sets the season identifier. + */ + 'seasonId'?: string | null; + /** + * Gets or sets the special feature count. + */ + 'specialFeatureCount'?: number | null; + /** + * Gets or sets the display preferences id. + */ + 'displayPreferencesId'?: string | null; + /** + * Gets or sets the status. + */ + 'status'?: string | null; + /** + * Gets or sets the air time. + */ + 'airTime'?: string | null; + /** + * Gets or sets the air days. + */ + 'airDays'?: Array | null; + /** + * Gets or sets the tags. + */ + 'tags'?: Array | null; + /** + * Gets or sets the primary image aspect ratio, after image enhancements. + */ + 'primaryImageAspectRatio'?: number | null; + /** + * Gets or sets the artists. + */ + 'artists'?: Array | null; + /** + * Gets or sets the artist items. + */ + 'artistItems'?: Array | null; + /** + * Gets or sets the album. + */ + 'album'?: string | null; + /** + * Gets or sets the type of the collection. + */ + 'collectionType'?: string | null; + /** + * Gets or sets the display order. + */ + 'displayOrder'?: string | null; + /** + * Gets or sets the album id. + */ + 'albumId'?: string | null; + /** + * Gets or sets the album image tag. + */ + 'albumPrimaryImageTag'?: string | null; + /** + * Gets or sets the series primary image tag. + */ + 'seriesPrimaryImageTag'?: string | null; + /** + * Gets or sets the album artist. + */ + 'albumArtist'?: string | null; + /** + * Gets or sets the album artists. + */ + 'albumArtists'?: Array | null; + /** + * Gets or sets the name of the season. + */ + 'seasonName'?: string | null; + /** + * Gets or sets the media streams. + */ + 'mediaStreams'?: Array | null; + 'videoType'?: VideoType | null; + /** + * Gets or sets the part count. + */ + 'partCount'?: number | null; + 'mediaSourceCount'?: number | null; + /** + * Gets or sets the image tags. + */ + 'imageTags'?: { [key: string]: string; } | null; + /** + * Gets or sets the backdrop image tags. + */ + 'backdropImageTags'?: Array | null; + /** + * Gets or sets the screenshot image tags. + */ + 'screenshotImageTags'?: Array | null; + /** + * Gets or sets the parent logo image tag. + */ + 'parentLogoImageTag'?: string | null; + /** + * Gets or sets wether the item has fan art, this will hold the Id of the Parent that has one. + */ + 'parentArtItemId'?: string | null; + /** + * Gets or sets the parent art image tag. + */ + 'parentArtImageTag'?: string | null; + /** + * Gets or sets the series thumb image tag. + */ + 'seriesThumbImageTag'?: string | null; + 'imageBlurHashes'?: BaseItemDtoImageBlurHashes | null; + /** + * Gets or sets the series studio. + */ + 'seriesStudio'?: string | null; + /** + * Gets or sets the parent thumb item id. + */ + 'parentThumbItemId'?: string | null; + /** + * Gets or sets the parent thumb image tag. + */ + 'parentThumbImageTag'?: string | null; + /** + * Gets or sets the parent primary image item identifier. + */ + 'parentPrimaryImageItemId'?: string | null; + /** + * Gets or sets the parent primary image tag. + */ + 'parentPrimaryImageTag'?: string | null; + /** + * Gets or sets the chapters. + */ + 'chapters'?: Array | null; + 'locationType'?: LocationType | null; + 'isoType'?: IsoType | null; + /** + * Gets or sets the type of the media. + */ + 'mediaType'?: string | null; + /** + * Gets or sets the end date. + */ + 'endDate'?: Date | null; + /** + * Gets or sets the locked fields. + */ + 'lockedFields'?: Array | null; + /** + * Gets or sets the trailer count. + */ + 'trailerCount'?: number | null; + /** + * Gets or sets the movie count. + */ + 'movieCount'?: number | null; + /** + * Gets or sets the series count. + */ + 'seriesCount'?: number | null; + 'programCount'?: number | null; + /** + * Gets or sets the episode count. + */ + 'episodeCount'?: number | null; + /** + * Gets or sets the song count. + */ + 'songCount'?: number | null; + /** + * Gets or sets the album count. + */ + 'albumCount'?: number | null; + 'artistCount'?: number | null; + /** + * Gets or sets the music video count. + */ + 'musicVideoCount'?: number | null; + /** + * Gets or sets a value indicating whether [enable internet providers]. + */ + 'lockData'?: boolean | null; + 'width'?: number | null; + 'height'?: number | null; + 'cameraMake'?: string | null; + 'cameraModel'?: string | null; + 'software'?: string | null; + 'exposureTime'?: number | null; + 'focalLength'?: number | null; + 'imageOrientation'?: ImageOrientation | null; + 'aperture'?: number | null; + 'shutterSpeed'?: number | null; + 'latitude'?: number | null; + 'longitude'?: number | null; + 'altitude'?: number | null; + 'isoSpeedRating'?: number | null; + /** + * Gets or sets the series timer identifier. + */ + 'seriesTimerId'?: string | null; + /** + * Gets or sets the program identifier. + */ + 'programId'?: string | null; + /** + * Gets or sets the channel primary image tag. + */ + 'channelPrimaryImageTag'?: string | null; + /** + * Gets or sets the start date of the recording, in UTC. + */ + 'startDate'?: Date | null; + /** + * Gets or sets the completion percentage. + */ + 'completionPercentage'?: number | null; + /** + * Gets or sets a value indicating whether this instance is repeat. + */ + 'isRepeat'?: boolean | null; + /** + * Gets or sets the episode title. + */ + 'episodeTitle'?: string | null; + 'channelType'?: ChannelType | null; + 'audio'?: ProgramAudio | null; + /** + * Gets or sets a value indicating whether this instance is movie. + */ + 'isMovie'?: boolean | null; + /** + * Gets or sets a value indicating whether this instance is sports. + */ + 'isSports'?: boolean | null; + /** + * Gets or sets a value indicating whether this instance is series. + */ + 'isSeries'?: boolean | null; + /** + * Gets or sets a value indicating whether this instance is live. + */ + 'isLive'?: boolean | null; + /** + * Gets or sets a value indicating whether this instance is news. + */ + 'isNews'?: boolean | null; + /** + * Gets or sets a value indicating whether this instance is kids. + */ + 'isKids'?: boolean | null; + /** + * Gets or sets a value indicating whether this instance is premiere. + */ + 'isPremiere'?: boolean | null; + /** + * Gets or sets the timer identifier. + */ + 'timerId'?: string | null; + 'currentProgram'?: BaseItemDtoCurrentProgram | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "Name", + "type": "string" + }, + { + "name": "originalTitle", + "baseName": "OriginalTitle", + "type": "string" + }, + { + "name": "serverId", + "baseName": "ServerId", + "type": "string" + }, + { + "name": "id", + "baseName": "Id", + "type": "string" + }, + { + "name": "etag", + "baseName": "Etag", + "type": "string" + }, + { + "name": "sourceType", + "baseName": "SourceType", + "type": "string" + }, + { + "name": "playlistItemId", + "baseName": "PlaylistItemId", + "type": "string" + }, + { + "name": "dateCreated", + "baseName": "DateCreated", + "type": "Date" + }, + { + "name": "dateLastMediaAdded", + "baseName": "DateLastMediaAdded", + "type": "Date" + }, + { + "name": "extraType", + "baseName": "ExtraType", + "type": "string" + }, + { + "name": "airsBeforeSeasonNumber", + "baseName": "AirsBeforeSeasonNumber", + "type": "number" + }, + { + "name": "airsAfterSeasonNumber", + "baseName": "AirsAfterSeasonNumber", + "type": "number" + }, + { + "name": "airsBeforeEpisodeNumber", + "baseName": "AirsBeforeEpisodeNumber", + "type": "number" + }, + { + "name": "canDelete", + "baseName": "CanDelete", + "type": "boolean" + }, + { + "name": "canDownload", + "baseName": "CanDownload", + "type": "boolean" + }, + { + "name": "hasSubtitles", + "baseName": "HasSubtitles", + "type": "boolean" + }, + { + "name": "preferredMetadataLanguage", + "baseName": "PreferredMetadataLanguage", + "type": "string" + }, + { + "name": "preferredMetadataCountryCode", + "baseName": "PreferredMetadataCountryCode", + "type": "string" + }, + { + "name": "supportsSync", + "baseName": "SupportsSync", + "type": "boolean" + }, + { + "name": "container", + "baseName": "Container", + "type": "string" + }, + { + "name": "sortName", + "baseName": "SortName", + "type": "string" + }, + { + "name": "forcedSortName", + "baseName": "ForcedSortName", + "type": "string" + }, + { + "name": "video3DFormat", + "baseName": "Video3DFormat", + "type": "Video3DFormat" + }, + { + "name": "premiereDate", + "baseName": "PremiereDate", + "type": "Date" + }, + { + "name": "externalUrls", + "baseName": "ExternalUrls", + "type": "Array" + }, + { + "name": "mediaSources", + "baseName": "MediaSources", + "type": "Array" + }, + { + "name": "criticRating", + "baseName": "CriticRating", + "type": "number" + }, + { + "name": "productionLocations", + "baseName": "ProductionLocations", + "type": "Array" + }, + { + "name": "path", + "baseName": "Path", + "type": "string" + }, + { + "name": "enableMediaSourceDisplay", + "baseName": "EnableMediaSourceDisplay", + "type": "boolean" + }, + { + "name": "officialRating", + "baseName": "OfficialRating", + "type": "string" + }, + { + "name": "customRating", + "baseName": "CustomRating", + "type": "string" + }, + { + "name": "channelId", + "baseName": "ChannelId", + "type": "string" + }, + { + "name": "channelName", + "baseName": "ChannelName", + "type": "string" + }, + { + "name": "overview", + "baseName": "Overview", + "type": "string" + }, + { + "name": "taglines", + "baseName": "Taglines", + "type": "Array" + }, + { + "name": "genres", + "baseName": "Genres", + "type": "Array" + }, + { + "name": "communityRating", + "baseName": "CommunityRating", + "type": "number" + }, + { + "name": "cumulativeRunTimeTicks", + "baseName": "CumulativeRunTimeTicks", + "type": "number" + }, + { + "name": "runTimeTicks", + "baseName": "RunTimeTicks", + "type": "number" + }, + { + "name": "playAccess", + "baseName": "PlayAccess", + "type": "PlayAccess" + }, + { + "name": "aspectRatio", + "baseName": "AspectRatio", + "type": "string" + }, + { + "name": "productionYear", + "baseName": "ProductionYear", + "type": "number" + }, + { + "name": "isPlaceHolder", + "baseName": "IsPlaceHolder", + "type": "boolean" + }, + { + "name": "number", + "baseName": "Number", + "type": "string" + }, + { + "name": "channelNumber", + "baseName": "ChannelNumber", + "type": "string" + }, + { + "name": "indexNumber", + "baseName": "IndexNumber", + "type": "number" + }, + { + "name": "indexNumberEnd", + "baseName": "IndexNumberEnd", + "type": "number" + }, + { + "name": "parentIndexNumber", + "baseName": "ParentIndexNumber", + "type": "number" + }, + { + "name": "remoteTrailers", + "baseName": "RemoteTrailers", + "type": "Array" + }, + { + "name": "providerIds", + "baseName": "ProviderIds", + "type": "{ [key: string]: string; }" + }, + { + "name": "isHD", + "baseName": "IsHD", + "type": "boolean" + }, + { + "name": "isFolder", + "baseName": "IsFolder", + "type": "boolean" + }, + { + "name": "parentId", + "baseName": "ParentId", + "type": "string" + }, + { + "name": "type", + "baseName": "Type", + "type": "BaseItemKind" + }, + { + "name": "people", + "baseName": "People", + "type": "Array" + }, + { + "name": "studios", + "baseName": "Studios", + "type": "Array" + }, + { + "name": "genreItems", + "baseName": "GenreItems", + "type": "Array" + }, + { + "name": "parentLogoItemId", + "baseName": "ParentLogoItemId", + "type": "string" + }, + { + "name": "parentBackdropItemId", + "baseName": "ParentBackdropItemId", + "type": "string" + }, + { + "name": "parentBackdropImageTags", + "baseName": "ParentBackdropImageTags", + "type": "Array" + }, + { + "name": "localTrailerCount", + "baseName": "LocalTrailerCount", + "type": "number" + }, + { + "name": "userData", + "baseName": "UserData", + "type": "BaseItemDtoUserData" + }, + { + "name": "recursiveItemCount", + "baseName": "RecursiveItemCount", + "type": "number" + }, + { + "name": "childCount", + "baseName": "ChildCount", + "type": "number" + }, + { + "name": "seriesName", + "baseName": "SeriesName", + "type": "string" + }, + { + "name": "seriesId", + "baseName": "SeriesId", + "type": "string" + }, + { + "name": "seasonId", + "baseName": "SeasonId", + "type": "string" + }, + { + "name": "specialFeatureCount", + "baseName": "SpecialFeatureCount", + "type": "number" + }, + { + "name": "displayPreferencesId", + "baseName": "DisplayPreferencesId", + "type": "string" + }, + { + "name": "status", + "baseName": "Status", + "type": "string" + }, + { + "name": "airTime", + "baseName": "AirTime", + "type": "string" + }, + { + "name": "airDays", + "baseName": "AirDays", + "type": "Array" + }, + { + "name": "tags", + "baseName": "Tags", + "type": "Array" + }, + { + "name": "primaryImageAspectRatio", + "baseName": "PrimaryImageAspectRatio", + "type": "number" + }, + { + "name": "artists", + "baseName": "Artists", + "type": "Array" + }, + { + "name": "artistItems", + "baseName": "ArtistItems", + "type": "Array" + }, + { + "name": "album", + "baseName": "Album", + "type": "string" + }, + { + "name": "collectionType", + "baseName": "CollectionType", + "type": "string" + }, + { + "name": "displayOrder", + "baseName": "DisplayOrder", + "type": "string" + }, + { + "name": "albumId", + "baseName": "AlbumId", + "type": "string" + }, + { + "name": "albumPrimaryImageTag", + "baseName": "AlbumPrimaryImageTag", + "type": "string" + }, + { + "name": "seriesPrimaryImageTag", + "baseName": "SeriesPrimaryImageTag", + "type": "string" + }, + { + "name": "albumArtist", + "baseName": "AlbumArtist", + "type": "string" + }, + { + "name": "albumArtists", + "baseName": "AlbumArtists", + "type": "Array" + }, + { + "name": "seasonName", + "baseName": "SeasonName", + "type": "string" + }, + { + "name": "mediaStreams", + "baseName": "MediaStreams", + "type": "Array" + }, + { + "name": "videoType", + "baseName": "VideoType", + "type": "VideoType" + }, + { + "name": "partCount", + "baseName": "PartCount", + "type": "number" + }, + { + "name": "mediaSourceCount", + "baseName": "MediaSourceCount", + "type": "number" + }, + { + "name": "imageTags", + "baseName": "ImageTags", + "type": "{ [key: string]: string; }" + }, + { + "name": "backdropImageTags", + "baseName": "BackdropImageTags", + "type": "Array" + }, + { + "name": "screenshotImageTags", + "baseName": "ScreenshotImageTags", + "type": "Array" + }, + { + "name": "parentLogoImageTag", + "baseName": "ParentLogoImageTag", + "type": "string" + }, + { + "name": "parentArtItemId", + "baseName": "ParentArtItemId", + "type": "string" + }, + { + "name": "parentArtImageTag", + "baseName": "ParentArtImageTag", + "type": "string" + }, + { + "name": "seriesThumbImageTag", + "baseName": "SeriesThumbImageTag", + "type": "string" + }, + { + "name": "imageBlurHashes", + "baseName": "ImageBlurHashes", + "type": "BaseItemDtoImageBlurHashes" + }, + { + "name": "seriesStudio", + "baseName": "SeriesStudio", + "type": "string" + }, + { + "name": "parentThumbItemId", + "baseName": "ParentThumbItemId", + "type": "string" + }, + { + "name": "parentThumbImageTag", + "baseName": "ParentThumbImageTag", + "type": "string" + }, + { + "name": "parentPrimaryImageItemId", + "baseName": "ParentPrimaryImageItemId", + "type": "string" + }, + { + "name": "parentPrimaryImageTag", + "baseName": "ParentPrimaryImageTag", + "type": "string" + }, + { + "name": "chapters", + "baseName": "Chapters", + "type": "Array" + }, + { + "name": "locationType", + "baseName": "LocationType", + "type": "LocationType" + }, + { + "name": "isoType", + "baseName": "IsoType", + "type": "IsoType" + }, + { + "name": "mediaType", + "baseName": "MediaType", + "type": "string" + }, + { + "name": "endDate", + "baseName": "EndDate", + "type": "Date" + }, + { + "name": "lockedFields", + "baseName": "LockedFields", + "type": "Array" + }, + { + "name": "trailerCount", + "baseName": "TrailerCount", + "type": "number" + }, + { + "name": "movieCount", + "baseName": "MovieCount", + "type": "number" + }, + { + "name": "seriesCount", + "baseName": "SeriesCount", + "type": "number" + }, + { + "name": "programCount", + "baseName": "ProgramCount", + "type": "number" + }, + { + "name": "episodeCount", + "baseName": "EpisodeCount", + "type": "number" + }, + { + "name": "songCount", + "baseName": "SongCount", + "type": "number" + }, + { + "name": "albumCount", + "baseName": "AlbumCount", + "type": "number" + }, + { + "name": "artistCount", + "baseName": "ArtistCount", + "type": "number" + }, + { + "name": "musicVideoCount", + "baseName": "MusicVideoCount", + "type": "number" + }, + { + "name": "lockData", + "baseName": "LockData", + "type": "boolean" + }, + { + "name": "width", + "baseName": "Width", + "type": "number" + }, + { + "name": "height", + "baseName": "Height", + "type": "number" + }, + { + "name": "cameraMake", + "baseName": "CameraMake", + "type": "string" + }, + { + "name": "cameraModel", + "baseName": "CameraModel", + "type": "string" + }, + { + "name": "software", + "baseName": "Software", + "type": "string" + }, + { + "name": "exposureTime", + "baseName": "ExposureTime", + "type": "number" + }, + { + "name": "focalLength", + "baseName": "FocalLength", + "type": "number" + }, + { + "name": "imageOrientation", + "baseName": "ImageOrientation", + "type": "ImageOrientation" + }, + { + "name": "aperture", + "baseName": "Aperture", + "type": "number" + }, + { + "name": "shutterSpeed", + "baseName": "ShutterSpeed", + "type": "number" + }, + { + "name": "latitude", + "baseName": "Latitude", + "type": "number" + }, + { + "name": "longitude", + "baseName": "Longitude", + "type": "number" + }, + { + "name": "altitude", + "baseName": "Altitude", + "type": "number" + }, + { + "name": "isoSpeedRating", + "baseName": "IsoSpeedRating", + "type": "number" + }, + { + "name": "seriesTimerId", + "baseName": "SeriesTimerId", + "type": "string" + }, + { + "name": "programId", + "baseName": "ProgramId", + "type": "string" + }, + { + "name": "channelPrimaryImageTag", + "baseName": "ChannelPrimaryImageTag", + "type": "string" + }, + { + "name": "startDate", + "baseName": "StartDate", + "type": "Date" + }, + { + "name": "completionPercentage", + "baseName": "CompletionPercentage", + "type": "number" + }, + { + "name": "isRepeat", + "baseName": "IsRepeat", + "type": "boolean" + }, + { + "name": "episodeTitle", + "baseName": "EpisodeTitle", + "type": "string" + }, + { + "name": "channelType", + "baseName": "ChannelType", + "type": "ChannelType" + }, + { + "name": "audio", + "baseName": "Audio", + "type": "ProgramAudio" + }, + { + "name": "isMovie", + "baseName": "IsMovie", + "type": "boolean" + }, + { + "name": "isSports", + "baseName": "IsSports", + "type": "boolean" + }, + { + "name": "isSeries", + "baseName": "IsSeries", + "type": "boolean" + }, + { + "name": "isLive", + "baseName": "IsLive", + "type": "boolean" + }, + { + "name": "isNews", + "baseName": "IsNews", + "type": "boolean" + }, + { + "name": "isKids", + "baseName": "IsKids", + "type": "boolean" + }, + { + "name": "isPremiere", + "baseName": "IsPremiere", + "type": "boolean" + }, + { + "name": "timerId", + "baseName": "TimerId", + "type": "string" + }, + { + "name": "currentProgram", + "baseName": "CurrentProgram", + "type": "BaseItemDtoCurrentProgram" + } ]; + + static getAttributeTypeMap() { + return BaseItemDtoCurrentProgram.attributeTypeMap; + } +} + +export namespace BaseItemDtoCurrentProgram { +} diff --git a/jellyfin/model/baseItemDtoImageBlurHashes.ts b/jellyfin/model/baseItemDtoImageBlurHashes.ts new file mode 100644 index 0000000..cf1ac82 --- /dev/null +++ b/jellyfin/model/baseItemDtoImageBlurHashes.ts @@ -0,0 +1,106 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Gets or sets the blurhashes for the image tags. Maps image type to dictionary mapping image tag to blurhash value. +*/ +export class BaseItemDtoImageBlurHashes { + 'primary'?: { [key: string]: string; }; + 'art'?: { [key: string]: string; }; + 'backdrop'?: { [key: string]: string; }; + 'banner'?: { [key: string]: string; }; + 'logo'?: { [key: string]: string; }; + 'thumb'?: { [key: string]: string; }; + 'disc'?: { [key: string]: string; }; + 'box'?: { [key: string]: string; }; + 'screenshot'?: { [key: string]: string; }; + 'menu'?: { [key: string]: string; }; + 'chapter'?: { [key: string]: string; }; + 'boxRear'?: { [key: string]: string; }; + 'profile'?: { [key: string]: string; }; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "primary", + "baseName": "Primary", + "type": "{ [key: string]: string; }" + }, + { + "name": "art", + "baseName": "Art", + "type": "{ [key: string]: string; }" + }, + { + "name": "backdrop", + "baseName": "Backdrop", + "type": "{ [key: string]: string; }" + }, + { + "name": "banner", + "baseName": "Banner", + "type": "{ [key: string]: string; }" + }, + { + "name": "logo", + "baseName": "Logo", + "type": "{ [key: string]: string; }" + }, + { + "name": "thumb", + "baseName": "Thumb", + "type": "{ [key: string]: string; }" + }, + { + "name": "disc", + "baseName": "Disc", + "type": "{ [key: string]: string; }" + }, + { + "name": "box", + "baseName": "Box", + "type": "{ [key: string]: string; }" + }, + { + "name": "screenshot", + "baseName": "Screenshot", + "type": "{ [key: string]: string; }" + }, + { + "name": "menu", + "baseName": "Menu", + "type": "{ [key: string]: string; }" + }, + { + "name": "chapter", + "baseName": "Chapter", + "type": "{ [key: string]: string; }" + }, + { + "name": "boxRear", + "baseName": "BoxRear", + "type": "{ [key: string]: string; }" + }, + { + "name": "profile", + "baseName": "Profile", + "type": "{ [key: string]: string; }" + } ]; + + static getAttributeTypeMap() { + return BaseItemDtoImageBlurHashes.attributeTypeMap; + } +} + diff --git a/jellyfin/model/baseItemDtoQueryResult.ts b/jellyfin/model/baseItemDtoQueryResult.ts new file mode 100644 index 0000000..5c70e2b --- /dev/null +++ b/jellyfin/model/baseItemDtoQueryResult.ts @@ -0,0 +1,53 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { BaseItemDto } from './baseItemDto'; + +export class BaseItemDtoQueryResult { + /** + * Gets or sets the items. + */ + 'items'?: Array | null; + /** + * Gets or sets the total number of records available. + */ + 'totalRecordCount'?: number; + /** + * Gets or sets the index of the first record in Items. + */ + 'startIndex'?: number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "items", + "baseName": "Items", + "type": "Array" + }, + { + "name": "totalRecordCount", + "baseName": "TotalRecordCount", + "type": "number" + }, + { + "name": "startIndex", + "baseName": "StartIndex", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return BaseItemDtoQueryResult.attributeTypeMap; + } +} + diff --git a/jellyfin/model/baseItemDtoUserData.ts b/jellyfin/model/baseItemDtoUserData.ts new file mode 100644 index 0000000..75b4cf6 --- /dev/null +++ b/jellyfin/model/baseItemDtoUserData.ts @@ -0,0 +1,127 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Gets or sets the user data for this item based on the user it\'s being requested for. +*/ +export class BaseItemDtoUserData { + /** + * Gets or sets the rating. + */ + 'rating'?: number | null; + /** + * Gets or sets the played percentage. + */ + 'playedPercentage'?: number | null; + /** + * Gets or sets the unplayed item count. + */ + 'unplayedItemCount'?: number | null; + /** + * Gets or sets the playback position ticks. + */ + 'playbackPositionTicks'?: number; + /** + * Gets or sets the play count. + */ + 'playCount'?: number; + /** + * Gets or sets a value indicating whether this instance is favorite. + */ + 'isFavorite'?: boolean; + /** + * Gets or sets a value indicating whether this MediaBrowser.Model.Dto.UserItemDataDto is likes. + */ + 'likes'?: boolean | null; + /** + * Gets or sets the last played date. + */ + 'lastPlayedDate'?: Date | null; + /** + * Gets or sets a value indicating whether this MediaBrowser.Model.Dto.UserItemDataDto is played. + */ + 'played'?: boolean; + /** + * Gets or sets the key. + */ + 'key'?: string | null; + /** + * Gets or sets the item identifier. + */ + 'itemId'?: string | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "rating", + "baseName": "Rating", + "type": "number" + }, + { + "name": "playedPercentage", + "baseName": "PlayedPercentage", + "type": "number" + }, + { + "name": "unplayedItemCount", + "baseName": "UnplayedItemCount", + "type": "number" + }, + { + "name": "playbackPositionTicks", + "baseName": "PlaybackPositionTicks", + "type": "number" + }, + { + "name": "playCount", + "baseName": "PlayCount", + "type": "number" + }, + { + "name": "isFavorite", + "baseName": "IsFavorite", + "type": "boolean" + }, + { + "name": "likes", + "baseName": "Likes", + "type": "boolean" + }, + { + "name": "lastPlayedDate", + "baseName": "LastPlayedDate", + "type": "Date" + }, + { + "name": "played", + "baseName": "Played", + "type": "boolean" + }, + { + "name": "key", + "baseName": "Key", + "type": "string" + }, + { + "name": "itemId", + "baseName": "ItemId", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return BaseItemDtoUserData.attributeTypeMap; + } +} + diff --git a/jellyfin/model/baseItemKind.ts b/jellyfin/model/baseItemKind.ts new file mode 100644 index 0000000..55a4e4c --- /dev/null +++ b/jellyfin/model/baseItemKind.ts @@ -0,0 +1,56 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* The base item kind. +*/ +export enum BaseItemKind { + AggregateFolder = 'AggregateFolder', + Audio = 'Audio', + AudioBook = 'AudioBook', + BasePluginFolder = 'BasePluginFolder', + Book = 'Book', + BoxSet = 'BoxSet', + Channel = 'Channel', + ChannelFolderItem = 'ChannelFolderItem', + CollectionFolder = 'CollectionFolder', + Episode = 'Episode', + Folder = 'Folder', + Genre = 'Genre', + ManualPlaylistsFolder = 'ManualPlaylistsFolder', + Movie = 'Movie', + LiveTvChannel = 'LiveTvChannel', + LiveTvProgram = 'LiveTvProgram', + MusicAlbum = 'MusicAlbum', + MusicArtist = 'MusicArtist', + MusicGenre = 'MusicGenre', + MusicVideo = 'MusicVideo', + Person = 'Person', + Photo = 'Photo', + PhotoAlbum = 'PhotoAlbum', + Playlist = 'Playlist', + PlaylistsFolder = 'PlaylistsFolder', + Program = 'Program', + Recording = 'Recording', + Season = 'Season', + Series = 'Series', + Studio = 'Studio', + Trailer = 'Trailer', + TvChannel = 'TvChannel', + TvProgram = 'TvProgram', + UserRootFolder = 'UserRootFolder', + UserView = 'UserView', + Video = 'Video', + Year = 'Year' +} diff --git a/jellyfin/model/baseItemPerson.ts b/jellyfin/model/baseItemPerson.ts new file mode 100644 index 0000000..a56d27b --- /dev/null +++ b/jellyfin/model/baseItemPerson.ts @@ -0,0 +1,80 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { BaseItemPersonImageBlurHashes } from './baseItemPersonImageBlurHashes'; + +/** +* This is used by the api to get information about a Person within a BaseItem. +*/ +export class BaseItemPerson { + /** + * Gets or sets the name. + */ + 'name'?: string | null; + /** + * Gets or sets the identifier. + */ + 'id'?: string; + /** + * Gets or sets the role. + */ + 'role'?: string | null; + /** + * Gets or sets the type. + */ + 'type'?: string | null; + /** + * Gets or sets the primary image tag. + */ + 'primaryImageTag'?: string | null; + 'imageBlurHashes'?: BaseItemPersonImageBlurHashes | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "Name", + "type": "string" + }, + { + "name": "id", + "baseName": "Id", + "type": "string" + }, + { + "name": "role", + "baseName": "Role", + "type": "string" + }, + { + "name": "type", + "baseName": "Type", + "type": "string" + }, + { + "name": "primaryImageTag", + "baseName": "PrimaryImageTag", + "type": "string" + }, + { + "name": "imageBlurHashes", + "baseName": "ImageBlurHashes", + "type": "BaseItemPersonImageBlurHashes" + } ]; + + static getAttributeTypeMap() { + return BaseItemPerson.attributeTypeMap; + } +} + diff --git a/jellyfin/model/baseItemPersonImageBlurHashes.ts b/jellyfin/model/baseItemPersonImageBlurHashes.ts new file mode 100644 index 0000000..43555b4 --- /dev/null +++ b/jellyfin/model/baseItemPersonImageBlurHashes.ts @@ -0,0 +1,106 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Gets or sets the primary image blurhash. +*/ +export class BaseItemPersonImageBlurHashes { + 'primary'?: { [key: string]: string; }; + 'art'?: { [key: string]: string; }; + 'backdrop'?: { [key: string]: string; }; + 'banner'?: { [key: string]: string; }; + 'logo'?: { [key: string]: string; }; + 'thumb'?: { [key: string]: string; }; + 'disc'?: { [key: string]: string; }; + 'box'?: { [key: string]: string; }; + 'screenshot'?: { [key: string]: string; }; + 'menu'?: { [key: string]: string; }; + 'chapter'?: { [key: string]: string; }; + 'boxRear'?: { [key: string]: string; }; + 'profile'?: { [key: string]: string; }; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "primary", + "baseName": "Primary", + "type": "{ [key: string]: string; }" + }, + { + "name": "art", + "baseName": "Art", + "type": "{ [key: string]: string; }" + }, + { + "name": "backdrop", + "baseName": "Backdrop", + "type": "{ [key: string]: string; }" + }, + { + "name": "banner", + "baseName": "Banner", + "type": "{ [key: string]: string; }" + }, + { + "name": "logo", + "baseName": "Logo", + "type": "{ [key: string]: string; }" + }, + { + "name": "thumb", + "baseName": "Thumb", + "type": "{ [key: string]: string; }" + }, + { + "name": "disc", + "baseName": "Disc", + "type": "{ [key: string]: string; }" + }, + { + "name": "box", + "baseName": "Box", + "type": "{ [key: string]: string; }" + }, + { + "name": "screenshot", + "baseName": "Screenshot", + "type": "{ [key: string]: string; }" + }, + { + "name": "menu", + "baseName": "Menu", + "type": "{ [key: string]: string; }" + }, + { + "name": "chapter", + "baseName": "Chapter", + "type": "{ [key: string]: string; }" + }, + { + "name": "boxRear", + "baseName": "BoxRear", + "type": "{ [key: string]: string; }" + }, + { + "name": "profile", + "baseName": "Profile", + "type": "{ [key: string]: string; }" + } ]; + + static getAttributeTypeMap() { + return BaseItemPersonImageBlurHashes.attributeTypeMap; + } +} + diff --git a/jellyfin/model/bookInfo.ts b/jellyfin/model/bookInfo.ts new file mode 100644 index 0000000..eeb85cd --- /dev/null +++ b/jellyfin/model/bookInfo.ts @@ -0,0 +1,118 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class BookInfo { + /** + * Gets or sets the name. + */ + 'name'?: string | null; + /** + * Gets or sets the original title. + */ + 'originalTitle'?: string | null; + /** + * Gets or sets the path. + */ + 'path'?: string | null; + /** + * Gets or sets the metadata language. + */ + 'metadataLanguage'?: string | null; + /** + * Gets or sets the metadata country code. + */ + 'metadataCountryCode'?: string | null; + /** + * Gets or sets the provider ids. + */ + 'providerIds'?: { [key: string]: string; } | null; + /** + * Gets or sets the year. + */ + 'year'?: number | null; + 'indexNumber'?: number | null; + 'parentIndexNumber'?: number | null; + 'premiereDate'?: Date | null; + 'isAutomated'?: boolean; + 'seriesName'?: string | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "Name", + "type": "string" + }, + { + "name": "originalTitle", + "baseName": "OriginalTitle", + "type": "string" + }, + { + "name": "path", + "baseName": "Path", + "type": "string" + }, + { + "name": "metadataLanguage", + "baseName": "MetadataLanguage", + "type": "string" + }, + { + "name": "metadataCountryCode", + "baseName": "MetadataCountryCode", + "type": "string" + }, + { + "name": "providerIds", + "baseName": "ProviderIds", + "type": "{ [key: string]: string; }" + }, + { + "name": "year", + "baseName": "Year", + "type": "number" + }, + { + "name": "indexNumber", + "baseName": "IndexNumber", + "type": "number" + }, + { + "name": "parentIndexNumber", + "baseName": "ParentIndexNumber", + "type": "number" + }, + { + "name": "premiereDate", + "baseName": "PremiereDate", + "type": "Date" + }, + { + "name": "isAutomated", + "baseName": "IsAutomated", + "type": "boolean" + }, + { + "name": "seriesName", + "baseName": "SeriesName", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return BookInfo.attributeTypeMap; + } +} + diff --git a/jellyfin/model/bookInfoRemoteSearchQuery.ts b/jellyfin/model/bookInfoRemoteSearchQuery.ts new file mode 100644 index 0000000..bc11ab9 --- /dev/null +++ b/jellyfin/model/bookInfoRemoteSearchQuery.ts @@ -0,0 +1,56 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { BookInfo } from './bookInfo'; + +export class BookInfoRemoteSearchQuery { + 'searchInfo'?: BookInfo | null; + 'itemId'?: string; + /** + * Gets or sets the provider name to search within if set. + */ + 'searchProviderName'?: string | null; + /** + * Gets or sets a value indicating whether disabled providers should be included. + */ + 'includeDisabledProviders'?: boolean; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "searchInfo", + "baseName": "SearchInfo", + "type": "BookInfo" + }, + { + "name": "itemId", + "baseName": "ItemId", + "type": "string" + }, + { + "name": "searchProviderName", + "baseName": "SearchProviderName", + "type": "string" + }, + { + "name": "includeDisabledProviders", + "baseName": "IncludeDisabledProviders", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return BookInfoRemoteSearchQuery.attributeTypeMap; + } +} + diff --git a/jellyfin/model/boxSetInfo.ts b/jellyfin/model/boxSetInfo.ts new file mode 100644 index 0000000..9b8c087 --- /dev/null +++ b/jellyfin/model/boxSetInfo.ts @@ -0,0 +1,112 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class BoxSetInfo { + /** + * Gets or sets the name. + */ + 'name'?: string | null; + /** + * Gets or sets the original title. + */ + 'originalTitle'?: string | null; + /** + * Gets or sets the path. + */ + 'path'?: string | null; + /** + * Gets or sets the metadata language. + */ + 'metadataLanguage'?: string | null; + /** + * Gets or sets the metadata country code. + */ + 'metadataCountryCode'?: string | null; + /** + * Gets or sets the provider ids. + */ + 'providerIds'?: { [key: string]: string; } | null; + /** + * Gets or sets the year. + */ + 'year'?: number | null; + 'indexNumber'?: number | null; + 'parentIndexNumber'?: number | null; + 'premiereDate'?: Date | null; + 'isAutomated'?: boolean; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "Name", + "type": "string" + }, + { + "name": "originalTitle", + "baseName": "OriginalTitle", + "type": "string" + }, + { + "name": "path", + "baseName": "Path", + "type": "string" + }, + { + "name": "metadataLanguage", + "baseName": "MetadataLanguage", + "type": "string" + }, + { + "name": "metadataCountryCode", + "baseName": "MetadataCountryCode", + "type": "string" + }, + { + "name": "providerIds", + "baseName": "ProviderIds", + "type": "{ [key: string]: string; }" + }, + { + "name": "year", + "baseName": "Year", + "type": "number" + }, + { + "name": "indexNumber", + "baseName": "IndexNumber", + "type": "number" + }, + { + "name": "parentIndexNumber", + "baseName": "ParentIndexNumber", + "type": "number" + }, + { + "name": "premiereDate", + "baseName": "PremiereDate", + "type": "Date" + }, + { + "name": "isAutomated", + "baseName": "IsAutomated", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return BoxSetInfo.attributeTypeMap; + } +} + diff --git a/jellyfin/model/boxSetInfoRemoteSearchQuery.ts b/jellyfin/model/boxSetInfoRemoteSearchQuery.ts new file mode 100644 index 0000000..41d87b3 --- /dev/null +++ b/jellyfin/model/boxSetInfoRemoteSearchQuery.ts @@ -0,0 +1,56 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { BoxSetInfo } from './boxSetInfo'; + +export class BoxSetInfoRemoteSearchQuery { + 'searchInfo'?: BoxSetInfo | null; + 'itemId'?: string; + /** + * Gets or sets the provider name to search within if set. + */ + 'searchProviderName'?: string | null; + /** + * Gets or sets a value indicating whether disabled providers should be included. + */ + 'includeDisabledProviders'?: boolean; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "searchInfo", + "baseName": "SearchInfo", + "type": "BoxSetInfo" + }, + { + "name": "itemId", + "baseName": "ItemId", + "type": "string" + }, + { + "name": "searchProviderName", + "baseName": "SearchProviderName", + "type": "string" + }, + { + "name": "includeDisabledProviders", + "baseName": "IncludeDisabledProviders", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return BoxSetInfoRemoteSearchQuery.attributeTypeMap; + } +} + diff --git a/jellyfin/model/brandingOptions.ts b/jellyfin/model/brandingOptions.ts new file mode 100644 index 0000000..d01cde1 --- /dev/null +++ b/jellyfin/model/brandingOptions.ts @@ -0,0 +1,55 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* The branding options. +*/ +export class BrandingOptions { + /** + * Gets or sets the login disclaimer. + */ + 'loginDisclaimer'?: string | null; + /** + * Gets or sets the custom CSS. + */ + 'customCss'?: string | null; + /** + * Gets or sets a value indicating whether to enable the splashscreen. + */ + 'splashscreenEnabled'?: boolean; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "loginDisclaimer", + "baseName": "LoginDisclaimer", + "type": "string" + }, + { + "name": "customCss", + "baseName": "CustomCss", + "type": "string" + }, + { + "name": "splashscreenEnabled", + "baseName": "SplashscreenEnabled", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return BrandingOptions.attributeTypeMap; + } +} + diff --git a/jellyfin/model/bufferRequestDto.ts b/jellyfin/model/bufferRequestDto.ts new file mode 100644 index 0000000..9f375a5 --- /dev/null +++ b/jellyfin/model/bufferRequestDto.ts @@ -0,0 +1,64 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Class BufferRequestDto. +*/ +export class BufferRequestDto { + /** + * Gets or sets when the request has been made by the client. + */ + 'when'?: Date; + /** + * Gets or sets the position ticks. + */ + 'positionTicks'?: number; + /** + * Gets or sets a value indicating whether the client playback is unpaused. + */ + 'isPlaying'?: boolean; + /** + * Gets or sets the playlist item identifier of the playing item. + */ + 'playlistItemId'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "when", + "baseName": "When", + "type": "Date" + }, + { + "name": "positionTicks", + "baseName": "PositionTicks", + "type": "number" + }, + { + "name": "isPlaying", + "baseName": "IsPlaying", + "type": "boolean" + }, + { + "name": "playlistItemId", + "baseName": "PlaylistItemId", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return BufferRequestDto.attributeTypeMap; + } +} + diff --git a/jellyfin/model/channelFeatures.ts b/jellyfin/model/channelFeatures.ts new file mode 100644 index 0000000..1e01e8c --- /dev/null +++ b/jellyfin/model/channelFeatures.ts @@ -0,0 +1,136 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { ChannelItemSortField } from './channelItemSortField'; +import { ChannelMediaContentType } from './channelMediaContentType'; +import { ChannelMediaType } from './channelMediaType'; + +export class ChannelFeatures { + /** + * Gets or sets the name. + */ + 'name'?: string; + /** + * Gets or sets the identifier. + */ + 'id'?: string; + /** + * Gets or sets a value indicating whether this instance can search. + */ + 'canSearch'?: boolean; + /** + * Gets or sets the media types. + */ + 'mediaTypes'?: Array; + /** + * Gets or sets the content types. + */ + 'contentTypes'?: Array; + /** + * Gets or sets the maximum number of records the channel allows retrieving at a time. + */ + 'maxPageSize'?: number | null; + /** + * Gets or sets the automatic refresh levels. + */ + 'autoRefreshLevels'?: number | null; + /** + * Gets or sets the default sort orders. + */ + 'defaultSortFields'?: Array; + /** + * Gets or sets a value indicating whether a sort ascending/descending toggle is supported. + */ + 'supportsSortOrderToggle'?: boolean; + /** + * Gets or sets a value indicating whether [supports latest media]. + */ + 'supportsLatestMedia'?: boolean; + /** + * Gets or sets a value indicating whether this instance can filter. + */ + 'canFilter'?: boolean; + /** + * Gets or sets a value indicating whether [supports content downloading]. + */ + 'supportsContentDownloading'?: boolean; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "Name", + "type": "string" + }, + { + "name": "id", + "baseName": "Id", + "type": "string" + }, + { + "name": "canSearch", + "baseName": "CanSearch", + "type": "boolean" + }, + { + "name": "mediaTypes", + "baseName": "MediaTypes", + "type": "Array" + }, + { + "name": "contentTypes", + "baseName": "ContentTypes", + "type": "Array" + }, + { + "name": "maxPageSize", + "baseName": "MaxPageSize", + "type": "number" + }, + { + "name": "autoRefreshLevels", + "baseName": "AutoRefreshLevels", + "type": "number" + }, + { + "name": "defaultSortFields", + "baseName": "DefaultSortFields", + "type": "Array" + }, + { + "name": "supportsSortOrderToggle", + "baseName": "SupportsSortOrderToggle", + "type": "boolean" + }, + { + "name": "supportsLatestMedia", + "baseName": "SupportsLatestMedia", + "type": "boolean" + }, + { + "name": "canFilter", + "baseName": "CanFilter", + "type": "boolean" + }, + { + "name": "supportsContentDownloading", + "baseName": "SupportsContentDownloading", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return ChannelFeatures.attributeTypeMap; + } +} + diff --git a/jellyfin/model/channelItemSortField.ts b/jellyfin/model/channelItemSortField.ts new file mode 100644 index 0000000..8644886 --- /dev/null +++ b/jellyfin/model/channelItemSortField.ts @@ -0,0 +1,23 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export enum ChannelItemSortField { + Name = 'Name', + CommunityRating = 'CommunityRating', + PremiereDate = 'PremiereDate', + DateCreated = 'DateCreated', + Runtime = 'Runtime', + PlayCount = 'PlayCount', + CommunityPlayCount = 'CommunityPlayCount' +} diff --git a/jellyfin/model/channelMappingOptionsDto.ts b/jellyfin/model/channelMappingOptionsDto.ts new file mode 100644 index 0000000..b6b6e2e --- /dev/null +++ b/jellyfin/model/channelMappingOptionsDto.ts @@ -0,0 +1,67 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { NameIdPair } from './nameIdPair'; +import { NameValuePair } from './nameValuePair'; +import { TunerChannelMapping } from './tunerChannelMapping'; + +/** +* Channel mapping options dto. +*/ +export class ChannelMappingOptionsDto { + /** + * Gets or sets list of tuner channels. + */ + 'tunerChannels'?: Array; + /** + * Gets or sets list of provider channels. + */ + 'providerChannels'?: Array; + /** + * Gets or sets list of mappings. + */ + 'mappings'?: Array; + /** + * Gets or sets provider name. + */ + 'providerName'?: string | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "tunerChannels", + "baseName": "TunerChannels", + "type": "Array" + }, + { + "name": "providerChannels", + "baseName": "ProviderChannels", + "type": "Array" + }, + { + "name": "mappings", + "baseName": "Mappings", + "type": "Array" + }, + { + "name": "providerName", + "baseName": "ProviderName", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return ChannelMappingOptionsDto.attributeTypeMap; + } +} + diff --git a/jellyfin/model/channelMediaContentType.ts b/jellyfin/model/channelMediaContentType.ts new file mode 100644 index 0000000..2efd130 --- /dev/null +++ b/jellyfin/model/channelMediaContentType.ts @@ -0,0 +1,24 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export enum ChannelMediaContentType { + Clip = 'Clip', + Podcast = 'Podcast', + Trailer = 'Trailer', + Movie = 'Movie', + Episode = 'Episode', + Song = 'Song', + MovieExtra = 'MovieExtra', + TvExtra = 'TvExtra' +} diff --git a/jellyfin/model/channelMediaType.ts b/jellyfin/model/channelMediaType.ts new file mode 100644 index 0000000..d3140f0 --- /dev/null +++ b/jellyfin/model/channelMediaType.ts @@ -0,0 +1,19 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export enum ChannelMediaType { + Audio = 'Audio', + Video = 'Video', + Photo = 'Photo' +} diff --git a/jellyfin/model/channelType.ts b/jellyfin/model/channelType.ts new file mode 100644 index 0000000..6ad23dc --- /dev/null +++ b/jellyfin/model/channelType.ts @@ -0,0 +1,21 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Enum ChannelType. +*/ +export enum ChannelType { + Tv = 'TV', + Radio = 'Radio' +} diff --git a/jellyfin/model/chapterInfo.ts b/jellyfin/model/chapterInfo.ts new file mode 100644 index 0000000..3860a0c --- /dev/null +++ b/jellyfin/model/chapterInfo.ts @@ -0,0 +1,67 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Class ChapterInfo. +*/ +export class ChapterInfo { + /** + * Gets or sets the start position ticks. + */ + 'startPositionTicks'?: number; + /** + * Gets or sets the name. + */ + 'name'?: string | null; + /** + * Gets or sets the image path. + */ + 'imagePath'?: string | null; + 'imageDateModified'?: Date; + 'imageTag'?: string | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "startPositionTicks", + "baseName": "StartPositionTicks", + "type": "number" + }, + { + "name": "name", + "baseName": "Name", + "type": "string" + }, + { + "name": "imagePath", + "baseName": "ImagePath", + "type": "string" + }, + { + "name": "imageDateModified", + "baseName": "ImageDateModified", + "type": "Date" + }, + { + "name": "imageTag", + "baseName": "ImageTag", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return ChapterInfo.attributeTypeMap; + } +} + diff --git a/jellyfin/model/clientCapabilities.ts b/jellyfin/model/clientCapabilities.ts new file mode 100644 index 0000000..52a6f05 --- /dev/null +++ b/jellyfin/model/clientCapabilities.ts @@ -0,0 +1,87 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { ClientCapabilitiesDeviceProfile } from './clientCapabilitiesDeviceProfile'; +import { GeneralCommandType } from './generalCommandType'; + +export class ClientCapabilities { + 'playableMediaTypes'?: Array | null; + 'supportedCommands'?: Array | null; + 'supportsMediaControl'?: boolean; + 'supportsContentUploading'?: boolean; + 'messageCallbackUrl'?: string | null; + 'supportsPersistentIdentifier'?: boolean; + 'supportsSync'?: boolean; + 'deviceProfile'?: ClientCapabilitiesDeviceProfile | null; + 'appStoreUrl'?: string | null; + 'iconUrl'?: string | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "playableMediaTypes", + "baseName": "PlayableMediaTypes", + "type": "Array" + }, + { + "name": "supportedCommands", + "baseName": "SupportedCommands", + "type": "Array" + }, + { + "name": "supportsMediaControl", + "baseName": "SupportsMediaControl", + "type": "boolean" + }, + { + "name": "supportsContentUploading", + "baseName": "SupportsContentUploading", + "type": "boolean" + }, + { + "name": "messageCallbackUrl", + "baseName": "MessageCallbackUrl", + "type": "string" + }, + { + "name": "supportsPersistentIdentifier", + "baseName": "SupportsPersistentIdentifier", + "type": "boolean" + }, + { + "name": "supportsSync", + "baseName": "SupportsSync", + "type": "boolean" + }, + { + "name": "deviceProfile", + "baseName": "DeviceProfile", + "type": "ClientCapabilitiesDeviceProfile" + }, + { + "name": "appStoreUrl", + "baseName": "AppStoreUrl", + "type": "string" + }, + { + "name": "iconUrl", + "baseName": "IconUrl", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return ClientCapabilities.attributeTypeMap; + } +} + diff --git a/jellyfin/model/clientCapabilitiesDeviceProfile.ts b/jellyfin/model/clientCapabilitiesDeviceProfile.ts new file mode 100644 index 0000000..500af10 --- /dev/null +++ b/jellyfin/model/clientCapabilitiesDeviceProfile.ts @@ -0,0 +1,384 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { CodecProfile } from './codecProfile'; +import { ContainerProfile } from './containerProfile'; +import { DeviceProfileIdentification } from './deviceProfileIdentification'; +import { DirectPlayProfile } from './directPlayProfile'; +import { ResponseProfile } from './responseProfile'; +import { SubtitleProfile } from './subtitleProfile'; +import { TranscodingProfile } from './transcodingProfile'; +import { XmlAttribute } from './xmlAttribute'; + +/** +* A MediaBrowser.Model.Dlna.DeviceProfile represents a set of metadata which determines which content a certain device is able to play.
Specifically, it defines the supported containers and codecs (video and/or audio, including codec profiles and levels) the device is able to direct play (without transcoding or remuxing), as well as which containers/codecs to transcode to in case it isn\'t. +*/ +export class ClientCapabilitiesDeviceProfile { + /** + * Gets or sets the name of this device profile. + */ + 'name'?: string | null; + /** + * Gets or sets the Id. + */ + 'id'?: string | null; + 'identification'?: DeviceProfileIdentification | null; + /** + * Gets or sets the friendly name of the device profile, which can be shown to users. + */ + 'friendlyName'?: string | null; + /** + * Gets or sets the manufacturer of the device which this profile represents. + */ + 'manufacturer'?: string | null; + /** + * Gets or sets an url for the manufacturer of the device which this profile represents. + */ + 'manufacturerUrl'?: string | null; + /** + * Gets or sets the model name of the device which this profile represents. + */ + 'modelName'?: string | null; + /** + * Gets or sets the model description of the device which this profile represents. + */ + 'modelDescription'?: string | null; + /** + * Gets or sets the model number of the device which this profile represents. + */ + 'modelNumber'?: string | null; + /** + * Gets or sets the ModelUrl. + */ + 'modelUrl'?: string | null; + /** + * Gets or sets the serial number of the device which this profile represents. + */ + 'serialNumber'?: string | null; + /** + * Gets or sets a value indicating whether EnableAlbumArtInDidl. + */ + 'enableAlbumArtInDidl'?: boolean = false; + /** + * Gets or sets a value indicating whether EnableSingleAlbumArtLimit. + */ + 'enableSingleAlbumArtLimit'?: boolean = false; + /** + * Gets or sets a value indicating whether EnableSingleSubtitleLimit. + */ + 'enableSingleSubtitleLimit'?: boolean = false; + /** + * Gets or sets the SupportedMediaTypes. + */ + 'supportedMediaTypes'?: string; + /** + * Gets or sets the UserId. + */ + 'userId'?: string | null; + /** + * Gets or sets the AlbumArtPn. + */ + 'albumArtPn'?: string | null; + /** + * Gets or sets the MaxAlbumArtWidth. + */ + 'maxAlbumArtWidth'?: number | null; + /** + * Gets or sets the MaxAlbumArtHeight. + */ + 'maxAlbumArtHeight'?: number | null; + /** + * Gets or sets the maximum allowed width of embedded icons. + */ + 'maxIconWidth'?: number | null; + /** + * Gets or sets the maximum allowed height of embedded icons. + */ + 'maxIconHeight'?: number | null; + /** + * Gets or sets the maximum allowed bitrate for all streamed content. + */ + 'maxStreamingBitrate'?: number | null; + /** + * Gets or sets the maximum allowed bitrate for statically streamed content (= direct played files). + */ + 'maxStaticBitrate'?: number | null; + /** + * Gets or sets the maximum allowed bitrate for transcoded music streams. + */ + 'musicStreamingTranscodingBitrate'?: number | null; + /** + * Gets or sets the maximum allowed bitrate for statically streamed (= direct played) music files. + */ + 'maxStaticMusicBitrate'?: number | null; + /** + * Gets or sets the content of the aggregationFlags element in the urn:schemas-sonycom:av namespace. + */ + 'sonyAggregationFlags'?: string | null; + /** + * Gets or sets the ProtocolInfo. + */ + 'protocolInfo'?: string | null; + /** + * Gets or sets the TimelineOffsetSeconds. + */ + 'timelineOffsetSeconds'?: number = 0; + /** + * Gets or sets a value indicating whether RequiresPlainVideoItems. + */ + 'requiresPlainVideoItems'?: boolean = false; + /** + * Gets or sets a value indicating whether RequiresPlainFolders. + */ + 'requiresPlainFolders'?: boolean = false; + /** + * Gets or sets a value indicating whether EnableMSMediaReceiverRegistrar. + */ + 'enableMSMediaReceiverRegistrar'?: boolean = false; + /** + * Gets or sets a value indicating whether IgnoreTranscodeByteRangeRequests. + */ + 'ignoreTranscodeByteRangeRequests'?: boolean = false; + /** + * Gets or sets the XmlRootAttributes. + */ + 'xmlRootAttributes'?: Array; + /** + * Gets or sets the direct play profiles. + */ + 'directPlayProfiles'?: Array; + /** + * Gets or sets the transcoding profiles. + */ + 'transcodingProfiles'?: Array; + /** + * Gets or sets the container profiles. + */ + 'containerProfiles'?: Array; + /** + * Gets or sets the codec profiles. + */ + 'codecProfiles'?: Array; + /** + * Gets or sets the ResponseProfiles. + */ + 'responseProfiles'?: Array; + /** + * Gets or sets the subtitle profiles. + */ + 'subtitleProfiles'?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "Name", + "type": "string" + }, + { + "name": "id", + "baseName": "Id", + "type": "string" + }, + { + "name": "identification", + "baseName": "Identification", + "type": "DeviceProfileIdentification" + }, + { + "name": "friendlyName", + "baseName": "FriendlyName", + "type": "string" + }, + { + "name": "manufacturer", + "baseName": "Manufacturer", + "type": "string" + }, + { + "name": "manufacturerUrl", + "baseName": "ManufacturerUrl", + "type": "string" + }, + { + "name": "modelName", + "baseName": "ModelName", + "type": "string" + }, + { + "name": "modelDescription", + "baseName": "ModelDescription", + "type": "string" + }, + { + "name": "modelNumber", + "baseName": "ModelNumber", + "type": "string" + }, + { + "name": "modelUrl", + "baseName": "ModelUrl", + "type": "string" + }, + { + "name": "serialNumber", + "baseName": "SerialNumber", + "type": "string" + }, + { + "name": "enableAlbumArtInDidl", + "baseName": "EnableAlbumArtInDidl", + "type": "boolean" + }, + { + "name": "enableSingleAlbumArtLimit", + "baseName": "EnableSingleAlbumArtLimit", + "type": "boolean" + }, + { + "name": "enableSingleSubtitleLimit", + "baseName": "EnableSingleSubtitleLimit", + "type": "boolean" + }, + { + "name": "supportedMediaTypes", + "baseName": "SupportedMediaTypes", + "type": "string" + }, + { + "name": "userId", + "baseName": "UserId", + "type": "string" + }, + { + "name": "albumArtPn", + "baseName": "AlbumArtPn", + "type": "string" + }, + { + "name": "maxAlbumArtWidth", + "baseName": "MaxAlbumArtWidth", + "type": "number" + }, + { + "name": "maxAlbumArtHeight", + "baseName": "MaxAlbumArtHeight", + "type": "number" + }, + { + "name": "maxIconWidth", + "baseName": "MaxIconWidth", + "type": "number" + }, + { + "name": "maxIconHeight", + "baseName": "MaxIconHeight", + "type": "number" + }, + { + "name": "maxStreamingBitrate", + "baseName": "MaxStreamingBitrate", + "type": "number" + }, + { + "name": "maxStaticBitrate", + "baseName": "MaxStaticBitrate", + "type": "number" + }, + { + "name": "musicStreamingTranscodingBitrate", + "baseName": "MusicStreamingTranscodingBitrate", + "type": "number" + }, + { + "name": "maxStaticMusicBitrate", + "baseName": "MaxStaticMusicBitrate", + "type": "number" + }, + { + "name": "sonyAggregationFlags", + "baseName": "SonyAggregationFlags", + "type": "string" + }, + { + "name": "protocolInfo", + "baseName": "ProtocolInfo", + "type": "string" + }, + { + "name": "timelineOffsetSeconds", + "baseName": "TimelineOffsetSeconds", + "type": "number" + }, + { + "name": "requiresPlainVideoItems", + "baseName": "RequiresPlainVideoItems", + "type": "boolean" + }, + { + "name": "requiresPlainFolders", + "baseName": "RequiresPlainFolders", + "type": "boolean" + }, + { + "name": "enableMSMediaReceiverRegistrar", + "baseName": "EnableMSMediaReceiverRegistrar", + "type": "boolean" + }, + { + "name": "ignoreTranscodeByteRangeRequests", + "baseName": "IgnoreTranscodeByteRangeRequests", + "type": "boolean" + }, + { + "name": "xmlRootAttributes", + "baseName": "XmlRootAttributes", + "type": "Array" + }, + { + "name": "directPlayProfiles", + "baseName": "DirectPlayProfiles", + "type": "Array" + }, + { + "name": "transcodingProfiles", + "baseName": "TranscodingProfiles", + "type": "Array" + }, + { + "name": "containerProfiles", + "baseName": "ContainerProfiles", + "type": "Array" + }, + { + "name": "codecProfiles", + "baseName": "CodecProfiles", + "type": "Array" + }, + { + "name": "responseProfiles", + "baseName": "ResponseProfiles", + "type": "Array" + }, + { + "name": "subtitleProfiles", + "baseName": "SubtitleProfiles", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return ClientCapabilitiesDeviceProfile.attributeTypeMap; + } +} + diff --git a/jellyfin/model/clientCapabilitiesDto.ts b/jellyfin/model/clientCapabilitiesDto.ts new file mode 100644 index 0000000..358d1ad --- /dev/null +++ b/jellyfin/model/clientCapabilitiesDto.ts @@ -0,0 +1,117 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { ClientCapabilitiesDtoDeviceProfile } from './clientCapabilitiesDtoDeviceProfile'; +import { GeneralCommandType } from './generalCommandType'; + +/** +* Client capabilities dto. +*/ +export class ClientCapabilitiesDto { + /** + * Gets or sets the list of playable media types. + */ + 'playableMediaTypes'?: Array; + /** + * Gets or sets the list of supported commands. + */ + 'supportedCommands'?: Array; + /** + * Gets or sets a value indicating whether session supports media control. + */ + 'supportsMediaControl'?: boolean; + /** + * Gets or sets a value indicating whether session supports content uploading. + */ + 'supportsContentUploading'?: boolean; + /** + * Gets or sets the message callback url. + */ + 'messageCallbackUrl'?: string | null; + /** + * Gets or sets a value indicating whether session supports a persistent identifier. + */ + 'supportsPersistentIdentifier'?: boolean; + /** + * Gets or sets a value indicating whether session supports sync. + */ + 'supportsSync'?: boolean; + 'deviceProfile'?: ClientCapabilitiesDtoDeviceProfile | null; + /** + * Gets or sets the app store url. + */ + 'appStoreUrl'?: string | null; + /** + * Gets or sets the icon url. + */ + 'iconUrl'?: string | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "playableMediaTypes", + "baseName": "PlayableMediaTypes", + "type": "Array" + }, + { + "name": "supportedCommands", + "baseName": "SupportedCommands", + "type": "Array" + }, + { + "name": "supportsMediaControl", + "baseName": "SupportsMediaControl", + "type": "boolean" + }, + { + "name": "supportsContentUploading", + "baseName": "SupportsContentUploading", + "type": "boolean" + }, + { + "name": "messageCallbackUrl", + "baseName": "MessageCallbackUrl", + "type": "string" + }, + { + "name": "supportsPersistentIdentifier", + "baseName": "SupportsPersistentIdentifier", + "type": "boolean" + }, + { + "name": "supportsSync", + "baseName": "SupportsSync", + "type": "boolean" + }, + { + "name": "deviceProfile", + "baseName": "DeviceProfile", + "type": "ClientCapabilitiesDtoDeviceProfile" + }, + { + "name": "appStoreUrl", + "baseName": "AppStoreUrl", + "type": "string" + }, + { + "name": "iconUrl", + "baseName": "IconUrl", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return ClientCapabilitiesDto.attributeTypeMap; + } +} + diff --git a/jellyfin/model/clientCapabilitiesDtoDeviceProfile.ts b/jellyfin/model/clientCapabilitiesDtoDeviceProfile.ts new file mode 100644 index 0000000..cc4b9f5 --- /dev/null +++ b/jellyfin/model/clientCapabilitiesDtoDeviceProfile.ts @@ -0,0 +1,384 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { CodecProfile } from './codecProfile'; +import { ContainerProfile } from './containerProfile'; +import { DeviceProfileIdentification } from './deviceProfileIdentification'; +import { DirectPlayProfile } from './directPlayProfile'; +import { ResponseProfile } from './responseProfile'; +import { SubtitleProfile } from './subtitleProfile'; +import { TranscodingProfile } from './transcodingProfile'; +import { XmlAttribute } from './xmlAttribute'; + +/** +* Gets or sets the device profile. +*/ +export class ClientCapabilitiesDtoDeviceProfile { + /** + * Gets or sets the name of this device profile. + */ + 'name'?: string | null; + /** + * Gets or sets the Id. + */ + 'id'?: string | null; + 'identification'?: DeviceProfileIdentification | null; + /** + * Gets or sets the friendly name of the device profile, which can be shown to users. + */ + 'friendlyName'?: string | null; + /** + * Gets or sets the manufacturer of the device which this profile represents. + */ + 'manufacturer'?: string | null; + /** + * Gets or sets an url for the manufacturer of the device which this profile represents. + */ + 'manufacturerUrl'?: string | null; + /** + * Gets or sets the model name of the device which this profile represents. + */ + 'modelName'?: string | null; + /** + * Gets or sets the model description of the device which this profile represents. + */ + 'modelDescription'?: string | null; + /** + * Gets or sets the model number of the device which this profile represents. + */ + 'modelNumber'?: string | null; + /** + * Gets or sets the ModelUrl. + */ + 'modelUrl'?: string | null; + /** + * Gets or sets the serial number of the device which this profile represents. + */ + 'serialNumber'?: string | null; + /** + * Gets or sets a value indicating whether EnableAlbumArtInDidl. + */ + 'enableAlbumArtInDidl'?: boolean = false; + /** + * Gets or sets a value indicating whether EnableSingleAlbumArtLimit. + */ + 'enableSingleAlbumArtLimit'?: boolean = false; + /** + * Gets or sets a value indicating whether EnableSingleSubtitleLimit. + */ + 'enableSingleSubtitleLimit'?: boolean = false; + /** + * Gets or sets the SupportedMediaTypes. + */ + 'supportedMediaTypes'?: string; + /** + * Gets or sets the UserId. + */ + 'userId'?: string | null; + /** + * Gets or sets the AlbumArtPn. + */ + 'albumArtPn'?: string | null; + /** + * Gets or sets the MaxAlbumArtWidth. + */ + 'maxAlbumArtWidth'?: number | null; + /** + * Gets or sets the MaxAlbumArtHeight. + */ + 'maxAlbumArtHeight'?: number | null; + /** + * Gets or sets the maximum allowed width of embedded icons. + */ + 'maxIconWidth'?: number | null; + /** + * Gets or sets the maximum allowed height of embedded icons. + */ + 'maxIconHeight'?: number | null; + /** + * Gets or sets the maximum allowed bitrate for all streamed content. + */ + 'maxStreamingBitrate'?: number | null; + /** + * Gets or sets the maximum allowed bitrate for statically streamed content (= direct played files). + */ + 'maxStaticBitrate'?: number | null; + /** + * Gets or sets the maximum allowed bitrate for transcoded music streams. + */ + 'musicStreamingTranscodingBitrate'?: number | null; + /** + * Gets or sets the maximum allowed bitrate for statically streamed (= direct played) music files. + */ + 'maxStaticMusicBitrate'?: number | null; + /** + * Gets or sets the content of the aggregationFlags element in the urn:schemas-sonycom:av namespace. + */ + 'sonyAggregationFlags'?: string | null; + /** + * Gets or sets the ProtocolInfo. + */ + 'protocolInfo'?: string | null; + /** + * Gets or sets the TimelineOffsetSeconds. + */ + 'timelineOffsetSeconds'?: number = 0; + /** + * Gets or sets a value indicating whether RequiresPlainVideoItems. + */ + 'requiresPlainVideoItems'?: boolean = false; + /** + * Gets or sets a value indicating whether RequiresPlainFolders. + */ + 'requiresPlainFolders'?: boolean = false; + /** + * Gets or sets a value indicating whether EnableMSMediaReceiverRegistrar. + */ + 'enableMSMediaReceiverRegistrar'?: boolean = false; + /** + * Gets or sets a value indicating whether IgnoreTranscodeByteRangeRequests. + */ + 'ignoreTranscodeByteRangeRequests'?: boolean = false; + /** + * Gets or sets the XmlRootAttributes. + */ + 'xmlRootAttributes'?: Array; + /** + * Gets or sets the direct play profiles. + */ + 'directPlayProfiles'?: Array; + /** + * Gets or sets the transcoding profiles. + */ + 'transcodingProfiles'?: Array; + /** + * Gets or sets the container profiles. + */ + 'containerProfiles'?: Array; + /** + * Gets or sets the codec profiles. + */ + 'codecProfiles'?: Array; + /** + * Gets or sets the ResponseProfiles. + */ + 'responseProfiles'?: Array; + /** + * Gets or sets the subtitle profiles. + */ + 'subtitleProfiles'?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "Name", + "type": "string" + }, + { + "name": "id", + "baseName": "Id", + "type": "string" + }, + { + "name": "identification", + "baseName": "Identification", + "type": "DeviceProfileIdentification" + }, + { + "name": "friendlyName", + "baseName": "FriendlyName", + "type": "string" + }, + { + "name": "manufacturer", + "baseName": "Manufacturer", + "type": "string" + }, + { + "name": "manufacturerUrl", + "baseName": "ManufacturerUrl", + "type": "string" + }, + { + "name": "modelName", + "baseName": "ModelName", + "type": "string" + }, + { + "name": "modelDescription", + "baseName": "ModelDescription", + "type": "string" + }, + { + "name": "modelNumber", + "baseName": "ModelNumber", + "type": "string" + }, + { + "name": "modelUrl", + "baseName": "ModelUrl", + "type": "string" + }, + { + "name": "serialNumber", + "baseName": "SerialNumber", + "type": "string" + }, + { + "name": "enableAlbumArtInDidl", + "baseName": "EnableAlbumArtInDidl", + "type": "boolean" + }, + { + "name": "enableSingleAlbumArtLimit", + "baseName": "EnableSingleAlbumArtLimit", + "type": "boolean" + }, + { + "name": "enableSingleSubtitleLimit", + "baseName": "EnableSingleSubtitleLimit", + "type": "boolean" + }, + { + "name": "supportedMediaTypes", + "baseName": "SupportedMediaTypes", + "type": "string" + }, + { + "name": "userId", + "baseName": "UserId", + "type": "string" + }, + { + "name": "albumArtPn", + "baseName": "AlbumArtPn", + "type": "string" + }, + { + "name": "maxAlbumArtWidth", + "baseName": "MaxAlbumArtWidth", + "type": "number" + }, + { + "name": "maxAlbumArtHeight", + "baseName": "MaxAlbumArtHeight", + "type": "number" + }, + { + "name": "maxIconWidth", + "baseName": "MaxIconWidth", + "type": "number" + }, + { + "name": "maxIconHeight", + "baseName": "MaxIconHeight", + "type": "number" + }, + { + "name": "maxStreamingBitrate", + "baseName": "MaxStreamingBitrate", + "type": "number" + }, + { + "name": "maxStaticBitrate", + "baseName": "MaxStaticBitrate", + "type": "number" + }, + { + "name": "musicStreamingTranscodingBitrate", + "baseName": "MusicStreamingTranscodingBitrate", + "type": "number" + }, + { + "name": "maxStaticMusicBitrate", + "baseName": "MaxStaticMusicBitrate", + "type": "number" + }, + { + "name": "sonyAggregationFlags", + "baseName": "SonyAggregationFlags", + "type": "string" + }, + { + "name": "protocolInfo", + "baseName": "ProtocolInfo", + "type": "string" + }, + { + "name": "timelineOffsetSeconds", + "baseName": "TimelineOffsetSeconds", + "type": "number" + }, + { + "name": "requiresPlainVideoItems", + "baseName": "RequiresPlainVideoItems", + "type": "boolean" + }, + { + "name": "requiresPlainFolders", + "baseName": "RequiresPlainFolders", + "type": "boolean" + }, + { + "name": "enableMSMediaReceiverRegistrar", + "baseName": "EnableMSMediaReceiverRegistrar", + "type": "boolean" + }, + { + "name": "ignoreTranscodeByteRangeRequests", + "baseName": "IgnoreTranscodeByteRangeRequests", + "type": "boolean" + }, + { + "name": "xmlRootAttributes", + "baseName": "XmlRootAttributes", + "type": "Array" + }, + { + "name": "directPlayProfiles", + "baseName": "DirectPlayProfiles", + "type": "Array" + }, + { + "name": "transcodingProfiles", + "baseName": "TranscodingProfiles", + "type": "Array" + }, + { + "name": "containerProfiles", + "baseName": "ContainerProfiles", + "type": "Array" + }, + { + "name": "codecProfiles", + "baseName": "CodecProfiles", + "type": "Array" + }, + { + "name": "responseProfiles", + "baseName": "ResponseProfiles", + "type": "Array" + }, + { + "name": "subtitleProfiles", + "baseName": "SubtitleProfiles", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return ClientCapabilitiesDtoDeviceProfile.attributeTypeMap; + } +} + diff --git a/jellyfin/model/clientLogDocumentResponseDto.ts b/jellyfin/model/clientLogDocumentResponseDto.ts new file mode 100644 index 0000000..7cab6cc --- /dev/null +++ b/jellyfin/model/clientLogDocumentResponseDto.ts @@ -0,0 +1,37 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Client log document response dto. +*/ +export class ClientLogDocumentResponseDto { + /** + * Gets the resulting filename. + */ + 'fileName'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "fileName", + "baseName": "FileName", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return ClientLogDocumentResponseDto.attributeTypeMap; + } +} + diff --git a/jellyfin/model/codecProfile.ts b/jellyfin/model/codecProfile.ts new file mode 100644 index 0000000..d05dcfc --- /dev/null +++ b/jellyfin/model/codecProfile.ts @@ -0,0 +1,59 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { CodecType } from './codecType'; +import { ProfileCondition } from './profileCondition'; + +export class CodecProfile { + 'type'?: CodecType; + 'conditions'?: Array | null; + 'applyConditions'?: Array | null; + 'codec'?: string | null; + 'container'?: string | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "type", + "baseName": "Type", + "type": "CodecType" + }, + { + "name": "conditions", + "baseName": "Conditions", + "type": "Array" + }, + { + "name": "applyConditions", + "baseName": "ApplyConditions", + "type": "Array" + }, + { + "name": "codec", + "baseName": "Codec", + "type": "string" + }, + { + "name": "container", + "baseName": "Container", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return CodecProfile.attributeTypeMap; + } +} + +export namespace CodecProfile { +} diff --git a/jellyfin/model/codecType.ts b/jellyfin/model/codecType.ts new file mode 100644 index 0000000..c83052b --- /dev/null +++ b/jellyfin/model/codecType.ts @@ -0,0 +1,19 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export enum CodecType { + Video = 'Video', + VideoAudio = 'VideoAudio', + Audio = 'Audio' +} diff --git a/jellyfin/model/collectionCreationResult.ts b/jellyfin/model/collectionCreationResult.ts new file mode 100644 index 0000000..19ae0df --- /dev/null +++ b/jellyfin/model/collectionCreationResult.ts @@ -0,0 +1,31 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class CollectionCreationResult { + 'id'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "id", + "baseName": "Id", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return CollectionCreationResult.attributeTypeMap; + } +} + diff --git a/jellyfin/model/collectionTypeOptions.ts b/jellyfin/model/collectionTypeOptions.ts new file mode 100644 index 0000000..5e2cc11 --- /dev/null +++ b/jellyfin/model/collectionTypeOptions.ts @@ -0,0 +1,24 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export enum CollectionTypeOptions { + Movies = 'Movies', + TvShows = 'TvShows', + Music = 'Music', + MusicVideos = 'MusicVideos', + HomeVideos = 'HomeVideos', + BoxSets = 'BoxSets', + Books = 'Books', + Mixed = 'Mixed' +} diff --git a/jellyfin/model/configImageTypes.ts b/jellyfin/model/configImageTypes.ts new file mode 100644 index 0000000..0b52172 --- /dev/null +++ b/jellyfin/model/configImageTypes.ts @@ -0,0 +1,67 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class ConfigImageTypes { + 'backdropSizes'?: Array | null; + 'baseUrl'?: string | null; + 'logoSizes'?: Array | null; + 'posterSizes'?: Array | null; + 'profileSizes'?: Array | null; + 'secureBaseUrl'?: string | null; + 'stillSizes'?: Array | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "backdropSizes", + "baseName": "BackdropSizes", + "type": "Array" + }, + { + "name": "baseUrl", + "baseName": "BaseUrl", + "type": "string" + }, + { + "name": "logoSizes", + "baseName": "LogoSizes", + "type": "Array" + }, + { + "name": "posterSizes", + "baseName": "PosterSizes", + "type": "Array" + }, + { + "name": "profileSizes", + "baseName": "ProfileSizes", + "type": "Array" + }, + { + "name": "secureBaseUrl", + "baseName": "SecureBaseUrl", + "type": "string" + }, + { + "name": "stillSizes", + "baseName": "StillSizes", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return ConfigImageTypes.attributeTypeMap; + } +} + diff --git a/jellyfin/model/configurationPageInfo.ts b/jellyfin/model/configurationPageInfo.ts new file mode 100644 index 0000000..efb0b0b --- /dev/null +++ b/jellyfin/model/configurationPageInfo.ts @@ -0,0 +1,82 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* The configuration page info. +*/ +export class ConfigurationPageInfo { + /** + * Gets or sets the name. + */ + 'name'?: string; + /** + * Gets or sets a value indicating whether the configurations page is enabled in the main menu. + */ + 'enableInMainMenu'?: boolean; + /** + * Gets or sets the menu section. + */ + 'menuSection'?: string | null; + /** + * Gets or sets the menu icon. + */ + 'menuIcon'?: string | null; + /** + * Gets or sets the display name. + */ + 'displayName'?: string | null; + /** + * Gets or sets the plugin id. + */ + 'pluginId'?: string | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "Name", + "type": "string" + }, + { + "name": "enableInMainMenu", + "baseName": "EnableInMainMenu", + "type": "boolean" + }, + { + "name": "menuSection", + "baseName": "MenuSection", + "type": "string" + }, + { + "name": "menuIcon", + "baseName": "MenuIcon", + "type": "string" + }, + { + "name": "displayName", + "baseName": "DisplayName", + "type": "string" + }, + { + "name": "pluginId", + "baseName": "PluginId", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return ConfigurationPageInfo.attributeTypeMap; + } +} + diff --git a/jellyfin/model/containerProfile.ts b/jellyfin/model/containerProfile.ts new file mode 100644 index 0000000..3b0066f --- /dev/null +++ b/jellyfin/model/containerProfile.ts @@ -0,0 +1,47 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { DlnaProfileType } from './dlnaProfileType'; +import { ProfileCondition } from './profileCondition'; + +export class ContainerProfile { + 'type'?: DlnaProfileType; + 'conditions'?: Array | null; + 'container'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "type", + "baseName": "Type", + "type": "DlnaProfileType" + }, + { + "name": "conditions", + "baseName": "Conditions", + "type": "Array" + }, + { + "name": "container", + "baseName": "Container", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return ContainerProfile.attributeTypeMap; + } +} + +export namespace ContainerProfile { +} diff --git a/jellyfin/model/controlResponse.ts b/jellyfin/model/controlResponse.ts new file mode 100644 index 0000000..b9b3595 --- /dev/null +++ b/jellyfin/model/controlResponse.ts @@ -0,0 +1,43 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class ControlResponse { + 'headers'?: { [key: string]: string; }; + 'xml'?: string; + 'isSuccessful'?: boolean; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "headers", + "baseName": "Headers", + "type": "{ [key: string]: string; }" + }, + { + "name": "xml", + "baseName": "Xml", + "type": "string" + }, + { + "name": "isSuccessful", + "baseName": "IsSuccessful", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return ControlResponse.attributeTypeMap; + } +} + diff --git a/jellyfin/model/countryInfo.ts b/jellyfin/model/countryInfo.ts new file mode 100644 index 0000000..35df04b --- /dev/null +++ b/jellyfin/model/countryInfo.ts @@ -0,0 +1,64 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Class CountryInfo. +*/ +export class CountryInfo { + /** + * Gets or sets the name. + */ + 'name'?: string | null; + /** + * Gets or sets the display name. + */ + 'displayName'?: string | null; + /** + * Gets or sets the name of the two letter ISO region. + */ + 'twoLetterISORegionName'?: string | null; + /** + * Gets or sets the name of the three letter ISO region. + */ + 'threeLetterISORegionName'?: string | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "Name", + "type": "string" + }, + { + "name": "displayName", + "baseName": "DisplayName", + "type": "string" + }, + { + "name": "twoLetterISORegionName", + "baseName": "TwoLetterISORegionName", + "type": "string" + }, + { + "name": "threeLetterISORegionName", + "baseName": "ThreeLetterISORegionName", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return CountryInfo.attributeTypeMap; + } +} + diff --git a/jellyfin/model/createAdminNotificationRequest.ts b/jellyfin/model/createAdminNotificationRequest.ts new file mode 100644 index 0000000..1b1795c --- /dev/null +++ b/jellyfin/model/createAdminNotificationRequest.ts @@ -0,0 +1,64 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { NotificationLevel } from './notificationLevel'; + +/** +* The admin notification dto. +*/ +export class CreateAdminNotificationRequest { + /** + * Gets or sets the notification name. + */ + 'name'?: string | null; + /** + * Gets or sets the notification description. + */ + 'description'?: string | null; + 'notificationLevel'?: NotificationLevel | null; + /** + * Gets or sets the notification url. + */ + 'url'?: string | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "Name", + "type": "string" + }, + { + "name": "description", + "baseName": "Description", + "type": "string" + }, + { + "name": "notificationLevel", + "baseName": "NotificationLevel", + "type": "NotificationLevel" + }, + { + "name": "url", + "baseName": "Url", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return CreateAdminNotificationRequest.attributeTypeMap; + } +} + +export namespace CreateAdminNotificationRequest { +} diff --git a/jellyfin/model/createPlaylistDto.ts b/jellyfin/model/createPlaylistDto.ts new file mode 100644 index 0000000..3ede6c7 --- /dev/null +++ b/jellyfin/model/createPlaylistDto.ts @@ -0,0 +1,64 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Create new playlist dto. +*/ +export class CreatePlaylistDto { + /** + * Gets or sets the name of the new playlist. + */ + 'name'?: string | null; + /** + * Gets or sets item ids to add to the playlist. + */ + 'ids'?: Array; + /** + * Gets or sets the user id. + */ + 'userId'?: string | null; + /** + * Gets or sets the media type. + */ + 'mediaType'?: string | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "Name", + "type": "string" + }, + { + "name": "ids", + "baseName": "Ids", + "type": "Array" + }, + { + "name": "userId", + "baseName": "UserId", + "type": "string" + }, + { + "name": "mediaType", + "baseName": "MediaType", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return CreatePlaylistDto.attributeTypeMap; + } +} + diff --git a/jellyfin/model/createPlaylistRequest.ts b/jellyfin/model/createPlaylistRequest.ts new file mode 100644 index 0000000..5b10478 --- /dev/null +++ b/jellyfin/model/createPlaylistRequest.ts @@ -0,0 +1,64 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Create new playlist dto. +*/ +export class CreatePlaylistRequest { + /** + * Gets or sets the name of the new playlist. + */ + 'name'?: string | null; + /** + * Gets or sets item ids to add to the playlist. + */ + 'ids'?: Array; + /** + * Gets or sets the user id. + */ + 'userId'?: string | null; + /** + * Gets or sets the media type. + */ + 'mediaType'?: string | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "Name", + "type": "string" + }, + { + "name": "ids", + "baseName": "Ids", + "type": "Array" + }, + { + "name": "userId", + "baseName": "UserId", + "type": "string" + }, + { + "name": "mediaType", + "baseName": "MediaType", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return CreatePlaylistRequest.attributeTypeMap; + } +} + diff --git a/jellyfin/model/createProfileRequest.ts b/jellyfin/model/createProfileRequest.ts new file mode 100644 index 0000000..54aa4d6 --- /dev/null +++ b/jellyfin/model/createProfileRequest.ts @@ -0,0 +1,384 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { CodecProfile } from './codecProfile'; +import { ContainerProfile } from './containerProfile'; +import { DeviceProfileIdentification } from './deviceProfileIdentification'; +import { DirectPlayProfile } from './directPlayProfile'; +import { ResponseProfile } from './responseProfile'; +import { SubtitleProfile } from './subtitleProfile'; +import { TranscodingProfile } from './transcodingProfile'; +import { XmlAttribute } from './xmlAttribute'; + +/** +* A MediaBrowser.Model.Dlna.DeviceProfile represents a set of metadata which determines which content a certain device is able to play.
Specifically, it defines the supported containers and codecs (video and/or audio, including codec profiles and levels) the device is able to direct play (without transcoding or remuxing), as well as which containers/codecs to transcode to in case it isn\'t. +*/ +export class CreateProfileRequest { + /** + * Gets or sets the name of this device profile. + */ + 'name'?: string | null; + /** + * Gets or sets the Id. + */ + 'id'?: string | null; + 'identification'?: DeviceProfileIdentification | null; + /** + * Gets or sets the friendly name of the device profile, which can be shown to users. + */ + 'friendlyName'?: string | null; + /** + * Gets or sets the manufacturer of the device which this profile represents. + */ + 'manufacturer'?: string | null; + /** + * Gets or sets an url for the manufacturer of the device which this profile represents. + */ + 'manufacturerUrl'?: string | null; + /** + * Gets or sets the model name of the device which this profile represents. + */ + 'modelName'?: string | null; + /** + * Gets or sets the model description of the device which this profile represents. + */ + 'modelDescription'?: string | null; + /** + * Gets or sets the model number of the device which this profile represents. + */ + 'modelNumber'?: string | null; + /** + * Gets or sets the ModelUrl. + */ + 'modelUrl'?: string | null; + /** + * Gets or sets the serial number of the device which this profile represents. + */ + 'serialNumber'?: string | null; + /** + * Gets or sets a value indicating whether EnableAlbumArtInDidl. + */ + 'enableAlbumArtInDidl'?: boolean = false; + /** + * Gets or sets a value indicating whether EnableSingleAlbumArtLimit. + */ + 'enableSingleAlbumArtLimit'?: boolean = false; + /** + * Gets or sets a value indicating whether EnableSingleSubtitleLimit. + */ + 'enableSingleSubtitleLimit'?: boolean = false; + /** + * Gets or sets the SupportedMediaTypes. + */ + 'supportedMediaTypes'?: string; + /** + * Gets or sets the UserId. + */ + 'userId'?: string | null; + /** + * Gets or sets the AlbumArtPn. + */ + 'albumArtPn'?: string | null; + /** + * Gets or sets the MaxAlbumArtWidth. + */ + 'maxAlbumArtWidth'?: number | null; + /** + * Gets or sets the MaxAlbumArtHeight. + */ + 'maxAlbumArtHeight'?: number | null; + /** + * Gets or sets the maximum allowed width of embedded icons. + */ + 'maxIconWidth'?: number | null; + /** + * Gets or sets the maximum allowed height of embedded icons. + */ + 'maxIconHeight'?: number | null; + /** + * Gets or sets the maximum allowed bitrate for all streamed content. + */ + 'maxStreamingBitrate'?: number | null; + /** + * Gets or sets the maximum allowed bitrate for statically streamed content (= direct played files). + */ + 'maxStaticBitrate'?: number | null; + /** + * Gets or sets the maximum allowed bitrate for transcoded music streams. + */ + 'musicStreamingTranscodingBitrate'?: number | null; + /** + * Gets or sets the maximum allowed bitrate for statically streamed (= direct played) music files. + */ + 'maxStaticMusicBitrate'?: number | null; + /** + * Gets or sets the content of the aggregationFlags element in the urn:schemas-sonycom:av namespace. + */ + 'sonyAggregationFlags'?: string | null; + /** + * Gets or sets the ProtocolInfo. + */ + 'protocolInfo'?: string | null; + /** + * Gets or sets the TimelineOffsetSeconds. + */ + 'timelineOffsetSeconds'?: number = 0; + /** + * Gets or sets a value indicating whether RequiresPlainVideoItems. + */ + 'requiresPlainVideoItems'?: boolean = false; + /** + * Gets or sets a value indicating whether RequiresPlainFolders. + */ + 'requiresPlainFolders'?: boolean = false; + /** + * Gets or sets a value indicating whether EnableMSMediaReceiverRegistrar. + */ + 'enableMSMediaReceiverRegistrar'?: boolean = false; + /** + * Gets or sets a value indicating whether IgnoreTranscodeByteRangeRequests. + */ + 'ignoreTranscodeByteRangeRequests'?: boolean = false; + /** + * Gets or sets the XmlRootAttributes. + */ + 'xmlRootAttributes'?: Array; + /** + * Gets or sets the direct play profiles. + */ + 'directPlayProfiles'?: Array; + /** + * Gets or sets the transcoding profiles. + */ + 'transcodingProfiles'?: Array; + /** + * Gets or sets the container profiles. + */ + 'containerProfiles'?: Array; + /** + * Gets or sets the codec profiles. + */ + 'codecProfiles'?: Array; + /** + * Gets or sets the ResponseProfiles. + */ + 'responseProfiles'?: Array; + /** + * Gets or sets the subtitle profiles. + */ + 'subtitleProfiles'?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "Name", + "type": "string" + }, + { + "name": "id", + "baseName": "Id", + "type": "string" + }, + { + "name": "identification", + "baseName": "Identification", + "type": "DeviceProfileIdentification" + }, + { + "name": "friendlyName", + "baseName": "FriendlyName", + "type": "string" + }, + { + "name": "manufacturer", + "baseName": "Manufacturer", + "type": "string" + }, + { + "name": "manufacturerUrl", + "baseName": "ManufacturerUrl", + "type": "string" + }, + { + "name": "modelName", + "baseName": "ModelName", + "type": "string" + }, + { + "name": "modelDescription", + "baseName": "ModelDescription", + "type": "string" + }, + { + "name": "modelNumber", + "baseName": "ModelNumber", + "type": "string" + }, + { + "name": "modelUrl", + "baseName": "ModelUrl", + "type": "string" + }, + { + "name": "serialNumber", + "baseName": "SerialNumber", + "type": "string" + }, + { + "name": "enableAlbumArtInDidl", + "baseName": "EnableAlbumArtInDidl", + "type": "boolean" + }, + { + "name": "enableSingleAlbumArtLimit", + "baseName": "EnableSingleAlbumArtLimit", + "type": "boolean" + }, + { + "name": "enableSingleSubtitleLimit", + "baseName": "EnableSingleSubtitleLimit", + "type": "boolean" + }, + { + "name": "supportedMediaTypes", + "baseName": "SupportedMediaTypes", + "type": "string" + }, + { + "name": "userId", + "baseName": "UserId", + "type": "string" + }, + { + "name": "albumArtPn", + "baseName": "AlbumArtPn", + "type": "string" + }, + { + "name": "maxAlbumArtWidth", + "baseName": "MaxAlbumArtWidth", + "type": "number" + }, + { + "name": "maxAlbumArtHeight", + "baseName": "MaxAlbumArtHeight", + "type": "number" + }, + { + "name": "maxIconWidth", + "baseName": "MaxIconWidth", + "type": "number" + }, + { + "name": "maxIconHeight", + "baseName": "MaxIconHeight", + "type": "number" + }, + { + "name": "maxStreamingBitrate", + "baseName": "MaxStreamingBitrate", + "type": "number" + }, + { + "name": "maxStaticBitrate", + "baseName": "MaxStaticBitrate", + "type": "number" + }, + { + "name": "musicStreamingTranscodingBitrate", + "baseName": "MusicStreamingTranscodingBitrate", + "type": "number" + }, + { + "name": "maxStaticMusicBitrate", + "baseName": "MaxStaticMusicBitrate", + "type": "number" + }, + { + "name": "sonyAggregationFlags", + "baseName": "SonyAggregationFlags", + "type": "string" + }, + { + "name": "protocolInfo", + "baseName": "ProtocolInfo", + "type": "string" + }, + { + "name": "timelineOffsetSeconds", + "baseName": "TimelineOffsetSeconds", + "type": "number" + }, + { + "name": "requiresPlainVideoItems", + "baseName": "RequiresPlainVideoItems", + "type": "boolean" + }, + { + "name": "requiresPlainFolders", + "baseName": "RequiresPlainFolders", + "type": "boolean" + }, + { + "name": "enableMSMediaReceiverRegistrar", + "baseName": "EnableMSMediaReceiverRegistrar", + "type": "boolean" + }, + { + "name": "ignoreTranscodeByteRangeRequests", + "baseName": "IgnoreTranscodeByteRangeRequests", + "type": "boolean" + }, + { + "name": "xmlRootAttributes", + "baseName": "XmlRootAttributes", + "type": "Array" + }, + { + "name": "directPlayProfiles", + "baseName": "DirectPlayProfiles", + "type": "Array" + }, + { + "name": "transcodingProfiles", + "baseName": "TranscodingProfiles", + "type": "Array" + }, + { + "name": "containerProfiles", + "baseName": "ContainerProfiles", + "type": "Array" + }, + { + "name": "codecProfiles", + "baseName": "CodecProfiles", + "type": "Array" + }, + { + "name": "responseProfiles", + "baseName": "ResponseProfiles", + "type": "Array" + }, + { + "name": "subtitleProfiles", + "baseName": "SubtitleProfiles", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return CreateProfileRequest.attributeTypeMap; + } +} + diff --git a/jellyfin/model/createSeriesTimerRequest.ts b/jellyfin/model/createSeriesTimerRequest.ts new file mode 100644 index 0000000..ca4c989 --- /dev/null +++ b/jellyfin/model/createSeriesTimerRequest.ts @@ -0,0 +1,330 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { DayOfWeek } from './dayOfWeek'; +import { DayPattern } from './dayPattern'; +import { KeepUntil } from './keepUntil'; + +/** +* Class SeriesTimerInfoDto. +*/ +export class CreateSeriesTimerRequest { + /** + * Gets or sets the Id of the recording. + */ + 'id'?: string | null; + 'type'?: string | null; + /** + * Gets or sets the server identifier. + */ + 'serverId'?: string | null; + /** + * Gets or sets the external identifier. + */ + 'externalId'?: string | null; + /** + * Gets or sets the channel id of the recording. + */ + 'channelId'?: string; + /** + * Gets or sets the external channel identifier. + */ + 'externalChannelId'?: string | null; + /** + * Gets or sets the channel name of the recording. + */ + 'channelName'?: string | null; + 'channelPrimaryImageTag'?: string | null; + /** + * Gets or sets the program identifier. + */ + 'programId'?: string | null; + /** + * Gets or sets the external program identifier. + */ + 'externalProgramId'?: string | null; + /** + * Gets or sets the name of the recording. + */ + 'name'?: string | null; + /** + * Gets or sets the description of the recording. + */ + 'overview'?: string | null; + /** + * Gets or sets the start date of the recording, in UTC. + */ + 'startDate'?: Date; + /** + * Gets or sets the end date of the recording, in UTC. + */ + 'endDate'?: Date; + /** + * Gets or sets the name of the service. + */ + 'serviceName'?: string | null; + /** + * Gets or sets the priority. + */ + 'priority'?: number; + /** + * Gets or sets the pre padding seconds. + */ + 'prePaddingSeconds'?: number; + /** + * Gets or sets the post padding seconds. + */ + 'postPaddingSeconds'?: number; + /** + * Gets or sets a value indicating whether this instance is pre padding required. + */ + 'isPrePaddingRequired'?: boolean; + /** + * Gets or sets the Id of the Parent that has a backdrop if the item does not have one. + */ + 'parentBackdropItemId'?: string | null; + /** + * Gets or sets the parent backdrop image tags. + */ + 'parentBackdropImageTags'?: Array | null; + /** + * Gets or sets a value indicating whether this instance is post padding required. + */ + 'isPostPaddingRequired'?: boolean; + 'keepUntil'?: KeepUntil; + /** + * Gets or sets a value indicating whether [record any time]. + */ + 'recordAnyTime'?: boolean; + 'skipEpisodesInLibrary'?: boolean; + /** + * Gets or sets a value indicating whether [record any channel]. + */ + 'recordAnyChannel'?: boolean; + 'keepUpTo'?: number; + /** + * Gets or sets a value indicating whether [record new only]. + */ + 'recordNewOnly'?: boolean; + /** + * Gets or sets the days. + */ + 'days'?: Array | null; + 'dayPattern'?: DayPattern | null; + /** + * Gets or sets the image tags. + */ + 'imageTags'?: { [key: string]: string; } | null; + /** + * Gets or sets the parent thumb item id. + */ + 'parentThumbItemId'?: string | null; + /** + * Gets or sets the parent thumb image tag. + */ + 'parentThumbImageTag'?: string | null; + /** + * Gets or sets the parent primary image item identifier. + */ + 'parentPrimaryImageItemId'?: string | null; + /** + * Gets or sets the parent primary image tag. + */ + 'parentPrimaryImageTag'?: string | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "id", + "baseName": "Id", + "type": "string" + }, + { + "name": "type", + "baseName": "Type", + "type": "string" + }, + { + "name": "serverId", + "baseName": "ServerId", + "type": "string" + }, + { + "name": "externalId", + "baseName": "ExternalId", + "type": "string" + }, + { + "name": "channelId", + "baseName": "ChannelId", + "type": "string" + }, + { + "name": "externalChannelId", + "baseName": "ExternalChannelId", + "type": "string" + }, + { + "name": "channelName", + "baseName": "ChannelName", + "type": "string" + }, + { + "name": "channelPrimaryImageTag", + "baseName": "ChannelPrimaryImageTag", + "type": "string" + }, + { + "name": "programId", + "baseName": "ProgramId", + "type": "string" + }, + { + "name": "externalProgramId", + "baseName": "ExternalProgramId", + "type": "string" + }, + { + "name": "name", + "baseName": "Name", + "type": "string" + }, + { + "name": "overview", + "baseName": "Overview", + "type": "string" + }, + { + "name": "startDate", + "baseName": "StartDate", + "type": "Date" + }, + { + "name": "endDate", + "baseName": "EndDate", + "type": "Date" + }, + { + "name": "serviceName", + "baseName": "ServiceName", + "type": "string" + }, + { + "name": "priority", + "baseName": "Priority", + "type": "number" + }, + { + "name": "prePaddingSeconds", + "baseName": "PrePaddingSeconds", + "type": "number" + }, + { + "name": "postPaddingSeconds", + "baseName": "PostPaddingSeconds", + "type": "number" + }, + { + "name": "isPrePaddingRequired", + "baseName": "IsPrePaddingRequired", + "type": "boolean" + }, + { + "name": "parentBackdropItemId", + "baseName": "ParentBackdropItemId", + "type": "string" + }, + { + "name": "parentBackdropImageTags", + "baseName": "ParentBackdropImageTags", + "type": "Array" + }, + { + "name": "isPostPaddingRequired", + "baseName": "IsPostPaddingRequired", + "type": "boolean" + }, + { + "name": "keepUntil", + "baseName": "KeepUntil", + "type": "KeepUntil" + }, + { + "name": "recordAnyTime", + "baseName": "RecordAnyTime", + "type": "boolean" + }, + { + "name": "skipEpisodesInLibrary", + "baseName": "SkipEpisodesInLibrary", + "type": "boolean" + }, + { + "name": "recordAnyChannel", + "baseName": "RecordAnyChannel", + "type": "boolean" + }, + { + "name": "keepUpTo", + "baseName": "KeepUpTo", + "type": "number" + }, + { + "name": "recordNewOnly", + "baseName": "RecordNewOnly", + "type": "boolean" + }, + { + "name": "days", + "baseName": "Days", + "type": "Array" + }, + { + "name": "dayPattern", + "baseName": "DayPattern", + "type": "DayPattern" + }, + { + "name": "imageTags", + "baseName": "ImageTags", + "type": "{ [key: string]: string; }" + }, + { + "name": "parentThumbItemId", + "baseName": "ParentThumbItemId", + "type": "string" + }, + { + "name": "parentThumbImageTag", + "baseName": "ParentThumbImageTag", + "type": "string" + }, + { + "name": "parentPrimaryImageItemId", + "baseName": "ParentPrimaryImageItemId", + "type": "string" + }, + { + "name": "parentPrimaryImageTag", + "baseName": "ParentPrimaryImageTag", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return CreateSeriesTimerRequest.attributeTypeMap; + } +} + +export namespace CreateSeriesTimerRequest { +} diff --git a/jellyfin/model/createTimerRequest.ts b/jellyfin/model/createTimerRequest.ts new file mode 100644 index 0000000..045a831 --- /dev/null +++ b/jellyfin/model/createTimerRequest.ts @@ -0,0 +1,267 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { KeepUntil } from './keepUntil'; +import { RecordingStatus } from './recordingStatus'; +import { TimerInfoDtoProgramInfo } from './timerInfoDtoProgramInfo'; + +export class CreateTimerRequest { + /** + * Gets or sets the Id of the recording. + */ + 'id'?: string | null; + 'type'?: string | null; + /** + * Gets or sets the server identifier. + */ + 'serverId'?: string | null; + /** + * Gets or sets the external identifier. + */ + 'externalId'?: string | null; + /** + * Gets or sets the channel id of the recording. + */ + 'channelId'?: string; + /** + * Gets or sets the external channel identifier. + */ + 'externalChannelId'?: string | null; + /** + * Gets or sets the channel name of the recording. + */ + 'channelName'?: string | null; + 'channelPrimaryImageTag'?: string | null; + /** + * Gets or sets the program identifier. + */ + 'programId'?: string | null; + /** + * Gets or sets the external program identifier. + */ + 'externalProgramId'?: string | null; + /** + * Gets or sets the name of the recording. + */ + 'name'?: string | null; + /** + * Gets or sets the description of the recording. + */ + 'overview'?: string | null; + /** + * Gets or sets the start date of the recording, in UTC. + */ + 'startDate'?: Date; + /** + * Gets or sets the end date of the recording, in UTC. + */ + 'endDate'?: Date; + /** + * Gets or sets the name of the service. + */ + 'serviceName'?: string | null; + /** + * Gets or sets the priority. + */ + 'priority'?: number; + /** + * Gets or sets the pre padding seconds. + */ + 'prePaddingSeconds'?: number; + /** + * Gets or sets the post padding seconds. + */ + 'postPaddingSeconds'?: number; + /** + * Gets or sets a value indicating whether this instance is pre padding required. + */ + 'isPrePaddingRequired'?: boolean; + /** + * Gets or sets the Id of the Parent that has a backdrop if the item does not have one. + */ + 'parentBackdropItemId'?: string | null; + /** + * Gets or sets the parent backdrop image tags. + */ + 'parentBackdropImageTags'?: Array | null; + /** + * Gets or sets a value indicating whether this instance is post padding required. + */ + 'isPostPaddingRequired'?: boolean; + 'keepUntil'?: KeepUntil; + 'status'?: RecordingStatus; + /** + * Gets or sets the series timer identifier. + */ + 'seriesTimerId'?: string | null; + /** + * Gets or sets the external series timer identifier. + */ + 'externalSeriesTimerId'?: string | null; + /** + * Gets or sets the run time ticks. + */ + 'runTimeTicks'?: number | null; + 'programInfo'?: TimerInfoDtoProgramInfo | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "id", + "baseName": "Id", + "type": "string" + }, + { + "name": "type", + "baseName": "Type", + "type": "string" + }, + { + "name": "serverId", + "baseName": "ServerId", + "type": "string" + }, + { + "name": "externalId", + "baseName": "ExternalId", + "type": "string" + }, + { + "name": "channelId", + "baseName": "ChannelId", + "type": "string" + }, + { + "name": "externalChannelId", + "baseName": "ExternalChannelId", + "type": "string" + }, + { + "name": "channelName", + "baseName": "ChannelName", + "type": "string" + }, + { + "name": "channelPrimaryImageTag", + "baseName": "ChannelPrimaryImageTag", + "type": "string" + }, + { + "name": "programId", + "baseName": "ProgramId", + "type": "string" + }, + { + "name": "externalProgramId", + "baseName": "ExternalProgramId", + "type": "string" + }, + { + "name": "name", + "baseName": "Name", + "type": "string" + }, + { + "name": "overview", + "baseName": "Overview", + "type": "string" + }, + { + "name": "startDate", + "baseName": "StartDate", + "type": "Date" + }, + { + "name": "endDate", + "baseName": "EndDate", + "type": "Date" + }, + { + "name": "serviceName", + "baseName": "ServiceName", + "type": "string" + }, + { + "name": "priority", + "baseName": "Priority", + "type": "number" + }, + { + "name": "prePaddingSeconds", + "baseName": "PrePaddingSeconds", + "type": "number" + }, + { + "name": "postPaddingSeconds", + "baseName": "PostPaddingSeconds", + "type": "number" + }, + { + "name": "isPrePaddingRequired", + "baseName": "IsPrePaddingRequired", + "type": "boolean" + }, + { + "name": "parentBackdropItemId", + "baseName": "ParentBackdropItemId", + "type": "string" + }, + { + "name": "parentBackdropImageTags", + "baseName": "ParentBackdropImageTags", + "type": "Array" + }, + { + "name": "isPostPaddingRequired", + "baseName": "IsPostPaddingRequired", + "type": "boolean" + }, + { + "name": "keepUntil", + "baseName": "KeepUntil", + "type": "KeepUntil" + }, + { + "name": "status", + "baseName": "Status", + "type": "RecordingStatus" + }, + { + "name": "seriesTimerId", + "baseName": "SeriesTimerId", + "type": "string" + }, + { + "name": "externalSeriesTimerId", + "baseName": "ExternalSeriesTimerId", + "type": "string" + }, + { + "name": "runTimeTicks", + "baseName": "RunTimeTicks", + "type": "number" + }, + { + "name": "programInfo", + "baseName": "ProgramInfo", + "type": "TimerInfoDtoProgramInfo" + } ]; + + static getAttributeTypeMap() { + return CreateTimerRequest.attributeTypeMap; + } +} + +export namespace CreateTimerRequest { +} diff --git a/jellyfin/model/createUserByName.ts b/jellyfin/model/createUserByName.ts new file mode 100644 index 0000000..bc85dcb --- /dev/null +++ b/jellyfin/model/createUserByName.ts @@ -0,0 +1,46 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* The create user by name request body. +*/ +export class CreateUserByName { + /** + * Gets or sets the username. + */ + 'name'?: string | null; + /** + * Gets or sets the password. + */ + 'password'?: string | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "Name", + "type": "string" + }, + { + "name": "password", + "baseName": "Password", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return CreateUserByName.attributeTypeMap; + } +} + diff --git a/jellyfin/model/createUserByNameRequest.ts b/jellyfin/model/createUserByNameRequest.ts new file mode 100644 index 0000000..aa27917 --- /dev/null +++ b/jellyfin/model/createUserByNameRequest.ts @@ -0,0 +1,46 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* The create user by name request body. +*/ +export class CreateUserByNameRequest { + /** + * Gets or sets the username. + */ + 'name'?: string | null; + /** + * Gets or sets the password. + */ + 'password'?: string | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "Name", + "type": "string" + }, + { + "name": "password", + "baseName": "Password", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return CreateUserByNameRequest.attributeTypeMap; + } +} + diff --git a/jellyfin/model/cultureDto.ts b/jellyfin/model/cultureDto.ts new file mode 100644 index 0000000..0f0de49 --- /dev/null +++ b/jellyfin/model/cultureDto.ts @@ -0,0 +1,70 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Class CultureDto. +*/ +export class CultureDto { + /** + * Gets the name. + */ + 'name'?: string; + /** + * Gets the display name. + */ + 'displayName'?: string; + /** + * Gets the name of the two letter ISO language. + */ + 'twoLetterISOLanguageName'?: string; + /** + * Gets the name of the three letter ISO language. + */ + 'threeLetterISOLanguageName'?: string | null; + 'threeLetterISOLanguageNames'?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "Name", + "type": "string" + }, + { + "name": "displayName", + "baseName": "DisplayName", + "type": "string" + }, + { + "name": "twoLetterISOLanguageName", + "baseName": "TwoLetterISOLanguageName", + "type": "string" + }, + { + "name": "threeLetterISOLanguageName", + "baseName": "ThreeLetterISOLanguageName", + "type": "string" + }, + { + "name": "threeLetterISOLanguageNames", + "baseName": "ThreeLetterISOLanguageNames", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return CultureDto.attributeTypeMap; + } +} + diff --git a/jellyfin/model/dayOfWeek.ts b/jellyfin/model/dayOfWeek.ts new file mode 100644 index 0000000..5a7edd0 --- /dev/null +++ b/jellyfin/model/dayOfWeek.ts @@ -0,0 +1,23 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export enum DayOfWeek { + Sunday = 'Sunday', + Monday = 'Monday', + Tuesday = 'Tuesday', + Wednesday = 'Wednesday', + Thursday = 'Thursday', + Friday = 'Friday', + Saturday = 'Saturday' +} diff --git a/jellyfin/model/dayPattern.ts b/jellyfin/model/dayPattern.ts new file mode 100644 index 0000000..329e958 --- /dev/null +++ b/jellyfin/model/dayPattern.ts @@ -0,0 +1,19 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export enum DayPattern { + Daily = 'Daily', + Weekdays = 'Weekdays', + Weekends = 'Weekends' +} diff --git a/jellyfin/model/defaultDirectoryBrowserInfoDto.ts b/jellyfin/model/defaultDirectoryBrowserInfoDto.ts new file mode 100644 index 0000000..1e39e74 --- /dev/null +++ b/jellyfin/model/defaultDirectoryBrowserInfoDto.ts @@ -0,0 +1,37 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Default directory browser info. +*/ +export class DefaultDirectoryBrowserInfoDto { + /** + * Gets or sets the path. + */ + 'path'?: string | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "path", + "baseName": "Path", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return DefaultDirectoryBrowserInfoDto.attributeTypeMap; + } +} + diff --git a/jellyfin/model/deviceIdentification.ts b/jellyfin/model/deviceIdentification.ts new file mode 100644 index 0000000..8889c9a --- /dev/null +++ b/jellyfin/model/deviceIdentification.ts @@ -0,0 +1,107 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { HttpHeaderInfo } from './httpHeaderInfo'; + +export class DeviceIdentification { + /** + * Gets or sets the name of the friendly. + */ + 'friendlyName'?: string; + /** + * Gets or sets the model number. + */ + 'modelNumber'?: string; + /** + * Gets or sets the serial number. + */ + 'serialNumber'?: string; + /** + * Gets or sets the name of the model. + */ + 'modelName'?: string; + /** + * Gets or sets the model description. + */ + 'modelDescription'?: string; + /** + * Gets or sets the model URL. + */ + 'modelUrl'?: string; + /** + * Gets or sets the manufacturer. + */ + 'manufacturer'?: string; + /** + * Gets or sets the manufacturer URL. + */ + 'manufacturerUrl'?: string; + /** + * Gets or sets the headers. + */ + 'headers'?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "friendlyName", + "baseName": "FriendlyName", + "type": "string" + }, + { + "name": "modelNumber", + "baseName": "ModelNumber", + "type": "string" + }, + { + "name": "serialNumber", + "baseName": "SerialNumber", + "type": "string" + }, + { + "name": "modelName", + "baseName": "ModelName", + "type": "string" + }, + { + "name": "modelDescription", + "baseName": "ModelDescription", + "type": "string" + }, + { + "name": "modelUrl", + "baseName": "ModelUrl", + "type": "string" + }, + { + "name": "manufacturer", + "baseName": "Manufacturer", + "type": "string" + }, + { + "name": "manufacturerUrl", + "baseName": "ManufacturerUrl", + "type": "string" + }, + { + "name": "headers", + "baseName": "Headers", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return DeviceIdentification.attributeTypeMap; + } +} + diff --git a/jellyfin/model/deviceInfo.ts b/jellyfin/model/deviceInfo.ts new file mode 100644 index 0000000..9c35282 --- /dev/null +++ b/jellyfin/model/deviceInfo.ts @@ -0,0 +1,107 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { DeviceInfoCapabilities } from './deviceInfoCapabilities'; + +export class DeviceInfo { + 'name'?: string | null; + /** + * Gets or sets the access token. + */ + 'accessToken'?: string | null; + /** + * Gets or sets the identifier. + */ + 'id'?: string | null; + /** + * Gets or sets the last name of the user. + */ + 'lastUserName'?: string | null; + /** + * Gets or sets the name of the application. + */ + 'appName'?: string | null; + /** + * Gets or sets the application version. + */ + 'appVersion'?: string | null; + /** + * Gets or sets the last user identifier. + */ + 'lastUserId'?: string; + /** + * Gets or sets the date last modified. + */ + 'dateLastActivity'?: Date; + 'capabilities'?: DeviceInfoCapabilities | null; + 'iconUrl'?: string | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "Name", + "type": "string" + }, + { + "name": "accessToken", + "baseName": "AccessToken", + "type": "string" + }, + { + "name": "id", + "baseName": "Id", + "type": "string" + }, + { + "name": "lastUserName", + "baseName": "LastUserName", + "type": "string" + }, + { + "name": "appName", + "baseName": "AppName", + "type": "string" + }, + { + "name": "appVersion", + "baseName": "AppVersion", + "type": "string" + }, + { + "name": "lastUserId", + "baseName": "LastUserId", + "type": "string" + }, + { + "name": "dateLastActivity", + "baseName": "DateLastActivity", + "type": "Date" + }, + { + "name": "capabilities", + "baseName": "Capabilities", + "type": "DeviceInfoCapabilities" + }, + { + "name": "iconUrl", + "baseName": "IconUrl", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return DeviceInfo.attributeTypeMap; + } +} + diff --git a/jellyfin/model/deviceInfoCapabilities.ts b/jellyfin/model/deviceInfoCapabilities.ts new file mode 100644 index 0000000..64957c4 --- /dev/null +++ b/jellyfin/model/deviceInfoCapabilities.ts @@ -0,0 +1,90 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { ClientCapabilitiesDeviceProfile } from './clientCapabilitiesDeviceProfile'; +import { GeneralCommandType } from './generalCommandType'; + +/** +* Gets or sets the capabilities. +*/ +export class DeviceInfoCapabilities { + 'playableMediaTypes'?: Array | null; + 'supportedCommands'?: Array | null; + 'supportsMediaControl'?: boolean; + 'supportsContentUploading'?: boolean; + 'messageCallbackUrl'?: string | null; + 'supportsPersistentIdentifier'?: boolean; + 'supportsSync'?: boolean; + 'deviceProfile'?: ClientCapabilitiesDeviceProfile | null; + 'appStoreUrl'?: string | null; + 'iconUrl'?: string | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "playableMediaTypes", + "baseName": "PlayableMediaTypes", + "type": "Array" + }, + { + "name": "supportedCommands", + "baseName": "SupportedCommands", + "type": "Array" + }, + { + "name": "supportsMediaControl", + "baseName": "SupportsMediaControl", + "type": "boolean" + }, + { + "name": "supportsContentUploading", + "baseName": "SupportsContentUploading", + "type": "boolean" + }, + { + "name": "messageCallbackUrl", + "baseName": "MessageCallbackUrl", + "type": "string" + }, + { + "name": "supportsPersistentIdentifier", + "baseName": "SupportsPersistentIdentifier", + "type": "boolean" + }, + { + "name": "supportsSync", + "baseName": "SupportsSync", + "type": "boolean" + }, + { + "name": "deviceProfile", + "baseName": "DeviceProfile", + "type": "ClientCapabilitiesDeviceProfile" + }, + { + "name": "appStoreUrl", + "baseName": "AppStoreUrl", + "type": "string" + }, + { + "name": "iconUrl", + "baseName": "IconUrl", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return DeviceInfoCapabilities.attributeTypeMap; + } +} + diff --git a/jellyfin/model/deviceInfoQueryResult.ts b/jellyfin/model/deviceInfoQueryResult.ts new file mode 100644 index 0000000..29d409e --- /dev/null +++ b/jellyfin/model/deviceInfoQueryResult.ts @@ -0,0 +1,53 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { DeviceInfo } from './deviceInfo'; + +export class DeviceInfoQueryResult { + /** + * Gets or sets the items. + */ + 'items'?: Array | null; + /** + * Gets or sets the total number of records available. + */ + 'totalRecordCount'?: number; + /** + * Gets or sets the index of the first record in Items. + */ + 'startIndex'?: number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "items", + "baseName": "Items", + "type": "Array" + }, + { + "name": "totalRecordCount", + "baseName": "TotalRecordCount", + "type": "number" + }, + { + "name": "startIndex", + "baseName": "StartIndex", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return DeviceInfoQueryResult.attributeTypeMap; + } +} + diff --git a/jellyfin/model/deviceOptions.ts b/jellyfin/model/deviceOptions.ts new file mode 100644 index 0000000..5746899 --- /dev/null +++ b/jellyfin/model/deviceOptions.ts @@ -0,0 +1,55 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* An entity representing custom options for a device. +*/ +export class DeviceOptions { + /** + * Gets the id. + */ + 'id'?: number; + /** + * Gets the device id. + */ + 'deviceId'?: string; + /** + * Gets or sets the custom name. + */ + 'customName'?: string | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "id", + "baseName": "Id", + "type": "number" + }, + { + "name": "deviceId", + "baseName": "DeviceId", + "type": "string" + }, + { + "name": "customName", + "baseName": "CustomName", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return DeviceOptions.attributeTypeMap; + } +} + diff --git a/jellyfin/model/deviceOptionsDto.ts b/jellyfin/model/deviceOptionsDto.ts new file mode 100644 index 0000000..0c1a53d --- /dev/null +++ b/jellyfin/model/deviceOptionsDto.ts @@ -0,0 +1,55 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* A dto representing custom options for a device. +*/ +export class DeviceOptionsDto { + /** + * Gets or sets the id. + */ + 'id'?: number; + /** + * Gets or sets the device id. + */ + 'deviceId'?: string | null; + /** + * Gets or sets the custom name. + */ + 'customName'?: string | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "id", + "baseName": "Id", + "type": "number" + }, + { + "name": "deviceId", + "baseName": "DeviceId", + "type": "string" + }, + { + "name": "customName", + "baseName": "CustomName", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return DeviceOptionsDto.attributeTypeMap; + } +} + diff --git a/jellyfin/model/deviceProfile.ts b/jellyfin/model/deviceProfile.ts new file mode 100644 index 0000000..31c2990 --- /dev/null +++ b/jellyfin/model/deviceProfile.ts @@ -0,0 +1,384 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { CodecProfile } from './codecProfile'; +import { ContainerProfile } from './containerProfile'; +import { DeviceProfileIdentification } from './deviceProfileIdentification'; +import { DirectPlayProfile } from './directPlayProfile'; +import { ResponseProfile } from './responseProfile'; +import { SubtitleProfile } from './subtitleProfile'; +import { TranscodingProfile } from './transcodingProfile'; +import { XmlAttribute } from './xmlAttribute'; + +/** +* A MediaBrowser.Model.Dlna.DeviceProfile represents a set of metadata which determines which content a certain device is able to play.
Specifically, it defines the supported containers and codecs (video and/or audio, including codec profiles and levels) the device is able to direct play (without transcoding or remuxing), as well as which containers/codecs to transcode to in case it isn\'t. +*/ +export class DeviceProfile { + /** + * Gets or sets the name of this device profile. + */ + 'name'?: string | null; + /** + * Gets or sets the Id. + */ + 'id'?: string | null; + 'identification'?: DeviceProfileIdentification | null; + /** + * Gets or sets the friendly name of the device profile, which can be shown to users. + */ + 'friendlyName'?: string | null; + /** + * Gets or sets the manufacturer of the device which this profile represents. + */ + 'manufacturer'?: string | null; + /** + * Gets or sets an url for the manufacturer of the device which this profile represents. + */ + 'manufacturerUrl'?: string | null; + /** + * Gets or sets the model name of the device which this profile represents. + */ + 'modelName'?: string | null; + /** + * Gets or sets the model description of the device which this profile represents. + */ + 'modelDescription'?: string | null; + /** + * Gets or sets the model number of the device which this profile represents. + */ + 'modelNumber'?: string | null; + /** + * Gets or sets the ModelUrl. + */ + 'modelUrl'?: string | null; + /** + * Gets or sets the serial number of the device which this profile represents. + */ + 'serialNumber'?: string | null; + /** + * Gets or sets a value indicating whether EnableAlbumArtInDidl. + */ + 'enableAlbumArtInDidl'?: boolean = false; + /** + * Gets or sets a value indicating whether EnableSingleAlbumArtLimit. + */ + 'enableSingleAlbumArtLimit'?: boolean = false; + /** + * Gets or sets a value indicating whether EnableSingleSubtitleLimit. + */ + 'enableSingleSubtitleLimit'?: boolean = false; + /** + * Gets or sets the SupportedMediaTypes. + */ + 'supportedMediaTypes'?: string; + /** + * Gets or sets the UserId. + */ + 'userId'?: string | null; + /** + * Gets or sets the AlbumArtPn. + */ + 'albumArtPn'?: string | null; + /** + * Gets or sets the MaxAlbumArtWidth. + */ + 'maxAlbumArtWidth'?: number | null; + /** + * Gets or sets the MaxAlbumArtHeight. + */ + 'maxAlbumArtHeight'?: number | null; + /** + * Gets or sets the maximum allowed width of embedded icons. + */ + 'maxIconWidth'?: number | null; + /** + * Gets or sets the maximum allowed height of embedded icons. + */ + 'maxIconHeight'?: number | null; + /** + * Gets or sets the maximum allowed bitrate for all streamed content. + */ + 'maxStreamingBitrate'?: number | null; + /** + * Gets or sets the maximum allowed bitrate for statically streamed content (= direct played files). + */ + 'maxStaticBitrate'?: number | null; + /** + * Gets or sets the maximum allowed bitrate for transcoded music streams. + */ + 'musicStreamingTranscodingBitrate'?: number | null; + /** + * Gets or sets the maximum allowed bitrate for statically streamed (= direct played) music files. + */ + 'maxStaticMusicBitrate'?: number | null; + /** + * Gets or sets the content of the aggregationFlags element in the urn:schemas-sonycom:av namespace. + */ + 'sonyAggregationFlags'?: string | null; + /** + * Gets or sets the ProtocolInfo. + */ + 'protocolInfo'?: string | null; + /** + * Gets or sets the TimelineOffsetSeconds. + */ + 'timelineOffsetSeconds'?: number = 0; + /** + * Gets or sets a value indicating whether RequiresPlainVideoItems. + */ + 'requiresPlainVideoItems'?: boolean = false; + /** + * Gets or sets a value indicating whether RequiresPlainFolders. + */ + 'requiresPlainFolders'?: boolean = false; + /** + * Gets or sets a value indicating whether EnableMSMediaReceiverRegistrar. + */ + 'enableMSMediaReceiverRegistrar'?: boolean = false; + /** + * Gets or sets a value indicating whether IgnoreTranscodeByteRangeRequests. + */ + 'ignoreTranscodeByteRangeRequests'?: boolean = false; + /** + * Gets or sets the XmlRootAttributes. + */ + 'xmlRootAttributes'?: Array; + /** + * Gets or sets the direct play profiles. + */ + 'directPlayProfiles'?: Array; + /** + * Gets or sets the transcoding profiles. + */ + 'transcodingProfiles'?: Array; + /** + * Gets or sets the container profiles. + */ + 'containerProfiles'?: Array; + /** + * Gets or sets the codec profiles. + */ + 'codecProfiles'?: Array; + /** + * Gets or sets the ResponseProfiles. + */ + 'responseProfiles'?: Array; + /** + * Gets or sets the subtitle profiles. + */ + 'subtitleProfiles'?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "Name", + "type": "string" + }, + { + "name": "id", + "baseName": "Id", + "type": "string" + }, + { + "name": "identification", + "baseName": "Identification", + "type": "DeviceProfileIdentification" + }, + { + "name": "friendlyName", + "baseName": "FriendlyName", + "type": "string" + }, + { + "name": "manufacturer", + "baseName": "Manufacturer", + "type": "string" + }, + { + "name": "manufacturerUrl", + "baseName": "ManufacturerUrl", + "type": "string" + }, + { + "name": "modelName", + "baseName": "ModelName", + "type": "string" + }, + { + "name": "modelDescription", + "baseName": "ModelDescription", + "type": "string" + }, + { + "name": "modelNumber", + "baseName": "ModelNumber", + "type": "string" + }, + { + "name": "modelUrl", + "baseName": "ModelUrl", + "type": "string" + }, + { + "name": "serialNumber", + "baseName": "SerialNumber", + "type": "string" + }, + { + "name": "enableAlbumArtInDidl", + "baseName": "EnableAlbumArtInDidl", + "type": "boolean" + }, + { + "name": "enableSingleAlbumArtLimit", + "baseName": "EnableSingleAlbumArtLimit", + "type": "boolean" + }, + { + "name": "enableSingleSubtitleLimit", + "baseName": "EnableSingleSubtitleLimit", + "type": "boolean" + }, + { + "name": "supportedMediaTypes", + "baseName": "SupportedMediaTypes", + "type": "string" + }, + { + "name": "userId", + "baseName": "UserId", + "type": "string" + }, + { + "name": "albumArtPn", + "baseName": "AlbumArtPn", + "type": "string" + }, + { + "name": "maxAlbumArtWidth", + "baseName": "MaxAlbumArtWidth", + "type": "number" + }, + { + "name": "maxAlbumArtHeight", + "baseName": "MaxAlbumArtHeight", + "type": "number" + }, + { + "name": "maxIconWidth", + "baseName": "MaxIconWidth", + "type": "number" + }, + { + "name": "maxIconHeight", + "baseName": "MaxIconHeight", + "type": "number" + }, + { + "name": "maxStreamingBitrate", + "baseName": "MaxStreamingBitrate", + "type": "number" + }, + { + "name": "maxStaticBitrate", + "baseName": "MaxStaticBitrate", + "type": "number" + }, + { + "name": "musicStreamingTranscodingBitrate", + "baseName": "MusicStreamingTranscodingBitrate", + "type": "number" + }, + { + "name": "maxStaticMusicBitrate", + "baseName": "MaxStaticMusicBitrate", + "type": "number" + }, + { + "name": "sonyAggregationFlags", + "baseName": "SonyAggregationFlags", + "type": "string" + }, + { + "name": "protocolInfo", + "baseName": "ProtocolInfo", + "type": "string" + }, + { + "name": "timelineOffsetSeconds", + "baseName": "TimelineOffsetSeconds", + "type": "number" + }, + { + "name": "requiresPlainVideoItems", + "baseName": "RequiresPlainVideoItems", + "type": "boolean" + }, + { + "name": "requiresPlainFolders", + "baseName": "RequiresPlainFolders", + "type": "boolean" + }, + { + "name": "enableMSMediaReceiverRegistrar", + "baseName": "EnableMSMediaReceiverRegistrar", + "type": "boolean" + }, + { + "name": "ignoreTranscodeByteRangeRequests", + "baseName": "IgnoreTranscodeByteRangeRequests", + "type": "boolean" + }, + { + "name": "xmlRootAttributes", + "baseName": "XmlRootAttributes", + "type": "Array" + }, + { + "name": "directPlayProfiles", + "baseName": "DirectPlayProfiles", + "type": "Array" + }, + { + "name": "transcodingProfiles", + "baseName": "TranscodingProfiles", + "type": "Array" + }, + { + "name": "containerProfiles", + "baseName": "ContainerProfiles", + "type": "Array" + }, + { + "name": "codecProfiles", + "baseName": "CodecProfiles", + "type": "Array" + }, + { + "name": "responseProfiles", + "baseName": "ResponseProfiles", + "type": "Array" + }, + { + "name": "subtitleProfiles", + "baseName": "SubtitleProfiles", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return DeviceProfile.attributeTypeMap; + } +} + diff --git a/jellyfin/model/deviceProfileIdentification.ts b/jellyfin/model/deviceProfileIdentification.ts new file mode 100644 index 0000000..b2511f0 --- /dev/null +++ b/jellyfin/model/deviceProfileIdentification.ts @@ -0,0 +1,110 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { HttpHeaderInfo } from './httpHeaderInfo'; + +/** +* Gets or sets the Identification. +*/ +export class DeviceProfileIdentification { + /** + * Gets or sets the name of the friendly. + */ + 'friendlyName'?: string; + /** + * Gets or sets the model number. + */ + 'modelNumber'?: string; + /** + * Gets or sets the serial number. + */ + 'serialNumber'?: string; + /** + * Gets or sets the name of the model. + */ + 'modelName'?: string; + /** + * Gets or sets the model description. + */ + 'modelDescription'?: string; + /** + * Gets or sets the model URL. + */ + 'modelUrl'?: string; + /** + * Gets or sets the manufacturer. + */ + 'manufacturer'?: string; + /** + * Gets or sets the manufacturer URL. + */ + 'manufacturerUrl'?: string; + /** + * Gets or sets the headers. + */ + 'headers'?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "friendlyName", + "baseName": "FriendlyName", + "type": "string" + }, + { + "name": "modelNumber", + "baseName": "ModelNumber", + "type": "string" + }, + { + "name": "serialNumber", + "baseName": "SerialNumber", + "type": "string" + }, + { + "name": "modelName", + "baseName": "ModelName", + "type": "string" + }, + { + "name": "modelDescription", + "baseName": "ModelDescription", + "type": "string" + }, + { + "name": "modelUrl", + "baseName": "ModelUrl", + "type": "string" + }, + { + "name": "manufacturer", + "baseName": "Manufacturer", + "type": "string" + }, + { + "name": "manufacturerUrl", + "baseName": "ManufacturerUrl", + "type": "string" + }, + { + "name": "headers", + "baseName": "Headers", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return DeviceProfileIdentification.attributeTypeMap; + } +} + diff --git a/jellyfin/model/deviceProfileInfo.ts b/jellyfin/model/deviceProfileInfo.ts new file mode 100644 index 0000000..20896b6 --- /dev/null +++ b/jellyfin/model/deviceProfileInfo.ts @@ -0,0 +1,52 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { DeviceProfileType } from './deviceProfileType'; + +export class DeviceProfileInfo { + /** + * Gets or sets the identifier. + */ + 'id'?: string | null; + /** + * Gets or sets the name. + */ + 'name'?: string | null; + 'type'?: DeviceProfileType; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "id", + "baseName": "Id", + "type": "string" + }, + { + "name": "name", + "baseName": "Name", + "type": "string" + }, + { + "name": "type", + "baseName": "Type", + "type": "DeviceProfileType" + } ]; + + static getAttributeTypeMap() { + return DeviceProfileInfo.attributeTypeMap; + } +} + +export namespace DeviceProfileInfo { +} diff --git a/jellyfin/model/deviceProfileType.ts b/jellyfin/model/deviceProfileType.ts new file mode 100644 index 0000000..49f3d21 --- /dev/null +++ b/jellyfin/model/deviceProfileType.ts @@ -0,0 +1,18 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export enum DeviceProfileType { + System = 'System', + User = 'User' +} diff --git a/jellyfin/model/directPlayProfile.ts b/jellyfin/model/directPlayProfile.ts new file mode 100644 index 0000000..aac5301 --- /dev/null +++ b/jellyfin/model/directPlayProfile.ts @@ -0,0 +1,52 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { DlnaProfileType } from './dlnaProfileType'; + +export class DirectPlayProfile { + 'container'?: string | null; + 'audioCodec'?: string | null; + 'videoCodec'?: string | null; + 'type'?: DlnaProfileType; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "container", + "baseName": "Container", + "type": "string" + }, + { + "name": "audioCodec", + "baseName": "AudioCodec", + "type": "string" + }, + { + "name": "videoCodec", + "baseName": "VideoCodec", + "type": "string" + }, + { + "name": "type", + "baseName": "Type", + "type": "DlnaProfileType" + } ]; + + static getAttributeTypeMap() { + return DirectPlayProfile.attributeTypeMap; + } +} + +export namespace DirectPlayProfile { +} diff --git a/jellyfin/model/displayPreferencesDto.ts b/jellyfin/model/displayPreferencesDto.ts new file mode 100644 index 0000000..8fd0508 --- /dev/null +++ b/jellyfin/model/displayPreferencesDto.ts @@ -0,0 +1,152 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { ScrollDirection } from './scrollDirection'; +import { SortOrder } from './sortOrder'; + +/** +* Defines the display preferences for any item that supports them (usually Folders). +*/ +export class DisplayPreferencesDto { + /** + * Gets or sets the user id. + */ + 'id'?: string | null; + /** + * Gets or sets the type of the view. + */ + 'viewType'?: string | null; + /** + * Gets or sets the sort by. + */ + 'sortBy'?: string | null; + /** + * Gets or sets the index by. + */ + 'indexBy'?: string | null; + /** + * Gets or sets a value indicating whether [remember indexing]. + */ + 'rememberIndexing'?: boolean; + /** + * Gets or sets the height of the primary image. + */ + 'primaryImageHeight'?: number; + /** + * Gets or sets the width of the primary image. + */ + 'primaryImageWidth'?: number; + /** + * Gets or sets the custom prefs. + */ + 'customPrefs'?: { [key: string]: string; }; + 'scrollDirection'?: ScrollDirection; + /** + * Gets or sets a value indicating whether to show backdrops on this item. + */ + 'showBackdrop'?: boolean; + /** + * Gets or sets a value indicating whether [remember sorting]. + */ + 'rememberSorting'?: boolean; + 'sortOrder'?: SortOrder; + /** + * Gets or sets a value indicating whether [show sidebar]. + */ + 'showSidebar'?: boolean; + /** + * Gets or sets the client. + */ + 'client'?: string | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "id", + "baseName": "Id", + "type": "string" + }, + { + "name": "viewType", + "baseName": "ViewType", + "type": "string" + }, + { + "name": "sortBy", + "baseName": "SortBy", + "type": "string" + }, + { + "name": "indexBy", + "baseName": "IndexBy", + "type": "string" + }, + { + "name": "rememberIndexing", + "baseName": "RememberIndexing", + "type": "boolean" + }, + { + "name": "primaryImageHeight", + "baseName": "PrimaryImageHeight", + "type": "number" + }, + { + "name": "primaryImageWidth", + "baseName": "PrimaryImageWidth", + "type": "number" + }, + { + "name": "customPrefs", + "baseName": "CustomPrefs", + "type": "{ [key: string]: string; }" + }, + { + "name": "scrollDirection", + "baseName": "ScrollDirection", + "type": "ScrollDirection" + }, + { + "name": "showBackdrop", + "baseName": "ShowBackdrop", + "type": "boolean" + }, + { + "name": "rememberSorting", + "baseName": "RememberSorting", + "type": "boolean" + }, + { + "name": "sortOrder", + "baseName": "SortOrder", + "type": "SortOrder" + }, + { + "name": "showSidebar", + "baseName": "ShowSidebar", + "type": "boolean" + }, + { + "name": "client", + "baseName": "Client", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return DisplayPreferencesDto.attributeTypeMap; + } +} + +export namespace DisplayPreferencesDto { +} diff --git a/jellyfin/model/dlnaOptions.ts b/jellyfin/model/dlnaOptions.ts new file mode 100644 index 0000000..a12934d --- /dev/null +++ b/jellyfin/model/dlnaOptions.ts @@ -0,0 +1,127 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* The DlnaOptions class contains the user definable parameters for the dlna subsystems. +*/ +export class DlnaOptions { + /** + * Gets or sets a value indicating whether gets or sets a value to indicate the status of the dlna playTo subsystem. + */ + 'enablePlayTo'?: boolean; + /** + * Gets or sets a value indicating whether gets or sets a value to indicate the status of the dlna server subsystem. + */ + 'enableServer'?: boolean; + /** + * Gets or sets a value indicating whether detailed dlna server logs are sent to the console/log. If the setting \"Emby.Dlna\": \"Debug\" msut be set in logging.default.json for this property to work. + */ + 'enableDebugLog'?: boolean; + /** + * Gets or sets a value indicating whether whether detailed playTo debug logs are sent to the console/log. If the setting \"Emby.Dlna.PlayTo\": \"Debug\" msut be set in logging.default.json for this property to work. + */ + 'enablePlayToTracing'?: boolean; + /** + * Gets or sets the ssdp client discovery interval time (in seconds). This is the time after which the server will send a ssdp search request. + */ + 'clientDiscoveryIntervalSeconds'?: number; + /** + * Gets or sets the frequency at which ssdp alive notifications are transmitted. + */ + 'aliveMessageIntervalSeconds'?: number; + /** + * Gets or sets the frequency at which ssdp alive notifications are transmitted. MIGRATING - TO BE REMOVED ONCE WEB HAS BEEN ALTERED. + */ + 'blastAliveMessageIntervalSeconds'?: number; + /** + * Gets or sets the default user account that the dlna server uses. + */ + 'defaultUserId'?: string | null; + /** + * Gets or sets a value indicating whether playTo device profiles should be created. + */ + 'autoCreatePlayToProfiles'?: boolean; + /** + * Gets or sets a value indicating whether to blast alive messages. + */ + 'blastAliveMessages'?: boolean; + /** + * gets or sets a value indicating whether to send only matched host. + */ + 'sendOnlyMatchedHost'?: boolean; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "enablePlayTo", + "baseName": "EnablePlayTo", + "type": "boolean" + }, + { + "name": "enableServer", + "baseName": "EnableServer", + "type": "boolean" + }, + { + "name": "enableDebugLog", + "baseName": "EnableDebugLog", + "type": "boolean" + }, + { + "name": "enablePlayToTracing", + "baseName": "EnablePlayToTracing", + "type": "boolean" + }, + { + "name": "clientDiscoveryIntervalSeconds", + "baseName": "ClientDiscoveryIntervalSeconds", + "type": "number" + }, + { + "name": "aliveMessageIntervalSeconds", + "baseName": "AliveMessageIntervalSeconds", + "type": "number" + }, + { + "name": "blastAliveMessageIntervalSeconds", + "baseName": "BlastAliveMessageIntervalSeconds", + "type": "number" + }, + { + "name": "defaultUserId", + "baseName": "DefaultUserId", + "type": "string" + }, + { + "name": "autoCreatePlayToProfiles", + "baseName": "AutoCreatePlayToProfiles", + "type": "boolean" + }, + { + "name": "blastAliveMessages", + "baseName": "BlastAliveMessages", + "type": "boolean" + }, + { + "name": "sendOnlyMatchedHost", + "baseName": "SendOnlyMatchedHost", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return DlnaOptions.attributeTypeMap; + } +} + diff --git a/jellyfin/model/dlnaProfileType.ts b/jellyfin/model/dlnaProfileType.ts new file mode 100644 index 0000000..8d2071c --- /dev/null +++ b/jellyfin/model/dlnaProfileType.ts @@ -0,0 +1,20 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export enum DlnaProfileType { + Audio = 'Audio', + Video = 'Video', + Photo = 'Photo', + Subtitle = 'Subtitle' +} diff --git a/jellyfin/model/dynamicDayOfWeek.ts b/jellyfin/model/dynamicDayOfWeek.ts new file mode 100644 index 0000000..789f0d6 --- /dev/null +++ b/jellyfin/model/dynamicDayOfWeek.ts @@ -0,0 +1,29 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* An enum that represents a day of the week, weekdays, weekends, or all days. +*/ +export enum DynamicDayOfWeek { + Sunday = 'Sunday', + Monday = 'Monday', + Tuesday = 'Tuesday', + Wednesday = 'Wednesday', + Thursday = 'Thursday', + Friday = 'Friday', + Saturday = 'Saturday', + Everyday = 'Everyday', + Weekday = 'Weekday', + Weekend = 'Weekend' +} diff --git a/jellyfin/model/embeddedSubtitleOptions.ts b/jellyfin/model/embeddedSubtitleOptions.ts new file mode 100644 index 0000000..8b33bda --- /dev/null +++ b/jellyfin/model/embeddedSubtitleOptions.ts @@ -0,0 +1,23 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* An enum representing the options to disable embedded subs. +*/ +export enum EmbeddedSubtitleOptions { + AllowAll = 'AllowAll', + AllowText = 'AllowText', + AllowImage = 'AllowImage', + AllowNone = 'AllowNone' +} diff --git a/jellyfin/model/encodingContext.ts b/jellyfin/model/encodingContext.ts new file mode 100644 index 0000000..4630646 --- /dev/null +++ b/jellyfin/model/encodingContext.ts @@ -0,0 +1,18 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export enum EncodingContext { + Streaming = 'Streaming', + Static = 'Static' +} diff --git a/jellyfin/model/encodingOptions.ts b/jellyfin/model/encodingOptions.ts new file mode 100644 index 0000000..05bceac --- /dev/null +++ b/jellyfin/model/encodingOptions.ts @@ -0,0 +1,259 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class EncodingOptions { + 'encodingThreadCount'?: number; + 'transcodingTempPath'?: string | null; + 'fallbackFontPath'?: string | null; + 'enableFallbackFont'?: boolean; + 'downMixAudioBoost'?: number; + 'maxMuxingQueueSize'?: number; + 'enableThrottling'?: boolean; + 'throttleDelaySeconds'?: number; + 'hardwareAccelerationType'?: string | null; + /** + * Gets or sets the FFmpeg path as set by the user via the UI. + */ + 'encoderAppPath'?: string | null; + /** + * Gets or sets the current FFmpeg path being used by the system and displayed on the transcode page. + */ + 'encoderAppPathDisplay'?: string | null; + 'vaapiDevice'?: string | null; + 'enableTonemapping'?: boolean; + 'enableVppTonemapping'?: boolean; + 'tonemappingAlgorithm'?: string | null; + 'tonemappingRange'?: string | null; + 'tonemappingDesat'?: number; + 'tonemappingThreshold'?: number; + 'tonemappingPeak'?: number; + 'tonemappingParam'?: number; + 'vppTonemappingBrightness'?: number; + 'vppTonemappingContrast'?: number; + 'h264Crf'?: number; + 'h265Crf'?: number; + 'encoderPreset'?: string | null; + 'deinterlaceDoubleRate'?: boolean; + 'deinterlaceMethod'?: string | null; + 'enableDecodingColorDepth10Hevc'?: boolean; + 'enableDecodingColorDepth10Vp9'?: boolean; + 'enableEnhancedNvdecDecoder'?: boolean; + 'preferSystemNativeHwDecoder'?: boolean; + 'enableIntelLowPowerH264HwEncoder'?: boolean; + 'enableIntelLowPowerHevcHwEncoder'?: boolean; + 'enableHardwareEncoding'?: boolean; + 'allowHevcEncoding'?: boolean; + 'enableSubtitleExtraction'?: boolean; + 'hardwareDecodingCodecs'?: Array | null; + 'allowOnDemandMetadataBasedKeyframeExtractionForExtensions'?: Array | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "encodingThreadCount", + "baseName": "EncodingThreadCount", + "type": "number" + }, + { + "name": "transcodingTempPath", + "baseName": "TranscodingTempPath", + "type": "string" + }, + { + "name": "fallbackFontPath", + "baseName": "FallbackFontPath", + "type": "string" + }, + { + "name": "enableFallbackFont", + "baseName": "EnableFallbackFont", + "type": "boolean" + }, + { + "name": "downMixAudioBoost", + "baseName": "DownMixAudioBoost", + "type": "number" + }, + { + "name": "maxMuxingQueueSize", + "baseName": "MaxMuxingQueueSize", + "type": "number" + }, + { + "name": "enableThrottling", + "baseName": "EnableThrottling", + "type": "boolean" + }, + { + "name": "throttleDelaySeconds", + "baseName": "ThrottleDelaySeconds", + "type": "number" + }, + { + "name": "hardwareAccelerationType", + "baseName": "HardwareAccelerationType", + "type": "string" + }, + { + "name": "encoderAppPath", + "baseName": "EncoderAppPath", + "type": "string" + }, + { + "name": "encoderAppPathDisplay", + "baseName": "EncoderAppPathDisplay", + "type": "string" + }, + { + "name": "vaapiDevice", + "baseName": "VaapiDevice", + "type": "string" + }, + { + "name": "enableTonemapping", + "baseName": "EnableTonemapping", + "type": "boolean" + }, + { + "name": "enableVppTonemapping", + "baseName": "EnableVppTonemapping", + "type": "boolean" + }, + { + "name": "tonemappingAlgorithm", + "baseName": "TonemappingAlgorithm", + "type": "string" + }, + { + "name": "tonemappingRange", + "baseName": "TonemappingRange", + "type": "string" + }, + { + "name": "tonemappingDesat", + "baseName": "TonemappingDesat", + "type": "number" + }, + { + "name": "tonemappingThreshold", + "baseName": "TonemappingThreshold", + "type": "number" + }, + { + "name": "tonemappingPeak", + "baseName": "TonemappingPeak", + "type": "number" + }, + { + "name": "tonemappingParam", + "baseName": "TonemappingParam", + "type": "number" + }, + { + "name": "vppTonemappingBrightness", + "baseName": "VppTonemappingBrightness", + "type": "number" + }, + { + "name": "vppTonemappingContrast", + "baseName": "VppTonemappingContrast", + "type": "number" + }, + { + "name": "h264Crf", + "baseName": "H264Crf", + "type": "number" + }, + { + "name": "h265Crf", + "baseName": "H265Crf", + "type": "number" + }, + { + "name": "encoderPreset", + "baseName": "EncoderPreset", + "type": "string" + }, + { + "name": "deinterlaceDoubleRate", + "baseName": "DeinterlaceDoubleRate", + "type": "boolean" + }, + { + "name": "deinterlaceMethod", + "baseName": "DeinterlaceMethod", + "type": "string" + }, + { + "name": "enableDecodingColorDepth10Hevc", + "baseName": "EnableDecodingColorDepth10Hevc", + "type": "boolean" + }, + { + "name": "enableDecodingColorDepth10Vp9", + "baseName": "EnableDecodingColorDepth10Vp9", + "type": "boolean" + }, + { + "name": "enableEnhancedNvdecDecoder", + "baseName": "EnableEnhancedNvdecDecoder", + "type": "boolean" + }, + { + "name": "preferSystemNativeHwDecoder", + "baseName": "PreferSystemNativeHwDecoder", + "type": "boolean" + }, + { + "name": "enableIntelLowPowerH264HwEncoder", + "baseName": "EnableIntelLowPowerH264HwEncoder", + "type": "boolean" + }, + { + "name": "enableIntelLowPowerHevcHwEncoder", + "baseName": "EnableIntelLowPowerHevcHwEncoder", + "type": "boolean" + }, + { + "name": "enableHardwareEncoding", + "baseName": "EnableHardwareEncoding", + "type": "boolean" + }, + { + "name": "allowHevcEncoding", + "baseName": "AllowHevcEncoding", + "type": "boolean" + }, + { + "name": "enableSubtitleExtraction", + "baseName": "EnableSubtitleExtraction", + "type": "boolean" + }, + { + "name": "hardwareDecodingCodecs", + "baseName": "HardwareDecodingCodecs", + "type": "Array" + }, + { + "name": "allowOnDemandMetadataBasedKeyframeExtractionForExtensions", + "baseName": "AllowOnDemandMetadataBasedKeyframeExtractionForExtensions", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return EncodingOptions.attributeTypeMap; + } +} + diff --git a/jellyfin/model/endPointInfo.ts b/jellyfin/model/endPointInfo.ts new file mode 100644 index 0000000..f6f3e74 --- /dev/null +++ b/jellyfin/model/endPointInfo.ts @@ -0,0 +1,37 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class EndPointInfo { + 'isLocal'?: boolean; + 'isInNetwork'?: boolean; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "isLocal", + "baseName": "IsLocal", + "type": "boolean" + }, + { + "name": "isInNetwork", + "baseName": "IsInNetwork", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return EndPointInfo.attributeTypeMap; + } +} + diff --git a/jellyfin/model/externalIdInfo.ts b/jellyfin/model/externalIdInfo.ts new file mode 100644 index 0000000..1e35538 --- /dev/null +++ b/jellyfin/model/externalIdInfo.ts @@ -0,0 +1,64 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { ExternalIdMediaType } from './externalIdMediaType'; + +/** +* Represents the external id information for serialization to the client. +*/ +export class ExternalIdInfo { + /** + * Gets or sets the display name of the external id provider (IE: IMDB, MusicBrainz, etc). + */ + 'name'?: string; + /** + * Gets or sets the unique key for this id. This key should be unique across all providers. + */ + 'key'?: string; + 'type'?: ExternalIdMediaType | null; + /** + * Gets or sets the URL format string. + */ + 'urlFormatString'?: string | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "Name", + "type": "string" + }, + { + "name": "key", + "baseName": "Key", + "type": "string" + }, + { + "name": "type", + "baseName": "Type", + "type": "ExternalIdMediaType" + }, + { + "name": "urlFormatString", + "baseName": "UrlFormatString", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return ExternalIdInfo.attributeTypeMap; + } +} + +export namespace ExternalIdInfo { +} diff --git a/jellyfin/model/externalIdMediaType.ts b/jellyfin/model/externalIdMediaType.ts new file mode 100644 index 0000000..7c0cb03 --- /dev/null +++ b/jellyfin/model/externalIdMediaType.ts @@ -0,0 +1,31 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* The specific media type of an MediaBrowser.Model.Providers.ExternalIdInfo. +*/ +export enum ExternalIdMediaType { + Album = 'Album', + AlbumArtist = 'AlbumArtist', + Artist = 'Artist', + BoxSet = 'BoxSet', + Episode = 'Episode', + Movie = 'Movie', + OtherArtist = 'OtherArtist', + Person = 'Person', + ReleaseGroup = 'ReleaseGroup', + Season = 'Season', + Series = 'Series', + Track = 'Track' +} diff --git a/jellyfin/model/externalUrl.ts b/jellyfin/model/externalUrl.ts new file mode 100644 index 0000000..f057138 --- /dev/null +++ b/jellyfin/model/externalUrl.ts @@ -0,0 +1,43 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class ExternalUrl { + /** + * Gets or sets the name. + */ + 'name'?: string | null; + /** + * Gets or sets the type of the item. + */ + 'url'?: string | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "Name", + "type": "string" + }, + { + "name": "url", + "baseName": "Url", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return ExternalUrl.attributeTypeMap; + } +} + diff --git a/jellyfin/model/fFmpegLocation.ts b/jellyfin/model/fFmpegLocation.ts new file mode 100644 index 0000000..f28f73a --- /dev/null +++ b/jellyfin/model/fFmpegLocation.ts @@ -0,0 +1,23 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Enum describing the location of the FFmpeg tool. +*/ +export enum FFmpegLocation { + NotFound = 'NotFound', + SetByArgument = 'SetByArgument', + Custom = 'Custom', + System = 'System' +} diff --git a/jellyfin/model/fileSystemEntryInfo.ts b/jellyfin/model/fileSystemEntryInfo.ts new file mode 100644 index 0000000..049dff3 --- /dev/null +++ b/jellyfin/model/fileSystemEntryInfo.ts @@ -0,0 +1,55 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { FileSystemEntryType } from './fileSystemEntryType'; + +/** +* Class FileSystemEntryInfo. +*/ +export class FileSystemEntryInfo { + /** + * Gets the name. + */ + 'name'?: string; + /** + * Gets the path. + */ + 'path'?: string; + 'type'?: FileSystemEntryType; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "Name", + "type": "string" + }, + { + "name": "path", + "baseName": "Path", + "type": "string" + }, + { + "name": "type", + "baseName": "Type", + "type": "FileSystemEntryType" + } ]; + + static getAttributeTypeMap() { + return FileSystemEntryInfo.attributeTypeMap; + } +} + +export namespace FileSystemEntryInfo { +} diff --git a/jellyfin/model/fileSystemEntryType.ts b/jellyfin/model/fileSystemEntryType.ts new file mode 100644 index 0000000..ec7d6da --- /dev/null +++ b/jellyfin/model/fileSystemEntryType.ts @@ -0,0 +1,23 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Enum FileSystemEntryType. +*/ +export enum FileSystemEntryType { + File = 'File', + Directory = 'Directory', + NetworkComputer = 'NetworkComputer', + NetworkShare = 'NetworkShare' +} diff --git a/jellyfin/model/fontFile.ts b/jellyfin/model/fontFile.ts new file mode 100644 index 0000000..03fc476 --- /dev/null +++ b/jellyfin/model/fontFile.ts @@ -0,0 +1,64 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Class FontFile. +*/ +export class FontFile { + /** + * Gets or sets the name. + */ + 'name'?: string | null; + /** + * Gets or sets the size. + */ + 'size'?: number; + /** + * Gets or sets the date created. + */ + 'dateCreated'?: Date; + /** + * Gets or sets the date modified. + */ + 'dateModified'?: Date; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "Name", + "type": "string" + }, + { + "name": "size", + "baseName": "Size", + "type": "number" + }, + { + "name": "dateCreated", + "baseName": "DateCreated", + "type": "Date" + }, + { + "name": "dateModified", + "baseName": "DateModified", + "type": "Date" + } ]; + + static getAttributeTypeMap() { + return FontFile.attributeTypeMap; + } +} + diff --git a/jellyfin/model/forgotPasswordAction.ts b/jellyfin/model/forgotPasswordAction.ts new file mode 100644 index 0000000..1aadb1f --- /dev/null +++ b/jellyfin/model/forgotPasswordAction.ts @@ -0,0 +1,19 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export enum ForgotPasswordAction { + ContactAdmin = 'ContactAdmin', + PinCode = 'PinCode', + InNetworkRequired = 'InNetworkRequired' +} diff --git a/jellyfin/model/forgotPasswordDto.ts b/jellyfin/model/forgotPasswordDto.ts new file mode 100644 index 0000000..ba41be8 --- /dev/null +++ b/jellyfin/model/forgotPasswordDto.ts @@ -0,0 +1,37 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Forgot Password request body DTO. +*/ +export class ForgotPasswordDto { + /** + * Gets or sets the entered username to have its password reset. + */ + 'enteredUsername': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "enteredUsername", + "baseName": "EnteredUsername", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return ForgotPasswordDto.attributeTypeMap; + } +} + diff --git a/jellyfin/model/forgotPasswordPinDto.ts b/jellyfin/model/forgotPasswordPinDto.ts new file mode 100644 index 0000000..ddd5bc4 --- /dev/null +++ b/jellyfin/model/forgotPasswordPinDto.ts @@ -0,0 +1,37 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Forgot Password Pin enter request body DTO. +*/ +export class ForgotPasswordPinDto { + /** + * Gets or sets the entered pin to have the password reset. + */ + 'pin': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "pin", + "baseName": "Pin", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return ForgotPasswordPinDto.attributeTypeMap; + } +} + diff --git a/jellyfin/model/forgotPasswordPinRequest.ts b/jellyfin/model/forgotPasswordPinRequest.ts new file mode 100644 index 0000000..16d3c9b --- /dev/null +++ b/jellyfin/model/forgotPasswordPinRequest.ts @@ -0,0 +1,37 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Forgot Password Pin enter request body DTO. +*/ +export class ForgotPasswordPinRequest { + /** + * Gets or sets the entered pin to have the password reset. + */ + 'pin': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "pin", + "baseName": "Pin", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return ForgotPasswordPinRequest.attributeTypeMap; + } +} + diff --git a/jellyfin/model/forgotPasswordRequest.ts b/jellyfin/model/forgotPasswordRequest.ts new file mode 100644 index 0000000..30ed78d --- /dev/null +++ b/jellyfin/model/forgotPasswordRequest.ts @@ -0,0 +1,37 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Forgot Password request body DTO. +*/ +export class ForgotPasswordRequest { + /** + * Gets or sets the entered username to have its password reset. + */ + 'enteredUsername': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "enteredUsername", + "baseName": "EnteredUsername", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return ForgotPasswordRequest.attributeTypeMap; + } +} + diff --git a/jellyfin/model/forgotPasswordResult.ts b/jellyfin/model/forgotPasswordResult.ts new file mode 100644 index 0000000..23a7cce --- /dev/null +++ b/jellyfin/model/forgotPasswordResult.ts @@ -0,0 +1,52 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { ForgotPasswordAction } from './forgotPasswordAction'; + +export class ForgotPasswordResult { + 'action'?: ForgotPasswordAction; + /** + * Gets or sets the pin file. + */ + 'pinFile'?: string | null; + /** + * Gets or sets the pin expiration date. + */ + 'pinExpirationDate'?: Date | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "action", + "baseName": "Action", + "type": "ForgotPasswordAction" + }, + { + "name": "pinFile", + "baseName": "PinFile", + "type": "string" + }, + { + "name": "pinExpirationDate", + "baseName": "PinExpirationDate", + "type": "Date" + } ]; + + static getAttributeTypeMap() { + return ForgotPasswordResult.attributeTypeMap; + } +} + +export namespace ForgotPasswordResult { +} diff --git a/jellyfin/model/generalCommand.ts b/jellyfin/model/generalCommand.ts new file mode 100644 index 0000000..f6f9e66 --- /dev/null +++ b/jellyfin/model/generalCommand.ts @@ -0,0 +1,46 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { GeneralCommandType } from './generalCommandType'; + +export class GeneralCommand { + 'name'?: GeneralCommandType; + 'controllingUserId'?: string; + 'arguments'?: { [key: string]: string; }; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "Name", + "type": "GeneralCommandType" + }, + { + "name": "controllingUserId", + "baseName": "ControllingUserId", + "type": "string" + }, + { + "name": "arguments", + "baseName": "Arguments", + "type": "{ [key: string]: string; }" + } ]; + + static getAttributeTypeMap() { + return GeneralCommand.attributeTypeMap; + } +} + +export namespace GeneralCommand { +} diff --git a/jellyfin/model/generalCommandType.ts b/jellyfin/model/generalCommandType.ts new file mode 100644 index 0000000..b436c67 --- /dev/null +++ b/jellyfin/model/generalCommandType.ts @@ -0,0 +1,61 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* This exists simply to identify a set of known commands. +*/ +export enum GeneralCommandType { + MoveUp = 'MoveUp', + MoveDown = 'MoveDown', + MoveLeft = 'MoveLeft', + MoveRight = 'MoveRight', + PageUp = 'PageUp', + PageDown = 'PageDown', + PreviousLetter = 'PreviousLetter', + NextLetter = 'NextLetter', + ToggleOsd = 'ToggleOsd', + ToggleContextMenu = 'ToggleContextMenu', + Select = 'Select', + Back = 'Back', + TakeScreenshot = 'TakeScreenshot', + SendKey = 'SendKey', + SendString = 'SendString', + GoHome = 'GoHome', + GoToSettings = 'GoToSettings', + VolumeUp = 'VolumeUp', + VolumeDown = 'VolumeDown', + Mute = 'Mute', + Unmute = 'Unmute', + ToggleMute = 'ToggleMute', + SetVolume = 'SetVolume', + SetAudioStreamIndex = 'SetAudioStreamIndex', + SetSubtitleStreamIndex = 'SetSubtitleStreamIndex', + ToggleFullscreen = 'ToggleFullscreen', + DisplayContent = 'DisplayContent', + GoToSearch = 'GoToSearch', + DisplayMessage = 'DisplayMessage', + SetRepeatMode = 'SetRepeatMode', + ChannelUp = 'ChannelUp', + ChannelDown = 'ChannelDown', + Guide = 'Guide', + ToggleStats = 'ToggleStats', + PlayMediaSource = 'PlayMediaSource', + PlayTrailers = 'PlayTrailers', + SetShuffleQueue = 'SetShuffleQueue', + PlayState = 'PlayState', + PlayNext = 'PlayNext', + ToggleOsdMenu = 'ToggleOsdMenu', + Play = 'Play', + SetMaxStreamingBitrate = 'SetMaxStreamingBitrate' +} diff --git a/jellyfin/model/getBookRemoteSearchResultsRequest.ts b/jellyfin/model/getBookRemoteSearchResultsRequest.ts new file mode 100644 index 0000000..25ec698 --- /dev/null +++ b/jellyfin/model/getBookRemoteSearchResultsRequest.ts @@ -0,0 +1,56 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { BookInfo } from './bookInfo'; + +export class GetBookRemoteSearchResultsRequest { + 'searchInfo'?: BookInfo | null; + 'itemId'?: string; + /** + * Gets or sets the provider name to search within if set. + */ + 'searchProviderName'?: string | null; + /** + * Gets or sets a value indicating whether disabled providers should be included. + */ + 'includeDisabledProviders'?: boolean; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "searchInfo", + "baseName": "SearchInfo", + "type": "BookInfo" + }, + { + "name": "itemId", + "baseName": "ItemId", + "type": "string" + }, + { + "name": "searchProviderName", + "baseName": "SearchProviderName", + "type": "string" + }, + { + "name": "includeDisabledProviders", + "baseName": "IncludeDisabledProviders", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return GetBookRemoteSearchResultsRequest.attributeTypeMap; + } +} + diff --git a/jellyfin/model/getBoxSetRemoteSearchResultsRequest.ts b/jellyfin/model/getBoxSetRemoteSearchResultsRequest.ts new file mode 100644 index 0000000..23370a7 --- /dev/null +++ b/jellyfin/model/getBoxSetRemoteSearchResultsRequest.ts @@ -0,0 +1,56 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { BoxSetInfo } from './boxSetInfo'; + +export class GetBoxSetRemoteSearchResultsRequest { + 'searchInfo'?: BoxSetInfo | null; + 'itemId'?: string; + /** + * Gets or sets the provider name to search within if set. + */ + 'searchProviderName'?: string | null; + /** + * Gets or sets a value indicating whether disabled providers should be included. + */ + 'includeDisabledProviders'?: boolean; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "searchInfo", + "baseName": "SearchInfo", + "type": "BoxSetInfo" + }, + { + "name": "itemId", + "baseName": "ItemId", + "type": "string" + }, + { + "name": "searchProviderName", + "baseName": "SearchProviderName", + "type": "string" + }, + { + "name": "includeDisabledProviders", + "baseName": "IncludeDisabledProviders", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return GetBoxSetRemoteSearchResultsRequest.attributeTypeMap; + } +} + diff --git a/jellyfin/model/getMovieRemoteSearchResultsRequest.ts b/jellyfin/model/getMovieRemoteSearchResultsRequest.ts new file mode 100644 index 0000000..0ac6cc7 --- /dev/null +++ b/jellyfin/model/getMovieRemoteSearchResultsRequest.ts @@ -0,0 +1,56 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { MovieInfo } from './movieInfo'; + +export class GetMovieRemoteSearchResultsRequest { + 'searchInfo'?: MovieInfo | null; + 'itemId'?: string; + /** + * Gets or sets the provider name to search within if set. + */ + 'searchProviderName'?: string | null; + /** + * Gets or sets a value indicating whether disabled providers should be included. + */ + 'includeDisabledProviders'?: boolean; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "searchInfo", + "baseName": "SearchInfo", + "type": "MovieInfo" + }, + { + "name": "itemId", + "baseName": "ItemId", + "type": "string" + }, + { + "name": "searchProviderName", + "baseName": "SearchProviderName", + "type": "string" + }, + { + "name": "includeDisabledProviders", + "baseName": "IncludeDisabledProviders", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return GetMovieRemoteSearchResultsRequest.attributeTypeMap; + } +} + diff --git a/jellyfin/model/getMusicAlbumRemoteSearchResultsRequest.ts b/jellyfin/model/getMusicAlbumRemoteSearchResultsRequest.ts new file mode 100644 index 0000000..91bcc7f --- /dev/null +++ b/jellyfin/model/getMusicAlbumRemoteSearchResultsRequest.ts @@ -0,0 +1,56 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { AlbumInfo } from './albumInfo'; + +export class GetMusicAlbumRemoteSearchResultsRequest { + 'searchInfo'?: AlbumInfo | null; + 'itemId'?: string; + /** + * Gets or sets the provider name to search within if set. + */ + 'searchProviderName'?: string | null; + /** + * Gets or sets a value indicating whether disabled providers should be included. + */ + 'includeDisabledProviders'?: boolean; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "searchInfo", + "baseName": "SearchInfo", + "type": "AlbumInfo" + }, + { + "name": "itemId", + "baseName": "ItemId", + "type": "string" + }, + { + "name": "searchProviderName", + "baseName": "SearchProviderName", + "type": "string" + }, + { + "name": "includeDisabledProviders", + "baseName": "IncludeDisabledProviders", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return GetMusicAlbumRemoteSearchResultsRequest.attributeTypeMap; + } +} + diff --git a/jellyfin/model/getMusicArtistRemoteSearchResultsRequest.ts b/jellyfin/model/getMusicArtistRemoteSearchResultsRequest.ts new file mode 100644 index 0000000..8af88cb --- /dev/null +++ b/jellyfin/model/getMusicArtistRemoteSearchResultsRequest.ts @@ -0,0 +1,56 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { ArtistInfo } from './artistInfo'; + +export class GetMusicArtistRemoteSearchResultsRequest { + 'searchInfo'?: ArtistInfo | null; + 'itemId'?: string; + /** + * Gets or sets the provider name to search within if set. + */ + 'searchProviderName'?: string | null; + /** + * Gets or sets a value indicating whether disabled providers should be included. + */ + 'includeDisabledProviders'?: boolean; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "searchInfo", + "baseName": "SearchInfo", + "type": "ArtistInfo" + }, + { + "name": "itemId", + "baseName": "ItemId", + "type": "string" + }, + { + "name": "searchProviderName", + "baseName": "SearchProviderName", + "type": "string" + }, + { + "name": "includeDisabledProviders", + "baseName": "IncludeDisabledProviders", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return GetMusicArtistRemoteSearchResultsRequest.attributeTypeMap; + } +} + diff --git a/jellyfin/model/getMusicVideoRemoteSearchResultsRequest.ts b/jellyfin/model/getMusicVideoRemoteSearchResultsRequest.ts new file mode 100644 index 0000000..593a135 --- /dev/null +++ b/jellyfin/model/getMusicVideoRemoteSearchResultsRequest.ts @@ -0,0 +1,56 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { MusicVideoInfo } from './musicVideoInfo'; + +export class GetMusicVideoRemoteSearchResultsRequest { + 'searchInfo'?: MusicVideoInfo | null; + 'itemId'?: string; + /** + * Gets or sets the provider name to search within if set. + */ + 'searchProviderName'?: string | null; + /** + * Gets or sets a value indicating whether disabled providers should be included. + */ + 'includeDisabledProviders'?: boolean; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "searchInfo", + "baseName": "SearchInfo", + "type": "MusicVideoInfo" + }, + { + "name": "itemId", + "baseName": "ItemId", + "type": "string" + }, + { + "name": "searchProviderName", + "baseName": "SearchProviderName", + "type": "string" + }, + { + "name": "includeDisabledProviders", + "baseName": "IncludeDisabledProviders", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return GetMusicVideoRemoteSearchResultsRequest.attributeTypeMap; + } +} + diff --git a/jellyfin/model/getPersonRemoteSearchResultsRequest.ts b/jellyfin/model/getPersonRemoteSearchResultsRequest.ts new file mode 100644 index 0000000..66f33e6 --- /dev/null +++ b/jellyfin/model/getPersonRemoteSearchResultsRequest.ts @@ -0,0 +1,56 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { PersonLookupInfo } from './personLookupInfo'; + +export class GetPersonRemoteSearchResultsRequest { + 'searchInfo'?: PersonLookupInfo | null; + 'itemId'?: string; + /** + * Gets or sets the provider name to search within if set. + */ + 'searchProviderName'?: string | null; + /** + * Gets or sets a value indicating whether disabled providers should be included. + */ + 'includeDisabledProviders'?: boolean; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "searchInfo", + "baseName": "SearchInfo", + "type": "PersonLookupInfo" + }, + { + "name": "itemId", + "baseName": "ItemId", + "type": "string" + }, + { + "name": "searchProviderName", + "baseName": "SearchProviderName", + "type": "string" + }, + { + "name": "includeDisabledProviders", + "baseName": "IncludeDisabledProviders", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return GetPersonRemoteSearchResultsRequest.attributeTypeMap; + } +} + diff --git a/jellyfin/model/getPostedPlaybackInfoRequest.ts b/jellyfin/model/getPostedPlaybackInfoRequest.ts new file mode 100644 index 0000000..d4886ed --- /dev/null +++ b/jellyfin/model/getPostedPlaybackInfoRequest.ts @@ -0,0 +1,161 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { ClientCapabilitiesDtoDeviceProfile } from './clientCapabilitiesDtoDeviceProfile'; + +/** +* Plabyback info dto. +*/ +export class GetPostedPlaybackInfoRequest { + /** + * Gets or sets the playback userId. + */ + 'userId'?: string | null; + /** + * Gets or sets the max streaming bitrate. + */ + 'maxStreamingBitrate'?: number | null; + /** + * Gets or sets the start time in ticks. + */ + 'startTimeTicks'?: number | null; + /** + * Gets or sets the audio stream index. + */ + 'audioStreamIndex'?: number | null; + /** + * Gets or sets the subtitle stream index. + */ + 'subtitleStreamIndex'?: number | null; + /** + * Gets or sets the max audio channels. + */ + 'maxAudioChannels'?: number | null; + /** + * Gets or sets the media source id. + */ + 'mediaSourceId'?: string | null; + /** + * Gets or sets the live stream id. + */ + 'liveStreamId'?: string | null; + 'deviceProfile'?: ClientCapabilitiesDtoDeviceProfile | null; + /** + * Gets or sets a value indicating whether to enable direct play. + */ + 'enableDirectPlay'?: boolean | null; + /** + * Gets or sets a value indicating whether to enable direct stream. + */ + 'enableDirectStream'?: boolean | null; + /** + * Gets or sets a value indicating whether to enable transcoding. + */ + 'enableTranscoding'?: boolean | null; + /** + * Gets or sets a value indicating whether to enable video stream copy. + */ + 'allowVideoStreamCopy'?: boolean | null; + /** + * Gets or sets a value indicating whether to allow audio stream copy. + */ + 'allowAudioStreamCopy'?: boolean | null; + /** + * Gets or sets a value indicating whether to auto open the live stream. + */ + 'autoOpenLiveStream'?: boolean | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "userId", + "baseName": "UserId", + "type": "string" + }, + { + "name": "maxStreamingBitrate", + "baseName": "MaxStreamingBitrate", + "type": "number" + }, + { + "name": "startTimeTicks", + "baseName": "StartTimeTicks", + "type": "number" + }, + { + "name": "audioStreamIndex", + "baseName": "AudioStreamIndex", + "type": "number" + }, + { + "name": "subtitleStreamIndex", + "baseName": "SubtitleStreamIndex", + "type": "number" + }, + { + "name": "maxAudioChannels", + "baseName": "MaxAudioChannels", + "type": "number" + }, + { + "name": "mediaSourceId", + "baseName": "MediaSourceId", + "type": "string" + }, + { + "name": "liveStreamId", + "baseName": "LiveStreamId", + "type": "string" + }, + { + "name": "deviceProfile", + "baseName": "DeviceProfile", + "type": "ClientCapabilitiesDtoDeviceProfile" + }, + { + "name": "enableDirectPlay", + "baseName": "EnableDirectPlay", + "type": "boolean" + }, + { + "name": "enableDirectStream", + "baseName": "EnableDirectStream", + "type": "boolean" + }, + { + "name": "enableTranscoding", + "baseName": "EnableTranscoding", + "type": "boolean" + }, + { + "name": "allowVideoStreamCopy", + "baseName": "AllowVideoStreamCopy", + "type": "boolean" + }, + { + "name": "allowAudioStreamCopy", + "baseName": "AllowAudioStreamCopy", + "type": "boolean" + }, + { + "name": "autoOpenLiveStream", + "baseName": "AutoOpenLiveStream", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return GetPostedPlaybackInfoRequest.attributeTypeMap; + } +} + diff --git a/jellyfin/model/getProgramsDto.ts b/jellyfin/model/getProgramsDto.ts new file mode 100644 index 0000000..e3883c0 --- /dev/null +++ b/jellyfin/model/getProgramsDto.ts @@ -0,0 +1,274 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { ImageType } from './imageType'; +import { ItemFields } from './itemFields'; +import { SortOrder } from './sortOrder'; + +/** +* Get programs dto. +*/ +export class GetProgramsDto { + /** + * Gets or sets the channels to return guide information for. + */ + 'channelIds'?: Array; + /** + * Gets or sets optional. Filter by user id. + */ + 'userId'?: string; + /** + * Gets or sets the minimum premiere start date. Optional. + */ + 'minStartDate'?: Date | null; + /** + * Gets or sets filter by programs that have completed airing, or not. Optional. + */ + 'hasAired'?: boolean | null; + /** + * Gets or sets filter by programs that are currently airing, or not. Optional. + */ + 'isAiring'?: boolean | null; + /** + * Gets or sets the maximum premiere start date. Optional. + */ + 'maxStartDate'?: Date | null; + /** + * Gets or sets the minimum premiere end date. Optional. + */ + 'minEndDate'?: Date | null; + /** + * Gets or sets the maximum premiere end date. Optional. + */ + 'maxEndDate'?: Date | null; + /** + * Gets or sets filter for movies. Optional. + */ + 'isMovie'?: boolean | null; + /** + * Gets or sets filter for series. Optional. + */ + 'isSeries'?: boolean | null; + /** + * Gets or sets filter for news. Optional. + */ + 'isNews'?: boolean | null; + /** + * Gets or sets filter for kids. Optional. + */ + 'isKids'?: boolean | null; + /** + * Gets or sets filter for sports. Optional. + */ + 'isSports'?: boolean | null; + /** + * Gets or sets the record index to start at. All items with a lower index will be dropped from the results. Optional. + */ + 'startIndex'?: number | null; + /** + * Gets or sets the maximum number of records to return. Optional. + */ + 'limit'?: number | null; + /** + * Gets or sets specify one or more sort orders, comma delimited. Options: Name, StartDate. Optional. + */ + 'sortBy'?: Array; + /** + * Gets or sets sort Order - Ascending,Descending. + */ + 'sortOrder'?: Array; + /** + * Gets or sets the genres to return guide information for. + */ + 'genres'?: Array; + /** + * Gets or sets the genre ids to return guide information for. + */ + 'genreIds'?: Array; + /** + * Gets or sets include image information in output. Optional. + */ + 'enableImages'?: boolean | null; + /** + * Gets or sets a value indicating whether retrieve total record count. + */ + 'enableTotalRecordCount'?: boolean; + /** + * Gets or sets the max number of images to return, per image type. Optional. + */ + 'imageTypeLimit'?: number | null; + /** + * Gets or sets the image types to include in the output. Optional. + */ + 'enableImageTypes'?: Array; + /** + * Gets or sets include user data. Optional. + */ + 'enableUserData'?: boolean | null; + /** + * Gets or sets filter by series timer id. Optional. + */ + 'seriesTimerId'?: string | null; + /** + * Gets or sets filter by library series id. Optional. + */ + 'librarySeriesId'?: string; + /** + * Gets or sets specify additional fields of information to return in the output. This allows multiple, comma delimited. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines. Optional. + */ + 'fields'?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "channelIds", + "baseName": "ChannelIds", + "type": "Array" + }, + { + "name": "userId", + "baseName": "UserId", + "type": "string" + }, + { + "name": "minStartDate", + "baseName": "MinStartDate", + "type": "Date" + }, + { + "name": "hasAired", + "baseName": "HasAired", + "type": "boolean" + }, + { + "name": "isAiring", + "baseName": "IsAiring", + "type": "boolean" + }, + { + "name": "maxStartDate", + "baseName": "MaxStartDate", + "type": "Date" + }, + { + "name": "minEndDate", + "baseName": "MinEndDate", + "type": "Date" + }, + { + "name": "maxEndDate", + "baseName": "MaxEndDate", + "type": "Date" + }, + { + "name": "isMovie", + "baseName": "IsMovie", + "type": "boolean" + }, + { + "name": "isSeries", + "baseName": "IsSeries", + "type": "boolean" + }, + { + "name": "isNews", + "baseName": "IsNews", + "type": "boolean" + }, + { + "name": "isKids", + "baseName": "IsKids", + "type": "boolean" + }, + { + "name": "isSports", + "baseName": "IsSports", + "type": "boolean" + }, + { + "name": "startIndex", + "baseName": "StartIndex", + "type": "number" + }, + { + "name": "limit", + "baseName": "Limit", + "type": "number" + }, + { + "name": "sortBy", + "baseName": "SortBy", + "type": "Array" + }, + { + "name": "sortOrder", + "baseName": "SortOrder", + "type": "Array" + }, + { + "name": "genres", + "baseName": "Genres", + "type": "Array" + }, + { + "name": "genreIds", + "baseName": "GenreIds", + "type": "Array" + }, + { + "name": "enableImages", + "baseName": "EnableImages", + "type": "boolean" + }, + { + "name": "enableTotalRecordCount", + "baseName": "EnableTotalRecordCount", + "type": "boolean" + }, + { + "name": "imageTypeLimit", + "baseName": "ImageTypeLimit", + "type": "number" + }, + { + "name": "enableImageTypes", + "baseName": "EnableImageTypes", + "type": "Array" + }, + { + "name": "enableUserData", + "baseName": "EnableUserData", + "type": "boolean" + }, + { + "name": "seriesTimerId", + "baseName": "SeriesTimerId", + "type": "string" + }, + { + "name": "librarySeriesId", + "baseName": "LibrarySeriesId", + "type": "string" + }, + { + "name": "fields", + "baseName": "Fields", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return GetProgramsDto.attributeTypeMap; + } +} + diff --git a/jellyfin/model/getProgramsRequest.ts b/jellyfin/model/getProgramsRequest.ts new file mode 100644 index 0000000..ad03c64 --- /dev/null +++ b/jellyfin/model/getProgramsRequest.ts @@ -0,0 +1,274 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { ImageType } from './imageType'; +import { ItemFields } from './itemFields'; +import { SortOrder } from './sortOrder'; + +/** +* Get programs dto. +*/ +export class GetProgramsRequest { + /** + * Gets or sets the channels to return guide information for. + */ + 'channelIds'?: Array; + /** + * Gets or sets optional. Filter by user id. + */ + 'userId'?: string; + /** + * Gets or sets the minimum premiere start date. Optional. + */ + 'minStartDate'?: Date | null; + /** + * Gets or sets filter by programs that have completed airing, or not. Optional. + */ + 'hasAired'?: boolean | null; + /** + * Gets or sets filter by programs that are currently airing, or not. Optional. + */ + 'isAiring'?: boolean | null; + /** + * Gets or sets the maximum premiere start date. Optional. + */ + 'maxStartDate'?: Date | null; + /** + * Gets or sets the minimum premiere end date. Optional. + */ + 'minEndDate'?: Date | null; + /** + * Gets or sets the maximum premiere end date. Optional. + */ + 'maxEndDate'?: Date | null; + /** + * Gets or sets filter for movies. Optional. + */ + 'isMovie'?: boolean | null; + /** + * Gets or sets filter for series. Optional. + */ + 'isSeries'?: boolean | null; + /** + * Gets or sets filter for news. Optional. + */ + 'isNews'?: boolean | null; + /** + * Gets or sets filter for kids. Optional. + */ + 'isKids'?: boolean | null; + /** + * Gets or sets filter for sports. Optional. + */ + 'isSports'?: boolean | null; + /** + * Gets or sets the record index to start at. All items with a lower index will be dropped from the results. Optional. + */ + 'startIndex'?: number | null; + /** + * Gets or sets the maximum number of records to return. Optional. + */ + 'limit'?: number | null; + /** + * Gets or sets specify one or more sort orders, comma delimited. Options: Name, StartDate. Optional. + */ + 'sortBy'?: Array; + /** + * Gets or sets sort Order - Ascending,Descending. + */ + 'sortOrder'?: Array; + /** + * Gets or sets the genres to return guide information for. + */ + 'genres'?: Array; + /** + * Gets or sets the genre ids to return guide information for. + */ + 'genreIds'?: Array; + /** + * Gets or sets include image information in output. Optional. + */ + 'enableImages'?: boolean | null; + /** + * Gets or sets a value indicating whether retrieve total record count. + */ + 'enableTotalRecordCount'?: boolean; + /** + * Gets or sets the max number of images to return, per image type. Optional. + */ + 'imageTypeLimit'?: number | null; + /** + * Gets or sets the image types to include in the output. Optional. + */ + 'enableImageTypes'?: Array; + /** + * Gets or sets include user data. Optional. + */ + 'enableUserData'?: boolean | null; + /** + * Gets or sets filter by series timer id. Optional. + */ + 'seriesTimerId'?: string | null; + /** + * Gets or sets filter by library series id. Optional. + */ + 'librarySeriesId'?: string; + /** + * Gets or sets specify additional fields of information to return in the output. This allows multiple, comma delimited. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines. Optional. + */ + 'fields'?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "channelIds", + "baseName": "ChannelIds", + "type": "Array" + }, + { + "name": "userId", + "baseName": "UserId", + "type": "string" + }, + { + "name": "minStartDate", + "baseName": "MinStartDate", + "type": "Date" + }, + { + "name": "hasAired", + "baseName": "HasAired", + "type": "boolean" + }, + { + "name": "isAiring", + "baseName": "IsAiring", + "type": "boolean" + }, + { + "name": "maxStartDate", + "baseName": "MaxStartDate", + "type": "Date" + }, + { + "name": "minEndDate", + "baseName": "MinEndDate", + "type": "Date" + }, + { + "name": "maxEndDate", + "baseName": "MaxEndDate", + "type": "Date" + }, + { + "name": "isMovie", + "baseName": "IsMovie", + "type": "boolean" + }, + { + "name": "isSeries", + "baseName": "IsSeries", + "type": "boolean" + }, + { + "name": "isNews", + "baseName": "IsNews", + "type": "boolean" + }, + { + "name": "isKids", + "baseName": "IsKids", + "type": "boolean" + }, + { + "name": "isSports", + "baseName": "IsSports", + "type": "boolean" + }, + { + "name": "startIndex", + "baseName": "StartIndex", + "type": "number" + }, + { + "name": "limit", + "baseName": "Limit", + "type": "number" + }, + { + "name": "sortBy", + "baseName": "SortBy", + "type": "Array" + }, + { + "name": "sortOrder", + "baseName": "SortOrder", + "type": "Array" + }, + { + "name": "genres", + "baseName": "Genres", + "type": "Array" + }, + { + "name": "genreIds", + "baseName": "GenreIds", + "type": "Array" + }, + { + "name": "enableImages", + "baseName": "EnableImages", + "type": "boolean" + }, + { + "name": "enableTotalRecordCount", + "baseName": "EnableTotalRecordCount", + "type": "boolean" + }, + { + "name": "imageTypeLimit", + "baseName": "ImageTypeLimit", + "type": "number" + }, + { + "name": "enableImageTypes", + "baseName": "EnableImageTypes", + "type": "Array" + }, + { + "name": "enableUserData", + "baseName": "EnableUserData", + "type": "boolean" + }, + { + "name": "seriesTimerId", + "baseName": "SeriesTimerId", + "type": "string" + }, + { + "name": "librarySeriesId", + "baseName": "LibrarySeriesId", + "type": "string" + }, + { + "name": "fields", + "baseName": "Fields", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return GetProgramsRequest.attributeTypeMap; + } +} + diff --git a/jellyfin/model/getSeriesRemoteSearchResultsRequest.ts b/jellyfin/model/getSeriesRemoteSearchResultsRequest.ts new file mode 100644 index 0000000..51d1a41 --- /dev/null +++ b/jellyfin/model/getSeriesRemoteSearchResultsRequest.ts @@ -0,0 +1,56 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { SeriesInfo } from './seriesInfo'; + +export class GetSeriesRemoteSearchResultsRequest { + 'searchInfo'?: SeriesInfo | null; + 'itemId'?: string; + /** + * Gets or sets the provider name to search within if set. + */ + 'searchProviderName'?: string | null; + /** + * Gets or sets a value indicating whether disabled providers should be included. + */ + 'includeDisabledProviders'?: boolean; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "searchInfo", + "baseName": "SearchInfo", + "type": "SeriesInfo" + }, + { + "name": "itemId", + "baseName": "ItemId", + "type": "string" + }, + { + "name": "searchProviderName", + "baseName": "SearchProviderName", + "type": "string" + }, + { + "name": "includeDisabledProviders", + "baseName": "IncludeDisabledProviders", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return GetSeriesRemoteSearchResultsRequest.attributeTypeMap; + } +} + diff --git a/jellyfin/model/getTrailerRemoteSearchResultsRequest.ts b/jellyfin/model/getTrailerRemoteSearchResultsRequest.ts new file mode 100644 index 0000000..c110bbc --- /dev/null +++ b/jellyfin/model/getTrailerRemoteSearchResultsRequest.ts @@ -0,0 +1,56 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { TrailerInfo } from './trailerInfo'; + +export class GetTrailerRemoteSearchResultsRequest { + 'searchInfo'?: TrailerInfo | null; + 'itemId'?: string; + /** + * Gets or sets the provider name to search within if set. + */ + 'searchProviderName'?: string | null; + /** + * Gets or sets a value indicating whether disabled providers should be included. + */ + 'includeDisabledProviders'?: boolean; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "searchInfo", + "baseName": "SearchInfo", + "type": "TrailerInfo" + }, + { + "name": "itemId", + "baseName": "ItemId", + "type": "string" + }, + { + "name": "searchProviderName", + "baseName": "SearchProviderName", + "type": "string" + }, + { + "name": "includeDisabledProviders", + "baseName": "IncludeDisabledProviders", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return GetTrailerRemoteSearchResultsRequest.attributeTypeMap; + } +} + diff --git a/jellyfin/model/groupInfoDto.ts b/jellyfin/model/groupInfoDto.ts new file mode 100644 index 0000000..009d913 --- /dev/null +++ b/jellyfin/model/groupInfoDto.ts @@ -0,0 +1,73 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { GroupStateType } from './groupStateType'; + +/** +* Class GroupInfoDto. +*/ +export class GroupInfoDto { + /** + * Gets the group identifier. + */ + 'groupId'?: string; + /** + * Gets the group name. + */ + 'groupName'?: string; + 'state'?: GroupStateType; + /** + * Gets the participants. + */ + 'participants'?: Array; + /** + * Gets the date when this DTO has been created. + */ + 'lastUpdatedAt'?: Date; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "groupId", + "baseName": "GroupId", + "type": "string" + }, + { + "name": "groupName", + "baseName": "GroupName", + "type": "string" + }, + { + "name": "state", + "baseName": "State", + "type": "GroupStateType" + }, + { + "name": "participants", + "baseName": "Participants", + "type": "Array" + }, + { + "name": "lastUpdatedAt", + "baseName": "LastUpdatedAt", + "type": "Date" + } ]; + + static getAttributeTypeMap() { + return GroupInfoDto.attributeTypeMap; + } +} + +export namespace GroupInfoDto { +} diff --git a/jellyfin/model/groupQueueMode.ts b/jellyfin/model/groupQueueMode.ts new file mode 100644 index 0000000..7938ca4 --- /dev/null +++ b/jellyfin/model/groupQueueMode.ts @@ -0,0 +1,21 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Enum GroupQueueMode. +*/ +export enum GroupQueueMode { + Queue = 'Queue', + QueueNext = 'QueueNext' +} diff --git a/jellyfin/model/groupRepeatMode.ts b/jellyfin/model/groupRepeatMode.ts new file mode 100644 index 0000000..6e8bb96 --- /dev/null +++ b/jellyfin/model/groupRepeatMode.ts @@ -0,0 +1,22 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Enum GroupRepeatMode. +*/ +export enum GroupRepeatMode { + RepeatOne = 'RepeatOne', + RepeatAll = 'RepeatAll', + RepeatNone = 'RepeatNone' +} diff --git a/jellyfin/model/groupShuffleMode.ts b/jellyfin/model/groupShuffleMode.ts new file mode 100644 index 0000000..36a3e6d --- /dev/null +++ b/jellyfin/model/groupShuffleMode.ts @@ -0,0 +1,21 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Enum GroupShuffleMode. +*/ +export enum GroupShuffleMode { + Sorted = 'Sorted', + Shuffle = 'Shuffle' +} diff --git a/jellyfin/model/groupStateType.ts b/jellyfin/model/groupStateType.ts new file mode 100644 index 0000000..ea75321 --- /dev/null +++ b/jellyfin/model/groupStateType.ts @@ -0,0 +1,23 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Enum GroupState. +*/ +export enum GroupStateType { + Idle = 'Idle', + Waiting = 'Waiting', + Paused = 'Paused', + Playing = 'Playing' +} diff --git a/jellyfin/model/groupUpdateType.ts b/jellyfin/model/groupUpdateType.ts new file mode 100644 index 0000000..160b625 --- /dev/null +++ b/jellyfin/model/groupUpdateType.ts @@ -0,0 +1,30 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Enum GroupUpdateType. +*/ +export enum GroupUpdateType { + UserJoined = 'UserJoined', + UserLeft = 'UserLeft', + GroupJoined = 'GroupJoined', + GroupLeft = 'GroupLeft', + StateUpdate = 'StateUpdate', + PlayQueue = 'PlayQueue', + NotInGroup = 'NotInGroup', + GroupDoesNotExist = 'GroupDoesNotExist', + CreateGroupDenied = 'CreateGroupDenied', + JoinGroupDenied = 'JoinGroupDenied', + LibraryAccessDenied = 'LibraryAccessDenied' +} diff --git a/jellyfin/model/guideInfo.ts b/jellyfin/model/guideInfo.ts new file mode 100644 index 0000000..63ef9f3 --- /dev/null +++ b/jellyfin/model/guideInfo.ts @@ -0,0 +1,43 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class GuideInfo { + /** + * Gets or sets the start date. + */ + 'startDate'?: Date; + /** + * Gets or sets the end date. + */ + 'endDate'?: Date; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "startDate", + "baseName": "StartDate", + "type": "Date" + }, + { + "name": "endDate", + "baseName": "EndDate", + "type": "Date" + } ]; + + static getAttributeTypeMap() { + return GuideInfo.attributeTypeMap; + } +} + diff --git a/jellyfin/model/hardwareEncodingType.ts b/jellyfin/model/hardwareEncodingType.ts new file mode 100644 index 0000000..32c03e8 --- /dev/null +++ b/jellyfin/model/hardwareEncodingType.ts @@ -0,0 +1,25 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Enum HardwareEncodingType. +*/ +export enum HardwareEncodingType { + Amf = 'AMF', + Qsv = 'QSV', + Nvenc = 'NVENC', + V4L2M2M = 'V4L2M2M', + Vaapi = 'VAAPI', + VideoToolBox = 'VideoToolBox' +} diff --git a/jellyfin/model/headerMatchType.ts b/jellyfin/model/headerMatchType.ts new file mode 100644 index 0000000..71ebfaa --- /dev/null +++ b/jellyfin/model/headerMatchType.ts @@ -0,0 +1,19 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export enum HeaderMatchType { + Equals = 'Equals', + Regex = 'Regex', + Substring = 'Substring' +} diff --git a/jellyfin/model/httpHeaderInfo.ts b/jellyfin/model/httpHeaderInfo.ts new file mode 100644 index 0000000..68e9ee1 --- /dev/null +++ b/jellyfin/model/httpHeaderInfo.ts @@ -0,0 +1,46 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { HeaderMatchType } from './headerMatchType'; + +export class HttpHeaderInfo { + 'name'?: string | null; + 'value'?: string | null; + 'match'?: HeaderMatchType; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "Name", + "type": "string" + }, + { + "name": "value", + "baseName": "Value", + "type": "string" + }, + { + "name": "match", + "baseName": "Match", + "type": "HeaderMatchType" + } ]; + + static getAttributeTypeMap() { + return HttpHeaderInfo.attributeTypeMap; + } +} + +export namespace HttpHeaderInfo { +} diff --git a/jellyfin/model/iPlugin.ts b/jellyfin/model/iPlugin.ts new file mode 100644 index 0000000..77c6c81 --- /dev/null +++ b/jellyfin/model/iPlugin.ts @@ -0,0 +1,91 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Defines the MediaBrowser.Common.Plugins.IPlugin. +*/ +export class IPlugin { + /** + * Gets the name of the plugin. + */ + 'name'?: string | null; + /** + * Gets the Description. + */ + 'description'?: string | null; + /** + * Gets the unique id. + */ + 'id'?: string; + /** + * Gets the plugin version. + */ + 'version'?: string | null; + /** + * Gets the path to the assembly file. + */ + 'assemblyFilePath'?: string | null; + /** + * Gets a value indicating whether the plugin can be uninstalled. + */ + 'canUninstall'?: boolean; + /** + * Gets the full path to the data folder, where the plugin can store any miscellaneous files needed. + */ + 'dataFolderPath'?: string | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "Name", + "type": "string" + }, + { + "name": "description", + "baseName": "Description", + "type": "string" + }, + { + "name": "id", + "baseName": "Id", + "type": "string" + }, + { + "name": "version", + "baseName": "Version", + "type": "string" + }, + { + "name": "assemblyFilePath", + "baseName": "AssemblyFilePath", + "type": "string" + }, + { + "name": "canUninstall", + "baseName": "CanUninstall", + "type": "boolean" + }, + { + "name": "dataFolderPath", + "baseName": "DataFolderPath", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return IPlugin.attributeTypeMap; + } +} + diff --git a/jellyfin/model/ignoreWaitRequestDto.ts b/jellyfin/model/ignoreWaitRequestDto.ts new file mode 100644 index 0000000..5c679d6 --- /dev/null +++ b/jellyfin/model/ignoreWaitRequestDto.ts @@ -0,0 +1,37 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Class IgnoreWaitRequestDto. +*/ +export class IgnoreWaitRequestDto { + /** + * Gets or sets a value indicating whether the client should be ignored. + */ + 'ignoreWait'?: boolean; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "ignoreWait", + "baseName": "IgnoreWait", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return IgnoreWaitRequestDto.attributeTypeMap; + } +} + diff --git a/jellyfin/model/imageByNameInfo.ts b/jellyfin/model/imageByNameInfo.ts new file mode 100644 index 0000000..4c7d04d --- /dev/null +++ b/jellyfin/model/imageByNameInfo.ts @@ -0,0 +1,70 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class ImageByNameInfo { + /** + * Gets or sets the name. + */ + 'name'?: string | null; + /** + * Gets or sets the theme. + */ + 'theme'?: string | null; + /** + * Gets or sets the context. + */ + 'context'?: string | null; + /** + * Gets or sets the length of the file. + */ + 'fileLength'?: number; + /** + * Gets or sets the format. + */ + 'format'?: string | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "Name", + "type": "string" + }, + { + "name": "theme", + "baseName": "Theme", + "type": "string" + }, + { + "name": "context", + "baseName": "Context", + "type": "string" + }, + { + "name": "fileLength", + "baseName": "FileLength", + "type": "number" + }, + { + "name": "format", + "baseName": "Format", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return ImageByNameInfo.attributeTypeMap; + } +} + diff --git a/jellyfin/model/imageFormat.ts b/jellyfin/model/imageFormat.ts new file mode 100644 index 0000000..5f720fa --- /dev/null +++ b/jellyfin/model/imageFormat.ts @@ -0,0 +1,24 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Enum ImageOutputFormat. +*/ +export enum ImageFormat { + Bmp = 'Bmp', + Gif = 'Gif', + Jpg = 'Jpg', + Png = 'Png', + Webp = 'Webp' +} diff --git a/jellyfin/model/imageInfo.ts b/jellyfin/model/imageInfo.ts new file mode 100644 index 0000000..e0a7a44 --- /dev/null +++ b/jellyfin/model/imageInfo.ts @@ -0,0 +1,100 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { ImageType } from './imageType'; + +/** +* Class ImageInfo. +*/ +export class ImageInfo { + 'imageType'?: ImageType; + /** + * Gets or sets the index of the image. + */ + 'imageIndex'?: number | null; + /** + * Gets or sets the image tag. + */ + 'imageTag'?: string | null; + /** + * Gets or sets the path. + */ + 'path'?: string | null; + /** + * Gets or sets the blurhash. + */ + 'blurHash'?: string | null; + /** + * Gets or sets the height. + */ + 'height'?: number | null; + /** + * Gets or sets the width. + */ + 'width'?: number | null; + /** + * Gets or sets the size. + */ + 'size'?: number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "imageType", + "baseName": "ImageType", + "type": "ImageType" + }, + { + "name": "imageIndex", + "baseName": "ImageIndex", + "type": "number" + }, + { + "name": "imageTag", + "baseName": "ImageTag", + "type": "string" + }, + { + "name": "path", + "baseName": "Path", + "type": "string" + }, + { + "name": "blurHash", + "baseName": "BlurHash", + "type": "string" + }, + { + "name": "height", + "baseName": "Height", + "type": "number" + }, + { + "name": "width", + "baseName": "Width", + "type": "number" + }, + { + "name": "size", + "baseName": "Size", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return ImageInfo.attributeTypeMap; + } +} + +export namespace ImageInfo { +} diff --git a/jellyfin/model/imageOption.ts b/jellyfin/model/imageOption.ts new file mode 100644 index 0000000..ee4fda3 --- /dev/null +++ b/jellyfin/model/imageOption.ts @@ -0,0 +1,52 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { ImageType } from './imageType'; + +export class ImageOption { + 'type'?: ImageType; + /** + * Gets or sets the limit. + */ + 'limit'?: number; + /** + * Gets or sets the minimum width. + */ + 'minWidth'?: number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "type", + "baseName": "Type", + "type": "ImageType" + }, + { + "name": "limit", + "baseName": "Limit", + "type": "number" + }, + { + "name": "minWidth", + "baseName": "MinWidth", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return ImageOption.attributeTypeMap; + } +} + +export namespace ImageOption { +} diff --git a/jellyfin/model/imageOrientation.ts b/jellyfin/model/imageOrientation.ts new file mode 100644 index 0000000..9cda0b5 --- /dev/null +++ b/jellyfin/model/imageOrientation.ts @@ -0,0 +1,24 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export enum ImageOrientation { + TopLeft = 'TopLeft', + TopRight = 'TopRight', + BottomRight = 'BottomRight', + BottomLeft = 'BottomLeft', + LeftTop = 'LeftTop', + RightTop = 'RightTop', + RightBottom = 'RightBottom', + LeftBottom = 'LeftBottom' +} diff --git a/jellyfin/model/imageProviderInfo.ts b/jellyfin/model/imageProviderInfo.ts new file mode 100644 index 0000000..251f7e2 --- /dev/null +++ b/jellyfin/model/imageProviderInfo.ts @@ -0,0 +1,47 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { ImageType } from './imageType'; + +/** +* Class ImageProviderInfo. +*/ +export class ImageProviderInfo { + /** + * Gets the name. + */ + 'name'?: string; + /** + * Gets the supported image types. + */ + 'supportedImages'?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "Name", + "type": "string" + }, + { + "name": "supportedImages", + "baseName": "SupportedImages", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return ImageProviderInfo.attributeTypeMap; + } +} + diff --git a/jellyfin/model/imageSavingConvention.ts b/jellyfin/model/imageSavingConvention.ts new file mode 100644 index 0000000..ca5c4c9 --- /dev/null +++ b/jellyfin/model/imageSavingConvention.ts @@ -0,0 +1,18 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export enum ImageSavingConvention { + Legacy = 'Legacy', + Compatible = 'Compatible' +} diff --git a/jellyfin/model/imageType.ts b/jellyfin/model/imageType.ts new file mode 100644 index 0000000..a5f37b2 --- /dev/null +++ b/jellyfin/model/imageType.ts @@ -0,0 +1,32 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Enum ImageType. +*/ +export enum ImageType { + Primary = 'Primary', + Art = 'Art', + Backdrop = 'Backdrop', + Banner = 'Banner', + Logo = 'Logo', + Thumb = 'Thumb', + Disc = 'Disc', + Box = 'Box', + Screenshot = 'Screenshot', + Menu = 'Menu', + Chapter = 'Chapter', + BoxRear = 'BoxRear', + Profile = 'Profile' +} diff --git a/jellyfin/model/installationInfo.ts b/jellyfin/model/installationInfo.ts new file mode 100644 index 0000000..c51daec --- /dev/null +++ b/jellyfin/model/installationInfo.ts @@ -0,0 +1,89 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { InstallationInfoPackageInfo } from './installationInfoPackageInfo'; + +/** +* Class InstallationInfo. +*/ +export class InstallationInfo { + /** + * Gets or sets the Id. + */ + 'guid'?: string; + /** + * Gets or sets the name. + */ + 'name'?: string | null; + /** + * Gets or sets the version. + */ + 'version'?: string | null; + /** + * Gets or sets the changelog for this version. + */ + 'changelog'?: string | null; + /** + * Gets or sets the source URL. + */ + 'sourceUrl'?: string | null; + /** + * Gets or sets a checksum for the binary. + */ + 'checksum'?: string | null; + 'packageInfo'?: InstallationInfoPackageInfo | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "guid", + "baseName": "Guid", + "type": "string" + }, + { + "name": "name", + "baseName": "Name", + "type": "string" + }, + { + "name": "version", + "baseName": "Version", + "type": "string" + }, + { + "name": "changelog", + "baseName": "Changelog", + "type": "string" + }, + { + "name": "sourceUrl", + "baseName": "SourceUrl", + "type": "string" + }, + { + "name": "checksum", + "baseName": "Checksum", + "type": "string" + }, + { + "name": "packageInfo", + "baseName": "PackageInfo", + "type": "InstallationInfoPackageInfo" + } ]; + + static getAttributeTypeMap() { + return InstallationInfo.attributeTypeMap; + } +} + diff --git a/jellyfin/model/installationInfoPackageInfo.ts b/jellyfin/model/installationInfoPackageInfo.ts new file mode 100644 index 0000000..33f88ac --- /dev/null +++ b/jellyfin/model/installationInfoPackageInfo.ts @@ -0,0 +1,101 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { VersionInfo } from './versionInfo'; + +/** +* Gets or sets package information for the installation. +*/ +export class InstallationInfoPackageInfo { + /** + * Gets or sets the name. + */ + 'name'?: string; + /** + * Gets or sets a long description of the plugin containing features or helpful explanations. + */ + 'description'?: string; + /** + * Gets or sets a short overview of what the plugin does. + */ + 'overview'?: string; + /** + * Gets or sets the owner. + */ + 'owner'?: string; + /** + * Gets or sets the category. + */ + 'category'?: string; + /** + * Gets or sets the guid of the assembly associated with this plugin. This is used to identify the proper item for automatic updates. + */ + 'guid'?: string; + /** + * Gets or sets the versions. + */ + 'versions'?: Array; + /** + * Gets or sets the image url for the package. + */ + 'imageUrl'?: string | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "description", + "baseName": "description", + "type": "string" + }, + { + "name": "overview", + "baseName": "overview", + "type": "string" + }, + { + "name": "owner", + "baseName": "owner", + "type": "string" + }, + { + "name": "category", + "baseName": "category", + "type": "string" + }, + { + "name": "guid", + "baseName": "guid", + "type": "string" + }, + { + "name": "versions", + "baseName": "versions", + "type": "Array" + }, + { + "name": "imageUrl", + "baseName": "imageUrl", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return InstallationInfoPackageInfo.attributeTypeMap; + } +} + diff --git a/jellyfin/model/isoType.ts b/jellyfin/model/isoType.ts new file mode 100644 index 0000000..a506230 --- /dev/null +++ b/jellyfin/model/isoType.ts @@ -0,0 +1,21 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Enum IsoType. +*/ +export enum IsoType { + Dvd = 'Dvd', + BluRay = 'BluRay' +} diff --git a/jellyfin/model/itemCounts.ts b/jellyfin/model/itemCounts.ts new file mode 100644 index 0000000..1bf13c5 --- /dev/null +++ b/jellyfin/model/itemCounts.ts @@ -0,0 +1,136 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Class LibrarySummary. +*/ +export class ItemCounts { + /** + * Gets or sets the movie count. + */ + 'movieCount'?: number; + /** + * Gets or sets the series count. + */ + 'seriesCount'?: number; + /** + * Gets or sets the episode count. + */ + 'episodeCount'?: number; + /** + * Gets or sets the artist count. + */ + 'artistCount'?: number; + /** + * Gets or sets the program count. + */ + 'programCount'?: number; + /** + * Gets or sets the trailer count. + */ + 'trailerCount'?: number; + /** + * Gets or sets the song count. + */ + 'songCount'?: number; + /** + * Gets or sets the album count. + */ + 'albumCount'?: number; + /** + * Gets or sets the music video count. + */ + 'musicVideoCount'?: number; + /** + * Gets or sets the box set count. + */ + 'boxSetCount'?: number; + /** + * Gets or sets the book count. + */ + 'bookCount'?: number; + /** + * Gets or sets the item count. + */ + 'itemCount'?: number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "movieCount", + "baseName": "MovieCount", + "type": "number" + }, + { + "name": "seriesCount", + "baseName": "SeriesCount", + "type": "number" + }, + { + "name": "episodeCount", + "baseName": "EpisodeCount", + "type": "number" + }, + { + "name": "artistCount", + "baseName": "ArtistCount", + "type": "number" + }, + { + "name": "programCount", + "baseName": "ProgramCount", + "type": "number" + }, + { + "name": "trailerCount", + "baseName": "TrailerCount", + "type": "number" + }, + { + "name": "songCount", + "baseName": "SongCount", + "type": "number" + }, + { + "name": "albumCount", + "baseName": "AlbumCount", + "type": "number" + }, + { + "name": "musicVideoCount", + "baseName": "MusicVideoCount", + "type": "number" + }, + { + "name": "boxSetCount", + "baseName": "BoxSetCount", + "type": "number" + }, + { + "name": "bookCount", + "baseName": "BookCount", + "type": "number" + }, + { + "name": "itemCount", + "baseName": "ItemCount", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return ItemCounts.attributeTypeMap; + } +} + diff --git a/jellyfin/model/itemFields.ts b/jellyfin/model/itemFields.ts new file mode 100644 index 0000000..654125f --- /dev/null +++ b/jellyfin/model/itemFields.ts @@ -0,0 +1,80 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Used to control the data that gets attached to DtoBaseItems. +*/ +export enum ItemFields { + AirTime = 'AirTime', + CanDelete = 'CanDelete', + CanDownload = 'CanDownload', + ChannelInfo = 'ChannelInfo', + Chapters = 'Chapters', + ChildCount = 'ChildCount', + CumulativeRunTimeTicks = 'CumulativeRunTimeTicks', + CustomRating = 'CustomRating', + DateCreated = 'DateCreated', + DateLastMediaAdded = 'DateLastMediaAdded', + DisplayPreferencesId = 'DisplayPreferencesId', + Etag = 'Etag', + ExternalUrls = 'ExternalUrls', + Genres = 'Genres', + HomePageUrl = 'HomePageUrl', + ItemCounts = 'ItemCounts', + MediaSourceCount = 'MediaSourceCount', + MediaSources = 'MediaSources', + OriginalTitle = 'OriginalTitle', + Overview = 'Overview', + ParentId = 'ParentId', + Path = 'Path', + People = 'People', + PlayAccess = 'PlayAccess', + ProductionLocations = 'ProductionLocations', + ProviderIds = 'ProviderIds', + PrimaryImageAspectRatio = 'PrimaryImageAspectRatio', + RecursiveItemCount = 'RecursiveItemCount', + Settings = 'Settings', + ScreenshotImageTags = 'ScreenshotImageTags', + SeriesPrimaryImage = 'SeriesPrimaryImage', + SeriesStudio = 'SeriesStudio', + SortName = 'SortName', + SpecialEpisodeNumbers = 'SpecialEpisodeNumbers', + Studios = 'Studios', + BasicSyncInfo = 'BasicSyncInfo', + SyncInfo = 'SyncInfo', + Taglines = 'Taglines', + Tags = 'Tags', + RemoteTrailers = 'RemoteTrailers', + MediaStreams = 'MediaStreams', + SeasonUserData = 'SeasonUserData', + ServiceName = 'ServiceName', + ThemeSongIds = 'ThemeSongIds', + ThemeVideoIds = 'ThemeVideoIds', + ExternalEtag = 'ExternalEtag', + PresentationUniqueKey = 'PresentationUniqueKey', + InheritedParentalRatingValue = 'InheritedParentalRatingValue', + ExternalSeriesId = 'ExternalSeriesId', + SeriesPresentationUniqueKey = 'SeriesPresentationUniqueKey', + DateLastRefreshed = 'DateLastRefreshed', + DateLastSaved = 'DateLastSaved', + RefreshState = 'RefreshState', + ChannelImage = 'ChannelImage', + EnableMediaSourceDisplay = 'EnableMediaSourceDisplay', + Width = 'Width', + Height = 'Height', + ExtraIds = 'ExtraIds', + LocalTrailerCount = 'LocalTrailerCount', + IsHd = 'IsHD', + SpecialFeatureCount = 'SpecialFeatureCount' +} diff --git a/jellyfin/model/itemFilter.ts b/jellyfin/model/itemFilter.ts new file mode 100644 index 0000000..e0f8008 --- /dev/null +++ b/jellyfin/model/itemFilter.ts @@ -0,0 +1,28 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Enum ItemFilter. +*/ +export enum ItemFilter { + IsFolder = 'IsFolder', + IsNotFolder = 'IsNotFolder', + IsUnplayed = 'IsUnplayed', + IsPlayed = 'IsPlayed', + IsFavorite = 'IsFavorite', + IsResumable = 'IsResumable', + Likes = 'Likes', + Dislikes = 'Dislikes', + IsFavoriteOrLikes = 'IsFavoriteOrLikes' +} diff --git a/jellyfin/model/joinGroupRequestDto.ts b/jellyfin/model/joinGroupRequestDto.ts new file mode 100644 index 0000000..33ae016 --- /dev/null +++ b/jellyfin/model/joinGroupRequestDto.ts @@ -0,0 +1,37 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Class JoinGroupRequestDto. +*/ +export class JoinGroupRequestDto { + /** + * Gets or sets the group identifier. + */ + 'groupId'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "groupId", + "baseName": "GroupId", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return JoinGroupRequestDto.attributeTypeMap; + } +} + diff --git a/jellyfin/model/keepUntil.ts b/jellyfin/model/keepUntil.ts new file mode 100644 index 0000000..fb05fc3 --- /dev/null +++ b/jellyfin/model/keepUntil.ts @@ -0,0 +1,20 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export enum KeepUntil { + UntilDeleted = 'UntilDeleted', + UntilSpaceNeeded = 'UntilSpaceNeeded', + UntilWatched = 'UntilWatched', + UntilDate = 'UntilDate' +} diff --git a/jellyfin/model/libraryOptionInfoDto.ts b/jellyfin/model/libraryOptionInfoDto.ts new file mode 100644 index 0000000..8c4ab88 --- /dev/null +++ b/jellyfin/model/libraryOptionInfoDto.ts @@ -0,0 +1,46 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Library option info dto. +*/ +export class LibraryOptionInfoDto { + /** + * Gets or sets name. + */ + 'name'?: string | null; + /** + * Gets or sets a value indicating whether default enabled. + */ + 'defaultEnabled'?: boolean; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "Name", + "type": "string" + }, + { + "name": "defaultEnabled", + "baseName": "DefaultEnabled", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return LibraryOptionInfoDto.attributeTypeMap; + } +} + diff --git a/jellyfin/model/libraryOptions.ts b/jellyfin/model/libraryOptions.ts new file mode 100644 index 0000000..8d7c5d8 --- /dev/null +++ b/jellyfin/model/libraryOptions.ts @@ -0,0 +1,198 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { EmbeddedSubtitleOptions } from './embeddedSubtitleOptions'; +import { MediaPathInfo } from './mediaPathInfo'; +import { TypeOptions } from './typeOptions'; + +export class LibraryOptions { + 'enablePhotos'?: boolean; + 'enableRealtimeMonitor'?: boolean; + 'enableChapterImageExtraction'?: boolean; + 'extractChapterImagesDuringLibraryScan'?: boolean; + 'pathInfos'?: Array; + 'saveLocalMetadata'?: boolean; + 'enableInternetProviders'?: boolean; + 'enableAutomaticSeriesGrouping'?: boolean; + 'enableEmbeddedTitles'?: boolean; + 'enableEmbeddedEpisodeInfos'?: boolean; + 'automaticRefreshIntervalDays'?: number; + /** + * Gets or sets the preferred metadata language. + */ + 'preferredMetadataLanguage'?: string | null; + /** + * Gets or sets the metadata country code. + */ + 'metadataCountryCode'?: string | null; + 'seasonZeroDisplayName'?: string; + 'metadataSavers'?: Array | null; + 'disabledLocalMetadataReaders'?: Array; + 'localMetadataReaderOrder'?: Array | null; + 'disabledSubtitleFetchers'?: Array; + 'subtitleFetcherOrder'?: Array; + 'skipSubtitlesIfEmbeddedSubtitlesPresent'?: boolean; + 'skipSubtitlesIfAudioTrackMatches'?: boolean; + 'subtitleDownloadLanguages'?: Array | null; + 'requirePerfectSubtitleMatch'?: boolean; + 'saveSubtitlesWithMedia'?: boolean; + 'automaticallyAddToCollection'?: boolean; + 'allowEmbeddedSubtitles'?: EmbeddedSubtitleOptions; + 'typeOptions'?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "enablePhotos", + "baseName": "EnablePhotos", + "type": "boolean" + }, + { + "name": "enableRealtimeMonitor", + "baseName": "EnableRealtimeMonitor", + "type": "boolean" + }, + { + "name": "enableChapterImageExtraction", + "baseName": "EnableChapterImageExtraction", + "type": "boolean" + }, + { + "name": "extractChapterImagesDuringLibraryScan", + "baseName": "ExtractChapterImagesDuringLibraryScan", + "type": "boolean" + }, + { + "name": "pathInfos", + "baseName": "PathInfos", + "type": "Array" + }, + { + "name": "saveLocalMetadata", + "baseName": "SaveLocalMetadata", + "type": "boolean" + }, + { + "name": "enableInternetProviders", + "baseName": "EnableInternetProviders", + "type": "boolean" + }, + { + "name": "enableAutomaticSeriesGrouping", + "baseName": "EnableAutomaticSeriesGrouping", + "type": "boolean" + }, + { + "name": "enableEmbeddedTitles", + "baseName": "EnableEmbeddedTitles", + "type": "boolean" + }, + { + "name": "enableEmbeddedEpisodeInfos", + "baseName": "EnableEmbeddedEpisodeInfos", + "type": "boolean" + }, + { + "name": "automaticRefreshIntervalDays", + "baseName": "AutomaticRefreshIntervalDays", + "type": "number" + }, + { + "name": "preferredMetadataLanguage", + "baseName": "PreferredMetadataLanguage", + "type": "string" + }, + { + "name": "metadataCountryCode", + "baseName": "MetadataCountryCode", + "type": "string" + }, + { + "name": "seasonZeroDisplayName", + "baseName": "SeasonZeroDisplayName", + "type": "string" + }, + { + "name": "metadataSavers", + "baseName": "MetadataSavers", + "type": "Array" + }, + { + "name": "disabledLocalMetadataReaders", + "baseName": "DisabledLocalMetadataReaders", + "type": "Array" + }, + { + "name": "localMetadataReaderOrder", + "baseName": "LocalMetadataReaderOrder", + "type": "Array" + }, + { + "name": "disabledSubtitleFetchers", + "baseName": "DisabledSubtitleFetchers", + "type": "Array" + }, + { + "name": "subtitleFetcherOrder", + "baseName": "SubtitleFetcherOrder", + "type": "Array" + }, + { + "name": "skipSubtitlesIfEmbeddedSubtitlesPresent", + "baseName": "SkipSubtitlesIfEmbeddedSubtitlesPresent", + "type": "boolean" + }, + { + "name": "skipSubtitlesIfAudioTrackMatches", + "baseName": "SkipSubtitlesIfAudioTrackMatches", + "type": "boolean" + }, + { + "name": "subtitleDownloadLanguages", + "baseName": "SubtitleDownloadLanguages", + "type": "Array" + }, + { + "name": "requirePerfectSubtitleMatch", + "baseName": "RequirePerfectSubtitleMatch", + "type": "boolean" + }, + { + "name": "saveSubtitlesWithMedia", + "baseName": "SaveSubtitlesWithMedia", + "type": "boolean" + }, + { + "name": "automaticallyAddToCollection", + "baseName": "AutomaticallyAddToCollection", + "type": "boolean" + }, + { + "name": "allowEmbeddedSubtitles", + "baseName": "AllowEmbeddedSubtitles", + "type": "EmbeddedSubtitleOptions" + }, + { + "name": "typeOptions", + "baseName": "TypeOptions", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return LibraryOptions.attributeTypeMap; + } +} + +export namespace LibraryOptions { +} diff --git a/jellyfin/model/libraryOptionsResultDto.ts b/jellyfin/model/libraryOptionsResultDto.ts new file mode 100644 index 0000000..fb3254f --- /dev/null +++ b/jellyfin/model/libraryOptionsResultDto.ts @@ -0,0 +1,66 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { LibraryOptionInfoDto } from './libraryOptionInfoDto'; +import { LibraryTypeOptionsDto } from './libraryTypeOptionsDto'; + +/** +* Library options result dto. +*/ +export class LibraryOptionsResultDto { + /** + * Gets or sets the metadata savers. + */ + 'metadataSavers'?: Array; + /** + * Gets or sets the metadata readers. + */ + 'metadataReaders'?: Array; + /** + * Gets or sets the subtitle fetchers. + */ + 'subtitleFetchers'?: Array; + /** + * Gets or sets the type options. + */ + 'typeOptions'?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "metadataSavers", + "baseName": "MetadataSavers", + "type": "Array" + }, + { + "name": "metadataReaders", + "baseName": "MetadataReaders", + "type": "Array" + }, + { + "name": "subtitleFetchers", + "baseName": "SubtitleFetchers", + "type": "Array" + }, + { + "name": "typeOptions", + "baseName": "TypeOptions", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return LibraryOptionsResultDto.attributeTypeMap; + } +} + diff --git a/jellyfin/model/libraryTypeOptionsDto.ts b/jellyfin/model/libraryTypeOptionsDto.ts new file mode 100644 index 0000000..e092d1d --- /dev/null +++ b/jellyfin/model/libraryTypeOptionsDto.ts @@ -0,0 +1,76 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { ImageOption } from './imageOption'; +import { ImageType } from './imageType'; +import { LibraryOptionInfoDto } from './libraryOptionInfoDto'; + +/** +* Library type options dto. +*/ +export class LibraryTypeOptionsDto { + /** + * Gets or sets the type. + */ + 'type'?: string | null; + /** + * Gets or sets the metadata fetchers. + */ + 'metadataFetchers'?: Array; + /** + * Gets or sets the image fetchers. + */ + 'imageFetchers'?: Array; + /** + * Gets or sets the supported image types. + */ + 'supportedImageTypes'?: Array; + /** + * Gets or sets the default image options. + */ + 'defaultImageOptions'?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "type", + "baseName": "Type", + "type": "string" + }, + { + "name": "metadataFetchers", + "baseName": "MetadataFetchers", + "type": "Array" + }, + { + "name": "imageFetchers", + "baseName": "ImageFetchers", + "type": "Array" + }, + { + "name": "supportedImageTypes", + "baseName": "SupportedImageTypes", + "type": "Array" + }, + { + "name": "defaultImageOptions", + "baseName": "DefaultImageOptions", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return LibraryTypeOptionsDto.attributeTypeMap; + } +} + diff --git a/jellyfin/model/libraryUpdateInfo.ts b/jellyfin/model/libraryUpdateInfo.ts new file mode 100644 index 0000000..e102678 --- /dev/null +++ b/jellyfin/model/libraryUpdateInfo.ts @@ -0,0 +1,85 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Class LibraryUpdateInfo. +*/ +export class LibraryUpdateInfo { + /** + * Gets or sets the folders added to. + */ + 'foldersAddedTo'?: Array; + /** + * Gets or sets the folders removed from. + */ + 'foldersRemovedFrom'?: Array; + /** + * Gets or sets the items added. + */ + 'itemsAdded'?: Array; + /** + * Gets or sets the items removed. + */ + 'itemsRemoved'?: Array; + /** + * Gets or sets the items updated. + */ + 'itemsUpdated'?: Array; + 'collectionFolders'?: Array; + 'isEmpty'?: boolean; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "foldersAddedTo", + "baseName": "FoldersAddedTo", + "type": "Array" + }, + { + "name": "foldersRemovedFrom", + "baseName": "FoldersRemovedFrom", + "type": "Array" + }, + { + "name": "itemsAdded", + "baseName": "ItemsAdded", + "type": "Array" + }, + { + "name": "itemsRemoved", + "baseName": "ItemsRemoved", + "type": "Array" + }, + { + "name": "itemsUpdated", + "baseName": "ItemsUpdated", + "type": "Array" + }, + { + "name": "collectionFolders", + "baseName": "CollectionFolders", + "type": "Array" + }, + { + "name": "isEmpty", + "baseName": "IsEmpty", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return LibraryUpdateInfo.attributeTypeMap; + } +} + diff --git a/jellyfin/model/listingsProviderInfo.ts b/jellyfin/model/listingsProviderInfo.ts new file mode 100644 index 0000000..56cff83 --- /dev/null +++ b/jellyfin/model/listingsProviderInfo.ts @@ -0,0 +1,134 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { NameValuePair } from './nameValuePair'; + +export class ListingsProviderInfo { + 'id'?: string | null; + 'type'?: string | null; + 'username'?: string | null; + 'password'?: string | null; + 'listingsId'?: string | null; + 'zipCode'?: string | null; + 'country'?: string | null; + 'path'?: string | null; + 'enabledTuners'?: Array | null; + 'enableAllTuners'?: boolean; + 'newsCategories'?: Array | null; + 'sportsCategories'?: Array | null; + 'kidsCategories'?: Array | null; + 'movieCategories'?: Array | null; + 'channelMappings'?: Array | null; + 'moviePrefix'?: string | null; + 'preferredLanguage'?: string | null; + 'userAgent'?: string | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "id", + "baseName": "Id", + "type": "string" + }, + { + "name": "type", + "baseName": "Type", + "type": "string" + }, + { + "name": "username", + "baseName": "Username", + "type": "string" + }, + { + "name": "password", + "baseName": "Password", + "type": "string" + }, + { + "name": "listingsId", + "baseName": "ListingsId", + "type": "string" + }, + { + "name": "zipCode", + "baseName": "ZipCode", + "type": "string" + }, + { + "name": "country", + "baseName": "Country", + "type": "string" + }, + { + "name": "path", + "baseName": "Path", + "type": "string" + }, + { + "name": "enabledTuners", + "baseName": "EnabledTuners", + "type": "Array" + }, + { + "name": "enableAllTuners", + "baseName": "EnableAllTuners", + "type": "boolean" + }, + { + "name": "newsCategories", + "baseName": "NewsCategories", + "type": "Array" + }, + { + "name": "sportsCategories", + "baseName": "SportsCategories", + "type": "Array" + }, + { + "name": "kidsCategories", + "baseName": "KidsCategories", + "type": "Array" + }, + { + "name": "movieCategories", + "baseName": "MovieCategories", + "type": "Array" + }, + { + "name": "channelMappings", + "baseName": "ChannelMappings", + "type": "Array" + }, + { + "name": "moviePrefix", + "baseName": "MoviePrefix", + "type": "string" + }, + { + "name": "preferredLanguage", + "baseName": "PreferredLanguage", + "type": "string" + }, + { + "name": "userAgent", + "baseName": "UserAgent", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return ListingsProviderInfo.attributeTypeMap; + } +} + diff --git a/jellyfin/model/liveStreamResponse.ts b/jellyfin/model/liveStreamResponse.ts new file mode 100644 index 0000000..e88bd98 --- /dev/null +++ b/jellyfin/model/liveStreamResponse.ts @@ -0,0 +1,32 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { LiveStreamResponseMediaSource } from './liveStreamResponseMediaSource'; + +export class LiveStreamResponse { + 'mediaSource'?: LiveStreamResponseMediaSource; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "mediaSource", + "baseName": "MediaSource", + "type": "LiveStreamResponseMediaSource" + } ]; + + static getAttributeTypeMap() { + return LiveStreamResponse.attributeTypeMap; + } +} + diff --git a/jellyfin/model/liveStreamResponseMediaSource.ts b/jellyfin/model/liveStreamResponseMediaSource.ts new file mode 100644 index 0000000..95aa512 --- /dev/null +++ b/jellyfin/model/liveStreamResponseMediaSource.ts @@ -0,0 +1,290 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { IsoType } from './isoType'; +import { MediaAttachment } from './mediaAttachment'; +import { MediaProtocol } from './mediaProtocol'; +import { MediaSourceType } from './mediaSourceType'; +import { MediaStream } from './mediaStream'; +import { TransportStreamTimestamp } from './transportStreamTimestamp'; +import { Video3DFormat } from './video3DFormat'; +import { VideoType } from './videoType'; + +export class LiveStreamResponseMediaSource { + 'protocol'?: MediaProtocol; + 'id'?: string | null; + 'path'?: string | null; + 'encoderPath'?: string | null; + 'encoderProtocol'?: MediaProtocol | null; + 'type'?: MediaSourceType; + 'container'?: string | null; + 'size'?: number | null; + 'name'?: string | null; + /** + * Gets or sets a value indicating whether the media is remote. Differentiate internet url vs local network. + */ + 'isRemote'?: boolean; + 'eTag'?: string | null; + 'runTimeTicks'?: number | null; + 'readAtNativeFramerate'?: boolean; + 'ignoreDts'?: boolean; + 'ignoreIndex'?: boolean; + 'genPtsInput'?: boolean; + 'supportsTranscoding'?: boolean; + 'supportsDirectStream'?: boolean; + 'supportsDirectPlay'?: boolean; + 'isInfiniteStream'?: boolean; + 'requiresOpening'?: boolean; + 'openToken'?: string | null; + 'requiresClosing'?: boolean; + 'liveStreamId'?: string | null; + 'bufferMs'?: number | null; + 'requiresLooping'?: boolean; + 'supportsProbing'?: boolean; + 'videoType'?: VideoType | null; + 'isoType'?: IsoType | null; + 'video3DFormat'?: Video3DFormat | null; + 'mediaStreams'?: Array | null; + 'mediaAttachments'?: Array | null; + 'formats'?: Array | null; + 'bitrate'?: number | null; + 'timestamp'?: TransportStreamTimestamp | null; + 'requiredHttpHeaders'?: { [key: string]: string; } | null; + 'transcodingUrl'?: string | null; + 'transcodingSubProtocol'?: string | null; + 'transcodingContainer'?: string | null; + 'analyzeDurationMs'?: number | null; + 'defaultAudioStreamIndex'?: number | null; + 'defaultSubtitleStreamIndex'?: number | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "protocol", + "baseName": "Protocol", + "type": "MediaProtocol" + }, + { + "name": "id", + "baseName": "Id", + "type": "string" + }, + { + "name": "path", + "baseName": "Path", + "type": "string" + }, + { + "name": "encoderPath", + "baseName": "EncoderPath", + "type": "string" + }, + { + "name": "encoderProtocol", + "baseName": "EncoderProtocol", + "type": "MediaProtocol" + }, + { + "name": "type", + "baseName": "Type", + "type": "MediaSourceType" + }, + { + "name": "container", + "baseName": "Container", + "type": "string" + }, + { + "name": "size", + "baseName": "Size", + "type": "number" + }, + { + "name": "name", + "baseName": "Name", + "type": "string" + }, + { + "name": "isRemote", + "baseName": "IsRemote", + "type": "boolean" + }, + { + "name": "eTag", + "baseName": "ETag", + "type": "string" + }, + { + "name": "runTimeTicks", + "baseName": "RunTimeTicks", + "type": "number" + }, + { + "name": "readAtNativeFramerate", + "baseName": "ReadAtNativeFramerate", + "type": "boolean" + }, + { + "name": "ignoreDts", + "baseName": "IgnoreDts", + "type": "boolean" + }, + { + "name": "ignoreIndex", + "baseName": "IgnoreIndex", + "type": "boolean" + }, + { + "name": "genPtsInput", + "baseName": "GenPtsInput", + "type": "boolean" + }, + { + "name": "supportsTranscoding", + "baseName": "SupportsTranscoding", + "type": "boolean" + }, + { + "name": "supportsDirectStream", + "baseName": "SupportsDirectStream", + "type": "boolean" + }, + { + "name": "supportsDirectPlay", + "baseName": "SupportsDirectPlay", + "type": "boolean" + }, + { + "name": "isInfiniteStream", + "baseName": "IsInfiniteStream", + "type": "boolean" + }, + { + "name": "requiresOpening", + "baseName": "RequiresOpening", + "type": "boolean" + }, + { + "name": "openToken", + "baseName": "OpenToken", + "type": "string" + }, + { + "name": "requiresClosing", + "baseName": "RequiresClosing", + "type": "boolean" + }, + { + "name": "liveStreamId", + "baseName": "LiveStreamId", + "type": "string" + }, + { + "name": "bufferMs", + "baseName": "BufferMs", + "type": "number" + }, + { + "name": "requiresLooping", + "baseName": "RequiresLooping", + "type": "boolean" + }, + { + "name": "supportsProbing", + "baseName": "SupportsProbing", + "type": "boolean" + }, + { + "name": "videoType", + "baseName": "VideoType", + "type": "VideoType" + }, + { + "name": "isoType", + "baseName": "IsoType", + "type": "IsoType" + }, + { + "name": "video3DFormat", + "baseName": "Video3DFormat", + "type": "Video3DFormat" + }, + { + "name": "mediaStreams", + "baseName": "MediaStreams", + "type": "Array" + }, + { + "name": "mediaAttachments", + "baseName": "MediaAttachments", + "type": "Array" + }, + { + "name": "formats", + "baseName": "Formats", + "type": "Array" + }, + { + "name": "bitrate", + "baseName": "Bitrate", + "type": "number" + }, + { + "name": "timestamp", + "baseName": "Timestamp", + "type": "TransportStreamTimestamp" + }, + { + "name": "requiredHttpHeaders", + "baseName": "RequiredHttpHeaders", + "type": "{ [key: string]: string; }" + }, + { + "name": "transcodingUrl", + "baseName": "TranscodingUrl", + "type": "string" + }, + { + "name": "transcodingSubProtocol", + "baseName": "TranscodingSubProtocol", + "type": "string" + }, + { + "name": "transcodingContainer", + "baseName": "TranscodingContainer", + "type": "string" + }, + { + "name": "analyzeDurationMs", + "baseName": "AnalyzeDurationMs", + "type": "number" + }, + { + "name": "defaultAudioStreamIndex", + "baseName": "DefaultAudioStreamIndex", + "type": "number" + }, + { + "name": "defaultSubtitleStreamIndex", + "baseName": "DefaultSubtitleStreamIndex", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return LiveStreamResponseMediaSource.attributeTypeMap; + } +} + +export namespace LiveStreamResponseMediaSource { +} diff --git a/jellyfin/model/liveTvInfo.ts b/jellyfin/model/liveTvInfo.ts new file mode 100644 index 0000000..0f23fe7 --- /dev/null +++ b/jellyfin/model/liveTvInfo.ts @@ -0,0 +1,53 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { LiveTvServiceInfo } from './liveTvServiceInfo'; + +export class LiveTvInfo { + /** + * Gets or sets the services. + */ + 'services'?: Array; + /** + * Gets or sets a value indicating whether this instance is enabled. + */ + 'isEnabled'?: boolean; + /** + * Gets or sets the enabled users. + */ + 'enabledUsers'?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "services", + "baseName": "Services", + "type": "Array" + }, + { + "name": "isEnabled", + "baseName": "IsEnabled", + "type": "boolean" + }, + { + "name": "enabledUsers", + "baseName": "EnabledUsers", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return LiveTvInfo.attributeTypeMap; + } +} + diff --git a/jellyfin/model/liveTvOptions.ts b/jellyfin/model/liveTvOptions.ts new file mode 100644 index 0000000..bab82c6 --- /dev/null +++ b/jellyfin/model/liveTvOptions.ts @@ -0,0 +1,105 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { ListingsProviderInfo } from './listingsProviderInfo'; +import { TunerHostInfo } from './tunerHostInfo'; + +export class LiveTvOptions { + 'guideDays'?: number | null; + 'recordingPath'?: string | null; + 'movieRecordingPath'?: string | null; + 'seriesRecordingPath'?: string | null; + 'enableRecordingSubfolders'?: boolean; + 'enableOriginalAudioWithEncodedRecordings'?: boolean; + 'tunerHosts'?: Array | null; + 'listingProviders'?: Array | null; + 'prePaddingSeconds'?: number; + 'postPaddingSeconds'?: number; + 'mediaLocationsCreated'?: Array | null; + 'recordingPostProcessor'?: string | null; + 'recordingPostProcessorArguments'?: string | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "guideDays", + "baseName": "GuideDays", + "type": "number" + }, + { + "name": "recordingPath", + "baseName": "RecordingPath", + "type": "string" + }, + { + "name": "movieRecordingPath", + "baseName": "MovieRecordingPath", + "type": "string" + }, + { + "name": "seriesRecordingPath", + "baseName": "SeriesRecordingPath", + "type": "string" + }, + { + "name": "enableRecordingSubfolders", + "baseName": "EnableRecordingSubfolders", + "type": "boolean" + }, + { + "name": "enableOriginalAudioWithEncodedRecordings", + "baseName": "EnableOriginalAudioWithEncodedRecordings", + "type": "boolean" + }, + { + "name": "tunerHosts", + "baseName": "TunerHosts", + "type": "Array" + }, + { + "name": "listingProviders", + "baseName": "ListingProviders", + "type": "Array" + }, + { + "name": "prePaddingSeconds", + "baseName": "PrePaddingSeconds", + "type": "number" + }, + { + "name": "postPaddingSeconds", + "baseName": "PostPaddingSeconds", + "type": "number" + }, + { + "name": "mediaLocationsCreated", + "baseName": "MediaLocationsCreated", + "type": "Array" + }, + { + "name": "recordingPostProcessor", + "baseName": "RecordingPostProcessor", + "type": "string" + }, + { + "name": "recordingPostProcessorArguments", + "baseName": "RecordingPostProcessorArguments", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return LiveTvOptions.attributeTypeMap; + } +} + diff --git a/jellyfin/model/liveTvServiceInfo.ts b/jellyfin/model/liveTvServiceInfo.ts new file mode 100644 index 0000000..3e04156 --- /dev/null +++ b/jellyfin/model/liveTvServiceInfo.ts @@ -0,0 +1,97 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { LiveTvServiceStatus } from './liveTvServiceStatus'; + +/** +* Class ServiceInfo. +*/ +export class LiveTvServiceInfo { + /** + * Gets or sets the name. + */ + 'name'?: string | null; + /** + * Gets or sets the home page URL. + */ + 'homePageUrl'?: string | null; + 'status'?: LiveTvServiceStatus; + /** + * Gets or sets the status message. + */ + 'statusMessage'?: string | null; + /** + * Gets or sets the version. + */ + 'version'?: string | null; + /** + * Gets or sets a value indicating whether this instance has update available. + */ + 'hasUpdateAvailable'?: boolean; + /** + * Gets or sets a value indicating whether this instance is visible. + */ + 'isVisible'?: boolean; + 'tuners'?: Array | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "Name", + "type": "string" + }, + { + "name": "homePageUrl", + "baseName": "HomePageUrl", + "type": "string" + }, + { + "name": "status", + "baseName": "Status", + "type": "LiveTvServiceStatus" + }, + { + "name": "statusMessage", + "baseName": "StatusMessage", + "type": "string" + }, + { + "name": "version", + "baseName": "Version", + "type": "string" + }, + { + "name": "hasUpdateAvailable", + "baseName": "HasUpdateAvailable", + "type": "boolean" + }, + { + "name": "isVisible", + "baseName": "IsVisible", + "type": "boolean" + }, + { + "name": "tuners", + "baseName": "Tuners", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return LiveTvServiceInfo.attributeTypeMap; + } +} + +export namespace LiveTvServiceInfo { +} diff --git a/jellyfin/model/liveTvServiceStatus.ts b/jellyfin/model/liveTvServiceStatus.ts new file mode 100644 index 0000000..55c4a18 --- /dev/null +++ b/jellyfin/model/liveTvServiceStatus.ts @@ -0,0 +1,18 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export enum LiveTvServiceStatus { + Ok = 'Ok', + Unavailable = 'Unavailable' +} diff --git a/jellyfin/model/localizationOption.ts b/jellyfin/model/localizationOption.ts new file mode 100644 index 0000000..a9c8956 --- /dev/null +++ b/jellyfin/model/localizationOption.ts @@ -0,0 +1,37 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class LocalizationOption { + 'name'?: string | null; + 'value'?: string | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "Name", + "type": "string" + }, + { + "name": "value", + "baseName": "Value", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return LocalizationOption.attributeTypeMap; + } +} + diff --git a/jellyfin/model/locationType.ts b/jellyfin/model/locationType.ts new file mode 100644 index 0000000..b370a12 --- /dev/null +++ b/jellyfin/model/locationType.ts @@ -0,0 +1,23 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Enum LocationType. +*/ +export enum LocationType { + FileSystem = 'FileSystem', + Remote = 'Remote', + Virtual = 'Virtual', + Offline = 'Offline' +} diff --git a/jellyfin/model/logFile.ts b/jellyfin/model/logFile.ts new file mode 100644 index 0000000..cbbb500 --- /dev/null +++ b/jellyfin/model/logFile.ts @@ -0,0 +1,61 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class LogFile { + /** + * Gets or sets the date created. + */ + 'dateCreated'?: Date; + /** + * Gets or sets the date modified. + */ + 'dateModified'?: Date; + /** + * Gets or sets the size. + */ + 'size'?: number; + /** + * Gets or sets the name. + */ + 'name'?: string | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "dateCreated", + "baseName": "DateCreated", + "type": "Date" + }, + { + "name": "dateModified", + "baseName": "DateModified", + "type": "Date" + }, + { + "name": "size", + "baseName": "Size", + "type": "number" + }, + { + "name": "name", + "baseName": "Name", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return LogFile.attributeTypeMap; + } +} + diff --git a/jellyfin/model/logLevel.ts b/jellyfin/model/logLevel.ts new file mode 100644 index 0000000..568b646 --- /dev/null +++ b/jellyfin/model/logLevel.ts @@ -0,0 +1,23 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export enum LogLevel { + Trace = 'Trace', + Debug = 'Debug', + Information = 'Information', + Warning = 'Warning', + Error = 'Error', + Critical = 'Critical', + None = 'None' +} diff --git a/jellyfin/model/mediaAttachment.ts b/jellyfin/model/mediaAttachment.ts new file mode 100644 index 0000000..df984cb --- /dev/null +++ b/jellyfin/model/mediaAttachment.ts @@ -0,0 +1,91 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Class MediaAttachment. +*/ +export class MediaAttachment { + /** + * Gets or sets the codec. + */ + 'codec'?: string | null; + /** + * Gets or sets the codec tag. + */ + 'codecTag'?: string | null; + /** + * Gets or sets the comment. + */ + 'comment'?: string | null; + /** + * Gets or sets the index. + */ + 'index'?: number; + /** + * Gets or sets the filename. + */ + 'fileName'?: string | null; + /** + * Gets or sets the MIME type. + */ + 'mimeType'?: string | null; + /** + * Gets or sets the delivery URL. + */ + 'deliveryUrl'?: string | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "codec", + "baseName": "Codec", + "type": "string" + }, + { + "name": "codecTag", + "baseName": "CodecTag", + "type": "string" + }, + { + "name": "comment", + "baseName": "Comment", + "type": "string" + }, + { + "name": "index", + "baseName": "Index", + "type": "number" + }, + { + "name": "fileName", + "baseName": "FileName", + "type": "string" + }, + { + "name": "mimeType", + "baseName": "MimeType", + "type": "string" + }, + { + "name": "deliveryUrl", + "baseName": "DeliveryUrl", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return MediaAttachment.attributeTypeMap; + } +} + diff --git a/jellyfin/model/mediaEncoderPathDto.ts b/jellyfin/model/mediaEncoderPathDto.ts new file mode 100644 index 0000000..2f48205 --- /dev/null +++ b/jellyfin/model/mediaEncoderPathDto.ts @@ -0,0 +1,46 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Media Encoder Path Dto. +*/ +export class MediaEncoderPathDto { + /** + * Gets or sets media encoder path. + */ + 'path'?: string; + /** + * Gets or sets media encoder path type. + */ + 'pathType'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "path", + "baseName": "Path", + "type": "string" + }, + { + "name": "pathType", + "baseName": "PathType", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return MediaEncoderPathDto.attributeTypeMap; + } +} + diff --git a/jellyfin/model/mediaPathDto.ts b/jellyfin/model/mediaPathDto.ts new file mode 100644 index 0000000..936e2fb --- /dev/null +++ b/jellyfin/model/mediaPathDto.ts @@ -0,0 +1,53 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { MediaPathDtoPathInfo } from './mediaPathDtoPathInfo'; + +/** +* Media Path dto. +*/ +export class MediaPathDto { + /** + * Gets or sets the name of the library. + */ + 'name': string; + /** + * Gets or sets the path to add. + */ + 'path'?: string | null; + 'pathInfo'?: MediaPathDtoPathInfo | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "Name", + "type": "string" + }, + { + "name": "path", + "baseName": "Path", + "type": "string" + }, + { + "name": "pathInfo", + "baseName": "PathInfo", + "type": "MediaPathDtoPathInfo" + } ]; + + static getAttributeTypeMap() { + return MediaPathDto.attributeTypeMap; + } +} + diff --git a/jellyfin/model/mediaPathDtoPathInfo.ts b/jellyfin/model/mediaPathDtoPathInfo.ts new file mode 100644 index 0000000..8c796e5 --- /dev/null +++ b/jellyfin/model/mediaPathDtoPathInfo.ts @@ -0,0 +1,40 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Gets or sets the path info. +*/ +export class MediaPathDtoPathInfo { + 'path'?: string; + 'networkPath'?: string | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "path", + "baseName": "Path", + "type": "string" + }, + { + "name": "networkPath", + "baseName": "NetworkPath", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return MediaPathDtoPathInfo.attributeTypeMap; + } +} + diff --git a/jellyfin/model/mediaPathInfo.ts b/jellyfin/model/mediaPathInfo.ts new file mode 100644 index 0000000..3ebdda8 --- /dev/null +++ b/jellyfin/model/mediaPathInfo.ts @@ -0,0 +1,37 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class MediaPathInfo { + 'path'?: string; + 'networkPath'?: string | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "path", + "baseName": "Path", + "type": "string" + }, + { + "name": "networkPath", + "baseName": "NetworkPath", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return MediaPathInfo.attributeTypeMap; + } +} + diff --git a/jellyfin/model/mediaProtocol.ts b/jellyfin/model/mediaProtocol.ts new file mode 100644 index 0000000..94e6c59 --- /dev/null +++ b/jellyfin/model/mediaProtocol.ts @@ -0,0 +1,23 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export enum MediaProtocol { + File = 'File', + Http = 'Http', + Rtmp = 'Rtmp', + Rtsp = 'Rtsp', + Udp = 'Udp', + Rtp = 'Rtp', + Ftp = 'Ftp' +} diff --git a/jellyfin/model/mediaSourceInfo.ts b/jellyfin/model/mediaSourceInfo.ts new file mode 100644 index 0000000..d18e01a --- /dev/null +++ b/jellyfin/model/mediaSourceInfo.ts @@ -0,0 +1,290 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { IsoType } from './isoType'; +import { MediaAttachment } from './mediaAttachment'; +import { MediaProtocol } from './mediaProtocol'; +import { MediaSourceType } from './mediaSourceType'; +import { MediaStream } from './mediaStream'; +import { TransportStreamTimestamp } from './transportStreamTimestamp'; +import { Video3DFormat } from './video3DFormat'; +import { VideoType } from './videoType'; + +export class MediaSourceInfo { + 'protocol'?: MediaProtocol; + 'id'?: string | null; + 'path'?: string | null; + 'encoderPath'?: string | null; + 'encoderProtocol'?: MediaProtocol | null; + 'type'?: MediaSourceType; + 'container'?: string | null; + 'size'?: number | null; + 'name'?: string | null; + /** + * Gets or sets a value indicating whether the media is remote. Differentiate internet url vs local network. + */ + 'isRemote'?: boolean; + 'eTag'?: string | null; + 'runTimeTicks'?: number | null; + 'readAtNativeFramerate'?: boolean; + 'ignoreDts'?: boolean; + 'ignoreIndex'?: boolean; + 'genPtsInput'?: boolean; + 'supportsTranscoding'?: boolean; + 'supportsDirectStream'?: boolean; + 'supportsDirectPlay'?: boolean; + 'isInfiniteStream'?: boolean; + 'requiresOpening'?: boolean; + 'openToken'?: string | null; + 'requiresClosing'?: boolean; + 'liveStreamId'?: string | null; + 'bufferMs'?: number | null; + 'requiresLooping'?: boolean; + 'supportsProbing'?: boolean; + 'videoType'?: VideoType | null; + 'isoType'?: IsoType | null; + 'video3DFormat'?: Video3DFormat | null; + 'mediaStreams'?: Array | null; + 'mediaAttachments'?: Array | null; + 'formats'?: Array | null; + 'bitrate'?: number | null; + 'timestamp'?: TransportStreamTimestamp | null; + 'requiredHttpHeaders'?: { [key: string]: string; } | null; + 'transcodingUrl'?: string | null; + 'transcodingSubProtocol'?: string | null; + 'transcodingContainer'?: string | null; + 'analyzeDurationMs'?: number | null; + 'defaultAudioStreamIndex'?: number | null; + 'defaultSubtitleStreamIndex'?: number | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "protocol", + "baseName": "Protocol", + "type": "MediaProtocol" + }, + { + "name": "id", + "baseName": "Id", + "type": "string" + }, + { + "name": "path", + "baseName": "Path", + "type": "string" + }, + { + "name": "encoderPath", + "baseName": "EncoderPath", + "type": "string" + }, + { + "name": "encoderProtocol", + "baseName": "EncoderProtocol", + "type": "MediaProtocol" + }, + { + "name": "type", + "baseName": "Type", + "type": "MediaSourceType" + }, + { + "name": "container", + "baseName": "Container", + "type": "string" + }, + { + "name": "size", + "baseName": "Size", + "type": "number" + }, + { + "name": "name", + "baseName": "Name", + "type": "string" + }, + { + "name": "isRemote", + "baseName": "IsRemote", + "type": "boolean" + }, + { + "name": "eTag", + "baseName": "ETag", + "type": "string" + }, + { + "name": "runTimeTicks", + "baseName": "RunTimeTicks", + "type": "number" + }, + { + "name": "readAtNativeFramerate", + "baseName": "ReadAtNativeFramerate", + "type": "boolean" + }, + { + "name": "ignoreDts", + "baseName": "IgnoreDts", + "type": "boolean" + }, + { + "name": "ignoreIndex", + "baseName": "IgnoreIndex", + "type": "boolean" + }, + { + "name": "genPtsInput", + "baseName": "GenPtsInput", + "type": "boolean" + }, + { + "name": "supportsTranscoding", + "baseName": "SupportsTranscoding", + "type": "boolean" + }, + { + "name": "supportsDirectStream", + "baseName": "SupportsDirectStream", + "type": "boolean" + }, + { + "name": "supportsDirectPlay", + "baseName": "SupportsDirectPlay", + "type": "boolean" + }, + { + "name": "isInfiniteStream", + "baseName": "IsInfiniteStream", + "type": "boolean" + }, + { + "name": "requiresOpening", + "baseName": "RequiresOpening", + "type": "boolean" + }, + { + "name": "openToken", + "baseName": "OpenToken", + "type": "string" + }, + { + "name": "requiresClosing", + "baseName": "RequiresClosing", + "type": "boolean" + }, + { + "name": "liveStreamId", + "baseName": "LiveStreamId", + "type": "string" + }, + { + "name": "bufferMs", + "baseName": "BufferMs", + "type": "number" + }, + { + "name": "requiresLooping", + "baseName": "RequiresLooping", + "type": "boolean" + }, + { + "name": "supportsProbing", + "baseName": "SupportsProbing", + "type": "boolean" + }, + { + "name": "videoType", + "baseName": "VideoType", + "type": "VideoType" + }, + { + "name": "isoType", + "baseName": "IsoType", + "type": "IsoType" + }, + { + "name": "video3DFormat", + "baseName": "Video3DFormat", + "type": "Video3DFormat" + }, + { + "name": "mediaStreams", + "baseName": "MediaStreams", + "type": "Array" + }, + { + "name": "mediaAttachments", + "baseName": "MediaAttachments", + "type": "Array" + }, + { + "name": "formats", + "baseName": "Formats", + "type": "Array" + }, + { + "name": "bitrate", + "baseName": "Bitrate", + "type": "number" + }, + { + "name": "timestamp", + "baseName": "Timestamp", + "type": "TransportStreamTimestamp" + }, + { + "name": "requiredHttpHeaders", + "baseName": "RequiredHttpHeaders", + "type": "{ [key: string]: string; }" + }, + { + "name": "transcodingUrl", + "baseName": "TranscodingUrl", + "type": "string" + }, + { + "name": "transcodingSubProtocol", + "baseName": "TranscodingSubProtocol", + "type": "string" + }, + { + "name": "transcodingContainer", + "baseName": "TranscodingContainer", + "type": "string" + }, + { + "name": "analyzeDurationMs", + "baseName": "AnalyzeDurationMs", + "type": "number" + }, + { + "name": "defaultAudioStreamIndex", + "baseName": "DefaultAudioStreamIndex", + "type": "number" + }, + { + "name": "defaultSubtitleStreamIndex", + "baseName": "DefaultSubtitleStreamIndex", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return MediaSourceInfo.attributeTypeMap; + } +} + +export namespace MediaSourceInfo { +} diff --git a/jellyfin/model/mediaSourceType.ts b/jellyfin/model/mediaSourceType.ts new file mode 100644 index 0000000..b3d39cb --- /dev/null +++ b/jellyfin/model/mediaSourceType.ts @@ -0,0 +1,19 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export enum MediaSourceType { + Default = 'Default', + Grouping = 'Grouping', + Placeholder = 'Placeholder' +} diff --git a/jellyfin/model/mediaStream.ts b/jellyfin/model/mediaStream.ts new file mode 100644 index 0000000..4c92a9a --- /dev/null +++ b/jellyfin/model/mediaStream.ts @@ -0,0 +1,524 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { MediaStreamType } from './mediaStreamType'; +import { SubtitleDeliveryMethod } from './subtitleDeliveryMethod'; + +/** +* Class MediaStream. +*/ +export class MediaStream { + /** + * Gets or sets the codec. + */ + 'codec'?: string | null; + /** + * Gets or sets the codec tag. + */ + 'codecTag'?: string | null; + /** + * Gets or sets the language. + */ + 'language'?: string | null; + /** + * Gets or sets the color range. + */ + 'colorRange'?: string | null; + /** + * Gets or sets the color space. + */ + 'colorSpace'?: string | null; + /** + * Gets or sets the color transfer. + */ + 'colorTransfer'?: string | null; + /** + * Gets or sets the color primaries. + */ + 'colorPrimaries'?: string | null; + /** + * Gets or sets the Dolby Vision version major. + */ + 'dvVersionMajor'?: number | null; + /** + * Gets or sets the Dolby Vision version minor. + */ + 'dvVersionMinor'?: number | null; + /** + * Gets or sets the Dolby Vision profile. + */ + 'dvProfile'?: number | null; + /** + * Gets or sets the Dolby Vision level. + */ + 'dvLevel'?: number | null; + /** + * Gets or sets the Dolby Vision rpu present flag. + */ + 'rpuPresentFlag'?: number | null; + /** + * Gets or sets the Dolby Vision el present flag. + */ + 'elPresentFlag'?: number | null; + /** + * Gets or sets the Dolby Vision bl present flag. + */ + 'blPresentFlag'?: number | null; + /** + * Gets or sets the Dolby Vision bl signal compatibility id. + */ + 'dvBlSignalCompatibilityId'?: number | null; + /** + * Gets or sets the comment. + */ + 'comment'?: string | null; + /** + * Gets or sets the time base. + */ + 'timeBase'?: string | null; + /** + * Gets or sets the codec time base. + */ + 'codecTimeBase'?: string | null; + /** + * Gets or sets the title. + */ + 'title'?: string | null; + /** + * Gets the video range. + */ + 'videoRange'?: string | null; + /** + * Gets the video range type. + */ + 'videoRangeType'?: string | null; + /** + * Gets the video dovi title. + */ + 'videoDoViTitle'?: string | null; + 'localizedUndefined'?: string | null; + 'localizedDefault'?: string | null; + 'localizedForced'?: string | null; + 'localizedExternal'?: string | null; + 'displayTitle'?: string | null; + 'nalLengthSize'?: string | null; + /** + * Gets or sets a value indicating whether this instance is interlaced. + */ + 'isInterlaced'?: boolean; + 'isAVC'?: boolean | null; + /** + * Gets or sets the channel layout. + */ + 'channelLayout'?: string | null; + /** + * Gets or sets the bit rate. + */ + 'bitRate'?: number | null; + /** + * Gets or sets the bit depth. + */ + 'bitDepth'?: number | null; + /** + * Gets or sets the reference frames. + */ + 'refFrames'?: number | null; + /** + * Gets or sets the length of the packet. + */ + 'packetLength'?: number | null; + /** + * Gets or sets the channels. + */ + 'channels'?: number | null; + /** + * Gets or sets the sample rate. + */ + 'sampleRate'?: number | null; + /** + * Gets or sets a value indicating whether this instance is default. + */ + 'isDefault'?: boolean; + /** + * Gets or sets a value indicating whether this instance is forced. + */ + 'isForced'?: boolean; + /** + * Gets or sets the height. + */ + 'height'?: number | null; + /** + * Gets or sets the width. + */ + 'width'?: number | null; + /** + * Gets or sets the average frame rate. + */ + 'averageFrameRate'?: number | null; + /** + * Gets or sets the real frame rate. + */ + 'realFrameRate'?: number | null; + /** + * Gets or sets the profile. + */ + 'profile'?: string | null; + 'type'?: MediaStreamType; + /** + * Gets or sets the aspect ratio. + */ + 'aspectRatio'?: string | null; + /** + * Gets or sets the index. + */ + 'index'?: number; + /** + * Gets or sets the score. + */ + 'score'?: number | null; + /** + * Gets or sets a value indicating whether this instance is external. + */ + 'isExternal'?: boolean; + 'deliveryMethod'?: SubtitleDeliveryMethod | null; + /** + * Gets or sets the delivery URL. + */ + 'deliveryUrl'?: string | null; + /** + * Gets or sets a value indicating whether this instance is external URL. + */ + 'isExternalUrl'?: boolean | null; + 'isTextSubtitleStream'?: boolean; + /** + * Gets or sets a value indicating whether [supports external stream]. + */ + 'supportsExternalStream'?: boolean; + /** + * Gets or sets the filename. + */ + 'path'?: string | null; + /** + * Gets or sets the pixel format. + */ + 'pixelFormat'?: string | null; + /** + * Gets or sets the level. + */ + 'level'?: number | null; + /** + * Gets or sets whether this instance is anamorphic. + */ + 'isAnamorphic'?: boolean | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "codec", + "baseName": "Codec", + "type": "string" + }, + { + "name": "codecTag", + "baseName": "CodecTag", + "type": "string" + }, + { + "name": "language", + "baseName": "Language", + "type": "string" + }, + { + "name": "colorRange", + "baseName": "ColorRange", + "type": "string" + }, + { + "name": "colorSpace", + "baseName": "ColorSpace", + "type": "string" + }, + { + "name": "colorTransfer", + "baseName": "ColorTransfer", + "type": "string" + }, + { + "name": "colorPrimaries", + "baseName": "ColorPrimaries", + "type": "string" + }, + { + "name": "dvVersionMajor", + "baseName": "DvVersionMajor", + "type": "number" + }, + { + "name": "dvVersionMinor", + "baseName": "DvVersionMinor", + "type": "number" + }, + { + "name": "dvProfile", + "baseName": "DvProfile", + "type": "number" + }, + { + "name": "dvLevel", + "baseName": "DvLevel", + "type": "number" + }, + { + "name": "rpuPresentFlag", + "baseName": "RpuPresentFlag", + "type": "number" + }, + { + "name": "elPresentFlag", + "baseName": "ElPresentFlag", + "type": "number" + }, + { + "name": "blPresentFlag", + "baseName": "BlPresentFlag", + "type": "number" + }, + { + "name": "dvBlSignalCompatibilityId", + "baseName": "DvBlSignalCompatibilityId", + "type": "number" + }, + { + "name": "comment", + "baseName": "Comment", + "type": "string" + }, + { + "name": "timeBase", + "baseName": "TimeBase", + "type": "string" + }, + { + "name": "codecTimeBase", + "baseName": "CodecTimeBase", + "type": "string" + }, + { + "name": "title", + "baseName": "Title", + "type": "string" + }, + { + "name": "videoRange", + "baseName": "VideoRange", + "type": "string" + }, + { + "name": "videoRangeType", + "baseName": "VideoRangeType", + "type": "string" + }, + { + "name": "videoDoViTitle", + "baseName": "VideoDoViTitle", + "type": "string" + }, + { + "name": "localizedUndefined", + "baseName": "LocalizedUndefined", + "type": "string" + }, + { + "name": "localizedDefault", + "baseName": "LocalizedDefault", + "type": "string" + }, + { + "name": "localizedForced", + "baseName": "LocalizedForced", + "type": "string" + }, + { + "name": "localizedExternal", + "baseName": "LocalizedExternal", + "type": "string" + }, + { + "name": "displayTitle", + "baseName": "DisplayTitle", + "type": "string" + }, + { + "name": "nalLengthSize", + "baseName": "NalLengthSize", + "type": "string" + }, + { + "name": "isInterlaced", + "baseName": "IsInterlaced", + "type": "boolean" + }, + { + "name": "isAVC", + "baseName": "IsAVC", + "type": "boolean" + }, + { + "name": "channelLayout", + "baseName": "ChannelLayout", + "type": "string" + }, + { + "name": "bitRate", + "baseName": "BitRate", + "type": "number" + }, + { + "name": "bitDepth", + "baseName": "BitDepth", + "type": "number" + }, + { + "name": "refFrames", + "baseName": "RefFrames", + "type": "number" + }, + { + "name": "packetLength", + "baseName": "PacketLength", + "type": "number" + }, + { + "name": "channels", + "baseName": "Channels", + "type": "number" + }, + { + "name": "sampleRate", + "baseName": "SampleRate", + "type": "number" + }, + { + "name": "isDefault", + "baseName": "IsDefault", + "type": "boolean" + }, + { + "name": "isForced", + "baseName": "IsForced", + "type": "boolean" + }, + { + "name": "height", + "baseName": "Height", + "type": "number" + }, + { + "name": "width", + "baseName": "Width", + "type": "number" + }, + { + "name": "averageFrameRate", + "baseName": "AverageFrameRate", + "type": "number" + }, + { + "name": "realFrameRate", + "baseName": "RealFrameRate", + "type": "number" + }, + { + "name": "profile", + "baseName": "Profile", + "type": "string" + }, + { + "name": "type", + "baseName": "Type", + "type": "MediaStreamType" + }, + { + "name": "aspectRatio", + "baseName": "AspectRatio", + "type": "string" + }, + { + "name": "index", + "baseName": "Index", + "type": "number" + }, + { + "name": "score", + "baseName": "Score", + "type": "number" + }, + { + "name": "isExternal", + "baseName": "IsExternal", + "type": "boolean" + }, + { + "name": "deliveryMethod", + "baseName": "DeliveryMethod", + "type": "SubtitleDeliveryMethod" + }, + { + "name": "deliveryUrl", + "baseName": "DeliveryUrl", + "type": "string" + }, + { + "name": "isExternalUrl", + "baseName": "IsExternalUrl", + "type": "boolean" + }, + { + "name": "isTextSubtitleStream", + "baseName": "IsTextSubtitleStream", + "type": "boolean" + }, + { + "name": "supportsExternalStream", + "baseName": "SupportsExternalStream", + "type": "boolean" + }, + { + "name": "path", + "baseName": "Path", + "type": "string" + }, + { + "name": "pixelFormat", + "baseName": "PixelFormat", + "type": "string" + }, + { + "name": "level", + "baseName": "Level", + "type": "number" + }, + { + "name": "isAnamorphic", + "baseName": "IsAnamorphic", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return MediaStream.attributeTypeMap; + } +} + +export namespace MediaStream { +} diff --git a/jellyfin/model/mediaStreamType.ts b/jellyfin/model/mediaStreamType.ts new file mode 100644 index 0000000..faaf803 --- /dev/null +++ b/jellyfin/model/mediaStreamType.ts @@ -0,0 +1,24 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Enum MediaStreamType. +*/ +export enum MediaStreamType { + Audio = 'Audio', + Video = 'Video', + Subtitle = 'Subtitle', + EmbeddedImage = 'EmbeddedImage', + Data = 'Data' +} diff --git a/jellyfin/model/mediaUpdateInfoDto.ts b/jellyfin/model/mediaUpdateInfoDto.ts new file mode 100644 index 0000000..252b62c --- /dev/null +++ b/jellyfin/model/mediaUpdateInfoDto.ts @@ -0,0 +1,38 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { MediaUpdateInfoPathDto } from './mediaUpdateInfoPathDto'; + +/** +* Media Update Info Dto. +*/ +export class MediaUpdateInfoDto { + /** + * Gets or sets the list of updates. + */ + 'updates'?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "updates", + "baseName": "Updates", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return MediaUpdateInfoDto.attributeTypeMap; + } +} + diff --git a/jellyfin/model/mediaUpdateInfoPathDto.ts b/jellyfin/model/mediaUpdateInfoPathDto.ts new file mode 100644 index 0000000..1fb50b8 --- /dev/null +++ b/jellyfin/model/mediaUpdateInfoPathDto.ts @@ -0,0 +1,46 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* The media update info path. +*/ +export class MediaUpdateInfoPathDto { + /** + * Gets or sets media path. + */ + 'path'?: string | null; + /** + * Gets or sets media update type. Created, Modified, Deleted. + */ + 'updateType'?: string | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "path", + "baseName": "Path", + "type": "string" + }, + { + "name": "updateType", + "baseName": "UpdateType", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return MediaUpdateInfoPathDto.attributeTypeMap; + } +} + diff --git a/jellyfin/model/mediaUrl.ts b/jellyfin/model/mediaUrl.ts new file mode 100644 index 0000000..40a5304 --- /dev/null +++ b/jellyfin/model/mediaUrl.ts @@ -0,0 +1,37 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class MediaUrl { + 'url'?: string | null; + 'name'?: string | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "url", + "baseName": "Url", + "type": "string" + }, + { + "name": "name", + "baseName": "Name", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return MediaUrl.attributeTypeMap; + } +} + diff --git a/jellyfin/model/messageCommand.ts b/jellyfin/model/messageCommand.ts new file mode 100644 index 0000000..143618f --- /dev/null +++ b/jellyfin/model/messageCommand.ts @@ -0,0 +1,43 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class MessageCommand { + 'header'?: string | null; + 'text': string; + 'timeoutMs'?: number | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "header", + "baseName": "Header", + "type": "string" + }, + { + "name": "text", + "baseName": "Text", + "type": "string" + }, + { + "name": "timeoutMs", + "baseName": "TimeoutMs", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return MessageCommand.attributeTypeMap; + } +} + diff --git a/jellyfin/model/metadataConfiguration.ts b/jellyfin/model/metadataConfiguration.ts new file mode 100644 index 0000000..615edad --- /dev/null +++ b/jellyfin/model/metadataConfiguration.ts @@ -0,0 +1,31 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class MetadataConfiguration { + 'useFileCreationTimeForDateAdded'?: boolean; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "useFileCreationTimeForDateAdded", + "baseName": "UseFileCreationTimeForDateAdded", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return MetadataConfiguration.attributeTypeMap; + } +} + diff --git a/jellyfin/model/metadataEditorInfo.ts b/jellyfin/model/metadataEditorInfo.ts new file mode 100644 index 0000000..ca2e8d9 --- /dev/null +++ b/jellyfin/model/metadataEditorInfo.ts @@ -0,0 +1,66 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { CountryInfo } from './countryInfo'; +import { CultureDto } from './cultureDto'; +import { ExternalIdInfo } from './externalIdInfo'; +import { NameValuePair } from './nameValuePair'; +import { ParentalRating } from './parentalRating'; + +export class MetadataEditorInfo { + 'parentalRatingOptions'?: Array; + 'countries'?: Array; + 'cultures'?: Array; + 'externalIdInfos'?: Array; + 'contentType'?: string | null; + 'contentTypeOptions'?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "parentalRatingOptions", + "baseName": "ParentalRatingOptions", + "type": "Array" + }, + { + "name": "countries", + "baseName": "Countries", + "type": "Array" + }, + { + "name": "cultures", + "baseName": "Cultures", + "type": "Array" + }, + { + "name": "externalIdInfos", + "baseName": "ExternalIdInfos", + "type": "Array" + }, + { + "name": "contentType", + "baseName": "ContentType", + "type": "string" + }, + { + "name": "contentTypeOptions", + "baseName": "ContentTypeOptions", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return MetadataEditorInfo.attributeTypeMap; + } +} + diff --git a/jellyfin/model/metadataField.ts b/jellyfin/model/metadataField.ts new file mode 100644 index 0000000..cdabfdc --- /dev/null +++ b/jellyfin/model/metadataField.ts @@ -0,0 +1,28 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Enum MetadataFields. +*/ +export enum MetadataField { + Cast = 'Cast', + Genres = 'Genres', + ProductionLocations = 'ProductionLocations', + Studios = 'Studios', + Tags = 'Tags', + Name = 'Name', + Overview = 'Overview', + Runtime = 'Runtime', + OfficialRating = 'OfficialRating' +} diff --git a/jellyfin/model/metadataOptions.ts b/jellyfin/model/metadataOptions.ts new file mode 100644 index 0000000..3eb1d5c --- /dev/null +++ b/jellyfin/model/metadataOptions.ts @@ -0,0 +1,70 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Class MetadataOptions. +*/ +export class MetadataOptions { + 'itemType'?: string | null; + 'disabledMetadataSavers'?: Array | null; + 'localMetadataReaderOrder'?: Array | null; + 'disabledMetadataFetchers'?: Array | null; + 'metadataFetcherOrder'?: Array | null; + 'disabledImageFetchers'?: Array | null; + 'imageFetcherOrder'?: Array | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "itemType", + "baseName": "ItemType", + "type": "string" + }, + { + "name": "disabledMetadataSavers", + "baseName": "DisabledMetadataSavers", + "type": "Array" + }, + { + "name": "localMetadataReaderOrder", + "baseName": "LocalMetadataReaderOrder", + "type": "Array" + }, + { + "name": "disabledMetadataFetchers", + "baseName": "DisabledMetadataFetchers", + "type": "Array" + }, + { + "name": "metadataFetcherOrder", + "baseName": "MetadataFetcherOrder", + "type": "Array" + }, + { + "name": "disabledImageFetchers", + "baseName": "DisabledImageFetchers", + "type": "Array" + }, + { + "name": "imageFetcherOrder", + "baseName": "ImageFetcherOrder", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return MetadataOptions.attributeTypeMap; + } +} + diff --git a/jellyfin/model/metadataRefreshMode.ts b/jellyfin/model/metadataRefreshMode.ts new file mode 100644 index 0000000..9c9f6a6 --- /dev/null +++ b/jellyfin/model/metadataRefreshMode.ts @@ -0,0 +1,20 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export enum MetadataRefreshMode { + None = 'None', + ValidationOnly = 'ValidationOnly', + Default = 'Default', + FullRefresh = 'FullRefresh' +} diff --git a/jellyfin/model/models.ts b/jellyfin/model/models.ts new file mode 100644 index 0000000..984f3e1 --- /dev/null +++ b/jellyfin/model/models.ts @@ -0,0 +1,1341 @@ +import localVarRequest from 'request'; + +export * from './accessSchedule'; +export * from './activityLogEntry'; +export * from './activityLogEntryQueryResult'; +export * from './addListingProviderRequest'; +export * from './addMediaPathRequest'; +export * from './addTunerHostRequest'; +export * from './addVirtualFolderDto'; +export * from './addVirtualFolderDtoLibraryOptions'; +export * from './addVirtualFolderRequest'; +export * from './adminNotificationDto'; +export * from './albumInfo'; +export * from './albumInfoRemoteSearchQuery'; +export * from './allThemeMediaResult'; +export * from './allThemeMediaResultThemeVideosResult'; +export * from './applySearchCriteriaRequest'; +export * from './architecture'; +export * from './artistInfo'; +export * from './artistInfoRemoteSearchQuery'; +export * from './authenticateUserByName'; +export * from './authenticateUserByNameRequest'; +export * from './authenticateWithQuickConnectRequest'; +export * from './authenticationInfo'; +export * from './authenticationInfoQueryResult'; +export * from './authenticationResult'; +export * from './authenticationResultSessionInfo'; +export * from './authenticationResultUser'; +export * from './baseItem'; +export * from './baseItemDto'; +export * from './baseItemDtoCurrentProgram'; +export * from './baseItemDtoImageBlurHashes'; +export * from './baseItemDtoQueryResult'; +export * from './baseItemDtoUserData'; +export * from './baseItemKind'; +export * from './baseItemPerson'; +export * from './baseItemPersonImageBlurHashes'; +export * from './bookInfo'; +export * from './bookInfoRemoteSearchQuery'; +export * from './boxSetInfo'; +export * from './boxSetInfoRemoteSearchQuery'; +export * from './brandingOptions'; +export * from './bufferRequestDto'; +export * from './channelFeatures'; +export * from './channelItemSortField'; +export * from './channelMappingOptionsDto'; +export * from './channelMediaContentType'; +export * from './channelMediaType'; +export * from './channelType'; +export * from './chapterInfo'; +export * from './clientCapabilities'; +export * from './clientCapabilitiesDeviceProfile'; +export * from './clientCapabilitiesDto'; +export * from './clientCapabilitiesDtoDeviceProfile'; +export * from './clientLogDocumentResponseDto'; +export * from './codecProfile'; +export * from './codecType'; +export * from './collectionCreationResult'; +export * from './collectionTypeOptions'; +export * from './configImageTypes'; +export * from './configurationPageInfo'; +export * from './containerProfile'; +export * from './controlResponse'; +export * from './countryInfo'; +export * from './createAdminNotificationRequest'; +export * from './createPlaylistDto'; +export * from './createPlaylistRequest'; +export * from './createProfileRequest'; +export * from './createSeriesTimerRequest'; +export * from './createTimerRequest'; +export * from './createUserByName'; +export * from './createUserByNameRequest'; +export * from './cultureDto'; +export * from './dayOfWeek'; +export * from './dayPattern'; +export * from './defaultDirectoryBrowserInfoDto'; +export * from './deviceIdentification'; +export * from './deviceInfo'; +export * from './deviceInfoCapabilities'; +export * from './deviceInfoQueryResult'; +export * from './deviceOptions'; +export * from './deviceOptionsDto'; +export * from './deviceProfile'; +export * from './deviceProfileIdentification'; +export * from './deviceProfileInfo'; +export * from './deviceProfileType'; +export * from './directPlayProfile'; +export * from './displayPreferencesDto'; +export * from './dlnaOptions'; +export * from './dlnaProfileType'; +export * from './dynamicDayOfWeek'; +export * from './embeddedSubtitleOptions'; +export * from './encodingContext'; +export * from './encodingOptions'; +export * from './endPointInfo'; +export * from './externalIdInfo'; +export * from './externalIdMediaType'; +export * from './externalUrl'; +export * from './fFmpegLocation'; +export * from './fileSystemEntryInfo'; +export * from './fileSystemEntryType'; +export * from './fontFile'; +export * from './forgotPasswordAction'; +export * from './forgotPasswordDto'; +export * from './forgotPasswordPinDto'; +export * from './forgotPasswordPinRequest'; +export * from './forgotPasswordRequest'; +export * from './forgotPasswordResult'; +export * from './generalCommand'; +export * from './generalCommandType'; +export * from './getBookRemoteSearchResultsRequest'; +export * from './getBoxSetRemoteSearchResultsRequest'; +export * from './getMovieRemoteSearchResultsRequest'; +export * from './getMusicAlbumRemoteSearchResultsRequest'; +export * from './getMusicArtistRemoteSearchResultsRequest'; +export * from './getMusicVideoRemoteSearchResultsRequest'; +export * from './getPersonRemoteSearchResultsRequest'; +export * from './getPostedPlaybackInfoRequest'; +export * from './getProgramsDto'; +export * from './getProgramsRequest'; +export * from './getSeriesRemoteSearchResultsRequest'; +export * from './getTrailerRemoteSearchResultsRequest'; +export * from './groupInfoDto'; +export * from './groupQueueMode'; +export * from './groupRepeatMode'; +export * from './groupShuffleMode'; +export * from './groupStateType'; +export * from './groupUpdateType'; +export * from './guideInfo'; +export * from './hardwareEncodingType'; +export * from './headerMatchType'; +export * from './httpHeaderInfo'; +export * from './iPlugin'; +export * from './ignoreWaitRequestDto'; +export * from './imageByNameInfo'; +export * from './imageFormat'; +export * from './imageInfo'; +export * from './imageOption'; +export * from './imageOrientation'; +export * from './imageProviderInfo'; +export * from './imageSavingConvention'; +export * from './imageType'; +export * from './installationInfo'; +export * from './installationInfoPackageInfo'; +export * from './isoType'; +export * from './itemCounts'; +export * from './itemFields'; +export * from './itemFilter'; +export * from './joinGroupRequestDto'; +export * from './keepUntil'; +export * from './libraryOptionInfoDto'; +export * from './libraryOptions'; +export * from './libraryOptionsResultDto'; +export * from './libraryTypeOptionsDto'; +export * from './libraryUpdateInfo'; +export * from './listingsProviderInfo'; +export * from './liveStreamResponse'; +export * from './liveStreamResponseMediaSource'; +export * from './liveTvInfo'; +export * from './liveTvOptions'; +export * from './liveTvServiceInfo'; +export * from './liveTvServiceStatus'; +export * from './localizationOption'; +export * from './locationType'; +export * from './logFile'; +export * from './logLevel'; +export * from './mediaAttachment'; +export * from './mediaEncoderPathDto'; +export * from './mediaPathDto'; +export * from './mediaPathDtoPathInfo'; +export * from './mediaPathInfo'; +export * from './mediaProtocol'; +export * from './mediaSourceInfo'; +export * from './mediaSourceType'; +export * from './mediaStream'; +export * from './mediaStreamType'; +export * from './mediaUpdateInfoDto'; +export * from './mediaUpdateInfoPathDto'; +export * from './mediaUrl'; +export * from './messageCommand'; +export * from './metadataConfiguration'; +export * from './metadataEditorInfo'; +export * from './metadataField'; +export * from './metadataOptions'; +export * from './metadataRefreshMode'; +export * from './movePlaylistItemRequestDto'; +export * from './movieInfo'; +export * from './movieInfoRemoteSearchQuery'; +export * from './musicVideoInfo'; +export * from './musicVideoInfoRemoteSearchQuery'; +export * from './nameGuidPair'; +export * from './nameIdPair'; +export * from './nameValuePair'; +export * from './networkConfiguration'; +export * from './newGroupRequestDto'; +export * from './nextItemRequestDto'; +export * from './notificationDto'; +export * from './notificationLevel'; +export * from './notificationOption'; +export * from './notificationOptions'; +export * from './notificationResultDto'; +export * from './notificationTypeInfo'; +export * from './notificationsSummaryDto'; +export * from './objectGroupUpdate'; +export * from './openLiveStreamDto'; +export * from './openLiveStreamRequest'; +export * from './packageInfo'; +export * from './parentalRating'; +export * from './pathSubstitution'; +export * from './personLookupInfo'; +export * from './personLookupInfoRemoteSearchQuery'; +export * from './pinRedeemResult'; +export * from './pingRequestDto'; +export * from './playAccess'; +export * from './playCommand'; +export * from './playMethod'; +export * from './playRequest'; +export * from './playRequestDto'; +export * from './playbackErrorCode'; +export * from './playbackInfoDto'; +export * from './playbackInfoResponse'; +export * from './playbackProgressInfo'; +export * from './playbackProgressInfoItem'; +export * from './playbackStartInfo'; +export * from './playbackStopInfo'; +export * from './playerStateInfo'; +export * from './playlistCreationResult'; +export * from './playstateCommand'; +export * from './playstateRequest'; +export * from './pluginInfo'; +export * from './pluginStatus'; +export * from './postFullCapabilitiesRequest'; +export * from './postUpdatedMediaRequest'; +export * from './previousItemRequestDto'; +export * from './problemDetails'; +export * from './profileCondition'; +export * from './profileConditionType'; +export * from './profileConditionValue'; +export * from './programAudio'; +export * from './publicSystemInfo'; +export * from './queryFilters'; +export * from './queryFiltersLegacy'; +export * from './queueItem'; +export * from './queueRequestDto'; +export * from './quickConnectDto'; +export * from './quickConnectResult'; +export * from './ratingType'; +export * from './readyRequestDto'; +export * from './recommendationDto'; +export * from './recommendationType'; +export * from './recordingStatus'; +export * from './remoteImageInfo'; +export * from './remoteImageResult'; +export * from './remoteSearchResult'; +export * from './remoteSubtitleInfo'; +export * from './removeFromPlaylistRequestDto'; +export * from './repeatMode'; +export * from './reportPlaybackProgressRequest'; +export * from './reportPlaybackStartRequest'; +export * from './reportPlaybackStoppedRequest'; +export * from './repositoryInfo'; +export * from './responseProfile'; +export * from './scrollDirection'; +export * from './searchHint'; +export * from './searchHintResult'; +export * from './seekRequestDto'; +export * from './sendCommand'; +export * from './sendCommandType'; +export * from './sendFullGeneralCommandRequest'; +export * from './sendMessageCommandRequest'; +export * from './sendToUserType'; +export * from './seriesInfo'; +export * from './seriesInfoRemoteSearchQuery'; +export * from './seriesStatus'; +export * from './seriesTimerInfoDto'; +export * from './seriesTimerInfoDtoQueryResult'; +export * from './serverConfiguration'; +export * from './serverDiscoveryInfo'; +export * from './sessionInfo'; +export * from './sessionInfoFullNowPlayingItem'; +export * from './sessionInfoNowPlayingItem'; +export * from './sessionMessageType'; +export * from './sessionUserInfo'; +export * from './setChannelMappingDto'; +export * from './setChannelMappingRequest'; +export * from './setPlaylistItemRequestDto'; +export * from './setRemoteAccessRequest'; +export * from './setRepeatModeRequestDto'; +export * from './setShuffleModeRequestDto'; +export * from './songInfo'; +export * from './sortOrder'; +export * from './specialViewOptionDto'; +export * from './startupConfigurationDto'; +export * from './startupRemoteAccessDto'; +export * from './startupUserDto'; +export * from './subtitleDeliveryMethod'; +export * from './subtitleOptions'; +export * from './subtitlePlaybackMode'; +export * from './subtitleProfile'; +export * from './syncPlayBufferingRequest'; +export * from './syncPlayCreateGroupRequest'; +export * from './syncPlayJoinGroupRequest'; +export * from './syncPlayMovePlaylistItemRequest'; +export * from './syncPlayNextItemRequest'; +export * from './syncPlayPingRequest'; +export * from './syncPlayPreviousItemRequest'; +export * from './syncPlayQueueRequest'; +export * from './syncPlayReadyRequest'; +export * from './syncPlayRemoveFromPlaylistRequest'; +export * from './syncPlaySeekRequest'; +export * from './syncPlaySetIgnoreWaitRequest'; +export * from './syncPlaySetNewQueueRequest'; +export * from './syncPlaySetPlaylistItemRequest'; +export * from './syncPlaySetRepeatModeRequest'; +export * from './syncPlaySetShuffleModeRequest'; +export * from './syncPlayUserAccessType'; +export * from './systemInfo'; +export * from './taskCompletionStatus'; +export * from './taskInfo'; +export * from './taskInfoLastExecutionResult'; +export * from './taskResult'; +export * from './taskState'; +export * from './taskTriggerInfo'; +export * from './themeMediaResult'; +export * from './timerEventInfo'; +export * from './timerInfoDto'; +export * from './timerInfoDtoProgramInfo'; +export * from './timerInfoDtoQueryResult'; +export * from './trailerInfo'; +export * from './trailerInfoRemoteSearchQuery'; +export * from './transcodeReason'; +export * from './transcodeSeekInfo'; +export * from './transcodingInfo'; +export * from './transcodingProfile'; +export * from './transportStreamTimestamp'; +export * from './tunerChannelMapping'; +export * from './tunerHostInfo'; +export * from './typeOptions'; +export * from './unratedItem'; +export * from './updateConfigurationRequest'; +export * from './updateDeviceOptionsRequest'; +export * from './updateDisplayPreferencesRequest'; +export * from './updateInitialConfigurationRequest'; +export * from './updateItemRequest'; +export * from './updateLibraryOptionsDto'; +export * from './updateLibraryOptionsRequest'; +export * from './updateMediaEncoderPathRequest'; +export * from './updateMediaPathRequest'; +export * from './updateMediaPathRequestDto'; +export * from './updateMediaPathRequestDtoPathInfo'; +export * from './updateStartupUserRequest'; +export * from './updateUserConfigurationRequest'; +export * from './updateUserEasyPassword'; +export * from './updateUserEasyPasswordRequest'; +export * from './updateUserPassword'; +export * from './updateUserPasswordRequest'; +export * from './updateUserPolicyRequest'; +export * from './updateUserRequest'; +export * from './uploadSubtitleDto'; +export * from './uploadSubtitleRequest'; +export * from './userConfiguration'; +export * from './userDto'; +export * from './userDtoConfiguration'; +export * from './userDtoPolicy'; +export * from './userItemDataDto'; +export * from './userPolicy'; +export * from './utcTimeResponse'; +export * from './validatePathDto'; +export * from './validatePathRequest'; +export * from './versionInfo'; +export * from './video3DFormat'; +export * from './videoType'; +export * from './virtualFolderInfo'; +export * from './wakeOnLanInfo'; +export * from './xbmcMetadataOptions'; +export * from './xmlAttribute'; + +import * as fs from 'fs'; + +export interface RequestDetailedFile { + value: Buffer; + options?: { + filename?: string; + contentType?: string; + } +} + +export type RequestFile = string | Buffer | fs.ReadStream | RequestDetailedFile; + + +import { AccessSchedule } from './accessSchedule'; +import { ActivityLogEntry } from './activityLogEntry'; +import { ActivityLogEntryQueryResult } from './activityLogEntryQueryResult'; +import { AddListingProviderRequest } from './addListingProviderRequest'; +import { AddMediaPathRequest } from './addMediaPathRequest'; +import { AddTunerHostRequest } from './addTunerHostRequest'; +import { AddVirtualFolderDto } from './addVirtualFolderDto'; +import { AddVirtualFolderDtoLibraryOptions } from './addVirtualFolderDtoLibraryOptions'; +import { AddVirtualFolderRequest } from './addVirtualFolderRequest'; +import { AdminNotificationDto } from './adminNotificationDto'; +import { AlbumInfo } from './albumInfo'; +import { AlbumInfoRemoteSearchQuery } from './albumInfoRemoteSearchQuery'; +import { AllThemeMediaResult } from './allThemeMediaResult'; +import { AllThemeMediaResultThemeVideosResult } from './allThemeMediaResultThemeVideosResult'; +import { ApplySearchCriteriaRequest } from './applySearchCriteriaRequest'; +import { Architecture } from './architecture'; +import { ArtistInfo } from './artistInfo'; +import { ArtistInfoRemoteSearchQuery } from './artistInfoRemoteSearchQuery'; +import { AuthenticateUserByName } from './authenticateUserByName'; +import { AuthenticateUserByNameRequest } from './authenticateUserByNameRequest'; +import { AuthenticateWithQuickConnectRequest } from './authenticateWithQuickConnectRequest'; +import { AuthenticationInfo } from './authenticationInfo'; +import { AuthenticationInfoQueryResult } from './authenticationInfoQueryResult'; +import { AuthenticationResult } from './authenticationResult'; +import { AuthenticationResultSessionInfo } from './authenticationResultSessionInfo'; +import { AuthenticationResultUser } from './authenticationResultUser'; +import { BaseItem } from './baseItem'; +import { BaseItemDto } from './baseItemDto'; +import { BaseItemDtoCurrentProgram } from './baseItemDtoCurrentProgram'; +import { BaseItemDtoImageBlurHashes } from './baseItemDtoImageBlurHashes'; +import { BaseItemDtoQueryResult } from './baseItemDtoQueryResult'; +import { BaseItemDtoUserData } from './baseItemDtoUserData'; +import { BaseItemKind } from './baseItemKind'; +import { BaseItemPerson } from './baseItemPerson'; +import { BaseItemPersonImageBlurHashes } from './baseItemPersonImageBlurHashes'; +import { BookInfo } from './bookInfo'; +import { BookInfoRemoteSearchQuery } from './bookInfoRemoteSearchQuery'; +import { BoxSetInfo } from './boxSetInfo'; +import { BoxSetInfoRemoteSearchQuery } from './boxSetInfoRemoteSearchQuery'; +import { BrandingOptions } from './brandingOptions'; +import { BufferRequestDto } from './bufferRequestDto'; +import { ChannelFeatures } from './channelFeatures'; +import { ChannelItemSortField } from './channelItemSortField'; +import { ChannelMappingOptionsDto } from './channelMappingOptionsDto'; +import { ChannelMediaContentType } from './channelMediaContentType'; +import { ChannelMediaType } from './channelMediaType'; +import { ChannelType } from './channelType'; +import { ChapterInfo } from './chapterInfo'; +import { ClientCapabilities } from './clientCapabilities'; +import { ClientCapabilitiesDeviceProfile } from './clientCapabilitiesDeviceProfile'; +import { ClientCapabilitiesDto } from './clientCapabilitiesDto'; +import { ClientCapabilitiesDtoDeviceProfile } from './clientCapabilitiesDtoDeviceProfile'; +import { ClientLogDocumentResponseDto } from './clientLogDocumentResponseDto'; +import { CodecProfile } from './codecProfile'; +import { CodecType } from './codecType'; +import { CollectionCreationResult } from './collectionCreationResult'; +import { CollectionTypeOptions } from './collectionTypeOptions'; +import { ConfigImageTypes } from './configImageTypes'; +import { ConfigurationPageInfo } from './configurationPageInfo'; +import { ContainerProfile } from './containerProfile'; +import { ControlResponse } from './controlResponse'; +import { CountryInfo } from './countryInfo'; +import { CreateAdminNotificationRequest } from './createAdminNotificationRequest'; +import { CreatePlaylistDto } from './createPlaylistDto'; +import { CreatePlaylistRequest } from './createPlaylistRequest'; +import { CreateProfileRequest } from './createProfileRequest'; +import { CreateSeriesTimerRequest } from './createSeriesTimerRequest'; +import { CreateTimerRequest } from './createTimerRequest'; +import { CreateUserByName } from './createUserByName'; +import { CreateUserByNameRequest } from './createUserByNameRequest'; +import { CultureDto } from './cultureDto'; +import { DayOfWeek } from './dayOfWeek'; +import { DayPattern } from './dayPattern'; +import { DefaultDirectoryBrowserInfoDto } from './defaultDirectoryBrowserInfoDto'; +import { DeviceIdentification } from './deviceIdentification'; +import { DeviceInfo } from './deviceInfo'; +import { DeviceInfoCapabilities } from './deviceInfoCapabilities'; +import { DeviceInfoQueryResult } from './deviceInfoQueryResult'; +import { DeviceOptions } from './deviceOptions'; +import { DeviceOptionsDto } from './deviceOptionsDto'; +import { DeviceProfile } from './deviceProfile'; +import { DeviceProfileIdentification } from './deviceProfileIdentification'; +import { DeviceProfileInfo } from './deviceProfileInfo'; +import { DeviceProfileType } from './deviceProfileType'; +import { DirectPlayProfile } from './directPlayProfile'; +import { DisplayPreferencesDto } from './displayPreferencesDto'; +import { DlnaOptions } from './dlnaOptions'; +import { DlnaProfileType } from './dlnaProfileType'; +import { DynamicDayOfWeek } from './dynamicDayOfWeek'; +import { EmbeddedSubtitleOptions } from './embeddedSubtitleOptions'; +import { EncodingContext } from './encodingContext'; +import { EncodingOptions } from './encodingOptions'; +import { EndPointInfo } from './endPointInfo'; +import { ExternalIdInfo } from './externalIdInfo'; +import { ExternalIdMediaType } from './externalIdMediaType'; +import { ExternalUrl } from './externalUrl'; +import { FFmpegLocation } from './fFmpegLocation'; +import { FileSystemEntryInfo } from './fileSystemEntryInfo'; +import { FileSystemEntryType } from './fileSystemEntryType'; +import { FontFile } from './fontFile'; +import { ForgotPasswordAction } from './forgotPasswordAction'; +import { ForgotPasswordDto } from './forgotPasswordDto'; +import { ForgotPasswordPinDto } from './forgotPasswordPinDto'; +import { ForgotPasswordPinRequest } from './forgotPasswordPinRequest'; +import { ForgotPasswordRequest } from './forgotPasswordRequest'; +import { ForgotPasswordResult } from './forgotPasswordResult'; +import { GeneralCommand } from './generalCommand'; +import { GeneralCommandType } from './generalCommandType'; +import { GetBookRemoteSearchResultsRequest } from './getBookRemoteSearchResultsRequest'; +import { GetBoxSetRemoteSearchResultsRequest } from './getBoxSetRemoteSearchResultsRequest'; +import { GetMovieRemoteSearchResultsRequest } from './getMovieRemoteSearchResultsRequest'; +import { GetMusicAlbumRemoteSearchResultsRequest } from './getMusicAlbumRemoteSearchResultsRequest'; +import { GetMusicArtistRemoteSearchResultsRequest } from './getMusicArtistRemoteSearchResultsRequest'; +import { GetMusicVideoRemoteSearchResultsRequest } from './getMusicVideoRemoteSearchResultsRequest'; +import { GetPersonRemoteSearchResultsRequest } from './getPersonRemoteSearchResultsRequest'; +import { GetPostedPlaybackInfoRequest } from './getPostedPlaybackInfoRequest'; +import { GetProgramsDto } from './getProgramsDto'; +import { GetProgramsRequest } from './getProgramsRequest'; +import { GetSeriesRemoteSearchResultsRequest } from './getSeriesRemoteSearchResultsRequest'; +import { GetTrailerRemoteSearchResultsRequest } from './getTrailerRemoteSearchResultsRequest'; +import { GroupInfoDto } from './groupInfoDto'; +import { GroupQueueMode } from './groupQueueMode'; +import { GroupRepeatMode } from './groupRepeatMode'; +import { GroupShuffleMode } from './groupShuffleMode'; +import { GroupStateType } from './groupStateType'; +import { GroupUpdateType } from './groupUpdateType'; +import { GuideInfo } from './guideInfo'; +import { HardwareEncodingType } from './hardwareEncodingType'; +import { HeaderMatchType } from './headerMatchType'; +import { HttpHeaderInfo } from './httpHeaderInfo'; +import { IPlugin } from './iPlugin'; +import { IgnoreWaitRequestDto } from './ignoreWaitRequestDto'; +import { ImageByNameInfo } from './imageByNameInfo'; +import { ImageFormat } from './imageFormat'; +import { ImageInfo } from './imageInfo'; +import { ImageOption } from './imageOption'; +import { ImageOrientation } from './imageOrientation'; +import { ImageProviderInfo } from './imageProviderInfo'; +import { ImageSavingConvention } from './imageSavingConvention'; +import { ImageType } from './imageType'; +import { InstallationInfo } from './installationInfo'; +import { InstallationInfoPackageInfo } from './installationInfoPackageInfo'; +import { IsoType } from './isoType'; +import { ItemCounts } from './itemCounts'; +import { ItemFields } from './itemFields'; +import { ItemFilter } from './itemFilter'; +import { JoinGroupRequestDto } from './joinGroupRequestDto'; +import { KeepUntil } from './keepUntil'; +import { LibraryOptionInfoDto } from './libraryOptionInfoDto'; +import { LibraryOptions } from './libraryOptions'; +import { LibraryOptionsResultDto } from './libraryOptionsResultDto'; +import { LibraryTypeOptionsDto } from './libraryTypeOptionsDto'; +import { LibraryUpdateInfo } from './libraryUpdateInfo'; +import { ListingsProviderInfo } from './listingsProviderInfo'; +import { LiveStreamResponse } from './liveStreamResponse'; +import { LiveStreamResponseMediaSource } from './liveStreamResponseMediaSource'; +import { LiveTvInfo } from './liveTvInfo'; +import { LiveTvOptions } from './liveTvOptions'; +import { LiveTvServiceInfo } from './liveTvServiceInfo'; +import { LiveTvServiceStatus } from './liveTvServiceStatus'; +import { LocalizationOption } from './localizationOption'; +import { LocationType } from './locationType'; +import { LogFile } from './logFile'; +import { LogLevel } from './logLevel'; +import { MediaAttachment } from './mediaAttachment'; +import { MediaEncoderPathDto } from './mediaEncoderPathDto'; +import { MediaPathDto } from './mediaPathDto'; +import { MediaPathDtoPathInfo } from './mediaPathDtoPathInfo'; +import { MediaPathInfo } from './mediaPathInfo'; +import { MediaProtocol } from './mediaProtocol'; +import { MediaSourceInfo } from './mediaSourceInfo'; +import { MediaSourceType } from './mediaSourceType'; +import { MediaStream } from './mediaStream'; +import { MediaStreamType } from './mediaStreamType'; +import { MediaUpdateInfoDto } from './mediaUpdateInfoDto'; +import { MediaUpdateInfoPathDto } from './mediaUpdateInfoPathDto'; +import { MediaUrl } from './mediaUrl'; +import { MessageCommand } from './messageCommand'; +import { MetadataConfiguration } from './metadataConfiguration'; +import { MetadataEditorInfo } from './metadataEditorInfo'; +import { MetadataField } from './metadataField'; +import { MetadataOptions } from './metadataOptions'; +import { MetadataRefreshMode } from './metadataRefreshMode'; +import { MovePlaylistItemRequestDto } from './movePlaylistItemRequestDto'; +import { MovieInfo } from './movieInfo'; +import { MovieInfoRemoteSearchQuery } from './movieInfoRemoteSearchQuery'; +import { MusicVideoInfo } from './musicVideoInfo'; +import { MusicVideoInfoRemoteSearchQuery } from './musicVideoInfoRemoteSearchQuery'; +import { NameGuidPair } from './nameGuidPair'; +import { NameIdPair } from './nameIdPair'; +import { NameValuePair } from './nameValuePair'; +import { NetworkConfiguration } from './networkConfiguration'; +import { NewGroupRequestDto } from './newGroupRequestDto'; +import { NextItemRequestDto } from './nextItemRequestDto'; +import { NotificationDto } from './notificationDto'; +import { NotificationLevel } from './notificationLevel'; +import { NotificationOption } from './notificationOption'; +import { NotificationOptions } from './notificationOptions'; +import { NotificationResultDto } from './notificationResultDto'; +import { NotificationTypeInfo } from './notificationTypeInfo'; +import { NotificationsSummaryDto } from './notificationsSummaryDto'; +import { ObjectGroupUpdate } from './objectGroupUpdate'; +import { OpenLiveStreamDto } from './openLiveStreamDto'; +import { OpenLiveStreamRequest } from './openLiveStreamRequest'; +import { PackageInfo } from './packageInfo'; +import { ParentalRating } from './parentalRating'; +import { PathSubstitution } from './pathSubstitution'; +import { PersonLookupInfo } from './personLookupInfo'; +import { PersonLookupInfoRemoteSearchQuery } from './personLookupInfoRemoteSearchQuery'; +import { PinRedeemResult } from './pinRedeemResult'; +import { PingRequestDto } from './pingRequestDto'; +import { PlayAccess } from './playAccess'; +import { PlayCommand } from './playCommand'; +import { PlayMethod } from './playMethod'; +import { PlayRequest } from './playRequest'; +import { PlayRequestDto } from './playRequestDto'; +import { PlaybackErrorCode } from './playbackErrorCode'; +import { PlaybackInfoDto } from './playbackInfoDto'; +import { PlaybackInfoResponse } from './playbackInfoResponse'; +import { PlaybackProgressInfo } from './playbackProgressInfo'; +import { PlaybackProgressInfoItem } from './playbackProgressInfoItem'; +import { PlaybackStartInfo } from './playbackStartInfo'; +import { PlaybackStopInfo } from './playbackStopInfo'; +import { PlayerStateInfo } from './playerStateInfo'; +import { PlaylistCreationResult } from './playlistCreationResult'; +import { PlaystateCommand } from './playstateCommand'; +import { PlaystateRequest } from './playstateRequest'; +import { PluginInfo } from './pluginInfo'; +import { PluginStatus } from './pluginStatus'; +import { PostFullCapabilitiesRequest } from './postFullCapabilitiesRequest'; +import { PostUpdatedMediaRequest } from './postUpdatedMediaRequest'; +import { PreviousItemRequestDto } from './previousItemRequestDto'; +import { ProblemDetails } from './problemDetails'; +import { ProfileCondition } from './profileCondition'; +import { ProfileConditionType } from './profileConditionType'; +import { ProfileConditionValue } from './profileConditionValue'; +import { ProgramAudio } from './programAudio'; +import { PublicSystemInfo } from './publicSystemInfo'; +import { QueryFilters } from './queryFilters'; +import { QueryFiltersLegacy } from './queryFiltersLegacy'; +import { QueueItem } from './queueItem'; +import { QueueRequestDto } from './queueRequestDto'; +import { QuickConnectDto } from './quickConnectDto'; +import { QuickConnectResult } from './quickConnectResult'; +import { RatingType } from './ratingType'; +import { ReadyRequestDto } from './readyRequestDto'; +import { RecommendationDto } from './recommendationDto'; +import { RecommendationType } from './recommendationType'; +import { RecordingStatus } from './recordingStatus'; +import { RemoteImageInfo } from './remoteImageInfo'; +import { RemoteImageResult } from './remoteImageResult'; +import { RemoteSearchResult } from './remoteSearchResult'; +import { RemoteSubtitleInfo } from './remoteSubtitleInfo'; +import { RemoveFromPlaylistRequestDto } from './removeFromPlaylistRequestDto'; +import { RepeatMode } from './repeatMode'; +import { ReportPlaybackProgressRequest } from './reportPlaybackProgressRequest'; +import { ReportPlaybackStartRequest } from './reportPlaybackStartRequest'; +import { ReportPlaybackStoppedRequest } from './reportPlaybackStoppedRequest'; +import { RepositoryInfo } from './repositoryInfo'; +import { ResponseProfile } from './responseProfile'; +import { ScrollDirection } from './scrollDirection'; +import { SearchHint } from './searchHint'; +import { SearchHintResult } from './searchHintResult'; +import { SeekRequestDto } from './seekRequestDto'; +import { SendCommand } from './sendCommand'; +import { SendCommandType } from './sendCommandType'; +import { SendFullGeneralCommandRequest } from './sendFullGeneralCommandRequest'; +import { SendMessageCommandRequest } from './sendMessageCommandRequest'; +import { SendToUserType } from './sendToUserType'; +import { SeriesInfo } from './seriesInfo'; +import { SeriesInfoRemoteSearchQuery } from './seriesInfoRemoteSearchQuery'; +import { SeriesStatus } from './seriesStatus'; +import { SeriesTimerInfoDto } from './seriesTimerInfoDto'; +import { SeriesTimerInfoDtoQueryResult } from './seriesTimerInfoDtoQueryResult'; +import { ServerConfiguration } from './serverConfiguration'; +import { ServerDiscoveryInfo } from './serverDiscoveryInfo'; +import { SessionInfo } from './sessionInfo'; +import { SessionInfoFullNowPlayingItem } from './sessionInfoFullNowPlayingItem'; +import { SessionInfoNowPlayingItem } from './sessionInfoNowPlayingItem'; +import { SessionMessageType } from './sessionMessageType'; +import { SessionUserInfo } from './sessionUserInfo'; +import { SetChannelMappingDto } from './setChannelMappingDto'; +import { SetChannelMappingRequest } from './setChannelMappingRequest'; +import { SetPlaylistItemRequestDto } from './setPlaylistItemRequestDto'; +import { SetRemoteAccessRequest } from './setRemoteAccessRequest'; +import { SetRepeatModeRequestDto } from './setRepeatModeRequestDto'; +import { SetShuffleModeRequestDto } from './setShuffleModeRequestDto'; +import { SongInfo } from './songInfo'; +import { SortOrder } from './sortOrder'; +import { SpecialViewOptionDto } from './specialViewOptionDto'; +import { StartupConfigurationDto } from './startupConfigurationDto'; +import { StartupRemoteAccessDto } from './startupRemoteAccessDto'; +import { StartupUserDto } from './startupUserDto'; +import { SubtitleDeliveryMethod } from './subtitleDeliveryMethod'; +import { SubtitleOptions } from './subtitleOptions'; +import { SubtitlePlaybackMode } from './subtitlePlaybackMode'; +import { SubtitleProfile } from './subtitleProfile'; +import { SyncPlayBufferingRequest } from './syncPlayBufferingRequest'; +import { SyncPlayCreateGroupRequest } from './syncPlayCreateGroupRequest'; +import { SyncPlayJoinGroupRequest } from './syncPlayJoinGroupRequest'; +import { SyncPlayMovePlaylistItemRequest } from './syncPlayMovePlaylistItemRequest'; +import { SyncPlayNextItemRequest } from './syncPlayNextItemRequest'; +import { SyncPlayPingRequest } from './syncPlayPingRequest'; +import { SyncPlayPreviousItemRequest } from './syncPlayPreviousItemRequest'; +import { SyncPlayQueueRequest } from './syncPlayQueueRequest'; +import { SyncPlayReadyRequest } from './syncPlayReadyRequest'; +import { SyncPlayRemoveFromPlaylistRequest } from './syncPlayRemoveFromPlaylistRequest'; +import { SyncPlaySeekRequest } from './syncPlaySeekRequest'; +import { SyncPlaySetIgnoreWaitRequest } from './syncPlaySetIgnoreWaitRequest'; +import { SyncPlaySetNewQueueRequest } from './syncPlaySetNewQueueRequest'; +import { SyncPlaySetPlaylistItemRequest } from './syncPlaySetPlaylistItemRequest'; +import { SyncPlaySetRepeatModeRequest } from './syncPlaySetRepeatModeRequest'; +import { SyncPlaySetShuffleModeRequest } from './syncPlaySetShuffleModeRequest'; +import { SyncPlayUserAccessType } from './syncPlayUserAccessType'; +import { SystemInfo } from './systemInfo'; +import { TaskCompletionStatus } from './taskCompletionStatus'; +import { TaskInfo } from './taskInfo'; +import { TaskInfoLastExecutionResult } from './taskInfoLastExecutionResult'; +import { TaskResult } from './taskResult'; +import { TaskState } from './taskState'; +import { TaskTriggerInfo } from './taskTriggerInfo'; +import { ThemeMediaResult } from './themeMediaResult'; +import { TimerEventInfo } from './timerEventInfo'; +import { TimerInfoDto } from './timerInfoDto'; +import { TimerInfoDtoProgramInfo } from './timerInfoDtoProgramInfo'; +import { TimerInfoDtoQueryResult } from './timerInfoDtoQueryResult'; +import { TrailerInfo } from './trailerInfo'; +import { TrailerInfoRemoteSearchQuery } from './trailerInfoRemoteSearchQuery'; +import { TranscodeReason } from './transcodeReason'; +import { TranscodeSeekInfo } from './transcodeSeekInfo'; +import { TranscodingInfo } from './transcodingInfo'; +import { TranscodingProfile } from './transcodingProfile'; +import { TransportStreamTimestamp } from './transportStreamTimestamp'; +import { TunerChannelMapping } from './tunerChannelMapping'; +import { TunerHostInfo } from './tunerHostInfo'; +import { TypeOptions } from './typeOptions'; +import { UnratedItem } from './unratedItem'; +import { UpdateConfigurationRequest } from './updateConfigurationRequest'; +import { UpdateDeviceOptionsRequest } from './updateDeviceOptionsRequest'; +import { UpdateDisplayPreferencesRequest } from './updateDisplayPreferencesRequest'; +import { UpdateInitialConfigurationRequest } from './updateInitialConfigurationRequest'; +import { UpdateItemRequest } from './updateItemRequest'; +import { UpdateLibraryOptionsDto } from './updateLibraryOptionsDto'; +import { UpdateLibraryOptionsRequest } from './updateLibraryOptionsRequest'; +import { UpdateMediaEncoderPathRequest } from './updateMediaEncoderPathRequest'; +import { UpdateMediaPathRequest } from './updateMediaPathRequest'; +import { UpdateMediaPathRequestDto } from './updateMediaPathRequestDto'; +import { UpdateMediaPathRequestDtoPathInfo } from './updateMediaPathRequestDtoPathInfo'; +import { UpdateStartupUserRequest } from './updateStartupUserRequest'; +import { UpdateUserConfigurationRequest } from './updateUserConfigurationRequest'; +import { UpdateUserEasyPassword } from './updateUserEasyPassword'; +import { UpdateUserEasyPasswordRequest } from './updateUserEasyPasswordRequest'; +import { UpdateUserPassword } from './updateUserPassword'; +import { UpdateUserPasswordRequest } from './updateUserPasswordRequest'; +import { UpdateUserPolicyRequest } from './updateUserPolicyRequest'; +import { UpdateUserRequest } from './updateUserRequest'; +import { UploadSubtitleDto } from './uploadSubtitleDto'; +import { UploadSubtitleRequest } from './uploadSubtitleRequest'; +import { UserConfiguration } from './userConfiguration'; +import { UserDto } from './userDto'; +import { UserDtoConfiguration } from './userDtoConfiguration'; +import { UserDtoPolicy } from './userDtoPolicy'; +import { UserItemDataDto } from './userItemDataDto'; +import { UserPolicy } from './userPolicy'; +import { UtcTimeResponse } from './utcTimeResponse'; +import { ValidatePathDto } from './validatePathDto'; +import { ValidatePathRequest } from './validatePathRequest'; +import { VersionInfo } from './versionInfo'; +import { Video3DFormat } from './video3DFormat'; +import { VideoType } from './videoType'; +import { VirtualFolderInfo } from './virtualFolderInfo'; +import { WakeOnLanInfo } from './wakeOnLanInfo'; +import { XbmcMetadataOptions } from './xbmcMetadataOptions'; +import { XmlAttribute } from './xmlAttribute'; + +/* tslint:disable:no-unused-variable */ +let primitives = [ + "string", + "boolean", + "double", + "integer", + "long", + "float", + "number", + "any" + ]; + +let enumsMap: {[index: string]: any} = { + "Architecture": Architecture, + "BaseItemKind": BaseItemKind, + "ChannelItemSortField": ChannelItemSortField, + "ChannelMediaContentType": ChannelMediaContentType, + "ChannelMediaType": ChannelMediaType, + "ChannelType": ChannelType, + "CodecType": CodecType, + "CollectionTypeOptions": CollectionTypeOptions, + "DayOfWeek": DayOfWeek, + "DayPattern": DayPattern, + "DeviceProfileType": DeviceProfileType, + "DlnaProfileType": DlnaProfileType, + "DynamicDayOfWeek": DynamicDayOfWeek, + "EmbeddedSubtitleOptions": EmbeddedSubtitleOptions, + "EncodingContext": EncodingContext, + "ExternalIdMediaType": ExternalIdMediaType, + "FFmpegLocation": FFmpegLocation, + "FileSystemEntryType": FileSystemEntryType, + "ForgotPasswordAction": ForgotPasswordAction, + "GeneralCommandType": GeneralCommandType, + "GroupQueueMode": GroupQueueMode, + "GroupRepeatMode": GroupRepeatMode, + "GroupShuffleMode": GroupShuffleMode, + "GroupStateType": GroupStateType, + "GroupUpdateType": GroupUpdateType, + "HardwareEncodingType": HardwareEncodingType, + "HeaderMatchType": HeaderMatchType, + "ImageFormat": ImageFormat, + "ImageOrientation": ImageOrientation, + "ImageSavingConvention": ImageSavingConvention, + "ImageType": ImageType, + "IsoType": IsoType, + "ItemFields": ItemFields, + "ItemFilter": ItemFilter, + "KeepUntil": KeepUntil, + "LiveTvServiceStatus": LiveTvServiceStatus, + "LocationType": LocationType, + "LogLevel": LogLevel, + "MediaProtocol": MediaProtocol, + "MediaSourceType": MediaSourceType, + "MediaStreamType": MediaStreamType, + "MetadataField": MetadataField, + "MetadataRefreshMode": MetadataRefreshMode, + "NotificationLevel": NotificationLevel, + "PlayAccess": PlayAccess, + "PlayCommand": PlayCommand, + "PlayMethod": PlayMethod, + "PlaybackErrorCode": PlaybackErrorCode, + "PlaystateCommand": PlaystateCommand, + "PluginStatus": PluginStatus, + "ProfileConditionType": ProfileConditionType, + "ProfileConditionValue": ProfileConditionValue, + "ProgramAudio": ProgramAudio, + "RatingType": RatingType, + "RecommendationType": RecommendationType, + "RecordingStatus": RecordingStatus, + "RepeatMode": RepeatMode, + "ScrollDirection": ScrollDirection, + "SendCommandType": SendCommandType, + "SendToUserType": SendToUserType, + "SeriesStatus": SeriesStatus, + "SessionMessageType": SessionMessageType, + "SortOrder": SortOrder, + "SubtitleDeliveryMethod": SubtitleDeliveryMethod, + "SubtitlePlaybackMode": SubtitlePlaybackMode, + "SyncPlayUserAccessType": SyncPlayUserAccessType, + "TaskCompletionStatus": TaskCompletionStatus, + "TaskState": TaskState, + "TranscodeReason": TranscodeReason, + "TranscodeSeekInfo": TranscodeSeekInfo, + "TransportStreamTimestamp": TransportStreamTimestamp, + "UnratedItem": UnratedItem, + "Video3DFormat": Video3DFormat, + "VideoType": VideoType, +} + +let typeMap: {[index: string]: any} = { + "AccessSchedule": AccessSchedule, + "ActivityLogEntry": ActivityLogEntry, + "ActivityLogEntryQueryResult": ActivityLogEntryQueryResult, + "AddListingProviderRequest": AddListingProviderRequest, + "AddMediaPathRequest": AddMediaPathRequest, + "AddTunerHostRequest": AddTunerHostRequest, + "AddVirtualFolderDto": AddVirtualFolderDto, + "AddVirtualFolderDtoLibraryOptions": AddVirtualFolderDtoLibraryOptions, + "AddVirtualFolderRequest": AddVirtualFolderRequest, + "AdminNotificationDto": AdminNotificationDto, + "AlbumInfo": AlbumInfo, + "AlbumInfoRemoteSearchQuery": AlbumInfoRemoteSearchQuery, + "AllThemeMediaResult": AllThemeMediaResult, + "AllThemeMediaResultThemeVideosResult": AllThemeMediaResultThemeVideosResult, + "ApplySearchCriteriaRequest": ApplySearchCriteriaRequest, + "ArtistInfo": ArtistInfo, + "ArtistInfoRemoteSearchQuery": ArtistInfoRemoteSearchQuery, + "AuthenticateUserByName": AuthenticateUserByName, + "AuthenticateUserByNameRequest": AuthenticateUserByNameRequest, + "AuthenticateWithQuickConnectRequest": AuthenticateWithQuickConnectRequest, + "AuthenticationInfo": AuthenticationInfo, + "AuthenticationInfoQueryResult": AuthenticationInfoQueryResult, + "AuthenticationResult": AuthenticationResult, + "AuthenticationResultSessionInfo": AuthenticationResultSessionInfo, + "AuthenticationResultUser": AuthenticationResultUser, + "BaseItem": BaseItem, + "BaseItemDto": BaseItemDto, + "BaseItemDtoCurrentProgram": BaseItemDtoCurrentProgram, + "BaseItemDtoImageBlurHashes": BaseItemDtoImageBlurHashes, + "BaseItemDtoQueryResult": BaseItemDtoQueryResult, + "BaseItemDtoUserData": BaseItemDtoUserData, + "BaseItemPerson": BaseItemPerson, + "BaseItemPersonImageBlurHashes": BaseItemPersonImageBlurHashes, + "BookInfo": BookInfo, + "BookInfoRemoteSearchQuery": BookInfoRemoteSearchQuery, + "BoxSetInfo": BoxSetInfo, + "BoxSetInfoRemoteSearchQuery": BoxSetInfoRemoteSearchQuery, + "BrandingOptions": BrandingOptions, + "BufferRequestDto": BufferRequestDto, + "ChannelFeatures": ChannelFeatures, + "ChannelMappingOptionsDto": ChannelMappingOptionsDto, + "ChapterInfo": ChapterInfo, + "ClientCapabilities": ClientCapabilities, + "ClientCapabilitiesDeviceProfile": ClientCapabilitiesDeviceProfile, + "ClientCapabilitiesDto": ClientCapabilitiesDto, + "ClientCapabilitiesDtoDeviceProfile": ClientCapabilitiesDtoDeviceProfile, + "ClientLogDocumentResponseDto": ClientLogDocumentResponseDto, + "CodecProfile": CodecProfile, + "CollectionCreationResult": CollectionCreationResult, + "ConfigImageTypes": ConfigImageTypes, + "ConfigurationPageInfo": ConfigurationPageInfo, + "ContainerProfile": ContainerProfile, + "ControlResponse": ControlResponse, + "CountryInfo": CountryInfo, + "CreateAdminNotificationRequest": CreateAdminNotificationRequest, + "CreatePlaylistDto": CreatePlaylistDto, + "CreatePlaylistRequest": CreatePlaylistRequest, + "CreateProfileRequest": CreateProfileRequest, + "CreateSeriesTimerRequest": CreateSeriesTimerRequest, + "CreateTimerRequest": CreateTimerRequest, + "CreateUserByName": CreateUserByName, + "CreateUserByNameRequest": CreateUserByNameRequest, + "CultureDto": CultureDto, + "DefaultDirectoryBrowserInfoDto": DefaultDirectoryBrowserInfoDto, + "DeviceIdentification": DeviceIdentification, + "DeviceInfo": DeviceInfo, + "DeviceInfoCapabilities": DeviceInfoCapabilities, + "DeviceInfoQueryResult": DeviceInfoQueryResult, + "DeviceOptions": DeviceOptions, + "DeviceOptionsDto": DeviceOptionsDto, + "DeviceProfile": DeviceProfile, + "DeviceProfileIdentification": DeviceProfileIdentification, + "DeviceProfileInfo": DeviceProfileInfo, + "DirectPlayProfile": DirectPlayProfile, + "DisplayPreferencesDto": DisplayPreferencesDto, + "DlnaOptions": DlnaOptions, + "EncodingOptions": EncodingOptions, + "EndPointInfo": EndPointInfo, + "ExternalIdInfo": ExternalIdInfo, + "ExternalUrl": ExternalUrl, + "FileSystemEntryInfo": FileSystemEntryInfo, + "FontFile": FontFile, + "ForgotPasswordDto": ForgotPasswordDto, + "ForgotPasswordPinDto": ForgotPasswordPinDto, + "ForgotPasswordPinRequest": ForgotPasswordPinRequest, + "ForgotPasswordRequest": ForgotPasswordRequest, + "ForgotPasswordResult": ForgotPasswordResult, + "GeneralCommand": GeneralCommand, + "GetBookRemoteSearchResultsRequest": GetBookRemoteSearchResultsRequest, + "GetBoxSetRemoteSearchResultsRequest": GetBoxSetRemoteSearchResultsRequest, + "GetMovieRemoteSearchResultsRequest": GetMovieRemoteSearchResultsRequest, + "GetMusicAlbumRemoteSearchResultsRequest": GetMusicAlbumRemoteSearchResultsRequest, + "GetMusicArtistRemoteSearchResultsRequest": GetMusicArtistRemoteSearchResultsRequest, + "GetMusicVideoRemoteSearchResultsRequest": GetMusicVideoRemoteSearchResultsRequest, + "GetPersonRemoteSearchResultsRequest": GetPersonRemoteSearchResultsRequest, + "GetPostedPlaybackInfoRequest": GetPostedPlaybackInfoRequest, + "GetProgramsDto": GetProgramsDto, + "GetProgramsRequest": GetProgramsRequest, + "GetSeriesRemoteSearchResultsRequest": GetSeriesRemoteSearchResultsRequest, + "GetTrailerRemoteSearchResultsRequest": GetTrailerRemoteSearchResultsRequest, + "GroupInfoDto": GroupInfoDto, + "GuideInfo": GuideInfo, + "HttpHeaderInfo": HttpHeaderInfo, + "IPlugin": IPlugin, + "IgnoreWaitRequestDto": IgnoreWaitRequestDto, + "ImageByNameInfo": ImageByNameInfo, + "ImageInfo": ImageInfo, + "ImageOption": ImageOption, + "ImageProviderInfo": ImageProviderInfo, + "InstallationInfo": InstallationInfo, + "InstallationInfoPackageInfo": InstallationInfoPackageInfo, + "ItemCounts": ItemCounts, + "JoinGroupRequestDto": JoinGroupRequestDto, + "LibraryOptionInfoDto": LibraryOptionInfoDto, + "LibraryOptions": LibraryOptions, + "LibraryOptionsResultDto": LibraryOptionsResultDto, + "LibraryTypeOptionsDto": LibraryTypeOptionsDto, + "LibraryUpdateInfo": LibraryUpdateInfo, + "ListingsProviderInfo": ListingsProviderInfo, + "LiveStreamResponse": LiveStreamResponse, + "LiveStreamResponseMediaSource": LiveStreamResponseMediaSource, + "LiveTvInfo": LiveTvInfo, + "LiveTvOptions": LiveTvOptions, + "LiveTvServiceInfo": LiveTvServiceInfo, + "LocalizationOption": LocalizationOption, + "LogFile": LogFile, + "MediaAttachment": MediaAttachment, + "MediaEncoderPathDto": MediaEncoderPathDto, + "MediaPathDto": MediaPathDto, + "MediaPathDtoPathInfo": MediaPathDtoPathInfo, + "MediaPathInfo": MediaPathInfo, + "MediaSourceInfo": MediaSourceInfo, + "MediaStream": MediaStream, + "MediaUpdateInfoDto": MediaUpdateInfoDto, + "MediaUpdateInfoPathDto": MediaUpdateInfoPathDto, + "MediaUrl": MediaUrl, + "MessageCommand": MessageCommand, + "MetadataConfiguration": MetadataConfiguration, + "MetadataEditorInfo": MetadataEditorInfo, + "MetadataOptions": MetadataOptions, + "MovePlaylistItemRequestDto": MovePlaylistItemRequestDto, + "MovieInfo": MovieInfo, + "MovieInfoRemoteSearchQuery": MovieInfoRemoteSearchQuery, + "MusicVideoInfo": MusicVideoInfo, + "MusicVideoInfoRemoteSearchQuery": MusicVideoInfoRemoteSearchQuery, + "NameGuidPair": NameGuidPair, + "NameIdPair": NameIdPair, + "NameValuePair": NameValuePair, + "NetworkConfiguration": NetworkConfiguration, + "NewGroupRequestDto": NewGroupRequestDto, + "NextItemRequestDto": NextItemRequestDto, + "NotificationDto": NotificationDto, + "NotificationOption": NotificationOption, + "NotificationOptions": NotificationOptions, + "NotificationResultDto": NotificationResultDto, + "NotificationTypeInfo": NotificationTypeInfo, + "NotificationsSummaryDto": NotificationsSummaryDto, + "ObjectGroupUpdate": ObjectGroupUpdate, + "OpenLiveStreamDto": OpenLiveStreamDto, + "OpenLiveStreamRequest": OpenLiveStreamRequest, + "PackageInfo": PackageInfo, + "ParentalRating": ParentalRating, + "PathSubstitution": PathSubstitution, + "PersonLookupInfo": PersonLookupInfo, + "PersonLookupInfoRemoteSearchQuery": PersonLookupInfoRemoteSearchQuery, + "PinRedeemResult": PinRedeemResult, + "PingRequestDto": PingRequestDto, + "PlayRequest": PlayRequest, + "PlayRequestDto": PlayRequestDto, + "PlaybackInfoDto": PlaybackInfoDto, + "PlaybackInfoResponse": PlaybackInfoResponse, + "PlaybackProgressInfo": PlaybackProgressInfo, + "PlaybackProgressInfoItem": PlaybackProgressInfoItem, + "PlaybackStartInfo": PlaybackStartInfo, + "PlaybackStopInfo": PlaybackStopInfo, + "PlayerStateInfo": PlayerStateInfo, + "PlaylistCreationResult": PlaylistCreationResult, + "PlaystateRequest": PlaystateRequest, + "PluginInfo": PluginInfo, + "PostFullCapabilitiesRequest": PostFullCapabilitiesRequest, + "PostUpdatedMediaRequest": PostUpdatedMediaRequest, + "PreviousItemRequestDto": PreviousItemRequestDto, + "ProblemDetails": ProblemDetails, + "ProfileCondition": ProfileCondition, + "PublicSystemInfo": PublicSystemInfo, + "QueryFilters": QueryFilters, + "QueryFiltersLegacy": QueryFiltersLegacy, + "QueueItem": QueueItem, + "QueueRequestDto": QueueRequestDto, + "QuickConnectDto": QuickConnectDto, + "QuickConnectResult": QuickConnectResult, + "ReadyRequestDto": ReadyRequestDto, + "RecommendationDto": RecommendationDto, + "RemoteImageInfo": RemoteImageInfo, + "RemoteImageResult": RemoteImageResult, + "RemoteSearchResult": RemoteSearchResult, + "RemoteSubtitleInfo": RemoteSubtitleInfo, + "RemoveFromPlaylistRequestDto": RemoveFromPlaylistRequestDto, + "ReportPlaybackProgressRequest": ReportPlaybackProgressRequest, + "ReportPlaybackStartRequest": ReportPlaybackStartRequest, + "ReportPlaybackStoppedRequest": ReportPlaybackStoppedRequest, + "RepositoryInfo": RepositoryInfo, + "ResponseProfile": ResponseProfile, + "SearchHint": SearchHint, + "SearchHintResult": SearchHintResult, + "SeekRequestDto": SeekRequestDto, + "SendCommand": SendCommand, + "SendFullGeneralCommandRequest": SendFullGeneralCommandRequest, + "SendMessageCommandRequest": SendMessageCommandRequest, + "SeriesInfo": SeriesInfo, + "SeriesInfoRemoteSearchQuery": SeriesInfoRemoteSearchQuery, + "SeriesTimerInfoDto": SeriesTimerInfoDto, + "SeriesTimerInfoDtoQueryResult": SeriesTimerInfoDtoQueryResult, + "ServerConfiguration": ServerConfiguration, + "ServerDiscoveryInfo": ServerDiscoveryInfo, + "SessionInfo": SessionInfo, + "SessionInfoFullNowPlayingItem": SessionInfoFullNowPlayingItem, + "SessionInfoNowPlayingItem": SessionInfoNowPlayingItem, + "SessionUserInfo": SessionUserInfo, + "SetChannelMappingDto": SetChannelMappingDto, + "SetChannelMappingRequest": SetChannelMappingRequest, + "SetPlaylistItemRequestDto": SetPlaylistItemRequestDto, + "SetRemoteAccessRequest": SetRemoteAccessRequest, + "SetRepeatModeRequestDto": SetRepeatModeRequestDto, + "SetShuffleModeRequestDto": SetShuffleModeRequestDto, + "SongInfo": SongInfo, + "SpecialViewOptionDto": SpecialViewOptionDto, + "StartupConfigurationDto": StartupConfigurationDto, + "StartupRemoteAccessDto": StartupRemoteAccessDto, + "StartupUserDto": StartupUserDto, + "SubtitleOptions": SubtitleOptions, + "SubtitleProfile": SubtitleProfile, + "SyncPlayBufferingRequest": SyncPlayBufferingRequest, + "SyncPlayCreateGroupRequest": SyncPlayCreateGroupRequest, + "SyncPlayJoinGroupRequest": SyncPlayJoinGroupRequest, + "SyncPlayMovePlaylistItemRequest": SyncPlayMovePlaylistItemRequest, + "SyncPlayNextItemRequest": SyncPlayNextItemRequest, + "SyncPlayPingRequest": SyncPlayPingRequest, + "SyncPlayPreviousItemRequest": SyncPlayPreviousItemRequest, + "SyncPlayQueueRequest": SyncPlayQueueRequest, + "SyncPlayReadyRequest": SyncPlayReadyRequest, + "SyncPlayRemoveFromPlaylistRequest": SyncPlayRemoveFromPlaylistRequest, + "SyncPlaySeekRequest": SyncPlaySeekRequest, + "SyncPlaySetIgnoreWaitRequest": SyncPlaySetIgnoreWaitRequest, + "SyncPlaySetNewQueueRequest": SyncPlaySetNewQueueRequest, + "SyncPlaySetPlaylistItemRequest": SyncPlaySetPlaylistItemRequest, + "SyncPlaySetRepeatModeRequest": SyncPlaySetRepeatModeRequest, + "SyncPlaySetShuffleModeRequest": SyncPlaySetShuffleModeRequest, + "SystemInfo": SystemInfo, + "TaskInfo": TaskInfo, + "TaskInfoLastExecutionResult": TaskInfoLastExecutionResult, + "TaskResult": TaskResult, + "TaskTriggerInfo": TaskTriggerInfo, + "ThemeMediaResult": ThemeMediaResult, + "TimerEventInfo": TimerEventInfo, + "TimerInfoDto": TimerInfoDto, + "TimerInfoDtoProgramInfo": TimerInfoDtoProgramInfo, + "TimerInfoDtoQueryResult": TimerInfoDtoQueryResult, + "TrailerInfo": TrailerInfo, + "TrailerInfoRemoteSearchQuery": TrailerInfoRemoteSearchQuery, + "TranscodingInfo": TranscodingInfo, + "TranscodingProfile": TranscodingProfile, + "TunerChannelMapping": TunerChannelMapping, + "TunerHostInfo": TunerHostInfo, + "TypeOptions": TypeOptions, + "UpdateConfigurationRequest": UpdateConfigurationRequest, + "UpdateDeviceOptionsRequest": UpdateDeviceOptionsRequest, + "UpdateDisplayPreferencesRequest": UpdateDisplayPreferencesRequest, + "UpdateInitialConfigurationRequest": UpdateInitialConfigurationRequest, + "UpdateItemRequest": UpdateItemRequest, + "UpdateLibraryOptionsDto": UpdateLibraryOptionsDto, + "UpdateLibraryOptionsRequest": UpdateLibraryOptionsRequest, + "UpdateMediaEncoderPathRequest": UpdateMediaEncoderPathRequest, + "UpdateMediaPathRequest": UpdateMediaPathRequest, + "UpdateMediaPathRequestDto": UpdateMediaPathRequestDto, + "UpdateMediaPathRequestDtoPathInfo": UpdateMediaPathRequestDtoPathInfo, + "UpdateStartupUserRequest": UpdateStartupUserRequest, + "UpdateUserConfigurationRequest": UpdateUserConfigurationRequest, + "UpdateUserEasyPassword": UpdateUserEasyPassword, + "UpdateUserEasyPasswordRequest": UpdateUserEasyPasswordRequest, + "UpdateUserPassword": UpdateUserPassword, + "UpdateUserPasswordRequest": UpdateUserPasswordRequest, + "UpdateUserPolicyRequest": UpdateUserPolicyRequest, + "UpdateUserRequest": UpdateUserRequest, + "UploadSubtitleDto": UploadSubtitleDto, + "UploadSubtitleRequest": UploadSubtitleRequest, + "UserConfiguration": UserConfiguration, + "UserDto": UserDto, + "UserDtoConfiguration": UserDtoConfiguration, + "UserDtoPolicy": UserDtoPolicy, + "UserItemDataDto": UserItemDataDto, + "UserPolicy": UserPolicy, + "UtcTimeResponse": UtcTimeResponse, + "ValidatePathDto": ValidatePathDto, + "ValidatePathRequest": ValidatePathRequest, + "VersionInfo": VersionInfo, + "VirtualFolderInfo": VirtualFolderInfo, + "WakeOnLanInfo": WakeOnLanInfo, + "XbmcMetadataOptions": XbmcMetadataOptions, + "XmlAttribute": XmlAttribute, +} + +export class ObjectSerializer { + public static findCorrectType(data: any, expectedType: string) { + if (data == undefined) { + return expectedType; + } else if (primitives.indexOf(expectedType.toLowerCase()) !== -1) { + return expectedType; + } else if (expectedType === "Date") { + return expectedType; + } else { + if (enumsMap[expectedType]) { + return expectedType; + } + + if (!typeMap[expectedType]) { + return expectedType; // w/e we don't know the type + } + + // Check the discriminator + let discriminatorProperty = typeMap[expectedType].discriminator; + if (discriminatorProperty == null) { + return expectedType; // the type does not have a discriminator. use it. + } else { + if (data[discriminatorProperty]) { + var discriminatorType = data[discriminatorProperty]; + if(typeMap[discriminatorType]){ + return discriminatorType; // use the type given in the discriminator + } else { + return expectedType; // discriminator did not map to a type + } + } else { + return expectedType; // discriminator was not present (or an empty string) + } + } + } + } + + public static serialize(data: any, type: string) { + if (data == undefined) { + return data; + } else if (primitives.indexOf(type.toLowerCase()) !== -1) { + return data; + } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6 + let subType: string = type.replace("Array<", ""); // Array => Type> + subType = subType.substring(0, subType.length - 1); // Type> => Type + let transformedData: any[] = []; + for (let index = 0; index < data.length; index++) { + let datum = data[index]; + transformedData.push(ObjectSerializer.serialize(datum, subType)); + } + return transformedData; + } else if (type === "Date") { + return data.toISOString(); + } else { + if (enumsMap[type]) { + return data; + } + if (!typeMap[type]) { // in case we dont know the type + return data; + } + + // Get the actual type of this object + type = this.findCorrectType(data, type); + + // get the map for the correct type. + let attributeTypes = typeMap[type].getAttributeTypeMap(); + let instance: {[index: string]: any} = {}; + for (let index = 0; index < attributeTypes.length; index++) { + let attributeType = attributeTypes[index]; + instance[attributeType.baseName] = ObjectSerializer.serialize(data[attributeType.name], attributeType.type); + } + return instance; + } + } + + public static deserialize(data: any, type: string) { + // polymorphism may change the actual type. + type = ObjectSerializer.findCorrectType(data, type); + if (data == undefined) { + return data; + } else if (primitives.indexOf(type.toLowerCase()) !== -1) { + return data; + } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6 + let subType: string = type.replace("Array<", ""); // Array => Type> + subType = subType.substring(0, subType.length - 1); // Type> => Type + let transformedData: any[] = []; + for (let index = 0; index < data.length; index++) { + let datum = data[index]; + transformedData.push(ObjectSerializer.deserialize(datum, subType)); + } + return transformedData; + } else if (type === "Date") { + return new Date(data); + } else { + if (enumsMap[type]) {// is Enum + return data; + } + + if (!typeMap[type]) { // dont know the type + return data; + } + let instance = new typeMap[type](); + let attributeTypes = typeMap[type].getAttributeTypeMap(); + for (let index = 0; index < attributeTypes.length; index++) { + let attributeType = attributeTypes[index]; + instance[attributeType.name] = ObjectSerializer.deserialize(data[attributeType.baseName], attributeType.type); + } + return instance; + } + } +} + +export interface Authentication { + /** + * Apply authentication settings to header and query params. + */ + applyToRequest(requestOptions: localVarRequest.Options): Promise | void; +} + +export class HttpBasicAuth implements Authentication { + public username: string = ''; + public password: string = ''; + + applyToRequest(requestOptions: localVarRequest.Options): void { + requestOptions.auth = { + username: this.username, password: this.password + } + } +} + +export class HttpBearerAuth implements Authentication { + public accessToken: string | (() => string) = ''; + + applyToRequest(requestOptions: localVarRequest.Options): void { + if (requestOptions && requestOptions.headers) { + const accessToken = typeof this.accessToken === 'function' + ? this.accessToken() + : this.accessToken; + requestOptions.headers["Authorization"] = "Bearer " + accessToken; + } + } +} + +export class ApiKeyAuth implements Authentication { + public apiKey: string = ''; + + constructor(private location: string, private paramName: string) { + } + + applyToRequest(requestOptions: localVarRequest.Options): void { + if (this.location == "query") { + (requestOptions.qs)[this.paramName] = this.apiKey; + } else if (this.location == "header" && requestOptions && requestOptions.headers) { + requestOptions.headers[this.paramName] = this.apiKey; + } else if (this.location == 'cookie' && requestOptions && requestOptions.headers) { + if (requestOptions.headers['Cookie']) { + requestOptions.headers['Cookie'] += '; ' + this.paramName + '=' + encodeURIComponent(this.apiKey); + } + else { + requestOptions.headers['Cookie'] = this.paramName + '=' + encodeURIComponent(this.apiKey); + } + } + } +} + +export class OAuth implements Authentication { + public accessToken: string = ''; + + applyToRequest(requestOptions: localVarRequest.Options): void { + if (requestOptions && requestOptions.headers) { + requestOptions.headers["Authorization"] = "Bearer " + this.accessToken; + } + } +} + +export class VoidAuth implements Authentication { + public username: string = ''; + public password: string = ''; + + applyToRequest(_: localVarRequest.Options): void { + // Do nothing + } +} + +export type Interceptor = (requestOptions: localVarRequest.Options) => (Promise | void); diff --git a/jellyfin/model/movePlaylistItemRequestDto.ts b/jellyfin/model/movePlaylistItemRequestDto.ts new file mode 100644 index 0000000..8d61112 --- /dev/null +++ b/jellyfin/model/movePlaylistItemRequestDto.ts @@ -0,0 +1,46 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Class MovePlaylistItemRequestDto. +*/ +export class MovePlaylistItemRequestDto { + /** + * Gets or sets the playlist identifier of the item. + */ + 'playlistItemId'?: string; + /** + * Gets or sets the new position. + */ + 'newIndex'?: number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "playlistItemId", + "baseName": "PlaylistItemId", + "type": "string" + }, + { + "name": "newIndex", + "baseName": "NewIndex", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return MovePlaylistItemRequestDto.attributeTypeMap; + } +} + diff --git a/jellyfin/model/movieInfo.ts b/jellyfin/model/movieInfo.ts new file mode 100644 index 0000000..bcd55f3 --- /dev/null +++ b/jellyfin/model/movieInfo.ts @@ -0,0 +1,112 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class MovieInfo { + /** + * Gets or sets the name. + */ + 'name'?: string | null; + /** + * Gets or sets the original title. + */ + 'originalTitle'?: string | null; + /** + * Gets or sets the path. + */ + 'path'?: string | null; + /** + * Gets or sets the metadata language. + */ + 'metadataLanguage'?: string | null; + /** + * Gets or sets the metadata country code. + */ + 'metadataCountryCode'?: string | null; + /** + * Gets or sets the provider ids. + */ + 'providerIds'?: { [key: string]: string; } | null; + /** + * Gets or sets the year. + */ + 'year'?: number | null; + 'indexNumber'?: number | null; + 'parentIndexNumber'?: number | null; + 'premiereDate'?: Date | null; + 'isAutomated'?: boolean; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "Name", + "type": "string" + }, + { + "name": "originalTitle", + "baseName": "OriginalTitle", + "type": "string" + }, + { + "name": "path", + "baseName": "Path", + "type": "string" + }, + { + "name": "metadataLanguage", + "baseName": "MetadataLanguage", + "type": "string" + }, + { + "name": "metadataCountryCode", + "baseName": "MetadataCountryCode", + "type": "string" + }, + { + "name": "providerIds", + "baseName": "ProviderIds", + "type": "{ [key: string]: string; }" + }, + { + "name": "year", + "baseName": "Year", + "type": "number" + }, + { + "name": "indexNumber", + "baseName": "IndexNumber", + "type": "number" + }, + { + "name": "parentIndexNumber", + "baseName": "ParentIndexNumber", + "type": "number" + }, + { + "name": "premiereDate", + "baseName": "PremiereDate", + "type": "Date" + }, + { + "name": "isAutomated", + "baseName": "IsAutomated", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return MovieInfo.attributeTypeMap; + } +} + diff --git a/jellyfin/model/movieInfoRemoteSearchQuery.ts b/jellyfin/model/movieInfoRemoteSearchQuery.ts new file mode 100644 index 0000000..33bffe6 --- /dev/null +++ b/jellyfin/model/movieInfoRemoteSearchQuery.ts @@ -0,0 +1,56 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { MovieInfo } from './movieInfo'; + +export class MovieInfoRemoteSearchQuery { + 'searchInfo'?: MovieInfo | null; + 'itemId'?: string; + /** + * Gets or sets the provider name to search within if set. + */ + 'searchProviderName'?: string | null; + /** + * Gets or sets a value indicating whether disabled providers should be included. + */ + 'includeDisabledProviders'?: boolean; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "searchInfo", + "baseName": "SearchInfo", + "type": "MovieInfo" + }, + { + "name": "itemId", + "baseName": "ItemId", + "type": "string" + }, + { + "name": "searchProviderName", + "baseName": "SearchProviderName", + "type": "string" + }, + { + "name": "includeDisabledProviders", + "baseName": "IncludeDisabledProviders", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return MovieInfoRemoteSearchQuery.attributeTypeMap; + } +} + diff --git a/jellyfin/model/musicVideoInfo.ts b/jellyfin/model/musicVideoInfo.ts new file mode 100644 index 0000000..ae301fa --- /dev/null +++ b/jellyfin/model/musicVideoInfo.ts @@ -0,0 +1,118 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class MusicVideoInfo { + /** + * Gets or sets the name. + */ + 'name'?: string | null; + /** + * Gets or sets the original title. + */ + 'originalTitle'?: string | null; + /** + * Gets or sets the path. + */ + 'path'?: string | null; + /** + * Gets or sets the metadata language. + */ + 'metadataLanguage'?: string | null; + /** + * Gets or sets the metadata country code. + */ + 'metadataCountryCode'?: string | null; + /** + * Gets or sets the provider ids. + */ + 'providerIds'?: { [key: string]: string; } | null; + /** + * Gets or sets the year. + */ + 'year'?: number | null; + 'indexNumber'?: number | null; + 'parentIndexNumber'?: number | null; + 'premiereDate'?: Date | null; + 'isAutomated'?: boolean; + 'artists'?: Array | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "Name", + "type": "string" + }, + { + "name": "originalTitle", + "baseName": "OriginalTitle", + "type": "string" + }, + { + "name": "path", + "baseName": "Path", + "type": "string" + }, + { + "name": "metadataLanguage", + "baseName": "MetadataLanguage", + "type": "string" + }, + { + "name": "metadataCountryCode", + "baseName": "MetadataCountryCode", + "type": "string" + }, + { + "name": "providerIds", + "baseName": "ProviderIds", + "type": "{ [key: string]: string; }" + }, + { + "name": "year", + "baseName": "Year", + "type": "number" + }, + { + "name": "indexNumber", + "baseName": "IndexNumber", + "type": "number" + }, + { + "name": "parentIndexNumber", + "baseName": "ParentIndexNumber", + "type": "number" + }, + { + "name": "premiereDate", + "baseName": "PremiereDate", + "type": "Date" + }, + { + "name": "isAutomated", + "baseName": "IsAutomated", + "type": "boolean" + }, + { + "name": "artists", + "baseName": "Artists", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return MusicVideoInfo.attributeTypeMap; + } +} + diff --git a/jellyfin/model/musicVideoInfoRemoteSearchQuery.ts b/jellyfin/model/musicVideoInfoRemoteSearchQuery.ts new file mode 100644 index 0000000..896f9e7 --- /dev/null +++ b/jellyfin/model/musicVideoInfoRemoteSearchQuery.ts @@ -0,0 +1,56 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { MusicVideoInfo } from './musicVideoInfo'; + +export class MusicVideoInfoRemoteSearchQuery { + 'searchInfo'?: MusicVideoInfo | null; + 'itemId'?: string; + /** + * Gets or sets the provider name to search within if set. + */ + 'searchProviderName'?: string | null; + /** + * Gets or sets a value indicating whether disabled providers should be included. + */ + 'includeDisabledProviders'?: boolean; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "searchInfo", + "baseName": "SearchInfo", + "type": "MusicVideoInfo" + }, + { + "name": "itemId", + "baseName": "ItemId", + "type": "string" + }, + { + "name": "searchProviderName", + "baseName": "SearchProviderName", + "type": "string" + }, + { + "name": "includeDisabledProviders", + "baseName": "IncludeDisabledProviders", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return MusicVideoInfoRemoteSearchQuery.attributeTypeMap; + } +} + diff --git a/jellyfin/model/nameGuidPair.ts b/jellyfin/model/nameGuidPair.ts new file mode 100644 index 0000000..a89f937 --- /dev/null +++ b/jellyfin/model/nameGuidPair.ts @@ -0,0 +1,37 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class NameGuidPair { + 'name'?: string | null; + 'id'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "Name", + "type": "string" + }, + { + "name": "id", + "baseName": "Id", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return NameGuidPair.attributeTypeMap; + } +} + diff --git a/jellyfin/model/nameIdPair.ts b/jellyfin/model/nameIdPair.ts new file mode 100644 index 0000000..48c7e58 --- /dev/null +++ b/jellyfin/model/nameIdPair.ts @@ -0,0 +1,43 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class NameIdPair { + /** + * Gets or sets the name. + */ + 'name'?: string | null; + /** + * Gets or sets the identifier. + */ + 'id'?: string | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "Name", + "type": "string" + }, + { + "name": "id", + "baseName": "Id", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return NameIdPair.attributeTypeMap; + } +} + diff --git a/jellyfin/model/nameValuePair.ts b/jellyfin/model/nameValuePair.ts new file mode 100644 index 0000000..b5bdd10 --- /dev/null +++ b/jellyfin/model/nameValuePair.ts @@ -0,0 +1,43 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class NameValuePair { + /** + * Gets or sets the name. + */ + 'name'?: string | null; + /** + * Gets or sets the value. + */ + 'value'?: string | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "Name", + "type": "string" + }, + { + "name": "value", + "baseName": "Value", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return NameValuePair.attributeTypeMap; + } +} + diff --git a/jellyfin/model/networkConfiguration.ts b/jellyfin/model/networkConfiguration.ts new file mode 100644 index 0000000..1da9dd7 --- /dev/null +++ b/jellyfin/model/networkConfiguration.ts @@ -0,0 +1,334 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Defines the Jellyfin.Networking.Configuration.NetworkConfiguration. +*/ +export class NetworkConfiguration { + /** + * Gets or sets a value indicating whether the server should force connections over HTTPS. + */ + 'requireHttps'?: boolean; + /** + * Gets or sets the filesystem path of an X.509 certificate to use for SSL. + */ + 'certificatePath'?: string; + /** + * Gets or sets the password required to access the X.509 certificate data in the file specified by Jellyfin.Networking.Configuration.NetworkConfiguration.CertificatePath. + */ + 'certificatePassword'?: string; + /** + * Gets or sets a value used to specify the URL prefix that your Jellyfin instance can be accessed at. + */ + 'baseUrl'?: string; + /** + * Gets or sets the public HTTPS port. + */ + 'publicHttpsPort'?: number; + /** + * Gets or sets the HTTP server port number. + */ + 'httpServerPortNumber'?: number; + /** + * Gets or sets the HTTPS server port number. + */ + 'httpsPortNumber'?: number; + /** + * Gets or sets a value indicating whether to use HTTPS. + */ + 'enableHttps'?: boolean; + /** + * Gets or sets the public mapped port. + */ + 'publicPort'?: number; + /** + * Gets or sets a value indicating whether the http port should be mapped as part of UPnP automatic port forwarding. + */ + 'uPnPCreateHttpPortMap'?: boolean; + /** + * Gets or sets the UDPPortRange. + */ + 'uDPPortRange'?: string; + /** + * Gets or sets a value indicating whether gets or sets IPV6 capability. + */ + 'enableIPV6'?: boolean; + /** + * Gets or sets a value indicating whether gets or sets IPV4 capability. + */ + 'enableIPV4'?: boolean; + /** + * Gets or sets a value indicating whether detailed SSDP logs are sent to the console/log. \"Emby.Dlna\": \"Debug\" must be set in logging.default.json for this property to have any effect. + */ + 'enableSSDPTracing'?: boolean; + /** + * Gets or sets the SSDPTracingFilter Gets or sets a value indicating whether an IP address is to be used to filter the detailed ssdp logs that are being sent to the console/log. If the setting \"Emby.Dlna\": \"Debug\" msut be set in logging.default.json for this property to work. + */ + 'sSDPTracingFilter'?: string; + /** + * Gets or sets the number of times SSDP UDP messages are sent. + */ + 'uDPSendCount'?: number; + /** + * Gets or sets the delay between each groups of SSDP messages (in ms). + */ + 'uDPSendDelay'?: number; + /** + * Gets or sets a value indicating whether address names that match Jellyfin.Networking.Configuration.NetworkConfiguration.VirtualInterfaceNames should be Ignore for the purposes of binding. + */ + 'ignoreVirtualInterfaces'?: boolean; + /** + * Gets or sets a value indicating the interfaces that should be ignored. The list can be comma separated. . + */ + 'virtualInterfaceNames'?: string; + /** + * Gets or sets the time (in seconds) between the pings of SSDP gateway monitor. + */ + 'gatewayMonitorPeriod'?: number; + /** + * Gets a value indicating whether multi-socket binding is available. + */ + 'enableMultiSocketBinding'?: boolean; + /** + * Gets or sets a value indicating whether all IPv6 interfaces should be treated as on the internal network. Depending on the address range implemented ULA ranges might not be used. + */ + 'trustAllIP6Interfaces'?: boolean; + /** + * Gets or sets the ports that HDHomerun uses. + */ + 'hDHomerunPortRange'?: string; + /** + * Gets or sets the PublishedServerUriBySubnet Gets or sets PublishedServerUri to advertise for specific subnets. + */ + 'publishedServerUriBySubnet'?: Array; + /** + * Gets or sets a value indicating whether Autodiscovery tracing is enabled. + */ + 'autoDiscoveryTracing'?: boolean; + /** + * Gets or sets a value indicating whether Autodiscovery is enabled. + */ + 'autoDiscovery'?: boolean; + /** + * Gets or sets the filter for remote IP connectivity. Used in conjuntion with . + */ + 'remoteIPFilter'?: Array; + /** + * Gets or sets a value indicating whether contains a blacklist or a whitelist. Default is a whitelist. + */ + 'isRemoteIPFilterBlacklist'?: boolean; + /** + * Gets or sets a value indicating whether to enable automatic port forwarding. + */ + 'enableUPnP'?: boolean; + /** + * Gets or sets a value indicating whether access outside of the LAN is permitted. + */ + 'enableRemoteAccess'?: boolean; + /** + * Gets or sets the subnets that are deemed to make up the LAN. + */ + 'localNetworkSubnets'?: Array; + /** + * Gets or sets the interface addresses which Jellyfin will bind to. If empty, all interfaces will be used. + */ + 'localNetworkAddresses'?: Array; + /** + * Gets or sets the known proxies. If the proxy is a network, it\'s added to the KnownNetworks. + */ + 'knownProxies'?: Array; + /** + * Gets or sets a value indicating whether the published server uri is based on information in HTTP requests. + */ + 'enablePublishedServerUriByRequest'?: boolean; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "requireHttps", + "baseName": "RequireHttps", + "type": "boolean" + }, + { + "name": "certificatePath", + "baseName": "CertificatePath", + "type": "string" + }, + { + "name": "certificatePassword", + "baseName": "CertificatePassword", + "type": "string" + }, + { + "name": "baseUrl", + "baseName": "BaseUrl", + "type": "string" + }, + { + "name": "publicHttpsPort", + "baseName": "PublicHttpsPort", + "type": "number" + }, + { + "name": "httpServerPortNumber", + "baseName": "HttpServerPortNumber", + "type": "number" + }, + { + "name": "httpsPortNumber", + "baseName": "HttpsPortNumber", + "type": "number" + }, + { + "name": "enableHttps", + "baseName": "EnableHttps", + "type": "boolean" + }, + { + "name": "publicPort", + "baseName": "PublicPort", + "type": "number" + }, + { + "name": "uPnPCreateHttpPortMap", + "baseName": "UPnPCreateHttpPortMap", + "type": "boolean" + }, + { + "name": "uDPPortRange", + "baseName": "UDPPortRange", + "type": "string" + }, + { + "name": "enableIPV6", + "baseName": "EnableIPV6", + "type": "boolean" + }, + { + "name": "enableIPV4", + "baseName": "EnableIPV4", + "type": "boolean" + }, + { + "name": "enableSSDPTracing", + "baseName": "EnableSSDPTracing", + "type": "boolean" + }, + { + "name": "sSDPTracingFilter", + "baseName": "SSDPTracingFilter", + "type": "string" + }, + { + "name": "uDPSendCount", + "baseName": "UDPSendCount", + "type": "number" + }, + { + "name": "uDPSendDelay", + "baseName": "UDPSendDelay", + "type": "number" + }, + { + "name": "ignoreVirtualInterfaces", + "baseName": "IgnoreVirtualInterfaces", + "type": "boolean" + }, + { + "name": "virtualInterfaceNames", + "baseName": "VirtualInterfaceNames", + "type": "string" + }, + { + "name": "gatewayMonitorPeriod", + "baseName": "GatewayMonitorPeriod", + "type": "number" + }, + { + "name": "enableMultiSocketBinding", + "baseName": "EnableMultiSocketBinding", + "type": "boolean" + }, + { + "name": "trustAllIP6Interfaces", + "baseName": "TrustAllIP6Interfaces", + "type": "boolean" + }, + { + "name": "hDHomerunPortRange", + "baseName": "HDHomerunPortRange", + "type": "string" + }, + { + "name": "publishedServerUriBySubnet", + "baseName": "PublishedServerUriBySubnet", + "type": "Array" + }, + { + "name": "autoDiscoveryTracing", + "baseName": "AutoDiscoveryTracing", + "type": "boolean" + }, + { + "name": "autoDiscovery", + "baseName": "AutoDiscovery", + "type": "boolean" + }, + { + "name": "remoteIPFilter", + "baseName": "RemoteIPFilter", + "type": "Array" + }, + { + "name": "isRemoteIPFilterBlacklist", + "baseName": "IsRemoteIPFilterBlacklist", + "type": "boolean" + }, + { + "name": "enableUPnP", + "baseName": "EnableUPnP", + "type": "boolean" + }, + { + "name": "enableRemoteAccess", + "baseName": "EnableRemoteAccess", + "type": "boolean" + }, + { + "name": "localNetworkSubnets", + "baseName": "LocalNetworkSubnets", + "type": "Array" + }, + { + "name": "localNetworkAddresses", + "baseName": "LocalNetworkAddresses", + "type": "Array" + }, + { + "name": "knownProxies", + "baseName": "KnownProxies", + "type": "Array" + }, + { + "name": "enablePublishedServerUriByRequest", + "baseName": "EnablePublishedServerUriByRequest", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return NetworkConfiguration.attributeTypeMap; + } +} + diff --git a/jellyfin/model/newGroupRequestDto.ts b/jellyfin/model/newGroupRequestDto.ts new file mode 100644 index 0000000..fe7a34c --- /dev/null +++ b/jellyfin/model/newGroupRequestDto.ts @@ -0,0 +1,37 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Class NewGroupRequestDto. +*/ +export class NewGroupRequestDto { + /** + * Gets or sets the group name. + */ + 'groupName'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "groupName", + "baseName": "GroupName", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return NewGroupRequestDto.attributeTypeMap; + } +} + diff --git a/jellyfin/model/nextItemRequestDto.ts b/jellyfin/model/nextItemRequestDto.ts new file mode 100644 index 0000000..f091677 --- /dev/null +++ b/jellyfin/model/nextItemRequestDto.ts @@ -0,0 +1,37 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Class NextItemRequestDto. +*/ +export class NextItemRequestDto { + /** + * Gets or sets the playing item identifier. + */ + 'playlistItemId'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "playlistItemId", + "baseName": "PlaylistItemId", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return NextItemRequestDto.attributeTypeMap; + } +} + diff --git a/jellyfin/model/notificationDto.ts b/jellyfin/model/notificationDto.ts new file mode 100644 index 0000000..94c3619 --- /dev/null +++ b/jellyfin/model/notificationDto.ts @@ -0,0 +1,100 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { NotificationLevel } from './notificationLevel'; + +/** +* The notification DTO. +*/ +export class NotificationDto { + /** + * Gets or sets the notification ID. Defaults to an empty string. + */ + 'id'?: string; + /** + * Gets or sets the notification\'s user ID. Defaults to an empty string. + */ + 'userId'?: string; + /** + * Gets or sets the notification date. + */ + 'date'?: Date; + /** + * Gets or sets a value indicating whether the notification has been read. Defaults to false. + */ + 'isRead'?: boolean; + /** + * Gets or sets the notification\'s name. Defaults to an empty string. + */ + 'name'?: string; + /** + * Gets or sets the notification\'s description. Defaults to an empty string. + */ + 'description'?: string; + /** + * Gets or sets the notification\'s URL. Defaults to an empty string. + */ + 'url'?: string; + 'level'?: NotificationLevel; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "id", + "baseName": "Id", + "type": "string" + }, + { + "name": "userId", + "baseName": "UserId", + "type": "string" + }, + { + "name": "date", + "baseName": "Date", + "type": "Date" + }, + { + "name": "isRead", + "baseName": "IsRead", + "type": "boolean" + }, + { + "name": "name", + "baseName": "Name", + "type": "string" + }, + { + "name": "description", + "baseName": "Description", + "type": "string" + }, + { + "name": "url", + "baseName": "Url", + "type": "string" + }, + { + "name": "level", + "baseName": "Level", + "type": "NotificationLevel" + } ]; + + static getAttributeTypeMap() { + return NotificationDto.attributeTypeMap; + } +} + +export namespace NotificationDto { +} diff --git a/jellyfin/model/notificationLevel.ts b/jellyfin/model/notificationLevel.ts new file mode 100644 index 0000000..fbbeb04 --- /dev/null +++ b/jellyfin/model/notificationLevel.ts @@ -0,0 +1,19 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export enum NotificationLevel { + Normal = 'Normal', + Warning = 'Warning', + Error = 'Error' +} diff --git a/jellyfin/model/notificationOption.ts b/jellyfin/model/notificationOption.ts new file mode 100644 index 0000000..261c35d --- /dev/null +++ b/jellyfin/model/notificationOption.ts @@ -0,0 +1,76 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { SendToUserType } from './sendToUserType'; + +export class NotificationOption { + 'type'?: string | null; + /** + * Gets or sets user Ids to not monitor (it\'s opt out). + */ + 'disabledMonitorUsers'?: Array; + /** + * Gets or sets user Ids to send to (if SendToUserMode == Custom). + */ + 'sendToUsers'?: Array; + /** + * Gets or sets a value indicating whether this MediaBrowser.Model.Notifications.NotificationOption is enabled. + */ + 'enabled'?: boolean; + /** + * Gets or sets the disabled services. + */ + 'disabledServices'?: Array; + 'sendToUserMode'?: SendToUserType; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "type", + "baseName": "Type", + "type": "string" + }, + { + "name": "disabledMonitorUsers", + "baseName": "DisabledMonitorUsers", + "type": "Array" + }, + { + "name": "sendToUsers", + "baseName": "SendToUsers", + "type": "Array" + }, + { + "name": "enabled", + "baseName": "Enabled", + "type": "boolean" + }, + { + "name": "disabledServices", + "baseName": "DisabledServices", + "type": "Array" + }, + { + "name": "sendToUserMode", + "baseName": "SendToUserMode", + "type": "SendToUserType" + } ]; + + static getAttributeTypeMap() { + return NotificationOption.attributeTypeMap; + } +} + +export namespace NotificationOption { +} diff --git a/jellyfin/model/notificationOptions.ts b/jellyfin/model/notificationOptions.ts new file mode 100644 index 0000000..b287d98 --- /dev/null +++ b/jellyfin/model/notificationOptions.ts @@ -0,0 +1,32 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { NotificationOption } from './notificationOption'; + +export class NotificationOptions { + 'options'?: Array | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "options", + "baseName": "Options", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return NotificationOptions.attributeTypeMap; + } +} + diff --git a/jellyfin/model/notificationResultDto.ts b/jellyfin/model/notificationResultDto.ts new file mode 100644 index 0000000..5338625 --- /dev/null +++ b/jellyfin/model/notificationResultDto.ts @@ -0,0 +1,47 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { NotificationDto } from './notificationDto'; + +/** +* A list of notifications with the total record count for pagination. +*/ +export class NotificationResultDto { + /** + * Gets or sets the current page of notifications. + */ + 'notifications'?: Array; + /** + * Gets or sets the total number of notifications. + */ + 'totalRecordCount'?: number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "notifications", + "baseName": "Notifications", + "type": "Array" + }, + { + "name": "totalRecordCount", + "baseName": "TotalRecordCount", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return NotificationResultDto.attributeTypeMap; + } +} + diff --git a/jellyfin/model/notificationTypeInfo.ts b/jellyfin/model/notificationTypeInfo.ts new file mode 100644 index 0000000..99c861a --- /dev/null +++ b/jellyfin/model/notificationTypeInfo.ts @@ -0,0 +1,55 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class NotificationTypeInfo { + 'type'?: string | null; + 'name'?: string | null; + 'enabled'?: boolean; + 'category'?: string | null; + 'isBasedOnUserEvent'?: boolean; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "type", + "baseName": "Type", + "type": "string" + }, + { + "name": "name", + "baseName": "Name", + "type": "string" + }, + { + "name": "enabled", + "baseName": "Enabled", + "type": "boolean" + }, + { + "name": "category", + "baseName": "Category", + "type": "string" + }, + { + "name": "isBasedOnUserEvent", + "baseName": "IsBasedOnUserEvent", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return NotificationTypeInfo.attributeTypeMap; + } +} + diff --git a/jellyfin/model/notificationsSummaryDto.ts b/jellyfin/model/notificationsSummaryDto.ts new file mode 100644 index 0000000..3bce043 --- /dev/null +++ b/jellyfin/model/notificationsSummaryDto.ts @@ -0,0 +1,46 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { NotificationLevel } from './notificationLevel'; + +/** +* The notification summary DTO. +*/ +export class NotificationsSummaryDto { + /** + * Gets or sets the number of unread notifications. + */ + 'unreadCount'?: number; + 'maxUnreadNotificationLevel'?: NotificationLevel | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "unreadCount", + "baseName": "UnreadCount", + "type": "number" + }, + { + "name": "maxUnreadNotificationLevel", + "baseName": "MaxUnreadNotificationLevel", + "type": "NotificationLevel" + } ]; + + static getAttributeTypeMap() { + return NotificationsSummaryDto.attributeTypeMap; + } +} + +export namespace NotificationsSummaryDto { +} diff --git a/jellyfin/model/objectGroupUpdate.ts b/jellyfin/model/objectGroupUpdate.ts new file mode 100644 index 0000000..420a6e7 --- /dev/null +++ b/jellyfin/model/objectGroupUpdate.ts @@ -0,0 +1,55 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { GroupUpdateType } from './groupUpdateType'; + +/** +* Class GroupUpdate. +*/ +export class ObjectGroupUpdate { + /** + * Gets the group identifier. + */ + 'groupId'?: string; + 'type'?: GroupUpdateType; + /** + * Gets the update data. + */ + 'data'?: any | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "groupId", + "baseName": "GroupId", + "type": "string" + }, + { + "name": "type", + "baseName": "Type", + "type": "GroupUpdateType" + }, + { + "name": "data", + "baseName": "Data", + "type": "any" + } ]; + + static getAttributeTypeMap() { + return ObjectGroupUpdate.attributeTypeMap; + } +} + +export namespace ObjectGroupUpdate { +} diff --git a/jellyfin/model/openLiveStreamDto.ts b/jellyfin/model/openLiveStreamDto.ts new file mode 100644 index 0000000..789ba29 --- /dev/null +++ b/jellyfin/model/openLiveStreamDto.ts @@ -0,0 +1,144 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { ClientCapabilitiesDtoDeviceProfile } from './clientCapabilitiesDtoDeviceProfile'; +import { MediaProtocol } from './mediaProtocol'; + +/** +* Open live stream dto. +*/ +export class OpenLiveStreamDto { + /** + * Gets or sets the open token. + */ + 'openToken'?: string | null; + /** + * Gets or sets the user id. + */ + 'userId'?: string | null; + /** + * Gets or sets the play session id. + */ + 'playSessionId'?: string | null; + /** + * Gets or sets the max streaming bitrate. + */ + 'maxStreamingBitrate'?: number | null; + /** + * Gets or sets the start time in ticks. + */ + 'startTimeTicks'?: number | null; + /** + * Gets or sets the audio stream index. + */ + 'audioStreamIndex'?: number | null; + /** + * Gets or sets the subtitle stream index. + */ + 'subtitleStreamIndex'?: number | null; + /** + * Gets or sets the max audio channels. + */ + 'maxAudioChannels'?: number | null; + /** + * Gets or sets the item id. + */ + 'itemId'?: string | null; + /** + * Gets or sets a value indicating whether to enable direct play. + */ + 'enableDirectPlay'?: boolean | null; + /** + * Gets or sets a value indicating whether to enale direct stream. + */ + 'enableDirectStream'?: boolean | null; + 'deviceProfile'?: ClientCapabilitiesDtoDeviceProfile | null; + /** + * Gets or sets the device play protocols. + */ + 'directPlayProtocols'?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "openToken", + "baseName": "OpenToken", + "type": "string" + }, + { + "name": "userId", + "baseName": "UserId", + "type": "string" + }, + { + "name": "playSessionId", + "baseName": "PlaySessionId", + "type": "string" + }, + { + "name": "maxStreamingBitrate", + "baseName": "MaxStreamingBitrate", + "type": "number" + }, + { + "name": "startTimeTicks", + "baseName": "StartTimeTicks", + "type": "number" + }, + { + "name": "audioStreamIndex", + "baseName": "AudioStreamIndex", + "type": "number" + }, + { + "name": "subtitleStreamIndex", + "baseName": "SubtitleStreamIndex", + "type": "number" + }, + { + "name": "maxAudioChannels", + "baseName": "MaxAudioChannels", + "type": "number" + }, + { + "name": "itemId", + "baseName": "ItemId", + "type": "string" + }, + { + "name": "enableDirectPlay", + "baseName": "EnableDirectPlay", + "type": "boolean" + }, + { + "name": "enableDirectStream", + "baseName": "EnableDirectStream", + "type": "boolean" + }, + { + "name": "deviceProfile", + "baseName": "DeviceProfile", + "type": "ClientCapabilitiesDtoDeviceProfile" + }, + { + "name": "directPlayProtocols", + "baseName": "DirectPlayProtocols", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return OpenLiveStreamDto.attributeTypeMap; + } +} + diff --git a/jellyfin/model/openLiveStreamRequest.ts b/jellyfin/model/openLiveStreamRequest.ts new file mode 100644 index 0000000..3438899 --- /dev/null +++ b/jellyfin/model/openLiveStreamRequest.ts @@ -0,0 +1,144 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { ClientCapabilitiesDtoDeviceProfile } from './clientCapabilitiesDtoDeviceProfile'; +import { MediaProtocol } from './mediaProtocol'; + +/** +* Open live stream dto. +*/ +export class OpenLiveStreamRequest { + /** + * Gets or sets the open token. + */ + 'openToken'?: string | null; + /** + * Gets or sets the user id. + */ + 'userId'?: string | null; + /** + * Gets or sets the play session id. + */ + 'playSessionId'?: string | null; + /** + * Gets or sets the max streaming bitrate. + */ + 'maxStreamingBitrate'?: number | null; + /** + * Gets or sets the start time in ticks. + */ + 'startTimeTicks'?: number | null; + /** + * Gets or sets the audio stream index. + */ + 'audioStreamIndex'?: number | null; + /** + * Gets or sets the subtitle stream index. + */ + 'subtitleStreamIndex'?: number | null; + /** + * Gets or sets the max audio channels. + */ + 'maxAudioChannels'?: number | null; + /** + * Gets or sets the item id. + */ + 'itemId'?: string | null; + /** + * Gets or sets a value indicating whether to enable direct play. + */ + 'enableDirectPlay'?: boolean | null; + /** + * Gets or sets a value indicating whether to enale direct stream. + */ + 'enableDirectStream'?: boolean | null; + 'deviceProfile'?: ClientCapabilitiesDtoDeviceProfile | null; + /** + * Gets or sets the device play protocols. + */ + 'directPlayProtocols'?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "openToken", + "baseName": "OpenToken", + "type": "string" + }, + { + "name": "userId", + "baseName": "UserId", + "type": "string" + }, + { + "name": "playSessionId", + "baseName": "PlaySessionId", + "type": "string" + }, + { + "name": "maxStreamingBitrate", + "baseName": "MaxStreamingBitrate", + "type": "number" + }, + { + "name": "startTimeTicks", + "baseName": "StartTimeTicks", + "type": "number" + }, + { + "name": "audioStreamIndex", + "baseName": "AudioStreamIndex", + "type": "number" + }, + { + "name": "subtitleStreamIndex", + "baseName": "SubtitleStreamIndex", + "type": "number" + }, + { + "name": "maxAudioChannels", + "baseName": "MaxAudioChannels", + "type": "number" + }, + { + "name": "itemId", + "baseName": "ItemId", + "type": "string" + }, + { + "name": "enableDirectPlay", + "baseName": "EnableDirectPlay", + "type": "boolean" + }, + { + "name": "enableDirectStream", + "baseName": "EnableDirectStream", + "type": "boolean" + }, + { + "name": "deviceProfile", + "baseName": "DeviceProfile", + "type": "ClientCapabilitiesDtoDeviceProfile" + }, + { + "name": "directPlayProtocols", + "baseName": "DirectPlayProtocols", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return OpenLiveStreamRequest.attributeTypeMap; + } +} + diff --git a/jellyfin/model/packageInfo.ts b/jellyfin/model/packageInfo.ts new file mode 100644 index 0000000..f68d0cf --- /dev/null +++ b/jellyfin/model/packageInfo.ts @@ -0,0 +1,101 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { VersionInfo } from './versionInfo'; + +/** +* Class PackageInfo. +*/ +export class PackageInfo { + /** + * Gets or sets the name. + */ + 'name'?: string; + /** + * Gets or sets a long description of the plugin containing features or helpful explanations. + */ + 'description'?: string; + /** + * Gets or sets a short overview of what the plugin does. + */ + 'overview'?: string; + /** + * Gets or sets the owner. + */ + 'owner'?: string; + /** + * Gets or sets the category. + */ + 'category'?: string; + /** + * Gets or sets the guid of the assembly associated with this plugin. This is used to identify the proper item for automatic updates. + */ + 'guid'?: string; + /** + * Gets or sets the versions. + */ + 'versions'?: Array; + /** + * Gets or sets the image url for the package. + */ + 'imageUrl'?: string | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "name", + "type": "string" + }, + { + "name": "description", + "baseName": "description", + "type": "string" + }, + { + "name": "overview", + "baseName": "overview", + "type": "string" + }, + { + "name": "owner", + "baseName": "owner", + "type": "string" + }, + { + "name": "category", + "baseName": "category", + "type": "string" + }, + { + "name": "guid", + "baseName": "guid", + "type": "string" + }, + { + "name": "versions", + "baseName": "versions", + "type": "Array" + }, + { + "name": "imageUrl", + "baseName": "imageUrl", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return PackageInfo.attributeTypeMap; + } +} + diff --git a/jellyfin/model/parentalRating.ts b/jellyfin/model/parentalRating.ts new file mode 100644 index 0000000..5c60a2e --- /dev/null +++ b/jellyfin/model/parentalRating.ts @@ -0,0 +1,46 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Class ParentalRating. +*/ +export class ParentalRating { + /** + * Gets or sets the name. + */ + 'name'?: string | null; + /** + * Gets or sets the value. + */ + 'value'?: number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "Name", + "type": "string" + }, + { + "name": "value", + "baseName": "Value", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return ParentalRating.attributeTypeMap; + } +} + diff --git a/jellyfin/model/pathSubstitution.ts b/jellyfin/model/pathSubstitution.ts new file mode 100644 index 0000000..176938d --- /dev/null +++ b/jellyfin/model/pathSubstitution.ts @@ -0,0 +1,46 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Defines the MediaBrowser.Model.Configuration.PathSubstitution. +*/ +export class PathSubstitution { + /** + * Gets or sets the value to substitute. + */ + 'from'?: string; + /** + * Gets or sets the value to substitution with. + */ + 'to'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "from", + "baseName": "From", + "type": "string" + }, + { + "name": "to", + "baseName": "To", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return PathSubstitution.attributeTypeMap; + } +} + diff --git a/jellyfin/model/personLookupInfo.ts b/jellyfin/model/personLookupInfo.ts new file mode 100644 index 0000000..3b68538 --- /dev/null +++ b/jellyfin/model/personLookupInfo.ts @@ -0,0 +1,112 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class PersonLookupInfo { + /** + * Gets or sets the name. + */ + 'name'?: string | null; + /** + * Gets or sets the original title. + */ + 'originalTitle'?: string | null; + /** + * Gets or sets the path. + */ + 'path'?: string | null; + /** + * Gets or sets the metadata language. + */ + 'metadataLanguage'?: string | null; + /** + * Gets or sets the metadata country code. + */ + 'metadataCountryCode'?: string | null; + /** + * Gets or sets the provider ids. + */ + 'providerIds'?: { [key: string]: string; } | null; + /** + * Gets or sets the year. + */ + 'year'?: number | null; + 'indexNumber'?: number | null; + 'parentIndexNumber'?: number | null; + 'premiereDate'?: Date | null; + 'isAutomated'?: boolean; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "Name", + "type": "string" + }, + { + "name": "originalTitle", + "baseName": "OriginalTitle", + "type": "string" + }, + { + "name": "path", + "baseName": "Path", + "type": "string" + }, + { + "name": "metadataLanguage", + "baseName": "MetadataLanguage", + "type": "string" + }, + { + "name": "metadataCountryCode", + "baseName": "MetadataCountryCode", + "type": "string" + }, + { + "name": "providerIds", + "baseName": "ProviderIds", + "type": "{ [key: string]: string; }" + }, + { + "name": "year", + "baseName": "Year", + "type": "number" + }, + { + "name": "indexNumber", + "baseName": "IndexNumber", + "type": "number" + }, + { + "name": "parentIndexNumber", + "baseName": "ParentIndexNumber", + "type": "number" + }, + { + "name": "premiereDate", + "baseName": "PremiereDate", + "type": "Date" + }, + { + "name": "isAutomated", + "baseName": "IsAutomated", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return PersonLookupInfo.attributeTypeMap; + } +} + diff --git a/jellyfin/model/personLookupInfoRemoteSearchQuery.ts b/jellyfin/model/personLookupInfoRemoteSearchQuery.ts new file mode 100644 index 0000000..6e6f737 --- /dev/null +++ b/jellyfin/model/personLookupInfoRemoteSearchQuery.ts @@ -0,0 +1,56 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { PersonLookupInfo } from './personLookupInfo'; + +export class PersonLookupInfoRemoteSearchQuery { + 'searchInfo'?: PersonLookupInfo | null; + 'itemId'?: string; + /** + * Gets or sets the provider name to search within if set. + */ + 'searchProviderName'?: string | null; + /** + * Gets or sets a value indicating whether disabled providers should be included. + */ + 'includeDisabledProviders'?: boolean; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "searchInfo", + "baseName": "SearchInfo", + "type": "PersonLookupInfo" + }, + { + "name": "itemId", + "baseName": "ItemId", + "type": "string" + }, + { + "name": "searchProviderName", + "baseName": "SearchProviderName", + "type": "string" + }, + { + "name": "includeDisabledProviders", + "baseName": "IncludeDisabledProviders", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return PersonLookupInfoRemoteSearchQuery.attributeTypeMap; + } +} + diff --git a/jellyfin/model/pinRedeemResult.ts b/jellyfin/model/pinRedeemResult.ts new file mode 100644 index 0000000..dfd3899 --- /dev/null +++ b/jellyfin/model/pinRedeemResult.ts @@ -0,0 +1,43 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class PinRedeemResult { + /** + * Gets or sets a value indicating whether this MediaBrowser.Model.Users.PinRedeemResult is success. + */ + 'success'?: boolean; + /** + * Gets or sets the users reset. + */ + 'usersReset'?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "success", + "baseName": "Success", + "type": "boolean" + }, + { + "name": "usersReset", + "baseName": "UsersReset", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return PinRedeemResult.attributeTypeMap; + } +} + diff --git a/jellyfin/model/pingRequestDto.ts b/jellyfin/model/pingRequestDto.ts new file mode 100644 index 0000000..fa7ff5a --- /dev/null +++ b/jellyfin/model/pingRequestDto.ts @@ -0,0 +1,37 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Class PingRequestDto. +*/ +export class PingRequestDto { + /** + * Gets or sets the ping time. + */ + 'ping'?: number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "ping", + "baseName": "Ping", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return PingRequestDto.attributeTypeMap; + } +} + diff --git a/jellyfin/model/playAccess.ts b/jellyfin/model/playAccess.ts new file mode 100644 index 0000000..04dee5d --- /dev/null +++ b/jellyfin/model/playAccess.ts @@ -0,0 +1,18 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export enum PlayAccess { + Full = 'Full', + None = 'None' +} diff --git a/jellyfin/model/playCommand.ts b/jellyfin/model/playCommand.ts new file mode 100644 index 0000000..53595bb --- /dev/null +++ b/jellyfin/model/playCommand.ts @@ -0,0 +1,24 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Enum PlayCommand. +*/ +export enum PlayCommand { + PlayNow = 'PlayNow', + PlayNext = 'PlayNext', + PlayLast = 'PlayLast', + PlayInstantMix = 'PlayInstantMix', + PlayShuffle = 'PlayShuffle' +} diff --git a/jellyfin/model/playMethod.ts b/jellyfin/model/playMethod.ts new file mode 100644 index 0000000..761ccdf --- /dev/null +++ b/jellyfin/model/playMethod.ts @@ -0,0 +1,19 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export enum PlayMethod { + Transcode = 'Transcode', + DirectStream = 'DirectStream', + DirectPlay = 'DirectPlay' +} diff --git a/jellyfin/model/playRequest.ts b/jellyfin/model/playRequest.ts new file mode 100644 index 0000000..f8a52b3 --- /dev/null +++ b/jellyfin/model/playRequest.ts @@ -0,0 +1,88 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { PlayCommand } from './playCommand'; + +/** +* Class PlayRequest. +*/ +export class PlayRequest { + /** + * Gets or sets the item ids. + */ + 'itemIds'?: Array | null; + /** + * Gets or sets the start position ticks that the first item should be played at. + */ + 'startPositionTicks'?: number | null; + 'playCommand'?: PlayCommand; + /** + * Gets or sets the controlling user identifier. + */ + 'controllingUserId'?: string; + 'subtitleStreamIndex'?: number | null; + 'audioStreamIndex'?: number | null; + 'mediaSourceId'?: string | null; + 'startIndex'?: number | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "itemIds", + "baseName": "ItemIds", + "type": "Array" + }, + { + "name": "startPositionTicks", + "baseName": "StartPositionTicks", + "type": "number" + }, + { + "name": "playCommand", + "baseName": "PlayCommand", + "type": "PlayCommand" + }, + { + "name": "controllingUserId", + "baseName": "ControllingUserId", + "type": "string" + }, + { + "name": "subtitleStreamIndex", + "baseName": "SubtitleStreamIndex", + "type": "number" + }, + { + "name": "audioStreamIndex", + "baseName": "AudioStreamIndex", + "type": "number" + }, + { + "name": "mediaSourceId", + "baseName": "MediaSourceId", + "type": "string" + }, + { + "name": "startIndex", + "baseName": "StartIndex", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return PlayRequest.attributeTypeMap; + } +} + +export namespace PlayRequest { +} diff --git a/jellyfin/model/playRequestDto.ts b/jellyfin/model/playRequestDto.ts new file mode 100644 index 0000000..7143093 --- /dev/null +++ b/jellyfin/model/playRequestDto.ts @@ -0,0 +1,55 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Class PlayRequestDto. +*/ +export class PlayRequestDto { + /** + * Gets or sets the playing queue. + */ + 'playingQueue'?: Array; + /** + * Gets or sets the position of the playing item in the queue. + */ + 'playingItemPosition'?: number; + /** + * Gets or sets the start position ticks. + */ + 'startPositionTicks'?: number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "playingQueue", + "baseName": "PlayingQueue", + "type": "Array" + }, + { + "name": "playingItemPosition", + "baseName": "PlayingItemPosition", + "type": "number" + }, + { + "name": "startPositionTicks", + "baseName": "StartPositionTicks", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return PlayRequestDto.attributeTypeMap; + } +} + diff --git a/jellyfin/model/playbackErrorCode.ts b/jellyfin/model/playbackErrorCode.ts new file mode 100644 index 0000000..a891db7 --- /dev/null +++ b/jellyfin/model/playbackErrorCode.ts @@ -0,0 +1,19 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export enum PlaybackErrorCode { + NotAllowed = 'NotAllowed', + NoCompatibleStream = 'NoCompatibleStream', + RateLimitExceeded = 'RateLimitExceeded' +} diff --git a/jellyfin/model/playbackInfoDto.ts b/jellyfin/model/playbackInfoDto.ts new file mode 100644 index 0000000..e839634 --- /dev/null +++ b/jellyfin/model/playbackInfoDto.ts @@ -0,0 +1,161 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { ClientCapabilitiesDtoDeviceProfile } from './clientCapabilitiesDtoDeviceProfile'; + +/** +* Plabyback info dto. +*/ +export class PlaybackInfoDto { + /** + * Gets or sets the playback userId. + */ + 'userId'?: string | null; + /** + * Gets or sets the max streaming bitrate. + */ + 'maxStreamingBitrate'?: number | null; + /** + * Gets or sets the start time in ticks. + */ + 'startTimeTicks'?: number | null; + /** + * Gets or sets the audio stream index. + */ + 'audioStreamIndex'?: number | null; + /** + * Gets or sets the subtitle stream index. + */ + 'subtitleStreamIndex'?: number | null; + /** + * Gets or sets the max audio channels. + */ + 'maxAudioChannels'?: number | null; + /** + * Gets or sets the media source id. + */ + 'mediaSourceId'?: string | null; + /** + * Gets or sets the live stream id. + */ + 'liveStreamId'?: string | null; + 'deviceProfile'?: ClientCapabilitiesDtoDeviceProfile | null; + /** + * Gets or sets a value indicating whether to enable direct play. + */ + 'enableDirectPlay'?: boolean | null; + /** + * Gets or sets a value indicating whether to enable direct stream. + */ + 'enableDirectStream'?: boolean | null; + /** + * Gets or sets a value indicating whether to enable transcoding. + */ + 'enableTranscoding'?: boolean | null; + /** + * Gets or sets a value indicating whether to enable video stream copy. + */ + 'allowVideoStreamCopy'?: boolean | null; + /** + * Gets or sets a value indicating whether to allow audio stream copy. + */ + 'allowAudioStreamCopy'?: boolean | null; + /** + * Gets or sets a value indicating whether to auto open the live stream. + */ + 'autoOpenLiveStream'?: boolean | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "userId", + "baseName": "UserId", + "type": "string" + }, + { + "name": "maxStreamingBitrate", + "baseName": "MaxStreamingBitrate", + "type": "number" + }, + { + "name": "startTimeTicks", + "baseName": "StartTimeTicks", + "type": "number" + }, + { + "name": "audioStreamIndex", + "baseName": "AudioStreamIndex", + "type": "number" + }, + { + "name": "subtitleStreamIndex", + "baseName": "SubtitleStreamIndex", + "type": "number" + }, + { + "name": "maxAudioChannels", + "baseName": "MaxAudioChannels", + "type": "number" + }, + { + "name": "mediaSourceId", + "baseName": "MediaSourceId", + "type": "string" + }, + { + "name": "liveStreamId", + "baseName": "LiveStreamId", + "type": "string" + }, + { + "name": "deviceProfile", + "baseName": "DeviceProfile", + "type": "ClientCapabilitiesDtoDeviceProfile" + }, + { + "name": "enableDirectPlay", + "baseName": "EnableDirectPlay", + "type": "boolean" + }, + { + "name": "enableDirectStream", + "baseName": "EnableDirectStream", + "type": "boolean" + }, + { + "name": "enableTranscoding", + "baseName": "EnableTranscoding", + "type": "boolean" + }, + { + "name": "allowVideoStreamCopy", + "baseName": "AllowVideoStreamCopy", + "type": "boolean" + }, + { + "name": "allowAudioStreamCopy", + "baseName": "AllowAudioStreamCopy", + "type": "boolean" + }, + { + "name": "autoOpenLiveStream", + "baseName": "AutoOpenLiveStream", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return PlaybackInfoDto.attributeTypeMap; + } +} + diff --git a/jellyfin/model/playbackInfoResponse.ts b/jellyfin/model/playbackInfoResponse.ts new file mode 100644 index 0000000..5106e72 --- /dev/null +++ b/jellyfin/model/playbackInfoResponse.ts @@ -0,0 +1,56 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { MediaSourceInfo } from './mediaSourceInfo'; +import { PlaybackErrorCode } from './playbackErrorCode'; + +/** +* Class PlaybackInfoResponse. +*/ +export class PlaybackInfoResponse { + /** + * Gets or sets the media sources. + */ + 'mediaSources'?: Array; + /** + * Gets or sets the play session identifier. + */ + 'playSessionId'?: string | null; + 'errorCode'?: PlaybackErrorCode | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "mediaSources", + "baseName": "MediaSources", + "type": "Array" + }, + { + "name": "playSessionId", + "baseName": "PlaySessionId", + "type": "string" + }, + { + "name": "errorCode", + "baseName": "ErrorCode", + "type": "PlaybackErrorCode" + } ]; + + static getAttributeTypeMap() { + return PlaybackInfoResponse.attributeTypeMap; + } +} + +export namespace PlaybackInfoResponse { +} diff --git a/jellyfin/model/playbackProgressInfo.ts b/jellyfin/model/playbackProgressInfo.ts new file mode 100644 index 0000000..a17c8aa --- /dev/null +++ b/jellyfin/model/playbackProgressInfo.ts @@ -0,0 +1,190 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { PlayMethod } from './playMethod'; +import { PlaybackProgressInfoItem } from './playbackProgressInfoItem'; +import { QueueItem } from './queueItem'; +import { RepeatMode } from './repeatMode'; + +/** +* Class PlaybackProgressInfo. +*/ +export class PlaybackProgressInfo { + /** + * Gets or sets a value indicating whether this instance can seek. + */ + 'canSeek'?: boolean; + 'item'?: PlaybackProgressInfoItem | null; + /** + * Gets or sets the item identifier. + */ + 'itemId'?: string; + /** + * Gets or sets the session id. + */ + 'sessionId'?: string | null; + /** + * Gets or sets the media version identifier. + */ + 'mediaSourceId'?: string | null; + /** + * Gets or sets the index of the audio stream. + */ + 'audioStreamIndex'?: number | null; + /** + * Gets or sets the index of the subtitle stream. + */ + 'subtitleStreamIndex'?: number | null; + /** + * Gets or sets a value indicating whether this instance is paused. + */ + 'isPaused'?: boolean; + /** + * Gets or sets a value indicating whether this instance is muted. + */ + 'isMuted'?: boolean; + /** + * Gets or sets the position ticks. + */ + 'positionTicks'?: number | null; + 'playbackStartTimeTicks'?: number | null; + /** + * Gets or sets the volume level. + */ + 'volumeLevel'?: number | null; + 'brightness'?: number | null; + 'aspectRatio'?: string | null; + 'playMethod'?: PlayMethod; + /** + * Gets or sets the live stream identifier. + */ + 'liveStreamId'?: string | null; + /** + * Gets or sets the play session identifier. + */ + 'playSessionId'?: string | null; + 'repeatMode'?: RepeatMode; + 'nowPlayingQueue'?: Array | null; + 'playlistItemId'?: string | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "canSeek", + "baseName": "CanSeek", + "type": "boolean" + }, + { + "name": "item", + "baseName": "Item", + "type": "PlaybackProgressInfoItem" + }, + { + "name": "itemId", + "baseName": "ItemId", + "type": "string" + }, + { + "name": "sessionId", + "baseName": "SessionId", + "type": "string" + }, + { + "name": "mediaSourceId", + "baseName": "MediaSourceId", + "type": "string" + }, + { + "name": "audioStreamIndex", + "baseName": "AudioStreamIndex", + "type": "number" + }, + { + "name": "subtitleStreamIndex", + "baseName": "SubtitleStreamIndex", + "type": "number" + }, + { + "name": "isPaused", + "baseName": "IsPaused", + "type": "boolean" + }, + { + "name": "isMuted", + "baseName": "IsMuted", + "type": "boolean" + }, + { + "name": "positionTicks", + "baseName": "PositionTicks", + "type": "number" + }, + { + "name": "playbackStartTimeTicks", + "baseName": "PlaybackStartTimeTicks", + "type": "number" + }, + { + "name": "volumeLevel", + "baseName": "VolumeLevel", + "type": "number" + }, + { + "name": "brightness", + "baseName": "Brightness", + "type": "number" + }, + { + "name": "aspectRatio", + "baseName": "AspectRatio", + "type": "string" + }, + { + "name": "playMethod", + "baseName": "PlayMethod", + "type": "PlayMethod" + }, + { + "name": "liveStreamId", + "baseName": "LiveStreamId", + "type": "string" + }, + { + "name": "playSessionId", + "baseName": "PlaySessionId", + "type": "string" + }, + { + "name": "repeatMode", + "baseName": "RepeatMode", + "type": "RepeatMode" + }, + { + "name": "nowPlayingQueue", + "baseName": "NowPlayingQueue", + "type": "Array" + }, + { + "name": "playlistItemId", + "baseName": "PlaylistItemId", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return PlaybackProgressInfo.attributeTypeMap; + } +} + +export namespace PlaybackProgressInfo { +} diff --git a/jellyfin/model/playbackProgressInfoItem.ts b/jellyfin/model/playbackProgressInfoItem.ts new file mode 100644 index 0000000..7493749 --- /dev/null +++ b/jellyfin/model/playbackProgressInfoItem.ts @@ -0,0 +1,1272 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { BaseItemDtoCurrentProgram } from './baseItemDtoCurrentProgram'; +import { BaseItemDtoImageBlurHashes } from './baseItemDtoImageBlurHashes'; +import { BaseItemDtoUserData } from './baseItemDtoUserData'; +import { BaseItemKind } from './baseItemKind'; +import { BaseItemPerson } from './baseItemPerson'; +import { ChannelType } from './channelType'; +import { ChapterInfo } from './chapterInfo'; +import { DayOfWeek } from './dayOfWeek'; +import { ExternalUrl } from './externalUrl'; +import { ImageOrientation } from './imageOrientation'; +import { IsoType } from './isoType'; +import { LocationType } from './locationType'; +import { MediaSourceInfo } from './mediaSourceInfo'; +import { MediaStream } from './mediaStream'; +import { MediaUrl } from './mediaUrl'; +import { MetadataField } from './metadataField'; +import { NameGuidPair } from './nameGuidPair'; +import { PlayAccess } from './playAccess'; +import { ProgramAudio } from './programAudio'; +import { Video3DFormat } from './video3DFormat'; +import { VideoType } from './videoType'; + +/** +* Gets or sets the item. +*/ +export class PlaybackProgressInfoItem { + /** + * Gets or sets the name. + */ + 'name'?: string | null; + 'originalTitle'?: string | null; + /** + * Gets or sets the server identifier. + */ + 'serverId'?: string | null; + /** + * Gets or sets the id. + */ + 'id'?: string; + /** + * Gets or sets the etag. + */ + 'etag'?: string | null; + /** + * Gets or sets the type of the source. + */ + 'sourceType'?: string | null; + /** + * Gets or sets the playlist item identifier. + */ + 'playlistItemId'?: string | null; + /** + * Gets or sets the date created. + */ + 'dateCreated'?: Date | null; + 'dateLastMediaAdded'?: Date | null; + 'extraType'?: string | null; + 'airsBeforeSeasonNumber'?: number | null; + 'airsAfterSeasonNumber'?: number | null; + 'airsBeforeEpisodeNumber'?: number | null; + 'canDelete'?: boolean | null; + 'canDownload'?: boolean | null; + 'hasSubtitles'?: boolean | null; + 'preferredMetadataLanguage'?: string | null; + 'preferredMetadataCountryCode'?: string | null; + /** + * Gets or sets a value indicating whether [supports synchronize]. + */ + 'supportsSync'?: boolean | null; + 'container'?: string | null; + /** + * Gets or sets the name of the sort. + */ + 'sortName'?: string | null; + 'forcedSortName'?: string | null; + 'video3DFormat'?: Video3DFormat | null; + /** + * Gets or sets the premiere date. + */ + 'premiereDate'?: Date | null; + /** + * Gets or sets the external urls. + */ + 'externalUrls'?: Array | null; + /** + * Gets or sets the media versions. + */ + 'mediaSources'?: Array | null; + /** + * Gets or sets the critic rating. + */ + 'criticRating'?: number | null; + 'productionLocations'?: Array | null; + /** + * Gets or sets the path. + */ + 'path'?: string | null; + 'enableMediaSourceDisplay'?: boolean | null; + /** + * Gets or sets the official rating. + */ + 'officialRating'?: string | null; + /** + * Gets or sets the custom rating. + */ + 'customRating'?: string | null; + /** + * Gets or sets the channel identifier. + */ + 'channelId'?: string | null; + 'channelName'?: string | null; + /** + * Gets or sets the overview. + */ + 'overview'?: string | null; + /** + * Gets or sets the taglines. + */ + 'taglines'?: Array | null; + /** + * Gets or sets the genres. + */ + 'genres'?: Array | null; + /** + * Gets or sets the community rating. + */ + 'communityRating'?: number | null; + /** + * Gets or sets the cumulative run time ticks. + */ + 'cumulativeRunTimeTicks'?: number | null; + /** + * Gets or sets the run time ticks. + */ + 'runTimeTicks'?: number | null; + 'playAccess'?: PlayAccess | null; + /** + * Gets or sets the aspect ratio. + */ + 'aspectRatio'?: string | null; + /** + * Gets or sets the production year. + */ + 'productionYear'?: number | null; + /** + * Gets or sets a value indicating whether this instance is place holder. + */ + 'isPlaceHolder'?: boolean | null; + /** + * Gets or sets the number. + */ + 'number'?: string | null; + 'channelNumber'?: string | null; + /** + * Gets or sets the index number. + */ + 'indexNumber'?: number | null; + /** + * Gets or sets the index number end. + */ + 'indexNumberEnd'?: number | null; + /** + * Gets or sets the parent index number. + */ + 'parentIndexNumber'?: number | null; + /** + * Gets or sets the trailer urls. + */ + 'remoteTrailers'?: Array | null; + /** + * Gets or sets the provider ids. + */ + 'providerIds'?: { [key: string]: string; } | null; + /** + * Gets or sets a value indicating whether this instance is HD. + */ + 'isHD'?: boolean | null; + /** + * Gets or sets a value indicating whether this instance is folder. + */ + 'isFolder'?: boolean | null; + /** + * Gets or sets the parent id. + */ + 'parentId'?: string | null; + 'type'?: BaseItemKind; + /** + * Gets or sets the people. + */ + 'people'?: Array | null; + /** + * Gets or sets the studios. + */ + 'studios'?: Array | null; + 'genreItems'?: Array | null; + /** + * Gets or sets wether the item has a logo, this will hold the Id of the Parent that has one. + */ + 'parentLogoItemId'?: string | null; + /** + * Gets or sets wether the item has any backdrops, this will hold the Id of the Parent that has one. + */ + 'parentBackdropItemId'?: string | null; + /** + * Gets or sets the parent backdrop image tags. + */ + 'parentBackdropImageTags'?: Array | null; + /** + * Gets or sets the local trailer count. + */ + 'localTrailerCount'?: number | null; + 'userData'?: BaseItemDtoUserData | null; + /** + * Gets or sets the recursive item count. + */ + 'recursiveItemCount'?: number | null; + /** + * Gets or sets the child count. + */ + 'childCount'?: number | null; + /** + * Gets or sets the name of the series. + */ + 'seriesName'?: string | null; + /** + * Gets or sets the series id. + */ + 'seriesId'?: string | null; + /** + * Gets or sets the season identifier. + */ + 'seasonId'?: string | null; + /** + * Gets or sets the special feature count. + */ + 'specialFeatureCount'?: number | null; + /** + * Gets or sets the display preferences id. + */ + 'displayPreferencesId'?: string | null; + /** + * Gets or sets the status. + */ + 'status'?: string | null; + /** + * Gets or sets the air time. + */ + 'airTime'?: string | null; + /** + * Gets or sets the air days. + */ + 'airDays'?: Array | null; + /** + * Gets or sets the tags. + */ + 'tags'?: Array | null; + /** + * Gets or sets the primary image aspect ratio, after image enhancements. + */ + 'primaryImageAspectRatio'?: number | null; + /** + * Gets or sets the artists. + */ + 'artists'?: Array | null; + /** + * Gets or sets the artist items. + */ + 'artistItems'?: Array | null; + /** + * Gets or sets the album. + */ + 'album'?: string | null; + /** + * Gets or sets the type of the collection. + */ + 'collectionType'?: string | null; + /** + * Gets or sets the display order. + */ + 'displayOrder'?: string | null; + /** + * Gets or sets the album id. + */ + 'albumId'?: string | null; + /** + * Gets or sets the album image tag. + */ + 'albumPrimaryImageTag'?: string | null; + /** + * Gets or sets the series primary image tag. + */ + 'seriesPrimaryImageTag'?: string | null; + /** + * Gets or sets the album artist. + */ + 'albumArtist'?: string | null; + /** + * Gets or sets the album artists. + */ + 'albumArtists'?: Array | null; + /** + * Gets or sets the name of the season. + */ + 'seasonName'?: string | null; + /** + * Gets or sets the media streams. + */ + 'mediaStreams'?: Array | null; + 'videoType'?: VideoType | null; + /** + * Gets or sets the part count. + */ + 'partCount'?: number | null; + 'mediaSourceCount'?: number | null; + /** + * Gets or sets the image tags. + */ + 'imageTags'?: { [key: string]: string; } | null; + /** + * Gets or sets the backdrop image tags. + */ + 'backdropImageTags'?: Array | null; + /** + * Gets or sets the screenshot image tags. + */ + 'screenshotImageTags'?: Array | null; + /** + * Gets or sets the parent logo image tag. + */ + 'parentLogoImageTag'?: string | null; + /** + * Gets or sets wether the item has fan art, this will hold the Id of the Parent that has one. + */ + 'parentArtItemId'?: string | null; + /** + * Gets or sets the parent art image tag. + */ + 'parentArtImageTag'?: string | null; + /** + * Gets or sets the series thumb image tag. + */ + 'seriesThumbImageTag'?: string | null; + 'imageBlurHashes'?: BaseItemDtoImageBlurHashes | null; + /** + * Gets or sets the series studio. + */ + 'seriesStudio'?: string | null; + /** + * Gets or sets the parent thumb item id. + */ + 'parentThumbItemId'?: string | null; + /** + * Gets or sets the parent thumb image tag. + */ + 'parentThumbImageTag'?: string | null; + /** + * Gets or sets the parent primary image item identifier. + */ + 'parentPrimaryImageItemId'?: string | null; + /** + * Gets or sets the parent primary image tag. + */ + 'parentPrimaryImageTag'?: string | null; + /** + * Gets or sets the chapters. + */ + 'chapters'?: Array | null; + 'locationType'?: LocationType | null; + 'isoType'?: IsoType | null; + /** + * Gets or sets the type of the media. + */ + 'mediaType'?: string | null; + /** + * Gets or sets the end date. + */ + 'endDate'?: Date | null; + /** + * Gets or sets the locked fields. + */ + 'lockedFields'?: Array | null; + /** + * Gets or sets the trailer count. + */ + 'trailerCount'?: number | null; + /** + * Gets or sets the movie count. + */ + 'movieCount'?: number | null; + /** + * Gets or sets the series count. + */ + 'seriesCount'?: number | null; + 'programCount'?: number | null; + /** + * Gets or sets the episode count. + */ + 'episodeCount'?: number | null; + /** + * Gets or sets the song count. + */ + 'songCount'?: number | null; + /** + * Gets or sets the album count. + */ + 'albumCount'?: number | null; + 'artistCount'?: number | null; + /** + * Gets or sets the music video count. + */ + 'musicVideoCount'?: number | null; + /** + * Gets or sets a value indicating whether [enable internet providers]. + */ + 'lockData'?: boolean | null; + 'width'?: number | null; + 'height'?: number | null; + 'cameraMake'?: string | null; + 'cameraModel'?: string | null; + 'software'?: string | null; + 'exposureTime'?: number | null; + 'focalLength'?: number | null; + 'imageOrientation'?: ImageOrientation | null; + 'aperture'?: number | null; + 'shutterSpeed'?: number | null; + 'latitude'?: number | null; + 'longitude'?: number | null; + 'altitude'?: number | null; + 'isoSpeedRating'?: number | null; + /** + * Gets or sets the series timer identifier. + */ + 'seriesTimerId'?: string | null; + /** + * Gets or sets the program identifier. + */ + 'programId'?: string | null; + /** + * Gets or sets the channel primary image tag. + */ + 'channelPrimaryImageTag'?: string | null; + /** + * Gets or sets the start date of the recording, in UTC. + */ + 'startDate'?: Date | null; + /** + * Gets or sets the completion percentage. + */ + 'completionPercentage'?: number | null; + /** + * Gets or sets a value indicating whether this instance is repeat. + */ + 'isRepeat'?: boolean | null; + /** + * Gets or sets the episode title. + */ + 'episodeTitle'?: string | null; + 'channelType'?: ChannelType | null; + 'audio'?: ProgramAudio | null; + /** + * Gets or sets a value indicating whether this instance is movie. + */ + 'isMovie'?: boolean | null; + /** + * Gets or sets a value indicating whether this instance is sports. + */ + 'isSports'?: boolean | null; + /** + * Gets or sets a value indicating whether this instance is series. + */ + 'isSeries'?: boolean | null; + /** + * Gets or sets a value indicating whether this instance is live. + */ + 'isLive'?: boolean | null; + /** + * Gets or sets a value indicating whether this instance is news. + */ + 'isNews'?: boolean | null; + /** + * Gets or sets a value indicating whether this instance is kids. + */ + 'isKids'?: boolean | null; + /** + * Gets or sets a value indicating whether this instance is premiere. + */ + 'isPremiere'?: boolean | null; + /** + * Gets or sets the timer identifier. + */ + 'timerId'?: string | null; + 'currentProgram'?: BaseItemDtoCurrentProgram | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "Name", + "type": "string" + }, + { + "name": "originalTitle", + "baseName": "OriginalTitle", + "type": "string" + }, + { + "name": "serverId", + "baseName": "ServerId", + "type": "string" + }, + { + "name": "id", + "baseName": "Id", + "type": "string" + }, + { + "name": "etag", + "baseName": "Etag", + "type": "string" + }, + { + "name": "sourceType", + "baseName": "SourceType", + "type": "string" + }, + { + "name": "playlistItemId", + "baseName": "PlaylistItemId", + "type": "string" + }, + { + "name": "dateCreated", + "baseName": "DateCreated", + "type": "Date" + }, + { + "name": "dateLastMediaAdded", + "baseName": "DateLastMediaAdded", + "type": "Date" + }, + { + "name": "extraType", + "baseName": "ExtraType", + "type": "string" + }, + { + "name": "airsBeforeSeasonNumber", + "baseName": "AirsBeforeSeasonNumber", + "type": "number" + }, + { + "name": "airsAfterSeasonNumber", + "baseName": "AirsAfterSeasonNumber", + "type": "number" + }, + { + "name": "airsBeforeEpisodeNumber", + "baseName": "AirsBeforeEpisodeNumber", + "type": "number" + }, + { + "name": "canDelete", + "baseName": "CanDelete", + "type": "boolean" + }, + { + "name": "canDownload", + "baseName": "CanDownload", + "type": "boolean" + }, + { + "name": "hasSubtitles", + "baseName": "HasSubtitles", + "type": "boolean" + }, + { + "name": "preferredMetadataLanguage", + "baseName": "PreferredMetadataLanguage", + "type": "string" + }, + { + "name": "preferredMetadataCountryCode", + "baseName": "PreferredMetadataCountryCode", + "type": "string" + }, + { + "name": "supportsSync", + "baseName": "SupportsSync", + "type": "boolean" + }, + { + "name": "container", + "baseName": "Container", + "type": "string" + }, + { + "name": "sortName", + "baseName": "SortName", + "type": "string" + }, + { + "name": "forcedSortName", + "baseName": "ForcedSortName", + "type": "string" + }, + { + "name": "video3DFormat", + "baseName": "Video3DFormat", + "type": "Video3DFormat" + }, + { + "name": "premiereDate", + "baseName": "PremiereDate", + "type": "Date" + }, + { + "name": "externalUrls", + "baseName": "ExternalUrls", + "type": "Array" + }, + { + "name": "mediaSources", + "baseName": "MediaSources", + "type": "Array" + }, + { + "name": "criticRating", + "baseName": "CriticRating", + "type": "number" + }, + { + "name": "productionLocations", + "baseName": "ProductionLocations", + "type": "Array" + }, + { + "name": "path", + "baseName": "Path", + "type": "string" + }, + { + "name": "enableMediaSourceDisplay", + "baseName": "EnableMediaSourceDisplay", + "type": "boolean" + }, + { + "name": "officialRating", + "baseName": "OfficialRating", + "type": "string" + }, + { + "name": "customRating", + "baseName": "CustomRating", + "type": "string" + }, + { + "name": "channelId", + "baseName": "ChannelId", + "type": "string" + }, + { + "name": "channelName", + "baseName": "ChannelName", + "type": "string" + }, + { + "name": "overview", + "baseName": "Overview", + "type": "string" + }, + { + "name": "taglines", + "baseName": "Taglines", + "type": "Array" + }, + { + "name": "genres", + "baseName": "Genres", + "type": "Array" + }, + { + "name": "communityRating", + "baseName": "CommunityRating", + "type": "number" + }, + { + "name": "cumulativeRunTimeTicks", + "baseName": "CumulativeRunTimeTicks", + "type": "number" + }, + { + "name": "runTimeTicks", + "baseName": "RunTimeTicks", + "type": "number" + }, + { + "name": "playAccess", + "baseName": "PlayAccess", + "type": "PlayAccess" + }, + { + "name": "aspectRatio", + "baseName": "AspectRatio", + "type": "string" + }, + { + "name": "productionYear", + "baseName": "ProductionYear", + "type": "number" + }, + { + "name": "isPlaceHolder", + "baseName": "IsPlaceHolder", + "type": "boolean" + }, + { + "name": "number", + "baseName": "Number", + "type": "string" + }, + { + "name": "channelNumber", + "baseName": "ChannelNumber", + "type": "string" + }, + { + "name": "indexNumber", + "baseName": "IndexNumber", + "type": "number" + }, + { + "name": "indexNumberEnd", + "baseName": "IndexNumberEnd", + "type": "number" + }, + { + "name": "parentIndexNumber", + "baseName": "ParentIndexNumber", + "type": "number" + }, + { + "name": "remoteTrailers", + "baseName": "RemoteTrailers", + "type": "Array" + }, + { + "name": "providerIds", + "baseName": "ProviderIds", + "type": "{ [key: string]: string; }" + }, + { + "name": "isHD", + "baseName": "IsHD", + "type": "boolean" + }, + { + "name": "isFolder", + "baseName": "IsFolder", + "type": "boolean" + }, + { + "name": "parentId", + "baseName": "ParentId", + "type": "string" + }, + { + "name": "type", + "baseName": "Type", + "type": "BaseItemKind" + }, + { + "name": "people", + "baseName": "People", + "type": "Array" + }, + { + "name": "studios", + "baseName": "Studios", + "type": "Array" + }, + { + "name": "genreItems", + "baseName": "GenreItems", + "type": "Array" + }, + { + "name": "parentLogoItemId", + "baseName": "ParentLogoItemId", + "type": "string" + }, + { + "name": "parentBackdropItemId", + "baseName": "ParentBackdropItemId", + "type": "string" + }, + { + "name": "parentBackdropImageTags", + "baseName": "ParentBackdropImageTags", + "type": "Array" + }, + { + "name": "localTrailerCount", + "baseName": "LocalTrailerCount", + "type": "number" + }, + { + "name": "userData", + "baseName": "UserData", + "type": "BaseItemDtoUserData" + }, + { + "name": "recursiveItemCount", + "baseName": "RecursiveItemCount", + "type": "number" + }, + { + "name": "childCount", + "baseName": "ChildCount", + "type": "number" + }, + { + "name": "seriesName", + "baseName": "SeriesName", + "type": "string" + }, + { + "name": "seriesId", + "baseName": "SeriesId", + "type": "string" + }, + { + "name": "seasonId", + "baseName": "SeasonId", + "type": "string" + }, + { + "name": "specialFeatureCount", + "baseName": "SpecialFeatureCount", + "type": "number" + }, + { + "name": "displayPreferencesId", + "baseName": "DisplayPreferencesId", + "type": "string" + }, + { + "name": "status", + "baseName": "Status", + "type": "string" + }, + { + "name": "airTime", + "baseName": "AirTime", + "type": "string" + }, + { + "name": "airDays", + "baseName": "AirDays", + "type": "Array" + }, + { + "name": "tags", + "baseName": "Tags", + "type": "Array" + }, + { + "name": "primaryImageAspectRatio", + "baseName": "PrimaryImageAspectRatio", + "type": "number" + }, + { + "name": "artists", + "baseName": "Artists", + "type": "Array" + }, + { + "name": "artistItems", + "baseName": "ArtistItems", + "type": "Array" + }, + { + "name": "album", + "baseName": "Album", + "type": "string" + }, + { + "name": "collectionType", + "baseName": "CollectionType", + "type": "string" + }, + { + "name": "displayOrder", + "baseName": "DisplayOrder", + "type": "string" + }, + { + "name": "albumId", + "baseName": "AlbumId", + "type": "string" + }, + { + "name": "albumPrimaryImageTag", + "baseName": "AlbumPrimaryImageTag", + "type": "string" + }, + { + "name": "seriesPrimaryImageTag", + "baseName": "SeriesPrimaryImageTag", + "type": "string" + }, + { + "name": "albumArtist", + "baseName": "AlbumArtist", + "type": "string" + }, + { + "name": "albumArtists", + "baseName": "AlbumArtists", + "type": "Array" + }, + { + "name": "seasonName", + "baseName": "SeasonName", + "type": "string" + }, + { + "name": "mediaStreams", + "baseName": "MediaStreams", + "type": "Array" + }, + { + "name": "videoType", + "baseName": "VideoType", + "type": "VideoType" + }, + { + "name": "partCount", + "baseName": "PartCount", + "type": "number" + }, + { + "name": "mediaSourceCount", + "baseName": "MediaSourceCount", + "type": "number" + }, + { + "name": "imageTags", + "baseName": "ImageTags", + "type": "{ [key: string]: string; }" + }, + { + "name": "backdropImageTags", + "baseName": "BackdropImageTags", + "type": "Array" + }, + { + "name": "screenshotImageTags", + "baseName": "ScreenshotImageTags", + "type": "Array" + }, + { + "name": "parentLogoImageTag", + "baseName": "ParentLogoImageTag", + "type": "string" + }, + { + "name": "parentArtItemId", + "baseName": "ParentArtItemId", + "type": "string" + }, + { + "name": "parentArtImageTag", + "baseName": "ParentArtImageTag", + "type": "string" + }, + { + "name": "seriesThumbImageTag", + "baseName": "SeriesThumbImageTag", + "type": "string" + }, + { + "name": "imageBlurHashes", + "baseName": "ImageBlurHashes", + "type": "BaseItemDtoImageBlurHashes" + }, + { + "name": "seriesStudio", + "baseName": "SeriesStudio", + "type": "string" + }, + { + "name": "parentThumbItemId", + "baseName": "ParentThumbItemId", + "type": "string" + }, + { + "name": "parentThumbImageTag", + "baseName": "ParentThumbImageTag", + "type": "string" + }, + { + "name": "parentPrimaryImageItemId", + "baseName": "ParentPrimaryImageItemId", + "type": "string" + }, + { + "name": "parentPrimaryImageTag", + "baseName": "ParentPrimaryImageTag", + "type": "string" + }, + { + "name": "chapters", + "baseName": "Chapters", + "type": "Array" + }, + { + "name": "locationType", + "baseName": "LocationType", + "type": "LocationType" + }, + { + "name": "isoType", + "baseName": "IsoType", + "type": "IsoType" + }, + { + "name": "mediaType", + "baseName": "MediaType", + "type": "string" + }, + { + "name": "endDate", + "baseName": "EndDate", + "type": "Date" + }, + { + "name": "lockedFields", + "baseName": "LockedFields", + "type": "Array" + }, + { + "name": "trailerCount", + "baseName": "TrailerCount", + "type": "number" + }, + { + "name": "movieCount", + "baseName": "MovieCount", + "type": "number" + }, + { + "name": "seriesCount", + "baseName": "SeriesCount", + "type": "number" + }, + { + "name": "programCount", + "baseName": "ProgramCount", + "type": "number" + }, + { + "name": "episodeCount", + "baseName": "EpisodeCount", + "type": "number" + }, + { + "name": "songCount", + "baseName": "SongCount", + "type": "number" + }, + { + "name": "albumCount", + "baseName": "AlbumCount", + "type": "number" + }, + { + "name": "artistCount", + "baseName": "ArtistCount", + "type": "number" + }, + { + "name": "musicVideoCount", + "baseName": "MusicVideoCount", + "type": "number" + }, + { + "name": "lockData", + "baseName": "LockData", + "type": "boolean" + }, + { + "name": "width", + "baseName": "Width", + "type": "number" + }, + { + "name": "height", + "baseName": "Height", + "type": "number" + }, + { + "name": "cameraMake", + "baseName": "CameraMake", + "type": "string" + }, + { + "name": "cameraModel", + "baseName": "CameraModel", + "type": "string" + }, + { + "name": "software", + "baseName": "Software", + "type": "string" + }, + { + "name": "exposureTime", + "baseName": "ExposureTime", + "type": "number" + }, + { + "name": "focalLength", + "baseName": "FocalLength", + "type": "number" + }, + { + "name": "imageOrientation", + "baseName": "ImageOrientation", + "type": "ImageOrientation" + }, + { + "name": "aperture", + "baseName": "Aperture", + "type": "number" + }, + { + "name": "shutterSpeed", + "baseName": "ShutterSpeed", + "type": "number" + }, + { + "name": "latitude", + "baseName": "Latitude", + "type": "number" + }, + { + "name": "longitude", + "baseName": "Longitude", + "type": "number" + }, + { + "name": "altitude", + "baseName": "Altitude", + "type": "number" + }, + { + "name": "isoSpeedRating", + "baseName": "IsoSpeedRating", + "type": "number" + }, + { + "name": "seriesTimerId", + "baseName": "SeriesTimerId", + "type": "string" + }, + { + "name": "programId", + "baseName": "ProgramId", + "type": "string" + }, + { + "name": "channelPrimaryImageTag", + "baseName": "ChannelPrimaryImageTag", + "type": "string" + }, + { + "name": "startDate", + "baseName": "StartDate", + "type": "Date" + }, + { + "name": "completionPercentage", + "baseName": "CompletionPercentage", + "type": "number" + }, + { + "name": "isRepeat", + "baseName": "IsRepeat", + "type": "boolean" + }, + { + "name": "episodeTitle", + "baseName": "EpisodeTitle", + "type": "string" + }, + { + "name": "channelType", + "baseName": "ChannelType", + "type": "ChannelType" + }, + { + "name": "audio", + "baseName": "Audio", + "type": "ProgramAudio" + }, + { + "name": "isMovie", + "baseName": "IsMovie", + "type": "boolean" + }, + { + "name": "isSports", + "baseName": "IsSports", + "type": "boolean" + }, + { + "name": "isSeries", + "baseName": "IsSeries", + "type": "boolean" + }, + { + "name": "isLive", + "baseName": "IsLive", + "type": "boolean" + }, + { + "name": "isNews", + "baseName": "IsNews", + "type": "boolean" + }, + { + "name": "isKids", + "baseName": "IsKids", + "type": "boolean" + }, + { + "name": "isPremiere", + "baseName": "IsPremiere", + "type": "boolean" + }, + { + "name": "timerId", + "baseName": "TimerId", + "type": "string" + }, + { + "name": "currentProgram", + "baseName": "CurrentProgram", + "type": "BaseItemDtoCurrentProgram" + } ]; + + static getAttributeTypeMap() { + return PlaybackProgressInfoItem.attributeTypeMap; + } +} + +export namespace PlaybackProgressInfoItem { +} diff --git a/jellyfin/model/playbackStartInfo.ts b/jellyfin/model/playbackStartInfo.ts new file mode 100644 index 0000000..138d309 --- /dev/null +++ b/jellyfin/model/playbackStartInfo.ts @@ -0,0 +1,190 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { PlayMethod } from './playMethod'; +import { PlaybackProgressInfoItem } from './playbackProgressInfoItem'; +import { QueueItem } from './queueItem'; +import { RepeatMode } from './repeatMode'; + +/** +* Class PlaybackStartInfo. +*/ +export class PlaybackStartInfo { + /** + * Gets or sets a value indicating whether this instance can seek. + */ + 'canSeek'?: boolean; + 'item'?: PlaybackProgressInfoItem | null; + /** + * Gets or sets the item identifier. + */ + 'itemId'?: string; + /** + * Gets or sets the session id. + */ + 'sessionId'?: string | null; + /** + * Gets or sets the media version identifier. + */ + 'mediaSourceId'?: string | null; + /** + * Gets or sets the index of the audio stream. + */ + 'audioStreamIndex'?: number | null; + /** + * Gets or sets the index of the subtitle stream. + */ + 'subtitleStreamIndex'?: number | null; + /** + * Gets or sets a value indicating whether this instance is paused. + */ + 'isPaused'?: boolean; + /** + * Gets or sets a value indicating whether this instance is muted. + */ + 'isMuted'?: boolean; + /** + * Gets or sets the position ticks. + */ + 'positionTicks'?: number | null; + 'playbackStartTimeTicks'?: number | null; + /** + * Gets or sets the volume level. + */ + 'volumeLevel'?: number | null; + 'brightness'?: number | null; + 'aspectRatio'?: string | null; + 'playMethod'?: PlayMethod; + /** + * Gets or sets the live stream identifier. + */ + 'liveStreamId'?: string | null; + /** + * Gets or sets the play session identifier. + */ + 'playSessionId'?: string | null; + 'repeatMode'?: RepeatMode; + 'nowPlayingQueue'?: Array | null; + 'playlistItemId'?: string | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "canSeek", + "baseName": "CanSeek", + "type": "boolean" + }, + { + "name": "item", + "baseName": "Item", + "type": "PlaybackProgressInfoItem" + }, + { + "name": "itemId", + "baseName": "ItemId", + "type": "string" + }, + { + "name": "sessionId", + "baseName": "SessionId", + "type": "string" + }, + { + "name": "mediaSourceId", + "baseName": "MediaSourceId", + "type": "string" + }, + { + "name": "audioStreamIndex", + "baseName": "AudioStreamIndex", + "type": "number" + }, + { + "name": "subtitleStreamIndex", + "baseName": "SubtitleStreamIndex", + "type": "number" + }, + { + "name": "isPaused", + "baseName": "IsPaused", + "type": "boolean" + }, + { + "name": "isMuted", + "baseName": "IsMuted", + "type": "boolean" + }, + { + "name": "positionTicks", + "baseName": "PositionTicks", + "type": "number" + }, + { + "name": "playbackStartTimeTicks", + "baseName": "PlaybackStartTimeTicks", + "type": "number" + }, + { + "name": "volumeLevel", + "baseName": "VolumeLevel", + "type": "number" + }, + { + "name": "brightness", + "baseName": "Brightness", + "type": "number" + }, + { + "name": "aspectRatio", + "baseName": "AspectRatio", + "type": "string" + }, + { + "name": "playMethod", + "baseName": "PlayMethod", + "type": "PlayMethod" + }, + { + "name": "liveStreamId", + "baseName": "LiveStreamId", + "type": "string" + }, + { + "name": "playSessionId", + "baseName": "PlaySessionId", + "type": "string" + }, + { + "name": "repeatMode", + "baseName": "RepeatMode", + "type": "RepeatMode" + }, + { + "name": "nowPlayingQueue", + "baseName": "NowPlayingQueue", + "type": "Array" + }, + { + "name": "playlistItemId", + "baseName": "PlaylistItemId", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return PlaybackStartInfo.attributeTypeMap; + } +} + +export namespace PlaybackStartInfo { +} diff --git a/jellyfin/model/playbackStopInfo.ts b/jellyfin/model/playbackStopInfo.ts new file mode 100644 index 0000000..099ba45 --- /dev/null +++ b/jellyfin/model/playbackStopInfo.ts @@ -0,0 +1,117 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { PlaybackProgressInfoItem } from './playbackProgressInfoItem'; +import { QueueItem } from './queueItem'; + +/** +* Class PlaybackStopInfo. +*/ +export class PlaybackStopInfo { + 'item'?: PlaybackProgressInfoItem | null; + /** + * Gets or sets the item identifier. + */ + 'itemId'?: string; + /** + * Gets or sets the session id. + */ + 'sessionId'?: string | null; + /** + * Gets or sets the media version identifier. + */ + 'mediaSourceId'?: string | null; + /** + * Gets or sets the position ticks. + */ + 'positionTicks'?: number | null; + /** + * Gets or sets the live stream identifier. + */ + 'liveStreamId'?: string | null; + /** + * Gets or sets the play session identifier. + */ + 'playSessionId'?: string | null; + /** + * Gets or sets a value indicating whether this MediaBrowser.Model.Session.PlaybackStopInfo is failed. + */ + 'failed'?: boolean; + 'nextMediaType'?: string | null; + 'playlistItemId'?: string | null; + 'nowPlayingQueue'?: Array | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "item", + "baseName": "Item", + "type": "PlaybackProgressInfoItem" + }, + { + "name": "itemId", + "baseName": "ItemId", + "type": "string" + }, + { + "name": "sessionId", + "baseName": "SessionId", + "type": "string" + }, + { + "name": "mediaSourceId", + "baseName": "MediaSourceId", + "type": "string" + }, + { + "name": "positionTicks", + "baseName": "PositionTicks", + "type": "number" + }, + { + "name": "liveStreamId", + "baseName": "LiveStreamId", + "type": "string" + }, + { + "name": "playSessionId", + "baseName": "PlaySessionId", + "type": "string" + }, + { + "name": "failed", + "baseName": "Failed", + "type": "boolean" + }, + { + "name": "nextMediaType", + "baseName": "NextMediaType", + "type": "string" + }, + { + "name": "playlistItemId", + "baseName": "PlaylistItemId", + "type": "string" + }, + { + "name": "nowPlayingQueue", + "baseName": "NowPlayingQueue", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return PlaybackStopInfo.attributeTypeMap; + } +} + diff --git a/jellyfin/model/playerStateInfo.ts b/jellyfin/model/playerStateInfo.ts new file mode 100644 index 0000000..ffb15b6 --- /dev/null +++ b/jellyfin/model/playerStateInfo.ts @@ -0,0 +1,122 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { PlayMethod } from './playMethod'; +import { RepeatMode } from './repeatMode'; + +export class PlayerStateInfo { + /** + * Gets or sets the now playing position ticks. + */ + 'positionTicks'?: number | null; + /** + * Gets or sets a value indicating whether this instance can seek. + */ + 'canSeek'?: boolean; + /** + * Gets or sets a value indicating whether this instance is paused. + */ + 'isPaused'?: boolean; + /** + * Gets or sets a value indicating whether this instance is muted. + */ + 'isMuted'?: boolean; + /** + * Gets or sets the volume level. + */ + 'volumeLevel'?: number | null; + /** + * Gets or sets the index of the now playing audio stream. + */ + 'audioStreamIndex'?: number | null; + /** + * Gets or sets the index of the now playing subtitle stream. + */ + 'subtitleStreamIndex'?: number | null; + /** + * Gets or sets the now playing media version identifier. + */ + 'mediaSourceId'?: string | null; + 'playMethod'?: PlayMethod | null; + 'repeatMode'?: RepeatMode; + /** + * Gets or sets the now playing live stream identifier. + */ + 'liveStreamId'?: string | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "positionTicks", + "baseName": "PositionTicks", + "type": "number" + }, + { + "name": "canSeek", + "baseName": "CanSeek", + "type": "boolean" + }, + { + "name": "isPaused", + "baseName": "IsPaused", + "type": "boolean" + }, + { + "name": "isMuted", + "baseName": "IsMuted", + "type": "boolean" + }, + { + "name": "volumeLevel", + "baseName": "VolumeLevel", + "type": "number" + }, + { + "name": "audioStreamIndex", + "baseName": "AudioStreamIndex", + "type": "number" + }, + { + "name": "subtitleStreamIndex", + "baseName": "SubtitleStreamIndex", + "type": "number" + }, + { + "name": "mediaSourceId", + "baseName": "MediaSourceId", + "type": "string" + }, + { + "name": "playMethod", + "baseName": "PlayMethod", + "type": "PlayMethod" + }, + { + "name": "repeatMode", + "baseName": "RepeatMode", + "type": "RepeatMode" + }, + { + "name": "liveStreamId", + "baseName": "LiveStreamId", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return PlayerStateInfo.attributeTypeMap; + } +} + +export namespace PlayerStateInfo { +} diff --git a/jellyfin/model/playlistCreationResult.ts b/jellyfin/model/playlistCreationResult.ts new file mode 100644 index 0000000..ef5890b --- /dev/null +++ b/jellyfin/model/playlistCreationResult.ts @@ -0,0 +1,31 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class PlaylistCreationResult { + 'id'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "id", + "baseName": "Id", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return PlaylistCreationResult.attributeTypeMap; + } +} + diff --git a/jellyfin/model/playstateCommand.ts b/jellyfin/model/playstateCommand.ts new file mode 100644 index 0000000..8ef8ed1 --- /dev/null +++ b/jellyfin/model/playstateCommand.ts @@ -0,0 +1,28 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Enum PlaystateCommand. +*/ +export enum PlaystateCommand { + Stop = 'Stop', + Pause = 'Pause', + Unpause = 'Unpause', + NextTrack = 'NextTrack', + PreviousTrack = 'PreviousTrack', + Seek = 'Seek', + Rewind = 'Rewind', + FastForward = 'FastForward', + PlayPause = 'PlayPause' +} diff --git a/jellyfin/model/playstateRequest.ts b/jellyfin/model/playstateRequest.ts new file mode 100644 index 0000000..f3af873 --- /dev/null +++ b/jellyfin/model/playstateRequest.ts @@ -0,0 +1,49 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { PlaystateCommand } from './playstateCommand'; + +export class PlaystateRequest { + 'command'?: PlaystateCommand; + 'seekPositionTicks'?: number | null; + /** + * Gets or sets the controlling user identifier. + */ + 'controllingUserId'?: string | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "command", + "baseName": "Command", + "type": "PlaystateCommand" + }, + { + "name": "seekPositionTicks", + "baseName": "SeekPositionTicks", + "type": "number" + }, + { + "name": "controllingUserId", + "baseName": "ControllingUserId", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return PlaystateRequest.attributeTypeMap; + } +} + +export namespace PlaystateRequest { +} diff --git a/jellyfin/model/pluginInfo.ts b/jellyfin/model/pluginInfo.ts new file mode 100644 index 0000000..3e6d44d --- /dev/null +++ b/jellyfin/model/pluginInfo.ts @@ -0,0 +1,100 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { PluginStatus } from './pluginStatus'; + +/** +* This is a serializable stub class that is used by the api to provide information about installed plugins. +*/ +export class PluginInfo { + /** + * Gets or sets the name. + */ + 'name'?: string; + /** + * Gets or sets the version. + */ + 'version'?: string; + /** + * Gets or sets the name of the configuration file. + */ + 'configurationFileName'?: string | null; + /** + * Gets or sets the description. + */ + 'description'?: string; + /** + * Gets or sets the unique id. + */ + 'id'?: string; + /** + * Gets or sets a value indicating whether the plugin can be uninstalled. + */ + 'canUninstall'?: boolean; + /** + * Gets or sets a value indicating whether this plugin has a valid image. + */ + 'hasImage'?: boolean; + 'status'?: PluginStatus; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "Name", + "type": "string" + }, + { + "name": "version", + "baseName": "Version", + "type": "string" + }, + { + "name": "configurationFileName", + "baseName": "ConfigurationFileName", + "type": "string" + }, + { + "name": "description", + "baseName": "Description", + "type": "string" + }, + { + "name": "id", + "baseName": "Id", + "type": "string" + }, + { + "name": "canUninstall", + "baseName": "CanUninstall", + "type": "boolean" + }, + { + "name": "hasImage", + "baseName": "HasImage", + "type": "boolean" + }, + { + "name": "status", + "baseName": "Status", + "type": "PluginStatus" + } ]; + + static getAttributeTypeMap() { + return PluginInfo.attributeTypeMap; + } +} + +export namespace PluginInfo { +} diff --git a/jellyfin/model/pluginStatus.ts b/jellyfin/model/pluginStatus.ts new file mode 100644 index 0000000..dec5ed5 --- /dev/null +++ b/jellyfin/model/pluginStatus.ts @@ -0,0 +1,26 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Plugin load status. +*/ +export enum PluginStatus { + Active = 'Active', + Restart = 'Restart', + Deleted = 'Deleted', + Superceded = 'Superceded', + Malfunctioned = 'Malfunctioned', + NotSupported = 'NotSupported', + Disabled = 'Disabled' +} diff --git a/jellyfin/model/postFullCapabilitiesRequest.ts b/jellyfin/model/postFullCapabilitiesRequest.ts new file mode 100644 index 0000000..c72bc7d --- /dev/null +++ b/jellyfin/model/postFullCapabilitiesRequest.ts @@ -0,0 +1,117 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { ClientCapabilitiesDtoDeviceProfile } from './clientCapabilitiesDtoDeviceProfile'; +import { GeneralCommandType } from './generalCommandType'; + +/** +* Client capabilities dto. +*/ +export class PostFullCapabilitiesRequest { + /** + * Gets or sets the list of playable media types. + */ + 'playableMediaTypes'?: Array; + /** + * Gets or sets the list of supported commands. + */ + 'supportedCommands'?: Array; + /** + * Gets or sets a value indicating whether session supports media control. + */ + 'supportsMediaControl'?: boolean; + /** + * Gets or sets a value indicating whether session supports content uploading. + */ + 'supportsContentUploading'?: boolean; + /** + * Gets or sets the message callback url. + */ + 'messageCallbackUrl'?: string | null; + /** + * Gets or sets a value indicating whether session supports a persistent identifier. + */ + 'supportsPersistentIdentifier'?: boolean; + /** + * Gets or sets a value indicating whether session supports sync. + */ + 'supportsSync'?: boolean; + 'deviceProfile'?: ClientCapabilitiesDtoDeviceProfile | null; + /** + * Gets or sets the app store url. + */ + 'appStoreUrl'?: string | null; + /** + * Gets or sets the icon url. + */ + 'iconUrl'?: string | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "playableMediaTypes", + "baseName": "PlayableMediaTypes", + "type": "Array" + }, + { + "name": "supportedCommands", + "baseName": "SupportedCommands", + "type": "Array" + }, + { + "name": "supportsMediaControl", + "baseName": "SupportsMediaControl", + "type": "boolean" + }, + { + "name": "supportsContentUploading", + "baseName": "SupportsContentUploading", + "type": "boolean" + }, + { + "name": "messageCallbackUrl", + "baseName": "MessageCallbackUrl", + "type": "string" + }, + { + "name": "supportsPersistentIdentifier", + "baseName": "SupportsPersistentIdentifier", + "type": "boolean" + }, + { + "name": "supportsSync", + "baseName": "SupportsSync", + "type": "boolean" + }, + { + "name": "deviceProfile", + "baseName": "DeviceProfile", + "type": "ClientCapabilitiesDtoDeviceProfile" + }, + { + "name": "appStoreUrl", + "baseName": "AppStoreUrl", + "type": "string" + }, + { + "name": "iconUrl", + "baseName": "IconUrl", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return PostFullCapabilitiesRequest.attributeTypeMap; + } +} + diff --git a/jellyfin/model/postUpdatedMediaRequest.ts b/jellyfin/model/postUpdatedMediaRequest.ts new file mode 100644 index 0000000..2c19f07 --- /dev/null +++ b/jellyfin/model/postUpdatedMediaRequest.ts @@ -0,0 +1,38 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { MediaUpdateInfoPathDto } from './mediaUpdateInfoPathDto'; + +/** +* Media Update Info Dto. +*/ +export class PostUpdatedMediaRequest { + /** + * Gets or sets the list of updates. + */ + 'updates'?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "updates", + "baseName": "Updates", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return PostUpdatedMediaRequest.attributeTypeMap; + } +} + diff --git a/jellyfin/model/previousItemRequestDto.ts b/jellyfin/model/previousItemRequestDto.ts new file mode 100644 index 0000000..9b43f02 --- /dev/null +++ b/jellyfin/model/previousItemRequestDto.ts @@ -0,0 +1,37 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Class PreviousItemRequestDto. +*/ +export class PreviousItemRequestDto { + /** + * Gets or sets the playing item identifier. + */ + 'playlistItemId'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "playlistItemId", + "baseName": "PlaylistItemId", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return PreviousItemRequestDto.attributeTypeMap; + } +} + diff --git a/jellyfin/model/problemDetails.ts b/jellyfin/model/problemDetails.ts new file mode 100644 index 0000000..ea89c36 --- /dev/null +++ b/jellyfin/model/problemDetails.ts @@ -0,0 +1,55 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class ProblemDetails extends null { + 'type'?: string | null; + 'title'?: string | null; + 'status'?: number | null; + 'detail'?: string | null; + 'instance'?: string | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "type", + "baseName": "type", + "type": "string" + }, + { + "name": "title", + "baseName": "title", + "type": "string" + }, + { + "name": "status", + "baseName": "status", + "type": "number" + }, + { + "name": "detail", + "baseName": "detail", + "type": "string" + }, + { + "name": "instance", + "baseName": "instance", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return super.getAttributeTypeMap().concat(ProblemDetails.attributeTypeMap); + } +} + diff --git a/jellyfin/model/profileCondition.ts b/jellyfin/model/profileCondition.ts new file mode 100644 index 0000000..a47dff2 --- /dev/null +++ b/jellyfin/model/profileCondition.ts @@ -0,0 +1,53 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { ProfileConditionType } from './profileConditionType'; +import { ProfileConditionValue } from './profileConditionValue'; + +export class ProfileCondition { + 'condition'?: ProfileConditionType; + 'property'?: ProfileConditionValue; + 'value'?: string | null; + 'isRequired'?: boolean; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "condition", + "baseName": "Condition", + "type": "ProfileConditionType" + }, + { + "name": "property", + "baseName": "Property", + "type": "ProfileConditionValue" + }, + { + "name": "value", + "baseName": "Value", + "type": "string" + }, + { + "name": "isRequired", + "baseName": "IsRequired", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return ProfileCondition.attributeTypeMap; + } +} + +export namespace ProfileCondition { +} diff --git a/jellyfin/model/profileConditionType.ts b/jellyfin/model/profileConditionType.ts new file mode 100644 index 0000000..0e192b6 --- /dev/null +++ b/jellyfin/model/profileConditionType.ts @@ -0,0 +1,21 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export enum ProfileConditionType { + Equals = 'Equals', + NotEquals = 'NotEquals', + LessThanEqual = 'LessThanEqual', + GreaterThanEqual = 'GreaterThanEqual', + EqualsAny = 'EqualsAny' +} diff --git a/jellyfin/model/profileConditionValue.ts b/jellyfin/model/profileConditionValue.ts new file mode 100644 index 0000000..bd07e94 --- /dev/null +++ b/jellyfin/model/profileConditionValue.ts @@ -0,0 +1,40 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export enum ProfileConditionValue { + AudioChannels = 'AudioChannels', + AudioBitrate = 'AudioBitrate', + AudioProfile = 'AudioProfile', + Width = 'Width', + Height = 'Height', + Has64BitOffsets = 'Has64BitOffsets', + PacketLength = 'PacketLength', + VideoBitDepth = 'VideoBitDepth', + VideoBitrate = 'VideoBitrate', + VideoFramerate = 'VideoFramerate', + VideoLevel = 'VideoLevel', + VideoProfile = 'VideoProfile', + VideoTimestamp = 'VideoTimestamp', + IsAnamorphic = 'IsAnamorphic', + RefFrames = 'RefFrames', + NumAudioStreams = 'NumAudioStreams', + NumVideoStreams = 'NumVideoStreams', + IsSecondaryAudio = 'IsSecondaryAudio', + VideoCodecTag = 'VideoCodecTag', + IsAvc = 'IsAvc', + IsInterlaced = 'IsInterlaced', + AudioSampleRate = 'AudioSampleRate', + AudioBitDepth = 'AudioBitDepth', + VideoRangeType = 'VideoRangeType' +} diff --git a/jellyfin/model/programAudio.ts b/jellyfin/model/programAudio.ts new file mode 100644 index 0000000..61b0809 --- /dev/null +++ b/jellyfin/model/programAudio.ts @@ -0,0 +1,22 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export enum ProgramAudio { + Mono = 'Mono', + Stereo = 'Stereo', + Dolby = 'Dolby', + DolbyDigital = 'DolbyDigital', + Thx = 'Thx', + Atmos = 'Atmos' +} diff --git a/jellyfin/model/publicSystemInfo.ts b/jellyfin/model/publicSystemInfo.ts new file mode 100644 index 0000000..6b88531 --- /dev/null +++ b/jellyfin/model/publicSystemInfo.ts @@ -0,0 +1,88 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class PublicSystemInfo { + /** + * Gets or sets the local address. + */ + 'localAddress'?: string | null; + /** + * Gets or sets the name of the server. + */ + 'serverName'?: string | null; + /** + * Gets or sets the server version. + */ + 'version'?: string | null; + /** + * Gets or sets the product name. This is the AssemblyProduct name. + */ + 'productName'?: string | null; + /** + * Gets or sets the operating system. + */ + 'operatingSystem'?: string | null; + /** + * Gets or sets the id. + */ + 'id'?: string | null; + /** + * Gets or sets a value indicating whether the startup wizard is completed. + */ + 'startupWizardCompleted'?: boolean | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "localAddress", + "baseName": "LocalAddress", + "type": "string" + }, + { + "name": "serverName", + "baseName": "ServerName", + "type": "string" + }, + { + "name": "version", + "baseName": "Version", + "type": "string" + }, + { + "name": "productName", + "baseName": "ProductName", + "type": "string" + }, + { + "name": "operatingSystem", + "baseName": "OperatingSystem", + "type": "string" + }, + { + "name": "id", + "baseName": "Id", + "type": "string" + }, + { + "name": "startupWizardCompleted", + "baseName": "StartupWizardCompleted", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return PublicSystemInfo.attributeTypeMap; + } +} + diff --git a/jellyfin/model/queryFilters.ts b/jellyfin/model/queryFilters.ts new file mode 100644 index 0000000..b3bdc4b --- /dev/null +++ b/jellyfin/model/queryFilters.ts @@ -0,0 +1,38 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { NameGuidPair } from './nameGuidPair'; + +export class QueryFilters { + 'genres'?: Array | null; + 'tags'?: Array | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "genres", + "baseName": "Genres", + "type": "Array" + }, + { + "name": "tags", + "baseName": "Tags", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return QueryFilters.attributeTypeMap; + } +} + diff --git a/jellyfin/model/queryFiltersLegacy.ts b/jellyfin/model/queryFiltersLegacy.ts new file mode 100644 index 0000000..b574483 --- /dev/null +++ b/jellyfin/model/queryFiltersLegacy.ts @@ -0,0 +1,49 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class QueryFiltersLegacy { + 'genres'?: Array | null; + 'tags'?: Array | null; + 'officialRatings'?: Array | null; + 'years'?: Array | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "genres", + "baseName": "Genres", + "type": "Array" + }, + { + "name": "tags", + "baseName": "Tags", + "type": "Array" + }, + { + "name": "officialRatings", + "baseName": "OfficialRatings", + "type": "Array" + }, + { + "name": "years", + "baseName": "Years", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return QueryFiltersLegacy.attributeTypeMap; + } +} + diff --git a/jellyfin/model/queueItem.ts b/jellyfin/model/queueItem.ts new file mode 100644 index 0000000..d8bfdfe --- /dev/null +++ b/jellyfin/model/queueItem.ts @@ -0,0 +1,37 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class QueueItem { + 'id'?: string; + 'playlistItemId'?: string | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "id", + "baseName": "Id", + "type": "string" + }, + { + "name": "playlistItemId", + "baseName": "PlaylistItemId", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return QueueItem.attributeTypeMap; + } +} + diff --git a/jellyfin/model/queueRequestDto.ts b/jellyfin/model/queueRequestDto.ts new file mode 100644 index 0000000..40fd279 --- /dev/null +++ b/jellyfin/model/queueRequestDto.ts @@ -0,0 +1,46 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { GroupQueueMode } from './groupQueueMode'; + +/** +* Class QueueRequestDto. +*/ +export class QueueRequestDto { + /** + * Gets or sets the items to enqueue. + */ + 'itemIds'?: Array; + 'mode'?: GroupQueueMode; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "itemIds", + "baseName": "ItemIds", + "type": "Array" + }, + { + "name": "mode", + "baseName": "Mode", + "type": "GroupQueueMode" + } ]; + + static getAttributeTypeMap() { + return QueueRequestDto.attributeTypeMap; + } +} + +export namespace QueueRequestDto { +} diff --git a/jellyfin/model/quickConnectDto.ts b/jellyfin/model/quickConnectDto.ts new file mode 100644 index 0000000..d00a0e4 --- /dev/null +++ b/jellyfin/model/quickConnectDto.ts @@ -0,0 +1,37 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* The quick connect request body. +*/ +export class QuickConnectDto { + /** + * Gets or sets the quick connect secret. + */ + 'secret': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "secret", + "baseName": "Secret", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return QuickConnectDto.attributeTypeMap; + } +} + diff --git a/jellyfin/model/quickConnectResult.ts b/jellyfin/model/quickConnectResult.ts new file mode 100644 index 0000000..23fd8d4 --- /dev/null +++ b/jellyfin/model/quickConnectResult.ts @@ -0,0 +1,100 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Stores the state of an quick connect request. +*/ +export class QuickConnectResult { + /** + * Gets or sets a value indicating whether this request is authorized. + */ + 'authenticated'?: boolean; + /** + * Gets the secret value used to uniquely identify this request. Can be used to retrieve authentication information. + */ + 'secret'?: string; + /** + * Gets the user facing code used so the user can quickly differentiate this request from others. + */ + 'code'?: string; + /** + * Gets the requesting device id. + */ + 'deviceId'?: string; + /** + * Gets the requesting device name. + */ + 'deviceName'?: string; + /** + * Gets the requesting app name. + */ + 'appName'?: string; + /** + * Gets the requesting app version. + */ + 'appVersion'?: string; + /** + * Gets or sets the DateTime that this request was created. + */ + 'dateAdded'?: Date; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "authenticated", + "baseName": "Authenticated", + "type": "boolean" + }, + { + "name": "secret", + "baseName": "Secret", + "type": "string" + }, + { + "name": "code", + "baseName": "Code", + "type": "string" + }, + { + "name": "deviceId", + "baseName": "DeviceId", + "type": "string" + }, + { + "name": "deviceName", + "baseName": "DeviceName", + "type": "string" + }, + { + "name": "appName", + "baseName": "AppName", + "type": "string" + }, + { + "name": "appVersion", + "baseName": "AppVersion", + "type": "string" + }, + { + "name": "dateAdded", + "baseName": "DateAdded", + "type": "Date" + } ]; + + static getAttributeTypeMap() { + return QuickConnectResult.attributeTypeMap; + } +} + diff --git a/jellyfin/model/ratingType.ts b/jellyfin/model/ratingType.ts new file mode 100644 index 0000000..2fe5a93 --- /dev/null +++ b/jellyfin/model/ratingType.ts @@ -0,0 +1,18 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export enum RatingType { + Score = 'Score', + Likes = 'Likes' +} diff --git a/jellyfin/model/readyRequestDto.ts b/jellyfin/model/readyRequestDto.ts new file mode 100644 index 0000000..ee05352 --- /dev/null +++ b/jellyfin/model/readyRequestDto.ts @@ -0,0 +1,64 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Class ReadyRequest. +*/ +export class ReadyRequestDto { + /** + * Gets or sets when the request has been made by the client. + */ + 'when'?: Date; + /** + * Gets or sets the position ticks. + */ + 'positionTicks'?: number; + /** + * Gets or sets a value indicating whether the client playback is unpaused. + */ + 'isPlaying'?: boolean; + /** + * Gets or sets the playlist item identifier of the playing item. + */ + 'playlistItemId'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "when", + "baseName": "When", + "type": "Date" + }, + { + "name": "positionTicks", + "baseName": "PositionTicks", + "type": "number" + }, + { + "name": "isPlaying", + "baseName": "IsPlaying", + "type": "boolean" + }, + { + "name": "playlistItemId", + "baseName": "PlaylistItemId", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return ReadyRequestDto.attributeTypeMap; + } +} + diff --git a/jellyfin/model/recommendationDto.ts b/jellyfin/model/recommendationDto.ts new file mode 100644 index 0000000..ee1063c --- /dev/null +++ b/jellyfin/model/recommendationDto.ts @@ -0,0 +1,53 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { BaseItemDto } from './baseItemDto'; +import { RecommendationType } from './recommendationType'; + +export class RecommendationDto { + 'items'?: Array | null; + 'recommendationType'?: RecommendationType; + 'baselineItemName'?: string | null; + 'categoryId'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "items", + "baseName": "Items", + "type": "Array" + }, + { + "name": "recommendationType", + "baseName": "RecommendationType", + "type": "RecommendationType" + }, + { + "name": "baselineItemName", + "baseName": "BaselineItemName", + "type": "string" + }, + { + "name": "categoryId", + "baseName": "CategoryId", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return RecommendationDto.attributeTypeMap; + } +} + +export namespace RecommendationDto { +} diff --git a/jellyfin/model/recommendationType.ts b/jellyfin/model/recommendationType.ts new file mode 100644 index 0000000..00dba57 --- /dev/null +++ b/jellyfin/model/recommendationType.ts @@ -0,0 +1,22 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export enum RecommendationType { + SimilarToRecentlyPlayed = 'SimilarToRecentlyPlayed', + SimilarToLikedItem = 'SimilarToLikedItem', + HasDirectorFromRecentlyPlayed = 'HasDirectorFromRecentlyPlayed', + HasActorFromRecentlyPlayed = 'HasActorFromRecentlyPlayed', + HasLikedDirector = 'HasLikedDirector', + HasLikedActor = 'HasLikedActor' +} diff --git a/jellyfin/model/recordingStatus.ts b/jellyfin/model/recordingStatus.ts new file mode 100644 index 0000000..d3df472 --- /dev/null +++ b/jellyfin/model/recordingStatus.ts @@ -0,0 +1,23 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export enum RecordingStatus { + New = 'New', + InProgress = 'InProgress', + Completed = 'Completed', + Cancelled = 'Cancelled', + ConflictedOk = 'ConflictedOk', + ConflictedNotOk = 'ConflictedNotOk', + Error = 'Error' +} diff --git a/jellyfin/model/remoteImageInfo.ts b/jellyfin/model/remoteImageInfo.ts new file mode 100644 index 0000000..8c7a8c6 --- /dev/null +++ b/jellyfin/model/remoteImageInfo.ts @@ -0,0 +1,116 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { ImageType } from './imageType'; +import { RatingType } from './ratingType'; + +/** +* Class RemoteImageInfo. +*/ +export class RemoteImageInfo { + /** + * Gets or sets the name of the provider. + */ + 'providerName'?: string | null; + /** + * Gets or sets the URL. + */ + 'url'?: string | null; + /** + * Gets or sets a url used for previewing a smaller version. + */ + 'thumbnailUrl'?: string | null; + /** + * Gets or sets the height. + */ + 'height'?: number | null; + /** + * Gets or sets the width. + */ + 'width'?: number | null; + /** + * Gets or sets the community rating. + */ + 'communityRating'?: number | null; + /** + * Gets or sets the vote count. + */ + 'voteCount'?: number | null; + /** + * Gets or sets the language. + */ + 'language'?: string | null; + 'type'?: ImageType; + 'ratingType'?: RatingType; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "providerName", + "baseName": "ProviderName", + "type": "string" + }, + { + "name": "url", + "baseName": "Url", + "type": "string" + }, + { + "name": "thumbnailUrl", + "baseName": "ThumbnailUrl", + "type": "string" + }, + { + "name": "height", + "baseName": "Height", + "type": "number" + }, + { + "name": "width", + "baseName": "Width", + "type": "number" + }, + { + "name": "communityRating", + "baseName": "CommunityRating", + "type": "number" + }, + { + "name": "voteCount", + "baseName": "VoteCount", + "type": "number" + }, + { + "name": "language", + "baseName": "Language", + "type": "string" + }, + { + "name": "type", + "baseName": "Type", + "type": "ImageType" + }, + { + "name": "ratingType", + "baseName": "RatingType", + "type": "RatingType" + } ]; + + static getAttributeTypeMap() { + return RemoteImageInfo.attributeTypeMap; + } +} + +export namespace RemoteImageInfo { +} diff --git a/jellyfin/model/remoteImageResult.ts b/jellyfin/model/remoteImageResult.ts new file mode 100644 index 0000000..8c18fca --- /dev/null +++ b/jellyfin/model/remoteImageResult.ts @@ -0,0 +1,56 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { RemoteImageInfo } from './remoteImageInfo'; + +/** +* Class RemoteImageResult. +*/ +export class RemoteImageResult { + /** + * Gets or sets the images. + */ + 'images'?: Array | null; + /** + * Gets or sets the total record count. + */ + 'totalRecordCount'?: number; + /** + * Gets or sets the providers. + */ + 'providers'?: Array | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "images", + "baseName": "Images", + "type": "Array" + }, + { + "name": "totalRecordCount", + "baseName": "TotalRecordCount", + "type": "number" + }, + { + "name": "providers", + "baseName": "Providers", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return RemoteImageResult.attributeTypeMap; + } +} + diff --git a/jellyfin/model/remoteSearchResult.ts b/jellyfin/model/remoteSearchResult.ts new file mode 100644 index 0000000..d356b5d --- /dev/null +++ b/jellyfin/model/remoteSearchResult.ts @@ -0,0 +1,106 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class RemoteSearchResult { + /** + * Gets or sets the name. + */ + 'name'?: string | null; + /** + * Gets or sets the provider ids. + */ + 'providerIds'?: { [key: string]: string; } | null; + /** + * Gets or sets the year. + */ + 'productionYear'?: number | null; + 'indexNumber'?: number | null; + 'indexNumberEnd'?: number | null; + 'parentIndexNumber'?: number | null; + 'premiereDate'?: Date | null; + 'imageUrl'?: string | null; + 'searchProviderName'?: string | null; + 'overview'?: string | null; + 'albumArtist'?: RemoteSearchResult | null; + 'artists'?: Array | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "Name", + "type": "string" + }, + { + "name": "providerIds", + "baseName": "ProviderIds", + "type": "{ [key: string]: string; }" + }, + { + "name": "productionYear", + "baseName": "ProductionYear", + "type": "number" + }, + { + "name": "indexNumber", + "baseName": "IndexNumber", + "type": "number" + }, + { + "name": "indexNumberEnd", + "baseName": "IndexNumberEnd", + "type": "number" + }, + { + "name": "parentIndexNumber", + "baseName": "ParentIndexNumber", + "type": "number" + }, + { + "name": "premiereDate", + "baseName": "PremiereDate", + "type": "Date" + }, + { + "name": "imageUrl", + "baseName": "ImageUrl", + "type": "string" + }, + { + "name": "searchProviderName", + "baseName": "SearchProviderName", + "type": "string" + }, + { + "name": "overview", + "baseName": "Overview", + "type": "string" + }, + { + "name": "albumArtist", + "baseName": "AlbumArtist", + "type": "RemoteSearchResult" + }, + { + "name": "artists", + "baseName": "Artists", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return RemoteSearchResult.attributeTypeMap; + } +} + diff --git a/jellyfin/model/remoteSubtitleInfo.ts b/jellyfin/model/remoteSubtitleInfo.ts new file mode 100644 index 0000000..94c18c7 --- /dev/null +++ b/jellyfin/model/remoteSubtitleInfo.ts @@ -0,0 +1,91 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class RemoteSubtitleInfo { + 'threeLetterISOLanguageName'?: string | null; + 'id'?: string | null; + 'providerName'?: string | null; + 'name'?: string | null; + 'format'?: string | null; + 'author'?: string | null; + 'comment'?: string | null; + 'dateCreated'?: Date | null; + 'communityRating'?: number | null; + 'downloadCount'?: number | null; + 'isHashMatch'?: boolean | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "threeLetterISOLanguageName", + "baseName": "ThreeLetterISOLanguageName", + "type": "string" + }, + { + "name": "id", + "baseName": "Id", + "type": "string" + }, + { + "name": "providerName", + "baseName": "ProviderName", + "type": "string" + }, + { + "name": "name", + "baseName": "Name", + "type": "string" + }, + { + "name": "format", + "baseName": "Format", + "type": "string" + }, + { + "name": "author", + "baseName": "Author", + "type": "string" + }, + { + "name": "comment", + "baseName": "Comment", + "type": "string" + }, + { + "name": "dateCreated", + "baseName": "DateCreated", + "type": "Date" + }, + { + "name": "communityRating", + "baseName": "CommunityRating", + "type": "number" + }, + { + "name": "downloadCount", + "baseName": "DownloadCount", + "type": "number" + }, + { + "name": "isHashMatch", + "baseName": "IsHashMatch", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return RemoteSubtitleInfo.attributeTypeMap; + } +} + diff --git a/jellyfin/model/removeFromPlaylistRequestDto.ts b/jellyfin/model/removeFromPlaylistRequestDto.ts new file mode 100644 index 0000000..4744739 --- /dev/null +++ b/jellyfin/model/removeFromPlaylistRequestDto.ts @@ -0,0 +1,55 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Class RemoveFromPlaylistRequestDto. +*/ +export class RemoveFromPlaylistRequestDto { + /** + * Gets or sets the playlist identifiers ot the items. Ignored when clearing the playlist. + */ + 'playlistItemIds'?: Array; + /** + * Gets or sets a value indicating whether the entire playlist should be cleared. + */ + 'clearPlaylist'?: boolean; + /** + * Gets or sets a value indicating whether the playing item should be removed as well. Used only when clearing the playlist. + */ + 'clearPlayingItem'?: boolean; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "playlistItemIds", + "baseName": "PlaylistItemIds", + "type": "Array" + }, + { + "name": "clearPlaylist", + "baseName": "ClearPlaylist", + "type": "boolean" + }, + { + "name": "clearPlayingItem", + "baseName": "ClearPlayingItem", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return RemoveFromPlaylistRequestDto.attributeTypeMap; + } +} + diff --git a/jellyfin/model/repeatMode.ts b/jellyfin/model/repeatMode.ts new file mode 100644 index 0000000..f9f08e7 --- /dev/null +++ b/jellyfin/model/repeatMode.ts @@ -0,0 +1,19 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export enum RepeatMode { + RepeatNone = 'RepeatNone', + RepeatAll = 'RepeatAll', + RepeatOne = 'RepeatOne' +} diff --git a/jellyfin/model/reportPlaybackProgressRequest.ts b/jellyfin/model/reportPlaybackProgressRequest.ts new file mode 100644 index 0000000..b329c74 --- /dev/null +++ b/jellyfin/model/reportPlaybackProgressRequest.ts @@ -0,0 +1,190 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { PlayMethod } from './playMethod'; +import { PlaybackProgressInfoItem } from './playbackProgressInfoItem'; +import { QueueItem } from './queueItem'; +import { RepeatMode } from './repeatMode'; + +/** +* Class PlaybackProgressInfo. +*/ +export class ReportPlaybackProgressRequest { + /** + * Gets or sets a value indicating whether this instance can seek. + */ + 'canSeek'?: boolean; + 'item'?: PlaybackProgressInfoItem | null; + /** + * Gets or sets the item identifier. + */ + 'itemId'?: string; + /** + * Gets or sets the session id. + */ + 'sessionId'?: string | null; + /** + * Gets or sets the media version identifier. + */ + 'mediaSourceId'?: string | null; + /** + * Gets or sets the index of the audio stream. + */ + 'audioStreamIndex'?: number | null; + /** + * Gets or sets the index of the subtitle stream. + */ + 'subtitleStreamIndex'?: number | null; + /** + * Gets or sets a value indicating whether this instance is paused. + */ + 'isPaused'?: boolean; + /** + * Gets or sets a value indicating whether this instance is muted. + */ + 'isMuted'?: boolean; + /** + * Gets or sets the position ticks. + */ + 'positionTicks'?: number | null; + 'playbackStartTimeTicks'?: number | null; + /** + * Gets or sets the volume level. + */ + 'volumeLevel'?: number | null; + 'brightness'?: number | null; + 'aspectRatio'?: string | null; + 'playMethod'?: PlayMethod; + /** + * Gets or sets the live stream identifier. + */ + 'liveStreamId'?: string | null; + /** + * Gets or sets the play session identifier. + */ + 'playSessionId'?: string | null; + 'repeatMode'?: RepeatMode; + 'nowPlayingQueue'?: Array | null; + 'playlistItemId'?: string | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "canSeek", + "baseName": "CanSeek", + "type": "boolean" + }, + { + "name": "item", + "baseName": "Item", + "type": "PlaybackProgressInfoItem" + }, + { + "name": "itemId", + "baseName": "ItemId", + "type": "string" + }, + { + "name": "sessionId", + "baseName": "SessionId", + "type": "string" + }, + { + "name": "mediaSourceId", + "baseName": "MediaSourceId", + "type": "string" + }, + { + "name": "audioStreamIndex", + "baseName": "AudioStreamIndex", + "type": "number" + }, + { + "name": "subtitleStreamIndex", + "baseName": "SubtitleStreamIndex", + "type": "number" + }, + { + "name": "isPaused", + "baseName": "IsPaused", + "type": "boolean" + }, + { + "name": "isMuted", + "baseName": "IsMuted", + "type": "boolean" + }, + { + "name": "positionTicks", + "baseName": "PositionTicks", + "type": "number" + }, + { + "name": "playbackStartTimeTicks", + "baseName": "PlaybackStartTimeTicks", + "type": "number" + }, + { + "name": "volumeLevel", + "baseName": "VolumeLevel", + "type": "number" + }, + { + "name": "brightness", + "baseName": "Brightness", + "type": "number" + }, + { + "name": "aspectRatio", + "baseName": "AspectRatio", + "type": "string" + }, + { + "name": "playMethod", + "baseName": "PlayMethod", + "type": "PlayMethod" + }, + { + "name": "liveStreamId", + "baseName": "LiveStreamId", + "type": "string" + }, + { + "name": "playSessionId", + "baseName": "PlaySessionId", + "type": "string" + }, + { + "name": "repeatMode", + "baseName": "RepeatMode", + "type": "RepeatMode" + }, + { + "name": "nowPlayingQueue", + "baseName": "NowPlayingQueue", + "type": "Array" + }, + { + "name": "playlistItemId", + "baseName": "PlaylistItemId", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return ReportPlaybackProgressRequest.attributeTypeMap; + } +} + +export namespace ReportPlaybackProgressRequest { +} diff --git a/jellyfin/model/reportPlaybackStartRequest.ts b/jellyfin/model/reportPlaybackStartRequest.ts new file mode 100644 index 0000000..483f13f --- /dev/null +++ b/jellyfin/model/reportPlaybackStartRequest.ts @@ -0,0 +1,190 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { PlayMethod } from './playMethod'; +import { PlaybackProgressInfoItem } from './playbackProgressInfoItem'; +import { QueueItem } from './queueItem'; +import { RepeatMode } from './repeatMode'; + +/** +* Class PlaybackStartInfo. +*/ +export class ReportPlaybackStartRequest { + /** + * Gets or sets a value indicating whether this instance can seek. + */ + 'canSeek'?: boolean; + 'item'?: PlaybackProgressInfoItem | null; + /** + * Gets or sets the item identifier. + */ + 'itemId'?: string; + /** + * Gets or sets the session id. + */ + 'sessionId'?: string | null; + /** + * Gets or sets the media version identifier. + */ + 'mediaSourceId'?: string | null; + /** + * Gets or sets the index of the audio stream. + */ + 'audioStreamIndex'?: number | null; + /** + * Gets or sets the index of the subtitle stream. + */ + 'subtitleStreamIndex'?: number | null; + /** + * Gets or sets a value indicating whether this instance is paused. + */ + 'isPaused'?: boolean; + /** + * Gets or sets a value indicating whether this instance is muted. + */ + 'isMuted'?: boolean; + /** + * Gets or sets the position ticks. + */ + 'positionTicks'?: number | null; + 'playbackStartTimeTicks'?: number | null; + /** + * Gets or sets the volume level. + */ + 'volumeLevel'?: number | null; + 'brightness'?: number | null; + 'aspectRatio'?: string | null; + 'playMethod'?: PlayMethod; + /** + * Gets or sets the live stream identifier. + */ + 'liveStreamId'?: string | null; + /** + * Gets or sets the play session identifier. + */ + 'playSessionId'?: string | null; + 'repeatMode'?: RepeatMode; + 'nowPlayingQueue'?: Array | null; + 'playlistItemId'?: string | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "canSeek", + "baseName": "CanSeek", + "type": "boolean" + }, + { + "name": "item", + "baseName": "Item", + "type": "PlaybackProgressInfoItem" + }, + { + "name": "itemId", + "baseName": "ItemId", + "type": "string" + }, + { + "name": "sessionId", + "baseName": "SessionId", + "type": "string" + }, + { + "name": "mediaSourceId", + "baseName": "MediaSourceId", + "type": "string" + }, + { + "name": "audioStreamIndex", + "baseName": "AudioStreamIndex", + "type": "number" + }, + { + "name": "subtitleStreamIndex", + "baseName": "SubtitleStreamIndex", + "type": "number" + }, + { + "name": "isPaused", + "baseName": "IsPaused", + "type": "boolean" + }, + { + "name": "isMuted", + "baseName": "IsMuted", + "type": "boolean" + }, + { + "name": "positionTicks", + "baseName": "PositionTicks", + "type": "number" + }, + { + "name": "playbackStartTimeTicks", + "baseName": "PlaybackStartTimeTicks", + "type": "number" + }, + { + "name": "volumeLevel", + "baseName": "VolumeLevel", + "type": "number" + }, + { + "name": "brightness", + "baseName": "Brightness", + "type": "number" + }, + { + "name": "aspectRatio", + "baseName": "AspectRatio", + "type": "string" + }, + { + "name": "playMethod", + "baseName": "PlayMethod", + "type": "PlayMethod" + }, + { + "name": "liveStreamId", + "baseName": "LiveStreamId", + "type": "string" + }, + { + "name": "playSessionId", + "baseName": "PlaySessionId", + "type": "string" + }, + { + "name": "repeatMode", + "baseName": "RepeatMode", + "type": "RepeatMode" + }, + { + "name": "nowPlayingQueue", + "baseName": "NowPlayingQueue", + "type": "Array" + }, + { + "name": "playlistItemId", + "baseName": "PlaylistItemId", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return ReportPlaybackStartRequest.attributeTypeMap; + } +} + +export namespace ReportPlaybackStartRequest { +} diff --git a/jellyfin/model/reportPlaybackStoppedRequest.ts b/jellyfin/model/reportPlaybackStoppedRequest.ts new file mode 100644 index 0000000..9cb3b80 --- /dev/null +++ b/jellyfin/model/reportPlaybackStoppedRequest.ts @@ -0,0 +1,117 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { PlaybackProgressInfoItem } from './playbackProgressInfoItem'; +import { QueueItem } from './queueItem'; + +/** +* Class PlaybackStopInfo. +*/ +export class ReportPlaybackStoppedRequest { + 'item'?: PlaybackProgressInfoItem | null; + /** + * Gets or sets the item identifier. + */ + 'itemId'?: string; + /** + * Gets or sets the session id. + */ + 'sessionId'?: string | null; + /** + * Gets or sets the media version identifier. + */ + 'mediaSourceId'?: string | null; + /** + * Gets or sets the position ticks. + */ + 'positionTicks'?: number | null; + /** + * Gets or sets the live stream identifier. + */ + 'liveStreamId'?: string | null; + /** + * Gets or sets the play session identifier. + */ + 'playSessionId'?: string | null; + /** + * Gets or sets a value indicating whether this MediaBrowser.Model.Session.PlaybackStopInfo is failed. + */ + 'failed'?: boolean; + 'nextMediaType'?: string | null; + 'playlistItemId'?: string | null; + 'nowPlayingQueue'?: Array | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "item", + "baseName": "Item", + "type": "PlaybackProgressInfoItem" + }, + { + "name": "itemId", + "baseName": "ItemId", + "type": "string" + }, + { + "name": "sessionId", + "baseName": "SessionId", + "type": "string" + }, + { + "name": "mediaSourceId", + "baseName": "MediaSourceId", + "type": "string" + }, + { + "name": "positionTicks", + "baseName": "PositionTicks", + "type": "number" + }, + { + "name": "liveStreamId", + "baseName": "LiveStreamId", + "type": "string" + }, + { + "name": "playSessionId", + "baseName": "PlaySessionId", + "type": "string" + }, + { + "name": "failed", + "baseName": "Failed", + "type": "boolean" + }, + { + "name": "nextMediaType", + "baseName": "NextMediaType", + "type": "string" + }, + { + "name": "playlistItemId", + "baseName": "PlaylistItemId", + "type": "string" + }, + { + "name": "nowPlayingQueue", + "baseName": "NowPlayingQueue", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return ReportPlaybackStoppedRequest.attributeTypeMap; + } +} + diff --git a/jellyfin/model/repositoryInfo.ts b/jellyfin/model/repositoryInfo.ts new file mode 100644 index 0000000..b6460b2 --- /dev/null +++ b/jellyfin/model/repositoryInfo.ts @@ -0,0 +1,55 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Class RepositoryInfo. +*/ +export class RepositoryInfo { + /** + * Gets or sets the name. + */ + 'name'?: string | null; + /** + * Gets or sets the URL. + */ + 'url'?: string | null; + /** + * Gets or sets a value indicating whether the repository is enabled. + */ + 'enabled'?: boolean; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "Name", + "type": "string" + }, + { + "name": "url", + "baseName": "Url", + "type": "string" + }, + { + "name": "enabled", + "baseName": "Enabled", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return RepositoryInfo.attributeTypeMap; + } +} + diff --git a/jellyfin/model/responseProfile.ts b/jellyfin/model/responseProfile.ts new file mode 100644 index 0000000..a557c1c --- /dev/null +++ b/jellyfin/model/responseProfile.ts @@ -0,0 +1,71 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { DlnaProfileType } from './dlnaProfileType'; +import { ProfileCondition } from './profileCondition'; + +export class ResponseProfile { + 'container'?: string | null; + 'audioCodec'?: string | null; + 'videoCodec'?: string | null; + 'type'?: DlnaProfileType; + 'orgPn'?: string | null; + 'mimeType'?: string | null; + 'conditions'?: Array | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "container", + "baseName": "Container", + "type": "string" + }, + { + "name": "audioCodec", + "baseName": "AudioCodec", + "type": "string" + }, + { + "name": "videoCodec", + "baseName": "VideoCodec", + "type": "string" + }, + { + "name": "type", + "baseName": "Type", + "type": "DlnaProfileType" + }, + { + "name": "orgPn", + "baseName": "OrgPn", + "type": "string" + }, + { + "name": "mimeType", + "baseName": "MimeType", + "type": "string" + }, + { + "name": "conditions", + "baseName": "Conditions", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return ResponseProfile.attributeTypeMap; + } +} + +export namespace ResponseProfile { +} diff --git a/jellyfin/model/scrollDirection.ts b/jellyfin/model/scrollDirection.ts new file mode 100644 index 0000000..4f50564 --- /dev/null +++ b/jellyfin/model/scrollDirection.ts @@ -0,0 +1,21 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* An enum representing the axis that should be scrolled. +*/ +export enum ScrollDirection { + Horizontal = 'Horizontal', + Vertical = 'Vertical' +} diff --git a/jellyfin/model/searchHint.ts b/jellyfin/model/searchHint.ts new file mode 100644 index 0000000..562e732 --- /dev/null +++ b/jellyfin/model/searchHint.ts @@ -0,0 +1,271 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Class SearchHintResult. +*/ +export class SearchHint { + /** + * Gets or sets the item id. + */ + 'itemId'?: string; + 'id'?: string; + /** + * Gets or sets the name. + */ + 'name'?: string | null; + /** + * Gets or sets the matched term. + */ + 'matchedTerm'?: string | null; + /** + * Gets or sets the index number. + */ + 'indexNumber'?: number | null; + /** + * Gets or sets the production year. + */ + 'productionYear'?: number | null; + /** + * Gets or sets the parent index number. + */ + 'parentIndexNumber'?: number | null; + /** + * Gets or sets the image tag. + */ + 'primaryImageTag'?: string | null; + /** + * Gets or sets the thumb image tag. + */ + 'thumbImageTag'?: string | null; + /** + * Gets or sets the thumb image item identifier. + */ + 'thumbImageItemId'?: string | null; + /** + * Gets or sets the backdrop image tag. + */ + 'backdropImageTag'?: string | null; + /** + * Gets or sets the backdrop image item identifier. + */ + 'backdropImageItemId'?: string | null; + /** + * Gets or sets the type. + */ + 'type'?: string | null; + 'isFolder'?: boolean | null; + /** + * Gets or sets the run time ticks. + */ + 'runTimeTicks'?: number | null; + /** + * Gets or sets the type of the media. + */ + 'mediaType'?: string | null; + 'startDate'?: Date | null; + 'endDate'?: Date | null; + /** + * Gets or sets the series. + */ + 'series'?: string | null; + 'status'?: string | null; + /** + * Gets or sets the album. + */ + 'album'?: string | null; + 'albumId'?: string; + /** + * Gets or sets the album artist. + */ + 'albumArtist'?: string | null; + /** + * Gets or sets the artists. + */ + 'artists'?: Array | null; + /** + * Gets or sets the song count. + */ + 'songCount'?: number | null; + /** + * Gets or sets the episode count. + */ + 'episodeCount'?: number | null; + /** + * Gets or sets the channel identifier. + */ + 'channelId'?: string; + /** + * Gets or sets the name of the channel. + */ + 'channelName'?: string | null; + /** + * Gets or sets the primary image aspect ratio. + */ + 'primaryImageAspectRatio'?: number | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "itemId", + "baseName": "ItemId", + "type": "string" + }, + { + "name": "id", + "baseName": "Id", + "type": "string" + }, + { + "name": "name", + "baseName": "Name", + "type": "string" + }, + { + "name": "matchedTerm", + "baseName": "MatchedTerm", + "type": "string" + }, + { + "name": "indexNumber", + "baseName": "IndexNumber", + "type": "number" + }, + { + "name": "productionYear", + "baseName": "ProductionYear", + "type": "number" + }, + { + "name": "parentIndexNumber", + "baseName": "ParentIndexNumber", + "type": "number" + }, + { + "name": "primaryImageTag", + "baseName": "PrimaryImageTag", + "type": "string" + }, + { + "name": "thumbImageTag", + "baseName": "ThumbImageTag", + "type": "string" + }, + { + "name": "thumbImageItemId", + "baseName": "ThumbImageItemId", + "type": "string" + }, + { + "name": "backdropImageTag", + "baseName": "BackdropImageTag", + "type": "string" + }, + { + "name": "backdropImageItemId", + "baseName": "BackdropImageItemId", + "type": "string" + }, + { + "name": "type", + "baseName": "Type", + "type": "string" + }, + { + "name": "isFolder", + "baseName": "IsFolder", + "type": "boolean" + }, + { + "name": "runTimeTicks", + "baseName": "RunTimeTicks", + "type": "number" + }, + { + "name": "mediaType", + "baseName": "MediaType", + "type": "string" + }, + { + "name": "startDate", + "baseName": "StartDate", + "type": "Date" + }, + { + "name": "endDate", + "baseName": "EndDate", + "type": "Date" + }, + { + "name": "series", + "baseName": "Series", + "type": "string" + }, + { + "name": "status", + "baseName": "Status", + "type": "string" + }, + { + "name": "album", + "baseName": "Album", + "type": "string" + }, + { + "name": "albumId", + "baseName": "AlbumId", + "type": "string" + }, + { + "name": "albumArtist", + "baseName": "AlbumArtist", + "type": "string" + }, + { + "name": "artists", + "baseName": "Artists", + "type": "Array" + }, + { + "name": "songCount", + "baseName": "SongCount", + "type": "number" + }, + { + "name": "episodeCount", + "baseName": "EpisodeCount", + "type": "number" + }, + { + "name": "channelId", + "baseName": "ChannelId", + "type": "string" + }, + { + "name": "channelName", + "baseName": "ChannelName", + "type": "string" + }, + { + "name": "primaryImageAspectRatio", + "baseName": "PrimaryImageAspectRatio", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return SearchHint.attributeTypeMap; + } +} + diff --git a/jellyfin/model/searchHintResult.ts b/jellyfin/model/searchHintResult.ts new file mode 100644 index 0000000..eba57c5 --- /dev/null +++ b/jellyfin/model/searchHintResult.ts @@ -0,0 +1,47 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { SearchHint } from './searchHint'; + +/** +* Class SearchHintResult. +*/ +export class SearchHintResult { + /** + * Gets the search hints. + */ + 'searchHints'?: Array; + /** + * Gets the total record count. + */ + 'totalRecordCount'?: number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "searchHints", + "baseName": "SearchHints", + "type": "Array" + }, + { + "name": "totalRecordCount", + "baseName": "TotalRecordCount", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return SearchHintResult.attributeTypeMap; + } +} + diff --git a/jellyfin/model/seekRequestDto.ts b/jellyfin/model/seekRequestDto.ts new file mode 100644 index 0000000..5928321 --- /dev/null +++ b/jellyfin/model/seekRequestDto.ts @@ -0,0 +1,37 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Class SeekRequestDto. +*/ +export class SeekRequestDto { + /** + * Gets or sets the position ticks. + */ + 'positionTicks'?: number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "positionTicks", + "baseName": "PositionTicks", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return SeekRequestDto.attributeTypeMap; + } +} + diff --git a/jellyfin/model/sendCommand.ts b/jellyfin/model/sendCommand.ts new file mode 100644 index 0000000..0f58c94 --- /dev/null +++ b/jellyfin/model/sendCommand.ts @@ -0,0 +1,82 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { SendCommandType } from './sendCommandType'; + +/** +* Class SendCommand. +*/ +export class SendCommand { + /** + * Gets the group identifier. + */ + 'groupId'?: string; + /** + * Gets the playlist identifier of the playing item. + */ + 'playlistItemId'?: string; + /** + * Gets or sets the UTC time when to execute the command. + */ + 'when'?: Date; + /** + * Gets the position ticks. + */ + 'positionTicks'?: number | null; + 'command'?: SendCommandType; + /** + * Gets the UTC time when this command has been emitted. + */ + 'emittedAt'?: Date; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "groupId", + "baseName": "GroupId", + "type": "string" + }, + { + "name": "playlistItemId", + "baseName": "PlaylistItemId", + "type": "string" + }, + { + "name": "when", + "baseName": "When", + "type": "Date" + }, + { + "name": "positionTicks", + "baseName": "PositionTicks", + "type": "number" + }, + { + "name": "command", + "baseName": "Command", + "type": "SendCommandType" + }, + { + "name": "emittedAt", + "baseName": "EmittedAt", + "type": "Date" + } ]; + + static getAttributeTypeMap() { + return SendCommand.attributeTypeMap; + } +} + +export namespace SendCommand { +} diff --git a/jellyfin/model/sendCommandType.ts b/jellyfin/model/sendCommandType.ts new file mode 100644 index 0000000..70739e9 --- /dev/null +++ b/jellyfin/model/sendCommandType.ts @@ -0,0 +1,23 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Enum SendCommandType. +*/ +export enum SendCommandType { + Unpause = 'Unpause', + Pause = 'Pause', + Stop = 'Stop', + Seek = 'Seek' +} diff --git a/jellyfin/model/sendFullGeneralCommandRequest.ts b/jellyfin/model/sendFullGeneralCommandRequest.ts new file mode 100644 index 0000000..37eb3df --- /dev/null +++ b/jellyfin/model/sendFullGeneralCommandRequest.ts @@ -0,0 +1,46 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { GeneralCommandType } from './generalCommandType'; + +export class SendFullGeneralCommandRequest { + 'name'?: GeneralCommandType; + 'controllingUserId'?: string; + 'arguments'?: { [key: string]: string; }; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "Name", + "type": "GeneralCommandType" + }, + { + "name": "controllingUserId", + "baseName": "ControllingUserId", + "type": "string" + }, + { + "name": "arguments", + "baseName": "Arguments", + "type": "{ [key: string]: string; }" + } ]; + + static getAttributeTypeMap() { + return SendFullGeneralCommandRequest.attributeTypeMap; + } +} + +export namespace SendFullGeneralCommandRequest { +} diff --git a/jellyfin/model/sendMessageCommandRequest.ts b/jellyfin/model/sendMessageCommandRequest.ts new file mode 100644 index 0000000..f4078ae --- /dev/null +++ b/jellyfin/model/sendMessageCommandRequest.ts @@ -0,0 +1,43 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class SendMessageCommandRequest { + 'header'?: string | null; + 'text': string; + 'timeoutMs'?: number | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "header", + "baseName": "Header", + "type": "string" + }, + { + "name": "text", + "baseName": "Text", + "type": "string" + }, + { + "name": "timeoutMs", + "baseName": "TimeoutMs", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return SendMessageCommandRequest.attributeTypeMap; + } +} + diff --git a/jellyfin/model/sendToUserType.ts b/jellyfin/model/sendToUserType.ts new file mode 100644 index 0000000..c9e7fe9 --- /dev/null +++ b/jellyfin/model/sendToUserType.ts @@ -0,0 +1,19 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export enum SendToUserType { + All = 'All', + Admins = 'Admins', + Custom = 'Custom' +} diff --git a/jellyfin/model/seriesInfo.ts b/jellyfin/model/seriesInfo.ts new file mode 100644 index 0000000..db48e85 --- /dev/null +++ b/jellyfin/model/seriesInfo.ts @@ -0,0 +1,112 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class SeriesInfo { + /** + * Gets or sets the name. + */ + 'name'?: string | null; + /** + * Gets or sets the original title. + */ + 'originalTitle'?: string | null; + /** + * Gets or sets the path. + */ + 'path'?: string | null; + /** + * Gets or sets the metadata language. + */ + 'metadataLanguage'?: string | null; + /** + * Gets or sets the metadata country code. + */ + 'metadataCountryCode'?: string | null; + /** + * Gets or sets the provider ids. + */ + 'providerIds'?: { [key: string]: string; } | null; + /** + * Gets or sets the year. + */ + 'year'?: number | null; + 'indexNumber'?: number | null; + 'parentIndexNumber'?: number | null; + 'premiereDate'?: Date | null; + 'isAutomated'?: boolean; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "Name", + "type": "string" + }, + { + "name": "originalTitle", + "baseName": "OriginalTitle", + "type": "string" + }, + { + "name": "path", + "baseName": "Path", + "type": "string" + }, + { + "name": "metadataLanguage", + "baseName": "MetadataLanguage", + "type": "string" + }, + { + "name": "metadataCountryCode", + "baseName": "MetadataCountryCode", + "type": "string" + }, + { + "name": "providerIds", + "baseName": "ProviderIds", + "type": "{ [key: string]: string; }" + }, + { + "name": "year", + "baseName": "Year", + "type": "number" + }, + { + "name": "indexNumber", + "baseName": "IndexNumber", + "type": "number" + }, + { + "name": "parentIndexNumber", + "baseName": "ParentIndexNumber", + "type": "number" + }, + { + "name": "premiereDate", + "baseName": "PremiereDate", + "type": "Date" + }, + { + "name": "isAutomated", + "baseName": "IsAutomated", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return SeriesInfo.attributeTypeMap; + } +} + diff --git a/jellyfin/model/seriesInfoRemoteSearchQuery.ts b/jellyfin/model/seriesInfoRemoteSearchQuery.ts new file mode 100644 index 0000000..bb5cda6 --- /dev/null +++ b/jellyfin/model/seriesInfoRemoteSearchQuery.ts @@ -0,0 +1,56 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { SeriesInfo } from './seriesInfo'; + +export class SeriesInfoRemoteSearchQuery { + 'searchInfo'?: SeriesInfo | null; + 'itemId'?: string; + /** + * Gets or sets the provider name to search within if set. + */ + 'searchProviderName'?: string | null; + /** + * Gets or sets a value indicating whether disabled providers should be included. + */ + 'includeDisabledProviders'?: boolean; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "searchInfo", + "baseName": "SearchInfo", + "type": "SeriesInfo" + }, + { + "name": "itemId", + "baseName": "ItemId", + "type": "string" + }, + { + "name": "searchProviderName", + "baseName": "SearchProviderName", + "type": "string" + }, + { + "name": "includeDisabledProviders", + "baseName": "IncludeDisabledProviders", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return SeriesInfoRemoteSearchQuery.attributeTypeMap; + } +} + diff --git a/jellyfin/model/seriesStatus.ts b/jellyfin/model/seriesStatus.ts new file mode 100644 index 0000000..45401a3 --- /dev/null +++ b/jellyfin/model/seriesStatus.ts @@ -0,0 +1,21 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Enum SeriesStatus. +*/ +export enum SeriesStatus { + Continuing = 'Continuing', + Ended = 'Ended' +} diff --git a/jellyfin/model/seriesTimerInfoDto.ts b/jellyfin/model/seriesTimerInfoDto.ts new file mode 100644 index 0000000..09fa185 --- /dev/null +++ b/jellyfin/model/seriesTimerInfoDto.ts @@ -0,0 +1,330 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { DayOfWeek } from './dayOfWeek'; +import { DayPattern } from './dayPattern'; +import { KeepUntil } from './keepUntil'; + +/** +* Class SeriesTimerInfoDto. +*/ +export class SeriesTimerInfoDto { + /** + * Gets or sets the Id of the recording. + */ + 'id'?: string | null; + 'type'?: string | null; + /** + * Gets or sets the server identifier. + */ + 'serverId'?: string | null; + /** + * Gets or sets the external identifier. + */ + 'externalId'?: string | null; + /** + * Gets or sets the channel id of the recording. + */ + 'channelId'?: string; + /** + * Gets or sets the external channel identifier. + */ + 'externalChannelId'?: string | null; + /** + * Gets or sets the channel name of the recording. + */ + 'channelName'?: string | null; + 'channelPrimaryImageTag'?: string | null; + /** + * Gets or sets the program identifier. + */ + 'programId'?: string | null; + /** + * Gets or sets the external program identifier. + */ + 'externalProgramId'?: string | null; + /** + * Gets or sets the name of the recording. + */ + 'name'?: string | null; + /** + * Gets or sets the description of the recording. + */ + 'overview'?: string | null; + /** + * Gets or sets the start date of the recording, in UTC. + */ + 'startDate'?: Date; + /** + * Gets or sets the end date of the recording, in UTC. + */ + 'endDate'?: Date; + /** + * Gets or sets the name of the service. + */ + 'serviceName'?: string | null; + /** + * Gets or sets the priority. + */ + 'priority'?: number; + /** + * Gets or sets the pre padding seconds. + */ + 'prePaddingSeconds'?: number; + /** + * Gets or sets the post padding seconds. + */ + 'postPaddingSeconds'?: number; + /** + * Gets or sets a value indicating whether this instance is pre padding required. + */ + 'isPrePaddingRequired'?: boolean; + /** + * Gets or sets the Id of the Parent that has a backdrop if the item does not have one. + */ + 'parentBackdropItemId'?: string | null; + /** + * Gets or sets the parent backdrop image tags. + */ + 'parentBackdropImageTags'?: Array | null; + /** + * Gets or sets a value indicating whether this instance is post padding required. + */ + 'isPostPaddingRequired'?: boolean; + 'keepUntil'?: KeepUntil; + /** + * Gets or sets a value indicating whether [record any time]. + */ + 'recordAnyTime'?: boolean; + 'skipEpisodesInLibrary'?: boolean; + /** + * Gets or sets a value indicating whether [record any channel]. + */ + 'recordAnyChannel'?: boolean; + 'keepUpTo'?: number; + /** + * Gets or sets a value indicating whether [record new only]. + */ + 'recordNewOnly'?: boolean; + /** + * Gets or sets the days. + */ + 'days'?: Array | null; + 'dayPattern'?: DayPattern | null; + /** + * Gets or sets the image tags. + */ + 'imageTags'?: { [key: string]: string; } | null; + /** + * Gets or sets the parent thumb item id. + */ + 'parentThumbItemId'?: string | null; + /** + * Gets or sets the parent thumb image tag. + */ + 'parentThumbImageTag'?: string | null; + /** + * Gets or sets the parent primary image item identifier. + */ + 'parentPrimaryImageItemId'?: string | null; + /** + * Gets or sets the parent primary image tag. + */ + 'parentPrimaryImageTag'?: string | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "id", + "baseName": "Id", + "type": "string" + }, + { + "name": "type", + "baseName": "Type", + "type": "string" + }, + { + "name": "serverId", + "baseName": "ServerId", + "type": "string" + }, + { + "name": "externalId", + "baseName": "ExternalId", + "type": "string" + }, + { + "name": "channelId", + "baseName": "ChannelId", + "type": "string" + }, + { + "name": "externalChannelId", + "baseName": "ExternalChannelId", + "type": "string" + }, + { + "name": "channelName", + "baseName": "ChannelName", + "type": "string" + }, + { + "name": "channelPrimaryImageTag", + "baseName": "ChannelPrimaryImageTag", + "type": "string" + }, + { + "name": "programId", + "baseName": "ProgramId", + "type": "string" + }, + { + "name": "externalProgramId", + "baseName": "ExternalProgramId", + "type": "string" + }, + { + "name": "name", + "baseName": "Name", + "type": "string" + }, + { + "name": "overview", + "baseName": "Overview", + "type": "string" + }, + { + "name": "startDate", + "baseName": "StartDate", + "type": "Date" + }, + { + "name": "endDate", + "baseName": "EndDate", + "type": "Date" + }, + { + "name": "serviceName", + "baseName": "ServiceName", + "type": "string" + }, + { + "name": "priority", + "baseName": "Priority", + "type": "number" + }, + { + "name": "prePaddingSeconds", + "baseName": "PrePaddingSeconds", + "type": "number" + }, + { + "name": "postPaddingSeconds", + "baseName": "PostPaddingSeconds", + "type": "number" + }, + { + "name": "isPrePaddingRequired", + "baseName": "IsPrePaddingRequired", + "type": "boolean" + }, + { + "name": "parentBackdropItemId", + "baseName": "ParentBackdropItemId", + "type": "string" + }, + { + "name": "parentBackdropImageTags", + "baseName": "ParentBackdropImageTags", + "type": "Array" + }, + { + "name": "isPostPaddingRequired", + "baseName": "IsPostPaddingRequired", + "type": "boolean" + }, + { + "name": "keepUntil", + "baseName": "KeepUntil", + "type": "KeepUntil" + }, + { + "name": "recordAnyTime", + "baseName": "RecordAnyTime", + "type": "boolean" + }, + { + "name": "skipEpisodesInLibrary", + "baseName": "SkipEpisodesInLibrary", + "type": "boolean" + }, + { + "name": "recordAnyChannel", + "baseName": "RecordAnyChannel", + "type": "boolean" + }, + { + "name": "keepUpTo", + "baseName": "KeepUpTo", + "type": "number" + }, + { + "name": "recordNewOnly", + "baseName": "RecordNewOnly", + "type": "boolean" + }, + { + "name": "days", + "baseName": "Days", + "type": "Array" + }, + { + "name": "dayPattern", + "baseName": "DayPattern", + "type": "DayPattern" + }, + { + "name": "imageTags", + "baseName": "ImageTags", + "type": "{ [key: string]: string; }" + }, + { + "name": "parentThumbItemId", + "baseName": "ParentThumbItemId", + "type": "string" + }, + { + "name": "parentThumbImageTag", + "baseName": "ParentThumbImageTag", + "type": "string" + }, + { + "name": "parentPrimaryImageItemId", + "baseName": "ParentPrimaryImageItemId", + "type": "string" + }, + { + "name": "parentPrimaryImageTag", + "baseName": "ParentPrimaryImageTag", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return SeriesTimerInfoDto.attributeTypeMap; + } +} + +export namespace SeriesTimerInfoDto { +} diff --git a/jellyfin/model/seriesTimerInfoDtoQueryResult.ts b/jellyfin/model/seriesTimerInfoDtoQueryResult.ts new file mode 100644 index 0000000..2f6e104 --- /dev/null +++ b/jellyfin/model/seriesTimerInfoDtoQueryResult.ts @@ -0,0 +1,53 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { SeriesTimerInfoDto } from './seriesTimerInfoDto'; + +export class SeriesTimerInfoDtoQueryResult { + /** + * Gets or sets the items. + */ + 'items'?: Array | null; + /** + * Gets or sets the total number of records available. + */ + 'totalRecordCount'?: number; + /** + * Gets or sets the index of the first record in Items. + */ + 'startIndex'?: number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "items", + "baseName": "Items", + "type": "Array" + }, + { + "name": "totalRecordCount", + "baseName": "TotalRecordCount", + "type": "number" + }, + { + "name": "startIndex", + "baseName": "StartIndex", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return SeriesTimerInfoDtoQueryResult.attributeTypeMap; + } +} + diff --git a/jellyfin/model/serverConfiguration.ts b/jellyfin/model/serverConfiguration.ts new file mode 100644 index 0000000..d16fb13 --- /dev/null +++ b/jellyfin/model/serverConfiguration.ts @@ -0,0 +1,410 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { ImageSavingConvention } from './imageSavingConvention'; +import { MetadataOptions } from './metadataOptions'; +import { NameValuePair } from './nameValuePair'; +import { PathSubstitution } from './pathSubstitution'; +import { RepositoryInfo } from './repositoryInfo'; + +/** +* Represents the server configuration. +*/ +export class ServerConfiguration { + /** + * Gets or sets the number of days we should retain log files. + */ + 'logFileRetentionDays'?: number; + /** + * Gets or sets a value indicating whether this instance is first run. + */ + 'isStartupWizardCompleted'?: boolean; + /** + * Gets or sets the cache path. + */ + 'cachePath'?: string | null; + /** + * Gets or sets the last known version that was ran using the configuration. + */ + 'previousVersion'?: string | null; + /** + * Gets or sets the stringified PreviousVersion to be stored/loaded, because System.Version itself isn\'t xml-serializable. + */ + 'previousVersionStr'?: string | null; + /** + * Gets or sets a value indicating whether to enable prometheus metrics exporting. + */ + 'enableMetrics'?: boolean; + 'enableNormalizedItemByNameIds'?: boolean; + /** + * Gets or sets a value indicating whether this instance is port authorized. + */ + 'isPortAuthorized'?: boolean; + /** + * Gets or sets a value indicating whether quick connect is available for use on this server. + */ + 'quickConnectAvailable'?: boolean; + /** + * Gets or sets a value indicating whether [enable case sensitive item ids]. + */ + 'enableCaseSensitiveItemIds'?: boolean; + 'disableLiveTvChannelUserDataName'?: boolean; + /** + * Gets or sets the metadata path. + */ + 'metadataPath'?: string; + 'metadataNetworkPath'?: string; + /** + * Gets or sets the preferred metadata language. + */ + 'preferredMetadataLanguage'?: string; + /** + * Gets or sets the metadata country code. + */ + 'metadataCountryCode'?: string; + /** + * Gets or sets characters to be replaced with a \' \' in strings to create a sort name. + */ + 'sortReplaceCharacters'?: Array; + /** + * Gets or sets characters to be removed from strings to create a sort name. + */ + 'sortRemoveCharacters'?: Array; + /** + * Gets or sets words to be removed from strings to create a sort name. + */ + 'sortRemoveWords'?: Array; + /** + * Gets or sets the minimum percentage of an item that must be played in order for playstate to be updated. + */ + 'minResumePct'?: number; + /** + * Gets or sets the maximum percentage of an item that can be played while still saving playstate. If this percentage is crossed playstate will be reset to the beginning and the item will be marked watched. + */ + 'maxResumePct'?: number; + /** + * Gets or sets the minimum duration that an item must have in order to be eligible for playstate updates.. + */ + 'minResumeDurationSeconds'?: number; + /** + * Gets or sets the minimum minutes of a book that must be played in order for playstate to be updated. + */ + 'minAudiobookResume'?: number; + /** + * Gets or sets the remaining minutes of a book that can be played while still saving playstate. If this percentage is crossed playstate will be reset to the beginning and the item will be marked watched. + */ + 'maxAudiobookResume'?: number; + /** + * Gets or sets the delay in seconds that we will wait after a file system change to try and discover what has been added/removed Some delay is necessary with some items because their creation is not atomic. It involves the creation of several different directories and files. + */ + 'libraryMonitorDelay'?: number; + 'imageSavingConvention'?: ImageSavingConvention; + 'metadataOptions'?: Array; + 'skipDeserializationForBasicTypes'?: boolean; + 'serverName'?: string; + 'uICulture'?: string; + 'saveMetadataHidden'?: boolean; + 'contentTypes'?: Array; + 'remoteClientBitrateLimit'?: number; + 'enableFolderView'?: boolean; + 'enableGroupingIntoCollections'?: boolean; + 'displaySpecialsWithinSeasons'?: boolean; + 'codecsUsed'?: Array; + 'pluginRepositories'?: Array; + 'enableExternalContentInSuggestions'?: boolean; + 'imageExtractionTimeoutMs'?: number; + 'pathSubstitutions'?: Array; + /** + * Gets or sets a value indicating whether slow server responses should be logged as a warning. + */ + 'enableSlowResponseWarning'?: boolean; + /** + * Gets or sets the threshold for the slow response time warning in ms. + */ + 'slowResponseThresholdMs'?: number; + /** + * Gets or sets the cors hosts. + */ + 'corsHosts'?: Array; + /** + * Gets or sets the number of days we should retain activity logs. + */ + 'activityLogRetentionDays'?: number | null; + /** + * Gets or sets the how the library scan fans out. + */ + 'libraryScanFanoutConcurrency'?: number; + /** + * Gets or sets the how many metadata refreshes can run concurrently. + */ + 'libraryMetadataRefreshConcurrency'?: number; + /** + * Gets or sets a value indicating whether older plugins should automatically be deleted from the plugin folder. + */ + 'removeOldPlugins'?: boolean; + /** + * Gets or sets a value indicating whether clients should be allowed to upload logs. + */ + 'allowClientLogUpload'?: boolean; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "logFileRetentionDays", + "baseName": "LogFileRetentionDays", + "type": "number" + }, + { + "name": "isStartupWizardCompleted", + "baseName": "IsStartupWizardCompleted", + "type": "boolean" + }, + { + "name": "cachePath", + "baseName": "CachePath", + "type": "string" + }, + { + "name": "previousVersion", + "baseName": "PreviousVersion", + "type": "string" + }, + { + "name": "previousVersionStr", + "baseName": "PreviousVersionStr", + "type": "string" + }, + { + "name": "enableMetrics", + "baseName": "EnableMetrics", + "type": "boolean" + }, + { + "name": "enableNormalizedItemByNameIds", + "baseName": "EnableNormalizedItemByNameIds", + "type": "boolean" + }, + { + "name": "isPortAuthorized", + "baseName": "IsPortAuthorized", + "type": "boolean" + }, + { + "name": "quickConnectAvailable", + "baseName": "QuickConnectAvailable", + "type": "boolean" + }, + { + "name": "enableCaseSensitiveItemIds", + "baseName": "EnableCaseSensitiveItemIds", + "type": "boolean" + }, + { + "name": "disableLiveTvChannelUserDataName", + "baseName": "DisableLiveTvChannelUserDataName", + "type": "boolean" + }, + { + "name": "metadataPath", + "baseName": "MetadataPath", + "type": "string" + }, + { + "name": "metadataNetworkPath", + "baseName": "MetadataNetworkPath", + "type": "string" + }, + { + "name": "preferredMetadataLanguage", + "baseName": "PreferredMetadataLanguage", + "type": "string" + }, + { + "name": "metadataCountryCode", + "baseName": "MetadataCountryCode", + "type": "string" + }, + { + "name": "sortReplaceCharacters", + "baseName": "SortReplaceCharacters", + "type": "Array" + }, + { + "name": "sortRemoveCharacters", + "baseName": "SortRemoveCharacters", + "type": "Array" + }, + { + "name": "sortRemoveWords", + "baseName": "SortRemoveWords", + "type": "Array" + }, + { + "name": "minResumePct", + "baseName": "MinResumePct", + "type": "number" + }, + { + "name": "maxResumePct", + "baseName": "MaxResumePct", + "type": "number" + }, + { + "name": "minResumeDurationSeconds", + "baseName": "MinResumeDurationSeconds", + "type": "number" + }, + { + "name": "minAudiobookResume", + "baseName": "MinAudiobookResume", + "type": "number" + }, + { + "name": "maxAudiobookResume", + "baseName": "MaxAudiobookResume", + "type": "number" + }, + { + "name": "libraryMonitorDelay", + "baseName": "LibraryMonitorDelay", + "type": "number" + }, + { + "name": "imageSavingConvention", + "baseName": "ImageSavingConvention", + "type": "ImageSavingConvention" + }, + { + "name": "metadataOptions", + "baseName": "MetadataOptions", + "type": "Array" + }, + { + "name": "skipDeserializationForBasicTypes", + "baseName": "SkipDeserializationForBasicTypes", + "type": "boolean" + }, + { + "name": "serverName", + "baseName": "ServerName", + "type": "string" + }, + { + "name": "uICulture", + "baseName": "UICulture", + "type": "string" + }, + { + "name": "saveMetadataHidden", + "baseName": "SaveMetadataHidden", + "type": "boolean" + }, + { + "name": "contentTypes", + "baseName": "ContentTypes", + "type": "Array" + }, + { + "name": "remoteClientBitrateLimit", + "baseName": "RemoteClientBitrateLimit", + "type": "number" + }, + { + "name": "enableFolderView", + "baseName": "EnableFolderView", + "type": "boolean" + }, + { + "name": "enableGroupingIntoCollections", + "baseName": "EnableGroupingIntoCollections", + "type": "boolean" + }, + { + "name": "displaySpecialsWithinSeasons", + "baseName": "DisplaySpecialsWithinSeasons", + "type": "boolean" + }, + { + "name": "codecsUsed", + "baseName": "CodecsUsed", + "type": "Array" + }, + { + "name": "pluginRepositories", + "baseName": "PluginRepositories", + "type": "Array" + }, + { + "name": "enableExternalContentInSuggestions", + "baseName": "EnableExternalContentInSuggestions", + "type": "boolean" + }, + { + "name": "imageExtractionTimeoutMs", + "baseName": "ImageExtractionTimeoutMs", + "type": "number" + }, + { + "name": "pathSubstitutions", + "baseName": "PathSubstitutions", + "type": "Array" + }, + { + "name": "enableSlowResponseWarning", + "baseName": "EnableSlowResponseWarning", + "type": "boolean" + }, + { + "name": "slowResponseThresholdMs", + "baseName": "SlowResponseThresholdMs", + "type": "number" + }, + { + "name": "corsHosts", + "baseName": "CorsHosts", + "type": "Array" + }, + { + "name": "activityLogRetentionDays", + "baseName": "ActivityLogRetentionDays", + "type": "number" + }, + { + "name": "libraryScanFanoutConcurrency", + "baseName": "LibraryScanFanoutConcurrency", + "type": "number" + }, + { + "name": "libraryMetadataRefreshConcurrency", + "baseName": "LibraryMetadataRefreshConcurrency", + "type": "number" + }, + { + "name": "removeOldPlugins", + "baseName": "RemoveOldPlugins", + "type": "boolean" + }, + { + "name": "allowClientLogUpload", + "baseName": "AllowClientLogUpload", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return ServerConfiguration.attributeTypeMap; + } +} + +export namespace ServerConfiguration { +} diff --git a/jellyfin/model/serverDiscoveryInfo.ts b/jellyfin/model/serverDiscoveryInfo.ts new file mode 100644 index 0000000..7f7dfa8 --- /dev/null +++ b/jellyfin/model/serverDiscoveryInfo.ts @@ -0,0 +1,64 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* The server discovery info model. +*/ +export class ServerDiscoveryInfo { + /** + * Gets the address. + */ + 'address'?: string; + /** + * Gets the server identifier. + */ + 'id'?: string; + /** + * Gets the name. + */ + 'name'?: string; + /** + * Gets the endpoint address. + */ + 'endpointAddress'?: string | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "address", + "baseName": "Address", + "type": "string" + }, + { + "name": "id", + "baseName": "Id", + "type": "string" + }, + { + "name": "name", + "baseName": "Name", + "type": "string" + }, + { + "name": "endpointAddress", + "baseName": "EndpointAddress", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return ServerDiscoveryInfo.attributeTypeMap; + } +} + diff --git a/jellyfin/model/sessionInfo.ts b/jellyfin/model/sessionInfo.ts new file mode 100644 index 0000000..37cf3aa --- /dev/null +++ b/jellyfin/model/sessionInfo.ts @@ -0,0 +1,253 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { BaseItemDto } from './baseItemDto'; +import { ClientCapabilities } from './clientCapabilities'; +import { GeneralCommandType } from './generalCommandType'; +import { PlayerStateInfo } from './playerStateInfo'; +import { QueueItem } from './queueItem'; +import { SessionInfoFullNowPlayingItem } from './sessionInfoFullNowPlayingItem'; +import { SessionInfoNowPlayingItem } from './sessionInfoNowPlayingItem'; +import { SessionUserInfo } from './sessionUserInfo'; +import { TranscodingInfo } from './transcodingInfo'; + +/** +* Class SessionInfo. +*/ +export class SessionInfo { + 'playState'?: PlayerStateInfo | null; + 'additionalUsers'?: Array | null; + 'capabilities'?: ClientCapabilities | null; + /** + * Gets or sets the remote end point. + */ + 'remoteEndPoint'?: string | null; + /** + * Gets the playable media types. + */ + 'playableMediaTypes'?: Array | null; + /** + * Gets or sets the id. + */ + 'id'?: string | null; + /** + * Gets or sets the user id. + */ + 'userId'?: string; + /** + * Gets or sets the username. + */ + 'userName'?: string | null; + /** + * Gets or sets the type of the client. + */ + 'client'?: string | null; + /** + * Gets or sets the last activity date. + */ + 'lastActivityDate'?: Date; + /** + * Gets or sets the last playback check in. + */ + 'lastPlaybackCheckIn'?: Date; + /** + * Gets or sets the name of the device. + */ + 'deviceName'?: string | null; + /** + * Gets or sets the type of the device. + */ + 'deviceType'?: string | null; + 'nowPlayingItem'?: SessionInfoNowPlayingItem | null; + 'fullNowPlayingItem'?: SessionInfoFullNowPlayingItem | null; + 'nowViewingItem'?: SessionInfoNowPlayingItem | null; + /** + * Gets or sets the device id. + */ + 'deviceId'?: string | null; + /** + * Gets or sets the application version. + */ + 'applicationVersion'?: string | null; + 'transcodingInfo'?: TranscodingInfo | null; + /** + * Gets a value indicating whether this instance is active. + */ + 'isActive'?: boolean; + 'supportsMediaControl'?: boolean; + 'supportsRemoteControl'?: boolean; + 'nowPlayingQueue'?: Array | null; + 'nowPlayingQueueFullItems'?: Array | null; + 'hasCustomDeviceName'?: boolean; + 'playlistItemId'?: string | null; + 'serverId'?: string | null; + 'userPrimaryImageTag'?: string | null; + /** + * Gets the supported commands. + */ + 'supportedCommands'?: Array | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "playState", + "baseName": "PlayState", + "type": "PlayerStateInfo" + }, + { + "name": "additionalUsers", + "baseName": "AdditionalUsers", + "type": "Array" + }, + { + "name": "capabilities", + "baseName": "Capabilities", + "type": "ClientCapabilities" + }, + { + "name": "remoteEndPoint", + "baseName": "RemoteEndPoint", + "type": "string" + }, + { + "name": "playableMediaTypes", + "baseName": "PlayableMediaTypes", + "type": "Array" + }, + { + "name": "id", + "baseName": "Id", + "type": "string" + }, + { + "name": "userId", + "baseName": "UserId", + "type": "string" + }, + { + "name": "userName", + "baseName": "UserName", + "type": "string" + }, + { + "name": "client", + "baseName": "Client", + "type": "string" + }, + { + "name": "lastActivityDate", + "baseName": "LastActivityDate", + "type": "Date" + }, + { + "name": "lastPlaybackCheckIn", + "baseName": "LastPlaybackCheckIn", + "type": "Date" + }, + { + "name": "deviceName", + "baseName": "DeviceName", + "type": "string" + }, + { + "name": "deviceType", + "baseName": "DeviceType", + "type": "string" + }, + { + "name": "nowPlayingItem", + "baseName": "NowPlayingItem", + "type": "SessionInfoNowPlayingItem" + }, + { + "name": "fullNowPlayingItem", + "baseName": "FullNowPlayingItem", + "type": "SessionInfoFullNowPlayingItem" + }, + { + "name": "nowViewingItem", + "baseName": "NowViewingItem", + "type": "SessionInfoNowPlayingItem" + }, + { + "name": "deviceId", + "baseName": "DeviceId", + "type": "string" + }, + { + "name": "applicationVersion", + "baseName": "ApplicationVersion", + "type": "string" + }, + { + "name": "transcodingInfo", + "baseName": "TranscodingInfo", + "type": "TranscodingInfo" + }, + { + "name": "isActive", + "baseName": "IsActive", + "type": "boolean" + }, + { + "name": "supportsMediaControl", + "baseName": "SupportsMediaControl", + "type": "boolean" + }, + { + "name": "supportsRemoteControl", + "baseName": "SupportsRemoteControl", + "type": "boolean" + }, + { + "name": "nowPlayingQueue", + "baseName": "NowPlayingQueue", + "type": "Array" + }, + { + "name": "nowPlayingQueueFullItems", + "baseName": "NowPlayingQueueFullItems", + "type": "Array" + }, + { + "name": "hasCustomDeviceName", + "baseName": "HasCustomDeviceName", + "type": "boolean" + }, + { + "name": "playlistItemId", + "baseName": "PlaylistItemId", + "type": "string" + }, + { + "name": "serverId", + "baseName": "ServerId", + "type": "string" + }, + { + "name": "userPrimaryImageTag", + "baseName": "UserPrimaryImageTag", + "type": "string" + }, + { + "name": "supportedCommands", + "baseName": "SupportedCommands", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return SessionInfo.attributeTypeMap; + } +} + diff --git a/jellyfin/model/sessionInfoFullNowPlayingItem.ts b/jellyfin/model/sessionInfoFullNowPlayingItem.ts new file mode 100644 index 0000000..9da3795 --- /dev/null +++ b/jellyfin/model/sessionInfoFullNowPlayingItem.ts @@ -0,0 +1,98 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { MediaUrl } from './mediaUrl'; + +/** +* Class BaseItem. +*/ +export class SessionInfoFullNowPlayingItem { + 'size'?: number | null; + 'container'?: string | null; + 'isHD'?: boolean; + 'isShortcut'?: boolean; + 'shortcutPath'?: string | null; + 'width'?: number; + 'height'?: number; + 'extraIds'?: Array | null; + 'dateLastSaved'?: Date; + /** + * Gets or sets the remote trailers. + */ + 'remoteTrailers'?: Array | null; + 'supportsExternalTransfer'?: boolean; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "size", + "baseName": "Size", + "type": "number" + }, + { + "name": "container", + "baseName": "Container", + "type": "string" + }, + { + "name": "isHD", + "baseName": "IsHD", + "type": "boolean" + }, + { + "name": "isShortcut", + "baseName": "IsShortcut", + "type": "boolean" + }, + { + "name": "shortcutPath", + "baseName": "ShortcutPath", + "type": "string" + }, + { + "name": "width", + "baseName": "Width", + "type": "number" + }, + { + "name": "height", + "baseName": "Height", + "type": "number" + }, + { + "name": "extraIds", + "baseName": "ExtraIds", + "type": "Array" + }, + { + "name": "dateLastSaved", + "baseName": "DateLastSaved", + "type": "Date" + }, + { + "name": "remoteTrailers", + "baseName": "RemoteTrailers", + "type": "Array" + }, + { + "name": "supportsExternalTransfer", + "baseName": "SupportsExternalTransfer", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return SessionInfoFullNowPlayingItem.attributeTypeMap; + } +} + diff --git a/jellyfin/model/sessionInfoNowPlayingItem.ts b/jellyfin/model/sessionInfoNowPlayingItem.ts new file mode 100644 index 0000000..46b2828 --- /dev/null +++ b/jellyfin/model/sessionInfoNowPlayingItem.ts @@ -0,0 +1,1272 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { BaseItemDtoCurrentProgram } from './baseItemDtoCurrentProgram'; +import { BaseItemDtoImageBlurHashes } from './baseItemDtoImageBlurHashes'; +import { BaseItemDtoUserData } from './baseItemDtoUserData'; +import { BaseItemKind } from './baseItemKind'; +import { BaseItemPerson } from './baseItemPerson'; +import { ChannelType } from './channelType'; +import { ChapterInfo } from './chapterInfo'; +import { DayOfWeek } from './dayOfWeek'; +import { ExternalUrl } from './externalUrl'; +import { ImageOrientation } from './imageOrientation'; +import { IsoType } from './isoType'; +import { LocationType } from './locationType'; +import { MediaSourceInfo } from './mediaSourceInfo'; +import { MediaStream } from './mediaStream'; +import { MediaUrl } from './mediaUrl'; +import { MetadataField } from './metadataField'; +import { NameGuidPair } from './nameGuidPair'; +import { PlayAccess } from './playAccess'; +import { ProgramAudio } from './programAudio'; +import { Video3DFormat } from './video3DFormat'; +import { VideoType } from './videoType'; + +/** +* This is strictly used as a data transfer object from the api layer. This holds information about a BaseItem in a format that is convenient for the client. +*/ +export class SessionInfoNowPlayingItem { + /** + * Gets or sets the name. + */ + 'name'?: string | null; + 'originalTitle'?: string | null; + /** + * Gets or sets the server identifier. + */ + 'serverId'?: string | null; + /** + * Gets or sets the id. + */ + 'id'?: string; + /** + * Gets or sets the etag. + */ + 'etag'?: string | null; + /** + * Gets or sets the type of the source. + */ + 'sourceType'?: string | null; + /** + * Gets or sets the playlist item identifier. + */ + 'playlistItemId'?: string | null; + /** + * Gets or sets the date created. + */ + 'dateCreated'?: Date | null; + 'dateLastMediaAdded'?: Date | null; + 'extraType'?: string | null; + 'airsBeforeSeasonNumber'?: number | null; + 'airsAfterSeasonNumber'?: number | null; + 'airsBeforeEpisodeNumber'?: number | null; + 'canDelete'?: boolean | null; + 'canDownload'?: boolean | null; + 'hasSubtitles'?: boolean | null; + 'preferredMetadataLanguage'?: string | null; + 'preferredMetadataCountryCode'?: string | null; + /** + * Gets or sets a value indicating whether [supports synchronize]. + */ + 'supportsSync'?: boolean | null; + 'container'?: string | null; + /** + * Gets or sets the name of the sort. + */ + 'sortName'?: string | null; + 'forcedSortName'?: string | null; + 'video3DFormat'?: Video3DFormat | null; + /** + * Gets or sets the premiere date. + */ + 'premiereDate'?: Date | null; + /** + * Gets or sets the external urls. + */ + 'externalUrls'?: Array | null; + /** + * Gets or sets the media versions. + */ + 'mediaSources'?: Array | null; + /** + * Gets or sets the critic rating. + */ + 'criticRating'?: number | null; + 'productionLocations'?: Array | null; + /** + * Gets or sets the path. + */ + 'path'?: string | null; + 'enableMediaSourceDisplay'?: boolean | null; + /** + * Gets or sets the official rating. + */ + 'officialRating'?: string | null; + /** + * Gets or sets the custom rating. + */ + 'customRating'?: string | null; + /** + * Gets or sets the channel identifier. + */ + 'channelId'?: string | null; + 'channelName'?: string | null; + /** + * Gets or sets the overview. + */ + 'overview'?: string | null; + /** + * Gets or sets the taglines. + */ + 'taglines'?: Array | null; + /** + * Gets or sets the genres. + */ + 'genres'?: Array | null; + /** + * Gets or sets the community rating. + */ + 'communityRating'?: number | null; + /** + * Gets or sets the cumulative run time ticks. + */ + 'cumulativeRunTimeTicks'?: number | null; + /** + * Gets or sets the run time ticks. + */ + 'runTimeTicks'?: number | null; + 'playAccess'?: PlayAccess | null; + /** + * Gets or sets the aspect ratio. + */ + 'aspectRatio'?: string | null; + /** + * Gets or sets the production year. + */ + 'productionYear'?: number | null; + /** + * Gets or sets a value indicating whether this instance is place holder. + */ + 'isPlaceHolder'?: boolean | null; + /** + * Gets or sets the number. + */ + 'number'?: string | null; + 'channelNumber'?: string | null; + /** + * Gets or sets the index number. + */ + 'indexNumber'?: number | null; + /** + * Gets or sets the index number end. + */ + 'indexNumberEnd'?: number | null; + /** + * Gets or sets the parent index number. + */ + 'parentIndexNumber'?: number | null; + /** + * Gets or sets the trailer urls. + */ + 'remoteTrailers'?: Array | null; + /** + * Gets or sets the provider ids. + */ + 'providerIds'?: { [key: string]: string; } | null; + /** + * Gets or sets a value indicating whether this instance is HD. + */ + 'isHD'?: boolean | null; + /** + * Gets or sets a value indicating whether this instance is folder. + */ + 'isFolder'?: boolean | null; + /** + * Gets or sets the parent id. + */ + 'parentId'?: string | null; + 'type'?: BaseItemKind; + /** + * Gets or sets the people. + */ + 'people'?: Array | null; + /** + * Gets or sets the studios. + */ + 'studios'?: Array | null; + 'genreItems'?: Array | null; + /** + * Gets or sets wether the item has a logo, this will hold the Id of the Parent that has one. + */ + 'parentLogoItemId'?: string | null; + /** + * Gets or sets wether the item has any backdrops, this will hold the Id of the Parent that has one. + */ + 'parentBackdropItemId'?: string | null; + /** + * Gets or sets the parent backdrop image tags. + */ + 'parentBackdropImageTags'?: Array | null; + /** + * Gets or sets the local trailer count. + */ + 'localTrailerCount'?: number | null; + 'userData'?: BaseItemDtoUserData | null; + /** + * Gets or sets the recursive item count. + */ + 'recursiveItemCount'?: number | null; + /** + * Gets or sets the child count. + */ + 'childCount'?: number | null; + /** + * Gets or sets the name of the series. + */ + 'seriesName'?: string | null; + /** + * Gets or sets the series id. + */ + 'seriesId'?: string | null; + /** + * Gets or sets the season identifier. + */ + 'seasonId'?: string | null; + /** + * Gets or sets the special feature count. + */ + 'specialFeatureCount'?: number | null; + /** + * Gets or sets the display preferences id. + */ + 'displayPreferencesId'?: string | null; + /** + * Gets or sets the status. + */ + 'status'?: string | null; + /** + * Gets or sets the air time. + */ + 'airTime'?: string | null; + /** + * Gets or sets the air days. + */ + 'airDays'?: Array | null; + /** + * Gets or sets the tags. + */ + 'tags'?: Array | null; + /** + * Gets or sets the primary image aspect ratio, after image enhancements. + */ + 'primaryImageAspectRatio'?: number | null; + /** + * Gets or sets the artists. + */ + 'artists'?: Array | null; + /** + * Gets or sets the artist items. + */ + 'artistItems'?: Array | null; + /** + * Gets or sets the album. + */ + 'album'?: string | null; + /** + * Gets or sets the type of the collection. + */ + 'collectionType'?: string | null; + /** + * Gets or sets the display order. + */ + 'displayOrder'?: string | null; + /** + * Gets or sets the album id. + */ + 'albumId'?: string | null; + /** + * Gets or sets the album image tag. + */ + 'albumPrimaryImageTag'?: string | null; + /** + * Gets or sets the series primary image tag. + */ + 'seriesPrimaryImageTag'?: string | null; + /** + * Gets or sets the album artist. + */ + 'albumArtist'?: string | null; + /** + * Gets or sets the album artists. + */ + 'albumArtists'?: Array | null; + /** + * Gets or sets the name of the season. + */ + 'seasonName'?: string | null; + /** + * Gets or sets the media streams. + */ + 'mediaStreams'?: Array | null; + 'videoType'?: VideoType | null; + /** + * Gets or sets the part count. + */ + 'partCount'?: number | null; + 'mediaSourceCount'?: number | null; + /** + * Gets or sets the image tags. + */ + 'imageTags'?: { [key: string]: string; } | null; + /** + * Gets or sets the backdrop image tags. + */ + 'backdropImageTags'?: Array | null; + /** + * Gets or sets the screenshot image tags. + */ + 'screenshotImageTags'?: Array | null; + /** + * Gets or sets the parent logo image tag. + */ + 'parentLogoImageTag'?: string | null; + /** + * Gets or sets wether the item has fan art, this will hold the Id of the Parent that has one. + */ + 'parentArtItemId'?: string | null; + /** + * Gets or sets the parent art image tag. + */ + 'parentArtImageTag'?: string | null; + /** + * Gets or sets the series thumb image tag. + */ + 'seriesThumbImageTag'?: string | null; + 'imageBlurHashes'?: BaseItemDtoImageBlurHashes | null; + /** + * Gets or sets the series studio. + */ + 'seriesStudio'?: string | null; + /** + * Gets or sets the parent thumb item id. + */ + 'parentThumbItemId'?: string | null; + /** + * Gets or sets the parent thumb image tag. + */ + 'parentThumbImageTag'?: string | null; + /** + * Gets or sets the parent primary image item identifier. + */ + 'parentPrimaryImageItemId'?: string | null; + /** + * Gets or sets the parent primary image tag. + */ + 'parentPrimaryImageTag'?: string | null; + /** + * Gets or sets the chapters. + */ + 'chapters'?: Array | null; + 'locationType'?: LocationType | null; + 'isoType'?: IsoType | null; + /** + * Gets or sets the type of the media. + */ + 'mediaType'?: string | null; + /** + * Gets or sets the end date. + */ + 'endDate'?: Date | null; + /** + * Gets or sets the locked fields. + */ + 'lockedFields'?: Array | null; + /** + * Gets or sets the trailer count. + */ + 'trailerCount'?: number | null; + /** + * Gets or sets the movie count. + */ + 'movieCount'?: number | null; + /** + * Gets or sets the series count. + */ + 'seriesCount'?: number | null; + 'programCount'?: number | null; + /** + * Gets or sets the episode count. + */ + 'episodeCount'?: number | null; + /** + * Gets or sets the song count. + */ + 'songCount'?: number | null; + /** + * Gets or sets the album count. + */ + 'albumCount'?: number | null; + 'artistCount'?: number | null; + /** + * Gets or sets the music video count. + */ + 'musicVideoCount'?: number | null; + /** + * Gets or sets a value indicating whether [enable internet providers]. + */ + 'lockData'?: boolean | null; + 'width'?: number | null; + 'height'?: number | null; + 'cameraMake'?: string | null; + 'cameraModel'?: string | null; + 'software'?: string | null; + 'exposureTime'?: number | null; + 'focalLength'?: number | null; + 'imageOrientation'?: ImageOrientation | null; + 'aperture'?: number | null; + 'shutterSpeed'?: number | null; + 'latitude'?: number | null; + 'longitude'?: number | null; + 'altitude'?: number | null; + 'isoSpeedRating'?: number | null; + /** + * Gets or sets the series timer identifier. + */ + 'seriesTimerId'?: string | null; + /** + * Gets or sets the program identifier. + */ + 'programId'?: string | null; + /** + * Gets or sets the channel primary image tag. + */ + 'channelPrimaryImageTag'?: string | null; + /** + * Gets or sets the start date of the recording, in UTC. + */ + 'startDate'?: Date | null; + /** + * Gets or sets the completion percentage. + */ + 'completionPercentage'?: number | null; + /** + * Gets or sets a value indicating whether this instance is repeat. + */ + 'isRepeat'?: boolean | null; + /** + * Gets or sets the episode title. + */ + 'episodeTitle'?: string | null; + 'channelType'?: ChannelType | null; + 'audio'?: ProgramAudio | null; + /** + * Gets or sets a value indicating whether this instance is movie. + */ + 'isMovie'?: boolean | null; + /** + * Gets or sets a value indicating whether this instance is sports. + */ + 'isSports'?: boolean | null; + /** + * Gets or sets a value indicating whether this instance is series. + */ + 'isSeries'?: boolean | null; + /** + * Gets or sets a value indicating whether this instance is live. + */ + 'isLive'?: boolean | null; + /** + * Gets or sets a value indicating whether this instance is news. + */ + 'isNews'?: boolean | null; + /** + * Gets or sets a value indicating whether this instance is kids. + */ + 'isKids'?: boolean | null; + /** + * Gets or sets a value indicating whether this instance is premiere. + */ + 'isPremiere'?: boolean | null; + /** + * Gets or sets the timer identifier. + */ + 'timerId'?: string | null; + 'currentProgram'?: BaseItemDtoCurrentProgram | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "Name", + "type": "string" + }, + { + "name": "originalTitle", + "baseName": "OriginalTitle", + "type": "string" + }, + { + "name": "serverId", + "baseName": "ServerId", + "type": "string" + }, + { + "name": "id", + "baseName": "Id", + "type": "string" + }, + { + "name": "etag", + "baseName": "Etag", + "type": "string" + }, + { + "name": "sourceType", + "baseName": "SourceType", + "type": "string" + }, + { + "name": "playlistItemId", + "baseName": "PlaylistItemId", + "type": "string" + }, + { + "name": "dateCreated", + "baseName": "DateCreated", + "type": "Date" + }, + { + "name": "dateLastMediaAdded", + "baseName": "DateLastMediaAdded", + "type": "Date" + }, + { + "name": "extraType", + "baseName": "ExtraType", + "type": "string" + }, + { + "name": "airsBeforeSeasonNumber", + "baseName": "AirsBeforeSeasonNumber", + "type": "number" + }, + { + "name": "airsAfterSeasonNumber", + "baseName": "AirsAfterSeasonNumber", + "type": "number" + }, + { + "name": "airsBeforeEpisodeNumber", + "baseName": "AirsBeforeEpisodeNumber", + "type": "number" + }, + { + "name": "canDelete", + "baseName": "CanDelete", + "type": "boolean" + }, + { + "name": "canDownload", + "baseName": "CanDownload", + "type": "boolean" + }, + { + "name": "hasSubtitles", + "baseName": "HasSubtitles", + "type": "boolean" + }, + { + "name": "preferredMetadataLanguage", + "baseName": "PreferredMetadataLanguage", + "type": "string" + }, + { + "name": "preferredMetadataCountryCode", + "baseName": "PreferredMetadataCountryCode", + "type": "string" + }, + { + "name": "supportsSync", + "baseName": "SupportsSync", + "type": "boolean" + }, + { + "name": "container", + "baseName": "Container", + "type": "string" + }, + { + "name": "sortName", + "baseName": "SortName", + "type": "string" + }, + { + "name": "forcedSortName", + "baseName": "ForcedSortName", + "type": "string" + }, + { + "name": "video3DFormat", + "baseName": "Video3DFormat", + "type": "Video3DFormat" + }, + { + "name": "premiereDate", + "baseName": "PremiereDate", + "type": "Date" + }, + { + "name": "externalUrls", + "baseName": "ExternalUrls", + "type": "Array" + }, + { + "name": "mediaSources", + "baseName": "MediaSources", + "type": "Array" + }, + { + "name": "criticRating", + "baseName": "CriticRating", + "type": "number" + }, + { + "name": "productionLocations", + "baseName": "ProductionLocations", + "type": "Array" + }, + { + "name": "path", + "baseName": "Path", + "type": "string" + }, + { + "name": "enableMediaSourceDisplay", + "baseName": "EnableMediaSourceDisplay", + "type": "boolean" + }, + { + "name": "officialRating", + "baseName": "OfficialRating", + "type": "string" + }, + { + "name": "customRating", + "baseName": "CustomRating", + "type": "string" + }, + { + "name": "channelId", + "baseName": "ChannelId", + "type": "string" + }, + { + "name": "channelName", + "baseName": "ChannelName", + "type": "string" + }, + { + "name": "overview", + "baseName": "Overview", + "type": "string" + }, + { + "name": "taglines", + "baseName": "Taglines", + "type": "Array" + }, + { + "name": "genres", + "baseName": "Genres", + "type": "Array" + }, + { + "name": "communityRating", + "baseName": "CommunityRating", + "type": "number" + }, + { + "name": "cumulativeRunTimeTicks", + "baseName": "CumulativeRunTimeTicks", + "type": "number" + }, + { + "name": "runTimeTicks", + "baseName": "RunTimeTicks", + "type": "number" + }, + { + "name": "playAccess", + "baseName": "PlayAccess", + "type": "PlayAccess" + }, + { + "name": "aspectRatio", + "baseName": "AspectRatio", + "type": "string" + }, + { + "name": "productionYear", + "baseName": "ProductionYear", + "type": "number" + }, + { + "name": "isPlaceHolder", + "baseName": "IsPlaceHolder", + "type": "boolean" + }, + { + "name": "number", + "baseName": "Number", + "type": "string" + }, + { + "name": "channelNumber", + "baseName": "ChannelNumber", + "type": "string" + }, + { + "name": "indexNumber", + "baseName": "IndexNumber", + "type": "number" + }, + { + "name": "indexNumberEnd", + "baseName": "IndexNumberEnd", + "type": "number" + }, + { + "name": "parentIndexNumber", + "baseName": "ParentIndexNumber", + "type": "number" + }, + { + "name": "remoteTrailers", + "baseName": "RemoteTrailers", + "type": "Array" + }, + { + "name": "providerIds", + "baseName": "ProviderIds", + "type": "{ [key: string]: string; }" + }, + { + "name": "isHD", + "baseName": "IsHD", + "type": "boolean" + }, + { + "name": "isFolder", + "baseName": "IsFolder", + "type": "boolean" + }, + { + "name": "parentId", + "baseName": "ParentId", + "type": "string" + }, + { + "name": "type", + "baseName": "Type", + "type": "BaseItemKind" + }, + { + "name": "people", + "baseName": "People", + "type": "Array" + }, + { + "name": "studios", + "baseName": "Studios", + "type": "Array" + }, + { + "name": "genreItems", + "baseName": "GenreItems", + "type": "Array" + }, + { + "name": "parentLogoItemId", + "baseName": "ParentLogoItemId", + "type": "string" + }, + { + "name": "parentBackdropItemId", + "baseName": "ParentBackdropItemId", + "type": "string" + }, + { + "name": "parentBackdropImageTags", + "baseName": "ParentBackdropImageTags", + "type": "Array" + }, + { + "name": "localTrailerCount", + "baseName": "LocalTrailerCount", + "type": "number" + }, + { + "name": "userData", + "baseName": "UserData", + "type": "BaseItemDtoUserData" + }, + { + "name": "recursiveItemCount", + "baseName": "RecursiveItemCount", + "type": "number" + }, + { + "name": "childCount", + "baseName": "ChildCount", + "type": "number" + }, + { + "name": "seriesName", + "baseName": "SeriesName", + "type": "string" + }, + { + "name": "seriesId", + "baseName": "SeriesId", + "type": "string" + }, + { + "name": "seasonId", + "baseName": "SeasonId", + "type": "string" + }, + { + "name": "specialFeatureCount", + "baseName": "SpecialFeatureCount", + "type": "number" + }, + { + "name": "displayPreferencesId", + "baseName": "DisplayPreferencesId", + "type": "string" + }, + { + "name": "status", + "baseName": "Status", + "type": "string" + }, + { + "name": "airTime", + "baseName": "AirTime", + "type": "string" + }, + { + "name": "airDays", + "baseName": "AirDays", + "type": "Array" + }, + { + "name": "tags", + "baseName": "Tags", + "type": "Array" + }, + { + "name": "primaryImageAspectRatio", + "baseName": "PrimaryImageAspectRatio", + "type": "number" + }, + { + "name": "artists", + "baseName": "Artists", + "type": "Array" + }, + { + "name": "artistItems", + "baseName": "ArtistItems", + "type": "Array" + }, + { + "name": "album", + "baseName": "Album", + "type": "string" + }, + { + "name": "collectionType", + "baseName": "CollectionType", + "type": "string" + }, + { + "name": "displayOrder", + "baseName": "DisplayOrder", + "type": "string" + }, + { + "name": "albumId", + "baseName": "AlbumId", + "type": "string" + }, + { + "name": "albumPrimaryImageTag", + "baseName": "AlbumPrimaryImageTag", + "type": "string" + }, + { + "name": "seriesPrimaryImageTag", + "baseName": "SeriesPrimaryImageTag", + "type": "string" + }, + { + "name": "albumArtist", + "baseName": "AlbumArtist", + "type": "string" + }, + { + "name": "albumArtists", + "baseName": "AlbumArtists", + "type": "Array" + }, + { + "name": "seasonName", + "baseName": "SeasonName", + "type": "string" + }, + { + "name": "mediaStreams", + "baseName": "MediaStreams", + "type": "Array" + }, + { + "name": "videoType", + "baseName": "VideoType", + "type": "VideoType" + }, + { + "name": "partCount", + "baseName": "PartCount", + "type": "number" + }, + { + "name": "mediaSourceCount", + "baseName": "MediaSourceCount", + "type": "number" + }, + { + "name": "imageTags", + "baseName": "ImageTags", + "type": "{ [key: string]: string; }" + }, + { + "name": "backdropImageTags", + "baseName": "BackdropImageTags", + "type": "Array" + }, + { + "name": "screenshotImageTags", + "baseName": "ScreenshotImageTags", + "type": "Array" + }, + { + "name": "parentLogoImageTag", + "baseName": "ParentLogoImageTag", + "type": "string" + }, + { + "name": "parentArtItemId", + "baseName": "ParentArtItemId", + "type": "string" + }, + { + "name": "parentArtImageTag", + "baseName": "ParentArtImageTag", + "type": "string" + }, + { + "name": "seriesThumbImageTag", + "baseName": "SeriesThumbImageTag", + "type": "string" + }, + { + "name": "imageBlurHashes", + "baseName": "ImageBlurHashes", + "type": "BaseItemDtoImageBlurHashes" + }, + { + "name": "seriesStudio", + "baseName": "SeriesStudio", + "type": "string" + }, + { + "name": "parentThumbItemId", + "baseName": "ParentThumbItemId", + "type": "string" + }, + { + "name": "parentThumbImageTag", + "baseName": "ParentThumbImageTag", + "type": "string" + }, + { + "name": "parentPrimaryImageItemId", + "baseName": "ParentPrimaryImageItemId", + "type": "string" + }, + { + "name": "parentPrimaryImageTag", + "baseName": "ParentPrimaryImageTag", + "type": "string" + }, + { + "name": "chapters", + "baseName": "Chapters", + "type": "Array" + }, + { + "name": "locationType", + "baseName": "LocationType", + "type": "LocationType" + }, + { + "name": "isoType", + "baseName": "IsoType", + "type": "IsoType" + }, + { + "name": "mediaType", + "baseName": "MediaType", + "type": "string" + }, + { + "name": "endDate", + "baseName": "EndDate", + "type": "Date" + }, + { + "name": "lockedFields", + "baseName": "LockedFields", + "type": "Array" + }, + { + "name": "trailerCount", + "baseName": "TrailerCount", + "type": "number" + }, + { + "name": "movieCount", + "baseName": "MovieCount", + "type": "number" + }, + { + "name": "seriesCount", + "baseName": "SeriesCount", + "type": "number" + }, + { + "name": "programCount", + "baseName": "ProgramCount", + "type": "number" + }, + { + "name": "episodeCount", + "baseName": "EpisodeCount", + "type": "number" + }, + { + "name": "songCount", + "baseName": "SongCount", + "type": "number" + }, + { + "name": "albumCount", + "baseName": "AlbumCount", + "type": "number" + }, + { + "name": "artistCount", + "baseName": "ArtistCount", + "type": "number" + }, + { + "name": "musicVideoCount", + "baseName": "MusicVideoCount", + "type": "number" + }, + { + "name": "lockData", + "baseName": "LockData", + "type": "boolean" + }, + { + "name": "width", + "baseName": "Width", + "type": "number" + }, + { + "name": "height", + "baseName": "Height", + "type": "number" + }, + { + "name": "cameraMake", + "baseName": "CameraMake", + "type": "string" + }, + { + "name": "cameraModel", + "baseName": "CameraModel", + "type": "string" + }, + { + "name": "software", + "baseName": "Software", + "type": "string" + }, + { + "name": "exposureTime", + "baseName": "ExposureTime", + "type": "number" + }, + { + "name": "focalLength", + "baseName": "FocalLength", + "type": "number" + }, + { + "name": "imageOrientation", + "baseName": "ImageOrientation", + "type": "ImageOrientation" + }, + { + "name": "aperture", + "baseName": "Aperture", + "type": "number" + }, + { + "name": "shutterSpeed", + "baseName": "ShutterSpeed", + "type": "number" + }, + { + "name": "latitude", + "baseName": "Latitude", + "type": "number" + }, + { + "name": "longitude", + "baseName": "Longitude", + "type": "number" + }, + { + "name": "altitude", + "baseName": "Altitude", + "type": "number" + }, + { + "name": "isoSpeedRating", + "baseName": "IsoSpeedRating", + "type": "number" + }, + { + "name": "seriesTimerId", + "baseName": "SeriesTimerId", + "type": "string" + }, + { + "name": "programId", + "baseName": "ProgramId", + "type": "string" + }, + { + "name": "channelPrimaryImageTag", + "baseName": "ChannelPrimaryImageTag", + "type": "string" + }, + { + "name": "startDate", + "baseName": "StartDate", + "type": "Date" + }, + { + "name": "completionPercentage", + "baseName": "CompletionPercentage", + "type": "number" + }, + { + "name": "isRepeat", + "baseName": "IsRepeat", + "type": "boolean" + }, + { + "name": "episodeTitle", + "baseName": "EpisodeTitle", + "type": "string" + }, + { + "name": "channelType", + "baseName": "ChannelType", + "type": "ChannelType" + }, + { + "name": "audio", + "baseName": "Audio", + "type": "ProgramAudio" + }, + { + "name": "isMovie", + "baseName": "IsMovie", + "type": "boolean" + }, + { + "name": "isSports", + "baseName": "IsSports", + "type": "boolean" + }, + { + "name": "isSeries", + "baseName": "IsSeries", + "type": "boolean" + }, + { + "name": "isLive", + "baseName": "IsLive", + "type": "boolean" + }, + { + "name": "isNews", + "baseName": "IsNews", + "type": "boolean" + }, + { + "name": "isKids", + "baseName": "IsKids", + "type": "boolean" + }, + { + "name": "isPremiere", + "baseName": "IsPremiere", + "type": "boolean" + }, + { + "name": "timerId", + "baseName": "TimerId", + "type": "string" + }, + { + "name": "currentProgram", + "baseName": "CurrentProgram", + "type": "BaseItemDtoCurrentProgram" + } ]; + + static getAttributeTypeMap() { + return SessionInfoNowPlayingItem.attributeTypeMap; + } +} + +export namespace SessionInfoNowPlayingItem { +} diff --git a/jellyfin/model/sessionMessageType.ts b/jellyfin/model/sessionMessageType.ts new file mode 100644 index 0000000..1bf6f26 --- /dev/null +++ b/jellyfin/model/sessionMessageType.ts @@ -0,0 +1,53 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* The different kinds of messages that are used in the WebSocket api. +*/ +export enum SessionMessageType { + ForceKeepAlive = 'ForceKeepAlive', + GeneralCommand = 'GeneralCommand', + UserDataChanged = 'UserDataChanged', + Sessions = 'Sessions', + Play = 'Play', + SyncPlayCommand = 'SyncPlayCommand', + SyncPlayGroupUpdate = 'SyncPlayGroupUpdate', + Playstate = 'Playstate', + RestartRequired = 'RestartRequired', + ServerShuttingDown = 'ServerShuttingDown', + ServerRestarting = 'ServerRestarting', + LibraryChanged = 'LibraryChanged', + UserDeleted = 'UserDeleted', + UserUpdated = 'UserUpdated', + SeriesTimerCreated = 'SeriesTimerCreated', + TimerCreated = 'TimerCreated', + SeriesTimerCancelled = 'SeriesTimerCancelled', + TimerCancelled = 'TimerCancelled', + RefreshProgress = 'RefreshProgress', + ScheduledTaskEnded = 'ScheduledTaskEnded', + PackageInstallationCancelled = 'PackageInstallationCancelled', + PackageInstallationFailed = 'PackageInstallationFailed', + PackageInstallationCompleted = 'PackageInstallationCompleted', + PackageInstalling = 'PackageInstalling', + PackageUninstalled = 'PackageUninstalled', + ActivityLogEntry = 'ActivityLogEntry', + ScheduledTasksInfo = 'ScheduledTasksInfo', + ActivityLogEntryStart = 'ActivityLogEntryStart', + ActivityLogEntryStop = 'ActivityLogEntryStop', + SessionsStart = 'SessionsStart', + SessionsStop = 'SessionsStop', + ScheduledTasksInfoStart = 'ScheduledTasksInfoStart', + ScheduledTasksInfoStop = 'ScheduledTasksInfoStop', + KeepAlive = 'KeepAlive' +} diff --git a/jellyfin/model/sessionUserInfo.ts b/jellyfin/model/sessionUserInfo.ts new file mode 100644 index 0000000..87cf5b0 --- /dev/null +++ b/jellyfin/model/sessionUserInfo.ts @@ -0,0 +1,46 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Class SessionUserInfo. +*/ +export class SessionUserInfo { + /** + * Gets or sets the user identifier. + */ + 'userId'?: string; + /** + * Gets or sets the name of the user. + */ + 'userName'?: string | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "userId", + "baseName": "UserId", + "type": "string" + }, + { + "name": "userName", + "baseName": "UserName", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return SessionUserInfo.attributeTypeMap; + } +} + diff --git a/jellyfin/model/setChannelMappingDto.ts b/jellyfin/model/setChannelMappingDto.ts new file mode 100644 index 0000000..a9562c3 --- /dev/null +++ b/jellyfin/model/setChannelMappingDto.ts @@ -0,0 +1,55 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Set channel mapping dto. +*/ +export class SetChannelMappingDto { + /** + * Gets or sets the provider id. + */ + 'providerId': string; + /** + * Gets or sets the tuner channel id. + */ + 'tunerChannelId': string; + /** + * Gets or sets the provider channel id. + */ + 'providerChannelId': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "providerId", + "baseName": "ProviderId", + "type": "string" + }, + { + "name": "tunerChannelId", + "baseName": "TunerChannelId", + "type": "string" + }, + { + "name": "providerChannelId", + "baseName": "ProviderChannelId", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return SetChannelMappingDto.attributeTypeMap; + } +} + diff --git a/jellyfin/model/setChannelMappingRequest.ts b/jellyfin/model/setChannelMappingRequest.ts new file mode 100644 index 0000000..d109fa5 --- /dev/null +++ b/jellyfin/model/setChannelMappingRequest.ts @@ -0,0 +1,55 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Set channel mapping dto. +*/ +export class SetChannelMappingRequest { + /** + * Gets or sets the provider id. + */ + 'providerId': string; + /** + * Gets or sets the tuner channel id. + */ + 'tunerChannelId': string; + /** + * Gets or sets the provider channel id. + */ + 'providerChannelId': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "providerId", + "baseName": "ProviderId", + "type": "string" + }, + { + "name": "tunerChannelId", + "baseName": "TunerChannelId", + "type": "string" + }, + { + "name": "providerChannelId", + "baseName": "ProviderChannelId", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return SetChannelMappingRequest.attributeTypeMap; + } +} + diff --git a/jellyfin/model/setPlaylistItemRequestDto.ts b/jellyfin/model/setPlaylistItemRequestDto.ts new file mode 100644 index 0000000..1aa16b2 --- /dev/null +++ b/jellyfin/model/setPlaylistItemRequestDto.ts @@ -0,0 +1,37 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Class SetPlaylistItemRequestDto. +*/ +export class SetPlaylistItemRequestDto { + /** + * Gets or sets the playlist identifier of the playing item. + */ + 'playlistItemId'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "playlistItemId", + "baseName": "PlaylistItemId", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return SetPlaylistItemRequestDto.attributeTypeMap; + } +} + diff --git a/jellyfin/model/setRemoteAccessRequest.ts b/jellyfin/model/setRemoteAccessRequest.ts new file mode 100644 index 0000000..0da5e31 --- /dev/null +++ b/jellyfin/model/setRemoteAccessRequest.ts @@ -0,0 +1,46 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Startup remote access dto. +*/ +export class SetRemoteAccessRequest { + /** + * Gets or sets a value indicating whether enable remote access. + */ + 'enableRemoteAccess': boolean; + /** + * Gets or sets a value indicating whether enable automatic port mapping. + */ + 'enableAutomaticPortMapping': boolean; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "enableRemoteAccess", + "baseName": "EnableRemoteAccess", + "type": "boolean" + }, + { + "name": "enableAutomaticPortMapping", + "baseName": "EnableAutomaticPortMapping", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return SetRemoteAccessRequest.attributeTypeMap; + } +} + diff --git a/jellyfin/model/setRepeatModeRequestDto.ts b/jellyfin/model/setRepeatModeRequestDto.ts new file mode 100644 index 0000000..b0f274a --- /dev/null +++ b/jellyfin/model/setRepeatModeRequestDto.ts @@ -0,0 +1,37 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { GroupRepeatMode } from './groupRepeatMode'; + +/** +* Class SetRepeatModeRequestDto. +*/ +export class SetRepeatModeRequestDto { + 'mode'?: GroupRepeatMode; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "mode", + "baseName": "Mode", + "type": "GroupRepeatMode" + } ]; + + static getAttributeTypeMap() { + return SetRepeatModeRequestDto.attributeTypeMap; + } +} + +export namespace SetRepeatModeRequestDto { +} diff --git a/jellyfin/model/setShuffleModeRequestDto.ts b/jellyfin/model/setShuffleModeRequestDto.ts new file mode 100644 index 0000000..0718c79 --- /dev/null +++ b/jellyfin/model/setShuffleModeRequestDto.ts @@ -0,0 +1,37 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { GroupShuffleMode } from './groupShuffleMode'; + +/** +* Class SetShuffleModeRequestDto. +*/ +export class SetShuffleModeRequestDto { + 'mode'?: GroupShuffleMode; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "mode", + "baseName": "Mode", + "type": "GroupShuffleMode" + } ]; + + static getAttributeTypeMap() { + return SetShuffleModeRequestDto.attributeTypeMap; + } +} + +export namespace SetShuffleModeRequestDto { +} diff --git a/jellyfin/model/songInfo.ts b/jellyfin/model/songInfo.ts new file mode 100644 index 0000000..ff4a763 --- /dev/null +++ b/jellyfin/model/songInfo.ts @@ -0,0 +1,130 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class SongInfo { + /** + * Gets or sets the name. + */ + 'name'?: string | null; + /** + * Gets or sets the original title. + */ + 'originalTitle'?: string | null; + /** + * Gets or sets the path. + */ + 'path'?: string | null; + /** + * Gets or sets the metadata language. + */ + 'metadataLanguage'?: string | null; + /** + * Gets or sets the metadata country code. + */ + 'metadataCountryCode'?: string | null; + /** + * Gets or sets the provider ids. + */ + 'providerIds'?: { [key: string]: string; } | null; + /** + * Gets or sets the year. + */ + 'year'?: number | null; + 'indexNumber'?: number | null; + 'parentIndexNumber'?: number | null; + 'premiereDate'?: Date | null; + 'isAutomated'?: boolean; + 'albumArtists'?: Array | null; + 'album'?: string | null; + 'artists'?: Array | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "Name", + "type": "string" + }, + { + "name": "originalTitle", + "baseName": "OriginalTitle", + "type": "string" + }, + { + "name": "path", + "baseName": "Path", + "type": "string" + }, + { + "name": "metadataLanguage", + "baseName": "MetadataLanguage", + "type": "string" + }, + { + "name": "metadataCountryCode", + "baseName": "MetadataCountryCode", + "type": "string" + }, + { + "name": "providerIds", + "baseName": "ProviderIds", + "type": "{ [key: string]: string; }" + }, + { + "name": "year", + "baseName": "Year", + "type": "number" + }, + { + "name": "indexNumber", + "baseName": "IndexNumber", + "type": "number" + }, + { + "name": "parentIndexNumber", + "baseName": "ParentIndexNumber", + "type": "number" + }, + { + "name": "premiereDate", + "baseName": "PremiereDate", + "type": "Date" + }, + { + "name": "isAutomated", + "baseName": "IsAutomated", + "type": "boolean" + }, + { + "name": "albumArtists", + "baseName": "AlbumArtists", + "type": "Array" + }, + { + "name": "album", + "baseName": "Album", + "type": "string" + }, + { + "name": "artists", + "baseName": "Artists", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return SongInfo.attributeTypeMap; + } +} + diff --git a/jellyfin/model/sortOrder.ts b/jellyfin/model/sortOrder.ts new file mode 100644 index 0000000..20addc9 --- /dev/null +++ b/jellyfin/model/sortOrder.ts @@ -0,0 +1,21 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* An enum representing the sorting order. +*/ +export enum SortOrder { + Ascending = 'Ascending', + Descending = 'Descending' +} diff --git a/jellyfin/model/specialViewOptionDto.ts b/jellyfin/model/specialViewOptionDto.ts new file mode 100644 index 0000000..05b422c --- /dev/null +++ b/jellyfin/model/specialViewOptionDto.ts @@ -0,0 +1,46 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Special view option dto. +*/ +export class SpecialViewOptionDto { + /** + * Gets or sets view option name. + */ + 'name'?: string | null; + /** + * Gets or sets view option id. + */ + 'id'?: string | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "Name", + "type": "string" + }, + { + "name": "id", + "baseName": "Id", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return SpecialViewOptionDto.attributeTypeMap; + } +} + diff --git a/jellyfin/model/startupConfigurationDto.ts b/jellyfin/model/startupConfigurationDto.ts new file mode 100644 index 0000000..969cafa --- /dev/null +++ b/jellyfin/model/startupConfigurationDto.ts @@ -0,0 +1,55 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* The startup configuration DTO. +*/ +export class StartupConfigurationDto { + /** + * Gets or sets UI language culture. + */ + 'uICulture'?: string | null; + /** + * Gets or sets the metadata country code. + */ + 'metadataCountryCode'?: string | null; + /** + * Gets or sets the preferred language for the metadata. + */ + 'preferredMetadataLanguage'?: string | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "uICulture", + "baseName": "UICulture", + "type": "string" + }, + { + "name": "metadataCountryCode", + "baseName": "MetadataCountryCode", + "type": "string" + }, + { + "name": "preferredMetadataLanguage", + "baseName": "PreferredMetadataLanguage", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return StartupConfigurationDto.attributeTypeMap; + } +} + diff --git a/jellyfin/model/startupRemoteAccessDto.ts b/jellyfin/model/startupRemoteAccessDto.ts new file mode 100644 index 0000000..3e77067 --- /dev/null +++ b/jellyfin/model/startupRemoteAccessDto.ts @@ -0,0 +1,46 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Startup remote access dto. +*/ +export class StartupRemoteAccessDto { + /** + * Gets or sets a value indicating whether enable remote access. + */ + 'enableRemoteAccess': boolean; + /** + * Gets or sets a value indicating whether enable automatic port mapping. + */ + 'enableAutomaticPortMapping': boolean; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "enableRemoteAccess", + "baseName": "EnableRemoteAccess", + "type": "boolean" + }, + { + "name": "enableAutomaticPortMapping", + "baseName": "EnableAutomaticPortMapping", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return StartupRemoteAccessDto.attributeTypeMap; + } +} + diff --git a/jellyfin/model/startupUserDto.ts b/jellyfin/model/startupUserDto.ts new file mode 100644 index 0000000..373970c --- /dev/null +++ b/jellyfin/model/startupUserDto.ts @@ -0,0 +1,46 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* The startup user DTO. +*/ +export class StartupUserDto { + /** + * Gets or sets the username. + */ + 'name'?: string | null; + /** + * Gets or sets the user\'s password. + */ + 'password'?: string | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "Name", + "type": "string" + }, + { + "name": "password", + "baseName": "Password", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return StartupUserDto.attributeTypeMap; + } +} + diff --git a/jellyfin/model/subtitleDeliveryMethod.ts b/jellyfin/model/subtitleDeliveryMethod.ts new file mode 100644 index 0000000..a0bbec1 --- /dev/null +++ b/jellyfin/model/subtitleDeliveryMethod.ts @@ -0,0 +1,24 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Delivery method to use during playback of a specific subtitle format. +*/ +export enum SubtitleDeliveryMethod { + Encode = 'Encode', + Embed = 'Embed', + External = 'External', + Hls = 'Hls', + Drop = 'Drop' +} diff --git a/jellyfin/model/subtitleOptions.ts b/jellyfin/model/subtitleOptions.ts new file mode 100644 index 0000000..40843cc --- /dev/null +++ b/jellyfin/model/subtitleOptions.ts @@ -0,0 +1,79 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class SubtitleOptions { + 'skipIfEmbeddedSubtitlesPresent'?: boolean; + 'skipIfAudioTrackMatches'?: boolean; + 'downloadLanguages'?: Array | null; + 'downloadMovieSubtitles'?: boolean; + 'downloadEpisodeSubtitles'?: boolean; + 'openSubtitlesUsername'?: string | null; + 'openSubtitlesPasswordHash'?: string | null; + 'isOpenSubtitleVipAccount'?: boolean; + 'requirePerfectMatch'?: boolean; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "skipIfEmbeddedSubtitlesPresent", + "baseName": "SkipIfEmbeddedSubtitlesPresent", + "type": "boolean" + }, + { + "name": "skipIfAudioTrackMatches", + "baseName": "SkipIfAudioTrackMatches", + "type": "boolean" + }, + { + "name": "downloadLanguages", + "baseName": "DownloadLanguages", + "type": "Array" + }, + { + "name": "downloadMovieSubtitles", + "baseName": "DownloadMovieSubtitles", + "type": "boolean" + }, + { + "name": "downloadEpisodeSubtitles", + "baseName": "DownloadEpisodeSubtitles", + "type": "boolean" + }, + { + "name": "openSubtitlesUsername", + "baseName": "OpenSubtitlesUsername", + "type": "string" + }, + { + "name": "openSubtitlesPasswordHash", + "baseName": "OpenSubtitlesPasswordHash", + "type": "string" + }, + { + "name": "isOpenSubtitleVipAccount", + "baseName": "IsOpenSubtitleVipAccount", + "type": "boolean" + }, + { + "name": "requirePerfectMatch", + "baseName": "RequirePerfectMatch", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return SubtitleOptions.attributeTypeMap; + } +} + diff --git a/jellyfin/model/subtitlePlaybackMode.ts b/jellyfin/model/subtitlePlaybackMode.ts new file mode 100644 index 0000000..cec0f3d --- /dev/null +++ b/jellyfin/model/subtitlePlaybackMode.ts @@ -0,0 +1,24 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* An enum representing a subtitle playback mode. +*/ +export enum SubtitlePlaybackMode { + Default = 'Default', + Always = 'Always', + OnlyForced = 'OnlyForced', + None = 'None', + Smart = 'Smart' +} diff --git a/jellyfin/model/subtitleProfile.ts b/jellyfin/model/subtitleProfile.ts new file mode 100644 index 0000000..f8353e9 --- /dev/null +++ b/jellyfin/model/subtitleProfile.ts @@ -0,0 +1,58 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { SubtitleDeliveryMethod } from './subtitleDeliveryMethod'; + +export class SubtitleProfile { + 'format'?: string | null; + 'method'?: SubtitleDeliveryMethod; + 'didlMode'?: string | null; + 'language'?: string | null; + 'container'?: string | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "format", + "baseName": "Format", + "type": "string" + }, + { + "name": "method", + "baseName": "Method", + "type": "SubtitleDeliveryMethod" + }, + { + "name": "didlMode", + "baseName": "DidlMode", + "type": "string" + }, + { + "name": "language", + "baseName": "Language", + "type": "string" + }, + { + "name": "container", + "baseName": "Container", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return SubtitleProfile.attributeTypeMap; + } +} + +export namespace SubtitleProfile { +} diff --git a/jellyfin/model/syncPlayBufferingRequest.ts b/jellyfin/model/syncPlayBufferingRequest.ts new file mode 100644 index 0000000..778b3e2 --- /dev/null +++ b/jellyfin/model/syncPlayBufferingRequest.ts @@ -0,0 +1,64 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Class BufferRequestDto. +*/ +export class SyncPlayBufferingRequest { + /** + * Gets or sets when the request has been made by the client. + */ + 'when'?: Date; + /** + * Gets or sets the position ticks. + */ + 'positionTicks'?: number; + /** + * Gets or sets a value indicating whether the client playback is unpaused. + */ + 'isPlaying'?: boolean; + /** + * Gets or sets the playlist item identifier of the playing item. + */ + 'playlistItemId'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "when", + "baseName": "When", + "type": "Date" + }, + { + "name": "positionTicks", + "baseName": "PositionTicks", + "type": "number" + }, + { + "name": "isPlaying", + "baseName": "IsPlaying", + "type": "boolean" + }, + { + "name": "playlistItemId", + "baseName": "PlaylistItemId", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return SyncPlayBufferingRequest.attributeTypeMap; + } +} + diff --git a/jellyfin/model/syncPlayCreateGroupRequest.ts b/jellyfin/model/syncPlayCreateGroupRequest.ts new file mode 100644 index 0000000..c4892d3 --- /dev/null +++ b/jellyfin/model/syncPlayCreateGroupRequest.ts @@ -0,0 +1,37 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Class NewGroupRequestDto. +*/ +export class SyncPlayCreateGroupRequest { + /** + * Gets or sets the group name. + */ + 'groupName'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "groupName", + "baseName": "GroupName", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return SyncPlayCreateGroupRequest.attributeTypeMap; + } +} + diff --git a/jellyfin/model/syncPlayJoinGroupRequest.ts b/jellyfin/model/syncPlayJoinGroupRequest.ts new file mode 100644 index 0000000..b50596d --- /dev/null +++ b/jellyfin/model/syncPlayJoinGroupRequest.ts @@ -0,0 +1,37 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Class JoinGroupRequestDto. +*/ +export class SyncPlayJoinGroupRequest { + /** + * Gets or sets the group identifier. + */ + 'groupId'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "groupId", + "baseName": "GroupId", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return SyncPlayJoinGroupRequest.attributeTypeMap; + } +} + diff --git a/jellyfin/model/syncPlayMovePlaylistItemRequest.ts b/jellyfin/model/syncPlayMovePlaylistItemRequest.ts new file mode 100644 index 0000000..0abe46d --- /dev/null +++ b/jellyfin/model/syncPlayMovePlaylistItemRequest.ts @@ -0,0 +1,46 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Class MovePlaylistItemRequestDto. +*/ +export class SyncPlayMovePlaylistItemRequest { + /** + * Gets or sets the playlist identifier of the item. + */ + 'playlistItemId'?: string; + /** + * Gets or sets the new position. + */ + 'newIndex'?: number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "playlistItemId", + "baseName": "PlaylistItemId", + "type": "string" + }, + { + "name": "newIndex", + "baseName": "NewIndex", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return SyncPlayMovePlaylistItemRequest.attributeTypeMap; + } +} + diff --git a/jellyfin/model/syncPlayNextItemRequest.ts b/jellyfin/model/syncPlayNextItemRequest.ts new file mode 100644 index 0000000..abd1aaa --- /dev/null +++ b/jellyfin/model/syncPlayNextItemRequest.ts @@ -0,0 +1,37 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Class NextItemRequestDto. +*/ +export class SyncPlayNextItemRequest { + /** + * Gets or sets the playing item identifier. + */ + 'playlistItemId'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "playlistItemId", + "baseName": "PlaylistItemId", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return SyncPlayNextItemRequest.attributeTypeMap; + } +} + diff --git a/jellyfin/model/syncPlayPingRequest.ts b/jellyfin/model/syncPlayPingRequest.ts new file mode 100644 index 0000000..ea82688 --- /dev/null +++ b/jellyfin/model/syncPlayPingRequest.ts @@ -0,0 +1,37 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Class PingRequestDto. +*/ +export class SyncPlayPingRequest { + /** + * Gets or sets the ping time. + */ + 'ping'?: number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "ping", + "baseName": "Ping", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return SyncPlayPingRequest.attributeTypeMap; + } +} + diff --git a/jellyfin/model/syncPlayPreviousItemRequest.ts b/jellyfin/model/syncPlayPreviousItemRequest.ts new file mode 100644 index 0000000..9e0e574 --- /dev/null +++ b/jellyfin/model/syncPlayPreviousItemRequest.ts @@ -0,0 +1,37 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Class PreviousItemRequestDto. +*/ +export class SyncPlayPreviousItemRequest { + /** + * Gets or sets the playing item identifier. + */ + 'playlistItemId'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "playlistItemId", + "baseName": "PlaylistItemId", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return SyncPlayPreviousItemRequest.attributeTypeMap; + } +} + diff --git a/jellyfin/model/syncPlayQueueRequest.ts b/jellyfin/model/syncPlayQueueRequest.ts new file mode 100644 index 0000000..ccac489 --- /dev/null +++ b/jellyfin/model/syncPlayQueueRequest.ts @@ -0,0 +1,46 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { GroupQueueMode } from './groupQueueMode'; + +/** +* Class QueueRequestDto. +*/ +export class SyncPlayQueueRequest { + /** + * Gets or sets the items to enqueue. + */ + 'itemIds'?: Array; + 'mode'?: GroupQueueMode; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "itemIds", + "baseName": "ItemIds", + "type": "Array" + }, + { + "name": "mode", + "baseName": "Mode", + "type": "GroupQueueMode" + } ]; + + static getAttributeTypeMap() { + return SyncPlayQueueRequest.attributeTypeMap; + } +} + +export namespace SyncPlayQueueRequest { +} diff --git a/jellyfin/model/syncPlayReadyRequest.ts b/jellyfin/model/syncPlayReadyRequest.ts new file mode 100644 index 0000000..e500d8d --- /dev/null +++ b/jellyfin/model/syncPlayReadyRequest.ts @@ -0,0 +1,64 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Class ReadyRequest. +*/ +export class SyncPlayReadyRequest { + /** + * Gets or sets when the request has been made by the client. + */ + 'when'?: Date; + /** + * Gets or sets the position ticks. + */ + 'positionTicks'?: number; + /** + * Gets or sets a value indicating whether the client playback is unpaused. + */ + 'isPlaying'?: boolean; + /** + * Gets or sets the playlist item identifier of the playing item. + */ + 'playlistItemId'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "when", + "baseName": "When", + "type": "Date" + }, + { + "name": "positionTicks", + "baseName": "PositionTicks", + "type": "number" + }, + { + "name": "isPlaying", + "baseName": "IsPlaying", + "type": "boolean" + }, + { + "name": "playlistItemId", + "baseName": "PlaylistItemId", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return SyncPlayReadyRequest.attributeTypeMap; + } +} + diff --git a/jellyfin/model/syncPlayRemoveFromPlaylistRequest.ts b/jellyfin/model/syncPlayRemoveFromPlaylistRequest.ts new file mode 100644 index 0000000..1e66d3b --- /dev/null +++ b/jellyfin/model/syncPlayRemoveFromPlaylistRequest.ts @@ -0,0 +1,55 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Class RemoveFromPlaylistRequestDto. +*/ +export class SyncPlayRemoveFromPlaylistRequest { + /** + * Gets or sets the playlist identifiers ot the items. Ignored when clearing the playlist. + */ + 'playlistItemIds'?: Array; + /** + * Gets or sets a value indicating whether the entire playlist should be cleared. + */ + 'clearPlaylist'?: boolean; + /** + * Gets or sets a value indicating whether the playing item should be removed as well. Used only when clearing the playlist. + */ + 'clearPlayingItem'?: boolean; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "playlistItemIds", + "baseName": "PlaylistItemIds", + "type": "Array" + }, + { + "name": "clearPlaylist", + "baseName": "ClearPlaylist", + "type": "boolean" + }, + { + "name": "clearPlayingItem", + "baseName": "ClearPlayingItem", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return SyncPlayRemoveFromPlaylistRequest.attributeTypeMap; + } +} + diff --git a/jellyfin/model/syncPlaySeekRequest.ts b/jellyfin/model/syncPlaySeekRequest.ts new file mode 100644 index 0000000..baa970b --- /dev/null +++ b/jellyfin/model/syncPlaySeekRequest.ts @@ -0,0 +1,37 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Class SeekRequestDto. +*/ +export class SyncPlaySeekRequest { + /** + * Gets or sets the position ticks. + */ + 'positionTicks'?: number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "positionTicks", + "baseName": "PositionTicks", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return SyncPlaySeekRequest.attributeTypeMap; + } +} + diff --git a/jellyfin/model/syncPlaySetIgnoreWaitRequest.ts b/jellyfin/model/syncPlaySetIgnoreWaitRequest.ts new file mode 100644 index 0000000..b305c26 --- /dev/null +++ b/jellyfin/model/syncPlaySetIgnoreWaitRequest.ts @@ -0,0 +1,37 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Class IgnoreWaitRequestDto. +*/ +export class SyncPlaySetIgnoreWaitRequest { + /** + * Gets or sets a value indicating whether the client should be ignored. + */ + 'ignoreWait'?: boolean; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "ignoreWait", + "baseName": "IgnoreWait", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return SyncPlaySetIgnoreWaitRequest.attributeTypeMap; + } +} + diff --git a/jellyfin/model/syncPlaySetNewQueueRequest.ts b/jellyfin/model/syncPlaySetNewQueueRequest.ts new file mode 100644 index 0000000..80021d1 --- /dev/null +++ b/jellyfin/model/syncPlaySetNewQueueRequest.ts @@ -0,0 +1,55 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Class PlayRequestDto. +*/ +export class SyncPlaySetNewQueueRequest { + /** + * Gets or sets the playing queue. + */ + 'playingQueue'?: Array; + /** + * Gets or sets the position of the playing item in the queue. + */ + 'playingItemPosition'?: number; + /** + * Gets or sets the start position ticks. + */ + 'startPositionTicks'?: number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "playingQueue", + "baseName": "PlayingQueue", + "type": "Array" + }, + { + "name": "playingItemPosition", + "baseName": "PlayingItemPosition", + "type": "number" + }, + { + "name": "startPositionTicks", + "baseName": "StartPositionTicks", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return SyncPlaySetNewQueueRequest.attributeTypeMap; + } +} + diff --git a/jellyfin/model/syncPlaySetPlaylistItemRequest.ts b/jellyfin/model/syncPlaySetPlaylistItemRequest.ts new file mode 100644 index 0000000..9fb8a7e --- /dev/null +++ b/jellyfin/model/syncPlaySetPlaylistItemRequest.ts @@ -0,0 +1,37 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Class SetPlaylistItemRequestDto. +*/ +export class SyncPlaySetPlaylistItemRequest { + /** + * Gets or sets the playlist identifier of the playing item. + */ + 'playlistItemId'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "playlistItemId", + "baseName": "PlaylistItemId", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return SyncPlaySetPlaylistItemRequest.attributeTypeMap; + } +} + diff --git a/jellyfin/model/syncPlaySetRepeatModeRequest.ts b/jellyfin/model/syncPlaySetRepeatModeRequest.ts new file mode 100644 index 0000000..6581c8b --- /dev/null +++ b/jellyfin/model/syncPlaySetRepeatModeRequest.ts @@ -0,0 +1,37 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { GroupRepeatMode } from './groupRepeatMode'; + +/** +* Class SetRepeatModeRequestDto. +*/ +export class SyncPlaySetRepeatModeRequest { + 'mode'?: GroupRepeatMode; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "mode", + "baseName": "Mode", + "type": "GroupRepeatMode" + } ]; + + static getAttributeTypeMap() { + return SyncPlaySetRepeatModeRequest.attributeTypeMap; + } +} + +export namespace SyncPlaySetRepeatModeRequest { +} diff --git a/jellyfin/model/syncPlaySetShuffleModeRequest.ts b/jellyfin/model/syncPlaySetShuffleModeRequest.ts new file mode 100644 index 0000000..f0e98e9 --- /dev/null +++ b/jellyfin/model/syncPlaySetShuffleModeRequest.ts @@ -0,0 +1,37 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { GroupShuffleMode } from './groupShuffleMode'; + +/** +* Class SetShuffleModeRequestDto. +*/ +export class SyncPlaySetShuffleModeRequest { + 'mode'?: GroupShuffleMode; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "mode", + "baseName": "Mode", + "type": "GroupShuffleMode" + } ]; + + static getAttributeTypeMap() { + return SyncPlaySetShuffleModeRequest.attributeTypeMap; + } +} + +export namespace SyncPlaySetShuffleModeRequest { +} diff --git a/jellyfin/model/syncPlayUserAccessType.ts b/jellyfin/model/syncPlayUserAccessType.ts new file mode 100644 index 0000000..0e95c21 --- /dev/null +++ b/jellyfin/model/syncPlayUserAccessType.ts @@ -0,0 +1,22 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Enum SyncPlayUserAccessType. +*/ +export enum SyncPlayUserAccessType { + CreateAndJoinGroups = 'CreateAndJoinGroups', + JoinGroups = 'JoinGroups', + None = 'None' +} diff --git a/jellyfin/model/systemInfo.ts b/jellyfin/model/systemInfo.ts new file mode 100644 index 0000000..dc6d3cf --- /dev/null +++ b/jellyfin/model/systemInfo.ts @@ -0,0 +1,255 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { Architecture } from './architecture'; +import { FFmpegLocation } from './fFmpegLocation'; +import { InstallationInfo } from './installationInfo'; + +/** +* Class SystemInfo. +*/ +export class SystemInfo { + /** + * Gets or sets the local address. + */ + 'localAddress'?: string | null; + /** + * Gets or sets the name of the server. + */ + 'serverName'?: string | null; + /** + * Gets or sets the server version. + */ + 'version'?: string | null; + /** + * Gets or sets the product name. This is the AssemblyProduct name. + */ + 'productName'?: string | null; + /** + * Gets or sets the operating system. + */ + 'operatingSystem'?: string | null; + /** + * Gets or sets the id. + */ + 'id'?: string | null; + /** + * Gets or sets a value indicating whether the startup wizard is completed. + */ + 'startupWizardCompleted'?: boolean | null; + /** + * Gets or sets the display name of the operating system. + */ + 'operatingSystemDisplayName'?: string | null; + /** + * Gets or sets the package name. + */ + 'packageName'?: string | null; + /** + * Gets or sets a value indicating whether this instance has pending restart. + */ + 'hasPendingRestart'?: boolean; + 'isShuttingDown'?: boolean; + /** + * Gets or sets a value indicating whether [supports library monitor]. + */ + 'supportsLibraryMonitor'?: boolean; + /** + * Gets or sets the web socket port number. + */ + 'webSocketPortNumber'?: number; + /** + * Gets or sets the completed installations. + */ + 'completedInstallations'?: Array | null; + /** + * Gets or sets a value indicating whether this instance can self restart. + */ + 'canSelfRestart'?: boolean; + 'canLaunchWebBrowser'?: boolean; + /** + * Gets or sets the program data path. + */ + 'programDataPath'?: string | null; + /** + * Gets or sets the web UI resources path. + */ + 'webPath'?: string | null; + /** + * Gets or sets the items by name path. + */ + 'itemsByNamePath'?: string | null; + /** + * Gets or sets the cache path. + */ + 'cachePath'?: string | null; + /** + * Gets or sets the log path. + */ + 'logPath'?: string | null; + /** + * Gets or sets the internal metadata path. + */ + 'internalMetadataPath'?: string | null; + /** + * Gets or sets the transcode path. + */ + 'transcodingTempPath'?: string | null; + /** + * Gets or sets a value indicating whether this instance has update available. + */ + 'hasUpdateAvailable'?: boolean; + 'encoderLocation'?: FFmpegLocation; + 'systemArchitecture'?: Architecture; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "localAddress", + "baseName": "LocalAddress", + "type": "string" + }, + { + "name": "serverName", + "baseName": "ServerName", + "type": "string" + }, + { + "name": "version", + "baseName": "Version", + "type": "string" + }, + { + "name": "productName", + "baseName": "ProductName", + "type": "string" + }, + { + "name": "operatingSystem", + "baseName": "OperatingSystem", + "type": "string" + }, + { + "name": "id", + "baseName": "Id", + "type": "string" + }, + { + "name": "startupWizardCompleted", + "baseName": "StartupWizardCompleted", + "type": "boolean" + }, + { + "name": "operatingSystemDisplayName", + "baseName": "OperatingSystemDisplayName", + "type": "string" + }, + { + "name": "packageName", + "baseName": "PackageName", + "type": "string" + }, + { + "name": "hasPendingRestart", + "baseName": "HasPendingRestart", + "type": "boolean" + }, + { + "name": "isShuttingDown", + "baseName": "IsShuttingDown", + "type": "boolean" + }, + { + "name": "supportsLibraryMonitor", + "baseName": "SupportsLibraryMonitor", + "type": "boolean" + }, + { + "name": "webSocketPortNumber", + "baseName": "WebSocketPortNumber", + "type": "number" + }, + { + "name": "completedInstallations", + "baseName": "CompletedInstallations", + "type": "Array" + }, + { + "name": "canSelfRestart", + "baseName": "CanSelfRestart", + "type": "boolean" + }, + { + "name": "canLaunchWebBrowser", + "baseName": "CanLaunchWebBrowser", + "type": "boolean" + }, + { + "name": "programDataPath", + "baseName": "ProgramDataPath", + "type": "string" + }, + { + "name": "webPath", + "baseName": "WebPath", + "type": "string" + }, + { + "name": "itemsByNamePath", + "baseName": "ItemsByNamePath", + "type": "string" + }, + { + "name": "cachePath", + "baseName": "CachePath", + "type": "string" + }, + { + "name": "logPath", + "baseName": "LogPath", + "type": "string" + }, + { + "name": "internalMetadataPath", + "baseName": "InternalMetadataPath", + "type": "string" + }, + { + "name": "transcodingTempPath", + "baseName": "TranscodingTempPath", + "type": "string" + }, + { + "name": "hasUpdateAvailable", + "baseName": "HasUpdateAvailable", + "type": "boolean" + }, + { + "name": "encoderLocation", + "baseName": "EncoderLocation", + "type": "FFmpegLocation" + }, + { + "name": "systemArchitecture", + "baseName": "SystemArchitecture", + "type": "Architecture" + } ]; + + static getAttributeTypeMap() { + return SystemInfo.attributeTypeMap; + } +} + +export namespace SystemInfo { +} diff --git a/jellyfin/model/taskCompletionStatus.ts b/jellyfin/model/taskCompletionStatus.ts new file mode 100644 index 0000000..6a468a8 --- /dev/null +++ b/jellyfin/model/taskCompletionStatus.ts @@ -0,0 +1,23 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Enum TaskCompletionStatus. +*/ +export enum TaskCompletionStatus { + Completed = 'Completed', + Failed = 'Failed', + Cancelled = 'Cancelled', + Aborted = 'Aborted' +} diff --git a/jellyfin/model/taskInfo.ts b/jellyfin/model/taskInfo.ts new file mode 100644 index 0000000..8151b47 --- /dev/null +++ b/jellyfin/model/taskInfo.ts @@ -0,0 +1,117 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { TaskInfoLastExecutionResult } from './taskInfoLastExecutionResult'; +import { TaskState } from './taskState'; +import { TaskTriggerInfo } from './taskTriggerInfo'; + +/** +* Class TaskInfo. +*/ +export class TaskInfo { + /** + * Gets or sets the name. + */ + 'name'?: string | null; + 'state'?: TaskState; + /** + * Gets or sets the progress. + */ + 'currentProgressPercentage'?: number | null; + /** + * Gets or sets the id. + */ + 'id'?: string | null; + 'lastExecutionResult'?: TaskInfoLastExecutionResult | null; + /** + * Gets or sets the triggers. + */ + 'triggers'?: Array | null; + /** + * Gets or sets the description. + */ + 'description'?: string | null; + /** + * Gets or sets the category. + */ + 'category'?: string | null; + /** + * Gets or sets a value indicating whether this instance is hidden. + */ + 'isHidden'?: boolean; + /** + * Gets or sets the key. + */ + 'key'?: string | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "Name", + "type": "string" + }, + { + "name": "state", + "baseName": "State", + "type": "TaskState" + }, + { + "name": "currentProgressPercentage", + "baseName": "CurrentProgressPercentage", + "type": "number" + }, + { + "name": "id", + "baseName": "Id", + "type": "string" + }, + { + "name": "lastExecutionResult", + "baseName": "LastExecutionResult", + "type": "TaskInfoLastExecutionResult" + }, + { + "name": "triggers", + "baseName": "Triggers", + "type": "Array" + }, + { + "name": "description", + "baseName": "Description", + "type": "string" + }, + { + "name": "category", + "baseName": "Category", + "type": "string" + }, + { + "name": "isHidden", + "baseName": "IsHidden", + "type": "boolean" + }, + { + "name": "key", + "baseName": "Key", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return TaskInfo.attributeTypeMap; + } +} + +export namespace TaskInfo { +} diff --git a/jellyfin/model/taskInfoLastExecutionResult.ts b/jellyfin/model/taskInfoLastExecutionResult.ts new file mode 100644 index 0000000..ab6363f --- /dev/null +++ b/jellyfin/model/taskInfoLastExecutionResult.ts @@ -0,0 +1,100 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { TaskCompletionStatus } from './taskCompletionStatus'; + +/** +* Gets or sets the last execution result. +*/ +export class TaskInfoLastExecutionResult { + /** + * Gets or sets the start time UTC. + */ + 'startTimeUtc'?: Date; + /** + * Gets or sets the end time UTC. + */ + 'endTimeUtc'?: Date; + 'status'?: TaskCompletionStatus; + /** + * Gets or sets the name. + */ + 'name'?: string | null; + /** + * Gets or sets the key. + */ + 'key'?: string | null; + /** + * Gets or sets the id. + */ + 'id'?: string | null; + /** + * Gets or sets the error message. + */ + 'errorMessage'?: string | null; + /** + * Gets or sets the long error message. + */ + 'longErrorMessage'?: string | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "startTimeUtc", + "baseName": "StartTimeUtc", + "type": "Date" + }, + { + "name": "endTimeUtc", + "baseName": "EndTimeUtc", + "type": "Date" + }, + { + "name": "status", + "baseName": "Status", + "type": "TaskCompletionStatus" + }, + { + "name": "name", + "baseName": "Name", + "type": "string" + }, + { + "name": "key", + "baseName": "Key", + "type": "string" + }, + { + "name": "id", + "baseName": "Id", + "type": "string" + }, + { + "name": "errorMessage", + "baseName": "ErrorMessage", + "type": "string" + }, + { + "name": "longErrorMessage", + "baseName": "LongErrorMessage", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return TaskInfoLastExecutionResult.attributeTypeMap; + } +} + +export namespace TaskInfoLastExecutionResult { +} diff --git a/jellyfin/model/taskResult.ts b/jellyfin/model/taskResult.ts new file mode 100644 index 0000000..b78adf8 --- /dev/null +++ b/jellyfin/model/taskResult.ts @@ -0,0 +1,100 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { TaskCompletionStatus } from './taskCompletionStatus'; + +/** +* Class TaskExecutionInfo. +*/ +export class TaskResult { + /** + * Gets or sets the start time UTC. + */ + 'startTimeUtc'?: Date; + /** + * Gets or sets the end time UTC. + */ + 'endTimeUtc'?: Date; + 'status'?: TaskCompletionStatus; + /** + * Gets or sets the name. + */ + 'name'?: string | null; + /** + * Gets or sets the key. + */ + 'key'?: string | null; + /** + * Gets or sets the id. + */ + 'id'?: string | null; + /** + * Gets or sets the error message. + */ + 'errorMessage'?: string | null; + /** + * Gets or sets the long error message. + */ + 'longErrorMessage'?: string | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "startTimeUtc", + "baseName": "StartTimeUtc", + "type": "Date" + }, + { + "name": "endTimeUtc", + "baseName": "EndTimeUtc", + "type": "Date" + }, + { + "name": "status", + "baseName": "Status", + "type": "TaskCompletionStatus" + }, + { + "name": "name", + "baseName": "Name", + "type": "string" + }, + { + "name": "key", + "baseName": "Key", + "type": "string" + }, + { + "name": "id", + "baseName": "Id", + "type": "string" + }, + { + "name": "errorMessage", + "baseName": "ErrorMessage", + "type": "string" + }, + { + "name": "longErrorMessage", + "baseName": "LongErrorMessage", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return TaskResult.attributeTypeMap; + } +} + +export namespace TaskResult { +} diff --git a/jellyfin/model/taskState.ts b/jellyfin/model/taskState.ts new file mode 100644 index 0000000..ee076e0 --- /dev/null +++ b/jellyfin/model/taskState.ts @@ -0,0 +1,22 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Enum TaskState. +*/ +export enum TaskState { + Idle = 'Idle', + Cancelling = 'Cancelling', + Running = 'Running' +} diff --git a/jellyfin/model/taskTriggerInfo.ts b/jellyfin/model/taskTriggerInfo.ts new file mode 100644 index 0000000..b904c25 --- /dev/null +++ b/jellyfin/model/taskTriggerInfo.ts @@ -0,0 +1,73 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { DayOfWeek } from './dayOfWeek'; + +/** +* Class TaskTriggerInfo. +*/ +export class TaskTriggerInfo { + /** + * Gets or sets the type. + */ + 'type'?: string | null; + /** + * Gets or sets the time of day. + */ + 'timeOfDayTicks'?: number | null; + /** + * Gets or sets the interval. + */ + 'intervalTicks'?: number | null; + 'dayOfWeek'?: DayOfWeek | null; + /** + * Gets or sets the maximum runtime ticks. + */ + 'maxRuntimeTicks'?: number | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "type", + "baseName": "Type", + "type": "string" + }, + { + "name": "timeOfDayTicks", + "baseName": "TimeOfDayTicks", + "type": "number" + }, + { + "name": "intervalTicks", + "baseName": "IntervalTicks", + "type": "number" + }, + { + "name": "dayOfWeek", + "baseName": "DayOfWeek", + "type": "DayOfWeek" + }, + { + "name": "maxRuntimeTicks", + "baseName": "MaxRuntimeTicks", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return TaskTriggerInfo.attributeTypeMap; + } +} + +export namespace TaskTriggerInfo { +} diff --git a/jellyfin/model/themeMediaResult.ts b/jellyfin/model/themeMediaResult.ts new file mode 100644 index 0000000..025a889 --- /dev/null +++ b/jellyfin/model/themeMediaResult.ts @@ -0,0 +1,65 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { BaseItemDto } from './baseItemDto'; + +/** +* Class ThemeMediaResult. +*/ +export class ThemeMediaResult { + /** + * Gets or sets the items. + */ + 'items'?: Array | null; + /** + * Gets or sets the total number of records available. + */ + 'totalRecordCount'?: number; + /** + * Gets or sets the index of the first record in Items. + */ + 'startIndex'?: number; + /** + * Gets or sets the owner id. + */ + 'ownerId'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "items", + "baseName": "Items", + "type": "Array" + }, + { + "name": "totalRecordCount", + "baseName": "TotalRecordCount", + "type": "number" + }, + { + "name": "startIndex", + "baseName": "StartIndex", + "type": "number" + }, + { + "name": "ownerId", + "baseName": "OwnerId", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return ThemeMediaResult.attributeTypeMap; + } +} + diff --git a/jellyfin/model/timerEventInfo.ts b/jellyfin/model/timerEventInfo.ts new file mode 100644 index 0000000..515b60b --- /dev/null +++ b/jellyfin/model/timerEventInfo.ts @@ -0,0 +1,37 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class TimerEventInfo { + 'id'?: string; + 'programId'?: string | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "id", + "baseName": "Id", + "type": "string" + }, + { + "name": "programId", + "baseName": "ProgramId", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return TimerEventInfo.attributeTypeMap; + } +} + diff --git a/jellyfin/model/timerInfoDto.ts b/jellyfin/model/timerInfoDto.ts new file mode 100644 index 0000000..ebd261f --- /dev/null +++ b/jellyfin/model/timerInfoDto.ts @@ -0,0 +1,267 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { KeepUntil } from './keepUntil'; +import { RecordingStatus } from './recordingStatus'; +import { TimerInfoDtoProgramInfo } from './timerInfoDtoProgramInfo'; + +export class TimerInfoDto { + /** + * Gets or sets the Id of the recording. + */ + 'id'?: string | null; + 'type'?: string | null; + /** + * Gets or sets the server identifier. + */ + 'serverId'?: string | null; + /** + * Gets or sets the external identifier. + */ + 'externalId'?: string | null; + /** + * Gets or sets the channel id of the recording. + */ + 'channelId'?: string; + /** + * Gets or sets the external channel identifier. + */ + 'externalChannelId'?: string | null; + /** + * Gets or sets the channel name of the recording. + */ + 'channelName'?: string | null; + 'channelPrimaryImageTag'?: string | null; + /** + * Gets or sets the program identifier. + */ + 'programId'?: string | null; + /** + * Gets or sets the external program identifier. + */ + 'externalProgramId'?: string | null; + /** + * Gets or sets the name of the recording. + */ + 'name'?: string | null; + /** + * Gets or sets the description of the recording. + */ + 'overview'?: string | null; + /** + * Gets or sets the start date of the recording, in UTC. + */ + 'startDate'?: Date; + /** + * Gets or sets the end date of the recording, in UTC. + */ + 'endDate'?: Date; + /** + * Gets or sets the name of the service. + */ + 'serviceName'?: string | null; + /** + * Gets or sets the priority. + */ + 'priority'?: number; + /** + * Gets or sets the pre padding seconds. + */ + 'prePaddingSeconds'?: number; + /** + * Gets or sets the post padding seconds. + */ + 'postPaddingSeconds'?: number; + /** + * Gets or sets a value indicating whether this instance is pre padding required. + */ + 'isPrePaddingRequired'?: boolean; + /** + * Gets or sets the Id of the Parent that has a backdrop if the item does not have one. + */ + 'parentBackdropItemId'?: string | null; + /** + * Gets or sets the parent backdrop image tags. + */ + 'parentBackdropImageTags'?: Array | null; + /** + * Gets or sets a value indicating whether this instance is post padding required. + */ + 'isPostPaddingRequired'?: boolean; + 'keepUntil'?: KeepUntil; + 'status'?: RecordingStatus; + /** + * Gets or sets the series timer identifier. + */ + 'seriesTimerId'?: string | null; + /** + * Gets or sets the external series timer identifier. + */ + 'externalSeriesTimerId'?: string | null; + /** + * Gets or sets the run time ticks. + */ + 'runTimeTicks'?: number | null; + 'programInfo'?: TimerInfoDtoProgramInfo | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "id", + "baseName": "Id", + "type": "string" + }, + { + "name": "type", + "baseName": "Type", + "type": "string" + }, + { + "name": "serverId", + "baseName": "ServerId", + "type": "string" + }, + { + "name": "externalId", + "baseName": "ExternalId", + "type": "string" + }, + { + "name": "channelId", + "baseName": "ChannelId", + "type": "string" + }, + { + "name": "externalChannelId", + "baseName": "ExternalChannelId", + "type": "string" + }, + { + "name": "channelName", + "baseName": "ChannelName", + "type": "string" + }, + { + "name": "channelPrimaryImageTag", + "baseName": "ChannelPrimaryImageTag", + "type": "string" + }, + { + "name": "programId", + "baseName": "ProgramId", + "type": "string" + }, + { + "name": "externalProgramId", + "baseName": "ExternalProgramId", + "type": "string" + }, + { + "name": "name", + "baseName": "Name", + "type": "string" + }, + { + "name": "overview", + "baseName": "Overview", + "type": "string" + }, + { + "name": "startDate", + "baseName": "StartDate", + "type": "Date" + }, + { + "name": "endDate", + "baseName": "EndDate", + "type": "Date" + }, + { + "name": "serviceName", + "baseName": "ServiceName", + "type": "string" + }, + { + "name": "priority", + "baseName": "Priority", + "type": "number" + }, + { + "name": "prePaddingSeconds", + "baseName": "PrePaddingSeconds", + "type": "number" + }, + { + "name": "postPaddingSeconds", + "baseName": "PostPaddingSeconds", + "type": "number" + }, + { + "name": "isPrePaddingRequired", + "baseName": "IsPrePaddingRequired", + "type": "boolean" + }, + { + "name": "parentBackdropItemId", + "baseName": "ParentBackdropItemId", + "type": "string" + }, + { + "name": "parentBackdropImageTags", + "baseName": "ParentBackdropImageTags", + "type": "Array" + }, + { + "name": "isPostPaddingRequired", + "baseName": "IsPostPaddingRequired", + "type": "boolean" + }, + { + "name": "keepUntil", + "baseName": "KeepUntil", + "type": "KeepUntil" + }, + { + "name": "status", + "baseName": "Status", + "type": "RecordingStatus" + }, + { + "name": "seriesTimerId", + "baseName": "SeriesTimerId", + "type": "string" + }, + { + "name": "externalSeriesTimerId", + "baseName": "ExternalSeriesTimerId", + "type": "string" + }, + { + "name": "runTimeTicks", + "baseName": "RunTimeTicks", + "type": "number" + }, + { + "name": "programInfo", + "baseName": "ProgramInfo", + "type": "TimerInfoDtoProgramInfo" + } ]; + + static getAttributeTypeMap() { + return TimerInfoDto.attributeTypeMap; + } +} + +export namespace TimerInfoDto { +} diff --git a/jellyfin/model/timerInfoDtoProgramInfo.ts b/jellyfin/model/timerInfoDtoProgramInfo.ts new file mode 100644 index 0000000..9b7549c --- /dev/null +++ b/jellyfin/model/timerInfoDtoProgramInfo.ts @@ -0,0 +1,1272 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { BaseItemDtoCurrentProgram } from './baseItemDtoCurrentProgram'; +import { BaseItemDtoImageBlurHashes } from './baseItemDtoImageBlurHashes'; +import { BaseItemDtoUserData } from './baseItemDtoUserData'; +import { BaseItemKind } from './baseItemKind'; +import { BaseItemPerson } from './baseItemPerson'; +import { ChannelType } from './channelType'; +import { ChapterInfo } from './chapterInfo'; +import { DayOfWeek } from './dayOfWeek'; +import { ExternalUrl } from './externalUrl'; +import { ImageOrientation } from './imageOrientation'; +import { IsoType } from './isoType'; +import { LocationType } from './locationType'; +import { MediaSourceInfo } from './mediaSourceInfo'; +import { MediaStream } from './mediaStream'; +import { MediaUrl } from './mediaUrl'; +import { MetadataField } from './metadataField'; +import { NameGuidPair } from './nameGuidPair'; +import { PlayAccess } from './playAccess'; +import { ProgramAudio } from './programAudio'; +import { Video3DFormat } from './video3DFormat'; +import { VideoType } from './videoType'; + +/** +* Gets or sets the program information. +*/ +export class TimerInfoDtoProgramInfo { + /** + * Gets or sets the name. + */ + 'name'?: string | null; + 'originalTitle'?: string | null; + /** + * Gets or sets the server identifier. + */ + 'serverId'?: string | null; + /** + * Gets or sets the id. + */ + 'id'?: string; + /** + * Gets or sets the etag. + */ + 'etag'?: string | null; + /** + * Gets or sets the type of the source. + */ + 'sourceType'?: string | null; + /** + * Gets or sets the playlist item identifier. + */ + 'playlistItemId'?: string | null; + /** + * Gets or sets the date created. + */ + 'dateCreated'?: Date | null; + 'dateLastMediaAdded'?: Date | null; + 'extraType'?: string | null; + 'airsBeforeSeasonNumber'?: number | null; + 'airsAfterSeasonNumber'?: number | null; + 'airsBeforeEpisodeNumber'?: number | null; + 'canDelete'?: boolean | null; + 'canDownload'?: boolean | null; + 'hasSubtitles'?: boolean | null; + 'preferredMetadataLanguage'?: string | null; + 'preferredMetadataCountryCode'?: string | null; + /** + * Gets or sets a value indicating whether [supports synchronize]. + */ + 'supportsSync'?: boolean | null; + 'container'?: string | null; + /** + * Gets or sets the name of the sort. + */ + 'sortName'?: string | null; + 'forcedSortName'?: string | null; + 'video3DFormat'?: Video3DFormat | null; + /** + * Gets or sets the premiere date. + */ + 'premiereDate'?: Date | null; + /** + * Gets or sets the external urls. + */ + 'externalUrls'?: Array | null; + /** + * Gets or sets the media versions. + */ + 'mediaSources'?: Array | null; + /** + * Gets or sets the critic rating. + */ + 'criticRating'?: number | null; + 'productionLocations'?: Array | null; + /** + * Gets or sets the path. + */ + 'path'?: string | null; + 'enableMediaSourceDisplay'?: boolean | null; + /** + * Gets or sets the official rating. + */ + 'officialRating'?: string | null; + /** + * Gets or sets the custom rating. + */ + 'customRating'?: string | null; + /** + * Gets or sets the channel identifier. + */ + 'channelId'?: string | null; + 'channelName'?: string | null; + /** + * Gets or sets the overview. + */ + 'overview'?: string | null; + /** + * Gets or sets the taglines. + */ + 'taglines'?: Array | null; + /** + * Gets or sets the genres. + */ + 'genres'?: Array | null; + /** + * Gets or sets the community rating. + */ + 'communityRating'?: number | null; + /** + * Gets or sets the cumulative run time ticks. + */ + 'cumulativeRunTimeTicks'?: number | null; + /** + * Gets or sets the run time ticks. + */ + 'runTimeTicks'?: number | null; + 'playAccess'?: PlayAccess | null; + /** + * Gets or sets the aspect ratio. + */ + 'aspectRatio'?: string | null; + /** + * Gets or sets the production year. + */ + 'productionYear'?: number | null; + /** + * Gets or sets a value indicating whether this instance is place holder. + */ + 'isPlaceHolder'?: boolean | null; + /** + * Gets or sets the number. + */ + 'number'?: string | null; + 'channelNumber'?: string | null; + /** + * Gets or sets the index number. + */ + 'indexNumber'?: number | null; + /** + * Gets or sets the index number end. + */ + 'indexNumberEnd'?: number | null; + /** + * Gets or sets the parent index number. + */ + 'parentIndexNumber'?: number | null; + /** + * Gets or sets the trailer urls. + */ + 'remoteTrailers'?: Array | null; + /** + * Gets or sets the provider ids. + */ + 'providerIds'?: { [key: string]: string; } | null; + /** + * Gets or sets a value indicating whether this instance is HD. + */ + 'isHD'?: boolean | null; + /** + * Gets or sets a value indicating whether this instance is folder. + */ + 'isFolder'?: boolean | null; + /** + * Gets or sets the parent id. + */ + 'parentId'?: string | null; + 'type'?: BaseItemKind; + /** + * Gets or sets the people. + */ + 'people'?: Array | null; + /** + * Gets or sets the studios. + */ + 'studios'?: Array | null; + 'genreItems'?: Array | null; + /** + * Gets or sets wether the item has a logo, this will hold the Id of the Parent that has one. + */ + 'parentLogoItemId'?: string | null; + /** + * Gets or sets wether the item has any backdrops, this will hold the Id of the Parent that has one. + */ + 'parentBackdropItemId'?: string | null; + /** + * Gets or sets the parent backdrop image tags. + */ + 'parentBackdropImageTags'?: Array | null; + /** + * Gets or sets the local trailer count. + */ + 'localTrailerCount'?: number | null; + 'userData'?: BaseItemDtoUserData | null; + /** + * Gets or sets the recursive item count. + */ + 'recursiveItemCount'?: number | null; + /** + * Gets or sets the child count. + */ + 'childCount'?: number | null; + /** + * Gets or sets the name of the series. + */ + 'seriesName'?: string | null; + /** + * Gets or sets the series id. + */ + 'seriesId'?: string | null; + /** + * Gets or sets the season identifier. + */ + 'seasonId'?: string | null; + /** + * Gets or sets the special feature count. + */ + 'specialFeatureCount'?: number | null; + /** + * Gets or sets the display preferences id. + */ + 'displayPreferencesId'?: string | null; + /** + * Gets or sets the status. + */ + 'status'?: string | null; + /** + * Gets or sets the air time. + */ + 'airTime'?: string | null; + /** + * Gets or sets the air days. + */ + 'airDays'?: Array | null; + /** + * Gets or sets the tags. + */ + 'tags'?: Array | null; + /** + * Gets or sets the primary image aspect ratio, after image enhancements. + */ + 'primaryImageAspectRatio'?: number | null; + /** + * Gets or sets the artists. + */ + 'artists'?: Array | null; + /** + * Gets or sets the artist items. + */ + 'artistItems'?: Array | null; + /** + * Gets or sets the album. + */ + 'album'?: string | null; + /** + * Gets or sets the type of the collection. + */ + 'collectionType'?: string | null; + /** + * Gets or sets the display order. + */ + 'displayOrder'?: string | null; + /** + * Gets or sets the album id. + */ + 'albumId'?: string | null; + /** + * Gets or sets the album image tag. + */ + 'albumPrimaryImageTag'?: string | null; + /** + * Gets or sets the series primary image tag. + */ + 'seriesPrimaryImageTag'?: string | null; + /** + * Gets or sets the album artist. + */ + 'albumArtist'?: string | null; + /** + * Gets or sets the album artists. + */ + 'albumArtists'?: Array | null; + /** + * Gets or sets the name of the season. + */ + 'seasonName'?: string | null; + /** + * Gets or sets the media streams. + */ + 'mediaStreams'?: Array | null; + 'videoType'?: VideoType | null; + /** + * Gets or sets the part count. + */ + 'partCount'?: number | null; + 'mediaSourceCount'?: number | null; + /** + * Gets or sets the image tags. + */ + 'imageTags'?: { [key: string]: string; } | null; + /** + * Gets or sets the backdrop image tags. + */ + 'backdropImageTags'?: Array | null; + /** + * Gets or sets the screenshot image tags. + */ + 'screenshotImageTags'?: Array | null; + /** + * Gets or sets the parent logo image tag. + */ + 'parentLogoImageTag'?: string | null; + /** + * Gets or sets wether the item has fan art, this will hold the Id of the Parent that has one. + */ + 'parentArtItemId'?: string | null; + /** + * Gets or sets the parent art image tag. + */ + 'parentArtImageTag'?: string | null; + /** + * Gets or sets the series thumb image tag. + */ + 'seriesThumbImageTag'?: string | null; + 'imageBlurHashes'?: BaseItemDtoImageBlurHashes | null; + /** + * Gets or sets the series studio. + */ + 'seriesStudio'?: string | null; + /** + * Gets or sets the parent thumb item id. + */ + 'parentThumbItemId'?: string | null; + /** + * Gets or sets the parent thumb image tag. + */ + 'parentThumbImageTag'?: string | null; + /** + * Gets or sets the parent primary image item identifier. + */ + 'parentPrimaryImageItemId'?: string | null; + /** + * Gets or sets the parent primary image tag. + */ + 'parentPrimaryImageTag'?: string | null; + /** + * Gets or sets the chapters. + */ + 'chapters'?: Array | null; + 'locationType'?: LocationType | null; + 'isoType'?: IsoType | null; + /** + * Gets or sets the type of the media. + */ + 'mediaType'?: string | null; + /** + * Gets or sets the end date. + */ + 'endDate'?: Date | null; + /** + * Gets or sets the locked fields. + */ + 'lockedFields'?: Array | null; + /** + * Gets or sets the trailer count. + */ + 'trailerCount'?: number | null; + /** + * Gets or sets the movie count. + */ + 'movieCount'?: number | null; + /** + * Gets or sets the series count. + */ + 'seriesCount'?: number | null; + 'programCount'?: number | null; + /** + * Gets or sets the episode count. + */ + 'episodeCount'?: number | null; + /** + * Gets or sets the song count. + */ + 'songCount'?: number | null; + /** + * Gets or sets the album count. + */ + 'albumCount'?: number | null; + 'artistCount'?: number | null; + /** + * Gets or sets the music video count. + */ + 'musicVideoCount'?: number | null; + /** + * Gets or sets a value indicating whether [enable internet providers]. + */ + 'lockData'?: boolean | null; + 'width'?: number | null; + 'height'?: number | null; + 'cameraMake'?: string | null; + 'cameraModel'?: string | null; + 'software'?: string | null; + 'exposureTime'?: number | null; + 'focalLength'?: number | null; + 'imageOrientation'?: ImageOrientation | null; + 'aperture'?: number | null; + 'shutterSpeed'?: number | null; + 'latitude'?: number | null; + 'longitude'?: number | null; + 'altitude'?: number | null; + 'isoSpeedRating'?: number | null; + /** + * Gets or sets the series timer identifier. + */ + 'seriesTimerId'?: string | null; + /** + * Gets or sets the program identifier. + */ + 'programId'?: string | null; + /** + * Gets or sets the channel primary image tag. + */ + 'channelPrimaryImageTag'?: string | null; + /** + * Gets or sets the start date of the recording, in UTC. + */ + 'startDate'?: Date | null; + /** + * Gets or sets the completion percentage. + */ + 'completionPercentage'?: number | null; + /** + * Gets or sets a value indicating whether this instance is repeat. + */ + 'isRepeat'?: boolean | null; + /** + * Gets or sets the episode title. + */ + 'episodeTitle'?: string | null; + 'channelType'?: ChannelType | null; + 'audio'?: ProgramAudio | null; + /** + * Gets or sets a value indicating whether this instance is movie. + */ + 'isMovie'?: boolean | null; + /** + * Gets or sets a value indicating whether this instance is sports. + */ + 'isSports'?: boolean | null; + /** + * Gets or sets a value indicating whether this instance is series. + */ + 'isSeries'?: boolean | null; + /** + * Gets or sets a value indicating whether this instance is live. + */ + 'isLive'?: boolean | null; + /** + * Gets or sets a value indicating whether this instance is news. + */ + 'isNews'?: boolean | null; + /** + * Gets or sets a value indicating whether this instance is kids. + */ + 'isKids'?: boolean | null; + /** + * Gets or sets a value indicating whether this instance is premiere. + */ + 'isPremiere'?: boolean | null; + /** + * Gets or sets the timer identifier. + */ + 'timerId'?: string | null; + 'currentProgram'?: BaseItemDtoCurrentProgram | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "Name", + "type": "string" + }, + { + "name": "originalTitle", + "baseName": "OriginalTitle", + "type": "string" + }, + { + "name": "serverId", + "baseName": "ServerId", + "type": "string" + }, + { + "name": "id", + "baseName": "Id", + "type": "string" + }, + { + "name": "etag", + "baseName": "Etag", + "type": "string" + }, + { + "name": "sourceType", + "baseName": "SourceType", + "type": "string" + }, + { + "name": "playlistItemId", + "baseName": "PlaylistItemId", + "type": "string" + }, + { + "name": "dateCreated", + "baseName": "DateCreated", + "type": "Date" + }, + { + "name": "dateLastMediaAdded", + "baseName": "DateLastMediaAdded", + "type": "Date" + }, + { + "name": "extraType", + "baseName": "ExtraType", + "type": "string" + }, + { + "name": "airsBeforeSeasonNumber", + "baseName": "AirsBeforeSeasonNumber", + "type": "number" + }, + { + "name": "airsAfterSeasonNumber", + "baseName": "AirsAfterSeasonNumber", + "type": "number" + }, + { + "name": "airsBeforeEpisodeNumber", + "baseName": "AirsBeforeEpisodeNumber", + "type": "number" + }, + { + "name": "canDelete", + "baseName": "CanDelete", + "type": "boolean" + }, + { + "name": "canDownload", + "baseName": "CanDownload", + "type": "boolean" + }, + { + "name": "hasSubtitles", + "baseName": "HasSubtitles", + "type": "boolean" + }, + { + "name": "preferredMetadataLanguage", + "baseName": "PreferredMetadataLanguage", + "type": "string" + }, + { + "name": "preferredMetadataCountryCode", + "baseName": "PreferredMetadataCountryCode", + "type": "string" + }, + { + "name": "supportsSync", + "baseName": "SupportsSync", + "type": "boolean" + }, + { + "name": "container", + "baseName": "Container", + "type": "string" + }, + { + "name": "sortName", + "baseName": "SortName", + "type": "string" + }, + { + "name": "forcedSortName", + "baseName": "ForcedSortName", + "type": "string" + }, + { + "name": "video3DFormat", + "baseName": "Video3DFormat", + "type": "Video3DFormat" + }, + { + "name": "premiereDate", + "baseName": "PremiereDate", + "type": "Date" + }, + { + "name": "externalUrls", + "baseName": "ExternalUrls", + "type": "Array" + }, + { + "name": "mediaSources", + "baseName": "MediaSources", + "type": "Array" + }, + { + "name": "criticRating", + "baseName": "CriticRating", + "type": "number" + }, + { + "name": "productionLocations", + "baseName": "ProductionLocations", + "type": "Array" + }, + { + "name": "path", + "baseName": "Path", + "type": "string" + }, + { + "name": "enableMediaSourceDisplay", + "baseName": "EnableMediaSourceDisplay", + "type": "boolean" + }, + { + "name": "officialRating", + "baseName": "OfficialRating", + "type": "string" + }, + { + "name": "customRating", + "baseName": "CustomRating", + "type": "string" + }, + { + "name": "channelId", + "baseName": "ChannelId", + "type": "string" + }, + { + "name": "channelName", + "baseName": "ChannelName", + "type": "string" + }, + { + "name": "overview", + "baseName": "Overview", + "type": "string" + }, + { + "name": "taglines", + "baseName": "Taglines", + "type": "Array" + }, + { + "name": "genres", + "baseName": "Genres", + "type": "Array" + }, + { + "name": "communityRating", + "baseName": "CommunityRating", + "type": "number" + }, + { + "name": "cumulativeRunTimeTicks", + "baseName": "CumulativeRunTimeTicks", + "type": "number" + }, + { + "name": "runTimeTicks", + "baseName": "RunTimeTicks", + "type": "number" + }, + { + "name": "playAccess", + "baseName": "PlayAccess", + "type": "PlayAccess" + }, + { + "name": "aspectRatio", + "baseName": "AspectRatio", + "type": "string" + }, + { + "name": "productionYear", + "baseName": "ProductionYear", + "type": "number" + }, + { + "name": "isPlaceHolder", + "baseName": "IsPlaceHolder", + "type": "boolean" + }, + { + "name": "number", + "baseName": "Number", + "type": "string" + }, + { + "name": "channelNumber", + "baseName": "ChannelNumber", + "type": "string" + }, + { + "name": "indexNumber", + "baseName": "IndexNumber", + "type": "number" + }, + { + "name": "indexNumberEnd", + "baseName": "IndexNumberEnd", + "type": "number" + }, + { + "name": "parentIndexNumber", + "baseName": "ParentIndexNumber", + "type": "number" + }, + { + "name": "remoteTrailers", + "baseName": "RemoteTrailers", + "type": "Array" + }, + { + "name": "providerIds", + "baseName": "ProviderIds", + "type": "{ [key: string]: string; }" + }, + { + "name": "isHD", + "baseName": "IsHD", + "type": "boolean" + }, + { + "name": "isFolder", + "baseName": "IsFolder", + "type": "boolean" + }, + { + "name": "parentId", + "baseName": "ParentId", + "type": "string" + }, + { + "name": "type", + "baseName": "Type", + "type": "BaseItemKind" + }, + { + "name": "people", + "baseName": "People", + "type": "Array" + }, + { + "name": "studios", + "baseName": "Studios", + "type": "Array" + }, + { + "name": "genreItems", + "baseName": "GenreItems", + "type": "Array" + }, + { + "name": "parentLogoItemId", + "baseName": "ParentLogoItemId", + "type": "string" + }, + { + "name": "parentBackdropItemId", + "baseName": "ParentBackdropItemId", + "type": "string" + }, + { + "name": "parentBackdropImageTags", + "baseName": "ParentBackdropImageTags", + "type": "Array" + }, + { + "name": "localTrailerCount", + "baseName": "LocalTrailerCount", + "type": "number" + }, + { + "name": "userData", + "baseName": "UserData", + "type": "BaseItemDtoUserData" + }, + { + "name": "recursiveItemCount", + "baseName": "RecursiveItemCount", + "type": "number" + }, + { + "name": "childCount", + "baseName": "ChildCount", + "type": "number" + }, + { + "name": "seriesName", + "baseName": "SeriesName", + "type": "string" + }, + { + "name": "seriesId", + "baseName": "SeriesId", + "type": "string" + }, + { + "name": "seasonId", + "baseName": "SeasonId", + "type": "string" + }, + { + "name": "specialFeatureCount", + "baseName": "SpecialFeatureCount", + "type": "number" + }, + { + "name": "displayPreferencesId", + "baseName": "DisplayPreferencesId", + "type": "string" + }, + { + "name": "status", + "baseName": "Status", + "type": "string" + }, + { + "name": "airTime", + "baseName": "AirTime", + "type": "string" + }, + { + "name": "airDays", + "baseName": "AirDays", + "type": "Array" + }, + { + "name": "tags", + "baseName": "Tags", + "type": "Array" + }, + { + "name": "primaryImageAspectRatio", + "baseName": "PrimaryImageAspectRatio", + "type": "number" + }, + { + "name": "artists", + "baseName": "Artists", + "type": "Array" + }, + { + "name": "artistItems", + "baseName": "ArtistItems", + "type": "Array" + }, + { + "name": "album", + "baseName": "Album", + "type": "string" + }, + { + "name": "collectionType", + "baseName": "CollectionType", + "type": "string" + }, + { + "name": "displayOrder", + "baseName": "DisplayOrder", + "type": "string" + }, + { + "name": "albumId", + "baseName": "AlbumId", + "type": "string" + }, + { + "name": "albumPrimaryImageTag", + "baseName": "AlbumPrimaryImageTag", + "type": "string" + }, + { + "name": "seriesPrimaryImageTag", + "baseName": "SeriesPrimaryImageTag", + "type": "string" + }, + { + "name": "albumArtist", + "baseName": "AlbumArtist", + "type": "string" + }, + { + "name": "albumArtists", + "baseName": "AlbumArtists", + "type": "Array" + }, + { + "name": "seasonName", + "baseName": "SeasonName", + "type": "string" + }, + { + "name": "mediaStreams", + "baseName": "MediaStreams", + "type": "Array" + }, + { + "name": "videoType", + "baseName": "VideoType", + "type": "VideoType" + }, + { + "name": "partCount", + "baseName": "PartCount", + "type": "number" + }, + { + "name": "mediaSourceCount", + "baseName": "MediaSourceCount", + "type": "number" + }, + { + "name": "imageTags", + "baseName": "ImageTags", + "type": "{ [key: string]: string; }" + }, + { + "name": "backdropImageTags", + "baseName": "BackdropImageTags", + "type": "Array" + }, + { + "name": "screenshotImageTags", + "baseName": "ScreenshotImageTags", + "type": "Array" + }, + { + "name": "parentLogoImageTag", + "baseName": "ParentLogoImageTag", + "type": "string" + }, + { + "name": "parentArtItemId", + "baseName": "ParentArtItemId", + "type": "string" + }, + { + "name": "parentArtImageTag", + "baseName": "ParentArtImageTag", + "type": "string" + }, + { + "name": "seriesThumbImageTag", + "baseName": "SeriesThumbImageTag", + "type": "string" + }, + { + "name": "imageBlurHashes", + "baseName": "ImageBlurHashes", + "type": "BaseItemDtoImageBlurHashes" + }, + { + "name": "seriesStudio", + "baseName": "SeriesStudio", + "type": "string" + }, + { + "name": "parentThumbItemId", + "baseName": "ParentThumbItemId", + "type": "string" + }, + { + "name": "parentThumbImageTag", + "baseName": "ParentThumbImageTag", + "type": "string" + }, + { + "name": "parentPrimaryImageItemId", + "baseName": "ParentPrimaryImageItemId", + "type": "string" + }, + { + "name": "parentPrimaryImageTag", + "baseName": "ParentPrimaryImageTag", + "type": "string" + }, + { + "name": "chapters", + "baseName": "Chapters", + "type": "Array" + }, + { + "name": "locationType", + "baseName": "LocationType", + "type": "LocationType" + }, + { + "name": "isoType", + "baseName": "IsoType", + "type": "IsoType" + }, + { + "name": "mediaType", + "baseName": "MediaType", + "type": "string" + }, + { + "name": "endDate", + "baseName": "EndDate", + "type": "Date" + }, + { + "name": "lockedFields", + "baseName": "LockedFields", + "type": "Array" + }, + { + "name": "trailerCount", + "baseName": "TrailerCount", + "type": "number" + }, + { + "name": "movieCount", + "baseName": "MovieCount", + "type": "number" + }, + { + "name": "seriesCount", + "baseName": "SeriesCount", + "type": "number" + }, + { + "name": "programCount", + "baseName": "ProgramCount", + "type": "number" + }, + { + "name": "episodeCount", + "baseName": "EpisodeCount", + "type": "number" + }, + { + "name": "songCount", + "baseName": "SongCount", + "type": "number" + }, + { + "name": "albumCount", + "baseName": "AlbumCount", + "type": "number" + }, + { + "name": "artistCount", + "baseName": "ArtistCount", + "type": "number" + }, + { + "name": "musicVideoCount", + "baseName": "MusicVideoCount", + "type": "number" + }, + { + "name": "lockData", + "baseName": "LockData", + "type": "boolean" + }, + { + "name": "width", + "baseName": "Width", + "type": "number" + }, + { + "name": "height", + "baseName": "Height", + "type": "number" + }, + { + "name": "cameraMake", + "baseName": "CameraMake", + "type": "string" + }, + { + "name": "cameraModel", + "baseName": "CameraModel", + "type": "string" + }, + { + "name": "software", + "baseName": "Software", + "type": "string" + }, + { + "name": "exposureTime", + "baseName": "ExposureTime", + "type": "number" + }, + { + "name": "focalLength", + "baseName": "FocalLength", + "type": "number" + }, + { + "name": "imageOrientation", + "baseName": "ImageOrientation", + "type": "ImageOrientation" + }, + { + "name": "aperture", + "baseName": "Aperture", + "type": "number" + }, + { + "name": "shutterSpeed", + "baseName": "ShutterSpeed", + "type": "number" + }, + { + "name": "latitude", + "baseName": "Latitude", + "type": "number" + }, + { + "name": "longitude", + "baseName": "Longitude", + "type": "number" + }, + { + "name": "altitude", + "baseName": "Altitude", + "type": "number" + }, + { + "name": "isoSpeedRating", + "baseName": "IsoSpeedRating", + "type": "number" + }, + { + "name": "seriesTimerId", + "baseName": "SeriesTimerId", + "type": "string" + }, + { + "name": "programId", + "baseName": "ProgramId", + "type": "string" + }, + { + "name": "channelPrimaryImageTag", + "baseName": "ChannelPrimaryImageTag", + "type": "string" + }, + { + "name": "startDate", + "baseName": "StartDate", + "type": "Date" + }, + { + "name": "completionPercentage", + "baseName": "CompletionPercentage", + "type": "number" + }, + { + "name": "isRepeat", + "baseName": "IsRepeat", + "type": "boolean" + }, + { + "name": "episodeTitle", + "baseName": "EpisodeTitle", + "type": "string" + }, + { + "name": "channelType", + "baseName": "ChannelType", + "type": "ChannelType" + }, + { + "name": "audio", + "baseName": "Audio", + "type": "ProgramAudio" + }, + { + "name": "isMovie", + "baseName": "IsMovie", + "type": "boolean" + }, + { + "name": "isSports", + "baseName": "IsSports", + "type": "boolean" + }, + { + "name": "isSeries", + "baseName": "IsSeries", + "type": "boolean" + }, + { + "name": "isLive", + "baseName": "IsLive", + "type": "boolean" + }, + { + "name": "isNews", + "baseName": "IsNews", + "type": "boolean" + }, + { + "name": "isKids", + "baseName": "IsKids", + "type": "boolean" + }, + { + "name": "isPremiere", + "baseName": "IsPremiere", + "type": "boolean" + }, + { + "name": "timerId", + "baseName": "TimerId", + "type": "string" + }, + { + "name": "currentProgram", + "baseName": "CurrentProgram", + "type": "BaseItemDtoCurrentProgram" + } ]; + + static getAttributeTypeMap() { + return TimerInfoDtoProgramInfo.attributeTypeMap; + } +} + +export namespace TimerInfoDtoProgramInfo { +} diff --git a/jellyfin/model/timerInfoDtoQueryResult.ts b/jellyfin/model/timerInfoDtoQueryResult.ts new file mode 100644 index 0000000..11e9eec --- /dev/null +++ b/jellyfin/model/timerInfoDtoQueryResult.ts @@ -0,0 +1,53 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { TimerInfoDto } from './timerInfoDto'; + +export class TimerInfoDtoQueryResult { + /** + * Gets or sets the items. + */ + 'items'?: Array | null; + /** + * Gets or sets the total number of records available. + */ + 'totalRecordCount'?: number; + /** + * Gets or sets the index of the first record in Items. + */ + 'startIndex'?: number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "items", + "baseName": "Items", + "type": "Array" + }, + { + "name": "totalRecordCount", + "baseName": "TotalRecordCount", + "type": "number" + }, + { + "name": "startIndex", + "baseName": "StartIndex", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return TimerInfoDtoQueryResult.attributeTypeMap; + } +} + diff --git a/jellyfin/model/trailerInfo.ts b/jellyfin/model/trailerInfo.ts new file mode 100644 index 0000000..d336cb6 --- /dev/null +++ b/jellyfin/model/trailerInfo.ts @@ -0,0 +1,112 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class TrailerInfo { + /** + * Gets or sets the name. + */ + 'name'?: string | null; + /** + * Gets or sets the original title. + */ + 'originalTitle'?: string | null; + /** + * Gets or sets the path. + */ + 'path'?: string | null; + /** + * Gets or sets the metadata language. + */ + 'metadataLanguage'?: string | null; + /** + * Gets or sets the metadata country code. + */ + 'metadataCountryCode'?: string | null; + /** + * Gets or sets the provider ids. + */ + 'providerIds'?: { [key: string]: string; } | null; + /** + * Gets or sets the year. + */ + 'year'?: number | null; + 'indexNumber'?: number | null; + 'parentIndexNumber'?: number | null; + 'premiereDate'?: Date | null; + 'isAutomated'?: boolean; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "Name", + "type": "string" + }, + { + "name": "originalTitle", + "baseName": "OriginalTitle", + "type": "string" + }, + { + "name": "path", + "baseName": "Path", + "type": "string" + }, + { + "name": "metadataLanguage", + "baseName": "MetadataLanguage", + "type": "string" + }, + { + "name": "metadataCountryCode", + "baseName": "MetadataCountryCode", + "type": "string" + }, + { + "name": "providerIds", + "baseName": "ProviderIds", + "type": "{ [key: string]: string; }" + }, + { + "name": "year", + "baseName": "Year", + "type": "number" + }, + { + "name": "indexNumber", + "baseName": "IndexNumber", + "type": "number" + }, + { + "name": "parentIndexNumber", + "baseName": "ParentIndexNumber", + "type": "number" + }, + { + "name": "premiereDate", + "baseName": "PremiereDate", + "type": "Date" + }, + { + "name": "isAutomated", + "baseName": "IsAutomated", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return TrailerInfo.attributeTypeMap; + } +} + diff --git a/jellyfin/model/trailerInfoRemoteSearchQuery.ts b/jellyfin/model/trailerInfoRemoteSearchQuery.ts new file mode 100644 index 0000000..2b4994f --- /dev/null +++ b/jellyfin/model/trailerInfoRemoteSearchQuery.ts @@ -0,0 +1,56 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { TrailerInfo } from './trailerInfo'; + +export class TrailerInfoRemoteSearchQuery { + 'searchInfo'?: TrailerInfo | null; + 'itemId'?: string; + /** + * Gets or sets the provider name to search within if set. + */ + 'searchProviderName'?: string | null; + /** + * Gets or sets a value indicating whether disabled providers should be included. + */ + 'includeDisabledProviders'?: boolean; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "searchInfo", + "baseName": "SearchInfo", + "type": "TrailerInfo" + }, + { + "name": "itemId", + "baseName": "ItemId", + "type": "string" + }, + { + "name": "searchProviderName", + "baseName": "SearchProviderName", + "type": "string" + }, + { + "name": "includeDisabledProviders", + "baseName": "IncludeDisabledProviders", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return TrailerInfoRemoteSearchQuery.attributeTypeMap; + } +} + diff --git a/jellyfin/model/transcodeReason.ts b/jellyfin/model/transcodeReason.ts new file mode 100644 index 0000000..9e347f5 --- /dev/null +++ b/jellyfin/model/transcodeReason.ts @@ -0,0 +1,41 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export enum TranscodeReason { + ContainerNotSupported = 'ContainerNotSupported', + VideoCodecNotSupported = 'VideoCodecNotSupported', + AudioCodecNotSupported = 'AudioCodecNotSupported', + SubtitleCodecNotSupported = 'SubtitleCodecNotSupported', + AudioIsExternal = 'AudioIsExternal', + SecondaryAudioNotSupported = 'SecondaryAudioNotSupported', + VideoProfileNotSupported = 'VideoProfileNotSupported', + VideoLevelNotSupported = 'VideoLevelNotSupported', + VideoResolutionNotSupported = 'VideoResolutionNotSupported', + VideoBitDepthNotSupported = 'VideoBitDepthNotSupported', + VideoFramerateNotSupported = 'VideoFramerateNotSupported', + RefFramesNotSupported = 'RefFramesNotSupported', + AnamorphicVideoNotSupported = 'AnamorphicVideoNotSupported', + InterlacedVideoNotSupported = 'InterlacedVideoNotSupported', + AudioChannelsNotSupported = 'AudioChannelsNotSupported', + AudioProfileNotSupported = 'AudioProfileNotSupported', + AudioSampleRateNotSupported = 'AudioSampleRateNotSupported', + AudioBitDepthNotSupported = 'AudioBitDepthNotSupported', + ContainerBitrateExceedsLimit = 'ContainerBitrateExceedsLimit', + VideoBitrateNotSupported = 'VideoBitrateNotSupported', + AudioBitrateNotSupported = 'AudioBitrateNotSupported', + UnknownVideoStreamInfo = 'UnknownVideoStreamInfo', + UnknownAudioStreamInfo = 'UnknownAudioStreamInfo', + DirectPlayError = 'DirectPlayError', + VideoRangeTypeNotSupported = 'VideoRangeTypeNotSupported' +} diff --git a/jellyfin/model/transcodeSeekInfo.ts b/jellyfin/model/transcodeSeekInfo.ts new file mode 100644 index 0000000..2f9cab8 --- /dev/null +++ b/jellyfin/model/transcodeSeekInfo.ts @@ -0,0 +1,18 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export enum TranscodeSeekInfo { + Auto = 'Auto', + Bytes = 'Bytes' +} diff --git a/jellyfin/model/transcodingInfo.ts b/jellyfin/model/transcodingInfo.ts new file mode 100644 index 0000000..267fcaf --- /dev/null +++ b/jellyfin/model/transcodingInfo.ts @@ -0,0 +1,107 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { HardwareEncodingType } from './hardwareEncodingType'; +import { TranscodeReason } from './transcodeReason'; + +export class TranscodingInfo { + 'audioCodec'?: string | null; + 'videoCodec'?: string | null; + 'container'?: string | null; + 'isVideoDirect'?: boolean; + 'isAudioDirect'?: boolean; + 'bitrate'?: number | null; + 'framerate'?: number | null; + 'completionPercentage'?: number | null; + 'width'?: number | null; + 'height'?: number | null; + 'audioChannels'?: number | null; + 'hardwareAccelerationType'?: HardwareEncodingType | null; + 'transcodeReasons'?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "audioCodec", + "baseName": "AudioCodec", + "type": "string" + }, + { + "name": "videoCodec", + "baseName": "VideoCodec", + "type": "string" + }, + { + "name": "container", + "baseName": "Container", + "type": "string" + }, + { + "name": "isVideoDirect", + "baseName": "IsVideoDirect", + "type": "boolean" + }, + { + "name": "isAudioDirect", + "baseName": "IsAudioDirect", + "type": "boolean" + }, + { + "name": "bitrate", + "baseName": "Bitrate", + "type": "number" + }, + { + "name": "framerate", + "baseName": "Framerate", + "type": "number" + }, + { + "name": "completionPercentage", + "baseName": "CompletionPercentage", + "type": "number" + }, + { + "name": "width", + "baseName": "Width", + "type": "number" + }, + { + "name": "height", + "baseName": "Height", + "type": "number" + }, + { + "name": "audioChannels", + "baseName": "AudioChannels", + "type": "number" + }, + { + "name": "hardwareAccelerationType", + "baseName": "HardwareAccelerationType", + "type": "HardwareEncodingType" + }, + { + "name": "transcodeReasons", + "baseName": "TranscodeReasons", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return TranscodingInfo.attributeTypeMap; + } +} + +export namespace TranscodingInfo { +} diff --git a/jellyfin/model/transcodingProfile.ts b/jellyfin/model/transcodingProfile.ts new file mode 100644 index 0000000..38c157e --- /dev/null +++ b/jellyfin/model/transcodingProfile.ts @@ -0,0 +1,127 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { DlnaProfileType } from './dlnaProfileType'; +import { EncodingContext } from './encodingContext'; +import { ProfileCondition } from './profileCondition'; +import { TranscodeSeekInfo } from './transcodeSeekInfo'; + +export class TranscodingProfile { + 'container'?: string; + 'type'?: DlnaProfileType; + 'videoCodec'?: string; + 'audioCodec'?: string; + 'protocol'?: string; + 'estimateContentLength'?: boolean = false; + 'enableMpegtsM2TsMode'?: boolean = false; + 'transcodeSeekInfo'?: TranscodeSeekInfo; + 'copyTimestamps'?: boolean = false; + 'context'?: EncodingContext; + 'enableSubtitlesInManifest'?: boolean = false; + 'maxAudioChannels'?: string | null; + 'minSegments'?: number = 0; + 'segmentLength'?: number = 0; + 'breakOnNonKeyFrames'?: boolean = false; + 'conditions'?: Array; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "container", + "baseName": "Container", + "type": "string" + }, + { + "name": "type", + "baseName": "Type", + "type": "DlnaProfileType" + }, + { + "name": "videoCodec", + "baseName": "VideoCodec", + "type": "string" + }, + { + "name": "audioCodec", + "baseName": "AudioCodec", + "type": "string" + }, + { + "name": "protocol", + "baseName": "Protocol", + "type": "string" + }, + { + "name": "estimateContentLength", + "baseName": "EstimateContentLength", + "type": "boolean" + }, + { + "name": "enableMpegtsM2TsMode", + "baseName": "EnableMpegtsM2TsMode", + "type": "boolean" + }, + { + "name": "transcodeSeekInfo", + "baseName": "TranscodeSeekInfo", + "type": "TranscodeSeekInfo" + }, + { + "name": "copyTimestamps", + "baseName": "CopyTimestamps", + "type": "boolean" + }, + { + "name": "context", + "baseName": "Context", + "type": "EncodingContext" + }, + { + "name": "enableSubtitlesInManifest", + "baseName": "EnableSubtitlesInManifest", + "type": "boolean" + }, + { + "name": "maxAudioChannels", + "baseName": "MaxAudioChannels", + "type": "string" + }, + { + "name": "minSegments", + "baseName": "MinSegments", + "type": "number" + }, + { + "name": "segmentLength", + "baseName": "SegmentLength", + "type": "number" + }, + { + "name": "breakOnNonKeyFrames", + "baseName": "BreakOnNonKeyFrames", + "type": "boolean" + }, + { + "name": "conditions", + "baseName": "Conditions", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return TranscodingProfile.attributeTypeMap; + } +} + +export namespace TranscodingProfile { +} diff --git a/jellyfin/model/transportStreamTimestamp.ts b/jellyfin/model/transportStreamTimestamp.ts new file mode 100644 index 0000000..6d9e979 --- /dev/null +++ b/jellyfin/model/transportStreamTimestamp.ts @@ -0,0 +1,19 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export enum TransportStreamTimestamp { + None = 'None', + Zero = 'Zero', + Valid = 'Valid' +} diff --git a/jellyfin/model/tunerChannelMapping.ts b/jellyfin/model/tunerChannelMapping.ts new file mode 100644 index 0000000..7c52cb8 --- /dev/null +++ b/jellyfin/model/tunerChannelMapping.ts @@ -0,0 +1,49 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class TunerChannelMapping { + 'name'?: string | null; + 'providerChannelName'?: string | null; + 'providerChannelId'?: string | null; + 'id'?: string | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "Name", + "type": "string" + }, + { + "name": "providerChannelName", + "baseName": "ProviderChannelName", + "type": "string" + }, + { + "name": "providerChannelId", + "baseName": "ProviderChannelId", + "type": "string" + }, + { + "name": "id", + "baseName": "Id", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return TunerChannelMapping.attributeTypeMap; + } +} + diff --git a/jellyfin/model/tunerHostInfo.ts b/jellyfin/model/tunerHostInfo.ts new file mode 100644 index 0000000..0495e18 --- /dev/null +++ b/jellyfin/model/tunerHostInfo.ts @@ -0,0 +1,91 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class TunerHostInfo { + 'id'?: string | null; + 'url'?: string | null; + 'type'?: string | null; + 'deviceId'?: string | null; + 'friendlyName'?: string | null; + 'importFavoritesOnly'?: boolean; + 'allowHWTranscoding'?: boolean; + 'enableStreamLooping'?: boolean; + 'source'?: string | null; + 'tunerCount'?: number; + 'userAgent'?: string | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "id", + "baseName": "Id", + "type": "string" + }, + { + "name": "url", + "baseName": "Url", + "type": "string" + }, + { + "name": "type", + "baseName": "Type", + "type": "string" + }, + { + "name": "deviceId", + "baseName": "DeviceId", + "type": "string" + }, + { + "name": "friendlyName", + "baseName": "FriendlyName", + "type": "string" + }, + { + "name": "importFavoritesOnly", + "baseName": "ImportFavoritesOnly", + "type": "boolean" + }, + { + "name": "allowHWTranscoding", + "baseName": "AllowHWTranscoding", + "type": "boolean" + }, + { + "name": "enableStreamLooping", + "baseName": "EnableStreamLooping", + "type": "boolean" + }, + { + "name": "source", + "baseName": "Source", + "type": "string" + }, + { + "name": "tunerCount", + "baseName": "TunerCount", + "type": "number" + }, + { + "name": "userAgent", + "baseName": "UserAgent", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return TunerHostInfo.attributeTypeMap; + } +} + diff --git a/jellyfin/model/typeOptions.ts b/jellyfin/model/typeOptions.ts new file mode 100644 index 0000000..0e306b5 --- /dev/null +++ b/jellyfin/model/typeOptions.ts @@ -0,0 +1,62 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { ImageOption } from './imageOption'; + +export class TypeOptions { + 'type'?: string | null; + 'metadataFetchers'?: Array | null; + 'metadataFetcherOrder'?: Array | null; + 'imageFetchers'?: Array | null; + 'imageFetcherOrder'?: Array | null; + 'imageOptions'?: Array | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "type", + "baseName": "Type", + "type": "string" + }, + { + "name": "metadataFetchers", + "baseName": "MetadataFetchers", + "type": "Array" + }, + { + "name": "metadataFetcherOrder", + "baseName": "MetadataFetcherOrder", + "type": "Array" + }, + { + "name": "imageFetchers", + "baseName": "ImageFetchers", + "type": "Array" + }, + { + "name": "imageFetcherOrder", + "baseName": "ImageFetcherOrder", + "type": "Array" + }, + { + "name": "imageOptions", + "baseName": "ImageOptions", + "type": "Array" + } ]; + + static getAttributeTypeMap() { + return TypeOptions.attributeTypeMap; + } +} + diff --git a/jellyfin/model/unratedItem.ts b/jellyfin/model/unratedItem.ts new file mode 100644 index 0000000..45d3902 --- /dev/null +++ b/jellyfin/model/unratedItem.ts @@ -0,0 +1,28 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* An enum representing an unrated item. +*/ +export enum UnratedItem { + Movie = 'Movie', + Trailer = 'Trailer', + Series = 'Series', + Music = 'Music', + Book = 'Book', + LiveTvChannel = 'LiveTvChannel', + LiveTvProgram = 'LiveTvProgram', + ChannelContent = 'ChannelContent', + Other = 'Other' +} diff --git a/jellyfin/model/updateConfigurationRequest.ts b/jellyfin/model/updateConfigurationRequest.ts new file mode 100644 index 0000000..d650fd6 --- /dev/null +++ b/jellyfin/model/updateConfigurationRequest.ts @@ -0,0 +1,410 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { ImageSavingConvention } from './imageSavingConvention'; +import { MetadataOptions } from './metadataOptions'; +import { NameValuePair } from './nameValuePair'; +import { PathSubstitution } from './pathSubstitution'; +import { RepositoryInfo } from './repositoryInfo'; + +/** +* Represents the server configuration. +*/ +export class UpdateConfigurationRequest { + /** + * Gets or sets the number of days we should retain log files. + */ + 'logFileRetentionDays'?: number; + /** + * Gets or sets a value indicating whether this instance is first run. + */ + 'isStartupWizardCompleted'?: boolean; + /** + * Gets or sets the cache path. + */ + 'cachePath'?: string | null; + /** + * Gets or sets the last known version that was ran using the configuration. + */ + 'previousVersion'?: string | null; + /** + * Gets or sets the stringified PreviousVersion to be stored/loaded, because System.Version itself isn\'t xml-serializable. + */ + 'previousVersionStr'?: string | null; + /** + * Gets or sets a value indicating whether to enable prometheus metrics exporting. + */ + 'enableMetrics'?: boolean; + 'enableNormalizedItemByNameIds'?: boolean; + /** + * Gets or sets a value indicating whether this instance is port authorized. + */ + 'isPortAuthorized'?: boolean; + /** + * Gets or sets a value indicating whether quick connect is available for use on this server. + */ + 'quickConnectAvailable'?: boolean; + /** + * Gets or sets a value indicating whether [enable case sensitive item ids]. + */ + 'enableCaseSensitiveItemIds'?: boolean; + 'disableLiveTvChannelUserDataName'?: boolean; + /** + * Gets or sets the metadata path. + */ + 'metadataPath'?: string; + 'metadataNetworkPath'?: string; + /** + * Gets or sets the preferred metadata language. + */ + 'preferredMetadataLanguage'?: string; + /** + * Gets or sets the metadata country code. + */ + 'metadataCountryCode'?: string; + /** + * Gets or sets characters to be replaced with a \' \' in strings to create a sort name. + */ + 'sortReplaceCharacters'?: Array; + /** + * Gets or sets characters to be removed from strings to create a sort name. + */ + 'sortRemoveCharacters'?: Array; + /** + * Gets or sets words to be removed from strings to create a sort name. + */ + 'sortRemoveWords'?: Array; + /** + * Gets or sets the minimum percentage of an item that must be played in order for playstate to be updated. + */ + 'minResumePct'?: number; + /** + * Gets or sets the maximum percentage of an item that can be played while still saving playstate. If this percentage is crossed playstate will be reset to the beginning and the item will be marked watched. + */ + 'maxResumePct'?: number; + /** + * Gets or sets the minimum duration that an item must have in order to be eligible for playstate updates.. + */ + 'minResumeDurationSeconds'?: number; + /** + * Gets or sets the minimum minutes of a book that must be played in order for playstate to be updated. + */ + 'minAudiobookResume'?: number; + /** + * Gets or sets the remaining minutes of a book that can be played while still saving playstate. If this percentage is crossed playstate will be reset to the beginning and the item will be marked watched. + */ + 'maxAudiobookResume'?: number; + /** + * Gets or sets the delay in seconds that we will wait after a file system change to try and discover what has been added/removed Some delay is necessary with some items because their creation is not atomic. It involves the creation of several different directories and files. + */ + 'libraryMonitorDelay'?: number; + 'imageSavingConvention'?: ImageSavingConvention; + 'metadataOptions'?: Array; + 'skipDeserializationForBasicTypes'?: boolean; + 'serverName'?: string; + 'uICulture'?: string; + 'saveMetadataHidden'?: boolean; + 'contentTypes'?: Array; + 'remoteClientBitrateLimit'?: number; + 'enableFolderView'?: boolean; + 'enableGroupingIntoCollections'?: boolean; + 'displaySpecialsWithinSeasons'?: boolean; + 'codecsUsed'?: Array; + 'pluginRepositories'?: Array; + 'enableExternalContentInSuggestions'?: boolean; + 'imageExtractionTimeoutMs'?: number; + 'pathSubstitutions'?: Array; + /** + * Gets or sets a value indicating whether slow server responses should be logged as a warning. + */ + 'enableSlowResponseWarning'?: boolean; + /** + * Gets or sets the threshold for the slow response time warning in ms. + */ + 'slowResponseThresholdMs'?: number; + /** + * Gets or sets the cors hosts. + */ + 'corsHosts'?: Array; + /** + * Gets or sets the number of days we should retain activity logs. + */ + 'activityLogRetentionDays'?: number | null; + /** + * Gets or sets the how the library scan fans out. + */ + 'libraryScanFanoutConcurrency'?: number; + /** + * Gets or sets the how many metadata refreshes can run concurrently. + */ + 'libraryMetadataRefreshConcurrency'?: number; + /** + * Gets or sets a value indicating whether older plugins should automatically be deleted from the plugin folder. + */ + 'removeOldPlugins'?: boolean; + /** + * Gets or sets a value indicating whether clients should be allowed to upload logs. + */ + 'allowClientLogUpload'?: boolean; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "logFileRetentionDays", + "baseName": "LogFileRetentionDays", + "type": "number" + }, + { + "name": "isStartupWizardCompleted", + "baseName": "IsStartupWizardCompleted", + "type": "boolean" + }, + { + "name": "cachePath", + "baseName": "CachePath", + "type": "string" + }, + { + "name": "previousVersion", + "baseName": "PreviousVersion", + "type": "string" + }, + { + "name": "previousVersionStr", + "baseName": "PreviousVersionStr", + "type": "string" + }, + { + "name": "enableMetrics", + "baseName": "EnableMetrics", + "type": "boolean" + }, + { + "name": "enableNormalizedItemByNameIds", + "baseName": "EnableNormalizedItemByNameIds", + "type": "boolean" + }, + { + "name": "isPortAuthorized", + "baseName": "IsPortAuthorized", + "type": "boolean" + }, + { + "name": "quickConnectAvailable", + "baseName": "QuickConnectAvailable", + "type": "boolean" + }, + { + "name": "enableCaseSensitiveItemIds", + "baseName": "EnableCaseSensitiveItemIds", + "type": "boolean" + }, + { + "name": "disableLiveTvChannelUserDataName", + "baseName": "DisableLiveTvChannelUserDataName", + "type": "boolean" + }, + { + "name": "metadataPath", + "baseName": "MetadataPath", + "type": "string" + }, + { + "name": "metadataNetworkPath", + "baseName": "MetadataNetworkPath", + "type": "string" + }, + { + "name": "preferredMetadataLanguage", + "baseName": "PreferredMetadataLanguage", + "type": "string" + }, + { + "name": "metadataCountryCode", + "baseName": "MetadataCountryCode", + "type": "string" + }, + { + "name": "sortReplaceCharacters", + "baseName": "SortReplaceCharacters", + "type": "Array" + }, + { + "name": "sortRemoveCharacters", + "baseName": "SortRemoveCharacters", + "type": "Array" + }, + { + "name": "sortRemoveWords", + "baseName": "SortRemoveWords", + "type": "Array" + }, + { + "name": "minResumePct", + "baseName": "MinResumePct", + "type": "number" + }, + { + "name": "maxResumePct", + "baseName": "MaxResumePct", + "type": "number" + }, + { + "name": "minResumeDurationSeconds", + "baseName": "MinResumeDurationSeconds", + "type": "number" + }, + { + "name": "minAudiobookResume", + "baseName": "MinAudiobookResume", + "type": "number" + }, + { + "name": "maxAudiobookResume", + "baseName": "MaxAudiobookResume", + "type": "number" + }, + { + "name": "libraryMonitorDelay", + "baseName": "LibraryMonitorDelay", + "type": "number" + }, + { + "name": "imageSavingConvention", + "baseName": "ImageSavingConvention", + "type": "ImageSavingConvention" + }, + { + "name": "metadataOptions", + "baseName": "MetadataOptions", + "type": "Array" + }, + { + "name": "skipDeserializationForBasicTypes", + "baseName": "SkipDeserializationForBasicTypes", + "type": "boolean" + }, + { + "name": "serverName", + "baseName": "ServerName", + "type": "string" + }, + { + "name": "uICulture", + "baseName": "UICulture", + "type": "string" + }, + { + "name": "saveMetadataHidden", + "baseName": "SaveMetadataHidden", + "type": "boolean" + }, + { + "name": "contentTypes", + "baseName": "ContentTypes", + "type": "Array" + }, + { + "name": "remoteClientBitrateLimit", + "baseName": "RemoteClientBitrateLimit", + "type": "number" + }, + { + "name": "enableFolderView", + "baseName": "EnableFolderView", + "type": "boolean" + }, + { + "name": "enableGroupingIntoCollections", + "baseName": "EnableGroupingIntoCollections", + "type": "boolean" + }, + { + "name": "displaySpecialsWithinSeasons", + "baseName": "DisplaySpecialsWithinSeasons", + "type": "boolean" + }, + { + "name": "codecsUsed", + "baseName": "CodecsUsed", + "type": "Array" + }, + { + "name": "pluginRepositories", + "baseName": "PluginRepositories", + "type": "Array" + }, + { + "name": "enableExternalContentInSuggestions", + "baseName": "EnableExternalContentInSuggestions", + "type": "boolean" + }, + { + "name": "imageExtractionTimeoutMs", + "baseName": "ImageExtractionTimeoutMs", + "type": "number" + }, + { + "name": "pathSubstitutions", + "baseName": "PathSubstitutions", + "type": "Array" + }, + { + "name": "enableSlowResponseWarning", + "baseName": "EnableSlowResponseWarning", + "type": "boolean" + }, + { + "name": "slowResponseThresholdMs", + "baseName": "SlowResponseThresholdMs", + "type": "number" + }, + { + "name": "corsHosts", + "baseName": "CorsHosts", + "type": "Array" + }, + { + "name": "activityLogRetentionDays", + "baseName": "ActivityLogRetentionDays", + "type": "number" + }, + { + "name": "libraryScanFanoutConcurrency", + "baseName": "LibraryScanFanoutConcurrency", + "type": "number" + }, + { + "name": "libraryMetadataRefreshConcurrency", + "baseName": "LibraryMetadataRefreshConcurrency", + "type": "number" + }, + { + "name": "removeOldPlugins", + "baseName": "RemoveOldPlugins", + "type": "boolean" + }, + { + "name": "allowClientLogUpload", + "baseName": "AllowClientLogUpload", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return UpdateConfigurationRequest.attributeTypeMap; + } +} + +export namespace UpdateConfigurationRequest { +} diff --git a/jellyfin/model/updateDeviceOptionsRequest.ts b/jellyfin/model/updateDeviceOptionsRequest.ts new file mode 100644 index 0000000..a6b1710 --- /dev/null +++ b/jellyfin/model/updateDeviceOptionsRequest.ts @@ -0,0 +1,55 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* A dto representing custom options for a device. +*/ +export class UpdateDeviceOptionsRequest { + /** + * Gets or sets the id. + */ + 'id'?: number; + /** + * Gets or sets the device id. + */ + 'deviceId'?: string | null; + /** + * Gets or sets the custom name. + */ + 'customName'?: string | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "id", + "baseName": "Id", + "type": "number" + }, + { + "name": "deviceId", + "baseName": "DeviceId", + "type": "string" + }, + { + "name": "customName", + "baseName": "CustomName", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return UpdateDeviceOptionsRequest.attributeTypeMap; + } +} + diff --git a/jellyfin/model/updateDisplayPreferencesRequest.ts b/jellyfin/model/updateDisplayPreferencesRequest.ts new file mode 100644 index 0000000..cb500da --- /dev/null +++ b/jellyfin/model/updateDisplayPreferencesRequest.ts @@ -0,0 +1,152 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { ScrollDirection } from './scrollDirection'; +import { SortOrder } from './sortOrder'; + +/** +* Defines the display preferences for any item that supports them (usually Folders). +*/ +export class UpdateDisplayPreferencesRequest { + /** + * Gets or sets the user id. + */ + 'id'?: string | null; + /** + * Gets or sets the type of the view. + */ + 'viewType'?: string | null; + /** + * Gets or sets the sort by. + */ + 'sortBy'?: string | null; + /** + * Gets or sets the index by. + */ + 'indexBy'?: string | null; + /** + * Gets or sets a value indicating whether [remember indexing]. + */ + 'rememberIndexing'?: boolean; + /** + * Gets or sets the height of the primary image. + */ + 'primaryImageHeight'?: number; + /** + * Gets or sets the width of the primary image. + */ + 'primaryImageWidth'?: number; + /** + * Gets or sets the custom prefs. + */ + 'customPrefs'?: { [key: string]: string; }; + 'scrollDirection'?: ScrollDirection; + /** + * Gets or sets a value indicating whether to show backdrops on this item. + */ + 'showBackdrop'?: boolean; + /** + * Gets or sets a value indicating whether [remember sorting]. + */ + 'rememberSorting'?: boolean; + 'sortOrder'?: SortOrder; + /** + * Gets or sets a value indicating whether [show sidebar]. + */ + 'showSidebar'?: boolean; + /** + * Gets or sets the client. + */ + 'client'?: string | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "id", + "baseName": "Id", + "type": "string" + }, + { + "name": "viewType", + "baseName": "ViewType", + "type": "string" + }, + { + "name": "sortBy", + "baseName": "SortBy", + "type": "string" + }, + { + "name": "indexBy", + "baseName": "IndexBy", + "type": "string" + }, + { + "name": "rememberIndexing", + "baseName": "RememberIndexing", + "type": "boolean" + }, + { + "name": "primaryImageHeight", + "baseName": "PrimaryImageHeight", + "type": "number" + }, + { + "name": "primaryImageWidth", + "baseName": "PrimaryImageWidth", + "type": "number" + }, + { + "name": "customPrefs", + "baseName": "CustomPrefs", + "type": "{ [key: string]: string; }" + }, + { + "name": "scrollDirection", + "baseName": "ScrollDirection", + "type": "ScrollDirection" + }, + { + "name": "showBackdrop", + "baseName": "ShowBackdrop", + "type": "boolean" + }, + { + "name": "rememberSorting", + "baseName": "RememberSorting", + "type": "boolean" + }, + { + "name": "sortOrder", + "baseName": "SortOrder", + "type": "SortOrder" + }, + { + "name": "showSidebar", + "baseName": "ShowSidebar", + "type": "boolean" + }, + { + "name": "client", + "baseName": "Client", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return UpdateDisplayPreferencesRequest.attributeTypeMap; + } +} + +export namespace UpdateDisplayPreferencesRequest { +} diff --git a/jellyfin/model/updateInitialConfigurationRequest.ts b/jellyfin/model/updateInitialConfigurationRequest.ts new file mode 100644 index 0000000..987a7a8 --- /dev/null +++ b/jellyfin/model/updateInitialConfigurationRequest.ts @@ -0,0 +1,55 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* The startup configuration DTO. +*/ +export class UpdateInitialConfigurationRequest { + /** + * Gets or sets UI language culture. + */ + 'uICulture'?: string | null; + /** + * Gets or sets the metadata country code. + */ + 'metadataCountryCode'?: string | null; + /** + * Gets or sets the preferred language for the metadata. + */ + 'preferredMetadataLanguage'?: string | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "uICulture", + "baseName": "UICulture", + "type": "string" + }, + { + "name": "metadataCountryCode", + "baseName": "MetadataCountryCode", + "type": "string" + }, + { + "name": "preferredMetadataLanguage", + "baseName": "PreferredMetadataLanguage", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return UpdateInitialConfigurationRequest.attributeTypeMap; + } +} + diff --git a/jellyfin/model/updateItemRequest.ts b/jellyfin/model/updateItemRequest.ts new file mode 100644 index 0000000..d03413d --- /dev/null +++ b/jellyfin/model/updateItemRequest.ts @@ -0,0 +1,1272 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { BaseItemDtoCurrentProgram } from './baseItemDtoCurrentProgram'; +import { BaseItemDtoImageBlurHashes } from './baseItemDtoImageBlurHashes'; +import { BaseItemDtoUserData } from './baseItemDtoUserData'; +import { BaseItemKind } from './baseItemKind'; +import { BaseItemPerson } from './baseItemPerson'; +import { ChannelType } from './channelType'; +import { ChapterInfo } from './chapterInfo'; +import { DayOfWeek } from './dayOfWeek'; +import { ExternalUrl } from './externalUrl'; +import { ImageOrientation } from './imageOrientation'; +import { IsoType } from './isoType'; +import { LocationType } from './locationType'; +import { MediaSourceInfo } from './mediaSourceInfo'; +import { MediaStream } from './mediaStream'; +import { MediaUrl } from './mediaUrl'; +import { MetadataField } from './metadataField'; +import { NameGuidPair } from './nameGuidPair'; +import { PlayAccess } from './playAccess'; +import { ProgramAudio } from './programAudio'; +import { Video3DFormat } from './video3DFormat'; +import { VideoType } from './videoType'; + +/** +* This is strictly used as a data transfer object from the api layer. This holds information about a BaseItem in a format that is convenient for the client. +*/ +export class UpdateItemRequest { + /** + * Gets or sets the name. + */ + 'name'?: string | null; + 'originalTitle'?: string | null; + /** + * Gets or sets the server identifier. + */ + 'serverId'?: string | null; + /** + * Gets or sets the id. + */ + 'id'?: string; + /** + * Gets or sets the etag. + */ + 'etag'?: string | null; + /** + * Gets or sets the type of the source. + */ + 'sourceType'?: string | null; + /** + * Gets or sets the playlist item identifier. + */ + 'playlistItemId'?: string | null; + /** + * Gets or sets the date created. + */ + 'dateCreated'?: Date | null; + 'dateLastMediaAdded'?: Date | null; + 'extraType'?: string | null; + 'airsBeforeSeasonNumber'?: number | null; + 'airsAfterSeasonNumber'?: number | null; + 'airsBeforeEpisodeNumber'?: number | null; + 'canDelete'?: boolean | null; + 'canDownload'?: boolean | null; + 'hasSubtitles'?: boolean | null; + 'preferredMetadataLanguage'?: string | null; + 'preferredMetadataCountryCode'?: string | null; + /** + * Gets or sets a value indicating whether [supports synchronize]. + */ + 'supportsSync'?: boolean | null; + 'container'?: string | null; + /** + * Gets or sets the name of the sort. + */ + 'sortName'?: string | null; + 'forcedSortName'?: string | null; + 'video3DFormat'?: Video3DFormat | null; + /** + * Gets or sets the premiere date. + */ + 'premiereDate'?: Date | null; + /** + * Gets or sets the external urls. + */ + 'externalUrls'?: Array | null; + /** + * Gets or sets the media versions. + */ + 'mediaSources'?: Array | null; + /** + * Gets or sets the critic rating. + */ + 'criticRating'?: number | null; + 'productionLocations'?: Array | null; + /** + * Gets or sets the path. + */ + 'path'?: string | null; + 'enableMediaSourceDisplay'?: boolean | null; + /** + * Gets or sets the official rating. + */ + 'officialRating'?: string | null; + /** + * Gets or sets the custom rating. + */ + 'customRating'?: string | null; + /** + * Gets or sets the channel identifier. + */ + 'channelId'?: string | null; + 'channelName'?: string | null; + /** + * Gets or sets the overview. + */ + 'overview'?: string | null; + /** + * Gets or sets the taglines. + */ + 'taglines'?: Array | null; + /** + * Gets or sets the genres. + */ + 'genres'?: Array | null; + /** + * Gets or sets the community rating. + */ + 'communityRating'?: number | null; + /** + * Gets or sets the cumulative run time ticks. + */ + 'cumulativeRunTimeTicks'?: number | null; + /** + * Gets or sets the run time ticks. + */ + 'runTimeTicks'?: number | null; + 'playAccess'?: PlayAccess | null; + /** + * Gets or sets the aspect ratio. + */ + 'aspectRatio'?: string | null; + /** + * Gets or sets the production year. + */ + 'productionYear'?: number | null; + /** + * Gets or sets a value indicating whether this instance is place holder. + */ + 'isPlaceHolder'?: boolean | null; + /** + * Gets or sets the number. + */ + 'number'?: string | null; + 'channelNumber'?: string | null; + /** + * Gets or sets the index number. + */ + 'indexNumber'?: number | null; + /** + * Gets or sets the index number end. + */ + 'indexNumberEnd'?: number | null; + /** + * Gets or sets the parent index number. + */ + 'parentIndexNumber'?: number | null; + /** + * Gets or sets the trailer urls. + */ + 'remoteTrailers'?: Array | null; + /** + * Gets or sets the provider ids. + */ + 'providerIds'?: { [key: string]: string; } | null; + /** + * Gets or sets a value indicating whether this instance is HD. + */ + 'isHD'?: boolean | null; + /** + * Gets or sets a value indicating whether this instance is folder. + */ + 'isFolder'?: boolean | null; + /** + * Gets or sets the parent id. + */ + 'parentId'?: string | null; + 'type'?: BaseItemKind; + /** + * Gets or sets the people. + */ + 'people'?: Array | null; + /** + * Gets or sets the studios. + */ + 'studios'?: Array | null; + 'genreItems'?: Array | null; + /** + * Gets or sets wether the item has a logo, this will hold the Id of the Parent that has one. + */ + 'parentLogoItemId'?: string | null; + /** + * Gets or sets wether the item has any backdrops, this will hold the Id of the Parent that has one. + */ + 'parentBackdropItemId'?: string | null; + /** + * Gets or sets the parent backdrop image tags. + */ + 'parentBackdropImageTags'?: Array | null; + /** + * Gets or sets the local trailer count. + */ + 'localTrailerCount'?: number | null; + 'userData'?: BaseItemDtoUserData | null; + /** + * Gets or sets the recursive item count. + */ + 'recursiveItemCount'?: number | null; + /** + * Gets or sets the child count. + */ + 'childCount'?: number | null; + /** + * Gets or sets the name of the series. + */ + 'seriesName'?: string | null; + /** + * Gets or sets the series id. + */ + 'seriesId'?: string | null; + /** + * Gets or sets the season identifier. + */ + 'seasonId'?: string | null; + /** + * Gets or sets the special feature count. + */ + 'specialFeatureCount'?: number | null; + /** + * Gets or sets the display preferences id. + */ + 'displayPreferencesId'?: string | null; + /** + * Gets or sets the status. + */ + 'status'?: string | null; + /** + * Gets or sets the air time. + */ + 'airTime'?: string | null; + /** + * Gets or sets the air days. + */ + 'airDays'?: Array | null; + /** + * Gets or sets the tags. + */ + 'tags'?: Array | null; + /** + * Gets or sets the primary image aspect ratio, after image enhancements. + */ + 'primaryImageAspectRatio'?: number | null; + /** + * Gets or sets the artists. + */ + 'artists'?: Array | null; + /** + * Gets or sets the artist items. + */ + 'artistItems'?: Array | null; + /** + * Gets or sets the album. + */ + 'album'?: string | null; + /** + * Gets or sets the type of the collection. + */ + 'collectionType'?: string | null; + /** + * Gets or sets the display order. + */ + 'displayOrder'?: string | null; + /** + * Gets or sets the album id. + */ + 'albumId'?: string | null; + /** + * Gets or sets the album image tag. + */ + 'albumPrimaryImageTag'?: string | null; + /** + * Gets or sets the series primary image tag. + */ + 'seriesPrimaryImageTag'?: string | null; + /** + * Gets or sets the album artist. + */ + 'albumArtist'?: string | null; + /** + * Gets or sets the album artists. + */ + 'albumArtists'?: Array | null; + /** + * Gets or sets the name of the season. + */ + 'seasonName'?: string | null; + /** + * Gets or sets the media streams. + */ + 'mediaStreams'?: Array | null; + 'videoType'?: VideoType | null; + /** + * Gets or sets the part count. + */ + 'partCount'?: number | null; + 'mediaSourceCount'?: number | null; + /** + * Gets or sets the image tags. + */ + 'imageTags'?: { [key: string]: string; } | null; + /** + * Gets or sets the backdrop image tags. + */ + 'backdropImageTags'?: Array | null; + /** + * Gets or sets the screenshot image tags. + */ + 'screenshotImageTags'?: Array | null; + /** + * Gets or sets the parent logo image tag. + */ + 'parentLogoImageTag'?: string | null; + /** + * Gets or sets wether the item has fan art, this will hold the Id of the Parent that has one. + */ + 'parentArtItemId'?: string | null; + /** + * Gets or sets the parent art image tag. + */ + 'parentArtImageTag'?: string | null; + /** + * Gets or sets the series thumb image tag. + */ + 'seriesThumbImageTag'?: string | null; + 'imageBlurHashes'?: BaseItemDtoImageBlurHashes | null; + /** + * Gets or sets the series studio. + */ + 'seriesStudio'?: string | null; + /** + * Gets or sets the parent thumb item id. + */ + 'parentThumbItemId'?: string | null; + /** + * Gets or sets the parent thumb image tag. + */ + 'parentThumbImageTag'?: string | null; + /** + * Gets or sets the parent primary image item identifier. + */ + 'parentPrimaryImageItemId'?: string | null; + /** + * Gets or sets the parent primary image tag. + */ + 'parentPrimaryImageTag'?: string | null; + /** + * Gets or sets the chapters. + */ + 'chapters'?: Array | null; + 'locationType'?: LocationType | null; + 'isoType'?: IsoType | null; + /** + * Gets or sets the type of the media. + */ + 'mediaType'?: string | null; + /** + * Gets or sets the end date. + */ + 'endDate'?: Date | null; + /** + * Gets or sets the locked fields. + */ + 'lockedFields'?: Array | null; + /** + * Gets or sets the trailer count. + */ + 'trailerCount'?: number | null; + /** + * Gets or sets the movie count. + */ + 'movieCount'?: number | null; + /** + * Gets or sets the series count. + */ + 'seriesCount'?: number | null; + 'programCount'?: number | null; + /** + * Gets or sets the episode count. + */ + 'episodeCount'?: number | null; + /** + * Gets or sets the song count. + */ + 'songCount'?: number | null; + /** + * Gets or sets the album count. + */ + 'albumCount'?: number | null; + 'artistCount'?: number | null; + /** + * Gets or sets the music video count. + */ + 'musicVideoCount'?: number | null; + /** + * Gets or sets a value indicating whether [enable internet providers]. + */ + 'lockData'?: boolean | null; + 'width'?: number | null; + 'height'?: number | null; + 'cameraMake'?: string | null; + 'cameraModel'?: string | null; + 'software'?: string | null; + 'exposureTime'?: number | null; + 'focalLength'?: number | null; + 'imageOrientation'?: ImageOrientation | null; + 'aperture'?: number | null; + 'shutterSpeed'?: number | null; + 'latitude'?: number | null; + 'longitude'?: number | null; + 'altitude'?: number | null; + 'isoSpeedRating'?: number | null; + /** + * Gets or sets the series timer identifier. + */ + 'seriesTimerId'?: string | null; + /** + * Gets or sets the program identifier. + */ + 'programId'?: string | null; + /** + * Gets or sets the channel primary image tag. + */ + 'channelPrimaryImageTag'?: string | null; + /** + * Gets or sets the start date of the recording, in UTC. + */ + 'startDate'?: Date | null; + /** + * Gets or sets the completion percentage. + */ + 'completionPercentage'?: number | null; + /** + * Gets or sets a value indicating whether this instance is repeat. + */ + 'isRepeat'?: boolean | null; + /** + * Gets or sets the episode title. + */ + 'episodeTitle'?: string | null; + 'channelType'?: ChannelType | null; + 'audio'?: ProgramAudio | null; + /** + * Gets or sets a value indicating whether this instance is movie. + */ + 'isMovie'?: boolean | null; + /** + * Gets or sets a value indicating whether this instance is sports. + */ + 'isSports'?: boolean | null; + /** + * Gets or sets a value indicating whether this instance is series. + */ + 'isSeries'?: boolean | null; + /** + * Gets or sets a value indicating whether this instance is live. + */ + 'isLive'?: boolean | null; + /** + * Gets or sets a value indicating whether this instance is news. + */ + 'isNews'?: boolean | null; + /** + * Gets or sets a value indicating whether this instance is kids. + */ + 'isKids'?: boolean | null; + /** + * Gets or sets a value indicating whether this instance is premiere. + */ + 'isPremiere'?: boolean | null; + /** + * Gets or sets the timer identifier. + */ + 'timerId'?: string | null; + 'currentProgram'?: BaseItemDtoCurrentProgram | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "Name", + "type": "string" + }, + { + "name": "originalTitle", + "baseName": "OriginalTitle", + "type": "string" + }, + { + "name": "serverId", + "baseName": "ServerId", + "type": "string" + }, + { + "name": "id", + "baseName": "Id", + "type": "string" + }, + { + "name": "etag", + "baseName": "Etag", + "type": "string" + }, + { + "name": "sourceType", + "baseName": "SourceType", + "type": "string" + }, + { + "name": "playlistItemId", + "baseName": "PlaylistItemId", + "type": "string" + }, + { + "name": "dateCreated", + "baseName": "DateCreated", + "type": "Date" + }, + { + "name": "dateLastMediaAdded", + "baseName": "DateLastMediaAdded", + "type": "Date" + }, + { + "name": "extraType", + "baseName": "ExtraType", + "type": "string" + }, + { + "name": "airsBeforeSeasonNumber", + "baseName": "AirsBeforeSeasonNumber", + "type": "number" + }, + { + "name": "airsAfterSeasonNumber", + "baseName": "AirsAfterSeasonNumber", + "type": "number" + }, + { + "name": "airsBeforeEpisodeNumber", + "baseName": "AirsBeforeEpisodeNumber", + "type": "number" + }, + { + "name": "canDelete", + "baseName": "CanDelete", + "type": "boolean" + }, + { + "name": "canDownload", + "baseName": "CanDownload", + "type": "boolean" + }, + { + "name": "hasSubtitles", + "baseName": "HasSubtitles", + "type": "boolean" + }, + { + "name": "preferredMetadataLanguage", + "baseName": "PreferredMetadataLanguage", + "type": "string" + }, + { + "name": "preferredMetadataCountryCode", + "baseName": "PreferredMetadataCountryCode", + "type": "string" + }, + { + "name": "supportsSync", + "baseName": "SupportsSync", + "type": "boolean" + }, + { + "name": "container", + "baseName": "Container", + "type": "string" + }, + { + "name": "sortName", + "baseName": "SortName", + "type": "string" + }, + { + "name": "forcedSortName", + "baseName": "ForcedSortName", + "type": "string" + }, + { + "name": "video3DFormat", + "baseName": "Video3DFormat", + "type": "Video3DFormat" + }, + { + "name": "premiereDate", + "baseName": "PremiereDate", + "type": "Date" + }, + { + "name": "externalUrls", + "baseName": "ExternalUrls", + "type": "Array" + }, + { + "name": "mediaSources", + "baseName": "MediaSources", + "type": "Array" + }, + { + "name": "criticRating", + "baseName": "CriticRating", + "type": "number" + }, + { + "name": "productionLocations", + "baseName": "ProductionLocations", + "type": "Array" + }, + { + "name": "path", + "baseName": "Path", + "type": "string" + }, + { + "name": "enableMediaSourceDisplay", + "baseName": "EnableMediaSourceDisplay", + "type": "boolean" + }, + { + "name": "officialRating", + "baseName": "OfficialRating", + "type": "string" + }, + { + "name": "customRating", + "baseName": "CustomRating", + "type": "string" + }, + { + "name": "channelId", + "baseName": "ChannelId", + "type": "string" + }, + { + "name": "channelName", + "baseName": "ChannelName", + "type": "string" + }, + { + "name": "overview", + "baseName": "Overview", + "type": "string" + }, + { + "name": "taglines", + "baseName": "Taglines", + "type": "Array" + }, + { + "name": "genres", + "baseName": "Genres", + "type": "Array" + }, + { + "name": "communityRating", + "baseName": "CommunityRating", + "type": "number" + }, + { + "name": "cumulativeRunTimeTicks", + "baseName": "CumulativeRunTimeTicks", + "type": "number" + }, + { + "name": "runTimeTicks", + "baseName": "RunTimeTicks", + "type": "number" + }, + { + "name": "playAccess", + "baseName": "PlayAccess", + "type": "PlayAccess" + }, + { + "name": "aspectRatio", + "baseName": "AspectRatio", + "type": "string" + }, + { + "name": "productionYear", + "baseName": "ProductionYear", + "type": "number" + }, + { + "name": "isPlaceHolder", + "baseName": "IsPlaceHolder", + "type": "boolean" + }, + { + "name": "number", + "baseName": "Number", + "type": "string" + }, + { + "name": "channelNumber", + "baseName": "ChannelNumber", + "type": "string" + }, + { + "name": "indexNumber", + "baseName": "IndexNumber", + "type": "number" + }, + { + "name": "indexNumberEnd", + "baseName": "IndexNumberEnd", + "type": "number" + }, + { + "name": "parentIndexNumber", + "baseName": "ParentIndexNumber", + "type": "number" + }, + { + "name": "remoteTrailers", + "baseName": "RemoteTrailers", + "type": "Array" + }, + { + "name": "providerIds", + "baseName": "ProviderIds", + "type": "{ [key: string]: string; }" + }, + { + "name": "isHD", + "baseName": "IsHD", + "type": "boolean" + }, + { + "name": "isFolder", + "baseName": "IsFolder", + "type": "boolean" + }, + { + "name": "parentId", + "baseName": "ParentId", + "type": "string" + }, + { + "name": "type", + "baseName": "Type", + "type": "BaseItemKind" + }, + { + "name": "people", + "baseName": "People", + "type": "Array" + }, + { + "name": "studios", + "baseName": "Studios", + "type": "Array" + }, + { + "name": "genreItems", + "baseName": "GenreItems", + "type": "Array" + }, + { + "name": "parentLogoItemId", + "baseName": "ParentLogoItemId", + "type": "string" + }, + { + "name": "parentBackdropItemId", + "baseName": "ParentBackdropItemId", + "type": "string" + }, + { + "name": "parentBackdropImageTags", + "baseName": "ParentBackdropImageTags", + "type": "Array" + }, + { + "name": "localTrailerCount", + "baseName": "LocalTrailerCount", + "type": "number" + }, + { + "name": "userData", + "baseName": "UserData", + "type": "BaseItemDtoUserData" + }, + { + "name": "recursiveItemCount", + "baseName": "RecursiveItemCount", + "type": "number" + }, + { + "name": "childCount", + "baseName": "ChildCount", + "type": "number" + }, + { + "name": "seriesName", + "baseName": "SeriesName", + "type": "string" + }, + { + "name": "seriesId", + "baseName": "SeriesId", + "type": "string" + }, + { + "name": "seasonId", + "baseName": "SeasonId", + "type": "string" + }, + { + "name": "specialFeatureCount", + "baseName": "SpecialFeatureCount", + "type": "number" + }, + { + "name": "displayPreferencesId", + "baseName": "DisplayPreferencesId", + "type": "string" + }, + { + "name": "status", + "baseName": "Status", + "type": "string" + }, + { + "name": "airTime", + "baseName": "AirTime", + "type": "string" + }, + { + "name": "airDays", + "baseName": "AirDays", + "type": "Array" + }, + { + "name": "tags", + "baseName": "Tags", + "type": "Array" + }, + { + "name": "primaryImageAspectRatio", + "baseName": "PrimaryImageAspectRatio", + "type": "number" + }, + { + "name": "artists", + "baseName": "Artists", + "type": "Array" + }, + { + "name": "artistItems", + "baseName": "ArtistItems", + "type": "Array" + }, + { + "name": "album", + "baseName": "Album", + "type": "string" + }, + { + "name": "collectionType", + "baseName": "CollectionType", + "type": "string" + }, + { + "name": "displayOrder", + "baseName": "DisplayOrder", + "type": "string" + }, + { + "name": "albumId", + "baseName": "AlbumId", + "type": "string" + }, + { + "name": "albumPrimaryImageTag", + "baseName": "AlbumPrimaryImageTag", + "type": "string" + }, + { + "name": "seriesPrimaryImageTag", + "baseName": "SeriesPrimaryImageTag", + "type": "string" + }, + { + "name": "albumArtist", + "baseName": "AlbumArtist", + "type": "string" + }, + { + "name": "albumArtists", + "baseName": "AlbumArtists", + "type": "Array" + }, + { + "name": "seasonName", + "baseName": "SeasonName", + "type": "string" + }, + { + "name": "mediaStreams", + "baseName": "MediaStreams", + "type": "Array" + }, + { + "name": "videoType", + "baseName": "VideoType", + "type": "VideoType" + }, + { + "name": "partCount", + "baseName": "PartCount", + "type": "number" + }, + { + "name": "mediaSourceCount", + "baseName": "MediaSourceCount", + "type": "number" + }, + { + "name": "imageTags", + "baseName": "ImageTags", + "type": "{ [key: string]: string; }" + }, + { + "name": "backdropImageTags", + "baseName": "BackdropImageTags", + "type": "Array" + }, + { + "name": "screenshotImageTags", + "baseName": "ScreenshotImageTags", + "type": "Array" + }, + { + "name": "parentLogoImageTag", + "baseName": "ParentLogoImageTag", + "type": "string" + }, + { + "name": "parentArtItemId", + "baseName": "ParentArtItemId", + "type": "string" + }, + { + "name": "parentArtImageTag", + "baseName": "ParentArtImageTag", + "type": "string" + }, + { + "name": "seriesThumbImageTag", + "baseName": "SeriesThumbImageTag", + "type": "string" + }, + { + "name": "imageBlurHashes", + "baseName": "ImageBlurHashes", + "type": "BaseItemDtoImageBlurHashes" + }, + { + "name": "seriesStudio", + "baseName": "SeriesStudio", + "type": "string" + }, + { + "name": "parentThumbItemId", + "baseName": "ParentThumbItemId", + "type": "string" + }, + { + "name": "parentThumbImageTag", + "baseName": "ParentThumbImageTag", + "type": "string" + }, + { + "name": "parentPrimaryImageItemId", + "baseName": "ParentPrimaryImageItemId", + "type": "string" + }, + { + "name": "parentPrimaryImageTag", + "baseName": "ParentPrimaryImageTag", + "type": "string" + }, + { + "name": "chapters", + "baseName": "Chapters", + "type": "Array" + }, + { + "name": "locationType", + "baseName": "LocationType", + "type": "LocationType" + }, + { + "name": "isoType", + "baseName": "IsoType", + "type": "IsoType" + }, + { + "name": "mediaType", + "baseName": "MediaType", + "type": "string" + }, + { + "name": "endDate", + "baseName": "EndDate", + "type": "Date" + }, + { + "name": "lockedFields", + "baseName": "LockedFields", + "type": "Array" + }, + { + "name": "trailerCount", + "baseName": "TrailerCount", + "type": "number" + }, + { + "name": "movieCount", + "baseName": "MovieCount", + "type": "number" + }, + { + "name": "seriesCount", + "baseName": "SeriesCount", + "type": "number" + }, + { + "name": "programCount", + "baseName": "ProgramCount", + "type": "number" + }, + { + "name": "episodeCount", + "baseName": "EpisodeCount", + "type": "number" + }, + { + "name": "songCount", + "baseName": "SongCount", + "type": "number" + }, + { + "name": "albumCount", + "baseName": "AlbumCount", + "type": "number" + }, + { + "name": "artistCount", + "baseName": "ArtistCount", + "type": "number" + }, + { + "name": "musicVideoCount", + "baseName": "MusicVideoCount", + "type": "number" + }, + { + "name": "lockData", + "baseName": "LockData", + "type": "boolean" + }, + { + "name": "width", + "baseName": "Width", + "type": "number" + }, + { + "name": "height", + "baseName": "Height", + "type": "number" + }, + { + "name": "cameraMake", + "baseName": "CameraMake", + "type": "string" + }, + { + "name": "cameraModel", + "baseName": "CameraModel", + "type": "string" + }, + { + "name": "software", + "baseName": "Software", + "type": "string" + }, + { + "name": "exposureTime", + "baseName": "ExposureTime", + "type": "number" + }, + { + "name": "focalLength", + "baseName": "FocalLength", + "type": "number" + }, + { + "name": "imageOrientation", + "baseName": "ImageOrientation", + "type": "ImageOrientation" + }, + { + "name": "aperture", + "baseName": "Aperture", + "type": "number" + }, + { + "name": "shutterSpeed", + "baseName": "ShutterSpeed", + "type": "number" + }, + { + "name": "latitude", + "baseName": "Latitude", + "type": "number" + }, + { + "name": "longitude", + "baseName": "Longitude", + "type": "number" + }, + { + "name": "altitude", + "baseName": "Altitude", + "type": "number" + }, + { + "name": "isoSpeedRating", + "baseName": "IsoSpeedRating", + "type": "number" + }, + { + "name": "seriesTimerId", + "baseName": "SeriesTimerId", + "type": "string" + }, + { + "name": "programId", + "baseName": "ProgramId", + "type": "string" + }, + { + "name": "channelPrimaryImageTag", + "baseName": "ChannelPrimaryImageTag", + "type": "string" + }, + { + "name": "startDate", + "baseName": "StartDate", + "type": "Date" + }, + { + "name": "completionPercentage", + "baseName": "CompletionPercentage", + "type": "number" + }, + { + "name": "isRepeat", + "baseName": "IsRepeat", + "type": "boolean" + }, + { + "name": "episodeTitle", + "baseName": "EpisodeTitle", + "type": "string" + }, + { + "name": "channelType", + "baseName": "ChannelType", + "type": "ChannelType" + }, + { + "name": "audio", + "baseName": "Audio", + "type": "ProgramAudio" + }, + { + "name": "isMovie", + "baseName": "IsMovie", + "type": "boolean" + }, + { + "name": "isSports", + "baseName": "IsSports", + "type": "boolean" + }, + { + "name": "isSeries", + "baseName": "IsSeries", + "type": "boolean" + }, + { + "name": "isLive", + "baseName": "IsLive", + "type": "boolean" + }, + { + "name": "isNews", + "baseName": "IsNews", + "type": "boolean" + }, + { + "name": "isKids", + "baseName": "IsKids", + "type": "boolean" + }, + { + "name": "isPremiere", + "baseName": "IsPremiere", + "type": "boolean" + }, + { + "name": "timerId", + "baseName": "TimerId", + "type": "string" + }, + { + "name": "currentProgram", + "baseName": "CurrentProgram", + "type": "BaseItemDtoCurrentProgram" + } ]; + + static getAttributeTypeMap() { + return UpdateItemRequest.attributeTypeMap; + } +} + +export namespace UpdateItemRequest { +} diff --git a/jellyfin/model/updateLibraryOptionsDto.ts b/jellyfin/model/updateLibraryOptionsDto.ts new file mode 100644 index 0000000..fabf279 --- /dev/null +++ b/jellyfin/model/updateLibraryOptionsDto.ts @@ -0,0 +1,44 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { AddVirtualFolderDtoLibraryOptions } from './addVirtualFolderDtoLibraryOptions'; + +/** +* Update library options dto. +*/ +export class UpdateLibraryOptionsDto { + /** + * Gets or sets the library item id. + */ + 'id'?: string; + 'libraryOptions'?: AddVirtualFolderDtoLibraryOptions | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "id", + "baseName": "Id", + "type": "string" + }, + { + "name": "libraryOptions", + "baseName": "LibraryOptions", + "type": "AddVirtualFolderDtoLibraryOptions" + } ]; + + static getAttributeTypeMap() { + return UpdateLibraryOptionsDto.attributeTypeMap; + } +} + diff --git a/jellyfin/model/updateLibraryOptionsRequest.ts b/jellyfin/model/updateLibraryOptionsRequest.ts new file mode 100644 index 0000000..8a6c6c8 --- /dev/null +++ b/jellyfin/model/updateLibraryOptionsRequest.ts @@ -0,0 +1,44 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { AddVirtualFolderDtoLibraryOptions } from './addVirtualFolderDtoLibraryOptions'; + +/** +* Update library options dto. +*/ +export class UpdateLibraryOptionsRequest { + /** + * Gets or sets the library item id. + */ + 'id'?: string; + 'libraryOptions'?: AddVirtualFolderDtoLibraryOptions | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "id", + "baseName": "Id", + "type": "string" + }, + { + "name": "libraryOptions", + "baseName": "LibraryOptions", + "type": "AddVirtualFolderDtoLibraryOptions" + } ]; + + static getAttributeTypeMap() { + return UpdateLibraryOptionsRequest.attributeTypeMap; + } +} + diff --git a/jellyfin/model/updateMediaEncoderPathRequest.ts b/jellyfin/model/updateMediaEncoderPathRequest.ts new file mode 100644 index 0000000..a2c30c7 --- /dev/null +++ b/jellyfin/model/updateMediaEncoderPathRequest.ts @@ -0,0 +1,46 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Media Encoder Path Dto. +*/ +export class UpdateMediaEncoderPathRequest { + /** + * Gets or sets media encoder path. + */ + 'path'?: string; + /** + * Gets or sets media encoder path type. + */ + 'pathType'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "path", + "baseName": "Path", + "type": "string" + }, + { + "name": "pathType", + "baseName": "PathType", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return UpdateMediaEncoderPathRequest.attributeTypeMap; + } +} + diff --git a/jellyfin/model/updateMediaPathRequest.ts b/jellyfin/model/updateMediaPathRequest.ts new file mode 100644 index 0000000..12cdea6 --- /dev/null +++ b/jellyfin/model/updateMediaPathRequest.ts @@ -0,0 +1,44 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { UpdateMediaPathRequestDtoPathInfo } from './updateMediaPathRequestDtoPathInfo'; + +/** +* Update library options dto. +*/ +export class UpdateMediaPathRequest { + /** + * Gets or sets the library name. + */ + 'name': string; + 'pathInfo': UpdateMediaPathRequestDtoPathInfo; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "Name", + "type": "string" + }, + { + "name": "pathInfo", + "baseName": "PathInfo", + "type": "UpdateMediaPathRequestDtoPathInfo" + } ]; + + static getAttributeTypeMap() { + return UpdateMediaPathRequest.attributeTypeMap; + } +} + diff --git a/jellyfin/model/updateMediaPathRequestDto.ts b/jellyfin/model/updateMediaPathRequestDto.ts new file mode 100644 index 0000000..5d78f9b --- /dev/null +++ b/jellyfin/model/updateMediaPathRequestDto.ts @@ -0,0 +1,44 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { UpdateMediaPathRequestDtoPathInfo } from './updateMediaPathRequestDtoPathInfo'; + +/** +* Update library options dto. +*/ +export class UpdateMediaPathRequestDto { + /** + * Gets or sets the library name. + */ + 'name': string; + 'pathInfo': UpdateMediaPathRequestDtoPathInfo; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "Name", + "type": "string" + }, + { + "name": "pathInfo", + "baseName": "PathInfo", + "type": "UpdateMediaPathRequestDtoPathInfo" + } ]; + + static getAttributeTypeMap() { + return UpdateMediaPathRequestDto.attributeTypeMap; + } +} + diff --git a/jellyfin/model/updateMediaPathRequestDtoPathInfo.ts b/jellyfin/model/updateMediaPathRequestDtoPathInfo.ts new file mode 100644 index 0000000..fac227f --- /dev/null +++ b/jellyfin/model/updateMediaPathRequestDtoPathInfo.ts @@ -0,0 +1,40 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Gets or sets library folder path information. +*/ +export class UpdateMediaPathRequestDtoPathInfo { + 'path'?: string; + 'networkPath'?: string | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "path", + "baseName": "Path", + "type": "string" + }, + { + "name": "networkPath", + "baseName": "NetworkPath", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return UpdateMediaPathRequestDtoPathInfo.attributeTypeMap; + } +} + diff --git a/jellyfin/model/updateStartupUserRequest.ts b/jellyfin/model/updateStartupUserRequest.ts new file mode 100644 index 0000000..ef700c7 --- /dev/null +++ b/jellyfin/model/updateStartupUserRequest.ts @@ -0,0 +1,46 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* The startup user DTO. +*/ +export class UpdateStartupUserRequest { + /** + * Gets or sets the username. + */ + 'name'?: string | null; + /** + * Gets or sets the user\'s password. + */ + 'password'?: string | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "Name", + "type": "string" + }, + { + "name": "password", + "baseName": "Password", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return UpdateStartupUserRequest.attributeTypeMap; + } +} + diff --git a/jellyfin/model/updateUserConfigurationRequest.ts b/jellyfin/model/updateUserConfigurationRequest.ts new file mode 100644 index 0000000..c1af0a0 --- /dev/null +++ b/jellyfin/model/updateUserConfigurationRequest.ts @@ -0,0 +1,130 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { SubtitlePlaybackMode } from './subtitlePlaybackMode'; + +/** +* Class UserConfiguration. +*/ +export class UpdateUserConfigurationRequest { + /** + * Gets or sets the audio language preference. + */ + 'audioLanguagePreference'?: string | null; + /** + * Gets or sets a value indicating whether [play default audio track]. + */ + 'playDefaultAudioTrack'?: boolean; + /** + * Gets or sets the subtitle language preference. + */ + 'subtitleLanguagePreference'?: string | null; + 'displayMissingEpisodes'?: boolean; + 'groupedFolders'?: Array; + 'subtitleMode'?: SubtitlePlaybackMode; + 'displayCollectionsView'?: boolean; + 'enableLocalPassword'?: boolean; + 'orderedViews'?: Array; + 'latestItemsExcludes'?: Array; + 'myMediaExcludes'?: Array; + 'hidePlayedInLatest'?: boolean; + 'rememberAudioSelections'?: boolean; + 'rememberSubtitleSelections'?: boolean; + 'enableNextEpisodeAutoPlay'?: boolean; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "audioLanguagePreference", + "baseName": "AudioLanguagePreference", + "type": "string" + }, + { + "name": "playDefaultAudioTrack", + "baseName": "PlayDefaultAudioTrack", + "type": "boolean" + }, + { + "name": "subtitleLanguagePreference", + "baseName": "SubtitleLanguagePreference", + "type": "string" + }, + { + "name": "displayMissingEpisodes", + "baseName": "DisplayMissingEpisodes", + "type": "boolean" + }, + { + "name": "groupedFolders", + "baseName": "GroupedFolders", + "type": "Array" + }, + { + "name": "subtitleMode", + "baseName": "SubtitleMode", + "type": "SubtitlePlaybackMode" + }, + { + "name": "displayCollectionsView", + "baseName": "DisplayCollectionsView", + "type": "boolean" + }, + { + "name": "enableLocalPassword", + "baseName": "EnableLocalPassword", + "type": "boolean" + }, + { + "name": "orderedViews", + "baseName": "OrderedViews", + "type": "Array" + }, + { + "name": "latestItemsExcludes", + "baseName": "LatestItemsExcludes", + "type": "Array" + }, + { + "name": "myMediaExcludes", + "baseName": "MyMediaExcludes", + "type": "Array" + }, + { + "name": "hidePlayedInLatest", + "baseName": "HidePlayedInLatest", + "type": "boolean" + }, + { + "name": "rememberAudioSelections", + "baseName": "RememberAudioSelections", + "type": "boolean" + }, + { + "name": "rememberSubtitleSelections", + "baseName": "RememberSubtitleSelections", + "type": "boolean" + }, + { + "name": "enableNextEpisodeAutoPlay", + "baseName": "EnableNextEpisodeAutoPlay", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return UpdateUserConfigurationRequest.attributeTypeMap; + } +} + +export namespace UpdateUserConfigurationRequest { +} diff --git a/jellyfin/model/updateUserEasyPassword.ts b/jellyfin/model/updateUserEasyPassword.ts new file mode 100644 index 0000000..6331e23 --- /dev/null +++ b/jellyfin/model/updateUserEasyPassword.ts @@ -0,0 +1,55 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* The update user easy password request body. +*/ +export class UpdateUserEasyPassword { + /** + * Gets or sets the new sha1-hashed password. + */ + 'newPassword'?: string | null; + /** + * Gets or sets the new password. + */ + 'newPw'?: string | null; + /** + * Gets or sets a value indicating whether to reset the password. + */ + 'resetPassword'?: boolean; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "newPassword", + "baseName": "NewPassword", + "type": "string" + }, + { + "name": "newPw", + "baseName": "NewPw", + "type": "string" + }, + { + "name": "resetPassword", + "baseName": "ResetPassword", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return UpdateUserEasyPassword.attributeTypeMap; + } +} + diff --git a/jellyfin/model/updateUserEasyPasswordRequest.ts b/jellyfin/model/updateUserEasyPasswordRequest.ts new file mode 100644 index 0000000..77349af --- /dev/null +++ b/jellyfin/model/updateUserEasyPasswordRequest.ts @@ -0,0 +1,55 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* The update user easy password request body. +*/ +export class UpdateUserEasyPasswordRequest { + /** + * Gets or sets the new sha1-hashed password. + */ + 'newPassword'?: string | null; + /** + * Gets or sets the new password. + */ + 'newPw'?: string | null; + /** + * Gets or sets a value indicating whether to reset the password. + */ + 'resetPassword'?: boolean; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "newPassword", + "baseName": "NewPassword", + "type": "string" + }, + { + "name": "newPw", + "baseName": "NewPw", + "type": "string" + }, + { + "name": "resetPassword", + "baseName": "ResetPassword", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return UpdateUserEasyPasswordRequest.attributeTypeMap; + } +} + diff --git a/jellyfin/model/updateUserPassword.ts b/jellyfin/model/updateUserPassword.ts new file mode 100644 index 0000000..1e723a7 --- /dev/null +++ b/jellyfin/model/updateUserPassword.ts @@ -0,0 +1,64 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* The update user password request body. +*/ +export class UpdateUserPassword { + /** + * Gets or sets the current sha1-hashed password. + */ + 'currentPassword'?: string | null; + /** + * Gets or sets the current plain text password. + */ + 'currentPw'?: string | null; + /** + * Gets or sets the new plain text password. + */ + 'newPw'?: string | null; + /** + * Gets or sets a value indicating whether to reset the password. + */ + 'resetPassword'?: boolean; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "currentPassword", + "baseName": "CurrentPassword", + "type": "string" + }, + { + "name": "currentPw", + "baseName": "CurrentPw", + "type": "string" + }, + { + "name": "newPw", + "baseName": "NewPw", + "type": "string" + }, + { + "name": "resetPassword", + "baseName": "ResetPassword", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return UpdateUserPassword.attributeTypeMap; + } +} + diff --git a/jellyfin/model/updateUserPasswordRequest.ts b/jellyfin/model/updateUserPasswordRequest.ts new file mode 100644 index 0000000..b2f6423 --- /dev/null +++ b/jellyfin/model/updateUserPasswordRequest.ts @@ -0,0 +1,64 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* The update user password request body. +*/ +export class UpdateUserPasswordRequest { + /** + * Gets or sets the current sha1-hashed password. + */ + 'currentPassword'?: string | null; + /** + * Gets or sets the current plain text password. + */ + 'currentPw'?: string | null; + /** + * Gets or sets the new plain text password. + */ + 'newPw'?: string | null; + /** + * Gets or sets a value indicating whether to reset the password. + */ + 'resetPassword'?: boolean; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "currentPassword", + "baseName": "CurrentPassword", + "type": "string" + }, + { + "name": "currentPw", + "baseName": "CurrentPw", + "type": "string" + }, + { + "name": "newPw", + "baseName": "NewPw", + "type": "string" + }, + { + "name": "resetPassword", + "baseName": "ResetPassword", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return UpdateUserPasswordRequest.attributeTypeMap; + } +} + diff --git a/jellyfin/model/updateUserPolicyRequest.ts b/jellyfin/model/updateUserPolicyRequest.ts new file mode 100644 index 0000000..e58d404 --- /dev/null +++ b/jellyfin/model/updateUserPolicyRequest.ts @@ -0,0 +1,279 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { AccessSchedule } from './accessSchedule'; +import { SyncPlayUserAccessType } from './syncPlayUserAccessType'; +import { UnratedItem } from './unratedItem'; + +export class UpdateUserPolicyRequest { + /** + * Gets or sets a value indicating whether this instance is administrator. + */ + 'isAdministrator'?: boolean; + /** + * Gets or sets a value indicating whether this instance is hidden. + */ + 'isHidden'?: boolean; + /** + * Gets or sets a value indicating whether this instance is disabled. + */ + 'isDisabled'?: boolean; + /** + * Gets or sets the max parental rating. + */ + 'maxParentalRating'?: number | null; + 'blockedTags'?: Array | null; + 'enableUserPreferenceAccess'?: boolean; + 'accessSchedules'?: Array | null; + 'blockUnratedItems'?: Array | null; + 'enableRemoteControlOfOtherUsers'?: boolean; + 'enableSharedDeviceControl'?: boolean; + 'enableRemoteAccess'?: boolean; + 'enableLiveTvManagement'?: boolean; + 'enableLiveTvAccess'?: boolean; + 'enableMediaPlayback'?: boolean; + 'enableAudioPlaybackTranscoding'?: boolean; + 'enableVideoPlaybackTranscoding'?: boolean; + 'enablePlaybackRemuxing'?: boolean; + 'forceRemoteSourceTranscoding'?: boolean; + 'enableContentDeletion'?: boolean; + 'enableContentDeletionFromFolders'?: Array | null; + 'enableContentDownloading'?: boolean; + /** + * Gets or sets a value indicating whether [enable synchronize]. + */ + 'enableSyncTranscoding'?: boolean; + 'enableMediaConversion'?: boolean; + 'enabledDevices'?: Array | null; + 'enableAllDevices'?: boolean; + 'enabledChannels'?: Array | null; + 'enableAllChannels'?: boolean; + 'enabledFolders'?: Array | null; + 'enableAllFolders'?: boolean; + 'invalidLoginAttemptCount'?: number; + 'loginAttemptsBeforeLockout'?: number; + 'maxActiveSessions'?: number; + 'enablePublicSharing'?: boolean; + 'blockedMediaFolders'?: Array | null; + 'blockedChannels'?: Array | null; + 'remoteClientBitrateLimit'?: number; + 'authenticationProviderId'?: string | null; + 'passwordResetProviderId'?: string | null; + 'syncPlayAccess'?: SyncPlayUserAccessType; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "isAdministrator", + "baseName": "IsAdministrator", + "type": "boolean" + }, + { + "name": "isHidden", + "baseName": "IsHidden", + "type": "boolean" + }, + { + "name": "isDisabled", + "baseName": "IsDisabled", + "type": "boolean" + }, + { + "name": "maxParentalRating", + "baseName": "MaxParentalRating", + "type": "number" + }, + { + "name": "blockedTags", + "baseName": "BlockedTags", + "type": "Array" + }, + { + "name": "enableUserPreferenceAccess", + "baseName": "EnableUserPreferenceAccess", + "type": "boolean" + }, + { + "name": "accessSchedules", + "baseName": "AccessSchedules", + "type": "Array" + }, + { + "name": "blockUnratedItems", + "baseName": "BlockUnratedItems", + "type": "Array" + }, + { + "name": "enableRemoteControlOfOtherUsers", + "baseName": "EnableRemoteControlOfOtherUsers", + "type": "boolean" + }, + { + "name": "enableSharedDeviceControl", + "baseName": "EnableSharedDeviceControl", + "type": "boolean" + }, + { + "name": "enableRemoteAccess", + "baseName": "EnableRemoteAccess", + "type": "boolean" + }, + { + "name": "enableLiveTvManagement", + "baseName": "EnableLiveTvManagement", + "type": "boolean" + }, + { + "name": "enableLiveTvAccess", + "baseName": "EnableLiveTvAccess", + "type": "boolean" + }, + { + "name": "enableMediaPlayback", + "baseName": "EnableMediaPlayback", + "type": "boolean" + }, + { + "name": "enableAudioPlaybackTranscoding", + "baseName": "EnableAudioPlaybackTranscoding", + "type": "boolean" + }, + { + "name": "enableVideoPlaybackTranscoding", + "baseName": "EnableVideoPlaybackTranscoding", + "type": "boolean" + }, + { + "name": "enablePlaybackRemuxing", + "baseName": "EnablePlaybackRemuxing", + "type": "boolean" + }, + { + "name": "forceRemoteSourceTranscoding", + "baseName": "ForceRemoteSourceTranscoding", + "type": "boolean" + }, + { + "name": "enableContentDeletion", + "baseName": "EnableContentDeletion", + "type": "boolean" + }, + { + "name": "enableContentDeletionFromFolders", + "baseName": "EnableContentDeletionFromFolders", + "type": "Array" + }, + { + "name": "enableContentDownloading", + "baseName": "EnableContentDownloading", + "type": "boolean" + }, + { + "name": "enableSyncTranscoding", + "baseName": "EnableSyncTranscoding", + "type": "boolean" + }, + { + "name": "enableMediaConversion", + "baseName": "EnableMediaConversion", + "type": "boolean" + }, + { + "name": "enabledDevices", + "baseName": "EnabledDevices", + "type": "Array" + }, + { + "name": "enableAllDevices", + "baseName": "EnableAllDevices", + "type": "boolean" + }, + { + "name": "enabledChannels", + "baseName": "EnabledChannels", + "type": "Array" + }, + { + "name": "enableAllChannels", + "baseName": "EnableAllChannels", + "type": "boolean" + }, + { + "name": "enabledFolders", + "baseName": "EnabledFolders", + "type": "Array" + }, + { + "name": "enableAllFolders", + "baseName": "EnableAllFolders", + "type": "boolean" + }, + { + "name": "invalidLoginAttemptCount", + "baseName": "InvalidLoginAttemptCount", + "type": "number" + }, + { + "name": "loginAttemptsBeforeLockout", + "baseName": "LoginAttemptsBeforeLockout", + "type": "number" + }, + { + "name": "maxActiveSessions", + "baseName": "MaxActiveSessions", + "type": "number" + }, + { + "name": "enablePublicSharing", + "baseName": "EnablePublicSharing", + "type": "boolean" + }, + { + "name": "blockedMediaFolders", + "baseName": "BlockedMediaFolders", + "type": "Array" + }, + { + "name": "blockedChannels", + "baseName": "BlockedChannels", + "type": "Array" + }, + { + "name": "remoteClientBitrateLimit", + "baseName": "RemoteClientBitrateLimit", + "type": "number" + }, + { + "name": "authenticationProviderId", + "baseName": "AuthenticationProviderId", + "type": "string" + }, + { + "name": "passwordResetProviderId", + "baseName": "PasswordResetProviderId", + "type": "string" + }, + { + "name": "syncPlayAccess", + "baseName": "SyncPlayAccess", + "type": "SyncPlayUserAccessType" + } ]; + + static getAttributeTypeMap() { + return UpdateUserPolicyRequest.attributeTypeMap; + } +} + +export namespace UpdateUserPolicyRequest { +} diff --git a/jellyfin/model/updateUserRequest.ts b/jellyfin/model/updateUserRequest.ts new file mode 100644 index 0000000..df1ad23 --- /dev/null +++ b/jellyfin/model/updateUserRequest.ts @@ -0,0 +1,150 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { UserDtoConfiguration } from './userDtoConfiguration'; +import { UserDtoPolicy } from './userDtoPolicy'; + +/** +* Class UserDto. +*/ +export class UpdateUserRequest { + /** + * Gets or sets the name. + */ + 'name'?: string | null; + /** + * Gets or sets the server identifier. + */ + 'serverId'?: string | null; + /** + * Gets or sets the name of the server. This is not used by the server and is for client-side usage only. + */ + 'serverName'?: string | null; + /** + * Gets or sets the id. + */ + 'id'?: string; + /** + * Gets or sets the primary image tag. + */ + 'primaryImageTag'?: string | null; + /** + * Gets or sets a value indicating whether this instance has password. + */ + 'hasPassword'?: boolean; + /** + * Gets or sets a value indicating whether this instance has configured password. + */ + 'hasConfiguredPassword'?: boolean; + /** + * Gets or sets a value indicating whether this instance has configured easy password. + */ + 'hasConfiguredEasyPassword'?: boolean; + /** + * Gets or sets whether async login is enabled or not. + */ + 'enableAutoLogin'?: boolean | null; + /** + * Gets or sets the last login date. + */ + 'lastLoginDate'?: Date | null; + /** + * Gets or sets the last activity date. + */ + 'lastActivityDate'?: Date | null; + 'configuration'?: UserDtoConfiguration | null; + 'policy'?: UserDtoPolicy | null; + /** + * Gets or sets the primary image aspect ratio. + */ + 'primaryImageAspectRatio'?: number | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "Name", + "type": "string" + }, + { + "name": "serverId", + "baseName": "ServerId", + "type": "string" + }, + { + "name": "serverName", + "baseName": "ServerName", + "type": "string" + }, + { + "name": "id", + "baseName": "Id", + "type": "string" + }, + { + "name": "primaryImageTag", + "baseName": "PrimaryImageTag", + "type": "string" + }, + { + "name": "hasPassword", + "baseName": "HasPassword", + "type": "boolean" + }, + { + "name": "hasConfiguredPassword", + "baseName": "HasConfiguredPassword", + "type": "boolean" + }, + { + "name": "hasConfiguredEasyPassword", + "baseName": "HasConfiguredEasyPassword", + "type": "boolean" + }, + { + "name": "enableAutoLogin", + "baseName": "EnableAutoLogin", + "type": "boolean" + }, + { + "name": "lastLoginDate", + "baseName": "LastLoginDate", + "type": "Date" + }, + { + "name": "lastActivityDate", + "baseName": "LastActivityDate", + "type": "Date" + }, + { + "name": "configuration", + "baseName": "Configuration", + "type": "UserDtoConfiguration" + }, + { + "name": "policy", + "baseName": "Policy", + "type": "UserDtoPolicy" + }, + { + "name": "primaryImageAspectRatio", + "baseName": "PrimaryImageAspectRatio", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return UpdateUserRequest.attributeTypeMap; + } +} + diff --git a/jellyfin/model/uploadSubtitleDto.ts b/jellyfin/model/uploadSubtitleDto.ts new file mode 100644 index 0000000..e50d7ff --- /dev/null +++ b/jellyfin/model/uploadSubtitleDto.ts @@ -0,0 +1,64 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Upload subtitles dto. +*/ +export class UploadSubtitleDto { + /** + * Gets or sets the subtitle language. + */ + 'language': string; + /** + * Gets or sets the subtitle format. + */ + 'format': string; + /** + * Gets or sets a value indicating whether the subtitle is forced. + */ + 'isForced': boolean; + /** + * Gets or sets the subtitle data. + */ + 'data': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "language", + "baseName": "Language", + "type": "string" + }, + { + "name": "format", + "baseName": "Format", + "type": "string" + }, + { + "name": "isForced", + "baseName": "IsForced", + "type": "boolean" + }, + { + "name": "data", + "baseName": "Data", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return UploadSubtitleDto.attributeTypeMap; + } +} + diff --git a/jellyfin/model/uploadSubtitleRequest.ts b/jellyfin/model/uploadSubtitleRequest.ts new file mode 100644 index 0000000..916426c --- /dev/null +++ b/jellyfin/model/uploadSubtitleRequest.ts @@ -0,0 +1,64 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Upload subtitles dto. +*/ +export class UploadSubtitleRequest { + /** + * Gets or sets the subtitle language. + */ + 'language': string; + /** + * Gets or sets the subtitle format. + */ + 'format': string; + /** + * Gets or sets a value indicating whether the subtitle is forced. + */ + 'isForced': boolean; + /** + * Gets or sets the subtitle data. + */ + 'data': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "language", + "baseName": "Language", + "type": "string" + }, + { + "name": "format", + "baseName": "Format", + "type": "string" + }, + { + "name": "isForced", + "baseName": "IsForced", + "type": "boolean" + }, + { + "name": "data", + "baseName": "Data", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return UploadSubtitleRequest.attributeTypeMap; + } +} + diff --git a/jellyfin/model/userConfiguration.ts b/jellyfin/model/userConfiguration.ts new file mode 100644 index 0000000..a2ab16a --- /dev/null +++ b/jellyfin/model/userConfiguration.ts @@ -0,0 +1,130 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { SubtitlePlaybackMode } from './subtitlePlaybackMode'; + +/** +* Class UserConfiguration. +*/ +export class UserConfiguration { + /** + * Gets or sets the audio language preference. + */ + 'audioLanguagePreference'?: string | null; + /** + * Gets or sets a value indicating whether [play default audio track]. + */ + 'playDefaultAudioTrack'?: boolean; + /** + * Gets or sets the subtitle language preference. + */ + 'subtitleLanguagePreference'?: string | null; + 'displayMissingEpisodes'?: boolean; + 'groupedFolders'?: Array; + 'subtitleMode'?: SubtitlePlaybackMode; + 'displayCollectionsView'?: boolean; + 'enableLocalPassword'?: boolean; + 'orderedViews'?: Array; + 'latestItemsExcludes'?: Array; + 'myMediaExcludes'?: Array; + 'hidePlayedInLatest'?: boolean; + 'rememberAudioSelections'?: boolean; + 'rememberSubtitleSelections'?: boolean; + 'enableNextEpisodeAutoPlay'?: boolean; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "audioLanguagePreference", + "baseName": "AudioLanguagePreference", + "type": "string" + }, + { + "name": "playDefaultAudioTrack", + "baseName": "PlayDefaultAudioTrack", + "type": "boolean" + }, + { + "name": "subtitleLanguagePreference", + "baseName": "SubtitleLanguagePreference", + "type": "string" + }, + { + "name": "displayMissingEpisodes", + "baseName": "DisplayMissingEpisodes", + "type": "boolean" + }, + { + "name": "groupedFolders", + "baseName": "GroupedFolders", + "type": "Array" + }, + { + "name": "subtitleMode", + "baseName": "SubtitleMode", + "type": "SubtitlePlaybackMode" + }, + { + "name": "displayCollectionsView", + "baseName": "DisplayCollectionsView", + "type": "boolean" + }, + { + "name": "enableLocalPassword", + "baseName": "EnableLocalPassword", + "type": "boolean" + }, + { + "name": "orderedViews", + "baseName": "OrderedViews", + "type": "Array" + }, + { + "name": "latestItemsExcludes", + "baseName": "LatestItemsExcludes", + "type": "Array" + }, + { + "name": "myMediaExcludes", + "baseName": "MyMediaExcludes", + "type": "Array" + }, + { + "name": "hidePlayedInLatest", + "baseName": "HidePlayedInLatest", + "type": "boolean" + }, + { + "name": "rememberAudioSelections", + "baseName": "RememberAudioSelections", + "type": "boolean" + }, + { + "name": "rememberSubtitleSelections", + "baseName": "RememberSubtitleSelections", + "type": "boolean" + }, + { + "name": "enableNextEpisodeAutoPlay", + "baseName": "EnableNextEpisodeAutoPlay", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return UserConfiguration.attributeTypeMap; + } +} + +export namespace UserConfiguration { +} diff --git a/jellyfin/model/userDto.ts b/jellyfin/model/userDto.ts new file mode 100644 index 0000000..7c52212 --- /dev/null +++ b/jellyfin/model/userDto.ts @@ -0,0 +1,150 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { UserDtoConfiguration } from './userDtoConfiguration'; +import { UserDtoPolicy } from './userDtoPolicy'; + +/** +* Class UserDto. +*/ +export class UserDto { + /** + * Gets or sets the name. + */ + 'name'?: string | null; + /** + * Gets or sets the server identifier. + */ + 'serverId'?: string | null; + /** + * Gets or sets the name of the server. This is not used by the server and is for client-side usage only. + */ + 'serverName'?: string | null; + /** + * Gets or sets the id. + */ + 'id'?: string; + /** + * Gets or sets the primary image tag. + */ + 'primaryImageTag'?: string | null; + /** + * Gets or sets a value indicating whether this instance has password. + */ + 'hasPassword'?: boolean; + /** + * Gets or sets a value indicating whether this instance has configured password. + */ + 'hasConfiguredPassword'?: boolean; + /** + * Gets or sets a value indicating whether this instance has configured easy password. + */ + 'hasConfiguredEasyPassword'?: boolean; + /** + * Gets or sets whether async login is enabled or not. + */ + 'enableAutoLogin'?: boolean | null; + /** + * Gets or sets the last login date. + */ + 'lastLoginDate'?: Date | null; + /** + * Gets or sets the last activity date. + */ + 'lastActivityDate'?: Date | null; + 'configuration'?: UserDtoConfiguration | null; + 'policy'?: UserDtoPolicy | null; + /** + * Gets or sets the primary image aspect ratio. + */ + 'primaryImageAspectRatio'?: number | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "Name", + "type": "string" + }, + { + "name": "serverId", + "baseName": "ServerId", + "type": "string" + }, + { + "name": "serverName", + "baseName": "ServerName", + "type": "string" + }, + { + "name": "id", + "baseName": "Id", + "type": "string" + }, + { + "name": "primaryImageTag", + "baseName": "PrimaryImageTag", + "type": "string" + }, + { + "name": "hasPassword", + "baseName": "HasPassword", + "type": "boolean" + }, + { + "name": "hasConfiguredPassword", + "baseName": "HasConfiguredPassword", + "type": "boolean" + }, + { + "name": "hasConfiguredEasyPassword", + "baseName": "HasConfiguredEasyPassword", + "type": "boolean" + }, + { + "name": "enableAutoLogin", + "baseName": "EnableAutoLogin", + "type": "boolean" + }, + { + "name": "lastLoginDate", + "baseName": "LastLoginDate", + "type": "Date" + }, + { + "name": "lastActivityDate", + "baseName": "LastActivityDate", + "type": "Date" + }, + { + "name": "configuration", + "baseName": "Configuration", + "type": "UserDtoConfiguration" + }, + { + "name": "policy", + "baseName": "Policy", + "type": "UserDtoPolicy" + }, + { + "name": "primaryImageAspectRatio", + "baseName": "PrimaryImageAspectRatio", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return UserDto.attributeTypeMap; + } +} + diff --git a/jellyfin/model/userDtoConfiguration.ts b/jellyfin/model/userDtoConfiguration.ts new file mode 100644 index 0000000..4fe9148 --- /dev/null +++ b/jellyfin/model/userDtoConfiguration.ts @@ -0,0 +1,130 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { SubtitlePlaybackMode } from './subtitlePlaybackMode'; + +/** +* Gets or sets the configuration. +*/ +export class UserDtoConfiguration { + /** + * Gets or sets the audio language preference. + */ + 'audioLanguagePreference'?: string | null; + /** + * Gets or sets a value indicating whether [play default audio track]. + */ + 'playDefaultAudioTrack'?: boolean; + /** + * Gets or sets the subtitle language preference. + */ + 'subtitleLanguagePreference'?: string | null; + 'displayMissingEpisodes'?: boolean; + 'groupedFolders'?: Array; + 'subtitleMode'?: SubtitlePlaybackMode; + 'displayCollectionsView'?: boolean; + 'enableLocalPassword'?: boolean; + 'orderedViews'?: Array; + 'latestItemsExcludes'?: Array; + 'myMediaExcludes'?: Array; + 'hidePlayedInLatest'?: boolean; + 'rememberAudioSelections'?: boolean; + 'rememberSubtitleSelections'?: boolean; + 'enableNextEpisodeAutoPlay'?: boolean; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "audioLanguagePreference", + "baseName": "AudioLanguagePreference", + "type": "string" + }, + { + "name": "playDefaultAudioTrack", + "baseName": "PlayDefaultAudioTrack", + "type": "boolean" + }, + { + "name": "subtitleLanguagePreference", + "baseName": "SubtitleLanguagePreference", + "type": "string" + }, + { + "name": "displayMissingEpisodes", + "baseName": "DisplayMissingEpisodes", + "type": "boolean" + }, + { + "name": "groupedFolders", + "baseName": "GroupedFolders", + "type": "Array" + }, + { + "name": "subtitleMode", + "baseName": "SubtitleMode", + "type": "SubtitlePlaybackMode" + }, + { + "name": "displayCollectionsView", + "baseName": "DisplayCollectionsView", + "type": "boolean" + }, + { + "name": "enableLocalPassword", + "baseName": "EnableLocalPassword", + "type": "boolean" + }, + { + "name": "orderedViews", + "baseName": "OrderedViews", + "type": "Array" + }, + { + "name": "latestItemsExcludes", + "baseName": "LatestItemsExcludes", + "type": "Array" + }, + { + "name": "myMediaExcludes", + "baseName": "MyMediaExcludes", + "type": "Array" + }, + { + "name": "hidePlayedInLatest", + "baseName": "HidePlayedInLatest", + "type": "boolean" + }, + { + "name": "rememberAudioSelections", + "baseName": "RememberAudioSelections", + "type": "boolean" + }, + { + "name": "rememberSubtitleSelections", + "baseName": "RememberSubtitleSelections", + "type": "boolean" + }, + { + "name": "enableNextEpisodeAutoPlay", + "baseName": "EnableNextEpisodeAutoPlay", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return UserDtoConfiguration.attributeTypeMap; + } +} + +export namespace UserDtoConfiguration { +} diff --git a/jellyfin/model/userDtoPolicy.ts b/jellyfin/model/userDtoPolicy.ts new file mode 100644 index 0000000..fc6ca4b --- /dev/null +++ b/jellyfin/model/userDtoPolicy.ts @@ -0,0 +1,282 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { AccessSchedule } from './accessSchedule'; +import { SyncPlayUserAccessType } from './syncPlayUserAccessType'; +import { UnratedItem } from './unratedItem'; + +/** +* Gets or sets the policy. +*/ +export class UserDtoPolicy { + /** + * Gets or sets a value indicating whether this instance is administrator. + */ + 'isAdministrator'?: boolean; + /** + * Gets or sets a value indicating whether this instance is hidden. + */ + 'isHidden'?: boolean; + /** + * Gets or sets a value indicating whether this instance is disabled. + */ + 'isDisabled'?: boolean; + /** + * Gets or sets the max parental rating. + */ + 'maxParentalRating'?: number | null; + 'blockedTags'?: Array | null; + 'enableUserPreferenceAccess'?: boolean; + 'accessSchedules'?: Array | null; + 'blockUnratedItems'?: Array | null; + 'enableRemoteControlOfOtherUsers'?: boolean; + 'enableSharedDeviceControl'?: boolean; + 'enableRemoteAccess'?: boolean; + 'enableLiveTvManagement'?: boolean; + 'enableLiveTvAccess'?: boolean; + 'enableMediaPlayback'?: boolean; + 'enableAudioPlaybackTranscoding'?: boolean; + 'enableVideoPlaybackTranscoding'?: boolean; + 'enablePlaybackRemuxing'?: boolean; + 'forceRemoteSourceTranscoding'?: boolean; + 'enableContentDeletion'?: boolean; + 'enableContentDeletionFromFolders'?: Array | null; + 'enableContentDownloading'?: boolean; + /** + * Gets or sets a value indicating whether [enable synchronize]. + */ + 'enableSyncTranscoding'?: boolean; + 'enableMediaConversion'?: boolean; + 'enabledDevices'?: Array | null; + 'enableAllDevices'?: boolean; + 'enabledChannels'?: Array | null; + 'enableAllChannels'?: boolean; + 'enabledFolders'?: Array | null; + 'enableAllFolders'?: boolean; + 'invalidLoginAttemptCount'?: number; + 'loginAttemptsBeforeLockout'?: number; + 'maxActiveSessions'?: number; + 'enablePublicSharing'?: boolean; + 'blockedMediaFolders'?: Array | null; + 'blockedChannels'?: Array | null; + 'remoteClientBitrateLimit'?: number; + 'authenticationProviderId'?: string | null; + 'passwordResetProviderId'?: string | null; + 'syncPlayAccess'?: SyncPlayUserAccessType; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "isAdministrator", + "baseName": "IsAdministrator", + "type": "boolean" + }, + { + "name": "isHidden", + "baseName": "IsHidden", + "type": "boolean" + }, + { + "name": "isDisabled", + "baseName": "IsDisabled", + "type": "boolean" + }, + { + "name": "maxParentalRating", + "baseName": "MaxParentalRating", + "type": "number" + }, + { + "name": "blockedTags", + "baseName": "BlockedTags", + "type": "Array" + }, + { + "name": "enableUserPreferenceAccess", + "baseName": "EnableUserPreferenceAccess", + "type": "boolean" + }, + { + "name": "accessSchedules", + "baseName": "AccessSchedules", + "type": "Array" + }, + { + "name": "blockUnratedItems", + "baseName": "BlockUnratedItems", + "type": "Array" + }, + { + "name": "enableRemoteControlOfOtherUsers", + "baseName": "EnableRemoteControlOfOtherUsers", + "type": "boolean" + }, + { + "name": "enableSharedDeviceControl", + "baseName": "EnableSharedDeviceControl", + "type": "boolean" + }, + { + "name": "enableRemoteAccess", + "baseName": "EnableRemoteAccess", + "type": "boolean" + }, + { + "name": "enableLiveTvManagement", + "baseName": "EnableLiveTvManagement", + "type": "boolean" + }, + { + "name": "enableLiveTvAccess", + "baseName": "EnableLiveTvAccess", + "type": "boolean" + }, + { + "name": "enableMediaPlayback", + "baseName": "EnableMediaPlayback", + "type": "boolean" + }, + { + "name": "enableAudioPlaybackTranscoding", + "baseName": "EnableAudioPlaybackTranscoding", + "type": "boolean" + }, + { + "name": "enableVideoPlaybackTranscoding", + "baseName": "EnableVideoPlaybackTranscoding", + "type": "boolean" + }, + { + "name": "enablePlaybackRemuxing", + "baseName": "EnablePlaybackRemuxing", + "type": "boolean" + }, + { + "name": "forceRemoteSourceTranscoding", + "baseName": "ForceRemoteSourceTranscoding", + "type": "boolean" + }, + { + "name": "enableContentDeletion", + "baseName": "EnableContentDeletion", + "type": "boolean" + }, + { + "name": "enableContentDeletionFromFolders", + "baseName": "EnableContentDeletionFromFolders", + "type": "Array" + }, + { + "name": "enableContentDownloading", + "baseName": "EnableContentDownloading", + "type": "boolean" + }, + { + "name": "enableSyncTranscoding", + "baseName": "EnableSyncTranscoding", + "type": "boolean" + }, + { + "name": "enableMediaConversion", + "baseName": "EnableMediaConversion", + "type": "boolean" + }, + { + "name": "enabledDevices", + "baseName": "EnabledDevices", + "type": "Array" + }, + { + "name": "enableAllDevices", + "baseName": "EnableAllDevices", + "type": "boolean" + }, + { + "name": "enabledChannels", + "baseName": "EnabledChannels", + "type": "Array" + }, + { + "name": "enableAllChannels", + "baseName": "EnableAllChannels", + "type": "boolean" + }, + { + "name": "enabledFolders", + "baseName": "EnabledFolders", + "type": "Array" + }, + { + "name": "enableAllFolders", + "baseName": "EnableAllFolders", + "type": "boolean" + }, + { + "name": "invalidLoginAttemptCount", + "baseName": "InvalidLoginAttemptCount", + "type": "number" + }, + { + "name": "loginAttemptsBeforeLockout", + "baseName": "LoginAttemptsBeforeLockout", + "type": "number" + }, + { + "name": "maxActiveSessions", + "baseName": "MaxActiveSessions", + "type": "number" + }, + { + "name": "enablePublicSharing", + "baseName": "EnablePublicSharing", + "type": "boolean" + }, + { + "name": "blockedMediaFolders", + "baseName": "BlockedMediaFolders", + "type": "Array" + }, + { + "name": "blockedChannels", + "baseName": "BlockedChannels", + "type": "Array" + }, + { + "name": "remoteClientBitrateLimit", + "baseName": "RemoteClientBitrateLimit", + "type": "number" + }, + { + "name": "authenticationProviderId", + "baseName": "AuthenticationProviderId", + "type": "string" + }, + { + "name": "passwordResetProviderId", + "baseName": "PasswordResetProviderId", + "type": "string" + }, + { + "name": "syncPlayAccess", + "baseName": "SyncPlayAccess", + "type": "SyncPlayUserAccessType" + } ]; + + static getAttributeTypeMap() { + return UserDtoPolicy.attributeTypeMap; + } +} + +export namespace UserDtoPolicy { +} diff --git a/jellyfin/model/userItemDataDto.ts b/jellyfin/model/userItemDataDto.ts new file mode 100644 index 0000000..d3881e9 --- /dev/null +++ b/jellyfin/model/userItemDataDto.ts @@ -0,0 +1,127 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Class UserItemDataDto. +*/ +export class UserItemDataDto { + /** + * Gets or sets the rating. + */ + 'rating'?: number | null; + /** + * Gets or sets the played percentage. + */ + 'playedPercentage'?: number | null; + /** + * Gets or sets the unplayed item count. + */ + 'unplayedItemCount'?: number | null; + /** + * Gets or sets the playback position ticks. + */ + 'playbackPositionTicks'?: number; + /** + * Gets or sets the play count. + */ + 'playCount'?: number; + /** + * Gets or sets a value indicating whether this instance is favorite. + */ + 'isFavorite'?: boolean; + /** + * Gets or sets a value indicating whether this MediaBrowser.Model.Dto.UserItemDataDto is likes. + */ + 'likes'?: boolean | null; + /** + * Gets or sets the last played date. + */ + 'lastPlayedDate'?: Date | null; + /** + * Gets or sets a value indicating whether this MediaBrowser.Model.Dto.UserItemDataDto is played. + */ + 'played'?: boolean; + /** + * Gets or sets the key. + */ + 'key'?: string | null; + /** + * Gets or sets the item identifier. + */ + 'itemId'?: string | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "rating", + "baseName": "Rating", + "type": "number" + }, + { + "name": "playedPercentage", + "baseName": "PlayedPercentage", + "type": "number" + }, + { + "name": "unplayedItemCount", + "baseName": "UnplayedItemCount", + "type": "number" + }, + { + "name": "playbackPositionTicks", + "baseName": "PlaybackPositionTicks", + "type": "number" + }, + { + "name": "playCount", + "baseName": "PlayCount", + "type": "number" + }, + { + "name": "isFavorite", + "baseName": "IsFavorite", + "type": "boolean" + }, + { + "name": "likes", + "baseName": "Likes", + "type": "boolean" + }, + { + "name": "lastPlayedDate", + "baseName": "LastPlayedDate", + "type": "Date" + }, + { + "name": "played", + "baseName": "Played", + "type": "boolean" + }, + { + "name": "key", + "baseName": "Key", + "type": "string" + }, + { + "name": "itemId", + "baseName": "ItemId", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return UserItemDataDto.attributeTypeMap; + } +} + diff --git a/jellyfin/model/userPolicy.ts b/jellyfin/model/userPolicy.ts new file mode 100644 index 0000000..1a8fda2 --- /dev/null +++ b/jellyfin/model/userPolicy.ts @@ -0,0 +1,279 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { AccessSchedule } from './accessSchedule'; +import { SyncPlayUserAccessType } from './syncPlayUserAccessType'; +import { UnratedItem } from './unratedItem'; + +export class UserPolicy { + /** + * Gets or sets a value indicating whether this instance is administrator. + */ + 'isAdministrator'?: boolean; + /** + * Gets or sets a value indicating whether this instance is hidden. + */ + 'isHidden'?: boolean; + /** + * Gets or sets a value indicating whether this instance is disabled. + */ + 'isDisabled'?: boolean; + /** + * Gets or sets the max parental rating. + */ + 'maxParentalRating'?: number | null; + 'blockedTags'?: Array | null; + 'enableUserPreferenceAccess'?: boolean; + 'accessSchedules'?: Array | null; + 'blockUnratedItems'?: Array | null; + 'enableRemoteControlOfOtherUsers'?: boolean; + 'enableSharedDeviceControl'?: boolean; + 'enableRemoteAccess'?: boolean; + 'enableLiveTvManagement'?: boolean; + 'enableLiveTvAccess'?: boolean; + 'enableMediaPlayback'?: boolean; + 'enableAudioPlaybackTranscoding'?: boolean; + 'enableVideoPlaybackTranscoding'?: boolean; + 'enablePlaybackRemuxing'?: boolean; + 'forceRemoteSourceTranscoding'?: boolean; + 'enableContentDeletion'?: boolean; + 'enableContentDeletionFromFolders'?: Array | null; + 'enableContentDownloading'?: boolean; + /** + * Gets or sets a value indicating whether [enable synchronize]. + */ + 'enableSyncTranscoding'?: boolean; + 'enableMediaConversion'?: boolean; + 'enabledDevices'?: Array | null; + 'enableAllDevices'?: boolean; + 'enabledChannels'?: Array | null; + 'enableAllChannels'?: boolean; + 'enabledFolders'?: Array | null; + 'enableAllFolders'?: boolean; + 'invalidLoginAttemptCount'?: number; + 'loginAttemptsBeforeLockout'?: number; + 'maxActiveSessions'?: number; + 'enablePublicSharing'?: boolean; + 'blockedMediaFolders'?: Array | null; + 'blockedChannels'?: Array | null; + 'remoteClientBitrateLimit'?: number; + 'authenticationProviderId'?: string | null; + 'passwordResetProviderId'?: string | null; + 'syncPlayAccess'?: SyncPlayUserAccessType; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "isAdministrator", + "baseName": "IsAdministrator", + "type": "boolean" + }, + { + "name": "isHidden", + "baseName": "IsHidden", + "type": "boolean" + }, + { + "name": "isDisabled", + "baseName": "IsDisabled", + "type": "boolean" + }, + { + "name": "maxParentalRating", + "baseName": "MaxParentalRating", + "type": "number" + }, + { + "name": "blockedTags", + "baseName": "BlockedTags", + "type": "Array" + }, + { + "name": "enableUserPreferenceAccess", + "baseName": "EnableUserPreferenceAccess", + "type": "boolean" + }, + { + "name": "accessSchedules", + "baseName": "AccessSchedules", + "type": "Array" + }, + { + "name": "blockUnratedItems", + "baseName": "BlockUnratedItems", + "type": "Array" + }, + { + "name": "enableRemoteControlOfOtherUsers", + "baseName": "EnableRemoteControlOfOtherUsers", + "type": "boolean" + }, + { + "name": "enableSharedDeviceControl", + "baseName": "EnableSharedDeviceControl", + "type": "boolean" + }, + { + "name": "enableRemoteAccess", + "baseName": "EnableRemoteAccess", + "type": "boolean" + }, + { + "name": "enableLiveTvManagement", + "baseName": "EnableLiveTvManagement", + "type": "boolean" + }, + { + "name": "enableLiveTvAccess", + "baseName": "EnableLiveTvAccess", + "type": "boolean" + }, + { + "name": "enableMediaPlayback", + "baseName": "EnableMediaPlayback", + "type": "boolean" + }, + { + "name": "enableAudioPlaybackTranscoding", + "baseName": "EnableAudioPlaybackTranscoding", + "type": "boolean" + }, + { + "name": "enableVideoPlaybackTranscoding", + "baseName": "EnableVideoPlaybackTranscoding", + "type": "boolean" + }, + { + "name": "enablePlaybackRemuxing", + "baseName": "EnablePlaybackRemuxing", + "type": "boolean" + }, + { + "name": "forceRemoteSourceTranscoding", + "baseName": "ForceRemoteSourceTranscoding", + "type": "boolean" + }, + { + "name": "enableContentDeletion", + "baseName": "EnableContentDeletion", + "type": "boolean" + }, + { + "name": "enableContentDeletionFromFolders", + "baseName": "EnableContentDeletionFromFolders", + "type": "Array" + }, + { + "name": "enableContentDownloading", + "baseName": "EnableContentDownloading", + "type": "boolean" + }, + { + "name": "enableSyncTranscoding", + "baseName": "EnableSyncTranscoding", + "type": "boolean" + }, + { + "name": "enableMediaConversion", + "baseName": "EnableMediaConversion", + "type": "boolean" + }, + { + "name": "enabledDevices", + "baseName": "EnabledDevices", + "type": "Array" + }, + { + "name": "enableAllDevices", + "baseName": "EnableAllDevices", + "type": "boolean" + }, + { + "name": "enabledChannels", + "baseName": "EnabledChannels", + "type": "Array" + }, + { + "name": "enableAllChannels", + "baseName": "EnableAllChannels", + "type": "boolean" + }, + { + "name": "enabledFolders", + "baseName": "EnabledFolders", + "type": "Array" + }, + { + "name": "enableAllFolders", + "baseName": "EnableAllFolders", + "type": "boolean" + }, + { + "name": "invalidLoginAttemptCount", + "baseName": "InvalidLoginAttemptCount", + "type": "number" + }, + { + "name": "loginAttemptsBeforeLockout", + "baseName": "LoginAttemptsBeforeLockout", + "type": "number" + }, + { + "name": "maxActiveSessions", + "baseName": "MaxActiveSessions", + "type": "number" + }, + { + "name": "enablePublicSharing", + "baseName": "EnablePublicSharing", + "type": "boolean" + }, + { + "name": "blockedMediaFolders", + "baseName": "BlockedMediaFolders", + "type": "Array" + }, + { + "name": "blockedChannels", + "baseName": "BlockedChannels", + "type": "Array" + }, + { + "name": "remoteClientBitrateLimit", + "baseName": "RemoteClientBitrateLimit", + "type": "number" + }, + { + "name": "authenticationProviderId", + "baseName": "AuthenticationProviderId", + "type": "string" + }, + { + "name": "passwordResetProviderId", + "baseName": "PasswordResetProviderId", + "type": "string" + }, + { + "name": "syncPlayAccess", + "baseName": "SyncPlayAccess", + "type": "SyncPlayUserAccessType" + } ]; + + static getAttributeTypeMap() { + return UserPolicy.attributeTypeMap; + } +} + +export namespace UserPolicy { +} diff --git a/jellyfin/model/utcTimeResponse.ts b/jellyfin/model/utcTimeResponse.ts new file mode 100644 index 0000000..7ddd5ad --- /dev/null +++ b/jellyfin/model/utcTimeResponse.ts @@ -0,0 +1,46 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Class UtcTimeResponse. +*/ +export class UtcTimeResponse { + /** + * Gets the UTC time when request has been received. + */ + 'requestReceptionTime'?: Date; + /** + * Gets the UTC time when response has been sent. + */ + 'responseTransmissionTime'?: Date; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "requestReceptionTime", + "baseName": "RequestReceptionTime", + "type": "Date" + }, + { + "name": "responseTransmissionTime", + "baseName": "ResponseTransmissionTime", + "type": "Date" + } ]; + + static getAttributeTypeMap() { + return UtcTimeResponse.attributeTypeMap; + } +} + diff --git a/jellyfin/model/validatePathDto.ts b/jellyfin/model/validatePathDto.ts new file mode 100644 index 0000000..5e7c5f5 --- /dev/null +++ b/jellyfin/model/validatePathDto.ts @@ -0,0 +1,55 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Validate path object. +*/ +export class ValidatePathDto { + /** + * Gets or sets a value indicating whether validate if path is writable. + */ + 'validateWritable'?: boolean; + /** + * Gets or sets the path. + */ + 'path'?: string | null; + /** + * Gets or sets is path file. + */ + 'isFile'?: boolean | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "validateWritable", + "baseName": "ValidateWritable", + "type": "boolean" + }, + { + "name": "path", + "baseName": "Path", + "type": "string" + }, + { + "name": "isFile", + "baseName": "IsFile", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return ValidatePathDto.attributeTypeMap; + } +} + diff --git a/jellyfin/model/validatePathRequest.ts b/jellyfin/model/validatePathRequest.ts new file mode 100644 index 0000000..2e7ca74 --- /dev/null +++ b/jellyfin/model/validatePathRequest.ts @@ -0,0 +1,55 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Validate path object. +*/ +export class ValidatePathRequest { + /** + * Gets or sets a value indicating whether validate if path is writable. + */ + 'validateWritable'?: boolean; + /** + * Gets or sets the path. + */ + 'path'?: string | null; + /** + * Gets or sets is path file. + */ + 'isFile'?: boolean | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "validateWritable", + "baseName": "ValidateWritable", + "type": "boolean" + }, + { + "name": "path", + "baseName": "Path", + "type": "string" + }, + { + "name": "isFile", + "baseName": "IsFile", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return ValidatePathRequest.attributeTypeMap; + } +} + diff --git a/jellyfin/model/versionInfo.ts b/jellyfin/model/versionInfo.ts new file mode 100644 index 0000000..303bffb --- /dev/null +++ b/jellyfin/model/versionInfo.ts @@ -0,0 +1,109 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Defines the MediaBrowser.Model.Updates.VersionInfo class. +*/ +export class VersionInfo { + /** + * Gets or sets the version. + */ + 'version'?: string; + /** + * Gets the version as a System.Version. + */ + 'versionNumber'?: string; + /** + * Gets or sets the changelog for this version. + */ + 'changelog'?: string | null; + /** + * Gets or sets the ABI that this version was built against. + */ + 'targetAbi'?: string | null; + /** + * Gets or sets the source URL. + */ + 'sourceUrl'?: string | null; + /** + * Gets or sets a checksum for the binary. + */ + 'checksum'?: string | null; + /** + * Gets or sets a timestamp of when the binary was built. + */ + 'timestamp'?: string | null; + /** + * Gets or sets the repository name. + */ + 'repositoryName'?: string; + /** + * Gets or sets the repository url. + */ + 'repositoryUrl'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "version", + "baseName": "version", + "type": "string" + }, + { + "name": "versionNumber", + "baseName": "VersionNumber", + "type": "string" + }, + { + "name": "changelog", + "baseName": "changelog", + "type": "string" + }, + { + "name": "targetAbi", + "baseName": "targetAbi", + "type": "string" + }, + { + "name": "sourceUrl", + "baseName": "sourceUrl", + "type": "string" + }, + { + "name": "checksum", + "baseName": "checksum", + "type": "string" + }, + { + "name": "timestamp", + "baseName": "timestamp", + "type": "string" + }, + { + "name": "repositoryName", + "baseName": "repositoryName", + "type": "string" + }, + { + "name": "repositoryUrl", + "baseName": "repositoryUrl", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return VersionInfo.attributeTypeMap; + } +} + diff --git a/jellyfin/model/video3DFormat.ts b/jellyfin/model/video3DFormat.ts new file mode 100644 index 0000000..d280ff0 --- /dev/null +++ b/jellyfin/model/video3DFormat.ts @@ -0,0 +1,21 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export enum Video3DFormat { + HalfSideBySide = 'HalfSideBySide', + FullSideBySide = 'FullSideBySide', + FullTopAndBottom = 'FullTopAndBottom', + HalfTopAndBottom = 'HalfTopAndBottom', + Mvc = 'MVC' +} diff --git a/jellyfin/model/videoType.ts b/jellyfin/model/videoType.ts new file mode 100644 index 0000000..f4b2fd3 --- /dev/null +++ b/jellyfin/model/videoType.ts @@ -0,0 +1,23 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Enum VideoType. +*/ +export enum VideoType { + VideoFile = 'VideoFile', + Iso = 'Iso', + Dvd = 'Dvd', + BluRay = 'BluRay' +} diff --git a/jellyfin/model/virtualFolderInfo.ts b/jellyfin/model/virtualFolderInfo.ts new file mode 100644 index 0000000..404ef8f --- /dev/null +++ b/jellyfin/model/virtualFolderInfo.ts @@ -0,0 +1,92 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; +import { CollectionTypeOptions } from './collectionTypeOptions'; +import { LibraryOptions } from './libraryOptions'; + +/** +* Used to hold information about a user\'s list of configured virtual folders. +*/ +export class VirtualFolderInfo { + /** + * Gets or sets the name. + */ + 'name'?: string | null; + /** + * Gets or sets the locations. + */ + 'locations'?: Array | null; + 'collectionType'?: CollectionTypeOptions | null; + 'libraryOptions'?: LibraryOptions | null; + /** + * Gets or sets the item identifier. + */ + 'itemId'?: string | null; + /** + * Gets or sets the primary image item identifier. + */ + 'primaryImageItemId'?: string | null; + 'refreshProgress'?: number | null; + 'refreshStatus'?: string | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "Name", + "type": "string" + }, + { + "name": "locations", + "baseName": "Locations", + "type": "Array" + }, + { + "name": "collectionType", + "baseName": "CollectionType", + "type": "CollectionTypeOptions" + }, + { + "name": "libraryOptions", + "baseName": "LibraryOptions", + "type": "LibraryOptions" + }, + { + "name": "itemId", + "baseName": "ItemId", + "type": "string" + }, + { + "name": "primaryImageItemId", + "baseName": "PrimaryImageItemId", + "type": "string" + }, + { + "name": "refreshProgress", + "baseName": "RefreshProgress", + "type": "number" + }, + { + "name": "refreshStatus", + "baseName": "RefreshStatus", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return VirtualFolderInfo.attributeTypeMap; + } +} + +export namespace VirtualFolderInfo { +} diff --git a/jellyfin/model/wakeOnLanInfo.ts b/jellyfin/model/wakeOnLanInfo.ts new file mode 100644 index 0000000..ba91174 --- /dev/null +++ b/jellyfin/model/wakeOnLanInfo.ts @@ -0,0 +1,46 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Provides the MAC address and port for wake-on-LAN functionality. +*/ +export class WakeOnLanInfo { + /** + * Gets the MAC address of the device. + */ + 'macAddress'?: string | null; + /** + * Gets or sets the wake-on-LAN port. + */ + 'port'?: number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "macAddress", + "baseName": "MacAddress", + "type": "string" + }, + { + "name": "port", + "baseName": "Port", + "type": "number" + } ]; + + static getAttributeTypeMap() { + return WakeOnLanInfo.attributeTypeMap; + } +} + diff --git a/jellyfin/model/xbmcMetadataOptions.ts b/jellyfin/model/xbmcMetadataOptions.ts new file mode 100644 index 0000000..1f89862 --- /dev/null +++ b/jellyfin/model/xbmcMetadataOptions.ts @@ -0,0 +1,55 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +export class XbmcMetadataOptions { + 'userId'?: string | null; + 'releaseDateFormat'?: string; + 'saveImagePathsInNfo'?: boolean; + 'enablePathSubstitution'?: boolean; + 'enableExtraThumbsDuplication'?: boolean; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "userId", + "baseName": "UserId", + "type": "string" + }, + { + "name": "releaseDateFormat", + "baseName": "ReleaseDateFormat", + "type": "string" + }, + { + "name": "saveImagePathsInNfo", + "baseName": "SaveImagePathsInNfo", + "type": "boolean" + }, + { + "name": "enablePathSubstitution", + "baseName": "EnablePathSubstitution", + "type": "boolean" + }, + { + "name": "enableExtraThumbsDuplication", + "baseName": "EnableExtraThumbsDuplication", + "type": "boolean" + } ]; + + static getAttributeTypeMap() { + return XbmcMetadataOptions.attributeTypeMap; + } +} + diff --git a/jellyfin/model/xmlAttribute.ts b/jellyfin/model/xmlAttribute.ts new file mode 100644 index 0000000..64b8265 --- /dev/null +++ b/jellyfin/model/xmlAttribute.ts @@ -0,0 +1,46 @@ +/** + * Jellyfin API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 10.8.9 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RequestFile } from './models'; + +/** +* Defines the MediaBrowser.Model.Dlna.XmlAttribute. +*/ +export class XmlAttribute { + /** + * Gets or sets the name of the attribute. + */ + 'name'?: string | null; + /** + * Gets or sets the value of the attribute. + */ + 'value'?: string | null; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ + { + "name": "name", + "baseName": "Name", + "type": "string" + }, + { + "name": "value", + "baseName": "Value", + "type": "string" + } ]; + + static getAttributeTypeMap() { + return XmlAttribute.attributeTypeMap; + } +} + diff --git a/openapitools.json b/openapitools.json new file mode 100644 index 0000000..a3883a3 --- /dev/null +++ b/openapitools.json @@ -0,0 +1,7 @@ +{ + "$schema": "./node_modules/@openapitools/openapi-generator-cli/config.schema.json", + "spaces": 2, + "generator-cli": { + "version": "6.5.0" + } +}