deprecate EntityName, introduce CompoundEntityRef
deprecate getEntityName, introduce getCompoundEntityRef Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
@@ -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?: {
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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?: {
|
||||
|
||||
Reference in New Issue
Block a user