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 `KountaPlugin`. * * @category DataSource */ export declare type KountaScope = 'Addresses' | 'Categories' | 'Customers' | 'Inventory' | 'OptionSets' | 'Orders' | 'PriceLists' | 'Products' | 'PurchaseOrders' | 'Registers' | 'Staff'; /** * The environment variables to define an `KountaPlugin`. * * @category DataSource */ export declare type KountaEnv = { KOUNTA_APP_ID?: string; KOUNTA_APP_SECRET?: string; KOUNTA_COMPANY_ID?: string; KOUNTA_SITE_ID?: string; }; /** * A {@link KountaPluginDefinition} to configure the {@link KountaPlugin}. * * @category DataSource */ export declare type KountaPluginDefinition = { /** 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 configuration of the DataSource {@link Poll} */ poll?: TimeSpan; /** the set of {@link KountaScope}'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?: KountaEnv; }; /** * Create a streaming {@link DataSourceDefinition} for the Kounta API with supporting diagnostic pages: {@link https://apidoc.kounta.com/}. * * @param definition: the desired {@link KountaPluginDefinition}. * @return a {@link ELARASchema} containing a {@link KountaPluginDefinition} contents * * @category DataSource * * @example * ```typescript * // Create a KountaPlugin 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 kounta = KountaPlugin({ * history: TimeSpan(4, 'week'), * update_history: TimeSpan(1), * future: TimeSpan(2, 'week'), * poll: TimeSpan(1), * scope: new Set(['Roster', 'Timesheet']), * }) * ``` */ export declare function KountaPlugin(args?: KountaPluginDefinition): ELARASchema; //# sourceMappingURL=kounta.d.ts.map