IntentRequestBuilder
Stentor API Reference / stentor-request/src / IntentRequestBuilder
Class: IntentRequestBuilder
Defined in: packages/stentor-request/src/Builders.ts:212
Builds an IntentRequest.
The defaults value for the required fields are typically the key name, for example the default value for the intentId is "intentId".
Extendsβ
AbstractBuilder\<IntentRequest>
Constructorsβ
Constructorβ
new IntentRequestBuilder():
IntentRequestBuilder
Returnsβ
IntentRequestBuilder
Inherited fromβ
AbstractBuilder<IntentRequest>.constructor
Methodsβ
canFulfill()β
canFulfill():
IntentRequestBuilder
Defined in: packages/stentor-request/src/Builders.ts:243
Turns the request into a canfulfill intent request.
Returnsβ
IntentRequestBuilder
onPlatform()β
onPlatform(
platform):IntentRequestBuilder
Defined in: packages/stentor-request/src/Builders.ts:253
Set the platform for the request.
Parametersβ
platformβ
string
Platform for the request
Returnsβ
IntentRequestBuilder
onChannel()β
onChannel(
channel):IntentRequestBuilder
Defined in: packages/stentor-request/src/Builders.ts:264
Set the channel for the request
Parametersβ
channelβ
string
Channel for the request
Returnsβ
IntentRequestBuilder
withRawQuery()β
withRawQuery(
rawQuery):IntentRequestBuilder
Defined in: packages/stentor-request/src/Builders.ts:274
Set the raw query for the request.
Parametersβ
rawQueryβ
string
Raw query for the request
Returnsβ
IntentRequestBuilder
withMatchConfidence()β
withMatchConfidence(
confidence):IntentRequestBuilder
Defined in: packages/stentor-request/src/Builders.ts:285
Set the optional match confidence
Parametersβ
confidenceβ
number
Returnsβ
IntentRequestBuilder
withUserId()β
withUserId(
userId):IntentRequestBuilder
Defined in: packages/stentor-request/src/Builders.ts:295
Set the user ID for the request.
Parametersβ
userIdβ
string
User ID for the request
Returnsβ
IntentRequestBuilder
withAPIAccess()β
withAPIAccess(
apiAccess):IntentRequestBuilder
Defined in: packages/stentor-request/src/Builders.ts:305
Set the API access data for the request.
Parametersβ
apiAccessβ
ApiAccessData
API access data for the request.
Returnsβ
IntentRequestBuilder
withIntentId()β
withIntentId(
intentId):IntentRequestBuilder
Defined in: packages/stentor-request/src/Builders.ts:317
Sets the intentId for the request.
If not set, the default is intentId.
Parametersβ
intentIdβ
string
Intent ID for the request.
Returnsβ
IntentRequestBuilder
withDeviceId()β
withDeviceId(
deviceId):IntentRequestBuilder
Defined in: packages/stentor-request/src/Builders.ts:327
Add a device ID to the request.
Parametersβ
deviceIdβ
string
Device ID for the request
Returnsβ
IntentRequestBuilder
resumeIntent()β
resumeIntent():
IntentRequestBuilder
Defined in: packages/stentor-request/src/Builders.ts:335
Sets the intent request to be for a resume intent.
Returnsβ
IntentRequestBuilder
nextIntent()β
nextIntent():
IntentRequestBuilder
Defined in: packages/stentor-request/src/Builders.ts:343
Sets the intent request to be for a NextIntent
Returnsβ
IntentRequestBuilder
previousIntent()β
previousIntent():
IntentRequestBuilder
Defined in: packages/stentor-request/src/Builders.ts:351
Sets the intent request to be for a PreviousIntent
Returnsβ
IntentRequestBuilder
latestIntent()β
latestIntent():
IntentRequestBuilder
Defined in: packages/stentor-request/src/Builders.ts:358
Sets the intent request to be for a LatestIntent
Returnsβ
IntentRequestBuilder
repeatIntent()β
repeatIntent():
IntentRequestBuilder
Defined in: packages/stentor-request/src/Builders.ts:366
Sets the intent request to be for a RepeatIntent
Returnsβ
IntentRequestBuilder
cancel()β
cancel():
IntentRequestBuilder
Defined in: packages/stentor-request/src/Builders.ts:374
Sets the intent request to be for a CancelIntent
Returnsβ
IntentRequestBuilder
help()β
help():
IntentRequestBuilder
Defined in: packages/stentor-request/src/Builders.ts:382
Sets the intent request to be for a HelpIntent
Returnsβ
IntentRequestBuilder
withSlots()β
withSlots(
slots):IntentRequestBuilder
Defined in: packages/stentor-request/src/Builders.ts:392
Add slots to the request.
Parametersβ
slotsβ
Slots for the request.
Returnsβ
IntentRequestBuilder
withLocale()β
withLocale(
locale):IntentRequestBuilder
Defined in: packages/stentor-request/src/Builders.ts:402
Specify the locale for the request.
Parametersβ
localeβ
Locale for the intent request.
Returnsβ
IntentRequestBuilder
withKnowledgeBaseResult()β
withKnowledgeBaseResult(
result):IntentRequestBuilder
Defined in: packages/stentor-request/src/Builders.ts:413
Add a knowledge base result.
Parametersβ
resultβ
Returnsβ
IntentRequestBuilder
withAttributes()β
withAttributes(
attributes):IntentRequestBuilder
Defined in: packages/stentor-request/src/Builders.ts:424
Append attributes to the request.
Parametersβ
attributesβ
Record\<string, unknown>
Returnsβ
IntentRequestBuilder
updateDevice()β
updateDevice(
device):IntentRequestBuilder
Defined in: packages/stentor-request/src/Builders.ts:435
Update any or all of the fields on request's device information.
Parametersβ
deviceβ
Partial\<Device>
Returnsβ
IntentRequestBuilder
build()β
build():
IntentRequest
Defined in: packages/stentor-request/src/Builders.ts:447
Build the intent request.
Returnsβ
Overridesβ
AbstractBuilder.build