import { Environment } from './environment' /** * Configuration of SDK * @export * @class WebApiConfiguration */ export class WebApiConfiguration { /** * WebApi key to use */ webApiKey: string; /** * Language to use. Defaults to 'cs-CZ' */ language: string = 'cs-CZ'; /** * Signing key for request signing. It is not set by default. */ signingKey: string = null; /** * Environment to use. Default is Sandbox environment */ environment: Environment = Environment.Sandbox; /** * Oath2 configuration. It is not set by default. */ oauth2: Oauth2Config = null; /** * Copies the configuration. * @returns {WebApiConfiguration} * * @memberOf WebApiConfiguration */ copy(): WebApiConfiguration { var newConfig = new WebApiConfiguration(); newConfig.webApiKey = this.webApiKey; newConfig.language = this.language; newConfig.signingKey = this.signingKey; newConfig.environment = this.environment; newConfig.oauth2 = this.oauth2; return newConfig; } } /** * Configuration of oAuth2 * @export * @interface Oauth2Config */ export interface Oauth2Config { /** * ID of the client */ clientId: string; /** * secret of the client */ clientSecret?: string; /** * URI where client will be redirected upon logging in */ redirectUri?: string; }