Skip to content

speedybot / Exports / SpeedyCard

Class: SpeedyCard

Card Builder

This is a utility that makes it convenient to build + pass data to Adaptive Cards

Note: This extends Adaptive Card functionality to include "chips" which when tapped will trigger your text handling logic

You can add "pickers" for date, time, select (and multi-select)

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new SpeedyCard()

Defined in

cards.ts:281

Properties

tools

tools: Object

Type declaration

NameType
checkColor(candidate: string) => BaseColors

Defined in

cards.ts:217

Methods

addAction

Private addAction(a): void

Parameters

NameType
aany

Returns

void

Defined in

cards.ts:748


addBlock

addBlock(content, config?): SpeedyCard

Parameters

NameType
contentstring | SpeedyCard
configObject
config.backgroundColor?ColorChoices
config.separator?boolean
config.vertAlign?VAlignChoices

Returns

SpeedyCard

Defined in

cards.ts:521


addButton

addButton(label, id?, attachedData?): SpeedyCard

Parameters

NameTypeDefault value
labelstringundefined
idstring"button_result"
attachedDatastring | { [key: string]: number | string | boolean; }{}

Returns

SpeedyCard

Defined in

cards.ts:763


addChip

addChip(payload, id?): SpeedyCard

Parameters

NameTypeDefault value
payloadstring | { title: string ; value?: string }undefined
idstringCONSTANTS.CHIP_LABEL

Returns

SpeedyCard

Defined in

cards.ts:315


addChips

addChips(chips, id?): SpeedyCard

Parameters

NameTypeDefault value
chips(string | { title: string ; value?: string })[]undefined
idstringCONSTANTS.CHIP_LABEL

Returns

SpeedyCard

Defined in

cards.ts:322


addDeleteButton

addDeleteButton(label?): SpeedyCard

Parameters

NameTypeDefault value
labelstringCONSTANTS.destroyLabel

Returns

SpeedyCard

Defined in

cards.ts:755


addHeader

addHeader(text, config?): SpeedyCard

Parameters

NameType
textstring
configHeaderConfig

Returns

SpeedyCard

Defined in

cards.ts:455


addImage

addImage(url, config?): SpeedyCard

Parameters

NameType
urlstring
configObject
config.align?AlignmentChoices
config.size?SizeChoices
config.targetURL?string

Returns

SpeedyCard

Defined in

cards.ts:358


addLink(url, label?): SpeedyCard

Parameters

NameType
urlstring
label?string

Returns

SpeedyCard

Defined in

cards.ts:388


addLinkButton

addLinkButton(url, label?): SpeedyCard

Parameters

NameType
urlstring
label?string

Returns

SpeedyCard

Defined in

cards.ts:392


addMultiSelect

addMultiSelect(choices, id?): SpeedyCard

Parameters

NameTypeDefault value
choices(string | number)[] | { title: string ; value: string }[]undefined
idstring"addMultiSelect_result"

Returns

SpeedyCard

Defined in

cards.ts:612


addPickerDate

addPickerDate(textLabel, id?): SpeedyCard

Parameters

NameTypeDefault value
textLabelstringundefined
idstring"addPickerDate_result"

Returns

SpeedyCard

Defined in

cards.ts:660


addPickerDropdown

addPickerDropdown(choices, id?): SpeedyCard

Parameters

NameTypeDefault value
choices(string | number | { title: string ; value: string | number })[]undefined
idstringSpeedyCardId.dropdown

Returns

SpeedyCard

Defined in

cards.ts:575


addPickerTime

addPickerTime(textLabel, id?): SpeedyCard

Parameters

NameTypeDefault value
textLabelstringundefined
idstring"addPickerTime_result"

Returns

SpeedyCard

Defined in

cards.ts:672


addSingleSelect

addSingleSelect(choices, id?): SpeedyCard

Parameters

NameTypeDefault value
choices(string | number)[] | { title: string ; value: string }[]undefined
idstring"addSingleSelectresult"

Returns

SpeedyCard

Defined in

cards.ts:602


addSubcard

addSubcard(card, textLabel?): SpeedyCard

Parameters

NameTypeDefault value
cardCard | SpeedyCardundefined
textLabelstring""

Returns

SpeedyCard

Defined in

cards.ts:561


addSubtitle

addSubtitle(subTitle): SpeedyCard

Parameters

NameType
subTitlestring

Returns

SpeedyCard

Defined in

cards.ts:288


addTable

addTable(input, separator?): SpeedyCard

Parameters

NameTypeDefault value
input(string | number)[][] | { [key: string]: string | number; }undefined
separatorbooleanfalse

Returns

SpeedyCard

Defined in

cards.ts:293


addText

addText(text, config?): SpeedyCard

Parameters

NameType
textstring
configObject
config.align?AlignmentChoices
config.backgroundColor?ColorChoices
config.bold?boolean
config.color?ColorChoices
config.size?SizeChoices
config.vertAlign?VAlignChoices

Returns

SpeedyCard

Defined in

cards.ts:406


addTextInput

addTextInput(placeholder, id?): SpeedyCard

Parameters

NameTypeDefault value
placeholderstringundefined
idstring"addTextInput_result"

Returns

SpeedyCard

Defined in

cards.ts:685


addTextarea

addTextarea(placeholder, id?): SpeedyCard

Parameters

NameTypeDefault value
placeholderstringundefined
idstring"addTextarea_result"

Returns

SpeedyCard

Defined in

cards.ts:698


addTitle

addTitle(title): SpeedyCard

Parameters

NameType
titlestring

Returns

SpeedyCard

Defined in

cards.ts:283


attachData

attachData(payload): SpeedyCard

Parameters

NameType
payloadAttachedData

Returns

SpeedyCard

Defined in

cards.ts:723


build

build(): any

Returns

any

Defined in

cards.ts:817


needsSubmit

needsSubmit(): boolean

Returns

boolean

Defined in

cards.ts:263


setBackgroundImage

setBackgroundImage(url): SpeedyCard

Parameters

NameType
urlstring

Returns

SpeedyCard

Defined in

cards.ts:712


setSubmitButtonTitle

setSubmitButtonTitle(label): SpeedyCard

Parameters

NameType
labelstring

Returns

SpeedyCard

Defined in

cards.ts:717


survey

survey(questions, title?): SpeedyCard

Parameters

NameTypeDefault value
questionsSurveyQuestion[]undefined
titlestring"📝 Survey"

Returns

SpeedyCard

Defined in

cards.ts:779