feat: modules, products, services, services kits
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@ -3,15 +3,36 @@
|
||||
import type { Client, Options as ClientOptions, TDataShape } from "./client";
|
||||
import { client as _heyApiClient } from "./client.gen";
|
||||
import type {
|
||||
AddKitToDealProductData,
|
||||
AddKitToDealProductErrors,
|
||||
AddKitToDealProductResponses,
|
||||
CreateBoardData,
|
||||
CreateBoardErrors,
|
||||
CreateBoardResponses,
|
||||
CreateDealData,
|
||||
CreateDealErrors,
|
||||
CreateDealProductData,
|
||||
CreateDealProductErrors,
|
||||
CreateDealProductResponses,
|
||||
CreateDealProductServiceData,
|
||||
CreateDealProductServiceErrors,
|
||||
CreateDealProductServiceResponses,
|
||||
CreateDealResponses,
|
||||
CreateDealServiceData,
|
||||
CreateDealServiceErrors,
|
||||
CreateDealServiceResponses,
|
||||
CreateProductData,
|
||||
CreateProductErrors,
|
||||
CreateProductResponses,
|
||||
CreateProjectData,
|
||||
CreateProjectErrors,
|
||||
CreateProjectResponses,
|
||||
CreateServiceData,
|
||||
CreateServiceErrors,
|
||||
CreateServiceResponses,
|
||||
CreateServicesKitData,
|
||||
CreateServicesKitErrors,
|
||||
CreateServicesKitResponses,
|
||||
CreateStatusData,
|
||||
CreateStatusErrors,
|
||||
CreateStatusResponses,
|
||||
@ -20,21 +41,57 @@ import type {
|
||||
DeleteBoardResponses,
|
||||
DeleteDealData,
|
||||
DeleteDealErrors,
|
||||
DeleteDealProductData,
|
||||
DeleteDealProductErrors,
|
||||
DeleteDealProductResponses,
|
||||
DeleteDealProductServiceData,
|
||||
DeleteDealProductServiceErrors,
|
||||
DeleteDealProductServiceResponses,
|
||||
DeleteDealResponses,
|
||||
DeleteDealServiceData,
|
||||
DeleteDealServiceErrors,
|
||||
DeleteDealServiceResponses,
|
||||
DeleteProductData,
|
||||
DeleteProductErrors,
|
||||
DeleteProductResponses,
|
||||
DeleteProjectData,
|
||||
DeleteProjectErrors,
|
||||
DeleteProjectResponses,
|
||||
DeleteServiceData,
|
||||
DeleteServiceErrors,
|
||||
DeleteServiceResponses,
|
||||
DeleteServicesKitData,
|
||||
DeleteServicesKitErrors,
|
||||
DeleteServicesKitResponses,
|
||||
DeleteStatusData,
|
||||
DeleteStatusErrors,
|
||||
DeleteStatusResponses,
|
||||
DuplicateProductServicesData,
|
||||
DuplicateProductServicesErrors,
|
||||
DuplicateProductServicesResponses,
|
||||
GetBoardsData,
|
||||
GetBoardsErrors,
|
||||
GetBoardsResponses,
|
||||
GetBuiltInModulesData,
|
||||
GetBuiltInModulesResponses,
|
||||
GetDealProductsData,
|
||||
GetDealProductsErrors,
|
||||
GetDealProductsResponses,
|
||||
GetDealsData,
|
||||
GetDealsErrors,
|
||||
GetDealServicesData,
|
||||
GetDealServicesErrors,
|
||||
GetDealServicesResponses,
|
||||
GetDealsResponses,
|
||||
GetProductsData,
|
||||
GetProductsErrors,
|
||||
GetProductsResponses,
|
||||
GetProjectsData,
|
||||
GetProjectsResponses,
|
||||
GetServicesData,
|
||||
GetServicesKitsData,
|
||||
GetServicesKitsResponses,
|
||||
GetServicesResponses,
|
||||
GetStatusesData,
|
||||
GetStatusesErrors,
|
||||
GetStatusesResponses,
|
||||
@ -43,45 +100,115 @@ import type {
|
||||
UpdateBoardResponses,
|
||||
UpdateDealData,
|
||||
UpdateDealErrors,
|
||||
UpdateDealProductData,
|
||||
UpdateDealProductErrors,
|
||||
UpdateDealProductResponses,
|
||||
UpdateDealProductServiceData,
|
||||
UpdateDealProductServiceErrors,
|
||||
UpdateDealProductServiceResponses,
|
||||
UpdateDealResponses,
|
||||
UpdateDealServiceData,
|
||||
UpdateDealServiceErrors,
|
||||
UpdateDealServiceResponses,
|
||||
UpdateProductData,
|
||||
UpdateProductErrors,
|
||||
UpdateProductResponses,
|
||||
UpdateProjectData,
|
||||
UpdateProjectErrors,
|
||||
UpdateProjectResponses,
|
||||
UpdateServiceData,
|
||||
UpdateServiceErrors,
|
||||
UpdateServiceResponses,
|
||||
UpdateServicesKitData,
|
||||
UpdateServicesKitErrors,
|
||||
UpdateServicesKitResponses,
|
||||
UpdateStatusData,
|
||||
UpdateStatusErrors,
|
||||
UpdateStatusResponses,
|
||||
} from "./types.gen";
|
||||
import {
|
||||
zAddKitToDealProductData,
|
||||
zAddKitToDealProductResponse,
|
||||
zCreateBoardData,
|
||||
zCreateBoardResponse2,
|
||||
zCreateDealData,
|
||||
zCreateDealProductData,
|
||||
zCreateDealProductResponse2,
|
||||
zCreateDealProductServiceData,
|
||||
zCreateDealProductServiceResponse,
|
||||
zCreateDealResponse2,
|
||||
zCreateDealServiceData,
|
||||
zCreateDealServiceResponse2,
|
||||
zCreateProductData,
|
||||
zCreateProductResponse2,
|
||||
zCreateProjectData,
|
||||
zCreateProjectResponse2,
|
||||
zCreateServiceData,
|
||||
zCreateServiceResponse2,
|
||||
zCreateServicesKitData,
|
||||
zCreateServicesKitResponse2,
|
||||
zCreateStatusData,
|
||||
zCreateStatusResponse2,
|
||||
zDeleteBoardData,
|
||||
zDeleteBoardResponse2,
|
||||
zDeleteDealData,
|
||||
zDeleteDealProductData,
|
||||
zDeleteDealProductResponse2,
|
||||
zDeleteDealProductServiceData,
|
||||
zDeleteDealProductServiceResponse,
|
||||
zDeleteDealResponse2,
|
||||
zDeleteDealServiceData,
|
||||
zDeleteDealServiceResponse2,
|
||||
zDeleteProductData,
|
||||
zDeleteProductResponse2,
|
||||
zDeleteProjectData,
|
||||
zDeleteProjectResponse2,
|
||||
zDeleteServiceData,
|
||||
zDeleteServiceResponse2,
|
||||
zDeleteServicesKitData,
|
||||
zDeleteServicesKitResponse2,
|
||||
zDeleteStatusData,
|
||||
zDeleteStatusResponse2,
|
||||
zDuplicateProductServicesData,
|
||||
zDuplicateProductServicesResponse,
|
||||
zGetBoardsData,
|
||||
zGetBoardsResponse2,
|
||||
zGetBuiltInModulesData,
|
||||
zGetBuiltInModulesResponse,
|
||||
zGetDealProductsData,
|
||||
zGetDealProductsResponse2,
|
||||
zGetDealsData,
|
||||
zGetDealServicesData,
|
||||
zGetDealServicesResponse2,
|
||||
zGetDealsResponse2,
|
||||
zGetProductsData,
|
||||
zGetProductsResponse2,
|
||||
zGetProjectsData,
|
||||
zGetProjectsResponse2,
|
||||
zGetServicesData,
|
||||
zGetServicesKitsData,
|
||||
zGetServicesKitsResponse,
|
||||
zGetServicesResponse2,
|
||||
zGetStatusesData,
|
||||
zGetStatusesResponse2,
|
||||
zUpdateBoardData,
|
||||
zUpdateBoardResponse2,
|
||||
zUpdateDealData,
|
||||
zUpdateDealProductData,
|
||||
zUpdateDealProductResponse2,
|
||||
zUpdateDealProductServiceData,
|
||||
zUpdateDealProductServiceResponse,
|
||||
zUpdateDealResponse2,
|
||||
zUpdateDealServiceData,
|
||||
zUpdateDealServiceResponse2,
|
||||
zUpdateProductData,
|
||||
zUpdateProductResponse2,
|
||||
zUpdateProjectData,
|
||||
zUpdateProjectResponse2,
|
||||
zUpdateServiceData,
|
||||
zUpdateServiceResponse2,
|
||||
zUpdateServicesKitData,
|
||||
zUpdateServicesKitResponse2,
|
||||
zUpdateStatusData,
|
||||
zUpdateStatusResponse2,
|
||||
} from "./zod.gen";
|
||||
@ -303,6 +430,29 @@ export const updateDeal = <ThrowOnError extends boolean = false>(
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Get Built In Modules
|
||||
*/
|
||||
export const getBuiltInModules = <ThrowOnError extends boolean = false>(
|
||||
options?: Options<GetBuiltInModulesData, ThrowOnError>
|
||||
) => {
|
||||
return (options?.client ?? _heyApiClient).get<
|
||||
GetBuiltInModulesResponses,
|
||||
unknown,
|
||||
ThrowOnError
|
||||
>({
|
||||
requestValidator: async data => {
|
||||
return await zGetBuiltInModulesData.parseAsync(data);
|
||||
},
|
||||
responseType: "json",
|
||||
responseValidator: async data => {
|
||||
return await zGetBuiltInModulesResponse.parseAsync(data);
|
||||
},
|
||||
url: "/module/built-in/",
|
||||
...options,
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Get Projects
|
||||
*/
|
||||
@ -502,3 +652,634 @@ export const updateStatus = <ThrowOnError extends boolean = false>(
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Get Deal Products
|
||||
*/
|
||||
export const getDealProducts = <ThrowOnError extends boolean = false>(
|
||||
options: Options<GetDealProductsData, ThrowOnError>
|
||||
) => {
|
||||
return (options.client ?? _heyApiClient).get<
|
||||
GetDealProductsResponses,
|
||||
GetDealProductsErrors,
|
||||
ThrowOnError
|
||||
>({
|
||||
requestValidator: async data => {
|
||||
return await zGetDealProductsData.parseAsync(data);
|
||||
},
|
||||
responseType: "json",
|
||||
responseValidator: async data => {
|
||||
return await zGetDealProductsResponse2.parseAsync(data);
|
||||
},
|
||||
url: "/modules/fulfillment-base/deal-product/{dealId}",
|
||||
...options,
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Create Deal Product
|
||||
*/
|
||||
export const createDealProduct = <ThrowOnError extends boolean = false>(
|
||||
options: Options<CreateDealProductData, ThrowOnError>
|
||||
) => {
|
||||
return (options.client ?? _heyApiClient).post<
|
||||
CreateDealProductResponses,
|
||||
CreateDealProductErrors,
|
||||
ThrowOnError
|
||||
>({
|
||||
requestValidator: async data => {
|
||||
return await zCreateDealProductData.parseAsync(data);
|
||||
},
|
||||
responseType: "json",
|
||||
responseValidator: async data => {
|
||||
return await zCreateDealProductResponse2.parseAsync(data);
|
||||
},
|
||||
url: "/modules/fulfillment-base/deal-product/",
|
||||
...options,
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
...options.headers,
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Delete Deal Product
|
||||
*/
|
||||
export const deleteDealProduct = <ThrowOnError extends boolean = false>(
|
||||
options: Options<DeleteDealProductData, ThrowOnError>
|
||||
) => {
|
||||
return (options.client ?? _heyApiClient).delete<
|
||||
DeleteDealProductResponses,
|
||||
DeleteDealProductErrors,
|
||||
ThrowOnError
|
||||
>({
|
||||
requestValidator: async data => {
|
||||
return await zDeleteDealProductData.parseAsync(data);
|
||||
},
|
||||
responseType: "json",
|
||||
responseValidator: async data => {
|
||||
return await zDeleteDealProductResponse2.parseAsync(data);
|
||||
},
|
||||
url: "/modules/fulfillment-base/deal-product/{dealId}/product/{productId}",
|
||||
...options,
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Update Deal Product
|
||||
*/
|
||||
export const updateDealProduct = <ThrowOnError extends boolean = false>(
|
||||
options: Options<UpdateDealProductData, ThrowOnError>
|
||||
) => {
|
||||
return (options.client ?? _heyApiClient).patch<
|
||||
UpdateDealProductResponses,
|
||||
UpdateDealProductErrors,
|
||||
ThrowOnError
|
||||
>({
|
||||
requestValidator: async data => {
|
||||
return await zUpdateDealProductData.parseAsync(data);
|
||||
},
|
||||
responseType: "json",
|
||||
responseValidator: async data => {
|
||||
return await zUpdateDealProductResponse2.parseAsync(data);
|
||||
},
|
||||
url: "/modules/fulfillment-base/deal-product/{dealId}/product/{productId}",
|
||||
...options,
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
...options.headers,
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Add Kit To Deal Product
|
||||
*/
|
||||
export const addKitToDealProduct = <ThrowOnError extends boolean = false>(
|
||||
options: Options<AddKitToDealProductData, ThrowOnError>
|
||||
) => {
|
||||
return (options.client ?? _heyApiClient).post<
|
||||
AddKitToDealProductResponses,
|
||||
AddKitToDealProductErrors,
|
||||
ThrowOnError
|
||||
>({
|
||||
requestValidator: async data => {
|
||||
return await zAddKitToDealProductData.parseAsync(data);
|
||||
},
|
||||
responseType: "json",
|
||||
responseValidator: async data => {
|
||||
return await zAddKitToDealProductResponse.parseAsync(data);
|
||||
},
|
||||
url: "/modules/fulfillment-base/deal-product/add-services-kit",
|
||||
...options,
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
...options.headers,
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Create Deal Product Service
|
||||
*/
|
||||
export const createDealProductService = <ThrowOnError extends boolean = false>(
|
||||
options: Options<CreateDealProductServiceData, ThrowOnError>
|
||||
) => {
|
||||
return (options.client ?? _heyApiClient).post<
|
||||
CreateDealProductServiceResponses,
|
||||
CreateDealProductServiceErrors,
|
||||
ThrowOnError
|
||||
>({
|
||||
requestValidator: async data => {
|
||||
return await zCreateDealProductServiceData.parseAsync(data);
|
||||
},
|
||||
responseType: "json",
|
||||
responseValidator: async data => {
|
||||
return await zCreateDealProductServiceResponse.parseAsync(data);
|
||||
},
|
||||
url: "/modules/fulfillment-base/deal-product/service",
|
||||
...options,
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
...options.headers,
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Delete Deal Product Service
|
||||
*/
|
||||
export const deleteDealProductService = <ThrowOnError extends boolean = false>(
|
||||
options: Options<DeleteDealProductServiceData, ThrowOnError>
|
||||
) => {
|
||||
return (options.client ?? _heyApiClient).delete<
|
||||
DeleteDealProductServiceResponses,
|
||||
DeleteDealProductServiceErrors,
|
||||
ThrowOnError
|
||||
>({
|
||||
requestValidator: async data => {
|
||||
return await zDeleteDealProductServiceData.parseAsync(data);
|
||||
},
|
||||
responseType: "json",
|
||||
responseValidator: async data => {
|
||||
return await zDeleteDealProductServiceResponse.parseAsync(data);
|
||||
},
|
||||
url: "/modules/fulfillment-base/deal-product/{dealId}/product/{productId}/service/{serviceId}",
|
||||
...options,
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Update Deal Product Service
|
||||
*/
|
||||
export const updateDealProductService = <ThrowOnError extends boolean = false>(
|
||||
options: Options<UpdateDealProductServiceData, ThrowOnError>
|
||||
) => {
|
||||
return (options.client ?? _heyApiClient).patch<
|
||||
UpdateDealProductServiceResponses,
|
||||
UpdateDealProductServiceErrors,
|
||||
ThrowOnError
|
||||
>({
|
||||
requestValidator: async data => {
|
||||
return await zUpdateDealProductServiceData.parseAsync(data);
|
||||
},
|
||||
responseType: "json",
|
||||
responseValidator: async data => {
|
||||
return await zUpdateDealProductServiceResponse.parseAsync(data);
|
||||
},
|
||||
url: "/modules/fulfillment-base/deal-product/{dealId}/product/{productId}/service/{serviceId}",
|
||||
...options,
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
...options.headers,
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Copy Product Services
|
||||
*/
|
||||
export const duplicateProductServices = <ThrowOnError extends boolean = false>(
|
||||
options: Options<DuplicateProductServicesData, ThrowOnError>
|
||||
) => {
|
||||
return (options.client ?? _heyApiClient).post<
|
||||
DuplicateProductServicesResponses,
|
||||
DuplicateProductServicesErrors,
|
||||
ThrowOnError
|
||||
>({
|
||||
requestValidator: async data => {
|
||||
return await zDuplicateProductServicesData.parseAsync(data);
|
||||
},
|
||||
responseType: "json",
|
||||
responseValidator: async data => {
|
||||
return await zDuplicateProductServicesResponse.parseAsync(data);
|
||||
},
|
||||
url: "/modules/fulfillment-base/deal-product/services/duplicate",
|
||||
...options,
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
...options.headers,
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Get Deal Services
|
||||
*/
|
||||
export const getDealServices = <ThrowOnError extends boolean = false>(
|
||||
options: Options<GetDealServicesData, ThrowOnError>
|
||||
) => {
|
||||
return (options.client ?? _heyApiClient).get<
|
||||
GetDealServicesResponses,
|
||||
GetDealServicesErrors,
|
||||
ThrowOnError
|
||||
>({
|
||||
requestValidator: async data => {
|
||||
return await zGetDealServicesData.parseAsync(data);
|
||||
},
|
||||
responseType: "json",
|
||||
responseValidator: async data => {
|
||||
return await zGetDealServicesResponse2.parseAsync(data);
|
||||
},
|
||||
url: "/modules/fulfillment-base/deal-service/{dealId}",
|
||||
...options,
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Create Deal Service
|
||||
*/
|
||||
export const createDealService = <ThrowOnError extends boolean = false>(
|
||||
options: Options<CreateDealServiceData, ThrowOnError>
|
||||
) => {
|
||||
return (options.client ?? _heyApiClient).post<
|
||||
CreateDealServiceResponses,
|
||||
CreateDealServiceErrors,
|
||||
ThrowOnError
|
||||
>({
|
||||
requestValidator: async data => {
|
||||
return await zCreateDealServiceData.parseAsync(data);
|
||||
},
|
||||
responseType: "json",
|
||||
responseValidator: async data => {
|
||||
return await zCreateDealServiceResponse2.parseAsync(data);
|
||||
},
|
||||
url: "/modules/fulfillment-base/deal-service/",
|
||||
...options,
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
...options.headers,
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Delete Deal Service
|
||||
*/
|
||||
export const deleteDealService = <ThrowOnError extends boolean = false>(
|
||||
options: Options<DeleteDealServiceData, ThrowOnError>
|
||||
) => {
|
||||
return (options.client ?? _heyApiClient).delete<
|
||||
DeleteDealServiceResponses,
|
||||
DeleteDealServiceErrors,
|
||||
ThrowOnError
|
||||
>({
|
||||
requestValidator: async data => {
|
||||
return await zDeleteDealServiceData.parseAsync(data);
|
||||
},
|
||||
responseType: "json",
|
||||
responseValidator: async data => {
|
||||
return await zDeleteDealServiceResponse2.parseAsync(data);
|
||||
},
|
||||
url: "/modules/fulfillment-base/deal-service/{dealId}/service/{serviceId}",
|
||||
...options,
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Update Deal Service
|
||||
*/
|
||||
export const updateDealService = <ThrowOnError extends boolean = false>(
|
||||
options: Options<UpdateDealServiceData, ThrowOnError>
|
||||
) => {
|
||||
return (options.client ?? _heyApiClient).patch<
|
||||
UpdateDealServiceResponses,
|
||||
UpdateDealServiceErrors,
|
||||
ThrowOnError
|
||||
>({
|
||||
requestValidator: async data => {
|
||||
return await zUpdateDealServiceData.parseAsync(data);
|
||||
},
|
||||
responseType: "json",
|
||||
responseValidator: async data => {
|
||||
return await zUpdateDealServiceResponse2.parseAsync(data);
|
||||
},
|
||||
url: "/modules/fulfillment-base/deal-service/{dealId}/service/{serviceId}",
|
||||
...options,
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
...options.headers,
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Get Products
|
||||
*/
|
||||
export const getProducts = <ThrowOnError extends boolean = false>(
|
||||
options?: Options<GetProductsData, ThrowOnError>
|
||||
) => {
|
||||
return (options?.client ?? _heyApiClient).get<
|
||||
GetProductsResponses,
|
||||
GetProductsErrors,
|
||||
ThrowOnError
|
||||
>({
|
||||
requestValidator: async data => {
|
||||
return await zGetProductsData.parseAsync(data);
|
||||
},
|
||||
responseType: "json",
|
||||
responseValidator: async data => {
|
||||
return await zGetProductsResponse2.parseAsync(data);
|
||||
},
|
||||
url: "/modules/fulfillment-base/product/",
|
||||
...options,
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Create Product
|
||||
*/
|
||||
export const createProduct = <ThrowOnError extends boolean = false>(
|
||||
options: Options<CreateProductData, ThrowOnError>
|
||||
) => {
|
||||
return (options.client ?? _heyApiClient).post<
|
||||
CreateProductResponses,
|
||||
CreateProductErrors,
|
||||
ThrowOnError
|
||||
>({
|
||||
requestValidator: async data => {
|
||||
return await zCreateProductData.parseAsync(data);
|
||||
},
|
||||
responseType: "json",
|
||||
responseValidator: async data => {
|
||||
return await zCreateProductResponse2.parseAsync(data);
|
||||
},
|
||||
url: "/modules/fulfillment-base/product/",
|
||||
...options,
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
...options.headers,
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Delete Product
|
||||
*/
|
||||
export const deleteProduct = <ThrowOnError extends boolean = false>(
|
||||
options: Options<DeleteProductData, ThrowOnError>
|
||||
) => {
|
||||
return (options.client ?? _heyApiClient).delete<
|
||||
DeleteProductResponses,
|
||||
DeleteProductErrors,
|
||||
ThrowOnError
|
||||
>({
|
||||
requestValidator: async data => {
|
||||
return await zDeleteProductData.parseAsync(data);
|
||||
},
|
||||
responseType: "json",
|
||||
responseValidator: async data => {
|
||||
return await zDeleteProductResponse2.parseAsync(data);
|
||||
},
|
||||
url: "/modules/fulfillment-base/product/{pk}",
|
||||
...options,
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Update Product
|
||||
*/
|
||||
export const updateProduct = <ThrowOnError extends boolean = false>(
|
||||
options: Options<UpdateProductData, ThrowOnError>
|
||||
) => {
|
||||
return (options.client ?? _heyApiClient).patch<
|
||||
UpdateProductResponses,
|
||||
UpdateProductErrors,
|
||||
ThrowOnError
|
||||
>({
|
||||
requestValidator: async data => {
|
||||
return await zUpdateProductData.parseAsync(data);
|
||||
},
|
||||
responseType: "json",
|
||||
responseValidator: async data => {
|
||||
return await zUpdateProductResponse2.parseAsync(data);
|
||||
},
|
||||
url: "/modules/fulfillment-base/product/{pk}",
|
||||
...options,
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
...options.headers,
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Get Services
|
||||
*/
|
||||
export const getServices = <ThrowOnError extends boolean = false>(
|
||||
options?: Options<GetServicesData, ThrowOnError>
|
||||
) => {
|
||||
return (options?.client ?? _heyApiClient).get<
|
||||
GetServicesResponses,
|
||||
unknown,
|
||||
ThrowOnError
|
||||
>({
|
||||
requestValidator: async data => {
|
||||
return await zGetServicesData.parseAsync(data);
|
||||
},
|
||||
responseType: "json",
|
||||
responseValidator: async data => {
|
||||
return await zGetServicesResponse2.parseAsync(data);
|
||||
},
|
||||
url: "/modules/fulfillment-base/service/",
|
||||
...options,
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Create Service
|
||||
*/
|
||||
export const createService = <ThrowOnError extends boolean = false>(
|
||||
options: Options<CreateServiceData, ThrowOnError>
|
||||
) => {
|
||||
return (options.client ?? _heyApiClient).post<
|
||||
CreateServiceResponses,
|
||||
CreateServiceErrors,
|
||||
ThrowOnError
|
||||
>({
|
||||
requestValidator: async data => {
|
||||
return await zCreateServiceData.parseAsync(data);
|
||||
},
|
||||
responseType: "json",
|
||||
responseValidator: async data => {
|
||||
return await zCreateServiceResponse2.parseAsync(data);
|
||||
},
|
||||
url: "/modules/fulfillment-base/service/",
|
||||
...options,
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
...options.headers,
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Delete Service
|
||||
*/
|
||||
export const deleteService = <ThrowOnError extends boolean = false>(
|
||||
options: Options<DeleteServiceData, ThrowOnError>
|
||||
) => {
|
||||
return (options.client ?? _heyApiClient).delete<
|
||||
DeleteServiceResponses,
|
||||
DeleteServiceErrors,
|
||||
ThrowOnError
|
||||
>({
|
||||
requestValidator: async data => {
|
||||
return await zDeleteServiceData.parseAsync(data);
|
||||
},
|
||||
responseType: "json",
|
||||
responseValidator: async data => {
|
||||
return await zDeleteServiceResponse2.parseAsync(data);
|
||||
},
|
||||
url: "/modules/fulfillment-base/service/{pk}",
|
||||
...options,
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Update Service
|
||||
*/
|
||||
export const updateService = <ThrowOnError extends boolean = false>(
|
||||
options: Options<UpdateServiceData, ThrowOnError>
|
||||
) => {
|
||||
return (options.client ?? _heyApiClient).patch<
|
||||
UpdateServiceResponses,
|
||||
UpdateServiceErrors,
|
||||
ThrowOnError
|
||||
>({
|
||||
requestValidator: async data => {
|
||||
return await zUpdateServiceData.parseAsync(data);
|
||||
},
|
||||
responseType: "json",
|
||||
responseValidator: async data => {
|
||||
return await zUpdateServiceResponse2.parseAsync(data);
|
||||
},
|
||||
url: "/modules/fulfillment-base/service/{pk}",
|
||||
...options,
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
...options.headers,
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Get Services Kits
|
||||
*/
|
||||
export const getServicesKits = <ThrowOnError extends boolean = false>(
|
||||
options?: Options<GetServicesKitsData, ThrowOnError>
|
||||
) => {
|
||||
return (options?.client ?? _heyApiClient).get<
|
||||
GetServicesKitsResponses,
|
||||
unknown,
|
||||
ThrowOnError
|
||||
>({
|
||||
requestValidator: async data => {
|
||||
return await zGetServicesKitsData.parseAsync(data);
|
||||
},
|
||||
responseType: "json",
|
||||
responseValidator: async data => {
|
||||
return await zGetServicesKitsResponse.parseAsync(data);
|
||||
},
|
||||
url: "/modules/fulfillment-base/services-kit/",
|
||||
...options,
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Create Services Kit
|
||||
*/
|
||||
export const createServicesKit = <ThrowOnError extends boolean = false>(
|
||||
options: Options<CreateServicesKitData, ThrowOnError>
|
||||
) => {
|
||||
return (options.client ?? _heyApiClient).post<
|
||||
CreateServicesKitResponses,
|
||||
CreateServicesKitErrors,
|
||||
ThrowOnError
|
||||
>({
|
||||
requestValidator: async data => {
|
||||
return await zCreateServicesKitData.parseAsync(data);
|
||||
},
|
||||
responseType: "json",
|
||||
responseValidator: async data => {
|
||||
return await zCreateServicesKitResponse2.parseAsync(data);
|
||||
},
|
||||
url: "/modules/fulfillment-base/services-kit/",
|
||||
...options,
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
...options.headers,
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Delete Services Kit
|
||||
*/
|
||||
export const deleteServicesKit = <ThrowOnError extends boolean = false>(
|
||||
options: Options<DeleteServicesKitData, ThrowOnError>
|
||||
) => {
|
||||
return (options.client ?? _heyApiClient).delete<
|
||||
DeleteServicesKitResponses,
|
||||
DeleteServicesKitErrors,
|
||||
ThrowOnError
|
||||
>({
|
||||
requestValidator: async data => {
|
||||
return await zDeleteServicesKitData.parseAsync(data);
|
||||
},
|
||||
responseType: "json",
|
||||
responseValidator: async data => {
|
||||
return await zDeleteServicesKitResponse2.parseAsync(data);
|
||||
},
|
||||
url: "/modules/fulfillment-base/services-kit/{pk}",
|
||||
...options,
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Update Services Kit
|
||||
*/
|
||||
export const updateServicesKit = <ThrowOnError extends boolean = false>(
|
||||
options: Options<UpdateServicesKitData, ThrowOnError>
|
||||
) => {
|
||||
return (options.client ?? _heyApiClient).patch<
|
||||
UpdateServicesKitResponses,
|
||||
UpdateServicesKitErrors,
|
||||
ThrowOnError
|
||||
>({
|
||||
requestValidator: async data => {
|
||||
return await zUpdateServicesKitData.parseAsync(data);
|
||||
},
|
||||
responseType: "json",
|
||||
responseValidator: async data => {
|
||||
return await zUpdateServicesKitResponse2.parseAsync(data);
|
||||
},
|
||||
url: "/modules/fulfillment-base/services-kit/{pk}",
|
||||
...options,
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
...options.headers,
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -12,6 +12,17 @@ export const zBoardSchema = z.object({
|
||||
projectId: z.int(),
|
||||
});
|
||||
|
||||
/**
|
||||
* BuiltInModuleSchema
|
||||
*/
|
||||
export const zBuiltInModuleSchema = z.object({
|
||||
id: z.int(),
|
||||
key: z.string(),
|
||||
label: z.string(),
|
||||
iconName: z.string(),
|
||||
description: z.string(),
|
||||
});
|
||||
|
||||
/**
|
||||
* CreateBoardSchema
|
||||
*/
|
||||
@ -36,6 +47,104 @@ export const zCreateBoardResponse = z.object({
|
||||
entity: zBoardSchema,
|
||||
});
|
||||
|
||||
/**
|
||||
* CreateDealProductSchema
|
||||
*/
|
||||
export const zCreateDealProductSchema = z.object({
|
||||
dealId: z.int(),
|
||||
productId: z.int(),
|
||||
quantity: z.int(),
|
||||
comment: z.string(),
|
||||
});
|
||||
|
||||
/**
|
||||
* CreateDealProductRequest
|
||||
*/
|
||||
export const zCreateDealProductRequest = z.object({
|
||||
entity: zCreateDealProductSchema,
|
||||
});
|
||||
|
||||
/**
|
||||
* ProductSchema
|
||||
*/
|
||||
export const zProductSchema = z.object({
|
||||
name: z.string(),
|
||||
article: z.string(),
|
||||
factoryArticle: z.string(),
|
||||
brand: z.union([z.string(), z.null()]),
|
||||
color: z.union([z.string(), z.null()]),
|
||||
composition: z.union([z.string(), z.null()]),
|
||||
size: z.union([z.string(), z.null()]),
|
||||
additionalInfo: z.union([z.string(), z.null()]),
|
||||
id: z.int(),
|
||||
});
|
||||
|
||||
/**
|
||||
* ServiceCategorySchema
|
||||
*/
|
||||
export const zServiceCategorySchema = z.object({
|
||||
id: z.int(),
|
||||
name: z.string(),
|
||||
dealServiceRank: z.string(),
|
||||
productServiceRank: z.string(),
|
||||
});
|
||||
|
||||
/**
|
||||
* ServicePriceRangeSchema
|
||||
*/
|
||||
export const zServicePriceRangeSchema = z.object({
|
||||
id: z.union([z.int(), z.null()]),
|
||||
fromQuantity: z.int(),
|
||||
toQuantity: z.int(),
|
||||
price: z.number(),
|
||||
});
|
||||
|
||||
/**
|
||||
* ServiceSchema
|
||||
*/
|
||||
export const zServiceSchema = z.object({
|
||||
id: z.int(),
|
||||
name: z.string(),
|
||||
category: zServiceCategorySchema,
|
||||
price: z.number(),
|
||||
serviceType: z.int(),
|
||||
priceRanges: z.array(zServicePriceRangeSchema),
|
||||
cost: z.union([z.number(), z.null()]),
|
||||
lexorank: z.string(),
|
||||
});
|
||||
|
||||
/**
|
||||
* ProductServiceSchema
|
||||
*/
|
||||
export const zProductServiceSchema = z.object({
|
||||
dealId: z.int(),
|
||||
productId: z.int(),
|
||||
serviceId: z.int(),
|
||||
service: zServiceSchema,
|
||||
price: z.number(),
|
||||
isFixedPrice: z.boolean(),
|
||||
});
|
||||
|
||||
/**
|
||||
* DealProductSchema
|
||||
*/
|
||||
export const zDealProductSchema = z.object({
|
||||
dealId: z.int(),
|
||||
productId: z.int(),
|
||||
product: zProductSchema,
|
||||
quantity: z.int(),
|
||||
comment: z.string(),
|
||||
productServices: z.array(zProductServiceSchema),
|
||||
});
|
||||
|
||||
/**
|
||||
* CreateDealProductResponse
|
||||
*/
|
||||
export const zCreateDealProductResponse = z.object({
|
||||
message: z.string(),
|
||||
entity: zDealProductSchema,
|
||||
});
|
||||
|
||||
/**
|
||||
* CreateDealSchema
|
||||
*/
|
||||
@ -84,6 +193,97 @@ export const zCreateDealResponse = z.object({
|
||||
entity: zDealSchema,
|
||||
});
|
||||
|
||||
/**
|
||||
* CreateDealServiceSchema
|
||||
*/
|
||||
export const zCreateDealServiceSchema = z.object({
|
||||
dealId: z.int(),
|
||||
serviceId: z.int(),
|
||||
quantity: z.int(),
|
||||
price: z.number(),
|
||||
});
|
||||
|
||||
/**
|
||||
* CreateDealServiceRequest
|
||||
*/
|
||||
export const zCreateDealServiceRequest = z.object({
|
||||
entity: zCreateDealServiceSchema,
|
||||
});
|
||||
|
||||
/**
|
||||
* DealServiceSchema
|
||||
*/
|
||||
export const zDealServiceSchema = z.object({
|
||||
dealId: z.int(),
|
||||
serviceId: z.int(),
|
||||
service: zServiceSchema,
|
||||
quantity: z.int(),
|
||||
price: z.number(),
|
||||
isFixedPrice: z.boolean(),
|
||||
});
|
||||
|
||||
/**
|
||||
* CreateDealServiceResponse
|
||||
*/
|
||||
export const zCreateDealServiceResponse = z.object({
|
||||
message: z.string(),
|
||||
entity: zDealServiceSchema,
|
||||
});
|
||||
|
||||
/**
|
||||
* CreateProductSchema
|
||||
*/
|
||||
export const zCreateProductSchema = z.object({
|
||||
name: z.string(),
|
||||
article: z.string(),
|
||||
factoryArticle: z.string(),
|
||||
brand: z.union([z.string(), z.null()]),
|
||||
color: z.union([z.string(), z.null()]),
|
||||
composition: z.union([z.string(), z.null()]),
|
||||
size: z.union([z.string(), z.null()]),
|
||||
additionalInfo: z.union([z.string(), z.null()]),
|
||||
});
|
||||
|
||||
/**
|
||||
* CreateProductRequest
|
||||
*/
|
||||
export const zCreateProductRequest = z.object({
|
||||
entity: zCreateProductSchema,
|
||||
});
|
||||
|
||||
/**
|
||||
* CreateProductResponse
|
||||
*/
|
||||
export const zCreateProductResponse = z.object({
|
||||
message: z.string(),
|
||||
entity: zProductSchema,
|
||||
});
|
||||
|
||||
/**
|
||||
* CreateProductServiceSchema
|
||||
*/
|
||||
export const zCreateProductServiceSchema = z.object({
|
||||
dealId: z.int(),
|
||||
productId: z.int(),
|
||||
serviceId: z.int(),
|
||||
price: z.number(),
|
||||
});
|
||||
|
||||
/**
|
||||
* CreateProductServiceRequest
|
||||
*/
|
||||
export const zCreateProductServiceRequest = z.object({
|
||||
entity: zCreateProductServiceSchema,
|
||||
});
|
||||
|
||||
/**
|
||||
* CreateProductServiceResponse
|
||||
*/
|
||||
export const zCreateProductServiceResponse = z.object({
|
||||
message: z.string(),
|
||||
entity: zProductServiceSchema,
|
||||
});
|
||||
|
||||
/**
|
||||
* CreateProjectSchema
|
||||
*/
|
||||
@ -104,6 +304,7 @@ export const zCreateProjectRequest = z.object({
|
||||
export const zProjectSchema = z.object({
|
||||
id: z.int(),
|
||||
name: z.string(),
|
||||
builtInModules: z.array(zBuiltInModuleSchema),
|
||||
});
|
||||
|
||||
/**
|
||||
@ -114,6 +315,69 @@ export const zCreateProjectResponse = z.object({
|
||||
entity: zProjectSchema,
|
||||
});
|
||||
|
||||
/**
|
||||
* CreateServiceSchema
|
||||
*/
|
||||
export const zCreateServiceSchema = z.object({
|
||||
id: z.int(),
|
||||
name: z.string(),
|
||||
category: zServiceCategorySchema,
|
||||
price: z.number(),
|
||||
serviceType: z.int(),
|
||||
priceRanges: z.array(zServicePriceRangeSchema),
|
||||
cost: z.union([z.number(), z.null()]),
|
||||
lexorank: z.string(),
|
||||
});
|
||||
|
||||
/**
|
||||
* CreateServiceRequest
|
||||
*/
|
||||
export const zCreateServiceRequest = z.object({
|
||||
entity: zCreateServiceSchema,
|
||||
});
|
||||
|
||||
/**
|
||||
* CreateServiceResponse
|
||||
*/
|
||||
export const zCreateServiceResponse = z.object({
|
||||
message: z.string(),
|
||||
entity: zServiceSchema,
|
||||
});
|
||||
|
||||
/**
|
||||
* CreateServicesKitSchema
|
||||
*/
|
||||
export const zCreateServicesKitSchema = z.object({
|
||||
name: z.string(),
|
||||
serviceType: z.int(),
|
||||
servicesIds: z.array(z.int()),
|
||||
});
|
||||
|
||||
/**
|
||||
* CreateServicesKitRequest
|
||||
*/
|
||||
export const zCreateServicesKitRequest = z.object({
|
||||
entity: zCreateServicesKitSchema,
|
||||
});
|
||||
|
||||
/**
|
||||
* ServicesKitSchema
|
||||
*/
|
||||
export const zServicesKitSchema = z.object({
|
||||
name: z.string(),
|
||||
serviceType: z.int(),
|
||||
id: z.int(),
|
||||
services: z.array(zServiceSchema),
|
||||
});
|
||||
|
||||
/**
|
||||
* CreateServicesKitResponse
|
||||
*/
|
||||
export const zCreateServicesKitResponse = z.object({
|
||||
message: z.string(),
|
||||
entity: zServicesKitSchema,
|
||||
});
|
||||
|
||||
/**
|
||||
* CreateStatusSchema
|
||||
*/
|
||||
@ -138,6 +402,22 @@ export const zCreateStatusResponse = z.object({
|
||||
entity: zStatusSchema,
|
||||
});
|
||||
|
||||
/**
|
||||
* DealProductAddKitRequest
|
||||
*/
|
||||
export const zDealProductAddKitRequest = z.object({
|
||||
dealId: z.int(),
|
||||
productId: z.int(),
|
||||
kitId: z.int(),
|
||||
});
|
||||
|
||||
/**
|
||||
* DealProductAddKitResponse
|
||||
*/
|
||||
export const zDealProductAddKitResponse = z.object({
|
||||
message: z.string(),
|
||||
});
|
||||
|
||||
/**
|
||||
* DeleteBoardResponse
|
||||
*/
|
||||
@ -145,6 +425,13 @@ export const zDeleteBoardResponse = z.object({
|
||||
message: z.string(),
|
||||
});
|
||||
|
||||
/**
|
||||
* DeleteDealProductResponse
|
||||
*/
|
||||
export const zDeleteDealProductResponse = z.object({
|
||||
message: z.string(),
|
||||
});
|
||||
|
||||
/**
|
||||
* DeleteDealResponse
|
||||
*/
|
||||
@ -152,6 +439,27 @@ export const zDeleteDealResponse = z.object({
|
||||
message: z.string(),
|
||||
});
|
||||
|
||||
/**
|
||||
* DeleteDealServiceResponse
|
||||
*/
|
||||
export const zDeleteDealServiceResponse = z.object({
|
||||
message: z.string(),
|
||||
});
|
||||
|
||||
/**
|
||||
* DeleteProductResponse
|
||||
*/
|
||||
export const zDeleteProductResponse = z.object({
|
||||
message: z.string(),
|
||||
});
|
||||
|
||||
/**
|
||||
* DeleteProductServiceResponse
|
||||
*/
|
||||
export const zDeleteProductServiceResponse = z.object({
|
||||
message: z.string(),
|
||||
});
|
||||
|
||||
/**
|
||||
* DeleteProjectResponse
|
||||
*/
|
||||
@ -159,6 +467,20 @@ export const zDeleteProjectResponse = z.object({
|
||||
message: z.string(),
|
||||
});
|
||||
|
||||
/**
|
||||
* DeleteServiceResponse
|
||||
*/
|
||||
export const zDeleteServiceResponse = z.object({
|
||||
message: z.string(),
|
||||
});
|
||||
|
||||
/**
|
||||
* DeleteServicesKitResponse
|
||||
*/
|
||||
export const zDeleteServicesKitResponse = z.object({
|
||||
message: z.string(),
|
||||
});
|
||||
|
||||
/**
|
||||
* DeleteStatusResponse
|
||||
*/
|
||||
@ -166,6 +488,13 @@ export const zDeleteStatusResponse = z.object({
|
||||
message: z.string(),
|
||||
});
|
||||
|
||||
/**
|
||||
* GetAllBuiltInModulesResponse
|
||||
*/
|
||||
export const zGetAllBuiltInModulesResponse = z.object({
|
||||
items: z.array(zBuiltInModuleSchema),
|
||||
});
|
||||
|
||||
/**
|
||||
* GetBoardsResponse
|
||||
*/
|
||||
@ -173,6 +502,20 @@ export const zGetBoardsResponse = z.object({
|
||||
items: z.array(zBoardSchema),
|
||||
});
|
||||
|
||||
/**
|
||||
* GetDealProductsResponse
|
||||
*/
|
||||
export const zGetDealProductsResponse = z.object({
|
||||
items: z.array(zDealProductSchema),
|
||||
});
|
||||
|
||||
/**
|
||||
* GetDealServicesResponse
|
||||
*/
|
||||
export const zGetDealServicesResponse = z.object({
|
||||
items: z.array(zDealServiceSchema),
|
||||
});
|
||||
|
||||
/**
|
||||
* PaginationInfoSchema
|
||||
*/
|
||||
@ -189,6 +532,13 @@ export const zGetDealsResponse = z.object({
|
||||
paginationInfo: zPaginationInfoSchema,
|
||||
});
|
||||
|
||||
/**
|
||||
* GetProductsResponse
|
||||
*/
|
||||
export const zGetProductsResponse = z.object({
|
||||
items: z.array(zProductSchema),
|
||||
});
|
||||
|
||||
/**
|
||||
* GetProjectsResponse
|
||||
*/
|
||||
@ -196,6 +546,20 @@ export const zGetProjectsResponse = z.object({
|
||||
items: z.array(zProjectSchema),
|
||||
});
|
||||
|
||||
/**
|
||||
* GetServicesKitResponse
|
||||
*/
|
||||
export const zGetServicesKitResponse = z.object({
|
||||
items: z.array(zServicesKitSchema),
|
||||
});
|
||||
|
||||
/**
|
||||
* GetServicesResponse
|
||||
*/
|
||||
export const zGetServicesResponse = z.object({
|
||||
items: z.array(zServiceSchema),
|
||||
});
|
||||
|
||||
/**
|
||||
* GetStatusesResponse
|
||||
*/
|
||||
@ -219,6 +583,31 @@ export const zHttpValidationError = z.object({
|
||||
detail: z.optional(z.array(zValidationError)),
|
||||
});
|
||||
|
||||
/**
|
||||
* ProductImageSchema
|
||||
*/
|
||||
export const zProductImageSchema = z.object({
|
||||
id: z.int(),
|
||||
productId: z.int(),
|
||||
imageUrl: z.string(),
|
||||
});
|
||||
|
||||
/**
|
||||
* ProductServicesDuplicateRequest
|
||||
*/
|
||||
export const zProductServicesDuplicateRequest = z.object({
|
||||
dealId: z.int(),
|
||||
sourceDealProductId: z.int(),
|
||||
targetDealProductIds: z.array(z.int()),
|
||||
});
|
||||
|
||||
/**
|
||||
* ProductServicesDuplicateResponse
|
||||
*/
|
||||
export const zProductServicesDuplicateResponse = z.object({
|
||||
message: z.string(),
|
||||
});
|
||||
|
||||
export const zSortDir = z.enum(["asc", "desc"]);
|
||||
|
||||
/**
|
||||
@ -243,6 +632,28 @@ export const zUpdateBoardResponse = z.object({
|
||||
message: z.string(),
|
||||
});
|
||||
|
||||
/**
|
||||
* UpdateDealProductSchema
|
||||
*/
|
||||
export const zUpdateDealProductSchema = z.object({
|
||||
quantity: z.int(),
|
||||
comment: z.string(),
|
||||
});
|
||||
|
||||
/**
|
||||
* UpdateDealProductRequest
|
||||
*/
|
||||
export const zUpdateDealProductRequest = z.object({
|
||||
entity: zUpdateDealProductSchema,
|
||||
});
|
||||
|
||||
/**
|
||||
* UpdateDealProductResponse
|
||||
*/
|
||||
export const zUpdateDealProductResponse = z.object({
|
||||
message: z.string(),
|
||||
});
|
||||
|
||||
/**
|
||||
* UpdateDealSchema
|
||||
*/
|
||||
@ -267,11 +678,86 @@ export const zUpdateDealResponse = z.object({
|
||||
message: z.string(),
|
||||
});
|
||||
|
||||
/**
|
||||
* UpdateDealServiceSchema
|
||||
*/
|
||||
export const zUpdateDealServiceSchema = z.object({
|
||||
quantity: z.int(),
|
||||
price: z.number(),
|
||||
isFixedPrice: z.boolean(),
|
||||
});
|
||||
|
||||
/**
|
||||
* UpdateDealServiceRequest
|
||||
*/
|
||||
export const zUpdateDealServiceRequest = z.object({
|
||||
entity: zUpdateDealServiceSchema,
|
||||
});
|
||||
|
||||
/**
|
||||
* UpdateDealServiceResponse
|
||||
*/
|
||||
export const zUpdateDealServiceResponse = z.object({
|
||||
message: z.string(),
|
||||
});
|
||||
|
||||
/**
|
||||
* UpdateProductSchema
|
||||
*/
|
||||
export const zUpdateProductSchema = z.object({
|
||||
name: z.optional(z.union([z.string(), z.null()])),
|
||||
article: z.optional(z.union([z.string(), z.null()])),
|
||||
factoryArticle: z.optional(z.union([z.string(), z.null()])),
|
||||
brand: z.optional(z.union([z.string(), z.null()])),
|
||||
color: z.optional(z.union([z.string(), z.null()])),
|
||||
composition: z.optional(z.union([z.string(), z.null()])),
|
||||
size: z.optional(z.union([z.string(), z.null()])),
|
||||
additionalInfo: z.optional(z.union([z.string(), z.null()])),
|
||||
images: z.optional(z.union([z.array(zProductImageSchema), z.null()])),
|
||||
});
|
||||
|
||||
/**
|
||||
* UpdateProductRequest
|
||||
*/
|
||||
export const zUpdateProductRequest = z.object({
|
||||
entity: zUpdateProductSchema,
|
||||
});
|
||||
|
||||
/**
|
||||
* UpdateProductResponse
|
||||
*/
|
||||
export const zUpdateProductResponse = z.object({
|
||||
message: z.string(),
|
||||
});
|
||||
|
||||
/**
|
||||
* UpdateProductServiceSchema
|
||||
*/
|
||||
export const zUpdateProductServiceSchema = z.object({
|
||||
price: z.number(),
|
||||
isFixedPrice: z.boolean(),
|
||||
});
|
||||
|
||||
/**
|
||||
* UpdateProductServiceRequest
|
||||
*/
|
||||
export const zUpdateProductServiceRequest = z.object({
|
||||
entity: zUpdateProductServiceSchema,
|
||||
});
|
||||
|
||||
/**
|
||||
* UpdateProductServiceResponse
|
||||
*/
|
||||
export const zUpdateProductServiceResponse = z.object({
|
||||
message: z.string(),
|
||||
});
|
||||
|
||||
/**
|
||||
* UpdateProjectSchema
|
||||
*/
|
||||
export const zUpdateProjectSchema = z.object({
|
||||
name: z.optional(z.union([z.string(), z.null()])),
|
||||
builtInModules: z.optional(z.array(zBuiltInModuleSchema)),
|
||||
});
|
||||
|
||||
/**
|
||||
@ -288,6 +774,57 @@ export const zUpdateProjectResponse = z.object({
|
||||
message: z.string(),
|
||||
});
|
||||
|
||||
/**
|
||||
* UpdateServiceSchema
|
||||
*/
|
||||
export const zUpdateServiceSchema = z.object({
|
||||
id: z.int(),
|
||||
name: z.string(),
|
||||
category: zServiceCategorySchema,
|
||||
price: z.number(),
|
||||
serviceType: z.int(),
|
||||
priceRanges: z.array(zServicePriceRangeSchema),
|
||||
cost: z.union([z.number(), z.null()]),
|
||||
lexorank: z.string(),
|
||||
});
|
||||
|
||||
/**
|
||||
* UpdateServiceRequest
|
||||
*/
|
||||
export const zUpdateServiceRequest = z.object({
|
||||
entity: zUpdateServiceSchema,
|
||||
});
|
||||
|
||||
/**
|
||||
* UpdateServiceResponse
|
||||
*/
|
||||
export const zUpdateServiceResponse = z.object({
|
||||
message: z.string(),
|
||||
});
|
||||
|
||||
/**
|
||||
* UpdateServicesKitSchema
|
||||
*/
|
||||
export const zUpdateServicesKitSchema = z.object({
|
||||
name: z.string(),
|
||||
serviceType: z.int(),
|
||||
servicesIds: z.array(z.int()),
|
||||
});
|
||||
|
||||
/**
|
||||
* UpdateServicesKitRequest
|
||||
*/
|
||||
export const zUpdateServicesKitRequest = z.object({
|
||||
entity: zUpdateServicesKitSchema,
|
||||
});
|
||||
|
||||
/**
|
||||
* UpdateServicesKitResponse
|
||||
*/
|
||||
export const zUpdateServicesKitResponse = z.object({
|
||||
message: z.string(),
|
||||
});
|
||||
|
||||
/**
|
||||
* UpdateStatusSchema
|
||||
*/
|
||||
@ -420,6 +957,17 @@ export const zUpdateDealData = z.object({
|
||||
*/
|
||||
export const zUpdateDealResponse2 = zUpdateDealResponse;
|
||||
|
||||
export const zGetBuiltInModulesData = z.object({
|
||||
body: z.optional(z.never()),
|
||||
path: z.optional(z.never()),
|
||||
query: z.optional(z.never()),
|
||||
});
|
||||
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
export const zGetBuiltInModulesResponse = zGetAllBuiltInModulesResponse;
|
||||
|
||||
export const zGetProjectsData = z.object({
|
||||
body: z.optional(z.never()),
|
||||
path: z.optional(z.never()),
|
||||
@ -517,3 +1065,321 @@ export const zUpdateStatusData = z.object({
|
||||
* Successful Response
|
||||
*/
|
||||
export const zUpdateStatusResponse2 = zUpdateStatusResponse;
|
||||
|
||||
export const zGetDealProductsData = z.object({
|
||||
body: z.optional(z.never()),
|
||||
path: z.object({
|
||||
dealId: z.int(),
|
||||
}),
|
||||
query: z.optional(z.never()),
|
||||
});
|
||||
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
export const zGetDealProductsResponse2 = zGetDealProductsResponse;
|
||||
|
||||
export const zCreateDealProductData = z.object({
|
||||
body: zCreateDealProductRequest,
|
||||
path: z.optional(z.never()),
|
||||
query: z.optional(z.never()),
|
||||
});
|
||||
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
export const zCreateDealProductResponse2 = zCreateDealProductResponse;
|
||||
|
||||
export const zDeleteDealProductData = z.object({
|
||||
body: z.optional(z.never()),
|
||||
path: z.object({
|
||||
dealId: z.int(),
|
||||
productId: z.int(),
|
||||
}),
|
||||
query: z.optional(z.never()),
|
||||
});
|
||||
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
export const zDeleteDealProductResponse2 = zDeleteDealProductResponse;
|
||||
|
||||
export const zUpdateDealProductData = z.object({
|
||||
body: zUpdateDealProductRequest,
|
||||
path: z.object({
|
||||
dealId: z.int(),
|
||||
productId: z.int(),
|
||||
}),
|
||||
query: z.optional(z.never()),
|
||||
});
|
||||
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
export const zUpdateDealProductResponse2 = zUpdateDealProductResponse;
|
||||
|
||||
export const zAddKitToDealProductData = z.object({
|
||||
body: zDealProductAddKitRequest,
|
||||
path: z.optional(z.never()),
|
||||
query: z.optional(z.never()),
|
||||
});
|
||||
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
export const zAddKitToDealProductResponse = zDealProductAddKitResponse;
|
||||
|
||||
export const zCreateDealProductServiceData = z.object({
|
||||
body: zCreateProductServiceRequest,
|
||||
path: z.optional(z.never()),
|
||||
query: z.optional(z.never()),
|
||||
});
|
||||
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
export const zCreateDealProductServiceResponse = zCreateProductServiceResponse;
|
||||
|
||||
export const zDeleteDealProductServiceData = z.object({
|
||||
body: z.optional(z.never()),
|
||||
path: z.object({
|
||||
dealId: z.int(),
|
||||
productId: z.int(),
|
||||
serviceId: z.int(),
|
||||
}),
|
||||
query: z.optional(z.never()),
|
||||
});
|
||||
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
export const zDeleteDealProductServiceResponse = zDeleteProductServiceResponse;
|
||||
|
||||
export const zUpdateDealProductServiceData = z.object({
|
||||
body: zUpdateProductServiceRequest,
|
||||
path: z.object({
|
||||
dealId: z.int(),
|
||||
productId: z.int(),
|
||||
serviceId: z.int(),
|
||||
}),
|
||||
query: z.optional(z.never()),
|
||||
});
|
||||
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
export const zUpdateDealProductServiceResponse = zUpdateProductServiceResponse;
|
||||
|
||||
export const zDuplicateProductServicesData = z.object({
|
||||
body: zProductServicesDuplicateRequest,
|
||||
path: z.optional(z.never()),
|
||||
query: z.optional(z.never()),
|
||||
});
|
||||
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
export const zDuplicateProductServicesResponse =
|
||||
zProductServicesDuplicateResponse;
|
||||
|
||||
export const zGetDealServicesData = z.object({
|
||||
body: z.optional(z.never()),
|
||||
path: z.object({
|
||||
dealId: z.int(),
|
||||
}),
|
||||
query: z.optional(z.never()),
|
||||
});
|
||||
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
export const zGetDealServicesResponse2 = zGetDealServicesResponse;
|
||||
|
||||
export const zCreateDealServiceData = z.object({
|
||||
body: zCreateDealServiceRequest,
|
||||
path: z.optional(z.never()),
|
||||
query: z.optional(z.never()),
|
||||
});
|
||||
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
export const zCreateDealServiceResponse2 = zCreateDealServiceResponse;
|
||||
|
||||
export const zDeleteDealServiceData = z.object({
|
||||
body: z.optional(z.never()),
|
||||
path: z.object({
|
||||
dealId: z.int(),
|
||||
serviceId: z.int(),
|
||||
}),
|
||||
query: z.optional(z.never()),
|
||||
});
|
||||
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
export const zDeleteDealServiceResponse2 = zDeleteDealServiceResponse;
|
||||
|
||||
export const zUpdateDealServiceData = z.object({
|
||||
body: zUpdateDealServiceRequest,
|
||||
path: z.object({
|
||||
dealId: z.int(),
|
||||
serviceId: z.int(),
|
||||
}),
|
||||
query: z.optional(z.never()),
|
||||
});
|
||||
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
export const zUpdateDealServiceResponse2 = zUpdateDealServiceResponse;
|
||||
|
||||
export const zGetProductsData = z.object({
|
||||
body: z.optional(z.never()),
|
||||
path: z.optional(z.never()),
|
||||
query: z.optional(
|
||||
z.object({
|
||||
searchInput: z.optional(z.union([z.string(), z.null()])),
|
||||
page: z.optional(z.union([z.int(), z.null()])),
|
||||
itemsPerPage: z.optional(z.union([z.int(), z.null()])),
|
||||
})
|
||||
),
|
||||
});
|
||||
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
export const zGetProductsResponse2 = zGetProductsResponse;
|
||||
|
||||
export const zCreateProductData = z.object({
|
||||
body: zCreateProductRequest,
|
||||
path: z.optional(z.never()),
|
||||
query: z.optional(z.never()),
|
||||
});
|
||||
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
export const zCreateProductResponse2 = zCreateProductResponse;
|
||||
|
||||
export const zDeleteProductData = z.object({
|
||||
body: z.optional(z.never()),
|
||||
path: z.object({
|
||||
pk: z.int(),
|
||||
}),
|
||||
query: z.optional(z.never()),
|
||||
});
|
||||
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
export const zDeleteProductResponse2 = zDeleteProductResponse;
|
||||
|
||||
export const zUpdateProductData = z.object({
|
||||
body: zUpdateProductRequest,
|
||||
path: z.object({
|
||||
pk: z.int(),
|
||||
}),
|
||||
query: z.optional(z.never()),
|
||||
});
|
||||
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
export const zUpdateProductResponse2 = zUpdateProductResponse;
|
||||
|
||||
export const zGetServicesData = z.object({
|
||||
body: z.optional(z.never()),
|
||||
path: z.optional(z.never()),
|
||||
query: z.optional(z.never()),
|
||||
});
|
||||
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
export const zGetServicesResponse2 = zGetServicesResponse;
|
||||
|
||||
export const zCreateServiceData = z.object({
|
||||
body: zCreateServiceRequest,
|
||||
path: z.optional(z.never()),
|
||||
query: z.optional(z.never()),
|
||||
});
|
||||
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
export const zCreateServiceResponse2 = zCreateServiceResponse;
|
||||
|
||||
export const zDeleteServiceData = z.object({
|
||||
body: z.optional(z.never()),
|
||||
path: z.object({
|
||||
pk: z.int(),
|
||||
}),
|
||||
query: z.optional(z.never()),
|
||||
});
|
||||
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
export const zDeleteServiceResponse2 = zDeleteServiceResponse;
|
||||
|
||||
export const zUpdateServiceData = z.object({
|
||||
body: zUpdateServiceRequest,
|
||||
path: z.object({
|
||||
pk: z.int(),
|
||||
}),
|
||||
query: z.optional(z.never()),
|
||||
});
|
||||
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
export const zUpdateServiceResponse2 = zUpdateServiceResponse;
|
||||
|
||||
export const zGetServicesKitsData = z.object({
|
||||
body: z.optional(z.never()),
|
||||
path: z.optional(z.never()),
|
||||
query: z.optional(z.never()),
|
||||
});
|
||||
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
export const zGetServicesKitsResponse = zGetServicesKitResponse;
|
||||
|
||||
export const zCreateServicesKitData = z.object({
|
||||
body: zCreateServicesKitRequest,
|
||||
path: z.optional(z.never()),
|
||||
query: z.optional(z.never()),
|
||||
});
|
||||
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
export const zCreateServicesKitResponse2 = zCreateServicesKitResponse;
|
||||
|
||||
export const zDeleteServicesKitData = z.object({
|
||||
body: z.optional(z.never()),
|
||||
path: z.object({
|
||||
pk: z.int(),
|
||||
}),
|
||||
query: z.optional(z.never()),
|
||||
});
|
||||
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
export const zDeleteServicesKitResponse2 = zDeleteServicesKitResponse;
|
||||
|
||||
export const zUpdateServicesKitData = z.object({
|
||||
body: zUpdateServicesKitRequest,
|
||||
path: z.object({
|
||||
pk: z.int(),
|
||||
}),
|
||||
query: z.optional(z.never()),
|
||||
});
|
||||
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
export const zUpdateServicesKitResponse2 = zUpdateServicesKitResponse;
|
||||
|
||||
Reference in New Issue
Block a user