diff --git a/packages/catalog-client/api-report-alpha.md b/packages/catalog-client/api-report-alpha.md new file mode 100644 index 0000000000..94d87512d4 --- /dev/null +++ b/packages/catalog-client/api-report-alpha.md @@ -0,0 +1,621 @@ +## API Report File for "@backstage/catalog-client" + +> 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 interface AnalyzeLocationEntityField { + description: string; + field: string; + state: AnalyzeLocationEntityFieldStateEnum; + // (undocumented) + 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) + entity: Entity; + // (undocumented) + isRegistered: boolean; + // (undocumented) + 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) + entity: RecursivePartialEntity; + // (undocumented) + fields: Array; +} + +// 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) + catalogFileName?: string; + // (undocumented) + 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) + existingEntityFiles: Array; + // (undocumented) + generateEntities: Array; +} + +// 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 interface CreateLocation201Response { + // (undocumented) + entities: Array; + // (undocumented) + exists?: boolean; + // (undocumented) + 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) + target: string; + // (undocumented) + type: string; +} + +// Warning: (ae-missing-release-tag) "DefaultApiClient" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) +// +// @public +export class DefaultApiClient { + constructor(options: { + discoveryApi: { + getBaseUrl(pluginId: string): Promise; + }; + fetchApi?: { + fetch: typeof fetch; + }; + }); + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen + analyzeLocation( + request: { + body: AnalyzeLocationRequest; + }, + options?: RequestOptions, + ): Promise>; + // 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; + }; + }, + options?: RequestOptions, + ): Promise>; + // 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; + }; + }, + options?: RequestOptions, + ): Promise>; + // 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; + }; + }, + options?: RequestOptions, + ): Promise>; + // 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 + // 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 + getEntities( + request: { + query: { + fields?: Array; + limit?: number; + filter?: Array; + offset?: number; + after?: string; + order?: Array; + }; + }, + options?: RequestOptions, + ): Promise>>; + // 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 + // 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 + // 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; + limit?: number; + orderField?: Array; + cursor?: string; + filter?: Array; + fullTextFilterTerm?: string; + fullTextFilterFields?: Array; + }; + }, + options?: RequestOptions, + ): Promise>; + // 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; + }; + }, + options?: RequestOptions, + ): Promise>; + // 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; + }; + }, + options?: RequestOptions, + ): Promise>; + // 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; + }; + }, + options?: RequestOptions, + ): Promise>; + // 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; + }; + }, + options?: RequestOptions, + ): Promise>; + // 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; + filter?: Array; + }; + }, + options?: RequestOptions, + ): Promise>; + // 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; + }; + }, + options?: RequestOptions, + ): Promise>; + // 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; + }; + }, + options?: RequestOptions, + ): Promise>; + getLocations( + request: {}, + options?: RequestOptions, + ): Promise>>; + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen + refreshEntity( + request: { + body: RefreshEntityRequest; + }, + options?: RequestOptions, + ): Promise>; + // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen + validateEntity( + request: { + body: ValidateEntityRequest; + }, + options?: RequestOptions, + ): Promise>; +} + +// 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 interface EntitiesBatchResponse { + items: Array; +} + +// 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; + // (undocumented) + pageInfo: EntitiesQueryResponsePageInfo; + // (undocumented) + 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; + kind: string; + // (undocumented) + metadata: EntityMeta; + relations?: Array; + spec?: { + [key: string]: any; + }; +} + +// 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) + items: Array; + // (undocumented) + 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) + entity: Entity; + // (undocumented) + parentEntityRefs: Array; +} + +// 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) + count: number; + // (undocumented) + 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) + facets: { + [key: string]: Array; + }; +} + +// 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; + title?: string; + type?: string; + 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) + [key: string]: any; + annotations?: { + [key: string]: string; + }; + description?: string; + etag?: string; + labels?: { + [key: string]: string; + }; + links?: Array; + name: string; + namespace?: string; + tags?: Array; + title?: string; + 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) + code?: string; + // (undocumented) + message: string; + // (undocumented) + name: string; + // (undocumented) + 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) + method: string; + // (undocumented) + 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 interface GetEntitiesByRefsRequest { + // (undocumented) + entityRefs: Array; + // (undocumented) + fields?: Array; +} + +// 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 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) + id: string; + // (undocumented) + target: string; + // (undocumented) + type: string; +} +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) + target: string; + // (undocumented) + 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) + target: string; + // (undocumented) + 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) + [key: string]: any; + // (undocumented) + error: ErrorError; + // (undocumented) + request?: ErrorRequest; + // (undocumented) + 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; + spec?: { + [key: string]: any; + }; + metadata: EntityMeta; + kind: string; + 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; + kind?: string; + // (undocumented) + metadata?: RecursivePartialEntityMeta; + relations?: Array; + spec?: { + [key: string]: any; + }; +} + +// 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?: { + [key: string]: string; + }; + description?: string; + etag?: string; + labels?: { + [key: string]: string; + }; + links?: Array; + name?: string; + namespace?: string; + tags?: Array; + title?: string; + 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?: { + [key: string]: string; + }; + description?: string; + etag?: string; + labels?: { + [key: string]: string; + }; + links?: Array; + name?: string; + namespace?: string; + tags?: Array; + title?: string; + 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 +export interface RefreshEntityRequest { + // (undocumented) + authorizationToken?: string; + entityRef: string; +} + +// @public +export interface RequestOptions { + // (undocumented) + token?: string; +} + +// @public +export type TypedResponse = Omit & { + json: () => Promise; +}; + +// 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 interface ValidateEntity400Response { + // (undocumented) + errors: Array; +} + +// 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) + [key: string]: any; + // (undocumented) + message: string; + // (undocumented) + 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) + entity: { + [key: string]: any; + }; + // (undocumented) + location: string; +} + +// (No @packageDocumentation comment for this package) +``` diff --git a/packages/catalog-client/src/generated/apis/DefaultApi.client.ts b/packages/catalog-client/src/generated/apis/DefaultApi.client.ts index 598d9c706f..873f33e553 100644 --- a/packages/catalog-client/src/generated/apis/DefaultApi.client.ts +++ b/packages/catalog-client/src/generated/apis/DefaultApi.client.ts @@ -56,6 +56,97 @@ export interface RequestOptions { token?: string; } +export type analyzeLocationRequest = { + body: AnalyzeLocationRequest; +}; +export type createLocationRequest = { + body: CreateLocationRequest; + query: { + dryRun?: string; + }; +}; +export type deleteEntityByUidRequest = { + path: { + uid: string; + }; +}; +export type deleteLocationRequest = { + path: { + id: string; + }; +}; +export type getEntitiesRequest = { + query: { + fields?: Array; + limit?: number; + filter?: Array; + offset?: number; + after?: string; + order?: Array; + }; +}; +export type getEntitiesByQueryRequest = { + query: { + fields?: Array; + limit?: number; + orderField?: Array; + cursor?: string; + filter?: Array; + fullTextFilterTerm?: string; + fullTextFilterFields?: Array; + }; +}; +export type getEntitiesByRefsRequest = { + body: GetEntitiesByRefsRequest; + query: { + filter?: Array; + }; +}; +export type getEntityAncestryByNameRequest = { + path: { + kind: string; + namespace: string; + name: string; + }; +}; +export type getEntityByNameRequest = { + path: { + kind: string; + namespace: string; + name: string; + }; +}; +export type getEntityByUidRequest = { + path: { + uid: string; + }; +}; +export type getEntityFacetsRequest = { + query: { + facet: Array; + filter?: Array; + }; +}; +export type getLocationRequest = { + path: { + id: string; + }; +}; +export type getLocationByEntityRequest = { + path: { + kind: string; + namespace: string; + name: string; + }; +}; +export type getLocationsRequest = {}; +export type refreshEntityRequest = { + body: RefreshEntityRequest; +}; +export type validateEntityRequest = { + body: ValidateEntityRequest; +}; + /** * no description */ @@ -77,9 +168,7 @@ export class DefaultApiClient { */ public async analyzeLocation( // @ts-ignore - request: { - body: AnalyzeLocationRequest; - }, + request: analyzeLocationRequest, options?: RequestOptions, ): Promise> { const baseUrl = await this.discoveryApi.getBaseUrl(pluginId); @@ -105,12 +194,7 @@ export class DefaultApiClient { */ public async createLocation( // @ts-ignore - request: { - body: CreateLocationRequest; - query: { - dryRun?: string; - }; - }, + request: createLocationRequest, options?: RequestOptions, ): Promise> { const baseUrl = await this.discoveryApi.getBaseUrl(pluginId); @@ -137,11 +221,7 @@ export class DefaultApiClient { */ public async deleteEntityByUid( // @ts-ignore - request: { - path: { - uid: string; - }; - }, + request: deleteEntityByUidRequest, options?: RequestOptions, ): Promise> { const baseUrl = await this.discoveryApi.getBaseUrl(pluginId); @@ -167,11 +247,7 @@ export class DefaultApiClient { */ public async deleteLocation( // @ts-ignore - request: { - path: { - id: string; - }; - }, + request: deleteLocationRequest, options?: RequestOptions, ): Promise> { const baseUrl = await this.discoveryApi.getBaseUrl(pluginId); @@ -202,16 +278,7 @@ export class DefaultApiClient { */ public async getEntities( // @ts-ignore - request: { - query: { - fields?: Array; - limit?: number; - filter?: Array; - offset?: number; - after?: string; - order?: Array; - }; - }, + request: getEntitiesRequest, options?: RequestOptions, ): Promise>> { const baseUrl = await this.discoveryApi.getBaseUrl(pluginId); @@ -243,18 +310,7 @@ export class DefaultApiClient { */ public async getEntitiesByQuery( // @ts-ignore - request: { - query: { - fields?: Array; - limit?: number; - offset?: number; - orderField?: Array; - cursor?: string; - filter?: Array; - fullTextFilterTerm?: string; - fullTextFilterFields?: Array; - }; - }, + request: getEntitiesByQueryRequest, options?: RequestOptions, ): Promise> { const baseUrl = await this.discoveryApi.getBaseUrl(pluginId); @@ -281,12 +337,7 @@ export class DefaultApiClient { */ public async getEntitiesByRefs( // @ts-ignore - request: { - body: GetEntitiesByRefsRequest; - query: { - filter?: Array; - }; - }, + request: getEntitiesByRefsRequest, options?: RequestOptions, ): Promise> { const baseUrl = await this.discoveryApi.getBaseUrl(pluginId); @@ -315,13 +366,7 @@ export class DefaultApiClient { */ public async getEntityAncestryByName( // @ts-ignore - request: { - path: { - kind: string; - namespace: string; - name: string; - }; - }, + request: getEntityAncestryByNameRequest, options?: RequestOptions, ): Promise> { const baseUrl = await this.discoveryApi.getBaseUrl(pluginId); @@ -351,13 +396,7 @@ export class DefaultApiClient { */ public async getEntityByName( // @ts-ignore - request: { - path: { - kind: string; - namespace: string; - name: string; - }; - }, + request: getEntityByNameRequest, options?: RequestOptions, ): Promise> { const baseUrl = await this.discoveryApi.getBaseUrl(pluginId); @@ -385,11 +424,7 @@ export class DefaultApiClient { */ public async getEntityByUid( // @ts-ignore - request: { - path: { - uid: string; - }; - }, + request: getEntityByUidRequest, options?: RequestOptions, ): Promise> { const baseUrl = await this.discoveryApi.getBaseUrl(pluginId); @@ -416,12 +451,7 @@ export class DefaultApiClient { */ public async getEntityFacets( // @ts-ignore - request: { - query: { - facet: Array; - filter?: Array; - }; - }, + request: getEntityFacetsRequest, options?: RequestOptions, ): Promise> { const baseUrl = await this.discoveryApi.getBaseUrl(pluginId); @@ -447,11 +477,7 @@ export class DefaultApiClient { */ public async getLocation( // @ts-ignore - request: { - path: { - id: string; - }; - }, + request: getLocationRequest, options?: RequestOptions, ): Promise> { const baseUrl = await this.discoveryApi.getBaseUrl(pluginId); @@ -479,13 +505,7 @@ export class DefaultApiClient { */ public async getLocationByEntity( // @ts-ignore - request: { - path: { - kind: string; - namespace: string; - name: string; - }; - }, + request: getLocationByEntityRequest, options?: RequestOptions, ): Promise> { const baseUrl = await this.discoveryApi.getBaseUrl(pluginId); @@ -512,7 +532,7 @@ export class DefaultApiClient { */ public async getLocations( // @ts-ignore - request: {}, + request: getLocationsRequest, options?: RequestOptions, ): Promise>> { const baseUrl = await this.discoveryApi.getBaseUrl(pluginId); @@ -536,9 +556,7 @@ export class DefaultApiClient { */ public async refreshEntity( // @ts-ignore - request: { - body: RefreshEntityRequest; - }, + request: refreshEntityRequest, options?: RequestOptions, ): Promise> { const baseUrl = await this.discoveryApi.getBaseUrl(pluginId); @@ -563,9 +581,7 @@ export class DefaultApiClient { */ public async validateEntity( // @ts-ignore - request: { - body: ValidateEntityRequest; - }, + request: validateEntityRequest, options?: RequestOptions, ): Promise> { const baseUrl = await this.discoveryApi.getBaseUrl(pluginId); diff --git a/packages/catalog-client/src/generated/models/AnalyzeLocationEntityField.model.ts b/packages/catalog-client/src/generated/models/AnalyzeLocationEntityField.model.ts index 48d2c897a7..ad2b5aecd1 100644 --- a/packages/catalog-client/src/generated/models/AnalyzeLocationEntityField.model.ts +++ b/packages/catalog-client/src/generated/models/AnalyzeLocationEntityField.model.ts @@ -18,6 +18,9 @@ // * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. * // ****************************************************************** +/** + * @public + */ export interface AnalyzeLocationEntityField { /** * A text to show to the user to inform about the choices made. Like, it could say \"Found a CODEOWNERS file that covers this target, so we suggest leaving this field empty; which would currently make it owned by X\" where X is taken from the codeowners file. @@ -34,6 +37,9 @@ export interface AnalyzeLocationEntityField { field: string; } +/** + * @public + */ export type AnalyzeLocationEntityFieldStateEnum = | 'analysisSuggestedValue' | 'analysisSuggestedNoValue' diff --git a/packages/catalog-client/src/generated/models/AnalyzeLocationExistingEntity.model.ts b/packages/catalog-client/src/generated/models/AnalyzeLocationExistingEntity.model.ts index 7a1417145e..fb01ae8e8e 100644 --- a/packages/catalog-client/src/generated/models/AnalyzeLocationExistingEntity.model.ts +++ b/packages/catalog-client/src/generated/models/AnalyzeLocationExistingEntity.model.ts @@ -22,6 +22,7 @@ import { LocationSpec } from '../models/LocationSpec.model'; /** * If the folder pointed to already contained catalog info yaml files, they are read and emitted like this so that the frontend can inform the user that it located them and can make sure to register them as well if they weren't already + * @public */ export interface AnalyzeLocationExistingEntity { entity: Entity; diff --git a/packages/catalog-client/src/generated/models/AnalyzeLocationGenerateEntity.model.ts b/packages/catalog-client/src/generated/models/AnalyzeLocationGenerateEntity.model.ts index 3e33c59330..e760d9cf94 100644 --- a/packages/catalog-client/src/generated/models/AnalyzeLocationGenerateEntity.model.ts +++ b/packages/catalog-client/src/generated/models/AnalyzeLocationGenerateEntity.model.ts @@ -22,6 +22,7 @@ import { RecursivePartialEntity } from '../models/RecursivePartialEntity.model'; /** * This is some form of representation of what the analyzer could deduce. We should probably have a chat about how this can best be conveyed to the frontend. It'll probably contain a (possibly incomplete) entity, plus enough info for the frontend to know what form data to show to the user for overriding/completing the info. + * @public */ export interface AnalyzeLocationGenerateEntity { fields: Array; diff --git a/packages/catalog-client/src/generated/models/AnalyzeLocationRequest.model.ts b/packages/catalog-client/src/generated/models/AnalyzeLocationRequest.model.ts index 15e9b96e2c..c1085a2a7b 100644 --- a/packages/catalog-client/src/generated/models/AnalyzeLocationRequest.model.ts +++ b/packages/catalog-client/src/generated/models/AnalyzeLocationRequest.model.ts @@ -19,6 +19,9 @@ // ****************************************************************** import { LocationInput } from '../models/LocationInput.model'; +/** + * @public + */ export interface AnalyzeLocationRequest { catalogFileName?: string; location: LocationInput; diff --git a/packages/catalog-client/src/generated/models/AnalyzeLocationResponse.model.ts b/packages/catalog-client/src/generated/models/AnalyzeLocationResponse.model.ts index e22d45627a..66fc46bc0f 100644 --- a/packages/catalog-client/src/generated/models/AnalyzeLocationResponse.model.ts +++ b/packages/catalog-client/src/generated/models/AnalyzeLocationResponse.model.ts @@ -20,6 +20,9 @@ import { AnalyzeLocationExistingEntity } from '../models/AnalyzeLocationExistingEntity.model'; import { AnalyzeLocationGenerateEntity } from '../models/AnalyzeLocationGenerateEntity.model'; +/** + * @public + */ export interface AnalyzeLocationResponse { generateEntities: Array; existingEntityFiles: Array; diff --git a/packages/catalog-client/src/generated/models/CreateLocation201Response.model.ts b/packages/catalog-client/src/generated/models/CreateLocation201Response.model.ts index 367e701af8..27e557639a 100644 --- a/packages/catalog-client/src/generated/models/CreateLocation201Response.model.ts +++ b/packages/catalog-client/src/generated/models/CreateLocation201Response.model.ts @@ -20,6 +20,9 @@ import { Entity } from '../models/Entity.model'; import { Location } from '../models/Location.model'; +/** + * @public + */ export interface CreateLocation201Response { exists?: boolean; entities: Array; diff --git a/packages/catalog-client/src/generated/models/CreateLocationRequest.model.ts b/packages/catalog-client/src/generated/models/CreateLocationRequest.model.ts index badddbf60d..5351ac289b 100644 --- a/packages/catalog-client/src/generated/models/CreateLocationRequest.model.ts +++ b/packages/catalog-client/src/generated/models/CreateLocationRequest.model.ts @@ -18,6 +18,9 @@ // * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. * // ****************************************************************** +/** + * @public + */ export interface CreateLocationRequest { target: string; type: string; diff --git a/packages/catalog-client/src/generated/models/EntitiesBatchResponse.model.ts b/packages/catalog-client/src/generated/models/EntitiesBatchResponse.model.ts index 3275a7b6e7..1a962367d1 100644 --- a/packages/catalog-client/src/generated/models/EntitiesBatchResponse.model.ts +++ b/packages/catalog-client/src/generated/models/EntitiesBatchResponse.model.ts @@ -19,6 +19,9 @@ // ****************************************************************** import { NullableEntity } from '../models/NullableEntity.model'; +/** + * @public + */ export interface EntitiesBatchResponse { /** * The list of entities, in the same order as the refs in the request. Entries that are null signify that no entity existed with that ref. diff --git a/packages/catalog-client/src/generated/models/EntitiesQueryResponse.model.ts b/packages/catalog-client/src/generated/models/EntitiesQueryResponse.model.ts index 9950dd98d1..11c42a6aee 100644 --- a/packages/catalog-client/src/generated/models/EntitiesQueryResponse.model.ts +++ b/packages/catalog-client/src/generated/models/EntitiesQueryResponse.model.ts @@ -20,6 +20,9 @@ import { EntitiesQueryResponsePageInfo } from '../models/EntitiesQueryResponsePageInfo.model'; import { Entity } from '../models/Entity.model'; +/** + * @public + */ export interface EntitiesQueryResponse { /** * The list of entities paginated by a specific filter. diff --git a/packages/catalog-client/src/generated/models/EntitiesQueryResponsePageInfo.model.ts b/packages/catalog-client/src/generated/models/EntitiesQueryResponsePageInfo.model.ts index 4d2a0af058..07b4137c77 100644 --- a/packages/catalog-client/src/generated/models/EntitiesQueryResponsePageInfo.model.ts +++ b/packages/catalog-client/src/generated/models/EntitiesQueryResponsePageInfo.model.ts @@ -18,6 +18,9 @@ // * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. * // ****************************************************************** +/** + * @public + */ export interface EntitiesQueryResponsePageInfo { /** * The cursor for the next batch of entities. diff --git a/packages/catalog-client/src/generated/models/Entity.model.ts b/packages/catalog-client/src/generated/models/Entity.model.ts index f4a30fbf66..f386f3dd17 100644 --- a/packages/catalog-client/src/generated/models/Entity.model.ts +++ b/packages/catalog-client/src/generated/models/Entity.model.ts @@ -22,6 +22,7 @@ import { EntityRelation } from '../models/EntityRelation.model'; /** * The parts of the format that's common to all versions/kinds of entity. + * @public */ export interface Entity { /** diff --git a/packages/catalog-client/src/generated/models/EntityAncestryResponse.model.ts b/packages/catalog-client/src/generated/models/EntityAncestryResponse.model.ts index 4e0ead7d3b..a94f784f05 100644 --- a/packages/catalog-client/src/generated/models/EntityAncestryResponse.model.ts +++ b/packages/catalog-client/src/generated/models/EntityAncestryResponse.model.ts @@ -19,6 +19,9 @@ // ****************************************************************** import { EntityAncestryResponseItemsInner } from '../models/EntityAncestryResponseItemsInner.model'; +/** + * @public + */ export interface EntityAncestryResponse { items: Array; rootEntityRef: string; diff --git a/packages/catalog-client/src/generated/models/EntityAncestryResponseItemsInner.model.ts b/packages/catalog-client/src/generated/models/EntityAncestryResponseItemsInner.model.ts index 22b59e201f..40594a1515 100644 --- a/packages/catalog-client/src/generated/models/EntityAncestryResponseItemsInner.model.ts +++ b/packages/catalog-client/src/generated/models/EntityAncestryResponseItemsInner.model.ts @@ -19,6 +19,9 @@ // ****************************************************************** import { Entity } from '../models/Entity.model'; +/** + * @public + */ export interface EntityAncestryResponseItemsInner { parentEntityRefs: Array; entity: Entity; diff --git a/packages/catalog-client/src/generated/models/EntityFacet.model.ts b/packages/catalog-client/src/generated/models/EntityFacet.model.ts index aa637501f4..f0f89f6eae 100644 --- a/packages/catalog-client/src/generated/models/EntityFacet.model.ts +++ b/packages/catalog-client/src/generated/models/EntityFacet.model.ts @@ -18,6 +18,9 @@ // * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. * // ****************************************************************** +/** + * @public + */ export interface EntityFacet { value: string; count: number; diff --git a/packages/catalog-client/src/generated/models/EntityFacetsResponse.model.ts b/packages/catalog-client/src/generated/models/EntityFacetsResponse.model.ts index 33aa505a64..e013f0b5a8 100644 --- a/packages/catalog-client/src/generated/models/EntityFacetsResponse.model.ts +++ b/packages/catalog-client/src/generated/models/EntityFacetsResponse.model.ts @@ -19,6 +19,9 @@ // ****************************************************************** import { EntityFacet } from '../models/EntityFacet.model'; +/** + * @public + */ export interface EntityFacetsResponse { facets: { [key: string]: Array }; } diff --git a/packages/catalog-client/src/generated/models/EntityLink.model.ts b/packages/catalog-client/src/generated/models/EntityLink.model.ts index 9de21c1b10..53d7d1f9ff 100644 --- a/packages/catalog-client/src/generated/models/EntityLink.model.ts +++ b/packages/catalog-client/src/generated/models/EntityLink.model.ts @@ -20,6 +20,7 @@ /** * A link to external information that is related to the entity. + * @public */ export interface EntityLink { /** diff --git a/packages/catalog-client/src/generated/models/EntityMeta.model.ts b/packages/catalog-client/src/generated/models/EntityMeta.model.ts index 10cda7f226..cc8dd555a6 100644 --- a/packages/catalog-client/src/generated/models/EntityMeta.model.ts +++ b/packages/catalog-client/src/generated/models/EntityMeta.model.ts @@ -21,6 +21,7 @@ import { EntityLink } from '../models/EntityLink.model'; /** * Metadata fields common to all versions/kinds of entity. + * @public */ export interface EntityMeta { [key: string]: any; diff --git a/packages/catalog-client/src/generated/models/EntityRelation.model.ts b/packages/catalog-client/src/generated/models/EntityRelation.model.ts index 14f7d0fab3..fe98a84481 100644 --- a/packages/catalog-client/src/generated/models/EntityRelation.model.ts +++ b/packages/catalog-client/src/generated/models/EntityRelation.model.ts @@ -20,6 +20,7 @@ /** * A relation of a specific type to another entity in the catalog. + * @public */ export interface EntityRelation { /** diff --git a/packages/catalog-client/src/generated/models/ErrorError.model.ts b/packages/catalog-client/src/generated/models/ErrorError.model.ts index a9d3b11fdd..fe5811628d 100644 --- a/packages/catalog-client/src/generated/models/ErrorError.model.ts +++ b/packages/catalog-client/src/generated/models/ErrorError.model.ts @@ -18,6 +18,9 @@ // * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. * // ****************************************************************** +/** + * @public + */ export interface ErrorError { name: string; message: string; diff --git a/packages/catalog-client/src/generated/models/ErrorRequest.model.ts b/packages/catalog-client/src/generated/models/ErrorRequest.model.ts index be62627814..d44dcb66d9 100644 --- a/packages/catalog-client/src/generated/models/ErrorRequest.model.ts +++ b/packages/catalog-client/src/generated/models/ErrorRequest.model.ts @@ -18,6 +18,9 @@ // * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. * // ****************************************************************** +/** + * @public + */ export interface ErrorRequest { method: string; url: string; diff --git a/packages/catalog-client/src/generated/models/ErrorResponse.model.ts b/packages/catalog-client/src/generated/models/ErrorResponse.model.ts index 008f8b7348..91c120483d 100644 --- a/packages/catalog-client/src/generated/models/ErrorResponse.model.ts +++ b/packages/catalog-client/src/generated/models/ErrorResponse.model.ts @@ -18,6 +18,9 @@ // * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. * // ****************************************************************** +/** + * @public + */ export interface ErrorResponse { statusCode: number; } diff --git a/packages/catalog-client/src/generated/models/GetEntitiesByRefsRequest.model.ts b/packages/catalog-client/src/generated/models/GetEntitiesByRefsRequest.model.ts index 07c6500c9f..9160f0823b 100644 --- a/packages/catalog-client/src/generated/models/GetEntitiesByRefsRequest.model.ts +++ b/packages/catalog-client/src/generated/models/GetEntitiesByRefsRequest.model.ts @@ -18,6 +18,9 @@ // * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. * // ****************************************************************** +/** + * @public + */ export interface GetEntitiesByRefsRequest { entityRefs: Array; fields?: Array; diff --git a/packages/catalog-client/src/generated/models/GetLocations200ResponseInner.model.ts b/packages/catalog-client/src/generated/models/GetLocations200ResponseInner.model.ts index 94c40d2233..a9f1af1c53 100644 --- a/packages/catalog-client/src/generated/models/GetLocations200ResponseInner.model.ts +++ b/packages/catalog-client/src/generated/models/GetLocations200ResponseInner.model.ts @@ -19,6 +19,9 @@ // ****************************************************************** import { Location } from '../models/Location.model'; +/** + * @public + */ export interface GetLocations200ResponseInner { data: Location; } diff --git a/packages/catalog-client/src/generated/models/Location.model.ts b/packages/catalog-client/src/generated/models/Location.model.ts index 456b76ec7b..d7e4a22de4 100644 --- a/packages/catalog-client/src/generated/models/Location.model.ts +++ b/packages/catalog-client/src/generated/models/Location.model.ts @@ -20,6 +20,7 @@ /** * Entity location for a specific entity. + * @public */ export interface Location { target: string; diff --git a/packages/catalog-client/src/generated/models/LocationInput.model.ts b/packages/catalog-client/src/generated/models/LocationInput.model.ts index 41537aaded..9cdc4c2c13 100644 --- a/packages/catalog-client/src/generated/models/LocationInput.model.ts +++ b/packages/catalog-client/src/generated/models/LocationInput.model.ts @@ -18,6 +18,9 @@ // * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. * // ****************************************************************** +/** + * @public + */ export interface LocationInput { type: string; target: string; diff --git a/packages/catalog-client/src/generated/models/LocationSpec.model.ts b/packages/catalog-client/src/generated/models/LocationSpec.model.ts index cd9eb284f7..1d56d8f3b0 100644 --- a/packages/catalog-client/src/generated/models/LocationSpec.model.ts +++ b/packages/catalog-client/src/generated/models/LocationSpec.model.ts @@ -20,6 +20,7 @@ /** * Holds the entity location information. + * @public */ export interface LocationSpec { target: string; diff --git a/packages/catalog-client/src/generated/models/ModelError.model.ts b/packages/catalog-client/src/generated/models/ModelError.model.ts index 7bfa165493..5526d703e6 100644 --- a/packages/catalog-client/src/generated/models/ModelError.model.ts +++ b/packages/catalog-client/src/generated/models/ModelError.model.ts @@ -21,6 +21,9 @@ import { ErrorError } from '../models/ErrorError.model'; import { ErrorRequest } from '../models/ErrorRequest.model'; import { ErrorResponse } from '../models/ErrorResponse.model'; +/** + * @public + */ export interface ModelError { [key: string]: any; diff --git a/packages/catalog-client/src/generated/models/NullableEntity.model.ts b/packages/catalog-client/src/generated/models/NullableEntity.model.ts index c75fa42a12..aa6135ded4 100644 --- a/packages/catalog-client/src/generated/models/NullableEntity.model.ts +++ b/packages/catalog-client/src/generated/models/NullableEntity.model.ts @@ -22,6 +22,7 @@ import { EntityRelation } from '../models/EntityRelation.model'; /** * The parts of the format that's common to all versions/kinds of entity. + * @public */ export type NullableEntity = { /** diff --git a/packages/catalog-client/src/generated/models/RecursivePartialEntity.model.ts b/packages/catalog-client/src/generated/models/RecursivePartialEntity.model.ts index db5ac31de3..b3913ccd85 100644 --- a/packages/catalog-client/src/generated/models/RecursivePartialEntity.model.ts +++ b/packages/catalog-client/src/generated/models/RecursivePartialEntity.model.ts @@ -22,6 +22,7 @@ import { RecursivePartialEntityRelation } from '../models/RecursivePartialEntity /** * Makes all keys of an entire hierarchy optional. + * @public */ export interface RecursivePartialEntity { /** diff --git a/packages/catalog-client/src/generated/models/RecursivePartialEntityMeta.model.ts b/packages/catalog-client/src/generated/models/RecursivePartialEntityMeta.model.ts index 93e849ac99..df5ce3811b 100644 --- a/packages/catalog-client/src/generated/models/RecursivePartialEntityMeta.model.ts +++ b/packages/catalog-client/src/generated/models/RecursivePartialEntityMeta.model.ts @@ -19,6 +19,9 @@ // ****************************************************************** import { EntityLink } from '../models/EntityLink.model'; +/** + * @public + */ export interface RecursivePartialEntityMeta { /** * A list of external hyperlinks related to the entity. diff --git a/packages/catalog-client/src/generated/models/RecursivePartialEntityMetaAllOf.model.ts b/packages/catalog-client/src/generated/models/RecursivePartialEntityMetaAllOf.model.ts index 7e06368102..6598f8df96 100644 --- a/packages/catalog-client/src/generated/models/RecursivePartialEntityMetaAllOf.model.ts +++ b/packages/catalog-client/src/generated/models/RecursivePartialEntityMetaAllOf.model.ts @@ -21,6 +21,7 @@ import { EntityLink } from '../models/EntityLink.model'; /** * Metadata fields common to all versions/kinds of entity. + * @public */ export interface RecursivePartialEntityMetaAllOf { /** diff --git a/packages/catalog-client/src/generated/models/RecursivePartialEntityRelation.model.ts b/packages/catalog-client/src/generated/models/RecursivePartialEntityRelation.model.ts index 9179add222..9c7dafb534 100644 --- a/packages/catalog-client/src/generated/models/RecursivePartialEntityRelation.model.ts +++ b/packages/catalog-client/src/generated/models/RecursivePartialEntityRelation.model.ts @@ -20,6 +20,7 @@ /** * A relation of a specific type to another entity in the catalog. + * @public */ export interface RecursivePartialEntityRelation { /** diff --git a/packages/catalog-client/src/generated/models/RefreshEntityRequest.model.ts b/packages/catalog-client/src/generated/models/RefreshEntityRequest.model.ts index c5ab4c38eb..617f35288b 100644 --- a/packages/catalog-client/src/generated/models/RefreshEntityRequest.model.ts +++ b/packages/catalog-client/src/generated/models/RefreshEntityRequest.model.ts @@ -20,6 +20,7 @@ /** * Options for requesting a refresh of entities in the catalog. + * @public */ export interface RefreshEntityRequest { authorizationToken?: string; diff --git a/packages/catalog-client/src/generated/models/ValidateEntity400Response.model.ts b/packages/catalog-client/src/generated/models/ValidateEntity400Response.model.ts index 7cd5044782..fac9525afa 100644 --- a/packages/catalog-client/src/generated/models/ValidateEntity400Response.model.ts +++ b/packages/catalog-client/src/generated/models/ValidateEntity400Response.model.ts @@ -19,6 +19,9 @@ // ****************************************************************** import { ValidateEntity400ResponseErrorsInner } from '../models/ValidateEntity400ResponseErrorsInner.model'; +/** + * @public + */ export interface ValidateEntity400Response { errors: Array; } diff --git a/packages/catalog-client/src/generated/models/ValidateEntity400ResponseErrorsInner.model.ts b/packages/catalog-client/src/generated/models/ValidateEntity400ResponseErrorsInner.model.ts index 5617ee00bb..8718d7938d 100644 --- a/packages/catalog-client/src/generated/models/ValidateEntity400ResponseErrorsInner.model.ts +++ b/packages/catalog-client/src/generated/models/ValidateEntity400ResponseErrorsInner.model.ts @@ -18,6 +18,9 @@ // * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. * // ****************************************************************** +/** + * @public + */ export interface ValidateEntity400ResponseErrorsInner { [key: string]: any; diff --git a/packages/catalog-client/src/generated/models/ValidateEntityRequest.model.ts b/packages/catalog-client/src/generated/models/ValidateEntityRequest.model.ts index 152f28cf85..c3be04818d 100644 --- a/packages/catalog-client/src/generated/models/ValidateEntityRequest.model.ts +++ b/packages/catalog-client/src/generated/models/ValidateEntityRequest.model.ts @@ -18,6 +18,9 @@ // * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. * // ****************************************************************** +/** + * @public + */ export interface ValidateEntityRequest { location: string; entity: { [key: string]: any }; diff --git a/packages/repo-tools/templates/typescript-backstage-client/api.mustache b/packages/repo-tools/templates/typescript-backstage-client/api.mustache index 8043d6e2f4..df1d97e1ef 100644 --- a/packages/repo-tools/templates/typescript-backstage-client/api.mustache +++ b/packages/repo-tools/templates/typescript-backstage-client/api.mustache @@ -29,6 +29,37 @@ export interface RequestOptions { token?: string; } +{{#operation}} +export type {{nickname}}Request = { + {{#hasPathParams}} + path: { + {{#pathParams}} + {{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, + {{/pathParams}} + }, + {{/hasPathParams}} + {{#hasBodyParam}} + {{#bodyParam}} + body: {{{dataType}}}, + {{/bodyParam}} + {{/hasBodyParam}} + {{#hasQueryParams}} + query: { + {{#queryParams}} + {{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, + {{/queryParams}} + }, + {{/hasQueryParams}} + {{#hasHeaderParams}} + header: { + {{#headerParams}} + {{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, + {{/headerParams}} + }, + {{/hasHeaderParams}} +} +{{/operation}} + /** * {{{description}}}{{^description}}no description{{/description}} */ @@ -58,34 +89,7 @@ export class {{classname}}Client { */ public async {{nickname}}( // @ts-ignore - request: { - {{#hasPathParams}} - path: { - {{#pathParams}} - {{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, - {{/pathParams}} - }, - {{/hasPathParams}} - {{#hasBodyParam}} - {{#bodyParam}} - body: {{{dataType}}}, - {{/bodyParam}} - {{/hasBodyParam}} - {{#hasQueryParams}} - query: { - {{#queryParams}} - {{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, - {{/queryParams}} - }, - {{/hasQueryParams}} - {{#hasHeaderParams}} - header: { - {{#headerParams}} - {{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, - {{/headerParams}} - }, - {{/hasHeaderParams}} - }, + request: {{nickname}}Request, options?: RequestOptions ): Promise> { const baseUrl = await this.discoveryApi.getBaseUrl(pluginId); diff --git a/packages/repo-tools/templates/typescript-backstage-client/modelAlias.mustache b/packages/repo-tools/templates/typescript-backstage-client/modelAlias.mustache index 351dc37c78..8358be805f 100644 --- a/packages/repo-tools/templates/typescript-backstage-client/modelAlias.mustache +++ b/packages/repo-tools/templates/typescript-backstage-client/modelAlias.mustache @@ -1,3 +1,6 @@ {{! Sourced from https://github.com/OpenAPITools/openapi-generator/blob/7347daec61b2cb8d3d28e1ed06fe8b5e682090f8/modules/openapi-generator/src/main/resources/typescript-angular/modelAlias.mustache }} +/** + * @public + */ export type {{classname}} = {{dataType}}; \ No newline at end of file diff --git a/packages/repo-tools/templates/typescript-backstage-client/modelEnum.mustache b/packages/repo-tools/templates/typescript-backstage-client/modelEnum.mustache index 0deab70f02..3a1b5ce86d 100644 --- a/packages/repo-tools/templates/typescript-backstage-client/modelEnum.mustache +++ b/packages/repo-tools/templates/typescript-backstage-client/modelEnum.mustache @@ -1,6 +1,9 @@ {{! Sourced from https://github.com/OpenAPITools/openapi-generator/blob/7347daec61b2cb8d3d28e1ed06fe8b5e682090f8/modules/openapi-generator/src/main/resources/typescript-angular/modelEnum.mustache }} {{#stringEnums}} +/** + * @public + */ export enum {{classname}} { {{#allowableValues}} {{#enumVars}} @@ -10,8 +13,14 @@ export enum {{classname}} { } {{/stringEnums}} {{^stringEnums}} +/** + * @public + */ export type {{classname}} = {{#allowableValues}}{{#enumVars}}{{{value}}}{{^-last}} | {{/-last}}{{/enumVars}}{{/allowableValues}}; +/** + * @public + */ export const {{classname}} = { {{#allowableValues}} {{#enumVars}} diff --git a/packages/repo-tools/templates/typescript-backstage-client/modelGeneric.mustache b/packages/repo-tools/templates/typescript-backstage-client/modelGeneric.mustache index cbd1a57c23..d01ea29260 100644 --- a/packages/repo-tools/templates/typescript-backstage-client/modelGeneric.mustache +++ b/packages/repo-tools/templates/typescript-backstage-client/modelGeneric.mustache @@ -3,11 +3,12 @@ {{#models}} {{#model}} -{{#description}} /** +{{#description}} * {{{.}}} -*/ {{/description}} +* @public +*/ {{^isEnum}} export {{#isNullable}}type{{/isNullable}}{{^isNullable}}interface{{/isNullable}} {{classname}} {{#isNullable}}={{/isNullable}} { {{>modelGenericAdditionalProperties}} @@ -25,6 +26,9 @@ export {{#isNullable}}type{{/isNullable}}{{^isNullable}}interface{{/isNullable}} {{#vars}} {{#isEnum}} +/** + * @public + */ export type {{classname}}{{enumName}} ={{#allowableValues}}{{#values}} "{{.}}" {{^-last}}|{{/-last}}{{/values}}{{/allowableValues}}; {{/isEnum}} {{/vars}} @@ -32,6 +36,9 @@ export type {{classname}}{{enumName}} ={{#allowableValues}}{{#values}} "{{.}}" { {{/hasEnums}} {{/isEnum}} {{#isEnum}} +/** + * @public + */ export type {{classname}} ={{#allowableValues}}{{#values}} "{{.}}" {{^-last}}|{{/-last}}{{/values}}{{/allowableValues}}; {{/isEnum}} {{/model}} diff --git a/packages/repo-tools/templates/typescript-backstage-client/modelGenericEnums.mustache b/packages/repo-tools/templates/typescript-backstage-client/modelGenericEnums.mustache index 8d7b49c9c3..acfcc23959 100644 --- a/packages/repo-tools/templates/typescript-backstage-client/modelGenericEnums.mustache +++ b/packages/repo-tools/templates/typescript-backstage-client/modelGenericEnums.mustache @@ -3,11 +3,17 @@ {{#hasEnums}} {{^stringEnums}} +/** + * @public + */ export namespace {{classname}} { {{/stringEnums}} {{#vars}} {{#isEnum}} {{#stringEnums}} +/** + * @public + */ export enum {{classname}}{{enumName}} { {{#allowableValues}} {{#enumVars}} @@ -17,7 +23,14 @@ export enum {{classname}}{{enumName}} { }; {{/stringEnums}} {{^stringEnums}} + /** + * @public + */ export type {{enumName}} = {{#allowableValues}}{{#enumVars}}{{{value}}}{{^-last}} | {{/-last}}{{/enumVars}}{{/allowableValues}}; + + /** + * @public + */ export const {{enumName}} = { {{#allowableValues}} {{#enumVars}} diff --git a/packages/repo-tools/templates/typescript-backstage-client/modelOneOf.mustache b/packages/repo-tools/templates/typescript-backstage-client/modelOneOf.mustache index b261789c3d..038025b651 100644 --- a/packages/repo-tools/templates/typescript-backstage-client/modelOneOf.mustache +++ b/packages/repo-tools/templates/typescript-backstage-client/modelOneOf.mustache @@ -8,9 +8,10 @@ import { } from './'; {{/hasImports}} -{{#description}} /** +{{#description}} * {{{.}}} - */ {{/description}} + * @public + */ export type {{classname}} = {{#oneOf}}{{{.}}}{{^-last}} | {{/-last}}{{/oneOf}}; diff --git a/plugins/catalog-backend/package.json b/plugins/catalog-backend/package.json index f3b55f929c..7417af424d 100644 --- a/plugins/catalog-backend/package.json +++ b/plugins/catalog-backend/package.json @@ -53,7 +53,7 @@ "clean": "backstage-cli package clean", "diff": "backstage-repo-tools package schema openapi diff", "fuzz": "backstage-repo-tools package schema openapi fuzz --exclude-checks response_schema_conformance", - "generate": "backstage-repo-tools package schema openapi generate --server --client-package packages/catalog-client", + "generate": "backstage-repo-tools package schema openapi generate --server --client-package packages/catalog-client --server-client-import \"@backstage/catalog-client/alpha\"", "lint": "backstage-cli package lint", "prepack": "backstage-cli package prepack", "postpack": "backstage-cli package postpack",