@prefecthq/prefect-ui-library
Version:
This library is the Vue and Typescript component library for [Prefect 2](https://github.com/PrefectHQ/prefect) and [Prefect Cloud 2](https://www.prefect.io/cloud/). _The components and utilities in this project are not meant to be used independently_.
51 lines (50 loc) • 1.85 kB
TypeScript
import { AutomationTrigger } from '../automations';
export type ServiceLevelAgreementSeverity = 'minor' | 'low' | 'moderate' | 'high' | 'critical';
export declare const ServiceLevelAgreementType: readonly ["FrequencySla", "LatenessSla", "TimeToCompletionSla"], isServiceLevelAgreementType: (value: unknown) => value is "FrequencySla" | "LatenessSla" | "TimeToCompletionSla";
export type ServiceLevelAgreementType = typeof ServiceLevelAgreementType[number];
export type ServiceLevelAgreementDisplayType = 'Frequency' | 'Lateness' | 'Time to Completion';
export interface IServiceLevelAgreement {
id: string;
name: string;
description: string;
enabled: boolean;
trigger: AutomationTrigger;
severity: ServiceLevelAgreementSeverity;
type: ServiceLevelAgreementType;
created: Date;
updated: Date;
account: string;
workspace: string;
actor: {
actorId: string;
handle: string;
userId: string | null;
botId: string | null;
};
}
export declare class ServiceLevelAgreement implements IServiceLevelAgreement {
readonly id: string;
readonly name: string;
readonly description: string;
readonly enabled: boolean;
readonly trigger: AutomationTrigger;
readonly severity: ServiceLevelAgreementSeverity;
readonly type: ServiceLevelAgreementType;
readonly created: Date;
readonly updated: Date;
readonly account: string;
readonly workspace: string;
readonly actor: {
actorId: string;
handle: string;
userId: string | null;
botId: string | null;
};
constructor(serviceLevelAgreement: IServiceLevelAgreement);
durationInSeconds(): number;
getSlaDefinitionKeyValuePairs(): {
key: string;
value: unknown;
}[];
getDisplaySlaType(): ServiceLevelAgreementDisplayType;
}