feat(api): generate API models and hooks for public shop configuration and commerce entities
- Added generated API hooks and models for public shop configuration, including listing and retrieving configurations. - Introduced models for commerce categories, discount codes, orders, product images, and products with pagination and search parameters. - Ensured all generated files are structured for easy integration with React Query.
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* Generated by orval v7.17.0 🍺
|
||||
* Do not edit manually.
|
||||
* OpenAPI spec version: 0.0.0
|
||||
*/
|
||||
|
||||
export type ApiCommerceCategoriesListParams = {
|
||||
/**
|
||||
* Which field to use when ordering the results.
|
||||
*/
|
||||
ordering?: string;
|
||||
/**
|
||||
* A page number within the paginated result set.
|
||||
*/
|
||||
page?: number;
|
||||
/**
|
||||
* A search term.
|
||||
*/
|
||||
search?: string;
|
||||
};
|
||||
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* Generated by orval v7.17.0 🍺
|
||||
* Do not edit manually.
|
||||
* OpenAPI spec version: 0.0.0
|
||||
*/
|
||||
|
||||
export type ApiCommerceDiscountCodesListParams = {
|
||||
/**
|
||||
* Which field to use when ordering the results.
|
||||
*/
|
||||
ordering?: string;
|
||||
/**
|
||||
* A page number within the paginated result set.
|
||||
*/
|
||||
page?: number;
|
||||
/**
|
||||
* A search term.
|
||||
*/
|
||||
search?: string;
|
||||
};
|
||||
@@ -0,0 +1,12 @@
|
||||
/**
|
||||
* Generated by orval v7.17.0 🍺
|
||||
* Do not edit manually.
|
||||
* OpenAPI spec version: 0.0.0
|
||||
*/
|
||||
|
||||
export type ApiCommerceOrdersListParams = {
|
||||
/**
|
||||
* A page number within the paginated result set.
|
||||
*/
|
||||
page?: number;
|
||||
};
|
||||
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* Generated by orval v7.17.0 🍺
|
||||
* Do not edit manually.
|
||||
* OpenAPI spec version: 0.0.0
|
||||
*/
|
||||
|
||||
export type ApiCommerceProductImagesListParams = {
|
||||
/**
|
||||
* Which field to use when ordering the results.
|
||||
*/
|
||||
ordering?: string;
|
||||
/**
|
||||
* A page number within the paginated result set.
|
||||
*/
|
||||
page?: number;
|
||||
/**
|
||||
* A search term.
|
||||
*/
|
||||
search?: string;
|
||||
};
|
||||
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* Generated by orval v7.17.0 🍺
|
||||
* Do not edit manually.
|
||||
* OpenAPI spec version: 0.0.0
|
||||
*/
|
||||
|
||||
export type ApiCommerceProductsListParams = {
|
||||
/**
|
||||
* Which field to use when ordering the results.
|
||||
*/
|
||||
ordering?: string;
|
||||
/**
|
||||
* A page number within the paginated result set.
|
||||
*/
|
||||
page?: number;
|
||||
/**
|
||||
* A search term.
|
||||
*/
|
||||
search?: string;
|
||||
};
|
||||
@@ -0,0 +1,12 @@
|
||||
/**
|
||||
* Generated by orval v7.17.0 🍺
|
||||
* Do not edit manually.
|
||||
* OpenAPI spec version: 0.0.0
|
||||
*/
|
||||
|
||||
export type ApiConfigurationPublicShopConfigurationListParams = {
|
||||
/**
|
||||
* A page number within the paginated result set.
|
||||
*/
|
||||
page?: number;
|
||||
};
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
export type ApiDownloaderDownloadRetrieveParams = {
|
||||
/**
|
||||
* Video URL to analyze
|
||||
* Video URL from YouTube, TikTok, Vimeo, etc. Must be a valid URL from a supported platform.
|
||||
* @minLength 1
|
||||
*/
|
||||
url: string;
|
||||
|
||||
@@ -6,5 +6,4 @@
|
||||
|
||||
export interface DownloadErrorResponse {
|
||||
error: string;
|
||||
allowed?: string[];
|
||||
}
|
||||
|
||||
@@ -3,34 +3,51 @@
|
||||
* Do not edit manually.
|
||||
* OpenAPI spec version: 0.0.0
|
||||
*/
|
||||
import type { ExtEnum } from "./extEnum";
|
||||
import type { FormatEnum } from "./formatEnum";
|
||||
|
||||
export interface DownloadRequest {
|
||||
/** Video URL to download */
|
||||
/** Video URL to download from supported platforms */
|
||||
url: string;
|
||||
/** Choose container format: mp4 (H.264 + AAC, most compatible), mkv (flexible, lossless container), webm (VP9/AV1 + Opus), flv (legacy), mov (Apple-friendly), avi (older), ogg (mostly obsolete).
|
||||
|
||||
* `mp4` - mp4
|
||||
* `mkv` - mkv
|
||||
* `webm` - webm
|
||||
* `flv` - flv
|
||||
* `mov` - mov
|
||||
* `avi` - avi
|
||||
* `ogg` - ogg */
|
||||
ext?: ExtEnum;
|
||||
/** Alias of 'ext' (deprecated).
|
||||
|
||||
* `mp4` - mp4
|
||||
* `mkv` - mkv
|
||||
* `webm` - webm
|
||||
* `flv` - flv
|
||||
* `mov` - mov
|
||||
* `avi` - avi
|
||||
* `ogg` - ogg */
|
||||
format?: FormatEnum;
|
||||
/** Target max video height (e.g. 1080). */
|
||||
video_quality: number;
|
||||
/** Target max audio bitrate in kbps (e.g. 160). */
|
||||
audio_quality: number;
|
||||
/** 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;
|
||||
/**
|
||||
* 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;
|
||||
/**
|
||||
* Start time for trimming (format: HH:MM:SS or seconds as integer)
|
||||
* @nullable
|
||||
*/
|
||||
start_time?: string | null;
|
||||
/**
|
||||
* End time for trimming (format: HH:MM:SS or seconds as integer)
|
||||
* @nullable
|
||||
*/
|
||||
end_time?: string | null;
|
||||
/**
|
||||
* Playlist items to download (e.g., '1-5,8,10' or '1,2,3')
|
||||
* @nullable
|
||||
*/
|
||||
playlist_items?: string | null;
|
||||
/**
|
||||
* Browser cookies in Netscape format for age-restricted content. Export from browser extensions like 'Get cookies.txt'
|
||||
* @nullable
|
||||
*/
|
||||
cookies?: string | null;
|
||||
}
|
||||
|
||||
@@ -5,5 +5,6 @@
|
||||
*/
|
||||
|
||||
export interface ErrorResponse {
|
||||
/** Error message describing what went wrong */
|
||||
error: string;
|
||||
}
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
/**
|
||||
* Generated by orval v7.17.0 🍺
|
||||
* Do not edit manually.
|
||||
* OpenAPI spec version: 0.0.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* * `mp4` - mp4
|
||||
* `mkv` - mkv
|
||||
* `webm` - webm
|
||||
* `flv` - flv
|
||||
* `mov` - mov
|
||||
* `avi` - avi
|
||||
* `ogg` - ogg
|
||||
*/
|
||||
export type ExtEnum = (typeof ExtEnum)[keyof typeof ExtEnum];
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
||||
export const ExtEnum = {
|
||||
mp4: "mp4",
|
||||
mkv: "mkv",
|
||||
webm: "webm",
|
||||
flv: "flv",
|
||||
mov: "mov",
|
||||
avi: "avi",
|
||||
ogg: "ogg",
|
||||
} as const;
|
||||
@@ -1,27 +0,0 @@
|
||||
/**
|
||||
* Generated by orval v7.17.0 🍺
|
||||
* Do not edit manually.
|
||||
* OpenAPI spec version: 0.0.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* * `mp4` - mp4
|
||||
* `mkv` - mkv
|
||||
* `webm` - webm
|
||||
* `flv` - flv
|
||||
* `mov` - mov
|
||||
* `avi` - avi
|
||||
* `ogg` - ogg
|
||||
*/
|
||||
export type FormatEnum = (typeof FormatEnum)[keyof typeof FormatEnum];
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
||||
export const FormatEnum = {
|
||||
mp4: "mp4",
|
||||
mkv: "mkv",
|
||||
webm: "webm",
|
||||
flv: "flv",
|
||||
mov: "mov",
|
||||
avi: "avi",
|
||||
ogg: "ogg",
|
||||
} as const;
|
||||
@@ -8,6 +8,12 @@ export * from "./additionalParam";
|
||||
export * from "./apiChoicesRetrieve200";
|
||||
export * from "./apiChoicesRetrieve200Item";
|
||||
export * from "./apiChoicesRetrieveParams";
|
||||
export * from "./apiCommerceCategoriesListParams";
|
||||
export * from "./apiCommerceDiscountCodesListParams";
|
||||
export * from "./apiCommerceOrdersListParams";
|
||||
export * from "./apiCommerceProductImagesListParams";
|
||||
export * from "./apiCommerceProductsListParams";
|
||||
export * from "./apiConfigurationPublicShopConfigurationListParams";
|
||||
export * from "./apiDownloaderDownloadRetrieveParams";
|
||||
export * from "./callback";
|
||||
export * from "./carrierRead";
|
||||
@@ -22,8 +28,6 @@ export * from "./downloadErrorResponse";
|
||||
export * from "./downloadRequest";
|
||||
export * from "./downloaderStats";
|
||||
export * from "./errorResponse";
|
||||
export * from "./extEnum";
|
||||
export * from "./formatEnum";
|
||||
export * from "./item";
|
||||
export * from "./orderCarrier";
|
||||
export * from "./orderCreate";
|
||||
|
||||
@@ -5,11 +5,20 @@
|
||||
*/
|
||||
|
||||
export interface VideoInfoResponse {
|
||||
/** Video title */
|
||||
title: string;
|
||||
/** @nullable */
|
||||
/**
|
||||
* Video duration in seconds (null if unavailable)
|
||||
* @nullable
|
||||
*/
|
||||
duration: number | null;
|
||||
/** @nullable */
|
||||
/**
|
||||
* URL to video thumbnail image
|
||||
* @nullable
|
||||
*/
|
||||
thumbnail: string | null;
|
||||
/** List of available video quality options (e.g., '1080p', '720p', '480p') */
|
||||
video_resolutions: string[];
|
||||
/** List of available audio format options */
|
||||
audio_resolutions: string[];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user