@backstage/plugin-catalog-react 0.6.15 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,37 @@
1
1
  # @backstage/plugin-catalog-react
2
2
 
3
+ ## 0.7.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 3334ad47d4: Removed the deprecated `EntityContext` which have been replaced by `useEntity`, `EntityProvider` and `AsyncEntityProvider`.
8
+ - e2e0b6625c: Improved API documentation.
9
+
10
+ **BREAKING**: The individual table column factories (e.g. `createEntityRefColumn`) are now no longer available directly, but only through `EntityTable.columns`.
11
+
12
+ - c4276915c0: **BREAKING**: Deleted the deprecated `loadIdentityOwnerRefs` function which is replaced by `ownershipEntityRefs` from `identityApi.getBackstageIdentity()`.
13
+
14
+ Deprecated the `loadCatalogOwnerRefs` hook as membership references should be added as `ent` inside `claims` sections of the `SignInResolver` when issuing tokens. See https://backstage.io/docs/auth/identity-resolver for more details on how to prepare your `SignInResolver` if not done already. Usage of the `loadCatalogOwnerRefs` hook should be replaced by `ownershipEntityRefs` from `identityApi.getBackstageIdentity()` instead.
15
+
16
+ ### Patch Changes
17
+
18
+ - a8331830f1: Deprecated the `useEntityKinds` hook due to low usage and utility value.
19
+ - 6e1cbc12a6: Updated according to the new `getEntityFacets` catalog API method
20
+ - b776ce5aab: Deprecated the `useEntityListProvider` hook which is now renamed to `useEntityList`
21
+ - b3ef24038b: Deprecated `reduceCatalogFilters` and `reduceEntityFilters` as these helper functions are used internally and provides low external value.
22
+ - 2d339b5f2c: Deprecated `useEntityFromUrl` and the `useEntityCompoundName` hooks as these have very low utility value.
23
+ - 96b8ae9a9e: Deprecated the `EntityTypeReturn` type and inlined the return type to `useEntityTypeFilter` as the type and function name does not align
24
+ - d4f67fa728: Deprecated the `useOwnedEntities` hook which is replaced by the IdentityAPI.
25
+ Deprecated the `useOwnUser` hook due to low external value.
26
+ - 919cf2f836: Minor updates to match the new `targetRef` field of relations, and to stop consuming the `target` field
27
+ - Updated dependencies
28
+ - @backstage/core-components@0.8.10
29
+ - @backstage/catalog-model@0.11.0
30
+ - @backstage/catalog-client@0.7.2
31
+ - @backstage/core-plugin-api@0.7.0
32
+ - @backstage/integration@0.7.5
33
+ - @backstage/plugin-permission-react@0.3.2
34
+
3
35
  ## 0.6.15
4
36
 
5
37
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -2,11 +2,11 @@
2
2
  import { CatalogApi, GetEntitiesResponse } from '@backstage/catalog-client';
3
3
  export { CATALOG_FILTER_EXISTS, CatalogApi } from '@backstage/catalog-client';
4
4
  import * as _backstage_core_plugin_api from '@backstage/core-plugin-api';
5
- import { ApiRef, StorageApi, IdentityApi } from '@backstage/core-plugin-api';
5
+ import { ApiRef, StorageApi } from '@backstage/core-plugin-api';
6
6
  import { Observable } from '@backstage/types';
7
7
  import * as _backstage_catalog_model from '@backstage/catalog-model';
8
8
  import { Entity, EntityName, UserEntity } from '@backstage/catalog-model';
9
- import React, { ReactNode, ComponentProps, Context, PropsWithChildren } from 'react';
9
+ import React, { ReactNode, ComponentProps, PropsWithChildren } from 'react';
10
10
  import { LinkProps, TableColumn } from '@backstage/core-components';
11
11
  import { IconButton } from '@material-ui/core';
12
12
  import { AsyncState } from 'react-use/lib/useAsync';
@@ -15,6 +15,10 @@ import { ScmIntegrationRegistry } from '@backstage/integration';
15
15
  import { Overrides } from '@material-ui/core/styles/overrides';
16
16
  import { StyleRules } from '@material-ui/core/styles/withStyles';
17
17
 
18
+ /**
19
+ * The API reference for the {@link @backstage/catalog-client#CatalogApi}.
20
+ * @public
21
+ */
18
22
  declare const catalogApiRef: _backstage_core_plugin_api.ApiRef<CatalogApi>;
19
23
 
20
24
  /**
@@ -88,7 +92,7 @@ declare const EntityOwnerPicker: () => JSX.Element | null;
88
92
  * @public
89
93
  */
90
94
  declare type EntityRefLinkProps = {
91
- entityRef: Entity | EntityName;
95
+ entityRef: Entity | EntityName | string;
92
96
  defaultKind?: string;
93
97
  title?: string;
94
98
  children?: React.ReactNode;
@@ -116,62 +120,19 @@ declare type EntityRefLinksProps = {
116
120
  */
117
121
  declare const EntityRefLinks: ({ entityRefs, defaultKind, ...linkProps }: EntityRefLinksProps) => JSX.Element;
118
122
 
123
+ /** @public */
119
124
  declare function formatEntityRefTitle(entityRef: Entity | EntityName, opts?: {
120
125
  defaultKind?: string;
121
126
  }): string;
122
127
 
123
128
  /** @public */
124
129
  declare type CatalogReactEntitySearchBarClassKey = 'searchToolbar' | 'input';
125
- /** @public */
130
+ /**
131
+ * Renders search bar for filtering the entity list.
132
+ * @public
133
+ */
126
134
  declare const EntitySearchBar: () => JSX.Element;
127
135
 
128
- /** @public */
129
- declare function createEntityRefColumn<T extends Entity>(options: {
130
- defaultKind?: string;
131
- }): TableColumn<T>;
132
- /** @public */
133
- declare function createEntityRelationColumn<T extends Entity>({ title, relation, defaultKind, filter: entityFilter, }: {
134
- title: string;
135
- relation: string;
136
- defaultKind?: string;
137
- filter?: {
138
- kind: string;
139
- };
140
- }): TableColumn<T>;
141
- /** @public */
142
- declare function createOwnerColumn<T extends Entity>(): TableColumn<T>;
143
- /** @public */
144
- declare function createDomainColumn<T extends Entity>(): TableColumn<T>;
145
- /** @public */
146
- declare function createSystemColumn<T extends Entity>(): TableColumn<T>;
147
- /** @public */
148
- declare function createMetadataDescriptionColumn<T extends Entity>(): TableColumn<T>;
149
- /** @public */
150
- declare function createSpecLifecycleColumn<T extends Entity>(): TableColumn<T>;
151
- /** @public */
152
- declare function createSpecTypeColumn<T extends Entity>(): TableColumn<T>;
153
-
154
- declare const columnFactories_createEntityRefColumn: typeof createEntityRefColumn;
155
- declare const columnFactories_createEntityRelationColumn: typeof createEntityRelationColumn;
156
- declare const columnFactories_createOwnerColumn: typeof createOwnerColumn;
157
- declare const columnFactories_createDomainColumn: typeof createDomainColumn;
158
- declare const columnFactories_createSystemColumn: typeof createSystemColumn;
159
- declare const columnFactories_createMetadataDescriptionColumn: typeof createMetadataDescriptionColumn;
160
- declare const columnFactories_createSpecLifecycleColumn: typeof createSpecLifecycleColumn;
161
- declare const columnFactories_createSpecTypeColumn: typeof createSpecTypeColumn;
162
- declare namespace columnFactories {
163
- export {
164
- columnFactories_createEntityRefColumn as createEntityRefColumn,
165
- columnFactories_createEntityRelationColumn as createEntityRelationColumn,
166
- columnFactories_createOwnerColumn as createOwnerColumn,
167
- columnFactories_createDomainColumn as createDomainColumn,
168
- columnFactories_createSystemColumn as createSystemColumn,
169
- columnFactories_createMetadataDescriptionColumn as createMetadataDescriptionColumn,
170
- columnFactories_createSpecLifecycleColumn as createSpecLifecycleColumn,
171
- columnFactories_createSpecTypeColumn as createSpecTypeColumn,
172
- };
173
- }
174
-
175
136
  /**
176
137
  * Props for {@link EntityTable}.
177
138
  *
@@ -190,12 +151,51 @@ interface EntityTableProps<T extends Entity> {
190
151
  *
191
152
  * @public
192
153
  */
193
- declare function EntityTable<T extends Entity>(props: EntityTableProps<T>): JSX.Element;
194
- declare namespace EntityTable {
195
- var columns: typeof columnFactories;
196
- var systemEntityColumns: TableColumn<_backstage_catalog_model.SystemEntity>[];
197
- var componentEntityColumns: TableColumn<_backstage_catalog_model.ComponentEntity>[];
198
- }
154
+ declare const EntityTable: {
155
+ <T extends Entity>(props: EntityTableProps<T>): JSX.Element;
156
+ columns: Readonly<{
157
+ createEntityRefColumn<T_1 extends Entity>(options: {
158
+ defaultKind?: string | undefined;
159
+ }): TableColumn<T_1>;
160
+ createEntityRelationColumn<T_2 extends Entity>({ title, relation, defaultKind, filter: entityFilter, }: {
161
+ title: string;
162
+ relation: string;
163
+ defaultKind?: string | undefined;
164
+ filter?: {
165
+ kind: string;
166
+ } | undefined;
167
+ }): TableColumn<T_2>;
168
+ createOwnerColumn<T_3 extends Entity>(): TableColumn<T_3>;
169
+ createDomainColumn<T_4 extends Entity>(): TableColumn<T_4>;
170
+ createSystemColumn<T_5 extends Entity>(): TableColumn<T_5>;
171
+ createMetadataDescriptionColumn<T_6 extends Entity>(): TableColumn<T_6>;
172
+ createSpecLifecycleColumn<T_7 extends Entity>(): TableColumn<T_7>;
173
+ createSpecTypeColumn<T_8 extends Entity>(): TableColumn<T_8>;
174
+ }>;
175
+ systemEntityColumns: TableColumn<_backstage_catalog_model.SystemEntity>[];
176
+ componentEntityColumns: TableColumn<_backstage_catalog_model.ComponentEntity>[];
177
+ };
178
+
179
+ /** @public */
180
+ declare const columnFactories: Readonly<{
181
+ createEntityRefColumn<T extends Entity>(options: {
182
+ defaultKind?: string;
183
+ }): TableColumn<T>;
184
+ createEntityRelationColumn<T_1 extends Entity>({ title, relation, defaultKind, filter: entityFilter, }: {
185
+ title: string;
186
+ relation: string;
187
+ defaultKind?: string | undefined;
188
+ filter?: {
189
+ kind: string;
190
+ } | undefined;
191
+ }): TableColumn<T_1>;
192
+ createOwnerColumn<T_2 extends Entity>(): TableColumn<T_2>;
193
+ createDomainColumn<T_3 extends Entity>(): TableColumn<T_3>;
194
+ createSystemColumn<T_4 extends Entity>(): TableColumn<T_4>;
195
+ createMetadataDescriptionColumn<T_5 extends Entity>(): TableColumn<T_5>;
196
+ createSpecLifecycleColumn<T_6 extends Entity>(): TableColumn<T_6>;
197
+ createSpecTypeColumn<T_7 extends Entity>(): TableColumn<T_7>;
198
+ }>;
199
199
 
200
200
  /** @public */
201
201
  declare type CatalogReactEntityTagPickerClassKey = 'input';
@@ -214,16 +214,20 @@ interface EntityTypePickerProps {
214
214
  /** @public */
215
215
  declare const EntityTypePicker: (props: EntityTypePickerProps) => JSX.Element | null;
216
216
 
217
- declare type Props$1 = ComponentProps<typeof IconButton> & {
217
+ /** @public */
218
+ declare type FavoriteEntityProps = ComponentProps<typeof IconButton> & {
218
219
  entity: Entity;
219
220
  };
221
+ /** @public */
220
222
  declare const favoriteEntityTooltip: (isStarred: boolean) => "Remove from favorites" | "Add to favorites";
223
+ /** @public */
221
224
  declare const favoriteEntityIcon: (isStarred: boolean) => JSX.Element;
222
225
  /**
223
226
  * IconButton for showing if a current entity is starred and adding/removing it from the favorite entities
224
227
  * @param props - MaterialUI IconButton props extended by required `entity` prop
228
+ * @public
225
229
  */
226
- declare const FavoriteEntity: (props: Props$1) => JSX.Element;
230
+ declare const FavoriteEntity: (props: FavoriteEntityProps) => JSX.Element;
227
231
 
228
232
  /**
229
233
  * A dialog that lets users inspect the low level details of their entities.
@@ -236,14 +240,17 @@ declare function InspectEntityDialog(props: {
236
240
  onClose: () => void;
237
241
  }): JSX.Element | null;
238
242
 
239
- declare type Props = {
243
+ /** @public */
244
+ declare type UnregisterEntityDialogProps = {
240
245
  open: boolean;
241
246
  onConfirm: () => any;
242
247
  onClose: () => any;
243
248
  entity: Entity;
244
249
  };
245
- declare const UnregisterEntityDialog: ({ open, onConfirm, onClose, entity, }: Props) => JSX.Element;
250
+ /** @public */
251
+ declare const UnregisterEntityDialog: (props: UnregisterEntityDialogProps) => JSX.Element;
246
252
 
253
+ /** @public */
247
254
  declare type EntityFilter = {
248
255
  /**
249
256
  * Get filters to add to the catalog-backend request. These are a dot-delimited field with
@@ -260,32 +267,31 @@ declare type EntityFilter = {
260
267
  filterEntity?: (entity: Entity) => boolean;
261
268
  /**
262
269
  * Serialize the filter value to a string for query params. The UI component responsible for
263
- * handling this filter should retrieve this from useEntityListProvider.queryParameters. The
270
+ * handling this filter should retrieve this from useEntityList.queryParameters. The
264
271
  * value restored should be in the precedence: queryParameters `>` initialValue prop `>` default.
265
272
  */
266
273
  toQueryValue?: () => string | string[];
267
274
  };
275
+ /** @public */
268
276
  declare type UserListFilterKind = 'owned' | 'starred' | 'all';
269
277
 
270
278
  /** @public */
271
279
  declare type CatalogReactUserListPickerClassKey = 'root' | 'title' | 'listIcon' | 'menuItem' | 'groupWrapper';
280
+ /** @public */
272
281
  declare type UserListPickerProps = {
273
282
  initialFilter?: UserListFilterKind;
274
283
  availableFilters?: UserListFilterKind[];
275
284
  };
276
- declare const UserListPicker: ({ initialFilter, availableFilters, }: UserListPickerProps) => JSX.Element;
285
+ /** @public */
286
+ declare const UserListPicker: (props: UserListPickerProps) => JSX.Element;
277
287
 
288
+ /** @public */
278
289
  declare type EntityLoadingStatus = {
279
290
  entity?: Entity;
280
291
  loading: boolean;
281
292
  error?: Error;
282
293
  refresh?: VoidFunction;
283
294
  };
284
- /**
285
- * @public
286
- * @deprecated use `useEntity` and `EntityProvider` or `AsyncEntityProvider` instead.
287
- */
288
- declare const EntityContext: Context<EntityLoadingStatus>;
289
295
  /**
290
296
  * Properties for the AsyncEntityProvider component.
291
297
  *
@@ -319,6 +325,9 @@ interface EntityProviderProps {
319
325
  * @public
320
326
  */
321
327
  declare const EntityProvider: ({ entity, children }: EntityProviderProps) => JSX.Element;
328
+ /** @public
329
+ * @deprecated will be deleted shortly due to low external usage, re-implement if needed.
330
+ */
322
331
  declare const useEntityFromUrl: () => EntityLoadingStatus;
323
332
  /**
324
333
  * Grab the current entity from the context and its current loading state.
@@ -334,6 +343,8 @@ declare function useEntity<T extends Entity = Entity>(): {
334
343
 
335
344
  /**
336
345
  * Grabs entity kind, namespace, and name from the location
346
+ * @public
347
+ * @deprecated use {@link @backstage/core-plugin-api#useRouteRefParams} instead
337
348
  */
338
349
  declare const useEntityCompoundName: () => {
339
350
  kind: string;
@@ -341,12 +352,20 @@ declare const useEntityCompoundName: () => {
341
352
  name: string;
342
353
  };
343
354
 
355
+ /**
356
+ * Filter entities based on Kind.
357
+ * @public
358
+ */
344
359
  declare class EntityKindFilter implements EntityFilter {
345
360
  readonly value: string;
346
361
  constructor(value: string);
347
362
  getCatalogFilters(): Record<string, string | string[]>;
348
363
  toQueryValue(): string;
349
364
  }
365
+ /**
366
+ * Filters entities based on type
367
+ * @public
368
+ */
350
369
  declare class EntityTypeFilter implements EntityFilter {
351
370
  readonly value: string | string[];
352
371
  constructor(value: string | string[]);
@@ -354,29 +373,49 @@ declare class EntityTypeFilter implements EntityFilter {
354
373
  getCatalogFilters(): Record<string, string | string[]>;
355
374
  toQueryValue(): string[];
356
375
  }
376
+ /**
377
+ * Filters entities based on tag.
378
+ * @public
379
+ */
357
380
  declare class EntityTagFilter implements EntityFilter {
358
381
  readonly values: string[];
359
382
  constructor(values: string[]);
360
383
  filterEntity(entity: Entity): boolean;
361
384
  toQueryValue(): string[];
362
385
  }
386
+ /**
387
+ * Filters entities where the text matches spec, title or tags.
388
+ * @public
389
+ */
363
390
  declare class EntityTextFilter implements EntityFilter {
364
391
  readonly value: string;
365
392
  constructor(value: string);
366
393
  filterEntity(entity: Entity): boolean;
367
394
  }
395
+ /**
396
+ * Filter matching entities that are owned by group.
397
+ * @public
398
+ */
368
399
  declare class EntityOwnerFilter implements EntityFilter {
369
400
  readonly values: string[];
370
401
  constructor(values: string[]);
371
402
  filterEntity(entity: Entity): boolean;
372
403
  toQueryValue(): string[];
373
404
  }
405
+ /**
406
+ * Filters entities on lifecycle.
407
+ * @public
408
+ */
374
409
  declare class EntityLifecycleFilter implements EntityFilter {
375
410
  readonly values: string[];
376
411
  constructor(values: string[]);
377
412
  filterEntity(entity: Entity): boolean;
378
413
  toQueryValue(): string[];
379
414
  }
415
+ /**
416
+ * Filters entities based on whatever the user has starred or owns them.
417
+ * @public
418
+ */
380
419
  declare class UserListFilter implements EntityFilter {
381
420
  readonly value: UserListFilterKind;
382
421
  readonly isOwnedEntity: (entity: Entity) => boolean;
@@ -386,6 +425,7 @@ declare class UserListFilter implements EntityFilter {
386
425
  toQueryValue(): string;
387
426
  }
388
427
 
428
+ /** @public */
389
429
  declare type DefaultEntityFilters = {
390
430
  kind?: EntityKindFilter;
391
431
  type?: EntityTypeFilter;
@@ -395,6 +435,7 @@ declare type DefaultEntityFilters = {
395
435
  tags?: EntityTagFilter;
396
436
  text?: EntityTextFilter;
397
437
  };
438
+ /** @public */
398
439
  declare type EntityListContextProps<EntityFilters extends DefaultEntityFilters = DefaultEntityFilters> = {
399
440
  /**
400
441
  * The currently registered filters, adhering to the shape of DefaultEntityFilters or an extension
@@ -421,10 +462,31 @@ declare type EntityListContextProps<EntityFilters extends DefaultEntityFilters =
421
462
  loading: boolean;
422
463
  error?: Error;
423
464
  };
465
+ /**
466
+ * Creates new context for entity listing and filtering.
467
+ * @public
468
+ */
424
469
  declare const EntityListContext: React.Context<EntityListContextProps<any> | undefined>;
470
+ /**
471
+ * Provides entities and filters for a catalog listing.
472
+ * @public
473
+ */
425
474
  declare const EntityListProvider: <EntityFilters extends DefaultEntityFilters>({ children, }: PropsWithChildren<{}>) => JSX.Element;
475
+ /**
476
+ * Hook for interacting with the entity list context provided by the {@link EntityListProvider}.
477
+ * @public
478
+ * @deprecated use {@link useEntityList} instead.
479
+ */
426
480
  declare function useEntityListProvider<EntityFilters extends DefaultEntityFilters = DefaultEntityFilters>(): EntityListContextProps<EntityFilters>;
481
+ /**
482
+ * Hook for interacting with the entity list context provided by the {@link EntityListProvider}.
483
+ * @public
484
+ */
485
+ declare function useEntityList<EntityFilters extends DefaultEntityFilters = DefaultEntityFilters>(): EntityListContextProps<EntityFilters>;
427
486
 
487
+ /** @public
488
+ * @deprecated type inlined with {@link useEntityTypeFilter}.
489
+ */
428
490
  declare type EntityTypeReturn = {
429
491
  loading: boolean;
430
492
  error?: Error;
@@ -433,11 +495,23 @@ declare type EntityTypeReturn = {
433
495
  setSelectedTypes: (types: string[]) => void;
434
496
  };
435
497
  /**
436
- * A hook built on top of `useEntityListProvider` for enabling selection of valid `spec.type` values
498
+ * A hook built on top of `useEntityList` for enabling selection of valid `spec.type` values
437
499
  * based on the selected EntityKindFilter.
500
+ * @public
438
501
  */
439
- declare function useEntityTypeFilter(): EntityTypeReturn;
502
+ declare function useEntityTypeFilter(): {
503
+ loading: boolean;
504
+ error?: Error;
505
+ availableTypes: string[];
506
+ selectedTypes: string[];
507
+ setSelectedTypes: (types: string[]) => void;
508
+ };
440
509
 
510
+ /**
511
+ * Retrieve a list of unique entity kinds present in the catalog
512
+ * @public
513
+ * @deprecated and will be removed due to low utility value.
514
+ */
441
515
  declare function useEntityKinds(): {
442
516
  error: Error | undefined;
443
517
  loading: boolean;
@@ -446,10 +520,13 @@ declare function useEntityKinds(): {
446
520
 
447
521
  /**
448
522
  * Get the catalog User entity (if any) that matches the logged-in user.
523
+ * @public
524
+ * @deprecated due to low external usage.
449
525
  */
450
526
  declare function useOwnUser(): AsyncState<UserEntity | undefined>;
451
527
 
452
- declare function useRelatedEntities(entity: Entity, { type, kind }: {
528
+ /** @public */
529
+ declare function useRelatedEntities(entity: Entity, relationFilter: {
453
530
  type?: string;
454
531
  kind?: string;
455
532
  }): {
@@ -458,29 +535,19 @@ declare function useRelatedEntities(entity: Entity, { type, kind }: {
458
535
  error: Error | undefined;
459
536
  };
460
537
 
538
+ /** @public */
461
539
  declare function useStarredEntities(): {
462
540
  starredEntities: Set<string>;
463
541
  toggleStarredEntity: (entityOrRef: Entity | EntityName | string) => void;
464
542
  isStarredEntity: (entityOrRef: Entity | EntityName | string) => boolean;
465
543
  };
466
544
 
545
+ /** @public */
467
546
  declare function useStarredEntity(entityOrRef: Entity | EntityName | string): {
468
547
  toggleStarredEntity: () => void;
469
548
  isStarredEntity: boolean;
470
549
  };
471
550
 
472
- /**
473
- * Takes the relevant parts of the Backstage identity, and translates them into
474
- * a list of entity refs on string form that represent the user's ownership
475
- * connections.
476
- *
477
- * @public
478
- * @deprecated Use `ownershipEntityRefs` from `identityApi.getBackstageIdentity()` instead.
479
- *
480
- * @param identityApi - The IdentityApi implementation
481
- * @returns IdentityOwner refs as a string array
482
- */
483
- declare function loadIdentityOwnerRefs(identityApi: IdentityApi): Promise<string[]>;
484
551
  /**
485
552
  * Takes the relevant parts of the User entity corresponding to the Backstage
486
553
  * identity, and translates them into a list of entity refs on string form that
@@ -491,6 +558,7 @@ declare function loadIdentityOwnerRefs(identityApi: IdentityApi): Promise<string
491
558
  * @param catalogApi - The Catalog API implementation
492
559
  * @param identityOwnerRefs - List of identity owner refs as strings
493
560
  * @returns OwnerRefs as a string array
561
+ * @deprecated Use `ownershipEntityRefs` from `identityApi.getBackstageIdentity()` instead.
494
562
  */
495
563
  declare function loadCatalogOwnerRefs(catalogApi: CatalogApi, identityOwnerRefs: string[]): Promise<string[]>;
496
564
  /**
@@ -516,6 +584,7 @@ declare function useEntityOwnership(): {
516
584
  * @public
517
585
  *
518
586
  * @param allowedKinds - Array of allowed kinds to filter the entities
587
+ * @deprecated Use `ownershipEntityRefs` from `identityApi.getBackstageIdentity()` instead.
519
588
  */
520
589
  declare function useOwnedEntities(allowedKinds?: string[]): {
521
590
  loading: boolean;
@@ -541,10 +610,12 @@ declare function useEntityPermission(permission: Permission): {
541
610
 
542
611
  /**
543
612
  * @deprecated Use an `ExternalRouteRef` instead, which can point to `catalogPlugin.routes.catalogIndex`.
613
+ * @public
544
614
  */
545
615
  declare const rootRoute: _backstage_core_plugin_api.RouteRef<undefined>;
546
616
  /**
547
617
  * @deprecated Use an `ExternalRouteRef` instead, which can point to `catalogPlugin.routes.catalogIndex`.
618
+ * @public
548
619
  */
549
620
  declare const catalogRouteRef: _backstage_core_plugin_api.RouteRef<undefined>;
550
621
  /**
@@ -555,6 +626,7 @@ declare const catalogRouteRef: _backstage_core_plugin_api.RouteRef<undefined>;
555
626
  *
556
627
  * If you want to replace the `EntityPage` from `@backstage/catalog-plugin` in your app,
557
628
  * you need to use the `entityRouteRef` as the mount point instead of your own.
629
+ * @public
558
630
  */
559
631
  declare const entityRouteRef: _backstage_core_plugin_api.RouteRef<{
560
632
  name: string;
@@ -563,43 +635,64 @@ declare const entityRouteRef: _backstage_core_plugin_api.RouteRef<{
563
635
  }>;
564
636
  /**
565
637
  * @deprecated use `entityRouteRef` instead.
638
+ * @public
566
639
  */
567
640
  declare const entityRoute: _backstage_core_plugin_api.RouteRef<{
568
641
  name: string;
569
642
  kind: string;
570
643
  namespace: string;
571
644
  }>;
645
+ /**
646
+ * Utility function to get suitable route params for entityRoute, given an
647
+ * @public
648
+ */
572
649
  declare function entityRouteParams(entity: Entity): {
573
650
  readonly kind: string;
574
651
  readonly namespace: string;
575
652
  readonly name: string;
576
653
  };
577
654
 
655
+ /** @public */
578
656
  declare const MockEntityListContextProvider: ({ children, value, }: React.PropsWithChildren<{
579
657
  value?: Partial<EntityListContextProps<DefaultEntityFilters>> | undefined;
580
658
  }>) => JSX.Element;
581
659
 
660
+ /**
661
+ * @public
662
+ * @deprecated will be made private.
663
+ */
582
664
  declare function reduceCatalogFilters(filters: EntityFilter[]): Record<string, string | symbol | (string | symbol)[]>;
665
+ /**
666
+ * @public
667
+ * @deprecated will be made private.
668
+ */
583
669
  declare function reduceEntityFilters(filters: EntityFilter[]): (entity: Entity) => boolean;
584
670
 
671
+ /** @public */
585
672
  declare function getEntityMetadataViewUrl(entity: Entity): string | undefined;
673
+ /** @public */
586
674
  declare function getEntityMetadataEditUrl(entity: Entity): string | undefined;
587
675
 
588
676
  /**
589
677
  * Get the related entity references.
678
+ *
679
+ * @public
590
680
  */
591
681
  declare function getEntityRelations(entity: Entity | undefined, relationType: string, filter?: {
592
682
  kind: string;
593
683
  }): EntityName[];
594
684
 
685
+ /** @public */
595
686
  declare type EntitySourceLocation = {
596
687
  locationTargetUrl: string;
597
688
  integrationType?: string;
598
689
  };
690
+ /** @public */
599
691
  declare function getEntitySourceLocation(entity: Entity, scmIntegrationsApi: ScmIntegrationRegistry): EntitySourceLocation | undefined;
600
692
 
601
693
  /**
602
694
  * Get the related entity references.
695
+ * @public
603
696
  */
604
697
  declare function isOwnerOf(owner: Entity, owned: Entity): boolean;
605
698
 
@@ -616,4 +709,4 @@ declare type BackstageOverrides = Overrides & {
616
709
  [Name in keyof CatalogReactComponentsNameToClassKey]?: Partial<StyleRules<CatalogReactComponentsNameToClassKey[Name]>>;
617
710
  };
618
711
 
619
- export { AsyncEntityProvider, AsyncEntityProviderProps, BackstageOverrides, CatalogReactComponentsNameToClassKey, CatalogReactEntityLifecyclePickerClassKey, CatalogReactEntityOwnerPickerClassKey, CatalogReactEntitySearchBarClassKey, CatalogReactEntityTagPickerClassKey, CatalogReactUserListPickerClassKey, DefaultEntityFilters, DefaultStarredEntitiesApi, EntityContext, EntityFilter, EntityKindFilter, EntityKindPicker, EntityKindPickerProps, EntityLifecycleFilter, EntityLifecyclePicker, EntityListContext, EntityListProvider, EntityOwnerFilter, EntityOwnerPicker, EntityProvider, EntityProviderProps, EntityRefLink, EntityRefLinkProps, EntityRefLinks, EntityRefLinksProps, EntitySearchBar, EntitySourceLocation, EntityTable, EntityTableProps, EntityTagFilter, EntityTagPicker, EntityTextFilter, EntityTypeFilter, EntityTypePicker, EntityTypePickerProps, FavoriteEntity, InspectEntityDialog, MockEntityListContextProvider, StarredEntitiesApi, UnregisterEntityDialog, UserListFilter, UserListFilterKind, UserListPicker, catalogApiRef, catalogRouteRef, entityRoute, entityRouteParams, entityRouteRef, favoriteEntityIcon, favoriteEntityTooltip, formatEntityRefTitle, getEntityMetadataEditUrl, getEntityMetadataViewUrl, getEntityRelations, getEntitySourceLocation, isOwnerOf, loadCatalogOwnerRefs, loadIdentityOwnerRefs, reduceCatalogFilters, reduceEntityFilters, rootRoute, starredEntitiesApiRef, useEntity, useEntityCompoundName, useEntityFromUrl, useEntityKinds, useEntityListProvider, useEntityOwnership, useEntityPermission, useEntityTypeFilter, useOwnUser, useOwnedEntities, useRelatedEntities, useStarredEntities, useStarredEntity };
712
+ export { AsyncEntityProvider, AsyncEntityProviderProps, BackstageOverrides, CatalogReactComponentsNameToClassKey, CatalogReactEntityLifecyclePickerClassKey, CatalogReactEntityOwnerPickerClassKey, CatalogReactEntitySearchBarClassKey, CatalogReactEntityTagPickerClassKey, CatalogReactUserListPickerClassKey, DefaultEntityFilters, DefaultStarredEntitiesApi, EntityFilter, EntityKindFilter, EntityKindPicker, EntityKindPickerProps, EntityLifecycleFilter, EntityLifecyclePicker, EntityListContext, EntityListContextProps, EntityListProvider, EntityLoadingStatus, EntityOwnerFilter, EntityOwnerPicker, EntityProvider, EntityProviderProps, EntityRefLink, EntityRefLinkProps, EntityRefLinks, EntityRefLinksProps, EntitySearchBar, EntitySourceLocation, EntityTable, EntityTableProps, EntityTagFilter, EntityTagPicker, EntityTextFilter, EntityTypeFilter, EntityTypePicker, EntityTypePickerProps, EntityTypeReturn, FavoriteEntity, FavoriteEntityProps, InspectEntityDialog, MockEntityListContextProvider, StarredEntitiesApi, UnregisterEntityDialog, UnregisterEntityDialogProps, UserListFilter, UserListFilterKind, UserListPicker, UserListPickerProps, catalogApiRef, catalogRouteRef, columnFactories, entityRoute, entityRouteParams, entityRouteRef, favoriteEntityIcon, favoriteEntityTooltip, formatEntityRefTitle, getEntityMetadataEditUrl, getEntityMetadataViewUrl, getEntityRelations, getEntitySourceLocation, isOwnerOf, loadCatalogOwnerRefs, reduceCatalogFilters, reduceEntityFilters, rootRoute, starredEntitiesApiRef, useEntity, useEntityCompoundName, useEntityFromUrl, useEntityKinds, useEntityList, useEntityListProvider, useEntityOwnership, useEntityPermission, useEntityTypeFilter, useOwnUser, useOwnedEntities, useRelatedEntities, useStarredEntities, useStarredEntity };