@jupiterone/integration-sdk-http-client
Advanced tools
Comparing version 9.4.0 to 9.4.1
import { RateLimitConfig, APIResponse, APIRequest } from './types'; | ||
export declare const DEFAULT_RATE_LIMIT_CONFIG: RateLimitConfig; | ||
export declare type APIResourceIterationCallback<T> = (resources: T[]) => boolean | void | Promise<boolean | void>; | ||
export type APIResourceIterationCallback<T> = (resources: T[]) => boolean | void | Promise<boolean | void>; | ||
export declare class APIClient { | ||
@@ -5,0 +5,0 @@ private rateLimitConfig; |
@@ -1,2 +0,2 @@ | ||
export declare type APIRequest = { | ||
export type APIRequest = { | ||
url: string; | ||
@@ -6,3 +6,3 @@ method: string; | ||
}; | ||
export declare type APIResponse = { | ||
export type APIResponse = { | ||
data: any; | ||
@@ -13,3 +13,3 @@ headers: any; | ||
}; | ||
declare type PaginationState = { | ||
type PaginationState = { | ||
/** | ||
@@ -49,8 +49,8 @@ * Fetch limit, will be URL encoded as value of `limit` GET parameter. | ||
}; | ||
export declare type PaginationParams = Partial<PaginationState>; | ||
export declare type QueryParams = { | ||
export type PaginationParams = Partial<PaginationState>; | ||
export type QueryParams = { | ||
filter?: string; | ||
[name: string]: string | undefined; | ||
}; | ||
export declare type RateLimitConfig = { | ||
export type RateLimitConfig = { | ||
/** | ||
@@ -88,3 +88,3 @@ * The limit remaining value at which the client should slow down. This | ||
*/ | ||
export declare type RateLimitState = { | ||
export type RateLimitState = { | ||
/** | ||
@@ -109,3 +109,3 @@ * Maximum number of requests per minute that can be made by all API clients | ||
*/ | ||
export declare type PaginationMeta = { | ||
export type PaginationMeta = { | ||
limit: number; | ||
@@ -116,11 +116,11 @@ total: number; | ||
}; | ||
declare type ResponseMeta = { | ||
type ResponseMeta = { | ||
trace_id: string; | ||
pagination?: PaginationMeta; | ||
}; | ||
declare type ResponseError = { | ||
type ResponseError = { | ||
code: number; | ||
message: string; | ||
}; | ||
export declare type ResourcesResponse<T> = { | ||
export type ResourcesResponse<T> = { | ||
meta: ResponseMeta; | ||
@@ -130,3 +130,3 @@ errors: ResponseError[]; | ||
}; | ||
export declare type APIClientRateLimitConfig = { | ||
export type APIClientRateLimitConfig = { | ||
limitHeader: string; | ||
@@ -136,5 +136,5 @@ limitRemainingHeader: string; | ||
}; | ||
export declare type APIClientConfiguration = { | ||
export type APIClientConfiguration = { | ||
rateLimitConfig: APIClientRateLimitConfig; | ||
}; | ||
export {}; |
{ | ||
"name": "@jupiterone/integration-sdk-http-client", | ||
"version": "9.4.0", | ||
"version": "9.4.1", | ||
"description": "The HTTP client for use in JupiterOne integrations", | ||
@@ -29,4 +29,4 @@ "main": "dist/src/index.js", | ||
"devDependencies": { | ||
"@jupiterone/integration-sdk-dev-tools": "^9.4.0", | ||
"@jupiterone/integration-sdk-private-test-utils": "^9.4.0", | ||
"@jupiterone/integration-sdk-dev-tools": "^9.4.1", | ||
"@jupiterone/integration-sdk-private-test-utils": "^9.4.1", | ||
"fetch-mock-jest": "^1.5.1" | ||
@@ -38,3 +38,3 @@ }, | ||
"homepage": "https://github.com/JupiterOne/sdk#readme", | ||
"gitHead": "1152f1f863498347cb6e9f7b33dd5f2ce3b1c268" | ||
"gitHead": "b9e06bbbd2b454182799a40083c9873dd4b76ade" | ||
} |
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
67215