feat: marketplaces editor in clients page
This commit is contained in:
@ -18,6 +18,7 @@ import {
|
||||
createDealProduct,
|
||||
createDealProductService,
|
||||
createDealService,
|
||||
createMarketplace,
|
||||
createProduct,
|
||||
createProject,
|
||||
createService,
|
||||
@ -31,6 +32,7 @@ import {
|
||||
deleteDealProduct,
|
||||
deleteDealProductService,
|
||||
deleteDealService,
|
||||
deleteMarketplace,
|
||||
deleteProduct,
|
||||
deleteProject,
|
||||
deleteService,
|
||||
@ -41,12 +43,14 @@ import {
|
||||
getBarcodeTemplateAttributes,
|
||||
getBarcodeTemplates,
|
||||
getBarcodeTemplateSizes,
|
||||
getBaseMarketplaces,
|
||||
getBoards,
|
||||
getBuiltInModules,
|
||||
getClients,
|
||||
getDealProducts,
|
||||
getDeals,
|
||||
getDealServices,
|
||||
getMarketplaces,
|
||||
getProductBarcodePdf,
|
||||
getProducts,
|
||||
getProjects,
|
||||
@ -62,6 +66,7 @@ import {
|
||||
updateDealProduct,
|
||||
updateDealProductService,
|
||||
updateDealService,
|
||||
updateMarketplace,
|
||||
updateProduct,
|
||||
updateProject,
|
||||
updateService,
|
||||
@ -98,6 +103,9 @@ import type {
|
||||
CreateDealServiceData,
|
||||
CreateDealServiceError,
|
||||
CreateDealServiceResponse2,
|
||||
CreateMarketplaceData,
|
||||
CreateMarketplaceError,
|
||||
CreateMarketplaceResponse2,
|
||||
CreateProductData,
|
||||
CreateProductError,
|
||||
CreateProductResponse2,
|
||||
@ -137,6 +145,9 @@ import type {
|
||||
DeleteDealServiceData,
|
||||
DeleteDealServiceError,
|
||||
DeleteDealServiceResponse2,
|
||||
DeleteMarketplaceData,
|
||||
DeleteMarketplaceError,
|
||||
DeleteMarketplaceResponse2,
|
||||
DeleteProductData,
|
||||
DeleteProductError,
|
||||
DeleteProductResponse2,
|
||||
@ -161,6 +172,7 @@ import type {
|
||||
GetBarcodeTemplateAttributesData,
|
||||
GetBarcodeTemplatesData,
|
||||
GetBarcodeTemplateSizesData,
|
||||
GetBaseMarketplacesData,
|
||||
GetBoardsData,
|
||||
GetBuiltInModulesData,
|
||||
GetClientsData,
|
||||
@ -169,6 +181,7 @@ import type {
|
||||
GetDealsError,
|
||||
GetDealServicesData,
|
||||
GetDealsResponse2,
|
||||
GetMarketplacesData,
|
||||
GetProductBarcodePdfData,
|
||||
GetProductBarcodePdfError,
|
||||
GetProductBarcodePdfResponse2,
|
||||
@ -202,6 +215,9 @@ import type {
|
||||
UpdateDealServiceData,
|
||||
UpdateDealServiceError,
|
||||
UpdateDealServiceResponse2,
|
||||
UpdateMarketplaceData,
|
||||
UpdateMarketplaceError,
|
||||
UpdateMarketplaceResponse2,
|
||||
UpdateProductData,
|
||||
UpdateProductError,
|
||||
UpdateProductResponse2,
|
||||
@ -1696,6 +1712,159 @@ export const addKitToDealMutation = (
|
||||
return mutationOptions;
|
||||
};
|
||||
|
||||
export const getBaseMarketplacesQueryKey = (
|
||||
options?: Options<GetBaseMarketplacesData>
|
||||
) => createQueryKey("getBaseMarketplaces", options);
|
||||
|
||||
/**
|
||||
* Get Base Marketplaces
|
||||
*/
|
||||
export const getBaseMarketplacesOptions = (
|
||||
options?: Options<GetBaseMarketplacesData>
|
||||
) => {
|
||||
return queryOptions({
|
||||
queryFn: async ({ queryKey, signal }) => {
|
||||
const { data } = await getBaseMarketplaces({
|
||||
...options,
|
||||
...queryKey[0],
|
||||
signal,
|
||||
throwOnError: true,
|
||||
});
|
||||
return data;
|
||||
},
|
||||
queryKey: getBaseMarketplacesQueryKey(options),
|
||||
});
|
||||
};
|
||||
|
||||
export const getMarketplacesQueryKey = (
|
||||
options: Options<GetMarketplacesData>
|
||||
) => createQueryKey("getMarketplaces", options);
|
||||
|
||||
/**
|
||||
* Get Marketplaces
|
||||
*/
|
||||
export const getMarketplacesOptions = (
|
||||
options: Options<GetMarketplacesData>
|
||||
) => {
|
||||
return queryOptions({
|
||||
queryFn: async ({ queryKey, signal }) => {
|
||||
const { data } = await getMarketplaces({
|
||||
...options,
|
||||
...queryKey[0],
|
||||
signal,
|
||||
throwOnError: true,
|
||||
});
|
||||
return data;
|
||||
},
|
||||
queryKey: getMarketplacesQueryKey(options),
|
||||
});
|
||||
};
|
||||
|
||||
export const createMarketplaceQueryKey = (
|
||||
options: Options<CreateMarketplaceData>
|
||||
) => createQueryKey("createMarketplace", options);
|
||||
|
||||
/**
|
||||
* Create Product
|
||||
*/
|
||||
export const createMarketplaceOptions = (
|
||||
options: Options<CreateMarketplaceData>
|
||||
) => {
|
||||
return queryOptions({
|
||||
queryFn: async ({ queryKey, signal }) => {
|
||||
const { data } = await createMarketplace({
|
||||
...options,
|
||||
...queryKey[0],
|
||||
signal,
|
||||
throwOnError: true,
|
||||
});
|
||||
return data;
|
||||
},
|
||||
queryKey: createMarketplaceQueryKey(options),
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Create Product
|
||||
*/
|
||||
export const createMarketplaceMutation = (
|
||||
options?: Partial<Options<CreateMarketplaceData>>
|
||||
): UseMutationOptions<
|
||||
CreateMarketplaceResponse2,
|
||||
AxiosError<CreateMarketplaceError>,
|
||||
Options<CreateMarketplaceData>
|
||||
> => {
|
||||
const mutationOptions: UseMutationOptions<
|
||||
CreateMarketplaceResponse2,
|
||||
AxiosError<CreateMarketplaceError>,
|
||||
Options<CreateMarketplaceData>
|
||||
> = {
|
||||
mutationFn: async localOptions => {
|
||||
const { data } = await createMarketplace({
|
||||
...options,
|
||||
...localOptions,
|
||||
throwOnError: true,
|
||||
});
|
||||
return data;
|
||||
},
|
||||
};
|
||||
return mutationOptions;
|
||||
};
|
||||
|
||||
/**
|
||||
* Delete Marketplace
|
||||
*/
|
||||
export const deleteMarketplaceMutation = (
|
||||
options?: Partial<Options<DeleteMarketplaceData>>
|
||||
): UseMutationOptions<
|
||||
DeleteMarketplaceResponse2,
|
||||
AxiosError<DeleteMarketplaceError>,
|
||||
Options<DeleteMarketplaceData>
|
||||
> => {
|
||||
const mutationOptions: UseMutationOptions<
|
||||
DeleteMarketplaceResponse2,
|
||||
AxiosError<DeleteMarketplaceError>,
|
||||
Options<DeleteMarketplaceData>
|
||||
> = {
|
||||
mutationFn: async localOptions => {
|
||||
const { data } = await deleteMarketplace({
|
||||
...options,
|
||||
...localOptions,
|
||||
throwOnError: true,
|
||||
});
|
||||
return data;
|
||||
},
|
||||
};
|
||||
return mutationOptions;
|
||||
};
|
||||
|
||||
/**
|
||||
* Update Marketplace
|
||||
*/
|
||||
export const updateMarketplaceMutation = (
|
||||
options?: Partial<Options<UpdateMarketplaceData>>
|
||||
): UseMutationOptions<
|
||||
UpdateMarketplaceResponse2,
|
||||
AxiosError<UpdateMarketplaceError>,
|
||||
Options<UpdateMarketplaceData>
|
||||
> => {
|
||||
const mutationOptions: UseMutationOptions<
|
||||
UpdateMarketplaceResponse2,
|
||||
AxiosError<UpdateMarketplaceError>,
|
||||
Options<UpdateMarketplaceData>
|
||||
> = {
|
||||
mutationFn: async localOptions => {
|
||||
const { data } = await updateMarketplace({
|
||||
...options,
|
||||
...localOptions,
|
||||
throwOnError: true,
|
||||
});
|
||||
return data;
|
||||
},
|
||||
};
|
||||
return mutationOptions;
|
||||
};
|
||||
|
||||
export const getProductsQueryKey = (options?: Options<GetProductsData>) =>
|
||||
createQueryKey("getProducts", options);
|
||||
|
||||
|
||||
@ -30,6 +30,9 @@ import type {
|
||||
CreateDealServiceData,
|
||||
CreateDealServiceErrors,
|
||||
CreateDealServiceResponses,
|
||||
CreateMarketplaceData,
|
||||
CreateMarketplaceErrors,
|
||||
CreateMarketplaceResponses,
|
||||
CreateProductData,
|
||||
CreateProductErrors,
|
||||
CreateProductResponses,
|
||||
@ -69,6 +72,9 @@ import type {
|
||||
DeleteDealServiceData,
|
||||
DeleteDealServiceErrors,
|
||||
DeleteDealServiceResponses,
|
||||
DeleteMarketplaceData,
|
||||
DeleteMarketplaceErrors,
|
||||
DeleteMarketplaceResponses,
|
||||
DeleteProductData,
|
||||
DeleteProductErrors,
|
||||
DeleteProductResponses,
|
||||
@ -96,6 +102,8 @@ import type {
|
||||
GetBarcodeTemplateSizesData,
|
||||
GetBarcodeTemplateSizesResponses,
|
||||
GetBarcodeTemplatesResponses,
|
||||
GetBaseMarketplacesData,
|
||||
GetBaseMarketplacesResponses,
|
||||
GetBoardsData,
|
||||
GetBoardsErrors,
|
||||
GetBoardsResponses,
|
||||
@ -113,6 +121,9 @@ import type {
|
||||
GetDealServicesErrors,
|
||||
GetDealServicesResponses,
|
||||
GetDealsResponses,
|
||||
GetMarketplacesData,
|
||||
GetMarketplacesErrors,
|
||||
GetMarketplacesResponses,
|
||||
GetProductBarcodePdfData,
|
||||
GetProductBarcodePdfErrors,
|
||||
GetProductBarcodePdfResponses,
|
||||
@ -154,6 +165,9 @@ import type {
|
||||
UpdateDealServiceData,
|
||||
UpdateDealServiceErrors,
|
||||
UpdateDealServiceResponses,
|
||||
UpdateMarketplaceData,
|
||||
UpdateMarketplaceErrors,
|
||||
UpdateMarketplaceResponses,
|
||||
UpdateProductData,
|
||||
UpdateProductErrors,
|
||||
UpdateProductResponses,
|
||||
@ -192,6 +206,8 @@ import {
|
||||
zCreateDealResponse2,
|
||||
zCreateDealServiceData,
|
||||
zCreateDealServiceResponse2,
|
||||
zCreateMarketplaceData,
|
||||
zCreateMarketplaceResponse2,
|
||||
zCreateProductData,
|
||||
zCreateProductResponse2,
|
||||
zCreateProjectData,
|
||||
@ -218,6 +234,8 @@ import {
|
||||
zDeleteDealResponse2,
|
||||
zDeleteDealServiceData,
|
||||
zDeleteDealServiceResponse2,
|
||||
zDeleteMarketplaceData,
|
||||
zDeleteMarketplaceResponse2,
|
||||
zDeleteProductData,
|
||||
zDeleteProductResponse2,
|
||||
zDeleteProjectData,
|
||||
@ -238,6 +256,8 @@ import {
|
||||
zGetBarcodeTemplateSizesData,
|
||||
zGetBarcodeTemplateSizesResponse2,
|
||||
zGetBarcodeTemplatesResponse2,
|
||||
zGetBaseMarketplacesData,
|
||||
zGetBaseMarketplacesResponse2,
|
||||
zGetBoardsData,
|
||||
zGetBoardsResponse2,
|
||||
zGetBuiltInModulesData,
|
||||
@ -250,6 +270,8 @@ import {
|
||||
zGetDealServicesData,
|
||||
zGetDealServicesResponse2,
|
||||
zGetDealsResponse2,
|
||||
zGetMarketplacesData,
|
||||
zGetMarketplacesResponse2,
|
||||
zGetProductBarcodePdfData,
|
||||
zGetProductBarcodePdfResponse2,
|
||||
zGetProductsData,
|
||||
@ -280,6 +302,8 @@ import {
|
||||
zUpdateDealResponse2,
|
||||
zUpdateDealServiceData,
|
||||
zUpdateDealServiceResponse2,
|
||||
zUpdateMarketplaceData,
|
||||
zUpdateMarketplaceResponse2,
|
||||
zUpdateProductData,
|
||||
zUpdateProductResponse2,
|
||||
zUpdateProjectData,
|
||||
@ -1363,6 +1387,129 @@ export const addKitToDeal = <ThrowOnError extends boolean = false>(
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Get Base Marketplaces
|
||||
*/
|
||||
export const getBaseMarketplaces = <ThrowOnError extends boolean = false>(
|
||||
options?: Options<GetBaseMarketplacesData, ThrowOnError>
|
||||
) => {
|
||||
return (options?.client ?? _heyApiClient).get<
|
||||
GetBaseMarketplacesResponses,
|
||||
unknown,
|
||||
ThrowOnError
|
||||
>({
|
||||
requestValidator: async data => {
|
||||
return await zGetBaseMarketplacesData.parseAsync(data);
|
||||
},
|
||||
responseType: "json",
|
||||
responseValidator: async data => {
|
||||
return await zGetBaseMarketplacesResponse2.parseAsync(data);
|
||||
},
|
||||
url: "/modules/fulfillment-base/marketplace/base",
|
||||
...options,
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Get Marketplaces
|
||||
*/
|
||||
export const getMarketplaces = <ThrowOnError extends boolean = false>(
|
||||
options: Options<GetMarketplacesData, ThrowOnError>
|
||||
) => {
|
||||
return (options.client ?? _heyApiClient).get<
|
||||
GetMarketplacesResponses,
|
||||
GetMarketplacesErrors,
|
||||
ThrowOnError
|
||||
>({
|
||||
requestValidator: async data => {
|
||||
return await zGetMarketplacesData.parseAsync(data);
|
||||
},
|
||||
responseType: "json",
|
||||
responseValidator: async data => {
|
||||
return await zGetMarketplacesResponse2.parseAsync(data);
|
||||
},
|
||||
url: "/modules/fulfillment-base/marketplace/{clientId}",
|
||||
...options,
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Create Product
|
||||
*/
|
||||
export const createMarketplace = <ThrowOnError extends boolean = false>(
|
||||
options: Options<CreateMarketplaceData, ThrowOnError>
|
||||
) => {
|
||||
return (options.client ?? _heyApiClient).post<
|
||||
CreateMarketplaceResponses,
|
||||
CreateMarketplaceErrors,
|
||||
ThrowOnError
|
||||
>({
|
||||
requestValidator: async data => {
|
||||
return await zCreateMarketplaceData.parseAsync(data);
|
||||
},
|
||||
responseType: "json",
|
||||
responseValidator: async data => {
|
||||
return await zCreateMarketplaceResponse2.parseAsync(data);
|
||||
},
|
||||
url: "/modules/fulfillment-base/marketplace/",
|
||||
...options,
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
...options.headers,
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Delete Marketplace
|
||||
*/
|
||||
export const deleteMarketplace = <ThrowOnError extends boolean = false>(
|
||||
options: Options<DeleteMarketplaceData, ThrowOnError>
|
||||
) => {
|
||||
return (options.client ?? _heyApiClient).delete<
|
||||
DeleteMarketplaceResponses,
|
||||
DeleteMarketplaceErrors,
|
||||
ThrowOnError
|
||||
>({
|
||||
requestValidator: async data => {
|
||||
return await zDeleteMarketplaceData.parseAsync(data);
|
||||
},
|
||||
responseType: "json",
|
||||
responseValidator: async data => {
|
||||
return await zDeleteMarketplaceResponse2.parseAsync(data);
|
||||
},
|
||||
url: "/modules/fulfillment-base/marketplace/{pk}",
|
||||
...options,
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Update Marketplace
|
||||
*/
|
||||
export const updateMarketplace = <ThrowOnError extends boolean = false>(
|
||||
options: Options<UpdateMarketplaceData, ThrowOnError>
|
||||
) => {
|
||||
return (options.client ?? _heyApiClient).patch<
|
||||
UpdateMarketplaceResponses,
|
||||
UpdateMarketplaceErrors,
|
||||
ThrowOnError
|
||||
>({
|
||||
requestValidator: async data => {
|
||||
return await zUpdateMarketplaceData.parseAsync(data);
|
||||
},
|
||||
responseType: "json",
|
||||
responseValidator: async data => {
|
||||
return await zUpdateMarketplaceResponse2.parseAsync(data);
|
||||
},
|
||||
url: "/modules/fulfillment-base/marketplace/{pk}",
|
||||
...options,
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
...options.headers,
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Get Products
|
||||
*/
|
||||
|
||||
@ -63,6 +63,24 @@ export type BarcodeTemplateSizeSchema = {
|
||||
height: number;
|
||||
};
|
||||
|
||||
/**
|
||||
* BaseMarketplaceSchema
|
||||
*/
|
||||
export type BaseMarketplaceSchema = {
|
||||
/**
|
||||
* Id
|
||||
*/
|
||||
id: number;
|
||||
/**
|
||||
* Name
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* Iconurl
|
||||
*/
|
||||
iconUrl: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* BoardSchema
|
||||
*/
|
||||
@ -453,6 +471,42 @@ export type CreateDealServiceSchema = {
|
||||
price: number;
|
||||
};
|
||||
|
||||
/**
|
||||
* CreateMarketplaceRequest
|
||||
*/
|
||||
export type CreateMarketplaceRequest = {
|
||||
entity: CreateMarketplaceSchema;
|
||||
};
|
||||
|
||||
/**
|
||||
* CreateMarketplaceResponse
|
||||
*/
|
||||
export type CreateMarketplaceResponse = {
|
||||
/**
|
||||
* Message
|
||||
*/
|
||||
message: string;
|
||||
entity: MarketplaceSchema;
|
||||
};
|
||||
|
||||
/**
|
||||
* CreateMarketplaceSchema
|
||||
*/
|
||||
export type CreateMarketplaceSchema = {
|
||||
baseMarketplace: BaseMarketplaceSchema;
|
||||
client: ClientSchema;
|
||||
/**
|
||||
* Name
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* Authdata
|
||||
*/
|
||||
authData: {
|
||||
[key: string]: unknown;
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* CreateProductRequest
|
||||
*/
|
||||
@ -953,6 +1007,16 @@ export type DeleteDealServiceResponse = {
|
||||
message: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* DeleteMarketplaceResponse
|
||||
*/
|
||||
export type DeleteMarketplaceResponse = {
|
||||
/**
|
||||
* Message
|
||||
*/
|
||||
message: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* DeleteProductResponse
|
||||
*/
|
||||
@ -1063,6 +1127,16 @@ export type GetBarcodeTemplatesResponse = {
|
||||
items: Array<BarcodeTemplateSchema>;
|
||||
};
|
||||
|
||||
/**
|
||||
* GetBaseMarketplacesResponse
|
||||
*/
|
||||
export type GetBaseMarketplacesResponse = {
|
||||
/**
|
||||
* Items
|
||||
*/
|
||||
items: Array<BaseMarketplaceSchema>;
|
||||
};
|
||||
|
||||
/**
|
||||
* GetBoardsResponse
|
||||
*/
|
||||
@ -1114,6 +1188,16 @@ export type GetDealsResponse = {
|
||||
paginationInfo: PaginationInfoSchema;
|
||||
};
|
||||
|
||||
/**
|
||||
* GetMarketplacesResponse
|
||||
*/
|
||||
export type GetMarketplacesResponse = {
|
||||
/**
|
||||
* Items
|
||||
*/
|
||||
items: Array<MarketplaceSchema>;
|
||||
};
|
||||
|
||||
/**
|
||||
* GetProductBarcodePdfRequest
|
||||
*/
|
||||
@ -1231,6 +1315,32 @@ export type HttpValidationError = {
|
||||
detail?: Array<ValidationError>;
|
||||
};
|
||||
|
||||
/**
|
||||
* MarketplaceSchema
|
||||
*/
|
||||
export type MarketplaceSchema = {
|
||||
/**
|
||||
* Id
|
||||
*/
|
||||
id: number;
|
||||
/**
|
||||
* Basemarketplaceid
|
||||
*/
|
||||
baseMarketplaceId: number;
|
||||
baseMarketplace: BaseMarketplaceSchema;
|
||||
client: ClientSchema;
|
||||
/**
|
||||
* Name
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* Authdata
|
||||
*/
|
||||
authData: {
|
||||
[key: string]: unknown;
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* PaginationInfoSchema
|
||||
*/
|
||||
@ -1749,6 +1859,41 @@ export type UpdateDealServiceSchema = {
|
||||
isFixedPrice: boolean;
|
||||
};
|
||||
|
||||
/**
|
||||
* UpdateMarketplaceRequest
|
||||
*/
|
||||
export type UpdateMarketplaceRequest = {
|
||||
entity: UpdateMarketplaceSchema;
|
||||
};
|
||||
|
||||
/**
|
||||
* UpdateMarketplaceResponse
|
||||
*/
|
||||
export type UpdateMarketplaceResponse = {
|
||||
/**
|
||||
* Message
|
||||
*/
|
||||
message: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* UpdateMarketplaceSchema
|
||||
*/
|
||||
export type UpdateMarketplaceSchema = {
|
||||
baseMarketplace?: BaseMarketplaceSchema | null;
|
||||
client?: ClientSchema | null;
|
||||
/**
|
||||
* Name
|
||||
*/
|
||||
name?: string | null;
|
||||
/**
|
||||
* Authdata
|
||||
*/
|
||||
authData?: {
|
||||
[key: string]: unknown;
|
||||
} | null;
|
||||
};
|
||||
|
||||
/**
|
||||
* UpdateProductRequest
|
||||
*/
|
||||
@ -3304,6 +3449,146 @@ export type AddKitToDealResponses = {
|
||||
export type AddKitToDealResponse =
|
||||
AddKitToDealResponses[keyof AddKitToDealResponses];
|
||||
|
||||
export type GetBaseMarketplacesData = {
|
||||
body?: never;
|
||||
path?: never;
|
||||
query?: never;
|
||||
url: "/modules/fulfillment-base/marketplace/base";
|
||||
};
|
||||
|
||||
export type GetBaseMarketplacesResponses = {
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
200: GetBaseMarketplacesResponse;
|
||||
};
|
||||
|
||||
export type GetBaseMarketplacesResponse2 =
|
||||
GetBaseMarketplacesResponses[keyof GetBaseMarketplacesResponses];
|
||||
|
||||
export type GetMarketplacesData = {
|
||||
body?: never;
|
||||
path: {
|
||||
/**
|
||||
* Clientid
|
||||
*/
|
||||
clientId: number;
|
||||
};
|
||||
query?: never;
|
||||
url: "/modules/fulfillment-base/marketplace/{clientId}";
|
||||
};
|
||||
|
||||
export type GetMarketplacesErrors = {
|
||||
/**
|
||||
* Validation Error
|
||||
*/
|
||||
422: HttpValidationError;
|
||||
};
|
||||
|
||||
export type GetMarketplacesError =
|
||||
GetMarketplacesErrors[keyof GetMarketplacesErrors];
|
||||
|
||||
export type GetMarketplacesResponses = {
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
200: GetMarketplacesResponse;
|
||||
};
|
||||
|
||||
export type GetMarketplacesResponse2 =
|
||||
GetMarketplacesResponses[keyof GetMarketplacesResponses];
|
||||
|
||||
export type CreateMarketplaceData = {
|
||||
body: CreateMarketplaceRequest;
|
||||
path?: never;
|
||||
query?: never;
|
||||
url: "/modules/fulfillment-base/marketplace/";
|
||||
};
|
||||
|
||||
export type CreateMarketplaceErrors = {
|
||||
/**
|
||||
* Validation Error
|
||||
*/
|
||||
422: HttpValidationError;
|
||||
};
|
||||
|
||||
export type CreateMarketplaceError =
|
||||
CreateMarketplaceErrors[keyof CreateMarketplaceErrors];
|
||||
|
||||
export type CreateMarketplaceResponses = {
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
200: CreateMarketplaceResponse;
|
||||
};
|
||||
|
||||
export type CreateMarketplaceResponse2 =
|
||||
CreateMarketplaceResponses[keyof CreateMarketplaceResponses];
|
||||
|
||||
export type DeleteMarketplaceData = {
|
||||
body?: never;
|
||||
path: {
|
||||
/**
|
||||
* Pk
|
||||
*/
|
||||
pk: number;
|
||||
};
|
||||
query?: never;
|
||||
url: "/modules/fulfillment-base/marketplace/{pk}";
|
||||
};
|
||||
|
||||
export type DeleteMarketplaceErrors = {
|
||||
/**
|
||||
* Validation Error
|
||||
*/
|
||||
422: HttpValidationError;
|
||||
};
|
||||
|
||||
export type DeleteMarketplaceError =
|
||||
DeleteMarketplaceErrors[keyof DeleteMarketplaceErrors];
|
||||
|
||||
export type DeleteMarketplaceResponses = {
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
200: DeleteMarketplaceResponse;
|
||||
};
|
||||
|
||||
export type DeleteMarketplaceResponse2 =
|
||||
DeleteMarketplaceResponses[keyof DeleteMarketplaceResponses];
|
||||
|
||||
export type UpdateMarketplaceData = {
|
||||
body: UpdateMarketplaceRequest;
|
||||
path: {
|
||||
/**
|
||||
* Pk
|
||||
*/
|
||||
pk: number;
|
||||
};
|
||||
query?: never;
|
||||
url: "/modules/fulfillment-base/marketplace/{pk}";
|
||||
};
|
||||
|
||||
export type UpdateMarketplaceErrors = {
|
||||
/**
|
||||
* Validation Error
|
||||
*/
|
||||
422: HttpValidationError;
|
||||
};
|
||||
|
||||
export type UpdateMarketplaceError =
|
||||
UpdateMarketplaceErrors[keyof UpdateMarketplaceErrors];
|
||||
|
||||
export type UpdateMarketplaceResponses = {
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
200: UpdateMarketplaceResponse;
|
||||
};
|
||||
|
||||
export type UpdateMarketplaceResponse2 =
|
||||
UpdateMarketplaceResponses[keyof UpdateMarketplaceResponses];
|
||||
|
||||
export type GetProductsData = {
|
||||
body?: never;
|
||||
path?: never;
|
||||
|
||||
@ -32,6 +32,15 @@ export const zBarcodeTemplateSchema = z.object({
|
||||
id: z.int(),
|
||||
});
|
||||
|
||||
/**
|
||||
* BaseMarketplaceSchema
|
||||
*/
|
||||
export const zBaseMarketplaceSchema = z.object({
|
||||
id: z.int(),
|
||||
name: z.string(),
|
||||
iconUrl: z.string(),
|
||||
});
|
||||
|
||||
/**
|
||||
* BoardSchema
|
||||
*/
|
||||
@ -377,6 +386,43 @@ export const zCreateDealServiceResponse = z.object({
|
||||
entity: zDealServiceSchema,
|
||||
});
|
||||
|
||||
/**
|
||||
* CreateMarketplaceSchema
|
||||
*/
|
||||
export const zCreateMarketplaceSchema = z.object({
|
||||
baseMarketplace: zBaseMarketplaceSchema,
|
||||
client: zClientSchema,
|
||||
name: z.string(),
|
||||
authData: z.object({}),
|
||||
});
|
||||
|
||||
/**
|
||||
* CreateMarketplaceRequest
|
||||
*/
|
||||
export const zCreateMarketplaceRequest = z.object({
|
||||
entity: zCreateMarketplaceSchema,
|
||||
});
|
||||
|
||||
/**
|
||||
* MarketplaceSchema
|
||||
*/
|
||||
export const zMarketplaceSchema = z.object({
|
||||
id: z.int(),
|
||||
baseMarketplaceId: z.int(),
|
||||
baseMarketplace: zBaseMarketplaceSchema,
|
||||
client: zClientSchema,
|
||||
name: z.string(),
|
||||
authData: z.object({}),
|
||||
});
|
||||
|
||||
/**
|
||||
* CreateMarketplaceResponse
|
||||
*/
|
||||
export const zCreateMarketplaceResponse = z.object({
|
||||
message: z.string(),
|
||||
entity: zMarketplaceSchema,
|
||||
});
|
||||
|
||||
/**
|
||||
* CreateProductSchema
|
||||
*/
|
||||
@ -650,6 +696,13 @@ export const zDeleteDealServiceResponse = z.object({
|
||||
message: z.string(),
|
||||
});
|
||||
|
||||
/**
|
||||
* DeleteMarketplaceResponse
|
||||
*/
|
||||
export const zDeleteMarketplaceResponse = z.object({
|
||||
message: z.string(),
|
||||
});
|
||||
|
||||
/**
|
||||
* DeleteProductResponse
|
||||
*/
|
||||
@ -727,6 +780,13 @@ export const zGetBarcodeTemplatesResponse = z.object({
|
||||
items: z.array(zBarcodeTemplateSchema),
|
||||
});
|
||||
|
||||
/**
|
||||
* GetBaseMarketplacesResponse
|
||||
*/
|
||||
export const zGetBaseMarketplacesResponse = z.object({
|
||||
items: z.array(zBaseMarketplaceSchema),
|
||||
});
|
||||
|
||||
/**
|
||||
* GetBoardsResponse
|
||||
*/
|
||||
@ -771,6 +831,13 @@ export const zGetDealsResponse = z.object({
|
||||
paginationInfo: zPaginationInfoSchema,
|
||||
});
|
||||
|
||||
/**
|
||||
* GetMarketplacesResponse
|
||||
*/
|
||||
export const zGetMarketplacesResponse = z.object({
|
||||
items: z.array(zMarketplaceSchema),
|
||||
});
|
||||
|
||||
/**
|
||||
* GetProductBarcodePdfRequest
|
||||
*/
|
||||
@ -1037,6 +1104,30 @@ export const zUpdateDealServiceResponse = z.object({
|
||||
message: z.string(),
|
||||
});
|
||||
|
||||
/**
|
||||
* UpdateMarketplaceSchema
|
||||
*/
|
||||
export const zUpdateMarketplaceSchema = z.object({
|
||||
baseMarketplace: z.optional(z.union([zBaseMarketplaceSchema, z.null()])),
|
||||
client: z.optional(z.union([zClientSchema, z.null()])),
|
||||
name: z.optional(z.union([z.string(), z.null()])),
|
||||
authData: z.optional(z.union([z.object({}), z.null()])),
|
||||
});
|
||||
|
||||
/**
|
||||
* UpdateMarketplaceRequest
|
||||
*/
|
||||
export const zUpdateMarketplaceRequest = z.object({
|
||||
entity: zUpdateMarketplaceSchema,
|
||||
});
|
||||
|
||||
/**
|
||||
* UpdateMarketplaceResponse
|
||||
*/
|
||||
export const zUpdateMarketplaceResponse = z.object({
|
||||
message: z.string(),
|
||||
});
|
||||
|
||||
/**
|
||||
* UpdateProductSchema
|
||||
*/
|
||||
@ -1746,6 +1837,67 @@ export const zAddKitToDealData = z.object({
|
||||
*/
|
||||
export const zAddKitToDealResponse = zDealAddKitResponse;
|
||||
|
||||
export const zGetBaseMarketplacesData = z.object({
|
||||
body: z.optional(z.never()),
|
||||
path: z.optional(z.never()),
|
||||
query: z.optional(z.never()),
|
||||
});
|
||||
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
export const zGetBaseMarketplacesResponse2 = zGetBaseMarketplacesResponse;
|
||||
|
||||
export const zGetMarketplacesData = z.object({
|
||||
body: z.optional(z.never()),
|
||||
path: z.object({
|
||||
clientId: z.int(),
|
||||
}),
|
||||
query: z.optional(z.never()),
|
||||
});
|
||||
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
export const zGetMarketplacesResponse2 = zGetMarketplacesResponse;
|
||||
|
||||
export const zCreateMarketplaceData = z.object({
|
||||
body: zCreateMarketplaceRequest,
|
||||
path: z.optional(z.never()),
|
||||
query: z.optional(z.never()),
|
||||
});
|
||||
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
export const zCreateMarketplaceResponse2 = zCreateMarketplaceResponse;
|
||||
|
||||
export const zDeleteMarketplaceData = z.object({
|
||||
body: z.optional(z.never()),
|
||||
path: z.object({
|
||||
pk: z.int(),
|
||||
}),
|
||||
query: z.optional(z.never()),
|
||||
});
|
||||
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
export const zDeleteMarketplaceResponse2 = zDeleteMarketplaceResponse;
|
||||
|
||||
export const zUpdateMarketplaceData = z.object({
|
||||
body: zUpdateMarketplaceRequest,
|
||||
path: z.object({
|
||||
pk: z.int(),
|
||||
}),
|
||||
query: z.optional(z.never()),
|
||||
});
|
||||
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
export const zUpdateMarketplaceResponse2 = zUpdateMarketplaceResponse;
|
||||
|
||||
export const zGetProductsData = z.object({
|
||||
body: z.optional(z.never()),
|
||||
path: z.optional(z.never()),
|
||||
|
||||
Reference in New Issue
Block a user