interface ITasksClient {
    cancelTasks(
        args: { repositoryId: string; taskIds?: null | string[] },
    ): Promise<LfRepositoryClientV2.CancelTasksResponse>;
    listTasks(
        args: { repositoryId: string; taskIds?: null | string[] },
    ): Promise<LfRepositoryClientV2.TaskCollectionResponse>;
    startTestTask(
        args: {
            hasError?: boolean;
            hasRedirectUri?: boolean;
            operationTime?: number;
            repositoryId: string;
        },
    ): Promise<LfRepositoryClientV2.StartTaskResponse>;
}

Implemented by

Methods

    • Starts the cancellation for a set of one or more tasks.
    • Provide comma-separated list of task IDs to cancel. Should be used if an operation was created in error, or is no longer necessary.
    • Check the status of the task to determine if the task has been cancelled successfully.
    • Leave the taskIds query parameter empty, to cancel the list of all the task IDs associated with the current access token.
    • 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.
    • Required OAuth scope: None

    Parameters

    • args: { repositoryId: string; taskIds?: null | string[] }
      • repositoryId: string

        The requested repository ID

      • OptionaltaskIds?: null | string[]

        (optional) An array of task IDs. Leave this parameter empty to cancel the list of all the tasks associated with the current access token.

    Returns Promise<LfRepositoryClientV2.CancelTasksResponse>

    Successfully canceled requested tasks. Returned successfully canceled tasks.

    • Returns the status of a set of one or more tasks.
    • Provide a comma-separated list of task IDs to get the task status, progress, and any errors that may have occurred.
    • Leave the taskIds query parameter empty, to get the list of all the task IDs associated with the current access token.
    • TaskStatus can be one of the following values: NotStarted, InProgress, Completed, Cancelled, or Failed.
    • This API employs long polling technique and could return the result immediately (e.g. if the export operation is failed or completed successfully) or after at most 60 seconds.
    • Required OAuth scope: None

    Parameters

    • args: { repositoryId: string; taskIds?: null | string[] }
      • repositoryId: string

        The requested repository ID

      • OptionaltaskIds?: null | string[]

        (optional) An array of task IDs. Leave this parameter empty to get the list of all the tasks associated with the current access token.

    Returns Promise<LfRepositoryClientV2.TaskCollectionResponse>

    Returned a list of tasks.

  • Starts a test operation that behaves according to specified parameters.

    Parameters

    • args: {
          hasError?: boolean;
          hasRedirectUri?: boolean;
          operationTime?: number;
          repositoryId: string;
      }
      • OptionalhasError?: boolean

        (optional) If mock operation should return "failed" status.

      • OptionalhasRedirectUri?: boolean

        (optional) If operation adds redirect uri.

      • OptionaloperationTime?: number

        (optional) The time the operation will take to complete.

      • repositoryId: string

        The requested repository id.

    Returns Promise<LfRepositoryClientV2.StartTaskResponse>

    Test task was started successfully.