Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

api-reach

Package Overview
Dependencies
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

api-reach - npm Package Compare versions

Comparing version 0.14.0-beta.2 to 0.14.0-beta.3

docs/types/ValidateApiEndpoints.html

11

dist/index.d.ts
import type { ApiResponse } from "./response/response.js";
import type { AbortablePromise, ApiClientConfig, ApiEndpoints, GenericHeaders, Options, RequestData, RequestOptions, BodyType, BodyTypeType, HeadersType, ParamsType, QueryType } from "./types";
import type { AbortablePromise, ApiEndpoints, Dependencies, GenericHeaders, Options, RequestData, RequestOptions, BodyType, BodyTypeType, HeadersType, ParamsType, QueryType, ValidateApiEndpoints } from "./types";
import { ExpectedResponseBodyType } from "./const.js";
import { ResponseDataTypeMismatchError } from "./errors.js";
interface Dependencies {
fetch: typeof fetch;
URL: typeof URL;
qsStringify: (data: unknown) => string;
}
declare class ApiClient<T extends ExpectedResponseBodyType, RL extends ApiEndpoints> {

@@ -30,6 +25,6 @@ private readonly _options;

}
declare const createApiClient: <RSP extends ApiEndpoints, T extends ExpectedResponseBodyType = ExpectedResponseBodyType.json>(options: Options<T, GenericHeaders>, dependencies?: ApiClientConfig) => ApiClient<T, RSP>;
declare const createApiClient: <RSP extends ApiEndpoints, T extends ExpectedResponseBodyType = ExpectedResponseBodyType.json>(options: Options<T, GenericHeaders>, dependencies?: Dependencies) => ApiClient<T, RSP>;
export { createApiClient, ResponseDataTypeMismatchError, };
export { AbortedResponse, InformationalResponse, SuccessResponse, RedirectResponse, ClientErrorResponse, ServerErrorResponse, } from "./response/response.js";
export type { ApiClient, ExpectedResponseBodyType, ApiEndpoints, };
export type { ApiClient, ExpectedResponseBodyType, ApiEndpoints, ValidateApiEndpoints, };
//# sourceMappingURL=index.d.ts.map

@@ -46,3 +46,3 @@ "use strict";

this._options = options !== null && options !== void 0 ? options : {};
this._dependencies = Object.assign({ fetch: fetch, URL: URL, qsStringify: qs_1.default.stringify }, dependencies);
this._dependencies = Object.assign({ fetch: fetch, URL: URL, qsStringify: qs_1.default.stringify, AbortController: AbortController }, dependencies);
}

@@ -220,3 +220,3 @@ _getResponseType(options) {

let timedoutLocal = false;
currentController = new AbortController();
currentController = new this._dependencies.AbortController();
const singleTimeout = new oop_timers_1.Timeout(() => {

@@ -374,3 +374,3 @@ timedoutLocal = true;

const createApiClient = (options, dependencies) => {
return new ApiClient(options);
return new ApiClient(options, dependencies);
};

@@ -377,0 +377,0 @@ exports.createApiClient = createApiClient;

@@ -12,3 +12,3 @@ import type { RequestBodyType } from "../const";

};
type GenericJSONResponse = RecordLike<unknown>;
type GenericJSONResponse = RecordLike<unknown> | JSONFriendly[];
type GenericParams = RecordLike<BasicJSONTypes> | undefined;

@@ -18,3 +18,3 @@ type GenericBody = RecordLike<unknown> | string | undefined;

type GenericHeaders = RecordLike<string> | undefined;
type ApiEndpoints = Record<string, Record<string, {
type ApiEndpoints = RecordLike<RecordLike<{
response: GenericJSONResponse;

@@ -27,3 +27,4 @@ params?: GenericParams;

}>>;
export type { BasicJSONTypes, JSONFriendly, ApiEndpoints, AbortablePromise, GenericJSONResponse, GenericParams, GenericBody, GenericQuery, GenericHeaders, };
type ValidateApiEndpoints<T extends ApiEndpoints> = T;
export type { BasicJSONTypes, JSONFriendly, ApiEndpoints, ValidateApiEndpoints, AbortablePromise, GenericJSONResponse, GenericParams, GenericBody, GenericQuery, GenericHeaders, };
//# sourceMappingURL=common.d.ts.map

@@ -62,8 +62,9 @@ import type { RequestRedirect as NodeFetchRequestRedirect } from "node-fetch";

};
interface ApiClientConfig {
interface Dependencies {
fetch: typeof fetch;
URL: typeof URL;
AbortController: typeof AbortController;
qsStringify: (data: unknown) => string;
}
export type { Options, CacheOptions, RequestOptions, FinalOptions, ApiClientConfig, };
export type { Options, CacheOptions, RequestOptions, FinalOptions, Dependencies, };
//# sourceMappingURL=options.d.ts.map

@@ -1,1 +0,1 @@

window.searchData = JSON.parse("{\"kinds\":{\"8\":\"Enumeration\",\"16\":\"Enumeration Member\",\"64\":\"Function\",\"128\":\"Class\",\"512\":\"Constructor\",\"1024\":\"Property\",\"2048\":\"Method\",\"4194304\":\"Type alias\",\"33554432\":\"@knodes/typedoc-plugin-pages: page\"},\"rows\":[{\"kind\":64,\"name\":\"createApiClient\",\"url\":\"functions/createApiClient.html\",\"classes\":\"tsd-kind-function\"},{\"kind\":128,\"name\":\"ApiClient\",\"url\":\"classes/ApiClient.html\",\"classes\":\"tsd-kind-class\"},{\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/ApiClient.html#constructor\",\"classes\":\"tsd-kind-constructor tsd-parent-kind-class\",\"parent\":\"ApiClient\"},{\"kind\":1024,\"name\":\"_options\",\"url\":\"classes/ApiClient.html#_options\",\"classes\":\"tsd-kind-property tsd-parent-kind-class tsd-is-private\",\"parent\":\"ApiClient\"},{\"kind\":1024,\"name\":\"_dependencies\",\"url\":\"classes/ApiClient.html#_dependencies\",\"classes\":\"tsd-kind-property tsd-parent-kind-class tsd-is-private\",\"parent\":\"ApiClient\"},{\"kind\":2048,\"name\":\"_getResponseType\",\"url\":\"classes/ApiClient.html#_getResponseType\",\"classes\":\"tsd-kind-method tsd-parent-kind-class tsd-is-private\",\"parent\":\"ApiClient\"},{\"kind\":2048,\"name\":\"_getRequestType\",\"url\":\"classes/ApiClient.html#_getRequestType\",\"classes\":\"tsd-kind-method tsd-parent-kind-class tsd-is-private\",\"parent\":\"ApiClient\"},{\"kind\":2048,\"name\":\"_getContentType\",\"url\":\"classes/ApiClient.html#_getContentType\",\"classes\":\"tsd-kind-method tsd-parent-kind-class tsd-is-private\",\"parent\":\"ApiClient\"},{\"kind\":2048,\"name\":\"_buildRequestBody\",\"url\":\"classes/ApiClient.html#_buildRequestBody\",\"classes\":\"tsd-kind-method tsd-parent-kind-class tsd-is-private\",\"parent\":\"ApiClient\"},{\"kind\":2048,\"name\":\"_buildFetchOptions\",\"url\":\"classes/ApiClient.html#_buildFetchOptions\",\"classes\":\"tsd-kind-method tsd-parent-kind-class tsd-is-private\",\"parent\":\"ApiClient\"},{\"kind\":2048,\"name\":\"_buildCacheOptions\",\"url\":\"classes/ApiClient.html#_buildCacheOptions\",\"classes\":\"tsd-kind-method tsd-parent-kind-class tsd-is-private\",\"parent\":\"ApiClient\"},{\"kind\":2048,\"name\":\"_safeUrlParse\",\"url\":\"classes/ApiClient.html#_safeUrlParse\",\"classes\":\"tsd-kind-method tsd-parent-kind-class tsd-is-private\",\"parent\":\"ApiClient\"},{\"kind\":2048,\"name\":\"_buildUrlBase\",\"url\":\"classes/ApiClient.html#_buildUrlBase\",\"classes\":\"tsd-kind-method tsd-parent-kind-class tsd-is-private\",\"parent\":\"ApiClient\"},{\"kind\":2048,\"name\":\"_buildUrl\",\"url\":\"classes/ApiClient.html#_buildUrl\",\"classes\":\"tsd-kind-method tsd-parent-kind-class tsd-is-private\",\"parent\":\"ApiClient\"},{\"kind\":2048,\"name\":\"get\",\"url\":\"classes/ApiClient.html#get\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"ApiClient\"},{\"kind\":2048,\"name\":\"post\",\"url\":\"classes/ApiClient.html#post\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"ApiClient\"},{\"kind\":2048,\"name\":\"request\",\"url\":\"classes/ApiClient.html#request\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"ApiClient\"},{\"kind\":2048,\"name\":\"_prepareAndSendRequest\",\"url\":\"classes/ApiClient.html#_prepareAndSendRequest\",\"classes\":\"tsd-kind-method tsd-parent-kind-class tsd-is-private\",\"parent\":\"ApiClient\"},{\"kind\":2048,\"name\":\"_sendRequest\",\"url\":\"classes/ApiClient.html#_sendRequest\",\"classes\":\"tsd-kind-method tsd-parent-kind-class tsd-is-private\",\"parent\":\"ApiClient\"},{\"kind\":2048,\"name\":\"_buildResponse\",\"url\":\"classes/ApiClient.html#_buildResponse\",\"classes\":\"tsd-kind-method tsd-parent-kind-class tsd-is-private\",\"parent\":\"ApiClient\"},{\"kind\":64,\"name\":\"ResponseDataTypeMismatchError\",\"url\":\"functions/ResponseDataTypeMismatchError-1.html\",\"classes\":\"tsd-kind-function\"},{\"kind\":4194304,\"name\":\"ResponseDataTypeMismatchError\",\"url\":\"types/ResponseDataTypeMismatchError.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":128,\"name\":\"AbortedResponse\",\"url\":\"classes/AbortedResponse.html\",\"classes\":\"tsd-kind-class\"},{\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/AbortedResponse.html#constructor\",\"classes\":\"tsd-kind-constructor tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"AbortedResponse\"},{\"kind\":1024,\"name\":\"status\",\"url\":\"classes/AbortedResponse.html#status\",\"classes\":\"tsd-kind-property tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"AbortedResponse\"},{\"kind\":1024,\"name\":\"statusText\",\"url\":\"classes/AbortedResponse.html#statusText\",\"classes\":\"tsd-kind-property tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"AbortedResponse\"},{\"kind\":1024,\"name\":\"headers\",\"url\":\"classes/AbortedResponse.html#headers\",\"classes\":\"tsd-kind-property tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"AbortedResponse\"},{\"kind\":1024,\"name\":\"request\",\"url\":\"classes/AbortedResponse.html#request\",\"classes\":\"tsd-kind-property tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"AbortedResponse\"},{\"kind\":1024,\"name\":\"body\",\"url\":\"classes/AbortedResponse.html#body\",\"classes\":\"tsd-kind-property tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"AbortedResponse\"},{\"kind\":1024,\"name\":\"cached\",\"url\":\"classes/AbortedResponse.html#cached\",\"classes\":\"tsd-kind-property tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"AbortedResponse\"},{\"kind\":128,\"name\":\"InformationalResponse\",\"url\":\"classes/InformationalResponse.html\",\"classes\":\"tsd-kind-class\"},{\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/InformationalResponse.html#constructor\",\"classes\":\"tsd-kind-constructor tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"InformationalResponse\"},{\"kind\":1024,\"name\":\"status\",\"url\":\"classes/InformationalResponse.html#status\",\"classes\":\"tsd-kind-property tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"InformationalResponse\"},{\"kind\":1024,\"name\":\"statusText\",\"url\":\"classes/InformationalResponse.html#statusText\",\"classes\":\"tsd-kind-property tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"InformationalResponse\"},{\"kind\":1024,\"name\":\"headers\",\"url\":\"classes/InformationalResponse.html#headers\",\"classes\":\"tsd-kind-property tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"InformationalResponse\"},{\"kind\":1024,\"name\":\"request\",\"url\":\"classes/InformationalResponse.html#request\",\"classes\":\"tsd-kind-property tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"InformationalResponse\"},{\"kind\":1024,\"name\":\"body\",\"url\":\"classes/InformationalResponse.html#body\",\"classes\":\"tsd-kind-property tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"InformationalResponse\"},{\"kind\":1024,\"name\":\"cached\",\"url\":\"classes/InformationalResponse.html#cached\",\"classes\":\"tsd-kind-property tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"InformationalResponse\"},{\"kind\":128,\"name\":\"SuccessResponse\",\"url\":\"classes/SuccessResponse.html\",\"classes\":\"tsd-kind-class\"},{\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/SuccessResponse.html#constructor\",\"classes\":\"tsd-kind-constructor tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"SuccessResponse\"},{\"kind\":1024,\"name\":\"status\",\"url\":\"classes/SuccessResponse.html#status\",\"classes\":\"tsd-kind-property tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"SuccessResponse\"},{\"kind\":1024,\"name\":\"statusText\",\"url\":\"classes/SuccessResponse.html#statusText\",\"classes\":\"tsd-kind-property tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"SuccessResponse\"},{\"kind\":1024,\"name\":\"headers\",\"url\":\"classes/SuccessResponse.html#headers\",\"classes\":\"tsd-kind-property tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"SuccessResponse\"},{\"kind\":1024,\"name\":\"request\",\"url\":\"classes/SuccessResponse.html#request\",\"classes\":\"tsd-kind-property tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"SuccessResponse\"},{\"kind\":1024,\"name\":\"body\",\"url\":\"classes/SuccessResponse.html#body\",\"classes\":\"tsd-kind-property tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"SuccessResponse\"},{\"kind\":1024,\"name\":\"cached\",\"url\":\"classes/SuccessResponse.html#cached\",\"classes\":\"tsd-kind-property tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"SuccessResponse\"},{\"kind\":128,\"name\":\"RedirectResponse\",\"url\":\"classes/RedirectResponse.html\",\"classes\":\"tsd-kind-class\"},{\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/RedirectResponse.html#constructor\",\"classes\":\"tsd-kind-constructor tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"RedirectResponse\"},{\"kind\":1024,\"name\":\"status\",\"url\":\"classes/RedirectResponse.html#status\",\"classes\":\"tsd-kind-property tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"RedirectResponse\"},{\"kind\":1024,\"name\":\"statusText\",\"url\":\"classes/RedirectResponse.html#statusText\",\"classes\":\"tsd-kind-property tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"RedirectResponse\"},{\"kind\":1024,\"name\":\"headers\",\"url\":\"classes/RedirectResponse.html#headers\",\"classes\":\"tsd-kind-property tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"RedirectResponse\"},{\"kind\":1024,\"name\":\"request\",\"url\":\"classes/RedirectResponse.html#request\",\"classes\":\"tsd-kind-property tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"RedirectResponse\"},{\"kind\":1024,\"name\":\"body\",\"url\":\"classes/RedirectResponse.html#body\",\"classes\":\"tsd-kind-property tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"RedirectResponse\"},{\"kind\":1024,\"name\":\"cached\",\"url\":\"classes/RedirectResponse.html#cached\",\"classes\":\"tsd-kind-property tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"RedirectResponse\"},{\"kind\":128,\"name\":\"ClientErrorResponse\",\"url\":\"classes/ClientErrorResponse.html\",\"classes\":\"tsd-kind-class\"},{\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/ClientErrorResponse.html#constructor\",\"classes\":\"tsd-kind-constructor tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"ClientErrorResponse\"},{\"kind\":1024,\"name\":\"status\",\"url\":\"classes/ClientErrorResponse.html#status\",\"classes\":\"tsd-kind-property tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"ClientErrorResponse\"},{\"kind\":1024,\"name\":\"statusText\",\"url\":\"classes/ClientErrorResponse.html#statusText\",\"classes\":\"tsd-kind-property tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"ClientErrorResponse\"},{\"kind\":1024,\"name\":\"headers\",\"url\":\"classes/ClientErrorResponse.html#headers\",\"classes\":\"tsd-kind-property tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"ClientErrorResponse\"},{\"kind\":1024,\"name\":\"request\",\"url\":\"classes/ClientErrorResponse.html#request\",\"classes\":\"tsd-kind-property tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"ClientErrorResponse\"},{\"kind\":1024,\"name\":\"body\",\"url\":\"classes/ClientErrorResponse.html#body\",\"classes\":\"tsd-kind-property tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"ClientErrorResponse\"},{\"kind\":1024,\"name\":\"cached\",\"url\":\"classes/ClientErrorResponse.html#cached\",\"classes\":\"tsd-kind-property tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"ClientErrorResponse\"},{\"kind\":128,\"name\":\"ServerErrorResponse\",\"url\":\"classes/ServerErrorResponse.html\",\"classes\":\"tsd-kind-class\"},{\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/ServerErrorResponse.html#constructor\",\"classes\":\"tsd-kind-constructor tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"ServerErrorResponse\"},{\"kind\":1024,\"name\":\"status\",\"url\":\"classes/ServerErrorResponse.html#status\",\"classes\":\"tsd-kind-property tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"ServerErrorResponse\"},{\"kind\":1024,\"name\":\"statusText\",\"url\":\"classes/ServerErrorResponse.html#statusText\",\"classes\":\"tsd-kind-property tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"ServerErrorResponse\"},{\"kind\":1024,\"name\":\"headers\",\"url\":\"classes/ServerErrorResponse.html#headers\",\"classes\":\"tsd-kind-property tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"ServerErrorResponse\"},{\"kind\":1024,\"name\":\"request\",\"url\":\"classes/ServerErrorResponse.html#request\",\"classes\":\"tsd-kind-property tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"ServerErrorResponse\"},{\"kind\":1024,\"name\":\"body\",\"url\":\"classes/ServerErrorResponse.html#body\",\"classes\":\"tsd-kind-property tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"ServerErrorResponse\"},{\"kind\":1024,\"name\":\"cached\",\"url\":\"classes/ServerErrorResponse.html#cached\",\"classes\":\"tsd-kind-property tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"ServerErrorResponse\"},{\"kind\":8,\"name\":\"ExpectedResponseBodyType\",\"url\":\"enums/ExpectedResponseBodyType.html\",\"classes\":\"tsd-kind-enum\"},{\"kind\":16,\"name\":\"json\",\"url\":\"enums/ExpectedResponseBodyType.html#json\",\"classes\":\"tsd-kind-enum-member tsd-parent-kind-enum\",\"parent\":\"ExpectedResponseBodyType\"},{\"kind\":16,\"name\":\"text\",\"url\":\"enums/ExpectedResponseBodyType.html#text\",\"classes\":\"tsd-kind-enum-member tsd-parent-kind-enum\",\"parent\":\"ExpectedResponseBodyType\"},{\"kind\":16,\"name\":\"binary\",\"url\":\"enums/ExpectedResponseBodyType.html#binary\",\"classes\":\"tsd-kind-enum-member tsd-parent-kind-enum\",\"parent\":\"ExpectedResponseBodyType\"},{\"kind\":16,\"name\":\"stream\",\"url\":\"enums/ExpectedResponseBodyType.html#stream\",\"classes\":\"tsd-kind-enum-member tsd-parent-kind-enum\",\"parent\":\"ExpectedResponseBodyType\"},{\"kind\":4194304,\"name\":\"ApiEndpoints\",\"url\":\"types/ApiEndpoints.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":33554432,\"name\":\"Basic usage\",\"url\":\"pages/tutorials/Basic usage.html\",\"classes\":\"pages-entry pages-entry-page\"},{\"kind\":33554432,\"name\":\"Usage with React Native\",\"url\":\"pages/tutorials/Usage with React Native.html\",\"classes\":\"pages-entry pages-entry-page\"}],\"index\":{\"version\":\"2.3.9\",\"fields\":[\"name\",\"comment\"],\"fieldVectors\":[[\"name/0\",[0,40.447]],[\"comment/0\",[]],[\"name/1\",[1,40.447]],[\"comment/1\",[]],[\"name/2\",[2,24.025]],[\"comment/2\",[]],[\"name/3\",[3,40.447]],[\"comment/3\",[]],[\"name/4\",[4,40.447]],[\"comment/4\",[]],[\"name/5\",[5,40.447]],[\"comment/5\",[]],[\"name/6\",[6,40.447]],[\"comment/6\",[]],[\"name/7\",[7,40.447]],[\"comment/7\",[]],[\"name/8\",[8,40.447]],[\"comment/8\",[]],[\"name/9\",[9,40.447]],[\"comment/9\",[]],[\"name/10\",[10,40.447]],[\"comment/10\",[]],[\"name/11\",[11,40.447]],[\"comment/11\",[]],[\"name/12\",[12,40.447]],[\"comment/12\",[]],[\"name/13\",[13,40.447]],[\"comment/13\",[]],[\"name/14\",[14,40.447]],[\"comment/14\",[]],[\"name/15\",[15,40.447]],[\"comment/15\",[]],[\"name/16\",[16,24.025]],[\"comment/16\",[]],[\"name/17\",[17,40.447]],[\"comment/17\",[]],[\"name/18\",[18,40.447]],[\"comment/18\",[]],[\"name/19\",[19,40.447]],[\"comment/19\",[]],[\"name/20\",[20,35.235]],[\"comment/20\",[]],[\"name/21\",[20,35.235]],[\"comment/21\",[]],[\"name/22\",[21,40.447]],[\"comment/22\",[]],[\"name/23\",[2,24.025]],[\"comment/23\",[]],[\"name/24\",[22,25.485]],[\"comment/24\",[]],[\"name/25\",[23,25.485]],[\"comment/25\",[]],[\"name/26\",[24,25.485]],[\"comment/26\",[]],[\"name/27\",[16,24.025]],[\"comment/27\",[]],[\"name/28\",[25,25.485]],[\"comment/28\",[]],[\"name/29\",[26,25.485]],[\"comment/29\",[]],[\"name/30\",[27,40.447]],[\"comment/30\",[]],[\"name/31\",[2,24.025]],[\"comment/31\",[]],[\"name/32\",[22,25.485]],[\"comment/32\",[]],[\"name/33\",[23,25.485]],[\"comment/33\",[]],[\"name/34\",[24,25.485]],[\"comment/34\",[]],[\"name/35\",[16,24.025]],[\"comment/35\",[]],[\"name/36\",[25,25.485]],[\"comment/36\",[]],[\"name/37\",[26,25.485]],[\"comment/37\",[]],[\"name/38\",[28,40.447]],[\"comment/38\",[]],[\"name/39\",[2,24.025]],[\"comment/39\",[]],[\"name/40\",[22,25.485]],[\"comment/40\",[]],[\"name/41\",[23,25.485]],[\"comment/41\",[]],[\"name/42\",[24,25.485]],[\"comment/42\",[]],[\"name/43\",[16,24.025]],[\"comment/43\",[]],[\"name/44\",[25,25.485]],[\"comment/44\",[]],[\"name/45\",[26,25.485]],[\"comment/45\",[]],[\"name/46\",[29,40.447]],[\"comment/46\",[]],[\"name/47\",[2,24.025]],[\"comment/47\",[]],[\"name/48\",[22,25.485]],[\"comment/48\",[]],[\"name/49\",[23,25.485]],[\"comment/49\",[]],[\"name/50\",[24,25.485]],[\"comment/50\",[]],[\"name/51\",[16,24.025]],[\"comment/51\",[]],[\"name/52\",[25,25.485]],[\"comment/52\",[]],[\"name/53\",[26,25.485]],[\"comment/53\",[]],[\"name/54\",[30,40.447]],[\"comment/54\",[]],[\"name/55\",[2,24.025]],[\"comment/55\",[]],[\"name/56\",[22,25.485]],[\"comment/56\",[]],[\"name/57\",[23,25.485]],[\"comment/57\",[]],[\"name/58\",[24,25.485]],[\"comment/58\",[]],[\"name/59\",[16,24.025]],[\"comment/59\",[]],[\"name/60\",[25,25.485]],[\"comment/60\",[]],[\"name/61\",[26,25.485]],[\"comment/61\",[]],[\"name/62\",[31,40.447]],[\"comment/62\",[]],[\"name/63\",[2,24.025]],[\"comment/63\",[]],[\"name/64\",[22,25.485]],[\"comment/64\",[]],[\"name/65\",[23,25.485]],[\"comment/65\",[]],[\"name/66\",[24,25.485]],[\"comment/66\",[]],[\"name/67\",[16,24.025]],[\"comment/67\",[]],[\"name/68\",[25,25.485]],[\"comment/68\",[]],[\"name/69\",[26,25.485]],[\"comment/69\",[]],[\"name/70\",[32,40.447]],[\"comment/70\",[]],[\"name/71\",[33,40.447]],[\"comment/71\",[]],[\"name/72\",[34,40.447]],[\"comment/72\",[]],[\"name/73\",[35,40.447]],[\"comment/73\",[]],[\"name/74\",[36,40.447]],[\"comment/74\",[]],[\"name/75\",[37,40.447]],[\"comment/75\",[]],[\"name/76\",[38,28.952,39,25.221]],[\"comment/76\",[]],[\"name/77\",[39,16.08,40,18.459,41,18.459,42,18.459]],[\"comment/77\",[]]],\"invertedIndex\":[[\"_buildcacheoptions\",{\"_index\":10,\"name\":{\"10\":{}},\"comment\":{}}],[\"_buildfetchoptions\",{\"_index\":9,\"name\":{\"9\":{}},\"comment\":{}}],[\"_buildrequestbody\",{\"_index\":8,\"name\":{\"8\":{}},\"comment\":{}}],[\"_buildresponse\",{\"_index\":19,\"name\":{\"19\":{}},\"comment\":{}}],[\"_buildurl\",{\"_index\":13,\"name\":{\"13\":{}},\"comment\":{}}],[\"_buildurlbase\",{\"_index\":12,\"name\":{\"12\":{}},\"comment\":{}}],[\"_dependencies\",{\"_index\":4,\"name\":{\"4\":{}},\"comment\":{}}],[\"_getcontenttype\",{\"_index\":7,\"name\":{\"7\":{}},\"comment\":{}}],[\"_getrequesttype\",{\"_index\":6,\"name\":{\"6\":{}},\"comment\":{}}],[\"_getresponsetype\",{\"_index\":5,\"name\":{\"5\":{}},\"comment\":{}}],[\"_options\",{\"_index\":3,\"name\":{\"3\":{}},\"comment\":{}}],[\"_prepareandsendrequest\",{\"_index\":17,\"name\":{\"17\":{}},\"comment\":{}}],[\"_safeurlparse\",{\"_index\":11,\"name\":{\"11\":{}},\"comment\":{}}],[\"_sendrequest\",{\"_index\":18,\"name\":{\"18\":{}},\"comment\":{}}],[\"abortedresponse\",{\"_index\":21,\"name\":{\"22\":{}},\"comment\":{}}],[\"apiclient\",{\"_index\":1,\"name\":{\"1\":{}},\"comment\":{}}],[\"apiendpoints\",{\"_index\":37,\"name\":{\"75\":{}},\"comment\":{}}],[\"basic\",{\"_index\":38,\"name\":{\"76\":{}},\"comment\":{}}],[\"binary\",{\"_index\":35,\"name\":{\"73\":{}},\"comment\":{}}],[\"body\",{\"_index\":25,\"name\":{\"28\":{},\"36\":{},\"44\":{},\"52\":{},\"60\":{},\"68\":{}},\"comment\":{}}],[\"cached\",{\"_index\":26,\"name\":{\"29\":{},\"37\":{},\"45\":{},\"53\":{},\"61\":{},\"69\":{}},\"comment\":{}}],[\"clienterrorresponse\",{\"_index\":30,\"name\":{\"54\":{}},\"comment\":{}}],[\"constructor\",{\"_index\":2,\"name\":{\"2\":{},\"23\":{},\"31\":{},\"39\":{},\"47\":{},\"55\":{},\"63\":{}},\"comment\":{}}],[\"createapiclient\",{\"_index\":0,\"name\":{\"0\":{}},\"comment\":{}}],[\"expectedresponsebodytype\",{\"_index\":32,\"name\":{\"70\":{}},\"comment\":{}}],[\"get\",{\"_index\":14,\"name\":{\"14\":{}},\"comment\":{}}],[\"headers\",{\"_index\":24,\"name\":{\"26\":{},\"34\":{},\"42\":{},\"50\":{},\"58\":{},\"66\":{}},\"comment\":{}}],[\"informationalresponse\",{\"_index\":27,\"name\":{\"30\":{}},\"comment\":{}}],[\"json\",{\"_index\":33,\"name\":{\"71\":{}},\"comment\":{}}],[\"native\",{\"_index\":42,\"name\":{\"77\":{}},\"comment\":{}}],[\"post\",{\"_index\":15,\"name\":{\"15\":{}},\"comment\":{}}],[\"react\",{\"_index\":41,\"name\":{\"77\":{}},\"comment\":{}}],[\"redirectresponse\",{\"_index\":29,\"name\":{\"46\":{}},\"comment\":{}}],[\"request\",{\"_index\":16,\"name\":{\"16\":{},\"27\":{},\"35\":{},\"43\":{},\"51\":{},\"59\":{},\"67\":{}},\"comment\":{}}],[\"responsedatatypemismatcherror\",{\"_index\":20,\"name\":{\"20\":{},\"21\":{}},\"comment\":{}}],[\"servererrorresponse\",{\"_index\":31,\"name\":{\"62\":{}},\"comment\":{}}],[\"status\",{\"_index\":22,\"name\":{\"24\":{},\"32\":{},\"40\":{},\"48\":{},\"56\":{},\"64\":{}},\"comment\":{}}],[\"statustext\",{\"_index\":23,\"name\":{\"25\":{},\"33\":{},\"41\":{},\"49\":{},\"57\":{},\"65\":{}},\"comment\":{}}],[\"stream\",{\"_index\":36,\"name\":{\"74\":{}},\"comment\":{}}],[\"successresponse\",{\"_index\":28,\"name\":{\"38\":{}},\"comment\":{}}],[\"text\",{\"_index\":34,\"name\":{\"72\":{}},\"comment\":{}}],[\"usage\",{\"_index\":39,\"name\":{\"76\":{},\"77\":{}},\"comment\":{}}],[\"with\",{\"_index\":40,\"name\":{\"77\":{}},\"comment\":{}}]],\"pipeline\":[]}}");
window.searchData = JSON.parse("{\"kinds\":{\"8\":\"Enumeration\",\"16\":\"Enumeration Member\",\"64\":\"Function\",\"128\":\"Class\",\"512\":\"Constructor\",\"1024\":\"Property\",\"2048\":\"Method\",\"4194304\":\"Type alias\",\"33554432\":\"@knodes/typedoc-plugin-pages: page\"},\"rows\":[{\"kind\":64,\"name\":\"createApiClient\",\"url\":\"functions/createApiClient.html\",\"classes\":\"tsd-kind-function\"},{\"kind\":128,\"name\":\"ApiClient\",\"url\":\"classes/ApiClient.html\",\"classes\":\"tsd-kind-class\"},{\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/ApiClient.html#constructor\",\"classes\":\"tsd-kind-constructor tsd-parent-kind-class\",\"parent\":\"ApiClient\"},{\"kind\":1024,\"name\":\"_options\",\"url\":\"classes/ApiClient.html#_options\",\"classes\":\"tsd-kind-property tsd-parent-kind-class tsd-is-private\",\"parent\":\"ApiClient\"},{\"kind\":1024,\"name\":\"_dependencies\",\"url\":\"classes/ApiClient.html#_dependencies\",\"classes\":\"tsd-kind-property tsd-parent-kind-class tsd-is-private\",\"parent\":\"ApiClient\"},{\"kind\":2048,\"name\":\"_getResponseType\",\"url\":\"classes/ApiClient.html#_getResponseType\",\"classes\":\"tsd-kind-method tsd-parent-kind-class tsd-is-private\",\"parent\":\"ApiClient\"},{\"kind\":2048,\"name\":\"_getRequestType\",\"url\":\"classes/ApiClient.html#_getRequestType\",\"classes\":\"tsd-kind-method tsd-parent-kind-class tsd-is-private\",\"parent\":\"ApiClient\"},{\"kind\":2048,\"name\":\"_getContentType\",\"url\":\"classes/ApiClient.html#_getContentType\",\"classes\":\"tsd-kind-method tsd-parent-kind-class tsd-is-private\",\"parent\":\"ApiClient\"},{\"kind\":2048,\"name\":\"_buildRequestBody\",\"url\":\"classes/ApiClient.html#_buildRequestBody\",\"classes\":\"tsd-kind-method tsd-parent-kind-class tsd-is-private\",\"parent\":\"ApiClient\"},{\"kind\":2048,\"name\":\"_buildFetchOptions\",\"url\":\"classes/ApiClient.html#_buildFetchOptions\",\"classes\":\"tsd-kind-method tsd-parent-kind-class tsd-is-private\",\"parent\":\"ApiClient\"},{\"kind\":2048,\"name\":\"_buildCacheOptions\",\"url\":\"classes/ApiClient.html#_buildCacheOptions\",\"classes\":\"tsd-kind-method tsd-parent-kind-class tsd-is-private\",\"parent\":\"ApiClient\"},{\"kind\":2048,\"name\":\"_safeUrlParse\",\"url\":\"classes/ApiClient.html#_safeUrlParse\",\"classes\":\"tsd-kind-method tsd-parent-kind-class tsd-is-private\",\"parent\":\"ApiClient\"},{\"kind\":2048,\"name\":\"_buildUrlBase\",\"url\":\"classes/ApiClient.html#_buildUrlBase\",\"classes\":\"tsd-kind-method tsd-parent-kind-class tsd-is-private\",\"parent\":\"ApiClient\"},{\"kind\":2048,\"name\":\"_buildUrl\",\"url\":\"classes/ApiClient.html#_buildUrl\",\"classes\":\"tsd-kind-method tsd-parent-kind-class tsd-is-private\",\"parent\":\"ApiClient\"},{\"kind\":2048,\"name\":\"get\",\"url\":\"classes/ApiClient.html#get\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"ApiClient\"},{\"kind\":2048,\"name\":\"post\",\"url\":\"classes/ApiClient.html#post\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"ApiClient\"},{\"kind\":2048,\"name\":\"request\",\"url\":\"classes/ApiClient.html#request\",\"classes\":\"tsd-kind-method tsd-parent-kind-class\",\"parent\":\"ApiClient\"},{\"kind\":2048,\"name\":\"_prepareAndSendRequest\",\"url\":\"classes/ApiClient.html#_prepareAndSendRequest\",\"classes\":\"tsd-kind-method tsd-parent-kind-class tsd-is-private\",\"parent\":\"ApiClient\"},{\"kind\":2048,\"name\":\"_sendRequest\",\"url\":\"classes/ApiClient.html#_sendRequest\",\"classes\":\"tsd-kind-method tsd-parent-kind-class tsd-is-private\",\"parent\":\"ApiClient\"},{\"kind\":2048,\"name\":\"_buildResponse\",\"url\":\"classes/ApiClient.html#_buildResponse\",\"classes\":\"tsd-kind-method tsd-parent-kind-class tsd-is-private\",\"parent\":\"ApiClient\"},{\"kind\":64,\"name\":\"ResponseDataTypeMismatchError\",\"url\":\"functions/ResponseDataTypeMismatchError-1.html\",\"classes\":\"tsd-kind-function\"},{\"kind\":4194304,\"name\":\"ResponseDataTypeMismatchError\",\"url\":\"types/ResponseDataTypeMismatchError.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":128,\"name\":\"AbortedResponse\",\"url\":\"classes/AbortedResponse.html\",\"classes\":\"tsd-kind-class\"},{\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/AbortedResponse.html#constructor\",\"classes\":\"tsd-kind-constructor tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"AbortedResponse\"},{\"kind\":1024,\"name\":\"status\",\"url\":\"classes/AbortedResponse.html#status\",\"classes\":\"tsd-kind-property tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"AbortedResponse\"},{\"kind\":1024,\"name\":\"statusText\",\"url\":\"classes/AbortedResponse.html#statusText\",\"classes\":\"tsd-kind-property tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"AbortedResponse\"},{\"kind\":1024,\"name\":\"headers\",\"url\":\"classes/AbortedResponse.html#headers\",\"classes\":\"tsd-kind-property tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"AbortedResponse\"},{\"kind\":1024,\"name\":\"request\",\"url\":\"classes/AbortedResponse.html#request\",\"classes\":\"tsd-kind-property tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"AbortedResponse\"},{\"kind\":1024,\"name\":\"body\",\"url\":\"classes/AbortedResponse.html#body\",\"classes\":\"tsd-kind-property tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"AbortedResponse\"},{\"kind\":1024,\"name\":\"cached\",\"url\":\"classes/AbortedResponse.html#cached\",\"classes\":\"tsd-kind-property tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"AbortedResponse\"},{\"kind\":128,\"name\":\"InformationalResponse\",\"url\":\"classes/InformationalResponse.html\",\"classes\":\"tsd-kind-class\"},{\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/InformationalResponse.html#constructor\",\"classes\":\"tsd-kind-constructor tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"InformationalResponse\"},{\"kind\":1024,\"name\":\"status\",\"url\":\"classes/InformationalResponse.html#status\",\"classes\":\"tsd-kind-property tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"InformationalResponse\"},{\"kind\":1024,\"name\":\"statusText\",\"url\":\"classes/InformationalResponse.html#statusText\",\"classes\":\"tsd-kind-property tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"InformationalResponse\"},{\"kind\":1024,\"name\":\"headers\",\"url\":\"classes/InformationalResponse.html#headers\",\"classes\":\"tsd-kind-property tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"InformationalResponse\"},{\"kind\":1024,\"name\":\"request\",\"url\":\"classes/InformationalResponse.html#request\",\"classes\":\"tsd-kind-property tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"InformationalResponse\"},{\"kind\":1024,\"name\":\"body\",\"url\":\"classes/InformationalResponse.html#body\",\"classes\":\"tsd-kind-property tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"InformationalResponse\"},{\"kind\":1024,\"name\":\"cached\",\"url\":\"classes/InformationalResponse.html#cached\",\"classes\":\"tsd-kind-property tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"InformationalResponse\"},{\"kind\":128,\"name\":\"SuccessResponse\",\"url\":\"classes/SuccessResponse.html\",\"classes\":\"tsd-kind-class\"},{\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/SuccessResponse.html#constructor\",\"classes\":\"tsd-kind-constructor tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"SuccessResponse\"},{\"kind\":1024,\"name\":\"status\",\"url\":\"classes/SuccessResponse.html#status\",\"classes\":\"tsd-kind-property tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"SuccessResponse\"},{\"kind\":1024,\"name\":\"statusText\",\"url\":\"classes/SuccessResponse.html#statusText\",\"classes\":\"tsd-kind-property tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"SuccessResponse\"},{\"kind\":1024,\"name\":\"headers\",\"url\":\"classes/SuccessResponse.html#headers\",\"classes\":\"tsd-kind-property tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"SuccessResponse\"},{\"kind\":1024,\"name\":\"request\",\"url\":\"classes/SuccessResponse.html#request\",\"classes\":\"tsd-kind-property tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"SuccessResponse\"},{\"kind\":1024,\"name\":\"body\",\"url\":\"classes/SuccessResponse.html#body\",\"classes\":\"tsd-kind-property tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"SuccessResponse\"},{\"kind\":1024,\"name\":\"cached\",\"url\":\"classes/SuccessResponse.html#cached\",\"classes\":\"tsd-kind-property tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"SuccessResponse\"},{\"kind\":128,\"name\":\"RedirectResponse\",\"url\":\"classes/RedirectResponse.html\",\"classes\":\"tsd-kind-class\"},{\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/RedirectResponse.html#constructor\",\"classes\":\"tsd-kind-constructor tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"RedirectResponse\"},{\"kind\":1024,\"name\":\"status\",\"url\":\"classes/RedirectResponse.html#status\",\"classes\":\"tsd-kind-property tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"RedirectResponse\"},{\"kind\":1024,\"name\":\"statusText\",\"url\":\"classes/RedirectResponse.html#statusText\",\"classes\":\"tsd-kind-property tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"RedirectResponse\"},{\"kind\":1024,\"name\":\"headers\",\"url\":\"classes/RedirectResponse.html#headers\",\"classes\":\"tsd-kind-property tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"RedirectResponse\"},{\"kind\":1024,\"name\":\"request\",\"url\":\"classes/RedirectResponse.html#request\",\"classes\":\"tsd-kind-property tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"RedirectResponse\"},{\"kind\":1024,\"name\":\"body\",\"url\":\"classes/RedirectResponse.html#body\",\"classes\":\"tsd-kind-property tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"RedirectResponse\"},{\"kind\":1024,\"name\":\"cached\",\"url\":\"classes/RedirectResponse.html#cached\",\"classes\":\"tsd-kind-property tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"RedirectResponse\"},{\"kind\":128,\"name\":\"ClientErrorResponse\",\"url\":\"classes/ClientErrorResponse.html\",\"classes\":\"tsd-kind-class\"},{\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/ClientErrorResponse.html#constructor\",\"classes\":\"tsd-kind-constructor tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"ClientErrorResponse\"},{\"kind\":1024,\"name\":\"status\",\"url\":\"classes/ClientErrorResponse.html#status\",\"classes\":\"tsd-kind-property tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"ClientErrorResponse\"},{\"kind\":1024,\"name\":\"statusText\",\"url\":\"classes/ClientErrorResponse.html#statusText\",\"classes\":\"tsd-kind-property tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"ClientErrorResponse\"},{\"kind\":1024,\"name\":\"headers\",\"url\":\"classes/ClientErrorResponse.html#headers\",\"classes\":\"tsd-kind-property tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"ClientErrorResponse\"},{\"kind\":1024,\"name\":\"request\",\"url\":\"classes/ClientErrorResponse.html#request\",\"classes\":\"tsd-kind-property tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"ClientErrorResponse\"},{\"kind\":1024,\"name\":\"body\",\"url\":\"classes/ClientErrorResponse.html#body\",\"classes\":\"tsd-kind-property tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"ClientErrorResponse\"},{\"kind\":1024,\"name\":\"cached\",\"url\":\"classes/ClientErrorResponse.html#cached\",\"classes\":\"tsd-kind-property tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"ClientErrorResponse\"},{\"kind\":128,\"name\":\"ServerErrorResponse\",\"url\":\"classes/ServerErrorResponse.html\",\"classes\":\"tsd-kind-class\"},{\"kind\":512,\"name\":\"constructor\",\"url\":\"classes/ServerErrorResponse.html#constructor\",\"classes\":\"tsd-kind-constructor tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"ServerErrorResponse\"},{\"kind\":1024,\"name\":\"status\",\"url\":\"classes/ServerErrorResponse.html#status\",\"classes\":\"tsd-kind-property tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"ServerErrorResponse\"},{\"kind\":1024,\"name\":\"statusText\",\"url\":\"classes/ServerErrorResponse.html#statusText\",\"classes\":\"tsd-kind-property tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"ServerErrorResponse\"},{\"kind\":1024,\"name\":\"headers\",\"url\":\"classes/ServerErrorResponse.html#headers\",\"classes\":\"tsd-kind-property tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"ServerErrorResponse\"},{\"kind\":1024,\"name\":\"request\",\"url\":\"classes/ServerErrorResponse.html#request\",\"classes\":\"tsd-kind-property tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"ServerErrorResponse\"},{\"kind\":1024,\"name\":\"body\",\"url\":\"classes/ServerErrorResponse.html#body\",\"classes\":\"tsd-kind-property tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"ServerErrorResponse\"},{\"kind\":1024,\"name\":\"cached\",\"url\":\"classes/ServerErrorResponse.html#cached\",\"classes\":\"tsd-kind-property tsd-parent-kind-class tsd-is-inherited\",\"parent\":\"ServerErrorResponse\"},{\"kind\":8,\"name\":\"ExpectedResponseBodyType\",\"url\":\"enums/ExpectedResponseBodyType.html\",\"classes\":\"tsd-kind-enum\"},{\"kind\":16,\"name\":\"json\",\"url\":\"enums/ExpectedResponseBodyType.html#json\",\"classes\":\"tsd-kind-enum-member tsd-parent-kind-enum\",\"parent\":\"ExpectedResponseBodyType\"},{\"kind\":16,\"name\":\"text\",\"url\":\"enums/ExpectedResponseBodyType.html#text\",\"classes\":\"tsd-kind-enum-member tsd-parent-kind-enum\",\"parent\":\"ExpectedResponseBodyType\"},{\"kind\":16,\"name\":\"binary\",\"url\":\"enums/ExpectedResponseBodyType.html#binary\",\"classes\":\"tsd-kind-enum-member tsd-parent-kind-enum\",\"parent\":\"ExpectedResponseBodyType\"},{\"kind\":16,\"name\":\"stream\",\"url\":\"enums/ExpectedResponseBodyType.html#stream\",\"classes\":\"tsd-kind-enum-member tsd-parent-kind-enum\",\"parent\":\"ExpectedResponseBodyType\"},{\"kind\":4194304,\"name\":\"ApiEndpoints\",\"url\":\"types/ApiEndpoints.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":4194304,\"name\":\"ValidateApiEndpoints\",\"url\":\"types/ValidateApiEndpoints.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":33554432,\"name\":\"Basic usage\",\"url\":\"pages/tutorials/Basic usage.html\",\"classes\":\"pages-entry pages-entry-page\"},{\"kind\":33554432,\"name\":\"Usage with React Native\",\"url\":\"pages/tutorials/Usage with React Native.html\",\"classes\":\"pages-entry pages-entry-page\"}],\"index\":{\"version\":\"2.3.9\",\"fields\":[\"name\",\"comment\"],\"fieldVectors\":[[\"name/0\",[0,40.565]],[\"comment/0\",[]],[\"name/1\",[1,40.565]],[\"comment/1\",[]],[\"name/2\",[2,24.147]],[\"comment/2\",[]],[\"name/3\",[3,40.565]],[\"comment/3\",[]],[\"name/4\",[4,40.565]],[\"comment/4\",[]],[\"name/5\",[5,40.565]],[\"comment/5\",[]],[\"name/6\",[6,40.565]],[\"comment/6\",[]],[\"name/7\",[7,40.565]],[\"comment/7\",[]],[\"name/8\",[8,40.565]],[\"comment/8\",[]],[\"name/9\",[9,40.565]],[\"comment/9\",[]],[\"name/10\",[10,40.565]],[\"comment/10\",[]],[\"name/11\",[11,40.565]],[\"comment/11\",[]],[\"name/12\",[12,40.565]],[\"comment/12\",[]],[\"name/13\",[13,40.565]],[\"comment/13\",[]],[\"name/14\",[14,40.565]],[\"comment/14\",[]],[\"name/15\",[15,40.565]],[\"comment/15\",[]],[\"name/16\",[16,24.147]],[\"comment/16\",[]],[\"name/17\",[17,40.565]],[\"comment/17\",[]],[\"name/18\",[18,40.565]],[\"comment/18\",[]],[\"name/19\",[19,40.565]],[\"comment/19\",[]],[\"name/20\",[20,35.354]],[\"comment/20\",[]],[\"name/21\",[20,35.354]],[\"comment/21\",[]],[\"name/22\",[21,40.565]],[\"comment/22\",[]],[\"name/23\",[2,24.147]],[\"comment/23\",[]],[\"name/24\",[22,25.607]],[\"comment/24\",[]],[\"name/25\",[23,25.607]],[\"comment/25\",[]],[\"name/26\",[24,25.607]],[\"comment/26\",[]],[\"name/27\",[16,24.147]],[\"comment/27\",[]],[\"name/28\",[25,25.607]],[\"comment/28\",[]],[\"name/29\",[26,25.607]],[\"comment/29\",[]],[\"name/30\",[27,40.565]],[\"comment/30\",[]],[\"name/31\",[2,24.147]],[\"comment/31\",[]],[\"name/32\",[22,25.607]],[\"comment/32\",[]],[\"name/33\",[23,25.607]],[\"comment/33\",[]],[\"name/34\",[24,25.607]],[\"comment/34\",[]],[\"name/35\",[16,24.147]],[\"comment/35\",[]],[\"name/36\",[25,25.607]],[\"comment/36\",[]],[\"name/37\",[26,25.607]],[\"comment/37\",[]],[\"name/38\",[28,40.565]],[\"comment/38\",[]],[\"name/39\",[2,24.147]],[\"comment/39\",[]],[\"name/40\",[22,25.607]],[\"comment/40\",[]],[\"name/41\",[23,25.607]],[\"comment/41\",[]],[\"name/42\",[24,25.607]],[\"comment/42\",[]],[\"name/43\",[16,24.147]],[\"comment/43\",[]],[\"name/44\",[25,25.607]],[\"comment/44\",[]],[\"name/45\",[26,25.607]],[\"comment/45\",[]],[\"name/46\",[29,40.565]],[\"comment/46\",[]],[\"name/47\",[2,24.147]],[\"comment/47\",[]],[\"name/48\",[22,25.607]],[\"comment/48\",[]],[\"name/49\",[23,25.607]],[\"comment/49\",[]],[\"name/50\",[24,25.607]],[\"comment/50\",[]],[\"name/51\",[16,24.147]],[\"comment/51\",[]],[\"name/52\",[25,25.607]],[\"comment/52\",[]],[\"name/53\",[26,25.607]],[\"comment/53\",[]],[\"name/54\",[30,40.565]],[\"comment/54\",[]],[\"name/55\",[2,24.147]],[\"comment/55\",[]],[\"name/56\",[22,25.607]],[\"comment/56\",[]],[\"name/57\",[23,25.607]],[\"comment/57\",[]],[\"name/58\",[24,25.607]],[\"comment/58\",[]],[\"name/59\",[16,24.147]],[\"comment/59\",[]],[\"name/60\",[25,25.607]],[\"comment/60\",[]],[\"name/61\",[26,25.607]],[\"comment/61\",[]],[\"name/62\",[31,40.565]],[\"comment/62\",[]],[\"name/63\",[2,24.147]],[\"comment/63\",[]],[\"name/64\",[22,25.607]],[\"comment/64\",[]],[\"name/65\",[23,25.607]],[\"comment/65\",[]],[\"name/66\",[24,25.607]],[\"comment/66\",[]],[\"name/67\",[16,24.147]],[\"comment/67\",[]],[\"name/68\",[25,25.607]],[\"comment/68\",[]],[\"name/69\",[26,25.607]],[\"comment/69\",[]],[\"name/70\",[32,40.565]],[\"comment/70\",[]],[\"name/71\",[33,40.565]],[\"comment/71\",[]],[\"name/72\",[34,40.565]],[\"comment/72\",[]],[\"name/73\",[35,40.565]],[\"comment/73\",[]],[\"name/74\",[36,40.565]],[\"comment/74\",[]],[\"name/75\",[37,40.565]],[\"comment/75\",[]],[\"name/76\",[38,40.565]],[\"comment/76\",[]],[\"name/77\",[39,29.033,40,25.304]],[\"comment/77\",[]],[\"name/78\",[40,16.132,41,18.509,42,18.509,43,18.509]],[\"comment/78\",[]]],\"invertedIndex\":[[\"_buildcacheoptions\",{\"_index\":10,\"name\":{\"10\":{}},\"comment\":{}}],[\"_buildfetchoptions\",{\"_index\":9,\"name\":{\"9\":{}},\"comment\":{}}],[\"_buildrequestbody\",{\"_index\":8,\"name\":{\"8\":{}},\"comment\":{}}],[\"_buildresponse\",{\"_index\":19,\"name\":{\"19\":{}},\"comment\":{}}],[\"_buildurl\",{\"_index\":13,\"name\":{\"13\":{}},\"comment\":{}}],[\"_buildurlbase\",{\"_index\":12,\"name\":{\"12\":{}},\"comment\":{}}],[\"_dependencies\",{\"_index\":4,\"name\":{\"4\":{}},\"comment\":{}}],[\"_getcontenttype\",{\"_index\":7,\"name\":{\"7\":{}},\"comment\":{}}],[\"_getrequesttype\",{\"_index\":6,\"name\":{\"6\":{}},\"comment\":{}}],[\"_getresponsetype\",{\"_index\":5,\"name\":{\"5\":{}},\"comment\":{}}],[\"_options\",{\"_index\":3,\"name\":{\"3\":{}},\"comment\":{}}],[\"_prepareandsendrequest\",{\"_index\":17,\"name\":{\"17\":{}},\"comment\":{}}],[\"_safeurlparse\",{\"_index\":11,\"name\":{\"11\":{}},\"comment\":{}}],[\"_sendrequest\",{\"_index\":18,\"name\":{\"18\":{}},\"comment\":{}}],[\"abortedresponse\",{\"_index\":21,\"name\":{\"22\":{}},\"comment\":{}}],[\"apiclient\",{\"_index\":1,\"name\":{\"1\":{}},\"comment\":{}}],[\"apiendpoints\",{\"_index\":37,\"name\":{\"75\":{}},\"comment\":{}}],[\"basic\",{\"_index\":39,\"name\":{\"77\":{}},\"comment\":{}}],[\"binary\",{\"_index\":35,\"name\":{\"73\":{}},\"comment\":{}}],[\"body\",{\"_index\":25,\"name\":{\"28\":{},\"36\":{},\"44\":{},\"52\":{},\"60\":{},\"68\":{}},\"comment\":{}}],[\"cached\",{\"_index\":26,\"name\":{\"29\":{},\"37\":{},\"45\":{},\"53\":{},\"61\":{},\"69\":{}},\"comment\":{}}],[\"clienterrorresponse\",{\"_index\":30,\"name\":{\"54\":{}},\"comment\":{}}],[\"constructor\",{\"_index\":2,\"name\":{\"2\":{},\"23\":{},\"31\":{},\"39\":{},\"47\":{},\"55\":{},\"63\":{}},\"comment\":{}}],[\"createapiclient\",{\"_index\":0,\"name\":{\"0\":{}},\"comment\":{}}],[\"expectedresponsebodytype\",{\"_index\":32,\"name\":{\"70\":{}},\"comment\":{}}],[\"get\",{\"_index\":14,\"name\":{\"14\":{}},\"comment\":{}}],[\"headers\",{\"_index\":24,\"name\":{\"26\":{},\"34\":{},\"42\":{},\"50\":{},\"58\":{},\"66\":{}},\"comment\":{}}],[\"informationalresponse\",{\"_index\":27,\"name\":{\"30\":{}},\"comment\":{}}],[\"json\",{\"_index\":33,\"name\":{\"71\":{}},\"comment\":{}}],[\"native\",{\"_index\":43,\"name\":{\"78\":{}},\"comment\":{}}],[\"post\",{\"_index\":15,\"name\":{\"15\":{}},\"comment\":{}}],[\"react\",{\"_index\":42,\"name\":{\"78\":{}},\"comment\":{}}],[\"redirectresponse\",{\"_index\":29,\"name\":{\"46\":{}},\"comment\":{}}],[\"request\",{\"_index\":16,\"name\":{\"16\":{},\"27\":{},\"35\":{},\"43\":{},\"51\":{},\"59\":{},\"67\":{}},\"comment\":{}}],[\"responsedatatypemismatcherror\",{\"_index\":20,\"name\":{\"20\":{},\"21\":{}},\"comment\":{}}],[\"servererrorresponse\",{\"_index\":31,\"name\":{\"62\":{}},\"comment\":{}}],[\"status\",{\"_index\":22,\"name\":{\"24\":{},\"32\":{},\"40\":{},\"48\":{},\"56\":{},\"64\":{}},\"comment\":{}}],[\"statustext\",{\"_index\":23,\"name\":{\"25\":{},\"33\":{},\"41\":{},\"49\":{},\"57\":{},\"65\":{}},\"comment\":{}}],[\"stream\",{\"_index\":36,\"name\":{\"74\":{}},\"comment\":{}}],[\"successresponse\",{\"_index\":28,\"name\":{\"38\":{}},\"comment\":{}}],[\"text\",{\"_index\":34,\"name\":{\"72\":{}},\"comment\":{}}],[\"usage\",{\"_index\":40,\"name\":{\"77\":{},\"78\":{}},\"comment\":{}}],[\"validateapiendpoints\",{\"_index\":38,\"name\":{\"76\":{}},\"comment\":{}}],[\"with\",{\"_index\":41,\"name\":{\"78\":{}},\"comment\":{}}]],\"pipeline\":[]}}");
import type { ApiResponse } from "./response/response.js";
import type { AbortablePromise, ApiClientConfig, ApiEndpoints, GenericHeaders, Options, RequestData, RequestOptions, BodyType, BodyTypeType, HeadersType, ParamsType, QueryType } from "./types";
import type { AbortablePromise, ApiEndpoints, Dependencies, GenericHeaders, Options, RequestData, RequestOptions, BodyType, BodyTypeType, HeadersType, ParamsType, QueryType, ValidateApiEndpoints } from "./types";
import { ExpectedResponseBodyType } from "./const.js";
import { ResponseDataTypeMismatchError } from "./errors.js";
interface Dependencies {
fetch: typeof fetch;
URL: typeof URL;
qsStringify: (data: unknown) => string;
}
declare class ApiClient<T extends ExpectedResponseBodyType, RL extends ApiEndpoints> {

@@ -30,6 +25,6 @@ private readonly _options;

}
declare const createApiClient: <RSP extends ApiEndpoints, T extends ExpectedResponseBodyType = ExpectedResponseBodyType.json>(options: Options<T, GenericHeaders>, dependencies?: ApiClientConfig) => ApiClient<T, RSP>;
declare const createApiClient: <RSP extends ApiEndpoints, T extends ExpectedResponseBodyType = ExpectedResponseBodyType.json>(options: Options<T, GenericHeaders>, dependencies?: Dependencies) => ApiClient<T, RSP>;
export { createApiClient, ResponseDataTypeMismatchError, };
export { AbortedResponse, InformationalResponse, SuccessResponse, RedirectResponse, ClientErrorResponse, ServerErrorResponse, } from "./response/response.js";
export type { ApiClient, ExpectedResponseBodyType, ApiEndpoints, };
export type { ApiClient, ExpectedResponseBodyType, ApiEndpoints, ValidateApiEndpoints, };
//# sourceMappingURL=index.d.ts.map

@@ -47,2 +47,3 @@ import urlJoin from "url-join";

qsStringify: qs.stringify,
AbortController: AbortController,
...dependencies,

@@ -242,3 +243,3 @@ };

let timedoutLocal = false;
currentController = new AbortController();
currentController = new this._dependencies.AbortController();
const singleTimeout = new Timeout(() => {

@@ -406,3 +407,3 @@ timedoutLocal = true;

const createApiClient = (options, dependencies) => {
return new ApiClient(options);
return new ApiClient(options, dependencies);
};

@@ -409,0 +410,0 @@ export { createApiClient, ResponseDataTypeMismatchError, };

@@ -12,3 +12,3 @@ import type { RequestBodyType } from "../const";

};
type GenericJSONResponse = RecordLike<unknown>;
type GenericJSONResponse = RecordLike<unknown> | JSONFriendly[];
type GenericParams = RecordLike<BasicJSONTypes> | undefined;

@@ -18,3 +18,3 @@ type GenericBody = RecordLike<unknown> | string | undefined;

type GenericHeaders = RecordLike<string> | undefined;
type ApiEndpoints = Record<string, Record<string, {
type ApiEndpoints = RecordLike<RecordLike<{
response: GenericJSONResponse;

@@ -27,3 +27,4 @@ params?: GenericParams;

}>>;
export type { BasicJSONTypes, JSONFriendly, ApiEndpoints, AbortablePromise, GenericJSONResponse, GenericParams, GenericBody, GenericQuery, GenericHeaders, };
type ValidateApiEndpoints<T extends ApiEndpoints> = T;
export type { BasicJSONTypes, JSONFriendly, ApiEndpoints, ValidateApiEndpoints, AbortablePromise, GenericJSONResponse, GenericParams, GenericBody, GenericQuery, GenericHeaders, };
//# sourceMappingURL=common.d.ts.map

@@ -62,8 +62,9 @@ import type { RequestRedirect as NodeFetchRequestRedirect } from "node-fetch";

};
interface ApiClientConfig {
interface Dependencies {
fetch: typeof fetch;
URL: typeof URL;
AbortController: typeof AbortController;
qsStringify: (data: unknown) => string;
}
export type { Options, CacheOptions, RequestOptions, FinalOptions, ApiClientConfig, };
export type { Options, CacheOptions, RequestOptions, FinalOptions, Dependencies, };
//# sourceMappingURL=options.d.ts.map
{
"name": "api-reach",
"version": "0.14.0-beta.2",
"version": "0.14.0-beta.3",
"repository": "git@github.com:dzek69/api-reach.git",

@@ -5,0 +5,0 @@ "author": "Jacek Nowacki @dzek69 <git-public@dzek.eu>",

@@ -11,6 +11,6 @@ /* eslint-disable max-lines */

AbortablePromise,
ApiClientConfig,
ApiEndpoints,
CachedData,
CacheOptions,
Dependencies,
FinalOptions,

@@ -29,2 +29,3 @@ GenericBody,

QueryType,
ValidateApiEndpoints,
} from "./types";

@@ -65,8 +66,2 @@

interface Dependencies {
fetch: typeof fetch;
URL: typeof URL;
qsStringify: (data: unknown) => string;
}
class ApiClient<T extends ExpectedResponseBodyType, RL extends ApiEndpoints> {

@@ -80,5 +75,7 @@ private readonly _options: Options<T, GenericHeaders>;

this._dependencies = {
// TODO this will crash on envs without these, fix by creating a function that "fills missing"
fetch: fetch,
URL: URL,
qsStringify: qs.stringify,
AbortController: AbortController,
...dependencies,

@@ -478,3 +475,3 @@ };

let timedoutLocal = false;
currentController = new AbortController();
currentController = new this._dependencies.AbortController();
// eslint-disable-next-line @typescript-eslint/no-loop-func

@@ -723,4 +720,4 @@ const singleTimeout = new Timeout(() => {

RSP extends ApiEndpoints, T extends ExpectedResponseBodyType = ExpectedResponseBodyType.json,
>(options: Options<T, GenericHeaders>, dependencies?: ApiClientConfig) => {
return new ApiClient<T, RSP>(options);
>(options: Options<T, GenericHeaders>, dependencies?: Dependencies) => {
return new ApiClient<T, RSP>(options, dependencies);
};

@@ -746,2 +743,3 @@

ApiEndpoints,
ValidateApiEndpoints,
};

@@ -14,3 +14,3 @@ import type { RequestBodyType } from "../const";

type GenericJSONResponse = RecordLike<unknown>;
type GenericJSONResponse = RecordLike<unknown> | JSONFriendly[];
type GenericParams = RecordLike<BasicJSONTypes> | undefined;

@@ -24,3 +24,3 @@ type GenericBody = RecordLike<unknown> | string | undefined;

*/
type ApiEndpoints = Record<string, Record<string, {
type ApiEndpoints = RecordLike<RecordLike<{
/**

@@ -49,2 +49,4 @@ * Expected response type (not validated, just assumed)

type ValidateApiEndpoints<T extends ApiEndpoints> = T;
export type {

@@ -54,2 +56,3 @@ BasicJSONTypes,

ApiEndpoints,
ValidateApiEndpoints,
AbortablePromise,

@@ -56,0 +59,0 @@

@@ -97,6 +97,7 @@ import type { RequestRedirect as NodeFetchRequestRedirect } from "node-fetch";

interface ApiClientConfig {
interface Dependencies {
fetch: typeof fetch;
URL: typeof URL;
AbortController: typeof AbortController;
qsStringify: (data: unknown) => string;
}

@@ -109,3 +110,3 @@

FinalOptions,
ApiClientConfig,
Dependencies,
};

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc