@opexa/portal-sdk 0.59.133 → 0.59.134
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/{chunk-7APXFZ5G.js → chunk-7Y7FWND5.js} +3 -3
- package/dist/{chunk-7APXFZ5G.js.map → chunk-7Y7FWND5.js.map} +1 -1
- package/dist/{chunk-WVFSGB7Y.js → chunk-BTV72WJH.js} +14 -14
- package/dist/chunk-BTV72WJH.js.map +1 -0
- package/dist/{chunk-ISVV44MD.js → chunk-SBPWGV33.js} +10 -10
- package/dist/chunk-SBPWGV33.js.map +1 -0
- package/dist/index.cjs +51 -22
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +35 -6
- package/dist/index.js.map +1 -1
- package/dist/services/index.cjs +19 -19
- package/dist/services/index.cjs.map +1 -1
- package/dist/services/index.d.cts +6 -1
- package/dist/services/index.d.ts +6 -1
- package/dist/services/index.js +2 -2
- package/dist/utils/index.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-ISVV44MD.js.map +0 -1
- package/dist/chunk-WVFSGB7Y.js.map +0 -1
package/dist/services/index.cjs
CHANGED
|
@@ -4844,6 +4844,18 @@ var AccountService = class {
|
|
|
4844
4844
|
};
|
|
4845
4845
|
}
|
|
4846
4846
|
};
|
|
4847
|
+
|
|
4848
|
+
// src/utils/call-if-fn.ts
|
|
4849
|
+
function isFunction(value) {
|
|
4850
|
+
return typeof value === "function";
|
|
4851
|
+
}
|
|
4852
|
+
function callIfFn(value, ...args) {
|
|
4853
|
+
if (isFunction(value)) {
|
|
4854
|
+
return value(...args);
|
|
4855
|
+
} else {
|
|
4856
|
+
return value;
|
|
4857
|
+
}
|
|
4858
|
+
}
|
|
4847
4859
|
var thumbmark_instance;
|
|
4848
4860
|
async function getFingerPrint() {
|
|
4849
4861
|
if (typeof window === "undefined") return null;
|
|
@@ -4922,7 +4934,7 @@ var AuthService = class {
|
|
|
4922
4934
|
return await this.graphqlClient.request(GENERATE_OUTBOUND_SINGLE_SIGN_ON_REDIRECT_URL_MUTATION, variables);
|
|
4923
4935
|
}
|
|
4924
4936
|
get headers() {
|
|
4925
|
-
const headers = new Headers(this.options.headers);
|
|
4937
|
+
const headers = new Headers(callIfFn(this.options).headers);
|
|
4926
4938
|
headers.append("Accept", "application/json, text/plain");
|
|
4927
4939
|
headers.append("Content-Type", "application/json");
|
|
4928
4940
|
return headers;
|
|
@@ -5255,18 +5267,6 @@ var AuthService = class {
|
|
|
5255
5267
|
}
|
|
5256
5268
|
};
|
|
5257
5269
|
|
|
5258
|
-
// src/utils/call-if-fn.ts
|
|
5259
|
-
function isFunction(value) {
|
|
5260
|
-
return typeof value === "function";
|
|
5261
|
-
}
|
|
5262
|
-
function callIfFn(value, ...args) {
|
|
5263
|
-
if (isFunction(value)) {
|
|
5264
|
-
return value(...args);
|
|
5265
|
-
} else {
|
|
5266
|
-
return value;
|
|
5267
|
-
}
|
|
5268
|
-
}
|
|
5269
|
-
|
|
5270
5270
|
// src/services/cms-portal.service.ts
|
|
5271
5271
|
var CmsPortalService = class {
|
|
5272
5272
|
config;
|
|
@@ -5454,16 +5454,16 @@ var CmsPortalService = class {
|
|
|
5454
5454
|
async getJson(path, params) {
|
|
5455
5455
|
const config = callIfFn(this.config);
|
|
5456
5456
|
const fetch_ = config.fetch ?? fetch;
|
|
5457
|
+
const headers = new Headers(config.headers);
|
|
5458
|
+
headers.set("Accept", "application/json");
|
|
5459
|
+
headers.set("Content-Type", "application/json");
|
|
5460
|
+
headers.set("Site-ID", config.site);
|
|
5461
|
+
headers.set("Platform-ID", config.platform);
|
|
5457
5462
|
const req = new Request(
|
|
5458
5463
|
`${config.url}${path}?${params?.toString() ?? ""}`,
|
|
5459
5464
|
{
|
|
5460
5465
|
method: "GET",
|
|
5461
|
-
headers
|
|
5462
|
-
Accept: "application/json",
|
|
5463
|
-
"Content-Type": "application/json",
|
|
5464
|
-
"Site-ID": config.site,
|
|
5465
|
-
"Platform-ID": config.platform
|
|
5466
|
-
}
|
|
5466
|
+
headers
|
|
5467
5467
|
}
|
|
5468
5468
|
);
|
|
5469
5469
|
try {
|