@basis-theory/basis-theory-js 1.71.3 → 1.71.4

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/BasisTheory.js CHANGED
@@ -5,8 +5,6 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.BasisTheory = void 0;
7
7
 
8
- var _axios = _interopRequireDefault(require("axios"));
9
-
10
8
  var _applications = require("./applications");
11
9
 
12
10
  var _common = require("./common");
@@ -29,15 +27,12 @@ var _sessions = require("./sessions");
29
27
 
30
28
  var _tenants = require("./tenants");
31
29
 
32
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
33
-
34
30
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
35
31
 
36
32
  const defaultInitOptions = {
37
33
  apiBaseUrl: _common.DEFAULT_BASE_URL,
38
34
  elements: false,
39
- appInfo: {},
40
- httpsAgent: _axios.default.defaults.httpAgent
35
+ appInfo: {}
41
36
  };
42
37
 
43
38
  class BasisTheory {
@@ -78,72 +73,60 @@ class BasisTheory {
78
73
  await this.loadElements(apiKey);
79
74
  }
80
75
 
81
- const httpsAgent = this._initOptions.httpsAgent;
82
76
  this._tokens = new ((0, _elements.delegateTokens)(this._elements))({
83
77
  apiKey,
84
78
  baseURL: new URL(_common.CLIENT_BASE_PATHS.tokens, baseUrl).toString(),
85
- appInfo,
86
- httpsAgent
79
+ appInfo
87
80
  });
88
81
  this._tokenize = new ((0, _elements.delegateTokenize)(this._elements))({
89
82
  apiKey,
90
83
  baseURL: new URL(_common.CLIENT_BASE_PATHS.tokenize, baseUrl).toString(),
91
- appInfo,
92
- httpsAgent
84
+ appInfo
93
85
  });
94
86
  this._applications = new _applications.BasisTheoryApplications({
95
87
  apiKey,
96
88
  baseURL: new URL(_common.CLIENT_BASE_PATHS.applications, baseUrl).toString(),
97
- appInfo,
98
- httpsAgent
89
+ appInfo
99
90
  });
100
91
  this._tenants = new _tenants.BasisTheoryTenants({
101
92
  apiKey,
102
93
  baseURL: new URL(_common.CLIENT_BASE_PATHS.tenants, baseUrl).toString(),
103
- appInfo,
104
- httpsAgent
94
+ appInfo
105
95
  });
106
96
  this._logs = new _logs.BasisTheoryLogs({
107
97
  apiKey,
108
98
  baseURL: new URL(_common.CLIENT_BASE_PATHS.logs, baseUrl).toString(),
109
- appInfo,
110
- httpsAgent
99
+ appInfo
111
100
  });
112
101
  this._reactorFormulas = new _reactorFormulas.BasisTheoryReactorFormulas({
113
102
  apiKey,
114
103
  baseURL: new URL(_common.CLIENT_BASE_PATHS.reactorFormulas, baseUrl).toString(),
115
- appInfo,
116
- httpsAgent
104
+ appInfo
117
105
  });
118
106
  this._reactors = new _reactors.BasisTheoryReactors({
119
107
  apiKey,
120
108
  baseURL: new URL(_common.CLIENT_BASE_PATHS.reactors, baseUrl).toString(),
121
- appInfo,
122
- httpsAgent
109
+ appInfo
123
110
  });
124
111
  this._permissions = new _permissions.BasisTheoryPermissions({
125
112
  apiKey,
126
113
  baseURL: new URL(_common.CLIENT_BASE_PATHS.permissions, baseUrl).toString(),
127
- appInfo,
128
- httpsAgent
114
+ appInfo
129
115
  });
130
116
  this._proxies = new _proxies.BasisTheoryProxies({
131
117
  apiKey,
132
118
  baseURL: new URL(_common.CLIENT_BASE_PATHS.proxies, baseUrl).toString(),
133
- appInfo,
134
- httpsAgent
119
+ appInfo
135
120
  });
136
121
  this._proxy = new ((0, _elements.delegateProxy)(this._elements))({
137
122
  apiKey,
138
123
  baseURL: new URL(_common.CLIENT_BASE_PATHS.proxy, baseUrl).toString(),
139
- appInfo,
140
- httpsAgent
124
+ appInfo
141
125
  });
142
126
  this._sessions = new _sessions.BasisTheorySessions({
143
127
  apiKey,
144
128
  baseURL: new URL(_common.CLIENT_BASE_PATHS.sessions, baseUrl).toString(),
145
- appInfo,
146
- httpsAgent
129
+ appInfo
147
130
  });
148
131
  this._initStatus = 'done';
149
132
  } catch (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@basis-theory/basis-theory-js",
3
- "version": "1.71.3",
3
+ "version": "1.71.4",
4
4
  "repository": "https://github.com/Basis-Theory/basis-theory-js",
5
5
  "license": "Apache-2.0",
6
6
  "author": {
@@ -18,8 +18,7 @@ class BasisTheoryService {
18
18
  baseURL,
19
19
  transformRequest,
20
20
  transformResponse,
21
- appInfo,
22
- httpsAgent
21
+ appInfo
23
22
  } = options;
24
23
  this.client = _axios.default.create({
25
24
  baseURL,
@@ -33,8 +32,7 @@ class BasisTheoryService {
33
32
 
34
33
  /* eslint-disable unicorn/prefer-spread */
35
34
  transformRequest: [].concat(transformRequest || _common.transformRequestSnakeCase, _axios.default.defaults.transformRequest),
36
- transformResponse: _axios.default.defaults.transformResponse.concat(transformResponse || _common.transformResponseCamelCase),
37
- httpsAgent
35
+ transformResponse: _axios.default.defaults.transformResponse.concat(transformResponse || _common.transformResponseCamelCase)
38
36
  /* eslint-enable unicorn/prefer-spread */
39
37
 
40
38
  });
@@ -4,7 +4,6 @@ interface BasisTheoryServiceOptions extends Pick<AxiosRequestConfig, 'transformR
4
4
  apiKey: string;
5
5
  baseURL: string;
6
6
  appInfo?: ApplicationInfo;
7
- httpsAgent?: any;
8
7
  }
9
8
  declare type RequestTransformers = Pick<AxiosRequestConfig, 'transformRequest' | 'transformResponse'>;
10
9
  export type { BasisTheoryServiceOptions, RequestTransformers };
@@ -8,7 +8,6 @@ interface ApplicationInfo {
8
8
  interface BasisTheoryInitOptions {
9
9
  apiBaseUrl?: string;
10
10
  appInfo?: ApplicationInfo;
11
- httpsAgent?: any;
12
11
  }
13
12
  interface BasisTheoryInitOptionsWithoutElements extends BasisTheoryInitOptions {
14
13
  elements?: false;