UNPKG

2.34 kBTypeScriptView Raw
1import { AuthenticationType, Destination, DestinationNameAndJwt } from './destination-service-types';
2/**
3 * Takes an existing or a parsed destination and returns an SDK compatible destination object.
4 * @param destination - An object that adheres to the [[Destination]] interface.
5 * @returns An SDK compatible destination object.
6 */
7export declare function sanitizeDestination(destination: Record<string, any>): Destination;
8/**
9 * Takes a JSON object returned by any of the calls to the destination service and returns an SDK compatible destination object.
10 * This function only accepts destination configurations of type 'HTTP' and will error if no 'URL' is given.
11 * @param destinationJson - A JSON object returned by the destination service.
12 * @returns An SDK compatible destination object.
13 */
14export declare function parseDestination(destinationJson: DestinationJson | DestinationConfiguration): Destination;
15/**
16 * @hidden
17 */
18export declare function toDestinationNameUrl(destination: Destination | DestinationNameAndJwt): string;
19/**
20 * Destination configuration alongside authtokens and certificates.
21 */
22export interface DestinationJson {
23 [key: string]: any;
24 destinationConfiguration: DestinationConfiguration;
25 authTokens?: Record<string, string>[];
26 certificates?: Record<string, string>[];
27}
28/**
29 * Configuration of a destination as it is available through the destination service.
30 */
31export interface DestinationConfiguration {
32 [key: string]: any;
33 URL: string;
34 Name?: string;
35 ProxyType?: string;
36 'sap-client'?: string;
37 User?: string;
38 Password?: string;
39 Authentication?: AuthenticationType;
40 TrustAll?: string;
41 tokenServiceURL?: string;
42 tokenServiceURLType?: 'Common' | 'Dedicated;';
43 tokenServiceUsername?: string;
44 tokenServicePass?: string;
45 clientId?: string;
46 clientSecret?: string;
47 SystemUser?: string;
48 Type?: 'HTTP' | 'LDAP' | 'MAIL' | 'RFC';
49}
50/**
51 * @hidden
52 */
53export declare function isDestinationConfiguration(destination: any): destination is DestinationConfiguration;
54/**
55 * @hidden
56 */
57export declare function isDestinationJson(destination: any): destination is DestinationJson;
58export declare function noDestinationErrorMessage(destination: Destination | DestinationNameAndJwt): string;
59//# sourceMappingURL=destination.d.ts.map
\No newline at end of file