UNPKG

haystack-nclient

Version:

Project Haystack Network Client

62 lines (61 loc) 1.55 kB
import { HDateTime, HDict, HList, HRef, OptionalHVal } from 'haystack-core'; /** * The entry endpoints for the Schedule Service */ export declare enum ScheduleServiceEndpoints { Schedules = "schedules", Calendars = "calendars" } /** * Options for reading Schedules and Calendars. */ export type ScheduleReadOptions = { /** * If defined, Gets the functions filtered by a Haystack filter */ filter?: string; /** * If defined, specifies the name of the tag/prop by which the returned function records are sorted in ascending order. */ sort?: string[]; /** * If defined, specifies the max number of function records that will be returned by the read */ limit?: number; /** * If defined, limit the number of columns sent back in the response. */ columns?: string[]; /** * Omit the specified columns from the response. */ omit?: string[]; }; /** * Options for reading a Schedules events. */ export type ScheduleEventsReadOptions = { start: string; end?: string; }; /** * The shape of an event on a Schedule. */ export interface ScheduleEvent extends HDict { startTime: HDateTime; endTime: HDateTime; val: OptionalHVal; } /** * The response from the Schedule Events endpoint. */ export interface ScheduleEventsResponse extends HDict { events: HList<ScheduleEvent>; } /** * Interface for adding and/or removing schedulable points */ export interface SchedulePointUpdate { add?: HList<HRef>; remove?: HList<HRef>; }