@basis-theory/basis-theory-js 1.71.1 → 1.71.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/BasisTheory.js CHANGED
@@ -5,10 +5,6 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.BasisTheory = void 0;
7
7
 
8
- var _axios = _interopRequireDefault(require("axios"));
9
-
10
- var _https = _interopRequireDefault(require("https"));
11
-
12
8
  var _applications = require("./applications");
13
9
 
14
10
  var _common = require("./common");
@@ -31,26 +27,16 @@ var _sessions = require("./sessions");
31
27
 
32
28
  var _tenants = require("./tenants");
33
29
 
34
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
35
-
36
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; }
37
31
 
38
- const defaultAgent = () => {
39
- try {
40
- return new _https.default.Agent({
41
- keepAlive: true,
42
- keepAliveMsecs: _common.DEFAULT_KEEPALIVE_TIMEOUT_MS
43
- });
44
- } catch {
45
- return _axios.default.defaults.httpsAgent;
46
- }
47
- };
48
-
49
32
  const defaultInitOptions = {
50
33
  apiBaseUrl: _common.DEFAULT_BASE_URL,
51
34
  elements: false,
52
35
  appInfo: {},
53
- httpsAgent: defaultAgent()
36
+ httpsAgent: {
37
+ keepAlive: true,
38
+ keepAliveMsecs: _common.DEFAULT_KEEPALIVE_TIMEOUT_MS
39
+ }
54
40
  };
55
41
 
56
42
  class BasisTheory {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@basis-theory/basis-theory-js",
3
- "version": "1.71.1",
3
+ "version": "1.71.2",
4
4
  "repository": "https://github.com/Basis-Theory/basis-theory-js",
5
5
  "license": "Apache-2.0",
6
6
  "author": {
@@ -1,12 +1,10 @@
1
- /// <reference types="node" />
2
1
  import type { AxiosRequestConfig } from 'axios';
3
- import https from 'https';
4
2
  import type { ApplicationInfo } from '../types/sdk';
5
3
  interface BasisTheoryServiceOptions extends Pick<AxiosRequestConfig, 'transformRequest' | 'transformResponse'> {
6
4
  apiKey: string;
7
5
  baseURL: string;
8
6
  appInfo?: ApplicationInfo;
9
- httpsAgent?: https.Agent;
7
+ httpsAgent?: any;
10
8
  }
11
9
  declare type RequestTransformers = Pick<AxiosRequestConfig, 'transformRequest' | 'transformResponse'>;
12
10
  export type { BasisTheoryServiceOptions, RequestTransformers };
@@ -1,5 +1,3 @@
1
- /// <reference types="node" />
2
- import https from 'https';
3
1
  import type { BasisTheoryElements } from '../../types/elements';
4
2
  import type { Tokens, Tokenize, Applications, Tenants, Logs, ReactorFormulas, Reactors, Permissions, Proxies, Proxy, Sessions } from './services';
5
3
  interface ApplicationInfo {
@@ -10,7 +8,7 @@ interface ApplicationInfo {
10
8
  interface BasisTheoryInitOptions {
11
9
  apiBaseUrl?: string;
12
10
  appInfo?: ApplicationInfo;
13
- httpsAgent?: https.Agent;
11
+ httpsAgent?: any;
14
12
  }
15
13
  interface BasisTheoryInitOptionsWithoutElements extends BasisTheoryInitOptions {
16
14
  elements?: false;