diff --git a/backend/thirdparty/downloader/views.py b/backend/thirdparty/downloader/views.py
index f99351d..b2ed952 100644
--- a/backend/thirdparty/downloader/views.py
+++ b/backend/thirdparty/downloader/views.py
@@ -50,11 +50,28 @@ class Downloader(APIView):
@extend_schema(
tags=["downloader", "public"],
summary="Get video info from URL",
+ description="""
+ Fetch detailed information about a video from supported platforms.
+
+ **Supported platforms:** YouTube, TikTok, Vimeo, Twitter, Instagram, Facebook, Reddit, and many more.
+
+ **Returns:**
+ - Video title, duration, and thumbnail
+ - Available video qualities/resolutions
+ - Available audio formats
+
+ **Usage:**
+ ```
+ GET /api/downloader/download/?url=https://youtube.com/watch?v=VIDEO_ID
+ ```
+ """,
parameters=[
inline_serializer(
name="VideoInfoParams",
fields={
- "url": serializers.URLField(help_text="Video URL to analyze"),
+ "url": serializers.URLField(
+ help_text="Video URL from YouTube, TikTok, Vimeo, etc. Must be a valid URL from a supported platform."
+ ),
},
)
],
@@ -62,16 +79,22 @@ class Downloader(APIView):
200: inline_serializer(
name="VideoInfoResponse",
fields={
- "title": serializers.CharField(),
- "duration": serializers.IntegerField(allow_null=True),
- "thumbnail": serializers.URLField(allow_null=True),
- "video_resolutions": serializers.ListField(child=serializers.CharField()),
- "audio_resolutions": serializers.ListField(child=serializers.CharField()),
+ "title": serializers.CharField(help_text="Video title"),
+ "duration": serializers.IntegerField(allow_null=True, help_text="Video duration in seconds (null if unavailable)"),
+ "thumbnail": serializers.URLField(allow_null=True, help_text="URL to video thumbnail image"),
+ "video_resolutions": serializers.ListField(
+ child=serializers.CharField(),
+ help_text="List of available video quality options (e.g., '1080p', '720p', '480p')"
+ ),
+ "audio_resolutions": serializers.ListField(
+ child=serializers.CharField(),
+ help_text="List of available audio format options"
+ ),
},
),
400: inline_serializer(
name="ErrorResponse",
- fields={"error": serializers.CharField()},
+ fields={"error": serializers.CharField(help_text="Error message describing what went wrong")},
),
},
)
diff --git a/frontend/Dockerfile.prod b/frontend/Dockerfile.prod
index 90cdedf..feba5c3 100644
--- a/frontend/Dockerfile.prod
+++ b/frontend/Dockerfile.prod
@@ -6,6 +6,8 @@ COPY package*.json ./
RUN npm ci || npm install
COPY . .
ENV NODE_ENV=production
+# Skip Orval - use pre-generated files committed to git
+ENV SKIP_ORVAL=true
RUN npm run build
# Step 2: Nginx runtime
diff --git a/frontend/src/api/README.md b/frontend/src/api/README.md
new file mode 100644
index 0000000..c5d5dc2
--- /dev/null
+++ b/frontend/src/api/README.md
@@ -0,0 +1,105 @@
+# API Documentation
+
+## Quick Start
+
+All API hooks are available from `@/api`:
+
+```typescript
+import { useApiCommerceOrdersList, OrderRead } from '@/api';
+```
+
+## Navigation Tips
+
+### Finding Hooks
+
+**Pattern**: `useApi[Tag][Path][Method]`
+
+| What you want | Hook name |
+|---------------|-----------|
+| List orders | `useApiCommerceOrdersList` |
+| Get order by ID | `useApiCommerceOrdersRetrieve` |
+| Create order | `useApiCommerceOrdersCreate` |
+| Update order | `useApiCommerceOrdersPartialUpdate` |
+| Delete order | `useApiCommerceOrdersDestroy` |
+
+### VS Code Shortcuts
+
+- `Ctrl/Cmd + P` → Quick file search (type "commerce")
+- `Ctrl/Cmd + Shift + O` → Symbol search (type "useApi")
+- `F12` → Go to definition
+- `Shift + F12` → Find all usages
+
+## Common Patterns
+
+### Query (GET)
+```typescript
+const { data, isLoading, error } = useApiCommerceOrdersList({
+ page: 1,
+ limit: 10,
+});
+```
+
+### Mutation (POST/PUT/PATCH/DELETE)
+```typescript
+const mutation = useApiCommerceOrdersCreate({
+ mutation: {
+ onSuccess: (data) => console.log('Created!', data),
+ onError: (error) => console.error('Failed:', error),
+ }
+});
+
+mutation.mutate({ data: orderData });
+```
+
+### With Infinite Scroll
+```typescript
+const {
+ data,
+ fetchNextPage,
+ hasNextPage
+} = useApiCommerceOrdersListInfinite({
+ limit: 20,
+});
+```
+
+## File Organization
+
+```
+api/
+├── index.ts ← Import everything from here
+├── publicClient.ts ← Public API client (no auth)
+├── privateClient.ts ← Private API client (with auth)
+└── generated/
+ ├── public/ ← Public endpoints
+ │ ├── public.ts
+ │ └── models/
+ └── private/ ← Private endpoints (organized by tag)
+ ├── account/account.ts
+ ├── commerce/commerce.ts
+ ├── downloader/downloader.ts
+ ├── gopay/gopay.ts
+ ├── stripe/stripe.ts
+ ├── trading212/trading212.ts
+ ├── zasilkovna/zasilkovna.ts
+ ├── core/core.ts
+ └── models/ ← Shared TypeScript types
+```
+
+## Tips
+
+1. **Use TypeScript autocomplete**: Type `useApi` and let IntelliSense show you options
+2. **Hover for docs**: Hover over any hook to see endpoint details
+3. **Check models folder**: All response types are in `models/`
+4. **Use React Query DevTools**: Add `` to see cache state
+
+## Regenerating
+
+```bash
+npm run api:gen
+```
+
+This will:
+1. Fetch OpenAPI schema from backend
+2. Generate TypeScript hooks
+3. Format with Prettier
+4. Update all types
diff --git a/frontend/src/api/generated/private/api/api.ts b/frontend/src/api/generated/private/api/api.ts
new file mode 100644
index 0000000..031645a
--- /dev/null
+++ b/frontend/src/api/generated/private/api/api.ts
@@ -0,0 +1,5186 @@
+/**
+ * Generated by orval v7.17.0 🍺
+ * Do not edit manually.
+ * OpenAPI spec version: 0.0.0
+ */
+import { useInfiniteQuery, useMutation, useQuery } from "@tanstack/react-query";
+import type {
+ DataTag,
+ DefinedInitialDataOptions,
+ DefinedUseInfiniteQueryResult,
+ DefinedUseQueryResult,
+ InfiniteData,
+ MutationFunction,
+ QueryClient,
+ QueryFunction,
+ QueryKey,
+ UndefinedInitialDataOptions,
+ UseInfiniteQueryOptions,
+ UseInfiniteQueryResult,
+ UseMutationOptions,
+ UseMutationResult,
+ UseQueryOptions,
+ UseQueryResult,
+} from "@tanstack/react-query";
+
+import type {
+ ApiAdvertisementContactMessagesListParams,
+ ApiConfigurationAdminShopConfigurationListParams,
+ ApiConfigurationPublicShopConfigurationListParams,
+ ApiSchemaRetrieve200Four,
+ ApiSchemaRetrieve200One,
+ ApiSchemaRetrieve200Three,
+ ApiSchemaRetrieve200Two,
+ ApiSchemaRetrieveParams,
+ ContactMe,
+ OrderMini,
+ OrderRead,
+ PaginatedContactMeList,
+ PaginatedSiteConfigurationAdminList,
+ PaginatedSiteConfigurationPublicList,
+ PatchedContactMe,
+ PatchedOrderRead,
+ PatchedSiteConfigurationAdmin,
+ SiteConfigurationAdmin,
+ SiteConfigurationPublic,
+} from ".././models";
+
+import { privateMutator } from "../../../privateClient";
+
+// https://stackoverflow.com/questions/49579094/typescript-conditional-types-filter-out-readonly-properties-pick-only-requir/49579497#49579497
+type IfEquals =
+ (() => T extends X ? 1 : 2) extends () => T extends Y ? 1 : 2 ? A : B;
+
+type WritableKeys = {
+ [P in keyof T]-?: IfEquals<
+ { [Q in P]: T[P] },
+ { -readonly [Q in P]: T[P] },
+ P
+ >;
+}[keyof T];
+
+type UnionToIntersection = (U extends any ? (k: U) => void : never) extends (
+ k: infer I,
+) => void
+ ? I
+ : never;
+type DistributeReadOnlyOverUnions = T extends any ? NonReadonly : never;
+
+type Writable = Pick>;
+type NonReadonly = [T] extends [UnionToIntersection]
+ ? {
+ [P in keyof Writable]: T[P] extends object
+ ? NonReadonly>
+ : T[P];
+ }
+ : DistributeReadOnlyOverUnions;
+
+export const apiAdvertisementContactMeCreate = (signal?: AbortSignal) => {
+ return privateMutator({
+ url: `/api/advertisement/contact-me/`,
+ method: "POST",
+ signal,
+ });
+};
+
+export const getApiAdvertisementContactMeCreateMutationOptions = <
+ TError = unknown,
+ TContext = unknown,
+>(options?: {
+ mutation?: UseMutationOptions<
+ Awaited>,
+ TError,
+ void,
+ TContext
+ >;
+}): UseMutationOptions<
+ Awaited>,
+ TError,
+ void,
+ TContext
+> => {
+ const mutationKey = ["apiAdvertisementContactMeCreate"];
+ 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>,
+ void
+ > = () => {
+ return apiAdvertisementContactMeCreate();
+ };
+
+ return { mutationFn, ...mutationOptions };
+};
+
+export type ApiAdvertisementContactMeCreateMutationResult = NonNullable<
+ Awaited>
+>;
+
+export type ApiAdvertisementContactMeCreateMutationError = unknown;
+
+export const useApiAdvertisementContactMeCreate = <
+ TError = unknown,
+ TContext = unknown,
+>(
+ options?: {
+ mutation?: UseMutationOptions<
+ Awaited>,
+ TError,
+ void,
+ TContext
+ >;
+ },
+ queryClient?: QueryClient,
+): UseMutationResult<
+ Awaited>,
+ TError,
+ void,
+ TContext
+> => {
+ const mutationOptions =
+ getApiAdvertisementContactMeCreateMutationOptions(options);
+
+ return useMutation(mutationOptions, queryClient);
+};
+export const apiAdvertisementContactMessagesList = (
+ params?: ApiAdvertisementContactMessagesListParams,
+ signal?: AbortSignal,
+) => {
+ return privateMutator({
+ url: `/api/advertisement/contact-messages/`,
+ method: "GET",
+ params,
+ signal,
+ });
+};
+
+export const getApiAdvertisementContactMessagesListInfiniteQueryKey = (
+ params?: ApiAdvertisementContactMessagesListParams,
+) => {
+ return [
+ "infinite",
+ `/api/advertisement/contact-messages/`,
+ ...(params ? [params] : []),
+ ] as const;
+};
+
+export const getApiAdvertisementContactMessagesListQueryKey = (
+ params?: ApiAdvertisementContactMessagesListParams,
+) => {
+ return [
+ `/api/advertisement/contact-messages/`,
+ ...(params ? [params] : []),
+ ] as const;
+};
+
+export const getApiAdvertisementContactMessagesListInfiniteQueryOptions = <
+ TData = InfiniteData<
+ Awaited>,
+ ApiAdvertisementContactMessagesListParams["page"]
+ >,
+ TError = unknown,
+>(
+ params?: ApiAdvertisementContactMessagesListParams,
+ options?: {
+ query?: Partial<
+ UseInfiniteQueryOptions<
+ Awaited>,
+ TError,
+ TData,
+ QueryKey,
+ ApiAdvertisementContactMessagesListParams["page"]
+ >
+ >;
+ },
+) => {
+ const { query: queryOptions } = options ?? {};
+
+ const queryKey =
+ queryOptions?.queryKey ??
+ getApiAdvertisementContactMessagesListInfiniteQueryKey(params);
+
+ const queryFn: QueryFunction<
+ Awaited>,
+ QueryKey,
+ ApiAdvertisementContactMessagesListParams["page"]
+ > = ({ signal, pageParam }) =>
+ apiAdvertisementContactMessagesList(
+ { ...params, page: pageParam || params?.["page"] },
+ signal,
+ );
+
+ return { queryKey, queryFn, ...queryOptions } as UseInfiniteQueryOptions<
+ Awaited>,
+ TError,
+ TData,
+ QueryKey,
+ ApiAdvertisementContactMessagesListParams["page"]
+ > & { queryKey: DataTag };
+};
+
+export type ApiAdvertisementContactMessagesListInfiniteQueryResult =
+ NonNullable>>;
+export type ApiAdvertisementContactMessagesListInfiniteQueryError = unknown;
+
+export function useApiAdvertisementContactMessagesListInfinite<
+ TData = InfiniteData<
+ Awaited>,
+ ApiAdvertisementContactMessagesListParams["page"]
+ >,
+ TError = unknown,
+>(
+ params: undefined | ApiAdvertisementContactMessagesListParams,
+ options: {
+ query: Partial<
+ UseInfiniteQueryOptions<
+ Awaited>,
+ TError,
+ TData,
+ QueryKey,
+ ApiAdvertisementContactMessagesListParams["page"]
+ >
+ > &
+ Pick<
+ DefinedInitialDataOptions<
+ Awaited>,
+ TError,
+ Awaited>,
+ QueryKey
+ >,
+ "initialData"
+ >;
+ },
+ queryClient?: QueryClient,
+): DefinedUseInfiniteQueryResult & {
+ queryKey: DataTag;
+};
+export function useApiAdvertisementContactMessagesListInfinite<
+ TData = InfiniteData<
+ Awaited>,
+ ApiAdvertisementContactMessagesListParams["page"]
+ >,
+ TError = unknown,
+>(
+ params?: ApiAdvertisementContactMessagesListParams,
+ options?: {
+ query?: Partial<
+ UseInfiniteQueryOptions<
+ Awaited>,
+ TError,
+ TData,
+ QueryKey,
+ ApiAdvertisementContactMessagesListParams["page"]
+ >
+ > &
+ Pick<
+ UndefinedInitialDataOptions<
+ Awaited>,
+ TError,
+ Awaited>,
+ QueryKey
+ >,
+ "initialData"
+ >;
+ },
+ queryClient?: QueryClient,
+): UseInfiniteQueryResult & {
+ queryKey: DataTag;
+};
+export function useApiAdvertisementContactMessagesListInfinite<
+ TData = InfiniteData<
+ Awaited>,
+ ApiAdvertisementContactMessagesListParams["page"]
+ >,
+ TError = unknown,
+>(
+ params?: ApiAdvertisementContactMessagesListParams,
+ options?: {
+ query?: Partial<
+ UseInfiniteQueryOptions<
+ Awaited>,
+ TError,
+ TData,
+ QueryKey,
+ ApiAdvertisementContactMessagesListParams["page"]
+ >
+ >;
+ },
+ queryClient?: QueryClient,
+): UseInfiniteQueryResult & {
+ queryKey: DataTag;
+};
+
+export function useApiAdvertisementContactMessagesListInfinite<
+ TData = InfiniteData<
+ Awaited>,
+ ApiAdvertisementContactMessagesListParams["page"]
+ >,
+ TError = unknown,
+>(
+ params?: ApiAdvertisementContactMessagesListParams,
+ options?: {
+ query?: Partial<
+ UseInfiniteQueryOptions<
+ Awaited>,
+ TError,
+ TData,
+ QueryKey,
+ ApiAdvertisementContactMessagesListParams["page"]
+ >
+ >;
+ },
+ queryClient?: QueryClient,
+): UseInfiniteQueryResult & {
+ queryKey: DataTag;
+} {
+ const queryOptions =
+ getApiAdvertisementContactMessagesListInfiniteQueryOptions(params, options);
+
+ const query = useInfiniteQuery(
+ queryOptions,
+ queryClient,
+ ) as UseInfiniteQueryResult & {
+ queryKey: DataTag;
+ };
+
+ query.queryKey = queryOptions.queryKey;
+
+ return query;
+}
+
+export const getApiAdvertisementContactMessagesListQueryOptions = <
+ TData = Awaited>,
+ TError = unknown,
+>(
+ params?: ApiAdvertisementContactMessagesListParams,
+ options?: {
+ query?: Partial<
+ UseQueryOptions<
+ Awaited>,
+ TError,
+ TData
+ >
+ >;
+ },
+) => {
+ const { query: queryOptions } = options ?? {};
+
+ const queryKey =
+ queryOptions?.queryKey ??
+ getApiAdvertisementContactMessagesListQueryKey(params);
+
+ const queryFn: QueryFunction<
+ Awaited>
+ > = ({ signal }) => apiAdvertisementContactMessagesList(params, signal);
+
+ return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<
+ Awaited>,
+ TError,
+ TData
+ > & { queryKey: DataTag };
+};
+
+export type ApiAdvertisementContactMessagesListQueryResult = NonNullable<
+ Awaited>
+>;
+export type ApiAdvertisementContactMessagesListQueryError = unknown;
+
+export function useApiAdvertisementContactMessagesList<
+ TData = Awaited>,
+ TError = unknown,
+>(
+ params: undefined | ApiAdvertisementContactMessagesListParams,
+ options: {
+ query: Partial<
+ UseQueryOptions<
+ Awaited>,
+ TError,
+ TData
+ >
+ > &
+ Pick<
+ DefinedInitialDataOptions<
+ Awaited>,
+ TError,
+ Awaited>
+ >,
+ "initialData"
+ >;
+ },
+ queryClient?: QueryClient,
+): DefinedUseQueryResult & {
+ queryKey: DataTag;
+};
+export function useApiAdvertisementContactMessagesList<
+ TData = Awaited>,
+ TError = unknown,
+>(
+ params?: ApiAdvertisementContactMessagesListParams,
+ options?: {
+ query?: Partial<
+ UseQueryOptions<
+ Awaited>,
+ TError,
+ TData
+ >
+ > &
+ Pick<
+ UndefinedInitialDataOptions<
+ Awaited>,
+ TError,
+ Awaited>
+ >,
+ "initialData"
+ >;
+ },
+ queryClient?: QueryClient,
+): UseQueryResult & {
+ queryKey: DataTag;
+};
+export function useApiAdvertisementContactMessagesList<
+ TData = Awaited>,
+ TError = unknown,
+>(
+ params?: ApiAdvertisementContactMessagesListParams,
+ options?: {
+ query?: Partial<
+ UseQueryOptions<
+ Awaited>,
+ TError,
+ TData
+ >
+ >;
+ },
+ queryClient?: QueryClient,
+): UseQueryResult & {
+ queryKey: DataTag;
+};
+
+export function useApiAdvertisementContactMessagesList<
+ TData = Awaited>,
+ TError = unknown,
+>(
+ params?: ApiAdvertisementContactMessagesListParams,
+ options?: {
+ query?: Partial<
+ UseQueryOptions<
+ Awaited>,
+ TError,
+ TData
+ >
+ >;
+ },
+ queryClient?: QueryClient,
+): UseQueryResult & {
+ queryKey: DataTag;
+} {
+ const queryOptions = getApiAdvertisementContactMessagesListQueryOptions(
+ params,
+ options,
+ );
+
+ const query = useQuery(queryOptions, queryClient) as UseQueryResult<
+ TData,
+ TError
+ > & { queryKey: DataTag };
+
+ query.queryKey = queryOptions.queryKey;
+
+ return query;
+}
+
+export const apiAdvertisementContactMessagesCreate = (
+ contactMe: NonReadonly,
+ signal?: AbortSignal,
+) => {
+ return privateMutator({
+ url: `/api/advertisement/contact-messages/`,
+ method: "POST",
+ headers: { "Content-Type": "application/json" },
+ data: contactMe,
+ signal,
+ });
+};
+
+export const getApiAdvertisementContactMessagesCreateMutationOptions = <
+ TError = unknown,
+ TContext = unknown,
+>(options?: {
+ mutation?: UseMutationOptions<
+ Awaited>,
+ TError,
+ { data: NonReadonly },
+ TContext
+ >;
+}): UseMutationOptions<
+ Awaited>,
+ TError,
+ { data: NonReadonly },
+ TContext
+> => {
+ const mutationKey = ["apiAdvertisementContactMessagesCreate"];
+ 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>,
+ { data: NonReadonly }
+ > = (props) => {
+ const { data } = props ?? {};
+
+ return apiAdvertisementContactMessagesCreate(data);
+ };
+
+ return { mutationFn, ...mutationOptions };
+};
+
+export type ApiAdvertisementContactMessagesCreateMutationResult = NonNullable<
+ Awaited>
+>;
+export type ApiAdvertisementContactMessagesCreateMutationBody =
+ NonReadonly;
+export type ApiAdvertisementContactMessagesCreateMutationError = unknown;
+
+export const useApiAdvertisementContactMessagesCreate = <
+ TError = unknown,
+ TContext = unknown,
+>(
+ options?: {
+ mutation?: UseMutationOptions<
+ Awaited>,
+ TError,
+ { data: NonReadonly },
+ TContext
+ >;
+ },
+ queryClient?: QueryClient,
+): UseMutationResult<
+ Awaited>,
+ TError,
+ { data: NonReadonly },
+ TContext
+> => {
+ const mutationOptions =
+ getApiAdvertisementContactMessagesCreateMutationOptions(options);
+
+ return useMutation(mutationOptions, queryClient);
+};
+export const apiAdvertisementContactMessagesRetrieve = (
+ id: number,
+ signal?: AbortSignal,
+) => {
+ return privateMutator({
+ url: `/api/advertisement/contact-messages/${id}/`,
+ method: "GET",
+ signal,
+ });
+};
+
+export const getApiAdvertisementContactMessagesRetrieveInfiniteQueryKey = (
+ id?: number,
+) => {
+ return ["infinite", `/api/advertisement/contact-messages/${id}/`] as const;
+};
+
+export const getApiAdvertisementContactMessagesRetrieveQueryKey = (
+ id?: number,
+) => {
+ return [`/api/advertisement/contact-messages/${id}/`] as const;
+};
+
+export const getApiAdvertisementContactMessagesRetrieveInfiniteQueryOptions = <
+ TData = InfiniteData<
+ Awaited>
+ >,
+ TError = unknown,
+>(
+ id: number,
+ options?: {
+ query?: Partial<
+ UseInfiniteQueryOptions<
+ Awaited>,
+ TError,
+ TData
+ >
+ >;
+ },
+) => {
+ const { query: queryOptions } = options ?? {};
+
+ const queryKey =
+ queryOptions?.queryKey ??
+ getApiAdvertisementContactMessagesRetrieveInfiniteQueryKey(id);
+
+ const queryFn: QueryFunction<
+ Awaited>
+ > = ({ signal }) => apiAdvertisementContactMessagesRetrieve(id, signal);
+
+ return {
+ queryKey,
+ queryFn,
+ enabled: !!id,
+ ...queryOptions,
+ } as UseInfiniteQueryOptions<
+ Awaited>,
+ TError,
+ TData
+ > & { queryKey: DataTag };
+};
+
+export type ApiAdvertisementContactMessagesRetrieveInfiniteQueryResult =
+ NonNullable<
+ Awaited>
+ >;
+export type ApiAdvertisementContactMessagesRetrieveInfiniteQueryError = unknown;
+
+export function useApiAdvertisementContactMessagesRetrieveInfinite<
+ TData = InfiniteData<
+ Awaited>
+ >,
+ TError = unknown,
+>(
+ id: number,
+ options: {
+ query: Partial<
+ UseInfiniteQueryOptions<
+ Awaited>,
+ TError,
+ TData
+ >
+ > &
+ Pick<
+ DefinedInitialDataOptions<
+ Awaited>,
+ TError,
+ Awaited>
+ >,
+ "initialData"
+ >;
+ },
+ queryClient?: QueryClient,
+): DefinedUseInfiniteQueryResult & {
+ queryKey: DataTag;
+};
+export function useApiAdvertisementContactMessagesRetrieveInfinite<
+ TData = InfiniteData<
+ Awaited>
+ >,
+ TError = unknown,
+>(
+ id: number,
+ options?: {
+ query?: Partial<
+ UseInfiniteQueryOptions<
+ Awaited>,
+ TError,
+ TData
+ >
+ > &
+ Pick<
+ UndefinedInitialDataOptions<
+ Awaited>,
+ TError,
+ Awaited>
+ >,
+ "initialData"
+ >;
+ },
+ queryClient?: QueryClient,
+): UseInfiniteQueryResult & {
+ queryKey: DataTag;
+};
+export function useApiAdvertisementContactMessagesRetrieveInfinite<
+ TData = InfiniteData<
+ Awaited>
+ >,
+ TError = unknown,
+>(
+ id: number,
+ options?: {
+ query?: Partial<
+ UseInfiniteQueryOptions<
+ Awaited>,
+ TError,
+ TData
+ >
+ >;
+ },
+ queryClient?: QueryClient,
+): UseInfiniteQueryResult & {
+ queryKey: DataTag;
+};
+
+export function useApiAdvertisementContactMessagesRetrieveInfinite<
+ TData = InfiniteData<
+ Awaited>
+ >,
+ TError = unknown,
+>(
+ id: number,
+ options?: {
+ query?: Partial<
+ UseInfiniteQueryOptions<
+ Awaited>,
+ TError,
+ TData
+ >
+ >;
+ },
+ queryClient?: QueryClient,
+): UseInfiniteQueryResult & {
+ queryKey: DataTag;
+} {
+ const queryOptions =
+ getApiAdvertisementContactMessagesRetrieveInfiniteQueryOptions(id, options);
+
+ const query = useInfiniteQuery(
+ queryOptions,
+ queryClient,
+ ) as UseInfiniteQueryResult & {
+ queryKey: DataTag;
+ };
+
+ query.queryKey = queryOptions.queryKey;
+
+ return query;
+}
+
+export const getApiAdvertisementContactMessagesRetrieveQueryOptions = <
+ TData = Awaited>,
+ TError = unknown,
+>(
+ id: number,
+ options?: {
+ query?: Partial<
+ UseQueryOptions<
+ Awaited>,
+ TError,
+ TData
+ >
+ >;
+ },
+) => {
+ const { query: queryOptions } = options ?? {};
+
+ const queryKey =
+ queryOptions?.queryKey ??
+ getApiAdvertisementContactMessagesRetrieveQueryKey(id);
+
+ const queryFn: QueryFunction<
+ Awaited>
+ > = ({ signal }) => apiAdvertisementContactMessagesRetrieve(id, signal);
+
+ return {
+ queryKey,
+ queryFn,
+ enabled: !!id,
+ ...queryOptions,
+ } as UseQueryOptions<
+ Awaited>,
+ TError,
+ TData
+ > & { queryKey: DataTag };
+};
+
+export type ApiAdvertisementContactMessagesRetrieveQueryResult = NonNullable<
+ Awaited>
+>;
+export type ApiAdvertisementContactMessagesRetrieveQueryError = unknown;
+
+export function useApiAdvertisementContactMessagesRetrieve<
+ TData = Awaited>,
+ TError = unknown,
+>(
+ id: number,
+ options: {
+ query: Partial<
+ UseQueryOptions<
+ Awaited>,
+ TError,
+ TData
+ >
+ > &
+ Pick<
+ DefinedInitialDataOptions<
+ Awaited>,
+ TError,
+ Awaited>
+ >,
+ "initialData"
+ >;
+ },
+ queryClient?: QueryClient,
+): DefinedUseQueryResult & {
+ queryKey: DataTag;
+};
+export function useApiAdvertisementContactMessagesRetrieve<
+ TData = Awaited>,
+ TError = unknown,
+>(
+ id: number,
+ options?: {
+ query?: Partial<
+ UseQueryOptions<
+ Awaited>,
+ TError,
+ TData
+ >
+ > &
+ Pick<
+ UndefinedInitialDataOptions<
+ Awaited>,
+ TError,
+ Awaited>
+ >,
+ "initialData"
+ >;
+ },
+ queryClient?: QueryClient,
+): UseQueryResult & {
+ queryKey: DataTag;
+};
+export function useApiAdvertisementContactMessagesRetrieve<
+ TData = Awaited>,
+ TError = unknown,
+>(
+ id: number,
+ options?: {
+ query?: Partial<
+ UseQueryOptions<
+ Awaited>,
+ TError,
+ TData
+ >
+ >;
+ },
+ queryClient?: QueryClient,
+): UseQueryResult & {
+ queryKey: DataTag;
+};
+
+export function useApiAdvertisementContactMessagesRetrieve<
+ TData = Awaited>,
+ TError = unknown,
+>(
+ id: number,
+ options?: {
+ query?: Partial<
+ UseQueryOptions<
+ Awaited>,
+ TError,
+ TData
+ >
+ >;
+ },
+ queryClient?: QueryClient,
+): UseQueryResult & {
+ queryKey: DataTag;
+} {
+ const queryOptions = getApiAdvertisementContactMessagesRetrieveQueryOptions(
+ id,
+ options,
+ );
+
+ const query = useQuery(queryOptions, queryClient) as UseQueryResult<
+ TData,
+ TError
+ > & { queryKey: DataTag };
+
+ query.queryKey = queryOptions.queryKey;
+
+ return query;
+}
+
+export const apiAdvertisementContactMessagesUpdate = (
+ id: number,
+ contactMe: NonReadonly,
+) => {
+ return privateMutator({
+ url: `/api/advertisement/contact-messages/${id}/`,
+ method: "PUT",
+ headers: { "Content-Type": "application/json" },
+ data: contactMe,
+ });
+};
+
+export const getApiAdvertisementContactMessagesUpdateMutationOptions = <
+ TError = unknown,
+ TContext = unknown,
+>(options?: {
+ mutation?: UseMutationOptions<
+ Awaited>,
+ TError,
+ { id: number; data: NonReadonly },
+ TContext
+ >;
+}): UseMutationOptions<
+ Awaited>,
+ TError,
+ { id: number; data: NonReadonly },
+ TContext
+> => {
+ const mutationKey = ["apiAdvertisementContactMessagesUpdate"];
+ 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>,
+ { id: number; data: NonReadonly }
+ > = (props) => {
+ const { id, data } = props ?? {};
+
+ return apiAdvertisementContactMessagesUpdate(id, data);
+ };
+
+ return { mutationFn, ...mutationOptions };
+};
+
+export type ApiAdvertisementContactMessagesUpdateMutationResult = NonNullable<
+ Awaited>
+>;
+export type ApiAdvertisementContactMessagesUpdateMutationBody =
+ NonReadonly;
+export type ApiAdvertisementContactMessagesUpdateMutationError = unknown;
+
+export const useApiAdvertisementContactMessagesUpdate = <
+ TError = unknown,
+ TContext = unknown,
+>(
+ options?: {
+ mutation?: UseMutationOptions<
+ Awaited>,
+ TError,
+ { id: number; data: NonReadonly },
+ TContext
+ >;
+ },
+ queryClient?: QueryClient,
+): UseMutationResult<
+ Awaited>,
+ TError,
+ { id: number; data: NonReadonly },
+ TContext
+> => {
+ const mutationOptions =
+ getApiAdvertisementContactMessagesUpdateMutationOptions(options);
+
+ return useMutation(mutationOptions, queryClient);
+};
+export const apiAdvertisementContactMessagesPartialUpdate = (
+ id: number,
+ patchedContactMe: NonReadonly,
+) => {
+ return privateMutator({
+ url: `/api/advertisement/contact-messages/${id}/`,
+ method: "PATCH",
+ headers: { "Content-Type": "application/json" },
+ data: patchedContactMe,
+ });
+};
+
+export const getApiAdvertisementContactMessagesPartialUpdateMutationOptions = <
+ TError = unknown,
+ TContext = unknown,
+>(options?: {
+ mutation?: UseMutationOptions<
+ Awaited>,
+ TError,
+ { id: number; data: NonReadonly },
+ TContext
+ >;
+}): UseMutationOptions<
+ Awaited>,
+ TError,
+ { id: number; data: NonReadonly },
+ TContext
+> => {
+ const mutationKey = ["apiAdvertisementContactMessagesPartialUpdate"];
+ 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>,
+ { id: number; data: NonReadonly }
+ > = (props) => {
+ const { id, data } = props ?? {};
+
+ return apiAdvertisementContactMessagesPartialUpdate(id, data);
+ };
+
+ return { mutationFn, ...mutationOptions };
+};
+
+export type ApiAdvertisementContactMessagesPartialUpdateMutationResult =
+ NonNullable<
+ Awaited>
+ >;
+export type ApiAdvertisementContactMessagesPartialUpdateMutationBody =
+ NonReadonly;
+export type ApiAdvertisementContactMessagesPartialUpdateMutationError = unknown;
+
+export const useApiAdvertisementContactMessagesPartialUpdate = <
+ TError = unknown,
+ TContext = unknown,
+>(
+ options?: {
+ mutation?: UseMutationOptions<
+ Awaited>,
+ TError,
+ { id: number; data: NonReadonly },
+ TContext
+ >;
+ },
+ queryClient?: QueryClient,
+): UseMutationResult<
+ Awaited>,
+ TError,
+ { id: number; data: NonReadonly },
+ TContext
+> => {
+ const mutationOptions =
+ getApiAdvertisementContactMessagesPartialUpdateMutationOptions(options);
+
+ return useMutation(mutationOptions, queryClient);
+};
+export const apiAdvertisementContactMessagesDestroy = (id: number) => {
+ return privateMutator({
+ url: `/api/advertisement/contact-messages/${id}/`,
+ method: "DELETE",
+ });
+};
+
+export const getApiAdvertisementContactMessagesDestroyMutationOptions = <
+ TError = unknown,
+ TContext = unknown,
+>(options?: {
+ mutation?: UseMutationOptions<
+ Awaited>,
+ TError,
+ { id: number },
+ TContext
+ >;
+}): UseMutationOptions<
+ Awaited>,
+ TError,
+ { id: number },
+ TContext
+> => {
+ const mutationKey = ["apiAdvertisementContactMessagesDestroy"];
+ 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>,
+ { id: number }
+ > = (props) => {
+ const { id } = props ?? {};
+
+ return apiAdvertisementContactMessagesDestroy(id);
+ };
+
+ return { mutationFn, ...mutationOptions };
+};
+
+export type ApiAdvertisementContactMessagesDestroyMutationResult = NonNullable<
+ Awaited>
+>;
+
+export type ApiAdvertisementContactMessagesDestroyMutationError = unknown;
+
+export const useApiAdvertisementContactMessagesDestroy = <
+ TError = unknown,
+ TContext = unknown,
+>(
+ options?: {
+ mutation?: UseMutationOptions<
+ Awaited>,
+ TError,
+ { id: number },
+ TContext
+ >;
+ },
+ queryClient?: QueryClient,
+): UseMutationResult<
+ Awaited>,
+ TError,
+ { id: number },
+ TContext
+> => {
+ const mutationOptions =
+ getApiAdvertisementContactMessagesDestroyMutationOptions(options);
+
+ return useMutation(mutationOptions, queryClient);
+};
+export const apiCommerceOrdersCarrierRetrieve = (
+ id: number,
+ signal?: AbortSignal,
+) => {
+ return privateMutator({
+ url: `/api/commerce/orders/${id}/carrier/`,
+ method: "GET",
+ signal,
+ });
+};
+
+export const getApiCommerceOrdersCarrierRetrieveInfiniteQueryKey = (
+ id?: number,
+) => {
+ return ["infinite", `/api/commerce/orders/${id}/carrier/`] as const;
+};
+
+export const getApiCommerceOrdersCarrierRetrieveQueryKey = (id?: number) => {
+ return [`/api/commerce/orders/${id}/carrier/`] as const;
+};
+
+export const getApiCommerceOrdersCarrierRetrieveInfiniteQueryOptions = <
+ TData = InfiniteData<
+ Awaited>
+ >,
+ TError = unknown,
+>(
+ id: number,
+ options?: {
+ query?: Partial<
+ UseInfiniteQueryOptions<
+ Awaited>,
+ TError,
+ TData
+ >
+ >;
+ },
+) => {
+ const { query: queryOptions } = options ?? {};
+
+ const queryKey =
+ queryOptions?.queryKey ??
+ getApiCommerceOrdersCarrierRetrieveInfiniteQueryKey(id);
+
+ const queryFn: QueryFunction<
+ Awaited>
+ > = ({ signal }) => apiCommerceOrdersCarrierRetrieve(id, signal);
+
+ return {
+ queryKey,
+ queryFn,
+ enabled: !!id,
+ ...queryOptions,
+ } as UseInfiniteQueryOptions<
+ Awaited>,
+ TError,
+ TData
+ > & { queryKey: DataTag };
+};
+
+export type ApiCommerceOrdersCarrierRetrieveInfiniteQueryResult = NonNullable<
+ Awaited>
+>;
+export type ApiCommerceOrdersCarrierRetrieveInfiniteQueryError = unknown;
+
+export function useApiCommerceOrdersCarrierRetrieveInfinite<
+ TData = InfiniteData<
+ Awaited>
+ >,
+ TError = unknown,
+>(
+ id: number,
+ options: {
+ query: Partial<
+ UseInfiniteQueryOptions<
+ Awaited>,
+ TError,
+ TData
+ >
+ > &
+ Pick<
+ DefinedInitialDataOptions<
+ Awaited>,
+ TError,
+ Awaited>
+ >,
+ "initialData"
+ >;
+ },
+ queryClient?: QueryClient,
+): DefinedUseInfiniteQueryResult & {
+ queryKey: DataTag;
+};
+export function useApiCommerceOrdersCarrierRetrieveInfinite<
+ TData = InfiniteData<
+ Awaited>
+ >,
+ TError = unknown,
+>(
+ id: number,
+ options?: {
+ query?: Partial<
+ UseInfiniteQueryOptions<
+ Awaited>,
+ TError,
+ TData
+ >
+ > &
+ Pick<
+ UndefinedInitialDataOptions<
+ Awaited>,
+ TError,
+ Awaited>
+ >,
+ "initialData"
+ >;
+ },
+ queryClient?: QueryClient,
+): UseInfiniteQueryResult & {
+ queryKey: DataTag;
+};
+export function useApiCommerceOrdersCarrierRetrieveInfinite<
+ TData = InfiniteData<
+ Awaited>
+ >,
+ TError = unknown,
+>(
+ id: number,
+ options?: {
+ query?: Partial<
+ UseInfiniteQueryOptions<
+ Awaited>,
+ TError,
+ TData
+ >
+ >;
+ },
+ queryClient?: QueryClient,
+): UseInfiniteQueryResult & {
+ queryKey: DataTag;
+};
+
+export function useApiCommerceOrdersCarrierRetrieveInfinite<
+ TData = InfiniteData<
+ Awaited>
+ >,
+ TError = unknown,
+>(
+ id: number,
+ options?: {
+ query?: Partial<
+ UseInfiniteQueryOptions<
+ Awaited>,
+ TError,
+ TData
+ >
+ >;
+ },
+ queryClient?: QueryClient,
+): UseInfiniteQueryResult & {
+ queryKey: DataTag;
+} {
+ const queryOptions = getApiCommerceOrdersCarrierRetrieveInfiniteQueryOptions(
+ id,
+ options,
+ );
+
+ const query = useInfiniteQuery(
+ queryOptions,
+ queryClient,
+ ) as UseInfiniteQueryResult & {
+ queryKey: DataTag;
+ };
+
+ query.queryKey = queryOptions.queryKey;
+
+ return query;
+}
+
+export const getApiCommerceOrdersCarrierRetrieveQueryOptions = <
+ TData = Awaited>,
+ TError = unknown,
+>(
+ id: number,
+ options?: {
+ query?: Partial<
+ UseQueryOptions<
+ Awaited>,
+ TError,
+ TData
+ >
+ >;
+ },
+) => {
+ const { query: queryOptions } = options ?? {};
+
+ const queryKey =
+ queryOptions?.queryKey ?? getApiCommerceOrdersCarrierRetrieveQueryKey(id);
+
+ const queryFn: QueryFunction<
+ Awaited>
+ > = ({ signal }) => apiCommerceOrdersCarrierRetrieve(id, signal);
+
+ return {
+ queryKey,
+ queryFn,
+ enabled: !!id,
+ ...queryOptions,
+ } as UseQueryOptions<
+ Awaited>,
+ TError,
+ TData
+ > & { queryKey: DataTag };
+};
+
+export type ApiCommerceOrdersCarrierRetrieveQueryResult = NonNullable<
+ Awaited>
+>;
+export type ApiCommerceOrdersCarrierRetrieveQueryError = unknown;
+
+export function useApiCommerceOrdersCarrierRetrieve<
+ TData = Awaited>,
+ TError = unknown,
+>(
+ id: number,
+ options: {
+ query: Partial<
+ UseQueryOptions<
+ Awaited>,
+ TError,
+ TData
+ >
+ > &
+ Pick<
+ DefinedInitialDataOptions<
+ Awaited>,
+ TError,
+ Awaited>
+ >,
+ "initialData"
+ >;
+ },
+ queryClient?: QueryClient,
+): DefinedUseQueryResult & {
+ queryKey: DataTag;
+};
+export function useApiCommerceOrdersCarrierRetrieve<
+ TData = Awaited>,
+ TError = unknown,
+>(
+ id: number,
+ options?: {
+ query?: Partial<
+ UseQueryOptions<
+ Awaited>,
+ TError,
+ TData
+ >
+ > &
+ Pick<
+ UndefinedInitialDataOptions<
+ Awaited>,
+ TError,
+ Awaited>
+ >,
+ "initialData"
+ >;
+ },
+ queryClient?: QueryClient,
+): UseQueryResult & {
+ queryKey: DataTag;
+};
+export function useApiCommerceOrdersCarrierRetrieve<
+ TData = Awaited>,
+ TError = unknown,
+>(
+ id: number,
+ options?: {
+ query?: Partial<
+ UseQueryOptions<
+ Awaited>,
+ TError,
+ TData
+ >
+ >;
+ },
+ queryClient?: QueryClient,
+): UseQueryResult & {
+ queryKey: DataTag;
+};
+
+export function useApiCommerceOrdersCarrierRetrieve<
+ TData = Awaited>,
+ TError = unknown,
+>(
+ id: number,
+ options?: {
+ query?: Partial<
+ UseQueryOptions<
+ Awaited>,
+ TError,
+ TData
+ >
+ >;
+ },
+ queryClient?: QueryClient,
+): UseQueryResult & {
+ queryKey: DataTag;
+} {
+ const queryOptions = getApiCommerceOrdersCarrierRetrieveQueryOptions(
+ id,
+ options,
+ );
+
+ const query = useQuery(queryOptions, queryClient) as UseQueryResult<
+ TData,
+ TError
+ > & { queryKey: DataTag };
+
+ query.queryKey = queryOptions.queryKey;
+
+ return query;
+}
+
+export const apiCommerceOrdersCarrierReadyToPickupPartialUpdate = (
+ id: number,
+ patchedOrderRead: NonReadonly,
+) => {
+ return privateMutator({
+ url: `/api/commerce/orders/${id}/carrier/ready-to-pickup/`,
+ method: "PATCH",
+ headers: { "Content-Type": "application/json" },
+ data: patchedOrderRead,
+ });
+};
+
+export const getApiCommerceOrdersCarrierReadyToPickupPartialUpdateMutationOptions =
+ (options?: {
+ mutation?: UseMutationOptions<
+ Awaited<
+ ReturnType
+ >,
+ TError,
+ { id: number; data: NonReadonly },
+ TContext
+ >;
+ }): UseMutationOptions<
+ Awaited<
+ ReturnType
+ >,
+ TError,
+ { id: number; data: NonReadonly },
+ TContext
+ > => {
+ const mutationKey = ["apiCommerceOrdersCarrierReadyToPickupPartialUpdate"];
+ 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
+ >,
+ { id: number; data: NonReadonly }
+ > = (props) => {
+ const { id, data } = props ?? {};
+
+ return apiCommerceOrdersCarrierReadyToPickupPartialUpdate(id, data);
+ };
+
+ return { mutationFn, ...mutationOptions };
+ };
+
+export type ApiCommerceOrdersCarrierReadyToPickupPartialUpdateMutationResult =
+ NonNullable<
+ Awaited<
+ ReturnType
+ >
+ >;
+export type ApiCommerceOrdersCarrierReadyToPickupPartialUpdateMutationBody =
+ NonReadonly;
+export type ApiCommerceOrdersCarrierReadyToPickupPartialUpdateMutationError =
+ unknown;
+
+export const useApiCommerceOrdersCarrierReadyToPickupPartialUpdate = <
+ TError = unknown,
+ TContext = unknown,
+>(
+ options?: {
+ mutation?: UseMutationOptions<
+ Awaited<
+ ReturnType
+ >,
+ TError,
+ { id: number; data: NonReadonly },
+ TContext
+ >;
+ },
+ queryClient?: QueryClient,
+): UseMutationResult<
+ Awaited<
+ ReturnType
+ >,
+ TError,
+ { id: number; data: NonReadonly },
+ TContext
+> => {
+ const mutationOptions =
+ getApiCommerceOrdersCarrierReadyToPickupPartialUpdateMutationOptions(
+ options,
+ );
+
+ return useMutation(mutationOptions, queryClient);
+};
+export const apiCommerceOrdersCarrierStartOrderingShippingPartialUpdate = (
+ id: number,
+ patchedOrderRead: NonReadonly,
+) => {
+ return privateMutator