UNPKG

@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_.

38 lines (29 loc) 774 B
import { ISchedule } from '@/models' import { RRuleScheduleResponse } from '@/models/api/ScheduleResponse' export interface IRRuleSchedule extends ISchedule { timezone: string | null, rrule: string, } export class RRuleSchedule implements IRRuleSchedule { public timezone: string | null public rrule: string public constructor(schedule: Pick<IRRuleSchedule, 'rrule' | 'timezone'>) { this.timezone = schedule.timezone this.rrule = schedule.rrule } public get raw(): string { return this.rrule } public getRRule(): string { return this.rrule } public toString(): string { return this.rrule } public toResponse(): RRuleScheduleResponse { return { 'rrule': this.rrule, 'timezone': this.timezone, } } }