@cemiar/cemiarlink-sdk 1.0.66 → 1.0.67
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/README.md +651 -651
- package/dist/epic-api/services/EpicApiService.js +5 -6
- package/dist/utils/Excel.js +1 -2
- package/package.json +42 -42
|
@@ -18,8 +18,7 @@ const PROD_URLS = {
|
|
|
18
18
|
};
|
|
19
19
|
class EpicApiService {
|
|
20
20
|
constructor(clientId, clientSecret, accountId, options) {
|
|
21
|
-
var _a, _b, _c;
|
|
22
|
-
var _d, _e;
|
|
21
|
+
var _a, _b, _c, _d, _e;
|
|
23
22
|
this.epicApiToken = null;
|
|
24
23
|
this.cemiarAuthToken = null;
|
|
25
24
|
this.epicApiTokenPromise = null;
|
|
@@ -27,8 +26,8 @@ class EpicApiService {
|
|
|
27
26
|
this.clientId = clientId;
|
|
28
27
|
this.clientSecret = clientSecret;
|
|
29
28
|
this.accountId = accountId;
|
|
30
|
-
this.language = (
|
|
31
|
-
this.apiEnv = (
|
|
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';
|
|
32
31
|
const urls = this.getEnvUrls(options.cemiarLink);
|
|
33
32
|
this.cemiarAuthClient = axios_1.default.create({
|
|
34
33
|
baseURL: urls.cemiarAuth,
|
|
@@ -36,8 +35,8 @@ class EpicApiService {
|
|
|
36
35
|
'Content-Type': 'application/json',
|
|
37
36
|
},
|
|
38
37
|
});
|
|
39
|
-
const cemiarLinkBaseURL = ((
|
|
40
|
-
const taskId = ((
|
|
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;
|
|
41
40
|
this.cemiarLinkClient = axios_1.default.create({
|
|
42
41
|
baseURL: cemiarLinkBaseURL,
|
|
43
42
|
headers: {
|
package/dist/utils/Excel.js
CHANGED
|
@@ -7,8 +7,7 @@ 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;
|
|
11
|
-
var _b;
|
|
10
|
+
var _a, _b;
|
|
12
11
|
const file = xlsx_1.default.readFile(path);
|
|
13
12
|
const worksheet = file.Sheets[file.SheetNames[sheetNumber]];
|
|
14
13
|
if (!worksheet) {
|
package/package.json
CHANGED
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@cemiar/cemiarlink-sdk",
|
|
3
|
-
"version": "1.0.
|
|
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.
|
|
19
|
-
"nodemailer": "^9.1.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.67",
|
|
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.21.0",
|
|
19
|
+
"nodemailer": "^9.1.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
|
+
}
|