botbuilder-azure-blobs package
Classes
BlobsStorage |
BlobsStorage provides a Storage implementation backed by Azure Blob Storage |
BlobsTranscriptStore |
BlobsTranscriptStore is a TranscriptStore that persists transcripts in Azure Blob Storage |
Interfaces
BlobsStorageOptions |
Optional settings for BlobsStorage |
BlobsTranscriptStoreOptions |
Optional settings for BlobsTranscriptStore |
Type Aliases
IgnoreError |
Describes an ignore error function |
Functions
ignore |
Wrap a promise and provide a function to decide whether to ignore a type of error |
is |
Ignore RestErrors that match a set of status codes. |
sanitize |
Ensures that |
Function Details
ignoreError<T>(Promise<T>, IgnoreError)
Wrap a promise and provide a function to decide whether to ignore a type of error
function ignoreError<T>(promise: Promise<T>, ignore: IgnoreError): Promise<T | null>
Parameters
- promise
-
Promise<T>
a promise to await
- ignore
- IgnoreError
method that returns true if an error should be ignored
Returns
Promise<T | null>
a promise that resolves to T
or null
after ignoring any matched errors
isStatusCodeError(number[])
Ignore RestErrors that match a set of status codes.
function isStatusCodeError(codes: number[]): IgnoreError
Parameters
- codes
-
number[]
HTTP status codes that should not be considered errors
Returns
a function that accepts an error and returns true if it represents one of the ignored status codes
sanitizeBlobKey(string, BlobsTranscriptStoreOptions)
Ensures that key
is a properly sanitized Azure Blob Storage key. It should be URI encoded,
no longer than 1024 characters, and contain no more than 254 slash ("/") chars.
function sanitizeBlobKey(key: string, options?: BlobsTranscriptStoreOptions): string
Parameters
- key
-
string
string blob key to sanitize
- options
- BlobsTranscriptStoreOptions
Optional settings for BlobsTranscriptStore
Returns
string
sanitized blob key