argous 1.2.173 → 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,3 +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, abortController: any): Promise<any>;
66
+ export function getWidgetInfo(pgCode: any): Promise<any>;
67
+ export function sendWidgets(widgets: any): Promise<any>;
package/dist/api/index.js CHANGED
@@ -47,7 +47,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
47
47
  }
48
48
  };
49
49
  Object.defineProperty(exports, "__esModule", { value: true });
50
- exports.scanDocument = exports.getLink = exports.getFileFromLink = exports.createDocument = exports.prepareFile = exports.getDocsUrl = exports.searchUsers = exports.getFileInfo = exports.cancelFileUpload = exports.endFileUpload = exports.sendFilePart = exports.inicFileUpload = exports.enviaCompartilhamentoDePrograma = exports.removePostTimeLine = exports.publicaTimeline = exports.toggleLikePost = exports.recebeInfoEstatisticas = exports.recebeInfoLoginsAtivos = exports.recebeThreadsUsuario = exports.recebeInfoThread = exports.recebeThread = exports.readNotificacao = exports.readNotificacoes = exports.getNotificacoes = exports.callProgram = exports.toggleFavorite = exports.getFavorites = exports.method = exports.action = exports.agSet = exports.agGet = exports.getProgram = exports.getPostPublicacao = exports.addCommentPost = exports.getPostsTimeline = exports.getMenu = exports.validaToken = exports.logout = exports.login = exports.fetchToArgous = exports.headers = exports.api = exports.server = void 0;
50
+ exports.sendWidgets = exports.getWidgetInfo = exports.getWidgets = exports.scanDocument = exports.getLink = exports.getFileFromLink = exports.createDocument = exports.prepareFile = exports.getDocsUrl = exports.searchUsers = exports.getFileInfo = exports.cancelFileUpload = exports.endFileUpload = exports.sendFilePart = exports.inicFileUpload = exports.enviaCompartilhamentoDePrograma = exports.removePostTimeLine = exports.publicaTimeline = exports.toggleLikePost = exports.recebeInfoEstatisticas = exports.recebeInfoLoginsAtivos = exports.recebeThreadsUsuario = exports.recebeInfoThread = exports.recebeThread = exports.readNotificacao = exports.readNotificacoes = exports.getNotificacoes = exports.callProgram = exports.toggleFavorite = exports.getFavorites = exports.method = exports.action = exports.agSet = exports.agGet = exports.getProgram = exports.getPostPublicacao = exports.addCommentPost = exports.getPostsTimeline = exports.getMenu = exports.validaToken = exports.logout = exports.login = exports.fetchToArgous = exports.headers = exports.api = exports.server = void 0;
51
51
  var utils_1 = require("../utils");
52
52
  var config_1 = require("../utils/config");
53
53
  var server = function () { return "://" + config_1.getConfig()[/^[a-z]+.+\.com\.br$/.test(window.location.host) ? 'ip' : 'ip'] + "/" + (config_1.getConfig().path ? config_1.getConfig().path : 'jUniIII') + "/"; };
@@ -792,3 +792,55 @@ var scanDocument = function (idDocumento, nrRevisao) { return __awaiter(void 0,
792
792
  });
793
793
  }); };
794
794
  exports.scanDocument = scanDocument;
795
+ var getWidgets = function (tpSelecao, abortController) { return __awaiter(void 0, void 0, void 0, function () {
796
+ var res;
797
+ return __generator(this, function (_a) {
798
+ switch (_a.label) {
799
+ case 0: return [4 /*yield*/, fetch(exports.api() + "agetwidgets.rslvr", {
800
+ method: 'post',
801
+ headers: exports.headers(),
802
+ body: JSON.stringify({ tpSelecao: tpSelecao }),
803
+ signal: abortController === null || abortController === void 0 ? void 0 : abortController.signal
804
+ })];
805
+ case 1:
806
+ res = _a.sent();
807
+ return [4 /*yield*/, res.json()];
808
+ case 2: return [2 /*return*/, _a.sent()];
809
+ }
810
+ });
811
+ }); };
812
+ exports.getWidgets = getWidgets;
813
+ var getWidgetInfo = function (pgCode) { return __awaiter(void 0, void 0, void 0, function () {
814
+ var res;
815
+ return __generator(this, function (_a) {
816
+ switch (_a.label) {
817
+ case 0: return [4 /*yield*/, fetch(exports.api() + "agetwidgetinfo.rslvr", {
818
+ method: 'post',
819
+ headers: exports.headers(),
820
+ body: JSON.stringify({ pgCode: pgCode })
821
+ })];
822
+ case 1:
823
+ res = _a.sent();
824
+ return [4 /*yield*/, res.json()];
825
+ case 2: return [2 /*return*/, _a.sent()];
826
+ }
827
+ });
828
+ }); };
829
+ exports.getWidgetInfo = getWidgetInfo;
830
+ var sendWidgets = function (widgets) { return __awaiter(void 0, void 0, void 0, function () {
831
+ var res;
832
+ return __generator(this, function (_a) {
833
+ switch (_a.label) {
834
+ case 0: return [4 /*yield*/, fetch(exports.api() + "agsendwidgets.rslvr", {
835
+ method: 'post',
836
+ headers: exports.headers(),
837
+ body: JSON.stringify({ widgets: widgets })
838
+ })];
839
+ case 1:
840
+ res = _a.sent();
841
+ return [4 /*yield*/, res.json()];
842
+ case 2: return [2 /*return*/, _a.sent()];
843
+ }
844
+ });
845
+ }); };
846
+ exports.sendWidgets = sendWidgets;
package/lib/api/index.js CHANGED
@@ -414,4 +414,32 @@ export const scanDocument = async (idDocumento, nrRevisao) => {
414
414
  body: JSON.stringify({ idDocumento, nrRevisao })
415
415
  });
416
416
  return await res.json();
417
+ };
418
+
419
+ export const getWidgets = async (tpSelecao, abortController) => {
420
+ const res = await fetch(`${api()}agetwidgets.rslvr`, {
421
+ method: 'post',
422
+ headers: headers(),
423
+ body: JSON.stringify({ tpSelecao }),
424
+ signal: abortController?.signal
425
+ });
426
+ return await res.json();
427
+ };
428
+
429
+ export const getWidgetInfo = async (pgCode) => {
430
+ const res = await fetch(`${api()}agetwidgetinfo.rslvr`, {
431
+ method: 'post',
432
+ headers: headers(),
433
+ body: JSON.stringify({ pgCode })
434
+ });
435
+ return await res.json();
436
+ };
437
+
438
+ export const sendWidgets = async (widgets) => {
439
+ const res = await fetch(`${api()}agsendwidgets.rslvr`, {
440
+ method: 'post',
441
+ headers: headers(),
442
+ body: JSON.stringify({ widgets })
443
+ });
444
+ return await res.json();
417
445
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "argous",
3
- "version": "1.2.173",
3
+ "version": "1.2.175",
4
4
  "description": "Argous.",
5
5
  "main": "lib/index.js",
6
6
  "author": "Carlos Schneider",