@backstage/plugin-scaffolder-react 1.1.0-next.2 → 1.1.1-next.0
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/CHANGELOG.md +49 -0
- package/alpha/package.json +4 -3
- package/dist/alpha.d.ts +223 -0
- package/dist/alpha.esm.js +698 -0
- package/dist/alpha.esm.js.map +1 -0
- package/dist/index.d.ts +181 -274
- package/dist/index.esm.js +3 -641
- package/dist/index.esm.js.map +1 -1
- package/package.json +32 -21
- package/dist/index.alpha.d.ts +0 -586
- package/dist/index.beta.d.ts +0 -421
package/dist/index.d.ts
CHANGED
|
@@ -1,172 +1,175 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { Extension } from '@backstage/core-plugin-api';
|
|
7
|
-
import { FieldProps } from '@rjsf/core';
|
|
8
|
-
import { FieldProps as FieldProps_2 } from '@rjsf/utils';
|
|
9
|
-
import { FieldValidation } from '@rjsf/core';
|
|
10
|
-
import { FieldValidation as FieldValidation_2 } from '@rjsf/utils';
|
|
11
|
-
import type { FormProps as FormProps_2 } from '@rjsf/core-v5';
|
|
12
|
-
import { IconComponent } from '@backstage/core-plugin-api';
|
|
13
|
-
import { JsonObject } from '@backstage/types';
|
|
2
|
+
import React$1, { PropsWithChildren } from 'react';
|
|
3
|
+
import * as _backstage_core_plugin_api from '@backstage/core-plugin-api';
|
|
4
|
+
import { ApiHolder, Extension } from '@backstage/core-plugin-api';
|
|
5
|
+
import { FieldValidation, FieldProps } from '@rjsf/core';
|
|
14
6
|
import { JSONSchema7 } from 'json-schema';
|
|
15
|
-
import { JsonValue } from '@backstage/types';
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import { default as React_2 } from 'react';
|
|
19
|
-
import { ReactNode } from 'react';
|
|
20
|
-
import { SetStateAction } from 'react';
|
|
21
|
-
import { TaskSpec } from '@backstage/plugin-scaffolder-common';
|
|
22
|
-
import { TaskStep } from '@backstage/plugin-scaffolder-common';
|
|
23
|
-
import { TemplateEntityV1beta3 } from '@backstage/plugin-scaffolder-common';
|
|
24
|
-
import { UIOptionsType } from '@rjsf/utils';
|
|
25
|
-
import { UiSchema } from '@rjsf/utils';
|
|
7
|
+
import { JsonObject, JsonValue, Observable } from '@backstage/types';
|
|
8
|
+
import { TaskSpec, TaskStep } from '@backstage/plugin-scaffolder-common';
|
|
9
|
+
import { FormProps } from '@rjsf/core-v5';
|
|
26
10
|
|
|
27
11
|
/**
|
|
28
|
-
*
|
|
12
|
+
* Field validation type for Custom Field Extensions.
|
|
29
13
|
*
|
|
30
14
|
* @public
|
|
31
15
|
*/
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
schema?: {
|
|
36
|
-
input?: JSONSchema7;
|
|
37
|
-
output?: JSONSchema7;
|
|
38
|
-
};
|
|
39
|
-
examples?: ActionExample[];
|
|
40
|
-
};
|
|
41
|
-
|
|
16
|
+
declare type CustomFieldValidator<TFieldReturnValue> = (data: TFieldReturnValue, field: FieldValidation, context: {
|
|
17
|
+
apiHolder: ApiHolder;
|
|
18
|
+
}) => void | Promise<void>;
|
|
42
19
|
/**
|
|
43
|
-
*
|
|
20
|
+
* Type for the Custom Field Extension schema.
|
|
44
21
|
*
|
|
45
22
|
* @public
|
|
46
23
|
*/
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
24
|
+
declare type CustomFieldExtensionSchema = {
|
|
25
|
+
returnValue: JSONSchema7;
|
|
26
|
+
uiOptions?: JSONSchema7;
|
|
50
27
|
};
|
|
51
|
-
|
|
52
|
-
/* Excluded from this release type: createFieldValidation */
|
|
53
|
-
|
|
54
|
-
/* Excluded from this release type: createNextScaffolderFieldExtension */
|
|
55
|
-
|
|
56
28
|
/**
|
|
57
|
-
*
|
|
58
|
-
*
|
|
29
|
+
* Type for the Custom Field Extension with the
|
|
30
|
+
* name and components and validation function.
|
|
31
|
+
*
|
|
59
32
|
* @public
|
|
60
33
|
*/
|
|
61
|
-
|
|
62
|
-
|
|
34
|
+
declare type FieldExtensionOptions<TFieldReturnValue = unknown, TInputProps = unknown> = {
|
|
35
|
+
name: string;
|
|
36
|
+
component: (props: FieldExtensionComponentProps<TFieldReturnValue, TInputProps>) => JSX.Element | null;
|
|
37
|
+
validation?: CustomFieldValidator<TFieldReturnValue>;
|
|
38
|
+
schema?: CustomFieldExtensionSchema;
|
|
39
|
+
};
|
|
63
40
|
/**
|
|
64
|
-
*
|
|
41
|
+
* Type for field extensions and being able to type
|
|
42
|
+
* incoming props easier.
|
|
65
43
|
*
|
|
66
44
|
* @public
|
|
67
45
|
*/
|
|
68
|
-
|
|
46
|
+
interface FieldExtensionComponentProps<TFieldReturnValue, TUiOptions extends {} = {}> extends FieldProps<TFieldReturnValue> {
|
|
47
|
+
uiSchema: FieldProps['uiSchema'] & {
|
|
48
|
+
'ui:options'?: TUiOptions;
|
|
49
|
+
};
|
|
50
|
+
}
|
|
69
51
|
|
|
70
52
|
/**
|
|
71
|
-
*
|
|
53
|
+
* The type used to wrap up the Layout and embed the input props
|
|
72
54
|
*
|
|
73
55
|
* @public
|
|
74
56
|
*/
|
|
75
|
-
|
|
76
|
-
returnValue: JSONSchema7;
|
|
77
|
-
uiOptions?: JSONSchema7;
|
|
78
|
-
};
|
|
79
|
-
|
|
57
|
+
declare type FieldExtensionComponent<_TReturnValue, _TInputProps> = () => null;
|
|
80
58
|
/**
|
|
81
|
-
*
|
|
59
|
+
* Method for creating field extensions that can be used in the scaffolder
|
|
60
|
+
* frontend form.
|
|
61
|
+
* @public
|
|
62
|
+
*/
|
|
63
|
+
declare function createScaffolderFieldExtension<TReturnValue = unknown, TInputProps = unknown>(options: FieldExtensionOptions<TReturnValue, TInputProps>): Extension<FieldExtensionComponent<TReturnValue, TInputProps>>;
|
|
64
|
+
/**
|
|
65
|
+
* The Wrapping component for defining fields extensions inside
|
|
82
66
|
*
|
|
83
67
|
* @public
|
|
84
68
|
*/
|
|
85
|
-
|
|
86
|
-
apiHolder: ApiHolder;
|
|
87
|
-
}) => void | Promise<void>;
|
|
88
|
-
|
|
89
|
-
/* Excluded from this release type: DefaultTemplateOutputs */
|
|
90
|
-
|
|
91
|
-
/* Excluded from this release type: EmbeddableWorkflow */
|
|
92
|
-
|
|
93
|
-
/* Excluded from this release type: extractSchemaFromStep */
|
|
69
|
+
declare const ScaffolderFieldExtensions: React$1.ComponentType<React$1.PropsWithChildren<{}>>;
|
|
94
70
|
|
|
95
71
|
/**
|
|
96
|
-
* The
|
|
72
|
+
* The shape of each entry of parameters which gets rendered
|
|
73
|
+
* as a separate step in the wizard input
|
|
97
74
|
*
|
|
98
75
|
* @public
|
|
99
76
|
*/
|
|
100
|
-
|
|
77
|
+
declare type TemplateParameterSchema = {
|
|
78
|
+
title: string;
|
|
79
|
+
description?: string;
|
|
80
|
+
steps: Array<{
|
|
81
|
+
title: string;
|
|
82
|
+
description?: string;
|
|
83
|
+
schema: JsonObject;
|
|
84
|
+
}>;
|
|
85
|
+
};
|
|
101
86
|
|
|
102
87
|
/**
|
|
103
|
-
*
|
|
104
|
-
* incoming props easier.
|
|
105
|
-
*
|
|
88
|
+
* The Context Provider that holds the state for the secrets.
|
|
106
89
|
* @public
|
|
107
90
|
*/
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
91
|
+
declare const SecretsContextProvider: ({ children }: PropsWithChildren<{}>) => JSX.Element;
|
|
92
|
+
/**
|
|
93
|
+
* The return type from the useTemplateSecrets hook.
|
|
94
|
+
* @public
|
|
95
|
+
*/
|
|
96
|
+
interface ScaffolderUseTemplateSecrets {
|
|
97
|
+
setSecrets: (input: Record<string, string>) => void;
|
|
98
|
+
secrets: Record<string, string>;
|
|
112
99
|
}
|
|
113
|
-
|
|
114
100
|
/**
|
|
115
|
-
*
|
|
116
|
-
*
|
|
117
|
-
*
|
|
101
|
+
* Hook to access the secrets context to be able to set secrets that are
|
|
102
|
+
* passed to the Scaffolder backend.
|
|
118
103
|
* @public
|
|
119
104
|
*/
|
|
120
|
-
|
|
121
|
-
name: string;
|
|
122
|
-
component: (props: FieldExtensionComponentProps<TFieldReturnValue, TInputProps>) => JSX.Element | null;
|
|
123
|
-
validation?: CustomFieldValidator<TFieldReturnValue>;
|
|
124
|
-
schema?: CustomFieldExtensionSchema;
|
|
125
|
-
};
|
|
105
|
+
declare const useTemplateSecrets: () => ScaffolderUseTemplateSecrets;
|
|
126
106
|
|
|
127
107
|
/**
|
|
128
|
-
*
|
|
108
|
+
* The status of each task in a Scaffolder Job
|
|
129
109
|
*
|
|
130
110
|
* @public
|
|
131
111
|
*/
|
|
132
|
-
|
|
133
|
-
|
|
112
|
+
declare type ScaffolderTaskStatus = 'open' | 'processing' | 'failed' | 'completed' | 'skipped';
|
|
134
113
|
/**
|
|
135
|
-
*
|
|
114
|
+
* The shape of each task returned from the `scaffolder-backend`
|
|
115
|
+
*
|
|
136
116
|
* @public
|
|
137
117
|
*/
|
|
138
|
-
|
|
139
|
-
|
|
118
|
+
declare type ScaffolderTask = {
|
|
119
|
+
id: string;
|
|
120
|
+
spec: TaskSpec;
|
|
121
|
+
status: 'failed' | 'completed' | 'processing' | 'open' | 'cancelled';
|
|
122
|
+
lastHeartbeatAt: string;
|
|
123
|
+
createdAt: string;
|
|
124
|
+
};
|
|
140
125
|
/**
|
|
141
|
-
*
|
|
126
|
+
* A single action example
|
|
142
127
|
*
|
|
143
128
|
* @public
|
|
144
129
|
*/
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
}
|
|
149
|
-
|
|
130
|
+
declare type ActionExample = {
|
|
131
|
+
description: string;
|
|
132
|
+
example: string;
|
|
133
|
+
};
|
|
150
134
|
/**
|
|
151
|
-
* The
|
|
135
|
+
* The response shape for a single action in the `listActions` call to the `scaffolder-backend`
|
|
152
136
|
*
|
|
153
137
|
* @public
|
|
154
138
|
*/
|
|
155
|
-
|
|
156
|
-
|
|
139
|
+
declare type Action = {
|
|
140
|
+
id: string;
|
|
141
|
+
description?: string;
|
|
142
|
+
schema?: {
|
|
143
|
+
input?: JSONSchema7;
|
|
144
|
+
output?: JSONSchema7;
|
|
145
|
+
};
|
|
146
|
+
examples?: ActionExample[];
|
|
147
|
+
};
|
|
157
148
|
/**
|
|
158
149
|
* The response shape for the `listActions` call to the `scaffolder-backend`
|
|
159
150
|
*
|
|
160
151
|
* @public
|
|
161
152
|
*/
|
|
162
|
-
|
|
163
|
-
|
|
153
|
+
declare type ListActionsResponse = Array<Action>;
|
|
154
|
+
/** @public */
|
|
155
|
+
declare type ScaffolderOutputLink = {
|
|
156
|
+
title?: string;
|
|
157
|
+
icon?: string;
|
|
158
|
+
url?: string;
|
|
159
|
+
entityRef?: string;
|
|
160
|
+
};
|
|
161
|
+
/** @public */
|
|
162
|
+
declare type ScaffolderTaskOutput = {
|
|
163
|
+
links?: ScaffolderOutputLink[];
|
|
164
|
+
} & {
|
|
165
|
+
[key: string]: unknown;
|
|
166
|
+
};
|
|
164
167
|
/**
|
|
165
168
|
* The shape of a `LogEvent` message from the `scaffolder-backend`
|
|
166
169
|
*
|
|
167
170
|
* @public
|
|
168
171
|
*/
|
|
169
|
-
|
|
172
|
+
declare type LogEvent = {
|
|
170
173
|
type: 'log' | 'completion';
|
|
171
174
|
body: {
|
|
172
175
|
message: string;
|
|
@@ -177,245 +180,149 @@ export declare type LogEvent = {
|
|
|
177
180
|
id: string;
|
|
178
181
|
taskId: string;
|
|
179
182
|
};
|
|
180
|
-
|
|
181
|
-
/* Excluded from this release type: NextCustomFieldValidator */
|
|
182
|
-
|
|
183
|
-
/* Excluded from this release type: NextFieldExtensionComponentProps */
|
|
184
|
-
|
|
185
|
-
/* Excluded from this release type: NextFieldExtensionOptions */
|
|
186
|
-
|
|
187
|
-
/* Excluded from this release type: ParsedTemplateSchema */
|
|
188
|
-
|
|
189
|
-
/* Excluded from this release type: ReviewState */
|
|
190
|
-
|
|
191
|
-
/* Excluded from this release type: ReviewStateProps */
|
|
192
|
-
|
|
193
183
|
/**
|
|
194
|
-
*
|
|
184
|
+
* The input options to the `scaffold` method of the `ScaffolderClient`.
|
|
195
185
|
*
|
|
196
186
|
* @public
|
|
197
187
|
*/
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
* Executes the scaffolding of a component, given a template and its
|
|
202
|
-
* parameter values.
|
|
203
|
-
*
|
|
204
|
-
* @param options - The {@link ScaffolderScaffoldOptions} the scaffolding.
|
|
205
|
-
*/
|
|
206
|
-
scaffold(options: ScaffolderScaffoldOptions): Promise<ScaffolderScaffoldResponse>;
|
|
207
|
-
getTask(taskId: string): Promise<ScaffolderTask>;
|
|
208
|
-
listTasks?(options: {
|
|
209
|
-
filterByOwnership: 'owned' | 'all';
|
|
210
|
-
}): Promise<{
|
|
211
|
-
tasks: ScaffolderTask[];
|
|
212
|
-
}>;
|
|
213
|
-
getIntegrationsList(options: ScaffolderGetIntegrationsListOptions): Promise<ScaffolderGetIntegrationsListResponse>;
|
|
214
|
-
/**
|
|
215
|
-
* Returns a list of all installed actions.
|
|
216
|
-
*/
|
|
217
|
-
listActions(): Promise<ListActionsResponse>;
|
|
218
|
-
streamLogs(options: ScaffolderStreamLogsOptions): Observable<LogEvent>;
|
|
219
|
-
dryRun?(options: ScaffolderDryRunOptions): Promise<ScaffolderDryRunResponse>;
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
/** @public */
|
|
223
|
-
export declare const scaffolderApiRef: ApiRef<ScaffolderApi>;
|
|
224
|
-
|
|
225
|
-
/** @public */
|
|
226
|
-
export declare interface ScaffolderDryRunOptions {
|
|
227
|
-
template: JsonValue;
|
|
228
|
-
values: JsonObject;
|
|
188
|
+
interface ScaffolderScaffoldOptions {
|
|
189
|
+
templateRef: string;
|
|
190
|
+
values: Record<string, JsonValue>;
|
|
229
191
|
secrets?: Record<string, string>;
|
|
230
|
-
directoryContents: {
|
|
231
|
-
path: string;
|
|
232
|
-
base64Content: string;
|
|
233
|
-
}[];
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
/** @public */
|
|
237
|
-
export declare interface ScaffolderDryRunResponse {
|
|
238
|
-
directoryContents: Array<{
|
|
239
|
-
path: string;
|
|
240
|
-
base64Content: string;
|
|
241
|
-
executable: boolean;
|
|
242
|
-
}>;
|
|
243
|
-
log: Array<Pick<LogEvent, 'body'>>;
|
|
244
|
-
steps: TaskStep[];
|
|
245
|
-
output: ScaffolderTaskOutput;
|
|
246
192
|
}
|
|
247
|
-
|
|
248
193
|
/**
|
|
249
|
-
* The
|
|
194
|
+
* The response shape of the `scaffold` method of the `ScaffolderClient`.
|
|
250
195
|
*
|
|
251
196
|
* @public
|
|
252
197
|
*/
|
|
253
|
-
|
|
254
|
-
|
|
198
|
+
interface ScaffolderScaffoldResponse {
|
|
199
|
+
taskId: string;
|
|
200
|
+
}
|
|
255
201
|
/**
|
|
256
202
|
* The arguments for `getIntegrationsList`.
|
|
257
203
|
*
|
|
258
204
|
* @public
|
|
259
205
|
*/
|
|
260
|
-
|
|
206
|
+
interface ScaffolderGetIntegrationsListOptions {
|
|
261
207
|
allowedHosts: string[];
|
|
262
208
|
}
|
|
263
|
-
|
|
264
209
|
/**
|
|
265
210
|
* The response shape for `getIntegrationsList`.
|
|
266
211
|
*
|
|
267
212
|
* @public
|
|
268
213
|
*/
|
|
269
|
-
|
|
214
|
+
interface ScaffolderGetIntegrationsListResponse {
|
|
270
215
|
integrations: {
|
|
271
216
|
type: string;
|
|
272
217
|
title: string;
|
|
273
218
|
host: string;
|
|
274
219
|
}[];
|
|
275
220
|
}
|
|
276
|
-
|
|
277
221
|
/**
|
|
278
|
-
* The
|
|
222
|
+
* The input options to the `streamLogs` method of the `ScaffolderClient`.
|
|
279
223
|
*
|
|
280
224
|
* @public
|
|
281
225
|
*/
|
|
282
|
-
|
|
283
|
-
|
|
226
|
+
interface ScaffolderStreamLogsOptions {
|
|
227
|
+
taskId: string;
|
|
228
|
+
after?: number;
|
|
229
|
+
}
|
|
284
230
|
/** @public */
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
url?: string;
|
|
289
|
-
entityRef?: string;
|
|
290
|
-
};
|
|
291
|
-
|
|
292
|
-
/**
|
|
293
|
-
* The input options to the `scaffold` method of the `ScaffolderClient`.
|
|
294
|
-
*
|
|
295
|
-
* @public
|
|
296
|
-
*/
|
|
297
|
-
export declare interface ScaffolderScaffoldOptions {
|
|
298
|
-
templateRef: string;
|
|
299
|
-
values: Record<string, JsonValue>;
|
|
231
|
+
interface ScaffolderDryRunOptions {
|
|
232
|
+
template: JsonValue;
|
|
233
|
+
values: JsonObject;
|
|
300
234
|
secrets?: Record<string, string>;
|
|
235
|
+
directoryContents: {
|
|
236
|
+
path: string;
|
|
237
|
+
base64Content: string;
|
|
238
|
+
}[];
|
|
301
239
|
}
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
240
|
+
/** @public */
|
|
241
|
+
interface ScaffolderDryRunResponse {
|
|
242
|
+
directoryContents: Array<{
|
|
243
|
+
path: string;
|
|
244
|
+
base64Content: string;
|
|
245
|
+
executable: boolean;
|
|
246
|
+
}>;
|
|
247
|
+
log: Array<Pick<LogEvent, 'body'>>;
|
|
248
|
+
steps: TaskStep[];
|
|
249
|
+
output: ScaffolderTaskOutput;
|
|
310
250
|
}
|
|
311
|
-
|
|
312
251
|
/**
|
|
313
|
-
*
|
|
252
|
+
* An API to interact with the scaffolder backend.
|
|
314
253
|
*
|
|
315
254
|
* @public
|
|
316
255
|
*/
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
256
|
+
interface ScaffolderApi {
|
|
257
|
+
getTemplateParameterSchema(templateRef: string): Promise<TemplateParameterSchema>;
|
|
258
|
+
/**
|
|
259
|
+
* Executes the scaffolding of a component, given a template and its
|
|
260
|
+
* parameter values.
|
|
261
|
+
*
|
|
262
|
+
* @param options - The {@link ScaffolderScaffoldOptions} the scaffolding.
|
|
263
|
+
*/
|
|
264
|
+
scaffold(options: ScaffolderScaffoldOptions): Promise<ScaffolderScaffoldResponse>;
|
|
265
|
+
getTask(taskId: string): Promise<ScaffolderTask>;
|
|
266
|
+
listTasks?(options: {
|
|
267
|
+
filterByOwnership: 'owned' | 'all';
|
|
268
|
+
}): Promise<{
|
|
269
|
+
tasks: ScaffolderTask[];
|
|
270
|
+
}>;
|
|
271
|
+
getIntegrationsList(options: ScaffolderGetIntegrationsListOptions): Promise<ScaffolderGetIntegrationsListResponse>;
|
|
272
|
+
/**
|
|
273
|
+
* Returns a list of all installed actions.
|
|
274
|
+
*/
|
|
275
|
+
listActions(): Promise<ListActionsResponse>;
|
|
276
|
+
streamLogs(options: ScaffolderStreamLogsOptions): Observable<LogEvent>;
|
|
277
|
+
dryRun?(options: ScaffolderDryRunOptions): Promise<ScaffolderDryRunResponse>;
|
|
320
278
|
}
|
|
321
279
|
|
|
280
|
+
/** @public */
|
|
281
|
+
declare const scaffolderApiRef: _backstage_core_plugin_api.ApiRef<ScaffolderApi>;
|
|
282
|
+
|
|
322
283
|
/**
|
|
323
|
-
*
|
|
324
|
-
*
|
|
284
|
+
* Hook that returns all custom field extensions from the current outlet.
|
|
325
285
|
* @public
|
|
326
286
|
*/
|
|
327
|
-
|
|
328
|
-
id: string;
|
|
329
|
-
spec: TaskSpec;
|
|
330
|
-
status: 'failed' | 'completed' | 'processing' | 'open' | 'cancelled';
|
|
331
|
-
lastHeartbeatAt: string;
|
|
332
|
-
createdAt: string;
|
|
333
|
-
};
|
|
334
|
-
|
|
335
|
-
/** @public */
|
|
336
|
-
export declare type ScaffolderTaskOutput = {
|
|
337
|
-
links?: ScaffolderOutputLink[];
|
|
338
|
-
} & {
|
|
339
|
-
[key: string]: unknown;
|
|
340
|
-
};
|
|
287
|
+
declare const useCustomFieldExtensions: <TComponentDataType = FieldExtensionOptions<unknown, unknown>>(outlet: React.ReactNode) => TComponentDataType[];
|
|
341
288
|
|
|
342
289
|
/**
|
|
343
|
-
* The
|
|
290
|
+
* The field template from `@rjsf/core` which is a react component that gets passed `@rjsf/core` field related props.
|
|
344
291
|
*
|
|
345
292
|
* @public
|
|
346
293
|
*/
|
|
347
|
-
|
|
348
|
-
|
|
294
|
+
declare type LayoutTemplate<T = any> = NonNullable<FormProps<T>['uiSchema']>['ui:ObjectFieldTemplate'];
|
|
349
295
|
/**
|
|
350
|
-
* The
|
|
296
|
+
* The type of layouts that is passed to the TemplateForms
|
|
297
|
+
*
|
|
351
298
|
* @public
|
|
352
299
|
*/
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
300
|
+
interface LayoutOptions<P = any> {
|
|
301
|
+
name: string;
|
|
302
|
+
component: LayoutTemplate<P>;
|
|
356
303
|
}
|
|
357
|
-
|
|
358
304
|
/**
|
|
359
|
-
*
|
|
305
|
+
* A type used to wrap up the FieldExtension to embed the ReturnValue and the InputProps
|
|
360
306
|
* @public
|
|
361
307
|
*/
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
/* Excluded from this release type: Stepper */
|
|
365
|
-
|
|
366
|
-
/* Excluded from this release type: StepperProps */
|
|
367
|
-
|
|
368
|
-
/* Excluded from this release type: TemplateCard */
|
|
369
|
-
|
|
370
|
-
/* Excluded from this release type: TemplateCardProps */
|
|
371
|
-
|
|
372
|
-
/* Excluded from this release type: TemplateGroup */
|
|
373
|
-
|
|
374
|
-
/* Excluded from this release type: TemplateGroupProps */
|
|
375
|
-
|
|
308
|
+
declare type LayoutComponent<_TInputProps> = () => null;
|
|
376
309
|
/**
|
|
377
|
-
*
|
|
378
|
-
* as a separate step in the wizard input
|
|
310
|
+
* Method for creating custom Layouts that can be used in the scaffolder frontend form
|
|
379
311
|
*
|
|
380
312
|
* @public
|
|
381
313
|
*/
|
|
382
|
-
|
|
383
|
-
title: string;
|
|
384
|
-
description?: string;
|
|
385
|
-
steps: Array<{
|
|
386
|
-
title: string;
|
|
387
|
-
description?: string;
|
|
388
|
-
schema: JsonObject;
|
|
389
|
-
}>;
|
|
390
|
-
};
|
|
391
|
-
|
|
314
|
+
declare function createScaffolderLayout<TInputProps = unknown>(options: LayoutOptions): Extension<LayoutComponent<TInputProps>>;
|
|
392
315
|
/**
|
|
393
|
-
*
|
|
316
|
+
* The wrapping component for defining scaffolder layouts as children
|
|
317
|
+
*
|
|
394
318
|
* @public
|
|
395
319
|
*/
|
|
396
|
-
|
|
320
|
+
declare const ScaffolderLayouts: React.ComponentType;
|
|
397
321
|
|
|
398
322
|
/**
|
|
399
323
|
* Hook that returns all custom field extensions from the current outlet.
|
|
400
324
|
* @public
|
|
401
325
|
*/
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
/* Excluded from this release type: useFormDataFromQuery */
|
|
405
|
-
|
|
406
|
-
/* Excluded from this release type: useTemplateParameterSchema */
|
|
407
|
-
|
|
408
|
-
/* Excluded from this release type: useTemplateSchema */
|
|
409
|
-
|
|
410
|
-
/**
|
|
411
|
-
* Hook to access the secrets context to be able to set secrets that are
|
|
412
|
-
* passed to the Scaffolder backend.
|
|
413
|
-
* @public
|
|
414
|
-
*/
|
|
415
|
-
export declare const useTemplateSecrets: () => ScaffolderUseTemplateSecrets;
|
|
416
|
-
|
|
417
|
-
/* Excluded from this release type: Workflow */
|
|
418
|
-
|
|
419
|
-
/* Excluded from this release type: WorkflowProps */
|
|
326
|
+
declare const useCustomLayouts: <TComponentDataType = LayoutOptions<any>>(outlet: React.ReactNode) => TComponentDataType[];
|
|
420
327
|
|
|
421
|
-
export { }
|
|
328
|
+
export { Action, ActionExample, CustomFieldExtensionSchema, CustomFieldValidator, FieldExtensionComponent, FieldExtensionComponentProps, FieldExtensionOptions, LayoutComponent, LayoutOptions, LayoutTemplate, ListActionsResponse, LogEvent, ScaffolderApi, ScaffolderDryRunOptions, ScaffolderDryRunResponse, ScaffolderFieldExtensions, ScaffolderGetIntegrationsListOptions, ScaffolderGetIntegrationsListResponse, ScaffolderLayouts, ScaffolderOutputLink, ScaffolderScaffoldOptions, ScaffolderScaffoldResponse, ScaffolderStreamLogsOptions, ScaffolderTask, ScaffolderTaskOutput, ScaffolderTaskStatus, ScaffolderUseTemplateSecrets, SecretsContextProvider, TemplateParameterSchema, createScaffolderFieldExtension, createScaffolderLayout, scaffolderApiRef, useCustomFieldExtensions, useCustomLayouts, useTemplateSecrets };
|