argous 1.2.168 → 1.2.171
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.
package/dist/api/index.d.ts
CHANGED
|
@@ -61,4 +61,4 @@ export function getFileFromLink({ URL: link }?: {
|
|
|
61
61
|
URL?: string | undefined;
|
|
62
62
|
}): Promise<string>;
|
|
63
63
|
export function getLink(idDocumento: any, nrRevisao: any, timeout: any): Promise<any>;
|
|
64
|
-
export function scanDocument(idDocumento: any, nrRevisao: any
|
|
64
|
+
export function scanDocument(idDocumento: any, nrRevisao: any): Promise<any>;
|
package/dist/api/index.js
CHANGED
|
@@ -714,7 +714,7 @@ var createDocument = function (_a) {
|
|
|
714
714
|
_b = _c.sent(), status = _b.status, docsUrl = _b.docsUrl;
|
|
715
715
|
if (!status)
|
|
716
716
|
return [2 /*return*/];
|
|
717
|
-
return [4 /*yield*/, fetch(docsUrl + "docs/upload.agdoc", {
|
|
717
|
+
return [4 /*yield*/, fetch(docsUrl + "argous/docs/upload.agdoc", {
|
|
718
718
|
method: 'POST',
|
|
719
719
|
headers: exports.headers(),
|
|
720
720
|
body: JSON.stringify({
|
|
@@ -770,19 +770,24 @@ var getLink = function (idDocumento, nrRevisao, timeout) { return __awaiter(void
|
|
|
770
770
|
});
|
|
771
771
|
}); };
|
|
772
772
|
exports.getLink = getLink;
|
|
773
|
-
var scanDocument = function (idDocumento, nrRevisao
|
|
774
|
-
var res;
|
|
775
|
-
return __generator(this, function (
|
|
776
|
-
switch (
|
|
777
|
-
case 0: return [4 /*yield*/,
|
|
778
|
-
method: 'post',
|
|
779
|
-
headers: exports.headers(),
|
|
780
|
-
body: JSON.stringify({ idDocumento: idDocumento, nrRevisao: nrRevisao })
|
|
781
|
-
})];
|
|
773
|
+
var scanDocument = function (idDocumento, nrRevisao) { return __awaiter(void 0, void 0, void 0, function () {
|
|
774
|
+
var _a, status, docsUrl, res;
|
|
775
|
+
return __generator(this, function (_b) {
|
|
776
|
+
switch (_b.label) {
|
|
777
|
+
case 0: return [4 /*yield*/, exports.getDocsUrl()];
|
|
782
778
|
case 1:
|
|
783
|
-
|
|
779
|
+
_a = _b.sent(), status = _a.status, docsUrl = _a.docsUrl;
|
|
780
|
+
if (!status)
|
|
781
|
+
return [2 /*return*/];
|
|
782
|
+
return [4 /*yield*/, fetch(docsUrl + "argous/docs/scan.agdoc", {
|
|
783
|
+
method: 'post',
|
|
784
|
+
headers: exports.headers(),
|
|
785
|
+
body: JSON.stringify({ idDocumento: idDocumento, nrRevisao: nrRevisao })
|
|
786
|
+
})];
|
|
787
|
+
case 2:
|
|
788
|
+
res = _b.sent();
|
|
784
789
|
return [4 /*yield*/, res.json()];
|
|
785
|
-
case
|
|
790
|
+
case 3: return [2 /*return*/, _b.sent()];
|
|
786
791
|
}
|
|
787
792
|
});
|
|
788
793
|
}); };
|
|
@@ -255,7 +255,7 @@ var Compartilhar = react_1.forwardRef(function (props, ref) {
|
|
|
255
255
|
react_1.default.createElement(core_1.Grid, { item: true, xs: 12 },
|
|
256
256
|
react_1.default.createElement(lab_1.Autocomplete, { multiple: true, freeSolo: true, value: email, options: options, getOptionLabel: function (option) { return option[2]; }, size: 'small', limitTags: 1, onChange: function (_e, value) { return setEmail(value); }, disableCloseOnSelect: true, disablePortal: true, noOptionsText: stringEmail.length < 3 && stringNotificacao.length < 3 ? 'Digite para começar a pesquisar' : 'Não Encontrado', renderTags: function (value, getTagProps) { return (value.map(function (option, index) { return (react_1.default.createElement(core_1.Chip, __assign({ variant: 'outlined', label: option[2] || option }, getTagProps({ index: index })))); })); }, renderInput: function (params) { return (react_1.default.createElement(core_1.TextField, __assign({ variant: 'outlined', margin: 'dense', label: 'Emails:', onChange: function (e) { return setStringEmail(e.target.value); }, placeholder: email.length === 0 ? 'Selecionar' : undefined, InputLabelProps: { shrink: true }, error: !!erro.email, helperText: erro.email }, params))); } })),
|
|
257
257
|
react_1.default.createElement(core_1.Grid, { item: true, xs: 12 },
|
|
258
|
-
react_1.default.createElement(core_1.TextField, { multiline: true, label: 'Mensagem:',
|
|
258
|
+
react_1.default.createElement(core_1.TextField, { multiline: true, label: 'Mensagem:', minRows: '2', margin: 'dense', variant: 'outlined', fullWidth: true, placeholder: 'Mensagem do Email', value: mensagemEmail, onChange: function (e) { return setMensagemEmail(e.target.value); }, style: { resize: 'vertical', height: '50px' }, error: !!erro.stringEmail, helperText: erro.stringEmail })),
|
|
259
259
|
react_1.default.createElement(core_1.Grid, { container: true, style: { display: 'flex' }, direction: 'row-reverse' },
|
|
260
260
|
react_1.default.createElement(core_1.Grid, { item: true, xs: 2 },
|
|
261
261
|
react_1.default.createElement(core_1.Button, { color: 'primary', variant: 'contained', onClick: function () { return enviaCompartilhamento('E'); } }, "Enviar")),
|
package/lib/api/index.js
CHANGED
|
@@ -374,7 +374,7 @@ export const createDocument = async ({
|
|
|
374
374
|
}) => {
|
|
375
375
|
const { status, docsUrl } = await getDocsUrl();
|
|
376
376
|
if (!status) return;
|
|
377
|
-
return (await fetch(`${docsUrl}docs/upload.agdoc`, {
|
|
377
|
+
return (await fetch(`${docsUrl}argous/docs/upload.agdoc`, {
|
|
378
378
|
method: 'POST',
|
|
379
379
|
headers: headers(),
|
|
380
380
|
body: JSON.stringify({
|
|
@@ -405,8 +405,10 @@ export const getLink = async (idDocumento, nrRevisao, timeout) => {
|
|
|
405
405
|
})).json();
|
|
406
406
|
};
|
|
407
407
|
|
|
408
|
-
export const scanDocument = async (idDocumento, nrRevisao
|
|
409
|
-
const
|
|
408
|
+
export const scanDocument = async (idDocumento, nrRevisao) => {
|
|
409
|
+
const { status, docsUrl } = await getDocsUrl();
|
|
410
|
+
if (!status) return;
|
|
411
|
+
const res = await fetch(`${docsUrl}argous/docs/scan.agdoc`, {
|
|
410
412
|
method: 'post',
|
|
411
413
|
headers: headers(),
|
|
412
414
|
body: JSON.stringify({ idDocumento, nrRevisao })
|