"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.getDocumentLast = void 0;

var _Status = _interopRequireDefault(require("../Status"));

var _ApiUrls = require("../../Api/ApiUrls");

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

const getDocumentLast = async ({
  body
}) => {
  try {
    const res = await fetch(_ApiUrls.DOCUMENT_LAST, {
      method: 'POST',
      body: JSON.stringify(body)
    });

    const checkd = _Status.default.checkStatus(res);

    const json = await checkd.json();
    return json;
  } catch (err) {
    console.log('Document Last Error', err);
    throw new Error(err.message);
  }
};

exports.getDocumentLast = getDocumentLast;
//# sourceMappingURL=DocumentLast.js.map