UNPKG

@signalwire/compatibility-api

Version:
195 lines (177 loc) 6.92 kB
/** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ import Page = require('../../../../../base/Page'); import Response = require('../../../../../http/response'); import V1 = require('../../../V1'); import { SerializableClass } from '../../../../../interfaces'; /** * Initialize the WorkflowCumulativeStatisticsList * * @param version - Version of the resource * @param workspaceSid - The SID of the Workspace that contains the Workflow. * @param workflowSid - Returns the list of Tasks that are being controlled by the Workflow with the specified Sid value */ declare function WorkflowCumulativeStatisticsList(version: V1, workspaceSid: string, workflowSid: string): WorkflowCumulativeStatisticsListInstance; /** * Options to pass to fetch * * @property endDate - Only include usage that occurred on or before this date * @property minutes - Only calculate statistics since this many minutes in the past * @property splitByWaitTime - A comma separated list of values that describes the thresholds, in seconds, to calculate statistics on * @property startDate - Only calculate statistics from on or after this date * @property taskChannel - Only calculate cumulative statistics on this TaskChannel */ interface WorkflowCumulativeStatisticsInstanceFetchOptions { endDate?: Date; minutes?: number; splitByWaitTime?: string; startDate?: Date; taskChannel?: string; } interface WorkflowCumulativeStatisticsListInstance { /** * @param sid - sid of instance */ (sid: string): WorkflowCumulativeStatisticsContext; /** * Constructs a workflow_cumulative_statistics */ get(): WorkflowCumulativeStatisticsContext; /** * Provide a user-friendly representation */ toJSON(): any; } interface WorkflowCumulativeStatisticsPayload extends WorkflowCumulativeStatisticsResource, Page.TwilioResponsePayload { } interface WorkflowCumulativeStatisticsResource { account_sid: string; avg_task_acceptance_time: number; end_time: Date; reservations_accepted: number; reservations_canceled: number; reservations_created: number; reservations_rejected: number; reservations_rescinded: number; reservations_timed_out: number; split_by_wait_time: object; start_time: Date; tasks_canceled: number; tasks_completed: number; tasks_deleted: number; tasks_entered: number; tasks_moved: number; tasks_timed_out_in_workflow: number; url: string; wait_duration_until_accepted: object; wait_duration_until_canceled: object; workflow_sid: string; workspace_sid: string; } interface WorkflowCumulativeStatisticsSolution { workflowSid?: string; workspaceSid?: string; } declare class WorkflowCumulativeStatisticsContext { /** * Initialize the WorkflowCumulativeStatisticsContext * * @param version - Version of the resource * @param workspaceSid - The SID of the Workspace with the resource to fetch * @param workflowSid - Returns the list of Tasks that are being controlled by the Workflow with the specified Sid value */ constructor(version: V1, workspaceSid: string, workflowSid: string); /** * fetch a WorkflowCumulativeStatisticsInstance * * @param callback - Callback to handle processed record */ fetch(callback?: (error: Error | null, items: WorkflowCumulativeStatisticsInstance) => any): Promise<WorkflowCumulativeStatisticsInstance>; /** * fetch a WorkflowCumulativeStatisticsInstance * * @param opts - Options for request * @param callback - Callback to handle processed record */ fetch(opts?: WorkflowCumulativeStatisticsInstanceFetchOptions, callback?: (error: Error | null, items: WorkflowCumulativeStatisticsInstance) => any): Promise<WorkflowCumulativeStatisticsInstance>; /** * Provide a user-friendly representation */ toJSON(): any; } declare class WorkflowCumulativeStatisticsInstance extends SerializableClass { /** * Initialize the WorkflowCumulativeStatisticsContext * * @param version - Version of the resource * @param payload - The instance payload * @param workspaceSid - The SID of the Workspace that contains the Workflow. * @param workflowSid - Returns the list of Tasks that are being controlled by the Workflow with the specified Sid value */ constructor(version: V1, payload: WorkflowCumulativeStatisticsPayload, workspaceSid: string, workflowSid: string); private _proxy: WorkflowCumulativeStatisticsContext; accountSid: string; avgTaskAcceptanceTime: number; endTime: Date; /** * fetch a WorkflowCumulativeStatisticsInstance * * @param callback - Callback to handle processed record */ fetch(callback?: (error: Error | null, items: WorkflowCumulativeStatisticsInstance) => any): Promise<WorkflowCumulativeStatisticsInstance>; /** * fetch a WorkflowCumulativeStatisticsInstance * * @param opts - Options for request * @param callback - Callback to handle processed record */ fetch(opts?: WorkflowCumulativeStatisticsInstanceFetchOptions, callback?: (error: Error | null, items: WorkflowCumulativeStatisticsInstance) => any): Promise<WorkflowCumulativeStatisticsInstance>; reservationsAccepted: number; reservationsCanceled: number; reservationsCreated: number; reservationsRejected: number; reservationsRescinded: number; reservationsTimedOut: number; splitByWaitTime: any; startTime: Date; tasksCanceled: number; tasksCompleted: number; tasksDeleted: number; tasksEntered: number; tasksMoved: number; tasksTimedOutInWorkflow: number; /** * Provide a user-friendly representation */ toJSON(): any; url: string; waitDurationUntilAccepted: any; waitDurationUntilCanceled: any; workflowSid: string; workspaceSid: string; } declare class WorkflowCumulativeStatisticsPage extends Page<V1, WorkflowCumulativeStatisticsPayload, WorkflowCumulativeStatisticsResource, WorkflowCumulativeStatisticsInstance> { /** * Initialize the WorkflowCumulativeStatisticsPage * * @param version - Version of the resource * @param response - Response from the API * @param solution - Path solution */ constructor(version: V1, response: Response<string>, solution: WorkflowCumulativeStatisticsSolution); /** * Build an instance of WorkflowCumulativeStatisticsInstance * * @param payload - Payload response from the API */ getInstance(payload: WorkflowCumulativeStatisticsPayload): WorkflowCumulativeStatisticsInstance; /** * Provide a user-friendly representation */ toJSON(): any; } export { WorkflowCumulativeStatisticsContext, WorkflowCumulativeStatisticsInstance, WorkflowCumulativeStatisticsInstanceFetchOptions, WorkflowCumulativeStatisticsList, WorkflowCumulativeStatisticsListInstance, WorkflowCumulativeStatisticsPage, WorkflowCumulativeStatisticsPayload, WorkflowCumulativeStatisticsResource, WorkflowCumulativeStatisticsSolution }