fixes, orval, downloader functioning again

This commit is contained in:
2026-04-21 00:47:10 +02:00
parent 659999f4fd
commit cf08dbaf15
93 changed files with 1662 additions and 1333 deletions

View File

@@ -49,6 +49,7 @@ export const ApiSchemaRetrieveLang = {
hi: "hi",
hr: "hr",
hsb: "hsb",
ht: "ht",
hu: "hu",
hy: "hy",
ia: "ia",

View File

@@ -4,12 +4,12 @@
* OpenAPI spec version: 0.0.0
*/
import type { ShippingMethodEnum } from "./shippingMethodEnum";
import type { State1f6Enum } from "./state1f6Enum";
import type { StateF41Enum } from "./stateF41Enum";
import type { ZasilkovnaPacketRead } from "./zasilkovnaPacketRead";
export interface CarrierRead {
readonly shipping_method: ShippingMethodEnum;
readonly state: State1f6Enum;
readonly state: StateF41Enum;
readonly zasilkovna: readonly ZasilkovnaPacketRead[];
/** @pattern ^-?\d{0,8}(?:\.\d{0,2})?$ */
readonly shipping_price: string;

View File

@@ -12,7 +12,7 @@ export interface CartItem {
readonly product_price: string;
/**
* @minimum 0
* @maximum 9223372036854776000
* @maximum 2147483647
*/
quantity?: number;
readonly subtotal: string;

View File

@@ -60,7 +60,7 @@ export interface DeutschePostOrder {
/**
* Weight in grams
* @minimum 0
* @maximum 9223372036854776000
* @maximum 2147483647
*/
shipment_gross_weight: number;
/** @pattern ^-?\d{0,8}(?:\.\d{0,2})?$ */

View File

@@ -29,7 +29,7 @@ export interface DiscountCode {
active?: boolean;
/**
* @minimum 0
* @maximum 9223372036854776000
* @maximum 2147483647
* @nullable
*/
usage_limit?: number | null;

View File

@@ -1,43 +0,0 @@
/**
* Generated by orval v8.8.0 🍺
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
export interface DownloadRequest {
/** Video/Playlist URL to download from supported platforms */
url: string;
/** Container format for the output file. Common formats: mp4 (H.264 + AAC, most compatible), mkv (flexible, lossless container), webm (VP9/AV1 + Opus), flv (legacy), mov (Apple-friendly), avi (older), ogg, m4a (audio only), mp3 (audio only). The extension will be validated by ffmpeg during conversion. */
ext?: string;
/**
* Optional: Target max video height in pixels (e.g. 1080, 720). If omitted, best quality is selected.
* @nullable
*/
video_quality?: number | null;
/**
* Optional: Target max audio bitrate in kbps (e.g. 320, 192, 128). If omitted, best quality is selected.
* @nullable
*/
audio_quality?: number | null;
/**
* For playlists: specify which videos to download as array of numbers (e.g., [1,3,5]). If omitted, all videos are downloaded.
* @nullable
*/
selected_videos?: number[] | null;
/**
* Language codes (e.g., 'en', 'cs', 'en,cs') or 'all' for all available subtitles
* @nullable
*/
subtitles?: string | null;
/** Embed subtitles into the video file (requires mkv or mp4 container) */
embed_subtitles?: boolean;
/** Embed thumbnail as cover art in the file */
embed_thumbnail?: boolean;
/** Extract audio only, ignoring video quality settings */
extract_audio?: boolean;
/**
* Browser cookies in Netscape format for age-restricted content. Export from browser extensions like 'Get cookies.txt'
* @nullable
*/
cookies?: string | null;
}

View File

@@ -44,9 +44,7 @@ export * from "./deutschePostOrder";
export * from "./deutschePostOrderStateEnum";
export * from "./deutschePostTracking";
export * from "./discountCode";
export * from "./downloadErrorResponse";
export * from "./downloaderStats";
export * from "./downloadRequest";
export * from "./errorResponse";
export * from "./gopayCreatePayment201";
export * from "./gopayGetStatus200";
@@ -133,12 +131,13 @@ export * from "./reviewSerializerPublic";
export * from "./roleEnum";
export * from "./shippingMethodEnum";
export * from "./siteConfiguration";
export * from "./state1f6Enum";
export * from "./stateCdfEnum";
export * from "./statusD4fEnum";
export * from "./state9b5Enum";
export * from "./stateF41Enum";
export * from "./status0b2Enum";
export * from "./tagAttach";
export * from "./tags";
export * from "./timeseriesPoint";
export * from "./tokenError";
export * from "./topUrl";
export * from "./trackingURL";
export * from "./transferInit";

View File

@@ -4,12 +4,12 @@
* OpenAPI spec version: 0.0.0
*/
import type { ShippingMethodEnum } from "./shippingMethodEnum";
import type { State1f6Enum } from "./state1f6Enum";
import type { StateF41Enum } from "./stateF41Enum";
import type { ZasilkovnaPacket } from "./zasilkovnaPacket";
export interface OrderCarrier {
shipping_method?: ShippingMethodEnum;
readonly state: State1f6Enum;
readonly state: StateF41Enum;
readonly zasilkovna: readonly ZasilkovnaPacket[];
/** @pattern ^-?\d{0,8}(?:\.\d{0,2})?$ */
readonly shipping_price: string;

View File

@@ -3,11 +3,11 @@
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
import type { StatusD4fEnum } from "./statusD4fEnum";
import type { Status0b2Enum } from "./status0b2Enum";
export interface OrderMini {
readonly id: number;
readonly status: StatusD4fEnum;
readonly status: Status0b2Enum;
/** @pattern ^-?\d{0,8}(?:\.\d{0,2})?$ */
readonly total_price: string;
readonly created_at: Date;

View File

@@ -6,11 +6,11 @@
import type { CarrierRead } from "./carrierRead";
import type { OrderItemRead } from "./orderItemRead";
import type { PaymentRead } from "./paymentRead";
import type { StatusD4fEnum } from "./statusD4fEnum";
import type { Status0b2Enum } from "./status0b2Enum";
export interface OrderRead {
readonly id: number;
readonly status: StatusD4fEnum;
readonly status: Status0b2Enum;
/** @pattern ^-?\d{0,8}(?:\.\d{0,2})?$ */
readonly total_price: string;
/** Order currency - captured from site configuration at order creation and never changes */

View File

@@ -60,7 +60,7 @@ export interface PatchedDeutschePostOrder {
/**
* Weight in grams
* @minimum 0
* @maximum 9223372036854776000
* @maximum 2147483647
*/
shipment_gross_weight?: number;
/** @pattern ^-?\d{0,8}(?:\.\d{0,2})?$ */

View File

@@ -29,7 +29,7 @@ export interface PatchedDiscountCode {
active?: boolean;
/**
* @minimum 0
* @maximum 9223372036854776000
* @maximum 2147483647
* @nullable
*/
usage_limit?: number | null;

View File

@@ -6,11 +6,11 @@
import type { CarrierRead } from "./carrierRead";
import type { OrderItemRead } from "./orderItemRead";
import type { PaymentRead } from "./paymentRead";
import type { StatusD4fEnum } from "./statusD4fEnum";
import type { Status0b2Enum } from "./status0b2Enum";
export interface PatchedOrderRead {
readonly id?: number;
readonly status?: StatusD4fEnum;
readonly status?: Status0b2Enum;
/** @pattern ^-?\d{0,8}(?:\.\d{0,2})?$ */
readonly total_price?: string;
/** Order currency - captured from site configuration at order creation and never changes */

View File

@@ -26,7 +26,7 @@ export interface PatchedProduct {
url?: string;
/**
* @minimum 0
* @maximum 9223372036854776000
* @maximum 2147483647
*/
stock?: number;
is_active?: boolean;

View File

@@ -16,7 +16,7 @@ export interface PatchedVATRate {
name?: string;
/**
* VAT rate as percentage (e.g. 19.00 for 19%)
* @pattern ^-?\d{0,1}(?:\.\d{0,4})?$
* @pattern ^-?\d{0,2}(?:\.\d{0,4})?$
*/
rate?: string;
/** VAT rate as decimal (e.g., 0.19 for 19%) */

View File

@@ -10,8 +10,8 @@ export interface PostVote {
post: number;
readonly user: number;
/**
* @minimum -9223372036854776000
* @maximum 9223372036854776000
* @minimum -32768
* @maximum 32767
*/
vote: VoteEnum;
readonly created_at: Date;

View File

@@ -26,7 +26,7 @@ export interface Product {
url: string;
/**
* @minimum 0
* @maximum 9223372036854776000
* @maximum 2147483647
*/
stock?: number;
is_active?: boolean;

View File

@@ -19,7 +19,7 @@ export interface ProductMiniForWishlist {
is_active?: boolean;
/**
* @minimum 0
* @maximum 9223372036854776000
* @maximum 2147483647
*/
stock?: number;
}

View File

@@ -13,9 +13,9 @@
* `RETURNING` - Posláno zpátky
* `RETURNED` - Vráceno
*/
export type StateCdfEnum = (typeof StateCdfEnum)[keyof typeof StateCdfEnum];
export type State9b5Enum = (typeof State9b5Enum)[keyof typeof State9b5Enum];
export const StateCdfEnum = {
export const State9b5Enum = {
WAITING_FOR_ORDERING_SHIPMENT: "WAITING_FOR_ORDERING_SHIPMENT",
PENDING: "PENDING",
SENDED: "SENDED",

View File

@@ -10,9 +10,9 @@
* `delivered` - Doručeno
* `ready_to_pickup` - Připraveno k vyzvednutí
*/
export type State1f6Enum = (typeof State1f6Enum)[keyof typeof State1f6Enum];
export type StateF41Enum = (typeof StateF41Enum)[keyof typeof StateF41Enum];
export const State1f6Enum = {
export const StateF41Enum = {
ordered: "ordered",
shipped: "shipped",
delivered: "delivered",

View File

@@ -11,9 +11,9 @@
* `refunding` - Vrácení v procesu
* `refunded` - Vráceno
*/
export type StatusD4fEnum = (typeof StatusD4fEnum)[keyof typeof StatusD4fEnum];
export type Status0b2Enum = (typeof Status0b2Enum)[keyof typeof Status0b2Enum];
export const StatusD4fEnum = {
export const Status0b2Enum = {
created: "created",
cancelled: "cancelled",
completed: "completed",

View File

@@ -4,6 +4,6 @@
* OpenAPI spec version: 0.0.0
*/
export interface DownloadErrorResponse {
export interface TokenError {
error: string;
}

View File

@@ -16,7 +16,7 @@ export interface VATRate {
name: string;
/**
* VAT rate as percentage (e.g. 19.00 for 19%)
* @pattern ^-?\d{0,1}(?:\.\d{0,4})?$
* @pattern ^-?\d{0,2}(?:\.\d{0,4})?$
*/
rate: string;
/** VAT rate as decimal (e.g., 0.19 for 19%) */

View File

@@ -3,15 +3,15 @@
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
import type { StateCdfEnum } from "./stateCdfEnum";
import type { State9b5Enum } from "./state9b5Enum";
export interface ZasilkovnaPacket {
readonly id: number;
readonly created_at: Date;
/**
* Číslo zásilky v Packetě (vraceno od API od Packety)
* @minimum -9223372036854776000
* @maximum 9223372036854776000
* @minimum -2147483648
* @maximum 2147483647
* @nullable
*/
packet_id?: number | null;
@@ -20,7 +20,7 @@ export interface ZasilkovnaPacket {
* @nullable
*/
readonly barcode: string | null;
readonly state: StateCdfEnum;
readonly state: State9b5Enum;
/** Hmotnost zásilky v gramech */
readonly weight: number;
/** Seznam 2 routing stringů pro vrácení zásilky */

View File

@@ -3,15 +3,15 @@
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
import type { StateCdfEnum } from "./stateCdfEnum";
import type { State9b5Enum } from "./state9b5Enum";
export interface ZasilkovnaPacketRead {
readonly id: number;
readonly created_at: Date;
/**
* Číslo zásilky v Packetě (vraceno od API od Packety)
* @minimum -9223372036854776000
* @maximum 9223372036854776000
* @minimum -2147483648
* @maximum 2147483647
* @nullable
*/
packet_id?: number | null;
@@ -20,7 +20,7 @@ export interface ZasilkovnaPacketRead {
* @nullable
*/
readonly barcode: string | null;
readonly state: StateCdfEnum;
readonly state: State9b5Enum;
/** Hmotnost zásilky v gramech */
readonly weight: number;
/** Seznam 2 routing stringů pro vrácení zásilky */

View File

@@ -20,11 +20,13 @@ import type {
} from "@tanstack/react-query";
import type {
ApiDownloaderDownloadCreateParams,
ApiDownloaderDownloadFileCreateParams,
ApiDownloaderDownloadFileRetrieveParams,
ApiDownloaderDownloadRetrieveParams,
DownloadErrorResponse,
DownloadRequest,
DownloaderStats,
ErrorResponse,
TokenError,
VideoInfoResponse,
} from "./models";
@@ -214,60 +216,35 @@ export function useApiDownloaderDownloadRetrieve<
}
/**
*
Download video/playlist with optional quality constraints and container format conversion.
**For Playlists:**
- Returns a ZIP file containing all selected videos
- Use `selected_videos` to specify which videos to download (e.g., [1,3,5] or [1,2,3,4,5])
- If `selected_videos` is not provided, all videos in the playlist will be downloaded
**Quality Parameters (optional):**
- If not specified, yt-dlp will automatically select the best available quality.
- `video_quality`: Maximum video height in pixels (e.g., 1080, 720, 480).
- `audio_quality`: Maximum audio bitrate in kbps (e.g., 320, 192, 128).
**Format/Extension:**
- Any format supported by ffmpeg (mp4, mkv, webm, avi, mov, flv, m4a, mp3, etc.).
- Defaults to 'mp4' if not specified.
- The conversion is handled automatically by ffmpeg in the background.
**Advanced Options:**
- `subtitles`: Download subtitles (language codes like 'en,cs' or 'all')
- `embed_subtitles`: Embed subtitles into video file
- `embed_thumbnail`: Embed thumbnail as cover art
- `extract_audio`: Extract audio only (ignores video quality)
- `cookies`: Browser cookies for age-restricted content (Netscape format)
* @summary Download video or playlist from URL
* Serve a file using a signed token from WebSocket download. Token expires in 10 minutes.
* @summary Download file via signed token
*/
export const apiDownloaderDownloadCreate = (
downloadRequest: DownloadRequest,
params: ApiDownloaderDownloadCreateParams,
signal?: AbortSignal,
) => {
return publicMutator<Blob>({
url: `/api/downloader/download/`,
method: "POST",
headers: { "Content-Type": "application/json" },
data: downloadRequest,
params,
signal,
});
};
export const getApiDownloaderDownloadCreateMutationOptions = <
TError = DownloadErrorResponse,
TError = TokenError,
TContext = unknown,
>(options?: {
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof apiDownloaderDownloadCreate>>,
TError,
{ data: DownloadRequest },
{ params: ApiDownloaderDownloadCreateParams },
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof apiDownloaderDownloadCreate>>,
TError,
{ data: DownloadRequest },
{ params: ApiDownloaderDownloadCreateParams },
TContext
> => {
const mutationKey = ["apiDownloaderDownloadCreate"];
@@ -281,11 +258,11 @@ export const getApiDownloaderDownloadCreateMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof apiDownloaderDownloadCreate>>,
{ data: DownloadRequest }
{ params: ApiDownloaderDownloadCreateParams }
> = (props) => {
const { data } = props ?? {};
const { params } = props ?? {};
return apiDownloaderDownloadCreate(data);
return apiDownloaderDownloadCreate(params);
};
return { mutationFn, ...mutationOptions };
@@ -294,21 +271,21 @@ export const getApiDownloaderDownloadCreateMutationOptions = <
export type ApiDownloaderDownloadCreateMutationResult = NonNullable<
Awaited<ReturnType<typeof apiDownloaderDownloadCreate>>
>;
export type ApiDownloaderDownloadCreateMutationBody = DownloadRequest;
export type ApiDownloaderDownloadCreateMutationError = DownloadErrorResponse;
export type ApiDownloaderDownloadCreateMutationError = TokenError;
/**
* @summary Download video or playlist from URL
* @summary Download file via signed token
*/
export const useApiDownloaderDownloadCreate = <
TError = DownloadErrorResponse,
TError = TokenError,
TContext = unknown,
>(
options?: {
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof apiDownloaderDownloadCreate>>,
TError,
{ data: DownloadRequest },
{ params: ApiDownloaderDownloadCreateParams },
TContext
>;
},
@@ -316,7 +293,7 @@ export const useApiDownloaderDownloadCreate = <
): UseMutationResult<
Awaited<ReturnType<typeof apiDownloaderDownloadCreate>>,
TError,
{ data: DownloadRequest },
{ params: ApiDownloaderDownloadCreateParams },
TContext
> => {
return useMutation(
@@ -324,6 +301,279 @@ export const useApiDownloaderDownloadCreate = <
queryClient,
);
};
/**
*
Fetch detailed information about a video or playlist from supported platforms.
**Supported platforms:** YouTube, TikTok, Vimeo, Twitter, Instagram, Facebook, Reddit, and many more.
**Returns:**
For single videos:
- Video title, duration, and thumbnail
- Available video qualities/resolutions
- Available audio formats
For playlists:
- Array of videos with the same info structure as single videos
- Each video includes title, duration, thumbnail, and available qualities
**Usage:**
```
GET /api/downloader/download/?url=https://youtube.com/watch?v=VIDEO_ID
GET /api/downloader/download/?url=https://youtube.com/playlist?list=PLAYLIST_ID
```
* @summary Get video info from URL
*/
export const apiDownloaderDownloadFileRetrieve = (
params: ApiDownloaderDownloadFileRetrieveParams,
signal?: AbortSignal,
) => {
return publicMutator<VideoInfoResponse>({
url: `/api/downloader/download/file/`,
method: "GET",
params,
signal,
});
};
export const getApiDownloaderDownloadFileRetrieveQueryKey = (
params?: ApiDownloaderDownloadFileRetrieveParams,
) => {
return [
`/api/downloader/download/file/`,
...(params ? [params] : []),
] as const;
};
export const getApiDownloaderDownloadFileRetrieveQueryOptions = <
TData = Awaited<ReturnType<typeof apiDownloaderDownloadFileRetrieve>>,
TError = ErrorResponse,
>(
params: ApiDownloaderDownloadFileRetrieveParams,
options?: {
query?: Partial<
UseQueryOptions<
Awaited<ReturnType<typeof apiDownloaderDownloadFileRetrieve>>,
TError,
TData
>
>;
},
) => {
const { query: queryOptions } = options ?? {};
const queryKey =
queryOptions?.queryKey ??
getApiDownloaderDownloadFileRetrieveQueryKey(params);
const queryFn: QueryFunction<
Awaited<ReturnType<typeof apiDownloaderDownloadFileRetrieve>>
> = ({ signal }) => apiDownloaderDownloadFileRetrieve(params, signal);
return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<
Awaited<ReturnType<typeof apiDownloaderDownloadFileRetrieve>>,
TError,
TData
> & { queryKey: DataTag<QueryKey, TData, TError> };
};
export type ApiDownloaderDownloadFileRetrieveQueryResult = NonNullable<
Awaited<ReturnType<typeof apiDownloaderDownloadFileRetrieve>>
>;
export type ApiDownloaderDownloadFileRetrieveQueryError = ErrorResponse;
export function useApiDownloaderDownloadFileRetrieve<
TData = Awaited<ReturnType<typeof apiDownloaderDownloadFileRetrieve>>,
TError = ErrorResponse,
>(
params: ApiDownloaderDownloadFileRetrieveParams,
options: {
query: Partial<
UseQueryOptions<
Awaited<ReturnType<typeof apiDownloaderDownloadFileRetrieve>>,
TError,
TData
>
> &
Pick<
DefinedInitialDataOptions<
Awaited<ReturnType<typeof apiDownloaderDownloadFileRetrieve>>,
TError,
Awaited<ReturnType<typeof apiDownloaderDownloadFileRetrieve>>
>,
"initialData"
>;
},
queryClient?: QueryClient,
): DefinedUseQueryResult<TData, TError> & {
queryKey: DataTag<QueryKey, TData, TError>;
};
export function useApiDownloaderDownloadFileRetrieve<
TData = Awaited<ReturnType<typeof apiDownloaderDownloadFileRetrieve>>,
TError = ErrorResponse,
>(
params: ApiDownloaderDownloadFileRetrieveParams,
options?: {
query?: Partial<
UseQueryOptions<
Awaited<ReturnType<typeof apiDownloaderDownloadFileRetrieve>>,
TError,
TData
>
> &
Pick<
UndefinedInitialDataOptions<
Awaited<ReturnType<typeof apiDownloaderDownloadFileRetrieve>>,
TError,
Awaited<ReturnType<typeof apiDownloaderDownloadFileRetrieve>>
>,
"initialData"
>;
},
queryClient?: QueryClient,
): UseQueryResult<TData, TError> & {
queryKey: DataTag<QueryKey, TData, TError>;
};
export function useApiDownloaderDownloadFileRetrieve<
TData = Awaited<ReturnType<typeof apiDownloaderDownloadFileRetrieve>>,
TError = ErrorResponse,
>(
params: ApiDownloaderDownloadFileRetrieveParams,
options?: {
query?: Partial<
UseQueryOptions<
Awaited<ReturnType<typeof apiDownloaderDownloadFileRetrieve>>,
TError,
TData
>
>;
},
queryClient?: QueryClient,
): UseQueryResult<TData, TError> & {
queryKey: DataTag<QueryKey, TData, TError>;
};
/**
* @summary Get video info from URL
*/
export function useApiDownloaderDownloadFileRetrieve<
TData = Awaited<ReturnType<typeof apiDownloaderDownloadFileRetrieve>>,
TError = ErrorResponse,
>(
params: ApiDownloaderDownloadFileRetrieveParams,
options?: {
query?: Partial<
UseQueryOptions<
Awaited<ReturnType<typeof apiDownloaderDownloadFileRetrieve>>,
TError,
TData
>
>;
},
queryClient?: QueryClient,
): UseQueryResult<TData, TError> & {
queryKey: DataTag<QueryKey, TData, TError>;
} {
const queryOptions = getApiDownloaderDownloadFileRetrieveQueryOptions(
params,
options,
);
const query = useQuery(queryOptions, queryClient) as UseQueryResult<
TData,
TError
> & { queryKey: DataTag<QueryKey, TData, TError> };
return { ...query, queryKey: queryOptions.queryKey };
}
/**
* Serve a file using a signed token from WebSocket download. Token expires in 10 minutes.
* @summary Download file via signed token
*/
export const apiDownloaderDownloadFileCreate = (
params: ApiDownloaderDownloadFileCreateParams,
signal?: AbortSignal,
) => {
return publicMutator<Blob>({
url: `/api/downloader/download/file/`,
method: "POST",
params,
signal,
});
};
export const getApiDownloaderDownloadFileCreateMutationOptions = <
TError = TokenError,
TContext = unknown,
>(options?: {
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof apiDownloaderDownloadFileCreate>>,
TError,
{ params: ApiDownloaderDownloadFileCreateParams },
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof apiDownloaderDownloadFileCreate>>,
TError,
{ params: ApiDownloaderDownloadFileCreateParams },
TContext
> => {
const mutationKey = ["apiDownloaderDownloadFileCreate"];
const { mutation: mutationOptions } = options
? options.mutation &&
"mutationKey" in options.mutation &&
options.mutation.mutationKey
? options
: { ...options, mutation: { ...options.mutation, mutationKey } }
: { mutation: { mutationKey } };
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof apiDownloaderDownloadFileCreate>>,
{ params: ApiDownloaderDownloadFileCreateParams }
> = (props) => {
const { params } = props ?? {};
return apiDownloaderDownloadFileCreate(params);
};
return { mutationFn, ...mutationOptions };
};
export type ApiDownloaderDownloadFileCreateMutationResult = NonNullable<
Awaited<ReturnType<typeof apiDownloaderDownloadFileCreate>>
>;
export type ApiDownloaderDownloadFileCreateMutationError = TokenError;
/**
* @summary Download file via signed token
*/
export const useApiDownloaderDownloadFileCreate = <
TError = TokenError,
TContext = unknown,
>(
options?: {
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof apiDownloaderDownloadFileCreate>>,
TError,
{ params: ApiDownloaderDownloadFileCreateParams },
TContext
>;
},
queryClient?: QueryClient,
): UseMutationResult<
Awaited<ReturnType<typeof apiDownloaderDownloadFileCreate>>,
TError,
{ params: ApiDownloaderDownloadFileCreateParams },
TContext
> => {
return useMutation(
getApiDownloaderDownloadFileCreateMutationOptions(options),
queryClient,
);
};
/**
* Vrací agregované statistiky z tabulky DownloaderRecord.
* @summary Get aggregated downloader statistics

View File

@@ -0,0 +1,13 @@
/**
* Generated by orval v8.8.0 🍺
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
export type ApiDownloaderDownloadCreateParams = {
/**
* Signed token containing file info
* @minLength 1
*/
token: string;
};

View File

@@ -0,0 +1,13 @@
/**
* Generated by orval v8.8.0 🍺
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
export type ApiDownloaderDownloadFileCreateParams = {
/**
* Signed token containing file info
* @minLength 1
*/
token: string;
};

View File

@@ -0,0 +1,13 @@
/**
* Generated by orval v8.8.0 🍺
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
export type ApiDownloaderDownloadFileRetrieveParams = {
/**
* Video/Playlist URL from YouTube, TikTok, Vimeo, etc. Must be a valid URL from a supported platform.
* @minLength 1
*/
url: string;
};

View File

@@ -4,12 +4,12 @@
* OpenAPI spec version: 0.0.0
*/
import type { ShippingMethodEnum } from "./shippingMethodEnum";
import type { State1f6Enum } from "./state1f6Enum";
import type { StateF41Enum } from "./stateF41Enum";
import type { ZasilkovnaPacketRead } from "./zasilkovnaPacketRead";
export interface CarrierRead {
readonly shipping_method: ShippingMethodEnum;
readonly state: State1f6Enum;
readonly state: StateF41Enum;
readonly zasilkovna: readonly ZasilkovnaPacketRead[];
/** @pattern ^-?\d{0,8}(?:\.\d{0,2})?$ */
readonly shipping_price: string;

View File

@@ -12,7 +12,7 @@ export interface CartItem {
readonly product_price: string;
/**
* @minimum 0
* @maximum 9223372036854776000
* @maximum 2147483647
*/
quantity?: number;
readonly subtotal: string;

View File

@@ -60,7 +60,7 @@ export interface DeutschePostOrder {
/**
* Weight in grams
* @minimum 0
* @maximum 9223372036854776000
* @maximum 2147483647
*/
shipment_gross_weight: number;
/** @pattern ^-?\d{0,8}(?:\.\d{0,2})?$ */

View File

@@ -29,7 +29,7 @@ export interface DiscountCode {
active?: boolean;
/**
* @minimum 0
* @maximum 9223372036854776000
* @maximum 2147483647
* @nullable
*/
usage_limit?: number | null;

View File

@@ -1,43 +0,0 @@
/**
* Generated by orval v8.8.0 🍺
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
export interface DownloadRequest {
/** Video/Playlist URL to download from supported platforms */
url: string;
/** Container format for the output file. Common formats: mp4 (H.264 + AAC, most compatible), mkv (flexible, lossless container), webm (VP9/AV1 + Opus), flv (legacy), mov (Apple-friendly), avi (older), ogg, m4a (audio only), mp3 (audio only). The extension will be validated by ffmpeg during conversion. */
ext?: string;
/**
* Optional: Target max video height in pixels (e.g. 1080, 720). If omitted, best quality is selected.
* @nullable
*/
video_quality?: number | null;
/**
* Optional: Target max audio bitrate in kbps (e.g. 320, 192, 128). If omitted, best quality is selected.
* @nullable
*/
audio_quality?: number | null;
/**
* For playlists: specify which videos to download as array of numbers (e.g., [1,3,5]). If omitted, all videos are downloaded.
* @nullable
*/
selected_videos?: number[] | null;
/**
* Language codes (e.g., 'en', 'cs', 'en,cs') or 'all' for all available subtitles
* @nullable
*/
subtitles?: string | null;
/** Embed subtitles into the video file (requires mkv or mp4 container) */
embed_subtitles?: boolean;
/** Embed thumbnail as cover art in the file */
embed_thumbnail?: boolean;
/** Extract audio only, ignoring video quality settings */
extract_audio?: boolean;
/**
* Browser cookies in Netscape format for age-restricted content. Export from browser extensions like 'Get cookies.txt'
* @nullable
*/
cookies?: string | null;
}

View File

@@ -10,6 +10,9 @@ export * from "./apiCommerceDiscountCodesListParams";
export * from "./apiCommerceOrdersListParams";
export * from "./apiCommerceProductImagesListParams";
export * from "./apiCommerceProductsListParams";
export * from "./apiDownloaderDownloadCreateParams";
export * from "./apiDownloaderDownloadFileCreateParams";
export * from "./apiDownloaderDownloadFileRetrieveParams";
export * from "./apiDownloaderDownloadRetrieveParams";
export * from "./apiChoicesRetrieve200";
export * from "./apiChoicesRetrieve200Item";
@@ -30,9 +33,7 @@ export * from "./deutschePostOrder";
export * from "./deutschePostOrderStateEnum";
export * from "./deutschePostTracking";
export * from "./discountCode";
export * from "./downloadErrorResponse";
export * from "./downloaderStats";
export * from "./downloadRequest";
export * from "./errorResponse";
export * from "./hub";
export * from "./hubPermission";
@@ -116,12 +117,13 @@ export * from "./reviewSerializerPublic";
export * from "./roleEnum";
export * from "./shippingMethodEnum";
export * from "./siteConfiguration";
export * from "./state1f6Enum";
export * from "./stateCdfEnum";
export * from "./statusD4fEnum";
export * from "./state9b5Enum";
export * from "./stateF41Enum";
export * from "./status0b2Enum";
export * from "./tagAttach";
export * from "./tags";
export * from "./timeseriesPoint";
export * from "./tokenError";
export * from "./topUrl";
export * from "./trackingURL";
export * from "./transferInit";

View File

@@ -4,12 +4,12 @@
* OpenAPI spec version: 0.0.0
*/
import type { ShippingMethodEnum } from "./shippingMethodEnum";
import type { State1f6Enum } from "./state1f6Enum";
import type { StateF41Enum } from "./stateF41Enum";
import type { ZasilkovnaPacket } from "./zasilkovnaPacket";
export interface OrderCarrier {
shipping_method?: ShippingMethodEnum;
readonly state: State1f6Enum;
readonly state: StateF41Enum;
readonly zasilkovna: readonly ZasilkovnaPacket[];
/** @pattern ^-?\d{0,8}(?:\.\d{0,2})?$ */
readonly shipping_price: string;

View File

@@ -3,11 +3,11 @@
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
import type { StatusD4fEnum } from "./statusD4fEnum";
import type { Status0b2Enum } from "./status0b2Enum";
export interface OrderMini {
readonly id: number;
readonly status: StatusD4fEnum;
readonly status: Status0b2Enum;
/** @pattern ^-?\d{0,8}(?:\.\d{0,2})?$ */
readonly total_price: string;
readonly created_at: Date;

View File

@@ -6,11 +6,11 @@
import type { CarrierRead } from "./carrierRead";
import type { OrderItemRead } from "./orderItemRead";
import type { PaymentRead } from "./paymentRead";
import type { StatusD4fEnum } from "./statusD4fEnum";
import type { Status0b2Enum } from "./status0b2Enum";
export interface OrderRead {
readonly id: number;
readonly status: StatusD4fEnum;
readonly status: Status0b2Enum;
/** @pattern ^-?\d{0,8}(?:\.\d{0,2})?$ */
readonly total_price: string;
/** Order currency - captured from site configuration at order creation and never changes */

View File

@@ -60,7 +60,7 @@ export interface PatchedDeutschePostOrder {
/**
* Weight in grams
* @minimum 0
* @maximum 9223372036854776000
* @maximum 2147483647
*/
shipment_gross_weight?: number;
/** @pattern ^-?\d{0,8}(?:\.\d{0,2})?$ */

View File

@@ -29,7 +29,7 @@ export interface PatchedDiscountCode {
active?: boolean;
/**
* @minimum 0
* @maximum 9223372036854776000
* @maximum 2147483647
* @nullable
*/
usage_limit?: number | null;

View File

@@ -6,11 +6,11 @@
import type { CarrierRead } from "./carrierRead";
import type { OrderItemRead } from "./orderItemRead";
import type { PaymentRead } from "./paymentRead";
import type { StatusD4fEnum } from "./statusD4fEnum";
import type { Status0b2Enum } from "./status0b2Enum";
export interface PatchedOrderRead {
readonly id?: number;
readonly status?: StatusD4fEnum;
readonly status?: Status0b2Enum;
/** @pattern ^-?\d{0,8}(?:\.\d{0,2})?$ */
readonly total_price?: string;
/** Order currency - captured from site configuration at order creation and never changes */

View File

@@ -26,7 +26,7 @@ export interface PatchedProduct {
url?: string;
/**
* @minimum 0
* @maximum 9223372036854776000
* @maximum 2147483647
*/
stock?: number;
is_active?: boolean;

View File

@@ -16,7 +16,7 @@ export interface PatchedVATRate {
name?: string;
/**
* VAT rate as percentage (e.g. 19.00 for 19%)
* @pattern ^-?\d{0,1}(?:\.\d{0,4})?$
* @pattern ^-?\d{0,2}(?:\.\d{0,4})?$
*/
rate?: string;
/** VAT rate as decimal (e.g., 0.19 for 19%) */

View File

@@ -10,8 +10,8 @@ export interface PostVote {
post: number;
readonly user: number;
/**
* @minimum -9223372036854776000
* @maximum 9223372036854776000
* @minimum -32768
* @maximum 32767
*/
vote: VoteEnum;
readonly created_at: Date;

View File

@@ -26,7 +26,7 @@ export interface Product {
url: string;
/**
* @minimum 0
* @maximum 9223372036854776000
* @maximum 2147483647
*/
stock?: number;
is_active?: boolean;

View File

@@ -19,7 +19,7 @@ export interface ProductMiniForWishlist {
is_active?: boolean;
/**
* @minimum 0
* @maximum 9223372036854776000
* @maximum 2147483647
*/
stock?: number;
}

View File

@@ -13,9 +13,9 @@
* `RETURNING` - Posláno zpátky
* `RETURNED` - Vráceno
*/
export type StateCdfEnum = (typeof StateCdfEnum)[keyof typeof StateCdfEnum];
export type State9b5Enum = (typeof State9b5Enum)[keyof typeof State9b5Enum];
export const StateCdfEnum = {
export const State9b5Enum = {
WAITING_FOR_ORDERING_SHIPMENT: "WAITING_FOR_ORDERING_SHIPMENT",
PENDING: "PENDING",
SENDED: "SENDED",

View File

@@ -10,9 +10,9 @@
* `delivered` - Doručeno
* `ready_to_pickup` - Připraveno k vyzvednutí
*/
export type State1f6Enum = (typeof State1f6Enum)[keyof typeof State1f6Enum];
export type StateF41Enum = (typeof StateF41Enum)[keyof typeof StateF41Enum];
export const State1f6Enum = {
export const StateF41Enum = {
ordered: "ordered",
shipped: "shipped",
delivered: "delivered",

View File

@@ -11,9 +11,9 @@
* `refunding` - Vrácení v procesu
* `refunded` - Vráceno
*/
export type StatusD4fEnum = (typeof StatusD4fEnum)[keyof typeof StatusD4fEnum];
export type Status0b2Enum = (typeof Status0b2Enum)[keyof typeof Status0b2Enum];
export const StatusD4fEnum = {
export const Status0b2Enum = {
created: "created",
cancelled: "cancelled",
completed: "completed",

View File

@@ -4,6 +4,6 @@
* OpenAPI spec version: 0.0.0
*/
export interface DownloadErrorResponse {
export interface TokenError {
error: string;
}

View File

@@ -16,7 +16,7 @@ export interface VATRate {
name: string;
/**
* VAT rate as percentage (e.g. 19.00 for 19%)
* @pattern ^-?\d{0,1}(?:\.\d{0,4})?$
* @pattern ^-?\d{0,2}(?:\.\d{0,4})?$
*/
rate: string;
/** VAT rate as decimal (e.g., 0.19 for 19%) */

View File

@@ -3,15 +3,15 @@
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
import type { StateCdfEnum } from "./stateCdfEnum";
import type { State9b5Enum } from "./state9b5Enum";
export interface ZasilkovnaPacket {
readonly id: number;
readonly created_at: Date;
/**
* Číslo zásilky v Packetě (vraceno od API od Packety)
* @minimum -9223372036854776000
* @maximum 9223372036854776000
* @minimum -2147483648
* @maximum 2147483647
* @nullable
*/
packet_id?: number | null;
@@ -20,7 +20,7 @@ export interface ZasilkovnaPacket {
* @nullable
*/
readonly barcode: string | null;
readonly state: StateCdfEnum;
readonly state: State9b5Enum;
/** Hmotnost zásilky v gramech */
readonly weight: number;
/** Seznam 2 routing stringů pro vrácení zásilky */

View File

@@ -3,15 +3,15 @@
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
import type { StateCdfEnum } from "./stateCdfEnum";
import type { State9b5Enum } from "./state9b5Enum";
export interface ZasilkovnaPacketRead {
readonly id: number;
readonly created_at: Date;
/**
* Číslo zásilky v Packetě (vraceno od API od Packety)
* @minimum -9223372036854776000
* @maximum 9223372036854776000
* @minimum -2147483648
* @maximum 2147483647
* @nullable
*/
packet_id?: number | null;
@@ -20,7 +20,7 @@ export interface ZasilkovnaPacketRead {
* @nullable
*/
readonly barcode: string | null;
readonly state: StateCdfEnum;
readonly state: State9b5Enum;
/** Hmotnost zásilky v gramech */
readonly weight: number;
/** Seznam 2 routing stringů pro vrácení zásilky */