interface ITasksClient {
    cancelOperation(args: {
        operationToken: string;
        repoId: string;
    }): Promise<void>;
    getOperationStatusAndProgress(args: {
        operationToken: string;
        repoId: string;
    }): Promise<OperationProgress>;
}

Implemented by

Methods

    • Cancels an operation.
    • Provide an operationToken to cancel the operation, if possible. Should be used if an operation was created in error, or is no longer necessary.
    • Rollbacks must be done manually. For example, if a copy operation is started and is halfway complete when canceled, the client application is responsible for cleaning up the files that were successfully copied before the operation was canceled.

    Parameters

    • args: {
          operationToken: string;
          repoId: string;
      }
      • operationToken: string

        The operation token

      • repoId: string

        The requested repository ID

    Returns Promise<void>

    Cancel operation successfully.

    • Returns the status of an operation.
    • Provide an operationToken (returned in other asynchronous routes) to get the operation status, progress, and any errors that may have occurred. When the operation is completed, the Location header can be inspected as a link to the modified resources (if relevant).
    • OperationStatus can be one of the following values: NotStarted, InProgress, Completed, or Failed.

    Parameters

    • args: {
          operationToken: string;
          repoId: string;
      }
      • operationToken: string

        The operation token

      • repoId: string

        The requested repository ID

    Returns Promise<OperationProgress>

    Get completed or failed operation status with no result successfully.