Type Aliases

This document contains the documentation for the type aliases available in the Toolbelt.


BaseSDE

BaseSDE = object

Properties

type

type: sdetypes | string


CachedSecret

CachedSecret = object

This type is used internally

Properties

key

key: string

Key of the secret made of chars that match [A-z0-9-_] and limited to 100 chars,


value

value: string

The stringified Value of the secret which is limited to 16384 chars.


CacheSettings

CacheSettings = object

Properties

ttl?

optional ttl: number


ClientTLS

ClientTLS = object

Properties

ca?

optional ca: string | Buffer

Certificate of the CA, this is relevant when endpoint that is called has an self-signed certificate. The certificate needs to be in PEM format.


cert

cert: string | Buffer

CLient Certificate in PEM format.


key

key: string | Buffer

Client Key in PEM format.


Conversation

Conversation = object

Properties

_metadata

_metadata: object


conversationHistoryRecords

conversationHistoryRecords: ConversationRecord[]


ConversationRecord

ConversationRecord = object & Record<string, unknown>

Type Declaration

agentParticipants?

optional agentParticipants: unknown

campaign?

optional campaign: unknown

coBrowseSessions?

optional coBrowseSessions: unknown

consumerParticipants?

optional consumerParticipants: unknown

conversationSurveys?

optional conversationSurveys: unknown

dialogs?

optional dialogs: unknown

info?

optional info: unknown

intents?

optional intents: unknown

interactions?

optional interactions: unknown

messageRecords?

optional messageRecords: MessageRecord[]

messageScores?

optional messageScores: unknown

messageStatuses?

optional messageStatuses: unknown

responseTime?

optional responseTime: unknown

sdes?

optional sdes: unknown

skillChanges?

optional skillChanges: unknown

summary?

optional summary: unknown

transfers?

optional transfers: unknown

unAuthSdes?

optional unAuthSdes: unknown

uniqueIntents?

optional uniqueIntents: unknown


ConversationSDEs

ConversationSDEs = object

Properties

sdes?

optional sdes: SDEsResponse


unAuthSdes?

optional unAuthSdes: SDEsResponse


FilesReplaced

FilesReplaced = string[]


ILpClient()

ILpClient = (service, path, options?) => Promise<Response>

Parameters

Name Type
service LpServices | string
path string
options? ILpClientOptions

Returns

Promise<Response>


ILpClientOptions

ILpClientOptions = object & RequestInit

Type Declaration

appKeySecretName?

optional appKeySecretName: string


KeywordScannerResult

KeywordScannerResult = object

Properties

message

message: string


sentBy

sentBy: string


sentTimestamp

sentTimestamp: number


tag

tag: string


LPMtlsOptions

LPMtlsOptions = object

Options specific to MTLS requests.

Properties

json?

optional json: boolean

Set this flag to true, to automatically stringify body + set correct content header. And parse response to json.


timeout?

optional timeout: number

Time in ms until request should timeout. Please be aware that MTLS call take longer then regular http calls.


LPMtlsResponse

LPMtlsResponse = object

Properties

body

body: unknown


headers

headers: Record<string, string>


statusCode

statusCode: number


MessageRecord

MessageRecord = object

Properties

messageData

messageData: object

file?

optional file: object

Name Type
file.caption string
file.relativePath? string
msg?

optional msg: object

Name Type
msg.text string

sentBy

sentBy: string


timeL

timeL: number


type

type: string


MTLSOptions

MTLSOptions = object

Options specific to MTLS requests.

Properties

allowSelfSigned?

optional allowSelfSigned: boolean

To ignore errors raised by self-signed certificates on the called endpoint. Alternative to this is providing the ca-cert as part of the clientTLS config.


json?

optional json: boolean

Set this flag to true, to automatically stringify body + set correct content header. And parse response to json.


timeout?

optional timeout: number

Time in ms until request should timeout. Please be aware that MTLS call take longer then regular http calls.


MTLSResponse

MTLSResponse = object

Properties

body?

optional body: unknown

Body if present. This usually is a string, when not using json flag. If the json flag is true, it will attempt to JSON.parse it. If that fails the original body will returned in string format.


headers

headers: Record<string, string>

Response Headers.


statusCode

statusCode: number

Status Code returned by Server.


ObjectStoreCredentials

ObjectStoreCredentials = object

Properties

password

password: string


username

username: string


OrchestratorInvocation

OrchestratorInvocation = object

Properties

headers?

optional headers: Record<string, string>

Invocation headers


payload

payload: unknown

Invocation Payload


retries?

optional retries: number

Default 3


retryFunction?

optional retryFunction: RetryFunction

This function is used to determine if a received status code/error should be retried or aborted. The default tactic is to retry on 429 and 5xx. This excludes retries on errors raised by the function.


uuid

uuid: string

function UUID


OrchestratorOptions

OrchestratorOptions = object

Properties

errorStrategy?

optional errorStrategy: ErrorStrategy

Defines the strategy to follow in case on error.


invokeParallel?

optional invokeParallel: boolean

If true, it will execute all invocations in parallel


json?

optional json: boolean

Set this flag to true, to automatically stringify response body to json.


timeout?

optional timeout: number

Request timeout for each invocation


OrchestratorResponse

OrchestratorResponse = object

Properties

body?

optional body: unknown

Response body, should be a JSON object or string


error?

optional error: object

If present will contain error code and message

Name Type
code string
message string

headers?

optional headers: Record<string, string>

Response headers


statusCode?

optional statusCode: number

Status Code returned by the invoked function.


uuid

uuid: string

function UUID that was invoked


ReplacementFile

ReplacementFile = object

Properties

body

body: Buffer


contentType

contentType: string


ReplacePredicate()

ReplacePredicate = (path) => boolean

Parameters

Name Type
path string

Returns

boolean


RetryFunction()

RetryFunction = (statusCode?, error?) => boolean

Parameters

Name Type
statusCode? number
error? unknown

Returns

boolean


SDE

SDE = BaseSDE & Record<string, unknown>


SDEevent

SDEevent = object & Record<string, unknown>

Type Declaration

serverTimeStamp

serverTimeStamp: string


SDEsResponse

SDEsResponse = object

Properties

events

events: SDEevent[]


SecretClientOptions

SecretClientOptions = object

Properties

cache

cache: CacheSettings


SecretEntry

SecretEntry = object

Properties

key

key: string

Key of the secret made of chars that match [A-z0-9-_] and limited to 100 chars,


value

value: unknown

Value of the secret which is limited to 16384 chars. IF the value cannot be parsed it will be string.


SecretRequestOptions

SecretRequestOptions = object

Properties

timeout

timeout: number

timeout for request in ms, default: 5 minutes


useCache

useCache: boolean

use cache for