Options
All
  • Public
  • Public/Protected
  • All
Menu

@azure/core-lro

Package version

Index

Type aliases

CancelOnProgress

CancelOnProgress: () => void

CancelOnProgress is used as the return value of a Poller's onProgress method. When a user invokes onProgress, they're required to pass in a function that will be called as a callback with the new data received each time the poll operation is updated. onProgress returns a function that will prevent any further update to reach the original callback.

Type declaration

    • (): void
    • Returns void

GetLroStatusFromResponse

GetLroStatusFromResponse<T>: (response: LroResponse<T>) => LroStatus<T>

The type of the getLROStatusFromResponse method. It takes the response as input and returns along the response whether the operation has finished.

Type parameters

  • T

Type declaration

LroMode

LroMode: "Location" | "Body"

The type of which LRO implementation being followed by a specific API.

LroResourceLocationConfig

LroResourceLocationConfig: "azure-async-operation" | "location" | "original-uri"

The potential location of the result of the LRO if specified by the LRO extension in the swagger.

LroStatus

LroStatus<T>: LroTerminalState<T> | LroInProgressState<T>

The type of an LRO state which is a tagged union of terminal and in-progress states.

Type parameters

  • T

PollProgressCallback

PollProgressCallback<TState>: (state: TState) => void

PollProgressCallback is the type of the callback functions sent to onProgress. These functions will receive a TState that is defined by your implementation of the Poller class.

Type parameters

  • TState

Type declaration

    • (state: TState): void
    • Parameters

      • state: TState

      Returns void

ResumablePollOperationState

ResumablePollOperationState<T>: PollOperationState<T> & { config?: LroConfig; initialRawResponse?: RawResponse; pollingURL?: undefined | string }

Type of a polling operation state that can actually be resumed.

Type parameters

  • T

Functions

calculatePollingIntervalFromDate

  • calculatePollingIntervalFromDate(retryAfterDate: Date, defaultIntervalInMs: number): number

createGetLroStatusFromResponse

createInitializeState

  • Creates a callback to be used to initialize the polling operation state.

    Type parameters

    • TResult

    Parameters

    Returns (response: LroResponse<TResult>) => boolean

    callback that initializes the state of the polling operation

createPoll

deserializeState

findResourceLocation

  • findResourceLocation(requestMethod: string, rawResponse: RawResponse, requestPath: string): string | undefined

getAzureAsyncOperation

  • getAzureAsyncOperation(rawResponse: RawResponse): string | undefined

getLocation

  • getLocation(rawResponse: RawResponse): string | undefined

getOperationLocation

  • getOperationLocation(rawResponse: RawResponse): string | undefined

getPollingUrl

  • getPollingUrl(rawResponse: RawResponse, defaultPath: string): string
  • Detects where the continuation token is and returns it. Notice that azure-asyncoperation must be checked first before the other location headers because there are scenarios where both azure-asyncoperation and location could be present in the same response but azure-asyncoperation should be the one to use for polling.

    Parameters

    Returns string

getProvisioningState

  • getProvisioningState(rawResponse: RawResponse): string

getStatus

inferLroMode

isCanceled

  • isCanceled<TResult, TState>(operation: { state: TState; status: string }): boolean

isLocationPollingDone

  • isLocationPollingDone(rawResponse: RawResponse, status: string): boolean

isPollingDone

  • isPollingDone(result: { rawResponse: RawResponse; status: string }): boolean

isSucceededStatus

  • isSucceededStatus(status: string): boolean

isUnexpectedInitialResponse

  • isUnexpectedInitialResponse(rawResponse: RawResponse): boolean

isUnexpectedPollingResponse

  • isUnexpectedPollingResponse(rawResponse: RawResponse): boolean

processBodyPollingOperationResult

  • processBodyPollingOperationResult<TResult, TState>(state: TState): (response: LroResponse<TResult>) => LroStatus<TResult>

processLocationPollingOperationResult

processPassthroughOperationResult

sendFinalRequest

Generated using TypeDoc