@dasch-swiss/dsp-js
Version:
TypeScript client library for DSP-API
31 lines • 1.1 kB
TypeScript
/**
* Configuration to instantiate a `KnoraApiConnection`.
*
* @category Config
*/
export declare class KnoraApiConfig {
apiProtocol: 'http' | 'https';
apiHost: string;
apiPort: number | null;
apiPath: string;
jsonWebToken: string;
logErrors: boolean;
static readonly PROTOCOL_HTTP = "http";
static readonly PROTOCOL_HTTPS = "https";
static readonly DEFAULT_PORT_HTTP = 80;
static readonly DEFAULT_PORT_HTTPS = 443;
/**
* The full API URL
*/
get apiUrl(): string;
/**
* @param apiProtocol the protocol of the API (http or https)
* @param apiHost the DSP-API base URL
* @param apiPort the port of DSP-API
* @param apiPath the base path following host and port, if any.
* @param jsonWebToken token to identify the user
* @param logErrors determines whether errors should be logged to the console
*/
constructor(apiProtocol: 'http' | 'https', apiHost: string, apiPort?: number | null, apiPath?: string, jsonWebToken?: string, logErrors?: boolean);
}
//# sourceMappingURL=knora-api-config.d.ts.map