fix api reports

Signed-off-by: Aramis Sennyey <159921952+aramissennyeydd@users.noreply.github.com>
Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
This commit is contained in:
Aramis Sennyey
2024-04-01 10:24:47 -04:00
committed by aramissennyeydd
parent 92051737af
commit 4ab164dd86
6 changed files with 263 additions and 364 deletions
@@ -19,11 +19,9 @@ import { PathTemplate, ValueOf } from './common';
export type EndpointMap = Record<
string,
{ query?: object; body?: object; response: object | void; path?: object }
{ query?: object; body?: object; response?: object; path?: object }
>;
type UnknownIfVoid<T> = T extends void ? unknown : T;
// OpenAPI generator doesn't emit regular lowercase 'delete'.
type HttpMethods = 'all' | 'put' | 'get' | 'post' | '_delete';
@@ -51,7 +49,7 @@ type ResponseBody<
Method extends DocEndpointMethod<Doc, Endpoint>,
> = `#${Method}|${Endpoint}` extends keyof Doc
? 'response' extends keyof Doc[`#${Method}|${Endpoint}`]
? UnknownIfVoid<Doc[`#${Method}|${Endpoint}`]['response']>
? Doc[`#${Method}|${Endpoint}`]['response']
: unknown
: unknown;
type QuerySchema<
+138 -164
View File
@@ -3,8 +3,11 @@
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
```ts
// Warning: (ae-missing-release-tag) "AnalyzeLocationEntityField" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type AnalyzeLocation = {
body: AnalyzeLocationRequest;
};
// @public (undocumented)
export interface AnalyzeLocationEntityField {
description: string;
@@ -14,16 +17,12 @@ export interface AnalyzeLocationEntityField {
value: string | null;
}
// Warning: (ae-missing-release-tag) "AnalyzeLocationEntityFieldStateEnum" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type AnalyzeLocationEntityFieldStateEnum =
| 'analysisSuggestedValue'
| 'analysisSuggestedNoValue'
| 'needsUserInput';
// Warning: (ae-missing-release-tag) "AnalyzeLocationExistingEntity" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export interface AnalyzeLocationExistingEntity {
// (undocumented)
@@ -34,8 +33,6 @@ export interface AnalyzeLocationExistingEntity {
location: LocationSpec;
}
// Warning: (ae-missing-release-tag) "AnalyzeLocationGenerateEntity" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export interface AnalyzeLocationGenerateEntity {
// (undocumented)
@@ -44,8 +41,6 @@ export interface AnalyzeLocationGenerateEntity {
fields: Array<AnalyzeLocationEntityField>;
}
// Warning: (ae-missing-release-tag) "AnalyzeLocationRequest" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export interface AnalyzeLocationRequest {
// (undocumented)
@@ -54,8 +49,6 @@ export interface AnalyzeLocationRequest {
location: LocationInput;
}
// Warning: (ae-missing-release-tag) "AnalyzeLocationResponse" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export interface AnalyzeLocationResponse {
// (undocumented)
@@ -64,8 +57,14 @@ export interface AnalyzeLocationResponse {
generateEntities: Array<AnalyzeLocationGenerateEntity>;
}
// Warning: (ae-missing-release-tag) "CreateLocation201Response" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type CreateLocation = {
body: CreateLocationRequest;
query: {
dryRun?: string;
};
};
// @public (undocumented)
export interface CreateLocation201Response {
// (undocumented)
@@ -76,8 +75,6 @@ export interface CreateLocation201Response {
location: Location_2;
}
// Warning: (ae-missing-release-tag) "CreateLocationRequest" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export interface CreateLocationRequest {
// (undocumented)
@@ -100,38 +97,23 @@ export class DefaultApiClient {
});
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
analyzeLocation(
request: {
body: AnalyzeLocationRequest;
},
request: AnalyzeLocation,
options?: RequestOptions,
): Promise<TypedResponse<AnalyzeLocationResponse>>;
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
createLocation(
request: {
body: CreateLocationRequest;
query: {
dryRun?: string;
};
},
request: CreateLocation,
options?: RequestOptions,
): Promise<TypedResponse<CreateLocation201Response>>;
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
deleteEntityByUid(
request: {
path: {
uid: string;
};
},
request: DeleteEntityByUid,
options?: RequestOptions,
): Promise<TypedResponse<void>>;
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
deleteLocation(
request: {
path: {
id: string;
};
},
request: DeleteLocation,
options?: RequestOptions,
): Promise<TypedResponse<void>>;
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
@@ -141,16 +123,7 @@ export class DefaultApiClient {
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
getEntities(
request: {
query: {
fields?: Array<string>;
limit?: number;
filter?: Array<string>;
offset?: number;
after?: string;
order?: Array<string>;
};
},
request: GetEntities,
options?: RequestOptions,
): Promise<TypedResponse<Array<Entity>>>;
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
@@ -161,127 +134,87 @@ export class DefaultApiClient {
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
getEntitiesByQuery(
request: {
query: {
fields?: Array<string>;
limit?: number;
orderField?: Array<string>;
cursor?: string;
filter?: Array<string>;
fullTextFilterTerm?: string;
fullTextFilterFields?: Array<string>;
};
},
request: GetEntitiesByQuery,
options?: RequestOptions,
): Promise<TypedResponse<EntitiesQueryResponse>>;
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
getEntitiesByRefs(
request: {
body: GetEntitiesByRefsRequest;
query: {
filter?: Array<string>;
};
},
request: GetEntitiesByRefs,
options?: RequestOptions,
): Promise<TypedResponse<EntitiesBatchResponse>>;
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
getEntityAncestryByName(
request: {
path: {
kind: string;
namespace: string;
name: string;
};
},
request: GetEntityAncestryByName,
options?: RequestOptions,
): Promise<TypedResponse<EntityAncestryResponse>>;
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
getEntityByName(
request: {
path: {
kind: string;
namespace: string;
name: string;
};
},
request: GetEntityByName,
options?: RequestOptions,
): Promise<TypedResponse<Entity>>;
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
getEntityByUid(
request: {
path: {
uid: string;
};
},
request: GetEntityByUid,
options?: RequestOptions,
): Promise<TypedResponse<Entity>>;
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
getEntityFacets(
request: {
query: {
facet: Array<string>;
filter?: Array<string>;
};
},
request: GetEntityFacets,
options?: RequestOptions,
): Promise<TypedResponse<EntityFacetsResponse>>;
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
getLocation(
request: {
path: {
id: string;
};
},
request: GetLocation,
options?: RequestOptions,
): Promise<TypedResponse<Location_2>>;
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
getLocationByEntity(
request: {
path: {
kind: string;
namespace: string;
name: string;
};
},
request: GetLocationByEntity,
options?: RequestOptions,
): Promise<TypedResponse<Location_2>>;
getLocations(
request: {},
request: GetLocations,
options?: RequestOptions,
): Promise<TypedResponse<Array<GetLocations200ResponseInner>>>;
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
refreshEntity(
request: {
body: RefreshEntityRequest;
},
request: RefreshEntity,
options?: RequestOptions,
): Promise<TypedResponse<void>>;
// Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
validateEntity(
request: {
body: ValidateEntityRequest;
},
request: ValidateEntity,
options?: RequestOptions,
): Promise<TypedResponse<void>>;
}
// Warning: (ae-missing-release-tag) "EntitiesBatchResponse" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type DeleteEntityByUid = {
path: {
uid: string;
};
};
// @public (undocumented)
export type DeleteLocation = {
path: {
id: string;
};
};
// @public (undocumented)
export interface EntitiesBatchResponse {
items: Array<NullableEntity>;
}
// Warning: (ae-missing-release-tag) "EntitiesQueryResponse" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export interface EntitiesQueryResponse {
items: Array<Entity>;
@@ -291,16 +224,12 @@ export interface EntitiesQueryResponse {
totalItems: number;
}
// Warning: (ae-missing-release-tag) "EntitiesQueryResponsePageInfo" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export interface EntitiesQueryResponsePageInfo {
nextCursor?: string;
prevCursor?: string;
}
// Warning: (ae-missing-release-tag) "Entity" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export interface Entity {
apiVersion: string;
@@ -313,8 +242,6 @@ export interface Entity {
};
}
// Warning: (ae-missing-release-tag) "EntityAncestryResponse" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export interface EntityAncestryResponse {
// (undocumented)
@@ -323,8 +250,6 @@ export interface EntityAncestryResponse {
rootEntityRef: string;
}
// Warning: (ae-missing-release-tag) "EntityAncestryResponseItemsInner" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export interface EntityAncestryResponseItemsInner {
// (undocumented)
@@ -333,8 +258,6 @@ export interface EntityAncestryResponseItemsInner {
parentEntityRefs: Array<string>;
}
// Warning: (ae-missing-release-tag) "EntityFacet" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export interface EntityFacet {
// (undocumented)
@@ -343,8 +266,6 @@ export interface EntityFacet {
value: string;
}
// Warning: (ae-missing-release-tag) "EntityFacetsResponse" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export interface EntityFacetsResponse {
// (undocumented)
@@ -353,8 +274,6 @@ export interface EntityFacetsResponse {
};
}
// Warning: (ae-missing-release-tag) "EntityLink" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export interface EntityLink {
icon?: string;
@@ -363,8 +282,6 @@ export interface EntityLink {
url: string;
}
// Warning: (ae-missing-release-tag) "EntityMeta" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export interface EntityMeta {
// (undocumented)
@@ -385,16 +302,12 @@ export interface EntityMeta {
uid?: string;
}
// Warning: (ae-missing-release-tag) "EntityRelation" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export interface EntityRelation {
targetRef: string;
type: string;
}
// Warning: (ae-missing-release-tag) "ErrorError" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export interface ErrorError {
// (undocumented)
@@ -407,8 +320,6 @@ export interface ErrorError {
stack?: string;
}
// Warning: (ae-missing-release-tag) "ErrorRequest" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export interface ErrorRequest {
// (undocumented)
@@ -417,16 +328,45 @@ export interface ErrorRequest {
url: string;
}
// Warning: (ae-missing-release-tag) "ErrorResponse" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export interface ErrorResponse {
// (undocumented)
statusCode: number;
}
// Warning: (ae-missing-release-tag) "GetEntitiesByRefsRequest" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @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)
@@ -435,16 +375,64 @@ export interface GetEntitiesByRefsRequest {
fields?: Array<string>;
}
// Warning: (ae-missing-release-tag) "GetLocations200ResponseInner" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @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;
}
// Warning: (ae-missing-release-tag) "Location" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
interface Location_2 {
// (undocumented)
@@ -456,8 +444,6 @@ interface Location_2 {
}
export { Location_2 as Location };
// Warning: (ae-missing-release-tag) "LocationInput" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export interface LocationInput {
// (undocumented)
@@ -466,8 +452,6 @@ export interface LocationInput {
type: string;
}
// Warning: (ae-missing-release-tag) "LocationSpec" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export interface LocationSpec {
// (undocumented)
@@ -476,8 +460,6 @@ export interface LocationSpec {
type: string;
}
// Warning: (ae-missing-release-tag) "ModelError" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export interface ModelError {
// (undocumented)
@@ -490,8 +472,6 @@ export interface ModelError {
response: ErrorResponse;
}
// Warning: (ae-missing-release-tag) "NullableEntity" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export type NullableEntity = {
relations?: Array<EntityRelation>;
@@ -503,8 +483,6 @@ export type NullableEntity = {
apiVersion: string;
} | null;
// Warning: (ae-missing-release-tag) "RecursivePartialEntity" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export interface RecursivePartialEntity {
apiVersion?: string;
@@ -517,8 +495,6 @@ export interface RecursivePartialEntity {
};
}
// Warning: (ae-missing-release-tag) "RecursivePartialEntityMeta" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export interface RecursivePartialEntityMeta {
annotations?: {
@@ -537,8 +513,6 @@ export interface RecursivePartialEntityMeta {
uid?: string;
}
// Warning: (ae-missing-release-tag) "RecursivePartialEntityMetaAllOf" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export interface RecursivePartialEntityMetaAllOf {
annotations?: {
@@ -557,16 +531,17 @@ export interface RecursivePartialEntityMetaAllOf {
uid?: string;
}
// Warning: (ae-missing-release-tag) "RecursivePartialEntityRelation" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export interface RecursivePartialEntityRelation {
targetRef?: string;
type?: string;
}
// Warning: (ae-missing-release-tag) "RefreshEntityRequest" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type RefreshEntity = {
body: RefreshEntityRequest;
};
// @public
export interface RefreshEntityRequest {
// (undocumented)
@@ -585,16 +560,17 @@ export type TypedResponse<T> = Omit<Response, 'json'> & {
json: () => Promise<T>;
};
// Warning: (ae-missing-release-tag) "ValidateEntity400Response" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type ValidateEntity = {
body: ValidateEntityRequest;
};
// @public (undocumented)
export interface ValidateEntity400Response {
// (undocumented)
errors: Array<ValidateEntity400ResponseErrorsInner>;
}
// Warning: (ae-missing-release-tag) "ValidateEntity400ResponseErrorsInner" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export interface ValidateEntity400ResponseErrorsInner {
// (undocumented)
@@ -605,8 +581,6 @@ export interface ValidateEntity400ResponseErrorsInner {
name: string;
}
// Warning: (ae-missing-release-tag) "ValidateEntityRequest" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export interface ValidateEntityRequest {
// (undocumented)
@@ -56,26 +56,41 @@ export interface RequestOptions {
token?: string;
}
export type analyzeLocationRequest = {
/**
* @public
*/
export type AnalyzeLocation = {
body: AnalyzeLocationRequest;
};
export type createLocationRequest = {
/**
* @public
*/
export type CreateLocation = {
body: CreateLocationRequest;
query: {
dryRun?: string;
};
};
export type deleteEntityByUidRequest = {
/**
* @public
*/
export type DeleteEntityByUid = {
path: {
uid: string;
};
};
export type deleteLocationRequest = {
/**
* @public
*/
export type DeleteLocation = {
path: {
id: string;
};
};
export type getEntitiesRequest = {
/**
* @public
*/
export type GetEntities = {
query: {
fields?: Array<string>;
limit?: number;
@@ -85,7 +100,10 @@ export type getEntitiesRequest = {
order?: Array<string>;
};
};
export type getEntitiesByQueryRequest = {
/**
* @public
*/
export type GetEntitiesByQuery = {
query: {
fields?: Array<string>;
limit?: number;
@@ -96,54 +114,84 @@ export type getEntitiesByQueryRequest = {
fullTextFilterFields?: Array<string>;
};
};
export type getEntitiesByRefsRequest = {
/**
* @public
*/
export type GetEntitiesByRefs = {
body: GetEntitiesByRefsRequest;
query: {
filter?: Array<string>;
};
};
export type getEntityAncestryByNameRequest = {
/**
* @public
*/
export type GetEntityAncestryByName = {
path: {
kind: string;
namespace: string;
name: string;
};
};
export type getEntityByNameRequest = {
/**
* @public
*/
export type GetEntityByName = {
path: {
kind: string;
namespace: string;
name: string;
};
};
export type getEntityByUidRequest = {
/**
* @public
*/
export type GetEntityByUid = {
path: {
uid: string;
};
};
export type getEntityFacetsRequest = {
/**
* @public
*/
export type GetEntityFacets = {
query: {
facet: Array<string>;
filter?: Array<string>;
};
};
export type getLocationRequest = {
/**
* @public
*/
export type GetLocation = {
path: {
id: string;
};
};
export type getLocationByEntityRequest = {
/**
* @public
*/
export type GetLocationByEntity = {
path: {
kind: string;
namespace: string;
name: string;
};
};
export type getLocationsRequest = {};
export type refreshEntityRequest = {
/**
* @public
*/
export type GetLocations = {};
/**
* @public
*/
export type RefreshEntity = {
body: RefreshEntityRequest;
};
export type validateEntityRequest = {
/**
* @public
*/
export type ValidateEntity = {
body: ValidateEntityRequest;
};
@@ -168,7 +216,7 @@ export class DefaultApiClient {
*/
public async analyzeLocation(
// @ts-ignore
request: analyzeLocationRequest,
request: AnalyzeLocation,
options?: RequestOptions,
): Promise<TypedResponse<AnalyzeLocationResponse>> {
const baseUrl = await this.discoveryApi.getBaseUrl(pluginId);
@@ -194,7 +242,7 @@ export class DefaultApiClient {
*/
public async createLocation(
// @ts-ignore
request: createLocationRequest,
request: CreateLocation,
options?: RequestOptions,
): Promise<TypedResponse<CreateLocation201Response>> {
const baseUrl = await this.discoveryApi.getBaseUrl(pluginId);
@@ -221,7 +269,7 @@ export class DefaultApiClient {
*/
public async deleteEntityByUid(
// @ts-ignore
request: deleteEntityByUidRequest,
request: DeleteEntityByUid,
options?: RequestOptions,
): Promise<TypedResponse<void>> {
const baseUrl = await this.discoveryApi.getBaseUrl(pluginId);
@@ -247,7 +295,7 @@ export class DefaultApiClient {
*/
public async deleteLocation(
// @ts-ignore
request: deleteLocationRequest,
request: DeleteLocation,
options?: RequestOptions,
): Promise<TypedResponse<void>> {
const baseUrl = await this.discoveryApi.getBaseUrl(pluginId);
@@ -278,7 +326,7 @@ export class DefaultApiClient {
*/
public async getEntities(
// @ts-ignore
request: getEntitiesRequest,
request: GetEntities,
options?: RequestOptions,
): Promise<TypedResponse<Array<Entity>>> {
const baseUrl = await this.discoveryApi.getBaseUrl(pluginId);
@@ -310,7 +358,7 @@ export class DefaultApiClient {
*/
public async getEntitiesByQuery(
// @ts-ignore
request: getEntitiesByQueryRequest,
request: GetEntitiesByQuery,
options?: RequestOptions,
): Promise<TypedResponse<EntitiesQueryResponse>> {
const baseUrl = await this.discoveryApi.getBaseUrl(pluginId);
@@ -337,7 +385,7 @@ export class DefaultApiClient {
*/
public async getEntitiesByRefs(
// @ts-ignore
request: getEntitiesByRefsRequest,
request: GetEntitiesByRefs,
options?: RequestOptions,
): Promise<TypedResponse<EntitiesBatchResponse>> {
const baseUrl = await this.discoveryApi.getBaseUrl(pluginId);
@@ -366,7 +414,7 @@ export class DefaultApiClient {
*/
public async getEntityAncestryByName(
// @ts-ignore
request: getEntityAncestryByNameRequest,
request: GetEntityAncestryByName,
options?: RequestOptions,
): Promise<TypedResponse<EntityAncestryResponse>> {
const baseUrl = await this.discoveryApi.getBaseUrl(pluginId);
@@ -396,7 +444,7 @@ export class DefaultApiClient {
*/
public async getEntityByName(
// @ts-ignore
request: getEntityByNameRequest,
request: GetEntityByName,
options?: RequestOptions,
): Promise<TypedResponse<Entity>> {
const baseUrl = await this.discoveryApi.getBaseUrl(pluginId);
@@ -424,7 +472,7 @@ export class DefaultApiClient {
*/
public async getEntityByUid(
// @ts-ignore
request: getEntityByUidRequest,
request: GetEntityByUid,
options?: RequestOptions,
): Promise<TypedResponse<Entity>> {
const baseUrl = await this.discoveryApi.getBaseUrl(pluginId);
@@ -451,7 +499,7 @@ export class DefaultApiClient {
*/
public async getEntityFacets(
// @ts-ignore
request: getEntityFacetsRequest,
request: GetEntityFacets,
options?: RequestOptions,
): Promise<TypedResponse<EntityFacetsResponse>> {
const baseUrl = await this.discoveryApi.getBaseUrl(pluginId);
@@ -477,7 +525,7 @@ export class DefaultApiClient {
*/
public async getLocation(
// @ts-ignore
request: getLocationRequest,
request: GetLocation,
options?: RequestOptions,
): Promise<TypedResponse<Location>> {
const baseUrl = await this.discoveryApi.getBaseUrl(pluginId);
@@ -505,7 +553,7 @@ export class DefaultApiClient {
*/
public async getLocationByEntity(
// @ts-ignore
request: getLocationByEntityRequest,
request: GetLocationByEntity,
options?: RequestOptions,
): Promise<TypedResponse<Location>> {
const baseUrl = await this.discoveryApi.getBaseUrl(pluginId);
@@ -532,7 +580,7 @@ export class DefaultApiClient {
*/
public async getLocations(
// @ts-ignore
request: getLocationsRequest,
request: GetLocations,
options?: RequestOptions,
): Promise<TypedResponse<Array<GetLocations200ResponseInner>>> {
const baseUrl = await this.discoveryApi.getBaseUrl(pluginId);
@@ -556,7 +604,7 @@ export class DefaultApiClient {
*/
public async refreshEntity(
// @ts-ignore
request: refreshEntityRequest,
request: RefreshEntity,
options?: RequestOptions,
): Promise<TypedResponse<void>> {
const baseUrl = await this.discoveryApi.getBaseUrl(pluginId);
@@ -581,7 +629,7 @@ export class DefaultApiClient {
*/
public async validateEntity(
// @ts-ignore
request: validateEntityRequest,
request: ValidateEntity,
options?: RequestOptions,
): Promise<TypedResponse<void>> {
const baseUrl = await this.discoveryApi.getBaseUrl(pluginId);
@@ -30,7 +30,10 @@ export interface RequestOptions {
}
{{#operation}}
export type {{nickname}}Request = {
/**
* @public
*/
export type {{#lambda.pascalcase}}{{nickname}}{{/lambda.pascalcase}} = {
{{#hasPathParams}}
path: {
{{#pathParams}}
@@ -89,7 +92,7 @@ export class {{classname}}Client {
*/
public async {{nickname}}(
// @ts-ignore
request: {{nickname}}Request,
request: {{#lambda.pascalcase}}{{nickname}}{{/lambda.pascalcase}},
options?: RequestOptions
): Promise<TypedResponse<{{{returnType}}} {{^returnType}}void{{/returnType}}>> {
const baseUrl = await this.discoveryApi.getBaseUrl(pluginId);
@@ -1,8 +1,10 @@
{{>licenseInfo}}
import type {
{{#imports}}
{{classname}},
{{/imports}}
{{#operations}}
{{#operation}}
{{#lambda.pascalcase}}{{nickname}}{{/lambda.pascalcase}},
{{/operation}}
{{/operations}}
} from '{{clientImport}}';
@@ -15,24 +17,7 @@ import type {
export type EndpointMap = {
{{#operation}}
'#{{#lambda.lowercase}}{{httpMethod}}{{/lambda.lowercase}}|{{path}}': {
path: {
{{#pathParams}}
{{paramName}}{{^required}}?{{/required}}: {{{dataType}}},
{{/pathParams}}
},
query: {
{{#queryParams}}
{{paramName}}{{^required}}?{{/required}}: {{{dataType}}},
{{/queryParams}}
},
{{#bodyParam}}
body: {{{dataType}}},
{{/bodyParam}}
{{#returnType}}
response: {{{returnType}}},
{{/returnType}}
},
'#{{#lambda.lowercase}}{{httpMethod}}{{/lambda.lowercase}}|{{path}}': {{#lambda.pascalcase}}{{nickname}}{{/lambda.pascalcase}},
{{/operation}}
}
@@ -18,20 +18,22 @@
// * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. *
// ******************************************************************
import type {
AnalyzeLocationRequest,
AnalyzeLocationResponse,
CreateLocation201Response,
CreateLocationRequest,
EntitiesBatchResponse,
EntitiesQueryResponse,
Entity,
EntityAncestryResponse,
EntityFacetsResponse,
GetEntitiesByRefsRequest,
GetLocations200ResponseInner,
Location,
RefreshEntityRequest,
ValidateEntityRequest,
AnalyzeLocation,
CreateLocation,
DeleteEntityByUid,
DeleteLocation,
GetEntities,
GetEntitiesByQuery,
GetEntitiesByRefs,
GetEntityAncestryByName,
GetEntityByName,
GetEntityByUid,
GetEntityFacets,
GetLocation,
GetLocationByEntity,
GetLocations,
RefreshEntity,
ValidateEntity,
} from '@backstage/catalog-client/alpha';
/**
@@ -39,146 +41,35 @@ import type {
*/
export type EndpointMap = {
'#post|/analyze-location': {
path: {};
query: {};
body: AnalyzeLocationRequest;
response: AnalyzeLocationResponse;
};
'#post|/analyze-location': AnalyzeLocation;
'#post|/locations': {
path: {};
query: {
dryRun?: string;
};
body: CreateLocationRequest;
response: CreateLocation201Response;
};
'#post|/locations': CreateLocation;
'#_delete|/entities/by-uid/{uid}': {
path: {
uid: string;
};
query: {};
response: void;
};
'#_delete|/entities/by-uid/{uid}': DeleteEntityByUid;
'#_delete|/locations/{id}': {
path: {
id: string;
};
query: {};
response: void;
};
'#_delete|/locations/{id}': DeleteLocation;
'#get|/entities': {
path: {};
query: {
fields?: Array<string>;
limit?: number;
filter?: Array<string>;
offset?: number;
after?: string;
order?: Array<string>;
};
response: Array<Entity>;
};
'#get|/entities': GetEntities;
'#get|/entities/by-query': {
path: {};
query: {
fields?: Array<string>;
limit?: number;
orderField?: Array<string>;
cursor?: string;
filter?: Array<string>;
fullTextFilterTerm?: string;
fullTextFilterFields?: Array<string>;
};
response: EntitiesQueryResponse;
};
'#get|/entities/by-query': GetEntitiesByQuery;
'#post|/entities/by-refs': {
path: {};
query: {
filter?: Array<string>;
};
body: GetEntitiesByRefsRequest;
response: EntitiesBatchResponse;
};
'#post|/entities/by-refs': GetEntitiesByRefs;
'#get|/entities/by-name/{kind}/{namespace}/{name}/ancestry': {
path: {
kind: string;
namespace: string;
name: string;
};
query: {};
response: EntityAncestryResponse;
};
'#get|/entities/by-name/{kind}/{namespace}/{name}/ancestry': GetEntityAncestryByName;
'#get|/entities/by-name/{kind}/{namespace}/{name}': {
path: {
kind: string;
namespace: string;
name: string;
};
query: {};
response: Entity;
};
'#get|/entities/by-name/{kind}/{namespace}/{name}': GetEntityByName;
'#get|/entities/by-uid/{uid}': {
path: {
uid: string;
};
query: {};
response: Entity;
};
'#get|/entities/by-uid/{uid}': GetEntityByUid;
'#get|/entity-facets': {
path: {};
query: {
facet: Array<string>;
filter?: Array<string>;
};
response: EntityFacetsResponse;
};
'#get|/entity-facets': GetEntityFacets;
'#get|/locations/{id}': {
path: {
id: string;
};
query: {};
response: Location;
};
'#get|/locations/{id}': GetLocation;
'#get|/locations/by-entity/{kind}/{namespace}/{name}': {
path: {
kind: string;
namespace: string;
name: string;
};
query: {};
response: Location;
};
'#get|/locations/by-entity/{kind}/{namespace}/{name}': GetLocationByEntity;
'#get|/locations': {
path: {};
query: {};
response: Array<GetLocations200ResponseInner>;
};
'#get|/locations': GetLocations;
'#post|/refresh': {
path: {};
query: {};
body: RefreshEntityRequest;
response: void;
};
'#post|/refresh': RefreshEntity;
'#post|/validate-entity': {
path: {};
query: {};
body: ValidateEntityRequest;
response: void;
};
'#post|/validate-entity': ValidateEntity;
};