UNPKG

2.41 kBTypeScriptView Raw
1export interface AuthorizationHeader {
2 name?: string;
3 value?: string;
4}
5/**
6 * Represents binding of data source for the service endpoint request.
7 */
8export interface DataSourceBindingBase {
9 /**
10 * Pagination format supported by this data source(ContinuationToken/SkipTop).
11 */
12 callbackContextTemplate?: string;
13 /**
14 * Subsequent calls needed?
15 */
16 callbackRequiredTemplate?: string;
17 /**
18 * Gets or sets the name of the data source.
19 */
20 dataSourceName?: string;
21 /**
22 * Gets or sets the endpoint Id.
23 */
24 endpointId?: string;
25 /**
26 * Gets or sets the url of the service endpoint.
27 */
28 endpointUrl?: string;
29 /**
30 * Gets or sets the authorization headers.
31 */
32 headers?: AuthorizationHeader[];
33 /**
34 * Defines the initial value of the query params
35 */
36 initialContextTemplate?: string;
37 /**
38 * Gets or sets the parameters for the data source.
39 */
40 parameters?: {
41 [key: string]: string;
42 };
43 /**
44 * Gets or sets http request body
45 */
46 requestContent?: string;
47 /**
48 * Gets or sets http request verb
49 */
50 requestVerb?: string;
51 /**
52 * Gets or sets the result selector.
53 */
54 resultSelector?: string;
55 /**
56 * Gets or sets the result template.
57 */
58 resultTemplate?: string;
59 /**
60 * Gets or sets the target of the data source.
61 */
62 target?: string;
63}
64export interface ProcessParameters {
65 dataSourceBindings?: DataSourceBindingBase[];
66 inputs?: TaskInputDefinitionBase[];
67 sourceDefinitions?: TaskSourceDefinitionBase[];
68}
69export interface TaskInputDefinitionBase {
70 aliases?: string[];
71 defaultValue?: string;
72 groupName?: string;
73 helpMarkDown?: string;
74 label?: string;
75 name?: string;
76 options?: {
77 [key: string]: string;
78 };
79 properties?: {
80 [key: string]: string;
81 };
82 required?: boolean;
83 type?: string;
84 validation?: TaskInputValidation;
85 visibleRule?: string;
86}
87export interface TaskInputValidation {
88 /**
89 * Conditional expression
90 */
91 expression?: string;
92 /**
93 * Message explaining how user can correct if validation fails
94 */
95 message?: string;
96}
97export interface TaskSourceDefinitionBase {
98 authKey?: string;
99 endpoint?: string;
100 keySelector?: string;
101 selector?: string;
102 target?: string;
103}