refactor: moved ProjectEditorDrawer into common drawers directory
This commit is contained in:
@ -1,3 +0,0 @@
|
|||||||
import ProjectEditorDrawer from "@/app/deals/drawers/ProjectEditorDrawer/ProjectEditorDrawer";
|
|
||||||
|
|
||||||
export default ProjectEditorDrawer;
|
|
||||||
@ -2,10 +2,10 @@
|
|||||||
|
|
||||||
import React, { FC, useState } from "react";
|
import React, { FC, useState } from "react";
|
||||||
import { Drawer } from "@mantine/core";
|
import { Drawer } from "@mantine/core";
|
||||||
import ProjectEditorBody from "@/app/deals/drawers/ProjectEditorDrawer/components/ProjectEditorBody";
|
|
||||||
import { DrawerProps } from "@/drawers/types";
|
import { DrawerProps } from "@/drawers/types";
|
||||||
import useIsMobile from "@/hooks/utils/useIsMobile";
|
import useIsMobile from "@/hooks/utils/useIsMobile";
|
||||||
import { ProjectSchema } from "@/lib/client";
|
import { ProjectSchema } from "@/lib/client";
|
||||||
|
import ProjectEditorBody from "@/drawers/common/ProjectEditorDrawer/components/ProjectEditorBody";
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
value: ProjectSchema;
|
value: ProjectSchema;
|
||||||
@ -1,12 +1,9 @@
|
|||||||
import { FC } from "react";
|
import { FC } from "react";
|
||||||
import { IconBlocks, IconEdit } from "@tabler/icons-react";
|
import { IconBlocks, IconEdit } from "@tabler/icons-react";
|
||||||
import { Tabs } from "@mantine/core";
|
import { Tabs } from "@mantine/core";
|
||||||
import {
|
|
||||||
GeneralTab,
|
|
||||||
ModulesTab,
|
|
||||||
} from "@/app/deals/drawers/ProjectEditorDrawer/tabs";
|
|
||||||
import { ProjectSchema } from "@/lib/client";
|
import { ProjectSchema } from "@/lib/client";
|
||||||
import styles from "../ProjectEditorDrawer.module.css";
|
import styles from "../ProjectEditorDrawer.module.css";
|
||||||
|
import { GeneralTab, ModulesTab } from "@/drawers/common/ProjectEditorDrawer/tabs";
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
value: ProjectSchema;
|
value: ProjectSchema;
|
||||||
3
src/drawers/common/ProjectEditorDrawer/index.ts
Normal file
3
src/drawers/common/ProjectEditorDrawer/index.ts
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
import ProjectEditorDrawer from "./ProjectEditorDrawer";
|
||||||
|
|
||||||
|
export default ProjectEditorDrawer;
|
||||||
@ -1,8 +1,8 @@
|
|||||||
import { FC } from "react";
|
import { FC } from "react";
|
||||||
import { Stack, TextInput } from "@mantine/core";
|
import { Stack, TextInput } from "@mantine/core";
|
||||||
import { useForm } from "@mantine/form";
|
import { useForm } from "@mantine/form";
|
||||||
import Footer from "@/app/deals/drawers/ProjectEditorDrawer/tabs/GeneralTab/components/Footer";
|
|
||||||
import { ProjectSchema } from "@/lib/client";
|
import { ProjectSchema } from "@/lib/client";
|
||||||
|
import Footer from "./components/Footer";
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
value: ProjectSchema;
|
value: ProjectSchema;
|
||||||
@ -1,7 +1,7 @@
|
|||||||
import { FC } from "react";
|
import { FC } from "react";
|
||||||
import { Button, Stack } from "@mantine/core";
|
import { Button, Stack } from "@mantine/core";
|
||||||
import { useForm } from "@mantine/form";
|
import { useForm } from "@mantine/form";
|
||||||
import resolveDependencies from "@/app/deals/drawers/ProjectEditorDrawer/tabs/ModulesTab/utils/resolveDependencies";
|
import resolveDependencies from "@/drawers/common/ProjectEditorDrawer/tabs/ModulesTab/utils/resolveDependencies";
|
||||||
import { ProjectSchema } from "@/lib/client";
|
import { ProjectSchema } from "@/lib/client";
|
||||||
import ModulesTable from "./components/ModulesTable";
|
import ModulesTable from "./components/ModulesTable";
|
||||||
|
|
||||||
@ -1,7 +1,7 @@
|
|||||||
import { FC } from "react";
|
import { FC } from "react";
|
||||||
import { Divider, Stack } from "@mantine/core";
|
import { Divider, Stack } from "@mantine/core";
|
||||||
import useModulesTableColumns from "@/app/deals/drawers/ProjectEditorDrawer/tabs/ModulesTab/hooks/useModulesTableColumns";
|
|
||||||
import BaseTable from "@/components/ui/BaseTable/BaseTable";
|
import BaseTable from "@/components/ui/BaseTable/BaseTable";
|
||||||
|
import useModulesTableColumns from "@/drawers/common/ProjectEditorDrawer/tabs/ModulesTab/hooks/useModulesTableColumns";
|
||||||
import useBuiltInModulesList from "@/hooks/lists/useBuiltInModulesList";
|
import useBuiltInModulesList from "@/hooks/lists/useBuiltInModulesList";
|
||||||
import { BuiltInModuleSchemaOutput } from "@/lib/client";
|
import { BuiltInModuleSchemaOutput } from "@/lib/client";
|
||||||
|
|
||||||
@ -1,9 +1,9 @@
|
|||||||
import ClientMarketplaceDrawer from "@/app/clients/drawers/ClientMarketplacesDrawer";
|
import ClientMarketplaceDrawer from "@/app/clients/drawers/ClientMarketplacesDrawer";
|
||||||
import BoardsMobileEditorDrawer from "@/app/deals/drawers/BoardsMobileEditorDrawer";
|
import BoardsMobileEditorDrawer from "@/app/deals/drawers/BoardsMobileEditorDrawer";
|
||||||
import DealEditorDrawer from "@/app/deals/drawers/DealEditorDrawer";
|
import DealEditorDrawer from "@/app/deals/drawers/DealEditorDrawer";
|
||||||
import ProjectEditorDrawer from "@/app/deals/drawers/ProjectEditorDrawer";
|
|
||||||
import ProjectsMobileEditorDrawer from "@/app/deals/drawers/ProjectsMobileEditorDrawer";
|
import ProjectsMobileEditorDrawer from "@/app/deals/drawers/ProjectsMobileEditorDrawer";
|
||||||
import StatusesMobileEditorDrawer from "../app/deals/drawers/StatusesMobileEditorDrawer";
|
import StatusesMobileEditorDrawer from "../app/deals/drawers/StatusesMobileEditorDrawer";
|
||||||
|
import ProjectEditorDrawer from "./common/ProjectEditorDrawer";
|
||||||
|
|
||||||
const drawerRegistry = {
|
const drawerRegistry = {
|
||||||
projectsMobileEditorDrawer: ProjectsMobileEditorDrawer,
|
projectsMobileEditorDrawer: ProjectsMobileEditorDrawer,
|
||||||
|
|||||||
@ -26,6 +26,7 @@ import {
|
|||||||
createServiceCategory,
|
createServiceCategory,
|
||||||
createServicesKit,
|
createServicesKit,
|
||||||
createStatus,
|
createStatus,
|
||||||
|
createTag,
|
||||||
deleteBarcodeTemplate,
|
deleteBarcodeTemplate,
|
||||||
deleteBoard,
|
deleteBoard,
|
||||||
deleteClient,
|
deleteClient,
|
||||||
@ -41,6 +42,7 @@ import {
|
|||||||
deleteServiceCategory,
|
deleteServiceCategory,
|
||||||
deleteServicesKit,
|
deleteServicesKit,
|
||||||
deleteStatus,
|
deleteStatus,
|
||||||
|
deleteTag,
|
||||||
duplicateProductServices,
|
duplicateProductServices,
|
||||||
getBarcodeTemplateAttributes,
|
getBarcodeTemplateAttributes,
|
||||||
getBarcodeTemplates,
|
getBarcodeTemplates,
|
||||||
@ -52,6 +54,7 @@ import {
|
|||||||
getDealProducts,
|
getDealProducts,
|
||||||
getDeals,
|
getDeals,
|
||||||
getDealServices,
|
getDealServices,
|
||||||
|
getDealTagColors,
|
||||||
getMarketplaces,
|
getMarketplaces,
|
||||||
getProductBarcodePdf,
|
getProductBarcodePdf,
|
||||||
getProducts,
|
getProducts,
|
||||||
@ -61,6 +64,7 @@ import {
|
|||||||
getServicesKits,
|
getServicesKits,
|
||||||
getStatuses,
|
getStatuses,
|
||||||
getStatusHistory,
|
getStatusHistory,
|
||||||
|
switchDealTag,
|
||||||
updateBarcodeTemplate,
|
updateBarcodeTemplate,
|
||||||
updateBoard,
|
updateBoard,
|
||||||
updateClient,
|
updateClient,
|
||||||
@ -77,6 +81,7 @@ import {
|
|||||||
updateServiceCategory,
|
updateServiceCategory,
|
||||||
updateServicesKit,
|
updateServicesKit,
|
||||||
updateStatus,
|
updateStatus,
|
||||||
|
updateTag,
|
||||||
type Options,
|
type Options,
|
||||||
} from "../sdk.gen";
|
} from "../sdk.gen";
|
||||||
import type {
|
import type {
|
||||||
@ -131,6 +136,9 @@ import type {
|
|||||||
CreateStatusData,
|
CreateStatusData,
|
||||||
CreateStatusError,
|
CreateStatusError,
|
||||||
CreateStatusResponse2,
|
CreateStatusResponse2,
|
||||||
|
CreateTagData,
|
||||||
|
CreateTagError,
|
||||||
|
CreateTagResponse,
|
||||||
DeleteBarcodeTemplateData,
|
DeleteBarcodeTemplateData,
|
||||||
DeleteBarcodeTemplateError,
|
DeleteBarcodeTemplateError,
|
||||||
DeleteBarcodeTemplateResponse2,
|
DeleteBarcodeTemplateResponse2,
|
||||||
@ -176,6 +184,9 @@ import type {
|
|||||||
DeleteStatusData,
|
DeleteStatusData,
|
||||||
DeleteStatusError,
|
DeleteStatusError,
|
||||||
DeleteStatusResponse2,
|
DeleteStatusResponse2,
|
||||||
|
DeleteTagData,
|
||||||
|
DeleteTagError,
|
||||||
|
DeleteTagResponse,
|
||||||
DuplicateProductServicesData,
|
DuplicateProductServicesData,
|
||||||
DuplicateProductServicesError,
|
DuplicateProductServicesError,
|
||||||
DuplicateProductServicesResponse,
|
DuplicateProductServicesResponse,
|
||||||
@ -191,6 +202,7 @@ import type {
|
|||||||
GetDealsError,
|
GetDealsError,
|
||||||
GetDealServicesData,
|
GetDealServicesData,
|
||||||
GetDealsResponse2,
|
GetDealsResponse2,
|
||||||
|
GetDealTagColorsData,
|
||||||
GetMarketplacesData,
|
GetMarketplacesData,
|
||||||
GetProductBarcodePdfData,
|
GetProductBarcodePdfData,
|
||||||
GetProductBarcodePdfError,
|
GetProductBarcodePdfError,
|
||||||
@ -204,6 +216,9 @@ import type {
|
|||||||
GetServicesKitsData,
|
GetServicesKitsData,
|
||||||
GetStatusesData,
|
GetStatusesData,
|
||||||
GetStatusHistoryData,
|
GetStatusHistoryData,
|
||||||
|
SwitchDealTagData,
|
||||||
|
SwitchDealTagError,
|
||||||
|
SwitchDealTagResponse2,
|
||||||
UpdateBarcodeTemplateData,
|
UpdateBarcodeTemplateData,
|
||||||
UpdateBarcodeTemplateError,
|
UpdateBarcodeTemplateError,
|
||||||
UpdateBarcodeTemplateResponse2,
|
UpdateBarcodeTemplateResponse2,
|
||||||
@ -252,6 +267,9 @@ import type {
|
|||||||
UpdateStatusData,
|
UpdateStatusData,
|
||||||
UpdateStatusError,
|
UpdateStatusError,
|
||||||
UpdateStatusResponse2,
|
UpdateStatusResponse2,
|
||||||
|
UpdateTagData,
|
||||||
|
UpdateTagError,
|
||||||
|
UpdateTagResponse,
|
||||||
} from "../types.gen";
|
} from "../types.gen";
|
||||||
|
|
||||||
export type QueryKey<TOptions extends Options> = [
|
export type QueryKey<TOptions extends Options> = [
|
||||||
@ -777,6 +795,180 @@ export const updateDealsInGroupMutation = (
|
|||||||
return mutationOptions;
|
return mutationOptions;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update Tag
|
||||||
|
*/
|
||||||
|
export const updateTagMutation = (
|
||||||
|
options?: Partial<Options<UpdateTagData>>
|
||||||
|
): UseMutationOptions<
|
||||||
|
UpdateTagResponse,
|
||||||
|
AxiosError<UpdateTagError>,
|
||||||
|
Options<UpdateTagData>
|
||||||
|
> => {
|
||||||
|
const mutationOptions: UseMutationOptions<
|
||||||
|
UpdateTagResponse,
|
||||||
|
AxiosError<UpdateTagError>,
|
||||||
|
Options<UpdateTagData>
|
||||||
|
> = {
|
||||||
|
mutationFn: async localOptions => {
|
||||||
|
const { data } = await updateTag({
|
||||||
|
...options,
|
||||||
|
...localOptions,
|
||||||
|
throwOnError: true,
|
||||||
|
});
|
||||||
|
return data;
|
||||||
|
},
|
||||||
|
};
|
||||||
|
return mutationOptions;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const createTagQueryKey = (options: Options<CreateTagData>) =>
|
||||||
|
createQueryKey("createTag", options);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create Tag
|
||||||
|
*/
|
||||||
|
export const createTagOptions = (options: Options<CreateTagData>) => {
|
||||||
|
return queryOptions({
|
||||||
|
queryFn: async ({ queryKey, signal }) => {
|
||||||
|
const { data } = await createTag({
|
||||||
|
...options,
|
||||||
|
...queryKey[0],
|
||||||
|
signal,
|
||||||
|
throwOnError: true,
|
||||||
|
});
|
||||||
|
return data;
|
||||||
|
},
|
||||||
|
queryKey: createTagQueryKey(options),
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create Tag
|
||||||
|
*/
|
||||||
|
export const createTagMutation = (
|
||||||
|
options?: Partial<Options<CreateTagData>>
|
||||||
|
): UseMutationOptions<
|
||||||
|
CreateTagResponse,
|
||||||
|
AxiosError<CreateTagError>,
|
||||||
|
Options<CreateTagData>
|
||||||
|
> => {
|
||||||
|
const mutationOptions: UseMutationOptions<
|
||||||
|
CreateTagResponse,
|
||||||
|
AxiosError<CreateTagError>,
|
||||||
|
Options<CreateTagData>
|
||||||
|
> = {
|
||||||
|
mutationFn: async localOptions => {
|
||||||
|
const { data } = await createTag({
|
||||||
|
...options,
|
||||||
|
...localOptions,
|
||||||
|
throwOnError: true,
|
||||||
|
});
|
||||||
|
return data;
|
||||||
|
},
|
||||||
|
};
|
||||||
|
return mutationOptions;
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Delete Tag
|
||||||
|
*/
|
||||||
|
export const deleteTagMutation = (
|
||||||
|
options?: Partial<Options<DeleteTagData>>
|
||||||
|
): UseMutationOptions<
|
||||||
|
DeleteTagResponse,
|
||||||
|
AxiosError<DeleteTagError>,
|
||||||
|
Options<DeleteTagData>
|
||||||
|
> => {
|
||||||
|
const mutationOptions: UseMutationOptions<
|
||||||
|
DeleteTagResponse,
|
||||||
|
AxiosError<DeleteTagError>,
|
||||||
|
Options<DeleteTagData>
|
||||||
|
> = {
|
||||||
|
mutationFn: async localOptions => {
|
||||||
|
const { data } = await deleteTag({
|
||||||
|
...options,
|
||||||
|
...localOptions,
|
||||||
|
throwOnError: true,
|
||||||
|
});
|
||||||
|
return data;
|
||||||
|
},
|
||||||
|
};
|
||||||
|
return mutationOptions;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const switchDealTagQueryKey = (options: Options<SwitchDealTagData>) =>
|
||||||
|
createQueryKey("switchDealTag", options);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Switch Deal Tag
|
||||||
|
*/
|
||||||
|
export const switchDealTagOptions = (options: Options<SwitchDealTagData>) => {
|
||||||
|
return queryOptions({
|
||||||
|
queryFn: async ({ queryKey, signal }) => {
|
||||||
|
const { data } = await switchDealTag({
|
||||||
|
...options,
|
||||||
|
...queryKey[0],
|
||||||
|
signal,
|
||||||
|
throwOnError: true,
|
||||||
|
});
|
||||||
|
return data;
|
||||||
|
},
|
||||||
|
queryKey: switchDealTagQueryKey(options),
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Switch Deal Tag
|
||||||
|
*/
|
||||||
|
export const switchDealTagMutation = (
|
||||||
|
options?: Partial<Options<SwitchDealTagData>>
|
||||||
|
): UseMutationOptions<
|
||||||
|
SwitchDealTagResponse2,
|
||||||
|
AxiosError<SwitchDealTagError>,
|
||||||
|
Options<SwitchDealTagData>
|
||||||
|
> => {
|
||||||
|
const mutationOptions: UseMutationOptions<
|
||||||
|
SwitchDealTagResponse2,
|
||||||
|
AxiosError<SwitchDealTagError>,
|
||||||
|
Options<SwitchDealTagData>
|
||||||
|
> = {
|
||||||
|
mutationFn: async localOptions => {
|
||||||
|
const { data } = await switchDealTag({
|
||||||
|
...options,
|
||||||
|
...localOptions,
|
||||||
|
throwOnError: true,
|
||||||
|
});
|
||||||
|
return data;
|
||||||
|
},
|
||||||
|
};
|
||||||
|
return mutationOptions;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const getDealTagColorsQueryKey = (
|
||||||
|
options?: Options<GetDealTagColorsData>
|
||||||
|
) => createQueryKey("getDealTagColors", options);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get Deal Tag Colors
|
||||||
|
*/
|
||||||
|
export const getDealTagColorsOptions = (
|
||||||
|
options?: Options<GetDealTagColorsData>
|
||||||
|
) => {
|
||||||
|
return queryOptions({
|
||||||
|
queryFn: async ({ queryKey, signal }) => {
|
||||||
|
const { data } = await getDealTagColors({
|
||||||
|
...options,
|
||||||
|
...queryKey[0],
|
||||||
|
signal,
|
||||||
|
throwOnError: true,
|
||||||
|
});
|
||||||
|
return data;
|
||||||
|
},
|
||||||
|
queryKey: getDealTagColorsQueryKey(options),
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
export const getBuiltInModulesQueryKey = (
|
export const getBuiltInModulesQueryKey = (
|
||||||
options?: Options<GetBuiltInModulesData>
|
options?: Options<GetBuiltInModulesData>
|
||||||
) => createQueryKey("getBuiltInModules", options);
|
) => createQueryKey("getBuiltInModules", options);
|
||||||
|
|||||||
@ -54,6 +54,9 @@ import type {
|
|||||||
CreateStatusData,
|
CreateStatusData,
|
||||||
CreateStatusErrors,
|
CreateStatusErrors,
|
||||||
CreateStatusResponses,
|
CreateStatusResponses,
|
||||||
|
CreateTagData,
|
||||||
|
CreateTagErrors,
|
||||||
|
CreateTagResponses,
|
||||||
DeleteBarcodeTemplateData,
|
DeleteBarcodeTemplateData,
|
||||||
DeleteBarcodeTemplateErrors,
|
DeleteBarcodeTemplateErrors,
|
||||||
DeleteBarcodeTemplateResponses,
|
DeleteBarcodeTemplateResponses,
|
||||||
@ -99,6 +102,9 @@ import type {
|
|||||||
DeleteStatusData,
|
DeleteStatusData,
|
||||||
DeleteStatusErrors,
|
DeleteStatusErrors,
|
||||||
DeleteStatusResponses,
|
DeleteStatusResponses,
|
||||||
|
DeleteTagData,
|
||||||
|
DeleteTagErrors,
|
||||||
|
DeleteTagResponses,
|
||||||
DuplicateProductServicesData,
|
DuplicateProductServicesData,
|
||||||
DuplicateProductServicesErrors,
|
DuplicateProductServicesErrors,
|
||||||
DuplicateProductServicesResponses,
|
DuplicateProductServicesResponses,
|
||||||
@ -127,6 +133,8 @@ import type {
|
|||||||
GetDealServicesErrors,
|
GetDealServicesErrors,
|
||||||
GetDealServicesResponses,
|
GetDealServicesResponses,
|
||||||
GetDealsResponses,
|
GetDealsResponses,
|
||||||
|
GetDealTagColorsData,
|
||||||
|
GetDealTagColorsResponses,
|
||||||
GetMarketplacesData,
|
GetMarketplacesData,
|
||||||
GetMarketplacesErrors,
|
GetMarketplacesErrors,
|
||||||
GetMarketplacesResponses,
|
GetMarketplacesResponses,
|
||||||
@ -150,6 +158,9 @@ import type {
|
|||||||
GetStatusHistoryData,
|
GetStatusHistoryData,
|
||||||
GetStatusHistoryErrors,
|
GetStatusHistoryErrors,
|
||||||
GetStatusHistoryResponses,
|
GetStatusHistoryResponses,
|
||||||
|
SwitchDealTagData,
|
||||||
|
SwitchDealTagErrors,
|
||||||
|
SwitchDealTagResponses,
|
||||||
UpdateBarcodeTemplateData,
|
UpdateBarcodeTemplateData,
|
||||||
UpdateBarcodeTemplateErrors,
|
UpdateBarcodeTemplateErrors,
|
||||||
UpdateBarcodeTemplateResponses,
|
UpdateBarcodeTemplateResponses,
|
||||||
@ -198,6 +209,9 @@ import type {
|
|||||||
UpdateStatusData,
|
UpdateStatusData,
|
||||||
UpdateStatusErrors,
|
UpdateStatusErrors,
|
||||||
UpdateStatusResponses,
|
UpdateStatusResponses,
|
||||||
|
UpdateTagData,
|
||||||
|
UpdateTagErrors,
|
||||||
|
UpdateTagResponses,
|
||||||
} from "./types.gen";
|
} from "./types.gen";
|
||||||
import {
|
import {
|
||||||
zAddKitToDealData,
|
zAddKitToDealData,
|
||||||
@ -234,6 +248,8 @@ import {
|
|||||||
zCreateServicesKitResponse2,
|
zCreateServicesKitResponse2,
|
||||||
zCreateStatusData,
|
zCreateStatusData,
|
||||||
zCreateStatusResponse2,
|
zCreateStatusResponse2,
|
||||||
|
zCreateTagData,
|
||||||
|
zCreateTagResponse,
|
||||||
zDeleteBarcodeTemplateData,
|
zDeleteBarcodeTemplateData,
|
||||||
zDeleteBarcodeTemplateResponse2,
|
zDeleteBarcodeTemplateResponse2,
|
||||||
zDeleteBoardData,
|
zDeleteBoardData,
|
||||||
@ -264,6 +280,8 @@ import {
|
|||||||
zDeleteServicesKitResponse2,
|
zDeleteServicesKitResponse2,
|
||||||
zDeleteStatusData,
|
zDeleteStatusData,
|
||||||
zDeleteStatusResponse2,
|
zDeleteStatusResponse2,
|
||||||
|
zDeleteTagData,
|
||||||
|
zDeleteTagResponse,
|
||||||
zDuplicateProductServicesData,
|
zDuplicateProductServicesData,
|
||||||
zDuplicateProductServicesResponse,
|
zDuplicateProductServicesResponse,
|
||||||
zGetBarcodeTemplateAttributesData,
|
zGetBarcodeTemplateAttributesData,
|
||||||
@ -286,6 +304,8 @@ import {
|
|||||||
zGetDealServicesData,
|
zGetDealServicesData,
|
||||||
zGetDealServicesResponse2,
|
zGetDealServicesResponse2,
|
||||||
zGetDealsResponse2,
|
zGetDealsResponse2,
|
||||||
|
zGetDealTagColorsData,
|
||||||
|
zGetDealTagColorsResponse,
|
||||||
zGetMarketplacesData,
|
zGetMarketplacesData,
|
||||||
zGetMarketplacesResponse2,
|
zGetMarketplacesResponse2,
|
||||||
zGetProductBarcodePdfData,
|
zGetProductBarcodePdfData,
|
||||||
@ -304,6 +324,8 @@ import {
|
|||||||
zGetStatusesResponse2,
|
zGetStatusesResponse2,
|
||||||
zGetStatusHistoryData,
|
zGetStatusHistoryData,
|
||||||
zGetStatusHistoryResponse2,
|
zGetStatusHistoryResponse2,
|
||||||
|
zSwitchDealTagData,
|
||||||
|
zSwitchDealTagResponse2,
|
||||||
zUpdateBarcodeTemplateData,
|
zUpdateBarcodeTemplateData,
|
||||||
zUpdateBarcodeTemplateResponse2,
|
zUpdateBarcodeTemplateResponse2,
|
||||||
zUpdateBoardData,
|
zUpdateBoardData,
|
||||||
@ -336,6 +358,8 @@ import {
|
|||||||
zUpdateServicesKitResponse2,
|
zUpdateServicesKitResponse2,
|
||||||
zUpdateStatusData,
|
zUpdateStatusData,
|
||||||
zUpdateStatusResponse2,
|
zUpdateStatusResponse2,
|
||||||
|
zUpdateTagData,
|
||||||
|
zUpdateTagResponse,
|
||||||
} from "./zod.gen";
|
} from "./zod.gen";
|
||||||
|
|
||||||
export type Options<
|
export type Options<
|
||||||
@ -659,6 +683,133 @@ export const updateDealsInGroup = <ThrowOnError extends boolean = false>(
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update Tag
|
||||||
|
*/
|
||||||
|
export const updateTag = <ThrowOnError extends boolean = false>(
|
||||||
|
options: Options<UpdateTagData, ThrowOnError>
|
||||||
|
) => {
|
||||||
|
return (options.client ?? _heyApiClient).patch<
|
||||||
|
UpdateTagResponses,
|
||||||
|
UpdateTagErrors,
|
||||||
|
ThrowOnError
|
||||||
|
>({
|
||||||
|
requestValidator: async data => {
|
||||||
|
return await zUpdateTagData.parseAsync(data);
|
||||||
|
},
|
||||||
|
responseType: "json",
|
||||||
|
responseValidator: async data => {
|
||||||
|
return await zUpdateTagResponse.parseAsync(data);
|
||||||
|
},
|
||||||
|
url: "/crm/v1/deal-tag/",
|
||||||
|
...options,
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
...options.headers,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create Tag
|
||||||
|
*/
|
||||||
|
export const createTag = <ThrowOnError extends boolean = false>(
|
||||||
|
options: Options<CreateTagData, ThrowOnError>
|
||||||
|
) => {
|
||||||
|
return (options.client ?? _heyApiClient).post<
|
||||||
|
CreateTagResponses,
|
||||||
|
CreateTagErrors,
|
||||||
|
ThrowOnError
|
||||||
|
>({
|
||||||
|
requestValidator: async data => {
|
||||||
|
return await zCreateTagData.parseAsync(data);
|
||||||
|
},
|
||||||
|
responseType: "json",
|
||||||
|
responseValidator: async data => {
|
||||||
|
return await zCreateTagResponse.parseAsync(data);
|
||||||
|
},
|
||||||
|
url: "/crm/v1/deal-tag/",
|
||||||
|
...options,
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
...options.headers,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Delete Tag
|
||||||
|
*/
|
||||||
|
export const deleteTag = <ThrowOnError extends boolean = false>(
|
||||||
|
options: Options<DeleteTagData, ThrowOnError>
|
||||||
|
) => {
|
||||||
|
return (options.client ?? _heyApiClient).delete<
|
||||||
|
DeleteTagResponses,
|
||||||
|
DeleteTagErrors,
|
||||||
|
ThrowOnError
|
||||||
|
>({
|
||||||
|
requestValidator: async data => {
|
||||||
|
return await zDeleteTagData.parseAsync(data);
|
||||||
|
},
|
||||||
|
responseType: "json",
|
||||||
|
responseValidator: async data => {
|
||||||
|
return await zDeleteTagResponse.parseAsync(data);
|
||||||
|
},
|
||||||
|
url: "/crm/v1/deal-tag/{deal_tag_id}",
|
||||||
|
...options,
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Switch Deal Tag
|
||||||
|
*/
|
||||||
|
export const switchDealTag = <ThrowOnError extends boolean = false>(
|
||||||
|
options: Options<SwitchDealTagData, ThrowOnError>
|
||||||
|
) => {
|
||||||
|
return (options.client ?? _heyApiClient).post<
|
||||||
|
SwitchDealTagResponses,
|
||||||
|
SwitchDealTagErrors,
|
||||||
|
ThrowOnError
|
||||||
|
>({
|
||||||
|
requestValidator: async data => {
|
||||||
|
return await zSwitchDealTagData.parseAsync(data);
|
||||||
|
},
|
||||||
|
responseType: "json",
|
||||||
|
responseValidator: async data => {
|
||||||
|
return await zSwitchDealTagResponse2.parseAsync(data);
|
||||||
|
},
|
||||||
|
url: "/crm/v1/deal-tag/switch",
|
||||||
|
...options,
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
...options.headers,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get Deal Tag Colors
|
||||||
|
*/
|
||||||
|
export const getDealTagColors = <ThrowOnError extends boolean = false>(
|
||||||
|
options?: Options<GetDealTagColorsData, ThrowOnError>
|
||||||
|
) => {
|
||||||
|
return (options?.client ?? _heyApiClient).get<
|
||||||
|
GetDealTagColorsResponses,
|
||||||
|
unknown,
|
||||||
|
ThrowOnError
|
||||||
|
>({
|
||||||
|
requestValidator: async data => {
|
||||||
|
return await zGetDealTagColorsData.parseAsync(data);
|
||||||
|
},
|
||||||
|
responseType: "json",
|
||||||
|
responseValidator: async data => {
|
||||||
|
return await zGetDealTagColorsResponse.parseAsync(data);
|
||||||
|
},
|
||||||
|
url: "/crm/v1/deal-tag/colors",
|
||||||
|
...options,
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get Built In Modules
|
* Get Built In Modules
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -492,6 +492,42 @@ export type CreateDealServiceSchema = {
|
|||||||
price: number;
|
price: number;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* CreateDealTagRequest
|
||||||
|
*/
|
||||||
|
export type CreateDealTagRequest = {
|
||||||
|
entity: CreateDealTagSchema;
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* CreateDealTagResponse
|
||||||
|
*/
|
||||||
|
export type CreateDealTagResponse = {
|
||||||
|
/**
|
||||||
|
* Message
|
||||||
|
*/
|
||||||
|
message: string;
|
||||||
|
entity: DealTagSchema;
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* CreateDealTagSchema
|
||||||
|
*/
|
||||||
|
export type CreateDealTagSchema = {
|
||||||
|
/**
|
||||||
|
* Name
|
||||||
|
*/
|
||||||
|
name: string;
|
||||||
|
/**
|
||||||
|
* Projectid
|
||||||
|
*/
|
||||||
|
projectId: number;
|
||||||
|
/**
|
||||||
|
* Tagcolorid
|
||||||
|
*/
|
||||||
|
tagColorId: number;
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* CreateMarketplaceRequest
|
* CreateMarketplaceRequest
|
||||||
*/
|
*/
|
||||||
@ -987,6 +1023,51 @@ export type DealServiceSchema = {
|
|||||||
isFixedPrice: boolean;
|
isFixedPrice: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* DealTagColorSchema
|
||||||
|
*/
|
||||||
|
export type DealTagColorSchema = {
|
||||||
|
/**
|
||||||
|
* Id
|
||||||
|
*/
|
||||||
|
id: number;
|
||||||
|
/**
|
||||||
|
* Color
|
||||||
|
*/
|
||||||
|
color: string;
|
||||||
|
/**
|
||||||
|
* Backgroundcolor
|
||||||
|
*/
|
||||||
|
backgroundColor: string;
|
||||||
|
/**
|
||||||
|
* Label
|
||||||
|
*/
|
||||||
|
label: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* DealTagSchema
|
||||||
|
*/
|
||||||
|
export type DealTagSchema = {
|
||||||
|
/**
|
||||||
|
* Name
|
||||||
|
*/
|
||||||
|
name: string;
|
||||||
|
/**
|
||||||
|
* Projectid
|
||||||
|
*/
|
||||||
|
projectId: number;
|
||||||
|
/**
|
||||||
|
* Tagcolorid
|
||||||
|
*/
|
||||||
|
tagColorId: number;
|
||||||
|
/**
|
||||||
|
* Id
|
||||||
|
*/
|
||||||
|
id: number;
|
||||||
|
tagColor: DealTagColorSchema;
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* DeleteBarcodeTemplateResponse
|
* DeleteBarcodeTemplateResponse
|
||||||
*/
|
*/
|
||||||
@ -1057,6 +1138,16 @@ export type DeleteDealServiceResponse = {
|
|||||||
message: string;
|
message: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* DeleteDealTagResponse
|
||||||
|
*/
|
||||||
|
export type DeleteDealTagResponse = {
|
||||||
|
/**
|
||||||
|
* Message
|
||||||
|
*/
|
||||||
|
message: string;
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* DeleteMarketplaceResponse
|
* DeleteMarketplaceResponse
|
||||||
*/
|
*/
|
||||||
@ -1355,6 +1446,16 @@ export type GetStatusesResponse = {
|
|||||||
items: Array<StatusSchema>;
|
items: Array<StatusSchema>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GetTagColorsResponse
|
||||||
|
*/
|
||||||
|
export type GetTagColorsResponse = {
|
||||||
|
/**
|
||||||
|
* Items
|
||||||
|
*/
|
||||||
|
items: Array<DealTagColorSchema>;
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* HTTPValidationError
|
* HTTPValidationError
|
||||||
*/
|
*/
|
||||||
@ -1700,6 +1801,34 @@ export type StatusSchema = {
|
|||||||
color: string;
|
color: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SwitchDealTagRequest
|
||||||
|
*/
|
||||||
|
export type SwitchDealTagRequest = {
|
||||||
|
/**
|
||||||
|
* Tagid
|
||||||
|
*/
|
||||||
|
tagId: number;
|
||||||
|
/**
|
||||||
|
* Dealid
|
||||||
|
*/
|
||||||
|
dealId?: number | null;
|
||||||
|
/**
|
||||||
|
* Groupid
|
||||||
|
*/
|
||||||
|
groupId?: number | null;
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SwitchDealTagResponse
|
||||||
|
*/
|
||||||
|
export type SwitchDealTagResponse = {
|
||||||
|
/**
|
||||||
|
* Message
|
||||||
|
*/
|
||||||
|
message: string;
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* UpdateBarcodeTemplateRequest
|
* UpdateBarcodeTemplateRequest
|
||||||
*/
|
*/
|
||||||
@ -1944,6 +2073,34 @@ export type UpdateDealServiceSchema = {
|
|||||||
isFixedPrice: boolean;
|
isFixedPrice: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* UpdateDealTagRequest
|
||||||
|
*/
|
||||||
|
export type UpdateDealTagRequest = {
|
||||||
|
entity: UpdateDealTagSchema;
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* UpdateDealTagResponse
|
||||||
|
*/
|
||||||
|
export type UpdateDealTagResponse = {
|
||||||
|
/**
|
||||||
|
* Message
|
||||||
|
*/
|
||||||
|
message: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* UpdateDealTagSchema
|
||||||
|
*/
|
||||||
|
export type UpdateDealTagSchema = {
|
||||||
|
/**
|
||||||
|
* Name
|
||||||
|
*/
|
||||||
|
name?: string | null;
|
||||||
|
tagColor?: DealTagColorSchema | null;
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* UpdateDealsInGroupRequest
|
* UpdateDealsInGroupRequest
|
||||||
*/
|
*/
|
||||||
@ -2694,6 +2851,129 @@ export type UpdateDealsInGroupResponses = {
|
|||||||
export type UpdateDealsInGroupResponse2 =
|
export type UpdateDealsInGroupResponse2 =
|
||||||
UpdateDealsInGroupResponses[keyof UpdateDealsInGroupResponses];
|
UpdateDealsInGroupResponses[keyof UpdateDealsInGroupResponses];
|
||||||
|
|
||||||
|
export type UpdateTagData = {
|
||||||
|
body: UpdateDealTagRequest;
|
||||||
|
path?: never;
|
||||||
|
query?: never;
|
||||||
|
url: "/crm/v1/deal-tag/";
|
||||||
|
};
|
||||||
|
|
||||||
|
export type UpdateTagErrors = {
|
||||||
|
/**
|
||||||
|
* Validation Error
|
||||||
|
*/
|
||||||
|
422: HttpValidationError;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type UpdateTagError = UpdateTagErrors[keyof UpdateTagErrors];
|
||||||
|
|
||||||
|
export type UpdateTagResponses = {
|
||||||
|
/**
|
||||||
|
* Successful Response
|
||||||
|
*/
|
||||||
|
200: UpdateDealTagResponse;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type UpdateTagResponse = UpdateTagResponses[keyof UpdateTagResponses];
|
||||||
|
|
||||||
|
export type CreateTagData = {
|
||||||
|
body: CreateDealTagRequest;
|
||||||
|
path?: never;
|
||||||
|
query?: never;
|
||||||
|
url: "/crm/v1/deal-tag/";
|
||||||
|
};
|
||||||
|
|
||||||
|
export type CreateTagErrors = {
|
||||||
|
/**
|
||||||
|
* Validation Error
|
||||||
|
*/
|
||||||
|
422: HttpValidationError;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type CreateTagError = CreateTagErrors[keyof CreateTagErrors];
|
||||||
|
|
||||||
|
export type CreateTagResponses = {
|
||||||
|
/**
|
||||||
|
* Successful Response
|
||||||
|
*/
|
||||||
|
200: CreateDealTagResponse;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type CreateTagResponse = CreateTagResponses[keyof CreateTagResponses];
|
||||||
|
|
||||||
|
export type DeleteTagData = {
|
||||||
|
body?: never;
|
||||||
|
path: {
|
||||||
|
/**
|
||||||
|
* Deal Tag Id
|
||||||
|
*/
|
||||||
|
deal_tag_id: number;
|
||||||
|
};
|
||||||
|
query?: never;
|
||||||
|
url: "/crm/v1/deal-tag/{deal_tag_id}";
|
||||||
|
};
|
||||||
|
|
||||||
|
export type DeleteTagErrors = {
|
||||||
|
/**
|
||||||
|
* Validation Error
|
||||||
|
*/
|
||||||
|
422: HttpValidationError;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type DeleteTagError = DeleteTagErrors[keyof DeleteTagErrors];
|
||||||
|
|
||||||
|
export type DeleteTagResponses = {
|
||||||
|
/**
|
||||||
|
* Successful Response
|
||||||
|
*/
|
||||||
|
200: DeleteDealTagResponse;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type DeleteTagResponse = DeleteTagResponses[keyof DeleteTagResponses];
|
||||||
|
|
||||||
|
export type SwitchDealTagData = {
|
||||||
|
body: SwitchDealTagRequest;
|
||||||
|
path?: never;
|
||||||
|
query?: never;
|
||||||
|
url: "/crm/v1/deal-tag/switch";
|
||||||
|
};
|
||||||
|
|
||||||
|
export type SwitchDealTagErrors = {
|
||||||
|
/**
|
||||||
|
* Validation Error
|
||||||
|
*/
|
||||||
|
422: HttpValidationError;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type SwitchDealTagError = SwitchDealTagErrors[keyof SwitchDealTagErrors];
|
||||||
|
|
||||||
|
export type SwitchDealTagResponses = {
|
||||||
|
/**
|
||||||
|
* Successful Response
|
||||||
|
*/
|
||||||
|
200: SwitchDealTagResponse;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type SwitchDealTagResponse2 =
|
||||||
|
SwitchDealTagResponses[keyof SwitchDealTagResponses];
|
||||||
|
|
||||||
|
export type GetDealTagColorsData = {
|
||||||
|
body?: never;
|
||||||
|
path?: never;
|
||||||
|
query?: never;
|
||||||
|
url: "/crm/v1/deal-tag/colors";
|
||||||
|
};
|
||||||
|
|
||||||
|
export type GetDealTagColorsResponses = {
|
||||||
|
/**
|
||||||
|
* Successful Response
|
||||||
|
*/
|
||||||
|
200: GetTagColorsResponse;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type GetDealTagColorsResponse =
|
||||||
|
GetDealTagColorsResponses[keyof GetDealTagColorsResponses];
|
||||||
|
|
||||||
export type GetBuiltInModulesData = {
|
export type GetBuiltInModulesData = {
|
||||||
body?: never;
|
body?: never;
|
||||||
path?: never;
|
path?: never;
|
||||||
|
|||||||
@ -411,6 +411,51 @@ export const zCreateDealServiceResponse = z.object({
|
|||||||
entity: zDealServiceSchema,
|
entity: zDealServiceSchema,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* CreateDealTagSchema
|
||||||
|
*/
|
||||||
|
export const zCreateDealTagSchema = z.object({
|
||||||
|
name: z.string(),
|
||||||
|
projectId: z.int(),
|
||||||
|
tagColorId: z.int(),
|
||||||
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* CreateDealTagRequest
|
||||||
|
*/
|
||||||
|
export const zCreateDealTagRequest = z.object({
|
||||||
|
entity: zCreateDealTagSchema,
|
||||||
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* DealTagColorSchema
|
||||||
|
*/
|
||||||
|
export const zDealTagColorSchema = z.object({
|
||||||
|
id: z.int(),
|
||||||
|
color: z.string(),
|
||||||
|
backgroundColor: z.string(),
|
||||||
|
label: z.string(),
|
||||||
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* DealTagSchema
|
||||||
|
*/
|
||||||
|
export const zDealTagSchema = z.object({
|
||||||
|
name: z.string(),
|
||||||
|
projectId: z.int(),
|
||||||
|
tagColorId: z.int(),
|
||||||
|
id: z.int(),
|
||||||
|
tagColor: zDealTagColorSchema,
|
||||||
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* CreateDealTagResponse
|
||||||
|
*/
|
||||||
|
export const zCreateDealTagResponse = z.object({
|
||||||
|
message: z.string(),
|
||||||
|
entity: zDealTagSchema,
|
||||||
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* CreateMarketplaceSchema
|
* CreateMarketplaceSchema
|
||||||
*/
|
*/
|
||||||
@ -728,6 +773,13 @@ export const zDeleteDealServiceResponse = z.object({
|
|||||||
message: z.string(),
|
message: z.string(),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* DeleteDealTagResponse
|
||||||
|
*/
|
||||||
|
export const zDeleteDealTagResponse = z.object({
|
||||||
|
message: z.string(),
|
||||||
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* DeleteMarketplaceResponse
|
* DeleteMarketplaceResponse
|
||||||
*/
|
*/
|
||||||
@ -951,6 +1003,13 @@ export const zGetStatusesResponse = z.object({
|
|||||||
items: z.array(zStatusSchema),
|
items: z.array(zStatusSchema),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GetTagColorsResponse
|
||||||
|
*/
|
||||||
|
export const zGetTagColorsResponse = z.object({
|
||||||
|
items: z.array(zDealTagColorSchema),
|
||||||
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ValidationError
|
* ValidationError
|
||||||
*/
|
*/
|
||||||
@ -994,6 +1053,22 @@ export const zProductServicesDuplicateResponse = z.object({
|
|||||||
|
|
||||||
export const zSortDir = z.enum(["asc", "desc"]);
|
export const zSortDir = z.enum(["asc", "desc"]);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SwitchDealTagRequest
|
||||||
|
*/
|
||||||
|
export const zSwitchDealTagRequest = z.object({
|
||||||
|
tagId: z.int(),
|
||||||
|
dealId: z.optional(z.union([z.int(), z.null()])),
|
||||||
|
groupId: z.optional(z.union([z.int(), z.null()])),
|
||||||
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SwitchDealTagResponse
|
||||||
|
*/
|
||||||
|
export const zSwitchDealTagResponse = z.object({
|
||||||
|
message: z.string(),
|
||||||
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* UpdateBarcodeTemplateSchema
|
* UpdateBarcodeTemplateSchema
|
||||||
*/
|
*/
|
||||||
@ -1159,6 +1234,28 @@ export const zUpdateDealServiceResponse = z.object({
|
|||||||
message: z.string(),
|
message: z.string(),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* UpdateDealTagSchema
|
||||||
|
*/
|
||||||
|
export const zUpdateDealTagSchema = z.object({
|
||||||
|
name: z.optional(z.union([z.string(), z.null()])),
|
||||||
|
tagColor: z.optional(z.union([zDealTagColorSchema, z.null()])),
|
||||||
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* UpdateDealTagRequest
|
||||||
|
*/
|
||||||
|
export const zUpdateDealTagRequest = z.object({
|
||||||
|
entity: zUpdateDealTagSchema,
|
||||||
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* UpdateDealTagResponse
|
||||||
|
*/
|
||||||
|
export const zUpdateDealTagResponse = z.object({
|
||||||
|
message: z.string(),
|
||||||
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* UpdateDealsInGroupRequest
|
* UpdateDealsInGroupRequest
|
||||||
*/
|
*/
|
||||||
@ -1531,6 +1628,63 @@ export const zUpdateDealsInGroupData = z.object({
|
|||||||
*/
|
*/
|
||||||
export const zUpdateDealsInGroupResponse2 = zUpdateDealsInGroupResponse;
|
export const zUpdateDealsInGroupResponse2 = zUpdateDealsInGroupResponse;
|
||||||
|
|
||||||
|
export const zUpdateTagData = z.object({
|
||||||
|
body: zUpdateDealTagRequest,
|
||||||
|
path: z.optional(z.never()),
|
||||||
|
query: z.optional(z.never()),
|
||||||
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Successful Response
|
||||||
|
*/
|
||||||
|
export const zUpdateTagResponse = zUpdateDealTagResponse;
|
||||||
|
|
||||||
|
export const zCreateTagData = z.object({
|
||||||
|
body: zCreateDealTagRequest,
|
||||||
|
path: z.optional(z.never()),
|
||||||
|
query: z.optional(z.never()),
|
||||||
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Successful Response
|
||||||
|
*/
|
||||||
|
export const zCreateTagResponse = zCreateDealTagResponse;
|
||||||
|
|
||||||
|
export const zDeleteTagData = z.object({
|
||||||
|
body: z.optional(z.never()),
|
||||||
|
path: z.object({
|
||||||
|
deal_tag_id: z.int(),
|
||||||
|
}),
|
||||||
|
query: z.optional(z.never()),
|
||||||
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Successful Response
|
||||||
|
*/
|
||||||
|
export const zDeleteTagResponse = zDeleteDealTagResponse;
|
||||||
|
|
||||||
|
export const zSwitchDealTagData = z.object({
|
||||||
|
body: zSwitchDealTagRequest,
|
||||||
|
path: z.optional(z.never()),
|
||||||
|
query: z.optional(z.never()),
|
||||||
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Successful Response
|
||||||
|
*/
|
||||||
|
export const zSwitchDealTagResponse2 = zSwitchDealTagResponse;
|
||||||
|
|
||||||
|
export const zGetDealTagColorsData = z.object({
|
||||||
|
body: z.optional(z.never()),
|
||||||
|
path: z.optional(z.never()),
|
||||||
|
query: z.optional(z.never()),
|
||||||
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Successful Response
|
||||||
|
*/
|
||||||
|
export const zGetDealTagColorsResponse = zGetTagColorsResponse;
|
||||||
|
|
||||||
export const zGetBuiltInModulesData = z.object({
|
export const zGetBuiltInModulesData = z.object({
|
||||||
body: z.optional(z.never()),
|
body: z.optional(z.never()),
|
||||||
path: z.optional(z.never()),
|
path: z.optional(z.never()),
|
||||||
|
|||||||
Reference in New Issue
Block a user