1 | export interface Option {
|
2 | value: string;
|
3 | description?: string;
|
4 | }
|
5 |
|
6 |
|
7 |
|
8 | export interface Options {
|
9 | |
10 |
|
11 |
|
12 |
|
13 | kind?: "single" | "multiple";
|
14 | |
15 |
|
16 |
|
17 | options?: Option[];
|
18 | }
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 | export declare const FreeChoices = "freeChoices";
|
25 | export declare type ParameterType = "string" | "number" | "boolean" | Options;
|
26 | export interface BaseParameter {
|
27 | readonly pattern?: RegExp;
|
28 | readonly required?: boolean;
|
29 | readonly description?: string;
|
30 | readonly displayName?: string;
|
31 | readonly validInput?: string;
|
32 | readonly displayable?: boolean;
|
33 | readonly maxLength?: number;
|
34 | readonly minLength?: number;
|
35 | readonly type?: ParameterType;
|
36 | readonly order?: number;
|
37 | readonly control?: "input" | "textarea";
|
38 | }
|
39 | export interface Parameter extends BaseParameter {
|
40 | readonly name: string;
|
41 | }
|
42 | export interface BaseValue {
|
43 | path: string;
|
44 | required?: boolean;
|
45 | type?: "string" | "number" | "boolean";
|
46 | }
|
47 | export declare type Parameters<PARAMS = any> = ParametersListing | ParametersObject<PARAMS>;
|
48 |
|
49 |
|
50 |
|
51 |
|
52 |
|
53 | export interface HasDefaultValue {
|
54 | defaultValue?: any;
|
55 | }
|
56 | export declare type ParametersObjectValue = (BaseParameter & HasDefaultValue);
|
57 | export declare type MappedParameterOrSecretObjectValue = MappedParameterOrSecretDeclaration;
|
58 | export declare type ValueParameterObjectValue = ValueDeclaration;
|
59 |
|
60 |
|
61 |
|
62 |
|
63 | export declare type ParametersObject<PARAMS, K extends keyof PARAMS = keyof PARAMS> = Record<K, ParametersObjectValue | MappedParameterOrSecretObjectValue | ValueParameterObjectValue>;
|
64 | export declare enum DeclarationType {
|
65 | |
66 |
|
67 |
|
68 | mapped = "mapped",
|
69 | |
70 |
|
71 |
|
72 | secret = "secret",
|
73 | Mapped = "mapped",
|
74 | Secret = "secret"
|
75 | }
|
76 | export interface MappedParameterOrSecretDeclaration {
|
77 | declarationType: DeclarationType;
|
78 | uri: string;
|
79 | |
80 |
|
81 |
|
82 | required?: boolean;
|
83 | }
|
84 |
|
85 |
|
86 |
|
87 | export declare type ValueDeclaration = BaseValue;
|
88 |
|
89 |
|
90 |
|
91 | export interface ParametersListing {
|
92 | readonly parameters: NamedParameter[];
|
93 | readonly mappedParameters: NamedMappedParameter[];
|
94 | readonly secrets: NamedSecret[];
|
95 | readonly values: NamedValue[];
|
96 | }
|
97 | export declare type NamedParameter = BaseParameter & {
|
98 | name: string;
|
99 | } & HasDefaultValue;
|
100 | export interface NamedSecret {
|
101 | name: string;
|
102 | uri: string;
|
103 | }
|
104 | export interface NamedMappedParameter {
|
105 | name: string;
|
106 | uri: string;
|
107 | required?: boolean;
|
108 | }
|
109 | export declare type NamedValue = NamedValueParameter;
|
110 | export interface NamedValueParameter extends BaseValue {
|
111 | name: string;
|
112 | }
|
113 |
|
\ | No newline at end of file |