Fix API report
Signed-off-by: solimant <solimant@users.noreply.github.com>
This commit is contained in:
@@ -274,7 +274,7 @@ type EndpointMap = Record<
|
||||
{
|
||||
query?: object;
|
||||
body?: object;
|
||||
response?: object | void;
|
||||
response?: object | string | void;
|
||||
path?: object;
|
||||
}
|
||||
>;
|
||||
|
||||
@@ -7,15 +7,369 @@ import { Entity } from '@backstage/catalog-model';
|
||||
import type { EntityMeta } from '@backstage/catalog-model';
|
||||
import type { JsonArray } from '@backstage/types';
|
||||
import { JsonObject } from '@backstage/types';
|
||||
import type { JsonValue } from '@backstage/types';
|
||||
import { JSONSchema7 } from 'json-schema';
|
||||
import { JsonValue } from '@backstage/types';
|
||||
import { KindValidator } from '@backstage/catalog-model';
|
||||
import { Observable } from '@backstage/types';
|
||||
import { ScmIntegrationRegistry } from '@backstage/integration';
|
||||
import type { UserEntity } from '@backstage/catalog-model';
|
||||
|
||||
// @public
|
||||
export type Action = {
|
||||
id: string;
|
||||
description?: string;
|
||||
schema?: {
|
||||
input?: JSONSchema7;
|
||||
output?: JSONSchema7;
|
||||
};
|
||||
examples?: ActionExample[];
|
||||
};
|
||||
|
||||
// @public
|
||||
export interface ActionExample {
|
||||
// (undocumented)
|
||||
description: string;
|
||||
// (undocumented)
|
||||
example: string;
|
||||
}
|
||||
|
||||
// @public
|
||||
export const isTemplateEntityV1beta3: (
|
||||
entity: Entity,
|
||||
) => entity is TemplateEntityV1beta3;
|
||||
|
||||
// @public
|
||||
export type ListActionsResponse = Array<Action>;
|
||||
|
||||
// @public
|
||||
export type LogEvent = {
|
||||
type: TaskEventType;
|
||||
body: {
|
||||
message: string;
|
||||
stepId?: string;
|
||||
status?: ScaffolderTaskStatus;
|
||||
};
|
||||
createdAt: string;
|
||||
id: number;
|
||||
taskId: string;
|
||||
};
|
||||
|
||||
// @public
|
||||
export interface ScaffolderApi {
|
||||
// (undocumented)
|
||||
autocomplete?(
|
||||
request: {
|
||||
token: string;
|
||||
provider: string;
|
||||
resource: string;
|
||||
context: Record<string, string>;
|
||||
},
|
||||
options?: ScaffolderRequestOptions,
|
||||
): Promise<{
|
||||
results: {
|
||||
title?: string;
|
||||
id: string;
|
||||
}[];
|
||||
}>;
|
||||
cancelTask(
|
||||
taskId: string,
|
||||
options?: ScaffolderRequestOptions,
|
||||
): Promise<{
|
||||
status?: ScaffolderTaskStatus;
|
||||
}>;
|
||||
// (undocumented)
|
||||
dryRun?(
|
||||
request: ScaffolderDryRunOptions,
|
||||
options?: ScaffolderRequestOptions,
|
||||
): Promise<ScaffolderDryRunResponse>;
|
||||
// (undocumented)
|
||||
getIntegrationsList(
|
||||
options: ScaffolderGetIntegrationsListOptions,
|
||||
): Promise<ScaffolderGetIntegrationsListResponse>;
|
||||
// (undocumented)
|
||||
getTask(
|
||||
taskId: string,
|
||||
options?: ScaffolderRequestOptions,
|
||||
): Promise<ScaffolderTask>;
|
||||
// (undocumented)
|
||||
getTemplateParameterSchema(
|
||||
templateRef: string,
|
||||
options?: ScaffolderRequestOptions,
|
||||
): Promise<TemplateParameterSchema>;
|
||||
listActions(options?: ScaffolderRequestOptions): Promise<ListActionsResponse>;
|
||||
// (undocumented)
|
||||
listTasks?(
|
||||
request: {
|
||||
filterByOwnership: 'owned' | 'all';
|
||||
limit?: number;
|
||||
offset?: number;
|
||||
},
|
||||
options?: ScaffolderRequestOptions,
|
||||
): Promise<{
|
||||
tasks: ScaffolderTask[];
|
||||
totalTasks?: number;
|
||||
}>;
|
||||
retry?(
|
||||
{
|
||||
secrets,
|
||||
taskId,
|
||||
}: {
|
||||
secrets?: Record<string, string>;
|
||||
taskId: string;
|
||||
},
|
||||
options?: ScaffolderRequestOptions,
|
||||
): Promise<{
|
||||
id: string;
|
||||
}>;
|
||||
scaffold(
|
||||
request: ScaffolderScaffoldOptions,
|
||||
options?: ScaffolderRequestOptions,
|
||||
): Promise<ScaffolderScaffoldResponse>;
|
||||
// (undocumented)
|
||||
streamLogs(
|
||||
request: ScaffolderStreamLogsOptions,
|
||||
options?: ScaffolderRequestOptions,
|
||||
): Observable<LogEvent>;
|
||||
}
|
||||
|
||||
// @public
|
||||
export class ScaffolderClient implements ScaffolderApi {
|
||||
constructor(options: {
|
||||
discoveryApi: {
|
||||
getBaseUrl(pluginId: string): Promise<string>;
|
||||
};
|
||||
fetchApi: {
|
||||
fetch: typeof fetch;
|
||||
};
|
||||
identityApi?: {
|
||||
getBackstageIdentity(): Promise<{
|
||||
type: 'user';
|
||||
userEntityRef: string;
|
||||
ownershipEntityRefs: string[];
|
||||
}>;
|
||||
};
|
||||
scmIntegrationsApi: ScmIntegrationRegistry;
|
||||
useLongPollingLogs?: boolean;
|
||||
});
|
||||
autocomplete({
|
||||
token,
|
||||
resource,
|
||||
provider,
|
||||
context,
|
||||
}: {
|
||||
token: string;
|
||||
provider: string;
|
||||
resource: string;
|
||||
context: Record<string, string>;
|
||||
}): Promise<{
|
||||
results: {
|
||||
title?: string;
|
||||
id: string;
|
||||
}[];
|
||||
}>;
|
||||
cancelTask(
|
||||
taskId: string,
|
||||
options?: ScaffolderRequestOptions,
|
||||
): Promise<{
|
||||
status?: ScaffolderTaskStatus;
|
||||
}>;
|
||||
// (undocumented)
|
||||
dryRun(
|
||||
request: ScaffolderDryRunOptions,
|
||||
options?: ScaffolderRequestOptions,
|
||||
): Promise<ScaffolderDryRunResponse>;
|
||||
// (undocumented)
|
||||
getIntegrationsList(
|
||||
options: ScaffolderGetIntegrationsListOptions,
|
||||
): Promise<ScaffolderGetIntegrationsListResponse>;
|
||||
// (undocumented)
|
||||
getTask(
|
||||
taskId: string,
|
||||
options?: ScaffolderRequestOptions,
|
||||
): Promise<ScaffolderTask>;
|
||||
// (undocumented)
|
||||
getTemplateParameterSchema(
|
||||
templateRef: string,
|
||||
options?: ScaffolderRequestOptions,
|
||||
): Promise<TemplateParameterSchema>;
|
||||
listActions(options?: ScaffolderRequestOptions): Promise<ListActionsResponse>;
|
||||
// (undocumented)
|
||||
listTasks(
|
||||
request: {
|
||||
filterByOwnership: 'owned' | 'all';
|
||||
limit?: number;
|
||||
offset?: number;
|
||||
},
|
||||
options?: ScaffolderRequestOptions,
|
||||
): Promise<{
|
||||
tasks: ScaffolderTask[];
|
||||
totalTasks?: number;
|
||||
}>;
|
||||
retry?(
|
||||
{
|
||||
secrets,
|
||||
taskId,
|
||||
}: {
|
||||
secrets?: Record<string, string>;
|
||||
taskId: string;
|
||||
},
|
||||
options?: ScaffolderRequestOptions,
|
||||
): Promise<{
|
||||
id: string;
|
||||
}>;
|
||||
scaffold(
|
||||
request: ScaffolderScaffoldOptions,
|
||||
options?: ScaffolderRequestOptions,
|
||||
): Promise<ScaffolderScaffoldResponse>;
|
||||
// (undocumented)
|
||||
streamLogs(
|
||||
request: ScaffolderStreamLogsOptions,
|
||||
options?: ScaffolderRequestOptions,
|
||||
): Observable<LogEvent>;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export interface ScaffolderDryRunOptions {
|
||||
// (undocumented)
|
||||
directoryContents: {
|
||||
path: string;
|
||||
base64Content: string;
|
||||
}[];
|
||||
// (undocumented)
|
||||
secrets?: Record<string, string>;
|
||||
// (undocumented)
|
||||
template: TemplateEntityV1beta3;
|
||||
// (undocumented)
|
||||
values: JsonObject;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export interface ScaffolderDryRunResponse {
|
||||
// (undocumented)
|
||||
directoryContents: Array<{
|
||||
path: string;
|
||||
base64Content: string;
|
||||
executable?: boolean;
|
||||
}>;
|
||||
// (undocumented)
|
||||
log: Array<Pick<LogEvent, 'body'>>;
|
||||
// (undocumented)
|
||||
output: ScaffolderTaskOutput;
|
||||
// (undocumented)
|
||||
steps: TaskStep[];
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface ScaffolderGetIntegrationsListOptions {
|
||||
// (undocumented)
|
||||
allowedHosts: string[];
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface ScaffolderGetIntegrationsListResponse {
|
||||
// (undocumented)
|
||||
integrations: {
|
||||
type: string;
|
||||
title: string;
|
||||
host: string;
|
||||
}[];
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export type ScaffolderOutputLink = {
|
||||
title?: string;
|
||||
icon?: string;
|
||||
url?: string;
|
||||
entityRef?: string;
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export type ScaffolderOutputText = {
|
||||
title?: string;
|
||||
icon?: string;
|
||||
content?: string;
|
||||
default?: boolean;
|
||||
};
|
||||
|
||||
// @public
|
||||
export interface ScaffolderRequestOptions {
|
||||
// (undocumented)
|
||||
token?: string;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface ScaffolderScaffoldOptions {
|
||||
// (undocumented)
|
||||
secrets?: Record<string, string>;
|
||||
// (undocumented)
|
||||
templateRef: string;
|
||||
// (undocumented)
|
||||
values: Record<string, JsonValue>;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface ScaffolderScaffoldResponse {
|
||||
// (undocumented)
|
||||
taskId: string;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface ScaffolderStreamLogsOptions {
|
||||
// (undocumented)
|
||||
after?: number;
|
||||
// (undocumented)
|
||||
isTaskRecoverable?: boolean;
|
||||
// (undocumented)
|
||||
taskId: string;
|
||||
}
|
||||
|
||||
// @public
|
||||
export type ScaffolderTask = {
|
||||
id: string;
|
||||
spec: TaskSpec;
|
||||
status: ScaffolderTaskStatus;
|
||||
lastHeartbeatAt?: string;
|
||||
createdAt: string;
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export type ScaffolderTaskOutput = {
|
||||
links?: ScaffolderOutputLink[];
|
||||
text?: ScaffolderOutputText[];
|
||||
} & {
|
||||
[key: string]: unknown;
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export type ScaffolderTaskStatus =
|
||||
| 'cancelled'
|
||||
| 'completed'
|
||||
| 'failed'
|
||||
| 'open'
|
||||
| 'processing'
|
||||
| 'skipped';
|
||||
|
||||
// @public (undocumented)
|
||||
export const ScaffolderTaskStatus: {
|
||||
Cancelled: ScaffolderTaskStatus;
|
||||
Completed: ScaffolderTaskStatus;
|
||||
Failed: ScaffolderTaskStatus;
|
||||
Open: ScaffolderTaskStatus;
|
||||
Processing: ScaffolderTaskStatus;
|
||||
Skipped: ScaffolderTaskStatus;
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export type TaskEventType = 'cancelled' | 'completion' | 'log' | 'recovered';
|
||||
|
||||
// @public (undocumented)
|
||||
export const TaskEventType: {
|
||||
Cancelled: TaskEventType;
|
||||
Completion: TaskEventType;
|
||||
Log: TaskEventType;
|
||||
Recovered: TaskEventType;
|
||||
};
|
||||
|
||||
// @public
|
||||
export type TaskRecoverStrategy = 'none' | 'startOver';
|
||||
|
||||
@@ -103,6 +457,22 @@ export type TemplateInfo = {
|
||||
};
|
||||
};
|
||||
|
||||
// @public
|
||||
export type TemplateParameterSchema = {
|
||||
title: string;
|
||||
description?: string;
|
||||
presentation?: TemplatePresentationV1beta3;
|
||||
steps: Array<{
|
||||
title: string;
|
||||
description?: string;
|
||||
schema: JsonObject;
|
||||
}>;
|
||||
EXPERIMENTAL_formDecorators?: {
|
||||
id: string;
|
||||
input?: JsonObject;
|
||||
}[];
|
||||
};
|
||||
|
||||
// @public
|
||||
export interface TemplateParametersV1beta3 extends JsonObject {
|
||||
// (undocumented)
|
||||
|
||||
@@ -45,9 +45,6 @@ import {
|
||||
TaskStatus,
|
||||
TypedResponse,
|
||||
} from '../client/src/schema/openapi';
|
||||
import { DiscoveryApi } from '../client/src/schema/openapi/generated/types/discovery';
|
||||
import { FetchApi } from '../client/src/schema/openapi/generated/types/fetch';
|
||||
import { IdentityApi } from './types/IdentityApi';
|
||||
|
||||
/**
|
||||
* An API to interact with the scaffolder backend.
|
||||
@@ -56,16 +53,30 @@ import { IdentityApi } from './types/IdentityApi';
|
||||
*/
|
||||
export class ScaffolderClient implements ScaffolderApi {
|
||||
private readonly apiClient: DefaultApiClient;
|
||||
private readonly discoveryApi: DiscoveryApi;
|
||||
private readonly discoveryApi: {
|
||||
getBaseUrl(pluginId: string): Promise<string>;
|
||||
};
|
||||
private readonly scmIntegrationsApi: ScmIntegrationRegistry;
|
||||
private readonly fetchApi: FetchApi;
|
||||
private readonly identityApi?: IdentityApi;
|
||||
private readonly fetchApi: { fetch: typeof fetch };
|
||||
private readonly identityApi?: {
|
||||
getBackstageIdentity(): Promise<{
|
||||
type: 'user';
|
||||
userEntityRef: string;
|
||||
ownershipEntityRefs: string[];
|
||||
}>;
|
||||
};
|
||||
private readonly useLongPollingLogs: boolean;
|
||||
|
||||
constructor(options: {
|
||||
discoveryApi: DiscoveryApi;
|
||||
fetchApi: FetchApi;
|
||||
identityApi?: IdentityApi;
|
||||
discoveryApi: { getBaseUrl(pluginId: string): Promise<string> };
|
||||
fetchApi: { fetch: typeof fetch };
|
||||
identityApi?: {
|
||||
getBackstageIdentity(): Promise<{
|
||||
type: 'user';
|
||||
userEntityRef: string;
|
||||
ownershipEntityRefs: string[];
|
||||
}>;
|
||||
};
|
||||
scmIntegrationsApi: ScmIntegrationRegistry;
|
||||
useLongPollingLogs?: boolean;
|
||||
}) {
|
||||
|
||||
@@ -25,7 +25,7 @@ import type {
|
||||
TaskStatus as ScaffolderTaskStatus,
|
||||
} from '../client/src/schema/openapi';
|
||||
|
||||
export type { ScaffolderTaskStatus };
|
||||
export type { ScaffolderTaskStatus, TaskEventType };
|
||||
|
||||
/**
|
||||
* Options you can pass into a Scaffolder request for additional information.
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
/*
|
||||
* Copyright 2020 The Backstage Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* This is a copy of the BackstageUserIdentity, to avoid importing core-plugin-api.
|
||||
*/
|
||||
type BackstageUserIdentity = {
|
||||
/**
|
||||
* The type of identity that this structure represents. In the frontend app
|
||||
* this will currently always be 'user'.
|
||||
*/
|
||||
type: 'user';
|
||||
|
||||
/**
|
||||
* The entityRef of the user in the catalog.
|
||||
* For example User:default/sandra
|
||||
*/
|
||||
userEntityRef: string;
|
||||
|
||||
/**
|
||||
* The user and group entities that the user claims ownership through
|
||||
*/
|
||||
ownershipEntityRefs: string[];
|
||||
};
|
||||
|
||||
/**
|
||||
* This is a partial copy of the IdentityApi, to avoid importing core-plugin-api.
|
||||
*/
|
||||
export type IdentityApi = {
|
||||
/**
|
||||
* User identity information within Backstage.
|
||||
*/
|
||||
getBackstageIdentity(): Promise<BackstageUserIdentity>;
|
||||
};
|
||||
@@ -340,7 +340,11 @@ export type SerializedTaskEvent = {
|
||||
id: number;
|
||||
isTaskRecoverable?: boolean;
|
||||
taskId: string;
|
||||
body: JsonObject;
|
||||
body: {
|
||||
message: string;
|
||||
stepId?: string;
|
||||
status?: TaskStatus;
|
||||
} & JsonObject;
|
||||
type: TaskEventType;
|
||||
createdAt: string;
|
||||
};
|
||||
@@ -485,7 +489,8 @@ export type TaskStatus =
|
||||
| 'completed'
|
||||
| 'failed'
|
||||
| 'open'
|
||||
| 'processing';
|
||||
| 'processing'
|
||||
| 'skipped';
|
||||
|
||||
// @public (undocumented)
|
||||
export type TemplateAction<
|
||||
|
||||
@@ -39,6 +39,7 @@ import { TaskStep } from '@backstage/plugin-scaffolder-common';
|
||||
import { TemplateEntityV1beta3 } from '@backstage/plugin-scaffolder-common';
|
||||
import { TemplateGroupFilter } from '@backstage/plugin-scaffolder-react';
|
||||
import { TemplateParameterSchema } from '@backstage/plugin-scaffolder-react';
|
||||
import { TemplateParameterSchema as TemplateParameterSchema_2 } from '@backstage/plugin-scaffolder-common';
|
||||
import { TemplatePresentationV1beta3 } from '@backstage/plugin-scaffolder-common';
|
||||
import { TranslationRef } from '@backstage/core-plugin-api/alpha';
|
||||
import { UiSchema } from '@rjsf/utils';
|
||||
@@ -486,7 +487,7 @@ export const useFormDataFromQuery: (
|
||||
|
||||
// @alpha (undocumented)
|
||||
export const useTemplateParameterSchema: (templateRef: string) => {
|
||||
manifest?: TemplateParameterSchema;
|
||||
manifest?: TemplateParameterSchema_2;
|
||||
loading: boolean;
|
||||
error?: Error;
|
||||
};
|
||||
|
||||
@@ -3,6 +3,10 @@
|
||||
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
||||
|
||||
```ts
|
||||
/// <reference types="react" />
|
||||
|
||||
import { Action as Action_2 } from '@backstage/plugin-scaffolder-common';
|
||||
import { ActionExample as ActionExample_2 } from '@backstage/plugin-scaffolder-common';
|
||||
import { ApiHolder } from '@backstage/core-plugin-api';
|
||||
import { ApiRef } from '@backstage/frontend-plugin-api';
|
||||
import { ComponentType } from 'react';
|
||||
@@ -23,9 +27,9 @@ import { IChangeEvent } from '@rjsf/core';
|
||||
import { IdSchema } from '@rjsf/utils';
|
||||
import { JsonObject } from '@backstage/types';
|
||||
import { JSONSchema7 } from 'json-schema';
|
||||
import { JsonValue } from '@backstage/types';
|
||||
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
||||
import { Observable } from '@backstage/types';
|
||||
import { ListActionsResponse as ListActionsResponse_2 } from '@backstage/plugin-scaffolder-common';
|
||||
import { ListTemplatingExtensionsResponse as ListTemplatingExtensionsResponse_2 } from '@backstage/plugin-scaffolder-common';
|
||||
import { LogEvent as LogEvent_2 } from '@backstage/plugin-scaffolder-common';
|
||||
import { PropsWithChildren } from 'react';
|
||||
import { ReactNode } from 'react';
|
||||
import { Ref } from 'react';
|
||||
@@ -33,30 +37,33 @@ import { Registry } from '@rjsf/utils';
|
||||
import { RegistryWidgetsType } from '@rjsf/utils';
|
||||
import { RJSFSchema } from '@rjsf/utils';
|
||||
import { RJSFValidationError } from '@rjsf/utils';
|
||||
import { ScaffolderApi as ScaffolderApi_2 } from '@backstage/plugin-scaffolder-common';
|
||||
import { ScaffolderDryRunOptions as ScaffolderDryRunOptions_2 } from '@backstage/plugin-scaffolder-common';
|
||||
import { ScaffolderDryRunResponse as ScaffolderDryRunResponse_2 } from '@backstage/plugin-scaffolder-common';
|
||||
import { ScaffolderGetIntegrationsListOptions as ScaffolderGetIntegrationsListOptions_2 } from '@backstage/plugin-scaffolder-common';
|
||||
import { ScaffolderGetIntegrationsListResponse as ScaffolderGetIntegrationsListResponse_2 } from '@backstage/plugin-scaffolder-common';
|
||||
import { ScaffolderOutputLink as ScaffolderOutputLink_2 } from '@backstage/plugin-scaffolder-common';
|
||||
import { ScaffolderOutputText as ScaffolderOutputText_2 } from '@backstage/plugin-scaffolder-common';
|
||||
import { ScaffolderScaffoldOptions as ScaffolderScaffoldOptions_2 } from '@backstage/plugin-scaffolder-common';
|
||||
import { ScaffolderScaffoldResponse as ScaffolderScaffoldResponse_2 } from '@backstage/plugin-scaffolder-common';
|
||||
import { ScaffolderStreamLogsOptions as ScaffolderStreamLogsOptions_2 } from '@backstage/plugin-scaffolder-common';
|
||||
import { ScaffolderTask as ScaffolderTask_2 } from '@backstage/plugin-scaffolder-common';
|
||||
import { ScaffolderTaskOutput as ScaffolderTaskOutput_2 } from '@backstage/plugin-scaffolder-common';
|
||||
import { ScaffolderTaskStatus as ScaffolderTaskStatus_2 } from '@backstage/plugin-scaffolder-common';
|
||||
import { StrictRJSFSchema } from '@rjsf/utils';
|
||||
import { TaskSpec } from '@backstage/plugin-scaffolder-common';
|
||||
import { TaskStep } from '@backstage/plugin-scaffolder-common';
|
||||
import { TemplateEntityV1beta3 } from '@backstage/plugin-scaffolder-common';
|
||||
import { TemplatePresentationV1beta3 } from '@backstage/plugin-scaffolder-common';
|
||||
import { TemplateParameterSchema as TemplateParameterSchema_2 } from '@backstage/plugin-scaffolder-common';
|
||||
import { TemplatesType } from '@rjsf/utils';
|
||||
import { UIOptionsType } from '@rjsf/utils';
|
||||
import { UiSchema } from '@rjsf/utils';
|
||||
import { ValidatorType } from '@rjsf/utils';
|
||||
import { z } from 'zod';
|
||||
|
||||
// @public
|
||||
export type Action = {
|
||||
id: string;
|
||||
description?: string;
|
||||
schema?: {
|
||||
input?: JSONSchema7;
|
||||
output?: JSONSchema7;
|
||||
};
|
||||
examples?: ActionExample[];
|
||||
};
|
||||
// @public @deprecated
|
||||
export type Action = Action_2;
|
||||
|
||||
// @public @deprecated
|
||||
export type ActionExample = ScaffolderUsageExample;
|
||||
export type ActionExample = ActionExample_2;
|
||||
|
||||
// @public
|
||||
export function createScaffolderFieldExtension<
|
||||
@@ -162,30 +169,14 @@ export type LayoutTemplate<T = any> = NonNullable<
|
||||
FormProps_2<T>['uiSchema']
|
||||
>['ui:ObjectFieldTemplate'];
|
||||
|
||||
// @public
|
||||
export type ListActionsResponse = Array<Action>;
|
||||
// @public @deprecated
|
||||
export type ListActionsResponse = ListActionsResponse_2;
|
||||
|
||||
// @public
|
||||
export type ListTemplatingExtensionsResponse = {
|
||||
filters: Record<string, TemplateFilter>;
|
||||
globals: {
|
||||
functions: Record<string, TemplateGlobalFunction>;
|
||||
values: Record<string, TemplateGlobalValue>;
|
||||
};
|
||||
};
|
||||
// @public @deprecated
|
||||
export type ListTemplatingExtensionsResponse = ListTemplatingExtensionsResponse_2;
|
||||
|
||||
// @public
|
||||
export type LogEvent = {
|
||||
type: 'log' | 'completion' | 'cancelled' | 'recovered';
|
||||
body: {
|
||||
message: string;
|
||||
stepId?: string;
|
||||
status?: ScaffolderTaskStatus;
|
||||
};
|
||||
createdAt: string;
|
||||
id: string;
|
||||
taskId: string;
|
||||
};
|
||||
// @public @deprecated
|
||||
export type LogEvent = LogEvent_2;
|
||||
|
||||
// @public (undocumented)
|
||||
export function makeFieldSchema<
|
||||
@@ -210,125 +201,39 @@ export type ReviewStepProps = {
|
||||
}[];
|
||||
};
|
||||
|
||||
// @public
|
||||
export interface ScaffolderApi {
|
||||
// (undocumented)
|
||||
autocomplete?(options: {
|
||||
token: string;
|
||||
provider: string;
|
||||
resource: string;
|
||||
context?: Record<string, string>;
|
||||
}): Promise<{
|
||||
results: {
|
||||
title?: string;
|
||||
id: string;
|
||||
}[];
|
||||
}>;
|
||||
cancelTask(taskId: string): Promise<void>;
|
||||
// (undocumented)
|
||||
dryRun?(options: ScaffolderDryRunOptions): Promise<ScaffolderDryRunResponse>;
|
||||
// (undocumented)
|
||||
getIntegrationsList(
|
||||
options: ScaffolderGetIntegrationsListOptions,
|
||||
): Promise<ScaffolderGetIntegrationsListResponse>;
|
||||
// (undocumented)
|
||||
getTask(taskId: string): Promise<ScaffolderTask>;
|
||||
// (undocumented)
|
||||
getTemplateParameterSchema(
|
||||
templateRef: string,
|
||||
): Promise<TemplateParameterSchema>;
|
||||
listActions(): Promise<ListActionsResponse>;
|
||||
// (undocumented)
|
||||
listTasks?(options: {
|
||||
filterByOwnership: 'owned' | 'all';
|
||||
limit?: number;
|
||||
offset?: number;
|
||||
}): Promise<{
|
||||
tasks: ScaffolderTask[];
|
||||
totalTasks?: number;
|
||||
}>;
|
||||
listTemplatingExtensions?(): Promise<ListTemplatingExtensionsResponse>;
|
||||
retry?(taskId: string): Promise<void>;
|
||||
scaffold(
|
||||
options: ScaffolderScaffoldOptions,
|
||||
): Promise<ScaffolderScaffoldResponse>;
|
||||
// (undocumented)
|
||||
streamLogs(options: ScaffolderStreamLogsOptions): Observable<LogEvent>;
|
||||
}
|
||||
// @public @deprecated
|
||||
export type ScaffolderApi = ScaffolderApi_2;
|
||||
|
||||
// @public (undocumented)
|
||||
export const scaffolderApiRef: ApiRef<ScaffolderApi>;
|
||||
export const scaffolderApiRef: ApiRef<ScaffolderApi_2>;
|
||||
|
||||
// @public (undocumented)
|
||||
export interface ScaffolderDryRunOptions {
|
||||
// (undocumented)
|
||||
directoryContents: {
|
||||
path: string;
|
||||
base64Content: string;
|
||||
}[];
|
||||
// (undocumented)
|
||||
secrets?: Record<string, string>;
|
||||
// (undocumented)
|
||||
template: JsonValue;
|
||||
// (undocumented)
|
||||
values: JsonObject;
|
||||
}
|
||||
// @public @deprecated (undocumented)
|
||||
export type ScaffolderDryRunOptions = ScaffolderDryRunOptions_2;
|
||||
|
||||
// @public (undocumented)
|
||||
export interface ScaffolderDryRunResponse {
|
||||
// (undocumented)
|
||||
directoryContents: Array<{
|
||||
path: string;
|
||||
base64Content: string;
|
||||
executable: boolean;
|
||||
}>;
|
||||
// (undocumented)
|
||||
log: Array<Pick<LogEvent, 'body'>>;
|
||||
// (undocumented)
|
||||
output: ScaffolderTaskOutput;
|
||||
// (undocumented)
|
||||
steps: TaskStep[];
|
||||
}
|
||||
// @public @deprecated (undocumented)
|
||||
export type ScaffolderDryRunResponse = ScaffolderDryRunResponse_2;
|
||||
|
||||
// @public
|
||||
export const ScaffolderFieldExtensions: React.ComponentType<
|
||||
React.PropsWithChildren<{}>
|
||||
>;
|
||||
|
||||
// @public
|
||||
export interface ScaffolderGetIntegrationsListOptions {
|
||||
// (undocumented)
|
||||
allowedHosts: string[];
|
||||
}
|
||||
// @public @deprecated
|
||||
export type ScaffolderGetIntegrationsListOptions =
|
||||
ScaffolderGetIntegrationsListOptions_2;
|
||||
|
||||
// @public
|
||||
export interface ScaffolderGetIntegrationsListResponse {
|
||||
// (undocumented)
|
||||
integrations: {
|
||||
type: string;
|
||||
title: string;
|
||||
host: string;
|
||||
}[];
|
||||
}
|
||||
// @public @deprecated
|
||||
export type ScaffolderGetIntegrationsListResponse =
|
||||
ScaffolderGetIntegrationsListResponse_2;
|
||||
|
||||
// @public
|
||||
export const ScaffolderLayouts: ComponentType<PropsWithChildren<{}>>;
|
||||
|
||||
// @public (undocumented)
|
||||
export type ScaffolderOutputLink = {
|
||||
title?: string;
|
||||
icon?: string;
|
||||
url?: string;
|
||||
entityRef?: string;
|
||||
};
|
||||
// @public @deprecated (undocumented)
|
||||
export type ScaffolderOutputLink = ScaffolderOutputLink_2;
|
||||
|
||||
// @public (undocumented)
|
||||
export type ScaffolderOutputText = {
|
||||
title?: string;
|
||||
icon?: string;
|
||||
content?: string;
|
||||
default?: boolean;
|
||||
};
|
||||
// @public @deprecated (undocumented)
|
||||
export type ScaffolderOutputText = ScaffolderOutputText_2;
|
||||
|
||||
// @public
|
||||
export type ScaffolderRJSFField<
|
||||
@@ -437,21 +342,11 @@ export type ScaffolderRJSFRegistryFieldsType<
|
||||
[name: string]: ScaffolderRJSFField<T, S, F>;
|
||||
};
|
||||
|
||||
// @public
|
||||
export interface ScaffolderScaffoldOptions {
|
||||
// (undocumented)
|
||||
secrets?: Record<string, string>;
|
||||
// (undocumented)
|
||||
templateRef: string;
|
||||
// (undocumented)
|
||||
values: Record<string, JsonValue>;
|
||||
}
|
||||
// @public @deprecated
|
||||
export type ScaffolderScaffoldOptions = ScaffolderScaffoldOptions_2;
|
||||
|
||||
// @public
|
||||
export interface ScaffolderScaffoldResponse {
|
||||
// (undocumented)
|
||||
taskId: string;
|
||||
}
|
||||
// @public @deprecated
|
||||
export type ScaffolderScaffoldResponse = ScaffolderScaffoldResponse_2;
|
||||
|
||||
// @public
|
||||
export type ScaffolderStep = {
|
||||
@@ -461,41 +356,17 @@ export type ScaffolderStep = {
|
||||
startedAt?: string;
|
||||
};
|
||||
|
||||
// @public
|
||||
export interface ScaffolderStreamLogsOptions {
|
||||
// (undocumented)
|
||||
after?: number;
|
||||
// (undocumented)
|
||||
isTaskRecoverable?: boolean;
|
||||
// (undocumented)
|
||||
taskId: string;
|
||||
}
|
||||
// @public @deprecated
|
||||
export type ScaffolderStreamLogsOptions = ScaffolderStreamLogsOptions_2;
|
||||
|
||||
// @public
|
||||
export type ScaffolderTask = {
|
||||
id: string;
|
||||
spec: TaskSpec;
|
||||
status: 'failed' | 'completed' | 'processing' | 'open' | 'cancelled';
|
||||
lastHeartbeatAt: string;
|
||||
createdAt: string;
|
||||
};
|
||||
// @public @deprecated
|
||||
export type ScaffolderTask = ScaffolderTask_2;
|
||||
|
||||
// @public (undocumented)
|
||||
export type ScaffolderTaskOutput = {
|
||||
links?: ScaffolderOutputLink[];
|
||||
text?: ScaffolderOutputText[];
|
||||
} & {
|
||||
[key: string]: unknown;
|
||||
};
|
||||
// @public @deprecated (undocumented)
|
||||
export type ScaffolderTaskOutput = ScaffolderTaskOutput_2;
|
||||
|
||||
// @public
|
||||
export type ScaffolderTaskStatus =
|
||||
| 'cancelled'
|
||||
| 'completed'
|
||||
| 'failed'
|
||||
| 'open'
|
||||
| 'processing'
|
||||
| 'skipped';
|
||||
// @public @deprecated
|
||||
export type ScaffolderTaskStatus = ScaffolderTaskStatus_2;
|
||||
|
||||
// @public
|
||||
export type ScaffolderUsageExample = {
|
||||
@@ -568,21 +439,8 @@ export type TemplateGroupFilter = {
|
||||
filter: (entity: TemplateEntityV1beta3) => boolean;
|
||||
};
|
||||
|
||||
// @public
|
||||
export type TemplateParameterSchema = {
|
||||
title: string;
|
||||
description?: string;
|
||||
presentation?: TemplatePresentationV1beta3;
|
||||
steps: Array<{
|
||||
title: string;
|
||||
description?: string;
|
||||
schema: JsonObject;
|
||||
}>;
|
||||
EXPERIMENTAL_formDecorators?: {
|
||||
id: string;
|
||||
input?: JsonObject;
|
||||
}[];
|
||||
};
|
||||
// @public @deprecated
|
||||
export type TemplateParameterSchema = TemplateParameterSchema_2;
|
||||
|
||||
// @public
|
||||
export const useCustomFieldExtensions: <
|
||||
|
||||
@@ -11,47 +11,43 @@ import { createScaffolderFieldExtension as createScaffolderFieldExtension_2 } fr
|
||||
import { createScaffolderLayout as createScaffolderLayout_2 } from '@backstage/plugin-scaffolder-react';
|
||||
import { CustomFieldExtensionSchema as CustomFieldExtensionSchema_2 } from '@backstage/plugin-scaffolder-react';
|
||||
import { CustomFieldValidator as CustomFieldValidator_2 } from '@backstage/plugin-scaffolder-react';
|
||||
import { DiscoveryApi } from '@backstage/core-plugin-api';
|
||||
import { ExternalRouteRef } from '@backstage/core-plugin-api';
|
||||
import { FetchApi } from '@backstage/core-plugin-api';
|
||||
import { FieldExtensionComponent as FieldExtensionComponent_2 } from '@backstage/plugin-scaffolder-react';
|
||||
import { FieldExtensionComponentProps as FieldExtensionComponentProps_2 } from '@backstage/plugin-scaffolder-react';
|
||||
import { FieldExtensionOptions as FieldExtensionOptions_2 } from '@backstage/plugin-scaffolder-react';
|
||||
import { FieldSchema as FieldSchema_2 } from '@backstage/plugin-scaffolder-react';
|
||||
import { FieldValidation } from '@rjsf/utils';
|
||||
import { FormProps } from '@backstage/plugin-scaffolder-react';
|
||||
import { IdentityApi } from '@backstage/core-plugin-api';
|
||||
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
||||
import { JSX as JSX_2 } from 'react';
|
||||
import { LayoutOptions as LayoutOptions_2 } from '@backstage/plugin-scaffolder-react';
|
||||
import { LayoutTemplate as LayoutTemplate_2 } from '@backstage/plugin-scaffolder-react';
|
||||
import { ListActionsResponse as ListActionsResponse_2 } from '@backstage/plugin-scaffolder-react';
|
||||
import { ListTemplatingExtensionsResponse } from '@backstage/plugin-scaffolder-react';
|
||||
import { LogEvent as LogEvent_2 } from '@backstage/plugin-scaffolder-react';
|
||||
import { Observable } from '@backstage/types';
|
||||
import { ListActionsResponse as ListActionsResponse_2 } from '@backstage/plugin-scaffolder-common';
|
||||
import { LogEvent as LogEvent_2 } from '@backstage/plugin-scaffolder-common';
|
||||
import { PathParams } from '@backstage/core-plugin-api';
|
||||
import { PropsWithChildren } from 'react';
|
||||
import { ReactNode } from 'react';
|
||||
import { ReviewStepProps } from '@backstage/plugin-scaffolder-react';
|
||||
import { RouteRef } from '@backstage/core-plugin-api';
|
||||
import { ScaffolderApi as ScaffolderApi_2 } from '@backstage/plugin-scaffolder-react';
|
||||
import { ScaffolderDryRunOptions as ScaffolderDryRunOptions_2 } from '@backstage/plugin-scaffolder-react';
|
||||
import { ScaffolderDryRunResponse as ScaffolderDryRunResponse_2 } from '@backstage/plugin-scaffolder-react';
|
||||
import { ScaffolderGetIntegrationsListOptions as ScaffolderGetIntegrationsListOptions_2 } from '@backstage/plugin-scaffolder-react';
|
||||
import { ScaffolderGetIntegrationsListResponse as ScaffolderGetIntegrationsListResponse_2 } from '@backstage/plugin-scaffolder-react';
|
||||
import { ScaffolderOutputLink } from '@backstage/plugin-scaffolder-react';
|
||||
import { ScaffolderScaffoldOptions as ScaffolderScaffoldOptions_2 } from '@backstage/plugin-scaffolder-react';
|
||||
import { ScaffolderScaffoldResponse as ScaffolderScaffoldResponse_2 } from '@backstage/plugin-scaffolder-react';
|
||||
import { ScaffolderStreamLogsOptions as ScaffolderStreamLogsOptions_2 } from '@backstage/plugin-scaffolder-react';
|
||||
import { ScaffolderTask as ScaffolderTask_2 } from '@backstage/plugin-scaffolder-react';
|
||||
import { ScaffolderApi as ScaffolderApi_2 } from '@backstage/plugin-scaffolder-common';
|
||||
import { ScaffolderClient as ScaffolderClient_2 } from '@backstage/plugin-scaffolder-common';
|
||||
import { ScaffolderDryRunOptions as ScaffolderDryRunOptions_2 } from '@backstage/plugin-scaffolder-common';
|
||||
import { ScaffolderDryRunResponse as ScaffolderDryRunResponse_2 } from '@backstage/plugin-scaffolder-common';
|
||||
import { ScaffolderGetIntegrationsListOptions as ScaffolderGetIntegrationsListOptions_2 } from '@backstage/plugin-scaffolder-common';
|
||||
import { ScaffolderGetIntegrationsListResponse as ScaffolderGetIntegrationsListResponse_2 } from '@backstage/plugin-scaffolder-common';
|
||||
import { ScaffolderOutputLink } from '@backstage/plugin-scaffolder-common';
|
||||
import { ScaffolderScaffoldOptions as ScaffolderScaffoldOptions_2 } from '@backstage/plugin-scaffolder-common';
|
||||
import { ScaffolderScaffoldResponse as ScaffolderScaffoldResponse_2 } from '@backstage/plugin-scaffolder-common';
|
||||
import { ScaffolderStreamLogsOptions as ScaffolderStreamLogsOptions_2 } from '@backstage/plugin-scaffolder-common';
|
||||
import { ScaffolderTask as ScaffolderTask_2 } from '@backstage/plugin-scaffolder-common';
|
||||
import { ScaffolderTaskOutput as ScaffolderTaskOutput_2 } from '@backstage/plugin-scaffolder-react';
|
||||
import { ScaffolderTaskStatus as ScaffolderTaskStatus_2 } from '@backstage/plugin-scaffolder-react';
|
||||
import { ScaffolderTaskOutput as ScaffolderTaskOutput_3 } from '@backstage/plugin-scaffolder-common';
|
||||
import { ScaffolderTaskStatus as ScaffolderTaskStatus_2 } from '@backstage/plugin-scaffolder-common';
|
||||
import { ScaffolderUseTemplateSecrets as ScaffolderUseTemplateSecrets_2 } from '@backstage/plugin-scaffolder-react';
|
||||
import { ScmIntegrationRegistry } from '@backstage/integration';
|
||||
import { SubRouteRef } from '@backstage/core-plugin-api';
|
||||
import { TemplateEntityV1beta3 } from '@backstage/plugin-scaffolder-common';
|
||||
import { TemplateGroupFilter } from '@backstage/plugin-scaffolder-react';
|
||||
import { TemplateListPageProps } from '@backstage/plugin-scaffolder/alpha';
|
||||
import { TemplateParameterSchema as TemplateParameterSchema_2 } from '@backstage/plugin-scaffolder-react';
|
||||
import { TemplateParameterSchema as TemplateParameterSchema_2 } from '@backstage/plugin-scaffolder-common';
|
||||
import { TemplateWizardPageProps } from '@backstage/plugin-scaffolder/alpha';
|
||||
import { z } from 'zod';
|
||||
|
||||
@@ -505,70 +501,8 @@ export type ScaffolderApi = ScaffolderApi_2;
|
||||
// @public @deprecated (undocumented)
|
||||
export const scaffolderApiRef: ApiRef<ScaffolderApi_2>;
|
||||
|
||||
// @public
|
||||
export class ScaffolderClient implements ScaffolderApi_2 {
|
||||
constructor(options: {
|
||||
discoveryApi: DiscoveryApi;
|
||||
fetchApi: FetchApi;
|
||||
identityApi?: IdentityApi;
|
||||
scmIntegrationsApi: ScmIntegrationRegistry;
|
||||
useLongPollingLogs?: boolean;
|
||||
});
|
||||
// (undocumented)
|
||||
autocomplete({
|
||||
token,
|
||||
resource,
|
||||
provider,
|
||||
context,
|
||||
}: {
|
||||
token: string;
|
||||
provider: string;
|
||||
resource: string;
|
||||
context?: Record<string, string>;
|
||||
}): Promise<{
|
||||
results: {
|
||||
title?: string;
|
||||
id: string;
|
||||
}[];
|
||||
}>;
|
||||
// (undocumented)
|
||||
cancelTask(taskId: string): Promise<void>;
|
||||
// (undocumented)
|
||||
dryRun(
|
||||
options: ScaffolderDryRunOptions_2,
|
||||
): Promise<ScaffolderDryRunResponse_2>;
|
||||
// (undocumented)
|
||||
getIntegrationsList(
|
||||
options: ScaffolderGetIntegrationsListOptions_2,
|
||||
): Promise<ScaffolderGetIntegrationsListResponse_2>;
|
||||
// (undocumented)
|
||||
getTask(taskId: string): Promise<ScaffolderTask_2>;
|
||||
// (undocumented)
|
||||
getTemplateParameterSchema(
|
||||
templateRef: string,
|
||||
): Promise<TemplateParameterSchema_2>;
|
||||
// (undocumented)
|
||||
listActions(): Promise<ListActionsResponse_2>;
|
||||
// (undocumented)
|
||||
listTasks(options: {
|
||||
filterByOwnership: 'owned' | 'all';
|
||||
limit?: number;
|
||||
offset?: number;
|
||||
}): Promise<{
|
||||
tasks: ScaffolderTask_2[];
|
||||
totalTasks?: number;
|
||||
}>;
|
||||
// (undocumented)
|
||||
listTemplatingExtensions(): Promise<ListTemplatingExtensionsResponse>;
|
||||
// (undocumented)
|
||||
retry?(taskId: string): Promise<void>;
|
||||
// (undocumented)
|
||||
scaffold(
|
||||
options: ScaffolderScaffoldOptions_2,
|
||||
): Promise<ScaffolderScaffoldResponse_2>;
|
||||
// (undocumented)
|
||||
streamLogs(options: ScaffolderStreamLogsOptions_2): Observable<LogEvent_2>;
|
||||
}
|
||||
// @public @deprecated
|
||||
export class ScaffolderClient extends ScaffolderClient_2 {}
|
||||
|
||||
// @public @deprecated (undocumented)
|
||||
export type ScaffolderDryRunOptions = ScaffolderDryRunOptions_2;
|
||||
@@ -644,7 +578,7 @@ export type ScaffolderStreamLogsOptions = ScaffolderStreamLogsOptions_2;
|
||||
export type ScaffolderTask = ScaffolderTask_2;
|
||||
|
||||
// @public @deprecated (undocumented)
|
||||
export type ScaffolderTaskOutput = ScaffolderTaskOutput_2;
|
||||
export type ScaffolderTaskOutput = ScaffolderTaskOutput_3;
|
||||
|
||||
// @public @deprecated (undocumented)
|
||||
export type ScaffolderTaskStatus = ScaffolderTaskStatus_2;
|
||||
|
||||
Reference in New Issue
Block a user