From a028799380be7ede55e80d2d595e786e00879f12 Mon Sep 17 00:00:00 2001 From: aramissennyeydd Date: Tue, 24 Sep 2024 19:45:21 -0400 Subject: [PATCH] move packages to have their own generated code Signed-off-by: aramissennyeydd --- .../typescript-backstage-server.yaml | 20 +++ .../typescript-backstage-server/api.mustache | 45 ++++- .../model.mustache | 11 ++ .../modelAlias.mustache | 6 + .../modelEnum.mustache | 31 ++++ .../modelGeneric.mustache | 45 +++++ .../modelGenericAdditionalProperties.mustache | 5 + .../modelGenericEnums.mustache | 45 +++++ .../modelOneOf.mustache | 17 ++ .../modelTaggedUnion.mustache | 23 +++ .../models/models_all.mustache | 7 + plugins/catalog-backend/package.json | 2 +- .../generated/apis/DefaultApi.server.ts | 163 ++++++++++++++++-- .../AnalyzeLocationEntityField.model.ts | 46 +++++ .../AnalyzeLocationExistingEntity.model.ts | 31 ++++ .../AnalyzeLocationGenerateEntity.model.ts | 30 ++++ .../models/AnalyzeLocationRequest.model.ts | 28 +++ .../models/AnalyzeLocationResponse.model.ts | 29 ++++ .../models/CreateLocation201Response.model.ts | 30 ++++ .../models/CreateLocationRequest.model.ts | 27 +++ .../models/EntitiesBatchResponse.model.ts | 30 ++++ .../models/EntitiesQueryResponse.model.ts | 33 ++++ .../EntitiesQueryResponsePageInfo.model.ts | 33 ++++ .../openapi/generated/models/Entity.model.ts | 45 +++++ .../models/EntityAncestryResponse.model.ts | 28 +++ .../EntityAncestryResponseItemsInner.model.ts | 28 +++ .../generated/models/EntityFacet.model.ts | 27 +++ .../models/EntityFacetsResponse.model.ts | 27 +++ .../generated/models/EntityLink.model.ts | 42 +++++ .../generated/models/EntityMeta.model.ts | 69 ++++++++ .../generated/models/EntityRelation.model.ts | 34 ++++ .../generated/models/ErrorError.model.ts | 29 ++++ .../generated/models/ErrorRequest.model.ts | 27 +++ .../generated/models/ErrorResponse.model.ts | 26 +++ .../models/GetEntitiesByRefsRequest.model.ts | 27 +++ .../GetLocations200ResponseInner.model.ts | 27 +++ .../generated/models/Location.model.ts | 29 ++++ .../generated/models/LocationInput.model.ts | 27 +++ .../generated/models/LocationSpec.model.ts | 28 +++ .../generated/models/ModelError.model.ts | 33 ++++ .../generated/models/NullableEntity.model.ts | 45 +++++ .../models/RecursivePartialEntity.model.ts | 45 +++++ .../RecursivePartialEntityMeta.model.ts | 66 +++++++ .../RecursivePartialEntityMetaAllOf.model.ts | 67 +++++++ .../RecursivePartialEntityRelation.model.ts | 34 ++++ .../models/RefreshEntityRequest.model.ts | 31 ++++ .../models/ValidateEntity400Response.model.ts | 27 +++ ...idateEntity400ResponseErrorsInner.model.ts | 29 ++++ .../models/ValidateEntityRequest.model.ts | 27 +++ .../schema/openapi/generated/models/index.ts | 52 ++++++ .../generated/apis/DefaultApi.client.ts | 18 +- plugins/search-backend/package.json | 6 +- .../generated/apis/DefaultApi.server.ts | 14 +- .../generated/models/ErrorError.model.ts | 27 +++ .../generated/models/ErrorRequest.model.ts | 27 +++ .../generated/models/ErrorResponse.model.ts | 26 +++ .../generated/models/ModelError.model.ts | 31 ++++ .../models/Query200Response.model.ts | 30 ++++ .../Query200ResponseResultsInner.model.ts | 39 +++++ ...ry200ResponseResultsInnerDocument.model.ts | 38 ++++ .../schema/openapi/generated/models/index.ts | 23 +++ 61 files changed, 1945 insertions(+), 47 deletions(-) create mode 100644 packages/repo-tools/templates/typescript-backstage-server/model.mustache create mode 100644 packages/repo-tools/templates/typescript-backstage-server/modelAlias.mustache create mode 100644 packages/repo-tools/templates/typescript-backstage-server/modelEnum.mustache create mode 100644 packages/repo-tools/templates/typescript-backstage-server/modelGeneric.mustache create mode 100644 packages/repo-tools/templates/typescript-backstage-server/modelGenericAdditionalProperties.mustache create mode 100644 packages/repo-tools/templates/typescript-backstage-server/modelGenericEnums.mustache create mode 100644 packages/repo-tools/templates/typescript-backstage-server/modelOneOf.mustache create mode 100644 packages/repo-tools/templates/typescript-backstage-server/modelTaggedUnion.mustache create mode 100644 packages/repo-tools/templates/typescript-backstage-server/models/models_all.mustache create mode 100644 plugins/catalog-backend/src/schema/openapi/generated/models/AnalyzeLocationEntityField.model.ts create mode 100644 plugins/catalog-backend/src/schema/openapi/generated/models/AnalyzeLocationExistingEntity.model.ts create mode 100644 plugins/catalog-backend/src/schema/openapi/generated/models/AnalyzeLocationGenerateEntity.model.ts create mode 100644 plugins/catalog-backend/src/schema/openapi/generated/models/AnalyzeLocationRequest.model.ts create mode 100644 plugins/catalog-backend/src/schema/openapi/generated/models/AnalyzeLocationResponse.model.ts create mode 100644 plugins/catalog-backend/src/schema/openapi/generated/models/CreateLocation201Response.model.ts create mode 100644 plugins/catalog-backend/src/schema/openapi/generated/models/CreateLocationRequest.model.ts create mode 100644 plugins/catalog-backend/src/schema/openapi/generated/models/EntitiesBatchResponse.model.ts create mode 100644 plugins/catalog-backend/src/schema/openapi/generated/models/EntitiesQueryResponse.model.ts create mode 100644 plugins/catalog-backend/src/schema/openapi/generated/models/EntitiesQueryResponsePageInfo.model.ts create mode 100644 plugins/catalog-backend/src/schema/openapi/generated/models/Entity.model.ts create mode 100644 plugins/catalog-backend/src/schema/openapi/generated/models/EntityAncestryResponse.model.ts create mode 100644 plugins/catalog-backend/src/schema/openapi/generated/models/EntityAncestryResponseItemsInner.model.ts create mode 100644 plugins/catalog-backend/src/schema/openapi/generated/models/EntityFacet.model.ts create mode 100644 plugins/catalog-backend/src/schema/openapi/generated/models/EntityFacetsResponse.model.ts create mode 100644 plugins/catalog-backend/src/schema/openapi/generated/models/EntityLink.model.ts create mode 100644 plugins/catalog-backend/src/schema/openapi/generated/models/EntityMeta.model.ts create mode 100644 plugins/catalog-backend/src/schema/openapi/generated/models/EntityRelation.model.ts create mode 100644 plugins/catalog-backend/src/schema/openapi/generated/models/ErrorError.model.ts create mode 100644 plugins/catalog-backend/src/schema/openapi/generated/models/ErrorRequest.model.ts create mode 100644 plugins/catalog-backend/src/schema/openapi/generated/models/ErrorResponse.model.ts create mode 100644 plugins/catalog-backend/src/schema/openapi/generated/models/GetEntitiesByRefsRequest.model.ts create mode 100644 plugins/catalog-backend/src/schema/openapi/generated/models/GetLocations200ResponseInner.model.ts create mode 100644 plugins/catalog-backend/src/schema/openapi/generated/models/Location.model.ts create mode 100644 plugins/catalog-backend/src/schema/openapi/generated/models/LocationInput.model.ts create mode 100644 plugins/catalog-backend/src/schema/openapi/generated/models/LocationSpec.model.ts create mode 100644 plugins/catalog-backend/src/schema/openapi/generated/models/ModelError.model.ts create mode 100644 plugins/catalog-backend/src/schema/openapi/generated/models/NullableEntity.model.ts create mode 100644 plugins/catalog-backend/src/schema/openapi/generated/models/RecursivePartialEntity.model.ts create mode 100644 plugins/catalog-backend/src/schema/openapi/generated/models/RecursivePartialEntityMeta.model.ts create mode 100644 plugins/catalog-backend/src/schema/openapi/generated/models/RecursivePartialEntityMetaAllOf.model.ts create mode 100644 plugins/catalog-backend/src/schema/openapi/generated/models/RecursivePartialEntityRelation.model.ts create mode 100644 plugins/catalog-backend/src/schema/openapi/generated/models/RefreshEntityRequest.model.ts create mode 100644 plugins/catalog-backend/src/schema/openapi/generated/models/ValidateEntity400Response.model.ts create mode 100644 plugins/catalog-backend/src/schema/openapi/generated/models/ValidateEntity400ResponseErrorsInner.model.ts create mode 100644 plugins/catalog-backend/src/schema/openapi/generated/models/ValidateEntityRequest.model.ts create mode 100644 plugins/catalog-backend/src/schema/openapi/generated/models/index.ts create mode 100644 plugins/search-backend/src/schema/openapi/generated/models/ErrorError.model.ts create mode 100644 plugins/search-backend/src/schema/openapi/generated/models/ErrorRequest.model.ts create mode 100644 plugins/search-backend/src/schema/openapi/generated/models/ErrorResponse.model.ts create mode 100644 plugins/search-backend/src/schema/openapi/generated/models/ModelError.model.ts create mode 100644 plugins/search-backend/src/schema/openapi/generated/models/Query200Response.model.ts create mode 100644 plugins/search-backend/src/schema/openapi/generated/models/Query200ResponseResultsInner.model.ts create mode 100644 plugins/search-backend/src/schema/openapi/generated/models/Query200ResponseResultsInnerDocument.model.ts create mode 100644 plugins/search-backend/src/schema/openapi/generated/models/index.ts diff --git a/packages/repo-tools/templates/typescript-backstage-server.yaml b/packages/repo-tools/templates/typescript-backstage-server.yaml index ff663a06ea..e9140d0bc6 100644 --- a/packages/repo-tools/templates/typescript-backstage-server.yaml +++ b/packages/repo-tools/templates/typescript-backstage-server.yaml @@ -11,3 +11,23 @@ files: index.mustache: templateType: SupportingFiles destinationFilename: index.ts + model.mustache: + templateType: Model + destinationFilename: .model.ts + modelGeneric.mustache: + templateType: SupportingFiles + modelOneOf.mustache: + templateType: SupportingFiles + modelGenericAdditionalProperties.mustache: + templateType: SupportingFiles + modelGenericEnums.mustache: + templateType: SupportingFiles + modelAlias.mustache: + templateType: SupportingFiles + modelEnum.mustache: + templateType: SupportingFiles + modelTaggedUnion.mustache: + templateType: SupportingFiles + models/models_all.mustache: + templateType: SupportingFiles + destinationFilename: models/index.ts \ No newline at end of file diff --git a/packages/repo-tools/templates/typescript-backstage-server/api.mustache b/packages/repo-tools/templates/typescript-backstage-server/api.mustache index d41ca85c19..9aa2da8293 100644 --- a/packages/repo-tools/templates/typescript-backstage-server/api.mustache +++ b/packages/repo-tools/templates/typescript-backstage-server/api.mustache @@ -1,15 +1,44 @@ {{>licenseInfo}} -import type { - {{#operations}} - {{#operation}} - {{#lambda.pascalcase}}{{nickname}}{{/lambda.pascalcase}}, - {{/operation}} - {{/operations}} -} from '{{clientImport}}'; - +{{#imports}} +import { {{classname}} } from '{{filename}}.model{{importFileExtension}}'; +{{/imports}} {{#operations}} +{{#operation}} +/** + * @public + */ +export type {{#lambda.pascalcase}}{{nickname}}{{/lambda.pascalcase}} = { + {{#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}} */ diff --git a/packages/repo-tools/templates/typescript-backstage-server/model.mustache b/packages/repo-tools/templates/typescript-backstage-server/model.mustache new file mode 100644 index 0000000000..565eecb4e8 --- /dev/null +++ b/packages/repo-tools/templates/typescript-backstage-server/model.mustache @@ -0,0 +1,11 @@ +{{! Sourced from https://github.com/OpenAPITools/openapi-generator/blob/7347daec61b2cb8d3d28e1ed06fe8b5e682090f8/modules/openapi-generator/src/main/resources/typescript-angular/model.mustache#L17. }} +{{>licenseInfo}} +{{#models}} +{{#model}} +{{#tsImports}} +import { {{classname}} } from '{{filename}}.model'; +{{/tsImports}} + +{{#isEnum}}{{>modelEnum}}{{/isEnum}}{{^isEnum}}{{#isAlias}}{{>modelAlias}}{{/isAlias}}{{^isAlias}}{{#taggedUnions}}{{>modelTaggedUnion}}{{/taggedUnions}}{{^taggedUnions}}{{#oneOf}}{{#-first}}{{>modelOneOf}}{{/-first}}{{/oneOf}}{{^oneOf}}{{>modelGeneric}}{{/oneOf}}{{/taggedUnions}}{{/isAlias}}{{/isEnum}} +{{/model}} +{{/models}} diff --git a/packages/repo-tools/templates/typescript-backstage-server/modelAlias.mustache b/packages/repo-tools/templates/typescript-backstage-server/modelAlias.mustache new file mode 100644 index 0000000000..8358be805f --- /dev/null +++ b/packages/repo-tools/templates/typescript-backstage-server/modelAlias.mustache @@ -0,0 +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-server/modelEnum.mustache b/packages/repo-tools/templates/typescript-backstage-server/modelEnum.mustache new file mode 100644 index 0000000000..3a1b5ce86d --- /dev/null +++ b/packages/repo-tools/templates/typescript-backstage-server/modelEnum.mustache @@ -0,0 +1,31 @@ +{{! 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}} + {{name}} = {{{value}}}{{^-last}},{{/-last}} +{{/enumVars}} +{{/allowableValues}} +} +{{/stringEnums}} +{{^stringEnums}} +/** + * @public + */ +export type {{classname}} = {{#allowableValues}}{{#enumVars}}{{{value}}}{{^-last}} | {{/-last}}{{/enumVars}}{{/allowableValues}}; + +/** + * @public + */ +export const {{classname}} = { +{{#allowableValues}} +{{#enumVars}} + {{name}}: {{{value}}} as {{classname}}{{^-last}},{{/-last}} +{{/enumVars}} +{{/allowableValues}} +}; +{{/stringEnums}} diff --git a/packages/repo-tools/templates/typescript-backstage-server/modelGeneric.mustache b/packages/repo-tools/templates/typescript-backstage-server/modelGeneric.mustache new file mode 100644 index 0000000000..d01ea29260 --- /dev/null +++ b/packages/repo-tools/templates/typescript-backstage-server/modelGeneric.mustache @@ -0,0 +1,45 @@ +{{! Sourced from https://github.com/OpenAPITools/openapi-generator/blob/7347daec61b2cb8d3d28e1ed06fe8b5e682090f8/modules/openapi-generator/src/main/resources/typescript-angular/modelGeneric.mustache }} + +{{#models}} +{{#model}} + +/** +{{#description}} +* {{{.}}} +{{/description}} +* @public +*/ +{{^isEnum}} +export {{#isNullable}}type{{/isNullable}}{{^isNullable}}interface{{/isNullable}} {{classname}} {{#isNullable}}={{/isNullable}} { +{{>modelGenericAdditionalProperties}} +{{#vars}} +{{#description}} + /** + * {{{.}}} + */ +{{/description}} + '{{name}}'{{^required}}?{{/required}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{#isNullable}} | null{{/isNullable}}; +{{/vars}} +}{{#isNullable}} | null{{/isNullable}} + +{{#hasEnums}} + +{{#vars}} +{{#isEnum}} +/** + * @public + */ +export type {{classname}}{{enumName}} ={{#allowableValues}}{{#values}} "{{.}}" {{^-last}}|{{/-last}}{{/values}}{{/allowableValues}}; +{{/isEnum}} +{{/vars}} + +{{/hasEnums}} +{{/isEnum}} +{{#isEnum}} +/** + * @public + */ +export type {{classname}} ={{#allowableValues}}{{#values}} "{{.}}" {{^-last}}|{{/-last}}{{/values}}{{/allowableValues}}; +{{/isEnum}} +{{/model}} +{{/models}} \ No newline at end of file diff --git a/packages/repo-tools/templates/typescript-backstage-server/modelGenericAdditionalProperties.mustache b/packages/repo-tools/templates/typescript-backstage-server/modelGenericAdditionalProperties.mustache new file mode 100644 index 0000000000..e1e94cea80 --- /dev/null +++ b/packages/repo-tools/templates/typescript-backstage-server/modelGenericAdditionalProperties.mustache @@ -0,0 +1,5 @@ +{{! Sourced from https://github.com/OpenAPITools/openapi-generator/blob/7347daec61b2cb8d3d28e1ed06fe8b5e682090f8/modules/openapi-generator/src/main/resources/typescript-angular/modelGenericAdditionalProperties.mustache }} + +{{#additionalPropertiesType}} + [key: string]: {{{additionalPropertiesType}}}; +{{/additionalPropertiesType}} \ No newline at end of file diff --git a/packages/repo-tools/templates/typescript-backstage-server/modelGenericEnums.mustache b/packages/repo-tools/templates/typescript-backstage-server/modelGenericEnums.mustache new file mode 100644 index 0000000000..acfcc23959 --- /dev/null +++ b/packages/repo-tools/templates/typescript-backstage-server/modelGenericEnums.mustache @@ -0,0 +1,45 @@ +{{! Sourced from https://github.com/OpenAPITools/openapi-generator/blob/7347daec61b2cb8d3d28e1ed06fe8b5e682090f8/modules/openapi-generator/src/main/resources/typescript-angular/modelGenericEnums.mustache }} + +{{#hasEnums}} + +{{^stringEnums}} +/** + * @public + */ +export namespace {{classname}} { +{{/stringEnums}} +{{#vars}} + {{#isEnum}} +{{#stringEnums}} +/** + * @public + */ +export enum {{classname}}{{enumName}} { +{{#allowableValues}} +{{#enumVars}} + {{name}} = {{{value}}}{{^-last}},{{/-last}} +{{/enumVars}} +{{/allowableValues}} +}; +{{/stringEnums}} +{{^stringEnums}} + /** + * @public + */ + export type {{enumName}} = {{#allowableValues}}{{#enumVars}}{{{value}}}{{^-last}} | {{/-last}}{{/enumVars}}{{/allowableValues}}; + + /** + * @public + */ + export const {{enumName}} = { + {{#allowableValues}} + {{#enumVars}} + {{name}}: {{{value}}} as {{enumName}}{{^-last}},{{/-last}} + {{/enumVars}} + {{/allowableValues}} + }; +{{/stringEnums}} + {{/isEnum}} +{{/vars}} +{{^stringEnums}}}{{/stringEnums}} +{{/hasEnums}} \ No newline at end of file diff --git a/packages/repo-tools/templates/typescript-backstage-server/modelOneOf.mustache b/packages/repo-tools/templates/typescript-backstage-server/modelOneOf.mustache new file mode 100644 index 0000000000..038025b651 --- /dev/null +++ b/packages/repo-tools/templates/typescript-backstage-server/modelOneOf.mustache @@ -0,0 +1,17 @@ +{{! Sourced from https://github.com/OpenAPITools/openapi-generator/blob/7347daec61b2cb8d3d28e1ed06fe8b5e682090f8/modules/openapi-generator/src/main/resources/typescript-angular/modelOneOf.mustache }} + +{{#hasImports}} +import { + {{#imports}} + {{{.}}}, + {{/imports}} +} from './'; + +{{/hasImports}} + /** +{{#description}} + * {{{.}}} +{{/description}} + * @public + */ +export type {{classname}} = {{#oneOf}}{{{.}}}{{^-last}} | {{/-last}}{{/oneOf}}; diff --git a/packages/repo-tools/templates/typescript-backstage-server/modelTaggedUnion.mustache b/packages/repo-tools/templates/typescript-backstage-server/modelTaggedUnion.mustache new file mode 100644 index 0000000000..a3f5e00904 --- /dev/null +++ b/packages/repo-tools/templates/typescript-backstage-server/modelTaggedUnion.mustache @@ -0,0 +1,23 @@ +{{! Sourced from https://github.com/OpenAPITools/openapi-generator/blob/7347daec61b2cb8d3d28e1ed06fe8b5e682090f8/modules/openapi-generator/src/main/resources/typescript-angular/modelTaggedUnion.mustache }} + +{{#discriminator}} +export type {{classname}} = {{#children}}{{^-first}} | {{/-first}}{{classname}}{{/children}}; +{{/discriminator}} +{{^discriminator}} +{{#parent}} +export interface {{classname}} { {{>modelGenericAdditionalProperties}} +{{#allVars}} + {{#description}} + /** + * {{{.}}} + */ + {{/description}} + {{name}}{{^required}}?{{/required}}: {{#discriminatorValue}}'{{.}}'{{/discriminatorValue}}{{^discriminatorValue}}{{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{/discriminatorValue}}{{#isNullable}} | null{{/isNullable}}; +{{/allVars}} +} +{{>modelGenericEnums}} +{{/parent}} +{{^parent}} +{{>modelGeneric}} +{{/parent}} +{{/discriminator}} \ No newline at end of file diff --git a/packages/repo-tools/templates/typescript-backstage-server/models/models_all.mustache b/packages/repo-tools/templates/typescript-backstage-server/models/models_all.mustache new file mode 100644 index 0000000000..d076cfb3ff --- /dev/null +++ b/packages/repo-tools/templates/typescript-backstage-server/models/models_all.mustache @@ -0,0 +1,7 @@ +// + +{{#models}} +{{#model}} +export * from '{{{ importPath }}}.model{{importFileExtension}}' +{{/model}} +{{/models}} \ No newline at end of file diff --git a/plugins/catalog-backend/package.json b/plugins/catalog-backend/package.json index a600ebfe95..8ef809923d 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 plugins/catalog-common --server-client-import \"@backstage/plugin-catalog-common/client\"", + "generate": "backstage-repo-tools package schema openapi generate --server --client-package plugins/catalog-common", "lint": "backstage-cli package lint", "prepack": "backstage-cli package prepack", "postpack": "backstage-cli package postpack", diff --git a/plugins/catalog-backend/src/schema/openapi/generated/apis/DefaultApi.server.ts b/plugins/catalog-backend/src/schema/openapi/generated/apis/DefaultApi.server.ts index c390e14dbf..24a1a1778c 100644 --- a/plugins/catalog-backend/src/schema/openapi/generated/apis/DefaultApi.server.ts +++ b/plugins/catalog-backend/src/schema/openapi/generated/apis/DefaultApi.server.ts @@ -17,24 +17,151 @@ // ****************************************************************** // * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. * // ****************************************************************** -import type { - AnalyzeLocation, - CreateLocation, - DeleteEntityByUid, - DeleteLocation, - GetEntities, - GetEntitiesByQuery, - GetEntitiesByRefs, - GetEntityAncestryByName, - GetEntityByName, - GetEntityByUid, - GetEntityFacets, - GetLocation, - GetLocationByEntity, - GetLocations, - RefreshEntity, - ValidateEntity, -} from '@backstage/plugin-catalog-common/client'; +import { AnalyzeLocationRequest } from '../models/AnalyzeLocationRequest.model'; +import { CreateLocationRequest } from '../models/CreateLocationRequest.model'; +import { GetEntitiesByRefsRequest } from '../models/GetEntitiesByRefsRequest.model'; +import { RefreshEntityRequest } from '../models/RefreshEntityRequest.model'; +import { ValidateEntityRequest } from '../models/ValidateEntityRequest.model'; + +/** + * @public + */ +export type AnalyzeLocation = { + body: AnalyzeLocationRequest; +}; +/** + * @public + */ +export type CreateLocation = { + body: CreateLocationRequest; + query: { + dryRun?: string; + }; +}; +/** + * @public + */ +export type DeleteEntityByUid = { + path: { + uid: string; + }; +}; +/** + * @public + */ +export type DeleteLocation = { + path: { + id: string; + }; +}; +/** + * @public + */ +export type GetEntities = { + query: { + fields?: Array; + limit?: number; + filter?: Array; + offset?: number; + after?: string; + order?: Array; + }; +}; +/** + * @public + */ +export type GetEntitiesByQuery = { + query: { + fields?: Array; + limit?: number; + offset?: number; + orderField?: Array; + cursor?: string; + filter?: Array; + fullTextFilterTerm?: string; + fullTextFilterFields?: Array; + }; +}; +/** + * @public + */ +export type GetEntitiesByRefs = { + body: GetEntitiesByRefsRequest; + query: { + filter?: Array; + }; +}; +/** + * @public + */ +export type GetEntityAncestryByName = { + path: { + kind: string; + namespace: string; + name: string; + }; +}; +/** + * @public + */ +export type GetEntityByName = { + path: { + kind: string; + namespace: string; + name: string; + }; +}; +/** + * @public + */ +export type GetEntityByUid = { + path: { + uid: string; + }; +}; +/** + * @public + */ +export type GetEntityFacets = { + query: { + facet: Array; + filter?: Array; + }; +}; +/** + * @public + */ +export type GetLocation = { + path: { + id: string; + }; +}; +/** + * @public + */ +export type GetLocationByEntity = { + path: { + kind: string; + namespace: string; + name: string; + }; +}; +/** + * @public + */ +export type GetLocations = {}; +/** + * @public + */ +export type RefreshEntity = { + body: RefreshEntityRequest; +}; +/** + * @public + */ +export type ValidateEntity = { + body: ValidateEntityRequest; +}; /** * no description diff --git a/plugins/catalog-backend/src/schema/openapi/generated/models/AnalyzeLocationEntityField.model.ts b/plugins/catalog-backend/src/schema/openapi/generated/models/AnalyzeLocationEntityField.model.ts new file mode 100644 index 0000000000..ad2b5aecd1 --- /dev/null +++ b/plugins/catalog-backend/src/schema/openapi/generated/models/AnalyzeLocationEntityField.model.ts @@ -0,0 +1,46 @@ +/* + * 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. + */ + +// ****************************************************************** +// * 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. + */ + description: string; + value: string | null; + /** + * The outcome of the analysis for this particular field + */ + state: AnalyzeLocationEntityFieldStateEnum; + /** + * e.g. \"spec.owner\"? The frontend needs to know how to \"inject\" the field into the entity again if the user wants to change it + */ + field: string; +} + +/** + * @public + */ +export type AnalyzeLocationEntityFieldStateEnum = + | 'analysisSuggestedValue' + | 'analysisSuggestedNoValue' + | 'needsUserInput'; diff --git a/plugins/catalog-backend/src/schema/openapi/generated/models/AnalyzeLocationExistingEntity.model.ts b/plugins/catalog-backend/src/schema/openapi/generated/models/AnalyzeLocationExistingEntity.model.ts new file mode 100644 index 0000000000..fb01ae8e8e --- /dev/null +++ b/plugins/catalog-backend/src/schema/openapi/generated/models/AnalyzeLocationExistingEntity.model.ts @@ -0,0 +1,31 @@ +/* + * 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. + */ + +// ****************************************************************** +// * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. * +// ****************************************************************** +import { Entity } from '../models/Entity.model'; +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; + isRegistered: boolean; + location: LocationSpec; +} diff --git a/plugins/catalog-backend/src/schema/openapi/generated/models/AnalyzeLocationGenerateEntity.model.ts b/plugins/catalog-backend/src/schema/openapi/generated/models/AnalyzeLocationGenerateEntity.model.ts new file mode 100644 index 0000000000..e760d9cf94 --- /dev/null +++ b/plugins/catalog-backend/src/schema/openapi/generated/models/AnalyzeLocationGenerateEntity.model.ts @@ -0,0 +1,30 @@ +/* + * 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. + */ + +// ****************************************************************** +// * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. * +// ****************************************************************** +import { AnalyzeLocationEntityField } from '../models/AnalyzeLocationEntityField.model'; +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; + entity: RecursivePartialEntity; +} diff --git a/plugins/catalog-backend/src/schema/openapi/generated/models/AnalyzeLocationRequest.model.ts b/plugins/catalog-backend/src/schema/openapi/generated/models/AnalyzeLocationRequest.model.ts new file mode 100644 index 0000000000..c1085a2a7b --- /dev/null +++ b/plugins/catalog-backend/src/schema/openapi/generated/models/AnalyzeLocationRequest.model.ts @@ -0,0 +1,28 @@ +/* + * 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. + */ + +// ****************************************************************** +// * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. * +// ****************************************************************** +import { LocationInput } from '../models/LocationInput.model'; + +/** + * @public + */ +export interface AnalyzeLocationRequest { + catalogFileName?: string; + location: LocationInput; +} diff --git a/plugins/catalog-backend/src/schema/openapi/generated/models/AnalyzeLocationResponse.model.ts b/plugins/catalog-backend/src/schema/openapi/generated/models/AnalyzeLocationResponse.model.ts new file mode 100644 index 0000000000..66fc46bc0f --- /dev/null +++ b/plugins/catalog-backend/src/schema/openapi/generated/models/AnalyzeLocationResponse.model.ts @@ -0,0 +1,29 @@ +/* + * 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. + */ + +// ****************************************************************** +// * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. * +// ****************************************************************** +import { AnalyzeLocationExistingEntity } from '../models/AnalyzeLocationExistingEntity.model'; +import { AnalyzeLocationGenerateEntity } from '../models/AnalyzeLocationGenerateEntity.model'; + +/** + * @public + */ +export interface AnalyzeLocationResponse { + generateEntities: Array; + existingEntityFiles: Array; +} diff --git a/plugins/catalog-backend/src/schema/openapi/generated/models/CreateLocation201Response.model.ts b/plugins/catalog-backend/src/schema/openapi/generated/models/CreateLocation201Response.model.ts new file mode 100644 index 0000000000..27e557639a --- /dev/null +++ b/plugins/catalog-backend/src/schema/openapi/generated/models/CreateLocation201Response.model.ts @@ -0,0 +1,30 @@ +/* + * 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. + */ + +// ****************************************************************** +// * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. * +// ****************************************************************** +import { Entity } from '../models/Entity.model'; +import { Location } from '../models/Location.model'; + +/** + * @public + */ +export interface CreateLocation201Response { + exists?: boolean; + entities: Array; + location: Location; +} diff --git a/plugins/catalog-backend/src/schema/openapi/generated/models/CreateLocationRequest.model.ts b/plugins/catalog-backend/src/schema/openapi/generated/models/CreateLocationRequest.model.ts new file mode 100644 index 0000000000..5351ac289b --- /dev/null +++ b/plugins/catalog-backend/src/schema/openapi/generated/models/CreateLocationRequest.model.ts @@ -0,0 +1,27 @@ +/* + * 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. + */ + +// ****************************************************************** +// * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. * +// ****************************************************************** + +/** + * @public + */ +export interface CreateLocationRequest { + target: string; + type: string; +} diff --git a/plugins/catalog-backend/src/schema/openapi/generated/models/EntitiesBatchResponse.model.ts b/plugins/catalog-backend/src/schema/openapi/generated/models/EntitiesBatchResponse.model.ts new file mode 100644 index 0000000000..1a962367d1 --- /dev/null +++ b/plugins/catalog-backend/src/schema/openapi/generated/models/EntitiesBatchResponse.model.ts @@ -0,0 +1,30 @@ +/* + * 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. + */ + +// ****************************************************************** +// * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. * +// ****************************************************************** +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. + */ + items: Array; +} diff --git a/plugins/catalog-backend/src/schema/openapi/generated/models/EntitiesQueryResponse.model.ts b/plugins/catalog-backend/src/schema/openapi/generated/models/EntitiesQueryResponse.model.ts new file mode 100644 index 0000000000..11c42a6aee --- /dev/null +++ b/plugins/catalog-backend/src/schema/openapi/generated/models/EntitiesQueryResponse.model.ts @@ -0,0 +1,33 @@ +/* + * 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. + */ + +// ****************************************************************** +// * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. * +// ****************************************************************** +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. + */ + items: Array; + totalItems: number; + pageInfo: EntitiesQueryResponsePageInfo; +} diff --git a/plugins/catalog-backend/src/schema/openapi/generated/models/EntitiesQueryResponsePageInfo.model.ts b/plugins/catalog-backend/src/schema/openapi/generated/models/EntitiesQueryResponsePageInfo.model.ts new file mode 100644 index 0000000000..07b4137c77 --- /dev/null +++ b/plugins/catalog-backend/src/schema/openapi/generated/models/EntitiesQueryResponsePageInfo.model.ts @@ -0,0 +1,33 @@ +/* + * 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. + */ + +// ****************************************************************** +// * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. * +// ****************************************************************** + +/** + * @public + */ +export interface EntitiesQueryResponsePageInfo { + /** + * The cursor for the next batch of entities. + */ + nextCursor?: string; + /** + * The cursor for the previous batch of entities. + */ + prevCursor?: string; +} diff --git a/plugins/catalog-backend/src/schema/openapi/generated/models/Entity.model.ts b/plugins/catalog-backend/src/schema/openapi/generated/models/Entity.model.ts new file mode 100644 index 0000000000..f386f3dd17 --- /dev/null +++ b/plugins/catalog-backend/src/schema/openapi/generated/models/Entity.model.ts @@ -0,0 +1,45 @@ +/* + * 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. + */ + +// ****************************************************************** +// * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. * +// ****************************************************************** +import { EntityMeta } from '../models/EntityMeta.model'; +import { EntityRelation } from '../models/EntityRelation.model'; + +/** + * The parts of the format that's common to all versions/kinds of entity. + * @public + */ +export interface Entity { + /** + * The relations that this entity has with other entities. + */ + relations?: Array; + /** + * A type representing all allowed JSON object values. + */ + spec?: { [key: string]: any }; + metadata: EntityMeta; + /** + * The high level entity type being described. + */ + kind: string; + /** + * The version of specification format for this particular entity that this is written against. + */ + apiVersion: string; +} diff --git a/plugins/catalog-backend/src/schema/openapi/generated/models/EntityAncestryResponse.model.ts b/plugins/catalog-backend/src/schema/openapi/generated/models/EntityAncestryResponse.model.ts new file mode 100644 index 0000000000..a94f784f05 --- /dev/null +++ b/plugins/catalog-backend/src/schema/openapi/generated/models/EntityAncestryResponse.model.ts @@ -0,0 +1,28 @@ +/* + * 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. + */ + +// ****************************************************************** +// * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. * +// ****************************************************************** +import { EntityAncestryResponseItemsInner } from '../models/EntityAncestryResponseItemsInner.model'; + +/** + * @public + */ +export interface EntityAncestryResponse { + items: Array; + rootEntityRef: string; +} diff --git a/plugins/catalog-backend/src/schema/openapi/generated/models/EntityAncestryResponseItemsInner.model.ts b/plugins/catalog-backend/src/schema/openapi/generated/models/EntityAncestryResponseItemsInner.model.ts new file mode 100644 index 0000000000..40594a1515 --- /dev/null +++ b/plugins/catalog-backend/src/schema/openapi/generated/models/EntityAncestryResponseItemsInner.model.ts @@ -0,0 +1,28 @@ +/* + * 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. + */ + +// ****************************************************************** +// * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. * +// ****************************************************************** +import { Entity } from '../models/Entity.model'; + +/** + * @public + */ +export interface EntityAncestryResponseItemsInner { + parentEntityRefs: Array; + entity: Entity; +} diff --git a/plugins/catalog-backend/src/schema/openapi/generated/models/EntityFacet.model.ts b/plugins/catalog-backend/src/schema/openapi/generated/models/EntityFacet.model.ts new file mode 100644 index 0000000000..f0f89f6eae --- /dev/null +++ b/plugins/catalog-backend/src/schema/openapi/generated/models/EntityFacet.model.ts @@ -0,0 +1,27 @@ +/* + * 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. + */ + +// ****************************************************************** +// * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. * +// ****************************************************************** + +/** + * @public + */ +export interface EntityFacet { + value: string; + count: number; +} diff --git a/plugins/catalog-backend/src/schema/openapi/generated/models/EntityFacetsResponse.model.ts b/plugins/catalog-backend/src/schema/openapi/generated/models/EntityFacetsResponse.model.ts new file mode 100644 index 0000000000..e013f0b5a8 --- /dev/null +++ b/plugins/catalog-backend/src/schema/openapi/generated/models/EntityFacetsResponse.model.ts @@ -0,0 +1,27 @@ +/* + * 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. + */ + +// ****************************************************************** +// * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. * +// ****************************************************************** +import { EntityFacet } from '../models/EntityFacet.model'; + +/** + * @public + */ +export interface EntityFacetsResponse { + facets: { [key: string]: Array }; +} diff --git a/plugins/catalog-backend/src/schema/openapi/generated/models/EntityLink.model.ts b/plugins/catalog-backend/src/schema/openapi/generated/models/EntityLink.model.ts new file mode 100644 index 0000000000..53d7d1f9ff --- /dev/null +++ b/plugins/catalog-backend/src/schema/openapi/generated/models/EntityLink.model.ts @@ -0,0 +1,42 @@ +/* + * 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. + */ + +// ****************************************************************** +// * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. * +// ****************************************************************** + +/** + * A link to external information that is related to the entity. + * @public + */ +export interface EntityLink { + /** + * An optional value to categorize links into specific groups + */ + type?: string; + /** + * An optional semantic key that represents a visual icon. + */ + icon?: string; + /** + * An optional descriptive title for the link. + */ + title?: string; + /** + * The url to the external site, document, etc. + */ + url: string; +} diff --git a/plugins/catalog-backend/src/schema/openapi/generated/models/EntityMeta.model.ts b/plugins/catalog-backend/src/schema/openapi/generated/models/EntityMeta.model.ts new file mode 100644 index 0000000000..cc8dd555a6 --- /dev/null +++ b/plugins/catalog-backend/src/schema/openapi/generated/models/EntityMeta.model.ts @@ -0,0 +1,69 @@ +/* + * 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. + */ + +// ****************************************************************** +// * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. * +// ****************************************************************** +import { EntityLink } from '../models/EntityLink.model'; + +/** + * Metadata fields common to all versions/kinds of entity. + * @public + */ +export interface EntityMeta { + [key: string]: any; + + /** + * A list of external hyperlinks related to the entity. + */ + links?: Array; + /** + * A list of single-valued strings, to for example classify catalog entities in various ways. + */ + tags?: Array; + /** + * Construct a type with a set of properties K of type T + */ + annotations?: { [key: string]: string }; + /** + * Construct a type with a set of properties K of type T + */ + labels?: { [key: string]: string }; + /** + * A short (typically relatively few words, on one line) description of the entity. + */ + description?: string; + /** + * A display name of the entity, to be presented in user interfaces instead of the `name` property above, when available. This field is sometimes useful when the `name` is cumbersome or ends up being perceived as overly technical. The title generally does not have as stringent format requirements on it, so it may contain special characters and be more explanatory. Do keep it very short though, and avoid situations where a title can be confused with the name of another entity, or where two entities share a title. Note that this is only for display purposes, and may be ignored by some parts of the code. Entity references still always make use of the `name` property, not the title. + */ + title?: string; + /** + * The namespace that the entity belongs to. + */ + namespace?: string; + /** + * The name of the entity. Must be unique within the catalog at any given point in time, for any given namespace + kind pair. This value is part of the technical identifier of the entity, and as such it will appear in URLs, database tables, entity references, and similar. It is subject to restrictions regarding what characters are allowed. If you want to use a different, more human readable string with fewer restrictions on it in user interfaces, see the `title` field below. + */ + name: string; + /** + * An opaque string that changes for each update operation to any part of the entity, including metadata. This field can not be set by the user at creation time, and the server will reject an attempt to do so. The field will be populated in read operations. The field can (optionally) be specified when performing update or delete operations, and the server will then reject the operation if it does not match the current stored value. + */ + etag?: string; + /** + * A globally unique ID for the entity. This field can not be set by the user at creation time, and the server will reject an attempt to do so. The field will be populated in read operations. The field can (optionally) be specified when performing update or delete operations, but the server is free to reject requests that do so in such a way that it breaks semantics. + */ + uid?: string; +} diff --git a/plugins/catalog-backend/src/schema/openapi/generated/models/EntityRelation.model.ts b/plugins/catalog-backend/src/schema/openapi/generated/models/EntityRelation.model.ts new file mode 100644 index 0000000000..fe98a84481 --- /dev/null +++ b/plugins/catalog-backend/src/schema/openapi/generated/models/EntityRelation.model.ts @@ -0,0 +1,34 @@ +/* + * 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. + */ + +// ****************************************************************** +// * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. * +// ****************************************************************** + +/** + * A relation of a specific type to another entity in the catalog. + * @public + */ +export interface EntityRelation { + /** + * The entity ref of the target of this relation. + */ + targetRef: string; + /** + * The type of the relation. + */ + type: string; +} diff --git a/plugins/catalog-backend/src/schema/openapi/generated/models/ErrorError.model.ts b/plugins/catalog-backend/src/schema/openapi/generated/models/ErrorError.model.ts new file mode 100644 index 0000000000..fe5811628d --- /dev/null +++ b/plugins/catalog-backend/src/schema/openapi/generated/models/ErrorError.model.ts @@ -0,0 +1,29 @@ +/* + * 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. + */ + +// ****************************************************************** +// * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. * +// ****************************************************************** + +/** + * @public + */ +export interface ErrorError { + name: string; + message: string; + stack?: string; + code?: string; +} diff --git a/plugins/catalog-backend/src/schema/openapi/generated/models/ErrorRequest.model.ts b/plugins/catalog-backend/src/schema/openapi/generated/models/ErrorRequest.model.ts new file mode 100644 index 0000000000..d44dcb66d9 --- /dev/null +++ b/plugins/catalog-backend/src/schema/openapi/generated/models/ErrorRequest.model.ts @@ -0,0 +1,27 @@ +/* + * 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. + */ + +// ****************************************************************** +// * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. * +// ****************************************************************** + +/** + * @public + */ +export interface ErrorRequest { + method: string; + url: string; +} diff --git a/plugins/catalog-backend/src/schema/openapi/generated/models/ErrorResponse.model.ts b/plugins/catalog-backend/src/schema/openapi/generated/models/ErrorResponse.model.ts new file mode 100644 index 0000000000..91c120483d --- /dev/null +++ b/plugins/catalog-backend/src/schema/openapi/generated/models/ErrorResponse.model.ts @@ -0,0 +1,26 @@ +/* + * 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. + */ + +// ****************************************************************** +// * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. * +// ****************************************************************** + +/** + * @public + */ +export interface ErrorResponse { + statusCode: number; +} diff --git a/plugins/catalog-backend/src/schema/openapi/generated/models/GetEntitiesByRefsRequest.model.ts b/plugins/catalog-backend/src/schema/openapi/generated/models/GetEntitiesByRefsRequest.model.ts new file mode 100644 index 0000000000..9160f0823b --- /dev/null +++ b/plugins/catalog-backend/src/schema/openapi/generated/models/GetEntitiesByRefsRequest.model.ts @@ -0,0 +1,27 @@ +/* + * 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. + */ + +// ****************************************************************** +// * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. * +// ****************************************************************** + +/** + * @public + */ +export interface GetEntitiesByRefsRequest { + entityRefs: Array; + fields?: Array; +} diff --git a/plugins/catalog-backend/src/schema/openapi/generated/models/GetLocations200ResponseInner.model.ts b/plugins/catalog-backend/src/schema/openapi/generated/models/GetLocations200ResponseInner.model.ts new file mode 100644 index 0000000000..a9f1af1c53 --- /dev/null +++ b/plugins/catalog-backend/src/schema/openapi/generated/models/GetLocations200ResponseInner.model.ts @@ -0,0 +1,27 @@ +/* + * 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. + */ + +// ****************************************************************** +// * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. * +// ****************************************************************** +import { Location } from '../models/Location.model'; + +/** + * @public + */ +export interface GetLocations200ResponseInner { + data: Location; +} diff --git a/plugins/catalog-backend/src/schema/openapi/generated/models/Location.model.ts b/plugins/catalog-backend/src/schema/openapi/generated/models/Location.model.ts new file mode 100644 index 0000000000..d7e4a22de4 --- /dev/null +++ b/plugins/catalog-backend/src/schema/openapi/generated/models/Location.model.ts @@ -0,0 +1,29 @@ +/* + * 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. + */ + +// ****************************************************************** +// * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. * +// ****************************************************************** + +/** + * Entity location for a specific entity. + * @public + */ +export interface Location { + target: string; + type: string; + id: string; +} diff --git a/plugins/catalog-backend/src/schema/openapi/generated/models/LocationInput.model.ts b/plugins/catalog-backend/src/schema/openapi/generated/models/LocationInput.model.ts new file mode 100644 index 0000000000..9cdc4c2c13 --- /dev/null +++ b/plugins/catalog-backend/src/schema/openapi/generated/models/LocationInput.model.ts @@ -0,0 +1,27 @@ +/* + * 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. + */ + +// ****************************************************************** +// * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. * +// ****************************************************************** + +/** + * @public + */ +export interface LocationInput { + type: string; + target: string; +} diff --git a/plugins/catalog-backend/src/schema/openapi/generated/models/LocationSpec.model.ts b/plugins/catalog-backend/src/schema/openapi/generated/models/LocationSpec.model.ts new file mode 100644 index 0000000000..1d56d8f3b0 --- /dev/null +++ b/plugins/catalog-backend/src/schema/openapi/generated/models/LocationSpec.model.ts @@ -0,0 +1,28 @@ +/* + * 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. + */ + +// ****************************************************************** +// * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. * +// ****************************************************************** + +/** + * Holds the entity location information. + * @public + */ +export interface LocationSpec { + target: string; + type: string; +} diff --git a/plugins/catalog-backend/src/schema/openapi/generated/models/ModelError.model.ts b/plugins/catalog-backend/src/schema/openapi/generated/models/ModelError.model.ts new file mode 100644 index 0000000000..5526d703e6 --- /dev/null +++ b/plugins/catalog-backend/src/schema/openapi/generated/models/ModelError.model.ts @@ -0,0 +1,33 @@ +/* + * 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. + */ + +// ****************************************************************** +// * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. * +// ****************************************************************** +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; + + error: ErrorError; + request?: ErrorRequest; + response: ErrorResponse; +} diff --git a/plugins/catalog-backend/src/schema/openapi/generated/models/NullableEntity.model.ts b/plugins/catalog-backend/src/schema/openapi/generated/models/NullableEntity.model.ts new file mode 100644 index 0000000000..aa6135ded4 --- /dev/null +++ b/plugins/catalog-backend/src/schema/openapi/generated/models/NullableEntity.model.ts @@ -0,0 +1,45 @@ +/* + * 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. + */ + +// ****************************************************************** +// * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. * +// ****************************************************************** +import { EntityMeta } from '../models/EntityMeta.model'; +import { EntityRelation } from '../models/EntityRelation.model'; + +/** + * The parts of the format that's common to all versions/kinds of entity. + * @public + */ +export type NullableEntity = { + /** + * The relations that this entity has with other entities. + */ + relations?: Array; + /** + * A type representing all allowed JSON object values. + */ + spec?: { [key: string]: any }; + metadata: EntityMeta; + /** + * The high level entity type being described. + */ + kind: string; + /** + * The version of specification format for this particular entity that this is written against. + */ + apiVersion: string; +} | null; diff --git a/plugins/catalog-backend/src/schema/openapi/generated/models/RecursivePartialEntity.model.ts b/plugins/catalog-backend/src/schema/openapi/generated/models/RecursivePartialEntity.model.ts new file mode 100644 index 0000000000..b3913ccd85 --- /dev/null +++ b/plugins/catalog-backend/src/schema/openapi/generated/models/RecursivePartialEntity.model.ts @@ -0,0 +1,45 @@ +/* + * 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. + */ + +// ****************************************************************** +// * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. * +// ****************************************************************** +import { RecursivePartialEntityMeta } from '../models/RecursivePartialEntityMeta.model'; +import { RecursivePartialEntityRelation } from '../models/RecursivePartialEntityRelation.model'; + +/** + * Makes all keys of an entire hierarchy optional. + * @public + */ +export interface RecursivePartialEntity { + /** + * The version of specification format for this particular entity that this is written against. + */ + apiVersion?: string; + /** + * The high level entity type being described. + */ + kind?: string; + metadata?: RecursivePartialEntityMeta; + /** + * A type representing all allowed JSON object values. + */ + spec?: { [key: string]: any }; + /** + * The relations that this entity has with other entities. + */ + relations?: Array; +} diff --git a/plugins/catalog-backend/src/schema/openapi/generated/models/RecursivePartialEntityMeta.model.ts b/plugins/catalog-backend/src/schema/openapi/generated/models/RecursivePartialEntityMeta.model.ts new file mode 100644 index 0000000000..df5ce3811b --- /dev/null +++ b/plugins/catalog-backend/src/schema/openapi/generated/models/RecursivePartialEntityMeta.model.ts @@ -0,0 +1,66 @@ +/* + * 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. + */ + +// ****************************************************************** +// * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. * +// ****************************************************************** +import { EntityLink } from '../models/EntityLink.model'; + +/** + * @public + */ +export interface RecursivePartialEntityMeta { + /** + * A list of external hyperlinks related to the entity. + */ + links?: Array; + /** + * A list of single-valued strings, to for example classify catalog entities in various ways. + */ + tags?: Array; + /** + * Construct a type with a set of properties K of type T + */ + annotations?: { [key: string]: string }; + /** + * Construct a type with a set of properties K of type T + */ + labels?: { [key: string]: string }; + /** + * A short (typically relatively few words, on one line) description of the entity. + */ + description?: string; + /** + * A display name of the entity, to be presented in user interfaces instead of the `name` property above, when available. This field is sometimes useful when the `name` is cumbersome or ends up being perceived as overly technical. The title generally does not have as stringent format requirements on it, so it may contain special characters and be more explanatory. Do keep it very short though, and avoid situations where a title can be confused with the name of another entity, or where two entities share a title. Note that this is only for display purposes, and may be ignored by some parts of the code. Entity references still always make use of the `name` property, not the title. + */ + title?: string; + /** + * The namespace that the entity belongs to. + */ + namespace?: string; + /** + * The name of the entity. Must be unique within the catalog at any given point in time, for any given namespace + kind pair. This value is part of the technical identifier of the entity, and as such it will appear in URLs, database tables, entity references, and similar. It is subject to restrictions regarding what characters are allowed. If you want to use a different, more human readable string with fewer restrictions on it in user interfaces, see the `title` field below. + */ + name?: string; + /** + * An opaque string that changes for each update operation to any part of the entity, including metadata. This field can not be set by the user at creation time, and the server will reject an attempt to do so. The field will be populated in read operations. The field can (optionally) be specified when performing update or delete operations, and the server will then reject the operation if it does not match the current stored value. + */ + etag?: string; + /** + * A globally unique ID for the entity. This field can not be set by the user at creation time, and the server will reject an attempt to do so. The field will be populated in read operations. The field can (optionally) be specified when performing update or delete operations, but the server is free to reject requests that do so in such a way that it breaks semantics. + */ + uid?: string; +} diff --git a/plugins/catalog-backend/src/schema/openapi/generated/models/RecursivePartialEntityMetaAllOf.model.ts b/plugins/catalog-backend/src/schema/openapi/generated/models/RecursivePartialEntityMetaAllOf.model.ts new file mode 100644 index 0000000000..6598f8df96 --- /dev/null +++ b/plugins/catalog-backend/src/schema/openapi/generated/models/RecursivePartialEntityMetaAllOf.model.ts @@ -0,0 +1,67 @@ +/* + * 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. + */ + +// ****************************************************************** +// * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. * +// ****************************************************************** +import { EntityLink } from '../models/EntityLink.model'; + +/** + * Metadata fields common to all versions/kinds of entity. + * @public + */ +export interface RecursivePartialEntityMetaAllOf { + /** + * A list of external hyperlinks related to the entity. + */ + links?: Array; + /** + * A list of single-valued strings, to for example classify catalog entities in various ways. + */ + tags?: Array; + /** + * Construct a type with a set of properties K of type T + */ + annotations?: { [key: string]: string }; + /** + * Construct a type with a set of properties K of type T + */ + labels?: { [key: string]: string }; + /** + * A short (typically relatively few words, on one line) description of the entity. + */ + description?: string; + /** + * A display name of the entity, to be presented in user interfaces instead of the `name` property above, when available. This field is sometimes useful when the `name` is cumbersome or ends up being perceived as overly technical. The title generally does not have as stringent format requirements on it, so it may contain special characters and be more explanatory. Do keep it very short though, and avoid situations where a title can be confused with the name of another entity, or where two entities share a title. Note that this is only for display purposes, and may be ignored by some parts of the code. Entity references still always make use of the `name` property, not the title. + */ + title?: string; + /** + * The namespace that the entity belongs to. + */ + namespace?: string; + /** + * The name of the entity. Must be unique within the catalog at any given point in time, for any given namespace + kind pair. This value is part of the technical identifier of the entity, and as such it will appear in URLs, database tables, entity references, and similar. It is subject to restrictions regarding what characters are allowed. If you want to use a different, more human readable string with fewer restrictions on it in user interfaces, see the `title` field below. + */ + name?: string; + /** + * An opaque string that changes for each update operation to any part of the entity, including metadata. This field can not be set by the user at creation time, and the server will reject an attempt to do so. The field will be populated in read operations. The field can (optionally) be specified when performing update or delete operations, and the server will then reject the operation if it does not match the current stored value. + */ + etag?: string; + /** + * A globally unique ID for the entity. This field can not be set by the user at creation time, and the server will reject an attempt to do so. The field will be populated in read operations. The field can (optionally) be specified when performing update or delete operations, but the server is free to reject requests that do so in such a way that it breaks semantics. + */ + uid?: string; +} diff --git a/plugins/catalog-backend/src/schema/openapi/generated/models/RecursivePartialEntityRelation.model.ts b/plugins/catalog-backend/src/schema/openapi/generated/models/RecursivePartialEntityRelation.model.ts new file mode 100644 index 0000000000..9c7dafb534 --- /dev/null +++ b/plugins/catalog-backend/src/schema/openapi/generated/models/RecursivePartialEntityRelation.model.ts @@ -0,0 +1,34 @@ +/* + * 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. + */ + +// ****************************************************************** +// * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. * +// ****************************************************************** + +/** + * A relation of a specific type to another entity in the catalog. + * @public + */ +export interface RecursivePartialEntityRelation { + /** + * The entity ref of the target of this relation. + */ + targetRef?: string; + /** + * The type of the relation. + */ + type?: string; +} diff --git a/plugins/catalog-backend/src/schema/openapi/generated/models/RefreshEntityRequest.model.ts b/plugins/catalog-backend/src/schema/openapi/generated/models/RefreshEntityRequest.model.ts new file mode 100644 index 0000000000..617f35288b --- /dev/null +++ b/plugins/catalog-backend/src/schema/openapi/generated/models/RefreshEntityRequest.model.ts @@ -0,0 +1,31 @@ +/* + * 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. + */ + +// ****************************************************************** +// * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. * +// ****************************************************************** + +/** + * Options for requesting a refresh of entities in the catalog. + * @public + */ +export interface RefreshEntityRequest { + authorizationToken?: string; + /** + * The reference to a single entity that should be refreshed + */ + entityRef: string; +} diff --git a/plugins/catalog-backend/src/schema/openapi/generated/models/ValidateEntity400Response.model.ts b/plugins/catalog-backend/src/schema/openapi/generated/models/ValidateEntity400Response.model.ts new file mode 100644 index 0000000000..fac9525afa --- /dev/null +++ b/plugins/catalog-backend/src/schema/openapi/generated/models/ValidateEntity400Response.model.ts @@ -0,0 +1,27 @@ +/* + * 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. + */ + +// ****************************************************************** +// * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. * +// ****************************************************************** +import { ValidateEntity400ResponseErrorsInner } from '../models/ValidateEntity400ResponseErrorsInner.model'; + +/** + * @public + */ +export interface ValidateEntity400Response { + errors: Array; +} diff --git a/plugins/catalog-backend/src/schema/openapi/generated/models/ValidateEntity400ResponseErrorsInner.model.ts b/plugins/catalog-backend/src/schema/openapi/generated/models/ValidateEntity400ResponseErrorsInner.model.ts new file mode 100644 index 0000000000..8718d7938d --- /dev/null +++ b/plugins/catalog-backend/src/schema/openapi/generated/models/ValidateEntity400ResponseErrorsInner.model.ts @@ -0,0 +1,29 @@ +/* + * 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. + */ + +// ****************************************************************** +// * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. * +// ****************************************************************** + +/** + * @public + */ +export interface ValidateEntity400ResponseErrorsInner { + [key: string]: any; + + name: string; + message: string; +} diff --git a/plugins/catalog-backend/src/schema/openapi/generated/models/ValidateEntityRequest.model.ts b/plugins/catalog-backend/src/schema/openapi/generated/models/ValidateEntityRequest.model.ts new file mode 100644 index 0000000000..c3be04818d --- /dev/null +++ b/plugins/catalog-backend/src/schema/openapi/generated/models/ValidateEntityRequest.model.ts @@ -0,0 +1,27 @@ +/* + * 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. + */ + +// ****************************************************************** +// * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. * +// ****************************************************************** + +/** + * @public + */ +export interface ValidateEntityRequest { + location: string; + entity: { [key: string]: any }; +} diff --git a/plugins/catalog-backend/src/schema/openapi/generated/models/index.ts b/plugins/catalog-backend/src/schema/openapi/generated/models/index.ts new file mode 100644 index 0000000000..d6c81becb5 --- /dev/null +++ b/plugins/catalog-backend/src/schema/openapi/generated/models/index.ts @@ -0,0 +1,52 @@ +/* + * 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 '../models/AnalyzeLocationEntityField.model'; +export * from '../models/AnalyzeLocationExistingEntity.model'; +export * from '../models/AnalyzeLocationGenerateEntity.model'; +export * from '../models/AnalyzeLocationRequest.model'; +export * from '../models/AnalyzeLocationResponse.model'; +export * from '../models/CreateLocation201Response.model'; +export * from '../models/CreateLocationRequest.model'; +export * from '../models/EntitiesBatchResponse.model'; +export * from '../models/EntitiesQueryResponse.model'; +export * from '../models/EntitiesQueryResponsePageInfo.model'; +export * from '../models/Entity.model'; +export * from '../models/EntityAncestryResponse.model'; +export * from '../models/EntityAncestryResponseItemsInner.model'; +export * from '../models/EntityFacet.model'; +export * from '../models/EntityFacetsResponse.model'; +export * from '../models/EntityLink.model'; +export * from '../models/EntityMeta.model'; +export * from '../models/EntityRelation.model'; +export * from '../models/ErrorError.model'; +export * from '../models/ErrorRequest.model'; +export * from '../models/ErrorResponse.model'; +export * from '../models/GetEntitiesByRefsRequest.model'; +export * from '../models/GetLocations200ResponseInner.model'; +export * from '../models/Location.model'; +export * from '../models/LocationInput.model'; +export * from '../models/LocationSpec.model'; +export * from '../models/ModelError.model'; +export * from '../models/NullableEntity.model'; +export * from '../models/RecursivePartialEntity.model'; +export * from '../models/RecursivePartialEntityMeta.model'; +export * from '../models/RecursivePartialEntityMetaAllOf.model'; +export * from '../models/RecursivePartialEntityRelation.model'; +export * from '../models/RefreshEntityRequest.model'; +export * from '../models/ValidateEntity400Response.model'; +export * from '../models/ValidateEntity400ResponseErrorsInner.model'; +export * from '../models/ValidateEntityRequest.model'; diff --git a/plugins/catalog-common/src/schema/openapi/generated/apis/DefaultApi.client.ts b/plugins/catalog-common/src/schema/openapi/generated/apis/DefaultApi.client.ts index a450fe18c8..06b5eacaaa 100644 --- a/plugins/catalog-common/src/schema/openapi/generated/apis/DefaultApi.client.ts +++ b/plugins/catalog-common/src/schema/openapi/generated/apis/DefaultApi.client.ts @@ -107,6 +107,7 @@ export type GetEntitiesByQuery = { query: { fields?: Array; limit?: number; + offset?: number; orderField?: Array; cursor?: string; filter?: Array; @@ -216,7 +217,6 @@ export class DefaultApiClient { * @param analyzeLocationRequest - */ public async analyzeLocation( - // @ts-ignore request: AnalyzeLocation, options?: RequestOptions, ): Promise> { @@ -242,7 +242,6 @@ export class DefaultApiClient { * @param dryRun - */ public async createLocation( - // @ts-ignore request: CreateLocation, options?: RequestOptions, ): Promise> { @@ -269,7 +268,6 @@ export class DefaultApiClient { * @param uid - */ public async deleteEntityByUid( - // @ts-ignore request: DeleteEntityByUid, options?: RequestOptions, ): Promise> { @@ -295,7 +293,6 @@ export class DefaultApiClient { * @param id - */ public async deleteLocation( - // @ts-ignore request: DeleteLocation, options?: RequestOptions, ): Promise> { @@ -326,7 +323,6 @@ export class DefaultApiClient { * @param order - */ public async getEntities( - // @ts-ignore request: GetEntities, options?: RequestOptions, ): Promise>> { @@ -351,6 +347,7 @@ export class DefaultApiClient { * Search for entities by a given query. * @param fields - Restrict to just these fields in the response. * @param limit - Number of records to return in the response. + * @param offset - Number of records to skip in the query page. * @param orderField - The fields to sort returned results by. * @param cursor - Cursor to a set page of results. * @param filter - Filter for just the entities defined by this filter. @@ -358,7 +355,6 @@ export class DefaultApiClient { * @param fullTextFilterFields - A comma separated list of fields to sort returned results by. */ public async getEntitiesByQuery( - // @ts-ignore request: GetEntitiesByQuery, options?: RequestOptions, ): Promise> { @@ -385,7 +381,6 @@ export class DefaultApiClient { * @param getEntitiesByRefsRequest - */ public async getEntitiesByRefs( - // @ts-ignore request: GetEntitiesByRefs, options?: RequestOptions, ): Promise> { @@ -414,7 +409,6 @@ export class DefaultApiClient { * @param name - */ public async getEntityAncestryByName( - // @ts-ignore request: GetEntityAncestryByName, options?: RequestOptions, ): Promise> { @@ -444,7 +438,6 @@ export class DefaultApiClient { * @param name - */ public async getEntityByName( - // @ts-ignore request: GetEntityByName, options?: RequestOptions, ): Promise> { @@ -472,7 +465,6 @@ export class DefaultApiClient { * @param uid - */ public async getEntityByUid( - // @ts-ignore request: GetEntityByUid, options?: RequestOptions, ): Promise> { @@ -499,7 +491,6 @@ export class DefaultApiClient { * @param filter - Filter for just the entities defined by this filter. */ public async getEntityFacets( - // @ts-ignore request: GetEntityFacets, options?: RequestOptions, ): Promise> { @@ -525,7 +516,6 @@ export class DefaultApiClient { * @param id - */ public async getLocation( - // @ts-ignore request: GetLocation, options?: RequestOptions, ): Promise> { @@ -553,7 +543,6 @@ export class DefaultApiClient { * @param name - */ public async getLocationByEntity( - // @ts-ignore request: GetLocationByEntity, options?: RequestOptions, ): Promise> { @@ -580,7 +569,6 @@ export class DefaultApiClient { * Get all locations */ public async getLocations( - // @ts-ignore request: GetLocations, options?: RequestOptions, ): Promise>> { @@ -604,7 +592,6 @@ export class DefaultApiClient { * @param refreshEntityRequest - */ public async refreshEntity( - // @ts-ignore request: RefreshEntity, options?: RequestOptions, ): Promise> { @@ -629,7 +616,6 @@ export class DefaultApiClient { * @param validateEntityRequest - */ public async validateEntity( - // @ts-ignore request: ValidateEntity, options?: RequestOptions, ): Promise> { diff --git a/plugins/search-backend/package.json b/plugins/search-backend/package.json index d335756b7d..acd564d996 100644 --- a/plugins/search-backend/package.json +++ b/plugins/search-backend/package.json @@ -47,13 +47,13 @@ "scripts": { "build": "backstage-cli package build", "clean": "backstage-cli package clean", + "fuzz": "backstage-repo-tools package schema openapi fuzz", + "generate": "backstage-repo-tools package schema openapi generate --server --client-package plugins/search-common", "lint": "backstage-cli package lint", "prepack": "backstage-cli package prepack", "postpack": "backstage-cli package postpack", "start": "backstage-cli package start", - "test": "backstage-cli package test", - "generate": "backstage-repo-tools package schema openapi generate --server --client-package plugins/search-common --server-client-import \"@backstage/plugin-search-common/client\"", - "fuzz": "backstage-repo-tools package schema openapi fuzz" + "test": "backstage-cli package test" }, "dependencies": { "@backstage/backend-common": "^0.25.0", diff --git a/plugins/search-backend/src/schema/openapi/generated/apis/DefaultApi.server.ts b/plugins/search-backend/src/schema/openapi/generated/apis/DefaultApi.server.ts index bd65e15c70..7717873b8e 100644 --- a/plugins/search-backend/src/schema/openapi/generated/apis/DefaultApi.server.ts +++ b/plugins/search-backend/src/schema/openapi/generated/apis/DefaultApi.server.ts @@ -17,7 +17,19 @@ // ****************************************************************** // * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. * // ****************************************************************** -import type { Query } from '@backstage/plugin-search-common/client'; + +/** + * @public + */ +export type Query = { + query: { + term?: string; + filters?: { [key: string]: any }; + types?: Array; + pageCursor?: string; + pageLimit?: number; + }; +}; /** * no description diff --git a/plugins/search-backend/src/schema/openapi/generated/models/ErrorError.model.ts b/plugins/search-backend/src/schema/openapi/generated/models/ErrorError.model.ts new file mode 100644 index 0000000000..0a51c67fef --- /dev/null +++ b/plugins/search-backend/src/schema/openapi/generated/models/ErrorError.model.ts @@ -0,0 +1,27 @@ +/* + * 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. + */ + +// ****************************************************************** +// * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. * +// ****************************************************************** + +/** + * @public + */ +export interface ErrorError { + name: string; + message: string; +} diff --git a/plugins/search-backend/src/schema/openapi/generated/models/ErrorRequest.model.ts b/plugins/search-backend/src/schema/openapi/generated/models/ErrorRequest.model.ts new file mode 100644 index 0000000000..d44dcb66d9 --- /dev/null +++ b/plugins/search-backend/src/schema/openapi/generated/models/ErrorRequest.model.ts @@ -0,0 +1,27 @@ +/* + * 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. + */ + +// ****************************************************************** +// * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. * +// ****************************************************************** + +/** + * @public + */ +export interface ErrorRequest { + method: string; + url: string; +} diff --git a/plugins/search-backend/src/schema/openapi/generated/models/ErrorResponse.model.ts b/plugins/search-backend/src/schema/openapi/generated/models/ErrorResponse.model.ts new file mode 100644 index 0000000000..91c120483d --- /dev/null +++ b/plugins/search-backend/src/schema/openapi/generated/models/ErrorResponse.model.ts @@ -0,0 +1,26 @@ +/* + * 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. + */ + +// ****************************************************************** +// * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. * +// ****************************************************************** + +/** + * @public + */ +export interface ErrorResponse { + statusCode: number; +} diff --git a/plugins/search-backend/src/schema/openapi/generated/models/ModelError.model.ts b/plugins/search-backend/src/schema/openapi/generated/models/ModelError.model.ts new file mode 100644 index 0000000000..3e6af947ec --- /dev/null +++ b/plugins/search-backend/src/schema/openapi/generated/models/ModelError.model.ts @@ -0,0 +1,31 @@ +/* + * 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. + */ + +// ****************************************************************** +// * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. * +// ****************************************************************** +import { ErrorError } from '../models/ErrorError.model'; +import { ErrorRequest } from '../models/ErrorRequest.model'; +import { ErrorResponse } from '../models/ErrorResponse.model'; + +/** + * @public + */ +export interface ModelError { + error: ErrorError; + request: ErrorRequest; + response: ErrorResponse; +} diff --git a/plugins/search-backend/src/schema/openapi/generated/models/Query200Response.model.ts b/plugins/search-backend/src/schema/openapi/generated/models/Query200Response.model.ts new file mode 100644 index 0000000000..8ddb2a0b63 --- /dev/null +++ b/plugins/search-backend/src/schema/openapi/generated/models/Query200Response.model.ts @@ -0,0 +1,30 @@ +/* + * 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. + */ + +// ****************************************************************** +// * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. * +// ****************************************************************** +import { Query200ResponseResultsInner } from '../models/Query200ResponseResultsInner.model'; + +/** + * @public + */ +export interface Query200Response { + results: Array; + nextPageCursor?: string; + previousPageCursor?: string; + numberOfResults?: number; +} diff --git a/plugins/search-backend/src/schema/openapi/generated/models/Query200ResponseResultsInner.model.ts b/plugins/search-backend/src/schema/openapi/generated/models/Query200ResponseResultsInner.model.ts new file mode 100644 index 0000000000..ec635c8e5b --- /dev/null +++ b/plugins/search-backend/src/schema/openapi/generated/models/Query200ResponseResultsInner.model.ts @@ -0,0 +1,39 @@ +/* + * 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. + */ + +// ****************************************************************** +// * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. * +// ****************************************************************** +import { Query200ResponseResultsInnerDocument } from '../models/Query200ResponseResultsInnerDocument.model'; + +/** + * @public + */ +export interface Query200ResponseResultsInner { + /** + * The \"type\" of the given document. + */ + type: string; + document: Query200ResponseResultsInnerDocument; + /** + * Optional result highlight. Useful for improving the search result display/experience. + */ + highlight?: any; + /** + * Optional result rank, where 1 is the first/top result returned. Useful for understanding search effectiveness in analytics. + */ + rank?: number; +} diff --git a/plugins/search-backend/src/schema/openapi/generated/models/Query200ResponseResultsInnerDocument.model.ts b/plugins/search-backend/src/schema/openapi/generated/models/Query200ResponseResultsInnerDocument.model.ts new file mode 100644 index 0000000000..9e82274aa7 --- /dev/null +++ b/plugins/search-backend/src/schema/openapi/generated/models/Query200ResponseResultsInnerDocument.model.ts @@ -0,0 +1,38 @@ +/* + * 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. + */ + +// ****************************************************************** +// * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. * +// ****************************************************************** + +/** + * The raw value of the document, as indexed. + * @public + */ +export interface Query200ResponseResultsInnerDocument { + /** + * The primary name of the document (e.g. name, title, identifier, etc). + */ + title?: string; + /** + * Free-form text of the document (e.g. description, content, etc). + */ + text?: string; + /** + * The relative or absolute URL of the document (target when a search result is clicked). + */ + location?: string; +} diff --git a/plugins/search-backend/src/schema/openapi/generated/models/index.ts b/plugins/search-backend/src/schema/openapi/generated/models/index.ts new file mode 100644 index 0000000000..d38087bf8c --- /dev/null +++ b/plugins/search-backend/src/schema/openapi/generated/models/index.ts @@ -0,0 +1,23 @@ +/* + * 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 '../models/ErrorError.model'; +export * from '../models/ErrorRequest.model'; +export * from '../models/ErrorResponse.model'; +export * from '../models/ModelError.model'; +export * from '../models/Query200Response.model'; +export * from '../models/Query200ResponseResultsInner.model'; +export * from '../models/Query200ResponseResultsInnerDocument.model';