fix linting issues
Signed-off-by: web-next-automation <web-platform@doordash.com> Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
This commit is contained in:
committed by
aramissennyeydd
parent
dd884d82ee
commit
92a7cc99a0
@@ -52,8 +52,7 @@
|
||||
"@backstage/catalog-model": "workspace:^",
|
||||
"@backstage/errors": "workspace:^",
|
||||
"@backstage/plugin-catalog-common": "workspace:^",
|
||||
"cross-fetch": "^4.0.0",
|
||||
"uri-template": "^2.0.0"
|
||||
"cross-fetch": "^4.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/cli": "workspace:^",
|
||||
|
||||
@@ -167,7 +167,11 @@ function createConfig(dir, extraConfig = {}) {
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ['**/src/generated/**/*.ts'],
|
||||
files: [
|
||||
// old location
|
||||
'**/src/generated/**/*.ts',
|
||||
'**/src/schema/openapi/generated/**/*.ts',
|
||||
],
|
||||
rules: {
|
||||
...tsRules,
|
||||
'no-unused-vars': 'off',
|
||||
|
||||
@@ -145,6 +145,7 @@ Usage: backstage-repo-tools package schema openapi generate [options]
|
||||
|
||||
Options:
|
||||
--client-package [package]
|
||||
--server-client-import [import]
|
||||
-h, --help
|
||||
```
|
||||
|
||||
|
||||
@@ -23,11 +23,10 @@ import { decodeCursor } from '../util';
|
||||
import { parseEntityFilterParams } from './parseEntityFilterParams';
|
||||
import { parseEntityOrderFieldParams } from './parseEntityOrderFieldParams';
|
||||
import { parseEntityTransformParams } from './parseEntityTransformParams';
|
||||
import { spec } from '../../schema/openapi.generated';
|
||||
import { internal } from '@backstage/backend-openapi-utils';
|
||||
import { GetEntitiesByQuery } from '@backstage/plugin-catalog-common/client';
|
||||
|
||||
export function parseQueryEntitiesParams(
|
||||
params: internal.QuerySchema<typeof spec, '/entities/by-query', 'get'>,
|
||||
params: GetEntitiesByQuery['query'],
|
||||
): Omit<QueryEntitiesRequest, 'credentials' | 'limit'> {
|
||||
const fields = parseEntityTransformParams(params);
|
||||
|
||||
|
||||
@@ -0,0 +1,558 @@
|
||||
## API Report File for "@backstage/plugin-catalog-common"
|
||||
|
||||
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
||||
|
||||
```ts
|
||||
// @public (undocumented)
|
||||
export type AnalyzeLocation = {
|
||||
body: AnalyzeLocationRequest;
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export interface AnalyzeLocationEntityField {
|
||||
description: string;
|
||||
field: string;
|
||||
state: AnalyzeLocationEntityFieldStateEnum;
|
||||
// (undocumented)
|
||||
value: string | null;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export type AnalyzeLocationEntityFieldStateEnum =
|
||||
| 'analysisSuggestedValue'
|
||||
| 'analysisSuggestedNoValue'
|
||||
| 'needsUserInput';
|
||||
|
||||
// @public
|
||||
export interface AnalyzeLocationExistingEntity {
|
||||
// (undocumented)
|
||||
entity: Entity;
|
||||
// (undocumented)
|
||||
isRegistered: boolean;
|
||||
// (undocumented)
|
||||
location: LocationSpec;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface AnalyzeLocationGenerateEntity {
|
||||
// (undocumented)
|
||||
entity: RecursivePartialEntity;
|
||||
// (undocumented)
|
||||
fields: Array<AnalyzeLocationEntityField>;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export interface AnalyzeLocationRequest {
|
||||
// (undocumented)
|
||||
catalogFileName?: string;
|
||||
// (undocumented)
|
||||
location: LocationInput;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export interface AnalyzeLocationResponse {
|
||||
// (undocumented)
|
||||
existingEntityFiles: Array<AnalyzeLocationExistingEntity>;
|
||||
// (undocumented)
|
||||
generateEntities: Array<AnalyzeLocationGenerateEntity>;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export type CreateLocation = {
|
||||
body: CreateLocationRequest;
|
||||
query: {
|
||||
dryRun?: string;
|
||||
};
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export interface CreateLocation201Response {
|
||||
// (undocumented)
|
||||
entities: Array<Entity>;
|
||||
// (undocumented)
|
||||
exists?: boolean;
|
||||
// (undocumented)
|
||||
location: Location_2;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export interface CreateLocationRequest {
|
||||
// (undocumented)
|
||||
target: string;
|
||||
// (undocumented)
|
||||
type: string;
|
||||
}
|
||||
|
||||
// @public
|
||||
export class DefaultApiClient {
|
||||
constructor(options: {
|
||||
discoveryApi: {
|
||||
getBaseUrl(pluginId: string): Promise<string>;
|
||||
};
|
||||
fetchApi?: {
|
||||
fetch: typeof fetch;
|
||||
};
|
||||
});
|
||||
analyzeLocation(
|
||||
request: AnalyzeLocation,
|
||||
options?: RequestOptions,
|
||||
): Promise<TypedResponse<AnalyzeLocationResponse>>;
|
||||
createLocation(
|
||||
request: CreateLocation,
|
||||
options?: RequestOptions,
|
||||
): Promise<TypedResponse<CreateLocation201Response>>;
|
||||
deleteEntityByUid(
|
||||
request: DeleteEntityByUid,
|
||||
options?: RequestOptions,
|
||||
): Promise<TypedResponse<void>>;
|
||||
deleteLocation(
|
||||
request: DeleteLocation,
|
||||
options?: RequestOptions,
|
||||
): Promise<TypedResponse<void>>;
|
||||
getEntities(
|
||||
request: GetEntities,
|
||||
options?: RequestOptions,
|
||||
): Promise<TypedResponse<Array<Entity>>>;
|
||||
getEntitiesByQuery(
|
||||
request: GetEntitiesByQuery,
|
||||
options?: RequestOptions,
|
||||
): Promise<TypedResponse<EntitiesQueryResponse>>;
|
||||
getEntitiesByRefs(
|
||||
request: GetEntitiesByRefs,
|
||||
options?: RequestOptions,
|
||||
): Promise<TypedResponse<EntitiesBatchResponse>>;
|
||||
getEntityAncestryByName(
|
||||
request: GetEntityAncestryByName,
|
||||
options?: RequestOptions,
|
||||
): Promise<TypedResponse<EntityAncestryResponse>>;
|
||||
getEntityByName(
|
||||
request: GetEntityByName,
|
||||
options?: RequestOptions,
|
||||
): Promise<TypedResponse<Entity>>;
|
||||
getEntityByUid(
|
||||
request: GetEntityByUid,
|
||||
options?: RequestOptions,
|
||||
): Promise<TypedResponse<Entity>>;
|
||||
getEntityFacets(
|
||||
request: GetEntityFacets,
|
||||
options?: RequestOptions,
|
||||
): Promise<TypedResponse<EntityFacetsResponse>>;
|
||||
getLocation(
|
||||
request: GetLocation,
|
||||
options?: RequestOptions,
|
||||
): Promise<TypedResponse<Location_2>>;
|
||||
getLocationByEntity(
|
||||
request: GetLocationByEntity,
|
||||
options?: RequestOptions,
|
||||
): Promise<TypedResponse<Location_2>>;
|
||||
getLocations(
|
||||
request: GetLocations,
|
||||
options?: RequestOptions,
|
||||
): Promise<TypedResponse<Array<GetLocations200ResponseInner>>>;
|
||||
refreshEntity(
|
||||
request: RefreshEntity,
|
||||
options?: RequestOptions,
|
||||
): Promise<TypedResponse<void>>;
|
||||
validateEntity(
|
||||
request: ValidateEntity,
|
||||
options?: RequestOptions,
|
||||
): Promise<TypedResponse<void>>;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export type DeleteEntityByUid = {
|
||||
path: {
|
||||
uid: string;
|
||||
};
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export type DeleteLocation = {
|
||||
path: {
|
||||
id: string;
|
||||
};
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export interface EntitiesBatchResponse {
|
||||
items: Array<NullableEntity>;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export interface EntitiesQueryResponse {
|
||||
items: Array<Entity>;
|
||||
// (undocumented)
|
||||
pageInfo: EntitiesQueryResponsePageInfo;
|
||||
// (undocumented)
|
||||
totalItems: number;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export interface EntitiesQueryResponsePageInfo {
|
||||
nextCursor?: string;
|
||||
prevCursor?: string;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface Entity {
|
||||
apiVersion: string;
|
||||
kind: string;
|
||||
// (undocumented)
|
||||
metadata: EntityMeta;
|
||||
relations?: Array<EntityRelation>;
|
||||
spec?: {
|
||||
[key: string]: any;
|
||||
};
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export interface EntityAncestryResponse {
|
||||
// (undocumented)
|
||||
items: Array<EntityAncestryResponseItemsInner>;
|
||||
// (undocumented)
|
||||
rootEntityRef: string;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export interface EntityAncestryResponseItemsInner {
|
||||
// (undocumented)
|
||||
entity: Entity;
|
||||
// (undocumented)
|
||||
parentEntityRefs: Array<string>;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export interface EntityFacet {
|
||||
// (undocumented)
|
||||
count: number;
|
||||
// (undocumented)
|
||||
value: string;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export interface EntityFacetsResponse {
|
||||
// (undocumented)
|
||||
facets: {
|
||||
[key: string]: Array<EntityFacet>;
|
||||
};
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface EntityLink {
|
||||
icon?: string;
|
||||
title?: string;
|
||||
type?: string;
|
||||
url: string;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface EntityMeta {
|
||||
// (undocumented)
|
||||
[key: string]: any;
|
||||
annotations?: {
|
||||
[key: string]: string;
|
||||
};
|
||||
description?: string;
|
||||
etag?: string;
|
||||
labels?: {
|
||||
[key: string]: string;
|
||||
};
|
||||
links?: Array<EntityLink>;
|
||||
name: string;
|
||||
namespace?: string;
|
||||
tags?: Array<string>;
|
||||
title?: string;
|
||||
uid?: string;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface EntityRelation {
|
||||
targetRef: string;
|
||||
type: string;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export interface ErrorError {
|
||||
// (undocumented)
|
||||
code?: string;
|
||||
// (undocumented)
|
||||
message: string;
|
||||
// (undocumented)
|
||||
name: string;
|
||||
// (undocumented)
|
||||
stack?: string;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export interface ErrorRequest {
|
||||
// (undocumented)
|
||||
method: string;
|
||||
// (undocumented)
|
||||
url: string;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export interface ErrorResponse {
|
||||
// (undocumented)
|
||||
statusCode: number;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export type GetEntities = {
|
||||
query: {
|
||||
fields?: Array<string>;
|
||||
limit?: number;
|
||||
filter?: Array<string>;
|
||||
offset?: number;
|
||||
after?: string;
|
||||
order?: Array<string>;
|
||||
};
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export type GetEntitiesByQuery = {
|
||||
query: {
|
||||
fields?: Array<string>;
|
||||
limit?: number;
|
||||
orderField?: Array<string>;
|
||||
cursor?: string;
|
||||
filter?: Array<string>;
|
||||
fullTextFilterTerm?: string;
|
||||
fullTextFilterFields?: Array<string>;
|
||||
};
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export type GetEntitiesByRefs = {
|
||||
body: GetEntitiesByRefsRequest;
|
||||
query: {
|
||||
filter?: Array<string>;
|
||||
};
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export interface GetEntitiesByRefsRequest {
|
||||
// (undocumented)
|
||||
entityRefs: Array<string>;
|
||||
// (undocumented)
|
||||
fields?: Array<string>;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export type GetEntityAncestryByName = {
|
||||
path: {
|
||||
kind: string;
|
||||
namespace: string;
|
||||
name: string;
|
||||
};
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export type GetEntityByName = {
|
||||
path: {
|
||||
kind: string;
|
||||
namespace: string;
|
||||
name: string;
|
||||
};
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export type GetEntityByUid = {
|
||||
path: {
|
||||
uid: string;
|
||||
};
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export type GetEntityFacets = {
|
||||
query: {
|
||||
facet: Array<string>;
|
||||
filter?: Array<string>;
|
||||
};
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export type GetLocation = {
|
||||
path: {
|
||||
id: string;
|
||||
};
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export type GetLocationByEntity = {
|
||||
path: {
|
||||
kind: string;
|
||||
namespace: string;
|
||||
name: string;
|
||||
};
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export type GetLocations = {};
|
||||
|
||||
// @public (undocumented)
|
||||
export interface GetLocations200ResponseInner {
|
||||
// (undocumented)
|
||||
data: Location_2;
|
||||
}
|
||||
|
||||
// @public
|
||||
interface Location_2 {
|
||||
// (undocumented)
|
||||
id: string;
|
||||
// (undocumented)
|
||||
target: string;
|
||||
// (undocumented)
|
||||
type: string;
|
||||
}
|
||||
export { Location_2 as Location };
|
||||
|
||||
// @public (undocumented)
|
||||
export interface LocationInput {
|
||||
// (undocumented)
|
||||
target: string;
|
||||
// (undocumented)
|
||||
type: string;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface LocationSpec {
|
||||
// (undocumented)
|
||||
target: string;
|
||||
// (undocumented)
|
||||
type: string;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export interface ModelError {
|
||||
// (undocumented)
|
||||
[key: string]: any;
|
||||
// (undocumented)
|
||||
error: ErrorError;
|
||||
// (undocumented)
|
||||
request?: ErrorRequest;
|
||||
// (undocumented)
|
||||
response: ErrorResponse;
|
||||
}
|
||||
|
||||
// @public
|
||||
export type NullableEntity = {
|
||||
relations?: Array<EntityRelation>;
|
||||
spec?: {
|
||||
[key: string]: any;
|
||||
};
|
||||
metadata: EntityMeta;
|
||||
kind: string;
|
||||
apiVersion: string;
|
||||
} | null;
|
||||
|
||||
// @public
|
||||
export interface RecursivePartialEntity {
|
||||
apiVersion?: string;
|
||||
kind?: string;
|
||||
// (undocumented)
|
||||
metadata?: RecursivePartialEntityMeta;
|
||||
relations?: Array<RecursivePartialEntityRelation>;
|
||||
spec?: {
|
||||
[key: string]: any;
|
||||
};
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export interface RecursivePartialEntityMeta {
|
||||
annotations?: {
|
||||
[key: string]: string;
|
||||
};
|
||||
description?: string;
|
||||
etag?: string;
|
||||
labels?: {
|
||||
[key: string]: string;
|
||||
};
|
||||
links?: Array<EntityLink>;
|
||||
name?: string;
|
||||
namespace?: string;
|
||||
tags?: Array<string>;
|
||||
title?: string;
|
||||
uid?: string;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface RecursivePartialEntityMetaAllOf {
|
||||
annotations?: {
|
||||
[key: string]: string;
|
||||
};
|
||||
description?: string;
|
||||
etag?: string;
|
||||
labels?: {
|
||||
[key: string]: string;
|
||||
};
|
||||
links?: Array<EntityLink>;
|
||||
name?: string;
|
||||
namespace?: string;
|
||||
tags?: Array<string>;
|
||||
title?: string;
|
||||
uid?: string;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface RecursivePartialEntityRelation {
|
||||
targetRef?: string;
|
||||
type?: string;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export type RefreshEntity = {
|
||||
body: RefreshEntityRequest;
|
||||
};
|
||||
|
||||
// @public
|
||||
export interface RefreshEntityRequest {
|
||||
// (undocumented)
|
||||
authorizationToken?: string;
|
||||
entityRef: string;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface RequestOptions {
|
||||
// (undocumented)
|
||||
token?: string;
|
||||
}
|
||||
|
||||
// @public
|
||||
export type TypedResponse<T> = Omit<Response, 'json'> & {
|
||||
json: () => Promise<T>;
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export type ValidateEntity = {
|
||||
body: ValidateEntityRequest;
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export interface ValidateEntity400Response {
|
||||
// (undocumented)
|
||||
errors: Array<ValidateEntity400ResponseErrorsInner>;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export interface ValidateEntity400ResponseErrorsInner {
|
||||
// (undocumented)
|
||||
[key: string]: any;
|
||||
// (undocumented)
|
||||
message: string;
|
||||
// (undocumented)
|
||||
name: string;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export interface ValidateEntityRequest {
|
||||
// (undocumented)
|
||||
entity: {
|
||||
[key: string]: any;
|
||||
};
|
||||
// (undocumented)
|
||||
location: string;
|
||||
}
|
||||
|
||||
// (No @packageDocumentation comment for this package)
|
||||
```
|
||||
@@ -36,7 +36,6 @@ import { GetEntitiesByRefsRequest } from '../models/GetEntitiesByRefsRequest.mod
|
||||
import { GetLocations200ResponseInner } from '../models/GetLocations200ResponseInner.model';
|
||||
import { Location } from '../models/Location.model';
|
||||
import { RefreshEntityRequest } from '../models/RefreshEntityRequest.model';
|
||||
import { ValidateEntity400Response } from '../models/ValidateEntity400Response.model';
|
||||
import { ValidateEntityRequest } from '../models/ValidateEntityRequest.model';
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user