refactor: move AiResource types to @backstage/catalog-model alpha

Signed-off-by: benjdlambert <ben@blam.sh>
This commit is contained in:
benjdlambert
2026-05-18 17:38:27 +02:00
parent 19f9330073
commit 9e0572b88c
2 changed files with 18 additions and 26 deletions
+5 -26
View File
@@ -14,8 +14,7 @@ export const aiResourceEntityModel: CatalogModelLayer;
// @alpha
export type AiResourceEntityV1alpha1 =
| AiResourceEntityV1alpha1Default
| SkillAiResourceEntityV1alpha1
| RuleAiResourceEntityV1alpha1;
| SkillAiResourceEntityV1alpha1;
// @alpha
export interface AiResourceEntityV1alpha1Default extends Entity {
@@ -485,11 +484,6 @@ export const isAiResourceEntity: (
entity: Entity,
) => entity is AiResourceEntityV1alpha1;
// @alpha
export const isRuleAiResourceEntity: (
entity: Entity,
) => entity is RuleAiResourceEntityV1alpha1;
// @alpha
export const isSkillAiResourceEntity: (
entity: Entity,
@@ -501,26 +495,11 @@ export type KindValidator = {
};
// @alpha
export interface RuleAiResourceEntityV1alpha1
extends AiResourceEntityV1alpha1Default {
export interface SkillAiResourceEntityV1alpha1 extends Entity {
// (undocumented)
spec: {
type: 'rule';
lifecycle: string;
owner: string;
system?: string;
disciplines?: string[];
category: string;
rationale: string;
};
}
// @alpha
export const ruleAiResourceEntityV1alpha1Validator: KindValidator;
// @alpha
export interface SkillAiResourceEntityV1alpha1
extends AiResourceEntityV1alpha1Default {
apiVersion: 'backstage.io/v1alpha1';
// (undocumented)
kind: 'AiResource';
// (undocumented)
spec: {
type: 'skill';
+13
View File
@@ -42,5 +42,18 @@ export {
isRuleAiResourceEntity,
aiResourceEntityModel,
} from './kinds/AiResourceEntityV1alpha1';
export type {
ApiEntityV1alpha1 as ApiEntity,
ApiEntityV1alpha1,
} from './kinds/ApiEntityV1alpha1';
export type {
McpServerApiEntity,
McpServerRemote,
} from './kinds/McpServerApiEntity';
export {
mcpServerApiEntityValidator,
isMcpServerApiEntity,
mcpServerApiEntityModel,
} from './kinds/McpServerApiEntity';
export * from './model';
export { defaultCatalogEntityModel } from './model/defaultCatalogEntityModel';