feat(api): generate models for patched products, refunds, site configurations, payments, and user registration

- Added PatchedProduct, PatchedProductImage, PatchedRefund, and related models.
- Introduced Payment, PaymentBody, PaymentCreate, and PaymentRead models.
- Created enums for payment methods, reasons for refunds, roles, and shipping methods.
- Implemented models for site configurations and their opening hours.
- Added ZasilkovnaPacket and ZasilkovnaShipment models for handling shipping data.
- Generated user registration model with validation rules.
- Updated public API functions to support new models and queries.
This commit is contained in:
2025-12-21 04:42:15 +01:00
parent 0346180d01
commit 9c48aee522
203 changed files with 21447 additions and 22 deletions

View File

@@ -0,0 +1,10 @@
/**
* Generated by orval v7.17.0 🍺
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
export interface AdditionalParam {
name: string;
value: string;
}

View File

@@ -0,0 +1,10 @@
/**
* Generated by orval v7.17.0 🍺
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
import type { ApiChoicesRetrieve200Item } from "./apiChoicesRetrieve200Item";
export type ApiChoicesRetrieve200 = {
[key: string]: ApiChoicesRetrieve200Item[];
};

View File

@@ -0,0 +1,12 @@
/**
* Generated by orval v7.17.0 🍺
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
export type ApiChoicesRetrieve200Item = {
/** Logická hodnota pro backend */
value?: string;
/** Human-readable label podle zvoleného jazyka */
label?: string;
};

View File

@@ -0,0 +1,16 @@
/**
* Generated by orval v7.17.0 🍺
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
export type ApiChoicesRetrieveParams = {
/**
* JSON pole objektů {model: 'ModelName', field: 'field_name'} např. '[{"model": "User", "field": "role"}, {"model": "Carrier", "field": "shipping_method"}]'
*/
fields: string;
/**
* Jazyk pro labely (např. 'cz', 'en')
*/
lang?: string;
};

View File

@@ -0,0 +1,13 @@
/**
* Generated by orval v7.17.0 🍺
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
export type ApiDownloaderDownloadRetrieveParams = {
/**
* Video URL to analyze
* @minLength 1
*/
url: string;
};

View File

@@ -0,0 +1,10 @@
/**
* Generated by orval v7.17.0 🍺
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
export interface Callback {
return_url: string;
notification_url?: string;
}

View File

@@ -0,0 +1,16 @@
/**
* Generated by orval v7.17.0 🍺
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
import type { ShippingMethodEnum } from "./shippingMethodEnum";
import type { StateFdaEnum } from "./stateFdaEnum";
import type { ZasilkovnaPacketRead } from "./zasilkovnaPacketRead";
export interface CarrierRead {
readonly shipping_method: ShippingMethodEnum;
readonly state: StateFdaEnum;
readonly zasilkovna: readonly ZasilkovnaPacketRead[];
/** @pattern ^-?\d{0,8}(?:\.\d{0,2})?$ */
readonly shipping_price: string;
}

View File

@@ -0,0 +1,20 @@
/**
* Generated by orval v7.17.0 🍺
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
export interface Category {
readonly id: number;
/** @maxLength 100 */
name: string;
/**
* @maxLength 50
* @pattern ^[-a-zA-Z0-9_]+$
*/
url: string;
/** @nullable */
parent?: number | null;
description?: string;
image?: string;
}

View File

@@ -0,0 +1,16 @@
/**
* Generated by orval v7.17.0 🍺
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
export interface Contact {
email: string;
first_name?: string;
last_name?: string;
phone_number?: string;
city?: string;
street?: string;
postal_code?: string;
country_code?: string;
}

View File

@@ -0,0 +1,13 @@
/**
* Generated by orval v7.17.0 🍺
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
export interface ContactMe {
readonly id: number;
/** @maxLength 254 */
client_email: string;
content: string;
readonly sent_at: Date;
}

View File

@@ -0,0 +1,17 @@
/**
* Generated by orval v7.17.0 🍺
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
/**
* * `CZK` - cz#Czech Koruna
* `EUR` - cz#Euro
*/
export type CurrencyEnum = (typeof CurrencyEnum)[keyof typeof CurrencyEnum];
// eslint-disable-next-line @typescript-eslint/no-redeclare
export const CurrencyEnum = {
CZK: "CZK",
EUR: "EUR",
} as const;

View File

@@ -0,0 +1,10 @@
/**
* Generated by orval v7.17.0 🍺
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
export interface CustomTokenObtainPair {
username: string;
password: string;
}

View File

@@ -0,0 +1,45 @@
/**
* Generated by orval v7.17.0 🍺
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
import type { RoleEnum } from "./roleEnum";
export interface CustomUser {
readonly id: number;
/** Požadováno. 150 znaků nebo méně. Pouze písmena, číslice a znaky @/./+/-/_. */
readonly username: string;
/** @maxLength 150 */
first_name?: string;
/** @maxLength 150 */
last_name?: string;
/** @maxLength 254 */
email: string;
role?: RoleEnum;
email_verified?: boolean;
/**
* @maxLength 16
* @nullable
* @pattern ^\+?\d{9,15}$
*/
phone_number?: string | null;
readonly create_time: Date;
/**
* @maxLength 100
* @nullable
*/
city?: string | null;
/**
* @maxLength 200
* @nullable
*/
street?: string | null;
/**
* @maxLength 5
* @nullable
* @pattern ^\d{5}$
*/
postal_code?: string | null;
readonly gdpr: boolean;
is_active?: boolean;
}

View File

@@ -0,0 +1,39 @@
/**
* Generated by orval v7.17.0 🍺
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
export interface DiscountCode {
readonly id: number;
/** @maxLength 50 */
code: string;
/** @maxLength 255 */
description?: string;
/**
* Procento sleva 0-100
* @minimum 0
* @maximum 100
* @nullable
*/
percent?: number | null;
/**
* Fixní sleva v CZK
* @nullable
* @pattern ^-?\d{0,8}(?:\.\d{0,2})?$
*/
amount?: string | null;
valid_from?: Date;
/** @nullable */
valid_to?: Date | null;
active?: boolean;
/**
* @minimum 0
* @maximum 9223372036854776000
* @nullable
*/
usage_limit?: number | null;
readonly used_count: number;
specific_products?: number[];
specific_categories?: number[];
}

View File

@@ -0,0 +1,10 @@
/**
* Generated by orval v7.17.0 🍺
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
export interface DownloadErrorResponse {
error: string;
allowed?: string[];
}

View File

@@ -0,0 +1,36 @@
/**
* Generated by orval v7.17.0 🍺
* 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 */
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;
}

View File

@@ -0,0 +1,19 @@
/**
* Generated by orval v7.17.0 🍺
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
export interface DownloaderStats {
total_downloads: number;
/** @nullable */
avg_length_of_media: number | null;
/** @nullable */
avg_file_size: number | null;
/** @nullable */
total_length_of_media: number | null;
/** @nullable */
total_file_size: number | null;
/** @nullable */
most_common_format: string | null;
}

View File

@@ -0,0 +1,9 @@
/**
* Generated by orval v7.17.0 🍺
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
export interface ErrorResponse {
error: string;
}

View File

@@ -0,0 +1,27 @@
/**
* 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;

View File

@@ -0,0 +1,27 @@
/**
* 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;

View File

@@ -0,0 +1,84 @@
/**
* Generated by orval v7.17.0 🍺
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
export * from "./additionalParam";
export * from "./apiChoicesRetrieve200";
export * from "./apiChoicesRetrieve200Item";
export * from "./apiChoicesRetrieveParams";
export * from "./apiDownloaderDownloadRetrieveParams";
export * from "./callback";
export * from "./carrierRead";
export * from "./category";
export * from "./contact";
export * from "./contactMe";
export * from "./currencyEnum";
export * from "./customTokenObtainPair";
export * from "./customUser";
export * from "./discountCode";
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";
export * from "./orderItemCreate";
export * from "./orderItemRead";
export * from "./orderMini";
export * from "./orderRead";
export * from "./paginatedCategoryList";
export * from "./paginatedContactMeList";
export * from "./paginatedCustomUserList";
export * from "./paginatedDiscountCodeList";
export * from "./paginatedOrderReadList";
export * from "./paginatedProductImageList";
export * from "./paginatedProductList";
export * from "./paginatedRefundList";
export * from "./paginatedSiteConfigurationAdminList";
export * from "./paginatedSiteConfigurationPublicList";
export * from "./paginatedZasilkovnaShipmentList";
export * from "./passwordResetConfirm";
export * from "./passwordResetRequest";
export * from "./patchedCategory";
export * from "./patchedContactMe";
export * from "./patchedCustomUser";
export * from "./patchedDiscountCode";
export * from "./patchedOrderRead";
export * from "./patchedProduct";
export * from "./patchedProductImage";
export * from "./patchedRefund";
export * from "./patchedSiteConfigurationAdmin";
export * from "./patchedSiteConfigurationAdminOpeningHours";
export * from "./payer";
export * from "./payment";
export * from "./paymentBody";
export * from "./paymentCreate";
export * from "./paymentMethodEnum";
export * from "./paymentRead";
export * from "./product";
export * from "./productImage";
export * from "./productMini";
export * from "./reasonChoiceEnum";
export * from "./refund";
export * from "./roleEnum";
export * from "./shippingMethodEnum";
export * from "./siteConfigurationAdmin";
export * from "./siteConfigurationAdminOpeningHours";
export * from "./siteConfigurationPublic";
export * from "./siteConfigurationPublicOpeningHours";
export * from "./stateE15Enum";
export * from "./stateFdaEnum";
export * from "./statusEnum";
export * from "./trackingURL";
export * from "./userRegistration";
export * from "./videoInfoResponse";
export * from "./zasilkovnaPacket";
export * from "./zasilkovnaPacketRead";
export * from "./zasilkovnaPacketReadReturnRouting";
export * from "./zasilkovnaPacketReturnRouting";
export * from "./zasilkovnaShipment";

View File

@@ -0,0 +1,17 @@
/**
* Generated by orval v7.17.0 🍺
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
export interface Item {
name: string;
/**
* Minor units
* @minimum 1
*/
amount: number;
type?: string;
/** @minimum 1 */
count?: number;
}

View File

@@ -0,0 +1,17 @@
/**
* Generated by orval v7.17.0 🍺
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
import type { ShippingMethodEnum } from "./shippingMethodEnum";
import type { StateFdaEnum } from "./stateFdaEnum";
import type { ZasilkovnaPacket } from "./zasilkovnaPacket";
export interface OrderCarrier {
shipping_method?: ShippingMethodEnum;
readonly state: StateFdaEnum;
readonly zasilkovna: readonly ZasilkovnaPacket[];
/** @pattern ^-?\d{0,8}(?:\.\d{0,2})?$ */
readonly shipping_price: string;
packeta_address_id?: number;
}

View File

@@ -0,0 +1,24 @@
/**
* Generated by orval v7.17.0 🍺
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
import type { OrderItemCreate } from "./orderItemCreate";
import type { OrderCarrier } from "./orderCarrier";
import type { Payment } from "./payment";
export interface OrderCreate {
first_name?: string;
last_name?: string;
email?: string;
phone?: string;
address?: string;
city?: string;
postal_code?: string;
country?: string;
note?: string;
items: OrderItemCreate[];
carrier: OrderCarrier;
payment: Payment;
discount_codes?: string[];
}

View File

@@ -0,0 +1,11 @@
/**
* Generated by orval v7.17.0 🍺
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
export interface OrderItemCreate {
product_id: number;
/** @minimum 1 */
quantity?: number;
}

View File

@@ -0,0 +1,12 @@
/**
* Generated by orval v7.17.0 🍺
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
import type { ProductMini } from "./productMini";
export interface OrderItemRead {
readonly id: number;
readonly product: ProductMini;
readonly quantity: number;
}

View File

@@ -0,0 +1,14 @@
/**
* Generated by orval v7.17.0 🍺
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
import type { StatusEnum } from "./statusEnum";
export interface OrderMini {
readonly id: number;
readonly status: StatusEnum;
/** @pattern ^-?\d{0,8}(?:\.\d{0,2})?$ */
readonly total_price: string;
readonly created_at: Date;
}

View File

@@ -0,0 +1,34 @@
/**
* Generated by orval v7.17.0 🍺
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
import type { StatusEnum } from "./statusEnum";
import type { OrderItemRead } from "./orderItemRead";
import type { CarrierRead } from "./carrierRead";
import type { PaymentRead } from "./paymentRead";
export interface OrderRead {
readonly id: number;
readonly status: StatusEnum;
/** @pattern ^-?\d{0,8}(?:\.\d{0,2})?$ */
readonly total_price: string;
readonly currency: string;
/** @nullable */
readonly user: number | null;
readonly first_name: string;
readonly last_name: string;
readonly email: string;
readonly phone: string;
readonly address: string;
readonly city: string;
readonly postal_code: string;
readonly country: string;
readonly note: string;
readonly created_at: Date;
readonly updated_at: Date;
readonly items: readonly OrderItemRead[];
readonly carrier: CarrierRead;
readonly payment: PaymentRead;
readonly discount_codes: string;
}

View File

@@ -0,0 +1,15 @@
/**
* Generated by orval v7.17.0 🍺
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
import type { Category } from "./category";
export interface PaginatedCategoryList {
count: number;
/** @nullable */
next?: string | null;
/** @nullable */
previous?: string | null;
results: Category[];
}

View File

@@ -0,0 +1,15 @@
/**
* Generated by orval v7.17.0 🍺
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
import type { ContactMe } from "./contactMe";
export interface PaginatedContactMeList {
count: number;
/** @nullable */
next?: string | null;
/** @nullable */
previous?: string | null;
results: ContactMe[];
}

View File

@@ -0,0 +1,15 @@
/**
* Generated by orval v7.17.0 🍺
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
import type { CustomUser } from "./customUser";
export interface PaginatedCustomUserList {
count: number;
/** @nullable */
next?: string | null;
/** @nullable */
previous?: string | null;
results: CustomUser[];
}

View File

@@ -0,0 +1,15 @@
/**
* Generated by orval v7.17.0 🍺
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
import type { DiscountCode } from "./discountCode";
export interface PaginatedDiscountCodeList {
count: number;
/** @nullable */
next?: string | null;
/** @nullable */
previous?: string | null;
results: DiscountCode[];
}

View File

@@ -0,0 +1,15 @@
/**
* Generated by orval v7.17.0 🍺
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
import type { OrderRead } from "./orderRead";
export interface PaginatedOrderReadList {
count: number;
/** @nullable */
next?: string | null;
/** @nullable */
previous?: string | null;
results: OrderRead[];
}

View File

@@ -0,0 +1,15 @@
/**
* Generated by orval v7.17.0 🍺
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
import type { ProductImage } from "./productImage";
export interface PaginatedProductImageList {
count: number;
/** @nullable */
next?: string | null;
/** @nullable */
previous?: string | null;
results: ProductImage[];
}

View File

@@ -0,0 +1,15 @@
/**
* Generated by orval v7.17.0 🍺
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
import type { Product } from "./product";
export interface PaginatedProductList {
count: number;
/** @nullable */
next?: string | null;
/** @nullable */
previous?: string | null;
results: Product[];
}

View File

@@ -0,0 +1,15 @@
/**
* Generated by orval v7.17.0 🍺
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
import type { Refund } from "./refund";
export interface PaginatedRefundList {
count: number;
/** @nullable */
next?: string | null;
/** @nullable */
previous?: string | null;
results: Refund[];
}

View File

@@ -0,0 +1,15 @@
/**
* Generated by orval v7.17.0 🍺
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
import type { SiteConfigurationAdmin } from "./siteConfigurationAdmin";
export interface PaginatedSiteConfigurationAdminList {
count: number;
/** @nullable */
next?: string | null;
/** @nullable */
previous?: string | null;
results: SiteConfigurationAdmin[];
}

View File

@@ -0,0 +1,15 @@
/**
* Generated by orval v7.17.0 🍺
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
import type { SiteConfigurationPublic } from "./siteConfigurationPublic";
export interface PaginatedSiteConfigurationPublicList {
count: number;
/** @nullable */
next?: string | null;
/** @nullable */
previous?: string | null;
results: SiteConfigurationPublic[];
}

View File

@@ -0,0 +1,15 @@
/**
* Generated by orval v7.17.0 🍺
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
import type { ZasilkovnaShipment } from "./zasilkovnaShipment";
export interface PaginatedZasilkovnaShipmentList {
count: number;
/** @nullable */
next?: string | null;
/** @nullable */
previous?: string | null;
results: ZasilkovnaShipment[];
}

View File

@@ -0,0 +1,10 @@
/**
* Generated by orval v7.17.0 🍺
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
export interface PasswordResetConfirm {
/** Nové heslo musí mít alespoň 8 znaků, obsahovat velká a malá písmena a číslici. */
password: string;
}

View File

@@ -0,0 +1,10 @@
/**
* Generated by orval v7.17.0 🍺
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
export interface PasswordResetRequest {
/** E-mail registrovaného a aktivního uživatele, na který bude zaslán reset hesla. */
email: string;
}

View File

@@ -0,0 +1,20 @@
/**
* Generated by orval v7.17.0 🍺
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
export interface PatchedCategory {
readonly id?: number;
/** @maxLength 100 */
name?: string;
/**
* @maxLength 50
* @pattern ^[-a-zA-Z0-9_]+$
*/
url?: string;
/** @nullable */
parent?: number | null;
description?: string;
image?: string;
}

View File

@@ -0,0 +1,13 @@
/**
* Generated by orval v7.17.0 🍺
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
export interface PatchedContactMe {
readonly id?: number;
/** @maxLength 254 */
client_email?: string;
content?: string;
readonly sent_at?: Date;
}

View File

@@ -0,0 +1,45 @@
/**
* Generated by orval v7.17.0 🍺
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
import type { RoleEnum } from "./roleEnum";
export interface PatchedCustomUser {
readonly id?: number;
/** Požadováno. 150 znaků nebo méně. Pouze písmena, číslice a znaky @/./+/-/_. */
readonly username?: string;
/** @maxLength 150 */
first_name?: string;
/** @maxLength 150 */
last_name?: string;
/** @maxLength 254 */
email?: string;
role?: RoleEnum;
email_verified?: boolean;
/**
* @maxLength 16
* @nullable
* @pattern ^\+?\d{9,15}$
*/
phone_number?: string | null;
readonly create_time?: Date;
/**
* @maxLength 100
* @nullable
*/
city?: string | null;
/**
* @maxLength 200
* @nullable
*/
street?: string | null;
/**
* @maxLength 5
* @nullable
* @pattern ^\d{5}$
*/
postal_code?: string | null;
readonly gdpr?: boolean;
is_active?: boolean;
}

View File

@@ -0,0 +1,39 @@
/**
* Generated by orval v7.17.0 🍺
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
export interface PatchedDiscountCode {
readonly id?: number;
/** @maxLength 50 */
code?: string;
/** @maxLength 255 */
description?: string;
/**
* Procento sleva 0-100
* @minimum 0
* @maximum 100
* @nullable
*/
percent?: number | null;
/**
* Fixní sleva v CZK
* @nullable
* @pattern ^-?\d{0,8}(?:\.\d{0,2})?$
*/
amount?: string | null;
valid_from?: Date;
/** @nullable */
valid_to?: Date | null;
active?: boolean;
/**
* @minimum 0
* @maximum 9223372036854776000
* @nullable
*/
usage_limit?: number | null;
readonly used_count?: number;
specific_products?: number[];
specific_categories?: number[];
}

View File

@@ -0,0 +1,34 @@
/**
* Generated by orval v7.17.0 🍺
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
import type { StatusEnum } from "./statusEnum";
import type { OrderItemRead } from "./orderItemRead";
import type { CarrierRead } from "./carrierRead";
import type { PaymentRead } from "./paymentRead";
export interface PatchedOrderRead {
readonly id?: number;
readonly status?: StatusEnum;
/** @pattern ^-?\d{0,8}(?:\.\d{0,2})?$ */
readonly total_price?: string;
readonly currency?: string;
/** @nullable */
readonly user?: number | null;
readonly first_name?: string;
readonly last_name?: string;
readonly email?: string;
readonly phone?: string;
readonly address?: string;
readonly city?: string;
readonly postal_code?: string;
readonly country?: string;
readonly note?: string;
readonly created_at?: Date;
readonly updated_at?: Date;
readonly items?: readonly OrderItemRead[];
readonly carrier?: CarrierRead;
readonly payment?: PaymentRead;
readonly discount_codes?: string;
}

View File

@@ -0,0 +1,39 @@
/**
* Generated by orval v7.17.0 🍺
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
export interface PatchedProduct {
readonly id?: number;
/** @maxLength 200 */
name?: string;
description?: string;
/**
* @maxLength 100
* @nullable
*/
code?: string | null;
/** @pattern ^-?\d{0,8}(?:\.\d{0,2})?$ */
price?: string;
/**
* @maxLength 50
* @pattern ^[-a-zA-Z0-9_]+$
*/
url?: string;
/**
* @minimum 0
* @maximum 9223372036854776000
*/
stock?: number;
is_active?: boolean;
/** @nullable */
limited_to?: Date | null;
readonly created_at?: Date;
readonly updated_at?: Date;
category?: number;
/** @nullable */
default_carrier?: number | null;
/** Symetrické varianty produktu: pokud přidáte variantu A → B, Django automaticky přidá i variantu B → A. Všechny varianty jsou rovnocenné a zobrazí se vzájemně. */
variants?: number[];
}

View File

@@ -0,0 +1,14 @@
/**
* Generated by orval v7.17.0 🍺
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
export interface PatchedProductImage {
readonly id?: number;
product?: number;
image?: string;
/** @maxLength 150 */
alt_text?: string;
is_main?: boolean;
}

View File

@@ -0,0 +1,15 @@
/**
* Generated by orval v7.17.0 🍺
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
import type { ReasonChoiceEnum } from "./reasonChoiceEnum";
export interface PatchedRefund {
readonly id?: number;
reason_choice?: ReasonChoiceEnum;
reason_text?: string;
readonly verified?: boolean;
readonly created_at?: Date;
order?: number;
}

View File

@@ -0,0 +1,77 @@
/**
* Generated by orval v7.17.0 🍺
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
import type { PatchedSiteConfigurationAdminOpeningHours } from "./patchedSiteConfigurationAdminOpeningHours";
import type { CurrencyEnum } from "./currencyEnum";
export interface PatchedSiteConfigurationAdmin {
readonly id?: number;
/** @maxLength 100 */
name?: string;
/** @nullable */
logo?: string | null;
/** @nullable */
favicon?: string | null;
/**
* @maxLength 254
* @nullable
*/
contact_email?: string | null;
/**
* @maxLength 20
* @nullable
*/
contact_phone?: string | null;
/** @nullable */
contact_address?: string | null;
/** @nullable */
opening_hours?: PatchedSiteConfigurationAdminOpeningHours;
/**
* @maxLength 200
* @nullable
*/
facebook_url?: string | null;
/**
* @maxLength 200
* @nullable
*/
instagram_url?: string | null;
/**
* @maxLength 200
* @nullable
*/
youtube_url?: string | null;
/**
* @maxLength 200
* @nullable
*/
tiktok_url?: string | null;
/**
* @maxLength 20
* @nullable
*/
whatsapp_number?: string | null;
/** @pattern ^-?\d{0,8}(?:\.\d{0,2})?$ */
zasilkovna_shipping_price?: string;
/**
* API klíč pro přístup k Zásilkovna API (zatím není využito)
* @maxLength 255
* @nullable
*/
zasilkovna_api_key?: string | null;
/**
* API heslo pro přístup k Zásilkovna API (zatím není využito)
* @maxLength 255
* @nullable
*/
zasilkovna_api_password?: string | null;
/** @pattern ^-?\d{0,8}(?:\.\d{0,2})?$ */
free_shipping_over?: string;
/** Násobení kupónů v objednávce (ano/ne), pokud ne tak se použije pouze nejvyšší slevový kupón */
multiplying_coupons?: boolean;
/** Sčítání slevových kupónů v objednávce (ano/ne), pokud ne tak se použije pouze nejvyšší slevový kupón */
addition_of_coupons_amount?: boolean;
currency?: CurrencyEnum;
}

View File

@@ -0,0 +1,10 @@
/**
* Generated by orval v7.17.0 🍺
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
/**
* @nullable
*/
export type PatchedSiteConfigurationAdminOpeningHours = unknown | null;

View File

@@ -0,0 +1,14 @@
/**
* Generated by orval v7.17.0 🍺
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
import type { Contact } from "./contact";
export interface Payer {
contact: Contact;
allowed_payment_instruments?: string[];
default_payment_instrument?: string;
allowed_swifts?: string[];
default_swift?: string;
}

View File

@@ -0,0 +1,16 @@
/**
* Generated by orval v7.17.0 🍺
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
import type { PaymentMethodEnum } from "./paymentMethodEnum";
export interface Payment {
readonly id: number;
payment_method?: PaymentMethodEnum;
/** @nullable */
readonly stripe: number | null;
readonly stripe_session_id: string;
readonly stripe_payment_intent: string;
readonly stripe_session_url: string;
}

View File

@@ -0,0 +1,26 @@
/**
* Generated by orval v7.17.0 🍺
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
import type { Payer } from "./payer";
import type { Callback } from "./callback";
import type { Item } from "./item";
import type { AdditionalParam } from "./additionalParam";
export interface PaymentBody {
/**
* Minor units (e.g. 100 CZK = 10000)
* @minimum 1
*/
amount: number;
currency: string;
order_number: string;
order_description?: string;
payer: Payer;
callback: Callback;
items?: Item[];
additional_params?: AdditionalParam[];
lang?: string;
preauthorize?: boolean;
}

View File

@@ -0,0 +1,11 @@
/**
* Generated by orval v7.17.0 🍺
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
import type { PaymentBody } from "./paymentBody";
export interface PaymentCreate {
payment: PaymentBody;
user_id?: number;
}

View File

@@ -0,0 +1,20 @@
/**
* Generated by orval v7.17.0 🍺
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
/**
* * `Site` - cz#Platba v obchodě
* `stripe` - cz#Bankovní převod
* `cash_on_delivery` - cz#Dobírka
*/
export type PaymentMethodEnum =
(typeof PaymentMethodEnum)[keyof typeof PaymentMethodEnum];
// eslint-disable-next-line @typescript-eslint/no-redeclare
export const PaymentMethodEnum = {
Site: "Site",
stripe: "stripe",
cash_on_delivery: "cash_on_delivery",
} as const;

View File

@@ -0,0 +1,10 @@
/**
* Generated by orval v7.17.0 🍺
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
import type { PaymentMethodEnum } from "./paymentMethodEnum";
export interface PaymentRead {
readonly payment_method: PaymentMethodEnum;
}

View File

@@ -0,0 +1,39 @@
/**
* Generated by orval v7.17.0 🍺
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
export interface Product {
readonly id: number;
/** @maxLength 200 */
name: string;
description?: string;
/**
* @maxLength 100
* @nullable
*/
code?: string | null;
/** @pattern ^-?\d{0,8}(?:\.\d{0,2})?$ */
price: string;
/**
* @maxLength 50
* @pattern ^[-a-zA-Z0-9_]+$
*/
url: string;
/**
* @minimum 0
* @maximum 9223372036854776000
*/
stock?: number;
is_active?: boolean;
/** @nullable */
limited_to?: Date | null;
readonly created_at: Date;
readonly updated_at: Date;
category: number;
/** @nullable */
default_carrier?: number | null;
/** Symetrické varianty produktu: pokud přidáte variantu A → B, Django automaticky přidá i variantu B → A. Všechny varianty jsou rovnocenné a zobrazí se vzájemně. */
variants?: number[];
}

View File

@@ -0,0 +1,14 @@
/**
* Generated by orval v7.17.0 🍺
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
export interface ProductImage {
readonly id: number;
product: number;
image: string;
/** @maxLength 150 */
alt_text?: string;
is_main?: boolean;
}

View File

@@ -0,0 +1,13 @@
/**
* Generated by orval v7.17.0 🍺
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
export interface ProductMini {
readonly id: number;
/** @maxLength 200 */
name: string;
/** @pattern ^-?\d{0,8}(?:\.\d{0,2})?$ */
price: string;
}

View File

@@ -0,0 +1,22 @@
/**
* Generated by orval v7.17.0 🍺
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
/**
* * `retuning_before_fourteen_day_period` - cz#Vrácení před uplynutím 14-ti denní lhůty
* `damaged_product` - cz#Poškozený produkt
* `wrong_item` - cz#Špatná položka
* `other` - cz#Jiný důvod
*/
export type ReasonChoiceEnum =
(typeof ReasonChoiceEnum)[keyof typeof ReasonChoiceEnum];
// eslint-disable-next-line @typescript-eslint/no-redeclare
export const ReasonChoiceEnum = {
retuning_before_fourteen_day_period: "retuning_before_fourteen_day_period",
damaged_product: "damaged_product",
wrong_item: "wrong_item",
other: "other",
} as const;

View File

@@ -0,0 +1,15 @@
/**
* Generated by orval v7.17.0 🍺
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
import type { ReasonChoiceEnum } from "./reasonChoiceEnum";
export interface Refund {
readonly id: number;
reason_choice: ReasonChoiceEnum;
reason_text?: string;
readonly verified: boolean;
readonly created_at: Date;
order: number;
}

View File

@@ -0,0 +1,19 @@
/**
* Generated by orval v7.17.0 🍺
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
/**
* * `admin` - cz#Administrátor
* `mod` - cz#Moderator
* `regular` - cz#Regular
*/
export type RoleEnum = (typeof RoleEnum)[keyof typeof RoleEnum];
// eslint-disable-next-line @typescript-eslint/no-redeclare
export const RoleEnum = {
admin: "admin",
mod: "mod",
regular: "regular",
} as const;

View File

@@ -0,0 +1,18 @@
/**
* Generated by orval v7.17.0 🍺
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
/**
* * `packeta` - cz#Zásilkovna
* `store` - cz#Osobní odběr
*/
export type ShippingMethodEnum =
(typeof ShippingMethodEnum)[keyof typeof ShippingMethodEnum];
// eslint-disable-next-line @typescript-eslint/no-redeclare
export const ShippingMethodEnum = {
packeta: "packeta",
store: "store",
} as const;

View File

@@ -0,0 +1,77 @@
/**
* Generated by orval v7.17.0 🍺
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
import type { SiteConfigurationAdminOpeningHours } from "./siteConfigurationAdminOpeningHours";
import type { CurrencyEnum } from "./currencyEnum";
export interface SiteConfigurationAdmin {
readonly id: number;
/** @maxLength 100 */
name?: string;
/** @nullable */
logo?: string | null;
/** @nullable */
favicon?: string | null;
/**
* @maxLength 254
* @nullable
*/
contact_email?: string | null;
/**
* @maxLength 20
* @nullable
*/
contact_phone?: string | null;
/** @nullable */
contact_address?: string | null;
/** @nullable */
opening_hours?: SiteConfigurationAdminOpeningHours;
/**
* @maxLength 200
* @nullable
*/
facebook_url?: string | null;
/**
* @maxLength 200
* @nullable
*/
instagram_url?: string | null;
/**
* @maxLength 200
* @nullable
*/
youtube_url?: string | null;
/**
* @maxLength 200
* @nullable
*/
tiktok_url?: string | null;
/**
* @maxLength 20
* @nullable
*/
whatsapp_number?: string | null;
/** @pattern ^-?\d{0,8}(?:\.\d{0,2})?$ */
zasilkovna_shipping_price?: string;
/**
* API klíč pro přístup k Zásilkovna API (zatím není využito)
* @maxLength 255
* @nullable
*/
zasilkovna_api_key?: string | null;
/**
* API heslo pro přístup k Zásilkovna API (zatím není využito)
* @maxLength 255
* @nullable
*/
zasilkovna_api_password?: string | null;
/** @pattern ^-?\d{0,8}(?:\.\d{0,2})?$ */
free_shipping_over?: string;
/** Násobení kupónů v objednávce (ano/ne), pokud ne tak se použije pouze nejvyšší slevový kupón */
multiplying_coupons?: boolean;
/** Sčítání slevových kupónů v objednávce (ano/ne), pokud ne tak se použije pouze nejvyšší slevový kupón */
addition_of_coupons_amount?: boolean;
currency?: CurrencyEnum;
}

View File

@@ -0,0 +1,10 @@
/**
* Generated by orval v7.17.0 🍺
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
/**
* @nullable
*/
export type SiteConfigurationAdminOpeningHours = unknown | null;

View File

@@ -0,0 +1,56 @@
/**
* Generated by orval v7.17.0 🍺
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
import type { SiteConfigurationPublicOpeningHours } from "./siteConfigurationPublicOpeningHours";
import type { CurrencyEnum } from "./currencyEnum";
export interface SiteConfigurationPublic {
readonly id: number;
/** @maxLength 100 */
name?: string;
/** @nullable */
logo?: string | null;
/** @nullable */
favicon?: string | null;
/**
* @maxLength 254
* @nullable
*/
contact_email?: string | null;
/**
* @maxLength 20
* @nullable
*/
contact_phone?: string | null;
/** @nullable */
contact_address?: string | null;
/** @nullable */
opening_hours?: SiteConfigurationPublicOpeningHours;
/**
* @maxLength 200
* @nullable
*/
facebook_url?: string | null;
/**
* @maxLength 200
* @nullable
*/
instagram_url?: string | null;
/**
* @maxLength 200
* @nullable
*/
youtube_url?: string | null;
/**
* @maxLength 200
* @nullable
*/
tiktok_url?: string | null;
/** @pattern ^-?\d{0,8}(?:\.\d{0,2})?$ */
zasilkovna_shipping_price?: string;
/** @pattern ^-?\d{0,8}(?:\.\d{0,2})?$ */
free_shipping_over?: string;
currency?: CurrencyEnum;
}

View File

@@ -0,0 +1,10 @@
/**
* Generated by orval v7.17.0 🍺
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
/**
* @nullable
*/
export type SiteConfigurationPublicOpeningHours = unknown | null;

View File

@@ -0,0 +1,27 @@
/**
* Generated by orval v7.17.0 🍺
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
/**
* * `WAITING_FOR_ORDERING_SHIPMENT` - cz#Čeká na objednání zásilkovny
* `PENDING` - cz#Podáno
* `SENDED` - cz#Odesláno
* `ARRIVED` - cz#Doručeno
* `CANCELED` - cz#Zrušeno
* `RETURNING` - cz#Posláno zpátky
* `RETURNED` - cz#Vráceno
*/
export type StateE15Enum = (typeof StateE15Enum)[keyof typeof StateE15Enum];
// eslint-disable-next-line @typescript-eslint/no-redeclare
export const StateE15Enum = {
WAITING_FOR_ORDERING_SHIPMENT: "WAITING_FOR_ORDERING_SHIPMENT",
PENDING: "PENDING",
SENDED: "SENDED",
ARRIVED: "ARRIVED",
CANCELED: "CANCELED",
RETURNING: "RETURNING",
RETURNED: "RETURNED",
} as const;

View File

@@ -0,0 +1,21 @@
/**
* Generated by orval v7.17.0 🍺
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
/**
* * `ordered` - cz#Objednávka se připravuje
* `shipped` - cz#Odesláno
* `delivered` - cz#Doručeno
* `ready_to_pickup` - cz#Připraveno k vyzvednutí
*/
export type StateFdaEnum = (typeof StateFdaEnum)[keyof typeof StateFdaEnum];
// eslint-disable-next-line @typescript-eslint/no-redeclare
export const StateFdaEnum = {
ordered: "ordered",
shipped: "shipped",
delivered: "delivered",
ready_to_pickup: "ready_to_pickup",
} as const;

View File

@@ -0,0 +1,23 @@
/**
* Generated by orval v7.17.0 🍺
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
/**
* * `created` - cz#Vytvořeno
* `cancelled` - cz#Zrušeno
* `completed` - cz#Dokončeno
* `refunding` - cz#Vrácení v procesu
* `refunded` - cz#Vráceno
*/
export type StatusEnum = (typeof StatusEnum)[keyof typeof StatusEnum];
// eslint-disable-next-line @typescript-eslint/no-redeclare
export const StatusEnum = {
created: "created",
cancelled: "cancelled",
completed: "completed",
refunding: "refunding",
refunded: "refunded",
} as const;

View File

@@ -0,0 +1,10 @@
/**
* Generated by orval v7.17.0 🍺
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
export interface TrackingURL {
readonly barcode: string;
readonly tracking_url: string;
}

View File

@@ -0,0 +1,53 @@
/**
* Generated by orval v7.17.0 🍺
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
export interface UserRegistration {
/**
* Křestní jméno uživatele
* @maxLength 150
*/
first_name: string;
/**
* Příjmení uživatele
* @maxLength 150
*/
last_name: string;
/**
* Emailová adresa uživatele
* @maxLength 254
*/
email: string;
/**
* Telefonní číslo uživatele
* @maxLength 16
* @nullable
* @pattern ^\+?\d{9,15}$
*/
phone_number: string | null;
/** Heslo musí mít alespoň 8 znaků, obsahovat velká a malá písmena a číslici. */
password: string;
/**
* Město uživatele
* @maxLength 100
* @nullable
*/
city: string | null;
/**
* Ulice uživatele
* @maxLength 200
* @nullable
*/
street: string | null;
/**
* PSČ uživatele
* @maxLength 5
* @nullable
* @pattern ^\d{5}$
*/
postal_code: string | null;
/** Souhlas se zpracováním osobních údajů */
gdpr: boolean;
}

View File

@@ -0,0 +1,15 @@
/**
* Generated by orval v7.17.0 🍺
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
export interface VideoInfoResponse {
title: string;
/** @nullable */
duration: number | null;
/** @nullable */
thumbnail: string | null;
video_resolutions: string[];
audio_resolutions: string[];
}

View File

@@ -0,0 +1,32 @@
/**
* Generated by orval v7.17.0 🍺
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
import type { StateE15Enum } from "./stateE15Enum";
import type { ZasilkovnaPacketReturnRouting } from "./zasilkovnaPacketReturnRouting";
export interface ZasilkovnaPacket {
readonly id: number;
readonly created_at: Date;
/**
* Číslo zásilky v Packetě (vraceno od API od Packety)
* @minimum -9223372036854776000
* @maximum 9223372036854776000
* @nullable
*/
packet_id?: number | null;
/**
* Čárový kód zásilky od Packety
* @nullable
*/
readonly barcode: string | null;
readonly state: StateE15Enum;
/** Hmotnost zásilky v gramech */
readonly weight: number;
/**
* Seznam 2 routing stringů pro vrácení zásilky
* @nullable
*/
readonly return_routing: ZasilkovnaPacketReturnRouting;
}

View File

@@ -0,0 +1,32 @@
/**
* Generated by orval v7.17.0 🍺
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
import type { StateE15Enum } from "./stateE15Enum";
import type { ZasilkovnaPacketReadReturnRouting } from "./zasilkovnaPacketReadReturnRouting";
export interface ZasilkovnaPacketRead {
readonly id: number;
readonly created_at: Date;
/**
* Číslo zásilky v Packetě (vraceno od API od Packety)
* @minimum -9223372036854776000
* @maximum 9223372036854776000
* @nullable
*/
packet_id?: number | null;
/**
* Čárový kód zásilky od Packety
* @nullable
*/
readonly barcode: string | null;
readonly state: StateE15Enum;
/** Hmotnost zásilky v gramech */
readonly weight: number;
/**
* Seznam 2 routing stringů pro vrácení zásilky
* @nullable
*/
readonly return_routing: ZasilkovnaPacketReadReturnRouting;
}

View File

@@ -0,0 +1,11 @@
/**
* Generated by orval v7.17.0 🍺
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
/**
* Seznam 2 routing stringů pro vrácení zásilky
* @nullable
*/
export type ZasilkovnaPacketReadReturnRouting = unknown | null;

View File

@@ -0,0 +1,11 @@
/**
* Generated by orval v7.17.0 🍺
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
/**
* Seznam 2 routing stringů pro vrácení zásilky
* @nullable
*/
export type ZasilkovnaPacketReturnRouting = unknown | null;

View File

@@ -0,0 +1,15 @@
/**
* Generated by orval v7.17.0 🍺
* Do not edit manually.
* OpenAPI spec version: 0.0.0
*/
export interface ZasilkovnaShipment {
readonly id: number;
readonly created_at: Date;
/** ID zásilky v Packetě */
readonly shipment_id: string;
/** Čárový kód zásilky v Packetě (format: ) */
readonly barcode: string;
packets: number[];
}