argous 1.2.174 → 1.2.175

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.
@@ -62,6 +62,6 @@ export function getFileFromLink({ URL: link }?: {
62
62
  }): Promise<string>;
63
63
  export function getLink(idDocumento: any, nrRevisao: any, timeout: any): Promise<any>;
64
64
  export function scanDocument(idDocumento: any, nrRevisao: any): Promise<any>;
65
- export function getWidgets(tpSelecao: any): Promise<any>;
65
+ export function getWidgets(tpSelecao: any, abortController: any): Promise<any>;
66
66
  export function getWidgetInfo(pgCode: any): Promise<any>;
67
67
  export function sendWidgets(widgets: any): Promise<any>;
package/dist/api/index.js CHANGED
@@ -792,14 +792,15 @@ var scanDocument = function (idDocumento, nrRevisao) { return __awaiter(void 0,
792
792
  });
793
793
  }); };
794
794
  exports.scanDocument = scanDocument;
795
- var getWidgets = function (tpSelecao) { return __awaiter(void 0, void 0, void 0, function () {
795
+ var getWidgets = function (tpSelecao, abortController) { return __awaiter(void 0, void 0, void 0, function () {
796
796
  var res;
797
797
  return __generator(this, function (_a) {
798
798
  switch (_a.label) {
799
799
  case 0: return [4 /*yield*/, fetch(exports.api() + "agetwidgets.rslvr", {
800
800
  method: 'post',
801
801
  headers: exports.headers(),
802
- body: JSON.stringify({ tpSelecao: tpSelecao })
802
+ body: JSON.stringify({ tpSelecao: tpSelecao }),
803
+ signal: abortController === null || abortController === void 0 ? void 0 : abortController.signal
803
804
  })];
804
805
  case 1:
805
806
  res = _a.sent();
package/lib/api/index.js CHANGED
@@ -416,11 +416,12 @@ export const scanDocument = async (idDocumento, nrRevisao) => {
416
416
  return await res.json();
417
417
  };
418
418
 
419
- export const getWidgets = async (tpSelecao) => {
419
+ export const getWidgets = async (tpSelecao, abortController) => {
420
420
  const res = await fetch(`${api()}agetwidgets.rslvr`, {
421
421
  method: 'post',
422
422
  headers: headers(),
423
- body: JSON.stringify({ tpSelecao })
423
+ body: JSON.stringify({ tpSelecao }),
424
+ signal: abortController?.signal
424
425
  });
425
426
  return await res.json();
426
427
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "argous",
3
- "version": "1.2.174",
3
+ "version": "1.2.175",
4
4
  "description": "Argous.",
5
5
  "main": "lib/index.js",
6
6
  "author": "Carlos Schneider",