@integraciones_doc24/sdk 1.14.3 → 1.14.4

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/lib/utils.js CHANGED
@@ -1,16 +1,23 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.parseDateTime = exports.parseDate = void 0;
3
+ exports.getIndetificationTypeId = exports.parseDateTime = exports.parseDate = void 0;
4
4
  const date_fns_1 = require("date-fns");
5
- // import {Doc24} from '.';
6
- const defaultTimeZone = '-03';
7
- const parseDate = (str, timeZone) => exports.parseDateTime(`${str} 00:00:00`, timeZone);
5
+ const timeZone = '-03';
6
+ const parseDate = (str) => exports.parseDateTime(`${str} 00:00:00`);
8
7
  exports.parseDate = parseDate;
9
- const parseDateTime = (str, timeZone) => date_fns_1.parse(`${str} ${timeZone !== null && timeZone !== void 0 ? timeZone : defaultTimeZone}`, 'yyyy-MM-dd HH:mm:ss X', new Date());
8
+ const parseDateTime = (str) => date_fns_1.parse(`${str} ${timeZone}`, 'yyyy-MM-dd HH:mm:ss X', new Date());
10
9
  exports.parseDateTime = parseDateTime;
11
- // export const getIdetificationTypeId = (type: Doc24.IdentificationType) => {
12
- // if (type === 'ndi') return 6;
13
- // if (type === 'passport') return 5;
14
- // if (type === 'credential') return 999;
15
- // throw new Error('Invalid identificationType');
16
- // };
10
+ const getIndetificationTypeId = (type) => {
11
+ if (type === 'dni')
12
+ return 1;
13
+ if (type === 'ndi')
14
+ return 6;
15
+ if (type === 'passport')
16
+ return 5;
17
+ if (type === 'credential')
18
+ return 999;
19
+ if (type === 'nn')
20
+ return 1000;
21
+ throw new Error('Invalid identificationType');
22
+ };
23
+ exports.getIndetificationTypeId = getIndetificationTypeId;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@integraciones_doc24/sdk",
3
- "version": "1.14.3",
3
+ "version": "1.14.4",
4
4
  "publishConfig": {
5
5
  "tag": "latest"
6
6
  },