move packages to have their own generated code

Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
This commit is contained in:
aramissennyeydd
2024-09-24 19:45:21 -04:00
parent afbdbe5c9d
commit a028799380
61 changed files with 1945 additions and 47 deletions
@@ -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
@@ -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}}
*/
@@ -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}}
@@ -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}};
@@ -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}}
@@ -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}}
@@ -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}}
@@ -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}}
@@ -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}};
@@ -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}}
@@ -0,0 +1,7 @@
//
{{#models}}
{{#model}}
export * from '{{{ importPath }}}.model{{importFileExtension}}'
{{/model}}
{{/models}}
+1 -1
View File
@@ -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",
@@ -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<string>;
limit?: number;
filter?: Array<string>;
offset?: number;
after?: string;
order?: Array<string>;
};
};
/**
* @public
*/
export type GetEntitiesByQuery = {
query: {
fields?: Array<string>;
limit?: number;
offset?: number;
orderField?: Array<string>;
cursor?: string;
filter?: Array<string>;
fullTextFilterTerm?: string;
fullTextFilterFields?: Array<string>;
};
};
/**
* @public
*/
export type GetEntitiesByRefs = {
body: GetEntitiesByRefsRequest;
query: {
filter?: Array<string>;
};
};
/**
* @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<string>;
filter?: Array<string>;
};
};
/**
* @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
@@ -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';
@@ -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;
}
@@ -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<AnalyzeLocationEntityField>;
entity: RecursivePartialEntity;
}
@@ -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;
}
@@ -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<AnalyzeLocationGenerateEntity>;
existingEntityFiles: Array<AnalyzeLocationExistingEntity>;
}
@@ -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<Entity>;
location: Location;
}
@@ -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;
}
@@ -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<NullableEntity>;
}
@@ -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<Entity>;
totalItems: number;
pageInfo: EntitiesQueryResponsePageInfo;
}
@@ -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;
}
@@ -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<EntityRelation>;
/**
* 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;
}
@@ -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<EntityAncestryResponseItemsInner>;
rootEntityRef: string;
}
@@ -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<string>;
entity: Entity;
}
@@ -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;
}
@@ -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<EntityFacet> };
}
@@ -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;
}
@@ -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<EntityLink>;
/**
* A list of single-valued strings, to for example classify catalog entities in various ways.
*/
tags?: Array<string>;
/**
* 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;
}
@@ -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;
}
@@ -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;
}
@@ -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;
}
@@ -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;
}
@@ -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<string>;
fields?: Array<string>;
}
@@ -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;
}
@@ -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;
}
@@ -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;
}
@@ -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;
}
@@ -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;
}
@@ -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<EntityRelation>;
/**
* 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;
@@ -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<RecursivePartialEntityRelation>;
}
@@ -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<EntityLink>;
/**
* A list of single-valued strings, to for example classify catalog entities in various ways.
*/
tags?: Array<string>;
/**
* 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;
}
@@ -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<EntityLink>;
/**
* A list of single-valued strings, to for example classify catalog entities in various ways.
*/
tags?: Array<string>;
/**
* 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;
}
@@ -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;
}
@@ -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;
}
@@ -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<ValidateEntity400ResponseErrorsInner>;
}
@@ -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;
}
@@ -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 };
}
@@ -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';
@@ -107,6 +107,7 @@ export type GetEntitiesByQuery = {
query: {
fields?: Array<string>;
limit?: number;
offset?: number;
orderField?: Array<string>;
cursor?: string;
filter?: Array<string>;
@@ -216,7 +217,6 @@ export class DefaultApiClient {
* @param analyzeLocationRequest -
*/
public async analyzeLocation(
// @ts-ignore
request: AnalyzeLocation,
options?: RequestOptions,
): Promise<TypedResponse<AnalyzeLocationResponse>> {
@@ -242,7 +242,6 @@ export class DefaultApiClient {
* @param dryRun -
*/
public async createLocation(
// @ts-ignore
request: CreateLocation,
options?: RequestOptions,
): Promise<TypedResponse<CreateLocation201Response>> {
@@ -269,7 +268,6 @@ export class DefaultApiClient {
* @param uid -
*/
public async deleteEntityByUid(
// @ts-ignore
request: DeleteEntityByUid,
options?: RequestOptions,
): Promise<TypedResponse<void>> {
@@ -295,7 +293,6 @@ export class DefaultApiClient {
* @param id -
*/
public async deleteLocation(
// @ts-ignore
request: DeleteLocation,
options?: RequestOptions,
): Promise<TypedResponse<void>> {
@@ -326,7 +323,6 @@ export class DefaultApiClient {
* @param order -
*/
public async getEntities(
// @ts-ignore
request: GetEntities,
options?: RequestOptions,
): Promise<TypedResponse<Array<Entity>>> {
@@ -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<TypedResponse<EntitiesQueryResponse>> {
@@ -385,7 +381,6 @@ export class DefaultApiClient {
* @param getEntitiesByRefsRequest -
*/
public async getEntitiesByRefs(
// @ts-ignore
request: GetEntitiesByRefs,
options?: RequestOptions,
): Promise<TypedResponse<EntitiesBatchResponse>> {
@@ -414,7 +409,6 @@ export class DefaultApiClient {
* @param name -
*/
public async getEntityAncestryByName(
// @ts-ignore
request: GetEntityAncestryByName,
options?: RequestOptions,
): Promise<TypedResponse<EntityAncestryResponse>> {
@@ -444,7 +438,6 @@ export class DefaultApiClient {
* @param name -
*/
public async getEntityByName(
// @ts-ignore
request: GetEntityByName,
options?: RequestOptions,
): Promise<TypedResponse<Entity>> {
@@ -472,7 +465,6 @@ export class DefaultApiClient {
* @param uid -
*/
public async getEntityByUid(
// @ts-ignore
request: GetEntityByUid,
options?: RequestOptions,
): Promise<TypedResponse<Entity>> {
@@ -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<TypedResponse<EntityFacetsResponse>> {
@@ -525,7 +516,6 @@ export class DefaultApiClient {
* @param id -
*/
public async getLocation(
// @ts-ignore
request: GetLocation,
options?: RequestOptions,
): Promise<TypedResponse<Location>> {
@@ -553,7 +543,6 @@ export class DefaultApiClient {
* @param name -
*/
public async getLocationByEntity(
// @ts-ignore
request: GetLocationByEntity,
options?: RequestOptions,
): Promise<TypedResponse<Location>> {
@@ -580,7 +569,6 @@ export class DefaultApiClient {
* Get all locations
*/
public async getLocations(
// @ts-ignore
request: GetLocations,
options?: RequestOptions,
): Promise<TypedResponse<Array<GetLocations200ResponseInner>>> {
@@ -604,7 +592,6 @@ export class DefaultApiClient {
* @param refreshEntityRequest -
*/
public async refreshEntity(
// @ts-ignore
request: RefreshEntity,
options?: RequestOptions,
): Promise<TypedResponse<void>> {
@@ -629,7 +616,6 @@ export class DefaultApiClient {
* @param validateEntityRequest -
*/
public async validateEntity(
// @ts-ignore
request: ValidateEntity,
options?: RequestOptions,
): Promise<TypedResponse<void>> {
+3 -3
View File
@@ -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",
@@ -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<string>;
pageCursor?: string;
pageLimit?: number;
};
};
/**
* no description
@@ -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;
}
@@ -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;
}
@@ -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;
}
@@ -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;
}
@@ -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<Query200ResponseResultsInner>;
nextPageCursor?: string;
previousPageCursor?: string;
numberOfResults?: number;
}
@@ -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;
}
@@ -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;
}
@@ -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';