@ones-open/node-sdk 0.0.4-17608.41 → 0.0.4-21670.121
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/index.cjs
CHANGED
|
@@ -10,10 +10,14 @@ const getONESHostedBaseUrl = () => {
|
|
|
10
10
|
const getONESHostedAppID = () => {
|
|
11
11
|
return process.env.ONES_HOSTED_APP_ID;
|
|
12
12
|
};
|
|
13
|
+
const getONESHostedToken = () => {
|
|
14
|
+
return process.env.ONES_HOSTED_TOKEN;
|
|
15
|
+
};
|
|
13
16
|
const index$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
14
17
|
__proto__: null,
|
|
15
18
|
getONESHostedAppID,
|
|
16
|
-
getONESHostedBaseUrl
|
|
19
|
+
getONESHostedBaseUrl,
|
|
20
|
+
getONESHostedToken
|
|
17
21
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
18
22
|
var EntityWhereConditionEnum = /* @__PURE__ */ ((EntityWhereConditionEnum2) => {
|
|
19
23
|
EntityWhereConditionEnum2["beginsWith"] = "beginsWith";
|
|
@@ -116,7 +120,7 @@ const createErrorResult = (code, message, error) => {
|
|
|
116
120
|
};
|
|
117
121
|
const fetch$1 = Fetch.create();
|
|
118
122
|
const buildAuthHeaders$1 = () => {
|
|
119
|
-
const token =
|
|
123
|
+
const token = getONESHostedToken();
|
|
120
124
|
if (token) {
|
|
121
125
|
return {
|
|
122
126
|
Authorization: `Bearer ${token}`
|
|
@@ -412,7 +416,7 @@ class ObjectError {
|
|
|
412
416
|
}
|
|
413
417
|
const fetch = Fetch.create();
|
|
414
418
|
const buildAuthHeaders = () => {
|
|
415
|
-
const token =
|
|
419
|
+
const token = getONESHostedToken();
|
|
416
420
|
if (token) {
|
|
417
421
|
return {
|
|
418
422
|
Authorization: `Bearer ${token}`
|
package/dist/index.js
CHANGED
|
@@ -8,10 +8,14 @@ const getONESHostedBaseUrl = () => {
|
|
|
8
8
|
const getONESHostedAppID = () => {
|
|
9
9
|
return process.env.ONES_HOSTED_APP_ID;
|
|
10
10
|
};
|
|
11
|
+
const getONESHostedToken = () => {
|
|
12
|
+
return process.env.ONES_HOSTED_TOKEN;
|
|
13
|
+
};
|
|
11
14
|
const index$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
12
15
|
__proto__: null,
|
|
13
16
|
getONESHostedAppID,
|
|
14
|
-
getONESHostedBaseUrl
|
|
17
|
+
getONESHostedBaseUrl,
|
|
18
|
+
getONESHostedToken
|
|
15
19
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
16
20
|
var EntityWhereConditionEnum = /* @__PURE__ */ ((EntityWhereConditionEnum2) => {
|
|
17
21
|
EntityWhereConditionEnum2["beginsWith"] = "beginsWith";
|
|
@@ -114,7 +118,7 @@ const createErrorResult = (code, message, error) => {
|
|
|
114
118
|
};
|
|
115
119
|
const fetch$1 = Fetch.create();
|
|
116
120
|
const buildAuthHeaders$1 = () => {
|
|
117
|
-
const token =
|
|
121
|
+
const token = getONESHostedToken();
|
|
118
122
|
if (token) {
|
|
119
123
|
return {
|
|
120
124
|
Authorization: `Bearer ${token}`
|
|
@@ -410,7 +414,7 @@ class ObjectError {
|
|
|
410
414
|
}
|
|
411
415
|
const fetch = Fetch.create();
|
|
412
416
|
const buildAuthHeaders = () => {
|
|
413
|
-
const token =
|
|
417
|
+
const token = getONESHostedToken();
|
|
414
418
|
if (token) {
|
|
415
419
|
return {
|
|
416
420
|
Authorization: `Bearer ${token}`
|
|
@@ -10,4 +10,5 @@ export declare const getONESHostedBaseUrl: () => string | undefined;
|
|
|
10
10
|
* @returns onesHostedAppID
|
|
11
11
|
*/
|
|
12
12
|
export declare const getONESHostedAppID: () => string | undefined;
|
|
13
|
+
export declare const getONESHostedToken: () => string | undefined;
|
|
13
14
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/packages/strict/env/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,0BAEhC,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,0BAE9B,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/packages/strict/env/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,0BAEhC,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,0BAE9B,CAAA;AAED,eAAO,MAAM,kBAAkB,0BAE9B,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ones-open/node-sdk",
|
|
3
|
-
"version": "0.0.4-
|
|
3
|
+
"version": "0.0.4-21670.121+c1d371f0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
7
7
|
"module": "./dist/index.js",
|
|
8
|
-
"types": "./dist/index.d.ts",
|
|
8
|
+
"types": "./dist/types/index.d.ts",
|
|
9
9
|
"exports": {
|
|
10
10
|
".": {
|
|
11
11
|
"types": "./dist/types/index.d.ts",
|
|
@@ -50,5 +50,5 @@
|
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@types/lodash-es": "^4.17.12"
|
|
52
52
|
},
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "c1d371f0bbc77b4c211c8f0c4a9b49e024450e52"
|
|
54
54
|
}
|