feat: implement correction and original send functionality for Nama provider

- 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`.
This commit is contained in:
2026-05-05 22:42:09 +03:30
parent 4af07fe3e8
commit 658496320b
43 changed files with 2808 additions and 1354 deletions
@@ -4031,10 +4031,14 @@ export const SalesInvoiceScalarFieldEnum = {
total_amount: 'total_amount',
invoice_number: 'invoice_number',
invoice_date: 'invoice_date',
type: 'type',
tax_id: 'tax_id',
notes: 'notes',
unknown_customer: 'unknown_customer',
created_at: 'created_at',
updated_at: 'updated_at',
main_id: 'main_id',
ref_id: 'ref_id',
customer_id: 'customer_id',
consumer_account_id: 'consumer_account_id',
pos_id: 'pos_id'
@@ -4069,11 +4073,9 @@ export const SaleInvoiceTspAttemptsScalarFieldEnum = {
id: 'id',
attempt_no: 'attempt_no',
status: 'status',
tax_id: 'tax_id',
type: 'type',
request_payload: 'request_payload',
response_payload: 'response_payload',
error_message: 'error_message',
message: 'message',
sent_at: 'sent_at',
received_at: 'received_at',
created_at: 'created_at',
@@ -4586,7 +4588,10 @@ export type GuildOrderByRelevanceFieldEnum = (typeof GuildOrderByRelevanceFieldE
export const SalesInvoiceOrderByRelevanceFieldEnum = {
id: 'id',
code: 'code',
tax_id: 'tax_id',
notes: 'notes',
main_id: 'main_id',
ref_id: 'ref_id',
customer_id: 'customer_id',
consumer_account_id: 'consumer_account_id',
pos_id: 'pos_id'
@@ -4611,8 +4616,7 @@ export type SalesInvoiceItemOrderByRelevanceFieldEnum = (typeof SalesInvoiceItem
export const SaleInvoiceTspAttemptsOrderByRelevanceFieldEnum = {
id: 'id',
tax_id: 'tax_id',
error_message: 'error_message',
message: 'message',
invoice_id: 'invoice_id'
} as const
@@ -4870,16 +4874,16 @@ export type EnumInvoiceTemplateTypeFieldRefInput<$PrismaModel> = FieldRefInputTy
/**
* Reference to a field of type 'TspProviderResponseStatus'
* Reference to a field of type 'TspProviderRequestType'
*/
export type EnumTspProviderResponseStatusFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'TspProviderResponseStatus'>
export type EnumTspProviderRequestTypeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'TspProviderRequestType'>
/**
* Reference to a field of type 'TspProviderRequestType'
* Reference to a field of type 'TspProviderResponseStatus'
*/
export type EnumTspProviderRequestTypeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'TspProviderRequestType'>
export type EnumTspProviderResponseStatusFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'TspProviderResponseStatus'>