/** This is spectacularly generated code by spectacular based on Qlik Cloud Services APIs */ import Auth from '../auth/auth.js'; import ListableResource from '../listable.js'; import type { Config } from '../types/types.js'; export type Href = { /** @example "http://example.com" */ href: string; [key: string]: any; }; export type PostTaskBody = { /** The ID of the app. @example "116dbfae-7fb9-4983-8e23-5ccd8c508722" */ appId: string; /** A flag that indicates whether a reload is triggered when data of the app is changed */ autoReload?: boolean; /** A flag that indicates whether it is a partial reload or not for the auto reload */ autoReloadPartial?: boolean; /** The time that the task will stop recurring. If the time zone is missing, this is a combined date-time value expressing a time with a fixed UTC offset (formatted according to RFC3339). If a time zone is given, the zone offset must be omitted. @example "2022-10-12T23:59:00" */ endDateTime?: string; /** The task is partial reload or not */ partial?: boolean; /** List of RECUR lines for a recurring event, as specified in RFC5545. Note that DTSTART and DTEND lines are not allowed in this field; event start and end times are specified in the start and end fields. This field is omitted for single events or instances of recurring events @example ["RRULE:FREQ=DAILY;INTERVAL=1;BYHOUR=11;BYMINUTE=18;BYSECOND=0","RRULE:FREQ=WEEKLY;INTERVAL=2;BYDAY=MO,TU;BYHOUR=13;BYMINUTE=17;BYSECOND=0"] */ recurrence?: Array; /** The time that the task execution start recurring. If the time zone is missing, this is a combined date-time value expressing a time with a fixed UTC offset (formatted according to RFC3339). If a time zone is given, the zone offset must be omitted. Field startDateTime should not be before the Unix epoch 00:00:00 UTC on 1 January 1970. Note that the empty string value with the empty recurrence array indicates the scheduled job is not set. @example "2022-09-19T11:18:00" */ startDateTime?: string; /** The time zone in which the time is specified. (Formatted as an IANA Time Zone Database name, e.g. Europe/Zurich.) This field specifies the time zone in which the event start/end are expanded. If missing the start/end fields must specify a UTC offset in RFC3339 format. @example "America/Toronto" */ timeZone: string; /** Type of task being created - only contains the "scheduled_reload" value. Type value is not used for creating a schedule reload. It has been deprecated since 2022-04-05. @example "scheduled_reload" */ type?: 'scheduled_reload' | string; [key: string]: any; }; export type PutTaskBody = { /** The ID of the app. @example "116dbfae-7fb9-4983-8e23-5ccd8c508722" */ appId?: string; /** A flag that indicates whether a reload is triggered when data of the app is changed */ autoReload?: boolean; /** A flag that indicates whether it is a partial reload or not for the auto reload */ autoReloadPartial?: boolean; /** The time that the task will stop recurring. If the time zone is missing, this is a combined date-time value expressing a time with a fixed UTC offset (formatted according to RFC3339). If a time zone is given, the zone offset must be omitted. @example "2022-10-12T23:59:00" */ endDateTime?: string; /** The task is partial reload or not */ partial?: boolean; /** List of RECUR lines for a recurring event, as specified in RFC5545. Note that DTSTART and DTEND lines are not allowed in this field; event start and end times are specified in the start and end fields. This field is omitted for single events or instances of recurring events @example ["RRULE:FREQ=DAILY;INTERVAL=1;BYHOUR=11;BYMINUTE=18;BYSECOND=0","RRULE:FREQ=WEEKLY;INTERVAL=2;BYDAY=MO,TU;BYHOUR=13;BYMINUTE=17;BYSECOND=0"] */ recurrence?: Array; /** The time that the task execution start recurring. If the time zone is missing, this is a combined date-time value expressing a time with a fixed UTC offset (formatted according to RFC3339). If a time zone is given, the zone offset must be omitted. Field startDateTime should not be before the Unix epoch 00:00:00 UTC on 1 January 1970. Note that the empty string value with the empty recurrence array indicates the scheduled job is not set. @example "2022-09-19T11:18:00" */ startDateTime?: string; /** The time zone in which the time is specified. (Formatted as an IANA Time Zone Database name, e.g. Europe/Zurich.) This field specifies the time zone in which the event start/end are expanded. If missing the start/end fields must specify a UTC offset in RFC3339 format. @example "America/Toronto" */ timeZone?: string; /** Toggle for enabling and disabling the reload task @example "Disabled" */ state?: 'Enabled' | 'Disabled' | 'Completed' | string; [key: string]: any; }; export type SelfLink = { self: Href; [key: string]: any; }; /** @param appId - The ID of the app. @param autoReload - A flag that indicates whether a reload is triggered when data of the app is changed @param autoReloadPartial - A flag that indicates whether it is a partial reload or not for the auto reload @param endDateTime - The time that the task will stop recurring. If the time zone is missing, this is a combined date-time value expressing a time with a fixed UTC offset (formatted according to RFC3339). If a time zone is given, the zone offset must be omitted. @param partial - The task is partial reload or not @param recurrence - List of RECUR lines for a recurring event, as specified in RFC5545. Note that DTSTART and DTEND lines are not allowed in this field; event start and end times are specified in the start and end fields. This field is omitted for single events or instances of recurring events @param startDateTime - The time that the task execution start recurring. If the time zone is missing, this is a combined date-time value expressing a time with a fixed UTC offset (formatted according to RFC3339). If a time zone is given, the zone offset must be omitted. Field startDateTime should not be before the Unix epoch 00:00:00 UTC on 1 January 1970. Note that the empty string value with the empty recurrence array indicates the scheduled job is not set. @param timeZone - The time zone in which the time is specified. (Formatted as an IANA Time Zone Database name, e.g. Europe/Zurich.) This field specifies the time zone in which the event start/end are expanded. If missing the start/end fields must specify a UTC offset in RFC3339 format. @param fortressId - The fortress ID of the application @param id - The ID of the task. @param lastExecutionTime - The last time the task executed. @param links - @param log - The reason why the task was disabled. @param nextExecutionTime - The next time the task will execute. @param spaceId - The space ID of the application @param state - Toggle for enabling and disabling the reload task @param tenantId - The ID of the tenant who owns the task. @param userId - The ID of the user who owns the task. @param auth - Auth object used to make requests */ export declare class Task { auth: Auth; appId: string; autoReload?: boolean; autoReloadPartial?: boolean; endDateTime?: string; partial?: boolean; recurrence?: Array; startDateTime?: string; timeZone: string; fortressId?: string; id: string; lastExecutionTime?: string; links: SelfLink; log?: string; nextExecutionTime?: string; spaceId?: string; state: 'Enabled' | 'Disabled' | 'Completed' | string; tenantId: string; userId: string; [key: string]: any; constructor({ appId, autoReload, autoReloadPartial, endDateTime, partial, recurrence, startDateTime, timeZone, fortressId, id, lastExecutionTime, links, log, nextExecutionTime, spaceId, state, tenantId, userId, ...rest }: { appId: string; autoReload?: boolean; autoReloadPartial?: boolean; endDateTime?: string; partial?: boolean; recurrence?: Array; startDateTime?: string; timeZone: string; fortressId?: string; id: string; lastExecutionTime?: string; links: SelfLink; log?: string; nextExecutionTime?: string; spaceId?: string; state: 'Enabled' | 'Disabled' | 'Completed' | string; tenantId: string; userId: string; }, auth?: Auth); /** Delete a task. */ delete(): Promise; /** Update an existing task. @param data - Request body specifying the task parameters. */ set(data: PutTaskBody): Promise; } export declare class ReloadTasks { auth: Auth; config: Config; constructor(config: Config | Auth); /** Find and return a task. @param taskId - The unique identifier of the task. */ get(taskId: string): Promise; /** Find and return the tasks that the user can access. @param appId - The case sensitive string used to search for a task by app ID. @param limit - The maximum number of resources to return for a request. The limit must be an integer between 1 and 100 (inclusive). @param next - The cursor to the next page of resources. Provide either the next or prev cursor, but not both. @param partial - The boolean value used to search for a task is partial or not @param prev - The cursor to the previous page of resources. Provide either the next or prev cursor, but not both. */ getReloadTasks(queryParams?: { appId?: string; limit?: number; next?: string; partial?: boolean; prev?: string; }): Promise>; /** Create a task for a specified app. @param data - Request body specifying the task parameters. */ create(data: PostTaskBody): Promise; }