import { TimeSpan } from '@elaraai/core/east'; import { Cache } from '@elaraai/core/datasource'; import { ELARASchema } from '@elaraai/core/schema'; /** * The scope to be applied to to the {@link DeputyPlugin}. * * @category DataSource */ export declare type DeputyScope = 'Employee' | 'Leave' | 'Pay' | 'Roster' | 'Operations' | 'Timesheet' | 'Task'; /** * The environment variables to define an {@link DeputyPlugin}. * * @category DataSource */ export declare type DeputyEnv = { DEPUTY_CLIENT_URL?: string; DEPUTY_CLIENT_ID?: string; }; /** * A {@link DeputyPluginDefinition} to configure the {@link DeputyPlugin}. * * @category DataSource */ export declare type DeputyPluginDefinition = { /** the {@link TimeSpan} indicating the total history to query */ history?: TimeSpan; /** the {@link TimeSpan} indicating the history to query on updates */ update_history?: TimeSpan; /** the {@link TimeSpan} indicating the future to query */ future?: TimeSpan; /** the configuration of the DataSource {@link Poll} */ poll?: TimeSpan; /** the set of {@link DeputyScope}'s to apply to the API */ scope?: Set; /** the configuration of the {@link Cache} for the DataSource. */ cache?: Cache; /** the environment variables to apply to the {@link AroFloPlugin} */ env?: DeputyEnv; }; /** * Create a streaming {@link DataSourceDefinition} for the Deputy API with supporting diagnostic pages: {@link https://www.deputy.com/api-doc/API/Getting_Started}. * * @param definition: the desired {@link DeputyPluginDefinition}. * @return a {@link ELARASchema} containing a {@link DeputyPluginDefinition} contents * * @category DataSource * * @example * ```typescript * // Create an DeputyPlugin poll an initial four weeks of data, and then the last hour (and next week) of data from the API every `hour` for `Roster` and `Timesheet` with default environment names. * const deputy = DeputyPlugin({ * history: TimeSpan(4, 'week'), * update_history: TimeSpan(1), * future: TimeSpan(2, 'week'), * poll: TimeSpan(1), * scope: new Set(['Roster', 'Timesheet']), * }) * ``` */ export declare function DeputyPlugin(args?: DeputyPluginDefinition): ELARASchema; //# sourceMappingURL=deputy.d.ts.map