@adobe/pdfservices-node-sdk
Version:
The Adobe PDF Services Node.js SDK provides APIs for creating, combining, exporting and manipulating PDFs.
75 lines (74 loc) • 2.7 kB
TypeScript
import { ProxyServerConfig } from "./proxy/ProxyServerConfig";
import { Region } from "../Region";
/**
* Encapsulates the API request configurations.
*/
export declare class ClientConfig {
private static readonly PDF_SERVICES;
private static readonly PDF_SERVICES_URI;
private static readonly TIMEOUT_KEY;
private static readonly PROXY_HOST;
private static readonly PROXY_SERVER_CONFIG;
private static readonly PROXY_PORT;
private static readonly PROXY_SCHEME;
private static readonly REGION;
private static readonly PROXY_CREDENTIALS;
private static readonly PROXY_USERNAME;
private static readonly PROXY_PASSWORD;
private _timeout;
private _pdfServicesUri;
private _proxyServerConfig?;
/**
* Constructs a new `ClientConfig` instance.
*
* @param params - The parameters for constructing a new `ClientConfig` instance.
* @param [params.timeout] - The timeout for the API request. Default value is 10000 milliseconds.
* @param [params.region] - A {@link Region} instance. Default value is {@link Region#US US}.
* @param [params.proxyServerConfig] - A {@link ProxyServerConfig} instance for providing proxy server
* configuration.
* @param [params.filePath] - The path to the file containing the client configuration.
* <p>
* JSON structure:
* <pre>
* {
* "timeout": "15000",
* "proxyServerConfig": {
* "host": "127.0.0.1",
* "port": "8080",
* "scheme": "https",
* "usernamePasswordCredentials": {
* "username": "username",
* "password": "password"
* }
* },
* "region": "EU"
* }
* </pre>
* @remarks
* This documentation indicates that users can specify client configurations such as timeout, region, and proxy
* settings either directly as parameters or via a configuration file provided using the filePath property.
* If a configuration is specified in both ways, the settings from the file (specified by filePath) will take
* precedence.
*/
constructor(params: {
timeout?: number;
region?: Region;
proxyServerConfig?: ProxyServerConfig;
filePath?: string;
});
/**
* Returns the timeout for the API request.
*/
get timeout(): number;
/**
* Returns the PDF Services URI.
* @internal Used internally by this SDK, not intended to be called by clients.
*/
get pdfServicesUri(): string;
/**
* Returns the proxy server configuration.
*/
get proxyServerConfig(): ProxyServerConfig | undefined;
private fromFile;
private createProxyServerConfig;
}