sim-node-lib 0.4.55 → 0.4.57

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.
@@ -26,10 +26,11 @@ export declare class Preco {
26
26
  desconto: number;
27
27
  origem: Origem;
28
28
  ordem: number;
29
+ pagamentos?: Pagamento[] | undefined;
29
30
  aplicavel?: boolean | undefined;
30
31
  herdou_default?: boolean | undefined;
31
32
  arredondamento_psicologico?: boolean | undefined;
32
- constructor(item: Item, preco_base: number, preco_final: number, desconto: number, origem: Origem, ordem: number, aplicavel?: boolean | undefined, herdou_default?: boolean | undefined, arredondamento_psicologico?: boolean | undefined);
33
+ constructor(item: Item, preco_base: number, preco_final: number, desconto: number, origem: Origem, ordem: number, pagamentos?: Pagamento[] | undefined, aplicavel?: boolean | undefined, herdou_default?: boolean | undefined, arredondamento_psicologico?: boolean | undefined);
33
34
  }
34
35
  export declare class Item {
35
36
  codigo_erp: string;
@@ -42,3 +43,8 @@ export declare class Origem {
42
43
  regra_key?: string | undefined;
43
44
  constructor(politica: string, regra_key?: string | undefined);
44
45
  }
46
+ export declare class Pagamento {
47
+ codigo: string;
48
+ valor: number;
49
+ constructor(codigo: string, valor: number);
50
+ }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Origem = exports.Item = exports.Preco = exports.Empresa = exports.Grupo = exports.PriceToSale = void 0;
3
+ exports.Pagamento = exports.Origem = exports.Item = exports.Preco = exports.Empresa = exports.Grupo = exports.PriceToSale = void 0;
4
4
  class PriceToSale {
5
5
  constructor(grupo, empresa, precos) {
6
6
  this.grupo = grupo;
@@ -29,13 +29,14 @@ class Empresa {
29
29
  }
30
30
  exports.Empresa = Empresa;
31
31
  class Preco {
32
- constructor(item, preco_base, preco_final, desconto, origem, ordem, aplicavel, herdou_default, arredondamento_psicologico) {
32
+ constructor(item, preco_base, preco_final, desconto, origem, ordem, pagamentos, aplicavel, herdou_default, arredondamento_psicologico) {
33
33
  this.item = item;
34
34
  this.preco_base = preco_base;
35
35
  this.preco_final = preco_final;
36
36
  this.desconto = desconto;
37
37
  this.origem = origem;
38
38
  this.ordem = ordem;
39
+ this.pagamentos = pagamentos;
39
40
  this.aplicavel = aplicavel;
40
41
  this.herdou_default = herdou_default;
41
42
  this.arredondamento_psicologico = arredondamento_psicologico;
@@ -57,3 +58,10 @@ class Origem {
57
58
  }
58
59
  }
59
60
  exports.Origem = Origem;
61
+ class Pagamento {
62
+ constructor(codigo, valor) {
63
+ this.codigo = codigo;
64
+ this.valor = valor;
65
+ }
66
+ }
67
+ exports.Pagamento = Pagamento;
@@ -1,5 +1,6 @@
1
1
  export declare class VendaFormaPagamentoReduzida {
2
2
  codFormaPagamento: string;
3
3
  valor: number;
4
- constructor(codFormaPagamento: string, valor: number);
4
+ troco?: boolean | undefined;
5
+ constructor(codFormaPagamento: string, valor: number, troco?: boolean | undefined);
5
6
  }
@@ -2,9 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VendaFormaPagamentoReduzida = void 0;
4
4
  class VendaFormaPagamentoReduzida {
5
- constructor(codFormaPagamento, valor) {
5
+ constructor(codFormaPagamento, valor, troco) {
6
6
  this.codFormaPagamento = codFormaPagamento;
7
7
  this.valor = valor;
8
+ this.troco = troco;
8
9
  }
9
10
  }
10
11
  exports.VendaFormaPagamentoReduzida = VendaFormaPagamentoReduzida;
@@ -0,0 +1,6 @@
1
+ export declare class UserPermissionIdentifiers {
2
+ private url;
3
+ private authSim;
4
+ constructor(url: string, authSim: string);
5
+ get(): Promise<object>;
6
+ }
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.UserPermissionIdentifiers = void 0;
16
+ const BasicException_1 = __importDefault(require("../Models/BasicException"));
17
+ const AxiosService_1 = require("./AxiosService");
18
+ class UserPermissionIdentifiers {
19
+ constructor(url, authSim) {
20
+ this.url = url + 'orquestrador/user-permission-identifiers';
21
+ this.authSim = authSim;
22
+ }
23
+ get() {
24
+ return __awaiter(this, void 0, void 0, function* () {
25
+ try {
26
+ const data = yield new AxiosService_1.AxiosService(this.url)
27
+ .authSim(this.authSim)
28
+ .get();
29
+ return data;
30
+ }
31
+ catch (error) {
32
+ throw new BasicException_1.default(error.status, error.message);
33
+ }
34
+ });
35
+ }
36
+ }
37
+ exports.UserPermissionIdentifiers = UserPermissionIdentifiers;
package/dist/index.d.ts CHANGED
@@ -15,8 +15,8 @@ export { UpdateUtil } from './Helpers/UpdateUtil';
15
15
  export { AxiosModel } from './Models/AxiosModel';
16
16
  export { PriceToConsult } from './Models/PriceToConsult';
17
17
  export { PriceToSale } from './Models/PriceToSale';
18
- export { SMS } from './Models/SMS';
19
18
  export { SimUrl } from './Models/SimUrl';
19
+ export { SMS } from './Models/SMS';
20
20
  export { VendaFormaPagamentoReduzida } from './Models/VendaFormaPagamentoReduzida';
21
21
  export { VendaItemReduzido } from './Models/VendaItemReduzido';
22
22
  export { VendaOrigem } from './Models/VendaOrigem';
@@ -24,6 +24,7 @@ export { VendaPortal } from './Models/VendaPortal';
24
24
  export { VendaReduzida, VendaReduzidaV2 } from './Models/VendaReduzida';
25
25
  export { AxiosService } from './Services/AxiosService';
26
26
  export { CombustivelService } from './Services/CombustivelService';
27
+ export { UserPermissionIdentifiers } from './Services/UserPermissionIdentifiers';
27
28
  import { ApplicationContract } from "@ioc:Adonis/Core/Application";
28
29
  export default class SimProvider {
29
30
  protected app: ApplicationContract;
package/dist/index.js CHANGED
@@ -35,7 +35,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
35
35
  });
36
36
  };
37
37
  Object.defineProperty(exports, "__esModule", { value: true });
38
- exports.CombustivelService = exports.AxiosService = exports.VendaReduzidaV2 = exports.VendaReduzida = exports.VendaPortal = exports.VendaOrigem = exports.VendaItemReduzido = exports.VendaFormaPagamentoReduzida = exports.SimUrl = 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.BasicPubSubRepo = exports.GooglePubSubSubscription = exports.GooglePubSubPublish = exports.GooglePubSubCreateSubscription = void 0;
38
+ exports.UserPermissionIdentifiers = exports.CombustivelService = exports.AxiosService = exports.VendaReduzidaV2 = exports.VendaReduzida = exports.VendaPortal = exports.VendaOrigem = exports.VendaItemReduzido = exports.VendaFormaPagamentoReduzida = exports.SMS = exports.SimUrl = exports.PriceToSale = exports.PriceToConsult = exports.AxiosModel = exports.UpdateUtil = exports.StringHelper = exports.PromiseHelper = exports.NumberHelper = exports.HashHelper = exports.DateHelper = exports.CryptHelper = exports.PubSubHandlerAction = exports.BasicPubSubRepo = exports.GooglePubSubSubscription = exports.GooglePubSubPublish = exports.GooglePubSubCreateSubscription = void 0;
39
39
  var GooglePubSubCreateSubscription_1 = require("./Class/GooglePubSubCreateSubscription");
40
40
  Object.defineProperty(exports, "GooglePubSubCreateSubscription", { enumerable: true, get: function () { return GooglePubSubCreateSubscription_1.GooglePubSubCreateSubscription; } });
41
41
  var GooglePubSubPublish_1 = require("./Class/GooglePubSubPublish");
@@ -67,10 +67,10 @@ var PriceToConsult_1 = require("./Models/PriceToConsult");
67
67
  Object.defineProperty(exports, "PriceToConsult", { enumerable: true, get: function () { return PriceToConsult_1.PriceToConsult; } });
68
68
  var PriceToSale_1 = require("./Models/PriceToSale");
69
69
  Object.defineProperty(exports, "PriceToSale", { enumerable: true, get: function () { return PriceToSale_1.PriceToSale; } });
70
- var SMS_1 = require("./Models/SMS");
71
- Object.defineProperty(exports, "SMS", { enumerable: true, get: function () { return SMS_1.SMS; } });
72
70
  var SimUrl_1 = require("./Models/SimUrl");
73
71
  Object.defineProperty(exports, "SimUrl", { enumerable: true, get: function () { return SimUrl_1.SimUrl; } });
72
+ var SMS_1 = require("./Models/SMS");
73
+ Object.defineProperty(exports, "SMS", { enumerable: true, get: function () { return SMS_1.SMS; } });
74
74
  var VendaFormaPagamentoReduzida_1 = require("./Models/VendaFormaPagamentoReduzida");
75
75
  Object.defineProperty(exports, "VendaFormaPagamentoReduzida", { enumerable: true, get: function () { return VendaFormaPagamentoReduzida_1.VendaFormaPagamentoReduzida; } });
76
76
  var VendaItemReduzido_1 = require("./Models/VendaItemReduzido");
@@ -86,6 +86,8 @@ var AxiosService_1 = require("./Services/AxiosService");
86
86
  Object.defineProperty(exports, "AxiosService", { enumerable: true, get: function () { return AxiosService_1.AxiosService; } });
87
87
  var CombustivelService_1 = require("./Services/CombustivelService");
88
88
  Object.defineProperty(exports, "CombustivelService", { enumerable: true, get: function () { return CombustivelService_1.CombustivelService; } });
89
+ var UserPermissionIdentifiers_1 = require("./Services/UserPermissionIdentifiers");
90
+ Object.defineProperty(exports, "UserPermissionIdentifiers", { enumerable: true, get: function () { return UserPermissionIdentifiers_1.UserPermissionIdentifiers; } });
89
91
  class SimProvider {
90
92
  constructor(app) {
91
93
  this.app = app;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sim-node-lib",
3
- "version": "0.4.55",
3
+ "version": "0.4.57",
4
4
  "description": "Library from SIMLabs",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",