@cemiar/cemiarlink-sdk 1.0.58 → 1.0.59

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.
@@ -18,7 +18,8 @@ const PROD_URLS = {
18
18
  };
19
19
  class EpicApiService {
20
20
  constructor(clientId, clientSecret, accountId, options) {
21
- var _a, _b, _c, _d, _e;
21
+ var _a, _b, _c;
22
+ var _d, _e;
22
23
  this.epicApiToken = null;
23
24
  this.cemiarAuthToken = null;
24
25
  this.epicApiTokenPromise = null;
@@ -26,8 +27,8 @@ class EpicApiService {
26
27
  this.clientId = clientId;
27
28
  this.clientSecret = clientSecret;
28
29
  this.accountId = accountId;
29
- this.language = (_a = options.language) !== null && _a !== void 0 ? _a : 'en-US';
30
- this.apiEnv = (_b = options.apiEnv) !== null && _b !== void 0 ? _b : 'dev';
30
+ this.language = (_d = options.language) !== null && _d !== void 0 ? _d : 'en-US';
31
+ this.apiEnv = (_e = options.apiEnv) !== null && _e !== void 0 ? _e : 'dev';
31
32
  const urls = this.getEnvUrls(options.cemiarLink);
32
33
  this.cemiarAuthClient = axios_1.default.create({
33
34
  baseURL: urls.cemiarAuth,
@@ -35,8 +36,8 @@ class EpicApiService {
35
36
  'Content-Type': 'application/json',
36
37
  },
37
38
  });
38
- const cemiarLinkBaseURL = ((_c = options.cemiarLink) === null || _c === void 0 ? void 0 : _c.env) === 'local' ? options.cemiarLink.baseURL : urls.cemiarLink;
39
- const taskId = ((_d = options.cemiarLink) === null || _d === void 0 ? void 0 : _d.env) !== 'local' ? (_e = options.cemiarLink) === null || _e === void 0 ? void 0 : _e.taskId : undefined;
39
+ const cemiarLinkBaseURL = ((_a = options.cemiarLink) === null || _a === void 0 ? void 0 : _a.env) === 'local' ? options.cemiarLink.baseURL : urls.cemiarLink;
40
+ const taskId = ((_b = options.cemiarLink) === null || _b === void 0 ? void 0 : _b.env) !== 'local' ? (_c = options.cemiarLink) === null || _c === void 0 ? void 0 : _c.taskId : undefined;
40
41
  this.cemiarLinkClient = axios_1.default.create({
41
42
  baseURL: cemiarLinkBaseURL,
42
43
  headers: {
package/dist/index.js CHANGED
@@ -18,13 +18,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
18
18
  var __exportStar = (this && this.__exportStar) || function(m, exports) {
19
19
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
20
20
  };
21
- var __importStar = (this && this.__importStar) || function (mod) {
22
- if (mod && mod.__esModule) return mod;
23
- var result = {};
24
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
- __setModuleDefault(result, mod);
26
- return result;
27
- };
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
28
38
  Object.defineProperty(exports, "__esModule", { value: true });
29
39
  exports.Utils = exports.Exceptions = exports.Services = exports.Models = void 0;
30
40
  // Services
@@ -131,4 +131,5 @@ export interface PolicyProducerBrokerCommission {
131
131
  ProducerBrokerCode: string;
132
132
  ProductionCredit: number;
133
133
  UseCommissionAgreement: boolean;
134
+ ContractID: number | null;
134
135
  }
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  var __exportStar = (this && this.__exportStar) || function(m, exports) {
26
36
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
27
37
  };
@@ -7,7 +7,8 @@ const fs_1 = __importDefault(require("fs"));
7
7
  const xlsx_1 = __importDefault(require("xlsx"));
8
8
  class readXlsx {
9
9
  static async getFromXLSX(path, sheetNumber) {
10
- var _a, _b;
10
+ var _a;
11
+ var _b;
11
12
  const file = xlsx_1.default.readFile(path);
12
13
  const worksheet = file.Sheets[file.SheetNames[sheetNumber]];
13
14
  if (!worksheet) {
package/package.json CHANGED
@@ -1,42 +1,42 @@
1
- {
2
- "name": "@cemiar/cemiarlink-sdk",
3
- "version": "1.0.58",
4
- "description": "CemiarLink SDK to access CemiarLink API services",
5
- "engines": {
6
- "npm": ">=9.5.1",
7
- "node": ">=18.16.0"
8
- },
9
- "author": "Cemiar",
10
- "license": "ISC",
11
- "main": "dist/index.js",
12
- "module": "./dist/index.mjs",
13
- "types": "./dist/index.d.ts",
14
- "files": [
15
- "dist"
16
- ],
17
- "dependencies": {
18
- "axios": "^1.18.0",
19
- "nodemailer": "^9.0.1",
20
- "xlsx": "https://cdn.sheetjs.com/xlsx-0.20.3/xlsx-0.20.3.tgz"
21
- },
22
- "devDependencies": {
23
- "@types/node": "^18.19.0",
24
- "@types/nodemailer": "^8.0.1"
25
- },
26
- "scripts": {
27
- "build": "rm -rf dist/ && tsc -p tsconfig.json",
28
- "buildWindows": "rmdir /s /q dist & tsc -p tsconfig.json"
29
- },
30
- "exports": {
31
- ".": {
32
- "types": "./dist/index.d.ts",
33
- "import": "./dist/index.js",
34
- "default": "./dist/index.js"
35
- },
36
- "./epic-api": {
37
- "types": "./dist/epic-api/index.d.ts",
38
- "import": "./dist/epic-api/index.js",
39
- "default": "./dist/epic-api/index.js"
40
- }
41
- }
42
- }
1
+ {
2
+ "name": "@cemiar/cemiarlink-sdk",
3
+ "version": "1.0.59",
4
+ "description": "CemiarLink SDK to access CemiarLink API services",
5
+ "engines": {
6
+ "npm": ">=9.5.1",
7
+ "node": ">=18.16.0"
8
+ },
9
+ "author": "Cemiar",
10
+ "license": "ISC",
11
+ "main": "dist/index.js",
12
+ "module": "./dist/index.mjs",
13
+ "types": "./dist/index.d.ts",
14
+ "files": [
15
+ "dist"
16
+ ],
17
+ "dependencies": {
18
+ "axios": "^1.18.0",
19
+ "nodemailer": "^9.0.1",
20
+ "xlsx": "https://cdn.sheetjs.com/xlsx-0.20.3/xlsx-0.20.3.tgz"
21
+ },
22
+ "devDependencies": {
23
+ "@types/node": "^18.19.0",
24
+ "@types/nodemailer": "^8.0.1"
25
+ },
26
+ "scripts": {
27
+ "build": "rm -rf dist/ && tsc -p tsconfig.json",
28
+ "buildWindows": "rmdir /s /q dist & tsc -p tsconfig.json"
29
+ },
30
+ "exports": {
31
+ ".": {
32
+ "types": "./dist/index.d.ts",
33
+ "import": "./dist/index.js",
34
+ "default": "./dist/index.js"
35
+ },
36
+ "./epic-api": {
37
+ "types": "./dist/epic-api/index.d.ts",
38
+ "import": "./dist/epic-api/index.js",
39
+ "default": "./dist/epic-api/index.js"
40
+ }
41
+ }
42
+ }