mirror of
https://github.com/chrisbenincasa/tunarr.git
synced 2026-04-18 09:03:35 -04:00
Allows for better loudness normalization vs straight volume adjustment using the ffmpeg loudnorm filter. The i, lra, and tp values are all configurable in the advanced transcode settings.
3845 lines
164 KiB
TypeScript
3845 lines
164 KiB
TypeScript
// This file is auto-generated by @hey-api/openapi-ts
|
|
|
|
import { type Options, getApiTasks, postApiTasksByIdRun, getChannels, createChannelV2, deleteApiChannelsById, getChannelsByNumberV2, putApiChannelsById, getApiChannelsByIdPrograms, getApiChannelsByIdShows, getApiChannelsByIdArtists, getApiChannelsByIdProgramming, postApiChannelsByIdProgramming, getChannelFallbacks, getApiChannelsAllLineups, getApiChannelsByIdLineup, getApiChannelsByIdNowPlaying, getApiChannelsByIdTranscodeConfig, postApiChannelsByChannelIdScheduleTimeSlots, postApiChannelsByChannelIdScheduleSlots, getApiChannelsByIdSchedule, getApiCustomShows, createCustomShow, deleteCustomShow, getApiCustomShowsById, putApiCustomShowsById, getApiCustomShowsByIdPrograms, getApiFillerLists, postApiFillerLists, deleteApiFillerListsById, getApiFillerListsById, putApiFillerListsById, getApiFillerListsByIdPrograms, postApiProgramsSearch, getApiProgramsByIdDescendants, getApiProgramsFacetsByFacetName, postApiProgramsFacetsByFacetName, getApiProgramsById, getApiProgramGroupingsById, getApiProgramsByIdArtworkByArtworkType, getApiProgramsByIdStreamDetails, getApiProgramsByIdChildren, getApiProgramsByIdThumb, getApiProgramsByIdExternalLink, getProgramByExternalId, batchGetProgramsByExternalIds, getApiProgrammingShowsById, getApiProgrammingSeasonsById, getApiProgrammingShowsByIdSeasons, postApiProgramsByIdScan, getApiDebugJellyfinLibraries, getApiDebugJellyfinLibraryItems, getApiDebugJellyfinMatchProgramById, getApiDebugJellyfinByLibraryIdEnumerate, getApiDebugStreamsOffline, getApiDebugStreamsError, getApiDebugStreamsRandom, getApiDebugStreamsProgramsById, getApiDebugFfmpegProbe, getApiDebugFfmpegCapabilities, getApiDebugPlexStreamDetails, getApiDebugHeap, getApiDebugHelpersPlayingAt, getApiDebugHelpersCreateGuide, getApiDebugHelpersChannelsByIdBuildGuide, getApiDebugHelpersBuildGuide, getApiDebugHelpersRandomFiller, getApiDebugDbBackup, postApiDebugPlexByProgramIdUpdateExternalIds, getApiDebugChannelsReloadAllLineups, getApiDebugSubprocessStatus, getApiDebugSubprocessRestart, getApiDebugMediaSourcesByMediaSourceIdScan, getApiDebugMediaSourcesByMediaSourceIdLibrariesByLibraryIdScan, getApiDebugMediaSourcesByMediaSourceIdScanCollections, getApiMediaSources, postApiMediaSources, getApiMediaSourcesByMediaSourceId, getApiMediaSourcesByIdLibraries, putApiMediaSourcesByIdLibrariesByLibraryId, getApiMediaLibrariesByLibraryId, getApiMediaLibrariesByLibraryIdPrograms, getApiMediaSourcesByMediaSourceIdByLibraryIdStatus, postApiMediaSourcesByIdLibrariesRefresh, postApiMediaSourcesByIdScan, postApiMediaSourcesByIdLibrariesByLibraryIdScan, getApiMediaSourcesByIdStatus, postApiMediaSourcesForeignstatus, deleteApiMediaSourcesById, putApiMediaSourcesById, getApiFfmpegSettings, postApiFfmpegSettings, putApiFfmpegSettings, getApiTranscodeConfigs, postApiTranscodeConfigs, deleteApiTranscodeConfigsById, getApiTranscodeConfigsById, putApiTranscodeConfigsById, postApiTranscodeConfigsByIdCopy, getApiPlexSettings, postApiPlexSettings, putApiPlexSettings, getApiXmltvSettings, postApiXmltvSettings, putApiXmltvSettings, getApiHdhrSettings, postApiHdhrSettings, putApiHdhrSettings, getApiSystemHealth, getApiSystemSettings, putApiSystemSettings, getApiSystemState, getApiSystemMigrationState, postApiSystemFixersByFixerIdRun, putApiSystemSettingsBackup, getApiSystemDebugNvidia, getApiSystemDebugVaapi, getApiSystemDebugLogsStream, getApiSystemDebugLogs, getApiSystemDebugEnv, getApiSystemDebugLoggers, getApiGuideStatus, getApiGuideDebug, getApiGuideChannels, getApiGuideChannelsById, getApiPlexByMediaSourceIdSearch, getApiPlexByMediaSourceIdLibraries, getApiPlexByMediaSourceIdLibrariesByLibraryIdCollections, getApiPlexByMediaSourceIdLibrariesByLibraryIdPlaylists, getApiPlexByMediaSourceIdPlaylists, getApiPlexByMediaSourceIdFilters, getApiPlexByMediaSourceIdTags, getApiPlexByMediaSourceIdItemsByItemIdChildren, jellyfinLogin, getJellyfinLibraries, getJellyfinLibraryGenres, getJellyfinLibraryItems, getApiSessions, deleteApiChannelsByIdSessions, getApiChannelsByIdSessions, postApiEmbyLogin, getApiEmbyByMediaSourceIdUserLibraries, getApiEmbyByMediaSourceIdLibrariesByLibraryIdItems, getApiSettingsMediaSource, putApiSettingsMediaSource, deleteApiTrash, getApiTrash, getApiSmartCollections, postApiSmartCollections, deleteApiSmartCollectionsById, getApiSmartCollectionsById, putApiSmartCollectionsById, getApiCreditsById, getApiCreditsByIdArtworkByArtworkType, batchGetProgramGroupingsByExternalIds, getApiVersion, getApiFfmpegInfo, postApiUploadImage, getApiXmltvLastRefresh, getApiXmltvXml, postApiXmltvRefresh, deleteApiChannelsM3U, getApiChannelsM3U, getFfmpegPlaylist, getStreamChannelsById, getStreamChannelsByIdTs, getStreamChannelsByIdM3U8 } from '../sdk.gen';
|
|
import { queryOptions, type UseMutationOptions, type DefaultError, infiniteQueryOptions, type InfiniteData } from '@tanstack/react-query';
|
|
import type { GetApiTasksData, PostApiTasksByIdRunData, PostApiTasksByIdRunError, GetChannelsData, CreateChannelV2Data, CreateChannelV2Error, CreateChannelV2Response, DeleteApiChannelsByIdData, GetChannelsByNumberV2Data, PutApiChannelsByIdData, PutApiChannelsByIdResponse, GetApiChannelsByIdProgramsData, GetApiChannelsByIdProgramsResponse, GetApiChannelsByIdShowsData, GetApiChannelsByIdShowsResponse, GetApiChannelsByIdArtistsData, GetApiChannelsByIdArtistsResponse, GetApiChannelsByIdProgrammingData, GetApiChannelsByIdProgrammingError, GetApiChannelsByIdProgrammingResponse, PostApiChannelsByIdProgrammingData, PostApiChannelsByIdProgrammingResponse, GetChannelFallbacksData, GetApiChannelsAllLineupsData, GetApiChannelsByIdLineupData, GetApiChannelsByIdNowPlayingData, GetApiChannelsByIdTranscodeConfigData, PostApiChannelsByChannelIdScheduleTimeSlotsData, PostApiChannelsByChannelIdScheduleTimeSlotsResponse, PostApiChannelsByChannelIdScheduleSlotsData, PostApiChannelsByChannelIdScheduleSlotsResponse, GetApiChannelsByIdScheduleData, GetApiCustomShowsData, CreateCustomShowData, CreateCustomShowResponse, DeleteCustomShowData, DeleteCustomShowResponse, GetApiCustomShowsByIdData, PutApiCustomShowsByIdData, PutApiCustomShowsByIdResponse, GetApiCustomShowsByIdProgramsData, GetApiFillerListsData, PostApiFillerListsData, PostApiFillerListsResponse, DeleteApiFillerListsByIdData, GetApiFillerListsByIdData, PutApiFillerListsByIdData, PutApiFillerListsByIdResponse, GetApiFillerListsByIdProgramsData, PostApiProgramsSearchData, PostApiProgramsSearchResponse, GetApiProgramsByIdDescendantsData, GetApiProgramsFacetsByFacetNameData, PostApiProgramsFacetsByFacetNameData, PostApiProgramsFacetsByFacetNameResponse, GetApiProgramsByIdData, GetApiProgramGroupingsByIdData, GetApiProgramsByIdArtworkByArtworkTypeData, GetApiProgramsByIdStreamDetailsData, GetApiProgramsByIdChildrenData, GetApiProgramsByIdChildrenResponse, GetApiProgramsByIdThumbData, GetApiProgramsByIdExternalLinkData, GetProgramByExternalIdData, BatchGetProgramsByExternalIdsData, BatchGetProgramsByExternalIdsResponse, GetApiProgrammingShowsByIdData, GetApiProgrammingSeasonsByIdData, GetApiProgrammingShowsByIdSeasonsData, PostApiProgramsByIdScanData, PostApiProgramsByIdScanError, GetApiDebugJellyfinLibrariesData, GetApiDebugJellyfinLibraryItemsData, GetApiDebugJellyfinMatchProgramByIdData, GetApiDebugJellyfinByLibraryIdEnumerateData, GetApiDebugStreamsOfflineData, GetApiDebugStreamsErrorData, GetApiDebugStreamsRandomData, GetApiDebugStreamsProgramsByIdData, GetApiDebugFfmpegProbeData, GetApiDebugFfmpegCapabilitiesData, GetApiDebugPlexStreamDetailsData, GetApiDebugHeapData, GetApiDebugHelpersPlayingAtData, GetApiDebugHelpersCreateGuideData, GetApiDebugHelpersChannelsByIdBuildGuideData, GetApiDebugHelpersBuildGuideData, GetApiDebugHelpersRandomFillerData, GetApiDebugDbBackupData, PostApiDebugPlexByProgramIdUpdateExternalIdsData, GetApiDebugChannelsReloadAllLineupsData, GetApiDebugSubprocessStatusData, GetApiDebugSubprocessRestartData, GetApiDebugMediaSourcesByMediaSourceIdScanData, GetApiDebugMediaSourcesByMediaSourceIdLibrariesByLibraryIdScanData, GetApiDebugMediaSourcesByMediaSourceIdScanCollectionsData, GetApiMediaSourcesData, PostApiMediaSourcesData, PostApiMediaSourcesError, PostApiMediaSourcesResponse, GetApiMediaSourcesByMediaSourceIdData, GetApiMediaSourcesByIdLibrariesData, PutApiMediaSourcesByIdLibrariesByLibraryIdData, PutApiMediaSourcesByIdLibrariesByLibraryIdError, PutApiMediaSourcesByIdLibrariesByLibraryIdResponse, GetApiMediaLibrariesByLibraryIdData, GetApiMediaLibrariesByLibraryIdProgramsData, GetApiMediaSourcesByMediaSourceIdByLibraryIdStatusData, PostApiMediaSourcesByIdLibrariesRefreshData, PostApiMediaSourcesByIdScanData, PostApiMediaSourcesByIdLibrariesByLibraryIdScanData, GetApiMediaSourcesByIdStatusData, PostApiMediaSourcesForeignstatusData, PostApiMediaSourcesForeignstatusResponse, DeleteApiMediaSourcesByIdData, PutApiMediaSourcesByIdData, GetApiFfmpegSettingsData, PostApiFfmpegSettingsData, PutApiFfmpegSettingsData, PutApiFfmpegSettingsError, PutApiFfmpegSettingsResponse, GetApiTranscodeConfigsData, PostApiTranscodeConfigsData, PostApiTranscodeConfigsResponse, DeleteApiTranscodeConfigsByIdData, GetApiTranscodeConfigsByIdData, PutApiTranscodeConfigsByIdData, PutApiTranscodeConfigsByIdResponse, PostApiTranscodeConfigsByIdCopyData, PostApiTranscodeConfigsByIdCopyResponse, GetApiPlexSettingsData, PostApiPlexSettingsData, PostApiPlexSettingsError, PostApiPlexSettingsResponse, PutApiPlexSettingsData, PutApiPlexSettingsError, PutApiPlexSettingsResponse, GetApiXmltvSettingsData, PostApiXmltvSettingsData, PostApiXmltvSettingsError, PostApiXmltvSettingsResponse, PutApiXmltvSettingsData, PutApiXmltvSettingsError, PutApiXmltvSettingsResponse, GetApiHdhrSettingsData, PostApiHdhrSettingsData, PostApiHdhrSettingsError, PostApiHdhrSettingsResponse, PutApiHdhrSettingsData, PutApiHdhrSettingsError, PutApiHdhrSettingsResponse, GetApiSystemHealthData, GetApiSystemSettingsData, PutApiSystemSettingsData, PutApiSystemSettingsResponse, GetApiSystemStateData, GetApiSystemMigrationStateData, PostApiSystemFixersByFixerIdRunData, PutApiSystemSettingsBackupData, PutApiSystemSettingsBackupResponse, GetApiSystemDebugNvidiaData, GetApiSystemDebugVaapiData, GetApiSystemDebugLogsStreamData, GetApiSystemDebugLogsData, GetApiSystemDebugEnvData, GetApiSystemDebugLoggersData, GetApiGuideStatusData, GetApiGuideDebugData, GetApiGuideChannelsData, GetApiGuideChannelsByIdData, GetApiPlexByMediaSourceIdSearchData, GetApiPlexByMediaSourceIdSearchError, GetApiPlexByMediaSourceIdSearchResponse, GetApiPlexByMediaSourceIdLibrariesData, GetApiPlexByMediaSourceIdLibrariesByLibraryIdCollectionsData, GetApiPlexByMediaSourceIdLibrariesByLibraryIdCollectionsResponse, GetApiPlexByMediaSourceIdLibrariesByLibraryIdPlaylistsData, GetApiPlexByMediaSourceIdLibrariesByLibraryIdPlaylistsResponse, GetApiPlexByMediaSourceIdPlaylistsData, GetApiPlexByMediaSourceIdPlaylistsResponse, GetApiPlexByMediaSourceIdFiltersData, GetApiPlexByMediaSourceIdTagsData, GetApiPlexByMediaSourceIdItemsByItemIdChildrenData, JellyfinLoginData, JellyfinLoginResponse, GetJellyfinLibrariesData, GetJellyfinLibraryGenresData, GetJellyfinLibraryItemsData, GetJellyfinLibraryItemsError, GetJellyfinLibraryItemsResponse, GetApiSessionsData, DeleteApiChannelsByIdSessionsData, DeleteApiChannelsByIdSessionsError, DeleteApiChannelsByIdSessionsResponse, GetApiChannelsByIdSessionsData, PostApiEmbyLoginData, PostApiEmbyLoginResponse, GetApiEmbyByMediaSourceIdUserLibrariesData, GetApiEmbyByMediaSourceIdLibrariesByLibraryIdItemsData, GetApiEmbyByMediaSourceIdLibrariesByLibraryIdItemsError, GetApiEmbyByMediaSourceIdLibrariesByLibraryIdItemsResponse, GetApiSettingsMediaSourceData, PutApiSettingsMediaSourceData, PutApiSettingsMediaSourceResponse, DeleteApiTrashData, GetApiTrashData, GetApiSmartCollectionsData, PostApiSmartCollectionsData, PostApiSmartCollectionsError, PostApiSmartCollectionsResponse, DeleteApiSmartCollectionsByIdData, GetApiSmartCollectionsByIdData, PutApiSmartCollectionsByIdData, PutApiSmartCollectionsByIdResponse, GetApiCreditsByIdData, GetApiCreditsByIdArtworkByArtworkTypeData, BatchGetProgramGroupingsByExternalIdsData, BatchGetProgramGroupingsByExternalIdsResponse, GetApiVersionData, GetApiFfmpegInfoData, PostApiUploadImageData, PostApiUploadImageResponse, GetApiXmltvLastRefreshData, GetApiXmltvXmlData, PostApiXmltvRefreshData, DeleteApiChannelsM3uData, GetApiChannelsM3uData, GetFfmpegPlaylistData, GetStreamChannelsByIdData, GetStreamChannelsByIdTsData, GetStreamChannelsByIdM3U8Data } from '../types.gen';
|
|
import type { AxiosError } from 'axios';
|
|
import { client as _heyApiClient } from '../client.gen';
|
|
|
|
export type QueryKey<TOptions extends Options> = [
|
|
Pick<TOptions, 'baseURL' | 'body' | 'headers' | 'path' | 'query'> & {
|
|
_id: string;
|
|
_infinite?: boolean;
|
|
tags?: ReadonlyArray<string>;
|
|
}
|
|
];
|
|
|
|
const createQueryKey = <TOptions extends Options>(id: string, options?: TOptions, infinite?: boolean, tags?: ReadonlyArray<string>): [
|
|
QueryKey<TOptions>[0]
|
|
] => {
|
|
const params: QueryKey<TOptions>[0] = { _id: id, baseURL: options?.baseURL || (options?.client ?? _heyApiClient).getConfig().baseURL } as QueryKey<TOptions>[0];
|
|
if (infinite) {
|
|
params._infinite = infinite;
|
|
}
|
|
if (tags) {
|
|
params.tags = tags;
|
|
}
|
|
if (options?.body) {
|
|
params.body = options.body;
|
|
}
|
|
if (options?.headers) {
|
|
params.headers = options.headers;
|
|
}
|
|
if (options?.path) {
|
|
params.path = options.path;
|
|
}
|
|
if (options?.query) {
|
|
params.query = options.query;
|
|
}
|
|
return [
|
|
params
|
|
];
|
|
};
|
|
|
|
export const getApiTasksQueryKey = (options?: Options<GetApiTasksData>) => createQueryKey('getApiTasks', options, false, [
|
|
'System',
|
|
'Tasks'
|
|
]);
|
|
|
|
export const getApiTasksOptions = (options?: Options<GetApiTasksData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiTasks({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiTasksQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const postApiTasksByIdRunQueryKey = (options: Options<PostApiTasksByIdRunData>) => createQueryKey('postApiTasksByIdRun', options, false, [
|
|
'System',
|
|
'Tasks'
|
|
]);
|
|
|
|
export const postApiTasksByIdRunOptions = (options: Options<PostApiTasksByIdRunData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await postApiTasksByIdRun({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: postApiTasksByIdRunQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const postApiTasksByIdRunMutation = (options?: Partial<Options<PostApiTasksByIdRunData>>): UseMutationOptions<unknown, AxiosError<PostApiTasksByIdRunError>, Options<PostApiTasksByIdRunData>> => {
|
|
const mutationOptions: UseMutationOptions<unknown, AxiosError<PostApiTasksByIdRunError>, Options<PostApiTasksByIdRunData>> = {
|
|
mutationFn: async (localOptions) => {
|
|
const { data } = await postApiTasksByIdRun({
|
|
...options,
|
|
...localOptions,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
}
|
|
};
|
|
return mutationOptions;
|
|
};
|
|
|
|
export const getChannelsQueryKey = (options?: Options<GetChannelsData>) => createQueryKey('getChannels', options, false, [
|
|
'Channels'
|
|
]);
|
|
|
|
export const getChannelsOptions = (options?: Options<GetChannelsData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getChannels({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getChannelsQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const createChannelV2QueryKey = (options?: Options<CreateChannelV2Data>) => createQueryKey('createChannelV2', options, false, [
|
|
'Channels'
|
|
]);
|
|
|
|
export const createChannelV2Options = (options?: Options<CreateChannelV2Data>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await createChannelV2({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: createChannelV2QueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const createChannelV2Mutation = (options?: Partial<Options<CreateChannelV2Data>>): UseMutationOptions<CreateChannelV2Response, AxiosError<CreateChannelV2Error>, Options<CreateChannelV2Data>> => {
|
|
const mutationOptions: UseMutationOptions<CreateChannelV2Response, AxiosError<CreateChannelV2Error>, Options<CreateChannelV2Data>> = {
|
|
mutationFn: async (localOptions) => {
|
|
const { data } = await createChannelV2({
|
|
...options,
|
|
...localOptions,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
}
|
|
};
|
|
return mutationOptions;
|
|
};
|
|
|
|
export const deleteApiChannelsByIdMutation = (options?: Partial<Options<DeleteApiChannelsByIdData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DeleteApiChannelsByIdData>> => {
|
|
const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DeleteApiChannelsByIdData>> = {
|
|
mutationFn: async (localOptions) => {
|
|
const { data } = await deleteApiChannelsById({
|
|
...options,
|
|
...localOptions,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
}
|
|
};
|
|
return mutationOptions;
|
|
};
|
|
|
|
export const getChannelsByNumberV2QueryKey = (options: Options<GetChannelsByNumberV2Data>) => createQueryKey('getChannelsByNumberV2', options, false, [
|
|
'Channels'
|
|
]);
|
|
|
|
export const getChannelsByNumberV2Options = (options: Options<GetChannelsByNumberV2Data>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getChannelsByNumberV2({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getChannelsByNumberV2QueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const putApiChannelsByIdMutation = (options?: Partial<Options<PutApiChannelsByIdData>>): UseMutationOptions<PutApiChannelsByIdResponse, AxiosError<DefaultError>, Options<PutApiChannelsByIdData>> => {
|
|
const mutationOptions: UseMutationOptions<PutApiChannelsByIdResponse, AxiosError<DefaultError>, Options<PutApiChannelsByIdData>> = {
|
|
mutationFn: async (localOptions) => {
|
|
const { data } = await putApiChannelsById({
|
|
...options,
|
|
...localOptions,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
}
|
|
};
|
|
return mutationOptions;
|
|
};
|
|
|
|
export const getApiChannelsByIdProgramsQueryKey = (options: Options<GetApiChannelsByIdProgramsData>) => createQueryKey('getApiChannelsByIdPrograms', options, false, [
|
|
'Channels'
|
|
]);
|
|
|
|
export const getApiChannelsByIdProgramsOptions = (options: Options<GetApiChannelsByIdProgramsData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiChannelsByIdPrograms({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiChannelsByIdProgramsQueryKey(options)
|
|
});
|
|
};
|
|
|
|
const createInfiniteParams = <K extends Pick<QueryKey<Options>[0], 'body' | 'headers' | 'path' | 'query'>>(queryKey: QueryKey<Options>, page: K) => {
|
|
const params = {
|
|
...queryKey[0]
|
|
};
|
|
if (page.body) {
|
|
params.body = {
|
|
...queryKey[0].body as any,
|
|
...page.body as any
|
|
};
|
|
}
|
|
if (page.headers) {
|
|
params.headers = {
|
|
...queryKey[0].headers,
|
|
...page.headers
|
|
};
|
|
}
|
|
if (page.path) {
|
|
params.path = {
|
|
...queryKey[0].path as any,
|
|
...page.path as any
|
|
};
|
|
}
|
|
if (page.query) {
|
|
params.query = {
|
|
...queryKey[0].query as any,
|
|
...page.query as any
|
|
};
|
|
}
|
|
return params as unknown as typeof page;
|
|
};
|
|
|
|
export const getApiChannelsByIdProgramsInfiniteQueryKey = (options: Options<GetApiChannelsByIdProgramsData>): QueryKey<Options<GetApiChannelsByIdProgramsData>> => createQueryKey('getApiChannelsByIdPrograms', options, true);
|
|
|
|
export const getApiChannelsByIdProgramsInfiniteOptions = (options: Options<GetApiChannelsByIdProgramsData>) => {
|
|
return infiniteQueryOptions<GetApiChannelsByIdProgramsResponse, AxiosError<DefaultError>, InfiniteData<GetApiChannelsByIdProgramsResponse>, QueryKey<Options<GetApiChannelsByIdProgramsData>>, number | Pick<QueryKey<Options<GetApiChannelsByIdProgramsData>>[0], 'body' | 'headers' | 'path' | 'query'>>(
|
|
// @ts-ignore
|
|
{
|
|
queryFn: async ({ pageParam, queryKey, signal }) => {
|
|
// @ts-ignore
|
|
const page: Pick<QueryKey<Options<GetApiChannelsByIdProgramsData>>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : {
|
|
query: {
|
|
offset: pageParam
|
|
}
|
|
};
|
|
const params = createInfiniteParams(queryKey, page);
|
|
const { data } = await getApiChannelsByIdPrograms({
|
|
...options,
|
|
...params,
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiChannelsByIdProgramsInfiniteQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getApiChannelsByIdShowsQueryKey = (options: Options<GetApiChannelsByIdShowsData>) => createQueryKey('getApiChannelsByIdShows', options);
|
|
|
|
export const getApiChannelsByIdShowsOptions = (options: Options<GetApiChannelsByIdShowsData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiChannelsByIdShows({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiChannelsByIdShowsQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getApiChannelsByIdShowsInfiniteQueryKey = (options: Options<GetApiChannelsByIdShowsData>): QueryKey<Options<GetApiChannelsByIdShowsData>> => createQueryKey('getApiChannelsByIdShows', options, true);
|
|
|
|
export const getApiChannelsByIdShowsInfiniteOptions = (options: Options<GetApiChannelsByIdShowsData>) => {
|
|
return infiniteQueryOptions<GetApiChannelsByIdShowsResponse, AxiosError<DefaultError>, InfiniteData<GetApiChannelsByIdShowsResponse>, QueryKey<Options<GetApiChannelsByIdShowsData>>, number | Pick<QueryKey<Options<GetApiChannelsByIdShowsData>>[0], 'body' | 'headers' | 'path' | 'query'>>(
|
|
// @ts-ignore
|
|
{
|
|
queryFn: async ({ pageParam, queryKey, signal }) => {
|
|
// @ts-ignore
|
|
const page: Pick<QueryKey<Options<GetApiChannelsByIdShowsData>>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : {
|
|
query: {
|
|
offset: pageParam
|
|
}
|
|
};
|
|
const params = createInfiniteParams(queryKey, page);
|
|
const { data } = await getApiChannelsByIdShows({
|
|
...options,
|
|
...params,
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiChannelsByIdShowsInfiniteQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getApiChannelsByIdArtistsQueryKey = (options: Options<GetApiChannelsByIdArtistsData>) => createQueryKey('getApiChannelsByIdArtists', options);
|
|
|
|
export const getApiChannelsByIdArtistsOptions = (options: Options<GetApiChannelsByIdArtistsData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiChannelsByIdArtists({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiChannelsByIdArtistsQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getApiChannelsByIdArtistsInfiniteQueryKey = (options: Options<GetApiChannelsByIdArtistsData>): QueryKey<Options<GetApiChannelsByIdArtistsData>> => createQueryKey('getApiChannelsByIdArtists', options, true);
|
|
|
|
export const getApiChannelsByIdArtistsInfiniteOptions = (options: Options<GetApiChannelsByIdArtistsData>) => {
|
|
return infiniteQueryOptions<GetApiChannelsByIdArtistsResponse, AxiosError<DefaultError>, InfiniteData<GetApiChannelsByIdArtistsResponse>, QueryKey<Options<GetApiChannelsByIdArtistsData>>, number | Pick<QueryKey<Options<GetApiChannelsByIdArtistsData>>[0], 'body' | 'headers' | 'path' | 'query'>>(
|
|
// @ts-ignore
|
|
{
|
|
queryFn: async ({ pageParam, queryKey, signal }) => {
|
|
// @ts-ignore
|
|
const page: Pick<QueryKey<Options<GetApiChannelsByIdArtistsData>>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : {
|
|
query: {
|
|
offset: pageParam
|
|
}
|
|
};
|
|
const params = createInfiniteParams(queryKey, page);
|
|
const { data } = await getApiChannelsByIdArtists({
|
|
...options,
|
|
...params,
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiChannelsByIdArtistsInfiniteQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getApiChannelsByIdProgrammingQueryKey = (options: Options<GetApiChannelsByIdProgrammingData>) => createQueryKey('getApiChannelsByIdProgramming', options, false, [
|
|
'Channels'
|
|
]);
|
|
|
|
export const getApiChannelsByIdProgrammingOptions = (options: Options<GetApiChannelsByIdProgrammingData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiChannelsByIdProgramming({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiChannelsByIdProgrammingQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getApiChannelsByIdProgrammingInfiniteQueryKey = (options: Options<GetApiChannelsByIdProgrammingData>): QueryKey<Options<GetApiChannelsByIdProgrammingData>> => createQueryKey('getApiChannelsByIdProgramming', options, true);
|
|
|
|
export const getApiChannelsByIdProgrammingInfiniteOptions = (options: Options<GetApiChannelsByIdProgrammingData>) => {
|
|
return infiniteQueryOptions<GetApiChannelsByIdProgrammingResponse, AxiosError<GetApiChannelsByIdProgrammingError>, InfiniteData<GetApiChannelsByIdProgrammingResponse>, QueryKey<Options<GetApiChannelsByIdProgrammingData>>, number | Pick<QueryKey<Options<GetApiChannelsByIdProgrammingData>>[0], 'body' | 'headers' | 'path' | 'query'>>(
|
|
// @ts-ignore
|
|
{
|
|
queryFn: async ({ pageParam, queryKey, signal }) => {
|
|
// @ts-ignore
|
|
const page: Pick<QueryKey<Options<GetApiChannelsByIdProgrammingData>>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : {
|
|
query: {
|
|
offset: pageParam
|
|
}
|
|
};
|
|
const params = createInfiniteParams(queryKey, page);
|
|
const { data } = await getApiChannelsByIdProgramming({
|
|
...options,
|
|
...params,
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiChannelsByIdProgrammingInfiniteQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const postApiChannelsByIdProgrammingQueryKey = (options: Options<PostApiChannelsByIdProgrammingData>) => createQueryKey('postApiChannelsByIdProgramming', options, false, [
|
|
'Channels'
|
|
]);
|
|
|
|
export const postApiChannelsByIdProgrammingOptions = (options: Options<PostApiChannelsByIdProgrammingData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await postApiChannelsByIdProgramming({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: postApiChannelsByIdProgrammingQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const postApiChannelsByIdProgrammingMutation = (options?: Partial<Options<PostApiChannelsByIdProgrammingData>>): UseMutationOptions<PostApiChannelsByIdProgrammingResponse, AxiosError<DefaultError>, Options<PostApiChannelsByIdProgrammingData>> => {
|
|
const mutationOptions: UseMutationOptions<PostApiChannelsByIdProgrammingResponse, AxiosError<DefaultError>, Options<PostApiChannelsByIdProgrammingData>> = {
|
|
mutationFn: async (localOptions) => {
|
|
const { data } = await postApiChannelsByIdProgramming({
|
|
...options,
|
|
...localOptions,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
}
|
|
};
|
|
return mutationOptions;
|
|
};
|
|
|
|
export const getChannelFallbacksQueryKey = (options: Options<GetChannelFallbacksData>) => createQueryKey('getChannelFallbacks', options, false, [
|
|
'Channels'
|
|
]);
|
|
|
|
/**
|
|
* Returns a channel's fallback programs.
|
|
*/
|
|
export const getChannelFallbacksOptions = (options: Options<GetChannelFallbacksData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getChannelFallbacks({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getChannelFallbacksQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getApiChannelsAllLineupsQueryKey = (options?: Options<GetApiChannelsAllLineupsData>) => createQueryKey('getApiChannelsAllLineups', options, false, [
|
|
'Channels'
|
|
]);
|
|
|
|
export const getApiChannelsAllLineupsOptions = (options?: Options<GetApiChannelsAllLineupsData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiChannelsAllLineups({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiChannelsAllLineupsQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getApiChannelsByIdLineupQueryKey = (options: Options<GetApiChannelsByIdLineupData>) => createQueryKey('getApiChannelsByIdLineup', options, false, [
|
|
'Channels'
|
|
]);
|
|
|
|
export const getApiChannelsByIdLineupOptions = (options: Options<GetApiChannelsByIdLineupData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiChannelsByIdLineup({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiChannelsByIdLineupQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getApiChannelsByIdNowPlayingQueryKey = (options: Options<GetApiChannelsByIdNowPlayingData>) => createQueryKey('getApiChannelsByIdNowPlaying', options, false, [
|
|
'Channels'
|
|
]);
|
|
|
|
export const getApiChannelsByIdNowPlayingOptions = (options: Options<GetApiChannelsByIdNowPlayingData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiChannelsByIdNowPlaying({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiChannelsByIdNowPlayingQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getApiChannelsByIdTranscodeConfigQueryKey = (options: Options<GetApiChannelsByIdTranscodeConfigData>) => createQueryKey('getApiChannelsByIdTranscodeConfig', options);
|
|
|
|
export const getApiChannelsByIdTranscodeConfigOptions = (options: Options<GetApiChannelsByIdTranscodeConfigData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiChannelsByIdTranscodeConfig({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiChannelsByIdTranscodeConfigQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const postApiChannelsByChannelIdScheduleTimeSlotsQueryKey = (options: Options<PostApiChannelsByChannelIdScheduleTimeSlotsData>) => createQueryKey('postApiChannelsByChannelIdScheduleTimeSlots', options, false, [
|
|
'Channels'
|
|
]);
|
|
|
|
export const postApiChannelsByChannelIdScheduleTimeSlotsOptions = (options: Options<PostApiChannelsByChannelIdScheduleTimeSlotsData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await postApiChannelsByChannelIdScheduleTimeSlots({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: postApiChannelsByChannelIdScheduleTimeSlotsQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const postApiChannelsByChannelIdScheduleTimeSlotsMutation = (options?: Partial<Options<PostApiChannelsByChannelIdScheduleTimeSlotsData>>): UseMutationOptions<PostApiChannelsByChannelIdScheduleTimeSlotsResponse, AxiosError<DefaultError>, Options<PostApiChannelsByChannelIdScheduleTimeSlotsData>> => {
|
|
const mutationOptions: UseMutationOptions<PostApiChannelsByChannelIdScheduleTimeSlotsResponse, AxiosError<DefaultError>, Options<PostApiChannelsByChannelIdScheduleTimeSlotsData>> = {
|
|
mutationFn: async (localOptions) => {
|
|
const { data } = await postApiChannelsByChannelIdScheduleTimeSlots({
|
|
...options,
|
|
...localOptions,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
}
|
|
};
|
|
return mutationOptions;
|
|
};
|
|
|
|
export const postApiChannelsByChannelIdScheduleSlotsQueryKey = (options: Options<PostApiChannelsByChannelIdScheduleSlotsData>) => createQueryKey('postApiChannelsByChannelIdScheduleSlots', options, false, [
|
|
'Channels'
|
|
]);
|
|
|
|
export const postApiChannelsByChannelIdScheduleSlotsOptions = (options: Options<PostApiChannelsByChannelIdScheduleSlotsData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await postApiChannelsByChannelIdScheduleSlots({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: postApiChannelsByChannelIdScheduleSlotsQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const postApiChannelsByChannelIdScheduleSlotsMutation = (options?: Partial<Options<PostApiChannelsByChannelIdScheduleSlotsData>>): UseMutationOptions<PostApiChannelsByChannelIdScheduleSlotsResponse, AxiosError<DefaultError>, Options<PostApiChannelsByChannelIdScheduleSlotsData>> => {
|
|
const mutationOptions: UseMutationOptions<PostApiChannelsByChannelIdScheduleSlotsResponse, AxiosError<DefaultError>, Options<PostApiChannelsByChannelIdScheduleSlotsData>> = {
|
|
mutationFn: async (localOptions) => {
|
|
const { data } = await postApiChannelsByChannelIdScheduleSlots({
|
|
...options,
|
|
...localOptions,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
}
|
|
};
|
|
return mutationOptions;
|
|
};
|
|
|
|
export const getApiChannelsByIdScheduleQueryKey = (options: Options<GetApiChannelsByIdScheduleData>) => createQueryKey('getApiChannelsByIdSchedule', options, false, [
|
|
'Channels',
|
|
'Scheduling'
|
|
]);
|
|
|
|
export const getApiChannelsByIdScheduleOptions = (options: Options<GetApiChannelsByIdScheduleData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiChannelsByIdSchedule({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiChannelsByIdScheduleQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getApiCustomShowsQueryKey = (options?: Options<GetApiCustomShowsData>) => createQueryKey('getApiCustomShows', options, false, [
|
|
'Custom Shows'
|
|
]);
|
|
|
|
export const getApiCustomShowsOptions = (options?: Options<GetApiCustomShowsData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiCustomShows({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiCustomShowsQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const createCustomShowQueryKey = (options: Options<CreateCustomShowData>) => createQueryKey('createCustomShow', options, false, [
|
|
'Custom Shows'
|
|
]);
|
|
|
|
/**
|
|
* Creates a new Custom Show
|
|
*/
|
|
export const createCustomShowOptions = (options: Options<CreateCustomShowData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await createCustomShow({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: createCustomShowQueryKey(options)
|
|
});
|
|
};
|
|
|
|
/**
|
|
* Creates a new Custom Show
|
|
*/
|
|
export const createCustomShowMutation = (options?: Partial<Options<CreateCustomShowData>>): UseMutationOptions<CreateCustomShowResponse, AxiosError<DefaultError>, Options<CreateCustomShowData>> => {
|
|
const mutationOptions: UseMutationOptions<CreateCustomShowResponse, AxiosError<DefaultError>, Options<CreateCustomShowData>> = {
|
|
mutationFn: async (localOptions) => {
|
|
const { data } = await createCustomShow({
|
|
...options,
|
|
...localOptions,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
}
|
|
};
|
|
return mutationOptions;
|
|
};
|
|
|
|
/**
|
|
* Delets a custom show with the given ID
|
|
*/
|
|
export const deleteCustomShowMutation = (options?: Partial<Options<DeleteCustomShowData>>): UseMutationOptions<DeleteCustomShowResponse, AxiosError<DefaultError>, Options<DeleteCustomShowData>> => {
|
|
const mutationOptions: UseMutationOptions<DeleteCustomShowResponse, AxiosError<DefaultError>, Options<DeleteCustomShowData>> = {
|
|
mutationFn: async (localOptions) => {
|
|
const { data } = await deleteCustomShow({
|
|
...options,
|
|
...localOptions,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
}
|
|
};
|
|
return mutationOptions;
|
|
};
|
|
|
|
export const getApiCustomShowsByIdQueryKey = (options: Options<GetApiCustomShowsByIdData>) => createQueryKey('getApiCustomShowsById', options, false, [
|
|
'Custom Shows'
|
|
]);
|
|
|
|
export const getApiCustomShowsByIdOptions = (options: Options<GetApiCustomShowsByIdData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiCustomShowsById({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiCustomShowsByIdQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const putApiCustomShowsByIdMutation = (options?: Partial<Options<PutApiCustomShowsByIdData>>): UseMutationOptions<PutApiCustomShowsByIdResponse, AxiosError<DefaultError>, Options<PutApiCustomShowsByIdData>> => {
|
|
const mutationOptions: UseMutationOptions<PutApiCustomShowsByIdResponse, AxiosError<DefaultError>, Options<PutApiCustomShowsByIdData>> = {
|
|
mutationFn: async (localOptions) => {
|
|
const { data } = await putApiCustomShowsById({
|
|
...options,
|
|
...localOptions,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
}
|
|
};
|
|
return mutationOptions;
|
|
};
|
|
|
|
export const getApiCustomShowsByIdProgramsQueryKey = (options: Options<GetApiCustomShowsByIdProgramsData>) => createQueryKey('getApiCustomShowsByIdPrograms', options, false, [
|
|
'Custom Shows'
|
|
]);
|
|
|
|
export const getApiCustomShowsByIdProgramsOptions = (options: Options<GetApiCustomShowsByIdProgramsData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiCustomShowsByIdPrograms({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiCustomShowsByIdProgramsQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getApiFillerListsQueryKey = (options?: Options<GetApiFillerListsData>) => createQueryKey('getApiFillerLists', options, false, [
|
|
'Filler Lists'
|
|
]);
|
|
|
|
export const getApiFillerListsOptions = (options?: Options<GetApiFillerListsData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiFillerLists({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiFillerListsQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const postApiFillerListsQueryKey = (options: Options<PostApiFillerListsData>) => createQueryKey('postApiFillerLists', options, false, [
|
|
'Filler Lists'
|
|
]);
|
|
|
|
export const postApiFillerListsOptions = (options: Options<PostApiFillerListsData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await postApiFillerLists({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: postApiFillerListsQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const postApiFillerListsMutation = (options?: Partial<Options<PostApiFillerListsData>>): UseMutationOptions<PostApiFillerListsResponse, AxiosError<DefaultError>, Options<PostApiFillerListsData>> => {
|
|
const mutationOptions: UseMutationOptions<PostApiFillerListsResponse, AxiosError<DefaultError>, Options<PostApiFillerListsData>> = {
|
|
mutationFn: async (localOptions) => {
|
|
const { data } = await postApiFillerLists({
|
|
...options,
|
|
...localOptions,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
}
|
|
};
|
|
return mutationOptions;
|
|
};
|
|
|
|
export const deleteApiFillerListsByIdMutation = (options?: Partial<Options<DeleteApiFillerListsByIdData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DeleteApiFillerListsByIdData>> => {
|
|
const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DeleteApiFillerListsByIdData>> = {
|
|
mutationFn: async (localOptions) => {
|
|
const { data } = await deleteApiFillerListsById({
|
|
...options,
|
|
...localOptions,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
}
|
|
};
|
|
return mutationOptions;
|
|
};
|
|
|
|
export const getApiFillerListsByIdQueryKey = (options: Options<GetApiFillerListsByIdData>) => createQueryKey('getApiFillerListsById', options, false, [
|
|
'Filler Lists'
|
|
]);
|
|
|
|
export const getApiFillerListsByIdOptions = (options: Options<GetApiFillerListsByIdData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiFillerListsById({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiFillerListsByIdQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const putApiFillerListsByIdMutation = (options?: Partial<Options<PutApiFillerListsByIdData>>): UseMutationOptions<PutApiFillerListsByIdResponse, AxiosError<DefaultError>, Options<PutApiFillerListsByIdData>> => {
|
|
const mutationOptions: UseMutationOptions<PutApiFillerListsByIdResponse, AxiosError<DefaultError>, Options<PutApiFillerListsByIdData>> = {
|
|
mutationFn: async (localOptions) => {
|
|
const { data } = await putApiFillerListsById({
|
|
...options,
|
|
...localOptions,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
}
|
|
};
|
|
return mutationOptions;
|
|
};
|
|
|
|
export const getApiFillerListsByIdProgramsQueryKey = (options: Options<GetApiFillerListsByIdProgramsData>) => createQueryKey('getApiFillerListsByIdPrograms', options, false, [
|
|
'Filler Lists'
|
|
]);
|
|
|
|
export const getApiFillerListsByIdProgramsOptions = (options: Options<GetApiFillerListsByIdProgramsData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiFillerListsByIdPrograms({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiFillerListsByIdProgramsQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const postApiProgramsSearchQueryKey = (options: Options<PostApiProgramsSearchData>) => createQueryKey('postApiProgramsSearch', options);
|
|
|
|
export const postApiProgramsSearchOptions = (options: Options<PostApiProgramsSearchData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await postApiProgramsSearch({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: postApiProgramsSearchQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const postApiProgramsSearchInfiniteQueryKey = (options: Options<PostApiProgramsSearchData>): QueryKey<Options<PostApiProgramsSearchData>> => createQueryKey('postApiProgramsSearch', options, true);
|
|
|
|
export const postApiProgramsSearchInfiniteOptions = (options: Options<PostApiProgramsSearchData>) => {
|
|
return infiniteQueryOptions<PostApiProgramsSearchResponse, AxiosError<DefaultError>, InfiniteData<PostApiProgramsSearchResponse>, QueryKey<Options<PostApiProgramsSearchData>>, number | Pick<QueryKey<Options<PostApiProgramsSearchData>>[0], 'body' | 'headers' | 'path' | 'query'>>(
|
|
// @ts-ignore
|
|
{
|
|
queryFn: async ({ pageParam, queryKey, signal }) => {
|
|
// @ts-ignore
|
|
const page: Pick<QueryKey<Options<PostApiProgramsSearchData>>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : {
|
|
body: {
|
|
page: pageParam
|
|
}
|
|
};
|
|
const params = createInfiniteParams(queryKey, page);
|
|
const { data } = await postApiProgramsSearch({
|
|
...options,
|
|
...params,
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: postApiProgramsSearchInfiniteQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const postApiProgramsSearchMutation = (options?: Partial<Options<PostApiProgramsSearchData>>): UseMutationOptions<PostApiProgramsSearchResponse, AxiosError<DefaultError>, Options<PostApiProgramsSearchData>> => {
|
|
const mutationOptions: UseMutationOptions<PostApiProgramsSearchResponse, AxiosError<DefaultError>, Options<PostApiProgramsSearchData>> = {
|
|
mutationFn: async (localOptions) => {
|
|
const { data } = await postApiProgramsSearch({
|
|
...options,
|
|
...localOptions,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
}
|
|
};
|
|
return mutationOptions;
|
|
};
|
|
|
|
export const getApiProgramsByIdDescendantsQueryKey = (options: Options<GetApiProgramsByIdDescendantsData>) => createQueryKey('getApiProgramsByIdDescendants', options);
|
|
|
|
export const getApiProgramsByIdDescendantsOptions = (options: Options<GetApiProgramsByIdDescendantsData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiProgramsByIdDescendants({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiProgramsByIdDescendantsQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getApiProgramsFacetsByFacetNameQueryKey = (options: Options<GetApiProgramsFacetsByFacetNameData>) => createQueryKey('getApiProgramsFacetsByFacetName', options);
|
|
|
|
export const getApiProgramsFacetsByFacetNameOptions = (options: Options<GetApiProgramsFacetsByFacetNameData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiProgramsFacetsByFacetName({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiProgramsFacetsByFacetNameQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const postApiProgramsFacetsByFacetNameQueryKey = (options: Options<PostApiProgramsFacetsByFacetNameData>) => createQueryKey('postApiProgramsFacetsByFacetName', options);
|
|
|
|
export const postApiProgramsFacetsByFacetNameOptions = (options: Options<PostApiProgramsFacetsByFacetNameData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await postApiProgramsFacetsByFacetName({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: postApiProgramsFacetsByFacetNameQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const postApiProgramsFacetsByFacetNameMutation = (options?: Partial<Options<PostApiProgramsFacetsByFacetNameData>>): UseMutationOptions<PostApiProgramsFacetsByFacetNameResponse, AxiosError<DefaultError>, Options<PostApiProgramsFacetsByFacetNameData>> => {
|
|
const mutationOptions: UseMutationOptions<PostApiProgramsFacetsByFacetNameResponse, AxiosError<DefaultError>, Options<PostApiProgramsFacetsByFacetNameData>> = {
|
|
mutationFn: async (localOptions) => {
|
|
const { data } = await postApiProgramsFacetsByFacetName({
|
|
...options,
|
|
...localOptions,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
}
|
|
};
|
|
return mutationOptions;
|
|
};
|
|
|
|
export const getApiProgramsByIdQueryKey = (options: Options<GetApiProgramsByIdData>) => createQueryKey('getApiProgramsById', options, false, [
|
|
'Programs'
|
|
]);
|
|
|
|
export const getApiProgramsByIdOptions = (options: Options<GetApiProgramsByIdData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiProgramsById({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiProgramsByIdQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getApiProgramGroupingsByIdQueryKey = (options: Options<GetApiProgramGroupingsByIdData>) => createQueryKey('getApiProgramGroupingsById', options, false, [
|
|
'Programs'
|
|
]);
|
|
|
|
export const getApiProgramGroupingsByIdOptions = (options: Options<GetApiProgramGroupingsByIdData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiProgramGroupingsById({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiProgramGroupingsByIdQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getApiProgramsByIdArtworkByArtworkTypeQueryKey = (options: Options<GetApiProgramsByIdArtworkByArtworkTypeData>) => createQueryKey('getApiProgramsByIdArtworkByArtworkType', options);
|
|
|
|
export const getApiProgramsByIdArtworkByArtworkTypeOptions = (options: Options<GetApiProgramsByIdArtworkByArtworkTypeData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiProgramsByIdArtworkByArtworkType({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiProgramsByIdArtworkByArtworkTypeQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getApiProgramsByIdStreamDetailsQueryKey = (options: Options<GetApiProgramsByIdStreamDetailsData>) => createQueryKey('getApiProgramsByIdStreamDetails', options, false, [
|
|
'Programs'
|
|
]);
|
|
|
|
export const getApiProgramsByIdStreamDetailsOptions = (options: Options<GetApiProgramsByIdStreamDetailsData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiProgramsByIdStreamDetails({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiProgramsByIdStreamDetailsQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getApiProgramsByIdChildrenQueryKey = (options: Options<GetApiProgramsByIdChildrenData>) => createQueryKey('getApiProgramsByIdChildren', options, false, [
|
|
'Programs'
|
|
]);
|
|
|
|
export const getApiProgramsByIdChildrenOptions = (options: Options<GetApiProgramsByIdChildrenData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiProgramsByIdChildren({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiProgramsByIdChildrenQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getApiProgramsByIdChildrenInfiniteQueryKey = (options: Options<GetApiProgramsByIdChildrenData>): QueryKey<Options<GetApiProgramsByIdChildrenData>> => createQueryKey('getApiProgramsByIdChildren', options, true);
|
|
|
|
export const getApiProgramsByIdChildrenInfiniteOptions = (options: Options<GetApiProgramsByIdChildrenData>) => {
|
|
return infiniteQueryOptions<GetApiProgramsByIdChildrenResponse, AxiosError<DefaultError>, InfiniteData<GetApiProgramsByIdChildrenResponse>, QueryKey<Options<GetApiProgramsByIdChildrenData>>, number | Pick<QueryKey<Options<GetApiProgramsByIdChildrenData>>[0], 'body' | 'headers' | 'path' | 'query'>>(
|
|
// @ts-ignore
|
|
{
|
|
queryFn: async ({ pageParam, queryKey, signal }) => {
|
|
// @ts-ignore
|
|
const page: Pick<QueryKey<Options<GetApiProgramsByIdChildrenData>>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : {
|
|
query: {
|
|
offset: pageParam
|
|
}
|
|
};
|
|
const params = createInfiniteParams(queryKey, page);
|
|
const { data } = await getApiProgramsByIdChildren({
|
|
...options,
|
|
...params,
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiProgramsByIdChildrenInfiniteQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getApiProgramsByIdThumbQueryKey = (options: Options<GetApiProgramsByIdThumbData>) => createQueryKey('getApiProgramsByIdThumb', options, false, [
|
|
'Programs'
|
|
]);
|
|
|
|
export const getApiProgramsByIdThumbOptions = (options: Options<GetApiProgramsByIdThumbData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiProgramsByIdThumb({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiProgramsByIdThumbQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getApiProgramsByIdExternalLinkQueryKey = (options: Options<GetApiProgramsByIdExternalLinkData>) => createQueryKey('getApiProgramsByIdExternalLink', options, false, [
|
|
'Programs'
|
|
]);
|
|
|
|
export const getApiProgramsByIdExternalLinkOptions = (options: Options<GetApiProgramsByIdExternalLinkData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiProgramsByIdExternalLink({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiProgramsByIdExternalLinkQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getProgramByExternalIdQueryKey = (options: Options<GetProgramByExternalIdData>) => createQueryKey('getProgramByExternalId', options, false, [
|
|
'Programs'
|
|
]);
|
|
|
|
export const getProgramByExternalIdOptions = (options: Options<GetProgramByExternalIdData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getProgramByExternalId({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getProgramByExternalIdQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const batchGetProgramsByExternalIdsQueryKey = (options: Options<BatchGetProgramsByExternalIdsData>) => createQueryKey('batchGetProgramsByExternalIds', options, false, [
|
|
'Programs'
|
|
]);
|
|
|
|
export const batchGetProgramsByExternalIdsOptions = (options: Options<BatchGetProgramsByExternalIdsData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await batchGetProgramsByExternalIds({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: batchGetProgramsByExternalIdsQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const batchGetProgramsByExternalIdsMutation = (options?: Partial<Options<BatchGetProgramsByExternalIdsData>>): UseMutationOptions<BatchGetProgramsByExternalIdsResponse, AxiosError<DefaultError>, Options<BatchGetProgramsByExternalIdsData>> => {
|
|
const mutationOptions: UseMutationOptions<BatchGetProgramsByExternalIdsResponse, AxiosError<DefaultError>, Options<BatchGetProgramsByExternalIdsData>> = {
|
|
mutationFn: async (localOptions) => {
|
|
const { data } = await batchGetProgramsByExternalIds({
|
|
...options,
|
|
...localOptions,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
}
|
|
};
|
|
return mutationOptions;
|
|
};
|
|
|
|
export const getApiProgrammingShowsByIdQueryKey = (options: Options<GetApiProgrammingShowsByIdData>) => createQueryKey('getApiProgrammingShowsById', options, false, [
|
|
'Programs'
|
|
]);
|
|
|
|
export const getApiProgrammingShowsByIdOptions = (options: Options<GetApiProgrammingShowsByIdData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiProgrammingShowsById({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiProgrammingShowsByIdQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getApiProgrammingSeasonsByIdQueryKey = (options: Options<GetApiProgrammingSeasonsByIdData>) => createQueryKey('getApiProgrammingSeasonsById', options, false, [
|
|
'Programs'
|
|
]);
|
|
|
|
export const getApiProgrammingSeasonsByIdOptions = (options: Options<GetApiProgrammingSeasonsByIdData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiProgrammingSeasonsById({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiProgrammingSeasonsByIdQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getApiProgrammingShowsByIdSeasonsQueryKey = (options: Options<GetApiProgrammingShowsByIdSeasonsData>) => createQueryKey('getApiProgrammingShowsByIdSeasons', options, false, [
|
|
'Programs'
|
|
]);
|
|
|
|
export const getApiProgrammingShowsByIdSeasonsOptions = (options: Options<GetApiProgrammingShowsByIdSeasonsData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiProgrammingShowsByIdSeasons({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiProgrammingShowsByIdSeasonsQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const postApiProgramsByIdScanQueryKey = (options: Options<PostApiProgramsByIdScanData>) => createQueryKey('postApiProgramsByIdScan', options);
|
|
|
|
export const postApiProgramsByIdScanOptions = (options: Options<PostApiProgramsByIdScanData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await postApiProgramsByIdScan({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: postApiProgramsByIdScanQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const postApiProgramsByIdScanMutation = (options?: Partial<Options<PostApiProgramsByIdScanData>>): UseMutationOptions<unknown, AxiosError<PostApiProgramsByIdScanError>, Options<PostApiProgramsByIdScanData>> => {
|
|
const mutationOptions: UseMutationOptions<unknown, AxiosError<PostApiProgramsByIdScanError>, Options<PostApiProgramsByIdScanData>> = {
|
|
mutationFn: async (localOptions) => {
|
|
const { data } = await postApiProgramsByIdScan({
|
|
...options,
|
|
...localOptions,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
}
|
|
};
|
|
return mutationOptions;
|
|
};
|
|
|
|
export const getApiDebugJellyfinLibrariesQueryKey = (options: Options<GetApiDebugJellyfinLibrariesData>) => createQueryKey('getApiDebugJellyfinLibraries', options, false, [
|
|
'Debug'
|
|
]);
|
|
|
|
export const getApiDebugJellyfinLibrariesOptions = (options: Options<GetApiDebugJellyfinLibrariesData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiDebugJellyfinLibraries({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiDebugJellyfinLibrariesQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getApiDebugJellyfinLibraryItemsQueryKey = (options: Options<GetApiDebugJellyfinLibraryItemsData>) => createQueryKey('getApiDebugJellyfinLibraryItems', options, false, [
|
|
'Debug'
|
|
]);
|
|
|
|
export const getApiDebugJellyfinLibraryItemsOptions = (options: Options<GetApiDebugJellyfinLibraryItemsData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiDebugJellyfinLibraryItems({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiDebugJellyfinLibraryItemsQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getApiDebugJellyfinLibraryItemsInfiniteQueryKey = (options: Options<GetApiDebugJellyfinLibraryItemsData>): QueryKey<Options<GetApiDebugJellyfinLibraryItemsData>> => createQueryKey('getApiDebugJellyfinLibraryItems', options, true);
|
|
|
|
export const getApiDebugJellyfinLibraryItemsInfiniteOptions = (options: Options<GetApiDebugJellyfinLibraryItemsData>) => {
|
|
return infiniteQueryOptions<unknown, AxiosError<DefaultError>, InfiniteData<unknown>, QueryKey<Options<GetApiDebugJellyfinLibraryItemsData>>, number | Pick<QueryKey<Options<GetApiDebugJellyfinLibraryItemsData>>[0], 'body' | 'headers' | 'path' | 'query'>>(
|
|
// @ts-ignore
|
|
{
|
|
queryFn: async ({ pageParam, queryKey, signal }) => {
|
|
// @ts-ignore
|
|
const page: Pick<QueryKey<Options<GetApiDebugJellyfinLibraryItemsData>>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : {
|
|
query: {
|
|
offset: pageParam
|
|
}
|
|
};
|
|
const params = createInfiniteParams(queryKey, page);
|
|
const { data } = await getApiDebugJellyfinLibraryItems({
|
|
...options,
|
|
...params,
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiDebugJellyfinLibraryItemsInfiniteQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getApiDebugJellyfinMatchProgramByIdQueryKey = (options: Options<GetApiDebugJellyfinMatchProgramByIdData>) => createQueryKey('getApiDebugJellyfinMatchProgramById', options, false, [
|
|
'Debug'
|
|
]);
|
|
|
|
export const getApiDebugJellyfinMatchProgramByIdOptions = (options: Options<GetApiDebugJellyfinMatchProgramByIdData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiDebugJellyfinMatchProgramById({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiDebugJellyfinMatchProgramByIdQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getApiDebugJellyfinByLibraryIdEnumerateQueryKey = (options: Options<GetApiDebugJellyfinByLibraryIdEnumerateData>) => createQueryKey('getApiDebugJellyfinByLibraryIdEnumerate', options);
|
|
|
|
export const getApiDebugJellyfinByLibraryIdEnumerateOptions = (options: Options<GetApiDebugJellyfinByLibraryIdEnumerateData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiDebugJellyfinByLibraryIdEnumerate({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiDebugJellyfinByLibraryIdEnumerateQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getApiDebugStreamsOfflineQueryKey = (options?: Options<GetApiDebugStreamsOfflineData>) => createQueryKey('getApiDebugStreamsOffline', options, false, [
|
|
'Debug'
|
|
]);
|
|
|
|
export const getApiDebugStreamsOfflineOptions = (options?: Options<GetApiDebugStreamsOfflineData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiDebugStreamsOffline({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiDebugStreamsOfflineQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getApiDebugStreamsErrorQueryKey = (options?: Options<GetApiDebugStreamsErrorData>) => createQueryKey('getApiDebugStreamsError', options, false, [
|
|
'Debug'
|
|
]);
|
|
|
|
export const getApiDebugStreamsErrorOptions = (options?: Options<GetApiDebugStreamsErrorData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiDebugStreamsError({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiDebugStreamsErrorQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getApiDebugStreamsRandomQueryKey = (options?: Options<GetApiDebugStreamsRandomData>) => createQueryKey('getApiDebugStreamsRandom', options);
|
|
|
|
export const getApiDebugStreamsRandomOptions = (options?: Options<GetApiDebugStreamsRandomData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiDebugStreamsRandom({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiDebugStreamsRandomQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getApiDebugStreamsProgramsByIdQueryKey = (options: Options<GetApiDebugStreamsProgramsByIdData>) => createQueryKey('getApiDebugStreamsProgramsById', options, false, [
|
|
'Debug'
|
|
]);
|
|
|
|
export const getApiDebugStreamsProgramsByIdOptions = (options: Options<GetApiDebugStreamsProgramsByIdData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiDebugStreamsProgramsById({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiDebugStreamsProgramsByIdQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getApiDebugStreamsProgramsByIdInfiniteQueryKey = (options: Options<GetApiDebugStreamsProgramsByIdData>): QueryKey<Options<GetApiDebugStreamsProgramsByIdData>> => createQueryKey('getApiDebugStreamsProgramsById', options, true);
|
|
|
|
export const getApiDebugStreamsProgramsByIdInfiniteOptions = (options: Options<GetApiDebugStreamsProgramsByIdData>) => {
|
|
return infiniteQueryOptions<unknown, AxiosError<DefaultError>, InfiniteData<unknown>, QueryKey<Options<GetApiDebugStreamsProgramsByIdData>>, 'random' | number | Pick<QueryKey<Options<GetApiDebugStreamsProgramsByIdData>>[0], 'body' | 'headers' | 'path' | 'query'>>(
|
|
// @ts-ignore
|
|
{
|
|
queryFn: async ({ pageParam, queryKey, signal }) => {
|
|
// @ts-ignore
|
|
const page: Pick<QueryKey<Options<GetApiDebugStreamsProgramsByIdData>>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : {
|
|
query: {
|
|
start: pageParam
|
|
}
|
|
};
|
|
const params = createInfiniteParams(queryKey, page);
|
|
const { data } = await getApiDebugStreamsProgramsById({
|
|
...options,
|
|
...params,
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiDebugStreamsProgramsByIdInfiniteQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getApiDebugFfmpegProbeQueryKey = (options: Options<GetApiDebugFfmpegProbeData>) => createQueryKey('getApiDebugFfmpegProbe', options, false, [
|
|
'Debug'
|
|
]);
|
|
|
|
export const getApiDebugFfmpegProbeOptions = (options: Options<GetApiDebugFfmpegProbeData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiDebugFfmpegProbe({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiDebugFfmpegProbeQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getApiDebugFfmpegCapabilitiesQueryKey = (options?: Options<GetApiDebugFfmpegCapabilitiesData>) => createQueryKey('getApiDebugFfmpegCapabilities', options);
|
|
|
|
export const getApiDebugFfmpegCapabilitiesOptions = (options?: Options<GetApiDebugFfmpegCapabilitiesData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiDebugFfmpegCapabilities({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiDebugFfmpegCapabilitiesQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getApiDebugPlexStreamDetailsQueryKey = (options: Options<GetApiDebugPlexStreamDetailsData>) => createQueryKey('getApiDebugPlexStreamDetails', options, false, [
|
|
'Debug'
|
|
]);
|
|
|
|
export const getApiDebugPlexStreamDetailsOptions = (options: Options<GetApiDebugPlexStreamDetailsData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiDebugPlexStreamDetails({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiDebugPlexStreamDetailsQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getApiDebugHeapQueryKey = (options?: Options<GetApiDebugHeapData>) => createQueryKey('getApiDebugHeap', options);
|
|
|
|
export const getApiDebugHeapOptions = (options?: Options<GetApiDebugHeapData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiDebugHeap({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiDebugHeapQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getApiDebugHelpersPlayingAtQueryKey = (options: Options<GetApiDebugHelpersPlayingAtData>) => createQueryKey('getApiDebugHelpersPlayingAt', options, false, [
|
|
'Debug'
|
|
]);
|
|
|
|
export const getApiDebugHelpersPlayingAtOptions = (options: Options<GetApiDebugHelpersPlayingAtData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiDebugHelpersPlayingAt({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiDebugHelpersPlayingAtQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getApiDebugHelpersCreateGuideQueryKey = (options: Options<GetApiDebugHelpersCreateGuideData>) => createQueryKey('getApiDebugHelpersCreateGuide', options, false, [
|
|
'Debug'
|
|
]);
|
|
|
|
export const getApiDebugHelpersCreateGuideOptions = (options: Options<GetApiDebugHelpersCreateGuideData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiDebugHelpersCreateGuide({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiDebugHelpersCreateGuideQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getApiDebugHelpersChannelsByIdBuildGuideQueryKey = (options: Options<GetApiDebugHelpersChannelsByIdBuildGuideData>) => createQueryKey('getApiDebugHelpersChannelsByIdBuildGuide', options, false, [
|
|
'Debug'
|
|
]);
|
|
|
|
export const getApiDebugHelpersChannelsByIdBuildGuideOptions = (options: Options<GetApiDebugHelpersChannelsByIdBuildGuideData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiDebugHelpersChannelsByIdBuildGuide({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiDebugHelpersChannelsByIdBuildGuideQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getApiDebugHelpersBuildGuideQueryKey = (options?: Options<GetApiDebugHelpersBuildGuideData>) => createQueryKey('getApiDebugHelpersBuildGuide', options, false, [
|
|
'Channels'
|
|
]);
|
|
|
|
export const getApiDebugHelpersBuildGuideOptions = (options?: Options<GetApiDebugHelpersBuildGuideData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiDebugHelpersBuildGuide({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiDebugHelpersBuildGuideQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getApiDebugHelpersRandomFillerQueryKey = (options: Options<GetApiDebugHelpersRandomFillerData>) => createQueryKey('getApiDebugHelpersRandomFiller', options, false, [
|
|
'Debug'
|
|
]);
|
|
|
|
export const getApiDebugHelpersRandomFillerOptions = (options: Options<GetApiDebugHelpersRandomFillerData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiDebugHelpersRandomFiller({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiDebugHelpersRandomFillerQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getApiDebugDbBackupQueryKey = (options?: Options<GetApiDebugDbBackupData>) => createQueryKey('getApiDebugDbBackup', options, false, [
|
|
'Debug'
|
|
]);
|
|
|
|
export const getApiDebugDbBackupOptions = (options?: Options<GetApiDebugDbBackupData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiDebugDbBackup({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiDebugDbBackupQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const postApiDebugPlexByProgramIdUpdateExternalIdsQueryKey = (options: Options<PostApiDebugPlexByProgramIdUpdateExternalIdsData>) => createQueryKey('postApiDebugPlexByProgramIdUpdateExternalIds', options, false, [
|
|
'Debug'
|
|
]);
|
|
|
|
export const postApiDebugPlexByProgramIdUpdateExternalIdsOptions = (options: Options<PostApiDebugPlexByProgramIdUpdateExternalIdsData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await postApiDebugPlexByProgramIdUpdateExternalIds({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: postApiDebugPlexByProgramIdUpdateExternalIdsQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const postApiDebugPlexByProgramIdUpdateExternalIdsMutation = (options?: Partial<Options<PostApiDebugPlexByProgramIdUpdateExternalIdsData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PostApiDebugPlexByProgramIdUpdateExternalIdsData>> => {
|
|
const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PostApiDebugPlexByProgramIdUpdateExternalIdsData>> = {
|
|
mutationFn: async (localOptions) => {
|
|
const { data } = await postApiDebugPlexByProgramIdUpdateExternalIds({
|
|
...options,
|
|
...localOptions,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
}
|
|
};
|
|
return mutationOptions;
|
|
};
|
|
|
|
export const getApiDebugChannelsReloadAllLineupsQueryKey = (options?: Options<GetApiDebugChannelsReloadAllLineupsData>) => createQueryKey('getApiDebugChannelsReloadAllLineups', options, false, [
|
|
'Debug'
|
|
]);
|
|
|
|
export const getApiDebugChannelsReloadAllLineupsOptions = (options?: Options<GetApiDebugChannelsReloadAllLineupsData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiDebugChannelsReloadAllLineups({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiDebugChannelsReloadAllLineupsQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getApiDebugSubprocessStatusQueryKey = (options?: Options<GetApiDebugSubprocessStatusData>) => createQueryKey('getApiDebugSubprocessStatus', options);
|
|
|
|
export const getApiDebugSubprocessStatusOptions = (options?: Options<GetApiDebugSubprocessStatusData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiDebugSubprocessStatus({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiDebugSubprocessStatusQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getApiDebugSubprocessRestartQueryKey = (options?: Options<GetApiDebugSubprocessRestartData>) => createQueryKey('getApiDebugSubprocessRestart', options);
|
|
|
|
export const getApiDebugSubprocessRestartOptions = (options?: Options<GetApiDebugSubprocessRestartData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiDebugSubprocessRestart({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiDebugSubprocessRestartQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getApiDebugMediaSourcesByMediaSourceIdScanQueryKey = (options: Options<GetApiDebugMediaSourcesByMediaSourceIdScanData>) => createQueryKey('getApiDebugMediaSourcesByMediaSourceIdScan', options);
|
|
|
|
export const getApiDebugMediaSourcesByMediaSourceIdScanOptions = (options: Options<GetApiDebugMediaSourcesByMediaSourceIdScanData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiDebugMediaSourcesByMediaSourceIdScan({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiDebugMediaSourcesByMediaSourceIdScanQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getApiDebugMediaSourcesByMediaSourceIdLibrariesByLibraryIdScanQueryKey = (options: Options<GetApiDebugMediaSourcesByMediaSourceIdLibrariesByLibraryIdScanData>) => createQueryKey('getApiDebugMediaSourcesByMediaSourceIdLibrariesByLibraryIdScan', options);
|
|
|
|
export const getApiDebugMediaSourcesByMediaSourceIdLibrariesByLibraryIdScanOptions = (options: Options<GetApiDebugMediaSourcesByMediaSourceIdLibrariesByLibraryIdScanData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiDebugMediaSourcesByMediaSourceIdLibrariesByLibraryIdScan({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiDebugMediaSourcesByMediaSourceIdLibrariesByLibraryIdScanQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getApiDebugMediaSourcesByMediaSourceIdScanCollectionsQueryKey = (options: Options<GetApiDebugMediaSourcesByMediaSourceIdScanCollectionsData>) => createQueryKey('getApiDebugMediaSourcesByMediaSourceIdScanCollections', options);
|
|
|
|
export const getApiDebugMediaSourcesByMediaSourceIdScanCollectionsOptions = (options: Options<GetApiDebugMediaSourcesByMediaSourceIdScanCollectionsData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiDebugMediaSourcesByMediaSourceIdScanCollections({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiDebugMediaSourcesByMediaSourceIdScanCollectionsQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getApiMediaSourcesQueryKey = (options?: Options<GetApiMediaSourcesData>) => createQueryKey('getApiMediaSources', options, false, [
|
|
'Media Source'
|
|
]);
|
|
|
|
export const getApiMediaSourcesOptions = (options?: Options<GetApiMediaSourcesData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiMediaSources({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiMediaSourcesQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const postApiMediaSourcesQueryKey = (options?: Options<PostApiMediaSourcesData>) => createQueryKey('postApiMediaSources', options, false, [
|
|
'Media Source'
|
|
]);
|
|
|
|
export const postApiMediaSourcesOptions = (options?: Options<PostApiMediaSourcesData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await postApiMediaSources({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: postApiMediaSourcesQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const postApiMediaSourcesMutation = (options?: Partial<Options<PostApiMediaSourcesData>>): UseMutationOptions<PostApiMediaSourcesResponse, AxiosError<PostApiMediaSourcesError>, Options<PostApiMediaSourcesData>> => {
|
|
const mutationOptions: UseMutationOptions<PostApiMediaSourcesResponse, AxiosError<PostApiMediaSourcesError>, Options<PostApiMediaSourcesData>> = {
|
|
mutationFn: async (localOptions) => {
|
|
const { data } = await postApiMediaSources({
|
|
...options,
|
|
...localOptions,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
}
|
|
};
|
|
return mutationOptions;
|
|
};
|
|
|
|
export const getApiMediaSourcesByMediaSourceIdQueryKey = (options: Options<GetApiMediaSourcesByMediaSourceIdData>) => createQueryKey('getApiMediaSourcesByMediaSourceId', options, false, [
|
|
'Media Source'
|
|
]);
|
|
|
|
export const getApiMediaSourcesByMediaSourceIdOptions = (options: Options<GetApiMediaSourcesByMediaSourceIdData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiMediaSourcesByMediaSourceId({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiMediaSourcesByMediaSourceIdQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getApiMediaSourcesByIdLibrariesQueryKey = (options: Options<GetApiMediaSourcesByIdLibrariesData>) => createQueryKey('getApiMediaSourcesByIdLibraries', options, false, [
|
|
'Media Source'
|
|
]);
|
|
|
|
export const getApiMediaSourcesByIdLibrariesOptions = (options: Options<GetApiMediaSourcesByIdLibrariesData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiMediaSourcesByIdLibraries({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiMediaSourcesByIdLibrariesQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const putApiMediaSourcesByIdLibrariesByLibraryIdMutation = (options?: Partial<Options<PutApiMediaSourcesByIdLibrariesByLibraryIdData>>): UseMutationOptions<PutApiMediaSourcesByIdLibrariesByLibraryIdResponse, AxiosError<PutApiMediaSourcesByIdLibrariesByLibraryIdError>, Options<PutApiMediaSourcesByIdLibrariesByLibraryIdData>> => {
|
|
const mutationOptions: UseMutationOptions<PutApiMediaSourcesByIdLibrariesByLibraryIdResponse, AxiosError<PutApiMediaSourcesByIdLibrariesByLibraryIdError>, Options<PutApiMediaSourcesByIdLibrariesByLibraryIdData>> = {
|
|
mutationFn: async (localOptions) => {
|
|
const { data } = await putApiMediaSourcesByIdLibrariesByLibraryId({
|
|
...options,
|
|
...localOptions,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
}
|
|
};
|
|
return mutationOptions;
|
|
};
|
|
|
|
export const getApiMediaLibrariesByLibraryIdQueryKey = (options: Options<GetApiMediaLibrariesByLibraryIdData>) => createQueryKey('getApiMediaLibrariesByLibraryId', options, false, [
|
|
'Media Library'
|
|
]);
|
|
|
|
export const getApiMediaLibrariesByLibraryIdOptions = (options: Options<GetApiMediaLibrariesByLibraryIdData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiMediaLibrariesByLibraryId({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiMediaLibrariesByLibraryIdQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getApiMediaLibrariesByLibraryIdProgramsQueryKey = (options: Options<GetApiMediaLibrariesByLibraryIdProgramsData>) => createQueryKey('getApiMediaLibrariesByLibraryIdPrograms', options, false, [
|
|
'Media Library'
|
|
]);
|
|
|
|
export const getApiMediaLibrariesByLibraryIdProgramsOptions = (options: Options<GetApiMediaLibrariesByLibraryIdProgramsData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiMediaLibrariesByLibraryIdPrograms({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiMediaLibrariesByLibraryIdProgramsQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getApiMediaSourcesByMediaSourceIdByLibraryIdStatusQueryKey = (options: Options<GetApiMediaSourcesByMediaSourceIdByLibraryIdStatusData>) => createQueryKey('getApiMediaSourcesByMediaSourceIdByLibraryIdStatus', options);
|
|
|
|
export const getApiMediaSourcesByMediaSourceIdByLibraryIdStatusOptions = (options: Options<GetApiMediaSourcesByMediaSourceIdByLibraryIdStatusData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiMediaSourcesByMediaSourceIdByLibraryIdStatus({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiMediaSourcesByMediaSourceIdByLibraryIdStatusQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const postApiMediaSourcesByIdLibrariesRefreshQueryKey = (options: Options<PostApiMediaSourcesByIdLibrariesRefreshData>) => createQueryKey('postApiMediaSourcesByIdLibrariesRefresh', options, false, [
|
|
'Media Source'
|
|
]);
|
|
|
|
export const postApiMediaSourcesByIdLibrariesRefreshOptions = (options: Options<PostApiMediaSourcesByIdLibrariesRefreshData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await postApiMediaSourcesByIdLibrariesRefresh({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: postApiMediaSourcesByIdLibrariesRefreshQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const postApiMediaSourcesByIdLibrariesRefreshMutation = (options?: Partial<Options<PostApiMediaSourcesByIdLibrariesRefreshData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PostApiMediaSourcesByIdLibrariesRefreshData>> => {
|
|
const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PostApiMediaSourcesByIdLibrariesRefreshData>> = {
|
|
mutationFn: async (localOptions) => {
|
|
const { data } = await postApiMediaSourcesByIdLibrariesRefresh({
|
|
...options,
|
|
...localOptions,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
}
|
|
};
|
|
return mutationOptions;
|
|
};
|
|
|
|
export const postApiMediaSourcesByIdScanQueryKey = (options: Options<PostApiMediaSourcesByIdScanData>) => createQueryKey('postApiMediaSourcesByIdScan', options, false, [
|
|
'Media Source'
|
|
]);
|
|
|
|
export const postApiMediaSourcesByIdScanOptions = (options: Options<PostApiMediaSourcesByIdScanData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await postApiMediaSourcesByIdScan({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: postApiMediaSourcesByIdScanQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const postApiMediaSourcesByIdScanMutation = (options?: Partial<Options<PostApiMediaSourcesByIdScanData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PostApiMediaSourcesByIdScanData>> => {
|
|
const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PostApiMediaSourcesByIdScanData>> = {
|
|
mutationFn: async (localOptions) => {
|
|
const { data } = await postApiMediaSourcesByIdScan({
|
|
...options,
|
|
...localOptions,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
}
|
|
};
|
|
return mutationOptions;
|
|
};
|
|
|
|
export const postApiMediaSourcesByIdLibrariesByLibraryIdScanQueryKey = (options: Options<PostApiMediaSourcesByIdLibrariesByLibraryIdScanData>) => createQueryKey('postApiMediaSourcesByIdLibrariesByLibraryIdScan', options, false, [
|
|
'Media Source'
|
|
]);
|
|
|
|
export const postApiMediaSourcesByIdLibrariesByLibraryIdScanOptions = (options: Options<PostApiMediaSourcesByIdLibrariesByLibraryIdScanData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await postApiMediaSourcesByIdLibrariesByLibraryIdScan({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: postApiMediaSourcesByIdLibrariesByLibraryIdScanQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const postApiMediaSourcesByIdLibrariesByLibraryIdScanMutation = (options?: Partial<Options<PostApiMediaSourcesByIdLibrariesByLibraryIdScanData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PostApiMediaSourcesByIdLibrariesByLibraryIdScanData>> => {
|
|
const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PostApiMediaSourcesByIdLibrariesByLibraryIdScanData>> = {
|
|
mutationFn: async (localOptions) => {
|
|
const { data } = await postApiMediaSourcesByIdLibrariesByLibraryIdScan({
|
|
...options,
|
|
...localOptions,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
}
|
|
};
|
|
return mutationOptions;
|
|
};
|
|
|
|
export const getApiMediaSourcesByIdStatusQueryKey = (options: Options<GetApiMediaSourcesByIdStatusData>) => createQueryKey('getApiMediaSourcesByIdStatus', options, false, [
|
|
'Media Source'
|
|
]);
|
|
|
|
export const getApiMediaSourcesByIdStatusOptions = (options: Options<GetApiMediaSourcesByIdStatusData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiMediaSourcesByIdStatus({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiMediaSourcesByIdStatusQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const postApiMediaSourcesForeignstatusQueryKey = (options: Options<PostApiMediaSourcesForeignstatusData>) => createQueryKey('postApiMediaSourcesForeignstatus', options, false, [
|
|
'Media Source'
|
|
]);
|
|
|
|
export const postApiMediaSourcesForeignstatusOptions = (options: Options<PostApiMediaSourcesForeignstatusData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await postApiMediaSourcesForeignstatus({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: postApiMediaSourcesForeignstatusQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const postApiMediaSourcesForeignstatusMutation = (options?: Partial<Options<PostApiMediaSourcesForeignstatusData>>): UseMutationOptions<PostApiMediaSourcesForeignstatusResponse, AxiosError<DefaultError>, Options<PostApiMediaSourcesForeignstatusData>> => {
|
|
const mutationOptions: UseMutationOptions<PostApiMediaSourcesForeignstatusResponse, AxiosError<DefaultError>, Options<PostApiMediaSourcesForeignstatusData>> = {
|
|
mutationFn: async (localOptions) => {
|
|
const { data } = await postApiMediaSourcesForeignstatus({
|
|
...options,
|
|
...localOptions,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
}
|
|
};
|
|
return mutationOptions;
|
|
};
|
|
|
|
export const deleteApiMediaSourcesByIdMutation = (options?: Partial<Options<DeleteApiMediaSourcesByIdData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DeleteApiMediaSourcesByIdData>> => {
|
|
const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DeleteApiMediaSourcesByIdData>> = {
|
|
mutationFn: async (localOptions) => {
|
|
const { data } = await deleteApiMediaSourcesById({
|
|
...options,
|
|
...localOptions,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
}
|
|
};
|
|
return mutationOptions;
|
|
};
|
|
|
|
export const putApiMediaSourcesByIdMutation = (options?: Partial<Options<PutApiMediaSourcesByIdData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PutApiMediaSourcesByIdData>> => {
|
|
const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PutApiMediaSourcesByIdData>> = {
|
|
mutationFn: async (localOptions) => {
|
|
const { data } = await putApiMediaSourcesById({
|
|
...options,
|
|
...localOptions,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
}
|
|
};
|
|
return mutationOptions;
|
|
};
|
|
|
|
export const getApiFfmpegSettingsQueryKey = (options?: Options<GetApiFfmpegSettingsData>) => createQueryKey('getApiFfmpegSettings', options, false, [
|
|
'Settings'
|
|
]);
|
|
|
|
export const getApiFfmpegSettingsOptions = (options?: Options<GetApiFfmpegSettingsData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiFfmpegSettings({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiFfmpegSettingsQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const postApiFfmpegSettingsQueryKey = (options: Options<PostApiFfmpegSettingsData>) => createQueryKey('postApiFfmpegSettings', options, false, [
|
|
'Settings'
|
|
]);
|
|
|
|
export const postApiFfmpegSettingsOptions = (options: Options<PostApiFfmpegSettingsData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await postApiFfmpegSettings({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: postApiFfmpegSettingsQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const postApiFfmpegSettingsMutation = (options?: Partial<Options<PostApiFfmpegSettingsData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PostApiFfmpegSettingsData>> => {
|
|
const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PostApiFfmpegSettingsData>> = {
|
|
mutationFn: async (localOptions) => {
|
|
const { data } = await postApiFfmpegSettings({
|
|
...options,
|
|
...localOptions,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
}
|
|
};
|
|
return mutationOptions;
|
|
};
|
|
|
|
export const putApiFfmpegSettingsMutation = (options?: Partial<Options<PutApiFfmpegSettingsData>>): UseMutationOptions<PutApiFfmpegSettingsResponse, AxiosError<PutApiFfmpegSettingsError>, Options<PutApiFfmpegSettingsData>> => {
|
|
const mutationOptions: UseMutationOptions<PutApiFfmpegSettingsResponse, AxiosError<PutApiFfmpegSettingsError>, Options<PutApiFfmpegSettingsData>> = {
|
|
mutationFn: async (localOptions) => {
|
|
const { data } = await putApiFfmpegSettings({
|
|
...options,
|
|
...localOptions,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
}
|
|
};
|
|
return mutationOptions;
|
|
};
|
|
|
|
export const getApiTranscodeConfigsQueryKey = (options?: Options<GetApiTranscodeConfigsData>) => createQueryKey('getApiTranscodeConfigs', options, false, [
|
|
'Settings',
|
|
'Transcode Configs'
|
|
]);
|
|
|
|
export const getApiTranscodeConfigsOptions = (options?: Options<GetApiTranscodeConfigsData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiTranscodeConfigs({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiTranscodeConfigsQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const postApiTranscodeConfigsQueryKey = (options: Options<PostApiTranscodeConfigsData>) => createQueryKey('postApiTranscodeConfigs', options, false, [
|
|
'Settings',
|
|
'Transcode Configs'
|
|
]);
|
|
|
|
export const postApiTranscodeConfigsOptions = (options: Options<PostApiTranscodeConfigsData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await postApiTranscodeConfigs({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: postApiTranscodeConfigsQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const postApiTranscodeConfigsMutation = (options?: Partial<Options<PostApiTranscodeConfigsData>>): UseMutationOptions<PostApiTranscodeConfigsResponse, AxiosError<DefaultError>, Options<PostApiTranscodeConfigsData>> => {
|
|
const mutationOptions: UseMutationOptions<PostApiTranscodeConfigsResponse, AxiosError<DefaultError>, Options<PostApiTranscodeConfigsData>> = {
|
|
mutationFn: async (localOptions) => {
|
|
const { data } = await postApiTranscodeConfigs({
|
|
...options,
|
|
...localOptions,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
}
|
|
};
|
|
return mutationOptions;
|
|
};
|
|
|
|
export const deleteApiTranscodeConfigsByIdMutation = (options?: Partial<Options<DeleteApiTranscodeConfigsByIdData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DeleteApiTranscodeConfigsByIdData>> => {
|
|
const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DeleteApiTranscodeConfigsByIdData>> = {
|
|
mutationFn: async (localOptions) => {
|
|
const { data } = await deleteApiTranscodeConfigsById({
|
|
...options,
|
|
...localOptions,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
}
|
|
};
|
|
return mutationOptions;
|
|
};
|
|
|
|
export const getApiTranscodeConfigsByIdQueryKey = (options: Options<GetApiTranscodeConfigsByIdData>) => createQueryKey('getApiTranscodeConfigsById', options, false, [
|
|
'Settings',
|
|
'Transcode Configs'
|
|
]);
|
|
|
|
export const getApiTranscodeConfigsByIdOptions = (options: Options<GetApiTranscodeConfigsByIdData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiTranscodeConfigsById({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiTranscodeConfigsByIdQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const putApiTranscodeConfigsByIdMutation = (options?: Partial<Options<PutApiTranscodeConfigsByIdData>>): UseMutationOptions<PutApiTranscodeConfigsByIdResponse, AxiosError<DefaultError>, Options<PutApiTranscodeConfigsByIdData>> => {
|
|
const mutationOptions: UseMutationOptions<PutApiTranscodeConfigsByIdResponse, AxiosError<DefaultError>, Options<PutApiTranscodeConfigsByIdData>> = {
|
|
mutationFn: async (localOptions) => {
|
|
const { data } = await putApiTranscodeConfigsById({
|
|
...options,
|
|
...localOptions,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
}
|
|
};
|
|
return mutationOptions;
|
|
};
|
|
|
|
export const postApiTranscodeConfigsByIdCopyQueryKey = (options: Options<PostApiTranscodeConfigsByIdCopyData>) => createQueryKey('postApiTranscodeConfigsByIdCopy', options, false, [
|
|
'Settings',
|
|
'Transcode Configs'
|
|
]);
|
|
|
|
export const postApiTranscodeConfigsByIdCopyOptions = (options: Options<PostApiTranscodeConfigsByIdCopyData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await postApiTranscodeConfigsByIdCopy({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: postApiTranscodeConfigsByIdCopyQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const postApiTranscodeConfigsByIdCopyMutation = (options?: Partial<Options<PostApiTranscodeConfigsByIdCopyData>>): UseMutationOptions<PostApiTranscodeConfigsByIdCopyResponse, AxiosError<DefaultError>, Options<PostApiTranscodeConfigsByIdCopyData>> => {
|
|
const mutationOptions: UseMutationOptions<PostApiTranscodeConfigsByIdCopyResponse, AxiosError<DefaultError>, Options<PostApiTranscodeConfigsByIdCopyData>> = {
|
|
mutationFn: async (localOptions) => {
|
|
const { data } = await postApiTranscodeConfigsByIdCopy({
|
|
...options,
|
|
...localOptions,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
}
|
|
};
|
|
return mutationOptions;
|
|
};
|
|
|
|
export const getApiPlexSettingsQueryKey = (options?: Options<GetApiPlexSettingsData>) => createQueryKey('getApiPlexSettings', options, false, [
|
|
'Settings'
|
|
]);
|
|
|
|
export const getApiPlexSettingsOptions = (options?: Options<GetApiPlexSettingsData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiPlexSettings({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiPlexSettingsQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const postApiPlexSettingsQueryKey = (options?: Options<PostApiPlexSettingsData>) => createQueryKey('postApiPlexSettings', options, false, [
|
|
'Settings'
|
|
]);
|
|
|
|
export const postApiPlexSettingsOptions = (options?: Options<PostApiPlexSettingsData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await postApiPlexSettings({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: postApiPlexSettingsQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const postApiPlexSettingsMutation = (options?: Partial<Options<PostApiPlexSettingsData>>): UseMutationOptions<PostApiPlexSettingsResponse, AxiosError<PostApiPlexSettingsError>, Options<PostApiPlexSettingsData>> => {
|
|
const mutationOptions: UseMutationOptions<PostApiPlexSettingsResponse, AxiosError<PostApiPlexSettingsError>, Options<PostApiPlexSettingsData>> = {
|
|
mutationFn: async (localOptions) => {
|
|
const { data } = await postApiPlexSettings({
|
|
...options,
|
|
...localOptions,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
}
|
|
};
|
|
return mutationOptions;
|
|
};
|
|
|
|
export const putApiPlexSettingsMutation = (options?: Partial<Options<PutApiPlexSettingsData>>): UseMutationOptions<PutApiPlexSettingsResponse, AxiosError<PutApiPlexSettingsError>, Options<PutApiPlexSettingsData>> => {
|
|
const mutationOptions: UseMutationOptions<PutApiPlexSettingsResponse, AxiosError<PutApiPlexSettingsError>, Options<PutApiPlexSettingsData>> = {
|
|
mutationFn: async (localOptions) => {
|
|
const { data } = await putApiPlexSettings({
|
|
...options,
|
|
...localOptions,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
}
|
|
};
|
|
return mutationOptions;
|
|
};
|
|
|
|
export const getApiXmltvSettingsQueryKey = (options?: Options<GetApiXmltvSettingsData>) => createQueryKey('getApiXmltvSettings', options, false, [
|
|
'Settings'
|
|
]);
|
|
|
|
export const getApiXmltvSettingsOptions = (options?: Options<GetApiXmltvSettingsData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiXmltvSettings({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiXmltvSettingsQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const postApiXmltvSettingsQueryKey = (options?: Options<PostApiXmltvSettingsData>) => createQueryKey('postApiXmltvSettings', options, false, [
|
|
'Settings'
|
|
]);
|
|
|
|
export const postApiXmltvSettingsOptions = (options?: Options<PostApiXmltvSettingsData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await postApiXmltvSettings({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: postApiXmltvSettingsQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const postApiXmltvSettingsMutation = (options?: Partial<Options<PostApiXmltvSettingsData>>): UseMutationOptions<PostApiXmltvSettingsResponse, AxiosError<PostApiXmltvSettingsError>, Options<PostApiXmltvSettingsData>> => {
|
|
const mutationOptions: UseMutationOptions<PostApiXmltvSettingsResponse, AxiosError<PostApiXmltvSettingsError>, Options<PostApiXmltvSettingsData>> = {
|
|
mutationFn: async (localOptions) => {
|
|
const { data } = await postApiXmltvSettings({
|
|
...options,
|
|
...localOptions,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
}
|
|
};
|
|
return mutationOptions;
|
|
};
|
|
|
|
export const putApiXmltvSettingsMutation = (options?: Partial<Options<PutApiXmltvSettingsData>>): UseMutationOptions<PutApiXmltvSettingsResponse, AxiosError<PutApiXmltvSettingsError>, Options<PutApiXmltvSettingsData>> => {
|
|
const mutationOptions: UseMutationOptions<PutApiXmltvSettingsResponse, AxiosError<PutApiXmltvSettingsError>, Options<PutApiXmltvSettingsData>> = {
|
|
mutationFn: async (localOptions) => {
|
|
const { data } = await putApiXmltvSettings({
|
|
...options,
|
|
...localOptions,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
}
|
|
};
|
|
return mutationOptions;
|
|
};
|
|
|
|
export const getApiHdhrSettingsQueryKey = (options?: Options<GetApiHdhrSettingsData>) => createQueryKey('getApiHdhrSettings', options, false, [
|
|
'Settings'
|
|
]);
|
|
|
|
export const getApiHdhrSettingsOptions = (options?: Options<GetApiHdhrSettingsData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiHdhrSettings({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiHdhrSettingsQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const postApiHdhrSettingsQueryKey = (options?: Options<PostApiHdhrSettingsData>) => createQueryKey('postApiHdhrSettings', options, false, [
|
|
'Settings'
|
|
]);
|
|
|
|
export const postApiHdhrSettingsOptions = (options?: Options<PostApiHdhrSettingsData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await postApiHdhrSettings({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: postApiHdhrSettingsQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const postApiHdhrSettingsMutation = (options?: Partial<Options<PostApiHdhrSettingsData>>): UseMutationOptions<PostApiHdhrSettingsResponse, AxiosError<PostApiHdhrSettingsError>, Options<PostApiHdhrSettingsData>> => {
|
|
const mutationOptions: UseMutationOptions<PostApiHdhrSettingsResponse, AxiosError<PostApiHdhrSettingsError>, Options<PostApiHdhrSettingsData>> = {
|
|
mutationFn: async (localOptions) => {
|
|
const { data } = await postApiHdhrSettings({
|
|
...options,
|
|
...localOptions,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
}
|
|
};
|
|
return mutationOptions;
|
|
};
|
|
|
|
export const putApiHdhrSettingsMutation = (options?: Partial<Options<PutApiHdhrSettingsData>>): UseMutationOptions<PutApiHdhrSettingsResponse, AxiosError<PutApiHdhrSettingsError>, Options<PutApiHdhrSettingsData>> => {
|
|
const mutationOptions: UseMutationOptions<PutApiHdhrSettingsResponse, AxiosError<PutApiHdhrSettingsError>, Options<PutApiHdhrSettingsData>> = {
|
|
mutationFn: async (localOptions) => {
|
|
const { data } = await putApiHdhrSettings({
|
|
...options,
|
|
...localOptions,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
}
|
|
};
|
|
return mutationOptions;
|
|
};
|
|
|
|
export const getApiSystemHealthQueryKey = (options?: Options<GetApiSystemHealthData>) => createQueryKey('getApiSystemHealth', options, false, [
|
|
'System'
|
|
]);
|
|
|
|
export const getApiSystemHealthOptions = (options?: Options<GetApiSystemHealthData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiSystemHealth({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiSystemHealthQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getApiSystemSettingsQueryKey = (options?: Options<GetApiSystemSettingsData>) => createQueryKey('getApiSystemSettings', options, false, [
|
|
'System',
|
|
'Settings'
|
|
]);
|
|
|
|
export const getApiSystemSettingsOptions = (options?: Options<GetApiSystemSettingsData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiSystemSettings({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiSystemSettingsQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const putApiSystemSettingsMutation = (options?: Partial<Options<PutApiSystemSettingsData>>): UseMutationOptions<PutApiSystemSettingsResponse, AxiosError<DefaultError>, Options<PutApiSystemSettingsData>> => {
|
|
const mutationOptions: UseMutationOptions<PutApiSystemSettingsResponse, AxiosError<DefaultError>, Options<PutApiSystemSettingsData>> = {
|
|
mutationFn: async (localOptions) => {
|
|
const { data } = await putApiSystemSettings({
|
|
...options,
|
|
...localOptions,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
}
|
|
};
|
|
return mutationOptions;
|
|
};
|
|
|
|
export const getApiSystemStateQueryKey = (options?: Options<GetApiSystemStateData>) => createQueryKey('getApiSystemState', options, false, [
|
|
'System'
|
|
]);
|
|
|
|
export const getApiSystemStateOptions = (options?: Options<GetApiSystemStateData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiSystemState({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiSystemStateQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getApiSystemMigrationStateQueryKey = (options?: Options<GetApiSystemMigrationStateData>) => createQueryKey('getApiSystemMigrationState', options, false, [
|
|
'System'
|
|
]);
|
|
|
|
export const getApiSystemMigrationStateOptions = (options?: Options<GetApiSystemMigrationStateData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiSystemMigrationState({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiSystemMigrationStateQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const postApiSystemFixersByFixerIdRunQueryKey = (options: Options<PostApiSystemFixersByFixerIdRunData>) => createQueryKey('postApiSystemFixersByFixerIdRun', options, false, [
|
|
'System'
|
|
]);
|
|
|
|
export const postApiSystemFixersByFixerIdRunOptions = (options: Options<PostApiSystemFixersByFixerIdRunData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await postApiSystemFixersByFixerIdRun({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: postApiSystemFixersByFixerIdRunQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const postApiSystemFixersByFixerIdRunMutation = (options?: Partial<Options<PostApiSystemFixersByFixerIdRunData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PostApiSystemFixersByFixerIdRunData>> => {
|
|
const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PostApiSystemFixersByFixerIdRunData>> = {
|
|
mutationFn: async (localOptions) => {
|
|
const { data } = await postApiSystemFixersByFixerIdRun({
|
|
...options,
|
|
...localOptions,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
}
|
|
};
|
|
return mutationOptions;
|
|
};
|
|
|
|
export const putApiSystemSettingsBackupMutation = (options?: Partial<Options<PutApiSystemSettingsBackupData>>): UseMutationOptions<PutApiSystemSettingsBackupResponse, AxiosError<DefaultError>, Options<PutApiSystemSettingsBackupData>> => {
|
|
const mutationOptions: UseMutationOptions<PutApiSystemSettingsBackupResponse, AxiosError<DefaultError>, Options<PutApiSystemSettingsBackupData>> = {
|
|
mutationFn: async (localOptions) => {
|
|
const { data } = await putApiSystemSettingsBackup({
|
|
...options,
|
|
...localOptions,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
}
|
|
};
|
|
return mutationOptions;
|
|
};
|
|
|
|
export const getApiSystemDebugNvidiaQueryKey = (options?: Options<GetApiSystemDebugNvidiaData>) => createQueryKey('getApiSystemDebugNvidia', options, false, [
|
|
'System'
|
|
]);
|
|
|
|
export const getApiSystemDebugNvidiaOptions = (options?: Options<GetApiSystemDebugNvidiaData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiSystemDebugNvidia({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiSystemDebugNvidiaQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getApiSystemDebugVaapiQueryKey = (options?: Options<GetApiSystemDebugVaapiData>) => createQueryKey('getApiSystemDebugVaapi', options, false, [
|
|
'System'
|
|
]);
|
|
|
|
export const getApiSystemDebugVaapiOptions = (options?: Options<GetApiSystemDebugVaapiData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiSystemDebugVaapi({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiSystemDebugVaapiQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getApiSystemDebugLogsStreamQueryKey = (options?: Options<GetApiSystemDebugLogsStreamData>) => createQueryKey('getApiSystemDebugLogsStream', options);
|
|
|
|
export const getApiSystemDebugLogsStreamOptions = (options?: Options<GetApiSystemDebugLogsStreamData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiSystemDebugLogsStream({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiSystemDebugLogsStreamQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getApiSystemDebugLogsQueryKey = (options?: Options<GetApiSystemDebugLogsData>) => createQueryKey('getApiSystemDebugLogs', options, false, [
|
|
'System',
|
|
'Logs'
|
|
]);
|
|
|
|
export const getApiSystemDebugLogsOptions = (options?: Options<GetApiSystemDebugLogsData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiSystemDebugLogs({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiSystemDebugLogsQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getApiSystemDebugEnvQueryKey = (options?: Options<GetApiSystemDebugEnvData>) => createQueryKey('getApiSystemDebugEnv', options, false, [
|
|
'System'
|
|
]);
|
|
|
|
export const getApiSystemDebugEnvOptions = (options?: Options<GetApiSystemDebugEnvData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiSystemDebugEnv({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiSystemDebugEnvQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getApiSystemDebugLoggersQueryKey = (options?: Options<GetApiSystemDebugLoggersData>) => createQueryKey('getApiSystemDebugLoggers', options);
|
|
|
|
export const getApiSystemDebugLoggersOptions = (options?: Options<GetApiSystemDebugLoggersData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiSystemDebugLoggers({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiSystemDebugLoggersQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getApiGuideStatusQueryKey = (options?: Options<GetApiGuideStatusData>) => createQueryKey('getApiGuideStatus', options, false, [
|
|
'Guide'
|
|
]);
|
|
|
|
export const getApiGuideStatusOptions = (options?: Options<GetApiGuideStatusData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiGuideStatus({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiGuideStatusQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getApiGuideDebugQueryKey = (options?: Options<GetApiGuideDebugData>) => createQueryKey('getApiGuideDebug', options, false, [
|
|
'Debug'
|
|
]);
|
|
|
|
export const getApiGuideDebugOptions = (options?: Options<GetApiGuideDebugData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiGuideDebug({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiGuideDebugQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getApiGuideChannelsQueryKey = (options: Options<GetApiGuideChannelsData>) => createQueryKey('getApiGuideChannels', options, false, [
|
|
'Guide'
|
|
]);
|
|
|
|
export const getApiGuideChannelsOptions = (options: Options<GetApiGuideChannelsData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiGuideChannels({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiGuideChannelsQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getApiGuideChannelsByIdQueryKey = (options: Options<GetApiGuideChannelsByIdData>) => createQueryKey('getApiGuideChannelsById', options, false, [
|
|
'Guide'
|
|
]);
|
|
|
|
export const getApiGuideChannelsByIdOptions = (options: Options<GetApiGuideChannelsByIdData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiGuideChannelsById({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiGuideChannelsByIdQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getApiPlexByMediaSourceIdSearchQueryKey = (options: Options<GetApiPlexByMediaSourceIdSearchData>) => createQueryKey('getApiPlexByMediaSourceIdSearch', options);
|
|
|
|
export const getApiPlexByMediaSourceIdSearchOptions = (options: Options<GetApiPlexByMediaSourceIdSearchData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiPlexByMediaSourceIdSearch({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiPlexByMediaSourceIdSearchQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getApiPlexByMediaSourceIdSearchInfiniteQueryKey = (options: Options<GetApiPlexByMediaSourceIdSearchData>): QueryKey<Options<GetApiPlexByMediaSourceIdSearchData>> => createQueryKey('getApiPlexByMediaSourceIdSearch', options, true);
|
|
|
|
export const getApiPlexByMediaSourceIdSearchInfiniteOptions = (options: Options<GetApiPlexByMediaSourceIdSearchData>) => {
|
|
return infiniteQueryOptions<GetApiPlexByMediaSourceIdSearchResponse, AxiosError<GetApiPlexByMediaSourceIdSearchError>, InfiniteData<GetApiPlexByMediaSourceIdSearchResponse>, QueryKey<Options<GetApiPlexByMediaSourceIdSearchData>>, number | Pick<QueryKey<Options<GetApiPlexByMediaSourceIdSearchData>>[0], 'body' | 'headers' | 'path' | 'query'>>(
|
|
// @ts-ignore
|
|
{
|
|
queryFn: async ({ pageParam, queryKey, signal }) => {
|
|
// @ts-ignore
|
|
const page: Pick<QueryKey<Options<GetApiPlexByMediaSourceIdSearchData>>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : {
|
|
query: {
|
|
offset: pageParam
|
|
}
|
|
};
|
|
const params = createInfiniteParams(queryKey, page);
|
|
const { data } = await getApiPlexByMediaSourceIdSearch({
|
|
...options,
|
|
...params,
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiPlexByMediaSourceIdSearchInfiniteQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getApiPlexByMediaSourceIdLibrariesQueryKey = (options: Options<GetApiPlexByMediaSourceIdLibrariesData>) => createQueryKey('getApiPlexByMediaSourceIdLibraries', options);
|
|
|
|
export const getApiPlexByMediaSourceIdLibrariesOptions = (options: Options<GetApiPlexByMediaSourceIdLibrariesData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiPlexByMediaSourceIdLibraries({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiPlexByMediaSourceIdLibrariesQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getApiPlexByMediaSourceIdLibrariesByLibraryIdCollectionsQueryKey = (options: Options<GetApiPlexByMediaSourceIdLibrariesByLibraryIdCollectionsData>) => createQueryKey('getApiPlexByMediaSourceIdLibrariesByLibraryIdCollections', options);
|
|
|
|
export const getApiPlexByMediaSourceIdLibrariesByLibraryIdCollectionsOptions = (options: Options<GetApiPlexByMediaSourceIdLibrariesByLibraryIdCollectionsData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiPlexByMediaSourceIdLibrariesByLibraryIdCollections({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiPlexByMediaSourceIdLibrariesByLibraryIdCollectionsQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getApiPlexByMediaSourceIdLibrariesByLibraryIdCollectionsInfiniteQueryKey = (options: Options<GetApiPlexByMediaSourceIdLibrariesByLibraryIdCollectionsData>): QueryKey<Options<GetApiPlexByMediaSourceIdLibrariesByLibraryIdCollectionsData>> => createQueryKey('getApiPlexByMediaSourceIdLibrariesByLibraryIdCollections', options, true);
|
|
|
|
export const getApiPlexByMediaSourceIdLibrariesByLibraryIdCollectionsInfiniteOptions = (options: Options<GetApiPlexByMediaSourceIdLibrariesByLibraryIdCollectionsData>) => {
|
|
return infiniteQueryOptions<GetApiPlexByMediaSourceIdLibrariesByLibraryIdCollectionsResponse, AxiosError<DefaultError>, InfiniteData<GetApiPlexByMediaSourceIdLibrariesByLibraryIdCollectionsResponse>, QueryKey<Options<GetApiPlexByMediaSourceIdLibrariesByLibraryIdCollectionsData>>, number | Pick<QueryKey<Options<GetApiPlexByMediaSourceIdLibrariesByLibraryIdCollectionsData>>[0], 'body' | 'headers' | 'path' | 'query'>>(
|
|
// @ts-ignore
|
|
{
|
|
queryFn: async ({ pageParam, queryKey, signal }) => {
|
|
// @ts-ignore
|
|
const page: Pick<QueryKey<Options<GetApiPlexByMediaSourceIdLibrariesByLibraryIdCollectionsData>>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : {
|
|
query: {
|
|
offset: pageParam
|
|
}
|
|
};
|
|
const params = createInfiniteParams(queryKey, page);
|
|
const { data } = await getApiPlexByMediaSourceIdLibrariesByLibraryIdCollections({
|
|
...options,
|
|
...params,
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiPlexByMediaSourceIdLibrariesByLibraryIdCollectionsInfiniteQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getApiPlexByMediaSourceIdLibrariesByLibraryIdPlaylistsQueryKey = (options: Options<GetApiPlexByMediaSourceIdLibrariesByLibraryIdPlaylistsData>) => createQueryKey('getApiPlexByMediaSourceIdLibrariesByLibraryIdPlaylists', options);
|
|
|
|
export const getApiPlexByMediaSourceIdLibrariesByLibraryIdPlaylistsOptions = (options: Options<GetApiPlexByMediaSourceIdLibrariesByLibraryIdPlaylistsData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiPlexByMediaSourceIdLibrariesByLibraryIdPlaylists({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiPlexByMediaSourceIdLibrariesByLibraryIdPlaylistsQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getApiPlexByMediaSourceIdLibrariesByLibraryIdPlaylistsInfiniteQueryKey = (options: Options<GetApiPlexByMediaSourceIdLibrariesByLibraryIdPlaylistsData>): QueryKey<Options<GetApiPlexByMediaSourceIdLibrariesByLibraryIdPlaylistsData>> => createQueryKey('getApiPlexByMediaSourceIdLibrariesByLibraryIdPlaylists', options, true);
|
|
|
|
export const getApiPlexByMediaSourceIdLibrariesByLibraryIdPlaylistsInfiniteOptions = (options: Options<GetApiPlexByMediaSourceIdLibrariesByLibraryIdPlaylistsData>) => {
|
|
return infiniteQueryOptions<GetApiPlexByMediaSourceIdLibrariesByLibraryIdPlaylistsResponse, AxiosError<DefaultError>, InfiniteData<GetApiPlexByMediaSourceIdLibrariesByLibraryIdPlaylistsResponse>, QueryKey<Options<GetApiPlexByMediaSourceIdLibrariesByLibraryIdPlaylistsData>>, number | Pick<QueryKey<Options<GetApiPlexByMediaSourceIdLibrariesByLibraryIdPlaylistsData>>[0], 'body' | 'headers' | 'path' | 'query'>>(
|
|
// @ts-ignore
|
|
{
|
|
queryFn: async ({ pageParam, queryKey, signal }) => {
|
|
// @ts-ignore
|
|
const page: Pick<QueryKey<Options<GetApiPlexByMediaSourceIdLibrariesByLibraryIdPlaylistsData>>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : {
|
|
query: {
|
|
offset: pageParam
|
|
}
|
|
};
|
|
const params = createInfiniteParams(queryKey, page);
|
|
const { data } = await getApiPlexByMediaSourceIdLibrariesByLibraryIdPlaylists({
|
|
...options,
|
|
...params,
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiPlexByMediaSourceIdLibrariesByLibraryIdPlaylistsInfiniteQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getApiPlexByMediaSourceIdPlaylistsQueryKey = (options: Options<GetApiPlexByMediaSourceIdPlaylistsData>) => createQueryKey('getApiPlexByMediaSourceIdPlaylists', options);
|
|
|
|
export const getApiPlexByMediaSourceIdPlaylistsOptions = (options: Options<GetApiPlexByMediaSourceIdPlaylistsData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiPlexByMediaSourceIdPlaylists({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiPlexByMediaSourceIdPlaylistsQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getApiPlexByMediaSourceIdPlaylistsInfiniteQueryKey = (options: Options<GetApiPlexByMediaSourceIdPlaylistsData>): QueryKey<Options<GetApiPlexByMediaSourceIdPlaylistsData>> => createQueryKey('getApiPlexByMediaSourceIdPlaylists', options, true);
|
|
|
|
export const getApiPlexByMediaSourceIdPlaylistsInfiniteOptions = (options: Options<GetApiPlexByMediaSourceIdPlaylistsData>) => {
|
|
return infiniteQueryOptions<GetApiPlexByMediaSourceIdPlaylistsResponse, AxiosError<DefaultError>, InfiniteData<GetApiPlexByMediaSourceIdPlaylistsResponse>, QueryKey<Options<GetApiPlexByMediaSourceIdPlaylistsData>>, number | Pick<QueryKey<Options<GetApiPlexByMediaSourceIdPlaylistsData>>[0], 'body' | 'headers' | 'path' | 'query'>>(
|
|
// @ts-ignore
|
|
{
|
|
queryFn: async ({ pageParam, queryKey, signal }) => {
|
|
// @ts-ignore
|
|
const page: Pick<QueryKey<Options<GetApiPlexByMediaSourceIdPlaylistsData>>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : {
|
|
query: {
|
|
offset: pageParam
|
|
}
|
|
};
|
|
const params = createInfiniteParams(queryKey, page);
|
|
const { data } = await getApiPlexByMediaSourceIdPlaylists({
|
|
...options,
|
|
...params,
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiPlexByMediaSourceIdPlaylistsInfiniteQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getApiPlexByMediaSourceIdFiltersQueryKey = (options: Options<GetApiPlexByMediaSourceIdFiltersData>) => createQueryKey('getApiPlexByMediaSourceIdFilters', options);
|
|
|
|
export const getApiPlexByMediaSourceIdFiltersOptions = (options: Options<GetApiPlexByMediaSourceIdFiltersData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiPlexByMediaSourceIdFilters({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiPlexByMediaSourceIdFiltersQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getApiPlexByMediaSourceIdTagsQueryKey = (options: Options<GetApiPlexByMediaSourceIdTagsData>) => createQueryKey('getApiPlexByMediaSourceIdTags', options);
|
|
|
|
export const getApiPlexByMediaSourceIdTagsOptions = (options: Options<GetApiPlexByMediaSourceIdTagsData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiPlexByMediaSourceIdTags({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiPlexByMediaSourceIdTagsQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getApiPlexByMediaSourceIdItemsByItemIdChildrenQueryKey = (options: Options<GetApiPlexByMediaSourceIdItemsByItemIdChildrenData>) => createQueryKey('getApiPlexByMediaSourceIdItemsByItemIdChildren', options);
|
|
|
|
export const getApiPlexByMediaSourceIdItemsByItemIdChildrenOptions = (options: Options<GetApiPlexByMediaSourceIdItemsByItemIdChildrenData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiPlexByMediaSourceIdItemsByItemIdChildren({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiPlexByMediaSourceIdItemsByItemIdChildrenQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const jellyfinLoginQueryKey = (options: Options<JellyfinLoginData>) => createQueryKey('jellyfinLogin', options);
|
|
|
|
export const jellyfinLoginOptions = (options: Options<JellyfinLoginData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await jellyfinLogin({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: jellyfinLoginQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const jellyfinLoginMutation = (options?: Partial<Options<JellyfinLoginData>>): UseMutationOptions<JellyfinLoginResponse, AxiosError<DefaultError>, Options<JellyfinLoginData>> => {
|
|
const mutationOptions: UseMutationOptions<JellyfinLoginResponse, AxiosError<DefaultError>, Options<JellyfinLoginData>> = {
|
|
mutationFn: async (localOptions) => {
|
|
const { data } = await jellyfinLogin({
|
|
...options,
|
|
...localOptions,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
}
|
|
};
|
|
return mutationOptions;
|
|
};
|
|
|
|
export const getJellyfinLibrariesQueryKey = (options: Options<GetJellyfinLibrariesData>) => createQueryKey('getJellyfinLibraries', options);
|
|
|
|
export const getJellyfinLibrariesOptions = (options: Options<GetJellyfinLibrariesData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getJellyfinLibraries({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getJellyfinLibrariesQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getJellyfinLibraryGenresQueryKey = (options: Options<GetJellyfinLibraryGenresData>) => createQueryKey('getJellyfinLibraryGenres', options);
|
|
|
|
export const getJellyfinLibraryGenresOptions = (options: Options<GetJellyfinLibraryGenresData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getJellyfinLibraryGenres({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getJellyfinLibraryGenresQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getJellyfinLibraryItemsQueryKey = (options: Options<GetJellyfinLibraryItemsData>) => createQueryKey('getJellyfinLibraryItems', options);
|
|
|
|
export const getJellyfinLibraryItemsOptions = (options: Options<GetJellyfinLibraryItemsData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getJellyfinLibraryItems({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getJellyfinLibraryItemsQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getJellyfinLibraryItemsInfiniteQueryKey = (options: Options<GetJellyfinLibraryItemsData>): QueryKey<Options<GetJellyfinLibraryItemsData>> => createQueryKey('getJellyfinLibraryItems', options, true);
|
|
|
|
export const getJellyfinLibraryItemsInfiniteOptions = (options: Options<GetJellyfinLibraryItemsData>) => {
|
|
return infiniteQueryOptions<GetJellyfinLibraryItemsResponse, AxiosError<GetJellyfinLibraryItemsError>, InfiniteData<GetJellyfinLibraryItemsResponse>, QueryKey<Options<GetJellyfinLibraryItemsData>>, number | Pick<QueryKey<Options<GetJellyfinLibraryItemsData>>[0], 'body' | 'headers' | 'path' | 'query'>>(
|
|
// @ts-ignore
|
|
{
|
|
queryFn: async ({ pageParam, queryKey, signal }) => {
|
|
// @ts-ignore
|
|
const page: Pick<QueryKey<Options<GetJellyfinLibraryItemsData>>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : {
|
|
query: {
|
|
offset: pageParam
|
|
}
|
|
};
|
|
const params = createInfiniteParams(queryKey, page);
|
|
const { data } = await getJellyfinLibraryItems({
|
|
...options,
|
|
...params,
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getJellyfinLibraryItemsInfiniteQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getApiSessionsQueryKey = (options?: Options<GetApiSessionsData>) => createQueryKey('getApiSessions', options, false, [
|
|
'Sessions'
|
|
]);
|
|
|
|
export const getApiSessionsOptions = (options?: Options<GetApiSessionsData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiSessions({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiSessionsQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const deleteApiChannelsByIdSessionsMutation = (options?: Partial<Options<DeleteApiChannelsByIdSessionsData>>): UseMutationOptions<DeleteApiChannelsByIdSessionsResponse, AxiosError<DeleteApiChannelsByIdSessionsError>, Options<DeleteApiChannelsByIdSessionsData>> => {
|
|
const mutationOptions: UseMutationOptions<DeleteApiChannelsByIdSessionsResponse, AxiosError<DeleteApiChannelsByIdSessionsError>, Options<DeleteApiChannelsByIdSessionsData>> = {
|
|
mutationFn: async (localOptions) => {
|
|
const { data } = await deleteApiChannelsByIdSessions({
|
|
...options,
|
|
...localOptions,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
}
|
|
};
|
|
return mutationOptions;
|
|
};
|
|
|
|
export const getApiChannelsByIdSessionsQueryKey = (options: Options<GetApiChannelsByIdSessionsData>) => createQueryKey('getApiChannelsByIdSessions', options, false, [
|
|
'Sessions'
|
|
]);
|
|
|
|
export const getApiChannelsByIdSessionsOptions = (options: Options<GetApiChannelsByIdSessionsData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiChannelsByIdSessions({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiChannelsByIdSessionsQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const postApiEmbyLoginQueryKey = (options: Options<PostApiEmbyLoginData>) => createQueryKey('postApiEmbyLogin', options);
|
|
|
|
export const postApiEmbyLoginOptions = (options: Options<PostApiEmbyLoginData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await postApiEmbyLogin({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: postApiEmbyLoginQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const postApiEmbyLoginMutation = (options?: Partial<Options<PostApiEmbyLoginData>>): UseMutationOptions<PostApiEmbyLoginResponse, AxiosError<DefaultError>, Options<PostApiEmbyLoginData>> => {
|
|
const mutationOptions: UseMutationOptions<PostApiEmbyLoginResponse, AxiosError<DefaultError>, Options<PostApiEmbyLoginData>> = {
|
|
mutationFn: async (localOptions) => {
|
|
const { data } = await postApiEmbyLogin({
|
|
...options,
|
|
...localOptions,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
}
|
|
};
|
|
return mutationOptions;
|
|
};
|
|
|
|
export const getApiEmbyByMediaSourceIdUserLibrariesQueryKey = (options: Options<GetApiEmbyByMediaSourceIdUserLibrariesData>) => createQueryKey('getApiEmbyByMediaSourceIdUserLibraries', options);
|
|
|
|
export const getApiEmbyByMediaSourceIdUserLibrariesOptions = (options: Options<GetApiEmbyByMediaSourceIdUserLibrariesData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiEmbyByMediaSourceIdUserLibraries({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiEmbyByMediaSourceIdUserLibrariesQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getApiEmbyByMediaSourceIdLibrariesByLibraryIdItemsQueryKey = (options: Options<GetApiEmbyByMediaSourceIdLibrariesByLibraryIdItemsData>) => createQueryKey('getApiEmbyByMediaSourceIdLibrariesByLibraryIdItems', options);
|
|
|
|
export const getApiEmbyByMediaSourceIdLibrariesByLibraryIdItemsOptions = (options: Options<GetApiEmbyByMediaSourceIdLibrariesByLibraryIdItemsData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiEmbyByMediaSourceIdLibrariesByLibraryIdItems({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiEmbyByMediaSourceIdLibrariesByLibraryIdItemsQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getApiEmbyByMediaSourceIdLibrariesByLibraryIdItemsInfiniteQueryKey = (options: Options<GetApiEmbyByMediaSourceIdLibrariesByLibraryIdItemsData>): QueryKey<Options<GetApiEmbyByMediaSourceIdLibrariesByLibraryIdItemsData>> => createQueryKey('getApiEmbyByMediaSourceIdLibrariesByLibraryIdItems', options, true);
|
|
|
|
export const getApiEmbyByMediaSourceIdLibrariesByLibraryIdItemsInfiniteOptions = (options: Options<GetApiEmbyByMediaSourceIdLibrariesByLibraryIdItemsData>) => {
|
|
return infiniteQueryOptions<GetApiEmbyByMediaSourceIdLibrariesByLibraryIdItemsResponse, AxiosError<GetApiEmbyByMediaSourceIdLibrariesByLibraryIdItemsError>, InfiniteData<GetApiEmbyByMediaSourceIdLibrariesByLibraryIdItemsResponse>, QueryKey<Options<GetApiEmbyByMediaSourceIdLibrariesByLibraryIdItemsData>>, number | Pick<QueryKey<Options<GetApiEmbyByMediaSourceIdLibrariesByLibraryIdItemsData>>[0], 'body' | 'headers' | 'path' | 'query'>>(
|
|
// @ts-ignore
|
|
{
|
|
queryFn: async ({ pageParam, queryKey, signal }) => {
|
|
// @ts-ignore
|
|
const page: Pick<QueryKey<Options<GetApiEmbyByMediaSourceIdLibrariesByLibraryIdItemsData>>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : {
|
|
query: {
|
|
offset: pageParam
|
|
}
|
|
};
|
|
const params = createInfiniteParams(queryKey, page);
|
|
const { data } = await getApiEmbyByMediaSourceIdLibrariesByLibraryIdItems({
|
|
...options,
|
|
...params,
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiEmbyByMediaSourceIdLibrariesByLibraryIdItemsInfiniteQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getApiSettingsMediaSourceQueryKey = (options?: Options<GetApiSettingsMediaSourceData>) => createQueryKey('getApiSettingsMediaSource', options, false, [
|
|
'Settings'
|
|
]);
|
|
|
|
export const getApiSettingsMediaSourceOptions = (options?: Options<GetApiSettingsMediaSourceData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiSettingsMediaSource({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiSettingsMediaSourceQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const putApiSettingsMediaSourceMutation = (options?: Partial<Options<PutApiSettingsMediaSourceData>>): UseMutationOptions<PutApiSettingsMediaSourceResponse, AxiosError<DefaultError>, Options<PutApiSettingsMediaSourceData>> => {
|
|
const mutationOptions: UseMutationOptions<PutApiSettingsMediaSourceResponse, AxiosError<DefaultError>, Options<PutApiSettingsMediaSourceData>> = {
|
|
mutationFn: async (localOptions) => {
|
|
const { data } = await putApiSettingsMediaSource({
|
|
...options,
|
|
...localOptions,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
}
|
|
};
|
|
return mutationOptions;
|
|
};
|
|
|
|
export const deleteApiTrashMutation = (options?: Partial<Options<DeleteApiTrashData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DeleteApiTrashData>> => {
|
|
const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DeleteApiTrashData>> = {
|
|
mutationFn: async (localOptions) => {
|
|
const { data } = await deleteApiTrash({
|
|
...options,
|
|
...localOptions,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
}
|
|
};
|
|
return mutationOptions;
|
|
};
|
|
|
|
export const getApiTrashQueryKey = (options?: Options<GetApiTrashData>) => createQueryKey('getApiTrash', options);
|
|
|
|
export const getApiTrashOptions = (options?: Options<GetApiTrashData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiTrash({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiTrashQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getApiSmartCollectionsQueryKey = (options?: Options<GetApiSmartCollectionsData>) => createQueryKey('getApiSmartCollections', options, false, [
|
|
'Smart Collections'
|
|
]);
|
|
|
|
export const getApiSmartCollectionsOptions = (options?: Options<GetApiSmartCollectionsData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiSmartCollections({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiSmartCollectionsQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const postApiSmartCollectionsQueryKey = (options: Options<PostApiSmartCollectionsData>) => createQueryKey('postApiSmartCollections', options, false, [
|
|
'Smart Collections'
|
|
]);
|
|
|
|
export const postApiSmartCollectionsOptions = (options: Options<PostApiSmartCollectionsData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await postApiSmartCollections({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: postApiSmartCollectionsQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const postApiSmartCollectionsMutation = (options?: Partial<Options<PostApiSmartCollectionsData>>): UseMutationOptions<PostApiSmartCollectionsResponse, AxiosError<PostApiSmartCollectionsError>, Options<PostApiSmartCollectionsData>> => {
|
|
const mutationOptions: UseMutationOptions<PostApiSmartCollectionsResponse, AxiosError<PostApiSmartCollectionsError>, Options<PostApiSmartCollectionsData>> = {
|
|
mutationFn: async (localOptions) => {
|
|
const { data } = await postApiSmartCollections({
|
|
...options,
|
|
...localOptions,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
}
|
|
};
|
|
return mutationOptions;
|
|
};
|
|
|
|
export const deleteApiSmartCollectionsByIdMutation = (options?: Partial<Options<DeleteApiSmartCollectionsByIdData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DeleteApiSmartCollectionsByIdData>> => {
|
|
const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DeleteApiSmartCollectionsByIdData>> = {
|
|
mutationFn: async (localOptions) => {
|
|
const { data } = await deleteApiSmartCollectionsById({
|
|
...options,
|
|
...localOptions,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
}
|
|
};
|
|
return mutationOptions;
|
|
};
|
|
|
|
export const getApiSmartCollectionsByIdQueryKey = (options: Options<GetApiSmartCollectionsByIdData>) => createQueryKey('getApiSmartCollectionsById', options, false, [
|
|
'Smart Collections'
|
|
]);
|
|
|
|
export const getApiSmartCollectionsByIdOptions = (options: Options<GetApiSmartCollectionsByIdData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiSmartCollectionsById({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiSmartCollectionsByIdQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const putApiSmartCollectionsByIdMutation = (options?: Partial<Options<PutApiSmartCollectionsByIdData>>): UseMutationOptions<PutApiSmartCollectionsByIdResponse, AxiosError<DefaultError>, Options<PutApiSmartCollectionsByIdData>> => {
|
|
const mutationOptions: UseMutationOptions<PutApiSmartCollectionsByIdResponse, AxiosError<DefaultError>, Options<PutApiSmartCollectionsByIdData>> = {
|
|
mutationFn: async (localOptions) => {
|
|
const { data } = await putApiSmartCollectionsById({
|
|
...options,
|
|
...localOptions,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
}
|
|
};
|
|
return mutationOptions;
|
|
};
|
|
|
|
export const getApiCreditsByIdQueryKey = (options: Options<GetApiCreditsByIdData>) => createQueryKey('getApiCreditsById', options);
|
|
|
|
export const getApiCreditsByIdOptions = (options: Options<GetApiCreditsByIdData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiCreditsById({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiCreditsByIdQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getApiCreditsByIdArtworkByArtworkTypeQueryKey = (options: Options<GetApiCreditsByIdArtworkByArtworkTypeData>) => createQueryKey('getApiCreditsByIdArtworkByArtworkType', options);
|
|
|
|
export const getApiCreditsByIdArtworkByArtworkTypeOptions = (options: Options<GetApiCreditsByIdArtworkByArtworkTypeData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiCreditsByIdArtworkByArtworkType({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiCreditsByIdArtworkByArtworkTypeQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const batchGetProgramGroupingsByExternalIdsQueryKey = (options: Options<BatchGetProgramGroupingsByExternalIdsData>) => createQueryKey('batchGetProgramGroupingsByExternalIds', options, false, [
|
|
'Program Groupings'
|
|
]);
|
|
|
|
export const batchGetProgramGroupingsByExternalIdsOptions = (options: Options<BatchGetProgramGroupingsByExternalIdsData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await batchGetProgramGroupingsByExternalIds({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: batchGetProgramGroupingsByExternalIdsQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const batchGetProgramGroupingsByExternalIdsMutation = (options?: Partial<Options<BatchGetProgramGroupingsByExternalIdsData>>): UseMutationOptions<BatchGetProgramGroupingsByExternalIdsResponse, AxiosError<DefaultError>, Options<BatchGetProgramGroupingsByExternalIdsData>> => {
|
|
const mutationOptions: UseMutationOptions<BatchGetProgramGroupingsByExternalIdsResponse, AxiosError<DefaultError>, Options<BatchGetProgramGroupingsByExternalIdsData>> = {
|
|
mutationFn: async (localOptions) => {
|
|
const { data } = await batchGetProgramGroupingsByExternalIds({
|
|
...options,
|
|
...localOptions,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
}
|
|
};
|
|
return mutationOptions;
|
|
};
|
|
|
|
export const getApiVersionQueryKey = (options?: Options<GetApiVersionData>) => createQueryKey('getApiVersion', options, false, [
|
|
'System'
|
|
]);
|
|
|
|
export const getApiVersionOptions = (options?: Options<GetApiVersionData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiVersion({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiVersionQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getApiFfmpegInfoQueryKey = (options?: Options<GetApiFfmpegInfoData>) => createQueryKey('getApiFfmpegInfo', options, false, [
|
|
'System'
|
|
]);
|
|
|
|
export const getApiFfmpegInfoOptions = (options?: Options<GetApiFfmpegInfoData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiFfmpegInfo({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiFfmpegInfoQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const postApiUploadImageQueryKey = (options?: Options<PostApiUploadImageData>) => createQueryKey('postApiUploadImage', options);
|
|
|
|
export const postApiUploadImageOptions = (options?: Options<PostApiUploadImageData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await postApiUploadImage({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: postApiUploadImageQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const postApiUploadImageMutation = (options?: Partial<Options<PostApiUploadImageData>>): UseMutationOptions<PostApiUploadImageResponse, AxiosError<DefaultError>, Options<PostApiUploadImageData>> => {
|
|
const mutationOptions: UseMutationOptions<PostApiUploadImageResponse, AxiosError<DefaultError>, Options<PostApiUploadImageData>> = {
|
|
mutationFn: async (localOptions) => {
|
|
const { data } = await postApiUploadImage({
|
|
...options,
|
|
...localOptions,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
}
|
|
};
|
|
return mutationOptions;
|
|
};
|
|
|
|
export const getApiXmltvLastRefreshQueryKey = (options?: Options<GetApiXmltvLastRefreshData>) => createQueryKey('getApiXmltvLastRefresh', options);
|
|
|
|
export const getApiXmltvLastRefreshOptions = (options?: Options<GetApiXmltvLastRefreshData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiXmltvLastRefresh({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiXmltvLastRefreshQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getApiXmltvXmlQueryKey = (options?: Options<GetApiXmltvXmlData>) => createQueryKey('getApiXmltvXml', options, false, [
|
|
'Streaming'
|
|
]);
|
|
|
|
export const getApiXmltvXmlOptions = (options?: Options<GetApiXmltvXmlData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiXmltvXml({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiXmltvXmlQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const postApiXmltvRefreshQueryKey = (options?: Options<PostApiXmltvRefreshData>) => createQueryKey('postApiXmltvRefresh', options);
|
|
|
|
export const postApiXmltvRefreshOptions = (options?: Options<PostApiXmltvRefreshData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await postApiXmltvRefresh({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: postApiXmltvRefreshQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const postApiXmltvRefreshMutation = (options?: Partial<Options<PostApiXmltvRefreshData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PostApiXmltvRefreshData>> => {
|
|
const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<PostApiXmltvRefreshData>> = {
|
|
mutationFn: async (localOptions) => {
|
|
const { data } = await postApiXmltvRefresh({
|
|
...options,
|
|
...localOptions,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
}
|
|
};
|
|
return mutationOptions;
|
|
};
|
|
|
|
/**
|
|
* Clears the channels m3u cache
|
|
*/
|
|
export const deleteApiChannelsM3uMutation = (options?: Partial<Options<DeleteApiChannelsM3uData>>): UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DeleteApiChannelsM3uData>> => {
|
|
const mutationOptions: UseMutationOptions<unknown, AxiosError<DefaultError>, Options<DeleteApiChannelsM3uData>> = {
|
|
mutationFn: async (localOptions) => {
|
|
const { data } = await deleteApiChannelsM3U({
|
|
...options,
|
|
...localOptions,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
}
|
|
};
|
|
return mutationOptions;
|
|
};
|
|
|
|
export const getApiChannelsM3uQueryKey = (options?: Options<GetApiChannelsM3uData>) => createQueryKey('getApiChannelsM3U', options, false, [
|
|
'Streaming'
|
|
]);
|
|
|
|
export const getApiChannelsM3uOptions = (options?: Options<GetApiChannelsM3uData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getApiChannelsM3U({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getApiChannelsM3uQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getFfmpegPlaylistQueryKey = (options: Options<GetFfmpegPlaylistData>) => createQueryKey('getFfmpegPlaylist', options, false, [
|
|
'Streaming'
|
|
]);
|
|
|
|
/**
|
|
* Return a playlist in ffconcat file format for the given channel
|
|
*/
|
|
export const getFfmpegPlaylistOptions = (options: Options<GetFfmpegPlaylistData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getFfmpegPlaylist({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getFfmpegPlaylistQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getStreamChannelsByIdQueryKey = (options: Options<GetStreamChannelsByIdData>) => createQueryKey('getStreamChannelsById', options, false, [
|
|
'Streaming'
|
|
]);
|
|
|
|
export const getStreamChannelsByIdOptions = (options: Options<GetStreamChannelsByIdData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getStreamChannelsById({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getStreamChannelsByIdQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getStreamChannelsByIdTsQueryKey = (options: Options<GetStreamChannelsByIdTsData>) => createQueryKey('getStreamChannelsByIdTs', options, false, [
|
|
'Streaming'
|
|
]);
|
|
|
|
/**
|
|
* Returns a continuous, direct MPEGTS video stream for the given channel
|
|
*/
|
|
export const getStreamChannelsByIdTsOptions = (options: Options<GetStreamChannelsByIdTsData>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getStreamChannelsByIdTs({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getStreamChannelsByIdTsQueryKey(options)
|
|
});
|
|
};
|
|
|
|
export const getStreamChannelsByIdM3U8QueryKey = (options: Options<GetStreamChannelsByIdM3U8Data>) => createQueryKey('getStreamChannelsByIdM3U8', options, false, [
|
|
'Streaming'
|
|
]);
|
|
|
|
/**
|
|
* Returns an m3u8 playlist for the given channel, for use in HLS
|
|
*/
|
|
export const getStreamChannelsByIdM3U8Options = (options: Options<GetStreamChannelsByIdM3U8Data>) => {
|
|
return queryOptions({
|
|
queryFn: async ({ queryKey, signal }) => {
|
|
const { data } = await getStreamChannelsByIdM3U8({
|
|
...options,
|
|
...queryKey[0],
|
|
signal,
|
|
throwOnError: true
|
|
});
|
|
return data;
|
|
},
|
|
queryKey: getStreamChannelsByIdM3U8QueryKey(options)
|
|
});
|
|
}; |