@ptkl/sdk 0.8.0 → 0.8.2

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.js CHANGED
@@ -17862,6 +17862,8 @@ class PlatformBaseClient extends BaseClient {
17862
17862
  host = (_b = __global_env__ === null || __global_env__ === undefined ? undefined : __global_env__.API_HOST) !== null && _b !== undefined ? _b : host;
17863
17863
  // @ts-ignore
17864
17864
  token = token !== null && token !== undefined ? token : __global_env__ === null || __global_env__ === undefined ? undefined : __global_env__.PROJECT_API_TOKEN;
17865
+ // @ts-ignore
17866
+ env = env !== null && env !== undefined ? env : __global_env__ === null || __global_env__ === undefined ? undefined : __global_env__.PROJECT_ENV;
17865
17867
  }
17866
17868
  if (token) {
17867
17869
  headers['Authorization'] = `Bearer ${token}`;
@@ -18417,11 +18419,15 @@ class IntegrationsBaseClient extends BaseClient {
18417
18419
  // this potentially means that it is running as dev server in local
18418
18420
  headers['X-Project-Env'] = "dev";
18419
18421
  }
18422
+ }
18423
+ if (window) {
18420
18424
  // @ts-ignore
18421
18425
  const __global_env__ = window === null || window === undefined ? undefined : window.__ENV_VARIABLES__;
18422
18426
  host = (_b = __global_env__.INTEGRATION_API) !== null && _b !== undefined ? _b : host;
18423
18427
  // @ts-ignore
18424
18428
  token = token !== null && token !== undefined ? token : __global_env__ === null || __global_env__ === undefined ? undefined : __global_env__.PROJECT_API_TOKEN;
18429
+ // @ts-ignore
18430
+ env = env !== null && env !== undefined ? env : __global_env__ === null || __global_env__ === undefined ? undefined : __global_env__.PROJECT_ENV;
18425
18431
  }
18426
18432
  if (token) {
18427
18433
  headers['Authorization'] = `Bearer ${token}`;
package/dist/index.esm.js CHANGED
@@ -52,6 +52,8 @@ class PlatformBaseClient extends BaseClient {
52
52
  host = (_b = __global_env__ === null || __global_env__ === undefined ? undefined : __global_env__.API_HOST) !== null && _b !== undefined ? _b : host;
53
53
  // @ts-ignore
54
54
  token = token !== null && token !== undefined ? token : __global_env__ === null || __global_env__ === undefined ? undefined : __global_env__.PROJECT_API_TOKEN;
55
+ // @ts-ignore
56
+ env = env !== null && env !== undefined ? env : __global_env__ === null || __global_env__ === undefined ? undefined : __global_env__.PROJECT_ENV;
55
57
  }
56
58
  if (token) {
57
59
  headers['Authorization'] = `Bearer ${token}`;
@@ -607,11 +609,15 @@ class IntegrationsBaseClient extends BaseClient {
607
609
  // this potentially means that it is running as dev server in local
608
610
  headers['X-Project-Env'] = "dev";
609
611
  }
612
+ }
613
+ if (window) {
610
614
  // @ts-ignore
611
615
  const __global_env__ = window === null || window === undefined ? undefined : window.__ENV_VARIABLES__;
612
616
  host = (_b = __global_env__.INTEGRATION_API) !== null && _b !== undefined ? _b : host;
613
617
  // @ts-ignore
614
618
  token = token !== null && token !== undefined ? token : __global_env__ === null || __global_env__ === undefined ? undefined : __global_env__.PROJECT_API_TOKEN;
619
+ // @ts-ignore
620
+ env = env !== null && env !== undefined ? env : __global_env__ === null || __global_env__ === undefined ? undefined : __global_env__.PROJECT_ENV;
615
621
  }
616
622
  if (token) {
617
623
  headers['Authorization'] = `Bearer ${token}`;
@@ -53,6 +53,8 @@ var ProtokolSDK = (function (exports, axios) {
53
53
  host = (_b = __global_env__ === null || __global_env__ === undefined ? undefined : __global_env__.API_HOST) !== null && _b !== undefined ? _b : host;
54
54
  // @ts-ignore
55
55
  token = token !== null && token !== undefined ? token : __global_env__ === null || __global_env__ === undefined ? undefined : __global_env__.PROJECT_API_TOKEN;
56
+ // @ts-ignore
57
+ env = env !== null && env !== undefined ? env : __global_env__ === null || __global_env__ === undefined ? undefined : __global_env__.PROJECT_ENV;
56
58
  }
57
59
  if (token) {
58
60
  headers['Authorization'] = `Bearer ${token}`;
@@ -608,11 +610,15 @@ var ProtokolSDK = (function (exports, axios) {
608
610
  // this potentially means that it is running as dev server in local
609
611
  headers['X-Project-Env'] = "dev";
610
612
  }
613
+ }
614
+ if (window) {
611
615
  // @ts-ignore
612
616
  const __global_env__ = window === null || window === undefined ? undefined : window.__ENV_VARIABLES__;
613
617
  host = (_b = __global_env__.INTEGRATION_API) !== null && _b !== undefined ? _b : host;
614
618
  // @ts-ignore
615
619
  token = token !== null && token !== undefined ? token : __global_env__ === null || __global_env__ === undefined ? undefined : __global_env__.PROJECT_API_TOKEN;
620
+ // @ts-ignore
621
+ env = env !== null && env !== undefined ? env : __global_env__ === null || __global_env__ === undefined ? undefined : __global_env__.PROJECT_ENV;
616
622
  }
617
623
  if (token) {
618
624
  headers['Authorization'] = `Bearer ${token}`;
@@ -835,4 +841,4 @@ var ProtokolSDK = (function (exports, axios) {
835
841
 
836
842
  return exports;
837
843
 
838
- })({}, http);
844
+ })({}, axiosAdapter);
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ptkl/sdk",
3
- "version": "0.4.0",
3
+ "version": "0.8.1",
4
4
  "scripts": {
5
5
  "build": "rollup -c",
6
6
  "docs": "typedoc"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ptkl/sdk",
3
- "version": "0.8.0",
3
+ "version": "0.8.2",
4
4
  "scripts": {
5
5
  "build": "rollup -c",
6
6
  "docs": "typedoc"