import { Table } from '@elaraai/core/data'; import { Variable, DateTimeType, TimeUnit, IntegerType, Expression, BooleanType } from '@elaraai/core/east'; import { ELARASchema } from '@elaraai/core/schema'; /** * A {@link TimeCycleDefinition} to define time interval for a cycle for the {@link TimeCyclePlugin}. * * @category DataSource */ export declare type TimeCycleDefinition = { /** the {@link Table} to define the intersections for */ table: Table; /** the {@link Expression} for the cycle datetime value */ value: Variable; }; /** * Create a {@link TimeCycleDefinition} to define time interval for a cycle for the {@link TimeCyclePlugin}. * * @param definition: the desired {@link TimeCycleDefinition}. * @return a valid {@link TimeCycle} * * @category DataSource * @deprecated * * @example * ```typescript * // get the datasource to add to the plugin * import datasource_one from './gen/datasource_one.datasource' * // Create a time interval intersection * const intersection = TimeCycle({ * table: datasource_one.output, * start: datasource_one.output.fields.StartDate, * end: datasource_one.output.fields.EndDate, * }) * ``` */ export declare function TimeCycle(definition: TimeCycleDefinition): TimeCycleDefinition; /** * A {@link TimeCyclePluginDefinition} to configure the {@link TimeCyclePlugin}. * * @category DataSource */ export declare type TimeCyclePluginDefinition = { /** name of the resulting {@link Pipeline} */ name: string; /** the collection of {@link TimeCycle}s to apply */ inputs: TimeCycleDefinition[]; /** the {@link TimeUnit} of each cycle */ unit: TimeUnit; /** the {@link Variable} for the cycle interval date */ tick?: Variable; /** the {@link Variable} for the cycle interval number */ cycle?: Variable; /** the {@link Expression} for the number of future cycles */ future_cycles?: Expression; /** the {@link Expression} predicate to filter out values */ filter?: Expression; }; /** * Utility plugin to generate time unit cycles over the intersection of some input date ranges, time cycle 0 occurs at the end of the input data range * * @param definition: the desired {@link TimeCyclePluginDefinition}. * @return a {@link ELARASchema} containing a {@link TimeCyclePluginDefinition} contents * * @category DataSource * @deprecated * * @example * ```typescript * // get the datasources to add to the plugin * import datasource_one from './gen/datasource_one.datasource' * import datasource_two from './gen/datasource_two.datasource' * // get time cycles from both datasources * const plugin = TimeCyclePlugin({ * unit: 'hour', * future_cycles: 12, * inputs: [ * TimeCycle({ * table: datasource_one.output, * value: datasource_one.output.fields.Date, * }), * TimeCycle({ * table: datasource_two.output, * value: datasource_two.output.fields.Date, * }), * ] * }) * ``` */ export declare function TimeCyclePlugin(config: TimeCyclePluginDefinition): ELARASchema; //# sourceMappingURL=time_cycle.d.ts.map