@jupiterone/integration-sdk-http-client
Advanced tools
Comparing version 13.7.1 to 13.7.2
@@ -6,2 +6,3 @@ import { Response } from 'node-fetch'; | ||
import { HierarchicalTokenBucket } from '@jupiterone/hierarchical-token-bucket'; | ||
import { Agent } from 'http'; | ||
export declare abstract class BaseAPIClient { | ||
@@ -17,2 +18,3 @@ protected baseUrl: string; | ||
protected refreshAuth?: RefreshAuthOptions; | ||
protected readonly agent?: Agent; | ||
/** | ||
@@ -47,2 +49,3 @@ * The authorization headers for the API requests | ||
* @param {number[]} [config.refreshAuth.errorCodes] - If provided, the auth headers will be refreshed on the provided error codes | ||
* @param {Agent} [config.agent] - If provided, the client will use the provided http agent for requests. | ||
* | ||
@@ -49,0 +52,0 @@ * @example |
@@ -37,2 +37,3 @@ "use strict"; | ||
refreshAuth; | ||
agent; | ||
/** | ||
@@ -67,2 +68,3 @@ * The authorization headers for the API requests | ||
* @param {number[]} [config.refreshAuth.errorCodes] - If provided, the auth headers will be refreshed on the provided error codes | ||
* @param {Agent} [config.agent] - If provided, the client will use the provided http agent for requests. | ||
* | ||
@@ -106,2 +108,3 @@ * @example | ||
this.refreshAuth = config.refreshAuth; | ||
this.agent = config.agent; | ||
} | ||
@@ -190,2 +193,3 @@ withBaseUrl(endpoint) { | ||
body: fmtBody, | ||
agent: this.agent, | ||
}); | ||
@@ -192,0 +196,0 @@ return response; |
import { IntegrationLogger } from '@jupiterone/integration-sdk-core'; | ||
import { AttemptContext } from '@lifeomic/attempt'; | ||
import { Agent } from 'http'; | ||
export type OptionalPromise<T> = T | Promise<T>; | ||
@@ -49,2 +50,3 @@ export interface RequestOptions { | ||
refreshAuth?: RefreshAuthOptions; | ||
agent?: Agent; | ||
} | ||
@@ -51,0 +53,0 @@ export interface IterateCallbackResult { |
{ | ||
"name": "@jupiterone/integration-sdk-http-client", | ||
"version": "13.7.1", | ||
"version": "13.7.2", | ||
"description": "The HTTP client for use in JupiterOne integrations", | ||
@@ -27,3 +27,3 @@ "main": "dist/src/index.js", | ||
"@jupiterone/hierarchical-token-bucket": "^0.3.1", | ||
"@jupiterone/integration-sdk-core": "^13.7.1", | ||
"@jupiterone/integration-sdk-core": "^13.7.2", | ||
"@lifeomic/attempt": "^3.0.3", | ||
@@ -35,4 +35,4 @@ "form-data": "^4.0.0", | ||
"devDependencies": { | ||
"@jupiterone/integration-sdk-dev-tools": "^13.7.1", | ||
"@jupiterone/integration-sdk-private-test-utils": "^13.7.1", | ||
"@jupiterone/integration-sdk-dev-tools": "^13.7.2", | ||
"@jupiterone/integration-sdk-private-test-utils": "^13.7.2", | ||
"@types/node-fetch": "^2.6.11" | ||
@@ -44,3 +44,3 @@ }, | ||
"homepage": "https://github.com/JupiterOne/sdk#readme", | ||
"gitHead": "2fdcb1185bf03af7da4022e1f9491cae299b3786" | ||
"gitHead": "52167ef701207a79f0eafbd8b062d93156bc90ea" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
244000
896