@backstage/frontend-plugin-api 0.7.0 → 0.8.0-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.
Files changed (46) hide show
  1. package/CHANGELOG.md +61 -0
  2. package/dist/blueprints/ApiBlueprint.esm.js +1 -1
  3. package/dist/blueprints/ApiBlueprint.esm.js.map +1 -1
  4. package/dist/blueprints/IconBundleBlueprint.esm.js +1 -1
  5. package/dist/blueprints/IconBundleBlueprint.esm.js.map +1 -1
  6. package/dist/blueprints/ThemeBlueprint.esm.js +1 -1
  7. package/dist/blueprints/ThemeBlueprint.esm.js.map +1 -1
  8. package/dist/blueprints/TranslationBlueprint.esm.js +1 -1
  9. package/dist/blueprints/TranslationBlueprint.esm.js.map +1 -1
  10. package/dist/extensions/createComponentExtension.esm.js +13 -17
  11. package/dist/extensions/createComponentExtension.esm.js.map +1 -1
  12. package/dist/index.d.ts +305 -572
  13. package/dist/index.esm.js +0 -11
  14. package/dist/index.esm.js.map +1 -1
  15. package/dist/schema/createSchemaFromZod.esm.js.map +1 -1
  16. package/dist/wiring/createExtension.esm.js +21 -27
  17. package/dist/wiring/createExtension.esm.js.map +1 -1
  18. package/dist/wiring/createExtensionBlueprint.esm.js +58 -61
  19. package/dist/wiring/createExtensionBlueprint.esm.js.map +1 -1
  20. package/dist/wiring/createExtensionInput.esm.js +2 -1
  21. package/dist/wiring/createExtensionInput.esm.js.map +1 -1
  22. package/dist/wiring/createExtensionOverrides.esm.js.map +1 -1
  23. package/dist/wiring/createFrontendPlugin.esm.js +6 -1
  24. package/dist/wiring/createFrontendPlugin.esm.js.map +1 -1
  25. package/dist/wiring/resolveExtensionDefinition.esm.js.map +1 -1
  26. package/package.json +5 -5
  27. package/dist/extensions/createApiExtension.esm.js +0 -32
  28. package/dist/extensions/createApiExtension.esm.js.map +0 -1
  29. package/dist/extensions/createAppRootElementExtension.esm.js +0 -25
  30. package/dist/extensions/createAppRootElementExtension.esm.js.map +0 -1
  31. package/dist/extensions/createAppRootWrapperExtension.esm.js +0 -32
  32. package/dist/extensions/createAppRootWrapperExtension.esm.js.map +0 -1
  33. package/dist/extensions/createNavItemExtension.esm.js +0 -35
  34. package/dist/extensions/createNavItemExtension.esm.js.map +0 -1
  35. package/dist/extensions/createNavLogoExtension.esm.js +0 -30
  36. package/dist/extensions/createNavLogoExtension.esm.js.map +0 -1
  37. package/dist/extensions/createPageExtension.esm.js +0 -38
  38. package/dist/extensions/createPageExtension.esm.js.map +0 -1
  39. package/dist/extensions/createRouterExtension.esm.js +0 -32
  40. package/dist/extensions/createRouterExtension.esm.js.map +0 -1
  41. package/dist/extensions/createSignInPageExtension.esm.js +0 -44
  42. package/dist/extensions/createSignInPageExtension.esm.js.map +0 -1
  43. package/dist/extensions/createThemeExtension.esm.js +0 -22
  44. package/dist/extensions/createThemeExtension.esm.js.map +0 -1
  45. package/dist/extensions/createTranslationExtension.esm.js +0 -22
  46. package/dist/extensions/createTranslationExtension.esm.js.map +0 -1
package/dist/index.d.ts CHANGED
@@ -2,9 +2,9 @@
2
2
  import * as React from 'react';
3
3
  import React__default, { ReactNode, JSX as JSX$1, ComponentType, PropsWithChildren } from 'react';
4
4
  import * as _backstage_core_plugin_api from '@backstage/core-plugin-api';
5
- import { ApiRef, AnyApiFactory, IconComponent as IconComponent$1, SignInPageProps, AppTheme, AnyApiRef } from '@backstage/core-plugin-api';
5
+ import { ApiHolder, ApiRef, AnyApiFactory, IconComponent as IconComponent$1, SignInPageProps, AppTheme } from '@backstage/core-plugin-api';
6
6
  export { AlertApi, AlertMessage, AnyApiFactory, AnyApiRef, ApiFactory, ApiHolder, ApiRef, ApiRefConfig, AppTheme, AppThemeApi, AuthProviderInfo, AuthRequestOptions, BackstageIdentityApi, BackstageIdentityResponse, BackstageUserIdentity, ConfigApi, DiscoveryApi, ErrorApi, ErrorApiError, ErrorApiErrorContext, FeatureFlag, FeatureFlagState, FeatureFlagsApi, FeatureFlagsSaveOptions, FetchApi, IdentityApi, OAuthApi, OAuthRequestApi, OAuthRequester, OAuthRequesterOptions, OAuthScope, OpenIdConnectApi, PendingOAuthRequest, ProfileInfo, ProfileInfoApi, SessionApi, SessionState, StorageApi, StorageValueSnapshot, TypesToApiRefs, alertApiRef, appThemeApiRef, atlassianAuthApiRef, bitbucketAuthApiRef, bitbucketServerAuthApiRef, configApiRef, createApiFactory, createApiRef, discoveryApiRef, errorApiRef, featureFlagsApiRef, fetchApiRef, githubAuthApiRef, gitlabAuthApiRef, googleAuthApiRef, identityApiRef, microsoftAuthApiRef, oauthRequestApiRef, oktaAuthApiRef, oneloginAuthApiRef, storageApiRef, useApi, useApiHolder, vmwareCloudAuthApiRef, withApis } from '@backstage/core-plugin-api';
7
- import { z, ZodSchema, ZodTypeDef } from 'zod';
7
+ import { z } from 'zod';
8
8
  import { JsonObject } from '@backstage/types';
9
9
  import { TranslationResource, TranslationMessages } from '@backstage/core-plugin-api/alpha';
10
10
  export { TranslationMessages, TranslationMessagesOptions, TranslationRef, TranslationRefOptions, TranslationResource, TranslationResourceOptions, createTranslationMessages, createTranslationRef, createTranslationResource, useTranslationRef } from '@backstage/core-plugin-api/alpha';
@@ -262,18 +262,6 @@ declare const coreExtensionData: {
262
262
  routeRef: ConfigurableExtensionDataRef<RouteRef<AnyRouteRefParams>, "core.routing.ref", {}>;
263
263
  };
264
264
 
265
- /** @public */
266
- type PortableSchema<TOutput, TInput = TOutput> = {
267
- parse: (input: TInput) => TOutput;
268
- schema: JsonObject;
269
- };
270
-
271
- /**
272
- * @public
273
- * @deprecated Use the `config.schema` option of `createExtension` instead, or use `createExtensionBlueprint`.
274
- */
275
- declare function createSchemaFromZod<TOutput, TInput>(schemaCreator: (zImpl: typeof z) => ZodSchema<TOutput, ZodTypeDef, TInput>): PortableSchema<TOutput, TInput>;
276
-
277
265
  /**
278
266
  * Utility type to expand type aliases into their equivalent type.
279
267
  * @ignore
@@ -295,46 +283,32 @@ type CoreErrorBoundaryFallbackProps = {
295
283
  };
296
284
 
297
285
  /** @public */
298
- interface ExtensionInput<TExtensionData extends ExtensionDataRef<unknown, string, {
286
+ interface ExtensionInput<UExtensionData extends ExtensionDataRef<unknown, string, {
299
287
  optional?: true;
300
288
  }>, TConfig extends {
301
289
  singleton: boolean;
302
290
  optional: boolean;
303
291
  }> {
304
292
  $$type: '@backstage/ExtensionInput';
305
- extensionData: Array<TExtensionData>;
306
- config: TConfig;
307
- }
308
- /**
309
- * @public
310
- * @deprecated This type will be removed. Use `ExtensionInput` instead.
311
- */
312
- interface LegacyExtensionInput<TExtensionDataMap extends AnyExtensionDataMap, TConfig extends {
313
- singleton: boolean;
314
- optional: boolean;
315
- }> {
316
- $$type: '@backstage/ExtensionInput';
317
- extensionData: TExtensionDataMap;
293
+ extensionData: Array<UExtensionData>;
318
294
  config: TConfig;
295
+ replaces?: Array<{
296
+ id: string;
297
+ input: string;
298
+ }>;
319
299
  }
320
- /**
321
- * @public
322
- * @deprecated Use the following form instead: `createExtensionInput([dataRef1, dataRef2])`
323
- */
324
- declare function createExtensionInput<TExtensionDataMap extends AnyExtensionDataMap, TConfig extends {
325
- singleton?: boolean;
326
- optional?: boolean;
327
- }>(extensionData: TExtensionDataMap, config?: TConfig): LegacyExtensionInput<TExtensionDataMap, {
328
- singleton: TConfig['singleton'] extends true ? true : false;
329
- optional: TConfig['optional'] extends true ? true : false;
330
- }>;
331
300
  /** @public */
332
301
  declare function createExtensionInput<UExtensionData extends ExtensionDataRef<unknown, string, {
333
302
  optional?: true;
334
303
  }>, TConfig extends {
335
304
  singleton?: boolean;
336
305
  optional?: boolean;
337
- }>(extensionData: Array<UExtensionData>, config?: TConfig): ExtensionInput<UExtensionData, {
306
+ }>(extensionData: Array<UExtensionData>, config?: TConfig & {
307
+ replaces?: Array<{
308
+ id: string;
309
+ input: string;
310
+ }>;
311
+ }): ExtensionInput<UExtensionData, {
338
312
  singleton: TConfig['singleton'] extends true ? true : false;
339
313
  optional: TConfig['optional'] extends true ? true : false;
340
314
  }>;
@@ -373,78 +347,22 @@ type ExtensionDataContainer<UExtensionData extends AnyExtensionDataRef> = Iterab
373
347
  get<TId extends UExtensionData['id']>(ref: ExtensionDataRef<any, TId, any>): UExtensionData extends ExtensionDataRef<infer IData, TId, infer IConfig> ? IConfig['optional'] extends true ? IData | undefined : IData : never;
374
348
  };
375
349
 
376
- /**
377
- * @public
378
- * @deprecated Extension data maps will be removed.
379
- */
380
- type AnyExtensionDataMap = {
381
- [name in string]: AnyExtensionDataRef;
382
- };
383
- /**
384
- * @public
385
- * @deprecated This type will be removed.
386
- */
387
- type AnyExtensionInputMap = {
388
- [inputName in string]: LegacyExtensionInput<AnyExtensionDataMap, {
389
- optional: boolean;
390
- singleton: boolean;
391
- }>;
392
- };
393
- /**
394
- * Converts an extension data map into the matching concrete data values type.
395
- * @public
396
- * @deprecated Extension data maps will be removed.
397
- */
398
- type ExtensionDataValues<TExtensionData extends AnyExtensionDataMap> = {
399
- [DataName in keyof TExtensionData as TExtensionData[DataName]['config'] extends {
400
- optional: true;
401
- } ? never : DataName]: TExtensionData[DataName]['T'];
402
- } & {
403
- [DataName in keyof TExtensionData as TExtensionData[DataName]['config'] extends {
404
- optional: true;
405
- } ? DataName : never]?: TExtensionData[DataName]['T'];
406
- };
407
350
  /**
408
351
  * Convert a single extension input into a matching resolved input.
409
352
  * @public
410
353
  */
411
354
  type ResolvedExtensionInput<TExtensionInput extends ExtensionInput<any, any>> = TExtensionInput['extensionData'] extends Array<AnyExtensionDataRef> ? {
412
355
  node: AppNode;
413
- } & ExtensionDataContainer<TExtensionInput['extensionData'][number]> : TExtensionInput['extensionData'] extends AnyExtensionDataMap ? {
414
- node: AppNode;
415
- output: ExtensionDataValues<TExtensionInput['extensionData']>;
416
- } : never;
356
+ } & ExtensionDataContainer<TExtensionInput['extensionData'][number]> : never;
417
357
  /**
418
358
  * Converts an extension input map into a matching collection of resolved inputs.
419
359
  * @public
420
360
  */
421
361
  type ResolvedExtensionInputs<TInputs extends {
422
- [name in string]: ExtensionInput<any, any> | LegacyExtensionInput<any, any>;
362
+ [name in string]: ExtensionInput<any, any>;
423
363
  }> = {
424
364
  [InputName in keyof TInputs]: false extends TInputs[InputName]['config']['singleton'] ? Array<Expand<ResolvedExtensionInput<TInputs[InputName]>>> : false extends TInputs[InputName]['config']['optional'] ? Expand<ResolvedExtensionInput<TInputs[InputName]>> : Expand<ResolvedExtensionInput<TInputs[InputName]> | undefined>;
425
365
  };
426
- /**
427
- * @public
428
- * @deprecated This way of structuring the options is deprecated, this type will be removed in the future
429
- */
430
- interface LegacyCreateExtensionOptions<TOutput extends AnyExtensionDataMap, TInputs extends AnyExtensionInputMap, TConfig, TConfigInput> {
431
- kind?: string;
432
- namespace?: string;
433
- name?: string;
434
- attachTo: {
435
- id: string;
436
- input: string;
437
- };
438
- disabled?: boolean;
439
- inputs?: TInputs;
440
- output: TOutput;
441
- configSchema?: PortableSchema<TConfig, TConfigInput>;
442
- factory(context: {
443
- node: AppNode;
444
- config: TConfig;
445
- inputs: Expand<ResolvedExtensionInputs<TInputs>>;
446
- }): Expand<ExtensionDataValues<TOutput>>;
447
- }
448
366
  type ToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
449
367
  type PopUnion<U> = ToIntersection<U extends any ? () => U : never> extends () => infer R ? [rest: Exclude<U, R>, next: R] : undefined;
450
368
  /** @ignore */
@@ -475,6 +393,7 @@ type CreateExtensionOptions<TKind extends string | undefined, TNamespace extends
475
393
  };
476
394
  factory(context: {
477
395
  node: AppNode;
396
+ apis: ApiHolder;
478
397
  config: {
479
398
  [key in keyof TConfigSchema]: z.infer<ReturnType<TConfigSchema[key]>>;
480
399
  };
@@ -482,30 +401,28 @@ type CreateExtensionOptions<TKind extends string | undefined, TNamespace extends
482
401
  }): Iterable<UFactoryOutput>;
483
402
  } & VerifyExtensionFactoryOutput<UOutput, UFactoryOutput>;
484
403
  /** @public */
485
- interface ExtensionDefinition<TConfig, TConfigInput = TConfig, UOutput extends AnyExtensionDataRef = AnyExtensionDataRef, TInputs extends {
486
- [inputName in string]: ExtensionInput<AnyExtensionDataRef, {
487
- optional: boolean;
488
- singleton: boolean;
489
- }>;
490
- } = {}, TIdParts extends {
404
+ type ExtensionDefinitionParameters = {
491
405
  kind?: string;
492
406
  namespace?: string;
493
407
  name?: string;
494
- } = {
495
- kind?: string;
496
- namespace?: string;
497
- name?: string;
498
- }> {
499
- $$type: '@backstage/ExtensionDefinition';
500
- readonly kind?: TIdParts['kind'];
501
- readonly namespace?: TIdParts['namespace'];
502
- readonly name?: TIdParts['name'];
503
- readonly attachTo: {
504
- id: string;
505
- input: string;
408
+ configInput?: {
409
+ [K in string]: any;
506
410
  };
507
- readonly disabled: boolean;
508
- readonly configSchema?: PortableSchema<TConfig, TConfigInput>;
411
+ config?: {
412
+ [K in string]: any;
413
+ };
414
+ output?: AnyExtensionDataRef;
415
+ inputs?: {
416
+ [KName in string]: ExtensionInput<AnyExtensionDataRef, {
417
+ optional: boolean;
418
+ singleton: boolean;
419
+ }>;
420
+ };
421
+ };
422
+ /** @public */
423
+ type ExtensionDefinition<T extends ExtensionDefinitionParameters = ExtensionDefinitionParameters> = {
424
+ $$type: '@backstage/ExtensionDefinition';
425
+ readonly T: T;
509
426
  override<TExtensionConfigSchema extends {
510
427
  [key in string]: (zImpl: typeof z) => z.ZodType;
511
428
  }, UFactoryOutput extends ExtensionDataValue<any, any>, UNewOutput extends AnyExtensionDataRef, TExtraInputs extends {
@@ -520,30 +437,39 @@ interface ExtensionDefinition<TConfig, TConfigInput = TConfig, UOutput extends A
520
437
  };
521
438
  disabled?: boolean;
522
439
  inputs?: TExtraInputs & {
523
- [KName in keyof TInputs]?: `Error: Input '${KName & string}' is already defined in parent definition`;
440
+ [KName in keyof T['inputs']]?: `Error: Input '${KName & string}' is already defined in parent definition`;
524
441
  };
525
442
  output?: Array<UNewOutput>;
526
443
  config?: {
527
444
  schema: TExtensionConfigSchema & {
528
- [KName in keyof TConfig]?: `Error: Config key '${KName & string}' is already defined in parent schema`;
445
+ [KName in keyof T['config']]?: `Error: Config key '${KName & string}' is already defined in parent schema`;
529
446
  };
530
447
  };
531
448
  factory(originalFactory: (context?: {
532
- config?: TConfig;
533
- inputs?: ResolveInputValueOverrides<TInputs>;
534
- }) => ExtensionDataContainer<UOutput>, context: {
449
+ config?: T['config'];
450
+ inputs?: ResolveInputValueOverrides<NonNullable<T['inputs']>>;
451
+ }) => ExtensionDataContainer<NonNullable<T['output']>>, context: {
535
452
  node: AppNode;
536
- config: TConfig & {
453
+ apis: ApiHolder;
454
+ config: T['config'] & {
537
455
  [key in keyof TExtensionConfigSchema]: z.infer<ReturnType<TExtensionConfigSchema[key]>>;
538
456
  };
539
- inputs: Expand<ResolvedExtensionInputs<TInputs & TExtraInputs>>;
457
+ inputs: Expand<ResolvedExtensionInputs<T['inputs'] & TExtraInputs>>;
540
458
  }): Iterable<UFactoryOutput>;
541
- } & VerifyExtensionFactoryOutput<AnyExtensionDataRef extends UNewOutput ? UOutput : UNewOutput, UFactoryOutput>): ExtensionDefinition<{
542
- [key in keyof TExtensionConfigSchema]: z.infer<ReturnType<TExtensionConfigSchema[key]>>;
543
- } & TConfig, z.input<z.ZodObject<{
544
- [key in keyof TExtensionConfigSchema]: ReturnType<TExtensionConfigSchema[key]>;
545
- }>> & TConfigInput, AnyExtensionDataRef extends UNewOutput ? UOutput : UNewOutput, TInputs & TExtraInputs, TIdParts>;
546
- }
459
+ } & VerifyExtensionFactoryOutput<AnyExtensionDataRef extends UNewOutput ? NonNullable<T['output']> : UNewOutput, UFactoryOutput>): ExtensionDefinition<{
460
+ kind: T['kind'];
461
+ namespace: T['namespace'];
462
+ name: T['name'];
463
+ output: AnyExtensionDataRef extends UNewOutput ? T['output'] : UNewOutput;
464
+ inputs: T['inputs'] & TExtraInputs;
465
+ config: T['config'] & {
466
+ [key in keyof TExtensionConfigSchema]: z.infer<ReturnType<TExtensionConfigSchema[key]>>;
467
+ };
468
+ configInput: T['configInput'] & z.input<z.ZodObject<{
469
+ [key in keyof TExtensionConfigSchema]: ReturnType<TExtensionConfigSchema[key]>;
470
+ }>>;
471
+ }>;
472
+ };
547
473
  /** @public */
548
474
  declare function createExtension<UOutput extends AnyExtensionDataRef, TInputs extends {
549
475
  [inputName in string]: ExtensionInput<AnyExtensionDataRef, {
@@ -553,19 +479,24 @@ declare function createExtension<UOutput extends AnyExtensionDataRef, TInputs ex
553
479
  }, TConfigSchema extends {
554
480
  [key: string]: (zImpl: typeof z) => z.ZodType;
555
481
  }, UFactoryOutput extends ExtensionDataValue<any, any>, const TKind extends string | undefined = undefined, const TNamespace extends string | undefined = undefined, const TName extends string | undefined = undefined>(options: CreateExtensionOptions<TKind, TNamespace, TName, UOutput, TInputs, TConfigSchema, UFactoryOutput>): ExtensionDefinition<{
556
- [key in keyof TConfigSchema]: z.infer<ReturnType<TConfigSchema[key]>>;
557
- }, z.input<z.ZodObject<{
558
- [key in keyof TConfigSchema]: ReturnType<TConfigSchema[key]>;
559
- }>>, UOutput, TInputs, {
482
+ config: string extends keyof TConfigSchema ? {} : {
483
+ [key in keyof TConfigSchema]: z.infer<ReturnType<TConfigSchema[key]>>;
484
+ };
485
+ configInput: string extends keyof TConfigSchema ? {} : z.input<z.ZodObject<{
486
+ [key in keyof TConfigSchema]: ReturnType<TConfigSchema[key]>;
487
+ }>>;
488
+ output: UOutput;
489
+ inputs: TInputs;
560
490
  kind: string | undefined extends TKind ? undefined : TKind;
561
491
  namespace: string | undefined extends TNamespace ? undefined : TNamespace;
562
492
  name: string | undefined extends TName ? undefined : TName;
563
493
  }>;
564
- /**
565
- * @public
566
- * @deprecated - use the array format of `output` instead, see TODO-doc-link
567
- */
568
- declare function createExtension<TOutput extends AnyExtensionDataMap, TInputs extends AnyExtensionInputMap, TConfig, TConfigInput>(options: LegacyCreateExtensionOptions<TOutput, TInputs, TConfig, TConfigInput>): ExtensionDefinition<TConfig, TConfigInput, never, never>;
494
+
495
+ /** @public */
496
+ type PortableSchema<TOutput, TInput = TOutput> = {
497
+ parse: (input: TInput) => TOutput;
498
+ schema: JsonObject;
499
+ };
569
500
 
570
501
  /** @public */
571
502
  interface Extension<TConfig, TConfigInput = TConfig> {
@@ -579,7 +510,7 @@ interface Extension<TConfig, TConfigInput = TConfig> {
579
510
  readonly configSchema?: PortableSchema<TConfig, TConfigInput>;
580
511
  }
581
512
  /** @ignore */
582
- type ResolveExtensionId<TExtension extends ExtensionDefinition<any>, TDefaultNamespace extends string | undefined> = TExtension extends ExtensionDefinition<any, any, any, any, {
513
+ type ResolveExtensionId<TExtension extends ExtensionDefinition, TDefaultNamespace extends string | undefined> = TExtension extends ExtensionDefinition<{
583
514
  kind: infer IKind extends string | undefined;
584
515
  namespace: infer INamespace extends string | undefined;
585
516
  name: infer IName extends string | undefined;
@@ -604,7 +535,7 @@ type AnyExternalRoutes = {
604
535
  };
605
536
  /** @public */
606
537
  interface BackstagePlugin<TRoutes extends AnyRoutes = AnyRoutes, TExternalRoutes extends AnyExternalRoutes = AnyExternalRoutes, TExtensionMap extends {
607
- [id in string]: ExtensionDefinition<any, any>;
538
+ [id in string]: ExtensionDefinition;
608
539
  } = {}> {
609
540
  readonly $$type: '@backstage/BackstagePlugin';
610
541
  readonly id: string;
@@ -612,7 +543,7 @@ interface BackstagePlugin<TRoutes extends AnyRoutes = AnyRoutes, TExternalRoutes
612
543
  readonly externalRoutes: TExternalRoutes;
613
544
  getExtension<TId extends keyof TExtensionMap>(id: TId): TExtensionMap[TId];
614
545
  withOverrides(options: {
615
- extensions: Array<ExtensionDefinition<any, any>>;
546
+ extensions: Array<ExtensionDefinition>;
616
547
  }): BackstagePlugin<TRoutes, TExternalRoutes, TExtensionMap>;
617
548
  }
618
549
  /** @public */
@@ -623,7 +554,7 @@ interface ExtensionOverrides {
623
554
  type FrontendFeature = BackstagePlugin | ExtensionOverrides;
624
555
 
625
556
  /** @public */
626
- interface PluginOptions<TId extends string, TRoutes extends AnyRoutes, TExternalRoutes extends AnyExternalRoutes, TExtensions extends readonly ExtensionDefinition<any, any>[]> {
557
+ interface PluginOptions<TId extends string, TRoutes extends AnyRoutes, TExternalRoutes extends AnyExternalRoutes, TExtensions extends readonly ExtensionDefinition[]> {
627
558
  id: TId;
628
559
  routes?: TRoutes;
629
560
  externalRoutes?: TExternalRoutes;
@@ -631,7 +562,7 @@ interface PluginOptions<TId extends string, TRoutes extends AnyRoutes, TExternal
631
562
  featureFlags?: FeatureFlagConfig[];
632
563
  }
633
564
  /** @public */
634
- declare function createFrontendPlugin<TId extends string, TRoutes extends AnyRoutes = {}, TExternalRoutes extends AnyExternalRoutes = {}, TExtensions extends readonly ExtensionDefinition<any, any>[] = []>(options: PluginOptions<TId, TRoutes, TExternalRoutes, TExtensions>): BackstagePlugin<TRoutes, TExternalRoutes, {
565
+ declare function createFrontendPlugin<TId extends string, TRoutes extends AnyRoutes = {}, TExternalRoutes extends AnyExternalRoutes = {}, TExtensions extends readonly ExtensionDefinition[] = []>(options: PluginOptions<TId, TRoutes, TExternalRoutes, TExtensions>): BackstagePlugin<TRoutes, TExternalRoutes, {
635
566
  [KExtension in TExtensions[number] as ResolveExtensionId<KExtension, TId>]: KExtension;
636
567
  }>;
637
568
  /**
@@ -642,7 +573,7 @@ declare const createPlugin: typeof createFrontendPlugin;
642
573
 
643
574
  /** @public */
644
575
  interface ExtensionOverridesOptions {
645
- extensions: ExtensionDefinition<any, any>[];
576
+ extensions: ExtensionDefinition[];
646
577
  featureFlags?: FeatureFlagConfig[];
647
578
  }
648
579
  /** @public */
@@ -676,6 +607,7 @@ type CreateExtensionBlueprintOptions<TKind extends string, TNamespace extends st
676
607
  };
677
608
  factory(params: TParams, context: {
678
609
  node: AppNode;
610
+ apis: ApiHolder;
679
611
  config: {
680
612
  [key in keyof TConfigSchema]: z.infer<ReturnType<TConfigSchema[key]>>;
681
613
  };
@@ -683,26 +615,34 @@ type CreateExtensionBlueprintOptions<TKind extends string, TNamespace extends st
683
615
  }): Iterable<UFactoryOutput>;
684
616
  dataRefs?: TDataRefs;
685
617
  } & VerifyExtensionFactoryOutput<UOutput, UFactoryOutput>;
686
- /**
687
- * @public
688
- */
689
- interface ExtensionBlueprint<TIdParts extends {
618
+ /** @public */
619
+ type ExtensionBlueprintParameters = {
690
620
  kind: string;
691
621
  namespace?: string;
692
622
  name?: string;
693
- }, TParams, UOutput extends AnyExtensionDataRef, TInputs extends {
694
- [inputName in string]: ExtensionInput<AnyExtensionDataRef, {
695
- optional: boolean;
696
- singleton: boolean;
697
- }>;
698
- }, TConfig extends {
699
- [key in string]: unknown;
700
- }, TConfigInput extends {
701
- [key in string]: unknown;
702
- }, TDataRefs extends {
703
- [name in string]: AnyExtensionDataRef;
704
- }> {
705
- dataRefs: TDataRefs;
623
+ params?: object;
624
+ configInput?: {
625
+ [K in string]: any;
626
+ };
627
+ config?: {
628
+ [K in string]: any;
629
+ };
630
+ output?: AnyExtensionDataRef;
631
+ inputs?: {
632
+ [KName in string]: ExtensionInput<AnyExtensionDataRef, {
633
+ optional: boolean;
634
+ singleton: boolean;
635
+ }>;
636
+ };
637
+ dataRefs?: {
638
+ [name in string]: AnyExtensionDataRef;
639
+ };
640
+ };
641
+ /**
642
+ * @public
643
+ */
644
+ interface ExtensionBlueprint<T extends ExtensionBlueprintParameters = ExtensionBlueprintParameters> {
645
+ dataRefs: T['dataRefs'];
706
646
  make<TNewNamespace extends string | undefined, TNewName extends string | undefined>(args: {
707
647
  namespace?: TNewNamespace;
708
648
  name?: TNewName;
@@ -711,11 +651,15 @@ interface ExtensionBlueprint<TIdParts extends {
711
651
  input: string;
712
652
  };
713
653
  disabled?: boolean;
714
- params: TParams;
715
- }): ExtensionDefinition<TConfig, TConfigInput, UOutput, TInputs, {
716
- kind: TIdParts['kind'];
717
- namespace: string | undefined extends TNewNamespace ? TIdParts['namespace'] : TNewNamespace;
718
- name: string | undefined extends TNewName ? TIdParts['name'] : TNewName;
654
+ params: T['params'];
655
+ }): ExtensionDefinition<{
656
+ kind: T['kind'];
657
+ namespace: string | undefined extends TNewNamespace ? T['namespace'] : TNewNamespace;
658
+ name: string | undefined extends TNewName ? T['name'] : TNewName;
659
+ config: T['config'];
660
+ configInput: T['configInput'];
661
+ output: T['output'];
662
+ inputs: T['inputs'];
719
663
  }>;
720
664
  /**
721
665
  * Creates a new extension from the blueprint.
@@ -739,32 +683,37 @@ interface ExtensionBlueprint<TIdParts extends {
739
683
  };
740
684
  disabled?: boolean;
741
685
  inputs?: TExtraInputs & {
742
- [KName in keyof TInputs]?: `Error: Input '${KName & string}' is already defined in parent definition`;
686
+ [KName in keyof T['inputs']]?: `Error: Input '${KName & string}' is already defined in parent definition`;
743
687
  };
744
688
  output?: Array<UNewOutput>;
745
689
  config?: {
746
690
  schema: TExtensionConfigSchema & {
747
- [KName in keyof TConfig]?: `Error: Config key '${KName & string}' is already defined in parent schema`;
691
+ [KName in keyof T['config']]?: `Error: Config key '${KName & string}' is already defined in parent schema`;
748
692
  };
749
693
  };
750
- factory(originalFactory: (params: TParams, context?: {
751
- config?: TConfig;
752
- inputs?: ResolveInputValueOverrides<TInputs>;
753
- }) => ExtensionDataContainer<UOutput>, context: {
694
+ factory(originalFactory: (params: T['params'], context?: {
695
+ config?: T['config'];
696
+ inputs?: ResolveInputValueOverrides<NonNullable<T['inputs']>>;
697
+ }) => ExtensionDataContainer<NonNullable<T['output']>>, context: {
754
698
  node: AppNode;
755
- config: TConfig & {
699
+ apis: ApiHolder;
700
+ config: T['config'] & {
756
701
  [key in keyof TExtensionConfigSchema]: z.infer<ReturnType<TExtensionConfigSchema[key]>>;
757
702
  };
758
- inputs: Expand<ResolvedExtensionInputs<TInputs & TExtraInputs>>;
759
- }): Iterable<UFactoryOutput> & VerifyExtensionFactoryOutput<AnyExtensionDataRef extends UNewOutput ? UOutput : UNewOutput, UFactoryOutput>;
703
+ inputs: Expand<ResolvedExtensionInputs<T['inputs'] & TExtraInputs>>;
704
+ }): Iterable<UFactoryOutput> & VerifyExtensionFactoryOutput<AnyExtensionDataRef extends UNewOutput ? NonNullable<T['output']> : UNewOutput, UFactoryOutput>;
760
705
  }): ExtensionDefinition<{
761
- [key in keyof TExtensionConfigSchema]: z.infer<ReturnType<TExtensionConfigSchema[key]>>;
762
- } & TConfig, z.input<z.ZodObject<{
763
- [key in keyof TExtensionConfigSchema]: ReturnType<TExtensionConfigSchema[key]>;
764
- }>> & TConfigInput, AnyExtensionDataRef extends UNewOutput ? UOutput : UNewOutput, TInputs & TExtraInputs, {
765
- kind: TIdParts['kind'];
766
- namespace: string | undefined extends TNewNamespace ? TIdParts['namespace'] : TNewNamespace;
767
- name: string | undefined extends TNewName ? TIdParts['name'] : TNewName;
706
+ config: (string extends keyof TExtensionConfigSchema ? {} : {
707
+ [key in keyof TExtensionConfigSchema]: z.infer<ReturnType<TExtensionConfigSchema[key]>>;
708
+ }) & T['config'];
709
+ configInput: (string extends keyof TExtensionConfigSchema ? {} : z.input<z.ZodObject<{
710
+ [key in keyof TExtensionConfigSchema]: ReturnType<TExtensionConfigSchema[key]>;
711
+ }>>) & T['configInput'];
712
+ output: AnyExtensionDataRef extends UNewOutput ? T['output'] : UNewOutput;
713
+ inputs: T['inputs'] & TExtraInputs;
714
+ kind: T['kind'];
715
+ namespace: string | undefined extends TNewNamespace ? T['namespace'] : TNewNamespace;
716
+ name: string | undefined extends TNewName ? T['name'] : TNewName;
768
717
  }>;
769
718
  }
770
719
  /**
@@ -773,7 +722,7 @@ interface ExtensionBlueprint<TIdParts extends {
773
722
  *
774
723
  * @public
775
724
  */
776
- declare function createExtensionBlueprint<TParams, UOutput extends AnyExtensionDataRef, TInputs extends {
725
+ declare function createExtensionBlueprint<TParams extends object, UOutput extends AnyExtensionDataRef, TInputs extends {
777
726
  [inputName in string]: ExtensionInput<AnyExtensionDataRef, {
778
727
  optional: boolean;
779
728
  singleton: boolean;
@@ -786,11 +735,17 @@ declare function createExtensionBlueprint<TParams, UOutput extends AnyExtensionD
786
735
  kind: TKind;
787
736
  namespace: TNamespace;
788
737
  name: TName;
789
- }, TParams, UOutput, string extends keyof TInputs ? {} : TInputs, string extends keyof TConfigSchema ? {} : {
790
- [key in keyof TConfigSchema]: z.infer<ReturnType<TConfigSchema[key]>>;
791
- }, string extends keyof TConfigSchema ? {} : z.input<z.ZodObject<{
792
- [key in keyof TConfigSchema]: ReturnType<TConfigSchema[key]>;
793
- }>>, TDataRefs>;
738
+ params: TParams;
739
+ output: UOutput;
740
+ inputs: string extends keyof TInputs ? {} : TInputs;
741
+ config: string extends keyof TConfigSchema ? {} : {
742
+ [key in keyof TConfigSchema]: z.infer<ReturnType<TConfigSchema[key]>>;
743
+ };
744
+ configInput: string extends keyof TConfigSchema ? {} : z.input<z.ZodObject<{
745
+ [key in keyof TConfigSchema]: ReturnType<TConfigSchema[key]>;
746
+ }>>;
747
+ dataRefs: TDataRefs;
748
+ }>;
794
749
 
795
750
  /**
796
751
  * The specification for this {@link AppNode} in the {@link AppTree}.
@@ -1135,10 +1090,16 @@ declare const ApiBlueprint: ExtensionBlueprint<{
1135
1090
  kind: "api";
1136
1091
  namespace: undefined;
1137
1092
  name: undefined;
1138
- }, {
1139
- factory: AnyApiFactory;
1140
- }, ConfigurableExtensionDataRef<AnyApiFactory, "core.api.factory", {}>, {}, {}, {}, {
1141
- factory: ConfigurableExtensionDataRef<AnyApiFactory, "core.api.factory", {}>;
1093
+ params: {
1094
+ factory: AnyApiFactory;
1095
+ };
1096
+ output: ConfigurableExtensionDataRef<AnyApiFactory, "core.api.factory", {}>;
1097
+ inputs: {};
1098
+ config: {};
1099
+ configInput: {};
1100
+ dataRefs: {
1101
+ factory: ConfigurableExtensionDataRef<AnyApiFactory, "core.api.factory", {}>;
1102
+ };
1142
1103
  }>;
1143
1104
 
1144
1105
  /**
@@ -1151,9 +1112,15 @@ declare const AppRootElementBlueprint: ExtensionBlueprint<{
1151
1112
  kind: "app-root-element";
1152
1113
  namespace: undefined;
1153
1114
  name: undefined;
1154
- }, {
1155
- element: JSX.Element | (() => JSX.Element);
1156
- }, ConfigurableExtensionDataRef<React.JSX.Element, "core.reactElement", {}>, {}, {}, {}, never>;
1115
+ params: {
1116
+ element: JSX.Element | (() => JSX.Element);
1117
+ };
1118
+ output: ConfigurableExtensionDataRef<React.JSX.Element, "core.reactElement", {}>;
1119
+ inputs: {};
1120
+ config: {};
1121
+ configInput: {};
1122
+ dataRefs: never;
1123
+ }>;
1157
1124
 
1158
1125
  /**
1159
1126
  * Creates a extensions that render a React wrapper at the app root, enclosing
@@ -1166,14 +1133,20 @@ declare const AppRootWrapperBlueprint: ExtensionBlueprint<{
1166
1133
  kind: "app-root-wrapper";
1167
1134
  namespace: undefined;
1168
1135
  name: undefined;
1169
- }, {
1170
- Component: ComponentType<PropsWithChildren<{}>>;
1171
- }, ConfigurableExtensionDataRef<React__default.ComponentType<{
1172
- children?: React__default.ReactNode;
1173
- }>, "app.root.wrapper", {}>, {}, {}, {}, {
1174
- component: ConfigurableExtensionDataRef<React__default.ComponentType<{
1136
+ params: {
1137
+ Component: ComponentType<PropsWithChildren<{}>>;
1138
+ };
1139
+ output: ConfigurableExtensionDataRef<React__default.ComponentType<{
1175
1140
  children?: React__default.ReactNode;
1176
1141
  }>, "app.root.wrapper", {}>;
1142
+ inputs: {};
1143
+ config: {};
1144
+ configInput: {};
1145
+ dataRefs: {
1146
+ component: ConfigurableExtensionDataRef<React__default.ComponentType<{
1147
+ children?: React__default.ReactNode;
1148
+ }>, "app.root.wrapper", {}>;
1149
+ };
1177
1150
  }>;
1178
1151
 
1179
1152
  /** @public */
@@ -1181,22 +1154,28 @@ declare const IconBundleBlueprint: ExtensionBlueprint<{
1181
1154
  kind: "icon-bundle";
1182
1155
  namespace: "app";
1183
1156
  name: undefined;
1184
- }, {
1185
- icons: {
1186
- [x: string]: IconComponent;
1157
+ params: {
1158
+ icons: {
1159
+ [x: string]: IconComponent;
1160
+ };
1187
1161
  };
1188
- }, ConfigurableExtensionDataRef<{
1189
- [x: string]: IconComponent;
1190
- }, "core.icons", {}>, {}, {
1191
- icons: string;
1192
- test: string;
1193
- }, {
1194
- test: string;
1195
- icons?: string | undefined;
1196
- }, {
1197
- icons: ConfigurableExtensionDataRef<{
1162
+ output: ConfigurableExtensionDataRef<{
1198
1163
  [x: string]: IconComponent;
1199
1164
  }, "core.icons", {}>;
1165
+ inputs: {};
1166
+ config: {
1167
+ icons: string;
1168
+ test: string;
1169
+ };
1170
+ configInput: {
1171
+ test: string;
1172
+ icons?: string | undefined;
1173
+ };
1174
+ dataRefs: {
1175
+ icons: ConfigurableExtensionDataRef<{
1176
+ [x: string]: IconComponent;
1177
+ }, "core.icons", {}>;
1178
+ };
1200
1179
  }>;
1201
1180
 
1202
1181
  /**
@@ -1208,20 +1187,26 @@ declare const NavItemBlueprint: ExtensionBlueprint<{
1208
1187
  kind: "nav-item";
1209
1188
  namespace: undefined;
1210
1189
  name: undefined;
1211
- }, {
1212
- title: string;
1213
- icon: IconComponent$1;
1214
- routeRef: RouteRef<undefined>;
1215
- }, ConfigurableExtensionDataRef<{
1216
- title: string;
1217
- icon: IconComponent$1;
1218
- routeRef: RouteRef<undefined>;
1219
- }, "core.nav-item.target", {}>, {}, {}, {}, {
1220
- target: ConfigurableExtensionDataRef<{
1190
+ params: {
1191
+ title: string;
1192
+ icon: IconComponent$1;
1193
+ routeRef: RouteRef<undefined>;
1194
+ };
1195
+ output: ConfigurableExtensionDataRef<{
1221
1196
  title: string;
1222
1197
  icon: IconComponent$1;
1223
1198
  routeRef: RouteRef<undefined>;
1224
1199
  }, "core.nav-item.target", {}>;
1200
+ inputs: {};
1201
+ config: {};
1202
+ configInput: {};
1203
+ dataRefs: {
1204
+ target: ConfigurableExtensionDataRef<{
1205
+ title: string;
1206
+ icon: IconComponent$1;
1207
+ routeRef: RouteRef<undefined>;
1208
+ }, "core.nav-item.target", {}>;
1209
+ };
1225
1210
  }>;
1226
1211
 
1227
1212
  /**
@@ -1233,17 +1218,23 @@ declare const NavLogoBlueprint: ExtensionBlueprint<{
1233
1218
  kind: "nav-logo";
1234
1219
  namespace: undefined;
1235
1220
  name: undefined;
1236
- }, {
1237
- logoIcon: JSX.Element;
1238
- logoFull: JSX.Element;
1239
- }, ConfigurableExtensionDataRef<{
1240
- logoIcon?: JSX.Element | undefined;
1241
- logoFull?: JSX.Element | undefined;
1242
- }, "core.nav-logo.logo-elements", {}>, {}, {}, {}, {
1243
- logoElements: ConfigurableExtensionDataRef<{
1221
+ params: {
1222
+ logoIcon: JSX.Element;
1223
+ logoFull: JSX.Element;
1224
+ };
1225
+ output: ConfigurableExtensionDataRef<{
1244
1226
  logoIcon?: JSX.Element | undefined;
1245
1227
  logoFull?: JSX.Element | undefined;
1246
1228
  }, "core.nav-logo.logo-elements", {}>;
1229
+ inputs: {};
1230
+ config: {};
1231
+ configInput: {};
1232
+ dataRefs: {
1233
+ logoElements: ConfigurableExtensionDataRef<{
1234
+ logoIcon?: JSX.Element | undefined;
1235
+ logoFull?: JSX.Element | undefined;
1236
+ }, "core.nav-logo.logo-elements", {}>;
1237
+ };
1247
1238
  }>;
1248
1239
 
1249
1240
  /**
@@ -1255,31 +1246,43 @@ declare const PageBlueprint: ExtensionBlueprint<{
1255
1246
  kind: "page";
1256
1247
  namespace: undefined;
1257
1248
  name: undefined;
1258
- }, {
1259
- defaultPath: string;
1260
- loader: () => Promise<JSX.Element>;
1261
- routeRef?: RouteRef<AnyRouteRefParams> | undefined;
1262
- }, ConfigurableExtensionDataRef<React.JSX.Element, "core.reactElement", {}> | ConfigurableExtensionDataRef<string, "core.routing.path", {}> | ConfigurableExtensionDataRef<RouteRef<AnyRouteRefParams>, "core.routing.ref", {
1263
- optional: true;
1264
- }>, {}, {
1265
- path: string | undefined;
1266
- }, {
1267
- path?: string | undefined;
1268
- }, never>;
1249
+ params: {
1250
+ defaultPath: string;
1251
+ loader: () => Promise<JSX.Element>;
1252
+ routeRef?: RouteRef<AnyRouteRefParams> | undefined;
1253
+ };
1254
+ output: ConfigurableExtensionDataRef<React.JSX.Element, "core.reactElement", {}> | ConfigurableExtensionDataRef<string, "core.routing.path", {}> | ConfigurableExtensionDataRef<RouteRef<AnyRouteRefParams>, "core.routing.ref", {
1255
+ optional: true;
1256
+ }>;
1257
+ inputs: {};
1258
+ config: {
1259
+ path: string | undefined;
1260
+ };
1261
+ configInput: {
1262
+ path?: string | undefined;
1263
+ };
1264
+ dataRefs: never;
1265
+ }>;
1269
1266
 
1270
1267
  /** @public */
1271
1268
  declare const RouterBlueprint: ExtensionBlueprint<{
1272
1269
  kind: "app-router-component";
1273
1270
  namespace: undefined;
1274
1271
  name: undefined;
1275
- }, {
1276
- Component: ComponentType<PropsWithChildren<{}>>;
1277
- }, ConfigurableExtensionDataRef<ComponentType<{
1278
- children?: React.ReactNode;
1279
- }>, "app.router.wrapper", {}>, {}, {}, {}, {
1280
- component: ConfigurableExtensionDataRef<ComponentType<{
1272
+ params: {
1273
+ Component: ComponentType<PropsWithChildren<{}>>;
1274
+ };
1275
+ output: ConfigurableExtensionDataRef<ComponentType<{
1281
1276
  children?: React.ReactNode;
1282
1277
  }>, "app.router.wrapper", {}>;
1278
+ inputs: {};
1279
+ config: {};
1280
+ configInput: {};
1281
+ dataRefs: {
1282
+ component: ConfigurableExtensionDataRef<ComponentType<{
1283
+ children?: React.ReactNode;
1284
+ }>, "app.router.wrapper", {}>;
1285
+ };
1283
1286
  }>;
1284
1287
 
1285
1288
  /**
@@ -1291,10 +1294,16 @@ declare const SignInPageBlueprint: ExtensionBlueprint<{
1291
1294
  kind: "sign-in-page";
1292
1295
  namespace: undefined;
1293
1296
  name: undefined;
1294
- }, {
1295
- loader: () => Promise<ComponentType<SignInPageProps>>;
1296
- }, ConfigurableExtensionDataRef<React__default.ComponentType<SignInPageProps>, "core.sign-in-page.component", {}>, {}, {}, {}, {
1297
- component: ConfigurableExtensionDataRef<React__default.ComponentType<SignInPageProps>, "core.sign-in-page.component", {}>;
1297
+ params: {
1298
+ loader: () => Promise<ComponentType<SignInPageProps>>;
1299
+ };
1300
+ output: ConfigurableExtensionDataRef<React__default.ComponentType<SignInPageProps>, "core.sign-in-page.component", {}>;
1301
+ inputs: {};
1302
+ config: {};
1303
+ configInput: {};
1304
+ dataRefs: {
1305
+ component: ConfigurableExtensionDataRef<React__default.ComponentType<SignInPageProps>, "core.sign-in-page.component", {}>;
1306
+ };
1298
1307
  }>;
1299
1308
 
1300
1309
  /**
@@ -1306,10 +1315,16 @@ declare const ThemeBlueprint: ExtensionBlueprint<{
1306
1315
  kind: "theme";
1307
1316
  namespace: "app";
1308
1317
  name: undefined;
1309
- }, {
1310
- theme: AppTheme;
1311
- }, ConfigurableExtensionDataRef<AppTheme, "core.theme.theme", {}>, {}, {}, {}, {
1312
- theme: ConfigurableExtensionDataRef<AppTheme, "core.theme.theme", {}>;
1318
+ params: {
1319
+ theme: AppTheme;
1320
+ };
1321
+ output: ConfigurableExtensionDataRef<AppTheme, "core.theme.theme", {}>;
1322
+ inputs: {};
1323
+ config: {};
1324
+ configInput: {};
1325
+ dataRefs: {
1326
+ theme: ConfigurableExtensionDataRef<AppTheme, "core.theme.theme", {}>;
1327
+ };
1313
1328
  }>;
1314
1329
 
1315
1330
  /**
@@ -1321,308 +1336,48 @@ declare const TranslationBlueprint: ExtensionBlueprint<{
1321
1336
  kind: "translation";
1322
1337
  namespace: undefined;
1323
1338
  name: undefined;
1324
- }, {
1325
- resource: TranslationResource | TranslationMessages;
1326
- }, ConfigurableExtensionDataRef<TranslationResource<string> | TranslationMessages<string, {
1327
- [x: string]: string;
1328
- }, boolean>, "core.translation.translation", {}>, {}, {}, {}, {
1329
- translation: ConfigurableExtensionDataRef<TranslationResource<string> | TranslationMessages<string, {
1339
+ params: {
1340
+ resource: TranslationResource | TranslationMessages;
1341
+ };
1342
+ output: ConfigurableExtensionDataRef<TranslationResource<string> | TranslationMessages<string, {
1330
1343
  [x: string]: string;
1331
1344
  }, boolean>, "core.translation.translation", {}>;
1332
- }>;
1333
-
1334
- /**
1335
- * @public
1336
- * @deprecated Use {@link ApiBlueprint} instead.
1337
- */
1338
- declare function createApiExtension<TConfig extends {}, TInputs extends AnyExtensionInputMap>(options: ({
1339
- api: AnyApiRef;
1340
- factory: (options: {
1341
- config: TConfig;
1342
- inputs: Expand<ResolvedExtensionInputs<TInputs>>;
1343
- }) => AnyApiFactory;
1344
- } | {
1345
- factory: AnyApiFactory;
1346
- }) & {
1347
- configSchema?: PortableSchema<TConfig>;
1348
- inputs?: TInputs;
1349
- }): ExtensionDefinition<TConfig, TConfig, never, never, {
1350
- kind?: string | undefined;
1351
- namespace?: string | undefined;
1352
- name?: string | undefined;
1353
- }>;
1354
- /**
1355
- * @public
1356
- * @deprecated Use {@link ApiBlueprint} instead.
1357
- */
1358
- declare namespace createApiExtension {
1359
- /**
1360
- * @deprecated Use {@link ApiBlueprint} instead.
1361
- */
1362
- const factoryDataRef: ConfigurableExtensionDataRef<AnyApiFactory, "core.api.factory", {}>;
1363
- }
1364
-
1365
- /**
1366
- * Creates an extension that renders a React element at the app root, outside of
1367
- * the app layout. This is useful for example for shared popups and similar.
1368
- *
1369
- * @public
1370
- * @deprecated Use {@link AppRootElementBlueprint} instead.
1371
- */
1372
- declare function createAppRootElementExtension<TConfig extends {}, TInputs extends AnyExtensionInputMap>(options: {
1373
- namespace?: string;
1374
- name?: string;
1375
- attachTo?: {
1376
- id: string;
1377
- input: string;
1378
- };
1379
- configSchema?: PortableSchema<TConfig>;
1380
- disabled?: boolean;
1381
- inputs?: TInputs;
1382
- element: JSX$1.Element | ((options: {
1383
- inputs: Expand<ResolvedExtensionInputs<TInputs>>;
1384
- config: TConfig;
1385
- }) => JSX$1.Element);
1386
- }): ExtensionDefinition<TConfig>;
1387
-
1388
- /**
1389
- * Creates an extension that renders a React wrapper at the app root, enclosing
1390
- * the app layout. This is useful for example for adding global React contexts
1391
- * and similar.
1392
- *
1393
- * @public
1394
- * @deprecated Use {@link AppRootWrapperBlueprint} instead.
1395
- */
1396
- declare function createAppRootWrapperExtension<TConfig extends {}, TInputs extends AnyExtensionInputMap>(options: {
1397
- namespace?: string;
1398
- name?: string;
1399
- attachTo?: {
1400
- id: string;
1401
- input: string;
1402
- };
1403
- configSchema?: PortableSchema<TConfig>;
1404
- disabled?: boolean;
1405
- inputs?: TInputs;
1406
- Component: ComponentType<PropsWithChildren<{
1407
- inputs: Expand<ResolvedExtensionInputs<TInputs>>;
1408
- config: TConfig;
1409
- }>>;
1410
- }): ExtensionDefinition<TConfig>;
1411
- /**
1412
- * @public
1413
- * @deprecated Use {@link AppRootWrapperBlueprint} instead.
1414
- */
1415
- declare namespace createAppRootWrapperExtension {
1416
- /**
1417
- * @deprecated Use {@link AppRootWrapperBlueprint} instead.
1418
- */
1419
- const componentDataRef: ConfigurableExtensionDataRef<React__default.ComponentType<{
1420
- children?: React__default.ReactNode;
1421
- }>, "app.root.wrapper", {}>;
1422
- }
1423
-
1424
- /**
1425
- * Creates an extension that replaces the router implementation at the app root.
1426
- * This is useful to be able to for example replace the BrowserRouter with a
1427
- * MemoryRouter in tests, or to add additional props to a BrowserRouter.
1428
- *
1429
- * @public
1430
- * @deprecated Use {@link RouterBlueprint} instead.
1431
- */
1432
- declare function createRouterExtension<TConfig extends {}, TInputs extends AnyExtensionInputMap>(options: {
1433
- namespace?: string;
1434
- name?: string;
1435
- attachTo?: {
1436
- id: string;
1437
- input: string;
1438
- };
1439
- configSchema?: PortableSchema<TConfig>;
1440
- disabled?: boolean;
1441
- inputs?: TInputs;
1442
- Component: ComponentType<PropsWithChildren<{
1443
- inputs: Expand<ResolvedExtensionInputs<TInputs>>;
1444
- config: TConfig;
1445
- }>>;
1446
- }): ExtensionDefinition<TConfig>;
1447
- /**
1448
- * @public
1449
- * @deprecated Use {@link RouterBlueprint} instead.
1450
- */
1451
- declare namespace createRouterExtension {
1452
- /**
1453
- * @deprecated Use {@link RouterBlueprint} instead.
1454
- */
1455
- const componentDataRef: ConfigurableExtensionDataRef<React__default.ComponentType<{
1456
- children?: React__default.ReactNode;
1457
- }>, "app.router.wrapper", {}>;
1458
- }
1459
-
1460
- /**
1461
- * Helper for creating extensions for a routable React page component.
1462
- *
1463
- * @public
1464
- * @deprecated Use {@link PageBlueprint} instead.
1465
- */
1466
- declare function createPageExtension<TConfig extends {
1467
- path: string;
1468
- }, TInputs extends AnyExtensionInputMap>(options: ({
1469
- defaultPath: string;
1470
- } | {
1471
- configSchema: PortableSchema<TConfig>;
1472
- }) & {
1473
- namespace?: string;
1474
- name?: string;
1475
- attachTo?: {
1476
- id: string;
1477
- input: string;
1478
- };
1479
- disabled?: boolean;
1480
- inputs?: TInputs;
1481
- routeRef?: RouteRef;
1482
- loader: (options: {
1483
- config: TConfig;
1484
- inputs: Expand<ResolvedExtensionInputs<TInputs>>;
1485
- }) => Promise<JSX.Element>;
1486
- }): ExtensionDefinition<TConfig>;
1487
-
1488
- /**
1489
- * Helper for creating extensions for a nav item.
1490
- *
1491
- * @public
1492
- * @deprecated Use {@link NavItemBlueprint} instead.
1493
- */
1494
- declare function createNavItemExtension(options: {
1495
- namespace?: string;
1496
- name?: string;
1497
- routeRef: RouteRef<undefined>;
1498
- title: string;
1499
- icon: IconComponent$1;
1500
- }): ExtensionDefinition<{
1501
- title: string;
1502
- }, {
1503
- title?: string | undefined;
1504
- }, never, never, {
1505
- kind?: string | undefined;
1506
- namespace?: string | undefined;
1507
- name?: string | undefined;
1508
- }>;
1509
- /**
1510
- * @public
1511
- * @deprecated Use {@link NavItemBlueprint} instead.
1512
- */
1513
- declare namespace createNavItemExtension {
1514
- /**
1515
- * @deprecated Use {@link NavItemBlueprint} instead.
1516
- */
1517
- const targetDataRef: ConfigurableExtensionDataRef<{
1518
- title: string;
1519
- icon: IconComponent$1;
1520
- routeRef: RouteRef<undefined>;
1521
- }, "core.nav-item.target", {}>;
1522
- }
1523
-
1524
- /**
1525
- * Helper for creating extensions for a nav logos.
1526
- *
1527
- * @public
1528
- * @deprecated Use {@link NavLogoBlueprint} instead.
1529
- */
1530
- declare function createNavLogoExtension(options: {
1531
- name?: string;
1532
- namespace?: string;
1533
- logoIcon: JSX.Element;
1534
- logoFull: JSX.Element;
1535
- }): ExtensionDefinition<unknown, unknown, never, never, {
1536
- kind?: string | undefined;
1537
- namespace?: string | undefined;
1538
- name?: string | undefined;
1539
- }>;
1540
- /**
1541
- * @public
1542
- * @deprecated Use {@link NavLogoBlueprint} instead.
1543
- */
1544
- declare namespace createNavLogoExtension {
1545
- /**
1546
- * @deprecated Use {@link NavLogoBlueprint} instead.
1547
- */
1548
- const logoElementsDataRef: ConfigurableExtensionDataRef<{
1549
- logoIcon?: JSX.Element | undefined;
1550
- logoFull?: JSX.Element | undefined;
1551
- }, "core.nav-logo.logo-elements", {}>;
1552
- }
1553
-
1554
- /**
1555
- *
1556
- * @public
1557
- * @deprecated Use {@link SignInPageBlueprint} instead.
1558
- */
1559
- declare function createSignInPageExtension<TConfig extends {}, TInputs extends AnyExtensionInputMap>(options: {
1560
- namespace?: string;
1561
- name?: string;
1562
- attachTo?: {
1563
- id: string;
1564
- input: string;
1345
+ inputs: {};
1346
+ config: {};
1347
+ configInput: {};
1348
+ dataRefs: {
1349
+ translation: ConfigurableExtensionDataRef<TranslationResource<string> | TranslationMessages<string, {
1350
+ [x: string]: string;
1351
+ }, boolean>, "core.translation.translation", {}>;
1565
1352
  };
1566
- configSchema?: PortableSchema<TConfig>;
1567
- disabled?: boolean;
1568
- inputs?: TInputs;
1569
- loader: (options: {
1570
- config: TConfig;
1571
- inputs: Expand<ResolvedExtensionInputs<TInputs>>;
1572
- }) => Promise<ComponentType<SignInPageProps>>;
1573
- }): ExtensionDefinition<TConfig>;
1574
- /**
1575
- * @public
1576
- * @deprecated Use {@link SignInPageBlueprint} instead.
1577
- */
1578
- declare namespace createSignInPageExtension {
1579
- /**
1580
- * @deprecated Use {@link SignInPageBlueprint} instead.
1581
- */
1582
- const componentDataRef: ConfigurableExtensionDataRef<React__default.ComponentType<SignInPageProps>, "core.sign-in-page.component", {}>;
1583
- }
1584
-
1585
- /**
1586
- * @public
1587
- * @deprecated Use {@link ThemeBlueprint} instead.
1588
- */
1589
- declare function createThemeExtension(theme: AppTheme): ExtensionDefinition<unknown, unknown, never, never, {
1590
- kind?: string | undefined;
1591
- namespace?: string | undefined;
1592
- name?: string | undefined;
1593
1353
  }>;
1594
- /**
1595
- * @public
1596
- * @deprecated Use {@link ThemeBlueprint} instead.
1597
- */
1598
- declare namespace createThemeExtension {
1599
- const themeDataRef: ConfigurableExtensionDataRef<AppTheme, "core.theme.theme", {}>;
1600
- }
1601
1354
 
1602
1355
  /** @public */
1603
- declare function createComponentExtension<TProps extends {}, TConfig extends {}, TInputs extends AnyExtensionInputMap>(options: {
1356
+ declare function createComponentExtension<TProps extends {}>(options: {
1604
1357
  ref: ComponentRef<TProps>;
1605
1358
  name?: string;
1606
1359
  disabled?: boolean;
1607
- /** @deprecated these will be removed in the future */
1608
- inputs?: TInputs;
1609
- /** @deprecated these will be removed in the future */
1610
- configSchema?: PortableSchema<TConfig>;
1611
1360
  loader: {
1612
- lazy: (values: {
1613
- config: TConfig;
1614
- inputs: Expand<ResolvedExtensionInputs<TInputs>>;
1615
- }) => Promise<ComponentType<TProps>>;
1361
+ lazy: () => Promise<ComponentType<TProps>>;
1616
1362
  } | {
1617
- sync: (values: {
1618
- config: TConfig;
1619
- inputs: Expand<ResolvedExtensionInputs<TInputs>>;
1620
- }) => ComponentType<TProps>;
1363
+ sync: () => ComponentType<TProps>;
1621
1364
  };
1622
- }): ExtensionDefinition<TConfig, TConfig, never, never, {
1623
- kind?: string | undefined;
1624
- namespace?: string | undefined;
1625
- name?: string | undefined;
1365
+ }): ExtensionDefinition<{
1366
+ config: {};
1367
+ configInput: {};
1368
+ output: ConfigurableExtensionDataRef<{
1369
+ ref: ComponentRef;
1370
+ impl: ComponentType;
1371
+ }, "core.component.component", {}>;
1372
+ inputs: {
1373
+ [x: string]: ExtensionInput<AnyExtensionDataRef, {
1374
+ optional: boolean;
1375
+ singleton: boolean;
1376
+ }>;
1377
+ };
1378
+ kind: "component";
1379
+ namespace: string;
1380
+ name: string;
1626
1381
  }>;
1627
1382
  /** @public */
1628
1383
  declare namespace createComponentExtension {
@@ -1632,26 +1387,4 @@ declare namespace createComponentExtension {
1632
1387
  }, "core.component.component", {}>;
1633
1388
  }
1634
1389
 
1635
- /**
1636
- * @public
1637
- * @deprecated Use {@link TranslationBlueprint} instead.
1638
- */
1639
- declare function createTranslationExtension(options: {
1640
- name?: string;
1641
- resource: TranslationResource | TranslationMessages;
1642
- }): ExtensionDefinition<unknown, unknown, never, never, {
1643
- kind?: string | undefined;
1644
- namespace?: string | undefined;
1645
- name?: string | undefined;
1646
- }>;
1647
- /**
1648
- * @public
1649
- * @deprecated Use {@link TranslationBlueprint} instead.
1650
- */
1651
- declare namespace createTranslationExtension {
1652
- const translationDataRef: ConfigurableExtensionDataRef<TranslationResource<string> | TranslationMessages<string, {
1653
- [x: string]: string;
1654
- }, boolean>, "core.translation.translation", {}>;
1655
- }
1656
-
1657
- export { type AnalyticsApi, AnalyticsContext, type AnalyticsContextValue, type AnalyticsEvent, type AnalyticsEventAttributes, type AnalyticsTracker, type AnyExtensionDataMap, type AnyExtensionDataRef, type AnyExtensionInputMap, type AnyExternalRoutes, type AnyRouteRefParams, type AnyRoutes, ApiBlueprint, type AppNode, type AppNodeEdges, type AppNodeInstance, type AppNodeSpec, AppRootElementBlueprint, AppRootWrapperBlueprint, type AppTree, type AppTreeApi, type BackstagePlugin, type CommonAnalyticsContext, type ComponentRef, type ComponentsApi, type ConfigurableExtensionDataRef, type CoreErrorBoundaryFallbackProps, type CoreNotFoundErrorPageProps, type CoreProgressProps, type CreateExtensionBlueprintOptions, type CreateExtensionOptions, type Extension, type ExtensionBlueprint, ExtensionBoundary, type ExtensionBoundaryProps, type ExtensionDataContainer, type ExtensionDataRef, type ExtensionDataRefToValue, type ExtensionDataValue, type ExtensionDataValues, type ExtensionDefinition, type ExtensionInput, type ExtensionOverrides, type ExtensionOverridesOptions, type ExternalRouteRef, type FeatureFlagConfig, type FrontendFeature, IconBundleBlueprint, type IconComponent, type IconsApi, type LegacyCreateExtensionOptions, type LegacyExtensionInput, NavItemBlueprint, NavLogoBlueprint, PageBlueprint, type PluginOptions, type PortableSchema, type ResolveInputValueOverrides, type ResolvedExtensionInput, type ResolvedExtensionInputs, type RouteFunc, type RouteRef, type RouteResolutionApi, type RouteResolutionApiResolveOptions, RouterBlueprint, SignInPageBlueprint, type SubRouteRef, ThemeBlueprint, TranslationBlueprint, analyticsApiRef, appTreeApiRef, componentsApiRef, coreComponentRefs, coreExtensionData, createApiExtension, createAppRootElementExtension, createAppRootWrapperExtension, createComponentExtension, createComponentRef, createExtension, createExtensionBlueprint, createExtensionDataRef, createExtensionInput, createExtensionOverrides, createExternalRouteRef, createFrontendPlugin, createNavItemExtension, createNavLogoExtension, createPageExtension, createPlugin, createRouteRef, createRouterExtension, createSchemaFromZod, createSignInPageExtension, createSubRouteRef, createThemeExtension, createTranslationExtension, iconsApiRef, routeResolutionApiRef, useAnalytics, useComponentRef, useRouteRef, useRouteRefParams };
1390
+ export { type AnalyticsApi, AnalyticsContext, type AnalyticsContextValue, type AnalyticsEvent, type AnalyticsEventAttributes, type AnalyticsTracker, type AnyExtensionDataRef, type AnyExternalRoutes, type AnyRouteRefParams, type AnyRoutes, ApiBlueprint, type AppNode, type AppNodeEdges, type AppNodeInstance, type AppNodeSpec, AppRootElementBlueprint, AppRootWrapperBlueprint, type AppTree, type AppTreeApi, type BackstagePlugin, type CommonAnalyticsContext, type ComponentRef, type ComponentsApi, type ConfigurableExtensionDataRef, type CoreErrorBoundaryFallbackProps, type CoreNotFoundErrorPageProps, type CoreProgressProps, type CreateExtensionBlueprintOptions, type CreateExtensionOptions, type Extension, type ExtensionBlueprint, type ExtensionBlueprintParameters, ExtensionBoundary, type ExtensionBoundaryProps, type ExtensionDataContainer, type ExtensionDataRef, type ExtensionDataRefToValue, type ExtensionDataValue, type ExtensionDefinition, type ExtensionDefinitionParameters, type ExtensionInput, type ExtensionOverrides, type ExtensionOverridesOptions, type ExternalRouteRef, type FeatureFlagConfig, type FrontendFeature, IconBundleBlueprint, type IconComponent, type IconsApi, NavItemBlueprint, NavLogoBlueprint, PageBlueprint, type PluginOptions, type PortableSchema, type ResolveInputValueOverrides, type ResolvedExtensionInput, type ResolvedExtensionInputs, type RouteFunc, type RouteRef, type RouteResolutionApi, type RouteResolutionApiResolveOptions, RouterBlueprint, SignInPageBlueprint, type SubRouteRef, ThemeBlueprint, TranslationBlueprint, analyticsApiRef, appTreeApiRef, componentsApiRef, coreComponentRefs, coreExtensionData, createComponentExtension, createComponentRef, createExtension, createExtensionBlueprint, createExtensionDataRef, createExtensionInput, createExtensionOverrides, createExternalRouteRef, createFrontendPlugin, createPlugin, createRouteRef, createSubRouteRef, iconsApiRef, routeResolutionApiRef, useAnalytics, useComponentRef, useRouteRef, useRouteRefParams };