sim-node-lib 0.3.29 → 0.3.31
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,6 +1,7 @@
|
|
|
1
1
|
export declare class UpdateUtil {
|
|
2
2
|
static updateObjectsWithSameType(mainObj: any, obj: any, type?: any): typeof type;
|
|
3
3
|
}
|
|
4
|
+
export declare function updateObjectsWithSameType(mainObj: any, obj: any, type?: any): typeof type;
|
|
4
5
|
export declare function overwriteSimilarObjectsProperties<T>(mainObj: any, obj: any): T;
|
|
5
6
|
export declare function mergeObjectsWithSameType<T>(mainObj: any, obj: any): T;
|
|
6
7
|
export declare function flattenObjectIntoNewModel<T>(obj: any, model: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.flattenObjectIntoNewModel = exports.mergeObjectsWithSameType = exports.overwriteSimilarObjectsProperties = exports.UpdateUtil = void 0;
|
|
3
|
+
exports.flattenObjectIntoNewModel = exports.mergeObjectsWithSameType = exports.overwriteSimilarObjectsProperties = exports.updateObjectsWithSameType = exports.UpdateUtil = void 0;
|
|
4
4
|
class UpdateUtil {
|
|
5
5
|
static updateObjectsWithSameType(mainObj, obj, type) {
|
|
6
6
|
for (let k of Object.keys(obj)) {
|
|
@@ -10,6 +10,13 @@ class UpdateUtil {
|
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
12
|
exports.UpdateUtil = UpdateUtil;
|
|
13
|
+
function updateObjectsWithSameType(mainObj, obj, type) {
|
|
14
|
+
for (let k of Object.keys(obj)) {
|
|
15
|
+
mainObj[k] = obj[k];
|
|
16
|
+
}
|
|
17
|
+
return mainObj;
|
|
18
|
+
}
|
|
19
|
+
exports.updateObjectsWithSameType = updateObjectsWithSameType;
|
|
13
20
|
function overwriteSimilarObjectsProperties(mainObj, obj) {
|
|
14
21
|
for (let k of Object.keys(obj)) {
|
|
15
22
|
if (mainObj[k])
|
|
@@ -43,5 +43,6 @@ export declare class VendaReduzidaV2 {
|
|
|
43
43
|
numDocumento?: string | undefined;
|
|
44
44
|
idCliente?: string | undefined;
|
|
45
45
|
cupom?: string | undefined;
|
|
46
|
-
|
|
46
|
+
ordemHash?: string | undefined;
|
|
47
|
+
constructor(idVenda: string, situacao: string, dataVenda: string, horaVenda: string, valorTotal: number, formaPagamento: VendaFormaPagamentoReduzida[], tipo: string, cnpj: string, uf: string, idEmpresa: string, itens: VendaItemReduzido[], idClienteErp?: string | undefined, identificadorVoucher?: string | undefined, idGrupoDesconto?: string | undefined, idGrupoDescontoErp?: string | undefined, linkDocumentoFiscal?: string | undefined, valorDesconto?: number | undefined, numDocumento?: string | undefined, idCliente?: string | undefined, cupom?: string | undefined, ordemHash?: string | undefined);
|
|
47
48
|
}
|
|
@@ -26,7 +26,7 @@ class VendaReduzida {
|
|
|
26
26
|
}
|
|
27
27
|
exports.VendaReduzida = VendaReduzida;
|
|
28
28
|
class VendaReduzidaV2 {
|
|
29
|
-
constructor(idVenda, situacao, dataVenda, horaVenda, valorTotal, formaPagamento, tipo, cnpj, uf, idEmpresa, itens, idClienteErp, identificadorVoucher, idGrupoDesconto, idGrupoDescontoErp, linkDocumentoFiscal, valorDesconto, numDocumento, idCliente, cupom) {
|
|
29
|
+
constructor(idVenda, situacao, dataVenda, horaVenda, valorTotal, formaPagamento, tipo, cnpj, uf, idEmpresa, itens, idClienteErp, identificadorVoucher, idGrupoDesconto, idGrupoDescontoErp, linkDocumentoFiscal, valorDesconto, numDocumento, idCliente, cupom, ordemHash) {
|
|
30
30
|
this.idVenda = idVenda;
|
|
31
31
|
this.situacao = situacao;
|
|
32
32
|
this.dataVenda = dataVenda;
|
|
@@ -47,6 +47,7 @@ class VendaReduzidaV2 {
|
|
|
47
47
|
this.numDocumento = numDocumento;
|
|
48
48
|
this.idCliente = idCliente;
|
|
49
49
|
this.cupom = cupom;
|
|
50
|
+
this.ordemHash = ordemHash;
|
|
50
51
|
}
|
|
51
52
|
}
|
|
52
53
|
exports.VendaReduzidaV2 = VendaReduzidaV2;
|