1317 lines
54 KiB
TypeScript
1317 lines
54 KiB
TypeScript
// This file is auto-generated by @hey-api/openapi-ts
|
|
|
|
import type { Client, Options as Options2, TDataShape } from './client';
|
|
import { client } from './client.gen';
|
|
import type { AddKitToDealData, AddKitToDealErrors, AddKitToDealProductData, AddKitToDealProductErrors, AddKitToDealProductResponses, AddKitToDealResponses, CreateBarcodeTemplateData, CreateBarcodeTemplateErrors, CreateBarcodeTemplateResponses, CreateBoardData, CreateBoardErrors, CreateBoardResponses, CreateClientData, CreateClientErrors, CreateClientResponses, CreateDealData, CreateDealErrors, CreateDealGroupData, CreateDealGroupErrors, CreateDealGroupResponses, CreateDealProductData, CreateDealProductErrors, CreateDealProductResponses, CreateDealProductServiceData, CreateDealProductServiceErrors, CreateDealProductServiceResponses, CreateDealResponses, CreateDealServiceData, CreateDealServiceErrors, CreateDealServiceResponses, CreateMarketplaceData, CreateMarketplaceErrors, CreateMarketplaceResponses, CreateProductData, CreateProductErrors, CreateProductResponses, CreateProjectData, CreateProjectErrors, CreateProjectResponses, CreateServiceCategoryData, CreateServiceCategoryErrors, CreateServiceCategoryResponses, CreateServiceData, CreateServiceErrors, CreateServiceResponses, CreateServicesKitData, CreateServicesKitErrors, CreateServicesKitResponses, CreateStatusData, CreateStatusErrors, CreateStatusResponses, DeleteBarcodeTemplateData, DeleteBarcodeTemplateErrors, DeleteBarcodeTemplateResponses, DeleteBoardData, DeleteBoardErrors, DeleteBoardResponses, DeleteClientData, DeleteClientErrors, DeleteClientResponses, DeleteDealData, DeleteDealErrors, DeleteDealGroupData, DeleteDealGroupErrors, DeleteDealGroupResponses, DeleteDealProductData, DeleteDealProductErrors, DeleteDealProductResponses, DeleteDealProductServiceData, DeleteDealProductServiceErrors, DeleteDealProductServiceResponses, DeleteDealResponses, DeleteDealServiceData, DeleteDealServiceErrors, DeleteDealServiceResponses, DeleteMarketplaceData, DeleteMarketplaceErrors, DeleteMarketplaceResponses, DeleteProductData, DeleteProductErrors, DeleteProductResponses, DeleteProjectData, DeleteProjectErrors, DeleteProjectResponses, DeleteServiceCategoryData, DeleteServiceCategoryErrors, DeleteServiceCategoryResponses, DeleteServiceData, DeleteServiceErrors, DeleteServiceResponses, DeleteServicesKitData, DeleteServicesKitErrors, DeleteServicesKitResponses, DeleteStatusData, DeleteStatusErrors, DeleteStatusResponses, DuplicateProductServicesData, DuplicateProductServicesErrors, DuplicateProductServicesResponses, GetBarcodeTemplateAttributesData, GetBarcodeTemplateAttributesResponses, GetBarcodeTemplatesData, GetBarcodeTemplateSizesData, GetBarcodeTemplateSizesResponses, GetBarcodeTemplatesResponses, GetBaseMarketplacesData, GetBaseMarketplacesResponses, GetBoardsData, GetBoardsErrors, GetBoardsResponses, GetBuiltInModulesData, GetBuiltInModulesResponses, GetClientsData, GetClientsErrors, GetClientsResponses, GetDealProductsData, GetDealProductsErrors, GetDealProductsResponses, GetDealsData, GetDealsErrors, GetDealServicesData, GetDealServicesErrors, GetDealServicesResponses, GetDealsResponses, GetMarketplacesData, GetMarketplacesErrors, GetMarketplacesResponses, GetProductBarcodePdfData, GetProductBarcodePdfErrors, GetProductBarcodePdfResponses, GetProductsData, GetProductsErrors, GetProductsResponses, GetProjectsData, GetProjectsResponses, GetServiceCategoriesData, GetServiceCategoriesResponses, GetServicesData, GetServicesKitsData, GetServicesKitsResponses, GetServicesResponses, GetStatusesData, GetStatusesErrors, GetStatusesResponses, GetStatusHistoryData, GetStatusHistoryErrors, GetStatusHistoryResponses, UpdateBarcodeTemplateData, UpdateBarcodeTemplateErrors, UpdateBarcodeTemplateResponses, UpdateBoardData, UpdateBoardErrors, UpdateBoardResponses, UpdateClientData, UpdateClientErrors, UpdateClientResponses, UpdateDealData, UpdateDealErrors, UpdateDealGroupData, UpdateDealGroupErrors, UpdateDealGroupResponses, UpdateDealProductData, UpdateDealProductErrors, UpdateDealProductResponses, UpdateDealProductServiceData, UpdateDealProductServiceErrors, UpdateDealProductServiceResponses, UpdateDealResponses, UpdateDealServiceData, UpdateDealServiceErrors, UpdateDealServiceResponses, UpdateDealsInGroupData, UpdateDealsInGroupErrors, UpdateDealsInGroupResponses, UpdateMarketplaceData, UpdateMarketplaceErrors, UpdateMarketplaceResponses, UpdateProductData, UpdateProductErrors, UpdateProductResponses, UpdateProjectData, UpdateProjectErrors, UpdateProjectResponses, UpdateServiceCategoryData, UpdateServiceCategoryErrors, UpdateServiceCategoryResponses, UpdateServiceData, UpdateServiceErrors, UpdateServiceResponses, UpdateServicesKitData, UpdateServicesKitErrors, UpdateServicesKitResponses, UpdateStatusData, UpdateStatusErrors, UpdateStatusResponses } from './types.gen';
|
|
import { zAddKitToDealData, zAddKitToDealProductData, zAddKitToDealProductResponse, zAddKitToDealResponse, zCreateBarcodeTemplateData, zCreateBarcodeTemplateResponse2, zCreateBoardData, zCreateBoardResponse2, zCreateClientData, zCreateClientResponse2, zCreateDealData, zCreateDealGroupData, zCreateDealGroupResponse2, zCreateDealProductData, zCreateDealProductResponse2, zCreateDealProductServiceData, zCreateDealProductServiceResponse, zCreateDealResponse2, zCreateDealServiceData, zCreateDealServiceResponse2, zCreateMarketplaceData, zCreateMarketplaceResponse2, zCreateProductData, zCreateProductResponse2, zCreateProjectData, zCreateProjectResponse2, zCreateServiceCategoryData, zCreateServiceCategoryResponse2, zCreateServiceData, zCreateServiceResponse2, zCreateServicesKitData, zCreateServicesKitResponse2, zCreateStatusData, zCreateStatusResponse2, zDeleteBarcodeTemplateData, zDeleteBarcodeTemplateResponse2, zDeleteBoardData, zDeleteBoardResponse2, zDeleteClientData, zDeleteClientResponse2, zDeleteDealData, zDeleteDealGroupData, zDeleteDealGroupResponse2, zDeleteDealProductData, zDeleteDealProductResponse2, zDeleteDealProductServiceData, zDeleteDealProductServiceResponse, zDeleteDealResponse2, zDeleteDealServiceData, zDeleteDealServiceResponse2, zDeleteMarketplaceData, zDeleteMarketplaceResponse2, zDeleteProductData, zDeleteProductResponse2, zDeleteProjectData, zDeleteProjectResponse2, zDeleteServiceCategoryData, zDeleteServiceCategoryResponse2, zDeleteServiceData, zDeleteServiceResponse2, zDeleteServicesKitData, zDeleteServicesKitResponse2, zDeleteStatusData, zDeleteStatusResponse2, zDuplicateProductServicesData, zDuplicateProductServicesResponse, zGetBarcodeTemplateAttributesData, zGetBarcodeTemplateAttributesResponse, zGetBarcodeTemplatesData, zGetBarcodeTemplateSizesData, zGetBarcodeTemplateSizesResponse2, zGetBarcodeTemplatesResponse2, zGetBaseMarketplacesData, zGetBaseMarketplacesResponse2, zGetBoardsData, zGetBoardsResponse2, zGetBuiltInModulesData, zGetBuiltInModulesResponse, zGetClientsData, zGetClientsResponse2, zGetDealProductsData, zGetDealProductsResponse2, zGetDealsData, zGetDealServicesData, zGetDealServicesResponse2, zGetDealsResponse2, zGetMarketplacesData, zGetMarketplacesResponse2, zGetProductBarcodePdfData, zGetProductBarcodePdfResponse2, zGetProductsData, zGetProductsResponse2, zGetProjectsData, zGetProjectsResponse2, zGetServiceCategoriesData, zGetServiceCategoriesResponse2, zGetServicesData, zGetServicesKitsData, zGetServicesKitsResponse, zGetServicesResponse2, zGetStatusesData, zGetStatusesResponse2, zGetStatusHistoryData, zGetStatusHistoryResponse2, zUpdateBarcodeTemplateData, zUpdateBarcodeTemplateResponse2, zUpdateBoardData, zUpdateBoardResponse2, zUpdateClientData, zUpdateClientResponse2, zUpdateDealData, zUpdateDealGroupData, zUpdateDealGroupResponse2, zUpdateDealProductData, zUpdateDealProductResponse2, zUpdateDealProductServiceData, zUpdateDealProductServiceResponse, zUpdateDealResponse2, zUpdateDealServiceData, zUpdateDealServiceResponse2, zUpdateDealsInGroupData, zUpdateDealsInGroupResponse2, zUpdateMarketplaceData, zUpdateMarketplaceResponse2, zUpdateProductData, zUpdateProductResponse2, zUpdateProjectData, zUpdateProjectResponse2, zUpdateServiceCategoryData, zUpdateServiceCategoryResponse2, zUpdateServiceData, zUpdateServiceResponse2, zUpdateServicesKitData, zUpdateServicesKitResponse2, zUpdateStatusData, zUpdateStatusResponse2 } from './zod.gen';
|
|
|
|
export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {
|
|
/**
|
|
* You can provide a client instance returned by `createClient()` instead of
|
|
* individual options. This might be also useful if you want to implement a
|
|
* custom client.
|
|
*/
|
|
client?: Client;
|
|
/**
|
|
* You can pass arbitrary values through the `meta` object. This can be
|
|
* used to access values that aren't defined as part of the SDK function.
|
|
*/
|
|
meta?: Record<string, unknown>;
|
|
};
|
|
|
|
/**
|
|
* Get Boards
|
|
*/
|
|
export const getBoards = <ThrowOnError extends boolean = false>(options: Options<GetBoardsData, ThrowOnError>) => {
|
|
return (options.client ?? client).get<GetBoardsResponses, GetBoardsErrors, ThrowOnError>({
|
|
requestValidator: async (data) => {
|
|
return await zGetBoardsData.parseAsync(data);
|
|
},
|
|
responseType: 'json',
|
|
responseValidator: async (data) => {
|
|
return await zGetBoardsResponse2.parseAsync(data);
|
|
},
|
|
url: '/crm/v1/board/{projectId}',
|
|
...options
|
|
});
|
|
};
|
|
|
|
/**
|
|
* Create Board
|
|
*/
|
|
export const createBoard = <ThrowOnError extends boolean = false>(options: Options<CreateBoardData, ThrowOnError>) => {
|
|
return (options.client ?? client).post<CreateBoardResponses, CreateBoardErrors, ThrowOnError>({
|
|
requestValidator: async (data) => {
|
|
return await zCreateBoardData.parseAsync(data);
|
|
},
|
|
responseType: 'json',
|
|
responseValidator: async (data) => {
|
|
return await zCreateBoardResponse2.parseAsync(data);
|
|
},
|
|
url: '/crm/v1/board/',
|
|
...options,
|
|
headers: {
|
|
'Content-Type': 'application/json',
|
|
...options.headers
|
|
}
|
|
});
|
|
};
|
|
|
|
/**
|
|
* Delete Board
|
|
*/
|
|
export const deleteBoard = <ThrowOnError extends boolean = false>(options: Options<DeleteBoardData, ThrowOnError>) => {
|
|
return (options.client ?? client).delete<DeleteBoardResponses, DeleteBoardErrors, ThrowOnError>({
|
|
requestValidator: async (data) => {
|
|
return await zDeleteBoardData.parseAsync(data);
|
|
},
|
|
responseType: 'json',
|
|
responseValidator: async (data) => {
|
|
return await zDeleteBoardResponse2.parseAsync(data);
|
|
},
|
|
url: '/crm/v1/board/{pk}',
|
|
...options
|
|
});
|
|
};
|
|
|
|
/**
|
|
* Update Board
|
|
*/
|
|
export const updateBoard = <ThrowOnError extends boolean = false>(options: Options<UpdateBoardData, ThrowOnError>) => {
|
|
return (options.client ?? client).patch<UpdateBoardResponses, UpdateBoardErrors, ThrowOnError>({
|
|
requestValidator: async (data) => {
|
|
return await zUpdateBoardData.parseAsync(data);
|
|
},
|
|
responseType: 'json',
|
|
responseValidator: async (data) => {
|
|
return await zUpdateBoardResponse2.parseAsync(data);
|
|
},
|
|
url: '/crm/v1/board/{pk}',
|
|
...options,
|
|
headers: {
|
|
'Content-Type': 'application/json',
|
|
...options.headers
|
|
}
|
|
});
|
|
};
|
|
|
|
/**
|
|
* Get Deals
|
|
*/
|
|
export const getDeals = <ThrowOnError extends boolean = false>(options?: Options<GetDealsData, ThrowOnError>) => {
|
|
return (options?.client ?? client).get<GetDealsResponses, GetDealsErrors, ThrowOnError>({
|
|
requestValidator: async (data) => {
|
|
return await zGetDealsData.parseAsync(data);
|
|
},
|
|
responseType: 'json',
|
|
responseValidator: async (data) => {
|
|
return await zGetDealsResponse2.parseAsync(data);
|
|
},
|
|
url: '/crm/v1/deal/',
|
|
...options
|
|
});
|
|
};
|
|
|
|
/**
|
|
* Create Deal
|
|
*/
|
|
export const createDeal = <ThrowOnError extends boolean = false>(options: Options<CreateDealData, ThrowOnError>) => {
|
|
return (options.client ?? client).post<CreateDealResponses, CreateDealErrors, ThrowOnError>({
|
|
requestValidator: async (data) => {
|
|
return await zCreateDealData.parseAsync(data);
|
|
},
|
|
responseType: 'json',
|
|
responseValidator: async (data) => {
|
|
return await zCreateDealResponse2.parseAsync(data);
|
|
},
|
|
url: '/crm/v1/deal/',
|
|
...options,
|
|
headers: {
|
|
'Content-Type': 'application/json',
|
|
...options.headers
|
|
}
|
|
});
|
|
};
|
|
|
|
/**
|
|
* Delete Deal
|
|
*/
|
|
export const deleteDeal = <ThrowOnError extends boolean = false>(options: Options<DeleteDealData, ThrowOnError>) => {
|
|
return (options.client ?? client).delete<DeleteDealResponses, DeleteDealErrors, ThrowOnError>({
|
|
requestValidator: async (data) => {
|
|
return await zDeleteDealData.parseAsync(data);
|
|
},
|
|
responseType: 'json',
|
|
responseValidator: async (data) => {
|
|
return await zDeleteDealResponse2.parseAsync(data);
|
|
},
|
|
url: '/crm/v1/deal/{pk}',
|
|
...options
|
|
});
|
|
};
|
|
|
|
/**
|
|
* Update Deal
|
|
*/
|
|
export const updateDeal = <ThrowOnError extends boolean = false>(options: Options<UpdateDealData, ThrowOnError>) => {
|
|
return (options.client ?? client).patch<UpdateDealResponses, UpdateDealErrors, ThrowOnError>({
|
|
requestValidator: async (data) => {
|
|
return await zUpdateDealData.parseAsync(data);
|
|
},
|
|
responseType: 'json',
|
|
responseValidator: async (data) => {
|
|
return await zUpdateDealResponse2.parseAsync(data);
|
|
},
|
|
url: '/crm/v1/deal/{pk}',
|
|
...options,
|
|
headers: {
|
|
'Content-Type': 'application/json',
|
|
...options.headers
|
|
}
|
|
});
|
|
};
|
|
|
|
/**
|
|
* Delete Group
|
|
*/
|
|
export const deleteDealGroup = <ThrowOnError extends boolean = false>(options: Options<DeleteDealGroupData, ThrowOnError>) => {
|
|
return (options.client ?? client).delete<DeleteDealGroupResponses, DeleteDealGroupErrors, ThrowOnError>({
|
|
requestValidator: async (data) => {
|
|
return await zDeleteDealGroupData.parseAsync(data);
|
|
},
|
|
responseType: 'json',
|
|
responseValidator: async (data) => {
|
|
return await zDeleteDealGroupResponse2.parseAsync(data);
|
|
},
|
|
url: '/crm/v1/deal-group/{pk}',
|
|
...options
|
|
});
|
|
};
|
|
|
|
/**
|
|
* Update Group
|
|
*/
|
|
export const updateDealGroup = <ThrowOnError extends boolean = false>(options: Options<UpdateDealGroupData, ThrowOnError>) => {
|
|
return (options.client ?? client).patch<UpdateDealGroupResponses, UpdateDealGroupErrors, ThrowOnError>({
|
|
requestValidator: async (data) => {
|
|
return await zUpdateDealGroupData.parseAsync(data);
|
|
},
|
|
responseType: 'json',
|
|
responseValidator: async (data) => {
|
|
return await zUpdateDealGroupResponse2.parseAsync(data);
|
|
},
|
|
url: '/crm/v1/deal-group/{pk}',
|
|
...options,
|
|
headers: {
|
|
'Content-Type': 'application/json',
|
|
...options.headers
|
|
}
|
|
});
|
|
};
|
|
|
|
/**
|
|
* Create Group
|
|
*/
|
|
export const createDealGroup = <ThrowOnError extends boolean = false>(options: Options<CreateDealGroupData, ThrowOnError>) => {
|
|
return (options.client ?? client).post<CreateDealGroupResponses, CreateDealGroupErrors, ThrowOnError>({
|
|
requestValidator: async (data) => {
|
|
return await zCreateDealGroupData.parseAsync(data);
|
|
},
|
|
responseType: 'json',
|
|
responseValidator: async (data) => {
|
|
return await zCreateDealGroupResponse2.parseAsync(data);
|
|
},
|
|
url: '/crm/v1/deal-group/',
|
|
...options,
|
|
headers: {
|
|
'Content-Type': 'application/json',
|
|
...options.headers
|
|
}
|
|
});
|
|
};
|
|
|
|
/**
|
|
* Update Deals In Group
|
|
*/
|
|
export const updateDealsInGroup = <ThrowOnError extends boolean = false>(options: Options<UpdateDealsInGroupData, ThrowOnError>) => {
|
|
return (options.client ?? client).post<UpdateDealsInGroupResponses, UpdateDealsInGroupErrors, ThrowOnError>({
|
|
requestValidator: async (data) => {
|
|
return await zUpdateDealsInGroupData.parseAsync(data);
|
|
},
|
|
responseType: 'json',
|
|
responseValidator: async (data) => {
|
|
return await zUpdateDealsInGroupResponse2.parseAsync(data);
|
|
},
|
|
url: '/crm/v1/deal-group/{pk}/deals',
|
|
...options,
|
|
headers: {
|
|
'Content-Type': 'application/json',
|
|
...options.headers
|
|
}
|
|
});
|
|
};
|
|
|
|
/**
|
|
* Get Built In Modules
|
|
*/
|
|
export const getBuiltInModules = <ThrowOnError extends boolean = false>(options?: Options<GetBuiltInModulesData, ThrowOnError>) => {
|
|
return (options?.client ?? client).get<GetBuiltInModulesResponses, unknown, ThrowOnError>({
|
|
requestValidator: async (data) => {
|
|
return await zGetBuiltInModulesData.parseAsync(data);
|
|
},
|
|
responseType: 'json',
|
|
responseValidator: async (data) => {
|
|
return await zGetBuiltInModulesResponse.parseAsync(data);
|
|
},
|
|
url: '/crm/v1/module/built-in/',
|
|
...options
|
|
});
|
|
};
|
|
|
|
/**
|
|
* Get Clients
|
|
*/
|
|
export const getClients = <ThrowOnError extends boolean = false>(options?: Options<GetClientsData, ThrowOnError>) => {
|
|
return (options?.client ?? client).get<GetClientsResponses, GetClientsErrors, ThrowOnError>({
|
|
requestValidator: async (data) => {
|
|
return await zGetClientsData.parseAsync(data);
|
|
},
|
|
responseType: 'json',
|
|
responseValidator: async (data) => {
|
|
return await zGetClientsResponse2.parseAsync(data);
|
|
},
|
|
url: '/crm/v1/clients/client/',
|
|
...options
|
|
});
|
|
};
|
|
|
|
/**
|
|
* Create Client
|
|
*/
|
|
export const createClient = <ThrowOnError extends boolean = false>(options: Options<CreateClientData, ThrowOnError>) => {
|
|
return (options.client ?? client).post<CreateClientResponses, CreateClientErrors, ThrowOnError>({
|
|
requestValidator: async (data) => {
|
|
return await zCreateClientData.parseAsync(data);
|
|
},
|
|
responseType: 'json',
|
|
responseValidator: async (data) => {
|
|
return await zCreateClientResponse2.parseAsync(data);
|
|
},
|
|
url: '/crm/v1/clients/client/',
|
|
...options,
|
|
headers: {
|
|
'Content-Type': 'application/json',
|
|
...options.headers
|
|
}
|
|
});
|
|
};
|
|
|
|
/**
|
|
* Delete Product
|
|
*/
|
|
export const deleteClient = <ThrowOnError extends boolean = false>(options: Options<DeleteClientData, ThrowOnError>) => {
|
|
return (options.client ?? client).delete<DeleteClientResponses, DeleteClientErrors, ThrowOnError>({
|
|
requestValidator: async (data) => {
|
|
return await zDeleteClientData.parseAsync(data);
|
|
},
|
|
responseType: 'json',
|
|
responseValidator: async (data) => {
|
|
return await zDeleteClientResponse2.parseAsync(data);
|
|
},
|
|
url: '/crm/v1/clients/client/{pk}',
|
|
...options
|
|
});
|
|
};
|
|
|
|
/**
|
|
* Update Client
|
|
*/
|
|
export const updateClient = <ThrowOnError extends boolean = false>(options: Options<UpdateClientData, ThrowOnError>) => {
|
|
return (options.client ?? client).patch<UpdateClientResponses, UpdateClientErrors, ThrowOnError>({
|
|
requestValidator: async (data) => {
|
|
return await zUpdateClientData.parseAsync(data);
|
|
},
|
|
responseType: 'json',
|
|
responseValidator: async (data) => {
|
|
return await zUpdateClientResponse2.parseAsync(data);
|
|
},
|
|
url: '/crm/v1/clients/client/{pk}',
|
|
...options,
|
|
headers: {
|
|
'Content-Type': 'application/json',
|
|
...options.headers
|
|
}
|
|
});
|
|
};
|
|
|
|
/**
|
|
* Get Barcode Templates
|
|
*/
|
|
export const getBarcodeTemplates = <ThrowOnError extends boolean = false>(options?: Options<GetBarcodeTemplatesData, ThrowOnError>) => {
|
|
return (options?.client ?? client).get<GetBarcodeTemplatesResponses, unknown, ThrowOnError>({
|
|
requestValidator: async (data) => {
|
|
return await zGetBarcodeTemplatesData.parseAsync(data);
|
|
},
|
|
responseType: 'json',
|
|
responseValidator: async (data) => {
|
|
return await zGetBarcodeTemplatesResponse2.parseAsync(data);
|
|
},
|
|
url: '/crm/v1/fulfillment-base/barcode-template/',
|
|
...options
|
|
});
|
|
};
|
|
|
|
/**
|
|
* Create Barcode Template
|
|
*/
|
|
export const createBarcodeTemplate = <ThrowOnError extends boolean = false>(options: Options<CreateBarcodeTemplateData, ThrowOnError>) => {
|
|
return (options.client ?? client).post<CreateBarcodeTemplateResponses, CreateBarcodeTemplateErrors, ThrowOnError>({
|
|
requestValidator: async (data) => {
|
|
return await zCreateBarcodeTemplateData.parseAsync(data);
|
|
},
|
|
responseType: 'json',
|
|
responseValidator: async (data) => {
|
|
return await zCreateBarcodeTemplateResponse2.parseAsync(data);
|
|
},
|
|
url: '/crm/v1/fulfillment-base/barcode-template/',
|
|
...options,
|
|
headers: {
|
|
'Content-Type': 'application/json',
|
|
...options.headers
|
|
}
|
|
});
|
|
};
|
|
|
|
/**
|
|
* Delete Barcode Template
|
|
*/
|
|
export const deleteBarcodeTemplate = <ThrowOnError extends boolean = false>(options: Options<DeleteBarcodeTemplateData, ThrowOnError>) => {
|
|
return (options.client ?? client).delete<DeleteBarcodeTemplateResponses, DeleteBarcodeTemplateErrors, ThrowOnError>({
|
|
requestValidator: async (data) => {
|
|
return await zDeleteBarcodeTemplateData.parseAsync(data);
|
|
},
|
|
responseType: 'json',
|
|
responseValidator: async (data) => {
|
|
return await zDeleteBarcodeTemplateResponse2.parseAsync(data);
|
|
},
|
|
url: '/crm/v1/fulfillment-base/barcode-template/{pk}',
|
|
...options
|
|
});
|
|
};
|
|
|
|
/**
|
|
* Update Barcode Template
|
|
*/
|
|
export const updateBarcodeTemplate = <ThrowOnError extends boolean = false>(options: Options<UpdateBarcodeTemplateData, ThrowOnError>) => {
|
|
return (options.client ?? client).patch<UpdateBarcodeTemplateResponses, UpdateBarcodeTemplateErrors, ThrowOnError>({
|
|
requestValidator: async (data) => {
|
|
return await zUpdateBarcodeTemplateData.parseAsync(data);
|
|
},
|
|
responseType: 'json',
|
|
responseValidator: async (data) => {
|
|
return await zUpdateBarcodeTemplateResponse2.parseAsync(data);
|
|
},
|
|
url: '/crm/v1/fulfillment-base/barcode-template/{pk}',
|
|
...options,
|
|
headers: {
|
|
'Content-Type': 'application/json',
|
|
...options.headers
|
|
}
|
|
});
|
|
};
|
|
|
|
/**
|
|
* Get Barcode Template Attributes
|
|
*/
|
|
export const getBarcodeTemplateAttributes = <ThrowOnError extends boolean = false>(options?: Options<GetBarcodeTemplateAttributesData, ThrowOnError>) => {
|
|
return (options?.client ?? client).get<GetBarcodeTemplateAttributesResponses, unknown, ThrowOnError>({
|
|
requestValidator: async (data) => {
|
|
return await zGetBarcodeTemplateAttributesData.parseAsync(data);
|
|
},
|
|
responseType: 'json',
|
|
responseValidator: async (data) => {
|
|
return await zGetBarcodeTemplateAttributesResponse.parseAsync(data);
|
|
},
|
|
url: '/crm/v1/fulfillment-base/barcode-template/attributes',
|
|
...options
|
|
});
|
|
};
|
|
|
|
/**
|
|
* Get Barcode Template Sizes
|
|
*/
|
|
export const getBarcodeTemplateSizes = <ThrowOnError extends boolean = false>(options?: Options<GetBarcodeTemplateSizesData, ThrowOnError>) => {
|
|
return (options?.client ?? client).get<GetBarcodeTemplateSizesResponses, unknown, ThrowOnError>({
|
|
requestValidator: async (data) => {
|
|
return await zGetBarcodeTemplateSizesData.parseAsync(data);
|
|
},
|
|
responseType: 'json',
|
|
responseValidator: async (data) => {
|
|
return await zGetBarcodeTemplateSizesResponse2.parseAsync(data);
|
|
},
|
|
url: '/crm/v1/fulfillment-base/barcode-template/sizes',
|
|
...options
|
|
});
|
|
};
|
|
|
|
/**
|
|
* Get Deal Products
|
|
*/
|
|
export const getDealProducts = <ThrowOnError extends boolean = false>(options: Options<GetDealProductsData, ThrowOnError>) => {
|
|
return (options.client ?? client).get<GetDealProductsResponses, GetDealProductsErrors, ThrowOnError>({
|
|
requestValidator: async (data) => {
|
|
return await zGetDealProductsData.parseAsync(data);
|
|
},
|
|
responseType: 'json',
|
|
responseValidator: async (data) => {
|
|
return await zGetDealProductsResponse2.parseAsync(data);
|
|
},
|
|
url: '/crm/v1/fulfillment-base/deal-product/{dealId}',
|
|
...options
|
|
});
|
|
};
|
|
|
|
/**
|
|
* Create Deal Product
|
|
*/
|
|
export const createDealProduct = <ThrowOnError extends boolean = false>(options: Options<CreateDealProductData, ThrowOnError>) => {
|
|
return (options.client ?? client).post<CreateDealProductResponses, CreateDealProductErrors, ThrowOnError>({
|
|
requestValidator: async (data) => {
|
|
return await zCreateDealProductData.parseAsync(data);
|
|
},
|
|
responseType: 'json',
|
|
responseValidator: async (data) => {
|
|
return await zCreateDealProductResponse2.parseAsync(data);
|
|
},
|
|
url: '/crm/v1/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 ?? client).delete<DeleteDealProductResponses, DeleteDealProductErrors, ThrowOnError>({
|
|
requestValidator: async (data) => {
|
|
return await zDeleteDealProductData.parseAsync(data);
|
|
},
|
|
responseType: 'json',
|
|
responseValidator: async (data) => {
|
|
return await zDeleteDealProductResponse2.parseAsync(data);
|
|
},
|
|
url: '/crm/v1/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 ?? client).patch<UpdateDealProductResponses, UpdateDealProductErrors, ThrowOnError>({
|
|
requestValidator: async (data) => {
|
|
return await zUpdateDealProductData.parseAsync(data);
|
|
},
|
|
responseType: 'json',
|
|
responseValidator: async (data) => {
|
|
return await zUpdateDealProductResponse2.parseAsync(data);
|
|
},
|
|
url: '/crm/v1/fulfillment-base/deal-product/{dealId}/product/{productId}',
|
|
...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 ?? client).post<CreateDealProductServiceResponses, CreateDealProductServiceErrors, ThrowOnError>({
|
|
requestValidator: async (data) => {
|
|
return await zCreateDealProductServiceData.parseAsync(data);
|
|
},
|
|
responseType: 'json',
|
|
responseValidator: async (data) => {
|
|
return await zCreateDealProductServiceResponse.parseAsync(data);
|
|
},
|
|
url: '/crm/v1/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 ?? client).delete<DeleteDealProductServiceResponses, DeleteDealProductServiceErrors, ThrowOnError>({
|
|
requestValidator: async (data) => {
|
|
return await zDeleteDealProductServiceData.parseAsync(data);
|
|
},
|
|
responseType: 'json',
|
|
responseValidator: async (data) => {
|
|
return await zDeleteDealProductServiceResponse.parseAsync(data);
|
|
},
|
|
url: '/crm/v1/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 ?? client).patch<UpdateDealProductServiceResponses, UpdateDealProductServiceErrors, ThrowOnError>({
|
|
requestValidator: async (data) => {
|
|
return await zUpdateDealProductServiceData.parseAsync(data);
|
|
},
|
|
responseType: 'json',
|
|
responseValidator: async (data) => {
|
|
return await zUpdateDealProductServiceResponse.parseAsync(data);
|
|
},
|
|
url: '/crm/v1/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 ?? client).post<DuplicateProductServicesResponses, DuplicateProductServicesErrors, ThrowOnError>({
|
|
requestValidator: async (data) => {
|
|
return await zDuplicateProductServicesData.parseAsync(data);
|
|
},
|
|
responseType: 'json',
|
|
responseValidator: async (data) => {
|
|
return await zDuplicateProductServicesResponse.parseAsync(data);
|
|
},
|
|
url: '/crm/v1/fulfillment-base/deal-product/services/duplicate',
|
|
...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 ?? client).post<AddKitToDealProductResponses, AddKitToDealProductErrors, ThrowOnError>({
|
|
requestValidator: async (data) => {
|
|
return await zAddKitToDealProductData.parseAsync(data);
|
|
},
|
|
responseType: 'json',
|
|
responseValidator: async (data) => {
|
|
return await zAddKitToDealProductResponse.parseAsync(data);
|
|
},
|
|
url: '/crm/v1/fulfillment-base/deal-product/add-services-kit',
|
|
...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 ?? client).get<GetDealServicesResponses, GetDealServicesErrors, ThrowOnError>({
|
|
requestValidator: async (data) => {
|
|
return await zGetDealServicesData.parseAsync(data);
|
|
},
|
|
responseType: 'json',
|
|
responseValidator: async (data) => {
|
|
return await zGetDealServicesResponse2.parseAsync(data);
|
|
},
|
|
url: '/crm/v1/fulfillment-base/deal-service/{dealId}',
|
|
...options
|
|
});
|
|
};
|
|
|
|
/**
|
|
* Create Deal Service
|
|
*/
|
|
export const createDealService = <ThrowOnError extends boolean = false>(options: Options<CreateDealServiceData, ThrowOnError>) => {
|
|
return (options.client ?? client).post<CreateDealServiceResponses, CreateDealServiceErrors, ThrowOnError>({
|
|
requestValidator: async (data) => {
|
|
return await zCreateDealServiceData.parseAsync(data);
|
|
},
|
|
responseType: 'json',
|
|
responseValidator: async (data) => {
|
|
return await zCreateDealServiceResponse2.parseAsync(data);
|
|
},
|
|
url: '/crm/v1/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 ?? client).delete<DeleteDealServiceResponses, DeleteDealServiceErrors, ThrowOnError>({
|
|
requestValidator: async (data) => {
|
|
return await zDeleteDealServiceData.parseAsync(data);
|
|
},
|
|
responseType: 'json',
|
|
responseValidator: async (data) => {
|
|
return await zDeleteDealServiceResponse2.parseAsync(data);
|
|
},
|
|
url: '/crm/v1/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 ?? client).patch<UpdateDealServiceResponses, UpdateDealServiceErrors, ThrowOnError>({
|
|
requestValidator: async (data) => {
|
|
return await zUpdateDealServiceData.parseAsync(data);
|
|
},
|
|
responseType: 'json',
|
|
responseValidator: async (data) => {
|
|
return await zUpdateDealServiceResponse2.parseAsync(data);
|
|
},
|
|
url: '/crm/v1/fulfillment-base/deal-service/{dealId}/service/{serviceId}',
|
|
...options,
|
|
headers: {
|
|
'Content-Type': 'application/json',
|
|
...options.headers
|
|
}
|
|
});
|
|
};
|
|
|
|
/**
|
|
* Add Kit To Deal
|
|
*/
|
|
export const addKitToDeal = <ThrowOnError extends boolean = false>(options: Options<AddKitToDealData, ThrowOnError>) => {
|
|
return (options.client ?? client).post<AddKitToDealResponses, AddKitToDealErrors, ThrowOnError>({
|
|
requestValidator: async (data) => {
|
|
return await zAddKitToDealData.parseAsync(data);
|
|
},
|
|
responseType: 'json',
|
|
responseValidator: async (data) => {
|
|
return await zAddKitToDealResponse.parseAsync(data);
|
|
},
|
|
url: '/crm/v1/fulfillment-base/deal-service/add-services-kit',
|
|
...options,
|
|
headers: {
|
|
'Content-Type': 'application/json',
|
|
...options.headers
|
|
}
|
|
});
|
|
};
|
|
|
|
/**
|
|
* Get Base Marketplaces
|
|
*/
|
|
export const getBaseMarketplaces = <ThrowOnError extends boolean = false>(options?: Options<GetBaseMarketplacesData, ThrowOnError>) => {
|
|
return (options?.client ?? client).get<GetBaseMarketplacesResponses, unknown, ThrowOnError>({
|
|
requestValidator: async (data) => {
|
|
return await zGetBaseMarketplacesData.parseAsync(data);
|
|
},
|
|
responseType: 'json',
|
|
responseValidator: async (data) => {
|
|
return await zGetBaseMarketplacesResponse2.parseAsync(data);
|
|
},
|
|
url: '/crm/v1/fulfillment-base/marketplace/base',
|
|
...options
|
|
});
|
|
};
|
|
|
|
/**
|
|
* Get Marketplaces
|
|
*/
|
|
export const getMarketplaces = <ThrowOnError extends boolean = false>(options: Options<GetMarketplacesData, ThrowOnError>) => {
|
|
return (options.client ?? client).get<GetMarketplacesResponses, GetMarketplacesErrors, ThrowOnError>({
|
|
requestValidator: async (data) => {
|
|
return await zGetMarketplacesData.parseAsync(data);
|
|
},
|
|
responseType: 'json',
|
|
responseValidator: async (data) => {
|
|
return await zGetMarketplacesResponse2.parseAsync(data);
|
|
},
|
|
url: '/crm/v1/fulfillment-base/marketplace/{clientId}',
|
|
...options
|
|
});
|
|
};
|
|
|
|
/**
|
|
* Create Product
|
|
*/
|
|
export const createMarketplace = <ThrowOnError extends boolean = false>(options: Options<CreateMarketplaceData, ThrowOnError>) => {
|
|
return (options.client ?? client).post<CreateMarketplaceResponses, CreateMarketplaceErrors, ThrowOnError>({
|
|
requestValidator: async (data) => {
|
|
return await zCreateMarketplaceData.parseAsync(data);
|
|
},
|
|
responseType: 'json',
|
|
responseValidator: async (data) => {
|
|
return await zCreateMarketplaceResponse2.parseAsync(data);
|
|
},
|
|
url: '/crm/v1/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 ?? client).delete<DeleteMarketplaceResponses, DeleteMarketplaceErrors, ThrowOnError>({
|
|
requestValidator: async (data) => {
|
|
return await zDeleteMarketplaceData.parseAsync(data);
|
|
},
|
|
responseType: 'json',
|
|
responseValidator: async (data) => {
|
|
return await zDeleteMarketplaceResponse2.parseAsync(data);
|
|
},
|
|
url: '/crm/v1/fulfillment-base/marketplace/{pk}',
|
|
...options
|
|
});
|
|
};
|
|
|
|
/**
|
|
* Update Marketplace
|
|
*/
|
|
export const updateMarketplace = <ThrowOnError extends boolean = false>(options: Options<UpdateMarketplaceData, ThrowOnError>) => {
|
|
return (options.client ?? client).patch<UpdateMarketplaceResponses, UpdateMarketplaceErrors, ThrowOnError>({
|
|
requestValidator: async (data) => {
|
|
return await zUpdateMarketplaceData.parseAsync(data);
|
|
},
|
|
responseType: 'json',
|
|
responseValidator: async (data) => {
|
|
return await zUpdateMarketplaceResponse2.parseAsync(data);
|
|
},
|
|
url: '/crm/v1/fulfillment-base/marketplace/{pk}',
|
|
...options,
|
|
headers: {
|
|
'Content-Type': 'application/json',
|
|
...options.headers
|
|
}
|
|
});
|
|
};
|
|
|
|
/**
|
|
* Get Products
|
|
*/
|
|
export const getProducts = <ThrowOnError extends boolean = false>(options?: Options<GetProductsData, ThrowOnError>) => {
|
|
return (options?.client ?? client).get<GetProductsResponses, GetProductsErrors, ThrowOnError>({
|
|
requestValidator: async (data) => {
|
|
return await zGetProductsData.parseAsync(data);
|
|
},
|
|
responseType: 'json',
|
|
responseValidator: async (data) => {
|
|
return await zGetProductsResponse2.parseAsync(data);
|
|
},
|
|
url: '/crm/v1/fulfillment-base/product/',
|
|
...options
|
|
});
|
|
};
|
|
|
|
/**
|
|
* Create Product
|
|
*/
|
|
export const createProduct = <ThrowOnError extends boolean = false>(options: Options<CreateProductData, ThrowOnError>) => {
|
|
return (options.client ?? client).post<CreateProductResponses, CreateProductErrors, ThrowOnError>({
|
|
requestValidator: async (data) => {
|
|
return await zCreateProductData.parseAsync(data);
|
|
},
|
|
responseType: 'json',
|
|
responseValidator: async (data) => {
|
|
return await zCreateProductResponse2.parseAsync(data);
|
|
},
|
|
url: '/crm/v1/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 ?? client).delete<DeleteProductResponses, DeleteProductErrors, ThrowOnError>({
|
|
requestValidator: async (data) => {
|
|
return await zDeleteProductData.parseAsync(data);
|
|
},
|
|
responseType: 'json',
|
|
responseValidator: async (data) => {
|
|
return await zDeleteProductResponse2.parseAsync(data);
|
|
},
|
|
url: '/crm/v1/fulfillment-base/product/{pk}',
|
|
...options
|
|
});
|
|
};
|
|
|
|
/**
|
|
* Update Product
|
|
*/
|
|
export const updateProduct = <ThrowOnError extends boolean = false>(options: Options<UpdateProductData, ThrowOnError>) => {
|
|
return (options.client ?? client).patch<UpdateProductResponses, UpdateProductErrors, ThrowOnError>({
|
|
requestValidator: async (data) => {
|
|
return await zUpdateProductData.parseAsync(data);
|
|
},
|
|
responseType: 'json',
|
|
responseValidator: async (data) => {
|
|
return await zUpdateProductResponse2.parseAsync(data);
|
|
},
|
|
url: '/crm/v1/fulfillment-base/product/{pk}',
|
|
...options,
|
|
headers: {
|
|
'Content-Type': 'application/json',
|
|
...options.headers
|
|
}
|
|
});
|
|
};
|
|
|
|
/**
|
|
* Get Product Barcode Pdf
|
|
*/
|
|
export const getProductBarcodePdf = <ThrowOnError extends boolean = false>(options: Options<GetProductBarcodePdfData, ThrowOnError>) => {
|
|
return (options.client ?? client).post<GetProductBarcodePdfResponses, GetProductBarcodePdfErrors, ThrowOnError>({
|
|
requestValidator: async (data) => {
|
|
return await zGetProductBarcodePdfData.parseAsync(data);
|
|
},
|
|
responseType: 'json',
|
|
responseValidator: async (data) => {
|
|
return await zGetProductBarcodePdfResponse2.parseAsync(data);
|
|
},
|
|
url: '/crm/v1/fulfillment-base/product/barcode/get-pdf',
|
|
...options,
|
|
headers: {
|
|
'Content-Type': 'application/json',
|
|
...options.headers
|
|
}
|
|
});
|
|
};
|
|
|
|
/**
|
|
* Get Services
|
|
*/
|
|
export const getServices = <ThrowOnError extends boolean = false>(options?: Options<GetServicesData, ThrowOnError>) => {
|
|
return (options?.client ?? client).get<GetServicesResponses, unknown, ThrowOnError>({
|
|
requestValidator: async (data) => {
|
|
return await zGetServicesData.parseAsync(data);
|
|
},
|
|
responseType: 'json',
|
|
responseValidator: async (data) => {
|
|
return await zGetServicesResponse2.parseAsync(data);
|
|
},
|
|
url: '/crm/v1/fulfillment-base/service/',
|
|
...options
|
|
});
|
|
};
|
|
|
|
/**
|
|
* Create Service
|
|
*/
|
|
export const createService = <ThrowOnError extends boolean = false>(options: Options<CreateServiceData, ThrowOnError>) => {
|
|
return (options.client ?? client).post<CreateServiceResponses, CreateServiceErrors, ThrowOnError>({
|
|
requestValidator: async (data) => {
|
|
return await zCreateServiceData.parseAsync(data);
|
|
},
|
|
responseType: 'json',
|
|
responseValidator: async (data) => {
|
|
return await zCreateServiceResponse2.parseAsync(data);
|
|
},
|
|
url: '/crm/v1/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 ?? client).delete<DeleteServiceResponses, DeleteServiceErrors, ThrowOnError>({
|
|
requestValidator: async (data) => {
|
|
return await zDeleteServiceData.parseAsync(data);
|
|
},
|
|
responseType: 'json',
|
|
responseValidator: async (data) => {
|
|
return await zDeleteServiceResponse2.parseAsync(data);
|
|
},
|
|
url: '/crm/v1/fulfillment-base/service/{pk}',
|
|
...options
|
|
});
|
|
};
|
|
|
|
/**
|
|
* Update Service
|
|
*/
|
|
export const updateService = <ThrowOnError extends boolean = false>(options: Options<UpdateServiceData, ThrowOnError>) => {
|
|
return (options.client ?? client).patch<UpdateServiceResponses, UpdateServiceErrors, ThrowOnError>({
|
|
requestValidator: async (data) => {
|
|
return await zUpdateServiceData.parseAsync(data);
|
|
},
|
|
responseType: 'json',
|
|
responseValidator: async (data) => {
|
|
return await zUpdateServiceResponse2.parseAsync(data);
|
|
},
|
|
url: '/crm/v1/fulfillment-base/service/{pk}',
|
|
...options,
|
|
headers: {
|
|
'Content-Type': 'application/json',
|
|
...options.headers
|
|
}
|
|
});
|
|
};
|
|
|
|
/**
|
|
* Get Services Categories
|
|
*/
|
|
export const getServiceCategories = <ThrowOnError extends boolean = false>(options?: Options<GetServiceCategoriesData, ThrowOnError>) => {
|
|
return (options?.client ?? client).get<GetServiceCategoriesResponses, unknown, ThrowOnError>({
|
|
requestValidator: async (data) => {
|
|
return await zGetServiceCategoriesData.parseAsync(data);
|
|
},
|
|
responseType: 'json',
|
|
responseValidator: async (data) => {
|
|
return await zGetServiceCategoriesResponse2.parseAsync(data);
|
|
},
|
|
url: '/crm/v1/fulfillment-base/service-category/',
|
|
...options
|
|
});
|
|
};
|
|
|
|
/**
|
|
* Create Service Category
|
|
*/
|
|
export const createServiceCategory = <ThrowOnError extends boolean = false>(options: Options<CreateServiceCategoryData, ThrowOnError>) => {
|
|
return (options.client ?? client).post<CreateServiceCategoryResponses, CreateServiceCategoryErrors, ThrowOnError>({
|
|
requestValidator: async (data) => {
|
|
return await zCreateServiceCategoryData.parseAsync(data);
|
|
},
|
|
responseType: 'json',
|
|
responseValidator: async (data) => {
|
|
return await zCreateServiceCategoryResponse2.parseAsync(data);
|
|
},
|
|
url: '/crm/v1/fulfillment-base/service-category/',
|
|
...options,
|
|
headers: {
|
|
'Content-Type': 'application/json',
|
|
...options.headers
|
|
}
|
|
});
|
|
};
|
|
|
|
/**
|
|
* Delete Service Category
|
|
*/
|
|
export const deleteServiceCategory = <ThrowOnError extends boolean = false>(options: Options<DeleteServiceCategoryData, ThrowOnError>) => {
|
|
return (options.client ?? client).delete<DeleteServiceCategoryResponses, DeleteServiceCategoryErrors, ThrowOnError>({
|
|
requestValidator: async (data) => {
|
|
return await zDeleteServiceCategoryData.parseAsync(data);
|
|
},
|
|
responseType: 'json',
|
|
responseValidator: async (data) => {
|
|
return await zDeleteServiceCategoryResponse2.parseAsync(data);
|
|
},
|
|
url: '/crm/v1/fulfillment-base/service-category/{pk}',
|
|
...options
|
|
});
|
|
};
|
|
|
|
/**
|
|
* Update Service Category
|
|
*/
|
|
export const updateServiceCategory = <ThrowOnError extends boolean = false>(options: Options<UpdateServiceCategoryData, ThrowOnError>) => {
|
|
return (options.client ?? client).patch<UpdateServiceCategoryResponses, UpdateServiceCategoryErrors, ThrowOnError>({
|
|
requestValidator: async (data) => {
|
|
return await zUpdateServiceCategoryData.parseAsync(data);
|
|
},
|
|
responseType: 'json',
|
|
responseValidator: async (data) => {
|
|
return await zUpdateServiceCategoryResponse2.parseAsync(data);
|
|
},
|
|
url: '/crm/v1/fulfillment-base/service-category/{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 ?? client).get<GetServicesKitsResponses, unknown, ThrowOnError>({
|
|
requestValidator: async (data) => {
|
|
return await zGetServicesKitsData.parseAsync(data);
|
|
},
|
|
responseType: 'json',
|
|
responseValidator: async (data) => {
|
|
return await zGetServicesKitsResponse.parseAsync(data);
|
|
},
|
|
url: '/crm/v1/fulfillment-base/services-kit/',
|
|
...options
|
|
});
|
|
};
|
|
|
|
/**
|
|
* Create Services Kit
|
|
*/
|
|
export const createServicesKit = <ThrowOnError extends boolean = false>(options: Options<CreateServicesKitData, ThrowOnError>) => {
|
|
return (options.client ?? client).post<CreateServicesKitResponses, CreateServicesKitErrors, ThrowOnError>({
|
|
requestValidator: async (data) => {
|
|
return await zCreateServicesKitData.parseAsync(data);
|
|
},
|
|
responseType: 'json',
|
|
responseValidator: async (data) => {
|
|
return await zCreateServicesKitResponse2.parseAsync(data);
|
|
},
|
|
url: '/crm/v1/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 ?? client).delete<DeleteServicesKitResponses, DeleteServicesKitErrors, ThrowOnError>({
|
|
requestValidator: async (data) => {
|
|
return await zDeleteServicesKitData.parseAsync(data);
|
|
},
|
|
responseType: 'json',
|
|
responseValidator: async (data) => {
|
|
return await zDeleteServicesKitResponse2.parseAsync(data);
|
|
},
|
|
url: '/crm/v1/fulfillment-base/services-kit/{pk}',
|
|
...options
|
|
});
|
|
};
|
|
|
|
/**
|
|
* Update Services Kit
|
|
*/
|
|
export const updateServicesKit = <ThrowOnError extends boolean = false>(options: Options<UpdateServicesKitData, ThrowOnError>) => {
|
|
return (options.client ?? client).patch<UpdateServicesKitResponses, UpdateServicesKitErrors, ThrowOnError>({
|
|
requestValidator: async (data) => {
|
|
return await zUpdateServicesKitData.parseAsync(data);
|
|
},
|
|
responseType: 'json',
|
|
responseValidator: async (data) => {
|
|
return await zUpdateServicesKitResponse2.parseAsync(data);
|
|
},
|
|
url: '/crm/v1/fulfillment-base/services-kit/{pk}',
|
|
...options,
|
|
headers: {
|
|
'Content-Type': 'application/json',
|
|
...options.headers
|
|
}
|
|
});
|
|
};
|
|
|
|
/**
|
|
* Get Projects
|
|
*/
|
|
export const getProjects = <ThrowOnError extends boolean = false>(options?: Options<GetProjectsData, ThrowOnError>) => {
|
|
return (options?.client ?? client).get<GetProjectsResponses, unknown, ThrowOnError>({
|
|
requestValidator: async (data) => {
|
|
return await zGetProjectsData.parseAsync(data);
|
|
},
|
|
responseType: 'json',
|
|
responseValidator: async (data) => {
|
|
return await zGetProjectsResponse2.parseAsync(data);
|
|
},
|
|
url: '/crm/v1/project/',
|
|
...options
|
|
});
|
|
};
|
|
|
|
/**
|
|
* Create Project
|
|
*/
|
|
export const createProject = <ThrowOnError extends boolean = false>(options: Options<CreateProjectData, ThrowOnError>) => {
|
|
return (options.client ?? client).post<CreateProjectResponses, CreateProjectErrors, ThrowOnError>({
|
|
requestValidator: async (data) => {
|
|
return await zCreateProjectData.parseAsync(data);
|
|
},
|
|
responseType: 'json',
|
|
responseValidator: async (data) => {
|
|
return await zCreateProjectResponse2.parseAsync(data);
|
|
},
|
|
url: '/crm/v1/project/',
|
|
...options,
|
|
headers: {
|
|
'Content-Type': 'application/json',
|
|
...options.headers
|
|
}
|
|
});
|
|
};
|
|
|
|
/**
|
|
* Delete Project
|
|
*/
|
|
export const deleteProject = <ThrowOnError extends boolean = false>(options: Options<DeleteProjectData, ThrowOnError>) => {
|
|
return (options.client ?? client).delete<DeleteProjectResponses, DeleteProjectErrors, ThrowOnError>({
|
|
requestValidator: async (data) => {
|
|
return await zDeleteProjectData.parseAsync(data);
|
|
},
|
|
responseType: 'json',
|
|
responseValidator: async (data) => {
|
|
return await zDeleteProjectResponse2.parseAsync(data);
|
|
},
|
|
url: '/crm/v1/project/{pk}',
|
|
...options
|
|
});
|
|
};
|
|
|
|
/**
|
|
* Update Project
|
|
*/
|
|
export const updateProject = <ThrowOnError extends boolean = false>(options: Options<UpdateProjectData, ThrowOnError>) => {
|
|
return (options.client ?? client).patch<UpdateProjectResponses, UpdateProjectErrors, ThrowOnError>({
|
|
requestValidator: async (data) => {
|
|
return await zUpdateProjectData.parseAsync(data);
|
|
},
|
|
responseType: 'json',
|
|
responseValidator: async (data) => {
|
|
return await zUpdateProjectResponse2.parseAsync(data);
|
|
},
|
|
url: '/crm/v1/project/{pk}',
|
|
...options,
|
|
headers: {
|
|
'Content-Type': 'application/json',
|
|
...options.headers
|
|
}
|
|
});
|
|
};
|
|
|
|
/**
|
|
* Get Statuses
|
|
*/
|
|
export const getStatuses = <ThrowOnError extends boolean = false>(options: Options<GetStatusesData, ThrowOnError>) => {
|
|
return (options.client ?? client).get<GetStatusesResponses, GetStatusesErrors, ThrowOnError>({
|
|
requestValidator: async (data) => {
|
|
return await zGetStatusesData.parseAsync(data);
|
|
},
|
|
responseType: 'json',
|
|
responseValidator: async (data) => {
|
|
return await zGetStatusesResponse2.parseAsync(data);
|
|
},
|
|
url: '/crm/v1/status/{boardId}',
|
|
...options
|
|
});
|
|
};
|
|
|
|
/**
|
|
* Create Status
|
|
*/
|
|
export const createStatus = <ThrowOnError extends boolean = false>(options: Options<CreateStatusData, ThrowOnError>) => {
|
|
return (options.client ?? client).post<CreateStatusResponses, CreateStatusErrors, ThrowOnError>({
|
|
requestValidator: async (data) => {
|
|
return await zCreateStatusData.parseAsync(data);
|
|
},
|
|
responseType: 'json',
|
|
responseValidator: async (data) => {
|
|
return await zCreateStatusResponse2.parseAsync(data);
|
|
},
|
|
url: '/crm/v1/status/',
|
|
...options,
|
|
headers: {
|
|
'Content-Type': 'application/json',
|
|
...options.headers
|
|
}
|
|
});
|
|
};
|
|
|
|
/**
|
|
* Delete Status
|
|
*/
|
|
export const deleteStatus = <ThrowOnError extends boolean = false>(options: Options<DeleteStatusData, ThrowOnError>) => {
|
|
return (options.client ?? client).delete<DeleteStatusResponses, DeleteStatusErrors, ThrowOnError>({
|
|
requestValidator: async (data) => {
|
|
return await zDeleteStatusData.parseAsync(data);
|
|
},
|
|
responseType: 'json',
|
|
responseValidator: async (data) => {
|
|
return await zDeleteStatusResponse2.parseAsync(data);
|
|
},
|
|
url: '/crm/v1/status/{pk}',
|
|
...options
|
|
});
|
|
};
|
|
|
|
/**
|
|
* Update Status
|
|
*/
|
|
export const updateStatus = <ThrowOnError extends boolean = false>(options: Options<UpdateStatusData, ThrowOnError>) => {
|
|
return (options.client ?? client).patch<UpdateStatusResponses, UpdateStatusErrors, ThrowOnError>({
|
|
requestValidator: async (data) => {
|
|
return await zUpdateStatusData.parseAsync(data);
|
|
},
|
|
responseType: 'json',
|
|
responseValidator: async (data) => {
|
|
return await zUpdateStatusResponse2.parseAsync(data);
|
|
},
|
|
url: '/crm/v1/status/{pk}',
|
|
...options,
|
|
headers: {
|
|
'Content-Type': 'application/json',
|
|
...options.headers
|
|
}
|
|
});
|
|
};
|
|
|
|
/**
|
|
* Get Status History
|
|
*/
|
|
export const getStatusHistory = <ThrowOnError extends boolean = false>(options: Options<GetStatusHistoryData, ThrowOnError>) => {
|
|
return (options.client ?? client).get<GetStatusHistoryResponses, GetStatusHistoryErrors, ThrowOnError>({
|
|
requestValidator: async (data) => {
|
|
return await zGetStatusHistoryData.parseAsync(data);
|
|
},
|
|
responseType: 'json',
|
|
responseValidator: async (data) => {
|
|
return await zGetStatusHistoryResponse2.parseAsync(data);
|
|
},
|
|
url: '/crm/v1/status/history/{dealId}',
|
|
...options
|
|
});
|
|
};
|