import type * as IShared from '../../../shared/interface'; import type { DocumentLine, DocumentLineVirtuals, DocumentLinePendingConflict, DocumentLineBaseVirtuals, ProductPromotionVirtuals, DocumentLineNote, DocumentLineRM, DocumentLineMT } from '../../../shared/entities/stock'; import type * as IDocumentLineAssoc from '../documentLineAssoc/interfaces'; import type { IDocumentTypeCodeType, IDocumentTypeUserType } from '../documentType/interfaces'; import type { IProductType, IProductState } from '../../stock/productGoogleSheets/interface'; import type { IGetProductType, IGetProductGroup } from '../../integration/googleSheets/interfaces'; import type { IMotivosDeEsperaData } from '../../document/order/interfaces'; export type Entity = DocumentLine; export declare const Route = "documentLine"; export declare const UpperName = "DocumentLine"; export declare const LowerName: string; export type IDocumentLineVirtuals = DocumentLineVirtuals; export type IDocumentLineBaseVirtuals = DocumentLineBaseVirtuals; export type IPromotions = Pick; export type IDataKeys = 'AvisoCliente' | 'Quantidade Encomendada Originalmente' | 'Linha criada na EM' | 'Opcao EM' | 'Levantar DF' | 'Enviar Email NCF' | 'Fechar DF' | 'Documento pago' | 'Pagamento' | 'Recibo do documento'; export interface IDataPayload { value: unknown; updated_at: Date; updated_by: string; location_id: string; history?: IDataPayload[]; } export type IData = { [K in IDataKeys]?: IDataPayload; }; export interface IImportedFromSheets { type: IGetProductType; group: IGetProductGroup; index: number; reference: string; } export interface IDataDocumentoPago { name: string; dh_id: string; value: number; discount_value: number; } export interface IDataPagamento { name: string; cca_id?: string; pca_id?: string; value: number; discount_value: number; } export interface IDocumentLineDocuments { code: IDocumentTypeCodeType; user_type: IDocumentTypeUserType; start_document_header_id?: string; pdf_link?: string; external_url?: string; label?: string; edh_id?: string; } export interface IHistory { what: string; when: string; who: string; } export type IEsperaInfoClienteData = { value: string; data: IMotivosDeEsperaData; }; export interface IEntityExtended extends Omit { group: string; document_headers: IDocumentLineDocuments[]; document_line_rm: DocumentLineRM | null; document_line_mt: DocumentLineMT | null; pending_conflict: DocumentLinePendingConflict | null; document_line_notes: DocumentLineNote[]; product_type: IProductType | null; product_id_provider: number | null; product_provider_ref: string | null; product_state: IProductState | null; product_no_discount: boolean; product_measure: string | null; product_integer_only: boolean; espera_info_cliente_data: IEsperaInfoClienteData; } export interface ICreateRequest { document_header_id: string; document_line_id?: string; product_id?: string; quantity: number; preco_venda: number; client_tax: number; client_discount: number; preco_custo: number; provider_tax: number; provider_discount: number; document_line_group_id?: string; data: IData; } export interface IUpdateRequest { product_id?: string; quantity?: number; preco_venda?: number; client_tax?: number; client_discount?: number; preco_custo?: number; provider_tax?: number; provider_discount?: number; provider_purchase_discount?: number; document_line_group_id?: string; sent_to_client?: boolean; sent_to_provider?: boolean; } export interface IUpdateManyRequest { ids: string[]; client_discount?: number; price_cost?: number; provider_discount?: number; provider_estimated_delivery_date?: Date | null; provider_purchase_discount?: number; consignacao?: boolean; cancelled?: boolean; force_closed?: boolean; } export interface IUpdateManyByDocumentHeaderRequest { sent_to_provider?: boolean; } export interface IUpdateLineStatesTriggerResponse { document_header_id: string; trigger_event: boolean; broker_topic?: IShared.IBrokerTopic; } export interface IPrintLabelParamsRequest { document_line_ids: string; } export interface IPrintLabelQueryRequest { token: string; } export interface IRepository { create(data: ICreateRequest[]): Promise; update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise; updateMany(data: IUpdateManyRequest): Promise; updateManyByDocumentHeader(selector: IShared.IFindByIdRequest, data: IUpdateManyByDocumentHeaderRequest): Promise; deleteMany(document_line_ids: string[]): Promise; } export type IController = IShared.IEntityWithUserToken;