frontend-plugin-api: type cleanup, docs, and API reports for advanced blueprint types
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -179,9 +179,13 @@ export type AnyRoutes = {
|
||||
export const ApiBlueprint: ExtensionBlueprint<{
|
||||
kind: 'api';
|
||||
name: undefined;
|
||||
params: {
|
||||
factory: AnyApiFactory;
|
||||
};
|
||||
params: <
|
||||
TApi,
|
||||
TImpl extends TApi,
|
||||
TDeps extends { [name in string]: unknown },
|
||||
>(
|
||||
params: ApiFactory<TApi, TImpl, TDeps>,
|
||||
) => ExtensionBlueprintParams<AnyApiFactory>;
|
||||
output: ConfigurableExtensionDataRef<AnyApiFactory, 'core.api.factory', {}>;
|
||||
inputs: {};
|
||||
config: {};
|
||||
@@ -519,7 +523,7 @@ export function createExtension<
|
||||
|
||||
// @public
|
||||
export function createExtensionBlueprint<
|
||||
TParams extends object,
|
||||
TParams extends object | ExtensionBlueprintParamsDefiner,
|
||||
UOutput extends AnyExtensionDataRef,
|
||||
TInputs extends {
|
||||
[inputName in string]: ExtensionInput<
|
||||
@@ -575,7 +579,7 @@ export function createExtensionBlueprint<
|
||||
export type CreateExtensionBlueprintOptions<
|
||||
TKind extends string,
|
||||
TName extends string | undefined,
|
||||
TParams,
|
||||
TParams extends object | ExtensionBlueprintParamsDefiner,
|
||||
UOutput extends AnyExtensionDataRef,
|
||||
TInputs extends {
|
||||
[inputName in string]: ExtensionInput<
|
||||
@@ -603,8 +607,13 @@ export type CreateExtensionBlueprintOptions<
|
||||
config?: {
|
||||
schema: TConfigSchema;
|
||||
};
|
||||
defineParams?: TParams extends ExtensionBlueprintParamsDefiner
|
||||
? TParams
|
||||
: 'The defineParams option must be a function if provided, see the docs for details';
|
||||
factory(
|
||||
params: TParams,
|
||||
params: TParams extends ExtensionBlueprintParamsDefiner
|
||||
? ReturnType<TParams>['T']
|
||||
: TParams,
|
||||
context: {
|
||||
node: AppNode;
|
||||
apis: ApiHolder;
|
||||
@@ -617,6 +626,11 @@ export type CreateExtensionBlueprintOptions<
|
||||
dataRefs?: TDataRefs;
|
||||
} & VerifyExtensionFactoryOutput<UOutput, UFactoryOutput>;
|
||||
|
||||
// @public
|
||||
export function createExtensionBlueprintParams<T extends object = object>(
|
||||
params: T,
|
||||
): ExtensionBlueprintParams<T>;
|
||||
|
||||
// @public (undocumented)
|
||||
export function createExtensionDataRef<TData>(): {
|
||||
with<TId extends string>(options: {
|
||||
@@ -911,11 +925,18 @@ export interface ExtensionBlueprint<
|
||||
// (undocumented)
|
||||
dataRefs: T['dataRefs'];
|
||||
// (undocumented)
|
||||
make<TNewName extends string | undefined>(args: {
|
||||
make<
|
||||
TNewName extends string | undefined,
|
||||
TParamsInput extends AnyParamsInput_2<NonNullable<T['params']>>,
|
||||
>(args: {
|
||||
name?: TNewName;
|
||||
attachTo?: ExtensionAttachToSpec;
|
||||
disabled?: boolean;
|
||||
params: T['params'];
|
||||
params: TParamsInput extends ExtensionBlueprintParamsDefiner
|
||||
? TParamsInput
|
||||
: T['params'] extends ExtensionBlueprintParamsDefiner
|
||||
? 'Error: This blueprint uses advanced parameter types and requires you to pass parameters as using the following callback syntax: `<blueprint>.make({ params: define => define(<params>) })`'
|
||||
: TParamsInput;
|
||||
}): ExtensionDefinition<{
|
||||
kind: T['kind'];
|
||||
name: string | undefined extends TNewName ? T['name'] : TNewName;
|
||||
@@ -957,8 +978,14 @@ export interface ExtensionBlueprint<
|
||||
};
|
||||
};
|
||||
factory(
|
||||
originalFactory: (
|
||||
params: T['params'],
|
||||
originalFactory: <
|
||||
TParamsInput extends AnyParamsInput_2<NonNullable<T['params']>>,
|
||||
>(
|
||||
params: TParamsInput extends ExtensionBlueprintParamsDefiner
|
||||
? TParamsInput
|
||||
: T['params'] extends ExtensionBlueprintParamsDefiner
|
||||
? 'Error: This blueprint uses advanced parameter types and requires you to pass parameters as using the following callback syntax: `originalFactory(define => define(<params>))`'
|
||||
: TParamsInput,
|
||||
context?: {
|
||||
config?: T['config'];
|
||||
inputs?: ResolveInputValueOverrides<NonNullable<T['inputs']>>;
|
||||
@@ -1012,7 +1039,7 @@ export interface ExtensionBlueprint<
|
||||
export type ExtensionBlueprintParameters = {
|
||||
kind: string;
|
||||
name?: string;
|
||||
params?: object;
|
||||
params?: object | ExtensionBlueprintParamsDefiner;
|
||||
configInput?: {
|
||||
[K in string]: any;
|
||||
};
|
||||
@@ -1034,6 +1061,18 @@ export type ExtensionBlueprintParameters = {
|
||||
};
|
||||
};
|
||||
|
||||
// @public
|
||||
export type ExtensionBlueprintParams<T extends object = object> = {
|
||||
$$type: '@backstage/BlueprintParams';
|
||||
T: T;
|
||||
};
|
||||
|
||||
// @public
|
||||
export type ExtensionBlueprintParamsDefiner<
|
||||
TParams extends object = object,
|
||||
TInput = any,
|
||||
> = (params: TInput) => ExtensionBlueprintParams<TParams>;
|
||||
|
||||
// @public (undocumented)
|
||||
export function ExtensionBoundary(props: ExtensionBoundaryProps): JSX_2.Element;
|
||||
|
||||
@@ -1130,6 +1169,7 @@ export type ExtensionDefinition<
|
||||
}
|
||||
>;
|
||||
},
|
||||
TParamsInput extends AnyParamsInput<NonNullable<T['params']>>,
|
||||
>(
|
||||
args: Expand<
|
||||
{
|
||||
@@ -1147,7 +1187,11 @@ export type ExtensionDefinition<
|
||||
};
|
||||
};
|
||||
factory?(
|
||||
originalFactory: (
|
||||
originalFactory: <
|
||||
TFactoryParamsReturn extends AnyParamsInput<
|
||||
NonNullable<T['params']>
|
||||
>,
|
||||
>(
|
||||
context?: Expand<
|
||||
{
|
||||
config?: T['config'];
|
||||
@@ -1155,7 +1199,11 @@ export type ExtensionDefinition<
|
||||
} & ([T['params']] extends [never]
|
||||
? {}
|
||||
: {
|
||||
params?: Partial<T['params']>;
|
||||
params?: TFactoryParamsReturn extends ExtensionBlueprintParamsDefiner
|
||||
? TFactoryParamsReturn
|
||||
: T['params'] extends ExtensionBlueprintParamsDefiner
|
||||
? 'Error: This blueprint uses advanced parameter types and requires you to pass parameters as using the following callback syntax: `originalFactory(define => define(<params>))`'
|
||||
: Partial<T['params']>;
|
||||
})
|
||||
>,
|
||||
) => ExtensionDataContainer<NonNullable<T['output']>>,
|
||||
@@ -1173,7 +1221,11 @@ export type ExtensionDefinition<
|
||||
} & ([T['params']] extends [never]
|
||||
? {}
|
||||
: {
|
||||
params?: Partial<T['params']>;
|
||||
params?: TParamsInput extends ExtensionBlueprintParamsDefiner
|
||||
? TParamsInput
|
||||
: T['params'] extends ExtensionBlueprintParamsDefiner
|
||||
? 'Error: This blueprint uses advanced parameter types and requires you to pass parameters as using the following callback syntax: `originalFactory(define => define(<params>))`'
|
||||
: Partial<T['params']>;
|
||||
})
|
||||
> &
|
||||
VerifyExtensionFactoryOutput<
|
||||
@@ -1223,7 +1275,7 @@ export type ExtensionDefinitionParameters = {
|
||||
}
|
||||
>;
|
||||
};
|
||||
params?: object;
|
||||
params?: object | ExtensionBlueprintParamsDefiner;
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
|
||||
@@ -30,10 +30,7 @@ import { z } from 'zod';
|
||||
import { createSchemaFromZod } from '../schema/createSchemaFromZod';
|
||||
import { OpaqueExtensionDefinition } from '@internal/frontend';
|
||||
import { ExtensionDataContainer } from './types';
|
||||
import {
|
||||
BlueprintParamsDefiner,
|
||||
BlueprintParamsFactory,
|
||||
} from './createExtensionBlueprint';
|
||||
import { ExtensionBlueprintParamsDefiner } from './createExtensionBlueprint';
|
||||
|
||||
/**
|
||||
* This symbol is used to pass parameter overrides from the extension override to the blueprint factory
|
||||
@@ -165,15 +162,22 @@ export type ExtensionDefinitionParameters = {
|
||||
{ optional: boolean; singleton: boolean }
|
||||
>;
|
||||
};
|
||||
params?: object | BlueprintParamsDefiner;
|
||||
params?: object | ExtensionBlueprintParamsDefiner;
|
||||
};
|
||||
|
||||
type AnyParamsInput<TParams extends object | BlueprintParamsDefiner> =
|
||||
TParams extends BlueprintParamsDefiner<infer IParams>
|
||||
? IParams | BlueprintParamsFactory<TParams>
|
||||
/**
|
||||
* Same as the one in `createExtensionBlueprint`, but with `ParamsFactory` inlined.
|
||||
* It can't be exported because it breaks API reports.
|
||||
* @ignore
|
||||
*/
|
||||
type AnyParamsInput<TParams extends object | ExtensionBlueprintParamsDefiner> =
|
||||
TParams extends ExtensionBlueprintParamsDefiner<infer IParams>
|
||||
? IParams | ((define: TParams) => ReturnType<TParams>)
|
||||
:
|
||||
| TParams
|
||||
| BlueprintParamsFactory<BlueprintParamsDefiner<TParams, TParams>>;
|
||||
| ((
|
||||
define: ExtensionBlueprintParamsDefiner<TParams, TParams>,
|
||||
) => ReturnType<ExtensionBlueprintParamsDefiner<TParams, TParams>>);
|
||||
|
||||
/** @public */
|
||||
export type ExtensionDefinition<
|
||||
@@ -194,7 +198,7 @@ export type ExtensionDefinition<
|
||||
{ optional: boolean; singleton: boolean }
|
||||
>;
|
||||
},
|
||||
TParamsReturn extends AnyParamsInput<NonNullable<T['params']>>,
|
||||
TParamsInput extends AnyParamsInput<NonNullable<T['params']>>,
|
||||
>(
|
||||
args: Expand<
|
||||
{
|
||||
@@ -224,9 +228,9 @@ export type ExtensionDefinition<
|
||||
} & ([T['params']] extends [never]
|
||||
? {}
|
||||
: {
|
||||
params?: TFactoryParamsReturn extends BlueprintParamsDefiner
|
||||
params?: TFactoryParamsReturn extends ExtensionBlueprintParamsDefiner
|
||||
? TFactoryParamsReturn
|
||||
: T['params'] extends BlueprintParamsDefiner
|
||||
: T['params'] extends ExtensionBlueprintParamsDefiner
|
||||
? 'Error: This blueprint uses advanced parameter types and requires you to pass parameters as using the following callback syntax: `originalFactory(define => define(<params>))`'
|
||||
: Partial<T['params']>;
|
||||
})
|
||||
@@ -246,9 +250,9 @@ export type ExtensionDefinition<
|
||||
} & ([T['params']] extends [never]
|
||||
? {}
|
||||
: {
|
||||
params?: TParamsReturn extends BlueprintParamsDefiner
|
||||
? TParamsReturn
|
||||
: T['params'] extends BlueprintParamsDefiner
|
||||
params?: TParamsInput extends ExtensionBlueprintParamsDefiner
|
||||
? TParamsInput
|
||||
: T['params'] extends ExtensionBlueprintParamsDefiner
|
||||
? 'Error: This blueprint uses advanced parameter types and requires you to pass parameters as using the following callback syntax: `originalFactory(define => define(<params>))`'
|
||||
: Partial<T['params']>;
|
||||
})
|
||||
|
||||
@@ -38,21 +38,42 @@ import {
|
||||
} from './resolveInputOverrides';
|
||||
import { ExtensionDataContainer } from './types';
|
||||
|
||||
export type BlueprintParamsDefiner<
|
||||
/**
|
||||
* A function used to define a parameter mapping function in order to facilitate
|
||||
* advanced parameter typing for extension blueprints.
|
||||
*
|
||||
* @remarks
|
||||
*
|
||||
* This function is primarily intended to enable the use of inferred type
|
||||
* parameters for blueprint params, but it can also be used to transoform the
|
||||
* params before they are handed ot the blueprint.
|
||||
*
|
||||
* The function must return an object created with
|
||||
* {@link createExtensionBlueprintParams}.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export type ExtensionBlueprintParamsDefiner<
|
||||
TParams extends object = object,
|
||||
TInput = any,
|
||||
> = (params: TInput) => BlueprintParams<TParams>;
|
||||
export type BlueprintParamsFactory<TDefiner extends BlueprintParamsDefiner> = (
|
||||
define: TDefiner,
|
||||
) => ReturnType<TDefiner>;
|
||||
> = (params: TInput) => ExtensionBlueprintParams<TParams>;
|
||||
|
||||
export type BlueprintParams<T extends object = object> = {
|
||||
/**
|
||||
* An opaque type that represents a set of parameters to be passed to a blueprint.
|
||||
*
|
||||
* @remarks
|
||||
*
|
||||
* Created with {@link createExtensionBlueprintParams}.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export type ExtensionBlueprintParams<T extends object = object> = {
|
||||
$$type: '@backstage/BlueprintParams';
|
||||
T: T;
|
||||
};
|
||||
|
||||
const OpaqueBlueprintParams = OpaqueType.create<{
|
||||
public: BlueprintParams;
|
||||
public: ExtensionBlueprintParams;
|
||||
versions: {
|
||||
version: 'v1';
|
||||
params: object;
|
||||
@@ -62,9 +83,18 @@ const OpaqueBlueprintParams = OpaqueType.create<{
|
||||
versions: ['v1'],
|
||||
});
|
||||
|
||||
/**
|
||||
* Wraps a plain blueprint parameter object in an opaque {@link ExtensionBlueprintParams} object.
|
||||
*
|
||||
* This is used in the definition of the `defineParams` option of {@link ExtensionBlueprint}.
|
||||
*
|
||||
* @public
|
||||
* @param params - The plain blueprint parameter object to wrap.
|
||||
* @returns The wrapped blueprint parameter object.
|
||||
*/
|
||||
export function createExtensionBlueprintParams<T extends object = object>(
|
||||
params: T,
|
||||
): BlueprintParams<T> {
|
||||
): ExtensionBlueprintParams<T> {
|
||||
return OpaqueBlueprintParams.createInstance('v1', { T: null as any, params });
|
||||
}
|
||||
|
||||
@@ -74,7 +104,7 @@ export function createExtensionBlueprintParams<T extends object = object>(
|
||||
export type CreateExtensionBlueprintOptions<
|
||||
TKind extends string,
|
||||
TName extends string | undefined,
|
||||
TParams extends object | BlueprintParamsDefiner,
|
||||
TParams extends object | ExtensionBlueprintParamsDefiner,
|
||||
UOutput extends AnyExtensionDataRef,
|
||||
TInputs extends {
|
||||
[inputName in string]: ExtensionInput<
|
||||
@@ -95,11 +125,49 @@ export type CreateExtensionBlueprintOptions<
|
||||
config?: {
|
||||
schema: TConfigSchema;
|
||||
};
|
||||
defineParams?: TParams extends BlueprintParamsDefiner
|
||||
/**
|
||||
* This option is used to further refine the blueprint params. When this
|
||||
* option is used, the blueprint will require params to be passed in callback
|
||||
* form. This function can both transform the params before they are handed to
|
||||
* the blueprint factory, but importantly it also allows you to define
|
||||
* inferred type parameters for your blueprint params.
|
||||
*
|
||||
* @example
|
||||
* Blueprint definition with inferred type parameters:
|
||||
* ```ts
|
||||
* const ExampleBlueprint = createExtensionBlueprint({
|
||||
* kind: 'example',
|
||||
* attachTo: { id: 'example', input: 'example' },
|
||||
* output: [exampleComponentDataRef, exampleFetcherDataRef],
|
||||
* defineParams<T>(params: {
|
||||
* component(props: ExampleProps<T>): JSX.Element | null
|
||||
* fetcher(options: FetchOptions): Promise<FetchResult<T>>
|
||||
* }) {
|
||||
* return createExtensionBlueprintParams(params);
|
||||
* },
|
||||
* *factory(params) {
|
||||
* yield exampleComponentDataRef(params.component)
|
||||
* yield exampleFetcherDataRef(params.fetcher)
|
||||
* },
|
||||
* });
|
||||
* ```
|
||||
*
|
||||
* @example
|
||||
* Usage of the above example blueprint:
|
||||
* ```ts
|
||||
* const example = ExampleBlueprint.make({
|
||||
* params: define => define({
|
||||
* component: ...,
|
||||
* fetcher: ...,
|
||||
* }),
|
||||
* });
|
||||
* ```
|
||||
*/
|
||||
defineParams?: TParams extends ExtensionBlueprintParamsDefiner
|
||||
? TParams
|
||||
: 'The params option must be a function if provided, see the docs for details';
|
||||
: 'The defineParams option must be a function if provided, see the docs for details';
|
||||
factory(
|
||||
params: TParams extends BlueprintParamsDefiner
|
||||
params: TParams extends ExtensionBlueprintParamsDefiner
|
||||
? ReturnType<TParams>['T']
|
||||
: TParams,
|
||||
context: {
|
||||
@@ -119,7 +187,7 @@ export type CreateExtensionBlueprintOptions<
|
||||
export type ExtensionBlueprintParameters = {
|
||||
kind: string;
|
||||
name?: string;
|
||||
params: object | BlueprintParamsDefiner;
|
||||
params?: object | ExtensionBlueprintParamsDefiner;
|
||||
configInput?: { [K in string]: any };
|
||||
config?: { [K in string]: any };
|
||||
output?: AnyExtensionDataRef;
|
||||
@@ -132,18 +200,23 @@ export type ExtensionBlueprintParameters = {
|
||||
dataRefs?: { [name in string]: AnyExtensionDataRef };
|
||||
};
|
||||
|
||||
/** @ignore */
|
||||
type ParamsFactory<TDefiner extends ExtensionBlueprintParamsDefiner> = (
|
||||
define: TDefiner,
|
||||
) => ReturnType<TDefiner>;
|
||||
|
||||
/**
|
||||
* Represents any form of params input that can be passed to a blueprint.
|
||||
* This also includes the invalid form of passing a plain params object to a blueprint that uses a definition callback.
|
||||
*
|
||||
* @internal
|
||||
* @ignore
|
||||
*/
|
||||
type AnyParamsInput<TParams extends object | BlueprintParamsDefiner> =
|
||||
TParams extends BlueprintParamsDefiner<infer IParams>
|
||||
? IParams | BlueprintParamsFactory<TParams>
|
||||
type AnyParamsInput<TParams extends object | ExtensionBlueprintParamsDefiner> =
|
||||
TParams extends ExtensionBlueprintParamsDefiner<infer IParams>
|
||||
? IParams | ParamsFactory<TParams>
|
||||
:
|
||||
| TParams
|
||||
| BlueprintParamsFactory<BlueprintParamsDefiner<TParams, TParams>>;
|
||||
| ParamsFactory<ExtensionBlueprintParamsDefiner<TParams, TParams>>;
|
||||
|
||||
/**
|
||||
* @public
|
||||
@@ -156,16 +229,16 @@ export interface ExtensionBlueprint<
|
||||
|
||||
make<
|
||||
TNewName extends string | undefined,
|
||||
TParamsReturn extends AnyParamsInput<T['params']>,
|
||||
TParamsInput extends AnyParamsInput<NonNullable<T['params']>>,
|
||||
>(args: {
|
||||
name?: TNewName;
|
||||
attachTo?: ExtensionAttachToSpec;
|
||||
disabled?: boolean;
|
||||
params: TParamsReturn extends BlueprintParamsDefiner
|
||||
? TParamsReturn
|
||||
: T['params'] extends BlueprintParamsDefiner
|
||||
params: TParamsInput extends ExtensionBlueprintParamsDefiner
|
||||
? TParamsInput
|
||||
: T['params'] extends ExtensionBlueprintParamsDefiner
|
||||
? 'Error: This blueprint uses advanced parameter types and requires you to pass parameters as using the following callback syntax: `<blueprint>.make({ params: define => define(<params>) })`'
|
||||
: TParamsReturn;
|
||||
: TParamsInput;
|
||||
}): ExtensionDefinition<{
|
||||
kind: T['kind'];
|
||||
name: string | undefined extends TNewName ? T['name'] : TNewName;
|
||||
@@ -211,12 +284,14 @@ export interface ExtensionBlueprint<
|
||||
};
|
||||
};
|
||||
factory(
|
||||
originalFactory: <TParamsReturn extends AnyParamsInput<T['params']>>(
|
||||
params: TParamsReturn extends BlueprintParamsDefiner
|
||||
? TParamsReturn
|
||||
: T['params'] extends BlueprintParamsDefiner
|
||||
originalFactory: <
|
||||
TParamsInput extends AnyParamsInput<NonNullable<T['params']>>,
|
||||
>(
|
||||
params: TParamsInput extends ExtensionBlueprintParamsDefiner
|
||||
? TParamsInput
|
||||
: T['params'] extends ExtensionBlueprintParamsDefiner
|
||||
? 'Error: This blueprint uses advanced parameter types and requires you to pass parameters as using the following callback syntax: `originalFactory(define => define(<params>))`'
|
||||
: TParamsReturn,
|
||||
: TParamsInput,
|
||||
context?: {
|
||||
config?: T['config'];
|
||||
inputs?: ResolveInputValueOverrides<NonNullable<T['inputs']>>;
|
||||
@@ -268,12 +343,12 @@ export interface ExtensionBlueprint<
|
||||
|
||||
function unwrapParamsFactory<TParams extends object>(
|
||||
// Allow `Function` because `typeof <object> === 'function'` allows it, but in practice this should always be a param factory
|
||||
params: BlueprintParamsFactory<BlueprintParamsDefiner> | Function,
|
||||
defineParams: BlueprintParamsDefiner,
|
||||
params: ParamsFactory<ExtensionBlueprintParamsDefiner> | Function,
|
||||
defineParams: ExtensionBlueprintParamsDefiner,
|
||||
kind: string,
|
||||
): TParams {
|
||||
const paramDefinition = (
|
||||
params as BlueprintParamsFactory<BlueprintParamsDefiner>
|
||||
params as ParamsFactory<ExtensionBlueprintParamsDefiner>
|
||||
)(defineParams);
|
||||
try {
|
||||
return OpaqueBlueprintParams.toInternal(paramDefinition).params as TParams;
|
||||
@@ -285,14 +360,14 @@ function unwrapParamsFactory<TParams extends object>(
|
||||
}
|
||||
|
||||
function unwrapParams<TParams extends object>(
|
||||
params: object | BlueprintParamsFactory<BlueprintParamsDefiner> | string,
|
||||
params: object | ParamsFactory<ExtensionBlueprintParamsDefiner> | string,
|
||||
ctx: { node: AppNode; [ctxParamsSymbol]?: any },
|
||||
defineParams: BlueprintParamsDefiner | undefined,
|
||||
defineParams: ExtensionBlueprintParamsDefiner | undefined,
|
||||
kind: string,
|
||||
): TParams {
|
||||
const overrideParams = ctx[ctxParamsSymbol] as
|
||||
| object
|
||||
| BlueprintParamsFactory<BlueprintParamsDefiner>
|
||||
| ParamsFactory<ExtensionBlueprintParamsDefiner>
|
||||
| undefined;
|
||||
|
||||
if (defineParams) {
|
||||
@@ -343,7 +418,7 @@ function unwrapParams<TParams extends object>(
|
||||
* @public
|
||||
*/
|
||||
export function createExtensionBlueprint<
|
||||
TParams extends object | BlueprintParamsDefiner,
|
||||
TParams extends object | ExtensionBlueprintParamsDefiner,
|
||||
UOutput extends AnyExtensionDataRef,
|
||||
TInputs extends {
|
||||
[inputName in string]: ExtensionInput<
|
||||
@@ -386,7 +461,7 @@ export function createExtensionBlueprint<
|
||||
dataRefs: TDataRefs;
|
||||
}> {
|
||||
const defineParams = options.defineParams as
|
||||
| BlueprintParamsDefiner
|
||||
| ExtensionBlueprintParamsDefiner
|
||||
| undefined;
|
||||
|
||||
return {
|
||||
|
||||
@@ -66,6 +66,9 @@ export {
|
||||
type CreateExtensionBlueprintOptions,
|
||||
type ExtensionBlueprint,
|
||||
type ExtensionBlueprintParameters,
|
||||
type ExtensionBlueprintParams,
|
||||
type ExtensionBlueprintParamsDefiner,
|
||||
createExtensionBlueprint,
|
||||
createExtensionBlueprintParams,
|
||||
} from './createExtensionBlueprint';
|
||||
export { type ResolveInputValueOverrides } from './resolveInputOverrides';
|
||||
|
||||
@@ -7,12 +7,12 @@ import { AnyApiFactory } from '@backstage/frontend-plugin-api';
|
||||
import { AnyExtensionDataRef } from '@backstage/frontend-plugin-api';
|
||||
import { AnyRouteRefParams } from '@backstage/frontend-plugin-api';
|
||||
import { ApiFactory } from '@backstage/frontend-plugin-api';
|
||||
import { BlueprintParams } from '@backstage/frontend-plugin-api/src/wiring/createExtensionBlueprint';
|
||||
import { ConfigurableExtensionDataRef } from '@backstage/frontend-plugin-api';
|
||||
import { defaultEntityContentGroups } from '@backstage/plugin-catalog-react/alpha';
|
||||
import { Entity } from '@backstage/catalog-model';
|
||||
import { EntityCardType } from '@backstage/plugin-catalog-react/alpha';
|
||||
import { EntityPredicate } from '@backstage/plugin-catalog-react/alpha';
|
||||
import { ExtensionBlueprintParams } from '@backstage/frontend-plugin-api';
|
||||
import { ExtensionDefinition } from '@backstage/frontend-plugin-api';
|
||||
import { ExtensionInput } from '@backstage/frontend-plugin-api';
|
||||
import { ExternalRouteRef } from '@backstage/frontend-plugin-api';
|
||||
@@ -81,7 +81,7 @@ const _default: FrontendPlugin<
|
||||
TDeps extends { [name in string]: unknown },
|
||||
>(
|
||||
params: ApiFactory<TApi, TImpl, TDeps>,
|
||||
) => BlueprintParams<AnyApiFactory>;
|
||||
) => ExtensionBlueprintParams<AnyApiFactory>;
|
||||
}>;
|
||||
'entity-card:api-docs/consumed-apis': ExtensionDefinition<{
|
||||
kind: 'entity-card';
|
||||
|
||||
+28
-28
@@ -8,10 +8,10 @@ import { AnyExtensionDataRef } from '@backstage/frontend-plugin-api';
|
||||
import { AnyRouteRefParams } from '@backstage/frontend-plugin-api';
|
||||
import { ApiFactory } from '@backstage/frontend-plugin-api';
|
||||
import { AppTheme } from '@backstage/frontend-plugin-api';
|
||||
import { BlueprintParams } from '@backstage/frontend-plugin-api/src/wiring/createExtensionBlueprint';
|
||||
import { ComponentRef } from '@backstage/frontend-plugin-api';
|
||||
import { ComponentType } from 'react';
|
||||
import { ConfigurableExtensionDataRef } from '@backstage/frontend-plugin-api';
|
||||
import { ExtensionBlueprintParams } from '@backstage/frontend-plugin-api';
|
||||
import { ExtensionDefinition } from '@backstage/frontend-plugin-api';
|
||||
import { ExtensionInput } from '@backstage/frontend-plugin-api';
|
||||
import { FrontendPlugin } from '@backstage/frontend-plugin-api';
|
||||
@@ -230,7 +230,7 @@ const appPlugin: FrontendPlugin<
|
||||
TDeps extends { [name in string]: unknown },
|
||||
>(
|
||||
params: ApiFactory<TApi, TImpl, TDeps>,
|
||||
) => BlueprintParams<AnyApiFactory>;
|
||||
) => ExtensionBlueprintParams<AnyApiFactory>;
|
||||
}>;
|
||||
'api:app/analytics': ExtensionDefinition<{
|
||||
kind: 'api';
|
||||
@@ -249,7 +249,7 @@ const appPlugin: FrontendPlugin<
|
||||
TDeps extends { [name in string]: unknown },
|
||||
>(
|
||||
params: ApiFactory<TApi, TImpl, TDeps>,
|
||||
) => BlueprintParams<AnyApiFactory>;
|
||||
) => ExtensionBlueprintParams<AnyApiFactory>;
|
||||
}>;
|
||||
'api:app/app-language': ExtensionDefinition<{
|
||||
kind: 'api';
|
||||
@@ -268,7 +268,7 @@ const appPlugin: FrontendPlugin<
|
||||
TDeps extends { [name in string]: unknown },
|
||||
>(
|
||||
params: ApiFactory<TApi, TImpl, TDeps>,
|
||||
) => BlueprintParams<AnyApiFactory>;
|
||||
) => ExtensionBlueprintParams<AnyApiFactory>;
|
||||
}>;
|
||||
'api:app/app-theme': ExtensionDefinition<{
|
||||
config: {};
|
||||
@@ -295,7 +295,7 @@ const appPlugin: FrontendPlugin<
|
||||
TDeps extends { [name in string]: unknown },
|
||||
>(
|
||||
params: ApiFactory<TApi, TImpl, TDeps>,
|
||||
) => BlueprintParams<AnyApiFactory>;
|
||||
) => ExtensionBlueprintParams<AnyApiFactory>;
|
||||
}>;
|
||||
'api:app/atlassian-auth': ExtensionDefinition<{
|
||||
kind: 'api';
|
||||
@@ -314,7 +314,7 @@ const appPlugin: FrontendPlugin<
|
||||
TDeps extends { [name in string]: unknown },
|
||||
>(
|
||||
params: ApiFactory<TApi, TImpl, TDeps>,
|
||||
) => BlueprintParams<AnyApiFactory>;
|
||||
) => ExtensionBlueprintParams<AnyApiFactory>;
|
||||
}>;
|
||||
'api:app/bitbucket-auth': ExtensionDefinition<{
|
||||
kind: 'api';
|
||||
@@ -333,7 +333,7 @@ const appPlugin: FrontendPlugin<
|
||||
TDeps extends { [name in string]: unknown },
|
||||
>(
|
||||
params: ApiFactory<TApi, TImpl, TDeps>,
|
||||
) => BlueprintParams<AnyApiFactory>;
|
||||
) => ExtensionBlueprintParams<AnyApiFactory>;
|
||||
}>;
|
||||
'api:app/bitbucket-server-auth': ExtensionDefinition<{
|
||||
kind: 'api';
|
||||
@@ -352,7 +352,7 @@ const appPlugin: FrontendPlugin<
|
||||
TDeps extends { [name in string]: unknown },
|
||||
>(
|
||||
params: ApiFactory<TApi, TImpl, TDeps>,
|
||||
) => BlueprintParams<AnyApiFactory>;
|
||||
) => ExtensionBlueprintParams<AnyApiFactory>;
|
||||
}>;
|
||||
'api:app/components': ExtensionDefinition<{
|
||||
config: {};
|
||||
@@ -386,7 +386,7 @@ const appPlugin: FrontendPlugin<
|
||||
TDeps extends { [name in string]: unknown },
|
||||
>(
|
||||
params: ApiFactory<TApi, TImpl, TDeps>,
|
||||
) => BlueprintParams<AnyApiFactory>;
|
||||
) => ExtensionBlueprintParams<AnyApiFactory>;
|
||||
}>;
|
||||
'api:app/dialog': ExtensionDefinition<{
|
||||
kind: 'api';
|
||||
@@ -405,7 +405,7 @@ const appPlugin: FrontendPlugin<
|
||||
TDeps extends { [name in string]: unknown },
|
||||
>(
|
||||
params: ApiFactory<TApi, TImpl, TDeps>,
|
||||
) => BlueprintParams<AnyApiFactory>;
|
||||
) => ExtensionBlueprintParams<AnyApiFactory>;
|
||||
}>;
|
||||
'api:app/discovery': ExtensionDefinition<{
|
||||
kind: 'api';
|
||||
@@ -424,7 +424,7 @@ const appPlugin: FrontendPlugin<
|
||||
TDeps extends { [name in string]: unknown },
|
||||
>(
|
||||
params: ApiFactory<TApi, TImpl, TDeps>,
|
||||
) => BlueprintParams<AnyApiFactory>;
|
||||
) => ExtensionBlueprintParams<AnyApiFactory>;
|
||||
}>;
|
||||
'api:app/error': ExtensionDefinition<{
|
||||
kind: 'api';
|
||||
@@ -443,7 +443,7 @@ const appPlugin: FrontendPlugin<
|
||||
TDeps extends { [name in string]: unknown },
|
||||
>(
|
||||
params: ApiFactory<TApi, TImpl, TDeps>,
|
||||
) => BlueprintParams<AnyApiFactory>;
|
||||
) => ExtensionBlueprintParams<AnyApiFactory>;
|
||||
}>;
|
||||
'api:app/feature-flags': ExtensionDefinition<{
|
||||
kind: 'api';
|
||||
@@ -462,7 +462,7 @@ const appPlugin: FrontendPlugin<
|
||||
TDeps extends { [name in string]: unknown },
|
||||
>(
|
||||
params: ApiFactory<TApi, TImpl, TDeps>,
|
||||
) => BlueprintParams<AnyApiFactory>;
|
||||
) => ExtensionBlueprintParams<AnyApiFactory>;
|
||||
}>;
|
||||
'api:app/fetch': ExtensionDefinition<{
|
||||
kind: 'api';
|
||||
@@ -481,7 +481,7 @@ const appPlugin: FrontendPlugin<
|
||||
TDeps extends { [name in string]: unknown },
|
||||
>(
|
||||
params: ApiFactory<TApi, TImpl, TDeps>,
|
||||
) => BlueprintParams<AnyApiFactory>;
|
||||
) => ExtensionBlueprintParams<AnyApiFactory>;
|
||||
}>;
|
||||
'api:app/github-auth': ExtensionDefinition<{
|
||||
kind: 'api';
|
||||
@@ -500,7 +500,7 @@ const appPlugin: FrontendPlugin<
|
||||
TDeps extends { [name in string]: unknown },
|
||||
>(
|
||||
params: ApiFactory<TApi, TImpl, TDeps>,
|
||||
) => BlueprintParams<AnyApiFactory>;
|
||||
) => ExtensionBlueprintParams<AnyApiFactory>;
|
||||
}>;
|
||||
'api:app/gitlab-auth': ExtensionDefinition<{
|
||||
kind: 'api';
|
||||
@@ -519,7 +519,7 @@ const appPlugin: FrontendPlugin<
|
||||
TDeps extends { [name in string]: unknown },
|
||||
>(
|
||||
params: ApiFactory<TApi, TImpl, TDeps>,
|
||||
) => BlueprintParams<AnyApiFactory>;
|
||||
) => ExtensionBlueprintParams<AnyApiFactory>;
|
||||
}>;
|
||||
'api:app/google-auth': ExtensionDefinition<{
|
||||
kind: 'api';
|
||||
@@ -538,7 +538,7 @@ const appPlugin: FrontendPlugin<
|
||||
TDeps extends { [name in string]: unknown },
|
||||
>(
|
||||
params: ApiFactory<TApi, TImpl, TDeps>,
|
||||
) => BlueprintParams<AnyApiFactory>;
|
||||
) => ExtensionBlueprintParams<AnyApiFactory>;
|
||||
}>;
|
||||
'api:app/icons': ExtensionDefinition<{
|
||||
config: {};
|
||||
@@ -571,7 +571,7 @@ const appPlugin: FrontendPlugin<
|
||||
TDeps extends { [name in string]: unknown },
|
||||
>(
|
||||
params: ApiFactory<TApi, TImpl, TDeps>,
|
||||
) => BlueprintParams<AnyApiFactory>;
|
||||
) => ExtensionBlueprintParams<AnyApiFactory>;
|
||||
}>;
|
||||
'api:app/microsoft-auth': ExtensionDefinition<{
|
||||
kind: 'api';
|
||||
@@ -590,7 +590,7 @@ const appPlugin: FrontendPlugin<
|
||||
TDeps extends { [name in string]: unknown },
|
||||
>(
|
||||
params: ApiFactory<TApi, TImpl, TDeps>,
|
||||
) => BlueprintParams<AnyApiFactory>;
|
||||
) => ExtensionBlueprintParams<AnyApiFactory>;
|
||||
}>;
|
||||
'api:app/oauth-request': ExtensionDefinition<{
|
||||
kind: 'api';
|
||||
@@ -609,7 +609,7 @@ const appPlugin: FrontendPlugin<
|
||||
TDeps extends { [name in string]: unknown },
|
||||
>(
|
||||
params: ApiFactory<TApi, TImpl, TDeps>,
|
||||
) => BlueprintParams<AnyApiFactory>;
|
||||
) => ExtensionBlueprintParams<AnyApiFactory>;
|
||||
}>;
|
||||
'api:app/okta-auth': ExtensionDefinition<{
|
||||
kind: 'api';
|
||||
@@ -628,7 +628,7 @@ const appPlugin: FrontendPlugin<
|
||||
TDeps extends { [name in string]: unknown },
|
||||
>(
|
||||
params: ApiFactory<TApi, TImpl, TDeps>,
|
||||
) => BlueprintParams<AnyApiFactory>;
|
||||
) => ExtensionBlueprintParams<AnyApiFactory>;
|
||||
}>;
|
||||
'api:app/onelogin-auth': ExtensionDefinition<{
|
||||
kind: 'api';
|
||||
@@ -647,7 +647,7 @@ const appPlugin: FrontendPlugin<
|
||||
TDeps extends { [name in string]: unknown },
|
||||
>(
|
||||
params: ApiFactory<TApi, TImpl, TDeps>,
|
||||
) => BlueprintParams<AnyApiFactory>;
|
||||
) => ExtensionBlueprintParams<AnyApiFactory>;
|
||||
}>;
|
||||
'api:app/permission': ExtensionDefinition<{
|
||||
kind: 'api';
|
||||
@@ -666,7 +666,7 @@ const appPlugin: FrontendPlugin<
|
||||
TDeps extends { [name in string]: unknown },
|
||||
>(
|
||||
params: ApiFactory<TApi, TImpl, TDeps>,
|
||||
) => BlueprintParams<AnyApiFactory>;
|
||||
) => ExtensionBlueprintParams<AnyApiFactory>;
|
||||
}>;
|
||||
'api:app/scm-auth': ExtensionDefinition<{
|
||||
kind: 'api';
|
||||
@@ -685,7 +685,7 @@ const appPlugin: FrontendPlugin<
|
||||
TDeps extends { [name in string]: unknown },
|
||||
>(
|
||||
params: ApiFactory<TApi, TImpl, TDeps>,
|
||||
) => BlueprintParams<AnyApiFactory>;
|
||||
) => ExtensionBlueprintParams<AnyApiFactory>;
|
||||
}>;
|
||||
'api:app/scm-integrations': ExtensionDefinition<{
|
||||
kind: 'api';
|
||||
@@ -704,7 +704,7 @@ const appPlugin: FrontendPlugin<
|
||||
TDeps extends { [name in string]: unknown },
|
||||
>(
|
||||
params: ApiFactory<TApi, TImpl, TDeps>,
|
||||
) => BlueprintParams<AnyApiFactory>;
|
||||
) => ExtensionBlueprintParams<AnyApiFactory>;
|
||||
}>;
|
||||
'api:app/storage': ExtensionDefinition<{
|
||||
kind: 'api';
|
||||
@@ -723,7 +723,7 @@ const appPlugin: FrontendPlugin<
|
||||
TDeps extends { [name in string]: unknown },
|
||||
>(
|
||||
params: ApiFactory<TApi, TImpl, TDeps>,
|
||||
) => BlueprintParams<AnyApiFactory>;
|
||||
) => ExtensionBlueprintParams<AnyApiFactory>;
|
||||
}>;
|
||||
'api:app/translations': ExtensionDefinition<{
|
||||
config: {};
|
||||
@@ -761,7 +761,7 @@ const appPlugin: FrontendPlugin<
|
||||
TDeps extends { [name in string]: unknown },
|
||||
>(
|
||||
params: ApiFactory<TApi, TImpl, TDeps>,
|
||||
) => BlueprintParams<AnyApiFactory>;
|
||||
) => ExtensionBlueprintParams<AnyApiFactory>;
|
||||
}>;
|
||||
'api:app/vmware-cloud-auth': ExtensionDefinition<{
|
||||
kind: 'api';
|
||||
@@ -780,7 +780,7 @@ const appPlugin: FrontendPlugin<
|
||||
TDeps extends { [name in string]: unknown },
|
||||
>(
|
||||
params: ApiFactory<TApi, TImpl, TDeps>,
|
||||
) => BlueprintParams<AnyApiFactory>;
|
||||
) => ExtensionBlueprintParams<AnyApiFactory>;
|
||||
}>;
|
||||
'app-root-element:app/alert-display': ExtensionDefinition<{
|
||||
config: {
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
import { AnyApiFactory } from '@backstage/core-plugin-api';
|
||||
import { AnyRouteRefParams } from '@backstage/frontend-plugin-api';
|
||||
import { ApiFactory } from '@backstage/core-plugin-api';
|
||||
import { BlueprintParams } from '@backstage/frontend-plugin-api/src/wiring/createExtensionBlueprint';
|
||||
import { ConfigurableExtensionDataRef } from '@backstage/frontend-plugin-api';
|
||||
import { ExtensionBlueprintParams } from '@backstage/frontend-plugin-api';
|
||||
import { ExtensionDefinition } from '@backstage/frontend-plugin-api';
|
||||
import { FrontendPlugin } from '@backstage/frontend-plugin-api';
|
||||
import { JSX as JSX_2 } from 'react';
|
||||
@@ -111,7 +111,7 @@ const _default: FrontendPlugin<
|
||||
TDeps extends { [name in string]: unknown },
|
||||
>(
|
||||
params: ApiFactory<TApi, TImpl, TDeps>,
|
||||
) => BlueprintParams<AnyApiFactory>;
|
||||
) => ExtensionBlueprintParams<AnyApiFactory>;
|
||||
}>;
|
||||
'page:catalog-import': ExtensionDefinition<{
|
||||
kind: 'page';
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
import { AnyApiFactory } from '@backstage/frontend-plugin-api';
|
||||
import { AnyRouteRefParams } from '@backstage/frontend-plugin-api';
|
||||
import { ApiFactory } from '@backstage/frontend-plugin-api';
|
||||
import { BlueprintParams } from '@backstage/frontend-plugin-api/src/wiring/createExtensionBlueprint';
|
||||
import { ConfigurableExtensionDataRef } from '@backstage/frontend-plugin-api';
|
||||
import { ExtensionBlueprintParams } from '@backstage/frontend-plugin-api';
|
||||
import { ExtensionDefinition } from '@backstage/frontend-plugin-api';
|
||||
import { FrontendPlugin } from '@backstage/frontend-plugin-api';
|
||||
import { IconComponent } from '@backstage/core-plugin-api';
|
||||
@@ -38,7 +38,7 @@ const _default: FrontendPlugin<
|
||||
TDeps extends { [name in string]: unknown },
|
||||
>(
|
||||
params: ApiFactory<TApi, TImpl, TDeps>,
|
||||
) => BlueprintParams<AnyApiFactory>;
|
||||
) => ExtensionBlueprintParams<AnyApiFactory>;
|
||||
}>;
|
||||
'nav-item:catalog-unprocessed-entities': ExtensionDefinition<{
|
||||
kind: 'nav-item';
|
||||
|
||||
@@ -7,7 +7,6 @@ import { AnyApiFactory } from '@backstage/frontend-plugin-api';
|
||||
import { AnyExtensionDataRef } from '@backstage/frontend-plugin-api';
|
||||
import { AnyRouteRefParams } from '@backstage/frontend-plugin-api';
|
||||
import { ApiFactory } from '@backstage/frontend-plugin-api';
|
||||
import { BlueprintParams } from '@backstage/frontend-plugin-api/src/wiring/createExtensionBlueprint';
|
||||
import { ConfigurableExtensionDataRef } from '@backstage/frontend-plugin-api';
|
||||
import { defaultEntityContentGroups } from '@backstage/plugin-catalog-react/alpha';
|
||||
import { Entity } from '@backstage/catalog-model';
|
||||
@@ -15,6 +14,7 @@ import { EntityCardType } from '@backstage/plugin-catalog-react/alpha';
|
||||
import { EntityContentLayoutProps } from '@backstage/plugin-catalog-react/alpha';
|
||||
import { EntityContextMenuItemParams } from '@backstage/plugin-catalog-react/alpha';
|
||||
import { EntityPredicate } from '@backstage/plugin-catalog-react/alpha';
|
||||
import { ExtensionBlueprintParams } from '@backstage/frontend-plugin-api';
|
||||
import { ExtensionDefinition } from '@backstage/frontend-plugin-api';
|
||||
import { ExtensionInput } from '@backstage/frontend-plugin-api';
|
||||
import { ExternalRouteRef } from '@backstage/frontend-plugin-api';
|
||||
@@ -154,7 +154,7 @@ const _default: FrontendPlugin<
|
||||
TDeps extends { [name in string]: unknown },
|
||||
>(
|
||||
params: ApiFactory<TApi, TImpl, TDeps>,
|
||||
) => BlueprintParams<AnyApiFactory>;
|
||||
) => ExtensionBlueprintParams<AnyApiFactory>;
|
||||
}>;
|
||||
'api:catalog/entity-presentation': ExtensionDefinition<{
|
||||
kind: 'api';
|
||||
@@ -173,7 +173,7 @@ const _default: FrontendPlugin<
|
||||
TDeps extends { [name in string]: unknown },
|
||||
>(
|
||||
params: ApiFactory<TApi, TImpl, TDeps>,
|
||||
) => BlueprintParams<AnyApiFactory>;
|
||||
) => ExtensionBlueprintParams<AnyApiFactory>;
|
||||
}>;
|
||||
'api:catalog/starred-entities': ExtensionDefinition<{
|
||||
kind: 'api';
|
||||
@@ -192,7 +192,7 @@ const _default: FrontendPlugin<
|
||||
TDeps extends { [name in string]: unknown },
|
||||
>(
|
||||
params: ApiFactory<TApi, TImpl, TDeps>,
|
||||
) => BlueprintParams<AnyApiFactory>;
|
||||
) => ExtensionBlueprintParams<AnyApiFactory>;
|
||||
}>;
|
||||
'catalog-filter:catalog/kind': ExtensionDefinition<{
|
||||
config: {
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
import { AnyApiFactory } from '@backstage/frontend-plugin-api';
|
||||
import { AnyRouteRefParams } from '@backstage/frontend-plugin-api';
|
||||
import { ApiFactory } from '@backstage/frontend-plugin-api';
|
||||
import { BlueprintParams } from '@backstage/frontend-plugin-api/src/wiring/createExtensionBlueprint';
|
||||
import { ConfigurableExtensionDataRef } from '@backstage/frontend-plugin-api';
|
||||
import { ExtensionBlueprintParams } from '@backstage/frontend-plugin-api';
|
||||
import { ExtensionDefinition } from '@backstage/frontend-plugin-api';
|
||||
import { FrontendPlugin } from '@backstage/frontend-plugin-api';
|
||||
import { IconComponent } from '@backstage/core-plugin-api';
|
||||
@@ -38,7 +38,7 @@ const _default: FrontendPlugin<
|
||||
TDeps extends { [name in string]: unknown },
|
||||
>(
|
||||
params: ApiFactory<TApi, TImpl, TDeps>,
|
||||
) => BlueprintParams<AnyApiFactory>;
|
||||
) => ExtensionBlueprintParams<AnyApiFactory>;
|
||||
}>;
|
||||
'nav-item:devtools': ExtensionDefinition<{
|
||||
kind: 'nav-item';
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
import { AnyApiFactory } from '@backstage/frontend-plugin-api';
|
||||
import { AnyRouteRefParams } from '@backstage/frontend-plugin-api';
|
||||
import { ApiFactory } from '@backstage/frontend-plugin-api';
|
||||
import { BlueprintParams } from '@backstage/frontend-plugin-api/src/wiring/createExtensionBlueprint';
|
||||
import { ConfigurableExtensionDataRef } from '@backstage/frontend-plugin-api';
|
||||
import { ExtensionBlueprintParams } from '@backstage/frontend-plugin-api';
|
||||
import { ExtensionDefinition } from '@backstage/frontend-plugin-api';
|
||||
import { ExtensionInput } from '@backstage/frontend-plugin-api';
|
||||
import { FrontendPlugin } from '@backstage/frontend-plugin-api';
|
||||
@@ -39,7 +39,7 @@ const _default: FrontendPlugin<
|
||||
TDeps extends { [name in string]: unknown },
|
||||
>(
|
||||
params: ApiFactory<TApi, TImpl, TDeps>,
|
||||
) => BlueprintParams<AnyApiFactory>;
|
||||
) => ExtensionBlueprintParams<AnyApiFactory>;
|
||||
}>;
|
||||
'app-root-element:home/visit-listener': ExtensionDefinition<{
|
||||
kind: 'app-root-element';
|
||||
|
||||
@@ -6,11 +6,11 @@
|
||||
import { AnyApiFactory } from '@backstage/frontend-plugin-api';
|
||||
import { AnyRouteRefParams } from '@backstage/frontend-plugin-api';
|
||||
import { ApiFactory } from '@backstage/frontend-plugin-api';
|
||||
import { BlueprintParams } from '@backstage/frontend-plugin-api/src/wiring/createExtensionBlueprint';
|
||||
import { ConfigurableExtensionDataRef } from '@backstage/frontend-plugin-api';
|
||||
import { defaultEntityContentGroups } from '@backstage/plugin-catalog-react/alpha';
|
||||
import { Entity } from '@backstage/catalog-model';
|
||||
import { EntityPredicate } from '@backstage/plugin-catalog-react/alpha';
|
||||
import { ExtensionBlueprintParams } from '@backstage/frontend-plugin-api';
|
||||
import { ExtensionDefinition } from '@backstage/frontend-plugin-api';
|
||||
import { FrontendPlugin } from '@backstage/frontend-plugin-api';
|
||||
import { JSX as JSX_2 } from 'react';
|
||||
@@ -41,7 +41,7 @@ const _default: FrontendPlugin<
|
||||
TDeps extends { [name in string]: unknown },
|
||||
>(
|
||||
params: ApiFactory<TApi, TImpl, TDeps>,
|
||||
) => BlueprintParams<AnyApiFactory>;
|
||||
) => ExtensionBlueprintParams<AnyApiFactory>;
|
||||
}>;
|
||||
'api:kubernetes/auth-providers': ExtensionDefinition<{
|
||||
kind: 'api';
|
||||
@@ -60,7 +60,7 @@ const _default: FrontendPlugin<
|
||||
TDeps extends { [name in string]: unknown },
|
||||
>(
|
||||
params: ApiFactory<TApi, TImpl, TDeps>,
|
||||
) => BlueprintParams<AnyApiFactory>;
|
||||
) => ExtensionBlueprintParams<AnyApiFactory>;
|
||||
}>;
|
||||
'api:kubernetes/cluster-link-formatter': ExtensionDefinition<{
|
||||
kind: 'api';
|
||||
@@ -79,7 +79,7 @@ const _default: FrontendPlugin<
|
||||
TDeps extends { [name in string]: unknown },
|
||||
>(
|
||||
params: ApiFactory<TApi, TImpl, TDeps>,
|
||||
) => BlueprintParams<AnyApiFactory>;
|
||||
) => ExtensionBlueprintParams<AnyApiFactory>;
|
||||
}>;
|
||||
'api:kubernetes/proxy': ExtensionDefinition<{
|
||||
kind: 'api';
|
||||
@@ -98,7 +98,7 @@ const _default: FrontendPlugin<
|
||||
TDeps extends { [name in string]: unknown },
|
||||
>(
|
||||
params: ApiFactory<TApi, TImpl, TDeps>,
|
||||
) => BlueprintParams<AnyApiFactory>;
|
||||
) => ExtensionBlueprintParams<AnyApiFactory>;
|
||||
}>;
|
||||
'entity-content:kubernetes/kubernetes': ExtensionDefinition<{
|
||||
kind: 'entity-content';
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
import { AnyApiFactory } from '@backstage/frontend-plugin-api';
|
||||
import { AnyRouteRefParams } from '@backstage/frontend-plugin-api';
|
||||
import { ApiFactory } from '@backstage/frontend-plugin-api';
|
||||
import { BlueprintParams } from '@backstage/frontend-plugin-api/src/wiring/createExtensionBlueprint';
|
||||
import { ConfigurableExtensionDataRef } from '@backstage/frontend-plugin-api';
|
||||
import { ExtensionBlueprintParams } from '@backstage/frontend-plugin-api';
|
||||
import { ExtensionDefinition } from '@backstage/frontend-plugin-api';
|
||||
import { FrontendPlugin } from '@backstage/frontend-plugin-api';
|
||||
import { JSX as JSX_2 } from 'react';
|
||||
@@ -37,7 +37,7 @@ const _default: FrontendPlugin<
|
||||
TDeps extends { [name in string]: unknown },
|
||||
>(
|
||||
params: ApiFactory<TApi, TImpl, TDeps>,
|
||||
) => BlueprintParams<AnyApiFactory>;
|
||||
) => ExtensionBlueprintParams<AnyApiFactory>;
|
||||
}>;
|
||||
'page:notifications': ExtensionDefinition<{
|
||||
kind: 'page';
|
||||
|
||||
@@ -8,12 +8,12 @@ import { AnyApiRef } from '@backstage/core-plugin-api';
|
||||
import { ApiFactory } from '@backstage/frontend-plugin-api';
|
||||
import { ApiHolder } from '@backstage/core-plugin-api';
|
||||
import { ApiRef } from '@backstage/frontend-plugin-api';
|
||||
import { BlueprintParams } from '@backstage/frontend-plugin-api/src/wiring/createExtensionBlueprint';
|
||||
import { ComponentType } from 'react';
|
||||
import { ConfigurableExtensionDataRef } from '@backstage/frontend-plugin-api';
|
||||
import { CustomFieldValidator } from '@backstage/plugin-scaffolder-react';
|
||||
import { Dispatch } from 'react';
|
||||
import { ExtensionBlueprint } from '@backstage/frontend-plugin-api';
|
||||
import { ExtensionBlueprintParams } from '@backstage/frontend-plugin-api';
|
||||
import { ExtensionDefinition } from '@backstage/frontend-plugin-api';
|
||||
import { ExtensionInput } from '@backstage/frontend-plugin-api';
|
||||
import { FieldExtensionComponentProps } from '@backstage/plugin-scaffolder-react';
|
||||
@@ -226,7 +226,7 @@ export const formFieldsApi: ExtensionDefinition<{
|
||||
TDeps extends { [name in string]: unknown },
|
||||
>(
|
||||
params: ApiFactory<TApi, TImpl, TDeps>,
|
||||
) => BlueprintParams<AnyApiFactory>;
|
||||
) => ExtensionBlueprintParams<AnyApiFactory>;
|
||||
}>;
|
||||
|
||||
// @alpha @deprecated (undocumented)
|
||||
|
||||
@@ -7,11 +7,11 @@ import { AnyApiFactory } from '@backstage/frontend-plugin-api';
|
||||
import { AnyRouteRefParams } from '@backstage/frontend-plugin-api';
|
||||
import { ApiFactory } from '@backstage/frontend-plugin-api';
|
||||
import { ApiRef } from '@backstage/frontend-plugin-api';
|
||||
import { BlueprintParams } from '@backstage/frontend-plugin-api/src/wiring/createExtensionBlueprint';
|
||||
import { ComponentType } from 'react';
|
||||
import { ConfigurableExtensionDataRef } from '@backstage/frontend-plugin-api';
|
||||
import { Entity } from '@backstage/catalog-model';
|
||||
import { EntityPredicate } from '@backstage/plugin-catalog-react/alpha';
|
||||
import { ExtensionBlueprintParams } from '@backstage/frontend-plugin-api';
|
||||
import { ExtensionDefinition } from '@backstage/frontend-plugin-api';
|
||||
import { ExtensionInput } from '@backstage/frontend-plugin-api';
|
||||
import { ExternalRouteRef } from '@backstage/frontend-plugin-api';
|
||||
@@ -74,7 +74,7 @@ const _default: FrontendPlugin<
|
||||
TDeps extends { [name in string]: unknown },
|
||||
>(
|
||||
params: ApiFactory<TApi, TImpl, TDeps>,
|
||||
) => BlueprintParams<AnyApiFactory>;
|
||||
) => ExtensionBlueprintParams<AnyApiFactory>;
|
||||
}>;
|
||||
'api:scaffolder/form-decorators': ExtensionDefinition<{
|
||||
config: {};
|
||||
@@ -105,7 +105,7 @@ const _default: FrontendPlugin<
|
||||
TDeps extends { [name in string]: unknown },
|
||||
>(
|
||||
params: ApiFactory<TApi, TImpl, TDeps>,
|
||||
) => BlueprintParams<AnyApiFactory>;
|
||||
) => ExtensionBlueprintParams<AnyApiFactory>;
|
||||
}>;
|
||||
'api:scaffolder/form-fields': ExtensionDefinition<{
|
||||
config: {};
|
||||
@@ -136,7 +136,7 @@ const _default: FrontendPlugin<
|
||||
TDeps extends { [name in string]: unknown },
|
||||
>(
|
||||
params: ApiFactory<TApi, TImpl, TDeps>,
|
||||
) => BlueprintParams<AnyApiFactory>;
|
||||
) => ExtensionBlueprintParams<AnyApiFactory>;
|
||||
}>;
|
||||
'entity-icon-link:scaffolder/launch-template': ExtensionDefinition<{
|
||||
kind: 'entity-icon-link';
|
||||
@@ -293,7 +293,7 @@ export const formDecoratorsApi: ExtensionDefinition<{
|
||||
TDeps extends { [name in string]: unknown },
|
||||
>(
|
||||
params: ApiFactory<TApi, TImpl, TDeps>,
|
||||
) => BlueprintParams<AnyApiFactory>;
|
||||
) => ExtensionBlueprintParams<AnyApiFactory>;
|
||||
}>;
|
||||
|
||||
// @alpha (undocumented)
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
import { AnyApiFactory } from '@backstage/core-plugin-api';
|
||||
import { AnyRouteRefParams } from '@backstage/frontend-plugin-api';
|
||||
import { ApiFactory } from '@backstage/core-plugin-api';
|
||||
import { BlueprintParams } from '@backstage/frontend-plugin-api/src/wiring/createExtensionBlueprint';
|
||||
import { ConfigurableExtensionDataRef } from '@backstage/frontend-plugin-api';
|
||||
import { ExtensionBlueprintParams } from '@backstage/frontend-plugin-api';
|
||||
import { ExtensionDefinition } from '@backstage/frontend-plugin-api';
|
||||
import { ExtensionInput } from '@backstage/frontend-plugin-api';
|
||||
import { FrontendPlugin } from '@backstage/frontend-plugin-api';
|
||||
@@ -43,7 +43,7 @@ const _default: FrontendPlugin<
|
||||
TDeps extends { [name in string]: unknown },
|
||||
>(
|
||||
params: ApiFactory<TApi, TImpl, TDeps>,
|
||||
) => BlueprintParams<AnyApiFactory>;
|
||||
) => ExtensionBlueprintParams<AnyApiFactory>;
|
||||
}>;
|
||||
'nav-item:search': ExtensionDefinition<{
|
||||
kind: 'nav-item';
|
||||
@@ -157,7 +157,7 @@ export const searchApi: ExtensionDefinition<{
|
||||
TDeps extends { [name in string]: unknown },
|
||||
>(
|
||||
params: ApiFactory<TApi, TImpl, TDeps>,
|
||||
) => BlueprintParams<AnyApiFactory>;
|
||||
) => ExtensionBlueprintParams<AnyApiFactory>;
|
||||
}>;
|
||||
|
||||
// @alpha (undocumented)
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
```ts
|
||||
import { AnyApiFactory } from '@backstage/frontend-plugin-api';
|
||||
import { ApiFactory } from '@backstage/frontend-plugin-api';
|
||||
import { BlueprintParams } from '@backstage/frontend-plugin-api/src/wiring/createExtensionBlueprint';
|
||||
import { ConfigurableExtensionDataRef } from '@backstage/frontend-plugin-api';
|
||||
import { ExtensionBlueprintParams } from '@backstage/frontend-plugin-api';
|
||||
import { ExtensionDefinition } from '@backstage/frontend-plugin-api';
|
||||
import { FrontendPlugin } from '@backstage/frontend-plugin-api';
|
||||
import { JSX as JSX_2 } from 'react';
|
||||
@@ -33,7 +33,7 @@ const _default: FrontendPlugin<
|
||||
TDeps extends { [name in string]: unknown },
|
||||
>(
|
||||
params: ApiFactory<TApi, TImpl, TDeps>,
|
||||
) => BlueprintParams<AnyApiFactory>;
|
||||
) => ExtensionBlueprintParams<AnyApiFactory>;
|
||||
}>;
|
||||
'app-root-element:signals/signals-display': ExtensionDefinition<{
|
||||
kind: 'app-root-element';
|
||||
|
||||
@@ -7,11 +7,11 @@ import { AnyApiFactory } from '@backstage/frontend-plugin-api';
|
||||
import { AnyExtensionDataRef } from '@backstage/frontend-plugin-api';
|
||||
import { AnyRouteRefParams } from '@backstage/frontend-plugin-api';
|
||||
import { ApiFactory } from '@backstage/frontend-plugin-api';
|
||||
import { BlueprintParams } from '@backstage/frontend-plugin-api/src/wiring/createExtensionBlueprint';
|
||||
import { ConfigurableExtensionDataRef } from '@backstage/frontend-plugin-api';
|
||||
import { defaultEntityContentGroups } from '@backstage/plugin-catalog-react/alpha';
|
||||
import { Entity } from '@backstage/catalog-model';
|
||||
import { EntityPredicate } from '@backstage/plugin-catalog-react/alpha';
|
||||
import { ExtensionBlueprintParams } from '@backstage/frontend-plugin-api';
|
||||
import { ExtensionDefinition } from '@backstage/frontend-plugin-api';
|
||||
import { ExtensionInput } from '@backstage/frontend-plugin-api';
|
||||
import { FrontendPlugin } from '@backstage/frontend-plugin-api';
|
||||
@@ -54,7 +54,7 @@ const _default: FrontendPlugin<
|
||||
TDeps extends { [name in string]: unknown },
|
||||
>(
|
||||
params: ApiFactory<TApi, TImpl, TDeps>,
|
||||
) => BlueprintParams<AnyApiFactory>;
|
||||
) => ExtensionBlueprintParams<AnyApiFactory>;
|
||||
}>;
|
||||
'api:techdocs/storage': ExtensionDefinition<{
|
||||
kind: 'api';
|
||||
@@ -73,7 +73,7 @@ const _default: FrontendPlugin<
|
||||
TDeps extends { [name in string]: unknown },
|
||||
>(
|
||||
params: ApiFactory<TApi, TImpl, TDeps>,
|
||||
) => BlueprintParams<AnyApiFactory>;
|
||||
) => ExtensionBlueprintParams<AnyApiFactory>;
|
||||
}>;
|
||||
'empty-state:techdocs/entity-content': ExtensionDefinition<{
|
||||
config: {};
|
||||
|
||||
Reference in New Issue
Block a user