UNPKG

@emergentmethods/asknews-typescript-sdk

Version:
133 lines (132 loc) 4.49 kB
/** * AskNews API * AskNews API [![status](https://status.asknews.app/api/badge/2/status?style=for-the-badge)](https://status.asknews.app/status/prod) * * The version of the OpenAPI document: 0.24.66 * Contact: contact@emergentmethods.ai * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import type { TriggersInner } from './TriggersInner'; import type { SourcesInner } from './SourcesInner'; import type { Report1 } from './Report1'; /** * * @export * @interface CreateAlertRequest */ export interface CreateAlertRequest { /** * * @type {string} * @memberof CreateAlertRequest */ query?: string | null; /** * * @type {Array<SourcesInner>} * @memberof CreateAlertRequest */ sources?: Array<SourcesInner>; /** * * @type {string} * @memberof CreateAlertRequest */ alertType?: CreateAlertRequestAlertTypeEnum | null; /** * The model that is used to check if the alert conditions are satisfied by sources (this is not the same as the model used to write the report.)Defaults to gpt-4o. * @type {string} * @memberof CreateAlertRequest */ model?: CreateAlertRequestModelEnum; /** * How often or when to check sources for this alert, specified as a cron expression. Examples: '0 * * * *' (hourly), '0 9 * * *' (daily at 9am), '0 9 * * 1' (Mondays at 9am). See https://crontab.run/ for more examples. * @type {string} * @memberof CreateAlertRequest */ cron: string; /** * * @type {Array<TriggersInner>} * @memberof CreateAlertRequest */ triggers: Array<TriggersInner>; /** * Whether to always trigger the actions when sources are scanned. This skips the check for if the alert conditions are satisfied and run triggers immediately. Defaults to False. * @type {boolean} * @memberof CreateAlertRequest */ alwaysTrigger?: boolean; /** * Whether to repeat the alert. Default is True. If False, the alert will be disabled after it triggers once. * @type {boolean} * @memberof CreateAlertRequest */ repeat?: boolean; /** * Whether the alert is active or not. Default is True. * @type {boolean} * @memberof CreateAlertRequest */ active?: boolean; /** * * @type {Date} * @memberof CreateAlertRequest */ expiresAt?: Date | null; /** * * @type {Report1} * @memberof CreateAlertRequest */ report?: Report1 | null; /** * * @type {string} * @memberof CreateAlertRequest */ title?: string | null; /** * * @type {string} * @memberof CreateAlertRequest */ shareLink?: string | null; } /** * @export */ export declare const CreateAlertRequestAlertTypeEnum: { readonly AlwaysAlertWhen: "AlwaysAlertWhen"; readonly AlertOnceIf: "AlertOnceIf"; readonly ReportAbout: "ReportAbout"; }; export type CreateAlertRequestAlertTypeEnum = typeof CreateAlertRequestAlertTypeEnum[keyof typeof CreateAlertRequestAlertTypeEnum]; /** * @export */ export declare const CreateAlertRequestModelEnum: { readonly MetaLlamaMetaLlama318BInstruct: "meta-llama/Meta-Llama-3.1-8B-Instruct"; readonly Gpt4oMini: "gpt-4o-mini"; readonly Gpt5Mini: "gpt-5-mini"; readonly Gpt5Nano: "gpt-5-nano"; readonly Gpt4o: "gpt-4o"; readonly O3Mini: "o3-mini"; readonly MetaLlamaMetaLlama3370BInstruct: "meta-llama/Meta-Llama-3.3-70B-Instruct"; readonly Gpt4120250414: "gpt-4.1-2025-04-14"; readonly Gpt41Nano20250414: "gpt-4.1-nano-2025-04-14"; readonly Gpt41Mini20250414: "gpt-4.1-mini-2025-04-14"; }; export type CreateAlertRequestModelEnum = typeof CreateAlertRequestModelEnum[keyof typeof CreateAlertRequestModelEnum]; /** * Check if a given object implements the CreateAlertRequest interface. */ export declare function instanceOfCreateAlertRequest(value: object): value is CreateAlertRequest; export declare function CreateAlertRequestFromJSON(json: any): CreateAlertRequest; export declare function CreateAlertRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateAlertRequest; export declare function CreateAlertRequestToJSON(json: any): CreateAlertRequest; export declare function CreateAlertRequestToJSONTyped(value?: CreateAlertRequest | null, ignoreDiscriminator?: boolean): any;