/*! * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. */ import { CosmosDbClient } from '../client'; import { InterceptorProcessor } from '../interceptor'; import { ResolvedTaskDocument } from './document'; import { SerializedTask, TaskBase, TaskStatus } from './types'; /** * Representation of a task that cannot have its payload saved because it is * produced from operations that only provide a partial copy of the payload, * such as {@link TaskClient.listSummary} and {@link TaskClient.iterateSummary}. * * @typeParam T - Type of the task's payload data. Can be any type, but the * data should be directly serializable to JSON. This type can * also be tailored to the data projected by the operation that * produced this task. * * @public */ export default class ReadonlyTaskImpl implements ReadonlyTask { static create(client: CosmosDbClient, interceptor: InterceptorProcessor, document: ResolvedTaskDocument): ReadonlyTaskImpl; get id(): string; get type(): string; get status(): TaskStatus; get enabled(): boolean; get createTime(): Date; get nextRunTime(): Date | undefined; get lastUpdatedTime(): Date; get lastRun(): { startTime: Date; finishTime: Date; succeeded: boolean; } | undefined; get currentRunStartTime(): Date | undefined; get deliveries(): number; get attempts(): number; get runs(): number; get payload(): T; get interval(): string | number | undefined; get lastRunTime(): Date | undefined; private _data; private _interceptor; private constructor(); enable(): Promise; disable(): Promise; delete(): Promise; toJSON(): SerializedTask; } /** * Representation of a task that cannot have its payload saved because it is * produced from operations that only provide a partial copy of the payload, * such as {@link TaskClient.listSummary} and {@link TaskClient.iterateSummary}. * * @public */ export interface ReadonlyTask extends TaskBase { /** * Enable the task for processing. * * @public */ enable(): Promise; /** * Disable the task for processing. If the task is currently running, the * processor will be informed that the task has been disabled. * * @public */ disable(): Promise; /** * Delete this task from the database. The operation is idempotent and will * succeed even if the task has already been deleted. * * @public */ delete(): Promise; } //# sourceMappingURL=readonly.d.ts.map