@prorobotech/openapi-k8s-toolkit 1.5.0-alpha.1 → 1.5.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{index-BFIWg9xn.mjs → index-BYGA57EJ.mjs} +2096 -340
- package/dist/index-BYGA57EJ.mjs.map +1 -0
- package/dist/{index-_9cT8fBl.mjs → index-DoND5hQh.mjs} +2 -2
- package/dist/{index-_9cT8fBl.mjs.map → index-DoND5hQh.mjs.map} +1 -1
- package/dist/openapi-k8s-toolkit.es.js +1 -1
- package/dist/openapi-k8s-toolkit.umd.js +2093 -337
- package/dist/openapi-k8s-toolkit.umd.js.map +1 -1
- package/dist/types/components/molecules/BlackholeForm/atoms/DefaultValueButton/DefaultValueButton.d.ts +10 -0
- package/dist/types/components/molecules/BlackholeForm/atoms/DefaultValueButton/DefaultValueButton.test.d.ts +1 -0
- package/dist/types/components/molecules/BlackholeForm/atoms/DefaultValueButton/index.d.ts +1 -0
- package/dist/types/components/molecules/BlackholeForm/atoms/ExampleTooltipIcon/ExampleTooltipIcon.d.ts +6 -0
- package/dist/types/components/molecules/BlackholeForm/atoms/ExampleTooltipIcon/ExampleTooltipIcon.test.d.ts +1 -0
- package/dist/types/components/molecules/BlackholeForm/atoms/ExampleTooltipIcon/index.d.ts +1 -0
- package/dist/types/components/molecules/BlackholeForm/atoms/ExampleTooltipIcon/styled.d.ts +380 -0
- package/dist/types/components/molecules/BlackholeForm/atoms/NullToggleButton/NullToggleButton.d.ts +9 -0
- package/dist/types/components/molecules/BlackholeForm/atoms/NullToggleButton/NullToggleButton.test.d.ts +1 -0
- package/dist/types/components/molecules/BlackholeForm/atoms/NullToggleButton/index.d.ts +1 -0
- package/dist/types/components/molecules/BlackholeForm/atoms/index.d.ts +3 -0
- package/dist/types/components/molecules/BlackholeForm/molecules/FormBooleanInput/FormBooleanInput.d.ts +1 -0
- package/dist/types/components/molecules/BlackholeForm/molecules/FormBooleanInput/FormBooleanInput.test.d.ts +1 -0
- package/dist/types/components/molecules/BlackholeForm/molecules/FormEnumStringInput/FormEnumStringInput.d.ts +3 -0
- package/dist/types/components/molecules/BlackholeForm/molecules/FormListInput/FormListInput.d.ts +1 -0
- package/dist/types/components/molecules/BlackholeForm/molecules/FormNamespaceInput/FormNamespaceInput.d.ts +5 -0
- package/dist/types/components/molecules/BlackholeForm/molecules/FormNumberInput/FormNumberInput.d.ts +3 -0
- package/dist/types/components/molecules/BlackholeForm/molecules/FormObjectFromSwagger/FormObjectFromSwagger.d.ts +6 -6
- package/dist/types/components/molecules/BlackholeForm/molecules/FormStringInput/FormStringInput.d.ts +3 -0
- package/dist/types/components/molecules/BlackholeForm/molecules/FormStringMultilineInput/FormStringMultilineInput.d.ts +3 -0
- package/dist/types/components/molecules/BlackholeForm/molecules/helpers/buildPlaceholder.d.ts +10 -0
- package/dist/types/components/molecules/BlackholeForm/molecules/helpers/buildPlaceholder.test.d.ts +1 -0
- package/dist/types/components/molecules/BlackholeForm/molecules/helpers/useDefaultValueButton.d.ts +11 -0
- package/dist/types/components/molecules/BlackholeForm/molecules/helpers/useDefaultValueButton.test.d.ts +1 -0
- package/dist/types/components/molecules/BlackholeForm/molecules/helpers/useNullToggleButton.d.ts +16 -0
- package/dist/types/components/molecules/BlackholeForm/molecules/helpers/useNullToggleButton.test.d.ts +1 -0
- package/dist/types/components/molecules/BlackholeForm/molecules/helpers/validation.d.ts +17 -4
- package/dist/types/components/molecules/BlackholeForm/organisms/BlackholeForm/BlackholeForm.d.ts +2 -2
- package/dist/types/components/molecules/BlackholeForm/organisms/BlackholeForm/helpers/casts.d.ts +4 -4
- package/dist/types/components/molecules/BlackholeForm/organisms/BlackholeForm/helpers/extractDefaultValue.d.ts +4 -0
- package/dist/types/components/molecules/BlackholeForm/organisms/BlackholeForm/helpers/extractDefaultValue.test.d.ts +1 -0
- package/dist/types/components/molecules/BlackholeForm/organisms/BlackholeForm/helpers/getSortedPropertyKeys.d.ts +2 -4
- package/dist/types/components/molecules/BlackholeForm/organisms/BlackholeForm/utils.d.ts +37 -29
- package/dist/types/localTypes/bff/form.d.ts +4 -6
- package/dist/types/localTypes/formSchema.d.ts +27 -0
- package/dist/types/utils/normalizeValuesForQuotas/normalizeValuesForQuotas.d.ts +2 -2
- package/package.json +1 -1
- package/dist/index-BFIWg9xn.mjs.map +0 -1
package/dist/types/components/molecules/BlackholeForm/organisms/BlackholeForm/BlackholeForm.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
import { OpenAPIV2 } from 'openapi-types';
|
|
3
2
|
import { TJSON } from '../../../../../localTypes/JSON';
|
|
4
3
|
import { TUrlParams } from '../../../../../localTypes/form';
|
|
5
4
|
import { TFormPrefill } from '../../../../../localTypes/formExtensions';
|
|
5
|
+
import { TFormSchemaProperties } from '../../../../../localTypes/formSchema';
|
|
6
6
|
export type TBlackholeFormProps = {
|
|
7
7
|
cluster: string;
|
|
8
8
|
theme: 'light' | 'dark';
|
|
@@ -12,7 +12,7 @@ export type TBlackholeFormProps = {
|
|
|
12
12
|
plural?: string;
|
|
13
13
|
};
|
|
14
14
|
formsPrefills?: TFormPrefill;
|
|
15
|
-
staticProperties:
|
|
15
|
+
staticProperties: TFormSchemaProperties;
|
|
16
16
|
required: string[];
|
|
17
17
|
hiddenPaths?: string[][];
|
|
18
18
|
expandedPaths: string[][];
|
package/dist/types/components/molecules/BlackholeForm/organisms/BlackholeForm/helpers/casts.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MutableRefObject } from 'react';
|
|
2
|
-
import { OpenAPIV2 } from 'openapi-types';
|
|
3
2
|
import { TFormName } from '../../../../../../localTypes/form';
|
|
3
|
+
import { TFormSchemaProperties } from '../../../../../../localTypes/formSchema';
|
|
4
4
|
export declare const pathKey: (p: (string | number)[]) => string;
|
|
5
5
|
/**
|
|
6
6
|
* Recursively prunes schema properties that are marked as "additional"
|
|
@@ -10,7 +10,7 @@ export declare const pathKey: (p: (string | number)[]) => string;
|
|
|
10
10
|
* @param values - The actual data values that correspond to the schema.
|
|
11
11
|
* @returns A new pruned copy of the schema `properties`.
|
|
12
12
|
*/
|
|
13
|
-
export declare const pruneAdditionalForValues: (props:
|
|
13
|
+
export declare const pruneAdditionalForValues: (props: TFormSchemaProperties, values: Record<string, unknown>, blockedPathsRef: MutableRefObject<Set<string>>) => TFormSchemaProperties;
|
|
14
14
|
/**
|
|
15
15
|
* Dynamically materializes (adds) new schema properties from the `values` object
|
|
16
16
|
* whenever those properties correspond to `additionalProperties` in an OpenAPI schema.
|
|
@@ -36,8 +36,8 @@ export declare const pruneAdditionalForValues: (props: OpenAPIV2.SchemaObject['p
|
|
|
36
36
|
* - `toExpand`: list of field paths that should be expanded (e.g., in a UI)
|
|
37
37
|
* - `toPersist`: list of field paths that should be persisted (saved)
|
|
38
38
|
*/
|
|
39
|
-
export declare const materializeAdditionalFromValues: (props:
|
|
40
|
-
props:
|
|
39
|
+
export declare const materializeAdditionalFromValues: (props: TFormSchemaProperties, values: Record<string, unknown>, blockedPathsRef: MutableRefObject<Set<string>>) => {
|
|
40
|
+
props: TFormSchemaProperties;
|
|
41
41
|
toExpand: TFormName[];
|
|
42
42
|
toPersist: TFormName[];
|
|
43
43
|
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const extractStringDefault: (value: unknown) => string | undefined;
|
|
2
|
+
export declare const extractNumberDefault: (value: unknown) => number | undefined;
|
|
3
|
+
export declare const extractBooleanDefault: (value: unknown) => boolean | undefined;
|
|
4
|
+
export declare const extractListInputDefault: (value: unknown) => string | string[] | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import { OpenAPIV2 } from 'openapi-types';
|
|
2
1
|
import { TFormName } from '../../../../../../localTypes/form';
|
|
2
|
+
import { TFormSchemaProperties } from '../../../../../../localTypes/formSchema';
|
|
3
3
|
export declare const getSortedPropertyKeys: ({ name, sortPaths, properties, }: {
|
|
4
4
|
name: TFormName;
|
|
5
5
|
sortPaths?: string[][] | undefined;
|
|
6
|
-
properties:
|
|
7
|
-
[name: string]: OpenAPIV2.SchemaObject;
|
|
8
|
-
};
|
|
6
|
+
properties: TFormSchemaProperties;
|
|
9
7
|
}) => (string | number)[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { OpenAPIV2 } from 'openapi-types';
|
|
2
1
|
import { TListInputCustomProps, TRangeInputCustomProps } from '../../../../../localTypes/formExtensions';
|
|
3
2
|
import { TFormName, TExpandedControls, TNamespaceData, TPersistedControls, TUrlParams } from '../../../../../localTypes/form';
|
|
4
|
-
|
|
3
|
+
import { TFormSchemaNode, TFormSchemaProperties } from '../../../../../localTypes/formSchema';
|
|
4
|
+
export declare const getStringFormItemFromSwagger: ({ name, arrKey, arrName, persistName, required, forceNonRequired, description, namespaceData, isAdditionalProperties, removeField, persistedControls, onRemoveByMinus, defaultValue, example, nullable, }: {
|
|
5
5
|
name: TFormName;
|
|
6
6
|
arrKey?: number | undefined;
|
|
7
7
|
arrName?: TFormName | undefined;
|
|
@@ -16,8 +16,11 @@ export declare const getStringFormItemFromSwagger: ({ name, arrKey, arrName, per
|
|
|
16
16
|
}) => void;
|
|
17
17
|
persistedControls: TPersistedControls;
|
|
18
18
|
onRemoveByMinus?: (() => void) | undefined;
|
|
19
|
+
defaultValue?: string | undefined;
|
|
20
|
+
example?: string | undefined;
|
|
21
|
+
nullable?: boolean | undefined;
|
|
19
22
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
-
export declare const getEnumStringFormItemFromSwagger: ({ name, arrKey, arrName, persistName, required, forceNonRequired, description, isAdditionalProperties, removeField, options, persistedControls, onRemoveByMinus, }: {
|
|
23
|
+
export declare const getEnumStringFormItemFromSwagger: ({ name, arrKey, arrName, persistName, required, forceNonRequired, description, isAdditionalProperties, removeField, options, persistedControls, onRemoveByMinus, defaultValue, example, nullable, }: {
|
|
21
24
|
name: TFormName;
|
|
22
25
|
arrKey?: number | undefined;
|
|
23
26
|
arrName?: TFormName | undefined;
|
|
@@ -32,8 +35,11 @@ export declare const getEnumStringFormItemFromSwagger: ({ name, arrKey, arrName,
|
|
|
32
35
|
options: string[];
|
|
33
36
|
persistedControls: TPersistedControls;
|
|
34
37
|
onRemoveByMinus?: (() => void) | undefined;
|
|
38
|
+
defaultValue?: string | undefined;
|
|
39
|
+
example?: string | undefined;
|
|
40
|
+
nullable?: boolean | undefined;
|
|
35
41
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
36
|
-
export declare const getNumberFormItemFromSwagger: ({ isNumber, name, arrKey, arrName, persistName, required, forceNonRequired, description, isAdditionalProperties, removeField, persistedControls, onRemoveByMinus, }: {
|
|
42
|
+
export declare const getNumberFormItemFromSwagger: ({ isNumber, name, arrKey, arrName, persistName, required, forceNonRequired, description, isAdditionalProperties, removeField, persistedControls, onRemoveByMinus, defaultValue, example, nullable, }: {
|
|
37
43
|
isNumber?: boolean | undefined;
|
|
38
44
|
name: TFormName;
|
|
39
45
|
arrKey?: number | undefined;
|
|
@@ -48,6 +54,9 @@ export declare const getNumberFormItemFromSwagger: ({ isNumber, name, arrKey, ar
|
|
|
48
54
|
}) => void;
|
|
49
55
|
persistedControls: TPersistedControls;
|
|
50
56
|
onRemoveByMinus?: (() => void) | undefined;
|
|
57
|
+
defaultValue?: number | undefined;
|
|
58
|
+
example?: number | undefined;
|
|
59
|
+
nullable?: boolean | undefined;
|
|
51
60
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
52
61
|
export declare const getRangeInputFormItemFromSwagger: ({ name, arrKey, arrName, persistName, required, forceNonRequired, description, isEdit, persistedControls, customProps, urlParams, onRemoveByMinus, }: {
|
|
53
62
|
name: TFormName;
|
|
@@ -63,7 +72,7 @@ export declare const getRangeInputFormItemFromSwagger: ({ name, arrKey, arrName,
|
|
|
63
72
|
urlParams: TUrlParams;
|
|
64
73
|
onRemoveByMinus?: (() => void) | undefined;
|
|
65
74
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
66
|
-
export declare const getStringMultilineFormItemFromSwagger: ({ name, arrKey, arrName, persistName, required, forceNonRequired, description, isAdditionalProperties, removeField, persistedControls, onRemoveByMinus, isBase64, }: {
|
|
75
|
+
export declare const getStringMultilineFormItemFromSwagger: ({ name, arrKey, arrName, persistName, required, forceNonRequired, description, isAdditionalProperties, removeField, persistedControls, onRemoveByMinus, isBase64, defaultValue, example, nullable, }: {
|
|
67
76
|
name: TFormName;
|
|
68
77
|
arrKey?: number | undefined;
|
|
69
78
|
arrName?: TFormName | undefined;
|
|
@@ -78,8 +87,11 @@ export declare const getStringMultilineFormItemFromSwagger: ({ name, arrKey, arr
|
|
|
78
87
|
persistedControls: TPersistedControls;
|
|
79
88
|
onRemoveByMinus?: (() => void) | undefined;
|
|
80
89
|
isBase64?: boolean | undefined;
|
|
90
|
+
defaultValue?: string | undefined;
|
|
91
|
+
example?: string | undefined;
|
|
92
|
+
nullable?: boolean | undefined;
|
|
81
93
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
82
|
-
export declare const getListInputFormItemFromSwagger: ({ name, arrKey, arrName, persistName, required, forceNonRequired, description, isAdditionalProperties, removeField, persistedControls, customProps, urlParams, onRemoveByMinus, }: {
|
|
94
|
+
export declare const getListInputFormItemFromSwagger: ({ name, arrKey, arrName, persistName, required, forceNonRequired, description, isAdditionalProperties, removeField, persistedControls, customProps, urlParams, onRemoveByMinus, defaultValue, }: {
|
|
83
95
|
name: TFormName;
|
|
84
96
|
arrKey?: number | undefined;
|
|
85
97
|
arrName?: TFormName | undefined;
|
|
@@ -95,8 +107,9 @@ export declare const getListInputFormItemFromSwagger: ({ name, arrKey, arrName,
|
|
|
95
107
|
customProps: TListInputCustomProps;
|
|
96
108
|
urlParams: TUrlParams;
|
|
97
109
|
onRemoveByMinus?: (() => void) | undefined;
|
|
110
|
+
defaultValue?: string | string[] | undefined;
|
|
98
111
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
99
|
-
export declare const getBooleanFormItemFromSwagger: ({ name, arrKey, arrName, description, makeValueUndefined, isAdditionalProperties, removeField, onRemoveByMinus, }: {
|
|
112
|
+
export declare const getBooleanFormItemFromSwagger: ({ name, arrKey, arrName, description, makeValueUndefined, isAdditionalProperties, removeField, onRemoveByMinus, defaultValue, }: {
|
|
100
113
|
name: TFormName;
|
|
101
114
|
arrKey?: number | undefined;
|
|
102
115
|
arrName?: TFormName | undefined;
|
|
@@ -107,9 +120,10 @@ export declare const getBooleanFormItemFromSwagger: ({ name, arrKey, arrName, de
|
|
|
107
120
|
path: TFormName;
|
|
108
121
|
}) => void;
|
|
109
122
|
onRemoveByMinus?: (() => void) | undefined;
|
|
123
|
+
defaultValue?: boolean | undefined;
|
|
110
124
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
111
|
-
export declare const getArrayFormItemFromSwagger: ({ schema, name, arrKey, arrName, expandName, persistName, required, forceNonRequired, description, makeValueUndefined, addField, isAdditionalProperties, removeField, isEdit, expandedControls, persistedControls, sortPaths, urlParams, onRemoveByMinus, }: {
|
|
112
|
-
schema:
|
|
125
|
+
export declare const getArrayFormItemFromSwagger: ({ schema, name, arrKey, arrName, expandName, persistName, required, forceNonRequired, description, makeValueUndefined, addField, isAdditionalProperties, removeField, isEdit, expandedControls, persistedControls, objectValidationErrors, sortPaths, urlParams, onRemoveByMinus, }: {
|
|
126
|
+
schema: TFormSchemaNode;
|
|
113
127
|
name: TFormName;
|
|
114
128
|
arrKey?: number | undefined;
|
|
115
129
|
arrName?: TFormName | undefined;
|
|
@@ -123,10 +137,8 @@ export declare const getArrayFormItemFromSwagger: ({ schema, name, arrKey, arrNa
|
|
|
123
137
|
path: TFormName;
|
|
124
138
|
name: string;
|
|
125
139
|
type: string;
|
|
126
|
-
items?:
|
|
127
|
-
|
|
128
|
-
} | undefined;
|
|
129
|
-
nestedProperties?: OpenAPIV2.SchemaObject['properties'];
|
|
140
|
+
items?: TFormSchemaNode | undefined;
|
|
141
|
+
nestedProperties?: TFormSchemaProperties | undefined;
|
|
130
142
|
required?: string | undefined;
|
|
131
143
|
}) => void;
|
|
132
144
|
isAdditionalProperties?: boolean | undefined;
|
|
@@ -136,14 +148,13 @@ export declare const getArrayFormItemFromSwagger: ({ schema, name, arrKey, arrNa
|
|
|
136
148
|
isEdit: boolean;
|
|
137
149
|
expandedControls: TExpandedControls;
|
|
138
150
|
persistedControls: TPersistedControls;
|
|
151
|
+
objectValidationErrors?: Record<string, string[]> | undefined;
|
|
139
152
|
sortPaths?: string[][] | undefined;
|
|
140
153
|
urlParams: TUrlParams;
|
|
141
154
|
onRemoveByMinus?: (() => void) | undefined;
|
|
142
155
|
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
143
|
-
export declare const getObjectFormItemsDraft: ({ properties, name, arrKey, arrName, expandName, persistName, required, forceNonRequired, description, namespaceData, makeValueUndefined, addField, removeField, isEdit, expandedControls, persistedControls, sortPaths, urlParams, }: {
|
|
144
|
-
properties:
|
|
145
|
-
[name: string]: OpenAPIV2.SchemaObject;
|
|
146
|
-
};
|
|
156
|
+
export declare const getObjectFormItemsDraft: ({ properties, name, arrKey, arrName, expandName, persistName, required, forceNonRequired, description, namespaceData, makeValueUndefined, addField, removeField, isEdit, expandedControls, persistedControls, objectValidationErrors, sortPaths, urlParams, }: {
|
|
157
|
+
properties: TFormSchemaProperties;
|
|
147
158
|
name: TFormName;
|
|
148
159
|
arrKey?: number | undefined;
|
|
149
160
|
arrName?: TFormName | undefined;
|
|
@@ -158,10 +169,8 @@ export declare const getObjectFormItemsDraft: ({ properties, name, arrKey, arrNa
|
|
|
158
169
|
path: TFormName;
|
|
159
170
|
name: string;
|
|
160
171
|
type: string;
|
|
161
|
-
items?:
|
|
162
|
-
|
|
163
|
-
} | undefined;
|
|
164
|
-
nestedProperties?: OpenAPIV2.SchemaObject['properties'];
|
|
172
|
+
items?: TFormSchemaNode | undefined;
|
|
173
|
+
nestedProperties?: TFormSchemaProperties | undefined;
|
|
165
174
|
required?: string | undefined;
|
|
166
175
|
}) => void;
|
|
167
176
|
removeField: ({ path }: {
|
|
@@ -170,13 +179,14 @@ export declare const getObjectFormItemsDraft: ({ properties, name, arrKey, arrNa
|
|
|
170
179
|
isEdit: boolean;
|
|
171
180
|
expandedControls: TExpandedControls;
|
|
172
181
|
persistedControls: TPersistedControls;
|
|
182
|
+
objectValidationErrors?: Record<string, string[]> | undefined;
|
|
173
183
|
sortPaths?: string[][] | undefined;
|
|
174
184
|
urlParams: TUrlParams;
|
|
175
185
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
176
|
-
export declare const getObjectFormItemFromSwagger: ({ properties, name, arrKey, arrName, expandName, persistName, selfRequired, required, forceNonRequired, description, namespaceData, makeValueUndefined, addField, isAdditionalProperties, removeField, isEdit, expandedControls, persistedControls, sortPaths, urlParams, onRemoveByMinus, }: {
|
|
177
|
-
properties:
|
|
178
|
-
|
|
179
|
-
|
|
186
|
+
export declare const getObjectFormItemFromSwagger: ({ properties, oneOfRequiredGroups, objectValidationErrors, name, arrKey, arrName, expandName, persistName, selfRequired, required, forceNonRequired, description, namespaceData, makeValueUndefined, addField, isAdditionalProperties, removeField, isEdit, expandedControls, persistedControls, sortPaths, urlParams, onRemoveByMinus, }: {
|
|
187
|
+
properties: TFormSchemaProperties;
|
|
188
|
+
oneOfRequiredGroups?: string[][] | undefined;
|
|
189
|
+
objectValidationErrors?: Record<string, string[]> | undefined;
|
|
180
190
|
name: TFormName;
|
|
181
191
|
arrKey?: number | undefined;
|
|
182
192
|
arrName?: TFormName | undefined;
|
|
@@ -192,10 +202,8 @@ export declare const getObjectFormItemFromSwagger: ({ properties, name, arrKey,
|
|
|
192
202
|
path: TFormName;
|
|
193
203
|
name: string;
|
|
194
204
|
type: string;
|
|
195
|
-
items?:
|
|
196
|
-
|
|
197
|
-
} | undefined;
|
|
198
|
-
nestedProperties?: OpenAPIV2.SchemaObject['properties'];
|
|
205
|
+
items?: TFormSchemaNode | undefined;
|
|
206
|
+
nestedProperties?: TFormSchemaProperties | undefined;
|
|
199
207
|
required?: string | undefined;
|
|
200
208
|
}) => void;
|
|
201
209
|
isAdditionalProperties?: boolean | undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { OpenAPIV2 } from 'openapi-types';
|
|
2
1
|
import { TJSON } from '../JSON';
|
|
3
2
|
import { TFormName } from '../form';
|
|
4
3
|
import { TFormPrefill } from '../formExtensions';
|
|
4
|
+
import { TFormSchemaProperties } from '../formSchema';
|
|
5
5
|
export type TPrepareFormReq = {
|
|
6
6
|
data: {
|
|
7
7
|
type: 'builtin';
|
|
@@ -30,9 +30,7 @@ export type TPrepareFormRes = {
|
|
|
30
30
|
isNamespaced: boolean;
|
|
31
31
|
} | {
|
|
32
32
|
result: 'success';
|
|
33
|
-
properties:
|
|
34
|
-
[name: string]: OpenAPIV2.SchemaObject;
|
|
35
|
-
};
|
|
33
|
+
properties: TFormSchemaProperties;
|
|
36
34
|
required: string[] | undefined;
|
|
37
35
|
hiddenPaths: string[][] | undefined;
|
|
38
36
|
expandedPaths: string[][] | undefined;
|
|
@@ -47,11 +45,11 @@ export type TPrepareFormRes = {
|
|
|
47
45
|
export type TYamlByValuesReq = {
|
|
48
46
|
values: any;
|
|
49
47
|
persistedKeys: TFormName[];
|
|
50
|
-
properties:
|
|
48
|
+
properties: TFormSchemaProperties;
|
|
51
49
|
};
|
|
52
50
|
export type TYamlByValuesRes = any;
|
|
53
51
|
export type TValuesByYamlReq = {
|
|
54
52
|
values: Record<string, unknown>;
|
|
55
|
-
properties:
|
|
53
|
+
properties: TFormSchemaProperties;
|
|
56
54
|
};
|
|
57
55
|
export type TValuesByYamlRes = any;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export type TFormSchemaKnownType = 'string' | 'number' | 'integer' | 'boolean' | 'array' | 'object' | 'listInput' | 'multilineString' | 'multilineStringBase64' | 'rangeInputCpu' | 'rangeInputMemory';
|
|
2
|
+
type TFormSchemaLooseType = TFormSchemaKnownType | (string & {});
|
|
3
|
+
/**
|
|
4
|
+
* Mirror of the normalized form-schema contract returned by the BFF.
|
|
5
|
+
* Toolkit components should consume this type instead of raw OpenAPI v2 types.
|
|
6
|
+
*/
|
|
7
|
+
export interface TFormSchemaNode {
|
|
8
|
+
type?: TFormSchemaLooseType | TFormSchemaLooseType[];
|
|
9
|
+
properties?: TFormSchemaProperties;
|
|
10
|
+
items?: TFormSchemaNode;
|
|
11
|
+
additionalProperties?: boolean | TFormSchemaNode;
|
|
12
|
+
required?: string[];
|
|
13
|
+
enum?: string[];
|
|
14
|
+
oneOfRequiredGroups?: string[][];
|
|
15
|
+
default?: unknown;
|
|
16
|
+
example?: unknown;
|
|
17
|
+
nullable?: boolean;
|
|
18
|
+
description?: string;
|
|
19
|
+
customProps?: unknown;
|
|
20
|
+
isAdditionalProperties?: boolean;
|
|
21
|
+
'x-kubernetes-preserve-unknown-fields'?: boolean;
|
|
22
|
+
'x-kubernetes-int-or-string'?: boolean;
|
|
23
|
+
}
|
|
24
|
+
export interface TFormSchemaProperties {
|
|
25
|
+
[name: string]: TFormSchemaNode;
|
|
26
|
+
}
|
|
27
|
+
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const normalizeValuesForQuotasToNumber: (object: any, properties:
|
|
1
|
+
import { TFormSchemaProperties } from '../../localTypes/formSchema';
|
|
2
|
+
export declare const normalizeValuesForQuotasToNumber: (object: any, properties: TFormSchemaProperties) => any;
|
package/package.json
CHANGED