sim-node-lib 0.3.27 → 0.3.29

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.
@@ -0,0 +1,6 @@
1
+ export declare enum SituacaoOrdemEnum {
2
+ INICIALIZAR = "INICIALIZAR",
3
+ ATUALIZAR = "ATUALIZAR",
4
+ FINALIZAR = "FINALIZAR",
5
+ CANCELAR = "CANCELAR"
6
+ }
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SituacaoOrdemEnum = void 0;
4
+ var SituacaoOrdemEnum;
5
+ (function (SituacaoOrdemEnum) {
6
+ SituacaoOrdemEnum["INICIALIZAR"] = "INICIALIZAR";
7
+ SituacaoOrdemEnum["ATUALIZAR"] = "ATUALIZAR";
8
+ SituacaoOrdemEnum["FINALIZAR"] = "FINALIZAR";
9
+ SituacaoOrdemEnum["CANCELAR"] = "CANCELAR";
10
+ })(SituacaoOrdemEnum = exports.SituacaoOrdemEnum || (exports.SituacaoOrdemEnum = {}));
@@ -9,6 +9,7 @@ export * from './PubSubTableEnum';
9
9
  export * from './ResponsavelConcessaoEnum';
10
10
  export * from './SMSEnum';
11
11
  export * from './SituacaoEnum';
12
+ export * from './SituacaoOrdemEnum';
12
13
  export * from './TagNameEnum';
13
14
  export * from './TipoClienteEnum';
14
15
  export * from './TipoCondicaoEnum';
@@ -25,6 +25,7 @@ __exportStar(require("./PubSubTableEnum"), exports);
25
25
  __exportStar(require("./ResponsavelConcessaoEnum"), exports);
26
26
  __exportStar(require("./SMSEnum"), exports);
27
27
  __exportStar(require("./SituacaoEnum"), exports);
28
+ __exportStar(require("./SituacaoOrdemEnum"), exports);
28
29
  __exportStar(require("./TagNameEnum"), exports);
29
30
  __exportStar(require("./TipoClienteEnum"), exports);
30
31
  __exportStar(require("./TipoCondicaoEnum"), exports);
@@ -1,7 +1,8 @@
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
+ export declare function overwriteSimilarObjectsProperties<T>(mainObj: any, obj: any): T;
5
+ export declare function mergeObjectsWithSameType<T>(mainObj: any, obj: any): T;
5
6
  export declare function flattenObjectIntoNewModel<T>(obj: any, model: {
6
7
  new (): any;
7
8
  $columnsDefinitions: {
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.flattenObjectIntoNewModel = exports.updateObjectsWithSameType = exports.UpdateUtil = void 0;
3
+ exports.flattenObjectIntoNewModel = exports.mergeObjectsWithSameType = exports.overwriteSimilarObjectsProperties = 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,13 +10,21 @@ class UpdateUtil {
10
10
  }
11
11
  }
12
12
  exports.UpdateUtil = UpdateUtil;
13
- function updateObjectsWithSameType(mainObj, obj, type) {
13
+ function overwriteSimilarObjectsProperties(mainObj, obj) {
14
+ for (let k of Object.keys(obj)) {
15
+ if (mainObj[k])
16
+ mainObj[k] = obj[k];
17
+ }
18
+ return mainObj;
19
+ }
20
+ exports.overwriteSimilarObjectsProperties = overwriteSimilarObjectsProperties;
21
+ function mergeObjectsWithSameType(mainObj, obj) {
14
22
  for (let k of Object.keys(obj)) {
15
23
  mainObj[k] = obj[k];
16
24
  }
17
25
  return mainObj;
18
26
  }
19
- exports.updateObjectsWithSameType = updateObjectsWithSameType;
27
+ exports.mergeObjectsWithSameType = mergeObjectsWithSameType;
20
28
  function flattenObjectIntoNewModel(obj, model) {
21
29
  const flattenedObject = new model();
22
30
  for (let key of model.$columnsDefinitions.keys()) {
@@ -0,0 +1,17 @@
1
+ import { SituacaoOrdemEnum } from "../Enums";
2
+ export declare class VendaPortal {
3
+ hash: string;
4
+ idVenda: string;
5
+ situacao: SituacaoOrdemEnum;
6
+ idClienteErp: string;
7
+ itens: {
8
+ idProduto: string;
9
+ qtd: number;
10
+ vlrUnit: number;
11
+ }[];
12
+ constructor(hash: string, idVenda: string, situacao: SituacaoOrdemEnum, idClienteErp: string, itens: {
13
+ idProduto: string;
14
+ qtd: number;
15
+ vlrUnit: number;
16
+ }[]);
17
+ }
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.VendaPortal = void 0;
4
+ class VendaPortal {
5
+ constructor(hash, idVenda, situacao, idClienteErp, itens) {
6
+ this.hash = hash;
7
+ this.idVenda = idVenda;
8
+ this.situacao = situacao;
9
+ this.idClienteErp = idClienteErp;
10
+ this.itens = itens;
11
+ }
12
+ }
13
+ exports.VendaPortal = VendaPortal;
package/dist/index.d.ts CHANGED
@@ -17,6 +17,7 @@ export { SMS } from './Models/SMS';
17
17
  export { VendaFormaPagamentoReduzida } from './Models/VendaFormaPagamentoReduzida';
18
18
  export { VendaItemReduzido } from './Models/VendaItemReduzido';
19
19
  export { VendaOrigem } from './Models/VendaOrigem';
20
+ export { VendaPortal } from './Models/VendaPortal';
20
21
  export { VendaReduzida, VendaReduzidaV2 } from './Models/VendaReduzida';
21
22
  export { AxiosService } from './Services/AxiosService';
22
23
  export { CombustivelService } from './Services/CombustivelService';
package/dist/index.js CHANGED
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.CombustivelService = exports.AxiosService = exports.VendaReduzidaV2 = exports.VendaReduzida = exports.VendaOrigem = exports.VendaItemReduzido = exports.VendaFormaPagamentoReduzida = exports.SMS = exports.PriceToSale = exports.PriceToConsult = exports.AxiosModel = exports.UpdateUtil = exports.StringHelper = exports.PromiseHelper = exports.NumberHelper = exports.HashHelper = exports.DateHelper = exports.CryptHelper = exports.PubSubHandlerAction = exports.GooglePubSubSubscription = exports.GooglePubSubPublish = exports.GooglePubSubCreateSubscription = void 0;
17
+ exports.CombustivelService = exports.AxiosService = exports.VendaReduzidaV2 = exports.VendaReduzida = exports.VendaPortal = exports.VendaOrigem = exports.VendaItemReduzido = exports.VendaFormaPagamentoReduzida = exports.SMS = exports.PriceToSale = exports.PriceToConsult = exports.AxiosModel = exports.UpdateUtil = exports.StringHelper = exports.PromiseHelper = exports.NumberHelper = exports.HashHelper = exports.DateHelper = exports.CryptHelper = exports.PubSubHandlerAction = exports.GooglePubSubSubscription = exports.GooglePubSubPublish = exports.GooglePubSubCreateSubscription = void 0;
18
18
  var GooglePubSubCreateSubscription_1 = require("./Class/GooglePubSubCreateSubscription");
19
19
  Object.defineProperty(exports, "GooglePubSubCreateSubscription", { enumerable: true, get: function () { return GooglePubSubCreateSubscription_1.GooglePubSubCreateSubscription; } });
20
20
  var GooglePubSubPublish_1 = require("./Class/GooglePubSubPublish");
@@ -52,6 +52,8 @@ var VendaItemReduzido_1 = require("./Models/VendaItemReduzido");
52
52
  Object.defineProperty(exports, "VendaItemReduzido", { enumerable: true, get: function () { return VendaItemReduzido_1.VendaItemReduzido; } });
53
53
  var VendaOrigem_1 = require("./Models/VendaOrigem");
54
54
  Object.defineProperty(exports, "VendaOrigem", { enumerable: true, get: function () { return VendaOrigem_1.VendaOrigem; } });
55
+ var VendaPortal_1 = require("./Models/VendaPortal");
56
+ Object.defineProperty(exports, "VendaPortal", { enumerable: true, get: function () { return VendaPortal_1.VendaPortal; } });
55
57
  var VendaReduzida_1 = require("./Models/VendaReduzida");
56
58
  Object.defineProperty(exports, "VendaReduzida", { enumerable: true, get: function () { return VendaReduzida_1.VendaReduzida; } });
57
59
  Object.defineProperty(exports, "VendaReduzidaV2", { enumerable: true, get: function () { return VendaReduzida_1.VendaReduzidaV2; } });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sim-node-lib",
3
- "version": "0.3.27",
3
+ "version": "0.3.29",
4
4
  "description": "Library from SIMLabs",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",