deprecate EntityName, introduce CompoundEntityRef

deprecate getEntityName, introduce getCompoundEntityRef

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
Fredrik Adelöw
2022-03-02 21:26:22 +01:00
parent 80d2674a31
commit 36aa63022b
84 changed files with 393 additions and 268 deletions
+2 -2
View File
@@ -4,8 +4,8 @@
```ts
import { CatalogApi } from '@backstage/catalog-client';
import { CompoundEntityRef } from '@backstage/catalog-model';
import { Config } from '@backstage/config';
import { EntityName } from '@backstage/catalog-model';
import express from 'express';
import { Logger as Logger_2 } from 'winston';
import { ScmIntegrations } from '@backstage/integration';
@@ -19,7 +19,7 @@ export function createTodoParser(options?: TodoParserOptions): TodoParser;
// @public (undocumented)
export type ListTodosRequest = {
entity?: EntityName;
entity?: CompoundEntityRef;
offset?: number;
limit?: number;
orderBy?: {
+2 -2
View File
@@ -14,7 +14,7 @@
* limitations under the License.
*/
import { EntityName, parseEntityRef } from '@backstage/catalog-model';
import { CompoundEntityRef, parseEntityRef } from '@backstage/catalog-model';
import { InputError } from '@backstage/errors';
import express from 'express';
import Router from 'express-promise-router';
@@ -52,7 +52,7 @@ export async function createRouter(
if (entityRef && typeof entityRef !== 'string') {
throw new InputError(`entity query must be a string`);
}
let entity: EntityName | undefined = undefined;
let entity: CompoundEntityRef | undefined = undefined;
if (entityRef) {
try {
entity = parseEntityRef(entityRef);
+2 -2
View File
@@ -14,12 +14,12 @@
* limitations under the License.
*/
import { EntityName } from '@backstage/catalog-model';
import { CompoundEntityRef } from '@backstage/catalog-model';
import { TodoItem } from '../lib';
/** @public */
export type ListTodosRequest = {
entity?: EntityName;
entity?: CompoundEntityRef;
offset?: number;
limit?: number;
orderBy?: {