diff --git a/src/lib/client/@tanstack/react-query.gen.ts b/src/lib/client/@tanstack/react-query.gen.ts index 970b958..738c8d0 100644 --- a/src/lib/client/@tanstack/react-query.gen.ts +++ b/src/lib/client/@tanstack/react-query.gen.ts @@ -801,276 +801,6 @@ export const getBuiltInModulesOptions = ( }); }; -export const getProjectsQueryKey = (options?: Options) => - createQueryKey("getProjects", options); - -/** - * Get Projects - */ -export const getProjectsOptions = (options?: Options) => { - return queryOptions({ - queryFn: async ({ queryKey, signal }) => { - const { data } = await getProjects({ - ...options, - ...queryKey[0], - signal, - throwOnError: true, - }); - return data; - }, - queryKey: getProjectsQueryKey(options), - }); -}; - -export const createProjectQueryKey = (options: Options) => - createQueryKey("createProject", options); - -/** - * Create Project - */ -export const createProjectOptions = (options: Options) => { - return queryOptions({ - queryFn: async ({ queryKey, signal }) => { - const { data } = await createProject({ - ...options, - ...queryKey[0], - signal, - throwOnError: true, - }); - return data; - }, - queryKey: createProjectQueryKey(options), - }); -}; - -/** - * Create Project - */ -export const createProjectMutation = ( - options?: Partial> -): UseMutationOptions< - CreateProjectResponse2, - AxiosError, - Options -> => { - const mutationOptions: UseMutationOptions< - CreateProjectResponse2, - AxiosError, - Options - > = { - mutationFn: async localOptions => { - const { data } = await createProject({ - ...options, - ...localOptions, - throwOnError: true, - }); - return data; - }, - }; - return mutationOptions; -}; - -/** - * Delete Project - */ -export const deleteProjectMutation = ( - options?: Partial> -): UseMutationOptions< - DeleteProjectResponse2, - AxiosError, - Options -> => { - const mutationOptions: UseMutationOptions< - DeleteProjectResponse2, - AxiosError, - Options - > = { - mutationFn: async localOptions => { - const { data } = await deleteProject({ - ...options, - ...localOptions, - throwOnError: true, - }); - return data; - }, - }; - return mutationOptions; -}; - -/** - * Update Project - */ -export const updateProjectMutation = ( - options?: Partial> -): UseMutationOptions< - UpdateProjectResponse2, - AxiosError, - Options -> => { - const mutationOptions: UseMutationOptions< - UpdateProjectResponse2, - AxiosError, - Options - > = { - mutationFn: async localOptions => { - const { data } = await updateProject({ - ...options, - ...localOptions, - throwOnError: true, - }); - return data; - }, - }; - return mutationOptions; -}; - -export const getStatusesQueryKey = (options: Options) => - createQueryKey("getStatuses", options); - -/** - * Get Statuses - */ -export const getStatusesOptions = (options: Options) => { - return queryOptions({ - queryFn: async ({ queryKey, signal }) => { - const { data } = await getStatuses({ - ...options, - ...queryKey[0], - signal, - throwOnError: true, - }); - return data; - }, - queryKey: getStatusesQueryKey(options), - }); -}; - -export const createStatusQueryKey = (options: Options) => - createQueryKey("createStatus", options); - -/** - * Create Status - */ -export const createStatusOptions = (options: Options) => { - return queryOptions({ - queryFn: async ({ queryKey, signal }) => { - const { data } = await createStatus({ - ...options, - ...queryKey[0], - signal, - throwOnError: true, - }); - return data; - }, - queryKey: createStatusQueryKey(options), - }); -}; - -/** - * Create Status - */ -export const createStatusMutation = ( - options?: Partial> -): UseMutationOptions< - CreateStatusResponse2, - AxiosError, - Options -> => { - const mutationOptions: UseMutationOptions< - CreateStatusResponse2, - AxiosError, - Options - > = { - mutationFn: async localOptions => { - const { data } = await createStatus({ - ...options, - ...localOptions, - throwOnError: true, - }); - return data; - }, - }; - return mutationOptions; -}; - -/** - * Delete Status - */ -export const deleteStatusMutation = ( - options?: Partial> -): UseMutationOptions< - DeleteStatusResponse2, - AxiosError, - Options -> => { - const mutationOptions: UseMutationOptions< - DeleteStatusResponse2, - AxiosError, - Options - > = { - mutationFn: async localOptions => { - const { data } = await deleteStatus({ - ...options, - ...localOptions, - throwOnError: true, - }); - return data; - }, - }; - return mutationOptions; -}; - -/** - * Update Status - */ -export const updateStatusMutation = ( - options?: Partial> -): UseMutationOptions< - UpdateStatusResponse2, - AxiosError, - Options -> => { - const mutationOptions: UseMutationOptions< - UpdateStatusResponse2, - AxiosError, - Options - > = { - mutationFn: async localOptions => { - const { data } = await updateStatus({ - ...options, - ...localOptions, - throwOnError: true, - }); - return data; - }, - }; - return mutationOptions; -}; - -export const getStatusHistoryQueryKey = ( - options: Options -) => createQueryKey("getStatusHistory", options); - -/** - * Get Status History - */ -export const getStatusHistoryOptions = ( - options: Options -) => { - return queryOptions({ - queryFn: async ({ queryKey, signal }) => { - const { data } = await getStatusHistory({ - ...options, - ...queryKey[0], - signal, - throwOnError: true, - }); - return data; - }, - queryKey: getStatusHistoryQueryKey(options), - }); -}; - export const getClientsQueryKey = (options?: Options) => createQueryKey("getClients", options); @@ -2643,3 +2373,273 @@ export const updateServicesKitMutation = ( }; return mutationOptions; }; + +export const getProjectsQueryKey = (options?: Options) => + createQueryKey("getProjects", options); + +/** + * Get Projects + */ +export const getProjectsOptions = (options?: Options) => { + return queryOptions({ + queryFn: async ({ queryKey, signal }) => { + const { data } = await getProjects({ + ...options, + ...queryKey[0], + signal, + throwOnError: true, + }); + return data; + }, + queryKey: getProjectsQueryKey(options), + }); +}; + +export const createProjectQueryKey = (options: Options) => + createQueryKey("createProject", options); + +/** + * Create Project + */ +export const createProjectOptions = (options: Options) => { + return queryOptions({ + queryFn: async ({ queryKey, signal }) => { + const { data } = await createProject({ + ...options, + ...queryKey[0], + signal, + throwOnError: true, + }); + return data; + }, + queryKey: createProjectQueryKey(options), + }); +}; + +/** + * Create Project + */ +export const createProjectMutation = ( + options?: Partial> +): UseMutationOptions< + CreateProjectResponse2, + AxiosError, + Options +> => { + const mutationOptions: UseMutationOptions< + CreateProjectResponse2, + AxiosError, + Options + > = { + mutationFn: async localOptions => { + const { data } = await createProject({ + ...options, + ...localOptions, + throwOnError: true, + }); + return data; + }, + }; + return mutationOptions; +}; + +/** + * Delete Project + */ +export const deleteProjectMutation = ( + options?: Partial> +): UseMutationOptions< + DeleteProjectResponse2, + AxiosError, + Options +> => { + const mutationOptions: UseMutationOptions< + DeleteProjectResponse2, + AxiosError, + Options + > = { + mutationFn: async localOptions => { + const { data } = await deleteProject({ + ...options, + ...localOptions, + throwOnError: true, + }); + return data; + }, + }; + return mutationOptions; +}; + +/** + * Update Project + */ +export const updateProjectMutation = ( + options?: Partial> +): UseMutationOptions< + UpdateProjectResponse2, + AxiosError, + Options +> => { + const mutationOptions: UseMutationOptions< + UpdateProjectResponse2, + AxiosError, + Options + > = { + mutationFn: async localOptions => { + const { data } = await updateProject({ + ...options, + ...localOptions, + throwOnError: true, + }); + return data; + }, + }; + return mutationOptions; +}; + +export const getStatusesQueryKey = (options: Options) => + createQueryKey("getStatuses", options); + +/** + * Get Statuses + */ +export const getStatusesOptions = (options: Options) => { + return queryOptions({ + queryFn: async ({ queryKey, signal }) => { + const { data } = await getStatuses({ + ...options, + ...queryKey[0], + signal, + throwOnError: true, + }); + return data; + }, + queryKey: getStatusesQueryKey(options), + }); +}; + +export const createStatusQueryKey = (options: Options) => + createQueryKey("createStatus", options); + +/** + * Create Status + */ +export const createStatusOptions = (options: Options) => { + return queryOptions({ + queryFn: async ({ queryKey, signal }) => { + const { data } = await createStatus({ + ...options, + ...queryKey[0], + signal, + throwOnError: true, + }); + return data; + }, + queryKey: createStatusQueryKey(options), + }); +}; + +/** + * Create Status + */ +export const createStatusMutation = ( + options?: Partial> +): UseMutationOptions< + CreateStatusResponse2, + AxiosError, + Options +> => { + const mutationOptions: UseMutationOptions< + CreateStatusResponse2, + AxiosError, + Options + > = { + mutationFn: async localOptions => { + const { data } = await createStatus({ + ...options, + ...localOptions, + throwOnError: true, + }); + return data; + }, + }; + return mutationOptions; +}; + +/** + * Delete Status + */ +export const deleteStatusMutation = ( + options?: Partial> +): UseMutationOptions< + DeleteStatusResponse2, + AxiosError, + Options +> => { + const mutationOptions: UseMutationOptions< + DeleteStatusResponse2, + AxiosError, + Options + > = { + mutationFn: async localOptions => { + const { data } = await deleteStatus({ + ...options, + ...localOptions, + throwOnError: true, + }); + return data; + }, + }; + return mutationOptions; +}; + +/** + * Update Status + */ +export const updateStatusMutation = ( + options?: Partial> +): UseMutationOptions< + UpdateStatusResponse2, + AxiosError, + Options +> => { + const mutationOptions: UseMutationOptions< + UpdateStatusResponse2, + AxiosError, + Options + > = { + mutationFn: async localOptions => { + const { data } = await updateStatus({ + ...options, + ...localOptions, + throwOnError: true, + }); + return data; + }, + }; + return mutationOptions; +}; + +export const getStatusHistoryQueryKey = ( + options: Options +) => createQueryKey("getStatusHistory", options); + +/** + * Get Status History + */ +export const getStatusHistoryOptions = ( + options: Options +) => { + return queryOptions({ + queryFn: async ({ queryKey, signal }) => { + const { data } = await getStatusHistory({ + ...options, + ...queryKey[0], + signal, + throwOnError: true, + }); + return data; + }, + queryKey: getStatusHistoryQueryKey(options), + }); +}; diff --git a/src/lib/client/sdk.gen.ts b/src/lib/client/sdk.gen.ts index 3bd792b..891edf4 100644 --- a/src/lib/client/sdk.gen.ts +++ b/src/lib/client/sdk.gen.ts @@ -373,7 +373,7 @@ export const getBoards = ( responseValidator: async data => { return await zGetBoardsResponse2.parseAsync(data); }, - url: "/board/{projectId}", + url: "/crm/v1/board/{projectId}", ...options, }); }; @@ -396,7 +396,7 @@ export const createBoard = ( responseValidator: async data => { return await zCreateBoardResponse2.parseAsync(data); }, - url: "/board/", + url: "/crm/v1/board/", ...options, headers: { "Content-Type": "application/json", @@ -423,7 +423,7 @@ export const deleteBoard = ( responseValidator: async data => { return await zDeleteBoardResponse2.parseAsync(data); }, - url: "/board/{pk}", + url: "/crm/v1/board/{pk}", ...options, }); }; @@ -446,7 +446,7 @@ export const updateBoard = ( responseValidator: async data => { return await zUpdateBoardResponse2.parseAsync(data); }, - url: "/board/{pk}", + url: "/crm/v1/board/{pk}", ...options, headers: { "Content-Type": "application/json", @@ -473,7 +473,7 @@ export const getDeals = ( responseValidator: async data => { return await zGetDealsResponse2.parseAsync(data); }, - url: "/deal/", + url: "/crm/v1/deal/", ...options, }); }; @@ -496,7 +496,7 @@ export const createDeal = ( responseValidator: async data => { return await zCreateDealResponse2.parseAsync(data); }, - url: "/deal/", + url: "/crm/v1/deal/", ...options, headers: { "Content-Type": "application/json", @@ -523,7 +523,7 @@ export const deleteDeal = ( responseValidator: async data => { return await zDeleteDealResponse2.parseAsync(data); }, - url: "/deal/{pk}", + url: "/crm/v1/deal/{pk}", ...options, }); }; @@ -546,7 +546,7 @@ export const updateDeal = ( responseValidator: async data => { return await zUpdateDealResponse2.parseAsync(data); }, - url: "/deal/{pk}", + url: "/crm/v1/deal/{pk}", ...options, headers: { "Content-Type": "application/json", @@ -573,7 +573,7 @@ export const deleteDealGroup = ( responseValidator: async data => { return await zDeleteDealGroupResponse2.parseAsync(data); }, - url: "/deal-group/{pk}", + url: "/crm/v1/deal-group/{pk}", ...options, }); }; @@ -596,7 +596,7 @@ export const updateDealGroup = ( responseValidator: async data => { return await zUpdateDealGroupResponse2.parseAsync(data); }, - url: "/deal-group/{pk}", + url: "/crm/v1/deal-group/{pk}", ...options, headers: { "Content-Type": "application/json", @@ -623,7 +623,7 @@ export const createDealGroup = ( responseValidator: async data => { return await zCreateDealGroupResponse2.parseAsync(data); }, - url: "/deal-group/", + url: "/crm/v1/deal-group/", ...options, headers: { "Content-Type": "application/json", @@ -650,7 +650,7 @@ export const updateDealsInGroup = ( responseValidator: async data => { return await zUpdateDealsInGroupResponse2.parseAsync(data); }, - url: "/deal-group/{pk}/deals", + url: "/crm/v1/deal-group/{pk}/deals", ...options, headers: { "Content-Type": "application/json", @@ -677,230 +677,7 @@ export const getBuiltInModules = ( responseValidator: async data => { return await zGetBuiltInModulesResponse.parseAsync(data); }, - url: "/module/built-in/", - ...options, - }); -}; - -/** - * Get Projects - */ -export const getProjects = ( - options?: Options -) => { - return (options?.client ?? _heyApiClient).get< - GetProjectsResponses, - unknown, - ThrowOnError - >({ - requestValidator: async data => { - return await zGetProjectsData.parseAsync(data); - }, - responseType: "json", - responseValidator: async data => { - return await zGetProjectsResponse2.parseAsync(data); - }, - url: "/project/", - ...options, - }); -}; - -/** - * Create Project - */ -export const createProject = ( - options: Options -) => { - return (options.client ?? _heyApiClient).post< - CreateProjectResponses, - CreateProjectErrors, - ThrowOnError - >({ - requestValidator: async data => { - return await zCreateProjectData.parseAsync(data); - }, - responseType: "json", - responseValidator: async data => { - return await zCreateProjectResponse2.parseAsync(data); - }, - url: "/project/", - ...options, - headers: { - "Content-Type": "application/json", - ...options.headers, - }, - }); -}; - -/** - * Delete Project - */ -export const deleteProject = ( - options: Options -) => { - return (options.client ?? _heyApiClient).delete< - DeleteProjectResponses, - DeleteProjectErrors, - ThrowOnError - >({ - requestValidator: async data => { - return await zDeleteProjectData.parseAsync(data); - }, - responseType: "json", - responseValidator: async data => { - return await zDeleteProjectResponse2.parseAsync(data); - }, - url: "/project/{pk}", - ...options, - }); -}; - -/** - * Update Project - */ -export const updateProject = ( - options: Options -) => { - return (options.client ?? _heyApiClient).patch< - UpdateProjectResponses, - UpdateProjectErrors, - ThrowOnError - >({ - requestValidator: async data => { - return await zUpdateProjectData.parseAsync(data); - }, - responseType: "json", - responseValidator: async data => { - return await zUpdateProjectResponse2.parseAsync(data); - }, - url: "/project/{pk}", - ...options, - headers: { - "Content-Type": "application/json", - ...options.headers, - }, - }); -}; - -/** - * Get Statuses - */ -export const getStatuses = ( - options: Options -) => { - return (options.client ?? _heyApiClient).get< - GetStatusesResponses, - GetStatusesErrors, - ThrowOnError - >({ - requestValidator: async data => { - return await zGetStatusesData.parseAsync(data); - }, - responseType: "json", - responseValidator: async data => { - return await zGetStatusesResponse2.parseAsync(data); - }, - url: "/status/{boardId}", - ...options, - }); -}; - -/** - * Create Status - */ -export const createStatus = ( - options: Options -) => { - return (options.client ?? _heyApiClient).post< - CreateStatusResponses, - CreateStatusErrors, - ThrowOnError - >({ - requestValidator: async data => { - return await zCreateStatusData.parseAsync(data); - }, - responseType: "json", - responseValidator: async data => { - return await zCreateStatusResponse2.parseAsync(data); - }, - url: "/status/", - ...options, - headers: { - "Content-Type": "application/json", - ...options.headers, - }, - }); -}; - -/** - * Delete Status - */ -export const deleteStatus = ( - options: Options -) => { - return (options.client ?? _heyApiClient).delete< - DeleteStatusResponses, - DeleteStatusErrors, - ThrowOnError - >({ - requestValidator: async data => { - return await zDeleteStatusData.parseAsync(data); - }, - responseType: "json", - responseValidator: async data => { - return await zDeleteStatusResponse2.parseAsync(data); - }, - url: "/status/{pk}", - ...options, - }); -}; - -/** - * Update Status - */ -export const updateStatus = ( - options: Options -) => { - return (options.client ?? _heyApiClient).patch< - UpdateStatusResponses, - UpdateStatusErrors, - ThrowOnError - >({ - requestValidator: async data => { - return await zUpdateStatusData.parseAsync(data); - }, - responseType: "json", - responseValidator: async data => { - return await zUpdateStatusResponse2.parseAsync(data); - }, - url: "/status/{pk}", - ...options, - headers: { - "Content-Type": "application/json", - ...options.headers, - }, - }); -}; - -/** - * Get Status History - */ -export const getStatusHistory = ( - options: Options -) => { - return (options.client ?? _heyApiClient).get< - GetStatusHistoryResponses, - GetStatusHistoryErrors, - ThrowOnError - >({ - requestValidator: async data => { - return await zGetStatusHistoryData.parseAsync(data); - }, - responseType: "json", - responseValidator: async data => { - return await zGetStatusHistoryResponse2.parseAsync(data); - }, - url: "/status/history/{dealId}", + url: "/crm/v1/module/built-in/", ...options, }); }; @@ -923,7 +700,7 @@ export const getClients = ( responseValidator: async data => { return await zGetClientsResponse2.parseAsync(data); }, - url: "/modules/clients/client/", + url: "/crm/v1/clients/client/", ...options, }); }; @@ -946,7 +723,7 @@ export const createClient = ( responseValidator: async data => { return await zCreateClientResponse2.parseAsync(data); }, - url: "/modules/clients/client/", + url: "/crm/v1/clients/client/", ...options, headers: { "Content-Type": "application/json", @@ -973,7 +750,7 @@ export const deleteClient = ( responseValidator: async data => { return await zDeleteClientResponse2.parseAsync(data); }, - url: "/modules/clients/client/{pk}", + url: "/crm/v1/clients/client/{pk}", ...options, }); }; @@ -996,7 +773,7 @@ export const updateClient = ( responseValidator: async data => { return await zUpdateClientResponse2.parseAsync(data); }, - url: "/modules/clients/client/{pk}", + url: "/crm/v1/clients/client/{pk}", ...options, headers: { "Content-Type": "application/json", @@ -1023,7 +800,7 @@ export const getBarcodeTemplates = ( responseValidator: async data => { return await zGetBarcodeTemplatesResponse2.parseAsync(data); }, - url: "/modules/fulfillment-base/barcode-template/", + url: "/crm/v1/fulfillment-base/barcode-template/", ...options, }); }; @@ -1046,7 +823,7 @@ export const createBarcodeTemplate = ( responseValidator: async data => { return await zCreateBarcodeTemplateResponse2.parseAsync(data); }, - url: "/modules/fulfillment-base/barcode-template/", + url: "/crm/v1/fulfillment-base/barcode-template/", ...options, headers: { "Content-Type": "application/json", @@ -1073,7 +850,7 @@ export const deleteBarcodeTemplate = ( responseValidator: async data => { return await zDeleteBarcodeTemplateResponse2.parseAsync(data); }, - url: "/modules/fulfillment-base/barcode-template/{pk}", + url: "/crm/v1/fulfillment-base/barcode-template/{pk}", ...options, }); }; @@ -1096,7 +873,7 @@ export const updateBarcodeTemplate = ( responseValidator: async data => { return await zUpdateBarcodeTemplateResponse2.parseAsync(data); }, - url: "/modules/fulfillment-base/barcode-template/{pk}", + url: "/crm/v1/fulfillment-base/barcode-template/{pk}", ...options, headers: { "Content-Type": "application/json", @@ -1125,7 +902,7 @@ export const getBarcodeTemplateAttributes = < responseValidator: async data => { return await zGetBarcodeTemplateAttributesResponse.parseAsync(data); }, - url: "/modules/fulfillment-base/barcode-template/attributes", + url: "/crm/v1/fulfillment-base/barcode-template/attributes", ...options, }); }; @@ -1148,7 +925,7 @@ export const getBarcodeTemplateSizes = ( responseValidator: async data => { return await zGetBarcodeTemplateSizesResponse2.parseAsync(data); }, - url: "/modules/fulfillment-base/barcode-template/sizes", + url: "/crm/v1/fulfillment-base/barcode-template/sizes", ...options, }); }; @@ -1171,7 +948,7 @@ export const getDealProducts = ( responseValidator: async data => { return await zGetDealProductsResponse2.parseAsync(data); }, - url: "/modules/fulfillment-base/deal-product/{dealId}", + url: "/crm/v1/fulfillment-base/deal-product/{dealId}", ...options, }); }; @@ -1194,7 +971,7 @@ export const createDealProduct = ( responseValidator: async data => { return await zCreateDealProductResponse2.parseAsync(data); }, - url: "/modules/fulfillment-base/deal-product/", + url: "/crm/v1/fulfillment-base/deal-product/", ...options, headers: { "Content-Type": "application/json", @@ -1221,7 +998,7 @@ export const deleteDealProduct = ( responseValidator: async data => { return await zDeleteDealProductResponse2.parseAsync(data); }, - url: "/modules/fulfillment-base/deal-product/{dealId}/product/{productId}", + url: "/crm/v1/fulfillment-base/deal-product/{dealId}/product/{productId}", ...options, }); }; @@ -1244,7 +1021,7 @@ export const updateDealProduct = ( responseValidator: async data => { return await zUpdateDealProductResponse2.parseAsync(data); }, - url: "/modules/fulfillment-base/deal-product/{dealId}/product/{productId}", + url: "/crm/v1/fulfillment-base/deal-product/{dealId}/product/{productId}", ...options, headers: { "Content-Type": "application/json", @@ -1271,7 +1048,7 @@ export const createDealProductService = ( responseValidator: async data => { return await zCreateDealProductServiceResponse.parseAsync(data); }, - url: "/modules/fulfillment-base/deal-product/service", + url: "/crm/v1/fulfillment-base/deal-product/service", ...options, headers: { "Content-Type": "application/json", @@ -1298,7 +1075,7 @@ export const deleteDealProductService = ( responseValidator: async data => { return await zDeleteDealProductServiceResponse.parseAsync(data); }, - url: "/modules/fulfillment-base/deal-product/{dealId}/product/{productId}/service/{serviceId}", + url: "/crm/v1/fulfillment-base/deal-product/{dealId}/product/{productId}/service/{serviceId}", ...options, }); }; @@ -1321,7 +1098,7 @@ export const updateDealProductService = ( responseValidator: async data => { return await zUpdateDealProductServiceResponse.parseAsync(data); }, - url: "/modules/fulfillment-base/deal-product/{dealId}/product/{productId}/service/{serviceId}", + url: "/crm/v1/fulfillment-base/deal-product/{dealId}/product/{productId}/service/{serviceId}", ...options, headers: { "Content-Type": "application/json", @@ -1348,7 +1125,7 @@ export const duplicateProductServices = ( responseValidator: async data => { return await zDuplicateProductServicesResponse.parseAsync(data); }, - url: "/modules/fulfillment-base/deal-product/services/duplicate", + url: "/crm/v1/fulfillment-base/deal-product/services/duplicate", ...options, headers: { "Content-Type": "application/json", @@ -1375,7 +1152,7 @@ export const addKitToDealProduct = ( responseValidator: async data => { return await zAddKitToDealProductResponse.parseAsync(data); }, - url: "/modules/fulfillment-base/deal-product/add-services-kit", + url: "/crm/v1/fulfillment-base/deal-product/add-services-kit", ...options, headers: { "Content-Type": "application/json", @@ -1402,7 +1179,7 @@ export const getDealServices = ( responseValidator: async data => { return await zGetDealServicesResponse2.parseAsync(data); }, - url: "/modules/fulfillment-base/deal-service/{dealId}", + url: "/crm/v1/fulfillment-base/deal-service/{dealId}", ...options, }); }; @@ -1425,7 +1202,7 @@ export const createDealService = ( responseValidator: async data => { return await zCreateDealServiceResponse2.parseAsync(data); }, - url: "/modules/fulfillment-base/deal-service/", + url: "/crm/v1/fulfillment-base/deal-service/", ...options, headers: { "Content-Type": "application/json", @@ -1452,7 +1229,7 @@ export const deleteDealService = ( responseValidator: async data => { return await zDeleteDealServiceResponse2.parseAsync(data); }, - url: "/modules/fulfillment-base/deal-service/{dealId}/service/{serviceId}", + url: "/crm/v1/fulfillment-base/deal-service/{dealId}/service/{serviceId}", ...options, }); }; @@ -1475,7 +1252,7 @@ export const updateDealService = ( responseValidator: async data => { return await zUpdateDealServiceResponse2.parseAsync(data); }, - url: "/modules/fulfillment-base/deal-service/{dealId}/service/{serviceId}", + url: "/crm/v1/fulfillment-base/deal-service/{dealId}/service/{serviceId}", ...options, headers: { "Content-Type": "application/json", @@ -1502,7 +1279,7 @@ export const addKitToDeal = ( responseValidator: async data => { return await zAddKitToDealResponse.parseAsync(data); }, - url: "/modules/fulfillment-base/deal-service/add-services-kit", + url: "/crm/v1/fulfillment-base/deal-service/add-services-kit", ...options, headers: { "Content-Type": "application/json", @@ -1529,7 +1306,7 @@ export const getBaseMarketplaces = ( responseValidator: async data => { return await zGetBaseMarketplacesResponse2.parseAsync(data); }, - url: "/modules/fulfillment-base/marketplace/base", + url: "/crm/v1/fulfillment-base/marketplace/base", ...options, }); }; @@ -1552,7 +1329,7 @@ export const getMarketplaces = ( responseValidator: async data => { return await zGetMarketplacesResponse2.parseAsync(data); }, - url: "/modules/fulfillment-base/marketplace/{clientId}", + url: "/crm/v1/fulfillment-base/marketplace/{clientId}", ...options, }); }; @@ -1575,7 +1352,7 @@ export const createMarketplace = ( responseValidator: async data => { return await zCreateMarketplaceResponse2.parseAsync(data); }, - url: "/modules/fulfillment-base/marketplace/", + url: "/crm/v1/fulfillment-base/marketplace/", ...options, headers: { "Content-Type": "application/json", @@ -1602,7 +1379,7 @@ export const deleteMarketplace = ( responseValidator: async data => { return await zDeleteMarketplaceResponse2.parseAsync(data); }, - url: "/modules/fulfillment-base/marketplace/{pk}", + url: "/crm/v1/fulfillment-base/marketplace/{pk}", ...options, }); }; @@ -1625,7 +1402,7 @@ export const updateMarketplace = ( responseValidator: async data => { return await zUpdateMarketplaceResponse2.parseAsync(data); }, - url: "/modules/fulfillment-base/marketplace/{pk}", + url: "/crm/v1/fulfillment-base/marketplace/{pk}", ...options, headers: { "Content-Type": "application/json", @@ -1652,7 +1429,7 @@ export const getProducts = ( responseValidator: async data => { return await zGetProductsResponse2.parseAsync(data); }, - url: "/modules/fulfillment-base/product/", + url: "/crm/v1/fulfillment-base/product/", ...options, }); }; @@ -1675,7 +1452,7 @@ export const createProduct = ( responseValidator: async data => { return await zCreateProductResponse2.parseAsync(data); }, - url: "/modules/fulfillment-base/product/", + url: "/crm/v1/fulfillment-base/product/", ...options, headers: { "Content-Type": "application/json", @@ -1702,7 +1479,7 @@ export const deleteProduct = ( responseValidator: async data => { return await zDeleteProductResponse2.parseAsync(data); }, - url: "/modules/fulfillment-base/product/{pk}", + url: "/crm/v1/fulfillment-base/product/{pk}", ...options, }); }; @@ -1725,7 +1502,7 @@ export const updateProduct = ( responseValidator: async data => { return await zUpdateProductResponse2.parseAsync(data); }, - url: "/modules/fulfillment-base/product/{pk}", + url: "/crm/v1/fulfillment-base/product/{pk}", ...options, headers: { "Content-Type": "application/json", @@ -1752,7 +1529,7 @@ export const getProductBarcodePdf = ( responseValidator: async data => { return await zGetProductBarcodePdfResponse2.parseAsync(data); }, - url: "/modules/fulfillment-base/product/barcode/get-pdf", + url: "/crm/v1/fulfillment-base/product/barcode/get-pdf", ...options, headers: { "Content-Type": "application/json", @@ -1779,7 +1556,7 @@ export const getServices = ( responseValidator: async data => { return await zGetServicesResponse2.parseAsync(data); }, - url: "/modules/fulfillment-base/service/", + url: "/crm/v1/fulfillment-base/service/", ...options, }); }; @@ -1802,7 +1579,7 @@ export const createService = ( responseValidator: async data => { return await zCreateServiceResponse2.parseAsync(data); }, - url: "/modules/fulfillment-base/service/", + url: "/crm/v1/fulfillment-base/service/", ...options, headers: { "Content-Type": "application/json", @@ -1829,7 +1606,7 @@ export const deleteService = ( responseValidator: async data => { return await zDeleteServiceResponse2.parseAsync(data); }, - url: "/modules/fulfillment-base/service/{pk}", + url: "/crm/v1/fulfillment-base/service/{pk}", ...options, }); }; @@ -1852,7 +1629,7 @@ export const updateService = ( responseValidator: async data => { return await zUpdateServiceResponse2.parseAsync(data); }, - url: "/modules/fulfillment-base/service/{pk}", + url: "/crm/v1/fulfillment-base/service/{pk}", ...options, headers: { "Content-Type": "application/json", @@ -1879,7 +1656,7 @@ export const getServiceCategories = ( responseValidator: async data => { return await zGetServiceCategoriesResponse2.parseAsync(data); }, - url: "/modules/fulfillment-base/service-category/", + url: "/crm/v1/fulfillment-base/service-category/", ...options, }); }; @@ -1902,7 +1679,7 @@ export const createServiceCategory = ( responseValidator: async data => { return await zCreateServiceCategoryResponse2.parseAsync(data); }, - url: "/modules/fulfillment-base/service-category/", + url: "/crm/v1/fulfillment-base/service-category/", ...options, headers: { "Content-Type": "application/json", @@ -1929,7 +1706,7 @@ export const deleteServiceCategory = ( responseValidator: async data => { return await zDeleteServiceCategoryResponse2.parseAsync(data); }, - url: "/modules/fulfillment-base/service-category/{pk}", + url: "/crm/v1/fulfillment-base/service-category/{pk}", ...options, }); }; @@ -1952,7 +1729,7 @@ export const updateServiceCategory = ( responseValidator: async data => { return await zUpdateServiceCategoryResponse2.parseAsync(data); }, - url: "/modules/fulfillment-base/service-category/{pk}", + url: "/crm/v1/fulfillment-base/service-category/{pk}", ...options, headers: { "Content-Type": "application/json", @@ -1979,7 +1756,7 @@ export const getServicesKits = ( responseValidator: async data => { return await zGetServicesKitsResponse.parseAsync(data); }, - url: "/modules/fulfillment-base/services-kit/", + url: "/crm/v1/fulfillment-base/services-kit/", ...options, }); }; @@ -2002,7 +1779,7 @@ export const createServicesKit = ( responseValidator: async data => { return await zCreateServicesKitResponse2.parseAsync(data); }, - url: "/modules/fulfillment-base/services-kit/", + url: "/crm/v1/fulfillment-base/services-kit/", ...options, headers: { "Content-Type": "application/json", @@ -2029,7 +1806,7 @@ export const deleteServicesKit = ( responseValidator: async data => { return await zDeleteServicesKitResponse2.parseAsync(data); }, - url: "/modules/fulfillment-base/services-kit/{pk}", + url: "/crm/v1/fulfillment-base/services-kit/{pk}", ...options, }); }; @@ -2052,7 +1829,7 @@ export const updateServicesKit = ( responseValidator: async data => { return await zUpdateServicesKitResponse2.parseAsync(data); }, - url: "/modules/fulfillment-base/services-kit/{pk}", + url: "/crm/v1/fulfillment-base/services-kit/{pk}", ...options, headers: { "Content-Type": "application/json", @@ -2060,3 +1837,226 @@ export const updateServicesKit = ( }, }); }; + +/** + * Get Projects + */ +export const getProjects = ( + options?: Options +) => { + return (options?.client ?? _heyApiClient).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 = ( + options: Options +) => { + return (options.client ?? _heyApiClient).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 = ( + options: Options +) => { + return (options.client ?? _heyApiClient).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 = ( + options: Options +) => { + return (options.client ?? _heyApiClient).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 = ( + options: Options +) => { + return (options.client ?? _heyApiClient).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 = ( + options: Options +) => { + return (options.client ?? _heyApiClient).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 = ( + options: Options +) => { + return (options.client ?? _heyApiClient).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 = ( + options: Options +) => { + return (options.client ?? _heyApiClient).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 = ( + options: Options +) => { + return (options.client ?? _heyApiClient).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, + }); +}; diff --git a/src/lib/client/types.gen.ts b/src/lib/client/types.gen.ts index 3d835de..2a28384 100644 --- a/src/lib/client/types.gen.ts +++ b/src/lib/client/types.gen.ts @@ -2312,7 +2312,7 @@ export type GetBoardsData = { projectId: number; }; query?: never; - url: "/board/{projectId}"; + url: "/crm/v1/board/{projectId}"; }; export type GetBoardsErrors = { @@ -2337,7 +2337,7 @@ export type CreateBoardData = { body: CreateBoardRequest; path?: never; query?: never; - url: "/board/"; + url: "/crm/v1/board/"; }; export type CreateBoardErrors = { @@ -2368,7 +2368,7 @@ export type DeleteBoardData = { pk: number; }; query?: never; - url: "/board/{pk}"; + url: "/crm/v1/board/{pk}"; }; export type DeleteBoardErrors = { @@ -2399,7 +2399,7 @@ export type UpdateBoardData = { pk: number; }; query?: never; - url: "/board/{pk}"; + url: "/crm/v1/board/{pk}"; }; export type UpdateBoardErrors = { @@ -2462,7 +2462,7 @@ export type GetDealsData = { */ sortingDirection?: SortDir | null; }; - url: "/deal/"; + url: "/crm/v1/deal/"; }; export type GetDealsErrors = { @@ -2487,7 +2487,7 @@ export type CreateDealData = { body: CreateDealRequest; path?: never; query?: never; - url: "/deal/"; + url: "/crm/v1/deal/"; }; export type CreateDealErrors = { @@ -2518,7 +2518,7 @@ export type DeleteDealData = { pk: number; }; query?: never; - url: "/deal/{pk}"; + url: "/crm/v1/deal/{pk}"; }; export type DeleteDealErrors = { @@ -2549,7 +2549,7 @@ export type UpdateDealData = { pk: number; }; query?: never; - url: "/deal/{pk}"; + url: "/crm/v1/deal/{pk}"; }; export type UpdateDealErrors = { @@ -2580,7 +2580,7 @@ export type DeleteDealGroupData = { pk: number; }; query?: never; - url: "/deal-group/{pk}"; + url: "/crm/v1/deal-group/{pk}"; }; export type DeleteDealGroupErrors = { @@ -2612,7 +2612,7 @@ export type UpdateDealGroupData = { pk: number; }; query?: never; - url: "/deal-group/{pk}"; + url: "/crm/v1/deal-group/{pk}"; }; export type UpdateDealGroupErrors = { @@ -2639,7 +2639,7 @@ export type CreateDealGroupData = { body: CreateDealGroupRequest; path?: never; query?: never; - url: "/deal-group/"; + url: "/crm/v1/deal-group/"; }; export type CreateDealGroupErrors = { @@ -2671,7 +2671,7 @@ export type UpdateDealsInGroupData = { pk: number; }; query?: never; - url: "/deal-group/{pk}/deals"; + url: "/crm/v1/deal-group/{pk}/deals"; }; export type UpdateDealsInGroupErrors = { @@ -2698,7 +2698,7 @@ export type GetBuiltInModulesData = { body?: never; path?: never; query?: never; - url: "/module/built-in/"; + url: "/crm/v1/module/built-in/"; }; export type GetBuiltInModulesResponses = { @@ -2711,262 +2711,6 @@ export type GetBuiltInModulesResponses = { export type GetBuiltInModulesResponse = GetBuiltInModulesResponses[keyof GetBuiltInModulesResponses]; -export type GetProjectsData = { - body?: never; - path?: never; - query?: never; - url: "/project/"; -}; - -export type GetProjectsResponses = { - /** - * Successful Response - */ - 200: GetProjectsResponse; -}; - -export type GetProjectsResponse2 = - GetProjectsResponses[keyof GetProjectsResponses]; - -export type CreateProjectData = { - body: CreateProjectRequest; - path?: never; - query?: never; - url: "/project/"; -}; - -export type CreateProjectErrors = { - /** - * Validation Error - */ - 422: HttpValidationError; -}; - -export type CreateProjectError = CreateProjectErrors[keyof CreateProjectErrors]; - -export type CreateProjectResponses = { - /** - * Successful Response - */ - 200: CreateProjectResponse; -}; - -export type CreateProjectResponse2 = - CreateProjectResponses[keyof CreateProjectResponses]; - -export type DeleteProjectData = { - body?: never; - path: { - /** - * Pk - */ - pk: number; - }; - query?: never; - url: "/project/{pk}"; -}; - -export type DeleteProjectErrors = { - /** - * Validation Error - */ - 422: HttpValidationError; -}; - -export type DeleteProjectError = DeleteProjectErrors[keyof DeleteProjectErrors]; - -export type DeleteProjectResponses = { - /** - * Successful Response - */ - 200: DeleteProjectResponse; -}; - -export type DeleteProjectResponse2 = - DeleteProjectResponses[keyof DeleteProjectResponses]; - -export type UpdateProjectData = { - body: UpdateProjectRequest; - path: { - /** - * Pk - */ - pk: number; - }; - query?: never; - url: "/project/{pk}"; -}; - -export type UpdateProjectErrors = { - /** - * Validation Error - */ - 422: HttpValidationError; -}; - -export type UpdateProjectError = UpdateProjectErrors[keyof UpdateProjectErrors]; - -export type UpdateProjectResponses = { - /** - * Successful Response - */ - 200: UpdateProjectResponse; -}; - -export type UpdateProjectResponse2 = - UpdateProjectResponses[keyof UpdateProjectResponses]; - -export type GetStatusesData = { - body?: never; - path: { - /** - * Boardid - */ - boardId: number; - }; - query?: never; - url: "/status/{boardId}"; -}; - -export type GetStatusesErrors = { - /** - * Validation Error - */ - 422: HttpValidationError; -}; - -export type GetStatusesError = GetStatusesErrors[keyof GetStatusesErrors]; - -export type GetStatusesResponses = { - /** - * Successful Response - */ - 200: GetStatusesResponse; -}; - -export type GetStatusesResponse2 = - GetStatusesResponses[keyof GetStatusesResponses]; - -export type CreateStatusData = { - body: CreateStatusRequest; - path?: never; - query?: never; - url: "/status/"; -}; - -export type CreateStatusErrors = { - /** - * Validation Error - */ - 422: HttpValidationError; -}; - -export type CreateStatusError = CreateStatusErrors[keyof CreateStatusErrors]; - -export type CreateStatusResponses = { - /** - * Successful Response - */ - 200: CreateStatusResponse; -}; - -export type CreateStatusResponse2 = - CreateStatusResponses[keyof CreateStatusResponses]; - -export type DeleteStatusData = { - body?: never; - path: { - /** - * Pk - */ - pk: number; - }; - query?: never; - url: "/status/{pk}"; -}; - -export type DeleteStatusErrors = { - /** - * Validation Error - */ - 422: HttpValidationError; -}; - -export type DeleteStatusError = DeleteStatusErrors[keyof DeleteStatusErrors]; - -export type DeleteStatusResponses = { - /** - * Successful Response - */ - 200: DeleteStatusResponse; -}; - -export type DeleteStatusResponse2 = - DeleteStatusResponses[keyof DeleteStatusResponses]; - -export type UpdateStatusData = { - body: UpdateStatusRequest; - path: { - /** - * Pk - */ - pk: number; - }; - query?: never; - url: "/status/{pk}"; -}; - -export type UpdateStatusErrors = { - /** - * Validation Error - */ - 422: HttpValidationError; -}; - -export type UpdateStatusError = UpdateStatusErrors[keyof UpdateStatusErrors]; - -export type UpdateStatusResponses = { - /** - * Successful Response - */ - 200: UpdateStatusResponse; -}; - -export type UpdateStatusResponse2 = - UpdateStatusResponses[keyof UpdateStatusResponses]; - -export type GetStatusHistoryData = { - body?: never; - path: { - /** - * Dealid - */ - dealId: number; - }; - query?: never; - url: "/status/history/{dealId}"; -}; - -export type GetStatusHistoryErrors = { - /** - * Validation Error - */ - 422: HttpValidationError; -}; - -export type GetStatusHistoryError = - GetStatusHistoryErrors[keyof GetStatusHistoryErrors]; - -export type GetStatusHistoryResponses = { - /** - * Successful Response - */ - 200: GetStatusHistoryResponse; -}; - -export type GetStatusHistoryResponse2 = - GetStatusHistoryResponses[keyof GetStatusHistoryResponses]; - export type GetClientsData = { body?: never; path?: never; @@ -2976,7 +2720,7 @@ export type GetClientsData = { */ includeDeleted?: boolean; }; - url: "/modules/clients/client/"; + url: "/crm/v1/clients/client/"; }; export type GetClientsErrors = { @@ -3002,7 +2746,7 @@ export type CreateClientData = { body: CreateClientRequest; path?: never; query?: never; - url: "/modules/clients/client/"; + url: "/crm/v1/clients/client/"; }; export type CreateClientErrors = { @@ -3033,7 +2777,7 @@ export type DeleteClientData = { pk: number; }; query?: never; - url: "/modules/clients/client/{pk}"; + url: "/crm/v1/clients/client/{pk}"; }; export type DeleteClientErrors = { @@ -3064,7 +2808,7 @@ export type UpdateClientData = { pk: number; }; query?: never; - url: "/modules/clients/client/{pk}"; + url: "/crm/v1/clients/client/{pk}"; }; export type UpdateClientErrors = { @@ -3090,7 +2834,7 @@ export type GetBarcodeTemplatesData = { body?: never; path?: never; query?: never; - url: "/modules/fulfillment-base/barcode-template/"; + url: "/crm/v1/fulfillment-base/barcode-template/"; }; export type GetBarcodeTemplatesResponses = { @@ -3107,7 +2851,7 @@ export type CreateBarcodeTemplateData = { body: CreateBarcodeTemplateRequest; path?: never; query?: never; - url: "/modules/fulfillment-base/barcode-template/"; + url: "/crm/v1/fulfillment-base/barcode-template/"; }; export type CreateBarcodeTemplateErrors = { @@ -3139,7 +2883,7 @@ export type DeleteBarcodeTemplateData = { pk: number; }; query?: never; - url: "/modules/fulfillment-base/barcode-template/{pk}"; + url: "/crm/v1/fulfillment-base/barcode-template/{pk}"; }; export type DeleteBarcodeTemplateErrors = { @@ -3171,7 +2915,7 @@ export type UpdateBarcodeTemplateData = { pk: number; }; query?: never; - url: "/modules/fulfillment-base/barcode-template/{pk}"; + url: "/crm/v1/fulfillment-base/barcode-template/{pk}"; }; export type UpdateBarcodeTemplateErrors = { @@ -3198,7 +2942,7 @@ export type GetBarcodeTemplateAttributesData = { body?: never; path?: never; query?: never; - url: "/modules/fulfillment-base/barcode-template/attributes"; + url: "/crm/v1/fulfillment-base/barcode-template/attributes"; }; export type GetBarcodeTemplateAttributesResponses = { @@ -3215,7 +2959,7 @@ export type GetBarcodeTemplateSizesData = { body?: never; path?: never; query?: never; - url: "/modules/fulfillment-base/barcode-template/sizes"; + url: "/crm/v1/fulfillment-base/barcode-template/sizes"; }; export type GetBarcodeTemplateSizesResponses = { @@ -3237,7 +2981,7 @@ export type GetDealProductsData = { dealId: number; }; query?: never; - url: "/modules/fulfillment-base/deal-product/{dealId}"; + url: "/crm/v1/fulfillment-base/deal-product/{dealId}"; }; export type GetDealProductsErrors = { @@ -3264,7 +3008,7 @@ export type CreateDealProductData = { body: CreateDealProductRequest; path?: never; query?: never; - url: "/modules/fulfillment-base/deal-product/"; + url: "/crm/v1/fulfillment-base/deal-product/"; }; export type CreateDealProductErrors = { @@ -3300,7 +3044,7 @@ export type DeleteDealProductData = { productId: number; }; query?: never; - url: "/modules/fulfillment-base/deal-product/{dealId}/product/{productId}"; + url: "/crm/v1/fulfillment-base/deal-product/{dealId}/product/{productId}"; }; export type DeleteDealProductErrors = { @@ -3336,7 +3080,7 @@ export type UpdateDealProductData = { productId: number; }; query?: never; - url: "/modules/fulfillment-base/deal-product/{dealId}/product/{productId}"; + url: "/crm/v1/fulfillment-base/deal-product/{dealId}/product/{productId}"; }; export type UpdateDealProductErrors = { @@ -3363,7 +3107,7 @@ export type CreateDealProductServiceData = { body: CreateProductServiceRequest; path?: never; query?: never; - url: "/modules/fulfillment-base/deal-product/service"; + url: "/crm/v1/fulfillment-base/deal-product/service"; }; export type CreateDealProductServiceErrors = { @@ -3403,7 +3147,7 @@ export type DeleteDealProductServiceData = { serviceId: number; }; query?: never; - url: "/modules/fulfillment-base/deal-product/{dealId}/product/{productId}/service/{serviceId}"; + url: "/crm/v1/fulfillment-base/deal-product/{dealId}/product/{productId}/service/{serviceId}"; }; export type DeleteDealProductServiceErrors = { @@ -3443,7 +3187,7 @@ export type UpdateDealProductServiceData = { serviceId: number; }; query?: never; - url: "/modules/fulfillment-base/deal-product/{dealId}/product/{productId}/service/{serviceId}"; + url: "/crm/v1/fulfillment-base/deal-product/{dealId}/product/{productId}/service/{serviceId}"; }; export type UpdateDealProductServiceErrors = { @@ -3470,7 +3214,7 @@ export type DuplicateProductServicesData = { body: ProductServicesDuplicateRequest; path?: never; query?: never; - url: "/modules/fulfillment-base/deal-product/services/duplicate"; + url: "/crm/v1/fulfillment-base/deal-product/services/duplicate"; }; export type DuplicateProductServicesErrors = { @@ -3497,7 +3241,7 @@ export type AddKitToDealProductData = { body: DealProductAddKitRequest; path?: never; query?: never; - url: "/modules/fulfillment-base/deal-product/add-services-kit"; + url: "/crm/v1/fulfillment-base/deal-product/add-services-kit"; }; export type AddKitToDealProductErrors = { @@ -3529,7 +3273,7 @@ export type GetDealServicesData = { dealId: number; }; query?: never; - url: "/modules/fulfillment-base/deal-service/{dealId}"; + url: "/crm/v1/fulfillment-base/deal-service/{dealId}"; }; export type GetDealServicesErrors = { @@ -3556,7 +3300,7 @@ export type CreateDealServiceData = { body: CreateDealServiceRequest; path?: never; query?: never; - url: "/modules/fulfillment-base/deal-service/"; + url: "/crm/v1/fulfillment-base/deal-service/"; }; export type CreateDealServiceErrors = { @@ -3592,7 +3336,7 @@ export type DeleteDealServiceData = { serviceId: number; }; query?: never; - url: "/modules/fulfillment-base/deal-service/{dealId}/service/{serviceId}"; + url: "/crm/v1/fulfillment-base/deal-service/{dealId}/service/{serviceId}"; }; export type DeleteDealServiceErrors = { @@ -3628,7 +3372,7 @@ export type UpdateDealServiceData = { serviceId: number; }; query?: never; - url: "/modules/fulfillment-base/deal-service/{dealId}/service/{serviceId}"; + url: "/crm/v1/fulfillment-base/deal-service/{dealId}/service/{serviceId}"; }; export type UpdateDealServiceErrors = { @@ -3655,7 +3399,7 @@ export type AddKitToDealData = { body: DealAddKitRequest; path?: never; query?: never; - url: "/modules/fulfillment-base/deal-service/add-services-kit"; + url: "/crm/v1/fulfillment-base/deal-service/add-services-kit"; }; export type AddKitToDealErrors = { @@ -3681,7 +3425,7 @@ export type GetBaseMarketplacesData = { body?: never; path?: never; query?: never; - url: "/modules/fulfillment-base/marketplace/base"; + url: "/crm/v1/fulfillment-base/marketplace/base"; }; export type GetBaseMarketplacesResponses = { @@ -3703,7 +3447,7 @@ export type GetMarketplacesData = { clientId: number; }; query?: never; - url: "/modules/fulfillment-base/marketplace/{clientId}"; + url: "/crm/v1/fulfillment-base/marketplace/{clientId}"; }; export type GetMarketplacesErrors = { @@ -3730,7 +3474,7 @@ export type CreateMarketplaceData = { body: CreateMarketplaceRequest; path?: never; query?: never; - url: "/modules/fulfillment-base/marketplace/"; + url: "/crm/v1/fulfillment-base/marketplace/"; }; export type CreateMarketplaceErrors = { @@ -3762,7 +3506,7 @@ export type DeleteMarketplaceData = { pk: number; }; query?: never; - url: "/modules/fulfillment-base/marketplace/{pk}"; + url: "/crm/v1/fulfillment-base/marketplace/{pk}"; }; export type DeleteMarketplaceErrors = { @@ -3794,7 +3538,7 @@ export type UpdateMarketplaceData = { pk: number; }; query?: never; - url: "/modules/fulfillment-base/marketplace/{pk}"; + url: "/crm/v1/fulfillment-base/marketplace/{pk}"; }; export type UpdateMarketplaceErrors = { @@ -3838,7 +3582,7 @@ export type GetProductsData = { */ itemsPerPage?: number | null; }; - url: "/modules/fulfillment-base/product/"; + url: "/crm/v1/fulfillment-base/product/"; }; export type GetProductsErrors = { @@ -3864,7 +3608,7 @@ export type CreateProductData = { body: CreateProductRequest; path?: never; query?: never; - url: "/modules/fulfillment-base/product/"; + url: "/crm/v1/fulfillment-base/product/"; }; export type CreateProductErrors = { @@ -3895,7 +3639,7 @@ export type DeleteProductData = { pk: number; }; query?: never; - url: "/modules/fulfillment-base/product/{pk}"; + url: "/crm/v1/fulfillment-base/product/{pk}"; }; export type DeleteProductErrors = { @@ -3926,7 +3670,7 @@ export type UpdateProductData = { pk: number; }; query?: never; - url: "/modules/fulfillment-base/product/{pk}"; + url: "/crm/v1/fulfillment-base/product/{pk}"; }; export type UpdateProductErrors = { @@ -3952,7 +3696,7 @@ export type GetProductBarcodePdfData = { body: GetProductBarcodePdfRequest; path?: never; query?: never; - url: "/modules/fulfillment-base/product/barcode/get-pdf"; + url: "/crm/v1/fulfillment-base/product/barcode/get-pdf"; }; export type GetProductBarcodePdfErrors = { @@ -3979,7 +3723,7 @@ export type GetServicesData = { body?: never; path?: never; query?: never; - url: "/modules/fulfillment-base/service/"; + url: "/crm/v1/fulfillment-base/service/"; }; export type GetServicesResponses = { @@ -3996,7 +3740,7 @@ export type CreateServiceData = { body: CreateServiceRequest; path?: never; query?: never; - url: "/modules/fulfillment-base/service/"; + url: "/crm/v1/fulfillment-base/service/"; }; export type CreateServiceErrors = { @@ -4027,7 +3771,7 @@ export type DeleteServiceData = { pk: number; }; query?: never; - url: "/modules/fulfillment-base/service/{pk}"; + url: "/crm/v1/fulfillment-base/service/{pk}"; }; export type DeleteServiceErrors = { @@ -4058,7 +3802,7 @@ export type UpdateServiceData = { pk: number; }; query?: never; - url: "/modules/fulfillment-base/service/{pk}"; + url: "/crm/v1/fulfillment-base/service/{pk}"; }; export type UpdateServiceErrors = { @@ -4084,7 +3828,7 @@ export type GetServiceCategoriesData = { body?: never; path?: never; query?: never; - url: "/modules/fulfillment-base/service-category/"; + url: "/crm/v1/fulfillment-base/service-category/"; }; export type GetServiceCategoriesResponses = { @@ -4101,7 +3845,7 @@ export type CreateServiceCategoryData = { body: CreateServiceCategoryRequest; path?: never; query?: never; - url: "/modules/fulfillment-base/service-category/"; + url: "/crm/v1/fulfillment-base/service-category/"; }; export type CreateServiceCategoryErrors = { @@ -4133,7 +3877,7 @@ export type DeleteServiceCategoryData = { pk: number; }; query?: never; - url: "/modules/fulfillment-base/service-category/{pk}"; + url: "/crm/v1/fulfillment-base/service-category/{pk}"; }; export type DeleteServiceCategoryErrors = { @@ -4165,7 +3909,7 @@ export type UpdateServiceCategoryData = { pk: number; }; query?: never; - url: "/modules/fulfillment-base/service-category/{pk}"; + url: "/crm/v1/fulfillment-base/service-category/{pk}"; }; export type UpdateServiceCategoryErrors = { @@ -4192,7 +3936,7 @@ export type GetServicesKitsData = { body?: never; path?: never; query?: never; - url: "/modules/fulfillment-base/services-kit/"; + url: "/crm/v1/fulfillment-base/services-kit/"; }; export type GetServicesKitsResponses = { @@ -4209,7 +3953,7 @@ export type CreateServicesKitData = { body: CreateServicesKitRequest; path?: never; query?: never; - url: "/modules/fulfillment-base/services-kit/"; + url: "/crm/v1/fulfillment-base/services-kit/"; }; export type CreateServicesKitErrors = { @@ -4241,7 +3985,7 @@ export type DeleteServicesKitData = { pk: number; }; query?: never; - url: "/modules/fulfillment-base/services-kit/{pk}"; + url: "/crm/v1/fulfillment-base/services-kit/{pk}"; }; export type DeleteServicesKitErrors = { @@ -4273,7 +4017,7 @@ export type UpdateServicesKitData = { pk: number; }; query?: never; - url: "/modules/fulfillment-base/services-kit/{pk}"; + url: "/crm/v1/fulfillment-base/services-kit/{pk}"; }; export type UpdateServicesKitErrors = { @@ -4296,6 +4040,262 @@ export type UpdateServicesKitResponses = { export type UpdateServicesKitResponse2 = UpdateServicesKitResponses[keyof UpdateServicesKitResponses]; +export type GetProjectsData = { + body?: never; + path?: never; + query?: never; + url: "/crm/v1/project/"; +}; + +export type GetProjectsResponses = { + /** + * Successful Response + */ + 200: GetProjectsResponse; +}; + +export type GetProjectsResponse2 = + GetProjectsResponses[keyof GetProjectsResponses]; + +export type CreateProjectData = { + body: CreateProjectRequest; + path?: never; + query?: never; + url: "/crm/v1/project/"; +}; + +export type CreateProjectErrors = { + /** + * Validation Error + */ + 422: HttpValidationError; +}; + +export type CreateProjectError = CreateProjectErrors[keyof CreateProjectErrors]; + +export type CreateProjectResponses = { + /** + * Successful Response + */ + 200: CreateProjectResponse; +}; + +export type CreateProjectResponse2 = + CreateProjectResponses[keyof CreateProjectResponses]; + +export type DeleteProjectData = { + body?: never; + path: { + /** + * Pk + */ + pk: number; + }; + query?: never; + url: "/crm/v1/project/{pk}"; +}; + +export type DeleteProjectErrors = { + /** + * Validation Error + */ + 422: HttpValidationError; +}; + +export type DeleteProjectError = DeleteProjectErrors[keyof DeleteProjectErrors]; + +export type DeleteProjectResponses = { + /** + * Successful Response + */ + 200: DeleteProjectResponse; +}; + +export type DeleteProjectResponse2 = + DeleteProjectResponses[keyof DeleteProjectResponses]; + +export type UpdateProjectData = { + body: UpdateProjectRequest; + path: { + /** + * Pk + */ + pk: number; + }; + query?: never; + url: "/crm/v1/project/{pk}"; +}; + +export type UpdateProjectErrors = { + /** + * Validation Error + */ + 422: HttpValidationError; +}; + +export type UpdateProjectError = UpdateProjectErrors[keyof UpdateProjectErrors]; + +export type UpdateProjectResponses = { + /** + * Successful Response + */ + 200: UpdateProjectResponse; +}; + +export type UpdateProjectResponse2 = + UpdateProjectResponses[keyof UpdateProjectResponses]; + +export type GetStatusesData = { + body?: never; + path: { + /** + * Boardid + */ + boardId: number; + }; + query?: never; + url: "/crm/v1/status/{boardId}"; +}; + +export type GetStatusesErrors = { + /** + * Validation Error + */ + 422: HttpValidationError; +}; + +export type GetStatusesError = GetStatusesErrors[keyof GetStatusesErrors]; + +export type GetStatusesResponses = { + /** + * Successful Response + */ + 200: GetStatusesResponse; +}; + +export type GetStatusesResponse2 = + GetStatusesResponses[keyof GetStatusesResponses]; + +export type CreateStatusData = { + body: CreateStatusRequest; + path?: never; + query?: never; + url: "/crm/v1/status/"; +}; + +export type CreateStatusErrors = { + /** + * Validation Error + */ + 422: HttpValidationError; +}; + +export type CreateStatusError = CreateStatusErrors[keyof CreateStatusErrors]; + +export type CreateStatusResponses = { + /** + * Successful Response + */ + 200: CreateStatusResponse; +}; + +export type CreateStatusResponse2 = + CreateStatusResponses[keyof CreateStatusResponses]; + +export type DeleteStatusData = { + body?: never; + path: { + /** + * Pk + */ + pk: number; + }; + query?: never; + url: "/crm/v1/status/{pk}"; +}; + +export type DeleteStatusErrors = { + /** + * Validation Error + */ + 422: HttpValidationError; +}; + +export type DeleteStatusError = DeleteStatusErrors[keyof DeleteStatusErrors]; + +export type DeleteStatusResponses = { + /** + * Successful Response + */ + 200: DeleteStatusResponse; +}; + +export type DeleteStatusResponse2 = + DeleteStatusResponses[keyof DeleteStatusResponses]; + +export type UpdateStatusData = { + body: UpdateStatusRequest; + path: { + /** + * Pk + */ + pk: number; + }; + query?: never; + url: "/crm/v1/status/{pk}"; +}; + +export type UpdateStatusErrors = { + /** + * Validation Error + */ + 422: HttpValidationError; +}; + +export type UpdateStatusError = UpdateStatusErrors[keyof UpdateStatusErrors]; + +export type UpdateStatusResponses = { + /** + * Successful Response + */ + 200: UpdateStatusResponse; +}; + +export type UpdateStatusResponse2 = + UpdateStatusResponses[keyof UpdateStatusResponses]; + +export type GetStatusHistoryData = { + body?: never; + path: { + /** + * Dealid + */ + dealId: number; + }; + query?: never; + url: "/crm/v1/status/history/{dealId}"; +}; + +export type GetStatusHistoryErrors = { + /** + * Validation Error + */ + 422: HttpValidationError; +}; + +export type GetStatusHistoryError = + GetStatusHistoryErrors[keyof GetStatusHistoryErrors]; + +export type GetStatusHistoryResponses = { + /** + * Successful Response + */ + 200: GetStatusHistoryResponse; +}; + +export type GetStatusHistoryResponse2 = + GetStatusHistoryResponses[keyof GetStatusHistoryResponses]; + export type ClientOptions = { baseURL: `${string}://${string}/api` | (string & {}); }; diff --git a/src/lib/client/zod.gen.ts b/src/lib/client/zod.gen.ts index 2ff531a..1d3233e 100644 --- a/src/lib/client/zod.gen.ts +++ b/src/lib/client/zod.gen.ts @@ -1542,117 +1542,6 @@ export const zGetBuiltInModulesData = z.object({ */ export const zGetBuiltInModulesResponse = zGetAllBuiltInModulesResponse; -export const zGetProjectsData = z.object({ - body: z.optional(z.never()), - path: z.optional(z.never()), - query: z.optional(z.never()), -}); - -/** - * Successful Response - */ -export const zGetProjectsResponse2 = zGetProjectsResponse; - -export const zCreateProjectData = z.object({ - body: zCreateProjectRequest, - path: z.optional(z.never()), - query: z.optional(z.never()), -}); - -/** - * Successful Response - */ -export const zCreateProjectResponse2 = zCreateProjectResponse; - -export const zDeleteProjectData = z.object({ - body: z.optional(z.never()), - path: z.object({ - pk: z.int(), - }), - query: z.optional(z.never()), -}); - -/** - * Successful Response - */ -export const zDeleteProjectResponse2 = zDeleteProjectResponse; - -export const zUpdateProjectData = z.object({ - body: zUpdateProjectRequest, - path: z.object({ - pk: z.int(), - }), - query: z.optional(z.never()), -}); - -/** - * Successful Response - */ -export const zUpdateProjectResponse2 = zUpdateProjectResponse; - -export const zGetStatusesData = z.object({ - body: z.optional(z.never()), - path: z.object({ - boardId: z.int(), - }), - query: z.optional(z.never()), -}); - -/** - * Successful Response - */ -export const zGetStatusesResponse2 = zGetStatusesResponse; - -export const zCreateStatusData = z.object({ - body: zCreateStatusRequest, - path: z.optional(z.never()), - query: z.optional(z.never()), -}); - -/** - * Successful Response - */ -export const zCreateStatusResponse2 = zCreateStatusResponse; - -export const zDeleteStatusData = z.object({ - body: z.optional(z.never()), - path: z.object({ - pk: z.int(), - }), - query: z.optional(z.never()), -}); - -/** - * Successful Response - */ -export const zDeleteStatusResponse2 = zDeleteStatusResponse; - -export const zUpdateStatusData = z.object({ - body: zUpdateStatusRequest, - path: z.object({ - pk: z.int(), - }), - query: z.optional(z.never()), -}); - -/** - * Successful Response - */ -export const zUpdateStatusResponse2 = zUpdateStatusResponse; - -export const zGetStatusHistoryData = z.object({ - body: z.optional(z.never()), - path: z.object({ - dealId: z.int(), - }), - query: z.optional(z.never()), -}); - -/** - * Successful Response - */ -export const zGetStatusHistoryResponse2 = zGetStatusHistoryResponse; - export const zGetClientsData = z.object({ body: z.optional(z.never()), path: z.optional(z.never()), @@ -2226,3 +2115,114 @@ export const zUpdateServicesKitData = z.object({ * Successful Response */ export const zUpdateServicesKitResponse2 = zUpdateServicesKitResponse; + +export const zGetProjectsData = z.object({ + body: z.optional(z.never()), + path: z.optional(z.never()), + query: z.optional(z.never()), +}); + +/** + * Successful Response + */ +export const zGetProjectsResponse2 = zGetProjectsResponse; + +export const zCreateProjectData = z.object({ + body: zCreateProjectRequest, + path: z.optional(z.never()), + query: z.optional(z.never()), +}); + +/** + * Successful Response + */ +export const zCreateProjectResponse2 = zCreateProjectResponse; + +export const zDeleteProjectData = z.object({ + body: z.optional(z.never()), + path: z.object({ + pk: z.int(), + }), + query: z.optional(z.never()), +}); + +/** + * Successful Response + */ +export const zDeleteProjectResponse2 = zDeleteProjectResponse; + +export const zUpdateProjectData = z.object({ + body: zUpdateProjectRequest, + path: z.object({ + pk: z.int(), + }), + query: z.optional(z.never()), +}); + +/** + * Successful Response + */ +export const zUpdateProjectResponse2 = zUpdateProjectResponse; + +export const zGetStatusesData = z.object({ + body: z.optional(z.never()), + path: z.object({ + boardId: z.int(), + }), + query: z.optional(z.never()), +}); + +/** + * Successful Response + */ +export const zGetStatusesResponse2 = zGetStatusesResponse; + +export const zCreateStatusData = z.object({ + body: zCreateStatusRequest, + path: z.optional(z.never()), + query: z.optional(z.never()), +}); + +/** + * Successful Response + */ +export const zCreateStatusResponse2 = zCreateStatusResponse; + +export const zDeleteStatusData = z.object({ + body: z.optional(z.never()), + path: z.object({ + pk: z.int(), + }), + query: z.optional(z.never()), +}); + +/** + * Successful Response + */ +export const zDeleteStatusResponse2 = zDeleteStatusResponse; + +export const zUpdateStatusData = z.object({ + body: zUpdateStatusRequest, + path: z.object({ + pk: z.int(), + }), + query: z.optional(z.never()), +}); + +/** + * Successful Response + */ +export const zUpdateStatusResponse2 = zUpdateStatusResponse; + +export const zGetStatusHistoryData = z.object({ + body: z.optional(z.never()), + path: z.object({ + dealId: z.int(), + }), + query: z.optional(z.never()), +}); + +/** + * Successful Response + */ +export const zGetStatusHistoryResponse2 = zGetStatusHistoryResponse;