- Added Redis caching to BusinessActivitiesService for findAll and findOne methods.
- Integrated Redis caching in BusinessActivityComplexesService for findAll and findOne methods.
- Enhanced ConsumersService with Redis caching for findAll and findOne methods.
- Introduced cache invalidation for partner consumers and business activities.
- Created RedisKeyMaker utility for generating cache keys for consumers, partners, and POS.
- Implemented cache invalidation services for partners and POS.
- Added Redis service methods for JSON handling and key deletion by patterns.
- Updated goods service to include caching and invalidation for goods list.
- Introduced DTO for updating goods.
- Added new DTOs for correction requests and responses in `nama-provider.dto.ts`.
- Updated `nama-provider.adapter.ts` to include `originalSend` and `correctionSend` methods.
- Enhanced `nama-provider.util.ts` with mapping functions for correction requests.
- Created operational guidelines for agents in `AGENT.md`.
- Updated Prisma migrations to support new invoice types and relationships.
- Introduced new service and DTO for creating sales invoices in `sale-invoice-create.service.ts` and `sale-invoice-create.dto.ts`.
- Added utility for handling Prisma errors in `prisma-error.util.ts`.
- Created SendBulkSaleInvoicesDto for handling bulk sale invoice requests.
- Implemented TaxSwitchSendPayloadDto and related DTOs for tax switch item payloads and results.
- Developed SalesInvoiceTaxSwitchService to manage tax switch operations, including sending and retrieving tax information.
- Added SalesInvoiceTaxService for handling sales invoice tax logic, including bulk sending and persistence of results.
- Introduced NamaTaxSwitchAdapter to interact with the tax switch service, simulating external API responses.
- Created SendBulkSalesInvoicesDto for POS module to handle bulk sales invoice requests.
- Created response DTOs for ConfigService, AppService, AuthService, CatalogsService, AccountsService, BusinessActivityComplexesService, ComplexPosesService, SalesInvoicesService, BusinessActivitiesService, ConsumerBusinessActivityGoodsService, and others.
- Implemented Create, FindAll, FindOne, and Update response types for services in consumer, partners, and POS modules.
- Added request DTOs for creating and updating goods in the consumer business activities module.
- Introduced filtering DTO for partner licenses.
- Enhanced response mapping for partner license activations.
fix: update PartnersService to use 'isNot' instead of 'not' for allocation checks
refactor: enhance BusinessActivityComplexesService to validate license activation before creating a complex
fix: adjust ComplexPosesService to ensure account allocation checks are accurate and handle errors properly
refactor: modify ConsumerMiddleware to set consumerData instead of partnerData for better clarity
feat: expand SaleInvoicesService to include additional fields in the invoice selection
chore: update business-activities module to include accounts-charge module for better organization
fix: ensure ComplexPosesService correctly handles account allocation during POS creation
feat: implement PartnerBusinessActivityAccountsCharge module with create functionality for account charges
refactor: streamline getPartnerBusinessActivityAllocationLimits utility for better clarity and functionality
chore: add migration script to update database schema with necessary constraints and foreign keys
feat: create DTO for accounts charge to validate incoming data
- Implemented `getPartnerBusinessActivityAllocationLimits` to retrieve allocation limits for a partner's business activity.
- Added `ensurePartnerBusinessActivityHasRemainingAllocation` to validate remaining allocation credits.
- Created `getPartnerRemainingLicenses` to count remaining licenses for a partner.
- Developed `getPartnerFirstRemainingLicense` to fetch the first unused license for a partner.
- Introduced `ensurePartnerHasRemainingLicense` to ensure a partner has at least one unused license.
- Updated PartnerAccountQuotaAllocation model to change license relation.
- Refactored Pos model to replace 'serial' with 'serial_number' across all references.
- Modified BusinessActivitiesService to include license activation details in responses.
- Adjusted ComplexPosesService to reflect changes in the Pos model.
- Updated PartnerService to include a new method for updating partner profiles.
- Created UpdatePartnerProfileDto for partner profile updates.
- Added migration to drop 'serial' column and add unique 'serial_number' column in poses table.
- Implemented AccountsService for managing consumer accounts including create, update, delete, and find operations.
- Created DTOs for account creation and updates.
- Developed BusinessActivitiesController and BusinessActivitiesService for handling business activities related to consumers.
- Added complexes management with ComplexesController and ComplexesService.
- Introduced POS management with ComplexPosesController and ComplexPosesService.
- Created necessary DTOs for business activities and POS.
- Established Licenses management with LicensesController and LicensesService.
- Integrated consumer management with PartnerConsumersController and PartnerConsumersService.
- Added Prisma module imports and service connections across modules.