@altostra/core
Version:
Core library for shared types and logic
24 lines (23 loc) • 1.17 kB
TypeScript
import type { ResourceBase } from "./Common";
export declare type ExternalUrlType = 'resource.external.url';
export interface ExternalUrl extends ResourceBase {
type: ExternalUrlType;
url: string;
}
export declare type ExternalAltostraType = 'resource.external.blueprint';
export interface ExternalAltostra extends ResourceBase {
type: ExternalAltostraType;
projectId: string;
blueprintId: string;
deploymentId: string;
}
export declare type ExternalSystemType = ExternalAltostraType | ExternalUrlType;
export declare type ExternalSystem = ExternalAltostra | ExternalUrl;
export declare type ExternalSystemByType = {
[K in ExternalAltostraType]: ExternalAltostra;
} & {
[K in ExternalUrlType]: ExternalUrl;
};
export declare const isExternalAltostra: import("@altostra/type-validations").ObjectOfTypeValidation<ExternalAltostra>;
export declare const isExternalUrl: import("@altostra/type-validations").ObjectOfTypeValidation<ExternalUrl>;
export declare const isExternalSystem: import("@altostra/type-validations/lib/taggedUnionOf").TaggedUnionValidation<ExternalSystem, "type", "resource.external.blueprint" | "resource.external.url">;