Module andiskills/lib/contracts/engagements/1.0.0

Index

Type aliases

AlphaValidationOptions

AlphaValidationOptions: { ignore?: string | RegExp; locale?: Locale; message?: string; type: IsAlpha }

Type declaration

  • Optional ignore?: string | RegExp

    A string containing characters to be ignored.

  • Optional locale?: Locale

    The locale of the input string. Defaults to en-US.

  • Optional message?: string

    The message to display if the response fails validation. If unspecified, displays a generic message.

  • type: IsAlpha

    Validates that a string contains only letters.

AlphanumericValidationOptions

AlphanumericValidationOptions: { ignore?: string | RegExp; locale?: Locale; message?: string; type: IsAlphanumeric }

Type declaration

  • Optional ignore?: string | RegExp

    A string containing characters to be ignored.

  • Optional locale?: Locale

    The locale of the input string. Defaults to en-US.

  • Optional message?: string

    The message to display if the response fails validation. If unspecified, displays a generic message.

  • type: IsAlphanumeric

    Validates that a string contains only letters and numbers.

Choice

Choice: { choiceId: string; clickedStyle?: ClickedStyle; text: string }

Type declaration

  • choiceId: string
  • Optional clickedStyle?: ClickedStyle
  • text: string

ComparisonOperator

ComparisonOperator: "=" | "!=" | ">" | "<" | ">=" | "<=" | "IN" | "NOT IN"

Condition

ConditionalOperator

ConditionalOperator: "AND" | "OR" | "NOT"

CurrencyMaskOptions

CurrencyMaskOptions: NumericMaskOptions & { currency: string; type: Currency }

DateMaskOptions

DateMaskOptions: { max?: Date; min?: Date; type: Date }

Type declaration

  • Optional max?: Date

    The latest valid date, inclusive.

  • Optional min?: Date

    The earliest valid date, inclusive.

  • type: Date

DialogueInputData

DialogueInputData: PromptInputData | FormInputData

EmailValidationOptions

EmailValidationOptions: { hostBlacklist?: string[]; message?: string; type: IsEmail }

Type declaration

  • Optional hostBlacklist?: string[]

    A list of hosts to disallow (e.g. ["gmail.com"] will fail to validate "myemail@gmail.com")

  • Optional message?: string

    The message to display if the response fails validation. If unspecified, displays a generic message.

  • type: IsEmail

    Validates that a string is a valid email.

FormMetadata

FormMetadata: { id: string }

Type declaration

  • id: string

    A unique identifier for the form.

FormPrompt

FormPrompt: TextPrompt | SelectPrompt & { condition?: PromptCondition }

LengthValidationOptions

LengthValidationOptions: { max?: number; message?: string; min?: number; type: IsLength }

Type declaration

  • Optional max?: number

    The maximum length of the string.

  • Optional message?: string

    The message to display if the response fails validation. If unspecified, displays a generic message.

  • Optional min?: number

    The minimum length of the string.

  • type: IsLength

    Validates that a string is of a certain length.

MaskOptions

NumberMaskOptions

NumberMaskOptions: NumericMaskOptions & { isPercentage?: boolean; type: Number }

NumericMaskOptions

NumericMaskOptions: { max?: number; min?: number; padFractionalZeros?: boolean; scale?: number; signed?: boolean }

Type declaration

  • Optional max?: number

    The maximum valid number, inclusive.

  • Optional min?: number

    The minimum valid number, inclusive.

  • Optional padFractionalZeros?: boolean

    Pads the number with trailing zeros after the radix. The number of zeros is controlled by the scale.

  • Optional scale?: number

    The number of digits allowed after the radix.

  • Optional signed?: boolean

    Allows the number to contain a positive or negative sign.

NumericValidationOptions

NumericValidationOptions: { message?: string; no_symbols?: boolean; type: IsNumeric }

Type declaration

  • Optional message?: string

    The message to display if the response fails validation. If unspecified, displays a generic message.

  • Optional no_symbols?: boolean

    If true, the validator will reject numeric strings that feature a symbol (e.g. +, -, or .)

  • type: IsNumeric

    Validates that a string contains only numbers.

OperatorCondition

OperatorCondition: OperatorCondition[] | Condition | Operator

PatternMaskOptions

PatternMaskOptions: { pattern: string; type: Pattern }

Type declaration

  • pattern: string

    The expected pattern for the input. The following wildcards are allowed: A = alphabetical character 0 = numeric digit

    • = any value These wildcards can be escaped by adding a backslash () preceding the wildcard. Examples:

    000.000.0000 allows 123.456.7890 and 555.555.5555, but not ABC.DEF.GHIJ or 123.456 AAA-AAAA allows ABC-DEFG and XXX-YYZZ, but not 123-4567 or ABC-1234

  • type: Pattern

Prompt

Prompt: { availableChoices: Choice[]; pastUserChoices: (Choice | Choice[])[]; promptStyle?: PromptStyle; promptType: PromptType }

Type declaration

PromptAnswer

PromptAnswer: number | string | boolean | number[] | string[]

PromptEventData

PromptEventData: { allUserChoices: (Choice | Choice[])[]; initiatingEventId: string }

Type declaration

  • allUserChoices: (Choice | Choice[])[]
  • initiatingEventId: string

RegexValidationOptions

RegexValidationOptions: { flags?: string; message?: string; pattern: string | RegExp; type: Matches }

Type declaration

  • Optional flags?: string
  • Optional message?: string

    The message to display if the response fails validation. If unspecified, displays a generic message.

  • pattern: string | RegExp
  • type: Matches

    Validates that a string matches a regular expression. Pattern can be specified as a RegExp or a string with flags.

SelectPrompt

SelectPrompt: { key: string; label: string; optional?: boolean; options: SelectPromptOption[]; selected?: string | string[]; style?: SelectPromptStyle; type: Select }

Type declaration

  • key: string

    A unique identifier for the prompt. This will be used as the key in the response object.

  • label: string

    The label displayed to the user.

  • Optional optional?: boolean

    If true, allows the user to submit the form without entering a value.

  • options: SelectPromptOption[]

    The list of options to display for the prompt.

  • Optional selected?: string | string[]

    The initial selected value for the prompt.

  • Optional style?: SelectPromptStyle

    The style of select prompt to use. Defaults to radio.

  • type: Select

SelectPromptOption

SelectPromptOption: { label: string; tags?: string[]; value: string }

Type declaration

  • label: string

    The label displayed to the user.

  • Optional tags?: string[]

    Optional; can be used to modify the appearance of options.

  • value: string

    The value of the response, if selected.

TextPrompt

TextPrompt: { default?: string; key: string; label: string; mask?: MaskOptions; maxItems?: number; multiple?: boolean; optional?: boolean; placeholder?: string; sendAsFormatted?: boolean; type: Text; validation?: ValidationOptions }

Type declaration

  • Optional default?: string

    The default value for the prompt.

  • key: string

    A unique identifier for the prompt. This will be used as the key in the response object.

  • label: string

    The label displayed to the user.

  • Optional mask?: MaskOptions

    Adds client-side input masking.

  • Optional maxItems?: number

    If multiple is true, the maximum number of items to allow in the array.

  • Optional multiple?: boolean

    If true, the user will be able to enter multiple values and the response value will be in the form of an array.

  • Optional optional?: boolean

    If true, allows the user to submit the form without entering a value.

  • Optional placeholder?: string

    Placeholder text to display.

  • Optional sendAsFormatted?: boolean

    If true and masking is enabled, sends the masked value instead of the raw value.

  • type: Text
  • Optional validation?: ValidationOptions

    Adds client-side validation to the text input. See ValidationOptions for more information.

TypeCondition

TypeCondition: "array" | "number" | "string" | "boolean" | "object"

ValidationOptions

Generated using TypeDoc