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 MyobPlugin}. * * @category DataSource */ export declare type MyobScope = 'Banking' | 'Contact' | 'Ledger' | 'Inventory' | 'Payroll' | 'Purchase' | 'Report' | 'Sale' | 'TimeBilling'; /** * The environment variables to define an {@link MyobPlugin}. * * @category DataSource */ export declare type MyobEnv = { MYOB_APP_ID?: string; MYOB_APP_SECRET?: string; MYOB_FILE_ID?: string; MYOB_FILE_URI?: string; MYOB_USERNAME?: string; MYOB_PASSWORD?: string; }; /** * A {@link MyobPluginDefinition} to configure the {@link MyobPlugin}. * * @category DataSource */ export declare type MyobPluginDefinition = { /** the set of {@link MyobEnv}'s to apply to the API */ scope?: Set; /** 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 {@link Cache} for the DataSource. */ cache?: Cache; /** the configuration of the DataSource {@link Poll} */ poll?: TimeSpan; /** the environment variables to apply to the {@link MyobPlugin} */ env?: MyobEnv; }; /** * Create a streaming {@link DataSourceDefinition} for the MyobPlugin Essentials API with supporting diagnostic pages: {@link https://developer.myob.com/api/accountright/api-overview/getting-started/}. * * @param definition: the desired {@link MyobPluginDefinition}. * @return a {@link ELARASchema} containing a {@link MyobPluginDefinition} contents * * @category DataSource * * @example * ```typescript * //Create a MyobPlugin poll an initial four weeks of data, and then the last hour (and next week) of data from the API every `hour` for `Sale` and `Inventory` with default environment names. * const deputy = MyobPlugin({ * history: TimeSpan(4, 'week'), * update_history: TimeSpan(1), * future: TimeSpan(2, 'week'), * poll: TimeSpan(1), * scope: new Set(['Sale', 'Inventory']), * }) * ``` */ export declare function MyobPlugin(args?: MyobPluginDefinition): ELARASchema; //# sourceMappingURL=myob.d.ts.map