update import location
Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com> Signed-off-by: Aramis Sennyey <159921952+aramissennyeydd@users.noreply.github.com> Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
This commit is contained in:
@@ -37,7 +37,8 @@
|
||||
}
|
||||
},
|
||||
"files": [
|
||||
"dist"
|
||||
"dist",
|
||||
"alpha"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "backstage-cli package build",
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
/*
|
||||
* Copyright 2024 The Backstage Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
export * from './generated';
|
||||
@@ -276,13 +276,14 @@ export class DefaultApiClient {
|
||||
|
||||
/**
|
||||
* Get a batch set of entities given an array of entityRefs.
|
||||
* @param filter Filter for just the entities defined by this filter.
|
||||
* @param getEntitiesByRefsRequest
|
||||
*/
|
||||
public async getEntitiesByRefs(
|
||||
// @ts-ignore
|
||||
request: {
|
||||
body: GetEntitiesByRefsRequest;
|
||||
query?: {
|
||||
query: {
|
||||
filter?: Array<string>;
|
||||
};
|
||||
},
|
||||
@@ -290,9 +291,11 @@ export class DefaultApiClient {
|
||||
): Promise<TypedResponse<EntitiesBatchResponse>> {
|
||||
const baseUrl = await this.discoveryApi.getBaseUrl(pluginId);
|
||||
|
||||
const uriTemplate = `/entities/by-refs/{?filter*}`;
|
||||
const uriTemplate = `/entities/by-refs{?filter*}`;
|
||||
|
||||
const uri = parser.parse(uriTemplate).expand({ ...request.query });
|
||||
const uri = parser.parse(uriTemplate).expand({
|
||||
...request.query,
|
||||
});
|
||||
|
||||
return await this.fetchApi.fetch(`${baseUrl}${uri}`, {
|
||||
headers: {
|
||||
|
||||
@@ -21,6 +21,4 @@
|
||||
*/
|
||||
|
||||
export { CatalogClient } from './CatalogClient';
|
||||
// export * from './types';
|
||||
|
||||
export * from './generated/models';
|
||||
export * from './types';
|
||||
|
||||
@@ -79,8 +79,8 @@ async function generate(abortSignal?: AbortController) {
|
||||
);
|
||||
|
||||
const additionalProperties = [];
|
||||
if (clientPackage) {
|
||||
additionalProperties.push(`clientPackageName=${clientPackage}`);
|
||||
if (clientImport) {
|
||||
additionalProperties.push(`clientImport=${clientImport}`);
|
||||
}
|
||||
|
||||
await exec(
|
||||
|
||||
@@ -3,7 +3,7 @@ import type {
|
||||
{{#imports}}
|
||||
{{classname}},
|
||||
{{/imports}}
|
||||
} from '{{clientPackageName}}';
|
||||
} from '{{clientImport}}';
|
||||
|
||||
|
||||
{{#operations}}
|
||||
|
||||
@@ -32,7 +32,7 @@ import type {
|
||||
Location,
|
||||
RefreshEntityRequest,
|
||||
ValidateEntityRequest,
|
||||
} from '@backstage/catalog-client';
|
||||
} from '@backstage/catalog-client/alpha';
|
||||
|
||||
/**
|
||||
* no description
|
||||
@@ -100,7 +100,9 @@ export type EndpointMap = {
|
||||
|
||||
'#post|/entities/by-refs': {
|
||||
path: {};
|
||||
query: {};
|
||||
query: {
|
||||
filter?: Array<string>;
|
||||
};
|
||||
body: GetEntitiesByRefsRequest;
|
||||
response: EntitiesBatchResponse;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user