haystack-nclient
Advanced tools
Comparing version 3.0.41 to 3.0.42
import { HDict, HGrid, HRef } from 'haystack-core'; | ||
import { SchedulePointUpdate, ScheduleReadOptions } from './types'; | ||
import { ScheduleEventsReadOptions, SchedulePointUpdate, ScheduleReadOptions } from './types'; | ||
import { ClientServiceConfig } from '../ClientServiceConfig'; | ||
@@ -116,2 +116,13 @@ /** | ||
readCalendarSchedulesById<Schedule extends HDict>(id: string | HRef): Promise<HGrid<Schedule>>; | ||
/** | ||
* Reads the events associated with a schedule. | ||
* | ||
* Returns the events within the start -> end range, | ||
* or, if no end provided, will return the next scheduled event. | ||
* | ||
* @param id The record id. | ||
* @param options The range to use for event lookup. | ||
* @returns The events for the Schedule. | ||
*/ | ||
readScheduleEvents<ScheduleEventsResponse extends HDict>(id: string | HRef, options: ScheduleEventsReadOptions): Promise<ScheduleEventsResponse>; | ||
} |
@@ -1,2 +0,2 @@ | ||
import { HList, HRef } from 'haystack-core'; | ||
import { HDateTime, HDict, HList, HRef, OptionalHVal } from 'haystack-core'; | ||
/** | ||
@@ -35,2 +35,23 @@ * The entry endpoints for the Schedule Service | ||
/** | ||
* Options for reading a Schedules events. | ||
*/ | ||
export declare 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 | ||
@@ -37,0 +58,0 @@ */ |
@@ -13,3 +13,3 @@ { | ||
"homepage": "https://github.com/j2inn/haystack-nclient", | ||
"version": "3.0.41", | ||
"version": "3.0.42", | ||
"module": "dist/index.es.js", | ||
@@ -16,0 +16,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
430810
13622