@nomalism-com/types 0.19.18 → 0.19.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as IShared from
|
|
2
|
-
import { DocumentLine, DocumentLineVirtuals, DocumentLineFolder, DocumentLinePendingConflict, DocumentLineBaseVirtuals } from
|
|
3
|
-
import * as IDocumentLineAssoc from
|
|
4
|
-
import * as IDocumentHeader from
|
|
5
|
-
import * as IDocumentType from
|
|
1
|
+
import * as IShared from "../../../shared/interface";
|
|
2
|
+
import { DocumentLine, DocumentLineVirtuals, DocumentLineFolder, DocumentLinePendingConflict, DocumentLineBaseVirtuals } from "../../../shared/entities";
|
|
3
|
+
import * as IDocumentLineAssoc from "../documentLineAssoc/interfaces";
|
|
4
|
+
import * as IDocumentHeader from "../documentHeader/interfaces";
|
|
5
|
+
import * as IDocumentType from "../documentType/interfaces";
|
|
6
6
|
export type Entity = DocumentLine;
|
|
7
7
|
export declare const Route = "documentLine";
|
|
8
8
|
export declare const UpperName = "DocumentLine";
|
|
@@ -114,7 +114,7 @@ export type IMetadata = {
|
|
|
114
114
|
totalPrice: number;
|
|
115
115
|
};
|
|
116
116
|
};
|
|
117
|
-
export type IDataKeys =
|
|
117
|
+
export type IDataKeys = "Encomendar" | "Quantidade Encomendada Originalmente" | "Linha criada na EM" | "Entrada de Material" | "Opcao EM" | "Levantar DF" | "Enviar Email NCF" | "DF Rejeitada" | "Documento pago" | "Fatura Devolvida" | "Devolucao Cliente" | "Recibo do documento" | "Cancelar" | "OriginalProductId" | "imported_from_sheets" | "sheets_line_position" | "Emitir" | "Backup PDF" | "Conferir" | "Conferir Encomenda" | "Continuar" | "Saldos Migrados" | "Estado PHC" | "Pagamento" | "PHC origin_id" | "PHC ef_stamp";
|
|
118
118
|
export interface IDataPayload {
|
|
119
119
|
value: unknown;
|
|
120
120
|
updated_at: Date;
|
|
@@ -125,8 +125,21 @@ export interface IDataPayload {
|
|
|
125
125
|
export type IData = {
|
|
126
126
|
[K in IDataKeys]?: IDataPayload;
|
|
127
127
|
};
|
|
128
|
-
export
|
|
129
|
-
|
|
128
|
+
export interface IDataDocumentoPago {
|
|
129
|
+
name: string;
|
|
130
|
+
dh_id: string;
|
|
131
|
+
value: number;
|
|
132
|
+
discount_value: number;
|
|
133
|
+
}
|
|
134
|
+
export interface IDataPagamento {
|
|
135
|
+
name: string;
|
|
136
|
+
cca_id?: string;
|
|
137
|
+
pca_id?: string;
|
|
138
|
+
value: number;
|
|
139
|
+
discount_value: number;
|
|
140
|
+
}
|
|
141
|
+
export type IDocumentLineDocuments = Pick<IDocumentHeader.Entity, "pdf_link" | "owner_id" | "document_number"> & {
|
|
142
|
+
document_type: Pick<IDocumentType.Entity, "code" | "user_type">;
|
|
130
143
|
closed: boolean;
|
|
131
144
|
emission_date: Date;
|
|
132
145
|
created_by: string | null;
|
|
@@ -138,7 +151,7 @@ export interface IEntityExtended extends DocumentLine {
|
|
|
138
151
|
document_line_folder: DocumentLineFolder | null;
|
|
139
152
|
pending_conflict: DocumentLinePendingConflict | null;
|
|
140
153
|
}
|
|
141
|
-
export interface ICreateRequest extends Omit<IDocumentLineAssoc.ICreateRequest,
|
|
154
|
+
export interface ICreateRequest extends Omit<IDocumentLineAssoc.ICreateRequest, "document_line_id"> {
|
|
142
155
|
document_line_id?: string;
|
|
143
156
|
product_id?: string;
|
|
144
157
|
quantity: number;
|
|
@@ -181,8 +194,8 @@ export interface IUpdateManyRequest {
|
|
|
181
194
|
provider_discount?: number | null;
|
|
182
195
|
provider_estimated_delivery_date?: Date | null;
|
|
183
196
|
}
|
|
184
|
-
export interface IUpdateDataRequestWithoutStamps extends Omit<IUpdateDataRequest,
|
|
185
|
-
payload: Pick<IDataPayload,
|
|
197
|
+
export interface IUpdateDataRequestWithoutStamps extends Omit<IUpdateDataRequest, "payload"> {
|
|
198
|
+
payload: Pick<IDataPayload, "value"> & {
|
|
186
199
|
updated_by?: string;
|
|
187
200
|
};
|
|
188
201
|
}
|
|
@@ -215,7 +228,7 @@ export interface IRepository {
|
|
|
215
228
|
updateIndexes(document_line_ids: string[]): Promise<void>;
|
|
216
229
|
deleteMany(document_line_ids: string[]): Promise<void>;
|
|
217
230
|
}
|
|
218
|
-
export type IApi = Omit<IRepository,
|
|
231
|
+
export type IApi = Omit<IRepository, "updateData"> & {
|
|
219
232
|
updateData(data: IUpdateDataRequestWithoutStamps): Promise<IDocumentLineAssoc.IEntityWithDocumentLine[]>;
|
|
220
233
|
};
|
|
221
234
|
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
@@ -6,7 +6,7 @@ import { IBatchType, IPaymentOrigin } from "../../modules/supply/payment/interfa
|
|
|
6
6
|
import { IProductType, IEntityExtended } from "../../modules/stock/product/interface";
|
|
7
7
|
import { IImageType } from "../../modules/stock/productImage/interface";
|
|
8
8
|
import { IQueryParameterDatatype } from "../../modules/stock/queryParameter/interfaces";
|
|
9
|
-
import { IData, IMetadata } from "../../modules/supply/documentLine/interfaces";
|
|
9
|
+
import { IData, IDataDocumentoPago, IDataPagamento, IMetadata } from "../../modules/supply/documentLine/interfaces";
|
|
10
10
|
import { IPhcDocumentType } from "../../modules/supply/clientCurrentAccount/interfaces";
|
|
11
11
|
import { ISavedEmPickingData } from "../../modules/stock/savedEmPicking/interfaces";
|
|
12
12
|
import { IDocumentLineNoteType } from "../../modules/supply/documentLineNote/interfaces";
|
|
@@ -961,19 +961,8 @@ export type DocumentLineBaseVirtuals = {
|
|
|
961
961
|
df_rejeitada: boolean;
|
|
962
962
|
levantar_df: boolean;
|
|
963
963
|
conferir_encomenda: string | null;
|
|
964
|
-
documento_pago:
|
|
965
|
-
|
|
966
|
-
dh_id: string;
|
|
967
|
-
value: number;
|
|
968
|
-
discount_value: number;
|
|
969
|
-
} | null;
|
|
970
|
-
pagamento: {
|
|
971
|
-
name: string;
|
|
972
|
-
cca_id?: string;
|
|
973
|
-
pca_id?: string;
|
|
974
|
-
value: number;
|
|
975
|
-
discount_value: number;
|
|
976
|
-
} | null;
|
|
964
|
+
documento_pago: IDataDocumentoPago | null;
|
|
965
|
+
pagamento: IDataPagamento | null;
|
|
977
966
|
};
|
|
978
967
|
export type DocumentLineVirtuals = {
|
|
979
968
|
document_line_id: string;
|