feat: modules and module-editor pages
This commit is contained in:
@ -10,8 +10,10 @@ import {
|
||||
import type { AxiosError } from "axios";
|
||||
import { client as _heyApiClient } from "../client.gen";
|
||||
import {
|
||||
addAttributeToModule,
|
||||
addKitToDeal,
|
||||
addKitToDealProduct,
|
||||
createAttribute,
|
||||
createBarcodeTemplate,
|
||||
createBoard,
|
||||
createClient,
|
||||
@ -28,6 +30,7 @@ import {
|
||||
createServiceCategory,
|
||||
createServicesKit,
|
||||
createStatus,
|
||||
deleteAttribute,
|
||||
deleteBarcodeTemplate,
|
||||
deleteBoard,
|
||||
deleteClient,
|
||||
@ -38,6 +41,7 @@ import {
|
||||
deleteDealService,
|
||||
deleteDealTag,
|
||||
deleteMarketplace,
|
||||
deleteModule,
|
||||
deleteProduct,
|
||||
deleteProductBarcodeImage,
|
||||
deleteProject,
|
||||
@ -46,6 +50,8 @@ import {
|
||||
deleteServicesKit,
|
||||
deleteStatus,
|
||||
duplicateProductServices,
|
||||
getAttributes,
|
||||
getAttributeTypes,
|
||||
getBarcodeTemplateAttributes,
|
||||
getBarcodeTemplates,
|
||||
getBarcodeTemplateSizes,
|
||||
@ -59,6 +65,8 @@ import {
|
||||
getDealTags,
|
||||
getMarketplaces,
|
||||
getModules,
|
||||
getModulesWithAttributes,
|
||||
getModuleWithAttributes,
|
||||
getProductBarcodePdf,
|
||||
getProducts,
|
||||
getProjects,
|
||||
@ -67,7 +75,10 @@ import {
|
||||
getServicesKits,
|
||||
getStatuses,
|
||||
getStatusHistory,
|
||||
removeAttributeFromModule,
|
||||
switchDealTag,
|
||||
updateAttribute,
|
||||
updateAttributeLabel,
|
||||
updateBarcodeTemplate,
|
||||
updateBoard,
|
||||
updateClient,
|
||||
@ -79,6 +90,7 @@ import {
|
||||
updateDealsInGroup,
|
||||
updateDealTag,
|
||||
updateMarketplace,
|
||||
updateModule,
|
||||
updateProduct,
|
||||
updateProject,
|
||||
updateService,
|
||||
@ -90,12 +102,18 @@ import {
|
||||
type Options,
|
||||
} from "../sdk.gen";
|
||||
import type {
|
||||
AddAttributeToModuleData,
|
||||
AddAttributeToModuleError,
|
||||
AddAttributeToModuleResponse,
|
||||
AddKitToDealData,
|
||||
AddKitToDealError,
|
||||
AddKitToDealProductData,
|
||||
AddKitToDealProductError,
|
||||
AddKitToDealProductResponse,
|
||||
AddKitToDealResponse,
|
||||
CreateAttributeData,
|
||||
CreateAttributeError,
|
||||
CreateAttributeResponse2,
|
||||
CreateBarcodeTemplateData,
|
||||
CreateBarcodeTemplateError,
|
||||
CreateBarcodeTemplateResponse2,
|
||||
@ -144,6 +162,9 @@ import type {
|
||||
CreateStatusData,
|
||||
CreateStatusError,
|
||||
CreateStatusResponse2,
|
||||
DeleteAttributeData,
|
||||
DeleteAttributeError,
|
||||
DeleteAttributeResponse2,
|
||||
DeleteBarcodeTemplateData,
|
||||
DeleteBarcodeTemplateError,
|
||||
DeleteBarcodeTemplateResponse2,
|
||||
@ -174,6 +195,9 @@ import type {
|
||||
DeleteMarketplaceData,
|
||||
DeleteMarketplaceError,
|
||||
DeleteMarketplaceResponse2,
|
||||
DeleteModuleData,
|
||||
DeleteModuleError,
|
||||
DeleteModuleResponse2,
|
||||
DeleteProductBarcodeImageData,
|
||||
DeleteProductBarcodeImageError,
|
||||
DeleteProductBarcodeImageResponse,
|
||||
@ -198,6 +222,8 @@ import type {
|
||||
DuplicateProductServicesData,
|
||||
DuplicateProductServicesError,
|
||||
DuplicateProductServicesResponse,
|
||||
GetAttributesData,
|
||||
GetAttributeTypesData,
|
||||
GetBarcodeTemplateAttributesData,
|
||||
GetBarcodeTemplatesData,
|
||||
GetBarcodeTemplateSizesData,
|
||||
@ -214,6 +240,8 @@ import type {
|
||||
GetDealTagsData,
|
||||
GetMarketplacesData,
|
||||
GetModulesData,
|
||||
GetModulesWithAttributesData,
|
||||
GetModuleWithAttributesData,
|
||||
GetProductBarcodePdfData,
|
||||
GetProductBarcodePdfError,
|
||||
GetProductBarcodePdfResponse2,
|
||||
@ -226,9 +254,18 @@ import type {
|
||||
GetServicesKitsData,
|
||||
GetStatusesData,
|
||||
GetStatusHistoryData,
|
||||
RemoveAttributeFromModuleData,
|
||||
RemoveAttributeFromModuleError,
|
||||
RemoveAttributeFromModuleResponse,
|
||||
SwitchDealTagData,
|
||||
SwitchDealTagError,
|
||||
SwitchDealTagResponse2,
|
||||
UpdateAttributeData,
|
||||
UpdateAttributeError,
|
||||
UpdateAttributeLabelData,
|
||||
UpdateAttributeLabelError,
|
||||
UpdateAttributeLabelResponse2,
|
||||
UpdateAttributeResponse2,
|
||||
UpdateBarcodeTemplateData,
|
||||
UpdateBarcodeTemplateError,
|
||||
UpdateBarcodeTemplateResponse2,
|
||||
@ -262,6 +299,9 @@ import type {
|
||||
UpdateMarketplaceData,
|
||||
UpdateMarketplaceError,
|
||||
UpdateMarketplaceResponse2,
|
||||
UpdateModuleData,
|
||||
UpdateModuleError,
|
||||
UpdateModuleResponse,
|
||||
UpdateProductData,
|
||||
UpdateProductError,
|
||||
UpdateProductResponse2,
|
||||
@ -324,6 +364,207 @@ const createQueryKey = <TOptions extends Options>(
|
||||
return [params];
|
||||
};
|
||||
|
||||
export const getAttributesQueryKey = (options?: Options<GetAttributesData>) =>
|
||||
createQueryKey("getAttributes", options);
|
||||
|
||||
/**
|
||||
* Get Attributes
|
||||
*/
|
||||
export const getAttributesOptions = (options?: Options<GetAttributesData>) => {
|
||||
return queryOptions({
|
||||
queryFn: async ({ queryKey, signal }) => {
|
||||
const { data } = await getAttributes({
|
||||
...options,
|
||||
...queryKey[0],
|
||||
signal,
|
||||
throwOnError: true,
|
||||
});
|
||||
return data;
|
||||
},
|
||||
queryKey: getAttributesQueryKey(options),
|
||||
});
|
||||
};
|
||||
|
||||
export const createAttributeQueryKey = (
|
||||
options: Options<CreateAttributeData>
|
||||
) => createQueryKey("createAttribute", options);
|
||||
|
||||
/**
|
||||
* Create Attribute
|
||||
*/
|
||||
export const createAttributeOptions = (
|
||||
options: Options<CreateAttributeData>
|
||||
) => {
|
||||
return queryOptions({
|
||||
queryFn: async ({ queryKey, signal }) => {
|
||||
const { data } = await createAttribute({
|
||||
...options,
|
||||
...queryKey[0],
|
||||
signal,
|
||||
throwOnError: true,
|
||||
});
|
||||
return data;
|
||||
},
|
||||
queryKey: createAttributeQueryKey(options),
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Create Attribute
|
||||
*/
|
||||
export const createAttributeMutation = (
|
||||
options?: Partial<Options<CreateAttributeData>>
|
||||
): UseMutationOptions<
|
||||
CreateAttributeResponse2,
|
||||
AxiosError<CreateAttributeError>,
|
||||
Options<CreateAttributeData>
|
||||
> => {
|
||||
const mutationOptions: UseMutationOptions<
|
||||
CreateAttributeResponse2,
|
||||
AxiosError<CreateAttributeError>,
|
||||
Options<CreateAttributeData>
|
||||
> = {
|
||||
mutationFn: async localOptions => {
|
||||
const { data } = await createAttribute({
|
||||
...options,
|
||||
...localOptions,
|
||||
throwOnError: true,
|
||||
});
|
||||
return data;
|
||||
},
|
||||
};
|
||||
return mutationOptions;
|
||||
};
|
||||
|
||||
/**
|
||||
* Delete Attribute
|
||||
*/
|
||||
export const deleteAttributeMutation = (
|
||||
options?: Partial<Options<DeleteAttributeData>>
|
||||
): UseMutationOptions<
|
||||
DeleteAttributeResponse2,
|
||||
AxiosError<DeleteAttributeError>,
|
||||
Options<DeleteAttributeData>
|
||||
> => {
|
||||
const mutationOptions: UseMutationOptions<
|
||||
DeleteAttributeResponse2,
|
||||
AxiosError<DeleteAttributeError>,
|
||||
Options<DeleteAttributeData>
|
||||
> = {
|
||||
mutationFn: async localOptions => {
|
||||
const { data } = await deleteAttribute({
|
||||
...options,
|
||||
...localOptions,
|
||||
throwOnError: true,
|
||||
});
|
||||
return data;
|
||||
},
|
||||
};
|
||||
return mutationOptions;
|
||||
};
|
||||
|
||||
/**
|
||||
* Update Attribute
|
||||
*/
|
||||
export const updateAttributeMutation = (
|
||||
options?: Partial<Options<UpdateAttributeData>>
|
||||
): UseMutationOptions<
|
||||
UpdateAttributeResponse2,
|
||||
AxiosError<UpdateAttributeError>,
|
||||
Options<UpdateAttributeData>
|
||||
> => {
|
||||
const mutationOptions: UseMutationOptions<
|
||||
UpdateAttributeResponse2,
|
||||
AxiosError<UpdateAttributeError>,
|
||||
Options<UpdateAttributeData>
|
||||
> = {
|
||||
mutationFn: async localOptions => {
|
||||
const { data } = await updateAttribute({
|
||||
...options,
|
||||
...localOptions,
|
||||
throwOnError: true,
|
||||
});
|
||||
return data;
|
||||
},
|
||||
};
|
||||
return mutationOptions;
|
||||
};
|
||||
|
||||
export const updateAttributeLabelQueryKey = (
|
||||
options: Options<UpdateAttributeLabelData>
|
||||
) => createQueryKey("updateAttributeLabel", options);
|
||||
|
||||
/**
|
||||
* Update Attribute Label
|
||||
*/
|
||||
export const updateAttributeLabelOptions = (
|
||||
options: Options<UpdateAttributeLabelData>
|
||||
) => {
|
||||
return queryOptions({
|
||||
queryFn: async ({ queryKey, signal }) => {
|
||||
const { data } = await updateAttributeLabel({
|
||||
...options,
|
||||
...queryKey[0],
|
||||
signal,
|
||||
throwOnError: true,
|
||||
});
|
||||
return data;
|
||||
},
|
||||
queryKey: updateAttributeLabelQueryKey(options),
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Update Attribute Label
|
||||
*/
|
||||
export const updateAttributeLabelMutation = (
|
||||
options?: Partial<Options<UpdateAttributeLabelData>>
|
||||
): UseMutationOptions<
|
||||
UpdateAttributeLabelResponse2,
|
||||
AxiosError<UpdateAttributeLabelError>,
|
||||
Options<UpdateAttributeLabelData>
|
||||
> => {
|
||||
const mutationOptions: UseMutationOptions<
|
||||
UpdateAttributeLabelResponse2,
|
||||
AxiosError<UpdateAttributeLabelError>,
|
||||
Options<UpdateAttributeLabelData>
|
||||
> = {
|
||||
mutationFn: async localOptions => {
|
||||
const { data } = await updateAttributeLabel({
|
||||
...options,
|
||||
...localOptions,
|
||||
throwOnError: true,
|
||||
});
|
||||
return data;
|
||||
},
|
||||
};
|
||||
return mutationOptions;
|
||||
};
|
||||
|
||||
export const getAttributeTypesQueryKey = (
|
||||
options?: Options<GetAttributeTypesData>
|
||||
) => createQueryKey("getAttributeTypes", options);
|
||||
|
||||
/**
|
||||
* Get Attribute Types
|
||||
*/
|
||||
export const getAttributeTypesOptions = (
|
||||
options?: Options<GetAttributeTypesData>
|
||||
) => {
|
||||
return queryOptions({
|
||||
queryFn: async ({ queryKey, signal }) => {
|
||||
const { data } = await getAttributeTypes({
|
||||
...options,
|
||||
...queryKey[0],
|
||||
signal,
|
||||
throwOnError: true,
|
||||
});
|
||||
return data;
|
||||
},
|
||||
queryKey: getAttributeTypesQueryKey(options),
|
||||
});
|
||||
};
|
||||
|
||||
export const getBoardsQueryKey = (options: Options<GetBoardsData>) =>
|
||||
createQueryKey("getBoards", options);
|
||||
|
||||
@ -1054,6 +1295,186 @@ export const getModulesOptions = (options?: Options<GetModulesData>) => {
|
||||
});
|
||||
};
|
||||
|
||||
export const getModulesWithAttributesQueryKey = (
|
||||
options?: Options<GetModulesWithAttributesData>
|
||||
) => createQueryKey("getModulesWithAttributes", options);
|
||||
|
||||
/**
|
||||
* Get Modules With Attributes
|
||||
*/
|
||||
export const getModulesWithAttributesOptions = (
|
||||
options?: Options<GetModulesWithAttributesData>
|
||||
) => {
|
||||
return queryOptions({
|
||||
queryFn: async ({ queryKey, signal }) => {
|
||||
const { data } = await getModulesWithAttributes({
|
||||
...options,
|
||||
...queryKey[0],
|
||||
signal,
|
||||
throwOnError: true,
|
||||
});
|
||||
return data;
|
||||
},
|
||||
queryKey: getModulesWithAttributesQueryKey(options),
|
||||
});
|
||||
};
|
||||
|
||||
export const getModuleWithAttributesQueryKey = (
|
||||
options: Options<GetModuleWithAttributesData>
|
||||
) => createQueryKey("getModuleWithAttributes", options);
|
||||
|
||||
/**
|
||||
* Get Module With Attributes
|
||||
*/
|
||||
export const getModuleWithAttributesOptions = (
|
||||
options: Options<GetModuleWithAttributesData>
|
||||
) => {
|
||||
return queryOptions({
|
||||
queryFn: async ({ queryKey, signal }) => {
|
||||
const { data } = await getModuleWithAttributes({
|
||||
...options,
|
||||
...queryKey[0],
|
||||
signal,
|
||||
throwOnError: true,
|
||||
});
|
||||
return data;
|
||||
},
|
||||
queryKey: getModuleWithAttributesQueryKey(options),
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Update Module Common Info
|
||||
*/
|
||||
export const updateModuleMutation = (
|
||||
options?: Partial<Options<UpdateModuleData>>
|
||||
): UseMutationOptions<
|
||||
UpdateModuleResponse,
|
||||
AxiosError<UpdateModuleError>,
|
||||
Options<UpdateModuleData>
|
||||
> => {
|
||||
const mutationOptions: UseMutationOptions<
|
||||
UpdateModuleResponse,
|
||||
AxiosError<UpdateModuleError>,
|
||||
Options<UpdateModuleData>
|
||||
> = {
|
||||
mutationFn: async localOptions => {
|
||||
const { data } = await updateModule({
|
||||
...options,
|
||||
...localOptions,
|
||||
throwOnError: true,
|
||||
});
|
||||
return data;
|
||||
},
|
||||
};
|
||||
return mutationOptions;
|
||||
};
|
||||
|
||||
/**
|
||||
* Delete Module
|
||||
*/
|
||||
export const deleteModuleMutation = (
|
||||
options?: Partial<Options<DeleteModuleData>>
|
||||
): UseMutationOptions<
|
||||
DeleteModuleResponse2,
|
||||
AxiosError<DeleteModuleError>,
|
||||
Options<DeleteModuleData>
|
||||
> => {
|
||||
const mutationOptions: UseMutationOptions<
|
||||
DeleteModuleResponse2,
|
||||
AxiosError<DeleteModuleError>,
|
||||
Options<DeleteModuleData>
|
||||
> = {
|
||||
mutationFn: async localOptions => {
|
||||
const { data } = await deleteModule({
|
||||
...options,
|
||||
...localOptions,
|
||||
throwOnError: true,
|
||||
});
|
||||
return data;
|
||||
},
|
||||
};
|
||||
return mutationOptions;
|
||||
};
|
||||
|
||||
/**
|
||||
* Remove Attribute From Module
|
||||
*/
|
||||
export const removeAttributeFromModuleMutation = (
|
||||
options?: Partial<Options<RemoveAttributeFromModuleData>>
|
||||
): UseMutationOptions<
|
||||
RemoveAttributeFromModuleResponse,
|
||||
AxiosError<RemoveAttributeFromModuleError>,
|
||||
Options<RemoveAttributeFromModuleData>
|
||||
> => {
|
||||
const mutationOptions: UseMutationOptions<
|
||||
RemoveAttributeFromModuleResponse,
|
||||
AxiosError<RemoveAttributeFromModuleError>,
|
||||
Options<RemoveAttributeFromModuleData>
|
||||
> = {
|
||||
mutationFn: async localOptions => {
|
||||
const { data } = await removeAttributeFromModule({
|
||||
...options,
|
||||
...localOptions,
|
||||
throwOnError: true,
|
||||
});
|
||||
return data;
|
||||
},
|
||||
};
|
||||
return mutationOptions;
|
||||
};
|
||||
|
||||
export const addAttributeToModuleQueryKey = (
|
||||
options: Options<AddAttributeToModuleData>
|
||||
) => createQueryKey("addAttributeToModule", options);
|
||||
|
||||
/**
|
||||
* Add Attribute To Module
|
||||
*/
|
||||
export const addAttributeToModuleOptions = (
|
||||
options: Options<AddAttributeToModuleData>
|
||||
) => {
|
||||
return queryOptions({
|
||||
queryFn: async ({ queryKey, signal }) => {
|
||||
const { data } = await addAttributeToModule({
|
||||
...options,
|
||||
...queryKey[0],
|
||||
signal,
|
||||
throwOnError: true,
|
||||
});
|
||||
return data;
|
||||
},
|
||||
queryKey: addAttributeToModuleQueryKey(options),
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Add Attribute To Module
|
||||
*/
|
||||
export const addAttributeToModuleMutation = (
|
||||
options?: Partial<Options<AddAttributeToModuleData>>
|
||||
): UseMutationOptions<
|
||||
AddAttributeToModuleResponse,
|
||||
AxiosError<AddAttributeToModuleError>,
|
||||
Options<AddAttributeToModuleData>
|
||||
> => {
|
||||
const mutationOptions: UseMutationOptions<
|
||||
AddAttributeToModuleResponse,
|
||||
AxiosError<AddAttributeToModuleError>,
|
||||
Options<AddAttributeToModuleData>
|
||||
> = {
|
||||
mutationFn: async localOptions => {
|
||||
const { data } = await addAttributeToModule({
|
||||
...options,
|
||||
...localOptions,
|
||||
throwOnError: true,
|
||||
});
|
||||
return data;
|
||||
},
|
||||
};
|
||||
return mutationOptions;
|
||||
};
|
||||
|
||||
export const getClientsQueryKey = (options?: Options<GetClientsData>) =>
|
||||
createQueryKey("getClients", options);
|
||||
|
||||
|
||||
@ -8,12 +8,18 @@ import {
|
||||
} from "./client";
|
||||
import { client as _heyApiClient } from "./client.gen";
|
||||
import type {
|
||||
AddAttributeToModuleData,
|
||||
AddAttributeToModuleErrors,
|
||||
AddAttributeToModuleResponses,
|
||||
AddKitToDealData,
|
||||
AddKitToDealErrors,
|
||||
AddKitToDealProductData,
|
||||
AddKitToDealProductErrors,
|
||||
AddKitToDealProductResponses,
|
||||
AddKitToDealResponses,
|
||||
CreateAttributeData,
|
||||
CreateAttributeErrors,
|
||||
CreateAttributeResponses,
|
||||
CreateBarcodeTemplateData,
|
||||
CreateBarcodeTemplateErrors,
|
||||
CreateBarcodeTemplateResponses,
|
||||
@ -62,6 +68,9 @@ import type {
|
||||
CreateStatusData,
|
||||
CreateStatusErrors,
|
||||
CreateStatusResponses,
|
||||
DeleteAttributeData,
|
||||
DeleteAttributeErrors,
|
||||
DeleteAttributeResponses,
|
||||
DeleteBarcodeTemplateData,
|
||||
DeleteBarcodeTemplateErrors,
|
||||
DeleteBarcodeTemplateResponses,
|
||||
@ -92,6 +101,9 @@ import type {
|
||||
DeleteMarketplaceData,
|
||||
DeleteMarketplaceErrors,
|
||||
DeleteMarketplaceResponses,
|
||||
DeleteModuleData,
|
||||
DeleteModuleErrors,
|
||||
DeleteModuleResponses,
|
||||
DeleteProductBarcodeImageData,
|
||||
DeleteProductBarcodeImageErrors,
|
||||
DeleteProductBarcodeImageResponses,
|
||||
@ -116,6 +128,10 @@ import type {
|
||||
DuplicateProductServicesData,
|
||||
DuplicateProductServicesErrors,
|
||||
DuplicateProductServicesResponses,
|
||||
GetAttributesData,
|
||||
GetAttributesResponses,
|
||||
GetAttributeTypesData,
|
||||
GetAttributeTypesResponses,
|
||||
GetBarcodeTemplateAttributesData,
|
||||
GetBarcodeTemplateAttributesResponses,
|
||||
GetBarcodeTemplatesData,
|
||||
@ -149,6 +165,11 @@ import type {
|
||||
GetMarketplacesResponses,
|
||||
GetModulesData,
|
||||
GetModulesResponses,
|
||||
GetModulesWithAttributesData,
|
||||
GetModulesWithAttributesResponses,
|
||||
GetModuleWithAttributesData,
|
||||
GetModuleWithAttributesErrors,
|
||||
GetModuleWithAttributesResponses,
|
||||
GetProductBarcodePdfData,
|
||||
GetProductBarcodePdfErrors,
|
||||
GetProductBarcodePdfResponses,
|
||||
@ -169,9 +190,18 @@ import type {
|
||||
GetStatusHistoryData,
|
||||
GetStatusHistoryErrors,
|
||||
GetStatusHistoryResponses,
|
||||
RemoveAttributeFromModuleData,
|
||||
RemoveAttributeFromModuleErrors,
|
||||
RemoveAttributeFromModuleResponses,
|
||||
SwitchDealTagData,
|
||||
SwitchDealTagErrors,
|
||||
SwitchDealTagResponses,
|
||||
UpdateAttributeData,
|
||||
UpdateAttributeErrors,
|
||||
UpdateAttributeLabelData,
|
||||
UpdateAttributeLabelErrors,
|
||||
UpdateAttributeLabelResponses,
|
||||
UpdateAttributeResponses,
|
||||
UpdateBarcodeTemplateData,
|
||||
UpdateBarcodeTemplateErrors,
|
||||
UpdateBarcodeTemplateResponses,
|
||||
@ -205,6 +235,9 @@ import type {
|
||||
UpdateMarketplaceData,
|
||||
UpdateMarketplaceErrors,
|
||||
UpdateMarketplaceResponses,
|
||||
UpdateModuleData,
|
||||
UpdateModuleErrors,
|
||||
UpdateModuleResponses,
|
||||
UpdateProductData,
|
||||
UpdateProductErrors,
|
||||
UpdateProductResponses,
|
||||
@ -231,10 +264,14 @@ import type {
|
||||
UploadProductImageResponses,
|
||||
} from "./types.gen";
|
||||
import {
|
||||
zAddAttributeToModuleData,
|
||||
zAddAttributeToModuleResponse,
|
||||
zAddKitToDealData,
|
||||
zAddKitToDealProductData,
|
||||
zAddKitToDealProductResponse,
|
||||
zAddKitToDealResponse,
|
||||
zCreateAttributeData,
|
||||
zCreateAttributeResponse2,
|
||||
zCreateBarcodeTemplateData,
|
||||
zCreateBarcodeTemplateResponse2,
|
||||
zCreateBoardData,
|
||||
@ -267,6 +304,8 @@ import {
|
||||
zCreateServicesKitResponse2,
|
||||
zCreateStatusData,
|
||||
zCreateStatusResponse2,
|
||||
zDeleteAttributeData,
|
||||
zDeleteAttributeResponse2,
|
||||
zDeleteBarcodeTemplateData,
|
||||
zDeleteBarcodeTemplateResponse2,
|
||||
zDeleteBoardData,
|
||||
@ -287,6 +326,8 @@ import {
|
||||
zDeleteDealTagResponse2,
|
||||
zDeleteMarketplaceData,
|
||||
zDeleteMarketplaceResponse2,
|
||||
zDeleteModuleData,
|
||||
zDeleteModuleResponse2,
|
||||
zDeleteProductBarcodeImageData,
|
||||
zDeleteProductBarcodeImageResponse,
|
||||
zDeleteProductData,
|
||||
@ -303,6 +344,10 @@ import {
|
||||
zDeleteStatusResponse2,
|
||||
zDuplicateProductServicesData,
|
||||
zDuplicateProductServicesResponse,
|
||||
zGetAttributesData,
|
||||
zGetAttributesResponse,
|
||||
zGetAttributeTypesData,
|
||||
zGetAttributeTypesResponse,
|
||||
zGetBarcodeTemplateAttributesData,
|
||||
zGetBarcodeTemplateAttributesResponse,
|
||||
zGetBarcodeTemplatesData,
|
||||
@ -329,6 +374,10 @@ import {
|
||||
zGetMarketplacesResponse2,
|
||||
zGetModulesData,
|
||||
zGetModulesResponse,
|
||||
zGetModulesWithAttributesData,
|
||||
zGetModulesWithAttributesResponse,
|
||||
zGetModuleWithAttributesData,
|
||||
zGetModuleWithAttributesResponse,
|
||||
zGetProductBarcodePdfData,
|
||||
zGetProductBarcodePdfResponse2,
|
||||
zGetProductsData,
|
||||
@ -345,8 +394,14 @@ import {
|
||||
zGetStatusesResponse2,
|
||||
zGetStatusHistoryData,
|
||||
zGetStatusHistoryResponse2,
|
||||
zRemoveAttributeFromModuleData,
|
||||
zRemoveAttributeFromModuleResponse,
|
||||
zSwitchDealTagData,
|
||||
zSwitchDealTagResponse2,
|
||||
zUpdateAttributeData,
|
||||
zUpdateAttributeLabelData,
|
||||
zUpdateAttributeLabelResponse2,
|
||||
zUpdateAttributeResponse2,
|
||||
zUpdateBarcodeTemplateData,
|
||||
zUpdateBarcodeTemplateResponse2,
|
||||
zUpdateBoardData,
|
||||
@ -369,6 +424,8 @@ import {
|
||||
zUpdateDealTagResponse2,
|
||||
zUpdateMarketplaceData,
|
||||
zUpdateMarketplaceResponse2,
|
||||
zUpdateModuleData,
|
||||
zUpdateModuleResponse,
|
||||
zUpdateProductData,
|
||||
zUpdateProductResponse2,
|
||||
zUpdateProjectData,
|
||||
@ -404,6 +461,156 @@ export type Options<
|
||||
meta?: Record<string, unknown>;
|
||||
};
|
||||
|
||||
/**
|
||||
* Get Attributes
|
||||
*/
|
||||
export const getAttributes = <ThrowOnError extends boolean = false>(
|
||||
options?: Options<GetAttributesData, ThrowOnError>
|
||||
) => {
|
||||
return (options?.client ?? _heyApiClient).get<
|
||||
GetAttributesResponses,
|
||||
unknown,
|
||||
ThrowOnError
|
||||
>({
|
||||
requestValidator: async data => {
|
||||
return await zGetAttributesData.parseAsync(data);
|
||||
},
|
||||
responseType: "json",
|
||||
responseValidator: async data => {
|
||||
return await zGetAttributesResponse.parseAsync(data);
|
||||
},
|
||||
url: "/crm/v1/attribute/",
|
||||
...options,
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Create Attribute
|
||||
*/
|
||||
export const createAttribute = <ThrowOnError extends boolean = false>(
|
||||
options: Options<CreateAttributeData, ThrowOnError>
|
||||
) => {
|
||||
return (options.client ?? _heyApiClient).post<
|
||||
CreateAttributeResponses,
|
||||
CreateAttributeErrors,
|
||||
ThrowOnError
|
||||
>({
|
||||
requestValidator: async data => {
|
||||
return await zCreateAttributeData.parseAsync(data);
|
||||
},
|
||||
responseType: "json",
|
||||
responseValidator: async data => {
|
||||
return await zCreateAttributeResponse2.parseAsync(data);
|
||||
},
|
||||
url: "/crm/v1/attribute/",
|
||||
...options,
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
...options.headers,
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Delete Attribute
|
||||
*/
|
||||
export const deleteAttribute = <ThrowOnError extends boolean = false>(
|
||||
options: Options<DeleteAttributeData, ThrowOnError>
|
||||
) => {
|
||||
return (options.client ?? _heyApiClient).delete<
|
||||
DeleteAttributeResponses,
|
||||
DeleteAttributeErrors,
|
||||
ThrowOnError
|
||||
>({
|
||||
requestValidator: async data => {
|
||||
return await zDeleteAttributeData.parseAsync(data);
|
||||
},
|
||||
responseType: "json",
|
||||
responseValidator: async data => {
|
||||
return await zDeleteAttributeResponse2.parseAsync(data);
|
||||
},
|
||||
url: "/crm/v1/attribute/{pk}",
|
||||
...options,
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Update Attribute
|
||||
*/
|
||||
export const updateAttribute = <ThrowOnError extends boolean = false>(
|
||||
options: Options<UpdateAttributeData, ThrowOnError>
|
||||
) => {
|
||||
return (options.client ?? _heyApiClient).patch<
|
||||
UpdateAttributeResponses,
|
||||
UpdateAttributeErrors,
|
||||
ThrowOnError
|
||||
>({
|
||||
requestValidator: async data => {
|
||||
return await zUpdateAttributeData.parseAsync(data);
|
||||
},
|
||||
responseType: "json",
|
||||
responseValidator: async data => {
|
||||
return await zUpdateAttributeResponse2.parseAsync(data);
|
||||
},
|
||||
url: "/crm/v1/attribute/{pk}",
|
||||
...options,
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
...options.headers,
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Update Attribute Label
|
||||
*/
|
||||
export const updateAttributeLabel = <ThrowOnError extends boolean = false>(
|
||||
options: Options<UpdateAttributeLabelData, ThrowOnError>
|
||||
) => {
|
||||
return (options.client ?? _heyApiClient).post<
|
||||
UpdateAttributeLabelResponses,
|
||||
UpdateAttributeLabelErrors,
|
||||
ThrowOnError
|
||||
>({
|
||||
requestValidator: async data => {
|
||||
return await zUpdateAttributeLabelData.parseAsync(data);
|
||||
},
|
||||
responseType: "json",
|
||||
responseValidator: async data => {
|
||||
return await zUpdateAttributeLabelResponse2.parseAsync(data);
|
||||
},
|
||||
url: "/crm/v1/attribute/label",
|
||||
...options,
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
...options.headers,
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Get Attribute Types
|
||||
*/
|
||||
export const getAttributeTypes = <ThrowOnError extends boolean = false>(
|
||||
options?: Options<GetAttributeTypesData, ThrowOnError>
|
||||
) => {
|
||||
return (options?.client ?? _heyApiClient).get<
|
||||
GetAttributeTypesResponses,
|
||||
unknown,
|
||||
ThrowOnError
|
||||
>({
|
||||
requestValidator: async data => {
|
||||
return await zGetAttributeTypesData.parseAsync(data);
|
||||
},
|
||||
responseType: "json",
|
||||
responseValidator: async data => {
|
||||
return await zGetAttributeTypesResponse.parseAsync(data);
|
||||
},
|
||||
url: "/crm/v1/attribute/type",
|
||||
...options,
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Get Boards
|
||||
*/
|
||||
@ -876,11 +1083,161 @@ export const getModules = <ThrowOnError extends boolean = false>(
|
||||
responseValidator: async data => {
|
||||
return await zGetModulesResponse.parseAsync(data);
|
||||
},
|
||||
url: "/crm/v1/module/built-in/",
|
||||
url: "/crm/v1/module/",
|
||||
...options,
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Get Modules With Attributes
|
||||
*/
|
||||
export const getModulesWithAttributes = <ThrowOnError extends boolean = false>(
|
||||
options?: Options<GetModulesWithAttributesData, ThrowOnError>
|
||||
) => {
|
||||
return (options?.client ?? _heyApiClient).get<
|
||||
GetModulesWithAttributesResponses,
|
||||
unknown,
|
||||
ThrowOnError
|
||||
>({
|
||||
requestValidator: async data => {
|
||||
return await zGetModulesWithAttributesData.parseAsync(data);
|
||||
},
|
||||
responseType: "json",
|
||||
responseValidator: async data => {
|
||||
return await zGetModulesWithAttributesResponse.parseAsync(data);
|
||||
},
|
||||
url: "/crm/v1/module/with-attributes",
|
||||
...options,
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Get Module With Attributes
|
||||
*/
|
||||
export const getModuleWithAttributes = <ThrowOnError extends boolean = false>(
|
||||
options: Options<GetModuleWithAttributesData, ThrowOnError>
|
||||
) => {
|
||||
return (options.client ?? _heyApiClient).get<
|
||||
GetModuleWithAttributesResponses,
|
||||
GetModuleWithAttributesErrors,
|
||||
ThrowOnError
|
||||
>({
|
||||
requestValidator: async data => {
|
||||
return await zGetModuleWithAttributesData.parseAsync(data);
|
||||
},
|
||||
responseType: "json",
|
||||
responseValidator: async data => {
|
||||
return await zGetModuleWithAttributesResponse.parseAsync(data);
|
||||
},
|
||||
url: "/crm/v1/module/{pk}/with-attributes",
|
||||
...options,
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Update Module Common Info
|
||||
*/
|
||||
export const updateModule = <ThrowOnError extends boolean = false>(
|
||||
options: Options<UpdateModuleData, ThrowOnError>
|
||||
) => {
|
||||
return (options.client ?? _heyApiClient).patch<
|
||||
UpdateModuleResponses,
|
||||
UpdateModuleErrors,
|
||||
ThrowOnError
|
||||
>({
|
||||
requestValidator: async data => {
|
||||
return await zUpdateModuleData.parseAsync(data);
|
||||
},
|
||||
responseType: "json",
|
||||
responseValidator: async data => {
|
||||
return await zUpdateModuleResponse.parseAsync(data);
|
||||
},
|
||||
url: "/crm/v1/module/{pk}/common-info",
|
||||
...options,
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
...options.headers,
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Delete Module
|
||||
*/
|
||||
export const deleteModule = <ThrowOnError extends boolean = false>(
|
||||
options: Options<DeleteModuleData, ThrowOnError>
|
||||
) => {
|
||||
return (options.client ?? _heyApiClient).delete<
|
||||
DeleteModuleResponses,
|
||||
DeleteModuleErrors,
|
||||
ThrowOnError
|
||||
>({
|
||||
requestValidator: async data => {
|
||||
return await zDeleteModuleData.parseAsync(data);
|
||||
},
|
||||
responseType: "json",
|
||||
responseValidator: async data => {
|
||||
return await zDeleteModuleResponse2.parseAsync(data);
|
||||
},
|
||||
url: "/crm/v1/module/{pk}",
|
||||
...options,
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Remove Attribute From Module
|
||||
*/
|
||||
export const removeAttributeFromModule = <ThrowOnError extends boolean = false>(
|
||||
options: Options<RemoveAttributeFromModuleData, ThrowOnError>
|
||||
) => {
|
||||
return (options.client ?? _heyApiClient).delete<
|
||||
RemoveAttributeFromModuleResponses,
|
||||
RemoveAttributeFromModuleErrors,
|
||||
ThrowOnError
|
||||
>({
|
||||
requestValidator: async data => {
|
||||
return await zRemoveAttributeFromModuleData.parseAsync(data);
|
||||
},
|
||||
responseType: "json",
|
||||
responseValidator: async data => {
|
||||
return await zRemoveAttributeFromModuleResponse.parseAsync(data);
|
||||
},
|
||||
url: "/crm/v1/module/attribute",
|
||||
...options,
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
...options.headers,
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Add Attribute To Module
|
||||
*/
|
||||
export const addAttributeToModule = <ThrowOnError extends boolean = false>(
|
||||
options: Options<AddAttributeToModuleData, ThrowOnError>
|
||||
) => {
|
||||
return (options.client ?? _heyApiClient).post<
|
||||
AddAttributeToModuleResponses,
|
||||
AddAttributeToModuleErrors,
|
||||
ThrowOnError
|
||||
>({
|
||||
requestValidator: async data => {
|
||||
return await zAddAttributeToModuleData.parseAsync(data);
|
||||
},
|
||||
responseType: "json",
|
||||
responseValidator: async data => {
|
||||
return await zAddAttributeToModuleResponse.parseAsync(data);
|
||||
},
|
||||
url: "/crm/v1/module/attribute",
|
||||
...options,
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
...options.headers,
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Get Clients
|
||||
*/
|
||||
|
||||
@ -1,5 +1,96 @@
|
||||
// This file is auto-generated by @hey-api/openapi-ts
|
||||
|
||||
/**
|
||||
* AddAttributeRequest
|
||||
*/
|
||||
export type AddAttributeRequest = {
|
||||
/**
|
||||
* Attributeid
|
||||
*/
|
||||
attributeId: number;
|
||||
/**
|
||||
* Moduleid
|
||||
*/
|
||||
moduleId: number;
|
||||
};
|
||||
|
||||
/**
|
||||
* AddAttributeResponse
|
||||
*/
|
||||
export type AddAttributeResponse = {
|
||||
/**
|
||||
* Message
|
||||
*/
|
||||
message: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* AttributeSchema
|
||||
*/
|
||||
export type AttributeSchema = {
|
||||
/**
|
||||
* Label
|
||||
*/
|
||||
label: string;
|
||||
/**
|
||||
* Isapplicabletogroup
|
||||
*/
|
||||
isApplicableToGroup: boolean;
|
||||
/**
|
||||
* Isshownondashboard
|
||||
*/
|
||||
isShownOnDashboard: boolean;
|
||||
/**
|
||||
* Ishighlightifexpired
|
||||
*/
|
||||
isHighlightIfExpired: boolean;
|
||||
/**
|
||||
* Isnullable
|
||||
*/
|
||||
isNullable: boolean;
|
||||
/**
|
||||
* Defaultvalue
|
||||
*/
|
||||
defaultValue: {
|
||||
[key: string]: unknown;
|
||||
} | null;
|
||||
/**
|
||||
* Description
|
||||
*/
|
||||
description: string;
|
||||
/**
|
||||
* Typeid
|
||||
*/
|
||||
typeId: number;
|
||||
/**
|
||||
* Id
|
||||
*/
|
||||
id: number;
|
||||
/**
|
||||
* Isbuiltin
|
||||
*/
|
||||
isBuiltIn: boolean;
|
||||
type: AttributeTypeSchema;
|
||||
};
|
||||
|
||||
/**
|
||||
* AttributeTypeSchema
|
||||
*/
|
||||
export type AttributeTypeSchema = {
|
||||
/**
|
||||
* Id
|
||||
*/
|
||||
id: number;
|
||||
/**
|
||||
* Type
|
||||
*/
|
||||
type: string;
|
||||
/**
|
||||
* Name
|
||||
*/
|
||||
name: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* BarcodeTemplateAttributeSchema
|
||||
*/
|
||||
@ -186,6 +277,63 @@ export type ClientSchema = {
|
||||
isDeleted?: boolean;
|
||||
};
|
||||
|
||||
/**
|
||||
* CreateAttributeRequest
|
||||
*/
|
||||
export type CreateAttributeRequest = {
|
||||
entity: CreateAttributeSchema;
|
||||
};
|
||||
|
||||
/**
|
||||
* CreateAttributeResponse
|
||||
*/
|
||||
export type CreateAttributeResponse = {
|
||||
/**
|
||||
* Message
|
||||
*/
|
||||
message: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* CreateAttributeSchema
|
||||
*/
|
||||
export type CreateAttributeSchema = {
|
||||
/**
|
||||
* Label
|
||||
*/
|
||||
label: string;
|
||||
/**
|
||||
* Isapplicabletogroup
|
||||
*/
|
||||
isApplicableToGroup: boolean;
|
||||
/**
|
||||
* Isshownondashboard
|
||||
*/
|
||||
isShownOnDashboard: boolean;
|
||||
/**
|
||||
* Ishighlightifexpired
|
||||
*/
|
||||
isHighlightIfExpired: boolean;
|
||||
/**
|
||||
* Isnullable
|
||||
*/
|
||||
isNullable: boolean;
|
||||
/**
|
||||
* Defaultvalue
|
||||
*/
|
||||
defaultValue: {
|
||||
[key: string]: unknown;
|
||||
} | null;
|
||||
/**
|
||||
* Description
|
||||
*/
|
||||
description: string;
|
||||
/**
|
||||
* Typeid
|
||||
*/
|
||||
typeId: number;
|
||||
};
|
||||
|
||||
/**
|
||||
* CreateBarcodeTemplateRequest
|
||||
*/
|
||||
@ -1020,6 +1168,30 @@ export type DealTagSchema = {
|
||||
tagColor: DealTagColorSchema;
|
||||
};
|
||||
|
||||
/**
|
||||
* DeleteAttributeRequest
|
||||
*/
|
||||
export type DeleteAttributeRequest = {
|
||||
/**
|
||||
* Attributeid
|
||||
*/
|
||||
attributeId: number;
|
||||
/**
|
||||
* Moduleid
|
||||
*/
|
||||
moduleId: number;
|
||||
};
|
||||
|
||||
/**
|
||||
* DeleteAttributeResponse
|
||||
*/
|
||||
export type DeleteAttributeResponse = {
|
||||
/**
|
||||
* Message
|
||||
*/
|
||||
message: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* DeleteBarcodeImageResponse
|
||||
*/
|
||||
@ -1120,6 +1292,16 @@ export type DeleteMarketplaceResponse = {
|
||||
message: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* DeleteModuleResponse
|
||||
*/
|
||||
export type DeleteModuleResponse = {
|
||||
/**
|
||||
* Message
|
||||
*/
|
||||
message: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* DeleteProductResponse
|
||||
*/
|
||||
@ -1190,6 +1372,26 @@ export type DeleteStatusResponse = {
|
||||
message: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* GetAllAttributeTypesResponse
|
||||
*/
|
||||
export type GetAllAttributeTypesResponse = {
|
||||
/**
|
||||
* Items
|
||||
*/
|
||||
items: Array<AttributeTypeSchema>;
|
||||
};
|
||||
|
||||
/**
|
||||
* GetAllAttributesResponse
|
||||
*/
|
||||
export type GetAllAttributesResponse = {
|
||||
/**
|
||||
* Items
|
||||
*/
|
||||
items: Array<AttributeSchema>;
|
||||
};
|
||||
|
||||
/**
|
||||
* GetAllModulesResponse
|
||||
*/
|
||||
@ -1200,6 +1402,16 @@ export type GetAllModulesResponse = {
|
||||
items: Array<ModuleSchemaOutput>;
|
||||
};
|
||||
|
||||
/**
|
||||
* GetAllWithAttributesResponse
|
||||
*/
|
||||
export type GetAllWithAttributesResponse = {
|
||||
/**
|
||||
* Items
|
||||
*/
|
||||
items: Array<ModuleWithAttributesSchema>;
|
||||
};
|
||||
|
||||
/**
|
||||
* GetBarcodeAttributesResponse
|
||||
*/
|
||||
@ -1250,6 +1462,13 @@ export type GetBoardsResponse = {
|
||||
items: Array<BoardSchema>;
|
||||
};
|
||||
|
||||
/**
|
||||
* GetByIdWithAttributesResponse
|
||||
*/
|
||||
export type GetByIdWithAttributesResponse = {
|
||||
entity: ModuleWithAttributesSchema;
|
||||
};
|
||||
|
||||
/**
|
||||
* GetClientsResponse
|
||||
*/
|
||||
@ -1464,6 +1683,59 @@ export type MarketplaceSchema = {
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* ModuleAttributeSchema
|
||||
*/
|
||||
export type ModuleAttributeSchema = {
|
||||
/**
|
||||
* Label
|
||||
*/
|
||||
label: string;
|
||||
/**
|
||||
* Isapplicabletogroup
|
||||
*/
|
||||
isApplicableToGroup: boolean;
|
||||
/**
|
||||
* Isshownondashboard
|
||||
*/
|
||||
isShownOnDashboard: boolean;
|
||||
/**
|
||||
* Ishighlightifexpired
|
||||
*/
|
||||
isHighlightIfExpired: boolean;
|
||||
/**
|
||||
* Isnullable
|
||||
*/
|
||||
isNullable: boolean;
|
||||
/**
|
||||
* Defaultvalue
|
||||
*/
|
||||
defaultValue: {
|
||||
[key: string]: unknown;
|
||||
} | null;
|
||||
/**
|
||||
* Description
|
||||
*/
|
||||
description: string;
|
||||
/**
|
||||
* Typeid
|
||||
*/
|
||||
typeId: number;
|
||||
/**
|
||||
* Id
|
||||
*/
|
||||
id: number;
|
||||
/**
|
||||
* Isbuiltin
|
||||
*/
|
||||
isBuiltIn: boolean;
|
||||
type: AttributeTypeSchema;
|
||||
/**
|
||||
* Originallabel
|
||||
*/
|
||||
originalLabel: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* ModuleSchema
|
||||
*/
|
||||
@ -1483,7 +1755,11 @@ export type ModuleSchemaInput = {
|
||||
/**
|
||||
* Description
|
||||
*/
|
||||
description: string;
|
||||
description: string | null;
|
||||
/**
|
||||
* Isbuiltin
|
||||
*/
|
||||
isBuiltIn: boolean;
|
||||
/**
|
||||
* Dependson
|
||||
*/
|
||||
@ -1513,7 +1789,11 @@ export type ModuleSchemaOutput = {
|
||||
/**
|
||||
* Description
|
||||
*/
|
||||
description: string;
|
||||
description: string | null;
|
||||
/**
|
||||
* Isbuiltin
|
||||
*/
|
||||
isBuiltIn: boolean;
|
||||
/**
|
||||
* Dependson
|
||||
*/
|
||||
@ -1550,6 +1830,44 @@ export type ModuleTabSchema = {
|
||||
device: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* ModuleWithAttributesSchema
|
||||
*/
|
||||
export type ModuleWithAttributesSchema = {
|
||||
/**
|
||||
* Id
|
||||
*/
|
||||
id: number;
|
||||
/**
|
||||
* Key
|
||||
*/
|
||||
key: string;
|
||||
/**
|
||||
* Label
|
||||
*/
|
||||
label: string;
|
||||
/**
|
||||
* Description
|
||||
*/
|
||||
description: string | null;
|
||||
/**
|
||||
* Isbuiltin
|
||||
*/
|
||||
isBuiltIn: boolean;
|
||||
/**
|
||||
* Dependson
|
||||
*/
|
||||
dependsOn: Array<ModuleSchemaOutput>;
|
||||
/**
|
||||
* Tabs
|
||||
*/
|
||||
tabs: Array<ModuleTabSchema>;
|
||||
/**
|
||||
* Attributes
|
||||
*/
|
||||
attributes: Array<ModuleAttributeSchema>;
|
||||
};
|
||||
|
||||
/**
|
||||
* PaginationInfoSchema
|
||||
*/
|
||||
@ -1932,6 +2250,88 @@ export type SwitchDealTagResponse = {
|
||||
message: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* UpdateAttributeLabelRequest
|
||||
*/
|
||||
export type UpdateAttributeLabelRequest = {
|
||||
/**
|
||||
* Moduleid
|
||||
*/
|
||||
moduleId: number;
|
||||
/**
|
||||
* Attributeid
|
||||
*/
|
||||
attributeId: number;
|
||||
/**
|
||||
* Label
|
||||
*/
|
||||
label: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* UpdateAttributeLabelResponse
|
||||
*/
|
||||
export type UpdateAttributeLabelResponse = {
|
||||
/**
|
||||
* Message
|
||||
*/
|
||||
message: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* UpdateAttributeRequest
|
||||
*/
|
||||
export type UpdateAttributeRequest = {
|
||||
entity: UpdateAttributeSchema;
|
||||
};
|
||||
|
||||
/**
|
||||
* UpdateAttributeResponse
|
||||
*/
|
||||
export type UpdateAttributeResponse = {
|
||||
/**
|
||||
* Message
|
||||
*/
|
||||
message: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* UpdateAttributeSchema
|
||||
*/
|
||||
export type UpdateAttributeSchema = {
|
||||
/**
|
||||
* Label
|
||||
*/
|
||||
label?: string | null;
|
||||
/**
|
||||
* Isapplicabletogroup
|
||||
*/
|
||||
isApplicableToGroup?: boolean | null;
|
||||
/**
|
||||
* Isshownondashboard
|
||||
*/
|
||||
isShownOnDashboard?: boolean | null;
|
||||
/**
|
||||
* Ishighlightifexpired
|
||||
*/
|
||||
isHighlightIfExpired?: boolean | null;
|
||||
/**
|
||||
* Isnullable
|
||||
*/
|
||||
isNullable?: boolean | null;
|
||||
/**
|
||||
* Defaultvalue
|
||||
*/
|
||||
defaultValue?: {
|
||||
[key: string]: unknown;
|
||||
} | null;
|
||||
/**
|
||||
* Description
|
||||
*/
|
||||
description?: string | null;
|
||||
type?: AttributeTypeSchema | null;
|
||||
};
|
||||
|
||||
/**
|
||||
* UpdateBarcodeTemplateRequest
|
||||
*/
|
||||
@ -2259,6 +2659,37 @@ export type UpdateMarketplaceSchema = {
|
||||
} | null;
|
||||
};
|
||||
|
||||
/**
|
||||
* UpdateModuleCommonInfoRequest
|
||||
*/
|
||||
export type UpdateModuleCommonInfoRequest = {
|
||||
entity: UpdateModuleCommonInfoSchema;
|
||||
};
|
||||
|
||||
/**
|
||||
* UpdateModuleCommonInfoResponse
|
||||
*/
|
||||
export type UpdateModuleCommonInfoResponse = {
|
||||
/**
|
||||
* Message
|
||||
*/
|
||||
message: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* UpdateModuleCommonInfoSchema
|
||||
*/
|
||||
export type UpdateModuleCommonInfoSchema = {
|
||||
/**
|
||||
* Label
|
||||
*/
|
||||
label: string;
|
||||
/**
|
||||
* Description
|
||||
*/
|
||||
description: string | null;
|
||||
};
|
||||
|
||||
/**
|
||||
* UpdateProductRequest
|
||||
*/
|
||||
@ -2563,6 +2994,158 @@ export type ValidationError = {
|
||||
type: string;
|
||||
};
|
||||
|
||||
export type GetAttributesData = {
|
||||
body?: never;
|
||||
path?: never;
|
||||
query?: never;
|
||||
url: "/crm/v1/attribute/";
|
||||
};
|
||||
|
||||
export type GetAttributesResponses = {
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
200: GetAllAttributesResponse;
|
||||
};
|
||||
|
||||
export type GetAttributesResponse =
|
||||
GetAttributesResponses[keyof GetAttributesResponses];
|
||||
|
||||
export type CreateAttributeData = {
|
||||
body: CreateAttributeRequest;
|
||||
path?: never;
|
||||
query?: never;
|
||||
url: "/crm/v1/attribute/";
|
||||
};
|
||||
|
||||
export type CreateAttributeErrors = {
|
||||
/**
|
||||
* Validation Error
|
||||
*/
|
||||
422: HttpValidationError;
|
||||
};
|
||||
|
||||
export type CreateAttributeError =
|
||||
CreateAttributeErrors[keyof CreateAttributeErrors];
|
||||
|
||||
export type CreateAttributeResponses = {
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
200: CreateAttributeResponse;
|
||||
};
|
||||
|
||||
export type CreateAttributeResponse2 =
|
||||
CreateAttributeResponses[keyof CreateAttributeResponses];
|
||||
|
||||
export type DeleteAttributeData = {
|
||||
body?: never;
|
||||
path: {
|
||||
/**
|
||||
* Pk
|
||||
*/
|
||||
pk: number;
|
||||
};
|
||||
query?: never;
|
||||
url: "/crm/v1/attribute/{pk}";
|
||||
};
|
||||
|
||||
export type DeleteAttributeErrors = {
|
||||
/**
|
||||
* Validation Error
|
||||
*/
|
||||
422: HttpValidationError;
|
||||
};
|
||||
|
||||
export type DeleteAttributeError =
|
||||
DeleteAttributeErrors[keyof DeleteAttributeErrors];
|
||||
|
||||
export type DeleteAttributeResponses = {
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
200: DeleteAttributeResponse;
|
||||
};
|
||||
|
||||
export type DeleteAttributeResponse2 =
|
||||
DeleteAttributeResponses[keyof DeleteAttributeResponses];
|
||||
|
||||
export type UpdateAttributeData = {
|
||||
body: UpdateAttributeRequest;
|
||||
path: {
|
||||
/**
|
||||
* Pk
|
||||
*/
|
||||
pk: number;
|
||||
};
|
||||
query?: never;
|
||||
url: "/crm/v1/attribute/{pk}";
|
||||
};
|
||||
|
||||
export type UpdateAttributeErrors = {
|
||||
/**
|
||||
* Validation Error
|
||||
*/
|
||||
422: HttpValidationError;
|
||||
};
|
||||
|
||||
export type UpdateAttributeError =
|
||||
UpdateAttributeErrors[keyof UpdateAttributeErrors];
|
||||
|
||||
export type UpdateAttributeResponses = {
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
200: UpdateAttributeResponse;
|
||||
};
|
||||
|
||||
export type UpdateAttributeResponse2 =
|
||||
UpdateAttributeResponses[keyof UpdateAttributeResponses];
|
||||
|
||||
export type UpdateAttributeLabelData = {
|
||||
body: UpdateAttributeLabelRequest;
|
||||
path?: never;
|
||||
query?: never;
|
||||
url: "/crm/v1/attribute/label";
|
||||
};
|
||||
|
||||
export type UpdateAttributeLabelErrors = {
|
||||
/**
|
||||
* Validation Error
|
||||
*/
|
||||
422: HttpValidationError;
|
||||
};
|
||||
|
||||
export type UpdateAttributeLabelError =
|
||||
UpdateAttributeLabelErrors[keyof UpdateAttributeLabelErrors];
|
||||
|
||||
export type UpdateAttributeLabelResponses = {
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
200: UpdateAttributeLabelResponse;
|
||||
};
|
||||
|
||||
export type UpdateAttributeLabelResponse2 =
|
||||
UpdateAttributeLabelResponses[keyof UpdateAttributeLabelResponses];
|
||||
|
||||
export type GetAttributeTypesData = {
|
||||
body?: never;
|
||||
path?: never;
|
||||
query?: never;
|
||||
url: "/crm/v1/attribute/type";
|
||||
};
|
||||
|
||||
export type GetAttributeTypesResponses = {
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
200: GetAllAttributeTypesResponse;
|
||||
};
|
||||
|
||||
export type GetAttributeTypesResponse =
|
||||
GetAttributeTypesResponses[keyof GetAttributeTypesResponses];
|
||||
|
||||
export type GetBoardsData = {
|
||||
body?: never;
|
||||
path: {
|
||||
@ -3120,7 +3703,7 @@ export type GetModulesData = {
|
||||
body?: never;
|
||||
path?: never;
|
||||
query?: never;
|
||||
url: "/crm/v1/module/built-in/";
|
||||
url: "/crm/v1/module/";
|
||||
};
|
||||
|
||||
export type GetModulesResponses = {
|
||||
@ -3132,6 +3715,171 @@ export type GetModulesResponses = {
|
||||
|
||||
export type GetModulesResponse = GetModulesResponses[keyof GetModulesResponses];
|
||||
|
||||
export type GetModulesWithAttributesData = {
|
||||
body?: never;
|
||||
path?: never;
|
||||
query?: never;
|
||||
url: "/crm/v1/module/with-attributes";
|
||||
};
|
||||
|
||||
export type GetModulesWithAttributesResponses = {
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
200: GetAllWithAttributesResponse;
|
||||
};
|
||||
|
||||
export type GetModulesWithAttributesResponse =
|
||||
GetModulesWithAttributesResponses[keyof GetModulesWithAttributesResponses];
|
||||
|
||||
export type GetModuleWithAttributesData = {
|
||||
body?: never;
|
||||
path: {
|
||||
/**
|
||||
* Pk
|
||||
*/
|
||||
pk: number;
|
||||
};
|
||||
query?: never;
|
||||
url: "/crm/v1/module/{pk}/with-attributes";
|
||||
};
|
||||
|
||||
export type GetModuleWithAttributesErrors = {
|
||||
/**
|
||||
* Validation Error
|
||||
*/
|
||||
422: HttpValidationError;
|
||||
};
|
||||
|
||||
export type GetModuleWithAttributesError =
|
||||
GetModuleWithAttributesErrors[keyof GetModuleWithAttributesErrors];
|
||||
|
||||
export type GetModuleWithAttributesResponses = {
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
200: GetByIdWithAttributesResponse;
|
||||
};
|
||||
|
||||
export type GetModuleWithAttributesResponse =
|
||||
GetModuleWithAttributesResponses[keyof GetModuleWithAttributesResponses];
|
||||
|
||||
export type UpdateModuleData = {
|
||||
body: UpdateModuleCommonInfoRequest;
|
||||
path: {
|
||||
/**
|
||||
* Pk
|
||||
*/
|
||||
pk: number;
|
||||
};
|
||||
query?: never;
|
||||
url: "/crm/v1/module/{pk}/common-info";
|
||||
};
|
||||
|
||||
export type UpdateModuleErrors = {
|
||||
/**
|
||||
* Validation Error
|
||||
*/
|
||||
422: HttpValidationError;
|
||||
};
|
||||
|
||||
export type UpdateModuleError = UpdateModuleErrors[keyof UpdateModuleErrors];
|
||||
|
||||
export type UpdateModuleResponses = {
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
200: UpdateModuleCommonInfoResponse;
|
||||
};
|
||||
|
||||
export type UpdateModuleResponse =
|
||||
UpdateModuleResponses[keyof UpdateModuleResponses];
|
||||
|
||||
export type DeleteModuleData = {
|
||||
body?: never;
|
||||
path: {
|
||||
/**
|
||||
* Pk
|
||||
*/
|
||||
pk: number;
|
||||
};
|
||||
query?: never;
|
||||
url: "/crm/v1/module/{pk}";
|
||||
};
|
||||
|
||||
export type DeleteModuleErrors = {
|
||||
/**
|
||||
* Validation Error
|
||||
*/
|
||||
422: HttpValidationError;
|
||||
};
|
||||
|
||||
export type DeleteModuleError = DeleteModuleErrors[keyof DeleteModuleErrors];
|
||||
|
||||
export type DeleteModuleResponses = {
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
200: DeleteModuleResponse;
|
||||
};
|
||||
|
||||
export type DeleteModuleResponse2 =
|
||||
DeleteModuleResponses[keyof DeleteModuleResponses];
|
||||
|
||||
export type RemoveAttributeFromModuleData = {
|
||||
body: DeleteAttributeRequest;
|
||||
path?: never;
|
||||
query?: never;
|
||||
url: "/crm/v1/module/attribute";
|
||||
};
|
||||
|
||||
export type RemoveAttributeFromModuleErrors = {
|
||||
/**
|
||||
* Validation Error
|
||||
*/
|
||||
422: HttpValidationError;
|
||||
};
|
||||
|
||||
export type RemoveAttributeFromModuleError =
|
||||
RemoveAttributeFromModuleErrors[keyof RemoveAttributeFromModuleErrors];
|
||||
|
||||
export type RemoveAttributeFromModuleResponses = {
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
200: DeleteAttributeResponse;
|
||||
};
|
||||
|
||||
export type RemoveAttributeFromModuleResponse =
|
||||
RemoveAttributeFromModuleResponses[keyof RemoveAttributeFromModuleResponses];
|
||||
|
||||
export type AddAttributeToModuleData = {
|
||||
body: AddAttributeRequest;
|
||||
path?: never;
|
||||
query?: never;
|
||||
url: "/crm/v1/module/attribute";
|
||||
};
|
||||
|
||||
export type AddAttributeToModuleErrors = {
|
||||
/**
|
||||
* Validation Error
|
||||
*/
|
||||
422: HttpValidationError;
|
||||
};
|
||||
|
||||
export type AddAttributeToModuleError =
|
||||
AddAttributeToModuleErrors[keyof AddAttributeToModuleErrors];
|
||||
|
||||
export type AddAttributeToModuleResponses = {
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
200: AddAttributeResponse;
|
||||
};
|
||||
|
||||
export type AddAttributeToModuleResponse =
|
||||
AddAttributeToModuleResponses[keyof AddAttributeToModuleResponses];
|
||||
|
||||
export type GetClientsData = {
|
||||
body?: never;
|
||||
path?: never;
|
||||
|
||||
@ -2,6 +2,47 @@
|
||||
|
||||
import { z } from "zod";
|
||||
|
||||
/**
|
||||
* AddAttributeRequest
|
||||
*/
|
||||
export const zAddAttributeRequest = z.object({
|
||||
attributeId: z.int(),
|
||||
moduleId: z.int(),
|
||||
});
|
||||
|
||||
/**
|
||||
* AddAttributeResponse
|
||||
*/
|
||||
export const zAddAttributeResponse = z.object({
|
||||
message: z.string(),
|
||||
});
|
||||
|
||||
/**
|
||||
* AttributeTypeSchema
|
||||
*/
|
||||
export const zAttributeTypeSchema = z.object({
|
||||
id: z.int(),
|
||||
type: z.string(),
|
||||
name: z.string(),
|
||||
});
|
||||
|
||||
/**
|
||||
* AttributeSchema
|
||||
*/
|
||||
export const zAttributeSchema = z.object({
|
||||
label: z.string(),
|
||||
isApplicableToGroup: z.boolean(),
|
||||
isShownOnDashboard: z.boolean(),
|
||||
isHighlightIfExpired: z.boolean(),
|
||||
isNullable: z.boolean(),
|
||||
defaultValue: z.union([z.object({}), z.null()]),
|
||||
description: z.string(),
|
||||
typeId: z.int(),
|
||||
id: z.int(),
|
||||
isBuiltIn: z.boolean(),
|
||||
type: zAttributeTypeSchema,
|
||||
});
|
||||
|
||||
/**
|
||||
* BarcodeTemplateAttributeSchema
|
||||
*/
|
||||
@ -95,6 +136,34 @@ export const zClientSchema = z.object({
|
||||
isDeleted: z.optional(z.boolean()).default(false),
|
||||
});
|
||||
|
||||
/**
|
||||
* CreateAttributeSchema
|
||||
*/
|
||||
export const zCreateAttributeSchema = z.object({
|
||||
label: z.string(),
|
||||
isApplicableToGroup: z.boolean(),
|
||||
isShownOnDashboard: z.boolean(),
|
||||
isHighlightIfExpired: z.boolean(),
|
||||
isNullable: z.boolean(),
|
||||
defaultValue: z.union([z.object({}), z.null()]),
|
||||
description: z.string(),
|
||||
typeId: z.int(),
|
||||
});
|
||||
|
||||
/**
|
||||
* CreateAttributeRequest
|
||||
*/
|
||||
export const zCreateAttributeRequest = z.object({
|
||||
entity: zCreateAttributeSchema,
|
||||
});
|
||||
|
||||
/**
|
||||
* CreateAttributeResponse
|
||||
*/
|
||||
export const zCreateAttributeResponse = z.object({
|
||||
message: z.string(),
|
||||
});
|
||||
|
||||
/**
|
||||
* CreateBarcodeTemplateSchema
|
||||
*/
|
||||
@ -579,7 +648,8 @@ export const zModuleSchemaOutput = z.object({
|
||||
id: z.int(),
|
||||
key: z.string(),
|
||||
label: z.string(),
|
||||
description: z.string(),
|
||||
description: z.union([z.string(), z.null()]),
|
||||
isBuiltIn: z.boolean(),
|
||||
get dependsOn() {
|
||||
return z.array(
|
||||
z.lazy((): any => {
|
||||
@ -751,6 +821,21 @@ export const zDealProductAddKitResponse = z.object({
|
||||
message: z.string(),
|
||||
});
|
||||
|
||||
/**
|
||||
* DeleteAttributeRequest
|
||||
*/
|
||||
export const zDeleteAttributeRequest = z.object({
|
||||
attributeId: z.int(),
|
||||
moduleId: z.int(),
|
||||
});
|
||||
|
||||
/**
|
||||
* DeleteAttributeResponse
|
||||
*/
|
||||
export const zDeleteAttributeResponse = z.object({
|
||||
message: z.string(),
|
||||
});
|
||||
|
||||
/**
|
||||
* DeleteBarcodeImageResponse
|
||||
*/
|
||||
@ -821,6 +906,13 @@ export const zDeleteMarketplaceResponse = z.object({
|
||||
message: z.string(),
|
||||
});
|
||||
|
||||
/**
|
||||
* DeleteModuleResponse
|
||||
*/
|
||||
export const zDeleteModuleResponse = z.object({
|
||||
message: z.string(),
|
||||
});
|
||||
|
||||
/**
|
||||
* DeleteProductResponse
|
||||
*/
|
||||
@ -870,6 +962,20 @@ export const zDeleteStatusResponse = z.object({
|
||||
message: z.string(),
|
||||
});
|
||||
|
||||
/**
|
||||
* GetAllAttributeTypesResponse
|
||||
*/
|
||||
export const zGetAllAttributeTypesResponse = z.object({
|
||||
items: z.array(zAttributeTypeSchema),
|
||||
});
|
||||
|
||||
/**
|
||||
* GetAllAttributesResponse
|
||||
*/
|
||||
export const zGetAllAttributesResponse = z.object({
|
||||
items: z.array(zAttributeSchema),
|
||||
});
|
||||
|
||||
/**
|
||||
* GetAllModulesResponse
|
||||
*/
|
||||
@ -877,6 +983,45 @@ export const zGetAllModulesResponse = z.object({
|
||||
items: z.array(zModuleSchemaOutput),
|
||||
});
|
||||
|
||||
/**
|
||||
* ModuleAttributeSchema
|
||||
*/
|
||||
export const zModuleAttributeSchema = z.object({
|
||||
label: z.string(),
|
||||
isApplicableToGroup: z.boolean(),
|
||||
isShownOnDashboard: z.boolean(),
|
||||
isHighlightIfExpired: z.boolean(),
|
||||
isNullable: z.boolean(),
|
||||
defaultValue: z.union([z.object({}), z.null()]),
|
||||
description: z.string(),
|
||||
typeId: z.int(),
|
||||
id: z.int(),
|
||||
isBuiltIn: z.boolean(),
|
||||
type: zAttributeTypeSchema,
|
||||
originalLabel: z.string(),
|
||||
});
|
||||
|
||||
/**
|
||||
* ModuleWithAttributesSchema
|
||||
*/
|
||||
export const zModuleWithAttributesSchema = z.object({
|
||||
id: z.int(),
|
||||
key: z.string(),
|
||||
label: z.string(),
|
||||
description: z.union([z.string(), z.null()]),
|
||||
isBuiltIn: z.boolean(),
|
||||
dependsOn: z.array(zModuleSchemaOutput),
|
||||
tabs: z.array(zModuleTabSchema),
|
||||
attributes: z.array(zModuleAttributeSchema),
|
||||
});
|
||||
|
||||
/**
|
||||
* GetAllWithAttributesResponse
|
||||
*/
|
||||
export const zGetAllWithAttributesResponse = z.object({
|
||||
items: z.array(zModuleWithAttributesSchema),
|
||||
});
|
||||
|
||||
/**
|
||||
* GetBarcodeAttributesResponse
|
||||
*/
|
||||
@ -912,6 +1057,13 @@ export const zGetBoardsResponse = z.object({
|
||||
items: z.array(zBoardSchema),
|
||||
});
|
||||
|
||||
/**
|
||||
* GetByIdWithAttributesResponse
|
||||
*/
|
||||
export const zGetByIdWithAttributesResponse = z.object({
|
||||
entity: zModuleWithAttributesSchema,
|
||||
});
|
||||
|
||||
/**
|
||||
* GetClientsResponse
|
||||
*/
|
||||
@ -1074,7 +1226,8 @@ export const zModuleSchemaInput = z.object({
|
||||
id: z.int(),
|
||||
key: z.string(),
|
||||
label: z.string(),
|
||||
description: z.string(),
|
||||
description: z.union([z.string(), z.null()]),
|
||||
isBuiltIn: z.boolean(),
|
||||
get dependsOn() {
|
||||
return z.array(
|
||||
z.lazy((): any => {
|
||||
@ -1127,6 +1280,50 @@ export const zSwitchDealTagResponse = z.object({
|
||||
message: z.string(),
|
||||
});
|
||||
|
||||
/**
|
||||
* UpdateAttributeLabelRequest
|
||||
*/
|
||||
export const zUpdateAttributeLabelRequest = z.object({
|
||||
moduleId: z.int(),
|
||||
attributeId: z.int(),
|
||||
label: z.string(),
|
||||
});
|
||||
|
||||
/**
|
||||
* UpdateAttributeLabelResponse
|
||||
*/
|
||||
export const zUpdateAttributeLabelResponse = z.object({
|
||||
message: z.string(),
|
||||
});
|
||||
|
||||
/**
|
||||
* UpdateAttributeSchema
|
||||
*/
|
||||
export const zUpdateAttributeSchema = z.object({
|
||||
label: z.optional(z.union([z.string(), z.null()])),
|
||||
isApplicableToGroup: z.optional(z.union([z.boolean(), z.null()])),
|
||||
isShownOnDashboard: z.optional(z.union([z.boolean(), z.null()])),
|
||||
isHighlightIfExpired: z.optional(z.union([z.boolean(), z.null()])),
|
||||
isNullable: z.optional(z.union([z.boolean(), z.null()])),
|
||||
defaultValue: z.optional(z.union([z.object({}), z.null()])),
|
||||
description: z.optional(z.union([z.string(), z.null()])),
|
||||
type: z.optional(z.union([zAttributeTypeSchema, z.null()])),
|
||||
});
|
||||
|
||||
/**
|
||||
* UpdateAttributeRequest
|
||||
*/
|
||||
export const zUpdateAttributeRequest = z.object({
|
||||
entity: zUpdateAttributeSchema,
|
||||
});
|
||||
|
||||
/**
|
||||
* UpdateAttributeResponse
|
||||
*/
|
||||
export const zUpdateAttributeResponse = z.object({
|
||||
message: z.string(),
|
||||
});
|
||||
|
||||
/**
|
||||
* UpdateBarcodeTemplateSchema
|
||||
*/
|
||||
@ -1352,6 +1549,28 @@ export const zUpdateMarketplaceResponse = z.object({
|
||||
message: z.string(),
|
||||
});
|
||||
|
||||
/**
|
||||
* UpdateModuleCommonInfoSchema
|
||||
*/
|
||||
export const zUpdateModuleCommonInfoSchema = z.object({
|
||||
label: z.string(),
|
||||
description: z.union([z.string(), z.null()]),
|
||||
});
|
||||
|
||||
/**
|
||||
* UpdateModuleCommonInfoRequest
|
||||
*/
|
||||
export const zUpdateModuleCommonInfoRequest = z.object({
|
||||
entity: zUpdateModuleCommonInfoSchema,
|
||||
});
|
||||
|
||||
/**
|
||||
* UpdateModuleCommonInfoResponse
|
||||
*/
|
||||
export const zUpdateModuleCommonInfoResponse = z.object({
|
||||
message: z.string(),
|
||||
});
|
||||
|
||||
/**
|
||||
* UpdateProductSchema
|
||||
*/
|
||||
@ -1526,6 +1745,76 @@ export const zUpdateStatusResponse = z.object({
|
||||
message: z.string(),
|
||||
});
|
||||
|
||||
export const zGetAttributesData = z.object({
|
||||
body: z.optional(z.never()),
|
||||
path: z.optional(z.never()),
|
||||
query: z.optional(z.never()),
|
||||
});
|
||||
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
export const zGetAttributesResponse = zGetAllAttributesResponse;
|
||||
|
||||
export const zCreateAttributeData = z.object({
|
||||
body: zCreateAttributeRequest,
|
||||
path: z.optional(z.never()),
|
||||
query: z.optional(z.never()),
|
||||
});
|
||||
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
export const zCreateAttributeResponse2 = zCreateAttributeResponse;
|
||||
|
||||
export const zDeleteAttributeData = z.object({
|
||||
body: z.optional(z.never()),
|
||||
path: z.object({
|
||||
pk: z.int(),
|
||||
}),
|
||||
query: z.optional(z.never()),
|
||||
});
|
||||
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
export const zDeleteAttributeResponse2 = zDeleteAttributeResponse;
|
||||
|
||||
export const zUpdateAttributeData = z.object({
|
||||
body: zUpdateAttributeRequest,
|
||||
path: z.object({
|
||||
pk: z.int(),
|
||||
}),
|
||||
query: z.optional(z.never()),
|
||||
});
|
||||
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
export const zUpdateAttributeResponse2 = zUpdateAttributeResponse;
|
||||
|
||||
export const zUpdateAttributeLabelData = z.object({
|
||||
body: zUpdateAttributeLabelRequest,
|
||||
path: z.optional(z.never()),
|
||||
query: z.optional(z.never()),
|
||||
});
|
||||
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
export const zUpdateAttributeLabelResponse2 = zUpdateAttributeLabelResponse;
|
||||
|
||||
export const zGetAttributeTypesData = z.object({
|
||||
body: z.optional(z.never()),
|
||||
path: z.optional(z.never()),
|
||||
query: z.optional(z.never()),
|
||||
});
|
||||
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
export const zGetAttributeTypesResponse = zGetAllAttributeTypesResponse;
|
||||
|
||||
export const zGetBoardsData = z.object({
|
||||
body: z.optional(z.never()),
|
||||
path: z.object({
|
||||
@ -1769,6 +2058,78 @@ export const zGetModulesData = z.object({
|
||||
*/
|
||||
export const zGetModulesResponse = zGetAllModulesResponse;
|
||||
|
||||
export const zGetModulesWithAttributesData = z.object({
|
||||
body: z.optional(z.never()),
|
||||
path: z.optional(z.never()),
|
||||
query: z.optional(z.never()),
|
||||
});
|
||||
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
export const zGetModulesWithAttributesResponse = zGetAllWithAttributesResponse;
|
||||
|
||||
export const zGetModuleWithAttributesData = z.object({
|
||||
body: z.optional(z.never()),
|
||||
path: z.object({
|
||||
pk: z.int(),
|
||||
}),
|
||||
query: z.optional(z.never()),
|
||||
});
|
||||
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
export const zGetModuleWithAttributesResponse = zGetByIdWithAttributesResponse;
|
||||
|
||||
export const zUpdateModuleData = z.object({
|
||||
body: zUpdateModuleCommonInfoRequest,
|
||||
path: z.object({
|
||||
pk: z.int(),
|
||||
}),
|
||||
query: z.optional(z.never()),
|
||||
});
|
||||
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
export const zUpdateModuleResponse = zUpdateModuleCommonInfoResponse;
|
||||
|
||||
export const zDeleteModuleData = z.object({
|
||||
body: z.optional(z.never()),
|
||||
path: z.object({
|
||||
pk: z.int(),
|
||||
}),
|
||||
query: z.optional(z.never()),
|
||||
});
|
||||
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
export const zDeleteModuleResponse2 = zDeleteModuleResponse;
|
||||
|
||||
export const zRemoveAttributeFromModuleData = z.object({
|
||||
body: zDeleteAttributeRequest,
|
||||
path: z.optional(z.never()),
|
||||
query: z.optional(z.never()),
|
||||
});
|
||||
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
export const zRemoveAttributeFromModuleResponse = zDeleteAttributeResponse;
|
||||
|
||||
export const zAddAttributeToModuleData = z.object({
|
||||
body: zAddAttributeRequest,
|
||||
path: z.optional(z.never()),
|
||||
query: z.optional(z.never()),
|
||||
});
|
||||
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
export const zAddAttributeToModuleResponse = zAddAttributeResponse;
|
||||
|
||||
export const zGetClientsData = z.object({
|
||||
body: z.optional(z.never()),
|
||||
path: z.optional(z.never()),
|
||||
|
||||
Reference in New Issue
Block a user