/**
*
* # Introduction The Rest API is the webservices that allow you to automatically manage the wallets and operations. Many DIRECTKIT functionalities are also available manually using the BACKOFFICE # Authentication This service strictly follow the chapter 4.4.2 "Access Token request" of the RFC 6749 "the Oauth2 2.0 Authorization Framework". This Api is consume by the client api, a restrict control on IP is applied.
The unique method exposed by this api allow customers to ask for a unique bearer access token. A bearer allow the customer to consume their api Rest without the need of sending their plain text login and password.
This method has these scenario:
- In case the bearer do not exist, the method create a new bearer.
- In case the bearer already exist, it return the actual bearer with the remaining time left.
- In case the bearer lifetime is over, this method create a new bearer and delete the previous one.
*
* The version of the OpenAPI document: 1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export declare const BASE_PATH: string;
export interface ConfigurationParameters {
basePath?: string;
fetchApi?: FetchAPI;
middleware?: Middleware[];
queryParamsStringify?: (params: HTTPQuery) => string;
username?: string;
password?: string;
apiKey?: string | ((name: string) => string);
accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string | Promise);
headers?: HTTPHeaders;
credentials?: RequestCredentials;
}
export declare class Configuration {
private configuration;
constructor(configuration?: ConfigurationParameters);
set config(configuration: Configuration);
get basePath(): string;
get fetchApi(): FetchAPI | undefined;
get middleware(): Middleware[];
get queryParamsStringify(): (params: HTTPQuery) => string;
get username(): string | undefined;
get password(): string | undefined;
get apiKey(): ((name: string) => string) | undefined;
get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined;
get headers(): HTTPHeaders | undefined;
get credentials(): RequestCredentials | undefined;
}
export declare const DefaultConfig: Configuration;
/**
* This is the base class for all generated API classes.
*/
export declare class BaseAPI {
protected configuration: Configuration;
private middleware;
constructor(configuration?: Configuration);
withMiddleware(this: T, ...middlewares: Middleware[]): T;
withPreMiddleware(this: T, ...preMiddlewares: Array): T;
withPostMiddleware(this: T, ...postMiddlewares: Array): T;
protected request(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction): Promise;
private createFetchParams;
private fetchApi;
/**
* Create a shallow clone of `this` by constructing a new instance
* and then shallow cloning data members.
*/
private clone;
}
export declare class ResponseError extends Error {
response: Response;
name: "ResponseError";
constructor(response: Response, msg?: string);
}
export declare class FetchError extends Error {
cause: unknown;
name: "FetchError";
constructor(cause: unknown, msg?: string);
}
export declare class RequiredError extends Error {
field: string;
name: "RequiredError";
constructor(field: string, msg?: string);
}
export declare const COLLECTION_FORMATS: {
csv: string;
ssv: string;
tsv: string;
pipes: string;
};
export declare type FetchAPI = WindowOrWorkerGlobalScope['fetch'];
export declare type Json = any;
export declare type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD';
export declare type HTTPHeaders = {
[key: string]: string;
};
export declare type HTTPQuery = {
[key: string]: string | number | null | boolean | Array | Set | HTTPQuery;
};
export declare type HTTPBody = Json | FormData | URLSearchParams;
export declare type HTTPRequestInit = {
headers?: HTTPHeaders;
method: HTTPMethod;
credentials?: RequestCredentials;
body?: HTTPBody;
};
export declare type ModelPropertyNaming = 'camelCase' | 'snake_case' | 'PascalCase' | 'original';
export declare type InitOverrideFunction = (requestContext: {
init: HTTPRequestInit;
context: RequestOpts;
}) => Promise;
export interface FetchParams {
url: string;
init: RequestInit;
}
export interface RequestOpts {
path: string;
method: HTTPMethod;
headers: HTTPHeaders;
query?: HTTPQuery;
body?: HTTPBody;
}
export declare function exists(json: any, key: string): boolean;
export declare function querystring(params: HTTPQuery, prefix?: string): string;
export declare function mapValues(data: any, fn: (item: any) => any): {};
export declare function canConsumeForm(consumes: Consume[]): boolean;
export interface Consume {
contentType: string;
}
export interface RequestContext {
fetch: FetchAPI;
url: string;
init: RequestInit;
}
export interface ResponseContext {
fetch: FetchAPI;
url: string;
init: RequestInit;
response: Response;
}
export interface ErrorContext {
fetch: FetchAPI;
url: string;
init: RequestInit;
error: unknown;
response?: Response;
}
export interface Middleware {
pre?(context: RequestContext): Promise;
post?(context: ResponseContext): Promise;
onError?(context: ErrorContext): Promise;
}
export interface ApiResponse {
raw: Response;
value(): Promise;
}
export interface ResponseTransformer {
(json: any): T;
}
export declare class JSONApiResponse {
raw: Response;
private transformer;
constructor(raw: Response, transformer?: ResponseTransformer);
value(): Promise;
}
export declare class VoidApiResponse {
raw: Response;
constructor(raw: Response);
value(): Promise;
}
export declare class BlobApiResponse {
raw: Response;
constructor(raw: Response);
value(): Promise;
}
export declare class TextApiResponse {
raw: Response;
constructor(raw: Response);
value(): Promise;
}