diff --git a/generateModules.sh b/generateModules.sh new file mode 100755 index 0000000..e2ddcc9 --- /dev/null +++ b/generateModules.sh @@ -0,0 +1,3 @@ +sudo npx tsc ./src/modules/modulesFileGen/modulesFileGen.ts +mv -f ./src/modules/modulesFileGen/modulesFileGen.js ./src/modules/modulesFileGen/modulesFileGen.cjs +sudo node ./src/modules/modulesFileGen/modulesFileGen.cjs diff --git a/package.json b/package.json index d481a7b..e94ae5b 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "@mantine/modals": "^7.11.2", "@mantine/notifications": "^7.11.2", "@reduxjs/toolkit": "^2.2.6", - "@tabler/icons-react": "^3.11.0", + "@tabler/icons-react": "3.11.0", "@tanstack/react-query": "^5.51.9", "@tanstack/react-router": "^1.45.6", "@tanstack/router-devtools": "^1.45.6", @@ -62,6 +62,7 @@ "@types/eslint__js": "^8.42.3", "@types/file-saver": "^2.0.7", "@types/lodash": "^4.17.7", + "@types/node": "^22.13.9", "@types/react": "^18.3.3", "@types/react-dom": "^18.3.0", "@typescript-eslint/eslint-plugin": "^7.16.1", @@ -74,10 +75,10 @@ "postcss": "^8.4.39", "postcss-preset-mantine": "^1.16.0", "postcss-simple-vars": "^7.0.1", - "sass": "^1.77.8", + "sass": "^1.81.1", "typescript": "^5.5.3", "typescript-eslint": "^7.16.1", - "vite": "^5.3.4", + "vite": "^6.0.1", "yarn-upgrade-all": "^0.7.2" }, "packageManager": "yarn@4.1.0" diff --git a/src/client/index.ts b/src/client/index.ts index eeddee6..9d70c32 100644 --- a/src/client/index.ts +++ b/src/client/index.ts @@ -9,6 +9,8 @@ export type { OpenAPIConfig } from './core/OpenAPI'; export type { AddUserRequest } from './models/AddUserRequest'; export type { AddUserResponse } from './models/AddUserResponse'; +export type { AttributeSchema } from './models/AttributeSchema'; +export type { AttributeTypeSchema } from './models/AttributeTypeSchema'; export type { AuthLoginRequest } from './models/AuthLoginRequest'; export type { AuthLoginResponse } from './models/AuthLoginResponse'; export type { BarcodeAttributeSchema } from './models/BarcodeAttributeSchema'; @@ -23,7 +25,9 @@ export type { BarcodeTemplateSchema } from './models/BarcodeTemplateSchema'; export type { BarcodeTemplateSizeSchema } from './models/BarcodeTemplateSizeSchema'; export type { BarcodeTemplateUpdateRequest } from './models/BarcodeTemplateUpdateRequest'; export type { BarcodeTemplateUpdateResponse } from './models/BarcodeTemplateUpdateResponse'; +export type { BaseAttributeSchema } from './models/BaseAttributeSchema'; export type { BaseBoardSchema } from './models/BaseBoardSchema'; +export type { BaseCardTagSchema } from './models/BaseCardTagSchema'; export type { BaseEnumListSchema } from './models/BaseEnumListSchema'; export type { BaseEnumSchema } from './models/BaseEnumSchema'; export type { BaseMarketplaceSchema } from './models/BaseMarketplaceSchema'; @@ -39,8 +43,76 @@ export type { Body_upload_passport_image } from './models/Body_upload_passport_i export type { Body_upload_product_barcode_image } from './models/Body_upload_product_barcode_image'; export type { Body_upload_product_image } from './models/Body_upload_product_image'; export type { BoxSchema } from './models/BoxSchema'; -export type { CancelDealBillRequest } from './models/CancelDealBillRequest'; -export type { CancelDealBillResponse } from './models/CancelDealBillResponse'; +export type { CancelCardBillRequest } from './models/CancelCardBillRequest'; +export type { CancelCardBillResponse } from './models/CancelCardBillResponse'; +export type { CardAddKitRequest } from './models/CardAddKitRequest'; +export type { CardAddKitResponse } from './models/CardAddKitResponse'; +export type { CardAddProductRequest } from './models/CardAddProductRequest'; +export type { CardAddProductResponse } from './models/CardAddProductResponse'; +export type { CardAddServiceRequest } from './models/CardAddServiceRequest'; +export type { CardAddServiceResponse } from './models/CardAddServiceResponse'; +export type { CardAddServicesRequest } from './models/CardAddServicesRequest'; +export type { CardAddServicesResponse } from './models/CardAddServicesResponse'; +export type { CardAddToGroupRequest } from './models/CardAddToGroupRequest'; +export type { CardAddToGroupResponse } from './models/CardAddToGroupResponse'; +export type { CardAttributeSchema } from './models/CardAttributeSchema'; +export type { CardBillRequestSchema } from './models/CardBillRequestSchema'; +export type { CardChangeStatusRequest } from './models/CardChangeStatusRequest'; +export type { CardChangeStatusResponse } from './models/CardChangeStatusResponse'; +export type { CardCompleteRequest } from './models/CardCompleteRequest'; +export type { CardCompleteResponse } from './models/CardCompleteResponse'; +export type { CardCreateGroupResponse } from './models/CardCreateGroupResponse'; +export type { CardCreateGuestUrlRequest } from './models/CardCreateGuestUrlRequest'; +export type { CardCreateGuestUrlResponse } from './models/CardCreateGuestUrlResponse'; +export type { CardDeleteProductRequest } from './models/CardDeleteProductRequest'; +export type { CardDeleteProductResponse } from './models/CardDeleteProductResponse'; +export type { CardDeleteProductsRequest } from './models/CardDeleteProductsRequest'; +export type { CardDeleteProductsResponse } from './models/CardDeleteProductsResponse'; +export type { CardDeleteRequest } from './models/CardDeleteRequest'; +export type { CardDeleteResponse } from './models/CardDeleteResponse'; +export type { CardDeleteServiceRequest } from './models/CardDeleteServiceRequest'; +export type { CardDeleteServiceResponse } from './models/CardDeleteServiceResponse'; +export type { CardDeleteServicesRequest } from './models/CardDeleteServicesRequest'; +export type { CardDeleteServicesResponse } from './models/CardDeleteServicesResponse'; +export type { CardEmployeesSchema } from './models/CardEmployeesSchema'; +export type { CardGeneralInfoSchema } from './models/CardGeneralInfoSchema'; +export type { CardGetAllResponse } from './models/CardGetAllResponse'; +export type { CardGroupChangeStatusRequest } from './models/CardGroupChangeStatusRequest'; +export type { CardGroupChangeStatusResponse } from './models/CardGroupChangeStatusResponse'; +export type { CardGroupSchema } from './models/CardGroupSchema'; +export type { CardGroupUpdateRequest } from './models/CardGroupUpdateRequest'; +export type { CardGroupUpdateResponse } from './models/CardGroupUpdateResponse'; +export type { CardPrefillRequest } from './models/CardPrefillRequest'; +export type { CardPrefillResponse } from './models/CardPrefillResponse'; +export type { CardProductAddKitRequest } from './models/CardProductAddKitRequest'; +export type { CardProductAddKitResponse } from './models/CardProductAddKitResponse'; +export type { CardProductSchema } from './models/CardProductSchema'; +export type { CardProductServiceSchema } from './models/CardProductServiceSchema'; +export type { CardQuickCreateRequest } from './models/CardQuickCreateRequest'; +export type { CardQuickCreateResponse } from './models/CardQuickCreateResponse'; +export type { CardRecalculatePriceRequest } from './models/CardRecalculatePriceRequest'; +export type { CardRecalculatePriceResponse } from './models/CardRecalculatePriceResponse'; +export type { CardRemoveFromGroupRequest } from './models/CardRemoveFromGroupRequest'; +export type { CardRemoveFromGroupResponse } from './models/CardRemoveFromGroupResponse'; +export type { CardSchema } from './models/CardSchema'; +export type { CardServiceSchema } from './models/CardServiceSchema'; +export type { CardServicesCopyRequest } from './models/CardServicesCopyRequest'; +export type { CardServicesCopyResponse } from './models/CardServicesCopyResponse'; +export type { CardStatusHistorySchema } from './models/CardStatusHistorySchema'; +export type { CardSummary } from './models/CardSummary'; +export type { CardSummaryReorderRequest } from './models/CardSummaryReorderRequest'; +export type { CardSummaryResponse } from './models/CardSummaryResponse'; +export type { CardTagSchema } from './models/CardTagSchema'; +export type { CardUpdateGeneralInfoRequest } from './models/CardUpdateGeneralInfoRequest'; +export type { CardUpdateGeneralInfoResponse } from './models/CardUpdateGeneralInfoResponse'; +export type { CardUpdateProductQuantityRequest } from './models/CardUpdateProductQuantityRequest'; +export type { CardUpdateProductQuantityResponse } from './models/CardUpdateProductQuantityResponse'; +export type { CardUpdateProductRequest } from './models/CardUpdateProductRequest'; +export type { CardUpdateProductResponse } from './models/CardUpdateProductResponse'; +export type { CardUpdateServiceQuantityRequest } from './models/CardUpdateServiceQuantityRequest'; +export type { CardUpdateServiceQuantityResponse } from './models/CardUpdateServiceQuantityResponse'; +export type { CardUpdateServiceRequest } from './models/CardUpdateServiceRequest'; +export type { CardUpdateServiceResponse } from './models/CardUpdateServiceResponse'; export type { CityBreakdownFromExcelSchema } from './models/CityBreakdownFromExcelSchema'; export type { ClientCreateRequest } from './models/ClientCreateRequest'; export type { ClientCreateResponse } from './models/ClientCreateResponse'; @@ -54,16 +126,21 @@ export type { ClientSchema } from './models/ClientSchema'; export type { ClientUpdateDetailsRequest } from './models/ClientUpdateDetailsRequest'; export type { ClientUpdateRequest } from './models/ClientUpdateRequest'; export type { ClientUpdateResponse } from './models/ClientUpdateResponse'; +export type { CreateAttributeRequest } from './models/CreateAttributeRequest'; +export type { CreateAttributeResponse } from './models/CreateAttributeResponse'; export type { CreateBarcodeTemplateAttributeRequest } from './models/CreateBarcodeTemplateAttributeRequest'; export type { CreateBarcodeTemplateAttributeResponse } from './models/CreateBarcodeTemplateAttributeResponse'; export type { CreateBoardRequest } from './models/CreateBoardRequest'; export type { CreateBoardResponse } from './models/CreateBoardResponse'; -export type { CreateBoxInDealSchema } from './models/CreateBoxInDealSchema'; +export type { CreateBoxInCardSchema } from './models/CreateBoxInCardSchema'; export type { CreateBoxInPalletSchema } from './models/CreateBoxInPalletSchema'; -export type { CreateDealBillRequest } from './models/CreateDealBillRequest'; -export type { CreateDealBillResponse } from './models/CreateDealBillResponse'; -export type { CreateDealsFromExcelRequest } from './models/CreateDealsFromExcelRequest'; -export type { CreateDealsFromExcelResponse } from './models/CreateDealsFromExcelResponse'; +export type { CreateBoxRequest } from './models/CreateBoxRequest'; +export type { CreateBoxResponse } from './models/CreateBoxResponse'; +export type { CreateCardBillRequest } from './models/CreateCardBillRequest'; +export type { CreateCardBillResponse } from './models/CreateCardBillResponse'; +export type { CreateCardGroupRequest } from './models/CreateCardGroupRequest'; +export type { CreateCardsFromExcelRequest } from './models/CreateCardsFromExcelRequest'; +export type { CreateCardsFromExcelResponse } from './models/CreateCardsFromExcelResponse'; export type { CreateDepartmentRequest } from './models/CreateDepartmentRequest'; export type { CreateDepartmentResponse } from './models/CreateDepartmentResponse'; export type { CreateDepartmentSectionRequest } from './models/CreateDepartmentSectionRequest'; @@ -94,77 +171,13 @@ export type { CreateShippingWarehouseRequest } from './models/CreateShippingWare export type { CreateShippingWarehouseResponse } from './models/CreateShippingWarehouseResponse'; export type { CreateStatusRequest } from './models/CreateStatusRequest'; export type { CreateStatusResponse } from './models/CreateStatusResponse'; +export type { CreateTagRequest } from './models/CreateTagRequest'; +export type { CreateTagResponse } from './models/CreateTagResponse'; export type { CreateTaskResponse } from './models/CreateTaskResponse'; export type { CreateTransactionTagRequest } from './models/CreateTransactionTagRequest'; export type { CreateUserRequest } from './models/CreateUserRequest'; export type { CreateUserResponse } from './models/CreateUserResponse'; -export type { DealAddKitRequest } from './models/DealAddKitRequest'; -export type { DealAddKitResponse } from './models/DealAddKitResponse'; -export type { DealAddProductRequest } from './models/DealAddProductRequest'; -export type { DealAddProductResponse } from './models/DealAddProductResponse'; -export type { DealAddServiceRequest } from './models/DealAddServiceRequest'; -export type { DealAddServiceResponse } from './models/DealAddServiceResponse'; -export type { DealAddServicesRequest } from './models/DealAddServicesRequest'; -export type { DealAddServicesResponse } from './models/DealAddServicesResponse'; -export type { DealAddToGroupRequest } from './models/DealAddToGroupRequest'; -export type { DealAddToGroupResponse } from './models/DealAddToGroupResponse'; -export type { DealBillRequestSchema } from './models/DealBillRequestSchema'; -export type { DealChangeStatusRequest } from './models/DealChangeStatusRequest'; -export type { DealChangeStatusResponse } from './models/DealChangeStatusResponse'; -export type { DealCompleteRequest } from './models/DealCompleteRequest'; -export type { DealCompleteResponse } from './models/DealCompleteResponse'; -export type { DealCreateGroupRequest } from './models/DealCreateGroupRequest'; -export type { DealCreateGroupResponse } from './models/DealCreateGroupResponse'; -export type { DealCreateGuestUrlRequest } from './models/DealCreateGuestUrlRequest'; -export type { DealCreateGuestUrlResponse } from './models/DealCreateGuestUrlResponse'; -export type { DealDeleteProductRequest } from './models/DealDeleteProductRequest'; -export type { DealDeleteProductResponse } from './models/DealDeleteProductResponse'; -export type { DealDeleteProductsRequest } from './models/DealDeleteProductsRequest'; -export type { DealDeleteProductsResponse } from './models/DealDeleteProductsResponse'; -export type { DealDeleteRequest } from './models/DealDeleteRequest'; -export type { DealDeleteResponse } from './models/DealDeleteResponse'; -export type { DealDeleteServiceRequest } from './models/DealDeleteServiceRequest'; -export type { DealDeleteServiceResponse } from './models/DealDeleteServiceResponse'; -export type { DealDeleteServicesRequest } from './models/DealDeleteServicesRequest'; -export type { DealDeleteServicesResponse } from './models/DealDeleteServicesResponse'; -export type { DealEmployeesSchema } from './models/DealEmployeesSchema'; -export type { DealGeneralInfoSchema } from './models/DealGeneralInfoSchema'; -export type { DealGetAllResponse } from './models/DealGetAllResponse'; -export type { DealGroupChangeStatusRequest } from './models/DealGroupChangeStatusRequest'; -export type { DealGroupChangeStatusResponse } from './models/DealGroupChangeStatusResponse'; -export type { DealGroupSchema } from './models/DealGroupSchema'; -export type { DealGroupUpdateRequest } from './models/DealGroupUpdateRequest'; -export type { DealGroupUpdateResponse } from './models/DealGroupUpdateResponse'; -export type { DealPrefillRequest } from './models/DealPrefillRequest'; -export type { DealPrefillResponse } from './models/DealPrefillResponse'; -export type { DealProductAddKitRequest } from './models/DealProductAddKitRequest'; -export type { DealProductAddKitResponse } from './models/DealProductAddKitResponse'; -export type { DealProductSchema } from './models/DealProductSchema'; -export type { DealProductServiceSchema } from './models/DealProductServiceSchema'; -export type { DealQuickCreateRequest } from './models/DealQuickCreateRequest'; -export type { DealQuickCreateResponse } from './models/DealQuickCreateResponse'; -export type { DealRecalculatePriceRequest } from './models/DealRecalculatePriceRequest'; -export type { DealRecalculatePriceResponse } from './models/DealRecalculatePriceResponse'; -export type { DealRemoveFromGroupRequest } from './models/DealRemoveFromGroupRequest'; -export type { DealRemoveFromGroupResponse } from './models/DealRemoveFromGroupResponse'; -export type { DealSchema } from './models/DealSchema'; -export type { DealServiceSchema } from './models/DealServiceSchema'; -export type { DealServicesCopyRequest } from './models/DealServicesCopyRequest'; -export type { DealServicesCopyResponse } from './models/DealServicesCopyResponse'; -export type { DealStatusHistorySchema } from './models/DealStatusHistorySchema'; -export type { DealSummary } from './models/DealSummary'; -export type { DealSummaryReorderRequest } from './models/DealSummaryReorderRequest'; -export type { DealSummaryResponse } from './models/DealSummaryResponse'; -export type { DealUpdateGeneralInfoRequest } from './models/DealUpdateGeneralInfoRequest'; -export type { DealUpdateGeneralInfoResponse } from './models/DealUpdateGeneralInfoResponse'; -export type { DealUpdateProductQuantityRequest } from './models/DealUpdateProductQuantityRequest'; -export type { DealUpdateProductQuantityResponse } from './models/DealUpdateProductQuantityResponse'; -export type { DealUpdateProductRequest } from './models/DealUpdateProductRequest'; -export type { DealUpdateProductResponse } from './models/DealUpdateProductResponse'; -export type { DealUpdateServiceQuantityRequest } from './models/DealUpdateServiceQuantityRequest'; -export type { DealUpdateServiceQuantityResponse } from './models/DealUpdateServiceQuantityResponse'; -export type { DealUpdateServiceRequest } from './models/DealUpdateServiceRequest'; -export type { DealUpdateServiceResponse } from './models/DealUpdateServiceResponse'; +export type { DeleteAttributeResponse } from './models/DeleteAttributeResponse'; export type { DeleteBoardResponse } from './models/DeleteBoardResponse'; export type { DeleteBoxResponse } from './models/DeleteBoxResponse'; export type { DeleteDepartmentResponse } from './models/DeleteDepartmentResponse'; @@ -187,6 +200,7 @@ export type { DeleteShippingProductResponse } from './models/DeleteShippingProdu export type { DeleteShippingWarehouseRequest } from './models/DeleteShippingWarehouseRequest'; export type { DeleteShippingWarehouseResponse } from './models/DeleteShippingWarehouseResponse'; export type { DeleteStatusResponse } from './models/DeleteStatusResponse'; +export type { DeleteTagResponse } from './models/DeleteTagResponse'; export type { DeleteTransactionResponse } from './models/DeleteTransactionResponse'; export type { DeleteTransactionTagResponse } from './models/DeleteTransactionTagResponse'; export type { DeleteUserRequest } from './models/DeleteUserRequest'; @@ -200,12 +214,12 @@ export type { FinishPauseByShiftIdResponse } from './models/FinishPauseByShiftId export type { FinishPauseByUserIdResponse } from './models/FinishPauseByUserIdResponse'; export type { FinishShiftByIdResponse } from './models/FinishShiftByIdResponse'; export type { FinishShiftResponse } from './models/FinishShiftResponse'; -export type { GenerateInviteCodeRequest } from './models/GenerateInviteCodeRequest'; -export type { GenerateInviteCodeResponse } from './models/GenerateInviteCodeResponse'; +export type { FullProjectSchema } from './models/FullProjectSchema'; export type { GetAllBarcodeTemplateAttributesResponse } from './models/GetAllBarcodeTemplateAttributesResponse'; export type { GetAllBarcodeTemplateSizesResponse } from './models/GetAllBarcodeTemplateSizesResponse'; export type { GetAllBarcodeTemplatesResponse } from './models/GetAllBarcodeTemplatesResponse'; export type { GetAllBaseMarketplacesResponse } from './models/GetAllBaseMarketplacesResponse'; +export type { GetAllModulesResponse } from './models/GetAllModulesResponse'; export type { GetAllPayRatesResponse } from './models/GetAllPayRatesResponse'; export type { GetAllPayrollSchemeResponse } from './models/GetAllPayrollSchemeResponse'; export type { GetAllPositionsResponse } from './models/GetAllPositionsResponse'; @@ -216,16 +230,18 @@ export type { GetAllTransactionsRequest } from './models/GetAllTransactionsReque export type { GetAllTransactionsResponse } from './models/GetAllTransactionsResponse'; export type { GetAllTransactionTagsResponse } from './models/GetAllTransactionTagsResponse'; export type { GetAllUsersResponse } from './models/GetAllUsersResponse'; +export type { GetAttributesResponse } from './models/GetAttributesResponse'; +export type { GetAttributeTypesResponse } from './models/GetAttributeTypesResponse'; export type { GetAvailableEmployeesToAssignResponse } from './models/GetAvailableEmployeesToAssignResponse'; export type { GetAvailableUsersForDepartmentSectionResponse } from './models/GetAvailableUsersForDepartmentSectionResponse'; export type { GetBarcodeTemplateByIdRequest } from './models/GetBarcodeTemplateByIdRequest'; export type { GetBarcodeTemplateByIdResponse } from './models/GetBarcodeTemplateByIdResponse'; export type { GetBoardsResponse } from './models/GetBoardsResponse'; +export type { GetCardBillById } from './models/GetCardBillById'; +export type { GetCardProductsBarcodesPdfRequest } from './models/GetCardProductsBarcodesPdfRequest'; +export type { GetCardProductsBarcodesPdfResponse } from './models/GetCardProductsBarcodesPdfResponse'; export type { GetClientMarketplacesRequest } from './models/GetClientMarketplacesRequest'; export type { GetClientMarketplacesResponse } from './models/GetClientMarketplacesResponse'; -export type { GetDealBillById } from './models/GetDealBillById'; -export type { GetDealProductsBarcodesPdfRequest } from './models/GetDealProductsBarcodesPdfRequest'; -export type { GetDealProductsBarcodesPdfResponse } from './models/GetDealProductsBarcodesPdfResponse'; export type { GetDepartmentSectionsResponse } from './models/GetDepartmentSectionsResponse'; export type { GetDepartmentsResponse } from './models/GetDepartmentsResponse'; export type { GetManagersResponse } from './models/GetManagersResponse'; @@ -256,12 +272,13 @@ export type { ManageEmployeeRequest } from './models/ManageEmployeeRequest'; export type { ManageEmployeeResponse } from './models/ManageEmployeeResponse'; export type { MarketplaceCreateSchema } from './models/MarketplaceCreateSchema'; export type { MarketplaceSchema } from './models/MarketplaceSchema'; +export type { ModuleSchema } from './models/ModuleSchema'; export type { NotificationChannel } from './models/NotificationChannel'; export type { OptionalShippingWarehouseSchema } from './models/OptionalShippingWarehouseSchema'; export type { PaginationInfoSchema } from './models/PaginationInfoSchema'; export type { PalletSchema } from './models/PalletSchema'; +export type { ParseCardsExcelResponse } from './models/ParseCardsExcelResponse'; export type { ParsedCityBreakdownSchema } from './models/ParsedCityBreakdownSchema'; -export type { ParseDealsExcelResponse } from './models/ParseDealsExcelResponse'; export type { ParsedProductRowSchema } from './models/ParsedProductRowSchema'; export type { PassportImageSchema } from './models/PassportImageSchema'; export type { PaymentRecordCreateSchema } from './models/PaymentRecordCreateSchema'; @@ -288,6 +305,9 @@ export type { ProductGenerateBarcodeResponse } from './models/ProductGenerateBar export type { ProductGetBarcodeImageResponse } from './models/ProductGetBarcodeImageResponse'; export type { ProductGetResponse } from './models/ProductGetResponse'; export type { ProductImageSchema } from './models/ProductImageSchema'; +export type { ProductsAndServicesGeneralInfoRequest } from './models/ProductsAndServicesGeneralInfoRequest'; +export type { ProductsAndServicesGeneralInfoResponse } from './models/ProductsAndServicesGeneralInfoResponse'; +export type { ProductsAndServicesGeneralInfoSchema } from './models/ProductsAndServicesGeneralInfoSchema'; export type { ProductSchema } from './models/ProductSchema'; export type { ProductUpdateRequest } from './models/ProductUpdateRequest'; export type { ProductUpdateResponse } from './models/ProductUpdateResponse'; @@ -296,8 +316,8 @@ export type { ProductUploadImageResponse } from './models/ProductUploadImageResp export type { ProfitChartDataItem } from './models/ProfitChartDataItem'; export type { ProfitTableDataItem } from './models/ProfitTableDataItem'; export type { ProfitTableGroupBy } from './models/ProfitTableGroupBy'; +export type { ProjectGeneralInfoSchema } from './models/ProjectGeneralInfoSchema'; export type { ProjectSchema } from './models/ProjectSchema'; -export type { ProjectSchemaWithCount } from './models/ProjectSchemaWithCount'; export type { ReceiptBoxSchema } from './models/ReceiptBoxSchema'; export type { ReceiptPalletSchema } from './models/ReceiptPalletSchema'; export type { ResidualBoxSchema } from './models/ResidualBoxSchema'; @@ -331,25 +351,34 @@ export type { StartPauseByShiftIdResponse } from './models/StartPauseByShiftIdRe export type { StartPauseByUserIdResponse } from './models/StartPauseByUserIdResponse'; export type { StartShiftResponse } from './models/StartShiftResponse'; export type { StatusSchema } from './models/StatusSchema'; +export type { SwitchTagRequest } from './models/SwitchTagRequest'; +export type { SwitchTagResponse } from './models/SwitchTagResponse'; export type { SynchronizeMarketplaceRequest } from './models/SynchronizeMarketplaceRequest'; export type { TaskInfoResponse } from './models/TaskInfoResponse'; export type { TimeTrackingData } from './models/TimeTrackingData'; export type { TimeTrackingRecord } from './models/TimeTrackingRecord'; export type { TransactionSchemaBase } from './models/TransactionSchemaBase'; export type { TransactionTagSchema } from './models/TransactionTagSchema'; +export type { UpdateAttributeRequest } from './models/UpdateAttributeRequest'; +export type { UpdateAttributeResponse } from './models/UpdateAttributeResponse'; +export type { UpdateAttributesRequest } from './models/UpdateAttributesRequest'; +export type { UpdateAttributesResponse } from './models/UpdateAttributesResponse'; export type { UpdateBoardOrderRequest } from './models/UpdateBoardOrderRequest'; export type { UpdateBoardOrderResponse } from './models/UpdateBoardOrderResponse'; export type { UpdateBoardRequest } from './models/UpdateBoardRequest'; export type { UpdateBoardResponse } from './models/UpdateBoardResponse'; -export type { UpdateBoxRequest } from './models/UpdateBoxRequest'; -export type { UpdateBoxResponse } from './models/UpdateBoxResponse'; -export type { UpdateBoxSchema } from './models/UpdateBoxSchema'; +export type { UpdateCardClientRequest } from './models/UpdateCardClientRequest'; +export type { UpdateCardClientResponse } from './models/UpdateCardClientResponse'; +export type { UpdateCardManagerRequest } from './models/UpdateCardManagerRequest'; +export type { UpdateCardManagerResponse } from './models/UpdateCardManagerResponse'; export type { UpdateDepartmentRequest } from './models/UpdateDepartmentRequest'; export type { UpdateDepartmentResponse } from './models/UpdateDepartmentResponse'; export type { UpdateDepartmentSectionRequest } from './models/UpdateDepartmentSectionRequest'; export type { UpdateDepartmentSectionResponse } from './models/UpdateDepartmentSectionResponse'; export type { UpdateMarketplaceRequest } from './models/UpdateMarketplaceRequest'; export type { UpdateMarketplaceResponse } from './models/UpdateMarketplaceResponse'; +export type { UpdateModulesRequest } from './models/UpdateModulesRequest'; +export type { UpdateModulesResponse } from './models/UpdateModulesResponse'; export type { UpdatePayRateRequest } from './models/UpdatePayRateRequest'; export type { UpdatePayRateResponse } from './models/UpdatePayRateResponse'; export type { UpdatePlanningWorkShiftRequest } from './models/UpdatePlanningWorkShiftRequest'; @@ -371,6 +400,8 @@ export type { UpdateStatusOrderRequest } from './models/UpdateStatusOrderRequest export type { UpdateStatusOrderResponse } from './models/UpdateStatusOrderResponse'; export type { UpdateStatusRequest } from './models/UpdateStatusRequest'; export type { UpdateStatusResponse } from './models/UpdateStatusResponse'; +export type { UpdateTagRequest } from './models/UpdateTagRequest'; +export type { UpdateTagResponse } from './models/UpdateTagResponse'; export type { UpdateTimeTrackingRecordRequest } from './models/UpdateTimeTrackingRecordRequest'; export type { UpdateTimeTrackingRecordResponse } from './models/UpdateTimeTrackingRecordResponse'; export type { UpdateTransactionRequest } from './models/UpdateTransactionRequest'; @@ -392,13 +423,15 @@ export type { ValidationError } from './models/ValidationError'; export type { WorkShiftRowSchema } from './models/WorkShiftRowSchema'; export type { WorkShiftSchema } from './models/WorkShiftSchema'; +export { AttributeService } from './services/AttributeService'; export { AuthService } from './services/AuthService'; export { BarcodeService } from './services/BarcodeService'; export { BillingService } from './services/BillingService'; export { BoardService } from './services/BoardService'; +export { CardService } from './services/CardService'; +export { CardGroupService } from './services/CardGroupService'; +export { CardTagService } from './services/CardTagService'; export { ClientService } from './services/ClientService'; -export { DealService } from './services/DealService'; -export { DealGroupService } from './services/DealGroupService'; export { DepartmentService } from './services/DepartmentService'; export { MarketplaceService } from './services/MarketplaceService'; export { PayrollService } from './services/PayrollService'; diff --git a/src/client/models/AttributeSchema.ts b/src/client/models/AttributeSchema.ts new file mode 100644 index 0000000..d1d1d25 --- /dev/null +++ b/src/client/models/AttributeSchema.ts @@ -0,0 +1,18 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { AttributeTypeSchema } from './AttributeTypeSchema'; +export type AttributeSchema = { + label: string; + name: string; + isApplicableToGroup: boolean; + isNullable: boolean; + defaultValue: (boolean | number | string | null); + typeId: number; + description: string; + id: number; + type: AttributeTypeSchema; + isDeleted: boolean; +}; + diff --git a/src/client/models/AttributeTypeSchema.ts b/src/client/models/AttributeTypeSchema.ts new file mode 100644 index 0000000..5819d92 --- /dev/null +++ b/src/client/models/AttributeTypeSchema.ts @@ -0,0 +1,11 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type AttributeTypeSchema = { + id: number; + type: string; + name: string; + isDeleted: boolean; +}; + diff --git a/src/client/models/BaseAttributeSchema.ts b/src/client/models/BaseAttributeSchema.ts new file mode 100644 index 0000000..62b68a7 --- /dev/null +++ b/src/client/models/BaseAttributeSchema.ts @@ -0,0 +1,14 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type BaseAttributeSchema = { + label: string; + name: string; + isApplicableToGroup: boolean; + isNullable: boolean; + defaultValue: (boolean | number | string | null); + typeId: number; + description: string; +}; + diff --git a/src/client/models/BaseCardTagSchema.ts b/src/client/models/BaseCardTagSchema.ts new file mode 100644 index 0000000..4db2641 --- /dev/null +++ b/src/client/models/BaseCardTagSchema.ts @@ -0,0 +1,9 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type BaseCardTagSchema = { + name: string; + projectId: number; +}; + diff --git a/src/client/models/BoardSchema.ts b/src/client/models/BoardSchema.ts index 431cff3..e24e481 100644 --- a/src/client/models/BoardSchema.ts +++ b/src/client/models/BoardSchema.ts @@ -9,7 +9,7 @@ export type BoardSchema = { projectId: number; id: number; ordinalNumber: number; - dealStatuses: Array; + statuses: Array; project: ProjectSchema; }; diff --git a/src/client/models/BoxSchema.ts b/src/client/models/BoxSchema.ts index b7a71ac..f147881 100644 --- a/src/client/models/BoxSchema.ts +++ b/src/client/models/BoxSchema.ts @@ -2,12 +2,11 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { ProductSchema } from './ProductSchema'; +import type { ShippingProductSchema } from './ShippingProductSchema'; export type BoxSchema = { id: number; - quantity: number; - product: (ProductSchema | null); palletId: (number | null); - dealId: (number | null); + cardId: (number | null); + shippingProducts: Array; }; diff --git a/src/client/models/CancelDealBillRequest.ts b/src/client/models/CancelCardBillRequest.ts similarity index 70% rename from src/client/models/CancelDealBillRequest.ts rename to src/client/models/CancelCardBillRequest.ts index 9f9e51a..dbdc509 100644 --- a/src/client/models/CancelDealBillRequest.ts +++ b/src/client/models/CancelCardBillRequest.ts @@ -2,7 +2,7 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -export type CancelDealBillRequest = { - dealId: number; +export type CancelCardBillRequest = { + cardId: number; }; diff --git a/src/client/models/CreateDealBillResponse.ts b/src/client/models/CancelCardBillResponse.ts similarity index 81% rename from src/client/models/CreateDealBillResponse.ts rename to src/client/models/CancelCardBillResponse.ts index 8c67e9d..cdb68c4 100644 --- a/src/client/models/CreateDealBillResponse.ts +++ b/src/client/models/CancelCardBillResponse.ts @@ -2,7 +2,7 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -export type CreateDealBillResponse = { +export type CancelCardBillResponse = { ok: boolean; message: string; }; diff --git a/src/client/models/DealAddKitRequest.ts b/src/client/models/CardAddKitRequest.ts similarity index 74% rename from src/client/models/DealAddKitRequest.ts rename to src/client/models/CardAddKitRequest.ts index fa817d1..c4b8cd1 100644 --- a/src/client/models/DealAddKitRequest.ts +++ b/src/client/models/CardAddKitRequest.ts @@ -2,8 +2,8 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -export type DealAddKitRequest = { - dealId: number; +export type CardAddKitRequest = { + cardId: number; kitId: number; }; diff --git a/src/client/models/DealDeleteResponse.ts b/src/client/models/CardAddKitResponse.ts similarity index 83% rename from src/client/models/DealDeleteResponse.ts rename to src/client/models/CardAddKitResponse.ts index 90e7788..ed3f59e 100644 --- a/src/client/models/DealDeleteResponse.ts +++ b/src/client/models/CardAddKitResponse.ts @@ -2,7 +2,7 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -export type DealDeleteResponse = { +export type CardAddKitResponse = { ok: boolean; message: string; }; diff --git a/src/client/models/CardAddProductRequest.ts b/src/client/models/CardAddProductRequest.ts new file mode 100644 index 0000000..aeae076 --- /dev/null +++ b/src/client/models/CardAddProductRequest.ts @@ -0,0 +1,10 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { CardProductSchema } from './CardProductSchema'; +export type CardAddProductRequest = { + cardId: number; + product: CardProductSchema; +}; + diff --git a/src/client/models/CancelDealBillResponse.ts b/src/client/models/CardAddProductResponse.ts similarity index 81% rename from src/client/models/CancelDealBillResponse.ts rename to src/client/models/CardAddProductResponse.ts index 7399779..1aeae50 100644 --- a/src/client/models/CancelDealBillResponse.ts +++ b/src/client/models/CardAddProductResponse.ts @@ -2,7 +2,7 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -export type CancelDealBillResponse = { +export type CardAddProductResponse = { ok: boolean; message: string; }; diff --git a/src/client/models/DealAddServiceRequest.ts b/src/client/models/CardAddServiceRequest.ts similarity index 77% rename from src/client/models/DealAddServiceRequest.ts rename to src/client/models/CardAddServiceRequest.ts index 512a256..3d8d98c 100644 --- a/src/client/models/DealAddServiceRequest.ts +++ b/src/client/models/CardAddServiceRequest.ts @@ -2,8 +2,8 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -export type DealAddServiceRequest = { - dealId: number; +export type CardAddServiceRequest = { + cardId: number; serviceId: number; quantity: number; price: number; diff --git a/src/client/models/DealAddProductResponse.ts b/src/client/models/CardAddServiceResponse.ts similarity index 81% rename from src/client/models/DealAddProductResponse.ts rename to src/client/models/CardAddServiceResponse.ts index 0f220c8..3beb752 100644 --- a/src/client/models/DealAddProductResponse.ts +++ b/src/client/models/CardAddServiceResponse.ts @@ -2,7 +2,7 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -export type DealAddProductResponse = { +export type CardAddServiceResponse = { ok: boolean; message: string; }; diff --git a/src/client/models/CardAddServicesRequest.ts b/src/client/models/CardAddServicesRequest.ts new file mode 100644 index 0000000..7294c9a --- /dev/null +++ b/src/client/models/CardAddServicesRequest.ts @@ -0,0 +1,10 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { CardServiceSchema } from './CardServiceSchema'; +export type CardAddServicesRequest = { + cardId: number; + services: Array; +}; + diff --git a/src/client/models/CardAddServicesResponse.ts b/src/client/models/CardAddServicesResponse.ts new file mode 100644 index 0000000..e04bb4c --- /dev/null +++ b/src/client/models/CardAddServicesResponse.ts @@ -0,0 +1,9 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type CardAddServicesResponse = { + ok: boolean; + message: string; +}; + diff --git a/src/client/models/DealAddToGroupRequest.ts b/src/client/models/CardAddToGroupRequest.ts similarity index 73% rename from src/client/models/DealAddToGroupRequest.ts rename to src/client/models/CardAddToGroupRequest.ts index e817931..4c9fd24 100644 --- a/src/client/models/DealAddToGroupRequest.ts +++ b/src/client/models/CardAddToGroupRequest.ts @@ -2,8 +2,8 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -export type DealAddToGroupRequest = { - dealId: number; +export type CardAddToGroupRequest = { + cardId: number; groupId: number; }; diff --git a/src/client/models/CardAddToGroupResponse.ts b/src/client/models/CardAddToGroupResponse.ts new file mode 100644 index 0000000..ca3baca --- /dev/null +++ b/src/client/models/CardAddToGroupResponse.ts @@ -0,0 +1,9 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type CardAddToGroupResponse = { + ok: boolean; + message: string; +}; + diff --git a/src/client/models/CardAttributeSchema.ts b/src/client/models/CardAttributeSchema.ts new file mode 100644 index 0000000..0efc8d7 --- /dev/null +++ b/src/client/models/CardAttributeSchema.ts @@ -0,0 +1,11 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { AttributeSchema } from './AttributeSchema'; +export type CardAttributeSchema = { + value: (boolean | number | string | null); + cardId: number; + attribute: AttributeSchema; +}; + diff --git a/src/client/models/DealBillRequestSchema.ts b/src/client/models/CardBillRequestSchema.ts similarity index 80% rename from src/client/models/DealBillRequestSchema.ts rename to src/client/models/CardBillRequestSchema.ts index 84a986f..5e2cf20 100644 --- a/src/client/models/DealBillRequestSchema.ts +++ b/src/client/models/CardBillRequestSchema.ts @@ -2,8 +2,8 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -export type DealBillRequestSchema = { - dealId: number; +export type CardBillRequestSchema = { + cardId: number; createdAt: string; paid: boolean; pdfUrl: (string | null); diff --git a/src/client/models/DealChangeStatusRequest.ts b/src/client/models/CardChangeStatusRequest.ts similarity index 72% rename from src/client/models/DealChangeStatusRequest.ts rename to src/client/models/CardChangeStatusRequest.ts index 71fe9f1..62642d4 100644 --- a/src/client/models/DealChangeStatusRequest.ts +++ b/src/client/models/CardChangeStatusRequest.ts @@ -2,8 +2,8 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -export type DealChangeStatusRequest = { - dealId: number; +export type CardChangeStatusRequest = { + cardId: number; newStatus: number; }; diff --git a/src/client/models/DealChangeStatusResponse.ts b/src/client/models/CardChangeStatusResponse.ts similarity index 78% rename from src/client/models/DealChangeStatusResponse.ts rename to src/client/models/CardChangeStatusResponse.ts index 85c0609..297443a 100644 --- a/src/client/models/DealChangeStatusResponse.ts +++ b/src/client/models/CardChangeStatusResponse.ts @@ -2,7 +2,7 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -export type DealChangeStatusResponse = { +export type CardChangeStatusResponse = { ok: boolean; }; diff --git a/src/client/models/DealCompleteRequest.ts b/src/client/models/CardCompleteRequest.ts similarity index 70% rename from src/client/models/DealCompleteRequest.ts rename to src/client/models/CardCompleteRequest.ts index ac500b6..8070f1f 100644 --- a/src/client/models/DealCompleteRequest.ts +++ b/src/client/models/CardCompleteRequest.ts @@ -2,7 +2,7 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -export type DealCompleteRequest = { - dealId: number; +export type CardCompleteRequest = { + cardId: number; }; diff --git a/src/client/models/DealCompleteResponse.ts b/src/client/models/CardCompleteResponse.ts similarity index 82% rename from src/client/models/DealCompleteResponse.ts rename to src/client/models/CardCompleteResponse.ts index d82206e..2840bf2 100644 --- a/src/client/models/DealCompleteResponse.ts +++ b/src/client/models/CardCompleteResponse.ts @@ -2,7 +2,7 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -export type DealCompleteResponse = { +export type CardCompleteResponse = { ok: boolean; message: string; }; diff --git a/src/client/models/CardCreateGroupResponse.ts b/src/client/models/CardCreateGroupResponse.ts new file mode 100644 index 0000000..d13749b --- /dev/null +++ b/src/client/models/CardCreateGroupResponse.ts @@ -0,0 +1,9 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type CardCreateGroupResponse = { + ok: boolean; + message: string; +}; + diff --git a/src/client/models/CardCreateGuestUrlRequest.ts b/src/client/models/CardCreateGuestUrlRequest.ts new file mode 100644 index 0000000..da08d63 --- /dev/null +++ b/src/client/models/CardCreateGuestUrlRequest.ts @@ -0,0 +1,8 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type CardCreateGuestUrlRequest = { + cardId: number; +}; + diff --git a/src/client/models/DealCreateGuestUrlResponse.ts b/src/client/models/CardCreateGuestUrlResponse.ts similarity index 81% rename from src/client/models/DealCreateGuestUrlResponse.ts rename to src/client/models/CardCreateGuestUrlResponse.ts index fc790b7..f2232d6 100644 --- a/src/client/models/DealCreateGuestUrlResponse.ts +++ b/src/client/models/CardCreateGuestUrlResponse.ts @@ -2,7 +2,7 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -export type DealCreateGuestUrlResponse = { +export type CardCreateGuestUrlResponse = { ok: boolean; message: string; url: string; diff --git a/src/client/models/DealDeleteProductRequest.ts b/src/client/models/CardDeleteProductRequest.ts similarity index 72% rename from src/client/models/DealDeleteProductRequest.ts rename to src/client/models/CardDeleteProductRequest.ts index a487e98..03e090f 100644 --- a/src/client/models/DealDeleteProductRequest.ts +++ b/src/client/models/CardDeleteProductRequest.ts @@ -2,8 +2,8 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -export type DealDeleteProductRequest = { - dealId: number; +export type CardDeleteProductRequest = { + cardId: number; productId: number; }; diff --git a/src/client/models/CardDeleteProductResponse.ts b/src/client/models/CardDeleteProductResponse.ts new file mode 100644 index 0000000..25ef2a4 --- /dev/null +++ b/src/client/models/CardDeleteProductResponse.ts @@ -0,0 +1,9 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type CardDeleteProductResponse = { + ok: boolean; + message: string; +}; + diff --git a/src/client/models/DealDeleteProductsRequest.ts b/src/client/models/CardDeleteProductsRequest.ts similarity index 73% rename from src/client/models/DealDeleteProductsRequest.ts rename to src/client/models/CardDeleteProductsRequest.ts index c51d264..3c9a9f0 100644 --- a/src/client/models/DealDeleteProductsRequest.ts +++ b/src/client/models/CardDeleteProductsRequest.ts @@ -2,8 +2,8 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -export type DealDeleteProductsRequest = { - dealId: number; +export type CardDeleteProductsRequest = { + cardId: number; productIds: Array; }; diff --git a/src/client/models/CardDeleteProductsResponse.ts b/src/client/models/CardDeleteProductsResponse.ts new file mode 100644 index 0000000..781ba1c --- /dev/null +++ b/src/client/models/CardDeleteProductsResponse.ts @@ -0,0 +1,9 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type CardDeleteProductsResponse = { + ok: boolean; + message: string; +}; + diff --git a/src/client/models/DealDeleteRequest.ts b/src/client/models/CardDeleteRequest.ts similarity index 71% rename from src/client/models/DealDeleteRequest.ts rename to src/client/models/CardDeleteRequest.ts index ffd14a4..64ca679 100644 --- a/src/client/models/DealDeleteRequest.ts +++ b/src/client/models/CardDeleteRequest.ts @@ -2,7 +2,7 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -export type DealDeleteRequest = { - dealId: number; +export type CardDeleteRequest = { + cardId: number; }; diff --git a/src/client/models/DealAddKitResponse.ts b/src/client/models/CardDeleteResponse.ts similarity index 83% rename from src/client/models/DealAddKitResponse.ts rename to src/client/models/CardDeleteResponse.ts index 7edc087..26b6c35 100644 --- a/src/client/models/DealAddKitResponse.ts +++ b/src/client/models/CardDeleteResponse.ts @@ -2,7 +2,7 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -export type DealAddKitResponse = { +export type CardDeleteResponse = { ok: boolean; message: string; }; diff --git a/src/client/models/DealDeleteServiceRequest.ts b/src/client/models/CardDeleteServiceRequest.ts similarity index 72% rename from src/client/models/DealDeleteServiceRequest.ts rename to src/client/models/CardDeleteServiceRequest.ts index ea2a07c..f9cd8d1 100644 --- a/src/client/models/DealDeleteServiceRequest.ts +++ b/src/client/models/CardDeleteServiceRequest.ts @@ -2,8 +2,8 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -export type DealDeleteServiceRequest = { - dealId: number; +export type CardDeleteServiceRequest = { + cardId: number; serviceId: number; }; diff --git a/src/client/models/CardDeleteServiceResponse.ts b/src/client/models/CardDeleteServiceResponse.ts new file mode 100644 index 0000000..4bd5213 --- /dev/null +++ b/src/client/models/CardDeleteServiceResponse.ts @@ -0,0 +1,9 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type CardDeleteServiceResponse = { + ok: boolean; + message: string; +}; + diff --git a/src/client/models/DealDeleteServicesRequest.ts b/src/client/models/CardDeleteServicesRequest.ts similarity index 73% rename from src/client/models/DealDeleteServicesRequest.ts rename to src/client/models/CardDeleteServicesRequest.ts index e52c0fd..48c7f3d 100644 --- a/src/client/models/DealDeleteServicesRequest.ts +++ b/src/client/models/CardDeleteServicesRequest.ts @@ -2,8 +2,8 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -export type DealDeleteServicesRequest = { - dealId: number; +export type CardDeleteServicesRequest = { + cardId: number; serviceIds: Array; }; diff --git a/src/client/models/CardDeleteServicesResponse.ts b/src/client/models/CardDeleteServicesResponse.ts new file mode 100644 index 0000000..11075ad --- /dev/null +++ b/src/client/models/CardDeleteServicesResponse.ts @@ -0,0 +1,9 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type CardDeleteServicesResponse = { + ok: boolean; + message: string; +}; + diff --git a/src/client/models/DealEmployeesSchema.ts b/src/client/models/CardEmployeesSchema.ts similarity index 86% rename from src/client/models/DealEmployeesSchema.ts rename to src/client/models/CardEmployeesSchema.ts index 5ba3a15..9f9c4de 100644 --- a/src/client/models/DealEmployeesSchema.ts +++ b/src/client/models/CardEmployeesSchema.ts @@ -3,7 +3,7 @@ /* tslint:disable */ /* eslint-disable */ import type { UserSchema } from './UserSchema'; -export type DealEmployeesSchema = { +export type CardEmployeesSchema = { user: UserSchema; createdAt: string; }; diff --git a/src/client/models/CardGeneralInfoSchema.ts b/src/client/models/CardGeneralInfoSchema.ts new file mode 100644 index 0000000..f1cd00c --- /dev/null +++ b/src/client/models/CardGeneralInfoSchema.ts @@ -0,0 +1,18 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { UserSchema } from './UserSchema'; +export type CardGeneralInfoSchema = { + attributes?: Record; + name: string; + isDeleted: boolean; + isCompleted: boolean; + comment: string; + manager?: (UserSchema | null); + boardId: number; + statusId: number; + clientId: (number | null); + tags: Array; +}; + diff --git a/src/client/models/CardGetAllResponse.ts b/src/client/models/CardGetAllResponse.ts new file mode 100644 index 0000000..537f264 --- /dev/null +++ b/src/client/models/CardGetAllResponse.ts @@ -0,0 +1,9 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { CardSchema } from './CardSchema'; +export type CardGetAllResponse = { + cards: Array; +}; + diff --git a/src/client/models/DealGroupChangeStatusRequest.ts b/src/client/models/CardGroupChangeStatusRequest.ts similarity index 80% rename from src/client/models/DealGroupChangeStatusRequest.ts rename to src/client/models/CardGroupChangeStatusRequest.ts index 64a78b0..ebd24f4 100644 --- a/src/client/models/DealGroupChangeStatusRequest.ts +++ b/src/client/models/CardGroupChangeStatusRequest.ts @@ -2,7 +2,7 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -export type DealGroupChangeStatusRequest = { +export type CardGroupChangeStatusRequest = { groupId: number; newStatus: number; }; diff --git a/src/client/models/CardGroupChangeStatusResponse.ts b/src/client/models/CardGroupChangeStatusResponse.ts new file mode 100644 index 0000000..f1082ea --- /dev/null +++ b/src/client/models/CardGroupChangeStatusResponse.ts @@ -0,0 +1,9 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type CardGroupChangeStatusResponse = { + ok: boolean; + message: string; +}; + diff --git a/src/client/models/DealGroupSchema.ts b/src/client/models/CardGroupSchema.ts similarity index 91% rename from src/client/models/DealGroupSchema.ts rename to src/client/models/CardGroupSchema.ts index 1e2af96..f57295c 100644 --- a/src/client/models/DealGroupSchema.ts +++ b/src/client/models/CardGroupSchema.ts @@ -3,7 +3,7 @@ /* tslint:disable */ /* eslint-disable */ import type { GroupBillRequestSchema } from './GroupBillRequestSchema'; -export type DealGroupSchema = { +export type CardGroupSchema = { id: number; name?: (string | null); lexorank: string; diff --git a/src/client/models/CardGroupUpdateRequest.ts b/src/client/models/CardGroupUpdateRequest.ts new file mode 100644 index 0000000..0229506 --- /dev/null +++ b/src/client/models/CardGroupUpdateRequest.ts @@ -0,0 +1,9 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { CardGroupSchema } from './CardGroupSchema'; +export type CardGroupUpdateRequest = { + data: CardGroupSchema; +}; + diff --git a/src/client/models/CardGroupUpdateResponse.ts b/src/client/models/CardGroupUpdateResponse.ts new file mode 100644 index 0000000..19b8da6 --- /dev/null +++ b/src/client/models/CardGroupUpdateResponse.ts @@ -0,0 +1,9 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type CardGroupUpdateResponse = { + ok: boolean; + message: string; +}; + diff --git a/src/client/models/CardPrefillRequest.ts b/src/client/models/CardPrefillRequest.ts new file mode 100644 index 0000000..19e29a6 --- /dev/null +++ b/src/client/models/CardPrefillRequest.ts @@ -0,0 +1,9 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type CardPrefillRequest = { + oldCardId: number; + newCardId: number; +}; + diff --git a/src/client/models/DealPrefillResponse.ts b/src/client/models/CardPrefillResponse.ts similarity index 82% rename from src/client/models/DealPrefillResponse.ts rename to src/client/models/CardPrefillResponse.ts index 2b92198..c24e9d0 100644 --- a/src/client/models/DealPrefillResponse.ts +++ b/src/client/models/CardPrefillResponse.ts @@ -2,7 +2,7 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -export type DealPrefillResponse = { +export type CardPrefillResponse = { ok: boolean; message: string; }; diff --git a/src/client/models/DealProductAddKitRequest.ts b/src/client/models/CardProductAddKitRequest.ts similarity index 74% rename from src/client/models/DealProductAddKitRequest.ts rename to src/client/models/CardProductAddKitRequest.ts index 4ec1598..7f994b6 100644 --- a/src/client/models/DealProductAddKitRequest.ts +++ b/src/client/models/CardProductAddKitRequest.ts @@ -2,8 +2,8 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -export type DealProductAddKitRequest = { - dealId: number; +export type CardProductAddKitRequest = { + cardId: number; productId: number; kitId: number; }; diff --git a/src/client/models/CardProductAddKitResponse.ts b/src/client/models/CardProductAddKitResponse.ts new file mode 100644 index 0000000..cca68b7 --- /dev/null +++ b/src/client/models/CardProductAddKitResponse.ts @@ -0,0 +1,9 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type CardProductAddKitResponse = { + ok: boolean; + message: string; +}; + diff --git a/src/client/models/DealProductSchema.ts b/src/client/models/CardProductSchema.ts similarity index 65% rename from src/client/models/DealProductSchema.ts rename to src/client/models/CardProductSchema.ts index 1ce0fd5..5d9cb38 100644 --- a/src/client/models/DealProductSchema.ts +++ b/src/client/models/CardProductSchema.ts @@ -2,11 +2,11 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { DealProductServiceSchema } from './DealProductServiceSchema'; +import type { CardProductServiceSchema } from './CardProductServiceSchema'; import type { ProductSchema } from './ProductSchema'; -export type DealProductSchema = { +export type CardProductSchema = { product: ProductSchema; - services: Array; + services: Array; quantity: number; comment?: string; }; diff --git a/src/client/models/DealProductServiceSchema.ts b/src/client/models/CardProductServiceSchema.ts similarity index 89% rename from src/client/models/DealProductServiceSchema.ts rename to src/client/models/CardProductServiceSchema.ts index 7d9e5b9..3267427 100644 --- a/src/client/models/DealProductServiceSchema.ts +++ b/src/client/models/CardProductServiceSchema.ts @@ -4,7 +4,7 @@ /* eslint-disable */ import type { ServiceSchema } from './ServiceSchema'; import type { UserSchema } from './UserSchema'; -export type DealProductServiceSchema = { +export type CardProductServiceSchema = { service: ServiceSchema; price: number; employees: Array; diff --git a/src/client/models/DealQuickCreateRequest.ts b/src/client/models/CardQuickCreateRequest.ts similarity index 64% rename from src/client/models/DealQuickCreateRequest.ts rename to src/client/models/CardQuickCreateRequest.ts index 333e413..aa54794 100644 --- a/src/client/models/DealQuickCreateRequest.ts +++ b/src/client/models/CardQuickCreateRequest.ts @@ -3,13 +3,13 @@ /* tslint:disable */ /* eslint-disable */ import type { BaseMarketplaceSchema } from './BaseMarketplaceSchema'; -export type DealQuickCreateRequest = { +export type CardQuickCreateRequest = { name: string; - clientName: string; + clientName: (string | null); comment: string; acceptanceDate: string; - shippingWarehouse: string; - baseMarketplace: BaseMarketplaceSchema; + shippingWarehouse: (string | null); + baseMarketplace: (BaseMarketplaceSchema | null); statusId: number; }; diff --git a/src/client/models/CardQuickCreateResponse.ts b/src/client/models/CardQuickCreateResponse.ts new file mode 100644 index 0000000..1074791 --- /dev/null +++ b/src/client/models/CardQuickCreateResponse.ts @@ -0,0 +1,8 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type CardQuickCreateResponse = { + cardId: number; +}; + diff --git a/src/client/models/CardRecalculatePriceRequest.ts b/src/client/models/CardRecalculatePriceRequest.ts new file mode 100644 index 0000000..62dd249 --- /dev/null +++ b/src/client/models/CardRecalculatePriceRequest.ts @@ -0,0 +1,8 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type CardRecalculatePriceRequest = { + cardId: number; +}; + diff --git a/src/client/models/CreateDealsFromExcelResponse.ts b/src/client/models/CardRecalculatePriceResponse.ts similarity index 79% rename from src/client/models/CreateDealsFromExcelResponse.ts rename to src/client/models/CardRecalculatePriceResponse.ts index 5718e1d..8a8e53e 100644 --- a/src/client/models/CreateDealsFromExcelResponse.ts +++ b/src/client/models/CardRecalculatePriceResponse.ts @@ -2,7 +2,7 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -export type CreateDealsFromExcelResponse = { +export type CardRecalculatePriceResponse = { ok: boolean; message: string; }; diff --git a/src/client/models/CardRemoveFromGroupRequest.ts b/src/client/models/CardRemoveFromGroupRequest.ts new file mode 100644 index 0000000..f348298 --- /dev/null +++ b/src/client/models/CardRemoveFromGroupRequest.ts @@ -0,0 +1,8 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type CardRemoveFromGroupRequest = { + cardId: number; +}; + diff --git a/src/client/models/CardRemoveFromGroupResponse.ts b/src/client/models/CardRemoveFromGroupResponse.ts new file mode 100644 index 0000000..e9f12bb --- /dev/null +++ b/src/client/models/CardRemoveFromGroupResponse.ts @@ -0,0 +1,9 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type CardRemoveFromGroupResponse = { + ok: boolean; + message: string; +}; + diff --git a/src/client/models/CardSchema.ts b/src/client/models/CardSchema.ts new file mode 100644 index 0000000..0759de2 --- /dev/null +++ b/src/client/models/CardSchema.ts @@ -0,0 +1,46 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { BoardSchema } from './BoardSchema'; +import type { BoxSchema } from './BoxSchema'; +import type { CardAttributeSchema } from './CardAttributeSchema'; +import type { CardBillRequestSchema } from './CardBillRequestSchema'; +import type { CardEmployeesSchema } from './CardEmployeesSchema'; +import type { CardGroupSchema } from './CardGroupSchema'; +import type { CardProductSchema } from './CardProductSchema'; +import type { CardServiceSchema } from './CardServiceSchema'; +import type { CardStatusHistorySchema } from './CardStatusHistorySchema'; +import type { CardTagSchema } from './CardTagSchema'; +import type { ClientSchema } from './ClientSchema'; +import type { PalletSchema } from './PalletSchema'; +import type { ShippingWarehouseSchema } from './ShippingWarehouseSchema'; +import type { StatusSchema } from './StatusSchema'; +import type { UserSchema } from './UserSchema'; +export type CardSchema = { + id: number; + name: string; + comment: string; + createdAt: string; + status: StatusSchema; + board: BoardSchema; + statusHistory: Array; + isDeleted: boolean; + isCompleted: boolean; + isServicesProfitAccounted: boolean; + isLocked: boolean; + services: Array; + products: Array; + clientId: (number | null); + client: (ClientSchema | null); + shippingWarehouse?: (ShippingWarehouseSchema | string | null); + billRequest?: (CardBillRequestSchema | null); + group?: (CardGroupSchema | null); + manager?: (UserSchema | null); + pallets?: Array; + boxes?: Array; + employees?: Array; + tags?: Array; + attributes: Array; +}; + diff --git a/src/client/models/DealServiceSchema.ts b/src/client/models/CardServiceSchema.ts similarity index 91% rename from src/client/models/DealServiceSchema.ts rename to src/client/models/CardServiceSchema.ts index c7cbc1a..4b50264 100644 --- a/src/client/models/DealServiceSchema.ts +++ b/src/client/models/CardServiceSchema.ts @@ -4,7 +4,7 @@ /* eslint-disable */ import type { ServiceSchema } from './ServiceSchema'; import type { UserSchema } from './UserSchema'; -export type DealServiceSchema = { +export type CardServiceSchema = { service: ServiceSchema; quantity: number; price: number; diff --git a/src/client/models/DealServicesCopyRequest.ts b/src/client/models/CardServicesCopyRequest.ts similarity index 77% rename from src/client/models/DealServicesCopyRequest.ts rename to src/client/models/CardServicesCopyRequest.ts index 79a7f6e..355f770 100644 --- a/src/client/models/DealServicesCopyRequest.ts +++ b/src/client/models/CardServicesCopyRequest.ts @@ -2,8 +2,8 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -export type DealServicesCopyRequest = { - dealId: number; +export type CardServicesCopyRequest = { + cardId: number; sourceProductId: number; destinationProductIds: Array; }; diff --git a/src/client/models/CardServicesCopyResponse.ts b/src/client/models/CardServicesCopyResponse.ts new file mode 100644 index 0000000..5cd9e8b --- /dev/null +++ b/src/client/models/CardServicesCopyResponse.ts @@ -0,0 +1,9 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type CardServicesCopyResponse = { + ok: boolean; + message: string; +}; + diff --git a/src/client/models/DealStatusHistorySchema.ts b/src/client/models/CardStatusHistorySchema.ts similarity index 91% rename from src/client/models/DealStatusHistorySchema.ts rename to src/client/models/CardStatusHistorySchema.ts index 0fd15e9..94e31ed 100644 --- a/src/client/models/DealStatusHistorySchema.ts +++ b/src/client/models/CardStatusHistorySchema.ts @@ -4,7 +4,7 @@ /* eslint-disable */ import type { StatusSchema } from './StatusSchema'; import type { UserSchema } from './UserSchema'; -export type DealStatusHistorySchema = { +export type CardStatusHistorySchema = { user: UserSchema; changedAt: string; fromStatus: StatusSchema; diff --git a/src/client/models/DealSummary.ts b/src/client/models/CardSummary.ts similarity index 63% rename from src/client/models/DealSummary.ts rename to src/client/models/CardSummary.ts index f7e0330..1615c16 100644 --- a/src/client/models/DealSummary.ts +++ b/src/client/models/CardSummary.ts @@ -4,13 +4,14 @@ /* eslint-disable */ import type { BaseMarketplaceSchema } from './BaseMarketplaceSchema'; import type { BoardSchema } from './BoardSchema'; -import type { DealBillRequestSchema } from './DealBillRequestSchema'; -import type { DealGroupSchema } from './DealGroupSchema'; +import type { CardBillRequestSchema } from './CardBillRequestSchema'; +import type { CardGroupSchema } from './CardGroupSchema'; +import type { CardTagSchema } from './CardTagSchema'; import type { StatusSchema } from './StatusSchema'; -export type DealSummary = { +export type CardSummary = { id: number; name: string; - clientName: string; + clientName: (string | null); createdAt: string; status: StatusSchema; board: BoardSchema; @@ -18,11 +19,10 @@ export type DealSummary = { rank: number; baseMarketplace?: (BaseMarketplaceSchema | null); totalProducts: number; + tags: Array; shipmentWarehouseId: (number | null); shipmentWarehouseName: (string | null); - deliveryDate?: (string | null); - receivingSlotDate?: (string | null); - billRequest?: (DealBillRequestSchema | null); - group?: (DealGroupSchema | null); + billRequest?: (CardBillRequestSchema | null); + group?: (CardGroupSchema | null); }; diff --git a/src/client/models/DealSummaryReorderRequest.ts b/src/client/models/CardSummaryReorderRequest.ts similarity index 79% rename from src/client/models/DealSummaryReorderRequest.ts rename to src/client/models/CardSummaryReorderRequest.ts index 9e760cc..bec06b1 100644 --- a/src/client/models/DealSummaryReorderRequest.ts +++ b/src/client/models/CardSummaryReorderRequest.ts @@ -2,8 +2,8 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -export type DealSummaryReorderRequest = { - dealId: number; +export type CardSummaryReorderRequest = { + cardId: number; statusId: number; index: number; deadline?: (string | null); diff --git a/src/client/models/CardSummaryResponse.ts b/src/client/models/CardSummaryResponse.ts new file mode 100644 index 0000000..dceb170 --- /dev/null +++ b/src/client/models/CardSummaryResponse.ts @@ -0,0 +1,9 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { CardSummary } from './CardSummary'; +export type CardSummaryResponse = { + summaries: Array; +}; + diff --git a/src/client/models/ProjectSchemaWithCount.ts b/src/client/models/CardTagSchema.ts similarity index 72% rename from src/client/models/ProjectSchemaWithCount.ts rename to src/client/models/CardTagSchema.ts index 8bcf459..8008529 100644 --- a/src/client/models/ProjectSchemaWithCount.ts +++ b/src/client/models/CardTagSchema.ts @@ -2,9 +2,9 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -export type ProjectSchemaWithCount = { +export type CardTagSchema = { name: string; + projectId: number; id: number; - boardsCount: number; }; diff --git a/src/client/models/CardUpdateGeneralInfoRequest.ts b/src/client/models/CardUpdateGeneralInfoRequest.ts new file mode 100644 index 0000000..4ba1843 --- /dev/null +++ b/src/client/models/CardUpdateGeneralInfoRequest.ts @@ -0,0 +1,10 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { CardGeneralInfoSchema } from './CardGeneralInfoSchema'; +export type CardUpdateGeneralInfoRequest = { + cardId: number; + data: CardGeneralInfoSchema; +}; + diff --git a/src/client/models/CardUpdateGeneralInfoResponse.ts b/src/client/models/CardUpdateGeneralInfoResponse.ts new file mode 100644 index 0000000..6c2a154 --- /dev/null +++ b/src/client/models/CardUpdateGeneralInfoResponse.ts @@ -0,0 +1,9 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type CardUpdateGeneralInfoResponse = { + ok: boolean; + message: string; +}; + diff --git a/src/client/models/DealUpdateProductQuantityRequest.ts b/src/client/models/CardUpdateProductQuantityRequest.ts similarity index 72% rename from src/client/models/DealUpdateProductQuantityRequest.ts rename to src/client/models/CardUpdateProductQuantityRequest.ts index a3fd92a..380dcec 100644 --- a/src/client/models/DealUpdateProductQuantityRequest.ts +++ b/src/client/models/CardUpdateProductQuantityRequest.ts @@ -2,8 +2,8 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -export type DealUpdateProductQuantityRequest = { - dealId: number; +export type CardUpdateProductQuantityRequest = { + cardId: number; productId: number; quantity: number; }; diff --git a/src/client/models/CardUpdateProductQuantityResponse.ts b/src/client/models/CardUpdateProductQuantityResponse.ts new file mode 100644 index 0000000..48a9cbe --- /dev/null +++ b/src/client/models/CardUpdateProductQuantityResponse.ts @@ -0,0 +1,9 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type CardUpdateProductQuantityResponse = { + ok: boolean; + message: string; +}; + diff --git a/src/client/models/CardUpdateProductRequest.ts b/src/client/models/CardUpdateProductRequest.ts new file mode 100644 index 0000000..1310a6e --- /dev/null +++ b/src/client/models/CardUpdateProductRequest.ts @@ -0,0 +1,10 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { CardProductSchema } from './CardProductSchema'; +export type CardUpdateProductRequest = { + cardId: number; + product: CardProductSchema; +}; + diff --git a/src/client/models/CardUpdateProductResponse.ts b/src/client/models/CardUpdateProductResponse.ts new file mode 100644 index 0000000..ddedf4d --- /dev/null +++ b/src/client/models/CardUpdateProductResponse.ts @@ -0,0 +1,9 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type CardUpdateProductResponse = { + ok: boolean; + message: string; +}; + diff --git a/src/client/models/DealUpdateServiceQuantityRequest.ts b/src/client/models/CardUpdateServiceQuantityRequest.ts similarity index 72% rename from src/client/models/DealUpdateServiceQuantityRequest.ts rename to src/client/models/CardUpdateServiceQuantityRequest.ts index 90259d0..cc2c8e2 100644 --- a/src/client/models/DealUpdateServiceQuantityRequest.ts +++ b/src/client/models/CardUpdateServiceQuantityRequest.ts @@ -2,8 +2,8 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -export type DealUpdateServiceQuantityRequest = { - dealId: number; +export type CardUpdateServiceQuantityRequest = { + cardId: number; serviceId: number; quantity: number; }; diff --git a/src/client/models/CardUpdateServiceQuantityResponse.ts b/src/client/models/CardUpdateServiceQuantityResponse.ts new file mode 100644 index 0000000..7faebed --- /dev/null +++ b/src/client/models/CardUpdateServiceQuantityResponse.ts @@ -0,0 +1,9 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type CardUpdateServiceQuantityResponse = { + ok: boolean; + message: string; +}; + diff --git a/src/client/models/CardUpdateServiceRequest.ts b/src/client/models/CardUpdateServiceRequest.ts new file mode 100644 index 0000000..108460e --- /dev/null +++ b/src/client/models/CardUpdateServiceRequest.ts @@ -0,0 +1,10 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { CardServiceSchema } from './CardServiceSchema'; +export type CardUpdateServiceRequest = { + cardId: number; + service: CardServiceSchema; +}; + diff --git a/src/client/models/CardUpdateServiceResponse.ts b/src/client/models/CardUpdateServiceResponse.ts new file mode 100644 index 0000000..7228a1b --- /dev/null +++ b/src/client/models/CardUpdateServiceResponse.ts @@ -0,0 +1,9 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type CardUpdateServiceResponse = { + ok: boolean; + message: string; +}; + diff --git a/src/client/models/CreateAttributeRequest.ts b/src/client/models/CreateAttributeRequest.ts new file mode 100644 index 0000000..dd6c97a --- /dev/null +++ b/src/client/models/CreateAttributeRequest.ts @@ -0,0 +1,9 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { BaseAttributeSchema } from './BaseAttributeSchema'; +export type CreateAttributeRequest = { + attribute: BaseAttributeSchema; +}; + diff --git a/src/client/models/CreateAttributeResponse.ts b/src/client/models/CreateAttributeResponse.ts new file mode 100644 index 0000000..bbfb9a0 --- /dev/null +++ b/src/client/models/CreateAttributeResponse.ts @@ -0,0 +1,9 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type CreateAttributeResponse = { + ok: boolean; + message: string; +}; + diff --git a/src/client/models/CreateBoxInDealSchema.ts b/src/client/models/CreateBoxInCardSchema.ts similarity index 67% rename from src/client/models/CreateBoxInDealSchema.ts rename to src/client/models/CreateBoxInCardSchema.ts index 373942e..6447bb2 100644 --- a/src/client/models/CreateBoxInDealSchema.ts +++ b/src/client/models/CreateBoxInCardSchema.ts @@ -2,7 +2,7 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -export type CreateBoxInDealSchema = { - dealId: (number | null); +export type CreateBoxInCardSchema = { + cardId: (number | null); }; diff --git a/src/client/models/CreateBoxRequest.ts b/src/client/models/CreateBoxRequest.ts new file mode 100644 index 0000000..d008f49 --- /dev/null +++ b/src/client/models/CreateBoxRequest.ts @@ -0,0 +1,10 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { CreateBoxInCardSchema } from './CreateBoxInCardSchema'; +import type { CreateBoxInPalletSchema } from './CreateBoxInPalletSchema'; +export type CreateBoxRequest = { + data: (CreateBoxInCardSchema | CreateBoxInPalletSchema); +}; + diff --git a/src/client/models/UpdateBoxResponse.ts b/src/client/models/CreateBoxResponse.ts similarity index 83% rename from src/client/models/UpdateBoxResponse.ts rename to src/client/models/CreateBoxResponse.ts index da73fca..fd8d25d 100644 --- a/src/client/models/UpdateBoxResponse.ts +++ b/src/client/models/CreateBoxResponse.ts @@ -2,7 +2,7 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -export type UpdateBoxResponse = { +export type CreateBoxResponse = { ok: boolean; message: string; }; diff --git a/src/client/models/CreateDealBillRequest.ts b/src/client/models/CreateCardBillRequest.ts similarity index 70% rename from src/client/models/CreateDealBillRequest.ts rename to src/client/models/CreateCardBillRequest.ts index a193cf8..e779f9d 100644 --- a/src/client/models/CreateDealBillRequest.ts +++ b/src/client/models/CreateCardBillRequest.ts @@ -2,7 +2,7 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -export type CreateDealBillRequest = { - dealId: number; +export type CreateCardBillRequest = { + cardId: number; }; diff --git a/src/client/models/CreateCardBillResponse.ts b/src/client/models/CreateCardBillResponse.ts new file mode 100644 index 0000000..737845a --- /dev/null +++ b/src/client/models/CreateCardBillResponse.ts @@ -0,0 +1,9 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type CreateCardBillResponse = { + ok: boolean; + message: string; +}; + diff --git a/src/client/models/CreateCardGroupRequest.ts b/src/client/models/CreateCardGroupRequest.ts new file mode 100644 index 0000000..ca099df --- /dev/null +++ b/src/client/models/CreateCardGroupRequest.ts @@ -0,0 +1,9 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type CreateCardGroupRequest = { + draggingCardId: number; + hoveredCardId: number; +}; + diff --git a/src/client/models/CreateDealsFromExcelRequest.ts b/src/client/models/CreateCardsFromExcelRequest.ts similarity index 87% rename from src/client/models/CreateDealsFromExcelRequest.ts rename to src/client/models/CreateCardsFromExcelRequest.ts index 538d5f6..38dd033 100644 --- a/src/client/models/CreateDealsFromExcelRequest.ts +++ b/src/client/models/CreateCardsFromExcelRequest.ts @@ -3,7 +3,7 @@ /* tslint:disable */ /* eslint-disable */ import type { ProductFromExcelSchema } from './ProductFromExcelSchema'; -export type CreateDealsFromExcelRequest = { +export type CreateCardsFromExcelRequest = { clientId: number; statusId: number; products: Array; diff --git a/src/client/models/CreateCardsFromExcelResponse.ts b/src/client/models/CreateCardsFromExcelResponse.ts new file mode 100644 index 0000000..f0c0184 --- /dev/null +++ b/src/client/models/CreateCardsFromExcelResponse.ts @@ -0,0 +1,9 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type CreateCardsFromExcelResponse = { + ok: boolean; + message: string; +}; + diff --git a/src/client/models/CreateShippingProductSchema.ts b/src/client/models/CreateShippingProductSchema.ts index 6ebe1b5..062b4d0 100644 --- a/src/client/models/CreateShippingProductSchema.ts +++ b/src/client/models/CreateShippingProductSchema.ts @@ -5,6 +5,7 @@ export type CreateShippingProductSchema = { productId: (number | null); quantity: (number | null); - palletId: number; + palletId?: (number | null); + boxId?: (number | null); }; diff --git a/src/client/models/CreateTagRequest.ts b/src/client/models/CreateTagRequest.ts new file mode 100644 index 0000000..9589330 --- /dev/null +++ b/src/client/models/CreateTagRequest.ts @@ -0,0 +1,9 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { BaseCardTagSchema } from './BaseCardTagSchema'; +export type CreateTagRequest = { + tag: BaseCardTagSchema; +}; + diff --git a/src/client/models/CreateTagResponse.ts b/src/client/models/CreateTagResponse.ts new file mode 100644 index 0000000..5369692 --- /dev/null +++ b/src/client/models/CreateTagResponse.ts @@ -0,0 +1,9 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type CreateTagResponse = { + ok: boolean; + message: string; +}; + diff --git a/src/client/models/DealAddProductRequest.ts b/src/client/models/DealAddProductRequest.ts deleted file mode 100644 index 29a9d1d..0000000 --- a/src/client/models/DealAddProductRequest.ts +++ /dev/null @@ -1,10 +0,0 @@ -/* generated using openapi-typescript-codegen -- do not edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { DealProductSchema } from './DealProductSchema'; -export type DealAddProductRequest = { - dealId: number; - product: DealProductSchema; -}; - diff --git a/src/client/models/DealAddServiceResponse.ts b/src/client/models/DealAddServiceResponse.ts deleted file mode 100644 index 246b168..0000000 --- a/src/client/models/DealAddServiceResponse.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* generated using openapi-typescript-codegen -- do not edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export type DealAddServiceResponse = { - ok: boolean; - message: string; -}; - diff --git a/src/client/models/DealAddServicesRequest.ts b/src/client/models/DealAddServicesRequest.ts deleted file mode 100644 index ce5fbe3..0000000 --- a/src/client/models/DealAddServicesRequest.ts +++ /dev/null @@ -1,10 +0,0 @@ -/* generated using openapi-typescript-codegen -- do not edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { DealServiceSchema } from './DealServiceSchema'; -export type DealAddServicesRequest = { - dealId: number; - services: Array; -}; - diff --git a/src/client/models/DealAddServicesResponse.ts b/src/client/models/DealAddServicesResponse.ts deleted file mode 100644 index 3a51404..0000000 --- a/src/client/models/DealAddServicesResponse.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* generated using openapi-typescript-codegen -- do not edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export type DealAddServicesResponse = { - ok: boolean; - message: string; -}; - diff --git a/src/client/models/DealAddToGroupResponse.ts b/src/client/models/DealAddToGroupResponse.ts deleted file mode 100644 index e38365f..0000000 --- a/src/client/models/DealAddToGroupResponse.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* generated using openapi-typescript-codegen -- do not edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export type DealAddToGroupResponse = { - ok: boolean; - message: string; -}; - diff --git a/src/client/models/DealCreateGroupRequest.ts b/src/client/models/DealCreateGroupRequest.ts deleted file mode 100644 index 5a2ec1d..0000000 --- a/src/client/models/DealCreateGroupRequest.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* generated using openapi-typescript-codegen -- do not edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export type DealCreateGroupRequest = { - draggingDealId: number; - hoveredDealId: number; -}; - diff --git a/src/client/models/DealCreateGroupResponse.ts b/src/client/models/DealCreateGroupResponse.ts deleted file mode 100644 index 17393df..0000000 --- a/src/client/models/DealCreateGroupResponse.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* generated using openapi-typescript-codegen -- do not edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export type DealCreateGroupResponse = { - ok: boolean; - message: string; -}; - diff --git a/src/client/models/DealCreateGuestUrlRequest.ts b/src/client/models/DealCreateGuestUrlRequest.ts deleted file mode 100644 index 1286b5e..0000000 --- a/src/client/models/DealCreateGuestUrlRequest.ts +++ /dev/null @@ -1,8 +0,0 @@ -/* generated using openapi-typescript-codegen -- do not edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export type DealCreateGuestUrlRequest = { - dealId: number; -}; - diff --git a/src/client/models/DealDeleteProductResponse.ts b/src/client/models/DealDeleteProductResponse.ts deleted file mode 100644 index 6c62810..0000000 --- a/src/client/models/DealDeleteProductResponse.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* generated using openapi-typescript-codegen -- do not edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export type DealDeleteProductResponse = { - ok: boolean; - message: string; -}; - diff --git a/src/client/models/DealDeleteProductsResponse.ts b/src/client/models/DealDeleteProductsResponse.ts deleted file mode 100644 index fefb43f..0000000 --- a/src/client/models/DealDeleteProductsResponse.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* generated using openapi-typescript-codegen -- do not edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export type DealDeleteProductsResponse = { - ok: boolean; - message: string; -}; - diff --git a/src/client/models/DealDeleteServiceResponse.ts b/src/client/models/DealDeleteServiceResponse.ts deleted file mode 100644 index 91f25d6..0000000 --- a/src/client/models/DealDeleteServiceResponse.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* generated using openapi-typescript-codegen -- do not edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export type DealDeleteServiceResponse = { - ok: boolean; - message: string; -}; - diff --git a/src/client/models/DealDeleteServicesResponse.ts b/src/client/models/DealDeleteServicesResponse.ts deleted file mode 100644 index 6a97f58..0000000 --- a/src/client/models/DealDeleteServicesResponse.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* generated using openapi-typescript-codegen -- do not edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export type DealDeleteServicesResponse = { - ok: boolean; - message: string; -}; - diff --git a/src/client/models/DealGeneralInfoSchema.ts b/src/client/models/DealGeneralInfoSchema.ts deleted file mode 100644 index 95157b9..0000000 --- a/src/client/models/DealGeneralInfoSchema.ts +++ /dev/null @@ -1,21 +0,0 @@ -/* generated using openapi-typescript-codegen -- do not edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { BoardSchema } from './BoardSchema'; -import type { StatusSchema } from './StatusSchema'; -import type { UserSchema } from './UserSchema'; -export type DealGeneralInfoSchema = { - name: string; - isDeleted: boolean; - isCompleted: boolean; - isAccounted: boolean; - comment: string; - shippingWarehouse?: (string | null); - deliveryDate?: (string | null); - receivingSlotDate?: (string | null); - manager?: (UserSchema | null); - board: BoardSchema; - status: StatusSchema; -}; - diff --git a/src/client/models/DealGetAllResponse.ts b/src/client/models/DealGetAllResponse.ts deleted file mode 100644 index 7b58a45..0000000 --- a/src/client/models/DealGetAllResponse.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* generated using openapi-typescript-codegen -- do not edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { DealSchema } from './DealSchema'; -export type DealGetAllResponse = { - deals: Array; -}; - diff --git a/src/client/models/DealGroupChangeStatusResponse.ts b/src/client/models/DealGroupChangeStatusResponse.ts deleted file mode 100644 index 89be5a8..0000000 --- a/src/client/models/DealGroupChangeStatusResponse.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* generated using openapi-typescript-codegen -- do not edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export type DealGroupChangeStatusResponse = { - ok: boolean; - message: string; -}; - diff --git a/src/client/models/DealGroupUpdateRequest.ts b/src/client/models/DealGroupUpdateRequest.ts deleted file mode 100644 index d017140..0000000 --- a/src/client/models/DealGroupUpdateRequest.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* generated using openapi-typescript-codegen -- do not edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { DealGroupSchema } from './DealGroupSchema'; -export type DealGroupUpdateRequest = { - data: DealGroupSchema; -}; - diff --git a/src/client/models/DealGroupUpdateResponse.ts b/src/client/models/DealGroupUpdateResponse.ts deleted file mode 100644 index 5d2bced..0000000 --- a/src/client/models/DealGroupUpdateResponse.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* generated using openapi-typescript-codegen -- do not edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export type DealGroupUpdateResponse = { - ok: boolean; - message: string; -}; - diff --git a/src/client/models/DealPrefillRequest.ts b/src/client/models/DealPrefillRequest.ts deleted file mode 100644 index f5820d2..0000000 --- a/src/client/models/DealPrefillRequest.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* generated using openapi-typescript-codegen -- do not edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export type DealPrefillRequest = { - oldDealId: number; - newDealId: number; -}; - diff --git a/src/client/models/DealProductAddKitResponse.ts b/src/client/models/DealProductAddKitResponse.ts deleted file mode 100644 index 9d7ee54..0000000 --- a/src/client/models/DealProductAddKitResponse.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* generated using openapi-typescript-codegen -- do not edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export type DealProductAddKitResponse = { - ok: boolean; - message: string; -}; - diff --git a/src/client/models/DealQuickCreateResponse.ts b/src/client/models/DealQuickCreateResponse.ts deleted file mode 100644 index f48342a..0000000 --- a/src/client/models/DealQuickCreateResponse.ts +++ /dev/null @@ -1,8 +0,0 @@ -/* generated using openapi-typescript-codegen -- do not edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export type DealQuickCreateResponse = { - dealId: number; -}; - diff --git a/src/client/models/DealRecalculatePriceRequest.ts b/src/client/models/DealRecalculatePriceRequest.ts deleted file mode 100644 index 0f0623f..0000000 --- a/src/client/models/DealRecalculatePriceRequest.ts +++ /dev/null @@ -1,8 +0,0 @@ -/* generated using openapi-typescript-codegen -- do not edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export type DealRecalculatePriceRequest = { - dealId: number; -}; - diff --git a/src/client/models/DealRecalculatePriceResponse.ts b/src/client/models/DealRecalculatePriceResponse.ts deleted file mode 100644 index d1c4a12..0000000 --- a/src/client/models/DealRecalculatePriceResponse.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* generated using openapi-typescript-codegen -- do not edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export type DealRecalculatePriceResponse = { - ok: boolean; - message: string; -}; - diff --git a/src/client/models/DealRemoveFromGroupRequest.ts b/src/client/models/DealRemoveFromGroupRequest.ts deleted file mode 100644 index 139a2e8..0000000 --- a/src/client/models/DealRemoveFromGroupRequest.ts +++ /dev/null @@ -1,8 +0,0 @@ -/* generated using openapi-typescript-codegen -- do not edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export type DealRemoveFromGroupRequest = { - dealId: number; -}; - diff --git a/src/client/models/DealRemoveFromGroupResponse.ts b/src/client/models/DealRemoveFromGroupResponse.ts deleted file mode 100644 index 8f772d7..0000000 --- a/src/client/models/DealRemoveFromGroupResponse.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* generated using openapi-typescript-codegen -- do not edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export type DealRemoveFromGroupResponse = { - ok: boolean; - message: string; -}; - diff --git a/src/client/models/DealSchema.ts b/src/client/models/DealSchema.ts deleted file mode 100644 index 8e99371..0000000 --- a/src/client/models/DealSchema.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* generated using openapi-typescript-codegen -- do not edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { BoardSchema } from './BoardSchema'; -import type { BoxSchema } from './BoxSchema'; -import type { ClientSchema } from './ClientSchema'; -import type { DealBillRequestSchema } from './DealBillRequestSchema'; -import type { DealEmployeesSchema } from './DealEmployeesSchema'; -import type { DealGroupSchema } from './DealGroupSchema'; -import type { DealProductSchema } from './DealProductSchema'; -import type { DealServiceSchema } from './DealServiceSchema'; -import type { DealStatusHistorySchema } from './DealStatusHistorySchema'; -import type { PalletSchema } from './PalletSchema'; -import type { ShippingWarehouseSchema } from './ShippingWarehouseSchema'; -import type { StatusSchema } from './StatusSchema'; -import type { UserSchema } from './UserSchema'; -export type DealSchema = { - id: number; - name: string; - clientId: number; - createdAt: string; - status: StatusSchema; - board: BoardSchema; - services: Array; - products: Array; - statusHistory: Array; - isDeleted: boolean; - isCompleted: boolean; - isLocked: boolean; - isAccounted: boolean; - client: ClientSchema; - comment: string; - shippingWarehouse?: (ShippingWarehouseSchema | string | null); - billRequest?: (DealBillRequestSchema | null); - group?: (DealGroupSchema | null); - manager?: (UserSchema | null); - pallets?: Array; - boxes?: Array; - employees?: Array; - deliveryDate?: (string | null); - receivingSlotDate?: (string | null); -}; - diff --git a/src/client/models/DealServicesCopyResponse.ts b/src/client/models/DealServicesCopyResponse.ts deleted file mode 100644 index 8132509..0000000 --- a/src/client/models/DealServicesCopyResponse.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* generated using openapi-typescript-codegen -- do not edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export type DealServicesCopyResponse = { - ok: boolean; - message: string; -}; - diff --git a/src/client/models/DealSummaryResponse.ts b/src/client/models/DealSummaryResponse.ts deleted file mode 100644 index 5b880de..0000000 --- a/src/client/models/DealSummaryResponse.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* generated using openapi-typescript-codegen -- do not edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { DealSummary } from './DealSummary'; -export type DealSummaryResponse = { - summaries: Array; -}; - diff --git a/src/client/models/DealUpdateGeneralInfoRequest.ts b/src/client/models/DealUpdateGeneralInfoRequest.ts deleted file mode 100644 index eb8d936..0000000 --- a/src/client/models/DealUpdateGeneralInfoRequest.ts +++ /dev/null @@ -1,10 +0,0 @@ -/* generated using openapi-typescript-codegen -- do not edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { DealGeneralInfoSchema } from './DealGeneralInfoSchema'; -export type DealUpdateGeneralInfoRequest = { - dealId: number; - data: DealGeneralInfoSchema; -}; - diff --git a/src/client/models/DealUpdateGeneralInfoResponse.ts b/src/client/models/DealUpdateGeneralInfoResponse.ts deleted file mode 100644 index a979cf8..0000000 --- a/src/client/models/DealUpdateGeneralInfoResponse.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* generated using openapi-typescript-codegen -- do not edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export type DealUpdateGeneralInfoResponse = { - ok: boolean; - message: string; -}; - diff --git a/src/client/models/DealUpdateProductQuantityResponse.ts b/src/client/models/DealUpdateProductQuantityResponse.ts deleted file mode 100644 index 2ca92a3..0000000 --- a/src/client/models/DealUpdateProductQuantityResponse.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* generated using openapi-typescript-codegen -- do not edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export type DealUpdateProductQuantityResponse = { - ok: boolean; - message: string; -}; - diff --git a/src/client/models/DealUpdateProductRequest.ts b/src/client/models/DealUpdateProductRequest.ts deleted file mode 100644 index d48282b..0000000 --- a/src/client/models/DealUpdateProductRequest.ts +++ /dev/null @@ -1,10 +0,0 @@ -/* generated using openapi-typescript-codegen -- do not edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { DealProductSchema } from './DealProductSchema'; -export type DealUpdateProductRequest = { - dealId: number; - product: DealProductSchema; -}; - diff --git a/src/client/models/DealUpdateProductResponse.ts b/src/client/models/DealUpdateProductResponse.ts deleted file mode 100644 index a637b46..0000000 --- a/src/client/models/DealUpdateProductResponse.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* generated using openapi-typescript-codegen -- do not edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export type DealUpdateProductResponse = { - ok: boolean; - message: string; -}; - diff --git a/src/client/models/DealUpdateServiceQuantityResponse.ts b/src/client/models/DealUpdateServiceQuantityResponse.ts deleted file mode 100644 index a1efb55..0000000 --- a/src/client/models/DealUpdateServiceQuantityResponse.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* generated using openapi-typescript-codegen -- do not edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export type DealUpdateServiceQuantityResponse = { - ok: boolean; - message: string; -}; - diff --git a/src/client/models/DealUpdateServiceRequest.ts b/src/client/models/DealUpdateServiceRequest.ts deleted file mode 100644 index 6271c62..0000000 --- a/src/client/models/DealUpdateServiceRequest.ts +++ /dev/null @@ -1,10 +0,0 @@ -/* generated using openapi-typescript-codegen -- do not edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { DealServiceSchema } from './DealServiceSchema'; -export type DealUpdateServiceRequest = { - dealId: number; - service: DealServiceSchema; -}; - diff --git a/src/client/models/DealUpdateServiceResponse.ts b/src/client/models/DealUpdateServiceResponse.ts deleted file mode 100644 index 5783931..0000000 --- a/src/client/models/DealUpdateServiceResponse.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* generated using openapi-typescript-codegen -- do not edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export type DealUpdateServiceResponse = { - ok: boolean; - message: string; -}; - diff --git a/src/client/models/DeleteAttributeResponse.ts b/src/client/models/DeleteAttributeResponse.ts new file mode 100644 index 0000000..e018d2f --- /dev/null +++ b/src/client/models/DeleteAttributeResponse.ts @@ -0,0 +1,9 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type DeleteAttributeResponse = { + ok: boolean; + message: string; +}; + diff --git a/src/client/models/DeleteTagResponse.ts b/src/client/models/DeleteTagResponse.ts new file mode 100644 index 0000000..ca5e290 --- /dev/null +++ b/src/client/models/DeleteTagResponse.ts @@ -0,0 +1,9 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type DeleteTagResponse = { + ok: boolean; + message: string; +}; + diff --git a/src/client/models/FullProjectSchema.ts b/src/client/models/FullProjectSchema.ts new file mode 100644 index 0000000..d381dd9 --- /dev/null +++ b/src/client/models/FullProjectSchema.ts @@ -0,0 +1,16 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { AttributeSchema } from './AttributeSchema'; +import type { CardTagSchema } from './CardTagSchema'; +import type { ModuleSchema } from './ModuleSchema'; +export type FullProjectSchema = { + name: string; + id: number; + attributes: Array; + modules: Array; + tags: Array; + boardsCount: number; +}; + diff --git a/src/client/models/GetAllModulesResponse.ts b/src/client/models/GetAllModulesResponse.ts new file mode 100644 index 0000000..c4d8a79 --- /dev/null +++ b/src/client/models/GetAllModulesResponse.ts @@ -0,0 +1,9 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { ModuleSchema } from './ModuleSchema'; +export type GetAllModulesResponse = { + modules: Array; +}; + diff --git a/src/client/models/GetAttributeTypesResponse.ts b/src/client/models/GetAttributeTypesResponse.ts new file mode 100644 index 0000000..e7e0e17 --- /dev/null +++ b/src/client/models/GetAttributeTypesResponse.ts @@ -0,0 +1,9 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { AttributeTypeSchema } from './AttributeTypeSchema'; +export type GetAttributeTypesResponse = { + types: Array; +}; + diff --git a/src/client/models/GetAttributesResponse.ts b/src/client/models/GetAttributesResponse.ts new file mode 100644 index 0000000..d6658d1 --- /dev/null +++ b/src/client/models/GetAttributesResponse.ts @@ -0,0 +1,9 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { AttributeSchema } from './AttributeSchema'; +export type GetAttributesResponse = { + attributes: Array; +}; + diff --git a/src/client/models/GetDealBillById.ts b/src/client/models/GetCardBillById.ts similarity index 51% rename from src/client/models/GetDealBillById.ts rename to src/client/models/GetCardBillById.ts index a7dd7ee..28bcac2 100644 --- a/src/client/models/GetDealBillById.ts +++ b/src/client/models/GetCardBillById.ts @@ -2,8 +2,8 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { DealBillRequestSchema } from './DealBillRequestSchema'; -export type GetDealBillById = { - dealBill: DealBillRequestSchema; +import type { CardBillRequestSchema } from './CardBillRequestSchema'; +export type GetCardBillById = { + cardBill: CardBillRequestSchema; }; diff --git a/src/client/models/GetCardProductsBarcodesPdfRequest.ts b/src/client/models/GetCardProductsBarcodesPdfRequest.ts new file mode 100644 index 0000000..a359242 --- /dev/null +++ b/src/client/models/GetCardProductsBarcodesPdfRequest.ts @@ -0,0 +1,8 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type GetCardProductsBarcodesPdfRequest = { + cardId: number; +}; + diff --git a/src/client/models/GetDealProductsBarcodesPdfResponse.ts b/src/client/models/GetCardProductsBarcodesPdfResponse.ts similarity index 80% rename from src/client/models/GetDealProductsBarcodesPdfResponse.ts rename to src/client/models/GetCardProductsBarcodesPdfResponse.ts index a4edb0a..bc3cd0f 100644 --- a/src/client/models/GetDealProductsBarcodesPdfResponse.ts +++ b/src/client/models/GetCardProductsBarcodesPdfResponse.ts @@ -2,7 +2,7 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -export type GetDealProductsBarcodesPdfResponse = { +export type GetCardProductsBarcodesPdfResponse = { base64String: string; filename: string; mimeType: string; diff --git a/src/client/models/GetDealProductsBarcodesPdfRequest.ts b/src/client/models/GetDealProductsBarcodesPdfRequest.ts deleted file mode 100644 index d12f5e2..0000000 --- a/src/client/models/GetDealProductsBarcodesPdfRequest.ts +++ /dev/null @@ -1,8 +0,0 @@ -/* generated using openapi-typescript-codegen -- do not edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export type GetDealProductsBarcodesPdfRequest = { - dealId: number; -}; - diff --git a/src/client/models/GetProfitChartDataRequest.ts b/src/client/models/GetProfitChartDataRequest.ts index 82037ea..8b6ee34 100644 --- a/src/client/models/GetProfitChartDataRequest.ts +++ b/src/client/models/GetProfitChartDataRequest.ts @@ -8,7 +8,8 @@ export type GetProfitChartDataRequest = { baseMarketplaceKey: string; projectId: number; boardId: number; - dealStatusId: number; + cardStatusId: number; + cardTagId: number; managerId: number; expenseTagId: number; incomeTagId: number; diff --git a/src/client/models/GetProfitTableDataRequest.ts b/src/client/models/GetProfitTableDataRequest.ts index 38b12e3..cef06e4 100644 --- a/src/client/models/GetProfitTableDataRequest.ts +++ b/src/client/models/GetProfitTableDataRequest.ts @@ -9,7 +9,8 @@ export type GetProfitTableDataRequest = { baseMarketplaceKey: string; projectId: number; boardId: number; - dealStatusId: number; + cardStatusId: number; + cardTagId: number; managerId: number; expenseTagId: number; incomeTagId: number; diff --git a/src/client/models/GetProjectsResponse.ts b/src/client/models/GetProjectsResponse.ts index c4346fd..d2fda8b 100644 --- a/src/client/models/GetProjectsResponse.ts +++ b/src/client/models/GetProjectsResponse.ts @@ -2,8 +2,8 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { ProjectSchemaWithCount } from './ProjectSchemaWithCount'; +import type { FullProjectSchema } from './FullProjectSchema'; export type GetProjectsResponse = { - projects: Array; + projects: Array; }; diff --git a/src/client/models/ManageEmployeeRequest.ts b/src/client/models/ManageEmployeeRequest.ts index 0f1a05d..cc1813a 100644 --- a/src/client/models/ManageEmployeeRequest.ts +++ b/src/client/models/ManageEmployeeRequest.ts @@ -3,7 +3,7 @@ /* tslint:disable */ /* eslint-disable */ export type ManageEmployeeRequest = { - dealId: number; + cardId: number; userId: number; isAssign: boolean; }; diff --git a/src/client/models/ModuleSchema.ts b/src/client/models/ModuleSchema.ts new file mode 100644 index 0000000..d29dcd8 --- /dev/null +++ b/src/client/models/ModuleSchema.ts @@ -0,0 +1,12 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type ModuleSchema = { + id: number; + key: string; + label: string; + iconName?: (string | null); + isDeleted: boolean; +}; + diff --git a/src/client/models/ParseDealsExcelResponse.ts b/src/client/models/ParseCardsExcelResponse.ts similarity index 87% rename from src/client/models/ParseDealsExcelResponse.ts rename to src/client/models/ParseCardsExcelResponse.ts index 0615eac..0868b56 100644 --- a/src/client/models/ParseDealsExcelResponse.ts +++ b/src/client/models/ParseCardsExcelResponse.ts @@ -3,7 +3,7 @@ /* tslint:disable */ /* eslint-disable */ import type { ParsedProductRowSchema } from './ParsedProductRowSchema'; -export type ParseDealsExcelResponse = { +export type ParseCardsExcelResponse = { rows: Array; errors: Array; }; diff --git a/src/client/models/ProductsAndServicesGeneralInfoRequest.ts b/src/client/models/ProductsAndServicesGeneralInfoRequest.ts new file mode 100644 index 0000000..76034d9 --- /dev/null +++ b/src/client/models/ProductsAndServicesGeneralInfoRequest.ts @@ -0,0 +1,10 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { ProductsAndServicesGeneralInfoSchema } from './ProductsAndServicesGeneralInfoSchema'; +export type ProductsAndServicesGeneralInfoRequest = { + cardId: number; + data: ProductsAndServicesGeneralInfoSchema; +}; + diff --git a/src/client/models/ProductsAndServicesGeneralInfoResponse.ts b/src/client/models/ProductsAndServicesGeneralInfoResponse.ts new file mode 100644 index 0000000..96c8b4e --- /dev/null +++ b/src/client/models/ProductsAndServicesGeneralInfoResponse.ts @@ -0,0 +1,9 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type ProductsAndServicesGeneralInfoResponse = { + ok: boolean; + message: string; +}; + diff --git a/src/client/models/ProductsAndServicesGeneralInfoSchema.ts b/src/client/models/ProductsAndServicesGeneralInfoSchema.ts new file mode 100644 index 0000000..925874f --- /dev/null +++ b/src/client/models/ProductsAndServicesGeneralInfoSchema.ts @@ -0,0 +1,9 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type ProductsAndServicesGeneralInfoSchema = { + shippingWarehouse?: (string | null); + isServicesProfitAccounted: boolean; +}; + diff --git a/src/client/models/ProfitChartDataItem.ts b/src/client/models/ProfitChartDataItem.ts index 1ed5684..55a3ce9 100644 --- a/src/client/models/ProfitChartDataItem.ts +++ b/src/client/models/ProfitChartDataItem.ts @@ -7,6 +7,6 @@ export type ProfitChartDataItem = { revenue: number; profit: number; expenses: number; - dealsCount: number; + cardsCount: number; }; diff --git a/src/client/models/ProfitTableDataItem.ts b/src/client/models/ProfitTableDataItem.ts index 52790ea..8e7c155 100644 --- a/src/client/models/ProfitTableDataItem.ts +++ b/src/client/models/ProfitTableDataItem.ts @@ -7,6 +7,6 @@ export type ProfitTableDataItem = { revenue: number; profit: number; expenses?: (number | null); - dealsCount: number; + cardsCount: number; }; diff --git a/src/client/models/ProfitTableGroupBy.ts b/src/client/models/ProfitTableGroupBy.ts index 6abd188..9e3e89e 100644 --- a/src/client/models/ProfitTableGroupBy.ts +++ b/src/client/models/ProfitTableGroupBy.ts @@ -2,4 +2,4 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -export type ProfitTableGroupBy = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7; +export type ProfitTableGroupBy = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8; diff --git a/src/client/models/ProjectGeneralInfoSchema.ts b/src/client/models/ProjectGeneralInfoSchema.ts new file mode 100644 index 0000000..954d507 --- /dev/null +++ b/src/client/models/ProjectGeneralInfoSchema.ts @@ -0,0 +1,9 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type ProjectGeneralInfoSchema = { + name: string; + id: number; +}; + diff --git a/src/client/models/ProjectSchema.ts b/src/client/models/ProjectSchema.ts index b51bfc8..81dae02 100644 --- a/src/client/models/ProjectSchema.ts +++ b/src/client/models/ProjectSchema.ts @@ -2,8 +2,14 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ +import type { AttributeSchema } from './AttributeSchema'; +import type { CardTagSchema } from './CardTagSchema'; +import type { ModuleSchema } from './ModuleSchema'; export type ProjectSchema = { name: string; id: number; + attributes: Array; + modules: Array; + tags: Array; }; diff --git a/src/client/models/ServiceCategorySchema.ts b/src/client/models/ServiceCategorySchema.ts index f0ebfc6..3dd51d3 100644 --- a/src/client/models/ServiceCategorySchema.ts +++ b/src/client/models/ServiceCategorySchema.ts @@ -5,7 +5,7 @@ export type ServiceCategorySchema = { id: number; name: string; - dealServiceRank: string; + cardServiceRank: string; productServiceRank: string; }; diff --git a/src/client/models/ShippingProductSchema.ts b/src/client/models/ShippingProductSchema.ts index 858c323..41b9e6d 100644 --- a/src/client/models/ShippingProductSchema.ts +++ b/src/client/models/ShippingProductSchema.ts @@ -7,6 +7,7 @@ export type ShippingProductSchema = { id: number; quantity: number; product: ProductSchema; - palletId: number; + palletId: (number | null); + boxId: (number | null); }; diff --git a/src/client/models/SwitchTagRequest.ts b/src/client/models/SwitchTagRequest.ts new file mode 100644 index 0000000..57095fa --- /dev/null +++ b/src/client/models/SwitchTagRequest.ts @@ -0,0 +1,10 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type SwitchTagRequest = { + tagId: number; + cardId?: (number | null); + groupId?: (number | null); +}; + diff --git a/src/client/models/SwitchTagResponse.ts b/src/client/models/SwitchTagResponse.ts new file mode 100644 index 0000000..d3bb911 --- /dev/null +++ b/src/client/models/SwitchTagResponse.ts @@ -0,0 +1,9 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type SwitchTagResponse = { + ok: boolean; + message: string; +}; + diff --git a/src/client/models/UpdateAttributeRequest.ts b/src/client/models/UpdateAttributeRequest.ts new file mode 100644 index 0000000..74a32c4 --- /dev/null +++ b/src/client/models/UpdateAttributeRequest.ts @@ -0,0 +1,9 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { AttributeSchema } from './AttributeSchema'; +export type UpdateAttributeRequest = { + attribute: AttributeSchema; +}; + diff --git a/src/client/models/UpdateAttributeResponse.ts b/src/client/models/UpdateAttributeResponse.ts new file mode 100644 index 0000000..00e182c --- /dev/null +++ b/src/client/models/UpdateAttributeResponse.ts @@ -0,0 +1,9 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type UpdateAttributeResponse = { + ok: boolean; + message: string; +}; + diff --git a/src/client/models/UpdateAttributesRequest.ts b/src/client/models/UpdateAttributesRequest.ts new file mode 100644 index 0000000..3e847aa --- /dev/null +++ b/src/client/models/UpdateAttributesRequest.ts @@ -0,0 +1,9 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type UpdateAttributesRequest = { + projectId: number; + attributeIds: Array; +}; + diff --git a/src/client/models/UpdateAttributesResponse.ts b/src/client/models/UpdateAttributesResponse.ts new file mode 100644 index 0000000..d24d78c --- /dev/null +++ b/src/client/models/UpdateAttributesResponse.ts @@ -0,0 +1,9 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type UpdateAttributesResponse = { + ok: boolean; + message: string; +}; + diff --git a/src/client/models/UpdateBoxRequest.ts b/src/client/models/UpdateBoxRequest.ts deleted file mode 100644 index 8bfbaa8..0000000 --- a/src/client/models/UpdateBoxRequest.ts +++ /dev/null @@ -1,11 +0,0 @@ -/* generated using openapi-typescript-codegen -- do not edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { CreateBoxInDealSchema } from './CreateBoxInDealSchema'; -import type { CreateBoxInPalletSchema } from './CreateBoxInPalletSchema'; -import type { UpdateBoxSchema } from './UpdateBoxSchema'; -export type UpdateBoxRequest = { - data: (CreateBoxInDealSchema | CreateBoxInPalletSchema | UpdateBoxSchema); -}; - diff --git a/src/client/models/UpdateBoxSchema.ts b/src/client/models/UpdateBoxSchema.ts deleted file mode 100644 index 6870bbd..0000000 --- a/src/client/models/UpdateBoxSchema.ts +++ /dev/null @@ -1,10 +0,0 @@ -/* generated using openapi-typescript-codegen -- do not edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export type UpdateBoxSchema = { - productId: (number | null); - quantity: (number | null); - boxId: (number | null); -}; - diff --git a/src/client/models/UpdateCardClientRequest.ts b/src/client/models/UpdateCardClientRequest.ts new file mode 100644 index 0000000..e795ecf --- /dev/null +++ b/src/client/models/UpdateCardClientRequest.ts @@ -0,0 +1,9 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type UpdateCardClientRequest = { + cardId: number; + clientId: number; +}; + diff --git a/src/client/models/UpdateCardClientResponse.ts b/src/client/models/UpdateCardClientResponse.ts new file mode 100644 index 0000000..8ce30a5 --- /dev/null +++ b/src/client/models/UpdateCardClientResponse.ts @@ -0,0 +1,9 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type UpdateCardClientResponse = { + ok: boolean; + message: string; +}; + diff --git a/src/client/models/UpdateCardManagerRequest.ts b/src/client/models/UpdateCardManagerRequest.ts new file mode 100644 index 0000000..90b9f43 --- /dev/null +++ b/src/client/models/UpdateCardManagerRequest.ts @@ -0,0 +1,9 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type UpdateCardManagerRequest = { + cardId: number; + managerId: (number | null); +}; + diff --git a/src/client/models/UpdateCardManagerResponse.ts b/src/client/models/UpdateCardManagerResponse.ts new file mode 100644 index 0000000..e710651 --- /dev/null +++ b/src/client/models/UpdateCardManagerResponse.ts @@ -0,0 +1,9 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type UpdateCardManagerResponse = { + ok: boolean; + message: string; +}; + diff --git a/src/client/models/UpdateModulesRequest.ts b/src/client/models/UpdateModulesRequest.ts new file mode 100644 index 0000000..aa03a22 --- /dev/null +++ b/src/client/models/UpdateModulesRequest.ts @@ -0,0 +1,9 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type UpdateModulesRequest = { + projectId: number; + moduleIds: Array; +}; + diff --git a/src/client/models/UpdateModulesResponse.ts b/src/client/models/UpdateModulesResponse.ts new file mode 100644 index 0000000..19b0b83 --- /dev/null +++ b/src/client/models/UpdateModulesResponse.ts @@ -0,0 +1,9 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type UpdateModulesResponse = { + ok: boolean; + message: string; +}; + diff --git a/src/client/models/UpdateProjectRequest.ts b/src/client/models/UpdateProjectRequest.ts index eb9e41f..db3347e 100644 --- a/src/client/models/UpdateProjectRequest.ts +++ b/src/client/models/UpdateProjectRequest.ts @@ -2,8 +2,8 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { ProjectSchema } from './ProjectSchema'; +import type { ProjectGeneralInfoSchema } from './ProjectGeneralInfoSchema'; export type UpdateProjectRequest = { - project: ProjectSchema; + project: ProjectGeneralInfoSchema; }; diff --git a/src/client/models/UpdateTagRequest.ts b/src/client/models/UpdateTagRequest.ts new file mode 100644 index 0000000..d96fdc1 --- /dev/null +++ b/src/client/models/UpdateTagRequest.ts @@ -0,0 +1,9 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { CardTagSchema } from './CardTagSchema'; +export type UpdateTagRequest = { + tag: CardTagSchema; +}; + diff --git a/src/client/models/UpdateTagResponse.ts b/src/client/models/UpdateTagResponse.ts new file mode 100644 index 0000000..ad2699e --- /dev/null +++ b/src/client/models/UpdateTagResponse.ts @@ -0,0 +1,9 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type UpdateTagResponse = { + ok: boolean; + message: string; +}; + diff --git a/src/client/services/AttributeService.ts b/src/client/services/AttributeService.ts new file mode 100644 index 0000000..fe5b193 --- /dev/null +++ b/src/client/services/AttributeService.ts @@ -0,0 +1,99 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { CreateAttributeRequest } from '../models/CreateAttributeRequest'; +import type { CreateAttributeResponse } from '../models/CreateAttributeResponse'; +import type { DeleteAttributeResponse } from '../models/DeleteAttributeResponse'; +import type { GetAttributesResponse } from '../models/GetAttributesResponse'; +import type { GetAttributeTypesResponse } from '../models/GetAttributeTypesResponse'; +import type { UpdateAttributeRequest } from '../models/UpdateAttributeRequest'; +import type { UpdateAttributeResponse } from '../models/UpdateAttributeResponse'; +import type { CancelablePromise } from '../core/CancelablePromise'; +import { OpenAPI } from '../core/OpenAPI'; +import { request as __request } from '../core/request'; +export class AttributeService { + /** + * Get All + * @returns GetAttributesResponse Successful Response + * @throws ApiError + */ + public static getAll(): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/attribute/', + }); + } + /** + * Create + * @returns CreateAttributeResponse Successful Response + * @throws ApiError + */ + public static create({ + requestBody, + }: { + requestBody: CreateAttributeRequest, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/attribute/', + body: requestBody, + mediaType: 'application/json', + errors: { + 422: `Validation Error`, + }, + }); + } + /** + * Update + * @returns UpdateAttributeResponse Successful Response + * @throws ApiError + */ + public static update({ + requestBody, + }: { + requestBody: UpdateAttributeRequest, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'PATCH', + url: '/attribute/', + body: requestBody, + mediaType: 'application/json', + errors: { + 422: `Validation Error`, + }, + }); + } + /** + * Get Types + * @returns GetAttributeTypesResponse Successful Response + * @throws ApiError + */ + public static getTypes(): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/attribute/types', + }); + } + /** + * Delete + * @returns DeleteAttributeResponse Successful Response + * @throws ApiError + */ + public static delete({ + attributeId, + }: { + attributeId: number, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'DELETE', + url: '/attribute/{attribute_id}', + path: { + 'attribute_id': attributeId, + }, + errors: { + 422: `Validation Error`, + }, + }); + } +} diff --git a/src/client/services/BillingService.ts b/src/client/services/BillingService.ts index b200d9e..27c24e1 100644 --- a/src/client/services/BillingService.ts +++ b/src/client/services/BillingService.ts @@ -3,11 +3,11 @@ /* tslint:disable */ /* eslint-disable */ import type { BillStatusUpdateRequest } from '../models/BillStatusUpdateRequest'; -import type { CancelDealBillRequest } from '../models/CancelDealBillRequest'; -import type { CancelDealBillResponse } from '../models/CancelDealBillResponse'; -import type { CreateDealBillRequest } from '../models/CreateDealBillRequest'; -import type { CreateDealBillResponse } from '../models/CreateDealBillResponse'; -import type { GetDealBillById } from '../models/GetDealBillById'; +import type { CancelCardBillRequest } from '../models/CancelCardBillRequest'; +import type { CancelCardBillResponse } from '../models/CancelCardBillResponse'; +import type { CreateCardBillRequest } from '../models/CreateCardBillRequest'; +import type { CreateCardBillResponse } from '../models/CreateCardBillResponse'; +import type { GetCardBillById } from '../models/GetCardBillById'; import type { CancelablePromise } from '../core/CancelablePromise'; import { OpenAPI } from '../core/OpenAPI'; import { request as __request } from '../core/request'; @@ -34,14 +34,14 @@ export class BillingService { } /** * Create Deal Bill - * @returns CreateDealBillResponse Successful Response + * @returns CreateCardBillResponse Successful Response * @throws ApiError */ public static createDealBill({ requestBody, }: { - requestBody: CreateDealBillRequest, - }): CancelablePromise { + requestBody: CreateCardBillRequest, + }): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/billing/create-deal-bill', @@ -54,14 +54,14 @@ export class BillingService { } /** * Cancel Deal Billing - * @returns CancelDealBillResponse Successful Response + * @returns CancelCardBillResponse Successful Response * @throws ApiError */ public static cancelDealBill({ requestBody, }: { - requestBody: CancelDealBillRequest, - }): CancelablePromise { + requestBody: CancelCardBillRequest, + }): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/billing/cancel-deal-bill', @@ -74,14 +74,14 @@ export class BillingService { } /** * Get Deal Bill By Id - * @returns GetDealBillById Successful Response + * @returns GetCardBillById Successful Response * @throws ApiError */ public static getDealBillById({ dealId, }: { dealId: number, - }): CancelablePromise { + }): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/billing/deal-bill-request/{deal_id}', diff --git a/src/client/services/DealGroupService.ts b/src/client/services/CardGroupService.ts similarity index 51% rename from src/client/services/DealGroupService.ts rename to src/client/services/CardGroupService.ts index 4b0b5e8..e51c354 100644 --- a/src/client/services/DealGroupService.ts +++ b/src/client/services/CardGroupService.ts @@ -2,33 +2,33 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { DealAddToGroupRequest } from '../models/DealAddToGroupRequest'; -import type { DealAddToGroupResponse } from '../models/DealAddToGroupResponse'; -import type { DealCreateGroupRequest } from '../models/DealCreateGroupRequest'; -import type { DealCreateGroupResponse } from '../models/DealCreateGroupResponse'; -import type { DealGroupChangeStatusRequest } from '../models/DealGroupChangeStatusRequest'; -import type { DealGroupChangeStatusResponse } from '../models/DealGroupChangeStatusResponse'; -import type { DealGroupUpdateRequest } from '../models/DealGroupUpdateRequest'; -import type { DealGroupUpdateResponse } from '../models/DealGroupUpdateResponse'; -import type { DealRemoveFromGroupRequest } from '../models/DealRemoveFromGroupRequest'; -import type { DealRemoveFromGroupResponse } from '../models/DealRemoveFromGroupResponse'; +import type { CardAddToGroupRequest } from '../models/CardAddToGroupRequest'; +import type { CardAddToGroupResponse } from '../models/CardAddToGroupResponse'; +import type { CardCreateGroupResponse } from '../models/CardCreateGroupResponse'; +import type { CardGroupChangeStatusRequest } from '../models/CardGroupChangeStatusRequest'; +import type { CardGroupChangeStatusResponse } from '../models/CardGroupChangeStatusResponse'; +import type { CardGroupUpdateRequest } from '../models/CardGroupUpdateRequest'; +import type { CardGroupUpdateResponse } from '../models/CardGroupUpdateResponse'; +import type { CardRemoveFromGroupRequest } from '../models/CardRemoveFromGroupRequest'; +import type { CardRemoveFromGroupResponse } from '../models/CardRemoveFromGroupResponse'; +import type { CreateCardGroupRequest } from '../models/CreateCardGroupRequest'; import type { CancelablePromise } from '../core/CancelablePromise'; import { OpenAPI } from '../core/OpenAPI'; import { request as __request } from '../core/request'; -export class DealGroupService { +export class CardGroupService { /** * Create Group - * @returns DealCreateGroupResponse Successful Response + * @returns CardCreateGroupResponse Successful Response * @throws ApiError */ - public static createDealGroup({ + public static createCardGroup({ requestBody, }: { - requestBody: DealCreateGroupRequest, - }): CancelablePromise { + requestBody: CreateCardGroupRequest, + }): CancelablePromise { return __request(OpenAPI, { method: 'POST', - url: '/deal-group/', + url: '/card-group/', body: requestBody, mediaType: 'application/json', errors: { @@ -38,17 +38,17 @@ export class DealGroupService { } /** * Update Group - * @returns DealGroupUpdateResponse Successful Response + * @returns CardGroupUpdateResponse Successful Response * @throws ApiError */ - public static updateDealGroup({ + public static updateCardGroup({ requestBody, }: { - requestBody: DealGroupUpdateRequest, - }): CancelablePromise { + requestBody: CardGroupUpdateRequest, + }): CancelablePromise { return __request(OpenAPI, { method: 'PATCH', - url: '/deal-group/', + url: '/card-group/', body: requestBody, mediaType: 'application/json', errors: { @@ -58,17 +58,17 @@ export class DealGroupService { } /** * Change Status - * @returns DealGroupChangeStatusResponse Successful Response + * @returns CardGroupChangeStatusResponse Successful Response * @throws ApiError */ public static changeStatus({ requestBody, }: { - requestBody: DealGroupChangeStatusRequest, - }): CancelablePromise { + requestBody: CardGroupChangeStatusRequest, + }): CancelablePromise { return __request(OpenAPI, { method: 'PATCH', - url: '/deal-group/change-status', + url: '/card-group/change-status', body: requestBody, mediaType: 'application/json', errors: { @@ -77,18 +77,18 @@ export class DealGroupService { }); } /** - * Add Deal - * @returns DealAddToGroupResponse Successful Response + * Add Card + * @returns CardAddToGroupResponse Successful Response * @throws ApiError */ - public static addDeal({ + public static addCard({ requestBody, }: { - requestBody: DealAddToGroupRequest, - }): CancelablePromise { + requestBody: CardAddToGroupRequest, + }): CancelablePromise { return __request(OpenAPI, { method: 'POST', - url: '/deal-group/deal', + url: '/card-group/card', body: requestBody, mediaType: 'application/json', errors: { @@ -97,18 +97,18 @@ export class DealGroupService { }); } /** - * Remove Deal - * @returns DealRemoveFromGroupResponse Successful Response + * Remove Card + * @returns CardRemoveFromGroupResponse Successful Response * @throws ApiError */ - public static removeDeal({ + public static removeCard({ requestBody, }: { - requestBody: DealRemoveFromGroupRequest, - }): CancelablePromise { + requestBody: CardRemoveFromGroupRequest, + }): CancelablePromise { return __request(OpenAPI, { method: 'DELETE', - url: '/deal-group/deal', + url: '/card-group/card', body: requestBody, mediaType: 'application/json', errors: { diff --git a/src/client/services/CardService.ts b/src/client/services/CardService.ts new file mode 100644 index 0000000..8d4fa36 --- /dev/null +++ b/src/client/services/CardService.ts @@ -0,0 +1,788 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { Body_parse_deals_excel } from '../models/Body_parse_deals_excel'; +import type { CardAddKitRequest } from '../models/CardAddKitRequest'; +import type { CardAddKitResponse } from '../models/CardAddKitResponse'; +import type { CardAddProductRequest } from '../models/CardAddProductRequest'; +import type { CardAddProductResponse } from '../models/CardAddProductResponse'; +import type { CardAddServiceRequest } from '../models/CardAddServiceRequest'; +import type { CardAddServiceResponse } from '../models/CardAddServiceResponse'; +import type { CardAddServicesRequest } from '../models/CardAddServicesRequest'; +import type { CardAddServicesResponse } from '../models/CardAddServicesResponse'; +import type { CardChangeStatusRequest } from '../models/CardChangeStatusRequest'; +import type { CardChangeStatusResponse } from '../models/CardChangeStatusResponse'; +import type { CardCompleteRequest } from '../models/CardCompleteRequest'; +import type { CardCompleteResponse } from '../models/CardCompleteResponse'; +import type { CardCreateGuestUrlRequest } from '../models/CardCreateGuestUrlRequest'; +import type { CardCreateGuestUrlResponse } from '../models/CardCreateGuestUrlResponse'; +import type { CardDeleteProductRequest } from '../models/CardDeleteProductRequest'; +import type { CardDeleteProductResponse } from '../models/CardDeleteProductResponse'; +import type { CardDeleteProductsRequest } from '../models/CardDeleteProductsRequest'; +import type { CardDeleteProductsResponse } from '../models/CardDeleteProductsResponse'; +import type { CardDeleteRequest } from '../models/CardDeleteRequest'; +import type { CardDeleteResponse } from '../models/CardDeleteResponse'; +import type { CardDeleteServiceRequest } from '../models/CardDeleteServiceRequest'; +import type { CardDeleteServiceResponse } from '../models/CardDeleteServiceResponse'; +import type { CardDeleteServicesRequest } from '../models/CardDeleteServicesRequest'; +import type { CardDeleteServicesResponse } from '../models/CardDeleteServicesResponse'; +import type { CardGetAllResponse } from '../models/CardGetAllResponse'; +import type { CardPrefillRequest } from '../models/CardPrefillRequest'; +import type { CardPrefillResponse } from '../models/CardPrefillResponse'; +import type { CardProductAddKitRequest } from '../models/CardProductAddKitRequest'; +import type { CardProductAddKitResponse } from '../models/CardProductAddKitResponse'; +import type { CardQuickCreateRequest } from '../models/CardQuickCreateRequest'; +import type { CardQuickCreateResponse } from '../models/CardQuickCreateResponse'; +import type { CardRecalculatePriceRequest } from '../models/CardRecalculatePriceRequest'; +import type { CardRecalculatePriceResponse } from '../models/CardRecalculatePriceResponse'; +import type { CardSchema } from '../models/CardSchema'; +import type { CardServicesCopyRequest } from '../models/CardServicesCopyRequest'; +import type { CardServicesCopyResponse } from '../models/CardServicesCopyResponse'; +import type { CardSummaryReorderRequest } from '../models/CardSummaryReorderRequest'; +import type { CardSummaryResponse } from '../models/CardSummaryResponse'; +import type { CardUpdateGeneralInfoRequest } from '../models/CardUpdateGeneralInfoRequest'; +import type { CardUpdateGeneralInfoResponse } from '../models/CardUpdateGeneralInfoResponse'; +import type { CardUpdateProductQuantityRequest } from '../models/CardUpdateProductQuantityRequest'; +import type { CardUpdateProductQuantityResponse } from '../models/CardUpdateProductQuantityResponse'; +import type { CardUpdateProductRequest } from '../models/CardUpdateProductRequest'; +import type { CardUpdateProductResponse } from '../models/CardUpdateProductResponse'; +import type { CardUpdateServiceQuantityRequest } from '../models/CardUpdateServiceQuantityRequest'; +import type { CardUpdateServiceQuantityResponse } from '../models/CardUpdateServiceQuantityResponse'; +import type { CardUpdateServiceRequest } from '../models/CardUpdateServiceRequest'; +import type { CardUpdateServiceResponse } from '../models/CardUpdateServiceResponse'; +import type { CreateCardsFromExcelRequest } from '../models/CreateCardsFromExcelRequest'; +import type { CreateCardsFromExcelResponse } from '../models/CreateCardsFromExcelResponse'; +import type { GetAvailableEmployeesToAssignResponse } from '../models/GetAvailableEmployeesToAssignResponse'; +import type { GetCardProductsBarcodesPdfRequest } from '../models/GetCardProductsBarcodesPdfRequest'; +import type { GetCardProductsBarcodesPdfResponse } from '../models/GetCardProductsBarcodesPdfResponse'; +import type { ManageEmployeeRequest } from '../models/ManageEmployeeRequest'; +import type { ManageEmployeeResponse } from '../models/ManageEmployeeResponse'; +import type { ParseCardsExcelResponse } from '../models/ParseCardsExcelResponse'; +import type { ProductsAndServicesGeneralInfoRequest } from '../models/ProductsAndServicesGeneralInfoRequest'; +import type { ProductsAndServicesGeneralInfoResponse } from '../models/ProductsAndServicesGeneralInfoResponse'; +import type { UpdateCardClientRequest } from '../models/UpdateCardClientRequest'; +import type { UpdateCardClientResponse } from '../models/UpdateCardClientResponse'; +import type { UpdateCardManagerRequest } from '../models/UpdateCardManagerRequest'; +import type { UpdateCardManagerResponse } from '../models/UpdateCardManagerResponse'; +import type { CancelablePromise } from '../core/CancelablePromise'; +import { OpenAPI } from '../core/OpenAPI'; +import { request as __request } from '../core/request'; +export class CardService { + /** + * Delete + * @returns CardDeleteResponse Successful Response + * @throws ApiError + */ + public static deleteCard({ + requestBody, + }: { + requestBody: CardDeleteRequest, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/card/delete', + body: requestBody, + mediaType: 'application/json', + errors: { + 422: `Validation Error`, + }, + }); + } + /** + * Complete + * @returns CardCompleteResponse Successful Response + * @throws ApiError + */ + public static completeCard({ + requestBody, + }: { + requestBody: CardCompleteRequest, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/card/complete', + body: requestBody, + mediaType: 'application/json', + errors: { + 422: `Validation Error`, + }, + }); + } + /** + * Quick Create + * @returns CardQuickCreateResponse Successful Response + * @throws ApiError + */ + public static quickCreateCardQuickCreatePost({ + requestBody, + }: { + requestBody: CardQuickCreateRequest, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/card/quickCreate', + body: requestBody, + mediaType: 'application/json', + errors: { + 422: `Validation Error`, + }, + }); + } + /** + * Change Status + * @returns CardChangeStatusResponse Successful Response + * @throws ApiError + */ + public static changeStatusCardChangeStatusPost({ + requestBody, + }: { + requestBody: CardChangeStatusRequest, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/card/changeStatus', + body: requestBody, + mediaType: 'application/json', + errors: { + 422: `Validation Error`, + }, + }); + } + /** + * Get Summary + * @returns CardSummaryResponse Successful Response + * @throws ApiError + */ + public static getCardSummaries({ + full, + }: { + full: (boolean | null), + }): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/card/summaries', + query: { + 'full': full, + }, + errors: { + 422: `Validation Error`, + }, + }); + } + /** + * Reorder + * @returns CardSummaryResponse Successful Response + * @throws ApiError + */ + public static reorderCardSummaries({ + requestBody, + }: { + requestBody: CardSummaryReorderRequest, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/card/summaries/reorder', + body: requestBody, + mediaType: 'application/json', + errors: { + 422: `Validation Error`, + }, + }); + } + /** + * Get All + * @returns CardGetAllResponse Successful Response + * @throws ApiError + */ + public static getAllCards(): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/card/get-all', + }); + } + /** + * Get Card By Id + * @returns CardSchema Successful Response + * @throws ApiError + */ + public static getCardById({ + cardId, + }: { + cardId: number, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/card/get/{card_id}', + path: { + 'card_id': cardId, + }, + errors: { + 422: `Validation Error`, + }, + }); + } + /** + * Update General Info + * @returns CardUpdateGeneralInfoResponse Successful Response + * @throws ApiError + */ + public static updateCardGeneralInfo({ + requestBody, + }: { + requestBody: CardUpdateGeneralInfoRequest, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/card/update-general-info', + body: requestBody, + mediaType: 'application/json', + errors: { + 422: `Validation Error`, + }, + }); + } + /** + * Update Products And Services General Info + * @returns ProductsAndServicesGeneralInfoResponse Successful Response + * @throws ApiError + */ + public static updateProductsAndServicesGeneralInfo({ + requestBody, + }: { + requestBody: ProductsAndServicesGeneralInfoRequest, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/card/update-products-and-services-general-info', + body: requestBody, + mediaType: 'application/json', + errors: { + 422: `Validation Error`, + }, + }); + } + /** + * Update Card Manager + * @returns UpdateCardManagerResponse Successful Response + * @throws ApiError + */ + public static updateCardManager({ + requestBody, + }: { + requestBody: UpdateCardManagerRequest, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/card/update-card-manager', + body: requestBody, + mediaType: 'application/json', + errors: { + 422: `Validation Error`, + }, + }); + } + /** + * Update Card Client + * @returns UpdateCardClientResponse Successful Response + * @throws ApiError + */ + public static updateCardClient({ + requestBody, + }: { + requestBody: UpdateCardClientRequest, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/card/update-card-client', + body: requestBody, + mediaType: 'application/json', + errors: { + 422: `Validation Error`, + }, + }); + } + /** + * Add Kit To Card + * @returns CardAddKitResponse Successful Response + * @throws ApiError + */ + public static addKitToCard({ + requestBody, + }: { + requestBody: CardAddKitRequest, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/card/add-kit', + body: requestBody, + mediaType: 'application/json', + errors: { + 422: `Validation Error`, + }, + }); + } + /** + * Create Guest Url + * @returns CardCreateGuestUrlResponse Successful Response + * @throws ApiError + */ + public static createDealGuestUrl({ + requestBody, + }: { + requestBody: CardCreateGuestUrlRequest, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/card/create-guest-url', + body: requestBody, + mediaType: 'application/json', + errors: { + 422: `Validation Error`, + }, + }); + } + /** + * Get Billing Document + * @returns any Successful Response + * @throws ApiError + */ + public static getBillingDocument({ + dealId, + }: { + dealId: number, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/card/billing-document/{deal_id}', + path: { + 'deal_id': dealId, + }, + errors: { + 422: `Validation Error`, + }, + }); + } + /** + * Get Deal Tech Spec + * @returns any Successful Response + * @throws ApiError + */ + public static getDealTechSpec({ + dealId, + }: { + dealId: number, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/card/tech-spec/{deal_id}', + path: { + 'deal_id': dealId, + }, + errors: { + 422: `Validation Error`, + }, + }); + } + /** + * Post Prefill Card + * @returns CardPrefillResponse Successful Response + * @throws ApiError + */ + public static prefillCard({ + requestBody, + }: { + requestBody: CardPrefillRequest, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/card/prefill', + body: requestBody, + mediaType: 'application/json', + errors: { + 422: `Validation Error`, + }, + }); + } + /** + * Recalculate Card Price + * @returns CardRecalculatePriceResponse Successful Response + * @throws ApiError + */ + public static recalculateCardPrice({ + requestBody, + }: { + requestBody: CardRecalculatePriceRequest, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/card/recalculate-price', + body: requestBody, + mediaType: 'application/json', + errors: { + 422: `Validation Error`, + }, + }); + } + /** + * Manage Employee + * @returns ManageEmployeeResponse Successful Response + * @throws ApiError + */ + public static manageEmployee({ + requestBody, + }: { + requestBody: ManageEmployeeRequest, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/card/employee', + body: requestBody, + mediaType: 'application/json', + errors: { + 422: `Validation Error`, + }, + }); + } + /** + * Get Available Employees To Assign + * @returns GetAvailableEmployeesToAssignResponse Successful Response + * @throws ApiError + */ + public static getAvailableEmployeesToAssign({ + cardId, + }: { + cardId: number, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/card/employee/available/{card_id}', + path: { + 'card_id': cardId, + }, + errors: { + 422: `Validation Error`, + }, + }); + } + /** + * Parse Deals Excel + * @returns ParseCardsExcelResponse Successful Response + * @throws ApiError + */ + public static parseDealsExcel({ + formData, + }: { + formData: Body_parse_deals_excel, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/card/prefill/excel/parse', + formData: formData, + mediaType: 'multipart/form-data', + errors: { + 422: `Validation Error`, + }, + }); + } + /** + * Create Deals From Excel + * @returns CreateCardsFromExcelResponse Successful Response + * @throws ApiError + */ + public static createDealsExcel({ + requestBody, + }: { + requestBody: CreateCardsFromExcelRequest, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/card/prefill/excel/create', + body: requestBody, + mediaType: 'application/json', + errors: { + 422: `Validation Error`, + }, + }); + } + /** + * Services Add + * @returns CardAddServicesResponse Successful Response + * @throws ApiError + */ + public static addMultipleCardServices({ + requestBody, + }: { + requestBody: CardAddServicesRequest, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/card/services/add/multiple', + body: requestBody, + mediaType: 'application/json', + errors: { + 422: `Validation Error`, + }, + }); + } + /** + * Services Add + * @returns CardAddServiceResponse Successful Response + * @throws ApiError + */ + public static addCardService({ + requestBody, + }: { + requestBody: CardAddServiceRequest, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/card/services/add', + body: requestBody, + mediaType: 'application/json', + errors: { + 422: `Validation Error`, + }, + }); + } + /** + * Services Update Quantity + * @returns CardUpdateServiceQuantityResponse Successful Response + * @throws ApiError + */ + public static updateCardServiceQuantity({ + requestBody, + }: { + requestBody: CardUpdateServiceQuantityRequest, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/card/services/update-quantity', + body: requestBody, + mediaType: 'application/json', + errors: { + 422: `Validation Error`, + }, + }); + } + /** + * Services Update + * @returns CardUpdateServiceResponse Successful Response + * @throws ApiError + */ + public static updateCardService({ + requestBody, + }: { + requestBody: CardUpdateServiceRequest, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/card/services/update', + body: requestBody, + mediaType: 'application/json', + errors: { + 422: `Validation Error`, + }, + }); + } + /** + * Services Delete + * @returns CardDeleteServiceResponse Successful Response + * @throws ApiError + */ + public static deleteCardService({ + requestBody, + }: { + requestBody: CardDeleteServiceRequest, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/card/services/delete', + body: requestBody, + mediaType: 'application/json', + errors: { + 422: `Validation Error`, + }, + }); + } + /** + * Services Delete + * @returns CardDeleteServicesResponse Successful Response + * @throws ApiError + */ + public static deleteMultipleCardServices({ + requestBody, + }: { + requestBody: CardDeleteServicesRequest, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/card/services/delete/multiple', + body: requestBody, + mediaType: 'application/json', + errors: { + 422: `Validation Error`, + }, + }); + } + /** + * Services Copy + * @returns CardServicesCopyResponse Successful Response + * @throws ApiError + */ + public static copyProductServices({ + requestBody, + }: { + requestBody: CardServicesCopyRequest, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/card/services/copy', + body: requestBody, + mediaType: 'application/json', + errors: { + 422: `Validation Error`, + }, + }); + } + /** + * Products Update + * @returns CardUpdateProductQuantityResponse Successful Response + * @throws ApiError + */ + public static updateCardProductQuantity({ + requestBody, + }: { + requestBody: CardUpdateProductQuantityRequest, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/card/products/update-quantity', + body: requestBody, + mediaType: 'application/json', + errors: { + 422: `Validation Error`, + }, + }); + } + /** + * Products Add + * @returns CardAddProductResponse Successful Response + * @throws ApiError + */ + public static addCardProduct({ + requestBody, + }: { + requestBody: CardAddProductRequest, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/card/products/add', + body: requestBody, + mediaType: 'application/json', + errors: { + 422: `Validation Error`, + }, + }); + } + /** + * Products Delete + * @returns CardDeleteProductResponse Successful Response + * @throws ApiError + */ + public static deleteCardProduct({ + requestBody, + }: { + requestBody: CardDeleteProductRequest, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/card/products/delete', + body: requestBody, + mediaType: 'application/json', + errors: { + 422: `Validation Error`, + }, + }); + } + /** + * Products Delete + * @returns CardDeleteProductsResponse Successful Response + * @throws ApiError + */ + public static deleteMultipleCardProducts({ + requestBody, + }: { + requestBody: CardDeleteProductsRequest, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/card/products/delete/multiple', + body: requestBody, + mediaType: 'application/json', + errors: { + 422: `Validation Error`, + }, + }); + } + /** + * Products Update + * @returns CardUpdateProductResponse Successful Response + * @throws ApiError + */ + public static updateCardProduct({ + requestBody, + }: { + requestBody: CardUpdateProductRequest, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/card/product/update', + body: requestBody, + mediaType: 'application/json', + errors: { + 422: `Validation Error`, + }, + }); + } + /** + * Add Kit To Card Product + * @returns CardProductAddKitResponse Successful Response + * @throws ApiError + */ + public static addKitToCardProduct({ + requestBody, + }: { + requestBody: CardProductAddKitRequest, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/card/product/add-kit', + body: requestBody, + mediaType: 'application/json', + errors: { + 422: `Validation Error`, + }, + }); + } + /** + * Get Card Products Barcodes Pdf + * @returns GetCardProductsBarcodesPdfResponse Successful Response + * @throws ApiError + */ + public static getCardProductsBarcodesPdf({ + requestBody, + }: { + requestBody: GetCardProductsBarcodesPdfRequest, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/card/barcodes/get-pdf', + body: requestBody, + mediaType: 'application/json', + errors: { + 422: `Validation Error`, + }, + }); + } +} diff --git a/src/client/services/CardTagService.ts b/src/client/services/CardTagService.ts new file mode 100644 index 0000000..c981439 --- /dev/null +++ b/src/client/services/CardTagService.ts @@ -0,0 +1,97 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { CreateTagRequest } from '../models/CreateTagRequest'; +import type { CreateTagResponse } from '../models/CreateTagResponse'; +import type { DeleteTagResponse } from '../models/DeleteTagResponse'; +import type { SwitchTagRequest } from '../models/SwitchTagRequest'; +import type { SwitchTagResponse } from '../models/SwitchTagResponse'; +import type { UpdateTagRequest } from '../models/UpdateTagRequest'; +import type { UpdateTagResponse } from '../models/UpdateTagResponse'; +import type { CancelablePromise } from '../core/CancelablePromise'; +import { OpenAPI } from '../core/OpenAPI'; +import { request as __request } from '../core/request'; +export class CardTagService { + /** + * Create Tag + * @returns CreateTagResponse Successful Response + * @throws ApiError + */ + public static createTag({ + requestBody, + }: { + requestBody: CreateTagRequest, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/card-tag/', + body: requestBody, + mediaType: 'application/json', + errors: { + 422: `Validation Error`, + }, + }); + } + /** + * Update Tag + * @returns UpdateTagResponse Successful Response + * @throws ApiError + */ + public static updateTag({ + requestBody, + }: { + requestBody: UpdateTagRequest, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'PATCH', + url: '/card-tag/', + body: requestBody, + mediaType: 'application/json', + errors: { + 422: `Validation Error`, + }, + }); + } + /** + * Delete Tag + * @returns DeleteTagResponse Successful Response + * @throws ApiError + */ + public static deleteTag({ + cardTagId, + }: { + cardTagId: number, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'DELETE', + url: '/card-tag/{card_tag_id}', + path: { + 'card_tag_id': cardTagId, + }, + errors: { + 422: `Validation Error`, + }, + }); + } + /** + * Switch Tag + * @returns SwitchTagResponse Successful Response + * @throws ApiError + */ + public static switchTag({ + requestBody, + }: { + requestBody: SwitchTagRequest, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/card-tag/switch', + body: requestBody, + mediaType: 'application/json', + errors: { + 422: `Validation Error`, + }, + }); + } +} diff --git a/src/client/services/DealService.ts b/src/client/services/DealService.ts deleted file mode 100644 index cda8a32..0000000 --- a/src/client/services/DealService.ts +++ /dev/null @@ -1,722 +0,0 @@ -/* generated using openapi-typescript-codegen -- do not edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Body_parse_deals_excel } from '../models/Body_parse_deals_excel'; -import type { CreateDealsFromExcelRequest } from '../models/CreateDealsFromExcelRequest'; -import type { CreateDealsFromExcelResponse } from '../models/CreateDealsFromExcelResponse'; -import type { DealAddKitRequest } from '../models/DealAddKitRequest'; -import type { DealAddKitResponse } from '../models/DealAddKitResponse'; -import type { DealAddProductRequest } from '../models/DealAddProductRequest'; -import type { DealAddProductResponse } from '../models/DealAddProductResponse'; -import type { DealAddServiceRequest } from '../models/DealAddServiceRequest'; -import type { DealAddServiceResponse } from '../models/DealAddServiceResponse'; -import type { DealAddServicesRequest } from '../models/DealAddServicesRequest'; -import type { DealAddServicesResponse } from '../models/DealAddServicesResponse'; -import type { DealChangeStatusRequest } from '../models/DealChangeStatusRequest'; -import type { DealChangeStatusResponse } from '../models/DealChangeStatusResponse'; -import type { DealCompleteRequest } from '../models/DealCompleteRequest'; -import type { DealCompleteResponse } from '../models/DealCompleteResponse'; -import type { DealCreateGuestUrlRequest } from '../models/DealCreateGuestUrlRequest'; -import type { DealCreateGuestUrlResponse } from '../models/DealCreateGuestUrlResponse'; -import type { DealDeleteProductRequest } from '../models/DealDeleteProductRequest'; -import type { DealDeleteProductResponse } from '../models/DealDeleteProductResponse'; -import type { DealDeleteProductsRequest } from '../models/DealDeleteProductsRequest'; -import type { DealDeleteProductsResponse } from '../models/DealDeleteProductsResponse'; -import type { DealDeleteRequest } from '../models/DealDeleteRequest'; -import type { DealDeleteResponse } from '../models/DealDeleteResponse'; -import type { DealDeleteServiceRequest } from '../models/DealDeleteServiceRequest'; -import type { DealDeleteServiceResponse } from '../models/DealDeleteServiceResponse'; -import type { DealDeleteServicesRequest } from '../models/DealDeleteServicesRequest'; -import type { DealDeleteServicesResponse } from '../models/DealDeleteServicesResponse'; -import type { DealGetAllResponse } from '../models/DealGetAllResponse'; -import type { DealPrefillRequest } from '../models/DealPrefillRequest'; -import type { DealPrefillResponse } from '../models/DealPrefillResponse'; -import type { DealProductAddKitRequest } from '../models/DealProductAddKitRequest'; -import type { DealProductAddKitResponse } from '../models/DealProductAddKitResponse'; -import type { DealQuickCreateRequest } from '../models/DealQuickCreateRequest'; -import type { DealQuickCreateResponse } from '../models/DealQuickCreateResponse'; -import type { DealRecalculatePriceRequest } from '../models/DealRecalculatePriceRequest'; -import type { DealRecalculatePriceResponse } from '../models/DealRecalculatePriceResponse'; -import type { DealSchema } from '../models/DealSchema'; -import type { DealServicesCopyRequest } from '../models/DealServicesCopyRequest'; -import type { DealServicesCopyResponse } from '../models/DealServicesCopyResponse'; -import type { DealSummaryReorderRequest } from '../models/DealSummaryReorderRequest'; -import type { DealSummaryResponse } from '../models/DealSummaryResponse'; -import type { DealUpdateGeneralInfoRequest } from '../models/DealUpdateGeneralInfoRequest'; -import type { DealUpdateGeneralInfoResponse } from '../models/DealUpdateGeneralInfoResponse'; -import type { DealUpdateProductQuantityRequest } from '../models/DealUpdateProductQuantityRequest'; -import type { DealUpdateProductQuantityResponse } from '../models/DealUpdateProductQuantityResponse'; -import type { DealUpdateProductRequest } from '../models/DealUpdateProductRequest'; -import type { DealUpdateProductResponse } from '../models/DealUpdateProductResponse'; -import type { DealUpdateServiceQuantityRequest } from '../models/DealUpdateServiceQuantityRequest'; -import type { DealUpdateServiceQuantityResponse } from '../models/DealUpdateServiceQuantityResponse'; -import type { DealUpdateServiceRequest } from '../models/DealUpdateServiceRequest'; -import type { DealUpdateServiceResponse } from '../models/DealUpdateServiceResponse'; -import type { GetAvailableEmployeesToAssignResponse } from '../models/GetAvailableEmployeesToAssignResponse'; -import type { GetDealProductsBarcodesPdfRequest } from '../models/GetDealProductsBarcodesPdfRequest'; -import type { GetDealProductsBarcodesPdfResponse } from '../models/GetDealProductsBarcodesPdfResponse'; -import type { ManageEmployeeRequest } from '../models/ManageEmployeeRequest'; -import type { ManageEmployeeResponse } from '../models/ManageEmployeeResponse'; -import type { ParseDealsExcelResponse } from '../models/ParseDealsExcelResponse'; -import type { CancelablePromise } from '../core/CancelablePromise'; -import { OpenAPI } from '../core/OpenAPI'; -import { request as __request } from '../core/request'; -export class DealService { - /** - * Delete - * @returns DealDeleteResponse Successful Response - * @throws ApiError - */ - public static deleteDeal({ - requestBody, - }: { - requestBody: DealDeleteRequest, - }): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/deal/delete', - body: requestBody, - mediaType: 'application/json', - errors: { - 422: `Validation Error`, - }, - }); - } - /** - * Complete - * @returns DealCompleteResponse Successful Response - * @throws ApiError - */ - public static completeDeal({ - requestBody, - }: { - requestBody: DealCompleteRequest, - }): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/deal/complete', - body: requestBody, - mediaType: 'application/json', - errors: { - 422: `Validation Error`, - }, - }); - } - /** - * Quick Create - * @returns DealQuickCreateResponse Successful Response - * @throws ApiError - */ - public static quickCreateDealQuickCreatePost({ - requestBody, - }: { - requestBody: DealQuickCreateRequest, - }): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/deal/quickCreate', - body: requestBody, - mediaType: 'application/json', - errors: { - 422: `Validation Error`, - }, - }); - } - /** - * Change Status - * @returns DealChangeStatusResponse Successful Response - * @throws ApiError - */ - public static changeStatusDealChangeStatusPost({ - requestBody, - }: { - requestBody: DealChangeStatusRequest, - }): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/deal/changeStatus', - body: requestBody, - mediaType: 'application/json', - errors: { - 422: `Validation Error`, - }, - }); - } - /** - * Get Summary - * @returns DealSummaryResponse Successful Response - * @throws ApiError - */ - public static getDealSummaries({ - full, - }: { - full: (boolean | null), - }): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/deal/summaries', - query: { - 'full': full, - }, - errors: { - 422: `Validation Error`, - }, - }); - } - /** - * Reorder - * @returns DealSummaryResponse Successful Response - * @throws ApiError - */ - public static reorderDealSummaries({ - requestBody, - }: { - requestBody: DealSummaryReorderRequest, - }): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/deal/summaries/reorder', - body: requestBody, - mediaType: 'application/json', - errors: { - 422: `Validation Error`, - }, - }); - } - /** - * Get All - * @returns DealGetAllResponse Successful Response - * @throws ApiError - */ - public static getAllDeals(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/deal/get-all', - }); - } - /** - * Get Deal By Id - * @returns DealSchema Successful Response - * @throws ApiError - */ - public static getDealById({ - dealId, - }: { - dealId: number, - }): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/deal/get/{deal_id}', - path: { - 'deal_id': dealId, - }, - errors: { - 422: `Validation Error`, - }, - }); - } - /** - * Update General Info - * @returns DealUpdateGeneralInfoResponse Successful Response - * @throws ApiError - */ - public static updateDealGeneralInfo({ - requestBody, - }: { - requestBody: DealUpdateGeneralInfoRequest, - }): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/deal/update-general-info', - body: requestBody, - mediaType: 'application/json', - errors: { - 422: `Validation Error`, - }, - }); - } - /** - * Add Kit To Deal - * @returns DealAddKitResponse Successful Response - * @throws ApiError - */ - public static addKitToDeal({ - requestBody, - }: { - requestBody: DealAddKitRequest, - }): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/deal/add-kit', - body: requestBody, - mediaType: 'application/json', - errors: { - 422: `Validation Error`, - }, - }); - } - /** - * Create Guest Url - * @returns DealCreateGuestUrlResponse Successful Response - * @throws ApiError - */ - public static createDealGuestUrl({ - requestBody, - }: { - requestBody: DealCreateGuestUrlRequest, - }): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/deal/create-guest-url', - body: requestBody, - mediaType: 'application/json', - errors: { - 422: `Validation Error`, - }, - }); - } - /** - * Get Billing Document - * @returns any Successful Response - * @throws ApiError - */ - public static getBillingDocument({ - dealId, - }: { - dealId: number, - }): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/deal/billing-document/{deal_id}', - path: { - 'deal_id': dealId, - }, - errors: { - 422: `Validation Error`, - }, - }); - } - /** - * Get Deal Tech Spec - * @returns any Successful Response - * @throws ApiError - */ - public static getDealTechSpec({ - dealId, - }: { - dealId: number, - }): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/deal/tech-spec/{deal_id}', - path: { - 'deal_id': dealId, - }, - errors: { - 422: `Validation Error`, - }, - }); - } - /** - * Post Prefill Deal - * @returns DealPrefillResponse Successful Response - * @throws ApiError - */ - public static prefillDeal({ - requestBody, - }: { - requestBody: DealPrefillRequest, - }): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/deal/prefill', - body: requestBody, - mediaType: 'application/json', - errors: { - 422: `Validation Error`, - }, - }); - } - /** - * Recalculate Deal Price - * @returns DealRecalculatePriceResponse Successful Response - * @throws ApiError - */ - public static recalculateDealPrice({ - requestBody, - }: { - requestBody: DealRecalculatePriceRequest, - }): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/deal/recalculate-price', - body: requestBody, - mediaType: 'application/json', - errors: { - 422: `Validation Error`, - }, - }); - } - /** - * Manage Employee - * @returns ManageEmployeeResponse Successful Response - * @throws ApiError - */ - public static manageEmployee({ - requestBody, - }: { - requestBody: ManageEmployeeRequest, - }): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/deal/employee', - body: requestBody, - mediaType: 'application/json', - errors: { - 422: `Validation Error`, - }, - }); - } - /** - * Get Available Employees To Assign - * @returns GetAvailableEmployeesToAssignResponse Successful Response - * @throws ApiError - */ - public static getAvailableEmployeesToAssign({ - dealId, - }: { - dealId: number, - }): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/deal/employee/available/{deal_id}', - path: { - 'deal_id': dealId, - }, - errors: { - 422: `Validation Error`, - }, - }); - } - /** - * Parse Deals Excel - * @returns ParseDealsExcelResponse Successful Response - * @throws ApiError - */ - public static parseDealsExcel({ - formData, - }: { - formData: Body_parse_deals_excel, - }): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/deal/prefill/excel/parse', - formData: formData, - mediaType: 'multipart/form-data', - errors: { - 422: `Validation Error`, - }, - }); - } - /** - * Create Deals From Excel - * @returns CreateDealsFromExcelResponse Successful Response - * @throws ApiError - */ - public static createDealsExcel({ - requestBody, - }: { - requestBody: CreateDealsFromExcelRequest, - }): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/deal/prefill/excel/create', - body: requestBody, - mediaType: 'application/json', - errors: { - 422: `Validation Error`, - }, - }); - } - /** - * Services Add - * @returns DealAddServicesResponse Successful Response - * @throws ApiError - */ - public static addMultipleDealServices({ - requestBody, - }: { - requestBody: DealAddServicesRequest, - }): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/deal/services/add/multiple', - body: requestBody, - mediaType: 'application/json', - errors: { - 422: `Validation Error`, - }, - }); - } - /** - * Services Add - * @returns DealAddServiceResponse Successful Response - * @throws ApiError - */ - public static addDealService({ - requestBody, - }: { - requestBody: DealAddServiceRequest, - }): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/deal/services/add', - body: requestBody, - mediaType: 'application/json', - errors: { - 422: `Validation Error`, - }, - }); - } - /** - * Services Update Quantity - * @returns DealUpdateServiceQuantityResponse Successful Response - * @throws ApiError - */ - public static updateDealServiceQuantity({ - requestBody, - }: { - requestBody: DealUpdateServiceQuantityRequest, - }): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/deal/services/update-quantity', - body: requestBody, - mediaType: 'application/json', - errors: { - 422: `Validation Error`, - }, - }); - } - /** - * Services Update - * @returns DealUpdateServiceResponse Successful Response - * @throws ApiError - */ - public static updateDealService({ - requestBody, - }: { - requestBody: DealUpdateServiceRequest, - }): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/deal/services/update', - body: requestBody, - mediaType: 'application/json', - errors: { - 422: `Validation Error`, - }, - }); - } - /** - * Services Delete - * @returns DealDeleteServiceResponse Successful Response - * @throws ApiError - */ - public static deleteDealService({ - requestBody, - }: { - requestBody: DealDeleteServiceRequest, - }): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/deal/services/delete', - body: requestBody, - mediaType: 'application/json', - errors: { - 422: `Validation Error`, - }, - }); - } - /** - * Services Delete - * @returns DealDeleteServicesResponse Successful Response - * @throws ApiError - */ - public static deleteMultipleDealServices({ - requestBody, - }: { - requestBody: DealDeleteServicesRequest, - }): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/deal/services/delete/multiple', - body: requestBody, - mediaType: 'application/json', - errors: { - 422: `Validation Error`, - }, - }); - } - /** - * Services Copy - * @returns DealServicesCopyResponse Successful Response - * @throws ApiError - */ - public static copyProductServices({ - requestBody, - }: { - requestBody: DealServicesCopyRequest, - }): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/deal/services/copy', - body: requestBody, - mediaType: 'application/json', - errors: { - 422: `Validation Error`, - }, - }); - } - /** - * Products Update - * @returns DealUpdateProductQuantityResponse Successful Response - * @throws ApiError - */ - public static updateDealProductQuantity({ - requestBody, - }: { - requestBody: DealUpdateProductQuantityRequest, - }): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/deal/products/update-quantity', - body: requestBody, - mediaType: 'application/json', - errors: { - 422: `Validation Error`, - }, - }); - } - /** - * Products Add - * @returns DealAddProductResponse Successful Response - * @throws ApiError - */ - public static addDealProduct({ - requestBody, - }: { - requestBody: DealAddProductRequest, - }): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/deal/products/add', - body: requestBody, - mediaType: 'application/json', - errors: { - 422: `Validation Error`, - }, - }); - } - /** - * Products Delete - * @returns DealDeleteProductResponse Successful Response - * @throws ApiError - */ - public static deleteDealProduct({ - requestBody, - }: { - requestBody: DealDeleteProductRequest, - }): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/deal/products/delete', - body: requestBody, - mediaType: 'application/json', - errors: { - 422: `Validation Error`, - }, - }); - } - /** - * Products Delete - * @returns DealDeleteProductsResponse Successful Response - * @throws ApiError - */ - public static deleteMultipleDealProducts({ - requestBody, - }: { - requestBody: DealDeleteProductsRequest, - }): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/deal/products/delete/multiple', - body: requestBody, - mediaType: 'application/json', - errors: { - 422: `Validation Error`, - }, - }); - } - /** - * Products Update - * @returns DealUpdateProductResponse Successful Response - * @throws ApiError - */ - public static updateDealProduct({ - requestBody, - }: { - requestBody: DealUpdateProductRequest, - }): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/deal/product/update', - body: requestBody, - mediaType: 'application/json', - errors: { - 422: `Validation Error`, - }, - }); - } - /** - * Add Kit To Deal Product - * @returns DealProductAddKitResponse Successful Response - * @throws ApiError - */ - public static addKitToDealProduct({ - requestBody, - }: { - requestBody: DealProductAddKitRequest, - }): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/deal/product/add-kit', - body: requestBody, - mediaType: 'application/json', - errors: { - 422: `Validation Error`, - }, - }); - } - /** - * Get Deal Products Barcodes Pdf - * @returns GetDealProductsBarcodesPdfResponse Successful Response - * @throws ApiError - */ - public static getDealProductsBarcodesPdf({ - requestBody, - }: { - requestBody: GetDealProductsBarcodesPdfRequest, - }): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/deal/barcodes/get-pdf', - body: requestBody, - mediaType: 'application/json', - errors: { - 422: `Validation Error`, - }, - }); - } -} diff --git a/src/client/services/ProjectService.ts b/src/client/services/ProjectService.ts index c05dfc4..ed49542 100644 --- a/src/client/services/ProjectService.ts +++ b/src/client/services/ProjectService.ts @@ -5,7 +5,12 @@ import type { CreateProjectRequest } from '../models/CreateProjectRequest'; import type { CreateProjectResponse } from '../models/CreateProjectResponse'; import type { DeleteProjectResponse } from '../models/DeleteProjectResponse'; +import type { GetAllModulesResponse } from '../models/GetAllModulesResponse'; import type { GetProjectsResponse } from '../models/GetProjectsResponse'; +import type { UpdateAttributesRequest } from '../models/UpdateAttributesRequest'; +import type { UpdateAttributesResponse } from '../models/UpdateAttributesResponse'; +import type { UpdateModulesRequest } from '../models/UpdateModulesRequest'; +import type { UpdateModulesResponse } from '../models/UpdateModulesResponse'; import type { UpdateProjectRequest } from '../models/UpdateProjectRequest'; import type { UpdateProjectResponse } from '../models/UpdateProjectResponse'; import type { CancelablePromise } from '../core/CancelablePromise'; @@ -84,4 +89,55 @@ export class ProjectService { }, }); } + /** + * Get All Modules + * @returns GetAllModulesResponse Successful Response + * @throws ApiError + */ + public static getAllModules(): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/project/modules', + }); + } + /** + * Update Project Modules + * @returns UpdateModulesResponse Successful Response + * @throws ApiError + */ + public static updateProjectModules({ + requestBody, + }: { + requestBody: UpdateModulesRequest, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/project/modules', + body: requestBody, + mediaType: 'application/json', + errors: { + 422: `Validation Error`, + }, + }); + } + /** + * Update Project Attributes + * @returns UpdateAttributesResponse Successful Response + * @throws ApiError + */ + public static updateProjectAttributes({ + requestBody, + }: { + requestBody: UpdateAttributesRequest, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/project/attributes', + body: requestBody, + mediaType: 'application/json', + errors: { + 422: `Validation Error`, + }, + }); + } } diff --git a/src/client/services/ShippingService.ts b/src/client/services/ShippingService.ts index d85149d..1575657 100644 --- a/src/client/services/ShippingService.ts +++ b/src/client/services/ShippingService.ts @@ -2,12 +2,12 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ +import type { CreateBoxRequest } from '../models/CreateBoxRequest'; +import type { CreateBoxResponse } from '../models/CreateBoxResponse'; import type { CreatePalletResponse } from '../models/CreatePalletResponse'; import type { DeleteBoxResponse } from '../models/DeleteBoxResponse'; import type { DeletePalletResponse } from '../models/DeletePalletResponse'; import type { DeleteShippingProductResponse } from '../models/DeleteShippingProductResponse'; -import type { UpdateBoxRequest } from '../models/UpdateBoxRequest'; -import type { UpdateBoxResponse } from '../models/UpdateBoxResponse'; import type { UpdateShippingProductRequest } from '../models/UpdateShippingProductRequest'; import type { UpdateShippingProductResponse } from '../models/UpdateShippingProductResponse'; import type { CancelablePromise } from '../core/CancelablePromise'; @@ -20,15 +20,15 @@ export class ShippingService { * @throws ApiError */ public static createPallet({ - dealId, + cardId, }: { - dealId: number, + cardId: number, }): CancelablePromise { return __request(OpenAPI, { method: 'POST', - url: '/shipping/pallet/{deal_id}', + url: '/shipping/pallet/{card_id}', path: { - 'deal_id': dealId, + 'card_id': cardId, }, errors: { 422: `Validation Error`, @@ -98,15 +98,15 @@ export class ShippingService { }); } /** - * Update Box - * @returns UpdateBoxResponse Successful Response + * Create Box + * @returns CreateBoxResponse Successful Response * @throws ApiError */ - public static updateBox({ + public static createBox({ requestBody, }: { - requestBody: UpdateBoxRequest, - }): CancelablePromise { + requestBody: CreateBoxRequest, + }): CancelablePromise { return __request(OpenAPI, { method: 'POST', url: '/shipping/box', diff --git a/src/components/CardAttributeFields/CardAttributeFields.tsx b/src/components/CardAttributeFields/CardAttributeFields.tsx new file mode 100644 index 0000000..977b8ea --- /dev/null +++ b/src/components/CardAttributeFields/CardAttributeFields.tsx @@ -0,0 +1,41 @@ +import { AttributeSchema, ProjectSchema } from "../../client"; +import { UseFormReturnType } from "@mantine/form"; +import { rem, Stack } from "@mantine/core"; +import { ReactNode } from "react"; +import CardAttributeField from "./components/CardAttributeField.tsx"; +import { CardGeneralFormType } from "../../pages/CardsPage/drawers/CardEditDrawer/tabs/GeneralTab/GeneralTab.tsx"; + +type Props = { + project: ProjectSchema; + form: UseFormReturnType; +} + +const CardAttributeFields = ({ project, form }: Props) => { + const attributes: AttributeSchema[] = []; + + project.attributes.forEach(attribute => { + if (attribute.type.type === "boolean") { + attributes.push(attribute); + } else { + attributes.unshift(attribute); + } + }); + + const fields: ReactNode[] = attributes.map(attribute => { + return ( + + ); + }); + + return ( + + {...fields} + + ); +}; + +export default CardAttributeFields; diff --git a/src/components/CardAttributeFields/components/CardAttributeField.tsx b/src/components/CardAttributeFields/components/CardAttributeField.tsx new file mode 100644 index 0000000..e0f015b --- /dev/null +++ b/src/components/CardAttributeFields/components/CardAttributeField.tsx @@ -0,0 +1,85 @@ +import { AttributeSchema } from "../../../client"; +import { Checkbox, Group, NumberInput, TextInput, Tooltip } from "@mantine/core"; +import { UseFormReturnType } from "@mantine/form"; +import { DatePickerInput, DateTimePicker } from "@mantine/dates"; +import { CardGeneralFormType } from "../../../pages/CardsPage/drawers/CardEditDrawer/tabs/GeneralTab/GeneralTab.tsx"; +import { IconInfoCircle } from "@tabler/icons-react"; + +type Props = { + attribute: AttributeSchema; + form: UseFormReturnType; +} + +const CardAttributeField = ({ attribute, form }: Props) => { + const type = attribute.type.type; + + const getDateValue = (): Date | null => { + const value = form.getInputProps(attribute.name).value; + if (!value) return null; + return new Date(value); + }; + + const label = ( + + {attribute.label} + {attribute.description && ( + + + + )} + + ); + + if (type === "bool") { + return ( + + ); + } + if (type === "date") { + return ( + + ); + } + if (type === "datetime") { + return ( + + ); + } + if (type === "str") { + return ( + + ); + } + if (type === "int" || type === "float") { + return ( + + ); + } +}; + +export default CardAttributeField; diff --git a/src/components/CardAttributeFields/utils/getAttributesFromCard.ts b/src/components/CardAttributeFields/utils/getAttributesFromCard.ts new file mode 100644 index 0000000..f55b4a6 --- /dev/null +++ b/src/components/CardAttributeFields/utils/getAttributesFromCard.ts @@ -0,0 +1,23 @@ +import { CardSchema } from "../../../client"; + +const DATETIME_TYPES = ["datetime", "date"]; + +const getAttributesFromCard = (card: CardSchema) => { + return card.attributes.reduce( + (values, cardAttribute) => { + let value: boolean | number | string | null | Date = cardAttribute.value; + + if (DATETIME_TYPES.includes(cardAttribute.attribute.type.type) && value !== null) { + value = new Date(value as string); + } + + return { + ...values, + [cardAttribute.attribute.name]: value, + }; + }, + {}, + ); +}; + +export default getAttributesFromCard; diff --git a/src/components/DealStatusSelect/DealStatusSelect.tsx b/src/components/CardStatusSelect/CardStatusSelect.tsx similarity index 86% rename from src/components/DealStatusSelect/DealStatusSelect.tsx rename to src/components/CardStatusSelect/CardStatusSelect.tsx index fcc9c6b..dcacc1c 100644 --- a/src/components/DealStatusSelect/DealStatusSelect.tsx +++ b/src/components/CardStatusSelect/CardStatusSelect.tsx @@ -10,10 +10,10 @@ type SelectProps = Omit, "data" | "getLab type Props = OtherProps & SelectProps; -const DealStatusSelect: FC = ({ board, ...props}) => { +const CardStatusSelect: FC = ({ board, ...props}) => { const [isInitial, setIsInitial] = useState(true); - const filteredData = board?.dealStatuses.filter( + const filteredData = board?.statuses.filter( status => !status.isDeleted, ) ?? []; @@ -37,4 +37,4 @@ const DealStatusSelect: FC = ({ board, ...props}) => { /> ); }; -export default DealStatusSelect; +export default CardStatusSelect; diff --git a/src/components/Dnd/Boards/Board/Board.module.scss b/src/components/Dnd/Boards/Board/Board.module.scss index e3063e1..51bfcca 100644 --- a/src/components/Dnd/Boards/Board/Board.module.scss +++ b/src/components/Dnd/Boards/Board/Board.module.scss @@ -18,8 +18,8 @@ border-bottom: none; } -.board-during-dnd { - background-color: var(--color-gray-10); +.no-transition { + transition: none !important; } .board::after { diff --git a/src/components/Dnd/Boards/Board/Board.tsx b/src/components/Dnd/Boards/Board/Board.tsx index 8205b91..c104b63 100644 --- a/src/components/Dnd/Boards/Board/Board.tsx +++ b/src/components/Dnd/Boards/Board/Board.tsx @@ -5,31 +5,30 @@ import { IconEdit, IconPlus, IconTrash } from "@tabler/icons-react"; import classNames from "classnames"; import styles from "./Board.module.scss"; import useStatus from "../../Statuses/Status/hooks/useStatus.tsx"; +import { useDndContext } from "../../../../pages/CardsPage/contexts/DndContext.tsx"; +import DragState from "../../../../pages/CardsPage/enums/DragState.ts"; +import { useBoardsContext } from "../../../../contexts/BoardsContext.tsx"; type Props = { board: BoardSchema; - selectedBoard: BoardSchema | null; - setSelectedBoard: (board: BoardSchema) => void; - onEditBoardClick: (board: BoardSchema) => void; - onDeleteBoardClick: (board: BoardSchema) => void; - isBoardDragEnded: boolean; - refetch: () => void; } -const Board = ({ - board, - selectedBoard, - setSelectedBoard, - onEditBoardClick, - onDeleteBoardClick, - isBoardDragEnded, - refetch, - }: Props) => { +const Board = ({ board }: Props) => { + const { + selectedBoard, + setSelectedBoard, + onEditBoardClick, + onDeleteBoardClick, + } = useBoardsContext(); + + const { dragState } = useDndContext(); const { showContextMenu } = useContextMenu(); - const { onCreateStatusClick } = useStatus({ refetch }); + const { onCreateStatusClick } = useStatus(); + + const isDropDisabled = dragState !== DragState.DRAG_BOARD; const contextMenu = (board: BoardSchema) => showContextMenu([ { @@ -54,16 +53,22 @@ const Board = ({ return ( {provided => (
{ + if (dragState === DragState.DRAG_CARD) { + setSelectedBoard(board); + } + }} > {(provided) => ( @@ -77,7 +82,6 @@ const Board = ({ board.id === selectedBoard?.id ? styles["selected-board"] : styles["board"], - !isBoardDragEnded && styles["board-during-dnd"], )} onClick={() => setSelectedBoard(board)} diff --git a/src/components/Dnd/Boards/Boards/Boards.tsx b/src/components/Dnd/Boards/Boards/Boards.tsx index 8414fc0..7c3bfdf 100644 --- a/src/components/Dnd/Boards/Boards/Boards.tsx +++ b/src/components/Dnd/Boards/Boards/Boards.tsx @@ -1,89 +1,66 @@ import { Box, Center, Group, Stack } from "@mantine/core"; import { DragDropContext } from "@hello-pangea/dnd"; -import { BoardSchema, DealSummary, ProjectSchema } from "../../../../client"; +import { BoardSchema } from "../../../../client"; import { IconPlus } from "@tabler/icons-react"; -import useBoards from "./hooks/useBoards.tsx"; import Statuses from "../../Statuses/Statuses/Statuses.tsx"; import Board from "../Board/Board.tsx"; -import useBoardsDnd from "./hooks/useBoardsDnd.tsx"; -import PrefillDealsWithExcelDrawer - from "../../../../pages/DealsPage/drawers/PrefillDealWithExcelDrawer/PrefillDealsWithExcelDrawer.tsx"; +import PrefillCardsWithExcelDrawer + from "../../../../pages/CardsPage/drawers/PrefillCardWithExcelDrawer/PrefillCardsWithExcelDrawer.tsx"; +import { useDndContext } from "../../../../pages/CardsPage/contexts/DndContext.tsx"; +import { useBoardsContext } from "../../../../contexts/BoardsContext.tsx"; -type Props = { - project: ProjectSchema | null; - summariesRaw: DealSummary[]; - refetchSummaries: () => void; - boards: BoardSchema[]; - refetchBoards: () => void; -} - -const Boards = (props: Props) => { +const Boards = () => { const { + boards, selectedBoard, - setSelectedBoard, onCreateBoardClick, - onEditBoardClick, - onDeleteBoardClick, - } = useBoards(props); + } = useBoardsContext(); const { - onBoardDragEnd, - isBoardDragEnded, - setIsBoardDragEnded, - } = useBoardsDnd(props); + onDragEnd, + onDragStart, + } = useDndContext(); const getBoardsTabs = () => { return ( - { - setIsBoardDragEnded(false); - }} - onDragEnd={onBoardDragEnd} + - ( + + ))} +
- {props.boards.map((board: BoardSchema) => ( - - ))} -
- -
- - - + +
+ +
); }; return ( - - {getBoardsTabs()} - - - + + + {getBoardsTabs()} + + + + ); }; diff --git a/src/components/Dnd/Boards/Boards/hooks/useBoardsDnd.tsx b/src/components/Dnd/Boards/Boards/hooks/useBoardsDnd.tsx index e018fdf..b6b1e19 100644 --- a/src/components/Dnd/Boards/Boards/hooks/useBoardsDnd.tsx +++ b/src/components/Dnd/Boards/Boards/hooks/useBoardsDnd.tsx @@ -1,16 +1,14 @@ import { DropResult } from "@hello-pangea/dnd"; import { BoardSchema, BoardService } from "../../../../../client"; import { notifications } from "../../../../../shared/lib/notifications.ts"; -import { useState } from "react"; +import { useBoardsContext } from "../../../../../contexts/BoardsContext.tsx"; -type Props = { - boards: BoardSchema[]; - refetchBoards: () => void; -} - -const useBoardsDnd = ({ boards, refetchBoards }: Props) => { - const [isBoardDragEnded, setIsBoardDragEnded] = useState(true); +const useBoardsDnd = () => { + const { + boards, + refetchBoards, + } = useBoardsContext(); const updateBoardOrder = (board: BoardSchema, newOrdinalNumber: number) => { BoardService.updateBoardOrder({ @@ -18,25 +16,24 @@ const useBoardsDnd = ({ boards, refetchBoards }: Props) => { projectId: board.projectId, boardId: board.id, newOrdinalNumber, - } + }, }) .then(({ ok, message }) => { if (!ok) notifications.error({ message }); refetchBoards(); - }) + }); }; const onBoardDragEnd = async (result: DropResult) => { - setIsBoardDragEnded(true); - // If there is no changes if (!result.destination || result.destination == result.source) return; - // Checking for valid dealId - const boardId = parseInt(result.draggableId); + // Checking for valid cardId + const boardIdStr = result.draggableId.replace("board-", ""); + const boardId = parseInt(boardIdStr); if (isNaN(boardId)) return; - // Checking for valid deal + // Checking for valid card const board = boards.find(board => board.id == boardId); if (!board) return; @@ -45,8 +42,6 @@ const useBoardsDnd = ({ boards, refetchBoards }: Props) => { return { onBoardDragEnd, - isBoardDragEnded, - setIsBoardDragEnded, }; }; diff --git a/src/components/Dnd/Deals/DealGroupView/DealGroupView.tsx b/src/components/Dnd/Cards/CardGroupView/CardGroupView.tsx similarity index 54% rename from src/components/Dnd/Deals/DealGroupView/DealGroupView.tsx rename to src/components/Dnd/Cards/CardGroupView/CardGroupView.tsx index d6562f5..cf3e540 100644 --- a/src/components/Dnd/Deals/DealGroupView/DealGroupView.tsx +++ b/src/components/Dnd/Cards/CardGroupView/CardGroupView.tsx @@ -1,25 +1,31 @@ -import { DealGroupSchema, DealGroupService, DealSummary } from "../../../../client"; +import { CardGroupSchema, CardGroupService, CardSummary } from "../../../../client"; import { FC, useEffect, useMemo, useState } from "react"; -import DealSummaryCard from "../DealSummaryCard/DealSummaryCard.tsx"; +import CardSummaryItem from "../CardSummaryItem/CardSummaryItem.tsx"; import { Flex, rem, Text, TextInput, useMantineColorScheme } from "@mantine/core"; import { IconGripHorizontal } from "@tabler/icons-react"; import { useDebouncedValue } from "@mantine/hooks"; import { notifications } from "../../../../shared/lib/notifications.ts"; +import { useProjectsContext } from "../../../../contexts/ProjectsContext.tsx"; +import isModuleInProject, { Modules } from "../../../../modules/utils/isModuleInProject.ts"; +import CardTags from "../CardTags/CardTags.tsx"; type Props = { - deals: DealSummary[]; - group: DealGroupSchema; + cards: CardSummary[]; + group: CardGroupSchema; } -export const DealGroupView: FC = ({ deals, group }) => { +export const CardGroupView: FC = ({ cards, group }) => { const theme = useMantineColorScheme(); const [name, setName] = useState(group.name || ""); const [debouncedName] = useDebouncedValue(name, 200); - const totalPrice = useMemo(() => deals.reduce((acc, deal) => acc + deal.totalPrice, 0), [deals]); - const totalProducts = useMemo(() => deals.reduce((acc, deal) => acc + deal.totalProducts, 0), [deals]); + const { selectedProject } = useProjectsContext(); + const isServicesAndProductsIncluded = isModuleInProject(Modules.SERVICES_AND_PRODUCTS, selectedProject); + + const totalPrice = useMemo(() => cards.reduce((acc, card) => acc + card.totalPrice, 0), [cards]); + const totalProducts = useMemo(() => cards.reduce((acc, card) => acc + card.totalProducts, 0), [cards]); const updateName = () => { if (debouncedName === group.name) return; - DealGroupService.updateDealGroup({ + CardGroupService.updateCardGroup({ requestBody: { data: { ...group, @@ -62,27 +68,30 @@ export const DealGroupView: FC = ({ deals, group }) => { - {deals.map(deal => ( - ( + ))} - - Сумма: {totalPrice.toLocaleString("ru-RU")} руб. - Всего товаров: {totalProducts.toLocaleString("ru-RU")} шт. - + + {isServicesAndProductsIncluded && ( + + Сумма: {totalPrice.toLocaleString("ru-RU")} руб. + Всего товаров: {totalProducts.toLocaleString("ru-RU")} шт. + + )} ); }; \ No newline at end of file diff --git a/src/components/Dnd/Deals/DealSummaryCard/DealSummaryCard.module.css b/src/components/Dnd/Cards/CardSummaryItem/CardSummaryItem.module.css similarity index 100% rename from src/components/Dnd/Deals/DealSummaryCard/DealSummaryCard.module.css rename to src/components/Dnd/Cards/CardSummaryItem/CardSummaryItem.module.css diff --git a/src/components/Dnd/Deals/DealSummaryCard/DealSummaryCard.tsx b/src/components/Dnd/Cards/CardSummaryItem/CardSummaryItem.tsx similarity index 60% rename from src/components/Dnd/Deals/DealSummaryCard/DealSummaryCard.tsx rename to src/components/Dnd/Cards/CardSummaryItem/CardSummaryItem.tsx index 66d78d6..e53526b 100644 --- a/src/components/Dnd/Deals/DealSummaryCard/DealSummaryCard.tsx +++ b/src/components/Dnd/Cards/CardSummaryItem/CardSummaryItem.tsx @@ -1,120 +1,107 @@ import { FC } from "react"; -import { DealService, DealSummary } from "../../../../client"; -import styles from "./DealSummaryCard.module.css"; +import { CardService, CardSummary } from "../../../../client"; +import styles from "./CardSummaryItem.module.css"; import { ActionIcon, Badge, CopyButton, Flex, Image, Popover, rem, Text, ThemeIcon, Tooltip } from "@mantine/core"; -import { useDealPageContext } from "../../../../pages/DealsPage/contexts/DealPageContext.tsx"; +import { useCardPageContext } from "../../../../pages/CardsPage/contexts/CardPageContext.tsx"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { faCheck } from "@fortawesome/free-solid-svg-icons"; import { IconCheck, IconLayoutGridRemove, IconTrash } from "@tabler/icons-react"; import { useContextMenu } from "mantine-contextmenu"; -import useDealSummaryState from "./useDealSummaryState.tsx"; +import useCardSummaryState from "./useCardSummaryState.tsx"; +import isModuleInProject, { Modules } from "../../../../modules/utils/isModuleInProject.ts"; +import { useProjectsContext } from "../../../../contexts/ProjectsContext.tsx"; +import CardTags from "../CardTags/CardTags.tsx"; type Props = { - dealSummary: DealSummary; + cardSummary: CardSummary; color?: string }; -const DealSummaryCard: FC = ({ dealSummary, color }) => { +const CardSummaryItem: FC = ({ cardSummary, color }) => { const { showContextMenu } = useContextMenu(); - const { setSelectedDeal } = useDealPageContext(); - const { onDelete, onComplete, onDeleteFromGroup } = useDealSummaryState(); + const { selectedProject } = useProjectsContext(); + const { setSelectedCard } = useCardPageContext(); + const { onDelete, onComplete, onDeleteFromGroup } = useCardSummaryState(); - const onDealSummaryClick = () => { - DealService.getDealById({ dealId: dealSummary.id }).then(deal => { - setSelectedDeal(deal); + const isServicesAndProductsIncluded = isModuleInProject(Modules.SERVICES_AND_PRODUCTS, selectedProject); + const isClientIncluded = isModuleInProject(Modules.CLIENTS, selectedProject); + + const onCardSummaryClick = () => { + CardService.getCardById({ cardId: cardSummary.id }).then(card => { + setSelectedCard(card); }); }; const isPaid = () => { - return dealSummary.billRequest?.paid || dealSummary.group?.billRequest?.paid; + return cardSummary.billRequest?.paid || cardSummary.group?.billRequest?.paid; }; const isLockedInsideGroup = () => { - return dealSummary.group && !dealSummary.group.billRequest; + return cardSummary.group && !cardSummary.group.billRequest; }; return (
onDeleteFromGroup(dealSummary), + onClick: () => onDeleteFromGroup(cardSummary), title: "Убрать из группы", icon: , }] : [], { key: "complete", - onClick: () => onComplete(dealSummary), + onClick: () => onComplete(cardSummary), title: "Завершить", icon: , }, { key: "delete", - onClick: () => onDelete(dealSummary), + onClick: () => onDelete(cardSummary), title: "Удалить", icon: , }, ])} - onClick={() => onDealSummaryClick()} + onClick={() => onCardSummaryClick()} className={styles["container"]} style={{ backgroundColor: color }} > - - - - {dealSummary.clientName} - - + {isClientIncluded && ( + + + {cardSummary.clientName} + + + )} - {dealSummary.name} + {cardSummary.name} - - - {dealSummary.shipmentWarehouseName || "Склад не указан"} - - - {dealSummary.totalPrice.toLocaleString("ru-RU")} руб,{" "} - - - {dealSummary.totalProducts.toLocaleString("ru-RU")} тов. - - - - {dealSummary.deliveryDate && ( - Доставка: {(new Date(dealSummary.deliveryDate)).toLocaleDateString("ru-RU")} + c={"gray.6"} + size={"sm"} + > + {cardSummary.totalPrice.toLocaleString("ru-RU")} руб,{" "} - )} - {dealSummary.receivingSlotDate && ( - Слот: {(new Date(dealSummary.receivingSlotDate)).toLocaleDateString("ru-RU")} + {cardSummary.totalProducts.toLocaleString("ru-RU")} тов. - )} - + + )} + {!cardSummary.group?.id && ( + + )} - + {({ copy, copied }) => ( = ({ dealSummary, color }) => { - ID: {dealSummary.id} + ID: {cardSummary.id}
@@ -162,7 +149,7 @@ const DealSummaryCard: FC = ({ dealSummary, color }) => { @@ -170,4 +157,4 @@ const DealSummaryCard: FC = ({ dealSummary, color }) => {
); }; -export default DealSummaryCard; +export default CardSummaryItem; diff --git a/src/components/Dnd/Deals/DealSummaryCard/useDealSummaryState.tsx b/src/components/Dnd/Cards/CardSummaryItem/useCardSummaryState.tsx similarity index 60% rename from src/components/Dnd/Deals/DealSummaryCard/useDealSummaryState.tsx rename to src/components/Dnd/Cards/CardSummaryItem/useCardSummaryState.tsx index 80c4102..6e6096e 100644 --- a/src/components/Dnd/Deals/DealSummaryCard/useDealSummaryState.tsx +++ b/src/components/Dnd/Cards/CardSummaryItem/useCardSummaryState.tsx @@ -1,91 +1,88 @@ -import { DealGroupService, DealService, DealSummary } from "../../../../client"; -import { useDealPageContext } from "../../../../pages/DealsPage/contexts/DealPageContext.tsx"; +import { CardGroupService, CardService, CardSummary } from "../../../../client"; +import { useCardPageContext } from "../../../../pages/CardsPage/contexts/CardPageContext.tsx"; import { modals } from "@mantine/modals"; import { Text } from "@mantine/core"; import { notifications } from "../../../../shared/lib/notifications.ts"; -const useDealSummaryState = () => { - const { refetchDeals } = useDealPageContext(); +const useCardSummaryState = () => { + const { refetchCards } = useCardPageContext(); - const recalculate = async (dealId: number) => { - return DealService.recalculateDealPrice({ + const recalculate = async (cardId: number) => { + return CardService.recalculateCardPrice({ requestBody: { - dealId: dealId, + cardId, }, }).then(({ ok, message }) => { notifications.guess(ok, { message }); }); }; - const onDelete = (summary: DealSummary) => { + const onDelete = (summary: CardSummary) => { modals.openConfirmModal({ - title: "Удаление сделки", + title: "Удаление карточки", children: ( - Вы уверены что хотите удалить сделку "{summary.name}"? + Вы уверены что хотите удалить карточку "{summary.name}"? ), labels: { confirm: "Да", cancel: "Нет" }, confirmProps: { color: "red" }, onConfirm: () => { - DealService.deleteDeal({ + CardService.deleteCard({ requestBody: { - dealId: summary.id, + cardId: summary.id, }, }).then(async (response) => { notifications.guess(response.ok, { message: response.message }); - if (response.ok) await refetchDeals(); + if (response.ok) await refetchCards(); }); }, }); }; - const onComplete = (summary: DealSummary) => { + const onComplete = (summary: CardSummary) => { modals.openConfirmModal({ - title: "Удаление сделки", + title: "Удаление карточки", children: ( - Вы уверены что хотите завершить сделку "{summary.name}"? + Вы уверены что хотите завершить карточку "{summary.name}"? ), labels: { confirm: "Да", cancel: "Нет" }, confirmProps: { color: "green" }, onConfirm: () => { - DealService.completeDeal({ + CardService.completeCard({ requestBody: { - dealId: summary.id, + cardId: summary.id, }, }).then(async (response) => { notifications.guess(response.ok, { message: response.message }); - if (response.ok) await refetchDeals(); - - + if (response.ok) await refetchCards(); }); }, }); }; - const onDeleteFromGroup = (summary: DealSummary) => { + const onDeleteFromGroup = (summary: CardSummary) => { modals.openConfirmModal({ - title: "Удаление сделки", + title: "Удаление карточки", children: ( - Вы уверены что хотите удалить сделку "{summary.name}" из группы? + Вы уверены что хотите удалить карточку "{summary.name}" из группы? ), labels: { confirm: "Да", cancel: "Нет" }, confirmProps: { color: "red" }, onConfirm: () => { - DealGroupService.removeDeal({ + CardGroupService.removeCard({ requestBody: { - dealId: summary.id, + cardId: summary.id, }, }).then(async (response) => { notifications.guess(response.ok, { message: response.message }); - if (response.ok) await refetchDeals(); + if (response.ok) await refetchCards(); await recalculate(summary.id); - if (response.ok) await refetchDeals(); - + if (response.ok) await refetchCards(); }); }, }); @@ -98,4 +95,4 @@ const useDealSummaryState = () => { }; }; -export default useDealSummaryState; \ No newline at end of file +export default useCardSummaryState; \ No newline at end of file diff --git a/src/components/Dnd/Cards/CardTags/CardTags.module.css b/src/components/Dnd/Cards/CardTags/CardTags.module.css new file mode 100644 index 0000000..10ead59 --- /dev/null +++ b/src/components/Dnd/Cards/CardTags/CardTags.module.css @@ -0,0 +1,21 @@ +.add-tag-button { + background-color: var(--mantine-color-dark-6); + border: 1px gray dashed; + border-radius: 50%; + width: 1.5rem; + height: 1.5rem; + padding: 0; + cursor: pointer; +} + +.add-tag-button:hover { + border-color: white; +} + +.add-tag-button-icon { + color: gray; +} + +.add-tag-button-icon:hover { + color: white; +} diff --git a/src/components/Dnd/Cards/CardTags/CardTags.tsx b/src/components/Dnd/Cards/CardTags/CardTags.tsx new file mode 100644 index 0000000..9c2e951 --- /dev/null +++ b/src/components/Dnd/Cards/CardTags/CardTags.tsx @@ -0,0 +1,98 @@ +import { Center, Checkbox, Group, Menu, Pill, rem, Stack, Text } from "@mantine/core"; +import { CardTagSchema, CardTagService } from "../../../../client"; +import { IconPlus } from "@tabler/icons-react"; +import styles from "./CardTags.module.css"; +import classNames from "classnames"; +import React from "react"; +import { useProjectsContext } from "../../../../contexts/ProjectsContext.tsx"; +import { notifications } from "../../../../shared/lib/notifications.ts"; +import { useCardPageContext } from "../../../../pages/CardsPage/contexts/CardPageContext.tsx"; + +type Props = { + cardId?: number; + groupId?: number; + tags: CardTagSchema[]; +} + +const CardTags = ({ tags, cardId, groupId }: Props) => { + const { selectedProject } = useProjectsContext(); + const { refetchCards } = useCardPageContext(); + + if (selectedProject?.tags.length === 0) return; + + const onTagClick = (tag: CardTagSchema, event: React.MouseEvent) => { + event.stopPropagation(); + + CardTagService.switchTag({ + requestBody: { + cardId: cardId ?? null, + groupId: groupId ?? null, + tagId: tag.id, + }, + }) + .then(({ ok, message }) => { + if (!ok) notifications.error({ message }); + refetchCards(); + }) + .catch(err => console.log(err)); + }; + + const addTagButton = ( + + + + + + e.stopPropagation()} + > + {selectedProject?.tags.map(tag => ( + + cardTag.id === tag.id)} + onClick={(event) => onTagClick(tag, event)} + /> + {tag.name} + + ))} + + + + ); + + const pills = tags.map(tag => { + return ( + + {tag.name} + + ); + }); + + return ( + + {addTagButton} + {pills} + + ); +}; + +export default CardTags; diff --git a/src/components/Dnd/Cards/CardsDndColumn/CardsDndColumn.tsx b/src/components/Dnd/Cards/CardsDndColumn/CardsDndColumn.tsx new file mode 100644 index 0000000..e6df276 --- /dev/null +++ b/src/components/Dnd/Cards/CardsDndColumn/CardsDndColumn.tsx @@ -0,0 +1,160 @@ +import { FC } from "react"; +import styles from "./DealsDndColumn.module.css"; +import { Draggable, Droppable } from "@hello-pangea/dnd"; +import CreateCardButton from "../CreateCardButton/CreateCardButton.tsx"; +import { CardGroupSchema, CardSummary, StatusSchema } from "../../../../client"; +import CardSummaryItem from "../CardSummaryItem/CardSummaryItem.tsx"; +import classNames from "classnames"; +import { groupBy, has, uniq } from "lodash"; +import { CardGroupView } from "../CardGroupView/CardGroupView.tsx"; +import CreateDealsFromFileButton from "../CreateCardsFromFileButton/CreateDealsFromFileButton.tsx"; +import DragState from "../../../../pages/CardsPage/enums/DragState.ts"; +import isModuleInProject, { Modules } from "../../../../modules/utils/isModuleInProject.ts"; +import { useProjectsContext } from "../../../../contexts/ProjectsContext.tsx"; + +type Props = { + status: StatusSchema; + withCreateButton?: boolean; + summaries: CardSummary[]; + dragState: DragState; +}; + +type GroupWithCards = { group: CardGroupSchema, cards: CardSummary[] } + +export const CardsDndColumn: FC = ({ + status, + summaries, + dragState, + withCreateButton = false, + }) => { + const { selectedProject } = useProjectsContext(); + const isCreatingDealFromFileEnabled = isModuleInProject(Modules.SERVICES_AND_PRODUCTS, selectedProject); + const isDropDisabled = dragState !== DragState.DRAG_CARD; + const droppableId = status.id.toString(); + + const isGroup = (obj: GroupWithCards | CardSummary): obj is GroupWithCards => { + return has(obj, "cards"); + }; + + const getCardGroups = (): GroupWithCards[] => { + const groups = uniq(summaries.filter(s => s.group).map(summary => summary.group) as CardGroupSchema[]); + if (groups.length === 0) return []; + const groupedSummaries = groupBy(summaries, "group.id"); + const groupDict = groups.reduce((acc, group) => { + acc[group.id] = group; + return acc; + }, {} as { [key: number]: CardGroupSchema }); + return Object.entries(groupedSummaries).reduce((acc, [groupId, cards]) => { + if (!groupId) return acc; + const group = groupDict[parseInt(groupId)]; + if (!group) return acc; + acc.push({ + group, + cards, + }); + return acc; + }, [] as { group: CardGroupSchema; cards: CardSummary[] }[]); + }; + + const getCardsAndGroups = (): (GroupWithCards | CardSummary)[] => { + const groups = getCardGroups(); + const cards = summaries.filter(s => !s.group).sort((a, b) => { + return new Date(a.createdAt).getTime() - new Date(b.createdAt).getTime(); + }); + return [...cards, ...groups].map((obj, index) => { + if (isGroup(obj)) { + obj.cards[0].rank = index; + return obj; + } + obj.rank = index; + return obj; + }) as (GroupWithCards | CardSummary)[]; + }; + + const renderCard = (card: CardSummary) => { + return ( + + {(provided, snapshot) => ( +
+
+ +
+
+ )} +
+ ); + }; + const renderGroup = (obj: GroupWithCards) => { + const { cards, group } = obj; + return ( + + {(provided) => ( +
+ +
+ )} +
+ ); + }; + return ( + + {(provided, snapshot) => ( +
+ {withCreateButton && ( + <> + + { + isCreatingDealFromFileEnabled && + () + } + + )} + {getCardsAndGroups().map(obj => { + if (isGroup(obj)) { + return renderGroup(obj); + } + return renderCard(obj); + })} + {provided.placeholder} +
+ )} +
+ ); +}; + +export default CardsDndColumn; + diff --git a/src/components/Dnd/Deals/DealsDndColumn/DealsDndColumn.module.css b/src/components/Dnd/Cards/CardsDndColumn/DealsDndColumn.module.css similarity index 100% rename from src/components/Dnd/Deals/DealsDndColumn/DealsDndColumn.module.css rename to src/components/Dnd/Cards/CardsDndColumn/DealsDndColumn.module.css diff --git a/src/components/Dnd/Deals/DealsDndColumn/hooks/useDealsDnd.tsx b/src/components/Dnd/Cards/CardsDndColumn/hooks/useCardsDnd.tsx similarity index 79% rename from src/components/Dnd/Deals/DealsDndColumn/hooks/useDealsDnd.tsx rename to src/components/Dnd/Cards/CardsDndColumn/hooks/useCardsDnd.tsx index d5763f1..cbc81fb 100644 --- a/src/components/Dnd/Deals/DealsDndColumn/hooks/useDealsDnd.tsx +++ b/src/components/Dnd/Cards/CardsDndColumn/hooks/useCardsDnd.tsx @@ -2,17 +2,17 @@ import { modals } from "@mantine/modals"; import { Flex } from "@mantine/core"; import { DropResult } from "@hello-pangea/dnd"; import { useEffect, useState } from "react"; -import { DealGroupService, DealService, DealSummary, DealSummaryReorderRequest } from "../../../../../client"; +import { CardGroupService, CardService, CardSummary, CardSummaryReorderRequest } from "../../../../../client"; import { notifications } from "../../../../../shared/lib/notifications.ts"; import { dateWithoutTimezone } from "../../../../../shared/lib/date.ts"; type Props = { - summariesRaw: DealSummary[]; + summariesRaw: CardSummary[]; refetchSummaries: () => void; } -const useDealsDnd = ({ +const useCardsDnd = ({ summariesRaw, refetchSummaries, }: Props) => { @@ -22,18 +22,20 @@ const useDealsDnd = ({ setSummaries(summariesRaw); }, [summariesRaw]); - const recalculate = async (dealId: number) => { - return DealService.recalculateDealPrice({ + const recalculate = async (cardId: number) => { + return CardService.recalculateCardPrice({ requestBody: { - dealId: dealId, + cardId, }, }).then(({ ok, message }) => { - notifications.guess(ok, { message }); + if (!ok) { + notifications.guess(ok, { message }); + } }); }; - const onDelete = (dealId: number) => { - const summary = summaries.find(summary => summary.id == dealId); + const onDelete = (cardId: number) => { + const summary = summaries.find(summary => summary.id == cardId); if (!summary) return; modals.openConfirmModal({ title: "Удаление сделки", @@ -43,8 +45,8 @@ const useDealsDnd = ({ ), onConfirm: () => { - DealService.deleteDeal({ - requestBody: { dealId: dealId }, + CardService.deleteCard({ + requestBody: { cardId }, }).then(async ({ ok, message }) => { notifications.guess(ok, { message }); if (!ok) return; @@ -58,8 +60,8 @@ const useDealsDnd = ({ }); }; - const onSuccess = (dealId: number) => { - const summary = summaries.find(summary => summary.id == dealId); + const onSuccess = (cardId: number) => { + const summary = summaries.find(summary => summary.id == cardId); if (!summary) return; modals.openConfirmModal({ title: "Завершение сделки", @@ -69,8 +71,8 @@ const useDealsDnd = ({ ), onConfirm: () => { - DealService.completeDeal({ - requestBody: { dealId: dealId }, + CardService.completeCard({ + requestBody: { cardId }, }).then(async ({ ok, message }) => { notifications.guess(ok, { message }); if (!ok) return; @@ -91,9 +93,9 @@ const useDealsDnd = ({ const sourceId = parseInt(source); if (destination.includes("group")) { const groupId = parseInt(destination.split("-")[1]); - DealGroupService.addDeal({ + CardGroupService.addCard({ requestBody: { - dealId: sourceId, + cardId: sourceId, groupId: groupId, }, }).then(async response => { @@ -108,10 +110,10 @@ const useDealsDnd = ({ } else { const destinationId = parseInt(destination); // creating new group - DealGroupService.createDealGroup({ + CardGroupService.createCardGroup({ requestBody: { - draggingDealId: sourceId, - hoveredDealId: destinationId, + draggingCardId: sourceId, + hoveredCardId: destinationId, }, }).then(async response => { if (!response.ok) { @@ -130,7 +132,7 @@ const useDealsDnd = ({ const destination = result.destination?.droppableId; if (!destination) return; const statusId = parseInt(destination); - DealGroupService.changeStatus({ + CardGroupService.changeStatus({ requestBody: { groupId: groupId, newStatus: statusId, @@ -144,7 +146,7 @@ const useDealsDnd = ({ }); }; - const onDealDragEnd = async (result: DropResult) => { + const onCardDragEnd = async (result: DropResult) => { if (result.combine) { return onCombine(result); } @@ -152,37 +154,37 @@ const useDealsDnd = ({ // If there is no changes if (!result.destination || result.destination == result.source) return; - // Checking for valid dealId + // Checking for valid cardId if (result.draggableId.includes("group")) { return moveGroup(result); } - const dealId = parseInt(result.draggableId); - if (isNaN(dealId)) return; + const cardId = parseInt(result.draggableId); + if (isNaN(cardId)) return; - // Checking for valid deal - const summary = summaries.find(summary => summary.id == dealId); + // Checking for valid card + const summary = summaries.find(summary => summary.id == cardId); if (!summary) return; // Checking if it is custom actions const droppableId = result.destination.droppableId; if (droppableId === "DELETE") { - onDelete(dealId); + onDelete(cardId); return; } if (droppableId === "SUCCESS") { - onSuccess(dealId); + onSuccess(cardId); return; } const statusId = Number.parseInt(droppableId); - const request: Partial = { - dealId, + const request: Partial = { + cardId, index: result.destination.index, statusId, }; if (statusId == summary.status.id) { - DealService.reorderDealSummaries({ - requestBody: request as DealSummaryReorderRequest, + CardService.reorderCardSummaries({ + requestBody: request as CardSummaryReorderRequest, }).then(async response => { setSummaries(response.summaries); await refetchSummaries(); @@ -190,9 +192,9 @@ const useDealsDnd = ({ return; } - DealService.reorderDealSummaries({ + CardService.reorderCardSummaries({ requestBody: { - dealId, + cardId, statusId, index: result.destination.index, comment: "", @@ -206,8 +208,8 @@ const useDealsDnd = ({ return { summaries, - onDealDragEnd, + onCardDragEnd, }; }; -export default useDealsDnd; +export default useCardsDnd; diff --git a/src/components/Dnd/Deals/DealsDndColumn/utils/getColumnColor.ts b/src/components/Dnd/Cards/CardsDndColumn/utils/getColumnColor.ts similarity index 100% rename from src/components/Dnd/Deals/DealsDndColumn/utils/getColumnColor.ts rename to src/components/Dnd/Cards/CardsDndColumn/utils/getColumnColor.ts diff --git a/src/components/Dnd/Deals/DealsDndFooter/DealsDndFooter.tsx b/src/components/Dnd/Cards/CardsDndFooter/CardsDndFooter.tsx similarity index 88% rename from src/components/Dnd/Deals/DealsDndFooter/DealsDndFooter.tsx rename to src/components/Dnd/Cards/CardsDndFooter/CardsDndFooter.tsx index 6f8ff3c..41bc831 100644 --- a/src/components/Dnd/Deals/DealsDndFooter/DealsDndFooter.tsx +++ b/src/components/Dnd/Cards/CardsDndFooter/CardsDndFooter.tsx @@ -1,15 +1,15 @@ import { Flex, rem } from "@mantine/core"; import classNames from "classnames"; -import styles from "../../../../pages/DealsPage/ui/DealsPage.module.css"; +import styles from "../../../../pages/CardsPage/ui/CardsPage.module.css"; import { Droppable } from "@hello-pangea/dnd"; -import DragState from "../../../../pages/DealsPage/enums/DragState.ts"; +import DragState from "../../../../pages/CardsPage/enums/DragState.ts"; type Props = { dragState: DragState; } -const DealsDndFooter = ({ dragState }: Props) => { - const isDealDragEnded = dragState === DragState.DRAG_ENDED; +const CardsDndFooter = ({ dragState }: Props) => { + const isDealDragEnded = dragState !== DragState.DRAG_CARD; return ( { ); }; -export default DealsDndFooter; +export default CardsDndFooter; diff --git a/src/components/Dnd/Deals/CreateDealButton/CreateDealButton.tsx b/src/components/Dnd/Cards/CreateCardButton/CreateCardButton.tsx similarity index 64% rename from src/components/Dnd/Deals/CreateDealButton/CreateDealButton.tsx rename to src/components/Dnd/Cards/CreateCardButton/CreateCardButton.tsx index 8c4eec1..f16487f 100644 --- a/src/components/Dnd/Deals/CreateDealButton/CreateDealButton.tsx +++ b/src/components/Dnd/Cards/CreateCardButton/CreateCardButton.tsx @@ -2,21 +2,26 @@ import { useState } from "react"; import styles from "./CreateDealButton.module.css"; import { Text, Transition } from "@mantine/core"; -import CreateDealFrom from "../CreateDealForm/CreateDealFrom.tsx"; -import { DealService, StatusSchema } from "../../../../client"; +import CreateCardForm from "../CreateCardForm/CreateCardForm.tsx"; +import { CardService, StatusSchema } from "../../../../client"; import { useQueryClient } from "@tanstack/react-query"; import { dateWithoutTimezone } from "../../../../shared/lib/date.ts"; -import { usePrefillDealContext } from "../../../../pages/DealsPage/contexts/PrefillDealContext.tsx"; +import { usePrefillCardContext } from "../../../../pages/CardsPage/contexts/PrefillCardContext.tsx"; +import isModuleInProject, { Modules } from "../../../../modules/utils/isModuleInProject.ts"; +import { useProjectsContext } from "../../../../contexts/ProjectsContext.tsx"; type Props = { status: StatusSchema; } -const CreateDealButton = ({ status }: Props) => { +const CreateCardButton = ({ status }: Props) => { const [isCreating, setIsCreating] = useState(false); const [isTransitionEnded, setIsTransitionEnded] = useState(true); const queryClient = useQueryClient(); - const { prefillDeal, setPrefillDeal } = usePrefillDealContext(); + const { prefillCard, setPrefillCard } = usePrefillCardContext(); + + const { selectedProject } = useProjectsContext(); + const isPrefillingDealEnabled = isModuleInProject(Modules.SERVICES_AND_PRODUCTS, selectedProject); return (
{ onExited={() => setIsTransitionEnded(true)}> {styles => (
- { - setPrefillDeal(undefined); + setPrefillCard(undefined); setIsCreating(false); }} onSubmit={quickDeal => { - DealService.quickCreateDealQuickCreatePost({ + CardService.quickCreateCardQuickCreatePost({ requestBody: { ...quickDeal, acceptanceDate: dateWithoutTimezone( @@ -50,19 +55,19 @@ const CreateDealButton = ({ status }: Props) => { statusId: status.id, }, }).then(async (result) => { - if (prefillDeal) { - DealService.prefillDeal({ + if (isPrefillingDealEnabled && prefillCard) { + CardService.prefillCard({ requestBody: { - oldDealId: prefillDeal.id, - newDealId: result.dealId, + oldCardId: prefillCard.id, + newCardId: result.cardId, }, }); } await queryClient.invalidateQueries({ - queryKey: ["getDealSummaries"], + queryKey: ["getCardSummaries"], }); setIsCreating(false); - setPrefillDeal(undefined); + setPrefillCard(undefined); }); }} /> @@ -72,4 +77,4 @@ const CreateDealButton = ({ status }: Props) => {
); }; -export default CreateDealButton; +export default CreateCardButton; diff --git a/src/components/Dnd/Deals/CreateDealButton/CreateDealButton.module.css b/src/components/Dnd/Cards/CreateCardButton/CreateDealButton.module.css similarity index 100% rename from src/components/Dnd/Deals/CreateDealButton/CreateDealButton.module.css rename to src/components/Dnd/Cards/CreateCardButton/CreateDealButton.module.css diff --git a/src/components/Dnd/Deals/CreateDealForm/CreateDealForm.module.css b/src/components/Dnd/Cards/CreateCardForm/CreateCardForm.module.css similarity index 100% rename from src/components/Dnd/Deals/CreateDealForm/CreateDealForm.module.css rename to src/components/Dnd/Cards/CreateCardForm/CreateCardForm.module.css diff --git a/src/components/Dnd/Cards/CreateCardForm/CreateCardForm.tsx b/src/components/Dnd/Cards/CreateCardForm/CreateCardForm.tsx new file mode 100644 index 0000000..0cbc6a8 --- /dev/null +++ b/src/components/Dnd/Cards/CreateCardForm/CreateCardForm.tsx @@ -0,0 +1,136 @@ +import { Button, rem, Textarea, TextInput } from "@mantine/core"; +import { QuickCard } from "../../../../types/QuickCard.ts"; +import { FC } from "react"; +import { useForm } from "@mantine/form"; +import styles from "./CreateCardForm.module.css"; +import ClientAutocomplete from "../../../Selects/ClientAutocomplete/ClientAutocomplete.tsx"; +import { DateTimePicker } from "@mantine/dates"; +import ShippingWarehouseAutocomplete + from "../../../Selects/ShippingWarehouseAutocomplete/ShippingWarehouseAutocomplete.tsx"; +import BaseMarketplaceSelect from "../../../Selects/BaseMarketplaceSelect/BaseMarketplaceSelect.tsx"; +import { usePrefillCardContext } from "../../../../pages/CardsPage/contexts/PrefillCardContext.tsx"; +import isModuleInProject, { Modules } from "../../../../modules/utils/isModuleInProject.ts"; +import { useProjectsContext } from "../../../../contexts/ProjectsContext.tsx"; + +type Props = { + onSubmit: (quickDeal: QuickCard) => void; + onCancel: () => void; +}; + +const CreateCardForm: FC = ({ onSubmit, onCancel }) => { + const { selectedProject } = useProjectsContext(); + const isPrefillingEnabled = isModuleInProject(Modules.SERVICES_AND_PRODUCTS, selectedProject); + const { prefillOnOpen, prefillCard } = usePrefillCardContext(); + + const isServicesAndProductsIncluded = isModuleInProject(Modules.SERVICES_AND_PRODUCTS, selectedProject); + const isClientsIncluded = isModuleInProject(Modules.CLIENTS, selectedProject); + + const form = useForm({ + initialValues: { + name: "", + clientName: null, + comment: "", + acceptanceDate: new Date(), + shippingWarehouse: null, + baseMarketplace: null, + }, + validate: { + baseMarketplace: baseMarketplace => + isServicesAndProductsIncluded && !baseMarketplace && "МП не выбран", + shippingWarehouse: shippingWarehouse => + isServicesAndProductsIncluded && !shippingWarehouse && "Склад отгрузки не выбран", + clientName: clientName => + isClientsIncluded && !clientName && "Клиент не выбран", + }, + }); + + const prefillButtonLabel = prefillCard ? `Предзаполнено [ID: ${prefillCard.id}]` : "Предзаполнить"; + + return ( +
onSubmit(values))}> +
+
+ +
+ {isClientsIncluded && ( +
+ +
+ )} + {isServicesAndProductsIncluded && ( + <> +
+ } + placeholder={"Базовый маркетплейс"} + {...form.getInputProps("baseMarketplace")} + /> +
+
+ +
+ + )} +
+