actions-on-google
- Version 3.0.0
- Published
- 947 kB
- 8 dependencies
- Apache-2.0 license
Install
npm i actions-on-google
yarn add actions-on-google
pnpm add actions-on-google
Overview
Actions on Google Client Library for Node.js
Index
Variables
Classes
Interfaces
Type Aliases
- AppHandler
- Argument
- CarouselArgument
- challengeType
- CompletePurchaseArgument
- ConfirmationArgument
- DateTimeArgument
- DefaultDialogflowIntent
- DeliveryAddressArgument
- DialogflowV1Message
- DigitalPurchaseCheckArgument
- FinalRepromptArgument
- GoogleActionsOrdersV3ActionType
- GoogleActionsOrdersV3OrderUpdateType
- GoogleActionsOrdersV3PriceAttributeState
- GoogleActionsOrdersV3PriceAttributeType
- GoogleActionsOrdersV3VerticalsPurchaseMerchantUnitMeasureUnit
- GoogleActionsOrdersV3VerticalsPurchasePickupInfoCurbsideInfoCurbsideFulfillmentType
- GoogleActionsOrdersV3VerticalsPurchasePickupInfoPickupType
- GoogleActionsOrdersV3VerticalsPurchasePurchaseErrorType
- GoogleActionsOrdersV3VerticalsPurchasePurchaseFulfillmentInfoFulfillmentType
- GoogleActionsOrdersV3VerticalsPurchasePurchaseItemExtensionStatus
- GoogleActionsOrdersV3VerticalsPurchasePurchaseItemExtensionType
- GoogleActionsOrdersV3VerticalsPurchasePurchaseOrderExtensionPurchaseLocationType
- GoogleActionsOrdersV3VerticalsPurchasePurchaseOrderExtensionStatus
- GoogleActionsOrdersV3VerticalsPurchasePurchaseOrderExtensionType
- GoogleActionsOrdersV3VerticalsReservationReservationItemExtensionStatus
- GoogleActionsOrdersV3VerticalsReservationReservationItemExtensionType
- GoogleActionsOrdersV3VerticalsTicketEventCharacterType
- GoogleActionsOrdersV3VerticalsTicketTicketEventType
- GoogleActionsTransactionsV3CompletePurchaseValuePurchaseStatus
- GoogleActionsTransactionsV3DigitalPurchaseCheckResultResultType
- GoogleActionsTransactionsV3PaymentInfoPaymentMethodProvenance
- GoogleActionsTransactionsV3PaymentMethodDisplayInfoPaymentType
- GoogleActionsTransactionsV3PaymentMethodStatusStatus
- GoogleActionsTransactionsV3SkuIdSkuType
- GoogleActionsTransactionsV3TransactionDecisionValueTransactionDecision
- GoogleActionsTransactionsV3TransactionRequirementsCheckResultResultType
- GoogleActionsTransactionsV3UserInfoOptionsUserInfoProperties
- GoogleActionsV2ConversationType
- GoogleActionsV2DeliveryAddressValueUserDecision
- GoogleActionsV2EntitlementSkuType
- GoogleActionsV2MediaResponseMediaType
- GoogleActionsV2MediaStatusStatus
- GoogleActionsV2NewSurfaceValueStatus
- GoogleActionsV2OrdersActionProvidedPaymentOptionsPaymentType
- GoogleActionsV2OrdersCustomerInfoOptionsCustomerInfoProperties
- GoogleActionsV2OrdersGoogleProvidedPaymentOptionsSupportedCardNetworks
- GoogleActionsV2OrdersLineItemType
- GoogleActionsV2OrdersOrderLocationType
- GoogleActionsV2OrdersOrderUpdateActionType
- GoogleActionsV2OrdersPaymentInfoPaymentType
- GoogleActionsV2OrdersPaymentMethodTokenizationParametersTokenizationType
- GoogleActionsV2OrdersPriceType
- GoogleActionsV2OrdersRejectionInfoType
- GoogleActionsV2OrdersTimeType
- GoogleActionsV2PermissionValueSpecPermissions
- GoogleActionsV2RawInputInputType
- GoogleActionsV2RegisterUpdateValueStatus
- GoogleActionsV2SignInValueStatus
- GoogleActionsV2TransactionDecisionValueUserDecision
- GoogleActionsV2TransactionRequirementsCheckResultResultType
- GoogleActionsV2TriggerContextTimeContextFrequency
- GoogleActionsV2UiElementsBasicCardImageDisplayOptions
- GoogleActionsV2UiElementsCarouselBrowseImageDisplayOptions
- GoogleActionsV2UiElementsCarouselSelectImageDisplayOptions
- GoogleActionsV2UiElementsCollectionSelectImageDisplayOptions
- GoogleActionsV2UiElementsOpenUrlActionUrlTypeHint
- GoogleActionsV2UiElementsTableCardColumnPropertiesHorizontalAlignment
- GoogleActionsV2UserPermissions
- GoogleActionsV2UserUserVerificationStatus
- GoogleCloudDialogflowV2IntentDefaultResponsePlatforms
- GoogleCloudDialogflowV2IntentMessagePlatform
- GoogleCloudDialogflowV2IntentTrainingPhraseType
- GoogleCloudDialogflowV2IntentWebhookState
- Intent
- ListArgument
- MediaStatusArgument
- NewSurfaceArgument
- OptionArgument
- PermissionArgument
- PlaceArgument
- RegisterUpdateArgument
- RepromptArgument
- Response
- RichResponseItem
- SignInArgument
- SmartHomeV1ExecuteErrors
- SmartHomeV1ExecuteStatus
- SmartHomeV1Intents
- SmartHomeV1Request
- SmartHomeV1Response
- SurfaceCapability
- TransactionDecisionArgument
- TransactionRequirementsArgument
- UpdatePermissionUserIdArgument
Variables
variable actionssdk
const actionssdk: ActionsSdk;
This is the function that creates the app instance which on new requests, creates a way to interact with the conversation API directly from Assistant, providing implementation for all the methods available in the API.
Only supports Actions SDK v2.
Example 1
const app = actionssdk()app.intent('actions.intent.MAIN', conv => {conv.ask('How are you?')})Modifiers
@public
variable dialogflow
const dialogflow: Dialogflow;
This is the function that creates the app instance which on new requests, creates a way to handle the communication with Dialogflow's fulfillment API.
Supports Dialogflow v1 and v2.
Example 1
const app = dialogflow()app.intent('Default Welcome Intent', conv => {conv.ask('How are you?')})Modifiers
@public
variable smarthome
const smarthome: SmartHome;
Example 1
const app = smarthome({debug: true,key: '<api-key>',jwt: require('./key.json')});app.onSync((body, headers) => {return { ... }});app.onQuery((body, headers) => {return { ... }});app.onExecute((body, headers) => {return { ... }});exports.smarthome = functions.https.onRequest(app);Modifiers
@public
Classes
class ActionsSdkConversation
class ActionsSdkConversation< TConvData = JsonObject, TUserStorage = JsonObject> extends Conversation<TUserStorage> {}
Modifiers
@public
constructor
constructor(options?: ActionsSdkConversationOptions<TConvData, TUserStorage>);
Modifiers
@public
property body
body: Api.GoogleActionsV2AppRequest;
Modifiers
@public
property data
data: {};
The session data in JSON format. Stored using conversationToken.
Example 1
app.intent('actions.intent.MAIN', conv => {conv.data.someProperty = 'someValue'})Modifiers
@public
property intent
intent: string;
Get the current Actions SDK intent.
Example 1
app.intent('actions.intent.MAIN', conv => {const intent = conv.intent // will be 'actions.intent.MAIN'})Modifiers
@public
method serialize
serialize: () => Api.GoogleActionsV2AppResponse;
Modifiers
@public
class BasicCard
class BasicCard implements Api.GoogleActionsV2UiElementsBasicCard {}
constructor
constructor(options: BasicCardOptions);
Modifiers
@public
class BrowseCarousel
class BrowseCarousel implements Api.GoogleActionsV2UiElementsCarouselBrowse {}
constructor
constructor(options: BrowseCarouselOptions);
Parameter options
BrowseCarousel options
Modifiers
@public
constructor
constructor(items: Api.GoogleActionsV2UiElementsCarouselBrowseItem[]);
Parameter items
BrowseCarousel items
Modifiers
@public
constructor
constructor(...items: Api.GoogleActionsV2UiElementsCarouselBrowseItem[]);
Parameter items
BrowseCarousel items
Modifiers
@public
class BrowseCarouselItem
class BrowseCarouselItem implements Api.GoogleActionsV2UiElementsCarouselBrowseItem {}
constructor
constructor(options: BrowseCarouselItemOptions);
Parameter options
BrowseCarouselItem options
Modifiers
@public
class Button
class Button implements Api.GoogleActionsV2UiElementsButton {}
constructor
constructor(options: ButtonOptions);
Parameter options
Button options
Modifiers
@public
class Carousel
class Carousel extends Helper< 'actions.intent.OPTION', Api.GoogleActionsV2OptionValueSpec> {}
Asks to collect user's input with a carousel.
Example 1
// Actions SDKconst app = actionssdk()app.intent('actions.intent.MAIN', conv => {conv.ask('Which of these looks good?')conv.ask(new Carousel({items: {[SELECTION_KEY_ONE]: {title: 'Number one',description: 'Description of number one',synonyms: ['synonym of KEY_ONE 1', 'synonym of KEY_ONE 2'],},[SELECTION_KEY_TWO]: {title: 'Number two',description: 'Description of number one',synonyms: ['synonym of KEY_TWO 1', 'synonym of KEY_TWO 2'],}}}))})app.intent('actions.intent.OPTION', (conv, input, option) => {if (option === SELECTION_KEY_ONE) {conv.close('Number one is a great choice!')} else {conv.close('Number two is also a great choice!')}})// Dialogflowconst app = dialogflow()app.intent('Default Welcome Intent', conv => {conv.ask('Which of these looks good?')conv.ask(new Carousel({items: {[SELECTION_KEY_ONE]: {title: 'Number one',description: 'Description of number one',synonyms: ['synonym of KEY_ONE 1', 'synonym of KEY_ONE 2'],},[SELECTION_KEY_TWO]: {title: 'Number two',description: 'Description of number one',synonyms: ['synonym of KEY_TWO 1', 'synonym of KEY_TWO 2'],}}}))})// Create a Dialogflow intent with the `actions_intent_OPTION` eventapp.intent('Get Option', (conv, input, option) => {if (option === SELECTION_KEY_ONE) {conv.close('Number one is a great choice!')} else {conv.close('Number two is also a great choice!')}})Modifiers
@public
constructor
constructor(options: CarouselOptions);
Parameter options
Carousel option
Modifiers
@public
class CompletePurchase
class CompletePurchase extends SoloHelper< 'actions.intent.COMPLETE_PURCHASE', Api.GoogleActionsTransactionsV3CompletePurchaseValueSpec> {}
Asks the user to complete a purchase
Modifiers
@public
constructor
constructor(options?: Api.GoogleActionsTransactionsV3CompletePurchaseValueSpec);
Parameter options
The raw GoogleActionsTransactionsV3CompletePurchaseValueSpec
Modifiers
@public
class Confirmation
class Confirmation extends SoloHelper< 'actions.intent.CONFIRMATION', Api.GoogleActionsV2ConfirmationValueSpec> {}
Asks user for a confirmation.
Example 1
// Actions SDKconst app = actionssdk()app.intent('actions.intent.MAIN', conv => {conv.ask(new Confirmation('Are you sure you want to do that?'))})app.intent('actions.intent.CONFIRMATION', (conv, input, confirmation) => {if (confirmation) {conv.close(`Great! I'm glad you want to do it!`)} else {conv.close(`That's okay. Let's not do it now.`)}})// Dialogflowconst app = dialogflow()app.intent('Default Welcome Intent', conv => {conv.ask(new Confirmation('Are you sure you want to do that?'))})// Create a Dialogflow intent with the `actions_intent_CONFIRMATION` eventapp.intent('Get Confirmation', (conv, input, confirmation) => {if (confirmation) {conv.close(`Great! I'm glad you want to do it!`)} else {conv.close(`That's okay. Let's not do it now.`)}})Modifiers
@public
constructor
constructor(text: string);
Parameter text
The confirmation prompt presented to the user to query for an affirmative or negative response.
Modifiers
@public
class Conversation
class Conversation<TUserStorage> {}
Modifiers
@public
constructor
constructor(options?: ConversationOptions<TUserStorage>);
property arguments
arguments: Arguments;
Modifiers
@public
property available
available: Available;
Modifiers
@public
property canvas
canvas: Canvas;
Modifiers
@public
property device
device: Device;
Modifiers
@public
property digested
digested: boolean;
Modifiers
@public
property expectUserResponse
expectUserResponse: boolean;
Modifiers
@public
property headers
headers: Headers;
Modifiers
@public
property id
id: string;
Gets the unique conversation ID. It's a new ID for the initial query, and stays the same until the end of the conversation.
Example 1
app.intent('actions.intent.MAIN', conv => {const conversationId = conv.id})Modifiers
@public
property input
input: Input;
Modifiers
@public
property noInputs
noInputs: (string | SimpleResponse)[];
Set reprompts when users don't provide input to this action (no-input errors). Each reprompt represents as the SimpleResponse, but raw strings also can be specified for convenience (they're passed to the constructor of SimpleResponse). Notice that this value is not kept over conversations. Thus, it is necessary to set the reprompts per each conversation response.
Example 1
app.intent('actions.intent.MAIN', conv => {conv.noInputs = ['Are you still there?','Hello?',new SimpleResponse({text: 'Talk to you later. Bye!',speech: '<speak>Talk to you later. Bye!</speak>'})]conv.ask('What's your favorite color?')})Modifiers
@public
property request
request: Api.GoogleActionsV2AppRequest;
Modifiers
@public
property responses
responses: Response[];
Modifiers
@public
property sandbox
sandbox: boolean;
True if the app is being tested in sandbox mode. Enable sandbox mode in the [Actions console](console.actions.google.com) to test transactions.
Modifiers
@public
property screen
screen: boolean;
Shortcut for conv.surface.capabilities.has('actions.capability.SCREEN_OUTPUT')
Modifiers
@public
property speechBiasing
speechBiasing: string[];
Sets speech biasing options.
Example 1
app.intent('actions.intent.MAIN', conv => {conv.speechBiasing = ['red', 'blue', 'green']conv.ask('What is your favorite color out of red, blue, and green?')})Modifiers
@public
property surface
surface: Surface;
Modifiers
@public
property type
type: Api.GoogleActionsV2ConversationType;
Modifiers
@public
property user
user: User<TUserStorage>;
Gets the User object. The user object contains information about the user, including a string identifier and personal information (requires requesting permissions, see conv.ask(new Permission)).
Modifiers
@public
method add
add: (...responses: Response[]) => this;
Modifiers
@public
method ask
ask: (...responses: Response[]) => this;
Asks to collect user's input. All user's queries need to be sent to the app. The guidelines when prompting the user for a response must be followed at all times.
Parameter responses
A response fragment for the library to construct a single complete response
Example 1
// Actions SDKconst app = actionssdk()app.intent('actions.intent.MAIN', conv => {const ssml = '<speak>Hi! <break time="1"/> ' +'I can read out an ordinal like <say-as interpret-as="ordinal">123</say-as>. ' +'Say a number.</speak>'conv.ask(ssml)})app.intent('actions.intent.TEXT', (conv, input) => {if (input === 'bye') {return conv.close('Goodbye!')}const ssml = `<speak>You said, <say-as interpret-as="ordinal">${input}</say-as></speak>`conv.ask(ssml)})// Dialogflowconst app = dialogflow()app.intent('Default Welcome Intent', conv => {conv.ask('Welcome to action snippets! Say a number.')})app.intent('Number Input', (conv, {num}) => {conv.close(`You said ${num}`)})Modifiers
@public
method close
close: (...responses: Response[]) => this;
Have Assistant render the speech response and close the mic.
Parameter responses
A response fragment for the library to construct a single complete response
Example 1
// Actions SDKconst app = actionssdk()app.intent('actions.intent.MAIN', conv => {const ssml = '<speak>Hi! <break time="1"/> ' +'I can read out an ordinal like <say-as interpret-as="ordinal">123</say-as>. ' +'Say a number.</speak>'conv.ask(ssml)})app.intent('actions.intent.TEXT', (conv, input) => {if (input === 'bye') {return conv.close('Goodbye!')}const ssml = `<speak>You said, <say-as interpret-as="ordinal">${input}</say-as></speak>`conv.ask(ssml)})// Dialogflowconst app = dialogflow()app.intent('Default Welcome Intent', conv => {conv.ask('Welcome to action snippets! Say a number.')})app.intent('Number Input', (conv, {num}) => {conv.close(`You said ${num}`)})Modifiers
@public
method json
json: <T = JsonObject>(json: T) => this;
Modifiers
@public
method response
response: () => ConversationResponse;
Modifiers
@public
class DateTime
class DateTime extends SoloHelper< 'actions.intent.DATETIME', Api.GoogleActionsV2DateTimeValueSpec> {}
Asks user for a timezone-agnostic date and time.
Example 1
// Actions SDKconst app = actionssdk()app.intent('actions.intent.MAIN', conv => {conv.ask(new DateTime({prompts: {initial: 'When do you want to come in?',date: 'Which date works best for you?',time: 'What time of day works best for you?',}}))})app.intent('actions.intent.DATETIME', (conv, input, datetime) => {const { month, day } = datetime.dateconst { hours, minutes } = datetime.timeconv.close(new SimpleResponse({speech: 'Great see you at your appointment!',text: `Great, we will see you on ${month}/${day} at ${hours} ${minutes || ''}`}))})// Dialogflowconst app = dialogflow()app.intent('Default Welcome Intent', conv => {conv.ask(new DateTime({prompts: {initial: 'When do you want to come in?',date: 'Which date works best for you?',time: 'What time of day works best for you?',}}))})// Create a Dialogflow intent with the `actions_intent_DATETIME` eventapp.intent('Get Datetime', (conv, params, datetime) => {const { month, day } = datetime.dateconst { hours, minutes } = datetime.timeconv.close(new SimpleResponse({speech: 'Great see you at your appointment!',text: `Great, we will see you on ${month}/${day} at ${hours} ${minutes || ''}`}))})Modifiers
@public
constructor
constructor(options: DateTimeOptions);
Parameter options
DateTime options
Modifiers
@public
class DeliveryAddress
class DeliveryAddress extends SoloHelper< 'actions.intent.DELIVERY_ADDRESS', Api.GoogleActionsV2DeliveryAddressValueSpec> {}
Asks user for delivery address.
Modifiers
@public
constructor
constructor(options?: Api.GoogleActionsV2DeliveryAddressValueSpec);
Parameter options
Modifiers
@public
class DialogflowConversation
class DialogflowConversation< TConvData = JsonObject, TUserStorage = JsonObject, TContexts extends Contexts = Contexts> extends Conversation<TUserStorage> {}
Modifiers
@public
constructor
constructor(options?: DialogflowConversationOptions<TConvData, TUserStorage>);
Modifiers
@public
property action
action: string;
Get the current Dialogflow action name.
Example 1
app.intent('Default Welcome Intent', conv => {const action = conv.action})Modifiers
@public
property body
body: | Api.GoogleCloudDialogflowV2WebhookRequest | ApiV1.DialogflowV1WebhookRequest;
Modifiers
@public
property contexts
contexts: ContextValues<TContexts>;
Modifiers
@public
property data
data: {};
The session data in JSON format. Stored using contexts.
Example 1
app.intent('Default Welcome Intent', conv => {conv.data.someProperty = 'someValue'})Modifiers
@public
property incoming
incoming: Incoming;
Modifiers
@public
property intent
intent: string;
Get the current Dialogflow intent name.
Example 1
app.intent('Default Welcome Intent', conv => {const intent = conv.intent // will be 'Default Welcome Intent'})Modifiers
@public
property parameters
parameters: Parameters;
The Dialogflow parameters from the current intent. Values will only be a string, an Object, or undefined if not included.
Will also be sent via intent handler 3rd argument which is the encouraged method to retrieve.
Example 1
// Encouraged method through intent handlerapp.intent('Tell Greeting', (conv, params) => {const color = params.colorconst num = params.num})// Encouraged method through destructuring in intent handlerapp.intent('Tell Greeting', (conv, { color, num }) => {// now use color and num as variables}))// Using conv.parametersapp.intent('Tell Greeting', conv => {const parameters = conv.parameters// or destructedconst { color, num } = conv.parameters})Modifiers
@public
property query
query: string;
The user's raw input query.
Example 1
app.intent('User Input', conv => {conv.close(`You said ${conv.query}`)})Modifiers
@public
property version
version: number;
Modifiers
@public
method followup
followup: (event: string, parameters?: Parameters, lang?: string) => this;
Triggers an intent of your choosing by sending a followup event from the webhook. Final response can theoretically include responses but these will not be handled by Dialogflow. Dialogflow will not pass anything back to Google Assistant, therefore Google Assistant specific information, most notably conv.user.storage, is ignored.
Parameter event
Name of the event
Parameter parameters
Parameters to send with the event
Parameter lang
The language of this query. See Language Support for a list of the currently supported language codes. Note that queries in the same session do not necessarily need to specify the same language. By default, it is the languageCode sent with Dialogflow's queryResult.languageCode
Example 1
const app = dialogflow()// Create a Dialogflow intent with event 'apply-for-license-event'app.intent('Default Welcome Intent', conv => {conv.followup('apply-for-license-event', {date: new Date().toISOString(),})// The dialogflow intent with the 'apply-for-license-event' event// will be triggered with the given parameters `date`})Modifiers
@public
method serialize
serialize: () => | Api.GoogleCloudDialogflowV2WebhookResponse | ApiV1.DialogflowV1WebhookResponse;
Modifiers
@public
class DigitalPurchaseCheck
class DigitalPurchaseCheck extends SoloHelper< 'actions.intent.DIGITAL_PURCHASE_CHECK', Api.GoogleActionsTransactionsV3DigitalPurchaseCheckSpec> {}
Check to confirm digital purchase eligibility.
Example 1
const app = dialogflow()app.intent('Default Welcome Intent', conv => {// Immediately invoke digital purchase check intent to confirm// purchase eligibility.conv.ask(new DigitalPurchaseCheck())})app.intent('Digital Purchase Check', conv => {const arg = conv.arguments.get('DIGITAL_PURCHASE_CHECK_RESULT')console.log(arg)})Modifiers
@public
constructor
constructor(options?: Api.GoogleActionsTransactionsV3DigitalPurchaseCheckSpec);
Parameter options
Modifiers
@public
class Helper
class Helper<TIntent extends Intent, TValueSpec> implements Api.GoogleActionsV2ExpectedIntent {}
Modifiers
@public
constructor
constructor(options: HelperOptions<TIntent, TValueSpec>);
property inputValueData
inputValueData: { '@type': InputValueSpec };
class HtmlResponse
class HtmlResponse<TData extends JsonObject = JsonObject> implements Api.GoogleActionsV2UiElementsHtmlResponse {}
constructor
constructor( options?: | HtmlResponseOptions<TData> | Api.GoogleActionsV2UiElementsHtmlResponse);
Parameter options
Canvas options
Modifiers
@public
property data
data: JsonObject;
Modifiers
@public
property suppress
suppress: boolean;
Modifiers
@public
class Image
class Image implements Api.GoogleActionsV2UiElementsImage {}
constructor
constructor(option: ImageOptions);
Parameter options
Image options
Modifiers
@public
class LinkOutSuggestion
class LinkOutSuggestion implements Api.GoogleActionsV2UiElementsLinkOutSuggestion {}
constructor
constructor(options: LinkOutSuggestionOptions);
Parameter options
LinkOutSuggestion options
Modifiers
@public
class List
class List extends Helper< 'actions.intent.OPTION', Api.GoogleActionsV2OptionValueSpec> {}
Asks to collect user's input with a list.
Example 1
// Actions SDKconst app = actionssdk()app.intent('actions.intent.MAIN', conv => {conv.ask('Which of these looks good?')conv.ask(new List({items: {[SELECTION_KEY_ONE]: {title: 'Number one',synonyms: ['synonym of KEY_ONE 1', 'synonym of KEY_ONE 2'],},[SELECTION_KEY_TWO]: {title: 'Number two',synonyms: ['synonym of KEY_TWO 1', 'synonym of KEY_TWO 2'],}}}))})app.intent('actions.intent.OPTION', (conv, input, option) => {if (option === SELECTION_KEY_ONE) {conv.close('Number one is a great choice!')} else {conv.close('Number two is also a great choice!')}})// Dialogflowconst app = dialogflow()app.intent('Default Welcome Intent', conv => {conv.ask('Which of these looks good?')conv.ask(new List({items: {[SELECTION_KEY_ONE]: {title: 'Number one',synonyms: ['synonym of KEY_ONE 1', 'synonym of KEY_ONE 2'],},[SELECTION_KEY_TWO]: {title: 'Number two',synonyms: ['synonym of KEY_TWO 1', 'synonym of KEY_TWO 2'],}}}))})// Create a Dialogflow intent with the `actions_intent_OPTION` eventapp.intent('Get Option', (conv, input, option) => {if (option === SELECTION_KEY_ONE) {conv.close('Number one is a great choice!')} else {conv.close('Number two is also a great choice!')}})Modifiers
@public
constructor
constructor(options: ListOptions);
Parameter options
List options
Modifiers
@public
class MediaObject
class MediaObject implements Api.GoogleActionsV2MediaObject {}
constructor
constructor(options: string | MediaObjectOptions);
Parameter options
MediaObject options or just a string for the url
Modifiers
@public
class MediaResponse
class MediaResponse implements Api.GoogleActionsV2MediaResponse {}
constructor
constructor(options: MediaResponseOptions);
Parameter options
MediaResponse options
Modifiers
@public
constructor
constructor(objects: MediaObjectString[]);
Parameter objects
MediaObjects
Modifiers
@public
constructor
constructor(...objects: MediaObjectString[]);
Parameter objects
MediaObjects
Modifiers
@public
class NewSurface
class NewSurface extends SoloHelper< 'actions.intent.NEW_SURFACE', Api.GoogleActionsV2NewSurfaceValueSpec> {}
Requests the user to switch to another surface during the conversation. Works only for en-* locales.
Example 1
// Actions SDKconst app = actionssdk()const imageResponses = [`Here's an image of Google`,new Image({url: 'https://storage.googleapis.com/gweb-uniblog-publish-prod/images/' +'Search_GSA.2e16d0ba.fill-300x300.png',alt: 'Google Logo',})]app.intent('actions.intent.MAIN', conv => {const capability = 'actions.capability.SCREEN_OUTPUT'if (conv.surface.capabilities.has(capability)) {conv.close(...imageResponses)} else {conv.ask(new NewSurface({capabilities: capability,context: 'To show you an image',notification: 'Check out this image',}))}})app.intent('actions.intent.NEW_SURFACE', (conv, input, newSurface) => {if (newSurface.status === 'OK') {conv.close(...imageResponses)} else {conv.close(`Ok, I understand. You don't want to see pictures. Bye`)}})// Dialogflowconst app = dialogflow()const imageResponses = [`Here's an image of Google`,new Image({url: 'https://storage.googleapis.com/gweb-uniblog-publish-prod/images/' +'Search_GSA.2e16d0ba.fill-300x300.png',alt: 'Google Logo',})]app.intent('Default Welcome Intent', conv => {const capability = 'actions.capability.SCREEN_OUTPUT'if (conv.surface.capabilities.has(capability)) {conv.close(...imageResponses)} else {conv.ask(new NewSurface({capabilities: capability,context: 'To show you an image',notification: 'Check out this image',}))}})// Create a Dialogflow intent with the `actions_intent_NEW_SURFACE` eventapp.intent('Get New Surface', (conv, input, newSurface) => {if (newSurface.status === 'OK') {conv.close(...imageResponses)} else {conv.close(`Ok, I understand. You don't want to see pictures. Bye`)}})Modifiers
@public
constructor
constructor(options: NewSurfaceOptions);
Parameter options
NewSurface options
Modifiers
@public
class OpenUrlAction
class OpenUrlAction implements Api.GoogleActionsV2UiElementsOpenUrlAction {}
constructor
constructor(options: OpenUrlActionOptions);
Modifiers
@public
class OrderUpdate
class OrderUpdate implements Api.GoogleActionsV2OrdersOrderUpdate {}
constructor
constructor( options: | Api.GoogleActionsV2OrdersOrderUpdate | Api.GoogleActionsOrdersV3OrderUpdate);
Parameter options
The raw GoogleActionsV2OrdersOrderUpdate or GoogleActionsOrdersV3OrderUpdate if using ordersv3
Modifiers
@public
class Permission
class Permission extends SoloHelper< 'actions.intent.PERMISSION', Api.GoogleActionsV2PermissionValueSpec> {}
Asks the Assistant to guide the user to grant a permission. For example, if you want your app to get access to the user's name, you would invoke
conv.ask(new Permission)
with the context containing the reason for the request, and the GoogleActionsV2PermissionValueSpecPermissions permission. With this, the Assistant will ask the user, in your agent's voice, the following: '[Context with reason for the request], I'll just need to get your name from Google, is that OK?'.Once the user accepts or denies the request, the Assistant will fire another intent:
actions.intent.PERMISSION
with a boolean argument:PERMISSION
and, if granted, the information that you requested.Notes for multiple permissions: * The order in which you specify the permission prompts does not matter - it is controlled by the Assistant to provide a consistent user experience. * The user will be able to either accept all permissions at once, or none. If you wish to allow them to selectively accept one or other, make several dialog turns asking for each permission independently with
conv.ask(new Permission)
. * Asking forDEVICE_COARSE_LOCATION
andDEVICE_PRECISE_LOCATION
at once is equivalent to just asking forDEVICE_PRECISE_LOCATION
Example 1
// Actions SDKconst app = actionssdk()app.intent('actions.intent.MAIN', conv => {conv.ask(new Permission({context: 'To read your mind',permissions: 'NAME',}))})app.intent('actions.intent.PERMISSION', (conv, input, granted) => {// granted: inferred first (and only) argument value, boolean true if granted, false if notconst explicit = conv.arguments.get('PERMISSION') // also retrievable w/ explicit arguments.getconst name = conv.user.name})// Dialogflowconst app = dialogflow()app.intent('Default Welcome Intent', conv => {conv.ask(new Permission({context: 'To read your mind',permissions: 'NAME',}))})// Create a Dialogflow intent with the `actions_intent_PERMISSION` eventapp.intent('Get Permission', (conv, params, granted) => {// granted: inferred first (and only) argument value, boolean true if granted, false if notconst explicit = conv.arguments.get('PERMISSION') // also retrievable w/ explicit arguments.getconst name = conv.user.name})Read more: * Supported Permissions * Check if the permission has been granted with
conv.arguments.get('PERMISSION')
* conv.device.location * conv.user.name * conv.ask(new Place) which also can ask for Location permission to get a placeModifiers
@public
constructor
constructor(options: PermissionOptions);
Parameter options
Permission options
Modifiers
@public
class Place
class Place extends SoloHelper< 'actions.intent.PLACE', Api.GoogleActionsV2PlaceValueSpec> {}
Asks user to provide a geo-located place, possibly using contextual information, like a store near the user's location or a contact's address.
Developer provides custom text prompts to tailor the request handled by Google.
Example 1
// Actions SDKconst app = actionssdk()app.intent('actions.intent.MAIN', conv => {conv.ask(new Place({prompt: 'Where do you want to get picked up?',context: 'To find a place to pick you up',}))})app.intent('actions.intent.PLACE', (conv, input, place, status) => {if (place) {conv.close(`Ah, I see. You want to get picked up at ${place.formattedAddress}`)} else {// Possibly do something with statusconv.close(`Sorry, I couldn't find where you want to get picked up`)}})// Dialogflowconst app = dialogflow()app.intent('Default Welcome Intent', conv => {conv.ask(new Place({prompt: 'Where do you want to get picked up?',context: 'To find a place to pick you up',}))})// Create a Dialogflow intent with the `actions_intent_PLACE` eventapp.intent('Get Place', (conv, params, place, status) => {if (place) {conv.close(`Ah, I see. You want to get picked up at ${place.formattedAddress}`)} else {// Possibly do something with statusconv.close(`Sorry, I couldn't find where you want to get picked up`)}})Modifiers
@public
constructor
constructor(options: PlaceOptions);
Parameter options
Place options
Modifiers
@public
class RegisterUpdate
class RegisterUpdate extends SoloHelper< 'actions.intent.REGISTER_UPDATE', Api.GoogleActionsV2RegisterUpdateValueSpec> {}
Requests the user to register for daily updates.
Example 1
// Actions SDKconst app = actionssdk()app.intent('actions.intent.MAIN', conv => {conv.ask(new RegisterUpdate({frequency: 'DAILY',intent: 'show.image',arguments: [{name: 'image_to_show',textValue: 'image_type_1',}],}))})app.intent('show.image', conv => {const arg = conv.arguments.get('image_to_show') // will be 'image_type_1'// do something with arg})// Dialogflowconst app = dialogflow()app.intent('Default Welcome Intent', conv => {conv.ask(new RegisterUpdate({frequency: 'DAILY',intent: 'Show Image',arguments: [{name: 'image_to_show',textValue: 'image_type_1',}],}))})app.intent('Show Image', conv => {const arg = conv.arguments.get('image_to_show') // will be 'image_type_1'// do something with arg})Modifiers
@public
constructor
constructor(options: RegisterUpdateOptions);
Parameter options
RegisterUpdate options
Modifiers
@public
class RichResponse
class RichResponse implements Api.GoogleActionsV2RichResponse {}
constructor
constructor(options: RichResponseOptions);
Parameter options
RichResponse options
Modifiers
@public
constructor
constructor(items: RichResponseItem[]);
Parameter items
RichResponse items
Modifiers
@public
constructor
constructor(...items: RichResponseItem[]);
Parameter items
RichResponse items
Modifiers
@public
method add
add: (...items: RichResponseItem[]) => this;
Add a RichResponse item
Modifiers
@public
method addSuggestion
addSuggestion: (...suggestions: (string | Suggestions)[]) => this;
Adds a single suggestion or list of suggestions to list of items.
Modifiers
@public
class SignIn
class SignIn extends SoloHelper< 'actions.intent.SIGN_IN', Api.GoogleActionsV2SignInValueSpec> {}
Hands the user off to a web sign in flow. App sign in and OAuth credentials are set in the Actions Console. Retrieve the access token in subsequent intents using conv.user.access.token.
Example 1
// Actions SDKconst app = actionssdk()app.intent('actions.intent.MAIN', conv => {conv.ask(new SignIn())})app.intent('actions.intent.SIGN_IN', (conv, input, signin) => {if (signin.status === 'OK') {const access = conv.user.access.token // possibly do something with access tokenconv.ask('Great, thanks for signing in! What do you want to do next?')} else {conv.ask(`I won't be able to save your data, but what do you want to do next?`)}})// Dialogflowconst app = dialogflow()app.intent('actions.intent.MAIN', conv => {conv.ask(new SignIn())})// Create a Dialogflow intent with the `actions_intent_SIGN_IN` eventapp.intent('Get Signin', (conv, params, signin) => {if (signin.status === 'OK') {const access = conv.user.access.token // possibly do something with access tokenconv.ask('Great, thanks for signing in! What do you want to do next?')} else {conv.ask(`I won't be able to save your data, but what do you want to do next?`)}})Modifiers
@public
constructor
constructor(context?: string);
Parameter context
The optional context why the app needs to ask the user to sign in, as a prefix of a prompt for user consent, e.g. "To track your exercise", or "To check your account balance".
Modifiers
@public
class SimpleResponse
class SimpleResponse implements Api.GoogleActionsV2SimpleResponse {}
constructor
constructor(options: string | SimpleResponseOptions);
Parameter options
SimpleResponse options
Modifiers
@public
class SoloHelper
class SoloHelper<TIntent extends Intent, TValueSpec> extends Helper< TIntent, TValueSpec> {}
Modifiers
@public
class Suggestions
class Suggestions {}
Suggestions to show with response.
Modifiers
@public
constructor
constructor(...suggestions: (string | string[])[]);
Parameter suggestions
Texts of the suggestions.
Modifiers
@public
property suggestions
suggestions: Api.GoogleActionsV2UiElementsSuggestion[];
Modifiers
@public
method add
add: (...suggestions: string[]) => this;
Modifiers
@public
class Table
class Table implements Api.GoogleActionsV2UiElementsTableCard {}
constructor
constructor(options: TableOptions);
Modifiers
@public
class TransactionDecision
class TransactionDecision extends SoloHelper< 'actions.intent.TRANSACTION_DECISION', | Api.GoogleActionsV2TransactionDecisionValueSpec | Api.GoogleActionsTransactionsV3TransactionDecisionValueSpec> {}
Asks user to confirm transaction information.
Modifiers
@public
constructor
constructor( options?: | Api.GoogleActionsV2TransactionDecisionValueSpec | Api.GoogleActionsTransactionsV3TransactionDecisionValueSpec);
Parameter options
The raw GoogleActionsV2TransactionDecisionValueSpec or GoogleActionsTransactionsV3TransactionDecisionValueSpec if using ordersv3
Modifiers
@public
class TransactionRequirements
class TransactionRequirements extends SoloHelper< 'actions.intent.TRANSACTION_REQUIREMENTS_CHECK', | Api.GoogleActionsV2TransactionRequirementsCheckSpec | Api.GoogleActionsTransactionsV3TransactionRequirementsCheckSpec> {}
Checks whether user is in transactable state.
Modifiers
@public
constructor
constructor( options?: | Api.GoogleActionsV2TransactionRequirementsCheckSpec | Api.GoogleActionsTransactionsV3TransactionRequirementsCheckSpec);
Parameter options
The raw GoogleActionsV2TransactionRequirementsCheckSpec or GoogleActionsTransactionsV3TransactionRequirementsCheckSpec if using ordersv3
Modifiers
@public
class UnauthorizedError
class UnauthorizedError extends Error {}
Throw an UnauthorizedError in an intent handler to make the library respond with a HTTP 401 Status Code.
Example 1
const app = dialogflow()// If using Actions SDK:// const app = actionssdk()app.intent('intent', conv => {// ...// given a function to check if a user auth is still validconst valid = checkUserAuthValid(conv)if (!valid) {throw new UnauthorizedError()}// ...})Modifiers
@public
class UpdatePermission
class UpdatePermission extends Permission {}
Prompts the user for permission to send proactive updates at any time.
Example 1
// Actions SDKconst app = actionssdk()app.intent('actions.intent.MAIN', conv => {conv.ask(new UpdatePermission({intent: 'show.image',arguments: [{name: 'image_to_show',textValue: 'image_type_1',}))})app.intent('actions.intent.PERMISSION', conv => {const granted = conv.arguments.get('PERMISSION')if (granted) {conv.close(`Great, I'll send an update whenever I notice a change`)} else {// Response shows that user did not grant permissionconv.close('Alright, just let me know whenever you need the weather!')}})app.intent('show.image', conv => {const arg = conv.arguments.get('image_to_show') // will be 'image_type_1'// do something with arg})// Dialogflowconst app = dialogflow()app.intent('Default Welcome Intent', conv => {conv.ask(new UpdatePermission({intent: 'Show Image',arguments: [{name: 'image_to_show',textValue: 'image_type_1',}))})// Create a Dialogflow intent with the `actions_intent_PERMISSION` eventapp.intent('Get Permission', conv => {const granted = conv.arguments.get('PERMISSION')if (granted) {conv.close(`Great, I'll send an update whenever I notice a change`)} else {// Response shows that user did not grant permissionconv.close('Alright, just let me know whenever you need the weather!')}})app.intent('Show Image', conv => {const arg = conv.arguments.get('image_to_show') // will be 'image_type_1'// do something with arg})Modifiers
@public
constructor
constructor(options: UpdatePermissionOptions);
Parameter options
UpdatePermission options
Modifiers
@public
Interfaces
interface ActionsSdk
interface ActionsSdk {}
Modifiers
@public
call signature
< TConvData, TUserStorage, Conversation extends ActionsSdkConversation< TConvData, TUserStorage > = ActionsSdkConversation<TConvData, TUserStorage>>( options?: ActionsSdkOptions<TConvData, TUserStorage>): AppHandler & ActionsSdkApp<TConvData, TUserStorage, Conversation>;
Modifiers
@public
call signature
< Conversation extends ActionsSdkConversation<{}, {}> = ActionsSdkConversation< {}, {} >>( options?: ActionsSdkOptions<{}, {}>): AppHandler & ActionsSdkApp<{}, {}, Conversation>;
Modifiers
@public
interface ActionsSdkApp
interface ActionsSdkApp< TConvData, TUserStorage, TConversation extends ActionsSdkConversation<TConvData, TUserStorage>> extends ConversationApp<TConvData, TUserStorage> {}
Modifiers
@public
property verification
verification?: ActionsSdkVerification | string;
Modifiers
@public
method catch
catch: (catcher: ExceptionHandler<TUserStorage, TConversation>) => this;
Modifiers
@public
method fallback
fallback: ( handler: | ActionsSdkIntentHandler< TConvData, TUserStorage, TConversation, Argument > | string) => this;
Modifiers
@public
method intent
intent: { <TArgument extends Argument>( intent: Intent | Intent[], handler: | ActionsSdkIntentHandler< TConvData, TUserStorage, TConversation, TArgument > | Intent ): this; <TArgument extends Argument>( intent: string | string[], handler: | string | ActionsSdkIntentHandler< TConvData, TUserStorage, TConversation, TArgument > ): this;};
Sets the IntentHandler to be executed when the fulfillment is called with a given Actions SDK intent.
Parameter intent
The Actions SDK intent to match. When given an array, sets the IntentHandler for any intent in the array.
Parameter handler
The IntentHandler to be executed when the intent is matched. When given a string instead of a function, the intent fulfillment will be redirected to the IntentHandler of the redirected intent.
Modifiers
@public
method middleware
middleware: <TConversationPlugin extends ActionsSdkConversation<{}, {}>>( middleware: ActionsSdkMiddleware<TConversationPlugin>) => this;
Modifiers
@public
interface ActionsSdkConversationOptions
interface ActionsSdkConversationOptions<TConvData, TUserStorage> extends ConversationBaseOptions<TConvData, TUserStorage> {}
Modifiers
@public
property body
body?: Api.GoogleActionsV2AppRequest;
Modifiers
@public
interface ActionsSdkIntentHandler
interface ActionsSdkIntentHandler< TConvData, TUserStorage, TConversation extends ActionsSdkConversation<TConvData, TUserStorage>, TArgument extends Argument> {}
Modifiers
@public
call signature
( conv: TConversation, /** * The user's raw input query. * See {@link Input#raw|Input.raw} * Same as `conv.input.raw` */ input: string, /** * The first argument value from the current intent. * See {@link Arguments#get|Arguments.get} * Same as `conv.arguments.parsed.list[0]` */ argument: TArgument, /** * The first argument status from the current intent. * See {@link Arguments#status|Arguments.status} * Same as `conv.arguments.status.list[0]` */ status: Api.GoogleRpcStatus | undefined): Promise<any> | any;
Modifiers
@public
interface ActionsSdkMiddleware
interface ActionsSdkMiddleware< TConversationPlugin extends ActionsSdkConversation<{}, {}>> {}
Modifiers
@public
call signature
( /** @public */ conv: ActionsSdkConversation<{}, {}>, /** @public */ framework: BuiltinFrameworkMetadata): | (ActionsSdkConversation<{}, {}> & TConversationPlugin) | void | Promise<ActionsSdkConversation<{}, {}> & TConversationPlugin> | Promise<void>;
Modifiers
@public
interface ActionsSdkOptions
interface ActionsSdkOptions<TConvData, TUserStorage> extends ConversationAppOptions<TConvData, TUserStorage> {}
Modifiers
@public
property verification
verification?: ActionsSdkVerification | string;
Validates whether request is from Google through signature verification. Uses Google-Auth-Library to verify authorization token against given Google Cloud Project ID. Auth token is given in request header with key, "authorization".
HTTP Code 403 will be thrown by default on verification error.
Example 1
const app = actionssdk({ verification: 'nodejs-cloud-test-project-1234' })Modifiers
@public
interface AppOptions
interface AppOptions {}
Modifiers
@public
property debug
debug?: boolean;
Modifiers
@public
interface BaseApp
interface BaseApp extends ServiceBaseApp {}
Modifiers
@public
property debug
debug: boolean;
Modifiers
@public
property frameworks
frameworks: BuiltinFrameworks;
Modifiers
@public
method use
use: <TService, TPlugin>(plugin: Plugin<TService, TPlugin>) => this & TPlugin;
Modifiers
@public
interface BasicCard
interface BasicCard extends Api.GoogleActionsV2UiElementsBasicCard {}
Modifiers
@public
interface BasicCardOptions
interface BasicCardOptions {}
Modifiers
@public
property buttons
buttons?: | Api.GoogleActionsV2UiElementsButton | Api.GoogleActionsV2UiElementsButton[];
Modifiers
@public
property display
display?: Api.GoogleActionsV2UiElementsBasicCardImageDisplayOptions;
Modifiers
@public
property image
image?: Api.GoogleActionsV2UiElementsImage;
Modifiers
@public
property subtitle
subtitle?: string;
Modifiers
@public
property text
text?: string;
Modifiers
@public
property title
title?: string;
Modifiers
@public
interface BrowseCarousel
interface BrowseCarousel extends Api.GoogleActionsV2UiElementsCarouselBrowse {}
Class for initializing and constructing Browse Carousel.
Modifiers
@public
interface BrowseCarouselItem
interface BrowseCarouselItem extends Api.GoogleActionsV2UiElementsCarouselBrowseItem {}
Class for initializing and constructing BrowseCarousel Items
Modifiers
@public
interface BrowseCarouselItemOptions
interface BrowseCarouselItemOptions {}
Modifiers
@public
property description
description?: string;
Description text of the item.
Modifiers
@public
property footer
footer?: string;
Footer text of the item.
Modifiers
@public
property image
image?: Api.GoogleActionsV2UiElementsImage;
Image to show on item.
Modifiers
@public
property openUrlAction
openUrlAction?: Api.GoogleActionsV2UiElementsOpenUrlAction;
The URL action that occurs by clicking the BrowseCarouselItem. You should either set this field or
url
but not both.Modifiers
@public
property title
title: string;
Title of the option item.
Modifiers
@public
property url
url?: string;
The URL of the link opened by clicking the BrowseCarouselItem. You should either set this field or
openUrlAction
but not both.Modifiers
@public
interface BrowseCarouselOptions
interface BrowseCarouselOptions {}
Modifiers
@public
interface Button
interface Button extends Api.GoogleActionsV2UiElementsButton {}
Card Button. Shown below cards. Open a URL when selected.
Modifiers
@public
interface ButtonOptions
interface ButtonOptions {}
Modifiers
@public
property action
action?: Api.GoogleActionsV2UiElementsOpenUrlAction;
Action to take when selected. Recommended to use the url property for simple web page url open.
Modifiers
@public
property title
title: string;
Text shown on the button.
Modifiers
@public
property url
url?: string;
String URL to open.
Modifiers
@public
interface CarouselOptionItem
interface CarouselOptionItem extends OptionItem {}
Modifiers
@public
property description
description: string;
Description text of the item.
Modifiers
@public
interface CarouselOptions
interface CarouselOptions {}
Modifiers
@public
property display
display?: Api.GoogleActionsV2UiElementsCarouselSelectImageDisplayOptions;
Sets the display options for the images in this carousel.
Modifiers
@public
property items
items: | OptionItems<CarouselOptionItem> | Api.GoogleActionsV2UiElementsCarouselSelectCarouselItem[];
List of 2-20 items to show in this carousel. Required.
Modifiers
@public
interface Context
interface Context<TParameters extends Parameters> extends OutputContext<TParameters> {}
Modifiers
@public
property lifespan
lifespan: number;
Remaining number of intents
Modifiers
@public
property name
name: string;
Full name of the context.
Modifiers
@public
property parameters
parameters: TParameters;
The context parameters from the current intent. Context parameters include parameters collected in previous intents during the lifespan of the given context.
See here.
Example 1
app.intent('Tell Greeting', conv => {const context1 = conv.contexts.get('context1')const parameters = context1.parametersconst color = parameters.colorconst num = parameters.num})// Using destructuringapp.intent('Tell Greeting', conv => {const context1 = conv.contexts.get('context1')const { color, num } = context1.parameters})Modifiers
@public
interface Contexts
interface Contexts {}
Modifiers
@public
index signature
[context: string]: Context<Parameters> | undefined;
Modifiers
@public
interface DateTimeOptions
interface DateTimeOptions {}
Modifiers
@public
property prompts
prompts?: DateTimeOptionsPrompts;
Prompts for the user
Modifiers
@public
interface Dialogflow
interface Dialogflow {}
Modifiers
@public
call signature
< TConvData, TUserStorage, TContexts extends Contexts = Contexts, Conversation extends DialogflowConversation< TConvData, TUserStorage, TContexts > = DialogflowConversation<TConvData, TUserStorage, TContexts>>( options?: DialogflowOptions<TConvData, TUserStorage>): AppHandler & DialogflowApp<TConvData, TUserStorage, TContexts, Conversation>;
Modifiers
@public
call signature
< TContexts extends Contexts, Conversation extends DialogflowConversation< {}, {}, TContexts > = DialogflowConversation<{}, {}, TContexts>>( options?: DialogflowOptions<{}, {}>): AppHandler & DialogflowApp<{}, {}, TContexts, Conversation>;
Modifiers
@public
call signature
< TConversation extends DialogflowConversation< {}, {} > = DialogflowConversation<{}, {}>>( options?: DialogflowOptions<{}, {}>): AppHandler & DialogflowApp<{}, {}, Contexts, TConversation>;
Modifiers
@public
interface DialogflowApp
interface DialogflowApp< TConvData, TUserStorage, TContexts extends Contexts, TConversation extends DialogflowConversation<TConvData, TUserStorage, TContexts>> extends ConversationApp<TConvData, TUserStorage> {}
Modifiers
@public
property verification
verification?: DialogflowVerification | DialogflowVerificationHeaders;
Modifiers
@public
method catch
catch: (catcher: ExceptionHandler<TUserStorage, TConversation>) => this;
Modifiers
@public
method fallback
fallback: ( handler: | DialogflowIntentHandler< TConvData, TUserStorage, TContexts, TConversation, Parameters, Argument > | string) => this;
Modifiers
@public
method intent
intent: { <TParameters extends Parameters>( intent: DefaultDialogflowIntent | DefaultDialogflowIntent[], handler: | DialogflowIntentHandler< TConvData, TUserStorage, TContexts, TConversation, TParameters, Argument > | string ): this; <TArgument extends Argument>( intent: DefaultDialogflowIntent | DefaultDialogflowIntent[], handler: | string | DialogflowIntentHandler< TConvData, TUserStorage, TContexts, TConversation, Parameters, TArgument > ): this; <TParameters extends Parameters, TArgument extends Argument>( intent: DefaultDialogflowIntent | DefaultDialogflowIntent[], handler: | string | DialogflowIntentHandler< TConvData, TUserStorage, TContexts, TConversation, TParameters, TArgument > ): this; <TParameters extends Parameters>( intent: string | string[], handler: | string | DialogflowIntentHandler< TConvData, TUserStorage, TContexts, TConversation, TParameters, Argument > ): this; <TArgument extends Argument>( intent: string | string[], handler: | string | DialogflowIntentHandler< TConvData, TUserStorage, TContexts, TConversation, Parameters, TArgument > ): this; <TParameters extends Parameters, TArgument extends Argument>( intent: string | string[], handler: | string | DialogflowIntentHandler< TConvData, TUserStorage, TContexts, TConversation, TParameters, TArgument > ): this;};
Sets the IntentHandler to be execute when the fulfillment is called with a given Dialogflow intent name.
Parameter intent
The Dialogflow intent name to match. When given an array, sets the IntentHandler for any intent name in the array.
Parameter handler
The IntentHandler to be executed when the intent name is matched. When given a string instead of a function, the intent fulfillment will be redirected to the IntentHandler of the redirected intent name.
Modifiers
@public
method middleware
middleware: < TConversationPlugin extends DialogflowConversation<{}, {}, Contexts>>( middleware: DialogflowMiddleware<TConversationPlugin>) => this;
Modifiers
@public
interface DialogflowConversationOptions
interface DialogflowConversationOptions<TConvData, TUserStorage> extends ConversationBaseOptions<TConvData, TUserStorage> {}
Modifiers
@public
property body
body?: | Api.GoogleCloudDialogflowV2WebhookRequest | ApiV1.DialogflowV1WebhookRequest;
Modifiers
@public
interface DialogflowIntentHandler
interface DialogflowIntentHandler< TConvData, TUserStorage, TContexts extends Contexts, TConversation extends DialogflowConversation<TConvData, TUserStorage, TContexts>, TParameters extends Parameters, TArgument extends Argument> {}
Modifiers
@public
call signature
( conv: TConversation, params: TParameters, /** * The first argument value from the current intent. * See {@link Arguments#get|Arguments.get} * Same as `conv.arguments.parsed.list[0]` */ argument: TArgument, /** * The first argument status from the current intent. * See {@link Arguments#status|Arguments.status} * Same as `conv.arguments.status.list[0]` */ status: ActionsApi.GoogleRpcStatus | undefined): Promise<any> | any;
Modifiers
@public
interface DialogflowMiddleware
interface DialogflowMiddleware<TConversationPlugin extends DialogflowConversation> {}
Modifiers
@public
call signature
( /** @public */ conv: DialogflowConversation, /** @public */ framework: BuiltinFrameworkMetadata): | (DialogflowConversation & TConversationPlugin) | void | Promise<DialogflowConversation & TConversationPlugin> | Promise<void>;
interface DialogflowOptions
interface DialogflowOptions<TConvData, TUserStorage> extends ConversationAppOptions<TConvData, TUserStorage> {}
Modifiers
@public
property verification
verification?: DialogflowVerification | DialogflowVerificationHeaders;
Verifies whether the request comes from Dialogflow. Uses header keys and values to check against ones specified by the developer in the Dialogflow Fulfillment settings of the app.
HTTP Code 403 will be thrown by default on verification error.
Modifiers
@public
interface DialogflowV1BaseGoogleMessage
interface DialogflowV1BaseGoogleMessage<TType extends string> {}
interface DialogflowV1BaseMessage
interface DialogflowV1BaseMessage<TType extends number> {}
interface DialogflowV1Button
interface DialogflowV1Button {}
interface DialogflowV1Context
interface DialogflowV1Context {}
property lifespan
lifespan?: number;
property name
name?: string;
property parameters
parameters?: DialogflowV1Parameters;
interface DialogflowV1FollowupEvent
interface DialogflowV1FollowupEvent {}
interface DialogflowV1Fulfillment
interface DialogflowV1Fulfillment {}
interface DialogflowV1MessageBasicCard
interface DialogflowV1MessageBasicCard extends DialogflowV1BaseGoogleMessage<'basic_card'> {}
property buttons
buttons?: DialogflowV1MessageBasicCardButton[];
property formattedText
formattedText?: string;
property image
image?: DialogflowV1MessageImage;
property subtitle
subtitle?: string;
property title
title?: string;
interface DialogflowV1MessageBasicCardButton
interface DialogflowV1MessageBasicCardButton {}
property openUrlAction
openUrlAction?: DialogflowV1MessageBasicCardButtonAction;
property title
title?: string;
interface DialogflowV1MessageBasicCardButtonAction
interface DialogflowV1MessageBasicCardButtonAction {}
property url
url?: string;
interface DialogflowV1MessageCard
interface DialogflowV1MessageCard extends DialogflowV1BaseMessage<1> {}
interface DialogflowV1MessageCarousel
interface DialogflowV1MessageCarousel extends DialogflowV1BaseGoogleMessage<'carousel_card'> {}
property items
items?: DialogflowV1MessageOptionItem[];
interface DialogflowV1MessageCustomPayload
interface DialogflowV1MessageCustomPayload extends DialogflowV1BaseMessage<4> {}
property payload
payload?: JsonObject;
interface DialogflowV1MessageGooglePayload
interface DialogflowV1MessageGooglePayload extends DialogflowV1BaseGoogleMessage<'custom_payload'> {}
property payload
payload?: ApiClientObjectMap<any>;
interface DialogflowV1MessageImage
interface DialogflowV1MessageImage extends DialogflowV1BaseMessage<3> {}
property imageUrl
imageUrl?: string;
interface DialogflowV1MessageImage
interface DialogflowV1MessageImage {}
property url
url?: string;
interface DialogflowV1MessageLinkOut
interface DialogflowV1MessageLinkOut extends DialogflowV1BaseGoogleMessage<'link_out_chip'> {}
property destinationName
destinationName?: string;
property url
url?: string;
interface DialogflowV1MessageList
interface DialogflowV1MessageList extends DialogflowV1BaseGoogleMessage<'list_card'> {}
interface DialogflowV1MessageOptionInfo
interface DialogflowV1MessageOptionInfo {}
interface DialogflowV1MessageOptionItem
interface DialogflowV1MessageOptionItem {}
property description
description?: string;
property image
image?: DialogflowV1MessageImage;
property optionInfo
optionInfo?: DialogflowV1MessageOptionInfo;
property title
title?: string;
interface DialogflowV1MessageQuickReplies
interface DialogflowV1MessageQuickReplies extends DialogflowV1BaseMessage<2> {}
interface DialogflowV1MessageSimpleResponse
interface DialogflowV1MessageSimpleResponse extends DialogflowV1BaseGoogleMessage<'simple_response'> {}
property displayText
displayText?: string;
property textToSpeech
textToSpeech?: string;
interface DialogflowV1MessageSuggestion
interface DialogflowV1MessageSuggestion {}
property title
title?: string;
interface DialogflowV1MessageSuggestions
interface DialogflowV1MessageSuggestions extends DialogflowV1BaseGoogleMessage<'suggestion_chips'> {}
property suggestions
suggestions?: DialogflowV1MessageSuggestion[];
interface DialogflowV1MessageText
interface DialogflowV1MessageText extends DialogflowV1BaseMessage<0> {}
property speech
speech?: string;
interface DialogflowV1Metadata
interface DialogflowV1Metadata {}
property intentId
intentId?: string;
property intentName
intentName?: string;
property nluResponseTime
nluResponseTime?: number;
property webhookForSlotFillingUsed
webhookForSlotFillingUsed?: string;
property webhookUsed
webhookUsed?: string;
interface DialogflowV1OriginalRequest
interface DialogflowV1OriginalRequest {}
interface DialogflowV1Parameters
interface DialogflowV1Parameters {}
index signature
[parameter: string]: string | Object | undefined;
interface DialogflowV1Result
interface DialogflowV1Result {}
property action
action?: string;
property actionIncomplete
actionIncomplete?: boolean;
property contexts
contexts?: DialogflowV1Context[];
property fulfillment
fulfillment?: DialogflowV1Fulfillment;
property metadata
metadata?: DialogflowV1Metadata;
property parameters
parameters?: DialogflowV1Parameters;
property resolvedQuery
resolvedQuery?: string;
property score
score?: number;
property source
source?: string;
property speech
speech?: string;
interface DialogflowV1Status
interface DialogflowV1Status {}
property code
code?: number;
property errorType
errorType?: string;
property webhookTimedOut
webhookTimedOut?: boolean;
interface DialogflowV1WebhookRequest
interface DialogflowV1WebhookRequest {}
property id
id?: string;
property lang
lang?: string;
property originalRequest
originalRequest?: DialogflowV1OriginalRequest;
property result
result?: DialogflowV1Result;
property sessionId
sessionId?: string;
property status
status?: DialogflowV1Status;
property timestamp
timestamp?: string;
property timezone
timezone?: string;
interface DialogflowV1WebhookResponse
interface DialogflowV1WebhookResponse {}
property contextOut
contextOut?: DialogflowV1Context[];
property data
data?: ApiClientObjectMap<any>;
property displayText
displayText?: string;
property followupEvent
followupEvent?: DialogflowV1FollowupEvent;
property messages
messages?: DialogflowV1Message[];
property source
source?: string;
property speech
speech?: string;
interface DialogflowVerification
interface DialogflowVerification {}
Modifiers
@public
property error
error?: string | ((error: string) => string);
Custom error message as a string or a function that returns a string given the original error message set by the library.
The message will get sent back in the JSON top level
error
property.Modifiers
@public
property headers
headers: DialogflowVerificationHeaders;
An object representing the header key to value map to check against,
Modifiers
@public
property status
status?: number;
Custom status code to return on verification error.
Modifiers
@public
interface Framework
interface Framework<THandler> {}
Modifiers
@public
interface GoogleActionsOrdersV3Action
interface GoogleActionsOrdersV3Action {}
property actionMetadata
actionMetadata?: GoogleActionsOrdersV3ActionActionMetadata;
Metadata associated with an action.
property openUrlAction
openUrlAction?: GoogleActionsV2UiElementsOpenUrlAction;
Action to take.
property title
title?: string;
Title or label of the action, displayed to the user. Max allowed length is 100 chars.
property type
type?: GoogleActionsOrdersV3ActionType;
Required: Type of action.
interface GoogleActionsOrdersV3ActionActionMetadata
interface GoogleActionsOrdersV3ActionActionMetadata {}
property expireTime
expireTime?: string;
Time when this action will expire.
interface GoogleActionsOrdersV3LineItem
interface GoogleActionsOrdersV3LineItem {}
property description
description?: string;
Line item description.
property followUpActions
followUpActions?: GoogleActionsOrdersV3Action[];
Follow up actions at line item.
property id
id?: string;
Required: Merchant assigned identifier for line item. Used for identifying existing line item in applying partial updates. Max allowed length is 64 chars.
property image
image?: GoogleActionsV2UiElementsImage;
Small image associated with this item, if any.
property name
name?: string;
Name of line item as displayed on the receipt. Max allowed length is 100 chars.
property notes
notes?: string[];
Additional notes applicable to this particular line item, for example cancellation policy.
property priceAttributes
priceAttributes?: GoogleActionsOrdersV3PriceAttribute[];
Line item level price and adjustments.
property provider
provider?: GoogleActionsOrdersV3Merchant;
The provider of the particular line item, if different from the overall order. Example: Expedia Order with line item provider ANA.
property purchase
purchase?: GoogleActionsOrdersV3VerticalsPurchasePurchaseItemExtension;
Purchase orders like goods, food etc.
property recipients
recipients?: GoogleActionsOrdersV3UserInfo[];
Line item level customers, this could be different from Order level buyer. Example: User X made restaurant reservation under name of user Y.
property reservation
reservation?: GoogleActionsOrdersV3VerticalsReservationReservationItemExtension;
Reservation orders like restaurant, haircut etc.
interface GoogleActionsOrdersV3Merchant
interface GoogleActionsOrdersV3Merchant {}
property address
address?: GoogleActionsV2Location;
Merchant's address.
property id
id?: string;
Optional ID assigned to merchant if any.
property image
image?: GoogleActionsV2UiElementsImage;
The image associated with the merchant.
property name
name?: string;
The name of the merchant like "Panera Bread".
property phoneNumbers
phoneNumbers?: GoogleActionsOrdersV3PhoneNumber[];
Merchant's phone numbers.
interface GoogleActionsOrdersV3Money
interface GoogleActionsOrdersV3Money {}
property amountInMicros
amountInMicros?: string;
Amount in micros. For example, this field should be set as 1990000 for $1.99.
property currencyCode
currencyCode?: string;
The 3-letter currency code defined in ISO 4217.
interface GoogleActionsOrdersV3Order
interface GoogleActionsOrdersV3Order {}
property buyerInfo
buyerInfo?: GoogleActionsOrdersV3UserInfo;
Info about the buyer.
property contents
contents?: GoogleActionsOrdersV3OrderContents;
Required: Order contents which is a group of line items.
property createTime
createTime?: string;
Required: Date and time the order was created.
property followUpActions
followUpActions?: GoogleActionsOrdersV3Action[];
Follow up actions at order level.
property googleOrderId
googleOrderId?: string;
Google assigned order id.
property image
image?: GoogleActionsV2UiElementsImage;
Image associated with the order.
property lastUpdateTime
lastUpdateTime?: string;
Date and time the order was last updated. Required for OrderUpdate.
property merchantOrderId
merchantOrderId?: string;
Required: Merchant assigned internal order id. This id must be unique, and is required for subsequent order update operations. This id may be set to the provided google_order_id, or any other unique value. Note that the id presented to users is the user_visible_order_id, which may be a different, more user-friendly value. Max allowed length is 64 chars.
property note
note?: string;
Notes attached to an order.
property paymentData
paymentData?: GoogleActionsTransactionsV3PaymentData;
Payment related data for the order.
property priceAttributes
priceAttributes?: GoogleActionsOrdersV3PriceAttribute[];
Price, discounts, taxes and so on.
property promotions
promotions?: GoogleActionsOrdersV3Promotion[];
All promotions that are associated with this order.
property purchase
purchase?: GoogleActionsOrdersV3VerticalsPurchasePurchaseOrderExtension;
Purchase order
property termsOfServiceUrl
termsOfServiceUrl?: string;
A link to the terms of service that apply to order/proposed order.
property ticket
ticket?: GoogleActionsOrdersV3VerticalsTicketTicketOrderExtension;
Ticket order
property transactionMerchant
transactionMerchant?: GoogleActionsOrdersV3Merchant;
Merchant that facilitated the checkout. This could be different from a line item level provider. Example: Expedia Order with line item from ANA.
property userVisibleOrderId
userVisibleOrderId?: string;
The user facing id referencing to current order. This id should be consistent with the id displayed for this order in other contexts, including websites, apps and email.
interface GoogleActionsOrdersV3OrderContents
interface GoogleActionsOrdersV3OrderContents {}
property lineItems
lineItems?: GoogleActionsOrdersV3LineItem[];
List of order line items. At least 1 line_item is required and at-most 50 is allowed. All line items must belong to same vertical.
interface GoogleActionsOrdersV3OrderUpdate
interface GoogleActionsOrdersV3OrderUpdate {}
property order
order?: GoogleActionsOrdersV3Order;
property reason
reason?: string;
Reason for the change/update.
property updateMask
updateMask?: string;
Note: There are following consideration/recommendations for following special fields: 1. order.last_update_time will always be updated as part of the update request. 2. order.create_time, order.google_order_id and order.merchant_order_id will be ignored if provided as part of the update_mask.
property userNotification
userNotification?: GoogleActionsOrdersV3OrderUpdateUserNotification;
If specified, displays a notification to the user with the specified title and text. Specifying a notification is a suggestion to notify and is not guaranteed to result in a notification.
interface GoogleActionsOrdersV3OrderUpdateUserNotification
interface GoogleActionsOrdersV3OrderUpdateUserNotification {}
interface GoogleActionsOrdersV3PhoneNumber
interface GoogleActionsOrdersV3PhoneNumber {}
property e164PhoneNumber
e164PhoneNumber?: string;
Phone number in E.164 format, as defined in International Telecommunication Union (ITU) Recommendation E.164. wiki link: https://en.wikipedia.org/wiki/E.164
property extension
extension?: string;
Extension is not standardized in ITU recommendations, except for being defined as a series of numbers with a maximum length of 40 digits. It is defined as a string here to accommodate for the possible use of a leading zero in the extension (organizations have complete freedom to do so, as there is no standard defined). Other than digits, some other dialling characters such as "," (indicating a wait) may be stored here. For example, in xxx-xxx-xxxx ext. 123, "123" is the extension.
property preferredDomesticCarrierCode
preferredDomesticCarrierCode?: string;
The carrier selection code that is preferred when calling this phone number domestically. This also includes codes that need to be dialed in some countries when calling from landlines to mobiles or vice versa. For example, in Columbia, a "3" needs to be dialed before the phone number itself when calling from a mobile phone to a domestic landline phone and vice versa. https://en.wikipedia.org/wiki/Telephone_numbers_in_Colombia https://en.wikipedia.org/wiki/Brazilian_Carrier_Selection_Code
Note this is the "preferred" code, which means other codes may work as well.
interface GoogleActionsOrdersV3PriceAttribute
interface GoogleActionsOrdersV3PriceAttribute {}
property amount
amount?: GoogleActionsOrdersV3Money;
Monetary amount.
property amountMillipercentage
amountMillipercentage?: number;
The percentage spec, to 1/1000th of a percent. Eg: 8.750% is represented as 8750, negative percentages represent percentage discounts. Deprecating this field. Can consider adding back when a solid usecase is required.
property name
name?: string;
Required: User displayed string of the price attribute. This is sent and localized by merchant.
property state
state?: GoogleActionsOrdersV3PriceAttributeState;
Required: State of the price: Estimate vs Actual.
property taxIncluded
taxIncluded?: boolean;
Whether the price is tax included.
property type
type?: GoogleActionsOrdersV3PriceAttributeType;
Required: Type of money attribute.
interface GoogleActionsOrdersV3Promotion
interface GoogleActionsOrdersV3Promotion {}
property coupon
coupon?: string;
Required: Coupon code applied to this offer.
interface GoogleActionsOrdersV3Time
interface GoogleActionsOrdersV3Time {}
property timeIso8601
timeIso8601?: string;
Represents an order-event time like reservation time, delivery time and so on. Could be a duration (start & end time), just the date, date time etc. Refer https://en.wikipedia.org/wiki/ISO_8601 for all supported formats.
interface GoogleActionsOrdersV3UserInfo
interface GoogleActionsOrdersV3UserInfo {}
property displayName
displayName?: string;
Display name of the user, might be different from first or last name.
property email
email?: string;
User email, Eg: janedoe@gmail.com.
property firstName
firstName?: string;
First name of the user.
property lastName
lastName?: string;
Last name of the user.
property phoneNumbers
phoneNumbers?: GoogleActionsOrdersV3PhoneNumber[];
Phone numbers of the user.
interface GoogleActionsOrdersV3VerticalsCommonVehicle
interface GoogleActionsOrdersV3VerticalsCommonVehicle {}
property colorName
colorName?: string;
Vehicle color name, eg. black Optional.
property image
image?: GoogleActionsV2UiElementsImage;
URL to a photo of the vehicle. The photo will be displayed at approximately 256x256px. Must be a jpg or png. Optional.
property licensePlate
licensePlate?: string;
Vehicle license plate number (e.g. "1ABC234"). Required.
property make
make?: string;
Vehicle make (e.g. "Honda"). This is displayed to the user and must be localized. Required.
property model
model?: string;
Vehicle model (e.g. "Grom"). This is displayed to the user and must be localized. Required.
interface GoogleActionsOrdersV3VerticalsPurchaseMerchantUnitMeasure
interface GoogleActionsOrdersV3VerticalsPurchaseMerchantUnitMeasure {}
interface GoogleActionsOrdersV3VerticalsPurchasePickupInfo
interface GoogleActionsOrdersV3VerticalsPurchasePickupInfo {}
property curbsideInfo
curbsideInfo?: GoogleActionsOrdersV3VerticalsPurchasePickupInfoCurbsideInfo;
Details specific to the curbside information. If pickup_type is not "CURBSIDE", this field would be ignored.
property pickupType
pickupType?: GoogleActionsOrdersV3VerticalsPurchasePickupInfoPickupType;
Pick up method, such as INSTORE, CURBSIDE etc.
interface GoogleActionsOrdersV3VerticalsPurchasePickupInfoCurbsideInfo
interface GoogleActionsOrdersV3VerticalsPurchasePickupInfoCurbsideInfo {}
property curbsideFulfillmentType
curbsideFulfillmentType?: GoogleActionsOrdersV3VerticalsPurchasePickupInfoCurbsideInfoCurbsideFulfillmentType;
Partners need additional information to facilitate curbside pickup orders. Depending upon what fulfillment type is chosen, corresponding details would be collected from the user.
property userVehicle
userVehicle?: GoogleActionsOrdersV3VerticalsCommonVehicle;
Vehicle details of the user placing the order.
interface GoogleActionsOrdersV3VerticalsPurchaseProductDetails
interface GoogleActionsOrdersV3VerticalsPurchaseProductDetails {}
property gtin
gtin?: string;
Global Trade Item Number of the product. Useful if offerId is not present in Merchant Center. Optional.
property plu
plu?: string;
Price look-up codes, commonly called PLU codes, PLU numbers, PLUs, produce codes, or produce labels, are a system of numbers that uniquely identify bulk produce sold in grocery stores and supermarkets.
property productAttributes
productAttributes?: ApiClientObjectMap<string>;
Merchant-provided details about the product, e.g. { "allergen": "peanut" }. Useful if offerId is not present in Merchant Center. Optional.
property productId
productId?: string;
Product or offer id associated with this line item.
property productType
productType?: string;
Product category defined by the merchant. E.g. "Home > Grocery > Dairy & Eggs > Milk > Whole Milk"
interface GoogleActionsOrdersV3VerticalsPurchasePurchaseError
interface GoogleActionsOrdersV3VerticalsPurchasePurchaseError {}
property availableQuantity
availableQuantity?: number;
Available quantity now. Applicable in case of AVAILABILITY_CHANGED.
property description
description?: string;
Additional error description.
property entityId
entityId?: string;
Entity Id that corresponds to the error. Example this can correspond to LineItemId / ItemOptionId.
property type
type?: GoogleActionsOrdersV3VerticalsPurchasePurchaseErrorType;
Required: This represents the granular reason why an order gets rejected by the merchant.
property updatedPrice
updatedPrice?: GoogleActionsOrdersV3PriceAttribute;
Relevant in case of PRICE_CHANGED / INCORRECT_PRICE error type.
interface GoogleActionsOrdersV3VerticalsPurchasePurchaseFulfillmentInfo
interface GoogleActionsOrdersV3VerticalsPurchasePurchaseFulfillmentInfo {}
property expectedFulfillmentTime
expectedFulfillmentTime?: GoogleActionsOrdersV3Time;
A window if a time-range is specified or ETA if single time specified. Expected delivery or pickup time.
property expectedPreparationTime
expectedPreparationTime?: GoogleActionsOrdersV3Time;
A window if a time-range is specified or ETA if single time specified. Expected time to prepare the food. Single-time preferred.
property expireTime
expireTime?: string;
Time at which this fulfillment option expires.
property fulfillmentContact
fulfillmentContact?: GoogleActionsOrdersV3UserInfo;
User contact for this fulfillment.
property fulfillmentType
fulfillmentType?: GoogleActionsOrdersV3VerticalsPurchasePurchaseFulfillmentInfoFulfillmentType;
Required: The type of fulfillment.
property id
id?: string;
Unique identifier for this service option.
property location
location?: GoogleActionsV2Location;
Pickup or delivery location.
property pickupInfo
pickupInfo?: GoogleActionsOrdersV3VerticalsPurchasePickupInfo;
Additional information regarding how order would be picked. This field would only be applicable when fulfillment type is PICKUP.
property price
price?: GoogleActionsOrdersV3PriceAttribute;
Cost of this option.
property shippingMethodName
shippingMethodName?: string;
Name of the shipping method selected by the user.
property storeCode
storeCode?: string;
StoreCode of the location. Example: Walmart is the merchant and store_code is the walmart store where fulfillment happened. https://support.google.com/business/answer/3370250?hl=en&ref_topic=4596653.
interface GoogleActionsOrdersV3VerticalsPurchasePurchaseItemExtension
interface GoogleActionsOrdersV3VerticalsPurchasePurchaseItemExtension {}
property extension
extension?: ApiClientObjectMap<any>;
Any extra fields exchanged between merchant and google.
property fulfillmentInfo
fulfillmentInfo?: GoogleActionsOrdersV3VerticalsPurchasePurchaseFulfillmentInfo;
Fulfillment info for this line item. If unset, this line item inherits order level fulfillment info.
property itemOptions
itemOptions?: GoogleActionsOrdersV3VerticalsPurchasePurchaseItemExtensionItemOption[];
Additional add-ons or sub-items.
property productDetails
productDetails?: GoogleActionsOrdersV3VerticalsPurchaseProductDetails;
Details about the product.
property productId
productId?: string;
Product or offer id associated with this line item.
property quantity
quantity?: number;
Quantity of the item.
property returnsInfo
returnsInfo?: GoogleActionsOrdersV3VerticalsPurchasePurchaseReturnsInfo;
Returns info for this line item. If unset, this line item inherits order level returns info.
property status
status?: GoogleActionsOrdersV3VerticalsPurchasePurchaseItemExtensionStatus;
Required: Line item level status.
property type
type?: GoogleActionsOrdersV3VerticalsPurchasePurchaseItemExtensionType;
Required: Type of purchase.
property unitMeasure
unitMeasure?: GoogleActionsOrdersV3VerticalsPurchaseMerchantUnitMeasure;
Unit measure. Specifies the size of the item in chosen units. The size, together with the active price is used to determine the unit price.
property userVisibleStatusLabel
userVisibleStatusLabel?: string;
Required: User visible label/string for the status. Max allowed length is 50 chars.
interface GoogleActionsOrdersV3VerticalsPurchasePurchaseItemExtensionItemOption
interface GoogleActionsOrdersV3VerticalsPurchasePurchaseItemExtensionItemOption {}
property id
id?: string;
For options that are items, unique item id.
property name
name?: string;
Option name.
property note
note?: string;
Note related to the option.
property prices
prices?: GoogleActionsOrdersV3PriceAttribute[];
Option total price.
property productId
productId?: string;
Product or offer id associated with this option.
property quantity
quantity?: number;
For options that are items, quantity.
property subOptions
subOptions?: GoogleActionsOrdersV3VerticalsPurchasePurchaseItemExtensionItemOption[];
To define other nested sub options.
interface GoogleActionsOrdersV3VerticalsPurchasePurchaseOrderExtension
interface GoogleActionsOrdersV3VerticalsPurchasePurchaseOrderExtension {}
property errors
errors?: GoogleActionsOrdersV3VerticalsPurchasePurchaseError[];
Optional: Errors because of which this order was rejected.
property extension
extension?: ApiClientObjectMap<any>;
Any extra fields exchanged between merchant and google.
property fulfillmentInfo
fulfillmentInfo?: GoogleActionsOrdersV3VerticalsPurchasePurchaseFulfillmentInfo;
Fulfillment info for the order.
property purchaseLocationType
purchaseLocationType?: GoogleActionsOrdersV3VerticalsPurchasePurchaseOrderExtensionPurchaseLocationType;
Location of the purchase (in-store / online)
property returnsInfo
returnsInfo?: GoogleActionsOrdersV3VerticalsPurchasePurchaseReturnsInfo;
Return info for the order.
property status
status?: GoogleActionsOrdersV3VerticalsPurchasePurchaseOrderExtensionStatus;
Required: Overall Status for the order.
property type
type?: GoogleActionsOrdersV3VerticalsPurchasePurchaseOrderExtensionType;
Required: Type of purchase.
property userVisibleStatusLabel
userVisibleStatusLabel?: string;
User visible label/string for the status. Max allowed length is 50 chars.
interface GoogleActionsOrdersV3VerticalsPurchasePurchaseReturnsInfo
interface GoogleActionsOrdersV3VerticalsPurchasePurchaseReturnsInfo {}
property daysToReturn
daysToReturn?: number;
Return is allowed within that many days.
property isReturnable
isReturnable?: boolean;
If true, return is allowed.
property policyUrl
policyUrl?: string;
Link to the return policy.
interface GoogleActionsOrdersV3VerticalsReservationReservationItemExtension
interface GoogleActionsOrdersV3VerticalsReservationReservationItemExtension {}
property confirmationCode
confirmationCode?: string;
Confirmation code for this reservation.
property extension
extension?: ApiClientObjectMap<any>;
Any extra fields exchanged between merchant and google.
property location
location?: GoogleActionsV2Location;
Location of the service/event.
property partySize
partySize?: number;
The number of people.
property reservationTime
reservationTime?: GoogleActionsOrdersV3Time;
Time when the service/event is scheduled to occur. Can be a time range, a date, or an exact date time.
property staffFacilitators
staffFacilitators?: GoogleActionsOrdersV3VerticalsReservationStaffFacilitator[];
Staff facilitators who will be servicing the reservation. Ex. The hairstylist.
property status
status?: GoogleActionsOrdersV3VerticalsReservationReservationItemExtensionStatus;
Required: Reservation status.
property type
type?: GoogleActionsOrdersV3VerticalsReservationReservationItemExtensionType;
Type of reservation. May be unset if none of the type options is applicable.
property userAcceptableTimeRange
userAcceptableTimeRange?: GoogleActionsOrdersV3Time;
Time range that is acceptable to the user.
property userVisibleStatusLabel
userVisibleStatusLabel?: string;
Required: User visible label/string for the status. Max allowed length is 50 chars.
interface GoogleActionsOrdersV3VerticalsReservationStaffFacilitator
interface GoogleActionsOrdersV3VerticalsReservationStaffFacilitator {}
interface GoogleActionsOrdersV3VerticalsTicketEventCharacter
interface GoogleActionsOrdersV3VerticalsTicketEventCharacter {}
interface GoogleActionsOrdersV3VerticalsTicketTicketEvent
interface GoogleActionsOrdersV3VerticalsTicketTicketEvent {}
property description
description?: string;
Description of the event.
property doorTime
doorTime?: GoogleActionsOrdersV3Time;
Entry time, which might be different from the event start time. e.g. the event starts at 9am, but entry time is 8:30am.
property endDate
endDate?: GoogleActionsOrdersV3Time;
End time.
property eventCharacters
eventCharacters?: GoogleActionsOrdersV3VerticalsTicketEventCharacter[];
The characters related to this event. It can be directors or actors of a movie event, or performers of a concert, etc.
property location
location?: GoogleActionsV2Location;
The location where the event is happening, or an organization is located.
property name
name?: string;
Required: Name of the event. For example, if the event is a movie, this should be the movie name.
property startDate
startDate?: GoogleActionsOrdersV3Time;
Start time.
property type
type?: GoogleActionsOrdersV3VerticalsTicketTicketEventType;
Required: Type of the ticket event, e.g. movie, concert.
property url
url?: string;
Url to the event info.
interface GoogleActionsOrdersV3VerticalsTicketTicketOrderExtension
interface GoogleActionsOrdersV3VerticalsTicketTicketOrderExtension {}
property ticketEvent
ticketEvent?: GoogleActionsOrdersV3VerticalsTicketTicketEvent;
The event applied to all line item tickets.
interface GoogleActionsTransactionsV3CompletePurchaseValue
interface GoogleActionsTransactionsV3CompletePurchaseValue {}
property orderId
orderId?: string;
A unique order identifier for the transaction. This identifier corresponds to the Google provided order ID.
property purchaseStatus
purchaseStatus?: GoogleActionsTransactionsV3CompletePurchaseValuePurchaseStatus;
Status of current purchase.
property purchaseToken
purchaseToken?: string;
A opaque token that uniquely identifies a purchase for a given item and user pair.
interface GoogleActionsTransactionsV3CompletePurchaseValueSpec
interface GoogleActionsTransactionsV3CompletePurchaseValueSpec {}
property developerPayload
developerPayload?: string;
An opaque string specified by developer, which would associate with the purchase and is expected to return as part of purchase data.
property skuId
skuId?: GoogleActionsTransactionsV3SkuId;
The product being purchased.
interface GoogleActionsTransactionsV3DigitalPurchaseCheckResult
interface GoogleActionsTransactionsV3DigitalPurchaseCheckResult {}
property resultType
resultType?: GoogleActionsTransactionsV3DigitalPurchaseCheckResultResultType;
Result type for digital purchase check result.
interface GoogleActionsTransactionsV3DigitalPurchaseCheckSpec
interface GoogleActionsTransactionsV3DigitalPurchaseCheckSpec {}
interface GoogleActionsTransactionsV3GooglePaymentOption
interface GoogleActionsTransactionsV3GooglePaymentOption {}
property facilitationSpec
facilitationSpec?: string;
This JSON blob captures the specification for how Google facilitates the payment for integrators, which is the PaymentDataRequest object as defined in https://developers.google.com/pay/api/web/reference/object#PaymentDataRequest Example: { "apiVersion": 2, "apiVersionMinor": 0, "merchantInfo": { "merchantName": "Example Merchant" }, "allowedPaymentMethods": [ { "type": "CARD", "parameters": { "allowedAuthMethods": ["PAN_ONLY", "CRYPTOGRAM_3DS"], "allowedCardNetworks": ["AMEX", "DISCOVER", "JCB", "MASTERCARD", "VISA"] }, "tokenizationSpecification": { "type": "PAYMENT_GATEWAY", "parameters": { "gateway": "example", "gatewayMerchantId": "exampleGatewayMerchantId" } } } ], "transactionInfo": { "totalPriceStatus": "ESTIMATED", "totalPrice": "12.34", "currencyCode": "USD" } }
interface GoogleActionsTransactionsV3MerchantPaymentMethod
interface GoogleActionsTransactionsV3MerchantPaymentMethod {}
property paymentMethodDisplayInfo
paymentMethodDisplayInfo?: GoogleActionsTransactionsV3PaymentMethodDisplayInfo;
Required. Display info of this payment method.
property paymentMethodGroup
paymentMethodGroup?: string;
Optional. The group / profile name that the payment method belongs to.
property paymentMethodId
paymentMethodId?: string;
Required. Id of the payment method passed from merchant / action. Note this id is should be unique if multiple payment methods are sent from Merchant/Action.
property paymentMethodStatus
paymentMethodStatus?: GoogleActionsTransactionsV3PaymentMethodStatus;
Optional. Status of the payment method. If not present, the payment method is assumed to be in OK status.
interface GoogleActionsTransactionsV3MerchantPaymentOption
interface GoogleActionsTransactionsV3MerchantPaymentOption {}
property defaultMerchantPaymentMethodId
defaultMerchantPaymentMethodId?: string;
Optional. Id of the default payment method, if any.
property managePaymentMethodUrl
managePaymentMethodUrl?: string;
Optional. A link to the action/merchant website for managing payment method.
property merchantPaymentMethod
merchantPaymentMethod?: GoogleActionsTransactionsV3MerchantPaymentMethod[];
Required. List of payment methods provided by Action/Merchant.
interface GoogleActionsTransactionsV3OrderOptions
interface GoogleActionsTransactionsV3OrderOptions {}
property requestDeliveryAddress
requestDeliveryAddress?: boolean;
If true, delivery address is required for the associated order.
property userInfoOptions
userInfoOptions?: GoogleActionsTransactionsV3UserInfoOptions;
The app can request user info by setting this field. If set, the corresponding field will show up in ProposedOrderCard for user's confirmation.
interface GoogleActionsTransactionsV3PaymentData
interface GoogleActionsTransactionsV3PaymentData {}
property paymentInfo
paymentInfo?: GoogleActionsTransactionsV3PaymentInfo;
Payment information regarding the order that's useful for user facing interaction.
property paymentResult
paymentResult?: GoogleActionsTransactionsV3PaymentResult;
Payment result that's used by integrator for completing a transaction. This field will be populated by Actions on Google if the checkout experience is managed by Actions-on-Google.
interface GoogleActionsTransactionsV3PaymentInfo
interface GoogleActionsTransactionsV3PaymentInfo {}
property paymentMethodDisplayInfo
paymentMethodDisplayInfo?: GoogleActionsTransactionsV3PaymentMethodDisplayInfo;
The display info of the payment method used for the transaction.
property paymentMethodProvenance
paymentMethodProvenance?: GoogleActionsTransactionsV3PaymentInfoPaymentMethodProvenance;
Provenance of the payment method used for the transaction. User may have registered the same payment method with both google and merchant.
interface GoogleActionsTransactionsV3PaymentMethodDisplayInfo
interface GoogleActionsTransactionsV3PaymentMethodDisplayInfo {}
property paymentMethodDisplayName
paymentMethodDisplayName?: string;
User visible name of the payment method. For example, VISA **** 1234 Checking acct **** 5678
property paymentType
paymentType?: GoogleActionsTransactionsV3PaymentMethodDisplayInfoPaymentType;
The type of the payment.
interface GoogleActionsTransactionsV3PaymentMethodStatus
interface GoogleActionsTransactionsV3PaymentMethodStatus {}
property status
status?: GoogleActionsTransactionsV3PaymentMethodStatusStatus;
property statusMessage
statusMessage?: string;
User facing message regarding the payment method status, i.e. "Expired". Only required when payment method requires fix or is inapplicable.
interface GoogleActionsTransactionsV3PaymentParameters
interface GoogleActionsTransactionsV3PaymentParameters {}
property googlePaymentOption
googlePaymentOption?: GoogleActionsTransactionsV3GooglePaymentOption;
Info for requesting payment info from google.
property merchantPaymentOption
merchantPaymentOption?: GoogleActionsTransactionsV3MerchantPaymentOption;
Info for payment methods provided by Action/Merchant.
interface GoogleActionsTransactionsV3PaymentResult
interface GoogleActionsTransactionsV3PaymentResult {}
property googlePaymentData
googlePaymentData?: string;
Google provided payment method data. If your payment processor is listed as Google supported payment processor here: https://developers.google.com/pay/api/ Navigate to your payment processor through the link to find out more details. Otherwise, refer to following documentation for payload details. https://developers.google.com/pay/api/payment-data-cryptography
property merchantPaymentMethodId
merchantPaymentMethodId?: string;
Merchant/Action provided payment method chosen by user.
interface GoogleActionsTransactionsV3PresentationOptions
interface GoogleActionsTransactionsV3PresentationOptions {}
property actionDisplayName
actionDisplayName?: string;
action_display_name can be one of the following values:
PLACE_ORDER
: Used for placing an order.PAY
: Used for a payment.BUY
: Used for a purchase.SEND
: Used for a money transfer.BOOK
: Used for a booking.RESERVE
: Used for reservation.SCHEDULE
: Used for scheduling an appointment.SUBSCRIBE
: Used for subscription.action_display_name refers to the name of the action which best describes this order. This will be used in various places like prompt, suggestion chip etc while proposing the order to the user.
interface GoogleActionsTransactionsV3SkuId
interface GoogleActionsTransactionsV3SkuId {}
property id
id?: string;
The identifier of the product SKU used for registration in the developer console.
property packageName
packageName?: string;
The name of the android package under which the sku was registered.
property skuType
skuType?: GoogleActionsTransactionsV3SkuIdSkuType;
The type of SKU.
interface GoogleActionsTransactionsV3TransactionDecisionValue
interface GoogleActionsTransactionsV3TransactionDecisionValue {}
property deliveryAddress
deliveryAddress?: GoogleActionsV2Location;
If user requests for delivery address update, this field includes the new delivery address. This field will be present only when
transaction_decision
isDELIVERY_ADDRESS_UPDATED
.
property order
order?: GoogleActionsOrdersV3Order;
The order that user has approved. This field will be present only when
transaction_decision
isORDER_ACCEPTED
.
property transactionDecision
transactionDecision?: GoogleActionsTransactionsV3TransactionDecisionValueTransactionDecision;
Decision regarding the order.
interface GoogleActionsTransactionsV3TransactionDecisionValueSpec
interface GoogleActionsTransactionsV3TransactionDecisionValueSpec {}
property order
order?: GoogleActionsOrdersV3Order;
The order that's ready for user to approve.
property orderOptions
orderOptions?: GoogleActionsTransactionsV3OrderOptions;
Options associated with the order.
property paymentParameters
paymentParameters?: GoogleActionsTransactionsV3PaymentParameters;
Parameters for requesting payment for this order.
property presentationOptions
presentationOptions?: GoogleActionsTransactionsV3PresentationOptions;
Options used to customize order presentation to the user.
interface GoogleActionsTransactionsV3TransactionRequirementsCheckResult
interface GoogleActionsTransactionsV3TransactionRequirementsCheckResult {}
property resultType
resultType?: GoogleActionsTransactionsV3TransactionRequirementsCheckResultResultType;
Result type for transaction requirements check.
interface GoogleActionsTransactionsV3TransactionRequirementsCheckSpec
interface GoogleActionsTransactionsV3TransactionRequirementsCheckSpec {}
interface GoogleActionsTransactionsV3UserInfoOptions
interface GoogleActionsTransactionsV3UserInfoOptions {}
property userInfoProperties
userInfoProperties?: GoogleActionsTransactionsV3UserInfoOptionsUserInfoProperties[];
List of user info properties.
interface GoogleActionsV2AppRequest
interface GoogleActionsV2AppRequest {}
property availableSurfaces
availableSurfaces?: GoogleActionsV2Surface[];
Surfaces available for cross surface handoff.
property conversation
conversation?: GoogleActionsV2Conversation;
Holds session data like the conversation ID and conversation token.
property device
device?: GoogleActionsV2Device;
Information about the device the user is using to interact with the Action.
property inputs
inputs?: GoogleActionsV2Input[];
List of inputs corresponding to the expected inputs specified by the Action. For the initial conversation trigger, the input contains information on how the user triggered the conversation.
property isInSandbox
isInSandbox?: boolean;
Indicates whether the request should be handled in sandbox mode.
property surface
surface?: GoogleActionsV2Surface;
Information about the surface the user is interacting with, e.g. whether it can output audio or has a screen.
property user
user?: GoogleActionsV2User;
User who initiated the conversation.
interface GoogleActionsV2AppResponse
interface GoogleActionsV2AppResponse {}
property conversationToken
conversationToken?: string;
An opaque token that is recirculated to the Action every conversation turn.
property customPushMessage
customPushMessage?: GoogleActionsV2CustomPushMessage;
A custom push message that allows developers to send structured data to Actions on Google.
property expectedInputs
expectedInputs?: GoogleActionsV2ExpectedInput[];
List of inputs the Action expects, each input can be a common Actions on Google intent (start with 'actions.'), or an input taking list of possible intents. Only one input is supported for now.
property expectUserResponse
expectUserResponse?: boolean;
Indicates whether the Action is expecting a user response. This is true when the conversation is ongoing, false when the conversation is done.
property finalResponse
finalResponse?: GoogleActionsV2FinalResponse;
Final response when the Action does not expect user's input.
property isInSandbox
isInSandbox?: boolean;
Indicates whether the response should be handled in sandbox mode. This bit is needed to push structured data to Google in sandbox mode.
property resetUserStorage
resetUserStorage?: boolean;
Whether to clear the persisted user_storage. If set to true, then in the next interaction with the user, the user_storage field will be empty.
property userStorage
userStorage?: string;
An opaque token controlled by the Action that is persisted across conversations for a particular user. If empty or unspecified, the existing persisted token will be unchanged. The maximum size of the string is 10k bytes. If multiple dialogs are occurring concurrently for the same user, then updates to this token can overwrite each other unexpectedly.
interface GoogleActionsV2Argument
interface GoogleActionsV2Argument {}
property boolValue
boolValue?: boolean;
Specified when query pattern includes a
$org.schema.type.YesNo
type or expected input has a built-in intent:actions.intent.CONFIRMATION
. NOTE: if the boolean value is missing, it representsfalse
.
property datetimeValue
datetimeValue?: GoogleActionsV2DateTime;
Specified for the built-in intent:
actions.intent.DATETIME
.
property extension
extension?: ApiClientObjectMap<any>;
Extension whose type depends on the argument. For example, if the argument name is
SIGN_IN
for theactions.intent.SIGN_IN
intent, then this extension will contain a SignInValue value.
property floatValue
floatValue?: number;
Specified for built-in intent: "actions.intent.NUMBER"
property intValue
intValue?: string;
Specified when query pattern includes a $org.schema.type.Number type or expected input has a built-in intent: "assistant.intent.action.NUMBER".
property name
name?: string;
Name of the argument being provided for the input.
property placeValue
placeValue?: GoogleActionsV2Location;
Specified when query pattern includes a $org.schema.type.Location type or expected input has a built-in intent: "actions.intent.PLACE".
property rawText
rawText?: string;
The raw text, typed or spoken, that provided the value for the argument.
property status
status?: GoogleRpcStatus;
Specified when an error was encountered while computing the argument. For example, the built-in intent "actions.intent.PLACE" can return an error status if the user denied the permission to access their device location.
property structuredValue
structuredValue?: ApiClientObjectMap<any>;
Specified when Google needs to pass data value in JSON format.
property textValue
textValue?: string;
Specified when query pattern includes a
$org.schema.type.Text
type or expected input has a built-in intent:actions.intent.TEXT
, oractions.intent.OPTION
. Note that for theOPTION
intent, we set thetext_value
as option key, theraw_text
above will indicate the raw span in user's query.
interface GoogleActionsV2Capability
interface GoogleActionsV2Capability {}
property name
name?: string;
The name of the capability, e.g.
actions.capability.AUDIO_OUTPUT
interface GoogleActionsV2ConfirmationValueSpec
interface GoogleActionsV2ConfirmationValueSpec {}
property dialogSpec
dialogSpec?: GoogleActionsV2ConfirmationValueSpecConfirmationDialogSpec;
Configures dialog that asks for confirmation.
interface GoogleActionsV2ConfirmationValueSpecConfirmationDialogSpec
interface GoogleActionsV2ConfirmationValueSpecConfirmationDialogSpec {}
property requestConfirmationText
requestConfirmationText?: string;
This is the question asked by confirmation sub-dialog. For example "Are you sure about that?"
interface GoogleActionsV2Conversation
interface GoogleActionsV2Conversation {}
property conversationId
conversationId?: string;
Unique ID for the multi-turn conversation. It's assigned for the first turn. After that it remains the same for subsequent conversation turns until the conversation is terminated.
property conversationToken
conversationToken?: string;
Opaque token specified by the Action in the last conversation turn. It can be used by an Action to track the conversation or to store conversation related data.
property type
type?: GoogleActionsV2ConversationType;
Type indicates the state of the conversation in its lifecycle.
interface GoogleActionsV2CustomPushMessage
interface GoogleActionsV2CustomPushMessage {}
property orderUpdate
orderUpdate?: GoogleActionsV2OrdersOrderUpdate;
An order update updating orders placed through transaction APIs.
property target
target?: GoogleActionsV2CustomPushMessageTarget;
The specified target for the push request.
property userNotification
userNotification?: GoogleActionsV2UserNotification;
If specified, displays a notification to the user with specified title and text.
interface GoogleActionsV2CustomPushMessageTarget
interface GoogleActionsV2CustomPushMessageTarget {}
property argument
argument?: GoogleActionsV2Argument;
The argument to target for an intent. For V1, only one Argument is supported.
property intent
intent?: string;
The intent to target.
property locale
locale?: string;
The locale to target. Follows IETF BCP-47 language code. Can be used by a multi-lingual app to target a user on a specified localized app. If not specified, it will default to en-US.
property userId
userId?: string;
The user to target.
interface GoogleActionsV2DateTime
interface GoogleActionsV2DateTime {}
interface GoogleActionsV2DateTimeValueSpec
interface GoogleActionsV2DateTimeValueSpec {}
property dialogSpec
dialogSpec?: GoogleActionsV2DateTimeValueSpecDateTimeDialogSpec;
Control datetime prompts.
interface GoogleActionsV2DateTimeValueSpecDateTimeDialogSpec
interface GoogleActionsV2DateTimeValueSpecDateTimeDialogSpec {}
property requestDateText
requestDateText?: string;
This is used to create prompt to ask for date only. For example: What date are you looking for?
property requestDatetimeText
requestDatetimeText?: string;
This is used to create initial prompt by datetime sub-dialog. Example question: "What date and time do you want?"
property requestTimeText
requestTimeText?: string;
This is used to create prompt to ask for time only. For example: What time?
interface GoogleActionsV2DeliveryAddressValue
interface GoogleActionsV2DeliveryAddressValue {}
property location
location?: GoogleActionsV2Location;
Contains delivery address only when user agrees to share the delivery address.
property userDecision
userDecision?: GoogleActionsV2DeliveryAddressValueUserDecision;
User's decision regarding the request.
interface GoogleActionsV2DeliveryAddressValueSpec
interface GoogleActionsV2DeliveryAddressValueSpec {}
property addressOptions
addressOptions?: GoogleActionsV2DeliveryAddressValueSpecAddressOptions;
Configuration for delivery address dialog.
interface GoogleActionsV2DeliveryAddressValueSpecAddressOptions
interface GoogleActionsV2DeliveryAddressValueSpecAddressOptions {}
property reason
reason?: string;
App can optionally pass a short text giving user a hint why delivery address is requested. For example, "Grubhub is asking your address for [determining the service area].", the text in
[]
is the custom TTS that should be populated here.
interface GoogleActionsV2Device
interface GoogleActionsV2Device {}
property location
location?: GoogleActionsV2Location;
Represents actual device location such as latitude, longitude, and formatted address. Requires the DEVICE_COARSE_LOCATION or DEVICE_PRECISE_LOCATION permission.
interface GoogleActionsV2DevicesAndroidApp
interface GoogleActionsV2DevicesAndroidApp {}
property packageName
packageName?: string;
Package name Package name must be specified when specifing Android Fulfillment.
property versions
versions?: GoogleActionsV2DevicesAndroidAppVersionFilter[];
When multiple filters are specified, any filter match will trigger the app.
interface GoogleActionsV2DevicesAndroidAppVersionFilter
interface GoogleActionsV2DevicesAndroidAppVersionFilter {}
property maxVersion
maxVersion?: number;
Max version code, inclusive. The range considered is [min_version:max_version]. A null range implies any version. Examples: To specify a single version use: [target_version:target_version]. To specify any version leave min_version and max_version unspecified. To specify all versions until max_version, leave min_version unspecified. To specify all versions from min_version, leave max_version unspecified.
property minVersion
minVersion?: number;
Min version code or 0, inclusive.
interface GoogleActionsV2DialogSpec
interface GoogleActionsV2DialogSpec {}
property extension
extension?: ApiClientObjectMap<any>;
Holds helper specific dialog specs if any. For example: ConfirmationDialogSpec for confirmation helper.
interface GoogleActionsV2Entitlement
interface GoogleActionsV2Entitlement {}
property inAppDetails
inAppDetails?: GoogleActionsV2SignedData;
Only present for in-app purchase and in-app subs.
property sku
sku?: string;
Product sku. Package name for paid app, suffix of Finsky docid for in-app purchase and in-app subscription. Match getSku() in Play InApp Billing API.
property skuType
skuType?: GoogleActionsV2EntitlementSkuType;
interface GoogleActionsV2ExpectedInput
interface GoogleActionsV2ExpectedInput {}
property inputPrompt
inputPrompt?: GoogleActionsV2InputPrompt;
The customized prompt used to ask user for input.
property possibleIntents
possibleIntents?: GoogleActionsV2ExpectedIntent[];
List of intents that can be used to fulfill this input. To have Actions on Google just return the raw user input, the app should ask for the
actions.intent.TEXT
intent.
property speechBiasingHints
speechBiasingHints?: string[];
List of phrases the Action wants Google to use for speech biasing. Up to 1000 phrases are allowed.
interface GoogleActionsV2ExpectedIntent
interface GoogleActionsV2ExpectedIntent {}
property inputValueData
inputValueData?: ApiClientObjectMap<any>;
Additional configuration data required by a built-in intent. Possible values for the built-in intents:
actions.intent.OPTION ->
[google.actions.v2.OptionValueSpec],actions.intent.CONFIRMATION ->
[google.actions.v2.ConfirmationValueSpec],actions.intent.TRANSACTION_REQUIREMENTS_CHECK ->
[google.actions.v2.TransactionRequirementsCheckSpec],actions.intent.DELIVERY_ADDRESS ->
[google.actions.v2.DeliveryAddressValueSpec],actions.intent.TRANSACTION_DECISION ->
[google.actions.v2.TransactionDecisionValueSpec],actions.intent.PLACE ->
[google.actions.v2.PlaceValueSpec],actions.intent.Link ->
[google.actions.v2.LinkValueSpec]
property intent
intent?: string;
The built-in intent name, e.g.
actions.intent.TEXT
, or intents defined in the action package. If the intent specified is not a built-in intent, it is only used for speech biasing and the input provided by the Google Assistant will be theactions.intent.TEXT
intent.
property parameterName
parameterName?: string;
Optionally, a parameter of the intent that is being requested. Only valid for requested intents. Used for speech biasing.
interface GoogleActionsV2FinalResponse
interface GoogleActionsV2FinalResponse {}
property richResponse
richResponse?: GoogleActionsV2RichResponse;
Rich response when user is not required to provide an input.
property speechResponse
speechResponse?: GoogleActionsV2SpeechResponse;
Spoken response when user is not required to provide an input.
interface GoogleActionsV2Input
interface GoogleActionsV2Input {}
property arguments
arguments?: GoogleActionsV2Argument[];
A list of provided argument values for the input requested by the Action.
property canvasState
canvasState?: ApiClientObjectMap<any>;
Opaque context set in the interactive canvas web app for all subsequent intents
property intent
intent?: string;
Indicates the user's intent. For the first conversation turn, the intent will refer to the triggering intent for the Action. For subsequent conversation turns, the intent will be a common Actions on Google intent (starts with 'actions.'). For example, if the expected input is
actions.intent.OPTION
, then the the intent specified here will either beactions.intent.OPTION
if the Google Assistant was able to satisfy that intent, oractions.intent.TEXT
if the user provided other information. See https://developers.google.com/actions/reference/rest/intents.
property rawInputs
rawInputs?: GoogleActionsV2RawInput[];
Raw input transcription from each turn of conversation. Multiple conversation turns may be required for Actions on Google to provide some types of input to the Action.
interface GoogleActionsV2InputPrompt
interface GoogleActionsV2InputPrompt {}
property initialPrompts
initialPrompts?: GoogleActionsV2SpeechResponse[];
Initial prompts asking user to provide an input. Only a single initial_prompt is supported.
property noInputPrompts
noInputPrompts?: GoogleActionsV2SimpleResponse[];
Prompt used to ask user when there is no input from user.
property richInitialPrompt
richInitialPrompt?: GoogleActionsV2RichResponse;
Prompt payload.
interface GoogleActionsV2LinkValueSpec
interface GoogleActionsV2LinkValueSpec {}
property dialogSpec
dialogSpec?: GoogleActionsV2DialogSpec;
property openUrlAction
openUrlAction?: GoogleActionsV2UiElementsOpenUrlAction;
Destination that the app should link to. Could be a web URL, a conversational link or an Android intent. A web URL is used to handoff the flow to some website. A conversational link is used to provide a deep link into another AoG app. An Android intent URI is used to trigger an Android intent. This requires the package_name to be specified.
interface GoogleActionsV2LinkValueSpecLinkDialogSpec
interface GoogleActionsV2LinkValueSpecLinkDialogSpec {}
property destinationName
destinationName?: string;
The name of the app or site this request wishes to linking to. The TTS will be created with the title "Open <destination_name>". Also used during confirmation, "Can I send you to <destination_name>?" If we know the actual title of the link that is being handed off to, we will ignore this field and use the appropriate title. Max 20 chars.
property requestLinkReason
requestLinkReason?: string;
A string that is added to the end of the confirmation prompt to explain why we need to link out. Example: "navigate to pick up your coffee?" This can be appended to the confirmation prompt like "Can I send you to Google Maps to navigate to pick up your coffee?"
interface GoogleActionsV2Location
interface GoogleActionsV2Location {}
property city
city?: string;
City. Requires the DEVICE_PRECISE_LOCATION or DEVICE_COARSE_LOCATION permission.
property coordinates
coordinates?: GoogleTypeLatLng;
Geo coordinates. Requires the DEVICE_PRECISE_LOCATION permission.
property formattedAddress
formattedAddress?: string;
Display address, e.g., "1600 Amphitheatre Pkwy, Mountain View, CA 94043". Requires the DEVICE_PRECISE_LOCATION permission.
property name
name?: string;
Name of the place.
property notes
notes?: string;
Notes about the location.
property phoneNumber
phoneNumber?: string;
Phone number of the location, e.g. contact number of business location or phone number for delivery location.
property placeId
placeId?: string;
place_id is used with Places API to fetch details of a place. See https://developers.google.com/places/web-service/place-id
property postalAddress
postalAddress?: GoogleTypePostalAddress;
Postal address. Requires the DEVICE_PRECISE_LOCATION or DEVICE_COARSE_LOCATION permission.
property zipCode
zipCode?: string;
Zip code. Requires the DEVICE_PRECISE_LOCATION or DEVICE_COARSE_LOCATION permission.
interface GoogleActionsV2MediaObject
interface GoogleActionsV2MediaObject {}
property contentUrl
contentUrl?: string;
The url pointing to the media content.
property description
description?: string;
Description of this media object.
property icon
icon?: GoogleActionsV2UiElementsImage;
A small image icon displayed on the right from the title. It's resized to 36x36 dp.
property largeImage
largeImage?: GoogleActionsV2UiElementsImage;
A large image, such as the cover of the album, etc.
property name
name?: string;
Name of this media object.
interface GoogleActionsV2MediaResponse
interface GoogleActionsV2MediaResponse {}
property mediaObjects
mediaObjects?: GoogleActionsV2MediaObject[];
The list of media objects.
property mediaType
mediaType?: GoogleActionsV2MediaResponseMediaType;
Type of the media within this response.
interface GoogleActionsV2MediaStatus
interface GoogleActionsV2MediaStatus {}
property status
status?: GoogleActionsV2MediaStatusStatus;
The status of the media
interface GoogleActionsV2NewSurfaceValue
interface GoogleActionsV2NewSurfaceValue {}
property status
status?: GoogleActionsV2NewSurfaceValueStatus;
interface GoogleActionsV2NewSurfaceValueSpec
interface GoogleActionsV2NewSurfaceValueSpec {}
property capabilities
capabilities?: string[];
The list of capabilities required from the surface. Eg, ["actions.capability.SCREEN_OUTPUT"]
property context
context?: string;
Context describing the content the user will receive on the new surface. Eg, "[Sure, I know of 10 that are really popular. The highest-rated one is at Mount Marcy.] Is it okay if I send that to your phone?"
property notificationTitle
notificationTitle?: string;
Title of the notification which prompts the user to continue on the new surface.
interface GoogleActionsV2OptionInfo
interface GoogleActionsV2OptionInfo {}
interface GoogleActionsV2OptionValueSpec
interface GoogleActionsV2OptionValueSpec {}
property carouselSelect
carouselSelect?: GoogleActionsV2UiElementsCarouselSelect;
A select with a card carousel GUI, use collection_select instead.
property collectionSelect
collectionSelect?: GoogleActionsV2UiElementsCollectionSelect;
A select with a card collection GUI
property listSelect
listSelect?: GoogleActionsV2UiElementsListSelect;
A select with a list card GUI
property simpleSelect
simpleSelect?: GoogleActionsV2SimpleSelect;
A simple select with no associated GUI
interface GoogleActionsV2OrdersActionProvidedPaymentOptions
interface GoogleActionsV2OrdersActionProvidedPaymentOptions {}
property displayName
displayName?: string;
Name of the instrument displayed on the receipt. Required for action-provided payment info. For
PAYMENT_CARD
, this could be "VISA-1234". ForBANK
, this could be "Chase Checking-1234". ForLOYALTY_PROGRAM
, this could be "Starbuck's points". ForON_FULFILLMENT
, this could be something like "pay on delivery".
property paymentType
paymentType?: GoogleActionsV2OrdersActionProvidedPaymentOptionsPaymentType;
Type of payment. Required.
interface GoogleActionsV2OrdersCancellationInfo
interface GoogleActionsV2OrdersCancellationInfo {}
property reason
reason?: string;
Reason for cancellation.
interface GoogleActionsV2OrdersCart
interface GoogleActionsV2OrdersCart {}
property extension
extension?: ApiClientObjectMap<any>;
Extension to the cart based on the type of order.
property id
id?: string;
Optional id for this cart. Included as part of the Cart returned back to the integrator at confirmation time.
property lineItems
lineItems?: GoogleActionsV2OrdersLineItem[];
The good(s) or service(s) the user is ordering. There must be at least one line item.
property merchant
merchant?: GoogleActionsV2OrdersMerchant;
Merchant for the cart, if different from the caller.
property notes
notes?: string;
Notes about this cart.
property otherItems
otherItems?: GoogleActionsV2OrdersLineItem[];
Adjustments entered by the user, e.g. gratuity.
property promotions
promotions?: GoogleActionsV2OrdersPromotion[];
Optional. Promotional coupons added to the cart. Eligible promotions will be sent back as discount line items in proposed order.
interface GoogleActionsV2OrdersCustomerInfo
interface GoogleActionsV2OrdersCustomerInfo {}
property email
email?: string;
Customer email will be included and returned to the app if CustomerInfoProperty.EMAIL specified in CustomerInfoOptions.
interface GoogleActionsV2OrdersCustomerInfoOptions
interface GoogleActionsV2OrdersCustomerInfoOptions {}
property customerInfoProperties
customerInfoProperties?: GoogleActionsV2OrdersCustomerInfoOptionsCustomerInfoProperties[];
List of customer info properties.
interface GoogleActionsV2OrdersFulfillmentInfo
interface GoogleActionsV2OrdersFulfillmentInfo {}
property deliveryTime
deliveryTime?: string;
When the order will be fulfilled.
interface GoogleActionsV2OrdersGenericExtension
interface GoogleActionsV2OrdersGenericExtension {}
interface GoogleActionsV2OrdersGoogleProvidedPaymentOptions
interface GoogleActionsV2OrdersGoogleProvidedPaymentOptions {}
property facilitationSpecification
facilitationSpecification?: string;
This JSON blob captures the specification for how Google facilitates the payment for integrators, which is the PaymentDataRequest object as defined in https://developers.google.com/pay/api/web/reference/object#PaymentDataRequest Example: { "apiVersion": 2, "apiVersionMinor": 0, "merchantInfo": { "merchantName": "Example Merchant" }, "allowedPaymentMethods": [ { "type": "CARD", "parameters": { "allowedAuthMethods": ["PAN_ONLY", "CRYPTOGRAM_3DS"], "allowedCardNetworks": ["AMEX", "DISCOVER", "JCB", "MASTERCARD", "VISA"] }, "tokenizationSpecification": { "type": "PAYMENT_GATEWAY", "parameters": { "gateway": "example", "gatewayMerchantId": "exampleGatewayMerchantId" } } } ], "transactionInfo": { "totalPriceStatus": "ESTIMATED", "totalPrice": "12.34", "currencyCode": "USD" } }
interface GoogleActionsV2OrdersInTransitInfo
interface GoogleActionsV2OrdersInTransitInfo {}
property updatedTime
updatedTime?: string;
Last updated time for in transit.
interface GoogleActionsV2OrdersLineItem
interface GoogleActionsV2OrdersLineItem {}
property description
description?: string;
Description of the item.
property extension
extension?: ApiClientObjectMap<any>;
Extension to the line item based on its type.
property id
id?: string;
Unique id of the line item within the Cart/Order. Required.
property image
image?: GoogleActionsV2UiElementsImage;
Small image associated with this item.
property name
name?: string;
Name of the line item as displayed in the receipt. Required.
property offerId
offerId?: string;
Optional product or offer id for this item.
property price
price?: GoogleActionsV2OrdersPrice;
Each line item should have a price, even if the price is 0. Required. This is the total price as displayed on the receipt for this line (i.e. unit price * quantity).
property quantity
quantity?: number;
Number of items included.
property subLines
subLines?: GoogleActionsV2OrdersLineItemSubLine[];
Sub-line item(s). Only valid if type is
REGULAR
.
property type
type?: GoogleActionsV2OrdersLineItemType;
Type of line item.
interface GoogleActionsV2OrdersLineItemSubLine
interface GoogleActionsV2OrdersLineItemSubLine {}
interface GoogleActionsV2OrdersLineItemUpdate
interface GoogleActionsV2OrdersLineItemUpdate {}
property extension
extension?: ApiClientObjectMap<any>;
Update to the line item extension. Type must match the item's existing extension type.
property orderState
orderState?: GoogleActionsV2OrdersOrderState;
New line item-level state.
property price
price?: GoogleActionsV2OrdersPrice;
New price for the line item.
property reason
reason?: string;
Reason for the change. Required for price changes.
interface GoogleActionsV2OrdersMerchant
interface GoogleActionsV2OrdersMerchant {}
interface GoogleActionsV2OrdersOrder
interface GoogleActionsV2OrdersOrder {}
property actionOrderId
actionOrderId?: string;
Required: Merchant assigned internal order id. This id must be unique, and is required for subsequent order update operations. This id may be set to the provided google_order_id, or any other unique value. Note that the id presented to users is the user_visible_order_id, which may be a different, more user-friendly value.
property customerInfo
customerInfo?: GoogleActionsV2OrdersCustomerInfo;
If requested, customer info e.g. email will be passed back to the app.
property finalOrder
finalOrder?: GoogleActionsV2OrdersProposedOrder;
Reflect back the proposed order that caused the order.
property googleOrderId
googleOrderId?: string;
Order id assigned by Google.
property orderDate
orderDate?: string;
Date and time the order was created.
property paymentInfo
paymentInfo?: GoogleActionsV2OrdersPaymentInfo;
Payment related info for the order.
interface GoogleActionsV2OrdersOrderLocation
interface GoogleActionsV2OrdersOrderLocation {}
interface GoogleActionsV2OrdersOrderOptions
interface GoogleActionsV2OrdersOrderOptions {}
property customerInfoOptions
customerInfoOptions?: GoogleActionsV2OrdersCustomerInfoOptions;
The app can request customer info by setting this field. If set, the corresponding field will show up in ProposedOrderCard for user's confirmation.
property requestDeliveryAddress
requestDeliveryAddress?: boolean;
If true, delivery address is required for the associated Order.
interface GoogleActionsV2OrdersOrderState
interface GoogleActionsV2OrdersOrderState {}
property label
label?: string;
The user-visible string for the state. Required.
property state
state?: string;
State can be one of the following values:
CREATED
: Order was created at integrator's system.REJECTED
: Order was rejected by integrator.CONFIRMED
: Order was confirmed by the integrator and is active.CANCELLED
: User cancelled the order.IN_TRANSIT
: Order is being delivered.RETURNED
: User did a return.FULFILLED
: User received what was ordered. 'CHANGE_REQUESTED': User has requested a change to the order, and the integrator is processing this change. The order should be moved to another state after the request is handled.Required.
interface GoogleActionsV2OrdersOrderUpdate
interface GoogleActionsV2OrdersOrderUpdate {}
property actionOrderId
actionOrderId?: string;
Required. The canonical order id referencing this order. If integrators don't generate the canonical order id in their system, they can simply copy over google_order_id included in order.
property cancellationInfo
cancellationInfo?: GoogleActionsV2OrdersCancellationInfo;
Information about cancellation state.
property fulfillmentInfo
fulfillmentInfo?: GoogleActionsV2OrdersFulfillmentInfo;
Information about fulfillment state.
property googleOrderId
googleOrderId?: string;
Id of the order is the Google-issued id.
property infoExtension
infoExtension?: ApiClientObjectMap<any>;
Extra data based on a custom order state or in addition to info of a standard state.
property inTransitInfo
inTransitInfo?: GoogleActionsV2OrdersInTransitInfo;
Information about in transit state.
property lineItemUpdates
lineItemUpdates?: ApiClientObjectMap<GoogleActionsV2OrdersLineItemUpdate>;
Map of line item-level changes, keyed by item id. Optional.
property orderManagementActions
orderManagementActions?: GoogleActionsV2OrdersOrderUpdateAction[];
Updated applicable management actions for the order, e.g. manage, modify, contact support.
property orderState
orderState?: GoogleActionsV2OrdersOrderState;
The new state of the order.
property receipt
receipt?: GoogleActionsV2OrdersReceipt;
Receipt for order.
property rejectionInfo
rejectionInfo?: GoogleActionsV2OrdersRejectionInfo;
Information about rejection state.
property returnInfo
returnInfo?: GoogleActionsV2OrdersReturnInfo;
Information about returned state.
property totalPrice
totalPrice?: GoogleActionsV2OrdersPrice;
New total price of the order
property updateTime
updateTime?: string;
When the order was updated from the app's perspective.
property userNotification
userNotification?: GoogleActionsV2OrdersOrderUpdateUserNotification;
If specified, displays a notification to the user with the specified title and text. Specifying a notification is a suggestion to notify and is not guaranteed to result in a notification.
interface GoogleActionsV2OrdersOrderUpdateAction
interface GoogleActionsV2OrdersOrderUpdateAction {}
interface GoogleActionsV2OrdersOrderUpdateUserNotification
interface GoogleActionsV2OrdersOrderUpdateUserNotification {}
interface GoogleActionsV2OrdersPaymentInfo
interface GoogleActionsV2OrdersPaymentInfo {}
property displayName
displayName?: string;
Name of the instrument displayed on the receipt.
property googleProvidedPaymentInstrument
googleProvidedPaymentInstrument?: GoogleActionsV2OrdersPaymentInfoGoogleProvidedPaymentInstrument;
Google provided payment instrument.
property paymentType
paymentType?: GoogleActionsV2OrdersPaymentInfoPaymentType;
Type of payment. Required.
interface GoogleActionsV2OrdersPaymentInfoGoogleProvidedPaymentInstrument
interface GoogleActionsV2OrdersPaymentInfoGoogleProvidedPaymentInstrument {}
property billingAddress
billingAddress?: GoogleTypePostalAddress;
If requested by integrator, billing address for the instrument in use will be included.
property instrumentToken
instrumentToken?: string;
Google provided payment instrument.
interface GoogleActionsV2OrdersPaymentMethodTokenizationParameters
interface GoogleActionsV2OrdersPaymentMethodTokenizationParameters {}
property parameters
parameters?: ApiClientObjectMap<string>;
If tokenization_type is set to
PAYMENT_GATEWAY
then the list of parameters should contain payment gateway specific parameters required to tokenize payment method as well as parameter with the name "gateway" with the value set to one of the gateways that we support e.g. "stripe" or "braintree". A sample tokenization configuration used for Stripe in JSON format. `{ "gateway" : "stripe", "stripe:publishableKey" : "pk_1234", "stripe:version" : "1.5" }` A sample tokenization configuration used for Braintree in JSON format. `{ "gateway" : "braintree", "braintree:merchantId" : "abc" "braintree:sdkVersion" : "1.4.0" "braintree:apiVersion" : "v1" "braintree:clientKey" : "production_a12b34" "braintree:authorizationFingerprint" : "production_a12b34" }` A sample configuration used for Adyen in JSON format. `{ "gateway" : "adyen", "gatewayMerchantId" : "gateway-merchant-id" }` If tokenization_type is set to DIRECT, integrators must specify a parameter named "publicKey" which will contain an Elliptic Curve public key using the uncompressed point format and base64 encoded. This publicKey will be used by Google to encrypt the payment information. Example of the parameter in JSON format: { "publicKey": "base64encoded..." }
property tokenizationType
tokenizationType?: GoogleActionsV2OrdersPaymentMethodTokenizationParametersTokenizationType;
Required.
interface GoogleActionsV2OrdersPaymentOptions
interface GoogleActionsV2OrdersPaymentOptions {}
property actionProvidedOptions
actionProvidedOptions?: GoogleActionsV2OrdersActionProvidedPaymentOptions;
Info for an Action-provided payment instrument for display on receipt.
property googleProvidedOptions
googleProvidedOptions?: GoogleActionsV2OrdersGoogleProvidedPaymentOptions;
Requirements for Google provided payment instrument.
interface GoogleActionsV2OrdersPresentationOptions
interface GoogleActionsV2OrdersPresentationOptions {}
property callToAction
callToAction?: string;
call_to_action can be one of the following values:
PLACE_ORDER
: Used for placing an order.PAY
: Used for a payment.BUY
: Used for a purchase.SEND
: Used for a money transfer.BOOK
: Used for a booking.RESERVE
: Used for reservation.SCHEDULE
: Used for scheduling an appointment.SUBSCRIBE
: Used for subscription.call_to_action refers to the action verb which best describes this order. This will be used in various places like prompt, suggestion chip etc while proposing the order to the user.
interface GoogleActionsV2OrdersPrice
interface GoogleActionsV2OrdersPrice {}
interface GoogleActionsV2OrdersPromotion
interface GoogleActionsV2OrdersPromotion {}
property coupon
coupon?: string;
Required. Coupon code understood by 3P. For ex: GOOGLE10.
interface GoogleActionsV2OrdersProposedOrder
interface GoogleActionsV2OrdersProposedOrder {}
property cart
cart?: GoogleActionsV2OrdersCart;
User's items.
property extension
extension?: ApiClientObjectMap<any>;
Extension to the proposed order based on the kind of order. For example, if the order includes a location then this extension will contain a OrderLocation value.
property id
id?: string;
Optional id for this ProposedOrder. Included as part of the ProposedOrder returned back to the integrator at confirmation time.
property image
image?: GoogleActionsV2UiElementsImage;
Image associated with the proposed order.
property otherItems
otherItems?: GoogleActionsV2OrdersLineItem[];
Fees, adjustments, subtotals, etc.
property termsOfServiceUrl
termsOfServiceUrl?: string;
A link to the terms of service that apply to this proposed order.
property totalPrice
totalPrice?: GoogleActionsV2OrdersPrice;
Total price of the proposed order. If of type
ACTUAL
, this is the amount the caller will charge when the user confirms the proposed order.
interface GoogleActionsV2OrdersReceipt
interface GoogleActionsV2OrdersReceipt {}
property userVisibleOrderId
userVisibleOrderId?: string;
Optional. The user facing id referencing to current order, which will show up in the receipt card if present. This should be the id that usually appears on a printed receipt or receipt sent to user's email. User should be able to use this id referencing her order for customer service provided by integrators. Note that this field must be populated if integrator does generate user facing id for an order with a printed receipt / email receipt.
interface GoogleActionsV2OrdersRejectionInfo
interface GoogleActionsV2OrdersRejectionInfo {}
interface GoogleActionsV2OrdersReturnInfo
interface GoogleActionsV2OrdersReturnInfo {}
property reason
reason?: string;
Reason for return.
interface GoogleActionsV2OrdersTime
interface GoogleActionsV2OrdersTime {}
property timeIso8601
timeIso8601?: string;
ISO 8601 representation of time indicator: could be a duration, date or exact datetime.
property type
type?: GoogleActionsV2OrdersTimeType;
Type of time indicator.
interface GoogleActionsV2PackageEntitlement
interface GoogleActionsV2PackageEntitlement {}
property entitlements
entitlements?: GoogleActionsV2Entitlement[];
List of entitlements for a given app
property packageName
packageName?: string;
Should match the package name in action package
interface GoogleActionsV2PermissionValueSpec
interface GoogleActionsV2PermissionValueSpec {}
property optContext
optContext?: string;
The context why agent needs to request permission.
property permissions
permissions?: GoogleActionsV2PermissionValueSpecPermissions[];
List of permissions requested by the agent.
property updatePermissionValueSpec
updatePermissionValueSpec?: GoogleActionsV2UpdatePermissionValueSpec;
Additional information needed to fulfill update permission request.
interface GoogleActionsV2PlaceValueSpec
interface GoogleActionsV2PlaceValueSpec {}
property dialogSpec
dialogSpec?: GoogleActionsV2DialogSpec;
Speech configuration for askForPlace dialog. The extension should be used to define the PlaceDialogSpec configuration.
interface GoogleActionsV2PlaceValueSpecPlaceDialogSpec
interface GoogleActionsV2PlaceValueSpecPlaceDialogSpec {}
property permissionContext
permissionContext?: string;
This is the context for seeking permission to access various user related data if the user prompts for personal location during the sub-dialog like "Home", "Work" or "Dad's house". For example "*To help you find juice stores*, I just need to check your location. Can I get that from Google?". The first part of this permission prompt is configurable.
property requestPrompt
requestPrompt?: string;
This is the initial prompt by AskForPlace sub-dialog. For example "What place do you want?"
interface GoogleActionsV2RawInput
interface GoogleActionsV2RawInput {}
interface GoogleActionsV2RegisterUpdateValue
interface GoogleActionsV2RegisterUpdateValue {}
property status
status?: GoogleActionsV2RegisterUpdateValueStatus;
The status of the registering the update requested by the app.
interface GoogleActionsV2RegisterUpdateValueSpec
interface GoogleActionsV2RegisterUpdateValueSpec {}
property arguments
arguments?: GoogleActionsV2Argument[];
The list of arguments to necessary to fulfill an update.
property intent
intent?: string;
The intent that the user wants to get updates from.
property triggerContext
triggerContext?: GoogleActionsV2TriggerContext;
The trigger context that defines how the update will be triggered. This may modify the dialog in order to narrow down the user's preferences for getting his or her updates.
interface GoogleActionsV2RichResponse
interface GoogleActionsV2RichResponse {}
property items
items?: GoogleActionsV2RichResponseItem[];
A list of UI elements which compose the response The items must meet the following requirements: 1. The first item must be a SimpleResponse 2. At most two SimpleResponse 3. At most one rich response item (e.g. BasicCard, StructuredResponse, MediaResponse, or HtmlResponse) 4. You cannot use a rich response item if you're using an actions.intent.OPTION intent ie ListSelect or CarouselSelect
property linkOutSuggestion
linkOutSuggestion?: GoogleActionsV2UiElementsLinkOutSuggestion;
An additional suggestion chip that can link out to the associated app or site.
property suggestions
suggestions?: GoogleActionsV2UiElementsSuggestion[];
A list of suggested replies. These will always appear at the end of the response. If used in a FinalResponse, they will be ignored.
interface GoogleActionsV2RichResponseItem
interface GoogleActionsV2RichResponseItem {}
property basicCard
basicCard?: GoogleActionsV2UiElementsBasicCard;
A basic card.
property carouselBrowse
carouselBrowse?: GoogleActionsV2UiElementsCarouselBrowse;
Carousel browse card, use collection_browse instead..
property htmlResponse
htmlResponse?: GoogleActionsV2UiElementsHtmlResponse;
Html response used to render on Canvas.
property mediaResponse
mediaResponse?: GoogleActionsV2MediaResponse;
Response indicating a set of media to be played.
property name
name?: string;
Optional named identifier of this Item.
property simpleResponse
simpleResponse?: GoogleActionsV2SimpleResponse;
Voice and text-only response.
property structuredResponse
structuredResponse?: GoogleActionsV2StructuredResponse;
Structured payload to be processed by Google.
property tableCard
tableCard?: GoogleActionsV2UiElementsTableCard;
Table card.
interface GoogleActionsV2SignedData
interface GoogleActionsV2SignedData {}
property inAppDataSignature
inAppDataSignature?: string;
Matches IN_APP_DATA_SIGNATURE from getPurchases() method in Play InApp Billing API.
property inAppPurchaseData
inAppPurchaseData?: ApiClientObjectMap<any>;
Match INAPP_PURCHASE_DATA from getPurchases() method. Contains all inapp purchase data in JSON format See details in table 6 of https://developer.android.com/google/play/billing/billing_reference.html.
interface GoogleActionsV2SignInValue
interface GoogleActionsV2SignInValue {}
property status
status?: GoogleActionsV2SignInValueStatus;
The status of the sign in requested by the app.
interface GoogleActionsV2SignInValueSpec
interface GoogleActionsV2SignInValueSpec {}
property optContext
optContext?: string;
The optional context why the app needs to ask the user to sign in, as a prefix of a prompt for user consent, e.g. "To track your exercise", or "To check your account balance".
interface GoogleActionsV2SimpleResponse
interface GoogleActionsV2SimpleResponse {}
property displayText
displayText?: string;
Optional text to display in the chat bubble. If not given, a display rendering of the text_to_speech or ssml above will be used. Limited to 640 chars.
property ssml
ssml?: string;
Structured spoken response to the user in the SSML format, e.g. ` Say animal name after the sound. , what’s the animal? `. Mutually exclusive with text_to_speech.
property textToSpeech
textToSpeech?: string;
Plain text of the speech output, e.g., "where do you want to go?" Mutually exclusive with ssml.
interface GoogleActionsV2SimpleSelect
interface GoogleActionsV2SimpleSelect {}
property items
items?: GoogleActionsV2SimpleSelectItem[];
List of items users should select from.
interface GoogleActionsV2SimpleSelectItem
interface GoogleActionsV2SimpleSelectItem {}
property optionInfo
optionInfo?: GoogleActionsV2OptionInfo;
Item key and synonyms.
property title
title?: string;
Title of the item. It will act as synonym if it's provided. Optional
interface GoogleActionsV2SpeechResponse
interface GoogleActionsV2SpeechResponse {}
property ssml
ssml?: string;
Structured spoken response to the user in the SSML format, e.g. " Say animal name after the sound. , what’s the animal? ". Mutually exclusive with text_to_speech.
property textToSpeech
textToSpeech?: string;
Plain text of the speech output, e.g., "where do you want to go?"/
interface GoogleActionsV2StructuredResponse
interface GoogleActionsV2StructuredResponse {}
property orderUpdate
orderUpdate?: GoogleActionsV2OrdersOrderUpdate;
App provides an order update (e.g. Receipt) after receiving the order.
property orderUpdateV3
orderUpdateV3?: GoogleActionsOrdersV3OrderUpdate;
App provides an order update in API v3 format after receiving the order.
interface GoogleActionsV2Surface
interface GoogleActionsV2Surface {}
property capabilities
capabilities?: GoogleActionsV2Capability[];
A list of capabilities the surface supports at the time of the request e.g.
actions.capability.AUDIO_OUTPUT
interface GoogleActionsV2TransactionDecisionValue
interface GoogleActionsV2TransactionDecisionValue {}
property checkResult
checkResult?: GoogleActionsV2TransactionRequirementsCheckResult;
If
check_result
is NOTResultType.OK
, the rest of the fields in this message should be ignored.
property deliveryAddress
deliveryAddress?: GoogleActionsV2Location;
If user requests for delivery address update, this field includes the new delivery address. This field will be present only when
user_decision
isDELIVERY_ADDRESS_UPDATED
.
property order
order?: GoogleActionsV2OrdersOrder;
The order that user has approved. This field will be present only when
user_decision
isORDER_ACCEPTED
.
property userDecision
userDecision?: GoogleActionsV2TransactionDecisionValueUserDecision;
User decision regarding the proposed order.
interface GoogleActionsV2TransactionDecisionValueSpec
interface GoogleActionsV2TransactionDecisionValueSpec {}
property orderOptions
orderOptions?: GoogleActionsV2OrdersOrderOptions;
Options associated with the order.
property paymentOptions
paymentOptions?: GoogleActionsV2OrdersPaymentOptions;
Payment options for this order, or empty if no payment is associated with the order.
property presentationOptions
presentationOptions?: GoogleActionsV2OrdersPresentationOptions;
Options used to customize order presentation to the user.
property proposedOrder
proposedOrder?: GoogleActionsV2OrdersProposedOrder;
The proposed order that's ready for user to approve.
interface GoogleActionsV2TransactionRequirementsCheckResult
interface GoogleActionsV2TransactionRequirementsCheckResult {}
property resultType
resultType?: GoogleActionsV2TransactionRequirementsCheckResultResultType;
Result of the operation.
interface GoogleActionsV2TransactionRequirementsCheckSpec
interface GoogleActionsV2TransactionRequirementsCheckSpec {}
property orderOptions
orderOptions?: GoogleActionsV2OrdersOrderOptions;
Options associated with the order.
property paymentOptions
paymentOptions?: GoogleActionsV2OrdersPaymentOptions;
Payment options for this Order, or empty if no payment is associated with the Order.
interface GoogleActionsV2TriggerContext
interface GoogleActionsV2TriggerContext {}
property timeContext
timeContext?: GoogleActionsV2TriggerContextTimeContext;
The time context for which the update can be triggered.
interface GoogleActionsV2TriggerContextTimeContext
interface GoogleActionsV2TriggerContextTimeContext {}
property frequency
frequency?: GoogleActionsV2TriggerContextTimeContextFrequency;
The high-level frequency of the recurring update.
interface GoogleActionsV2UiElementsBasicCard
interface GoogleActionsV2UiElementsBasicCard {}
property buttons
buttons?: GoogleActionsV2UiElementsButton[];
Buttons. Currently at most 1 button is supported. Optional.
property formattedText
formattedText?: string;
Body text of the card. Supports a limited set of markdown syntax for formatting. Required, unless image is present.
property image
image?: GoogleActionsV2UiElementsImage;
A hero image for the card. The height is fixed to 192dp. Optional.
property imageDisplayOptions
imageDisplayOptions?: GoogleActionsV2UiElementsBasicCardImageDisplayOptions;
Type of image display option. Optional.
property subtitle
subtitle?: string;
Optional.
property title
title?: string;
Overall title of the card. Optional.
interface GoogleActionsV2UiElementsButton
interface GoogleActionsV2UiElementsButton {}
property openUrlAction
openUrlAction?: GoogleActionsV2UiElementsOpenUrlAction;
Action to take when a user taps on the button. Required.
property title
title?: string;
Title of the button. Required.
interface GoogleActionsV2UiElementsCarouselBrowse
interface GoogleActionsV2UiElementsCarouselBrowse {}
property imageDisplayOptions
imageDisplayOptions?: GoogleActionsV2UiElementsCarouselBrowseImageDisplayOptions;
Type of image display option. Optional.
property items
items?: GoogleActionsV2UiElementsCarouselBrowseItem[];
Min: 2. Max: 10.
interface GoogleActionsV2UiElementsCarouselBrowseItem
interface GoogleActionsV2UiElementsCarouselBrowseItem {}
property description
description?: string;
Description of the carousel item. Optional.
property footer
footer?: string;
Footer text for the carousel item, displayed below the description. Single line of text, truncated with an ellipsis. Optional.
property image
image?: GoogleActionsV2UiElementsImage;
Hero image for the carousel item. Optional.
property openUrlAction
openUrlAction?: GoogleActionsV2UiElementsOpenUrlAction;
URL of the document associated with the carousel item. The document can contain HTML content or, if "url_type_hint" is set to AMP_CONTENT, AMP content. Required.
property title
title?: string;
Title of the carousel item. Required.
interface GoogleActionsV2UiElementsCarouselSelect
interface GoogleActionsV2UiElementsCarouselSelect {}
property imageDisplayOptions
imageDisplayOptions?: GoogleActionsV2UiElementsCarouselSelectImageDisplayOptions;
Type of image display option. Optional.
property items
items?: GoogleActionsV2UiElementsCarouselSelectCarouselItem[];
min: 2 max: 10
property subtitle
subtitle?: string;
Subtitle of the carousel. Optional.
property title
title?: string;
Title of the carousel. Optional.
interface GoogleActionsV2UiElementsCarouselSelectCarouselItem
interface GoogleActionsV2UiElementsCarouselSelectCarouselItem {}
property description
description?: string;
Body text of the card.
property image
image?: GoogleActionsV2UiElementsImage;
Optional.
property optionInfo
optionInfo?: GoogleActionsV2OptionInfo;
See google.actions.v2.OptionInfo for details. Required.
property title
title?: string;
Title of the carousel item. When tapped, this text will be posted back to the conversation verbatim as if the user had typed it. Each title must be unique among the set of carousel items. Required.
interface GoogleActionsV2UiElementsCollectionSelect
interface GoogleActionsV2UiElementsCollectionSelect {}
property imageDisplayOptions
imageDisplayOptions?: GoogleActionsV2UiElementsCollectionSelectImageDisplayOptions;
Type of image display option. Optional.
property items
items?: GoogleActionsV2UiElementsCollectionSelectCollectionItem[];
min: 2 max: 10
property subtitle
subtitle?: string;
Subtitle of the collection. Optional.
property title
title?: string;
Title of the collection. Optional.
interface GoogleActionsV2UiElementsCollectionSelectCollectionItem
interface GoogleActionsV2UiElementsCollectionSelectCollectionItem {}
property description
description?: string;
Body text of the card.
property image
image?: GoogleActionsV2UiElementsImage;
Optional.
property optionInfo
optionInfo?: GoogleActionsV2OptionInfo;
See google.actions.v2.OptionInfo for details. Required.
property title
title?: string;
Title of the collection item. When tapped, this text will be posted back to the conversation verbatim as if the user had typed it. Each title must be unique among the set of collection items. Required.
interface GoogleActionsV2UiElementsHtmlResponse
interface GoogleActionsV2UiElementsHtmlResponse {}
property suppressMic
suppressMic?: boolean;
Provide an option so that mic won't be opened after this immersive response.
property updatedState
updatedState?: ApiClientObjectMap<any>;
Communicate the following JSON object to the app.
property url
url?: string;
The url of the application.
interface GoogleActionsV2UiElementsImage
interface GoogleActionsV2UiElementsImage {}
property accessibilityText
accessibilityText?: string;
A text description of the image to be used for accessibility, e.g. screen readers. Required.
property height
height?: number;
The height of the image in pixels. Optional.
property url
url?: string;
The source url of the image. Images can be JPG, PNG and GIF (animated and non-animated). For example,
https://www.agentx.com/logo.png
. Required.
property width
width?: number;
The width of the image in pixels. Optional.
interface GoogleActionsV2UiElementsLinkOutSuggestion
interface GoogleActionsV2UiElementsLinkOutSuggestion {}
property destinationName
destinationName?: string;
The name of the app or site this chip is linking to. The chip will be rendered with the title "Open <destination_name>". Max 20 chars. Required.
property openUrlAction
openUrlAction?: GoogleActionsV2UiElementsOpenUrlAction;
The URL of the App or Site to open when the user taps the suggestion chip. Ownership of this App/URL must be validated in the Actions on Google developer console, or the suggestion will not be shown to the user. Open URL Action supports http, https and intent URLs. For Intent URLs refer to: https://developer.chrome.com/multidevice/android/intents
interface GoogleActionsV2UiElementsListSelect
interface GoogleActionsV2UiElementsListSelect {}
interface GoogleActionsV2UiElementsListSelectListItem
interface GoogleActionsV2UiElementsListSelectListItem {}
property description
description?: string;
Main text describing the item. Optional.
property image
image?: GoogleActionsV2UiElementsImage;
Square image. Optional.
property optionInfo
optionInfo?: GoogleActionsV2OptionInfo;
Information about this option. See google.actions.v2.OptionInfo for details. Required.
property title
title?: string;
Title of the list item. When tapped, this text will be posted back to the conversation verbatim as if the user had typed it. Each title must be unique among the set of list items. Required.
interface GoogleActionsV2UiElementsOpenUrlAction
interface GoogleActionsV2UiElementsOpenUrlAction {}
property androidApp
androidApp?: GoogleActionsV2DevicesAndroidApp;
Information about the Android App if the URL is expected to be fulfilled by an Android App.
property url
url?: string;
The url field which could be any of: - http/https urls for opening an App-linked App or a webpage
property urlTypeHint
urlTypeHint?: GoogleActionsV2UiElementsOpenUrlActionUrlTypeHint;
Indicates a hint for the url type.
interface GoogleActionsV2UiElementsSuggestion
interface GoogleActionsV2UiElementsSuggestion {}
property title
title?: string;
The text shown the in the suggestion chip. When tapped, this text will be posted back to the conversation verbatim as if the user had typed it. Each title must be unique among the set of suggestion chips. Max 25 chars Required
interface GoogleActionsV2UiElementsTableCard
interface GoogleActionsV2UiElementsTableCard {}
property buttons
buttons?: GoogleActionsV2UiElementsButton[];
Buttons. Currently at most 1 button is supported. Optional.
property columnProperties
columnProperties?: GoogleActionsV2UiElementsTableCardColumnProperties[];
Headers and alignment of columns.
property image
image?: GoogleActionsV2UiElementsImage;
Image associated with the table. Optional.
property rows
rows?: GoogleActionsV2UiElementsTableCardRow[];
Row data of the table. The first 3 rows are guaranteed to be shown but others might be cut on certain surfaces. Please test with the simulator to see which rows will be shown for a given surface. On surfaces that support the WEB_BROWSER capability, you can point the user to a web page with more data.
property subtitle
subtitle?: string;
Subtitle for the table. Optional.
property title
title?: string;
Overall title of the table. Optional but must be set if subtitle is set.
interface GoogleActionsV2UiElementsTableCardCell
interface GoogleActionsV2UiElementsTableCardCell {}
property text
text?: string;
Text content of the cell.
interface GoogleActionsV2UiElementsTableCardColumnProperties
interface GoogleActionsV2UiElementsTableCardColumnProperties {}
property header
header?: string;
Header text for the column.
property horizontalAlignment
horizontalAlignment?: GoogleActionsV2UiElementsTableCardColumnPropertiesHorizontalAlignment;
Horizontal alignment of content w.r.t column. If unspecified, content will be aligned to the leading edge.
interface GoogleActionsV2UiElementsTableCardRow
interface GoogleActionsV2UiElementsTableCardRow {}
property cells
cells?: GoogleActionsV2UiElementsTableCardCell[];
Cells in this row. The first 3 cells are guaranteed to be shown but others might be cut on certain surfaces. Please test with the simulator to see which cells will be shown for a given surface.
property dividerAfter
dividerAfter?: boolean;
Indicates whether there should be a divider after each row.
interface GoogleActionsV2UpdatePermissionValueSpec
interface GoogleActionsV2UpdatePermissionValueSpec {}
interface GoogleActionsV2User
interface GoogleActionsV2User {}
property accessToken
accessToken?: string;
An OAuth2 token that identifies the user in your system. Only available if the user links their account.
property idToken
idToken?: string;
Token representing the user's identity. This is a Json web token including encoded profile. The definition is at https://developers.google.com/identity/protocols/OpenIDConnect#obtainuserinfo.
property lastSeen
lastSeen?: string;
The timestamp of the last interaction with this user. This field will be omitted if the user has not interacted with the agent before.
property locale
locale?: string;
Primary locale setting of the user making the request. Follows IETF BCP-47 language code http://www.rfc-editor.org/rfc/bcp/bcp47.txt However, the script subtag is not included.
property packageEntitlements
packageEntitlements?: GoogleActionsV2PackageEntitlement[];
List of user entitlements for every package name listed in the Action package, if any.
property permissions
permissions?: GoogleActionsV2UserPermissions[];
Contains permissions granted by user to this Action.
property profile
profile?: GoogleActionsV2UserProfile;
Information about the end user. Some fields are only available if the user has given permission to provide this information to the Action.
property userId
userId?: string;
Unique ID for the end user.
property userStorage
userStorage?: string;
An opaque token supplied by the application that is persisted across conversations for a particular user. The maximum size of the string is 10k characters.
property userVerificationStatus
userVerificationStatus?: GoogleActionsV2UserUserVerificationStatus;
Indicates the verification status of the user.
interface GoogleActionsV2UserNotification
interface GoogleActionsV2UserNotification {}
interface GoogleActionsV2UserProfile
interface GoogleActionsV2UserProfile {}
property displayName
displayName?: string;
The user's full name as specified in their Google account. Requires the NAME permission.
property familyName
familyName?: string;
The user's last name as specified in their Google account. Note that this field could be empty. Requires the NAME permission.
property givenName
givenName?: string;
The user's first name as specified in their Google account. Requires the NAME permission.
interface GoogleCloudDialogflowV2Context
interface GoogleCloudDialogflowV2Context {}
property lifespanCount
lifespanCount?: number;
property name
name?: string;
property parameters
parameters?: ApiClientObjectMap<any>;
interface GoogleCloudDialogflowV2EventInput
interface GoogleCloudDialogflowV2EventInput {}
property languageCode
languageCode?: string;
property name
name?: string;
property parameters
parameters?: ApiClientObjectMap<any>;
interface GoogleCloudDialogflowV2Intent
interface GoogleCloudDialogflowV2Intent {}
property action
action?: string;
property defaultResponsePlatforms
defaultResponsePlatforms?: GoogleCloudDialogflowV2IntentDefaultResponsePlatforms[];
property displayName
displayName?: string;
property events
events?: string[];
property followupIntentInfo
followupIntentInfo?: GoogleCloudDialogflowV2IntentFollowupIntentInfo[];
property inputContextNames
inputContextNames?: string[];
property isFallback
isFallback?: boolean;
property messages
messages?: GoogleCloudDialogflowV2IntentMessage[];
property mlDisabled
mlDisabled?: boolean;
property name
name?: string;
property outputContexts
outputContexts?: GoogleCloudDialogflowV2Context[];
property parameters
parameters?: GoogleCloudDialogflowV2IntentParameter[];
property parentFollowupIntentName
parentFollowupIntentName?: string;
property priority
priority?: number;
property resetContexts
resetContexts?: boolean;
property rootFollowupIntentName
rootFollowupIntentName?: string;
property trainingPhrases
trainingPhrases?: GoogleCloudDialogflowV2IntentTrainingPhrase[];
property webhookState
webhookState?: GoogleCloudDialogflowV2IntentWebhookState;
interface GoogleCloudDialogflowV2IntentFollowupIntentInfo
interface GoogleCloudDialogflowV2IntentFollowupIntentInfo {}
property followupIntentName
followupIntentName?: string;
property parentFollowupIntentName
parentFollowupIntentName?: string;
interface GoogleCloudDialogflowV2IntentMessage
interface GoogleCloudDialogflowV2IntentMessage {}
property basicCard
basicCard?: GoogleCloudDialogflowV2IntentMessageBasicCard;
property card
card?: GoogleCloudDialogflowV2IntentMessageCard;
property carouselSelect
carouselSelect?: GoogleCloudDialogflowV2IntentMessageCarouselSelect;
property image
image?: GoogleCloudDialogflowV2IntentMessageImage;
property linkOutSuggestion
linkOutSuggestion?: GoogleCloudDialogflowV2IntentMessageLinkOutSuggestion;
property listSelect
listSelect?: GoogleCloudDialogflowV2IntentMessageListSelect;
property payload
payload?: ApiClientObjectMap<any>;
property platform
platform?: GoogleCloudDialogflowV2IntentMessagePlatform;
property quickReplies
quickReplies?: GoogleCloudDialogflowV2IntentMessageQuickReplies;
property simpleResponses
simpleResponses?: GoogleCloudDialogflowV2IntentMessageSimpleResponses;
property suggestions
suggestions?: GoogleCloudDialogflowV2IntentMessageSuggestions;
property text
text?: GoogleCloudDialogflowV2IntentMessageText;
interface GoogleCloudDialogflowV2IntentMessageBasicCard
interface GoogleCloudDialogflowV2IntentMessageBasicCard {}
property buttons
buttons?: GoogleCloudDialogflowV2IntentMessageBasicCardButton[];
property formattedText
formattedText?: string;
property image
image?: GoogleCloudDialogflowV2IntentMessageImage;
property subtitle
subtitle?: string;
property title
title?: string;
interface GoogleCloudDialogflowV2IntentMessageBasicCardButton
interface GoogleCloudDialogflowV2IntentMessageBasicCardButton {}
property openUriAction
openUriAction?: GoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction;
property title
title?: string;
interface GoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction
interface GoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction {}
property uri
uri?: string;
interface GoogleCloudDialogflowV2IntentMessageCard
interface GoogleCloudDialogflowV2IntentMessageCard {}
interface GoogleCloudDialogflowV2IntentMessageCardButton
interface GoogleCloudDialogflowV2IntentMessageCardButton {}
interface GoogleCloudDialogflowV2IntentMessageCarouselSelect
interface GoogleCloudDialogflowV2IntentMessageCarouselSelect {}
property items
items?: GoogleCloudDialogflowV2IntentMessageCarouselSelectItem[];
interface GoogleCloudDialogflowV2IntentMessageCarouselSelectItem
interface GoogleCloudDialogflowV2IntentMessageCarouselSelectItem {}
property description
description?: string;
property image
image?: GoogleCloudDialogflowV2IntentMessageImage;
property info
info?: GoogleCloudDialogflowV2IntentMessageSelectItemInfo;
property title
title?: string;
interface GoogleCloudDialogflowV2IntentMessageImage
interface GoogleCloudDialogflowV2IntentMessageImage {}
property accessibilityText
accessibilityText?: string;
property imageUri
imageUri?: string;
interface GoogleCloudDialogflowV2IntentMessageLinkOutSuggestion
interface GoogleCloudDialogflowV2IntentMessageLinkOutSuggestion {}
property destinationName
destinationName?: string;
property uri
uri?: string;
interface GoogleCloudDialogflowV2IntentMessageListSelect
interface GoogleCloudDialogflowV2IntentMessageListSelect {}
interface GoogleCloudDialogflowV2IntentMessageListSelectItem
interface GoogleCloudDialogflowV2IntentMessageListSelectItem {}
property description
description?: string;
property image
image?: GoogleCloudDialogflowV2IntentMessageImage;
property info
info?: GoogleCloudDialogflowV2IntentMessageSelectItemInfo;
property title
title?: string;
interface GoogleCloudDialogflowV2IntentMessageQuickReplies
interface GoogleCloudDialogflowV2IntentMessageQuickReplies {}
property quickReplies
quickReplies?: string[];
property title
title?: string;
interface GoogleCloudDialogflowV2IntentMessageSelectItemInfo
interface GoogleCloudDialogflowV2IntentMessageSelectItemInfo {}
interface GoogleCloudDialogflowV2IntentMessageSimpleResponse
interface GoogleCloudDialogflowV2IntentMessageSimpleResponse {}
property displayText
displayText?: string;
property ssml
ssml?: string;
property textToSpeech
textToSpeech?: string;
interface GoogleCloudDialogflowV2IntentMessageSimpleResponses
interface GoogleCloudDialogflowV2IntentMessageSimpleResponses {}
property simpleResponses
simpleResponses?: GoogleCloudDialogflowV2IntentMessageSimpleResponse[];
interface GoogleCloudDialogflowV2IntentMessageSuggestion
interface GoogleCloudDialogflowV2IntentMessageSuggestion {}
property title
title?: string;
interface GoogleCloudDialogflowV2IntentMessageSuggestions
interface GoogleCloudDialogflowV2IntentMessageSuggestions {}
property suggestions
suggestions?: GoogleCloudDialogflowV2IntentMessageSuggestion[];
interface GoogleCloudDialogflowV2IntentMessageText
interface GoogleCloudDialogflowV2IntentMessageText {}
property text
text?: string[];
interface GoogleCloudDialogflowV2IntentParameter
interface GoogleCloudDialogflowV2IntentParameter {}
property defaultValue
defaultValue?: string;
property displayName
displayName?: string;
property entityTypeDisplayName
entityTypeDisplayName?: string;
property isList
isList?: boolean;
property mandatory
mandatory?: boolean;
property name
name?: string;
property prompts
prompts?: string[];
property value
value?: string;
interface GoogleCloudDialogflowV2IntentTrainingPhrase
interface GoogleCloudDialogflowV2IntentTrainingPhrase {}
property name
name?: string;
property parts
parts?: GoogleCloudDialogflowV2IntentTrainingPhrasePart[];
property timesAddedCount
timesAddedCount?: number;
property type
type?: GoogleCloudDialogflowV2IntentTrainingPhraseType;
interface GoogleCloudDialogflowV2IntentTrainingPhrasePart
interface GoogleCloudDialogflowV2IntentTrainingPhrasePart {}
property alias
alias?: string;
property entityType
entityType?: string;
property text
text?: string;
property userDefined
userDefined?: boolean;
interface GoogleCloudDialogflowV2OriginalDetectIntentRequest
interface GoogleCloudDialogflowV2OriginalDetectIntentRequest {}
interface GoogleCloudDialogflowV2QueryResult
interface GoogleCloudDialogflowV2QueryResult {}
property action
action?: string;
property allRequiredParamsPresent
allRequiredParamsPresent?: boolean;
property diagnosticInfo
diagnosticInfo?: ApiClientObjectMap<any>;
property fulfillmentMessages
fulfillmentMessages?: GoogleCloudDialogflowV2IntentMessage[];
property fulfillmentText
fulfillmentText?: string;
property intent
intent?: GoogleCloudDialogflowV2Intent;
property intentDetectionConfidence
intentDetectionConfidence?: number;
property languageCode
languageCode?: string;
property outputContexts
outputContexts?: GoogleCloudDialogflowV2Context[];
property parameters
parameters?: ApiClientObjectMap<any>;
property queryText
queryText?: string;
property speechRecognitionConfidence
speechRecognitionConfidence?: number;
property webhookPayload
webhookPayload?: ApiClientObjectMap<any>;
property webhookSource
webhookSource?: string;
interface GoogleCloudDialogflowV2WebhookRequest
interface GoogleCloudDialogflowV2WebhookRequest {}
property originalDetectIntentRequest
originalDetectIntentRequest?: GoogleCloudDialogflowV2OriginalDetectIntentRequest;
property queryResult
queryResult?: GoogleCloudDialogflowV2QueryResult;
property responseId
responseId?: string;
property session
session?: string;
interface GoogleCloudDialogflowV2WebhookResponse
interface GoogleCloudDialogflowV2WebhookResponse {}
property followupEventInput
followupEventInput?: GoogleCloudDialogflowV2EventInput;
property fulfillmentMessages
fulfillmentMessages?: GoogleCloudDialogflowV2IntentMessage[];
property fulfillmentText
fulfillmentText?: string;
property outputContexts
outputContexts?: GoogleCloudDialogflowV2Context[];
property payload
payload?: ApiClientObjectMap<any>;
property source
source?: string;
interface GoogleRpcStatus
interface GoogleRpcStatus {}
property code
code?: number;
The status code, which should be an enum value of google.rpc.Code.
property details
details?: ApiClientObjectMap<any>[];
A list of messages that carry the error details. There is a common set of message types for APIs to use.
property message
message?: string;
A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
interface GoogleTypeDate
interface GoogleTypeDate {}
property day
day?: number;
Day of month. Must be from 1 to 31 and valid for the year and month, or 0 if specifying a year by itself or a year and month where the day is not significant.
property month
month?: number;
Month of year. Must be from 1 to 12, or 0 if specifying a year without a month and day.
property year
year?: number;
Year of date. Must be from 1 to 9999, or 0 if specifying a date without a year.
interface GoogleTypeLatLng
interface GoogleTypeLatLng {}
interface GoogleTypeMoney
interface GoogleTypeMoney {}
property currencyCode
currencyCode?: string;
The 3-letter currency code defined in ISO 4217.
property nanos
nanos?: number;
Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If
units
is positive,nanos
must be positive or zero. Ifunits
is zero,nanos
can be positive, zero, or negative. Ifunits
is negative,nanos
must be negative or zero. For example $-1.75 is represented asunits
=-1 andnanos
=-750,000,000.
property units
units?: string;
The whole units of the amount. For example if
currencyCode
is\"USD\"
, then 1 unit is one US dollar.
interface GoogleTypePostalAddress
interface GoogleTypePostalAddress {}
property addressLines
addressLines?: string[];
Unstructured address lines describing the lower levels of an address.
Because values in address_lines do not have type information and may sometimes contain multiple values in a single field (e.g. "Austin, TX"), it is important that the line order is clear. The order of address lines should be "envelope order" for the country/region of the address. In places where this can vary (e.g. Japan), address_language is used to make it explicit (e.g. "ja" for large-to-small ordering and "ja-Latn" or "en" for small-to-large). This way, the most specific line of an address can be selected based on the language.
The minimum permitted structural representation of an address consists of a region_code with all remaining information placed in the address_lines. It would be possible to format such an address very approximately without geocoding, but no semantic reasoning could be made about any of the address components until it was at least partially resolved.
Creating an address only containing a region_code and address_lines, and then geocoding is the recommended way to handle completely unstructured addresses (as opposed to guessing which parts of the address should be localities or administrative areas).
property administrativeArea
administrativeArea?: string;
Optional. Highest administrative subdivision which is used for postal addresses of a country or region. For example, this can be a state, a province, an oblast, or a prefecture. Specifically, for Spain this is the province and not the autonomous community (e.g. "Barcelona" and not "Catalonia"). Many countries don't use an administrative area in postal addresses. E.g. in Switzerland this should be left unpopulated.
property languageCode
languageCode?: string;
Optional. BCP-47 language code of the contents of this address (if known). This is often the UI language of the input form or is expected to match one of the languages used in the address' country/region, or their transliterated equivalents. This can affect formatting in certain countries, but is not critical to the correctness of the data and will never affect any validation or other non-formatting related operations.
If this value is not known, it should be omitted (rather than specifying a possibly incorrect default).
Examples: "zh-Hant", "ja", "ja-Latn", "en".
property locality
locality?: string;
Optional. Generally refers to the city/town portion of the address. Examples: US city, IT comune, UK post town. In regions of the world where localities are not well defined or do not fit into this structure well, leave locality empty and use address_lines.
property organization
organization?: string;
Optional. The name of the organization at the address.
property postalCode
postalCode?: string;
Optional. Postal code of the address. Not all countries use or require postal codes to be present, but where they are used, they may trigger additional validation with other parts of the address (e.g. state/zip validation in the U.S.A.).
property recipients
recipients?: string[];
Optional. The recipient at the address. This field may, under certain circumstances, contain multiline information. For example, it might contain "care of" information.
property regionCode
regionCode?: string;
Required. CLDR region code of the country/region of the address. This is never inferred and it is up to the user to ensure the value is correct. See http://cldr.unicode.org/ and http://www.unicode.org/cldr/charts/30/supplemental/territory_information.html for details. Example: "CH" for Switzerland.
property revision
revision?: number;
The schema revision of the
PostalAddress
. This must be set to 0, which is the latest revision.All new revisions **must** be backward compatible with old revisions.
property sortingCode
sortingCode?: string;
Optional. Additional, country-specific, sorting code. This is not used in most regions. Where it is used, the value is either a string like "CEDEX", optionally followed by a number (e.g. "CEDEX 7"), or just a number alone, representing the "sector code" (Jamaica), "delivery area indicator" (Malawi) or "post office indicator" (e.g. Côte d'Ivoire).
property sublocality
sublocality?: string;
Optional. Sublocality of the address. For example, this can be neighborhoods, boroughs, districts.
interface GoogleTypeTimeOfDay
interface GoogleTypeTimeOfDay {}
property hours
hours?: number;
Hours of day in 24 hour format. Should be from 0 to 23. An API may choose to allow the value "24:00:00" for scenarios like business closing time.
property minutes
minutes?: number;
Minutes of hour of day. Must be from 0 to 59.
property nanos
nanos?: number;
Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.
property seconds
seconds?: number;
Seconds of minutes of the time. Must normally be from 0 to 59. An API may allow the value 60 if it allows leap-seconds.
interface Headers
interface Headers {}
Modifiers
@public
index signature
[header: string]: string | string[] | undefined;
Modifiers
@public
interface Helper
interface Helper<TIntent extends Intent, TValueSpec> extends Api.GoogleActionsV2ExpectedIntent {}
Modifiers
@public
interface HelperOptions
interface HelperOptions<TIntent extends Intent, TValueSpec> {}
Modifiers
@public
interface HtmlResponse
interface HtmlResponse extends Api.GoogleActionsV2UiElementsHtmlResponse {}
Html Canvas Response
Modifiers
@public
interface HtmlResponseOptions
interface HtmlResponseOptions<TData extends JsonObject = JsonObject> {}
Modifiers
@public
property data
data?: TData;
Communicate the following JSON object to the web app.
Alias of
updatedState
Modifiers
@public
property suppress
suppress?: boolean;
Configure if the mic is closed after this html response.
Alias of
suppressMic
Modifiers
@public
property url
url?: string;
The url of the web app.
Modifiers
@public
interface Image
interface Image extends Api.GoogleActionsV2UiElementsImage {}
Image type shown on visual elements.
Modifiers
@public
interface ImageOptions
interface ImageOptions {}
Modifiers
@public
interface JsonObject
interface JsonObject {}
Modifiers
@public
index signature
[key: string]: any;
interface LinkOutSuggestion
interface LinkOutSuggestion extends Api.GoogleActionsV2UiElementsLinkOutSuggestion {}
Link Out Suggestion. Used in rich response as a suggestion chip which, when selected, links out to external URL.
Modifiers
@public
interface LinkOutSuggestionOptions
interface LinkOutSuggestionOptions {}
Modifiers
@public
property name
name: string;
Text shown on the suggestion chip.
Modifiers
@public
property openUrlAction
openUrlAction: Api.GoogleActionsV2UiElementsOpenUrlAction;
URL action when clicked.
Modifiers
@public
interface ListOptions
interface ListOptions {}
Modifiers
@public
interface MediaObject
interface MediaObject extends Api.GoogleActionsV2MediaObject {}
Class for initializing and constructing MediaObject
Modifiers
@public
interface MediaObjectOptions
interface MediaObjectOptions {}
Modifiers
@public
property description
description?: string;
Modifiers
@public
property icon
icon?: Api.GoogleActionsV2UiElementsImage;
Icon image.
Modifiers
@public
property image
image?: Api.GoogleActionsV2UiElementsImage;
Large image.
Modifiers
@public
property name
name?: string;
Name of the MediaObject.
Modifiers
@public
property url
url: string;
MediaObject URL.
Modifiers
@public
interface MediaResponse
interface MediaResponse extends Api.GoogleActionsV2MediaResponse {}
Class for initializing and constructing MediaResponse.
Modifiers
@public
interface MediaResponseOptions
interface MediaResponseOptions {}
Modifiers
@public
interface NewSurfaceOptions
interface NewSurfaceOptions {}
Modifiers
@public
property capabilities
capabilities: SurfaceCapability | SurfaceCapability[];
The list of capabilities required in the surface.
Modifiers
@public
property context
context: string;
Context why new surface is requested. It's the TTS prompt prefix (action phrase) we ask the user.
Modifiers
@public
property notification
notification: string;
Title of the notification appearing on new surface device.
Modifiers
@public
interface OmniHandler
interface OmniHandler extends StandardHandler, ExpressHandler, LambdaHandler {}
Modifiers
@public
call signature
(...args: any[]): any;
Modifiers
@public
interface OpenUrlAction
interface OpenUrlAction extends Api.GoogleActionsV2UiElementsOpenUrlAction {}
Modifiers
@public
interface OpenUrlActionOptions
interface OpenUrlActionOptions {}
Modifiers
@public
property url
url: string;
Modifiers
@public
interface OptionItem
interface OptionItem {}
Option item. Used in actions.intent.OPTION intent.
Modifiers
@public
property description
description?: string;
Optional text describing the item.
Modifiers
@public
property image
image?: Api.GoogleActionsV2UiElementsImage;
Square image to show for this item.
Modifiers
@public
property synonyms
synonyms?: string[];
Synonyms that can be used by the user to indicate this option if they do not use the key.
Modifiers
@public
property title
title: string;
Name of the item.
Modifiers
@public
interface OptionItems
interface OptionItems<TOptionItem = OptionItem | string> {}
index signature
[key: string]: TOptionItem;
key: Unique string ID for this option.
Modifiers
@public
interface OrderUpdate
interface OrderUpdate extends Api.GoogleActionsV2OrdersOrderUpdate {}
Class for initializing and constructing OrderUpdate
Modifiers
@public
interface OutputContext
interface OutputContext<TParameters extends Parameters> {}
Modifiers
@public
property lifespan
lifespan: number;
Modifiers
@public
property parameters
parameters?: TParameters;
Modifiers
@public
interface OutputContexts
interface OutputContexts {}
Modifiers
@public
index signature
[context: string]: OutputContext<Parameters> | undefined;
Modifiers
@public
interface Parameters
interface Parameters {}
Modifiers
@public
index signature
[parameter: string]: string | Object | undefined;
Modifiers
@public
interface PermissionOptions
interface PermissionOptions {}
Modifiers
@public
property context
context?: string;
Context why the permission is being asked. It's the TTS prompt prefix (action phrase) we ask the user.
Modifiers
@public
property extra
extra?: Api.GoogleActionsV2PermissionValueSpec;
Extra properties to be spread into the value. For advanced usages like used in UpdatePermission
Modifiers
@public
property permissions
permissions: | Api.GoogleActionsV2PermissionValueSpecPermissions | Api.GoogleActionsV2PermissionValueSpecPermissions[];
Array or string of permissions App supports, each of which comes from GoogleActionsV2PermissionValueSpecPermissions.
Modifiers
@public
interface PlaceOptions
interface PlaceOptions {}
Modifiers
@public
property context
context: string;
This is the context for seeking permissions. For example: "To find a place to pick you up" Prompt to user: "*To find a place to pick you up*, I just need to check your location. Can I get that from Google?".
Modifiers
@public
property prompt
prompt: string;
This is the initial response by location sub-dialog. For example: "Where do you want to get picked up?"
Modifiers
@public
interface Plugin
interface Plugin<TService, TPlugin> {}
Modifiers
@public
call signature
<TApp>(app: AppHandler & TService & TApp): | (AppHandler & TService & TApp & TPlugin) | void;
Modifiers
@public
interface RegisterUpdateOptions
interface RegisterUpdateOptions {}
Modifiers
@public
property arguments
arguments: Api.GoogleActionsV2Argument[];
The necessary arguments to fulfill the intent triggered on update. These can be retrieved using conv.arguments.get.
Modifiers
@public
property frequency
frequency: Api.GoogleActionsV2TriggerContextTimeContextFrequency;
The high-level frequency of the recurring update.
Modifiers
@public
property intent
intent: string;
The Dialogflow/Actions SDK intent name to be triggered when the update is received.
Modifiers
@public
interface RichResponse
interface RichResponse extends Api.GoogleActionsV2RichResponse {}
Class for initializing and constructing Rich Responses with chainable interface.
Modifiers
@public
interface RichResponseOptions
interface RichResponseOptions {}
Modifiers
@public
property items
items?: RichResponseItem[];
Ordered list of either SimpleResponse objects or BasicCard objects. First item must be SimpleResponse. There can be at most one card.
Modifiers
@public
property link
link?: Api.GoogleActionsV2UiElementsLinkOutSuggestion;
Link Out Suggestion chip for this rich response. Optional.
Modifiers
@public
property suggestions
suggestions?: string[] | Suggestions;
Ordered list of text suggestions to display. Optional.
Modifiers
@public
interface SimpleResponse
interface SimpleResponse extends Api.GoogleActionsV2SimpleResponse {}
Simple Response type.
Modifiers
@public
interface SimpleResponseOptions
interface SimpleResponseOptions {}
Modifiers
@public
interface SmartHome
interface SmartHome {}
Modifiers
@public
call signature
(options?: SmartHomeOptions): AppHandler & SmartHomeApp;
interface SmartHomeApp
interface SmartHomeApp extends ServiceBaseApp {}
Modifiers
@public
property jwt
jwt?: SmartHomeJwt;
Modifiers
@public
Deprecated
Home Graph credentials are deprecated. Use Google APIs Node.js Client for Home Graph: https://www.npmjs.com/package/@googleapis/homegraph
property key
key?: string;
Modifiers
@public
Deprecated
Home Graph credentials are deprecated. Use Google APIs Node.js Client for Home Graph: https://www.npmjs.com/package/@googleapis/homegraph
method onDisconnect
onDisconnect: ( handler: SmartHomeHandler< Api.SmartHomeV1DisconnectRequest, Api.SmartHomeV1DisconnectResponse >) => this;
Defines a function that will run when a DISCONNECT request is received.
Parameter handler
The function that will run for an EXECUTE request. It should return a valid response or a Promise that resolves to valid response.
Example 1
const app = smarthome();app.onDisconnect((body, headers) => {// User unlinked their account, stop reporting state for userreturn {}})Modifiers
@public
method onExecute
onExecute: ( handler: SmartHomeHandler< Api.SmartHomeV1ExecuteRequest, Api.SmartHomeV1ExecuteResponse >) => this;
Defines a function that will run when an EXECUTE request is received.
Parameter handler
The function that will run for an EXECUTE request. It should return a valid response or a Promise that resolves to valid response.
Example 1
const app = smarthome();app.onExecute((body, headers) => {return {requestId: 'ff36...',payload: {...}}})Modifiers
@public
method onQuery
onQuery: ( handler: SmartHomeHandler< Api.SmartHomeV1QueryRequest, Api.SmartHomeV1QueryResponse >) => this;
Defines a function that will run when a QUERY request is received.
Parameter handler
The function that will run for a QUERY request. It should return a valid response or a Promise that resolves to valid response.
Example 1
const app = smarthome();app.onQuery((body, headers) => {return {requestId: 'ff36...',payload: {...}}})Modifiers
@public
method onSync
onSync: ( handler: SmartHomeHandler< Api.SmartHomeV1SyncRequest, Api.SmartHomeV1SyncResponse >) => this;
Defines a function that will run when a SYNC request is received.
Parameter handler
The function that will run for a SYNC request. It should return a valid response or a Promise that resolves to valid response.
Example 1
const app = smarthome();app.onSync((body, headers) => {return {requestId: 'ff36...',payload: {...}}})Modifiers
@public
method reportState
reportState: ( reportedState: Api.SmartHomeV1ReportStateRequest) => Promise<string>;
Reports the current state of a device or set of devices to the home graph. This may be done if the state of the device was changed locally, like a light turning on through a light switch.
When calling this function, a JWT (JSON Web Token) needs to be provided as an option in the constructor.
Parameter reportedState
A payload containing a device or set of devices with their states
Example 1
const app = smarthome({jwt: require('./jwt.json');});const reportState = () => {app.reportState({requestId: '123ABC',agentUserId: 'user-123',payload: {devices: {states: {"light-123": {on: true}}}}}).then((res) => {// Report state was successful}).catch((res) => {// Report state failed})};Modifiers
@public
Deprecated
Home Graph wrapper methods are deprecated. Use Google APIs Node.js Client for Home Graph: https://www.npmjs.com/package/@googleapis/homegraph
method requestSync
requestSync: (agentUserId: string) => Promise<string>;
Sends a request to the home graph to send a new SYNC request. This should be called when a device is added or removed for a given user id.
When calling this function, an API key needs to be provided as an option in the constructor. See https://developers.google.com/actions/smarthome/create-app#request-sync to learn more.
Parameter agentUserId
The user identifier.
Example 1
const app = smarthome({key: "123ABC"});const addNewDevice = () => {app.requestSync('user-123').then((res) => {// Request sync was successful}).catch((res) => {// Request sync failed})}// When request sync is called, a SYNC// intent will be received soon after.app.onSync(body => {// ...})Modifiers
@public
Deprecated
Home Graph wrapper methods are deprecated. Use Google APIs Node.js Client for Home Graph: https://www.npmjs.com/package/@googleapis/homegraph
interface SmartHomeHandler
interface SmartHomeHandler< TRequest extends Api.SmartHomeV1Request, TResponse extends Api.SmartHomeV1Response> {}
Modifiers
@public
call signature
(body: TRequest, headers: Headers, framework: BuiltinFrameworkMetadata): | TResponse | Promise<TResponse>;
interface SmartHomeJwt
interface SmartHomeJwt {}
Modifiers
@public
Deprecated
Home Graph credentials are deprecated. Use Google APIs Node.js Client for Home Graph: https://www.npmjs.com/package/@googleapis/homegraph
property auth_provider_x509_cert_url
auth_provider_x509_cert_url: string;
property auth_uri
auth_uri: string;
property client_email
client_email: string;
property client_id
client_id: string;
property client_x509_cert_url
client_x509_cert_url: string;
property private_key
private_key: string;
property private_key_id
private_key_id: string;
property project_id
project_id: string;
property token_uri
token_uri: string;
property type
type: 'service_account';
interface SmartHomeOptions
interface SmartHomeOptions extends AppOptions {}
Modifiers
@public
property jwt
jwt?: SmartHomeJwt;
A JWT (JSON Web Token) that is able to access the home graph API. This is used for report state. See https://jwt.io/. A JWT can be created through the Google Cloud Console: https://console.cloud.google.com/apis/credentials
Modifiers
@public
Deprecated
Home Graph credentials are deprecated. Use Google APIs Node.js Client for Home Graph: https://www.npmjs.com/package/@googleapis/homegraph
property key
key?: string;
An API key to use the home graph API. See https://console.cloud.google.com/apis/api/homegraph.googleapis.com/overview to learn more.
Modifiers
@public
Deprecated
Home Graph credentials are deprecated. Use Google APIs Node.js Client for Home Graph: https://www.npmjs.com/package/@googleapis/homegraph
interface SmartHomeV1DisconnectRequest
interface SmartHomeV1DisconnectRequest {}
interface SmartHomeV1DisconnectResponse
interface SmartHomeV1DisconnectResponse {}
interface SmartHomeV1ExecutePayload
interface SmartHomeV1ExecutePayload {}
property commands
commands: SmartHomeV1ExecuteResponseCommands[];
property debugString
debugString?: string;
property errorCode
errorCode?: SmartHomeV1ExecuteErrors;
interface SmartHomeV1ExecuteRequest
interface SmartHomeV1ExecuteRequest {}
interface SmartHomeV1ExecuteRequestCommands
interface SmartHomeV1ExecuteRequestCommands {}
interface SmartHomeV1ExecuteRequestExecution
interface SmartHomeV1ExecuteRequestExecution {}
interface SmartHomeV1ExecuteRequestInputs
interface SmartHomeV1ExecuteRequestInputs {}
interface SmartHomeV1ExecuteRequestPayload
interface SmartHomeV1ExecuteRequestPayload {}
property commands
commands: SmartHomeV1ExecuteRequestCommands[];
interface SmartHomeV1ExecuteResponse
interface SmartHomeV1ExecuteResponse {}
interface SmartHomeV1ExecuteResponseCommands
interface SmartHomeV1ExecuteResponseCommands {}
property challengeNeeded
challengeNeeded?: { type: challengeType;};
property debugString
debugString?: string;
property errorCode
errorCode?: SmartHomeV1ExecuteErrors;
property ids
ids: string[];
property states
states?: ApiClientObjectMap<any>;
property status
status: SmartHomeV1ExecuteStatus;
interface SmartHomeV1QueryPayload
interface SmartHomeV1QueryPayload {}
property devices
devices: ApiClientObjectMap<any>;
interface SmartHomeV1QueryRequest
interface SmartHomeV1QueryRequest {}
interface SmartHomeV1QueryRequestDevices
interface SmartHomeV1QueryRequestDevices {}
property customData
customData?: ApiClientObjectMap<any>;
property id
id: string;
interface SmartHomeV1QueryRequestInputs
interface SmartHomeV1QueryRequestInputs {}
interface SmartHomeV1QueryRequestPayload
interface SmartHomeV1QueryRequestPayload {}
property devices
devices: SmartHomeV1QueryRequestDevices[];
interface SmartHomeV1QueryResponse
interface SmartHomeV1QueryResponse {}
interface SmartHomeV1ReportStateRequest
interface SmartHomeV1ReportStateRequest {}
property agentUserId
agentUserId: string;
property payload
payload: { devices: { states: ApiClientObjectMap<any>; };};
property requestId
requestId: string;
interface SmartHomeV1SyncDeviceInfo
interface SmartHomeV1SyncDeviceInfo {}
property hwVersion
hwVersion: string;
property manufacturer
manufacturer: string;
property model
model: string;
property swVersion
swVersion: string;
interface SmartHomeV1SyncDevices
interface SmartHomeV1SyncDevices {}
property attributes
attributes?: ApiClientObjectMap<any>;
property customData
customData?: ApiClientObjectMap<any>;
property deviceInfo
deviceInfo?: SmartHomeV1SyncDeviceInfo;
property id
id: string;
property name
name: SmartHomeV1SyncName;
property otherDeviceIds
otherDeviceIds?: SmartHomeV1SyncOtherDeviceIds[];
property roomHint
roomHint?: string;
property traits
traits: string[];
property type
type: string;
property willReportState
willReportState: boolean;
interface SmartHomeV1SyncName
interface SmartHomeV1SyncName {}
property defaultNames
defaultNames: string[];
property name
name: string;
property nicknames
nicknames: string[];
interface SmartHomeV1SyncOtherDeviceIds
interface SmartHomeV1SyncOtherDeviceIds {}
interface SmartHomeV1SyncPayload
interface SmartHomeV1SyncPayload {}
property agentUserId
agentUserId?: string;
property debugString
debugString?: string;
property devices
devices: SmartHomeV1SyncDevices[];
property errorCode
errorCode?: string;
interface SmartHomeV1SyncRequest
interface SmartHomeV1SyncRequest {}
interface SmartHomeV1SyncRequestInputs
interface SmartHomeV1SyncRequestInputs {}
property intent
intent: SmartHomeV1Intents;
interface SmartHomeV1SyncResponse
interface SmartHomeV1SyncResponse {}
interface StandardHandler
interface StandardHandler {}
Modifiers
@public
call signature
( /** @public */ body: JsonObject, /** @public */ headers: Headers, /** @public */ metadata?: BuiltinFrameworkMetadata): Promise<StandardResponse>;
Modifiers
@public
interface StandardResponse
interface StandardResponse {}
Modifiers
@public
interface Table
interface Table extends Api.GoogleActionsV2UiElementsTableCard {}
Creates a Table card.
Example 1
// Simple tableconv.ask('Simple Response')conv.ask(new Table({dividers: true,columns: ['header 1', 'header 2', 'header 3'],rows: [['row 1 item 1', 'row 1 item 2', 'row 1 item 3'],['row 2 item 1', 'row 2 item 2', 'row 2 item 3'],],}))// All fieldsconv.ask('Simple Response')conv.ask(new Table({title: 'Table Title',subtitle: 'Table Subtitle',image: new Image({url: 'https://avatars0.githubusercontent.com/u/23533486',alt: 'Actions on Google'}),columns: [{header: 'header 1',align: 'CENTER',},{header: 'header 2',align: 'LEADING',},{header: 'header 3',align: 'TRAILING',},],rows: [{cells: ['row 1 item 1', 'row 1 item 2', 'row 1 item 3'],dividerAfter: false,},{cells: ['row 2 item 1', 'row 2 item 2', 'row 2 item 3'],dividerAfter: true,},{cells: ['row 3 item 1', 'row 3 item 2', 'row 3 item 3'],},],buttons: new Button({title: 'Button Title',url: 'https://github.com/actions-on-google'}),}))Modifiers
@public
interface TableColumn
interface TableColumn extends Api.GoogleActionsV2UiElementsTableCardColumnProperties {}
Modifiers
@public
property align
align?: Api.GoogleActionsV2UiElementsTableCardColumnPropertiesHorizontalAlignment;
Alias for
horizontalAlignment
Horizontal alignment of content w.r.t column. If unspecified, content will be aligned to the leading edge.
Modifiers
@public
interface TableOptions
interface TableOptions {}
Modifiers
@public
property buttons
buttons?: | Api.GoogleActionsV2UiElementsButton | Api.GoogleActionsV2UiElementsButton[];
Buttons for the Table. Currently at most 1 button is supported.
Modifiers
@public
property columnProperties
columnProperties?: (TableColumn | string)[];
Headers and alignment of columns.
This property or
columns
is required.When provided as string array, just the header field is set per column.
Modifiers
@public
property columns
columns?: (TableColumn | string)[] | number;
Headers and alignment of columns with shortened name. Alias of
columnProperties
with the additional capability of accepting a number type.This property or
columnProperties
is required.When provided as string array, just the header field is set per column. When provided a number, it represents the number of elements per row.
Modifiers
@public
property dividers
dividers?: boolean;
Default dividerAfter for all rows. Individual rows with
dividerAfter
set will override for that specific row.Modifiers
@public
property image
image?: Api.GoogleActionsV2UiElementsImage;
Image associated with the table.
Modifiers
@public
property rows
rows: (TableRow | string[])[];
Row data of the table.
The first 3 rows are guaranteed to be shown but others might be cut on certain surfaces. Please test with the simulator to see which rows will be shown for a given surface.
On surfaces that support the WEB_BROWSER capability, you can point the user to a web page with more data.
Modifiers
@public
property subtitle
subtitle?: string;
Subtitle for the table.
Modifiers
@public
property title
title?: string;
Overall title of the table.
Must be set if subtitle is set.
Modifiers
@public
interface TableRow
interface TableRow {}
Modifiers
@public
property cells
cells?: (Api.GoogleActionsV2UiElementsTableCardCell | string)[];
Cells in this row. The first 3 cells are guaranteed to be shown but others might be cut on certain surfaces. Please test with the simulator to see which cells will be shown for a given surface.
When provided as a string array, creates the cells as text.
Modifiers
@public
property dividerAfter
dividerAfter?: boolean;
Indicates whether there should be a divider after each row.
Overrides top level
dividers
property for this specific row if set.Modifiers
@public
interface UpdatePermissionOptions
interface UpdatePermissionOptions {}
Modifiers
@public
property arguments
arguments?: Api.GoogleActionsV2Argument[];
The necessary arguments to fulfill the intent triggered on update. These can be retrieved using conv.arguments.get.
Modifiers
@public
property intent
intent: string;
The Dialogflow/Actions SDK intent name to be triggered when the update is received.
Modifiers
@public
Type Aliases
type AppHandler
type AppHandler = OmniHandler & BaseApp;
Modifiers
@public
type Argument
type Argument = Api.GoogleActionsV2Argument[keyof Api.GoogleActionsV2Argument];
Modifiers
@public
type CarouselArgument
type CarouselArgument = OptionArgument;
Modifiers
@public
type challengeType
type challengeType = 'ackNeeded' | 'pinNeeded' | 'challengeFailedPinNeeded';
type CompletePurchaseArgument
type CompletePurchaseArgument = Api.GoogleActionsTransactionsV3CompletePurchaseValue;
Modifiers
@public
type ConfirmationArgument
type ConfirmationArgument = boolean;
Modifiers
@public
type DateTimeArgument
type DateTimeArgument = Api.GoogleActionsV2DateTime;
Modifiers
@public
type DefaultDialogflowIntent
type DefaultDialogflowIntent = 'Default Welcome Intent' | 'Default Fallback Intent';
Modifiers
@public
type DeliveryAddressArgument
type DeliveryAddressArgument = Api.GoogleActionsV2DeliveryAddressValue;
Modifiers
@public
type DialogflowV1Message
type DialogflowV1Message = | DialogflowV1MessageText | DialogflowV1MessageImage | DialogflowV1MessageCard | DialogflowV1MessageQuickReplies | DialogflowV1MessageCustomPayload | DialogflowV1MessageSimpleResponse | DialogflowV1MessageBasicCard | DialogflowV1MessageList | DialogflowV1MessageSuggestions | DialogflowV1MessageCarousel | DialogflowV1MessageLinkOut | DialogflowV1MessageGooglePayload;
type DigitalPurchaseCheckArgument
type DigitalPurchaseCheckArgument = Api.GoogleActionsTransactionsV3DigitalPurchaseCheckResult;
Modifiers
@public
type FinalRepromptArgument
type FinalRepromptArgument = boolean;
Modifiers
@public
type GoogleActionsOrdersV3ActionType
type GoogleActionsOrdersV3ActionType = | 'TYPE_UNSPECIFIED' | 'VIEW_DETAILS' | 'MODIFY' | 'CANCEL' | 'RETURN' | 'EXCHANGE' | 'EMAIL' | 'CALL' | 'REORDER' | 'REVIEW' | 'CUSTOMER_SERVICE' | 'FIX_ISSUE' | 'DIRECTION';
type GoogleActionsOrdersV3OrderUpdateType
type GoogleActionsOrdersV3OrderUpdateType = | 'TYPE_UNSPECIFIED' | 'ORDER_STATUS' | 'SNAPSHOT';
type GoogleActionsOrdersV3PriceAttributeState
type GoogleActionsOrdersV3PriceAttributeState = | 'STATE_UNSPECIFIED' | 'ESTIMATE' | 'ACTUAL';
type GoogleActionsOrdersV3PriceAttributeType
type GoogleActionsOrdersV3PriceAttributeType = | 'TYPE_UNSPECIFIED' | 'REGULAR' | 'DISCOUNT' | 'TAX' | 'DELIVERY' | 'SUBTOTAL' | 'FEE' | 'GRATUITY' | 'TOTAL';
type GoogleActionsOrdersV3VerticalsPurchaseMerchantUnitMeasureUnit
type GoogleActionsOrdersV3VerticalsPurchaseMerchantUnitMeasureUnit = | 'UNIT_UNSPECIFIED' | 'MILLIGRAM' | 'GRAM' | 'KILOGRAM' | 'OUNCE' | 'POUND';
type GoogleActionsOrdersV3VerticalsPurchasePickupInfoCurbsideInfoCurbsideFulfillmentType
type GoogleActionsOrdersV3VerticalsPurchasePickupInfoCurbsideInfoCurbsideFulfillmentType = 'UNSPECIFIED' | 'VEHICLE_DETAIL';
type GoogleActionsOrdersV3VerticalsPurchasePickupInfoPickupType
type GoogleActionsOrdersV3VerticalsPurchasePickupInfoPickupType = | 'UNSPECIFIED' | 'INSTORE' | 'CURBSIDE';
type GoogleActionsOrdersV3VerticalsPurchasePurchaseErrorType
type GoogleActionsOrdersV3VerticalsPurchasePurchaseErrorType = | 'ERROR_TYPE_UNSPECIFIED' | 'NOT_FOUND' | 'INVALID' | 'AVAILABILITY_CHANGED' | 'PRICE_CHANGED' | 'INCORRECT_PRICE' | 'REQUIREMENTS_NOT_MET' | 'TOO_LATE' | 'NO_CAPACITY' | 'INELIGIBLE' | 'OUT_OF_SERVICE_AREA' | 'CLOSED' | 'PROMO_NOT_APPLICABLE' | 'PROMO_NOT_RECOGNIZED' | 'PROMO_EXPIRED' | 'PROMO_USER_INELIGIBLE' | 'PROMO_ORDER_INELIGIBLE' | 'UNAVAILABLE_SLOT' | 'FAILED_PRECONDITION' | 'PAYMENT_DECLINED';
type GoogleActionsOrdersV3VerticalsPurchasePurchaseFulfillmentInfoFulfillmentType
type GoogleActionsOrdersV3VerticalsPurchasePurchaseFulfillmentInfoFulfillmentType = | 'TYPE_UNSPECIFIED' | 'DELIVERY' | 'PICKUP';
type GoogleActionsOrdersV3VerticalsPurchasePurchaseItemExtensionStatus
type GoogleActionsOrdersV3VerticalsPurchasePurchaseItemExtensionStatus = | 'PURCHASE_STATUS_UNSPECIFIED' | 'READY_FOR_PICKUP' | 'SHIPPED' | 'DELIVERED' | 'OUT_OF_STOCK' | 'IN_PREPARATION' | 'CREATED' | 'CONFIRMED' | 'REJECTED' | 'RETURNED' | 'CANCELLED' | 'CHANGE_REQUESTED';
type GoogleActionsOrdersV3VerticalsPurchasePurchaseItemExtensionType
type GoogleActionsOrdersV3VerticalsPurchasePurchaseItemExtensionType = | 'PURCHASE_TYPE_UNSPECIFIED' | 'RETAIL' | 'FOOD' | 'GROCERY';
type GoogleActionsOrdersV3VerticalsPurchasePurchaseOrderExtensionPurchaseLocationType
type GoogleActionsOrdersV3VerticalsPurchasePurchaseOrderExtensionPurchaseLocationType = 'UNSPECIFIED_LOCATION' | 'ONLINE_PURCHASE' | 'INSTORE_PURCHASE';
type GoogleActionsOrdersV3VerticalsPurchasePurchaseOrderExtensionStatus
type GoogleActionsOrdersV3VerticalsPurchasePurchaseOrderExtensionStatus = | 'PURCHASE_STATUS_UNSPECIFIED' | 'READY_FOR_PICKUP' | 'SHIPPED' | 'DELIVERED' | 'OUT_OF_STOCK' | 'IN_PREPARATION' | 'CREATED' | 'CONFIRMED' | 'REJECTED' | 'RETURNED' | 'CANCELLED' | 'CHANGE_REQUESTED';
type GoogleActionsOrdersV3VerticalsPurchasePurchaseOrderExtensionType
type GoogleActionsOrdersV3VerticalsPurchasePurchaseOrderExtensionType = | 'PURCHASE_TYPE_UNSPECIFIED' | 'RETAIL' | 'FOOD' | 'GROCERY';
type GoogleActionsOrdersV3VerticalsReservationReservationItemExtensionStatus
type GoogleActionsOrdersV3VerticalsReservationReservationItemExtensionStatus = | 'RESERVATION_STATUS_UNSPECIFIED' | 'PENDING' | 'CONFIRMED' | 'CANCELLED' | 'FULFILLED' | 'CHANGE_REQUESTED' | 'REJECTED';
type GoogleActionsOrdersV3VerticalsReservationReservationItemExtensionType
type GoogleActionsOrdersV3VerticalsReservationReservationItemExtensionType = | 'RESERVATION_TYPE_UNSPECIFIED' | 'RESTAURANT' | 'HAIRDRESSER';
type GoogleActionsOrdersV3VerticalsTicketEventCharacterType
type GoogleActionsOrdersV3VerticalsTicketEventCharacterType = | 'TYPE_UNKNOWN' | 'ACTOR' | 'PERFORMER' | 'DIRECTOR' | 'ORGANIZER';
type GoogleActionsOrdersV3VerticalsTicketTicketEventType
type GoogleActionsOrdersV3VerticalsTicketTicketEventType = | 'EVENT_TYPE_UNKNOWN' | 'MOVIE' | 'CONCERT' | 'SPORTS';
type GoogleActionsTransactionsV3CompletePurchaseValuePurchaseStatus
type GoogleActionsTransactionsV3CompletePurchaseValuePurchaseStatus = | 'PURCHASE_STATUS_UNSPECIFIED' | 'PURCHASE_STATUS_OK' | 'PURCHASE_STATUS_ERROR' | 'PURCHASE_STATUS_USER_CANCELLED' | 'PURCHASE_STATUS_ALREADY_OWNED' | 'PURCHASE_STATUS_ITEM_UNAVAILABLE' | 'PURCHASE_STATUS_ITEM_CHANGE_REQUESTED';
type GoogleActionsTransactionsV3DigitalPurchaseCheckResultResultType
type GoogleActionsTransactionsV3DigitalPurchaseCheckResultResultType = | 'RESULT_TYPE_UNSPECIFIED' | 'CAN_PURCHASE' | 'CANNOT_PURCHASE';
type GoogleActionsTransactionsV3PaymentInfoPaymentMethodProvenance
type GoogleActionsTransactionsV3PaymentInfoPaymentMethodProvenance = | 'PAYMENT_METHOD_PROVENANCE_UNSPECIFIED' | 'PAYMENT_METHOD_PROVENANCE_GOOGLE' | 'PAYMENT_METHOD_PROVENANCE_MERCHANT';
type GoogleActionsTransactionsV3PaymentMethodDisplayInfoPaymentType
type GoogleActionsTransactionsV3PaymentMethodDisplayInfoPaymentType = | 'PAYMENT_TYPE_UNSPECIFIED' | 'PAYMENT_CARD' | 'BANK' | 'LOYALTY_PROGRAM' | 'CASH' | 'GIFT_CARD' | 'WALLET';
type GoogleActionsTransactionsV3PaymentMethodStatusStatus
type GoogleActionsTransactionsV3PaymentMethodStatusStatus = | 'STATUS_UNSPECIFIED' | 'STATUS_OK' | 'STATUS_REQUIRE_FIX' | 'STATUS_INAPPLICABLE';
type GoogleActionsTransactionsV3SkuIdSkuType
type GoogleActionsTransactionsV3SkuIdSkuType = | 'SKU_TYPE_UNSPECIFIED' | 'SKU_TYPE_IN_APP' | 'SKU_TYPE_SUBSCRIPTION';
type GoogleActionsTransactionsV3TransactionDecisionValueTransactionDecision
type GoogleActionsTransactionsV3TransactionDecisionValueTransactionDecision = | 'TRANSACTION_DECISION_UNSPECIFIED' | 'USER_CANNOT_TRANSACT' | 'ORDER_ACCEPTED' | 'ORDER_REJECTED' | 'DELIVERY_ADDRESS_UPDATED' | 'CART_CHANGE_REQUESTED';
type GoogleActionsTransactionsV3TransactionRequirementsCheckResultResultType
type GoogleActionsTransactionsV3TransactionRequirementsCheckResultResultType = | 'RESULT_TYPE_UNSPECIFIED' | 'CAN_TRANSACT' | 'CANNOT_TRANSACT';
type GoogleActionsTransactionsV3UserInfoOptionsUserInfoProperties
type GoogleActionsTransactionsV3UserInfoOptionsUserInfoProperties = | 'USER_INFO_PROPERTY_UNSPECIFIED' | 'EMAIL';
type GoogleActionsV2ConversationType
type GoogleActionsV2ConversationType = 'TYPE_UNSPECIFIED' | 'NEW' | 'ACTIVE';
type GoogleActionsV2DeliveryAddressValueUserDecision
type GoogleActionsV2DeliveryAddressValueUserDecision = | 'UNKNOWN_USER_DECISION' | 'ACCEPTED' | 'REJECTED';
type GoogleActionsV2EntitlementSkuType
type GoogleActionsV2EntitlementSkuType = | 'TYPE_UNSPECIFIED' | 'IN_APP' | 'SUBSCRIPTION' | 'APP';
type GoogleActionsV2MediaResponseMediaType
type GoogleActionsV2MediaResponseMediaType = 'MEDIA_TYPE_UNSPECIFIED' | 'AUDIO';
type GoogleActionsV2MediaStatusStatus
type GoogleActionsV2MediaStatusStatus = 'STATUS_UNSPECIFIED' | 'FINISHED' | 'FAILED';
type GoogleActionsV2NewSurfaceValueStatus
type GoogleActionsV2NewSurfaceValueStatus = | 'NEW_SURFACE_STATUS_UNSPECIFIED' | 'CANCELLED' | 'OK';
type GoogleActionsV2OrdersActionProvidedPaymentOptionsPaymentType
type GoogleActionsV2OrdersActionProvidedPaymentOptionsPaymentType = | 'PAYMENT_TYPE_UNSPECIFIED' | 'PAYMENT_CARD' | 'BANK' | 'LOYALTY_PROGRAM' | 'ON_FULFILLMENT' | 'GIFT_CARD';
type GoogleActionsV2OrdersCustomerInfoOptionsCustomerInfoProperties
type GoogleActionsV2OrdersCustomerInfoOptionsCustomerInfoProperties = | 'CUSTOMER_INFO_PROPERTY_UNSPECIFIED' | 'EMAIL';
type GoogleActionsV2OrdersGoogleProvidedPaymentOptionsSupportedCardNetworks
type GoogleActionsV2OrdersGoogleProvidedPaymentOptionsSupportedCardNetworks = | 'UNSPECIFIED_CARD_NETWORK' | 'AMEX' | 'DISCOVER' | 'MASTERCARD' | 'VISA' | 'JCB';
type GoogleActionsV2OrdersLineItemType
type GoogleActionsV2OrdersLineItemType = | 'UNSPECIFIED' | 'REGULAR' | 'TAX' | 'DISCOUNT' | 'GRATUITY' | 'DELIVERY' | 'SUBTOTAL' | 'FEE';
type GoogleActionsV2OrdersOrderLocationType
type GoogleActionsV2OrdersOrderLocationType = | 'UNKNOWN' | 'DELIVERY' | 'BUSINESS' | 'ORIGIN' | 'DESTINATION' | 'PICK_UP';
type GoogleActionsV2OrdersOrderUpdateActionType
type GoogleActionsV2OrdersOrderUpdateActionType = | 'UNKNOWN' | 'VIEW_DETAILS' | 'MODIFY' | 'CANCEL' | 'RETURN' | 'EXCHANGE' | 'EMAIL' | 'CALL' | 'REORDER' | 'REVIEW' | 'CUSTOMER_SERVICE' | 'FIX_ISSUE';
type GoogleActionsV2OrdersPaymentInfoPaymentType
type GoogleActionsV2OrdersPaymentInfoPaymentType = | 'PAYMENT_TYPE_UNSPECIFIED' | 'PAYMENT_CARD' | 'BANK' | 'LOYALTY_PROGRAM' | 'ON_FULFILLMENT' | 'GIFT_CARD';
type GoogleActionsV2OrdersPaymentMethodTokenizationParametersTokenizationType
type GoogleActionsV2OrdersPaymentMethodTokenizationParametersTokenizationType = | 'UNSPECIFIED_TOKENIZATION_TYPE' | 'PAYMENT_GATEWAY' | 'DIRECT';
type GoogleActionsV2OrdersPriceType
type GoogleActionsV2OrdersPriceType = 'UNKNOWN' | 'ESTIMATE' | 'ACTUAL';
type GoogleActionsV2OrdersRejectionInfoType
type GoogleActionsV2OrdersRejectionInfoType = | 'UNKNOWN' | 'PAYMENT_DECLINED' | 'INELIGIBLE' | 'PROMO_NOT_APPLICABLE' | 'UNAVAILABLE_SLOT';
type GoogleActionsV2OrdersTimeType
type GoogleActionsV2OrdersTimeType = | 'UNKNOWN' | 'DELIVERY_DATE' | 'ETA' | 'RESERVATION_SLOT';
type GoogleActionsV2PermissionValueSpecPermissions
type GoogleActionsV2PermissionValueSpecPermissions = | 'UNSPECIFIED_PERMISSION' | 'NAME' | 'DEVICE_PRECISE_LOCATION' | 'DEVICE_COARSE_LOCATION' | 'UPDATE';
type GoogleActionsV2RawInputInputType
type GoogleActionsV2RawInputInputType = | 'UNSPECIFIED_INPUT_TYPE' | 'TOUCH' | 'VOICE' | 'KEYBOARD' | 'URL';
type GoogleActionsV2RegisterUpdateValueStatus
type GoogleActionsV2RegisterUpdateValueStatus = | 'REGISTER_UPDATE_STATUS_UNSPECIFIED' | 'OK' | 'CANCELLED';
type GoogleActionsV2SignInValueStatus
type GoogleActionsV2SignInValueStatus = | 'SIGN_IN_STATUS_UNSPECIFIED' | 'OK' | 'CANCELLED' | 'ERROR';
type GoogleActionsV2TransactionDecisionValueUserDecision
type GoogleActionsV2TransactionDecisionValueUserDecision = | 'UNKNOWN_USER_DECISION' | 'ORDER_ACCEPTED' | 'ORDER_REJECTED' | 'DELIVERY_ADDRESS_UPDATED' | 'CART_CHANGE_REQUESTED';
type GoogleActionsV2TransactionRequirementsCheckResultResultType
type GoogleActionsV2TransactionRequirementsCheckResultResultType = | 'RESULT_TYPE_UNSPECIFIED' | 'OK' | 'USER_ACTION_REQUIRED' | 'ASSISTANT_SURFACE_NOT_SUPPORTED' | 'REGION_NOT_SUPPORTED';
type GoogleActionsV2TriggerContextTimeContextFrequency
type GoogleActionsV2TriggerContextTimeContextFrequency = | 'FREQUENCY_UNSPECIFIED' | 'DAILY' | 'ROUTINES';
type GoogleActionsV2UiElementsBasicCardImageDisplayOptions
type GoogleActionsV2UiElementsBasicCardImageDisplayOptions = | 'DEFAULT' | 'WHITE' | 'CROPPED';
type GoogleActionsV2UiElementsCarouselBrowseImageDisplayOptions
type GoogleActionsV2UiElementsCarouselBrowseImageDisplayOptions = | 'DEFAULT' | 'WHITE' | 'CROPPED';
type GoogleActionsV2UiElementsCarouselSelectImageDisplayOptions
type GoogleActionsV2UiElementsCarouselSelectImageDisplayOptions = | 'DEFAULT' | 'WHITE' | 'CROPPED';
type GoogleActionsV2UiElementsCollectionSelectImageDisplayOptions
type GoogleActionsV2UiElementsCollectionSelectImageDisplayOptions = | 'DEFAULT' | 'WHITE' | 'CROPPED';
type GoogleActionsV2UiElementsOpenUrlActionUrlTypeHint
type GoogleActionsV2UiElementsOpenUrlActionUrlTypeHint = | 'URL_TYPE_HINT_UNSPECIFIED' | 'AMP_CONTENT';
type GoogleActionsV2UiElementsTableCardColumnPropertiesHorizontalAlignment
type GoogleActionsV2UiElementsTableCardColumnPropertiesHorizontalAlignment = | 'LEADING' | 'CENTER' | 'TRAILING';
type GoogleActionsV2UserPermissions
type GoogleActionsV2UserPermissions = | 'UNSPECIFIED_PERMISSION' | 'NAME' | 'DEVICE_PRECISE_LOCATION' | 'DEVICE_COARSE_LOCATION' | 'UPDATE';
type GoogleActionsV2UserUserVerificationStatus
type GoogleActionsV2UserUserVerificationStatus = 'UNKNOWN' | 'GUEST' | 'VERIFIED';
type GoogleCloudDialogflowV2IntentDefaultResponsePlatforms
type GoogleCloudDialogflowV2IntentDefaultResponsePlatforms = | 'PLATFORM_UNSPECIFIED' | 'FACEBOOK' | 'SLACK' | 'TELEGRAM' | 'KIK' | 'SKYPE' | 'LINE' | 'VIBER' | 'ACTIONS_ON_GOOGLE';
type GoogleCloudDialogflowV2IntentMessagePlatform
type GoogleCloudDialogflowV2IntentMessagePlatform = | 'PLATFORM_UNSPECIFIED' | 'FACEBOOK' | 'SLACK' | 'TELEGRAM' | 'KIK' | 'SKYPE' | 'LINE' | 'VIBER' | 'ACTIONS_ON_GOOGLE';
type GoogleCloudDialogflowV2IntentTrainingPhraseType
type GoogleCloudDialogflowV2IntentTrainingPhraseType = | 'TYPE_UNSPECIFIED' | 'EXAMPLE' | 'TEMPLATE';
type GoogleCloudDialogflowV2IntentWebhookState
type GoogleCloudDialogflowV2IntentWebhookState = | 'WEBHOOK_STATE_UNSPECIFIED' | 'WEBHOOK_STATE_ENABLED' | 'WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING';
type Intent
type Intent = | 'actions.intent.MAIN' | 'actions.intent.TEXT' | 'actions.intent.PERMISSION' | 'actions.intent.OPTION' | 'actions.intent.TRANSACTION_REQUIREMENTS_CHECK' | 'actions.intent.DELIVERY_ADDRESS' | 'actions.intent.TRANSACTION_DECISION' | 'actions.intent.CONFIRMATION' | 'actions.intent.DATETIME' | 'actions.intent.SIGN_IN' | 'actions.intent.NO_INPUT' | 'actions.intent.CANCEL' | 'actions.intent.NEW_SURFACE' | 'actions.intent.REGISTER_UPDATE' | 'actions.intent.CONFIGURE_UPDATES' | 'actions.intent.PLACE' | 'actions.intent.LINK' | 'actions.intent.MEDIA_STATUS' | 'actions.intent.COMPLETE_PURCHASE' | 'actions.intent.DIGITAL_PURCHASE_CHECK';
Modifiers
@public
type ListArgument
type ListArgument = OptionArgument;
Modifiers
@public
type MediaStatusArgument
type MediaStatusArgument = Api.GoogleActionsV2MediaStatus;
Modifiers
@public
type NewSurfaceArgument
type NewSurfaceArgument = Api.GoogleActionsV2NewSurfaceValue;
Modifiers
@public
type OptionArgument
type OptionArgument = string;
Modifiers
@public
type PermissionArgument
type PermissionArgument = boolean;
Modifiers
@public
type PlaceArgument
type PlaceArgument = Api.GoogleActionsV2Location | undefined;
Modifiers
@public
type RegisterUpdateArgument
type RegisterUpdateArgument = Api.GoogleActionsV2RegisterUpdateValue;
Modifiers
@public
type RepromptArgument
type RepromptArgument = string;
Modifiers
@public
type Response
type Response = | RichResponse | RichResponseItem | Image | Suggestions | MediaObject | Helper<Intent, JsonObject>;
Modifiers
@public
type RichResponseItem
type RichResponseItem = | string | SimpleResponse | BasicCard | Table | BrowseCarousel | MediaResponse | OrderUpdate | LinkOutSuggestion | HtmlResponse | Api.GoogleActionsV2RichResponseItem;
Modifiers
@public
type SignInArgument
type SignInArgument = Api.GoogleActionsV2SignInValue;
Modifiers
@public
type SmartHomeV1ExecuteErrors
type SmartHomeV1ExecuteErrors = string;
type SmartHomeV1ExecuteStatus
type SmartHomeV1ExecuteStatus = 'SUCCESS' | 'PENDING' | 'OFFLINE' | 'ERROR';
type SmartHomeV1Intents
type SmartHomeV1Intents = | 'action.devices.SYNC' | 'action.devices.QUERY' | 'action.devices.EXECUTE' | 'action.devices.DISCONNECT';
type SmartHomeV1Request
type SmartHomeV1Request = | SmartHomeV1SyncRequest | SmartHomeV1QueryRequest | SmartHomeV1ExecuteRequest | SmartHomeV1DisconnectRequest;
type SmartHomeV1Response
type SmartHomeV1Response = | SmartHomeV1SyncResponse | SmartHomeV1QueryResponse | SmartHomeV1ExecuteResponse | SmartHomeV1DisconnectResponse;
type SurfaceCapability
type SurfaceCapability = | 'actions.capability.AUDIO_OUTPUT' | 'actions.capability.SCREEN_OUTPUT' | 'actions.capability.MEDIA_RESPONSE_AUDIO' | 'actions.capability.WEB_BROWSER' | 'actions.capability.INTERACTIVE_CANVAS';
Modifiers
@public
type TransactionDecisionArgument
type TransactionDecisionArgument = | Api.GoogleActionsV2TransactionDecisionValue | Api.GoogleActionsTransactionsV3TransactionDecisionValue;
Modifiers
@public
type TransactionRequirementsArgument
type TransactionRequirementsArgument = | Api.GoogleActionsV2TransactionRequirementsCheckResult | Api.GoogleActionsTransactionsV3TransactionRequirementsCheckResult;
Modifiers
@public
type UpdatePermissionUserIdArgument
type UpdatePermissionUserIdArgument = string;
Modifiers
@public
Package Files (49)
- dist/assistant.d.ts
- dist/common.d.ts
- dist/framework/framework.d.ts
- dist/index.d.ts
- dist/service/actionssdk/actionssdk.d.ts
- dist/service/actionssdk/api/v2.d.ts
- dist/service/actionssdk/conv.d.ts
- dist/service/actionssdk/conversation/argument/argument.d.ts
- dist/service/actionssdk/conversation/argument/media.d.ts
- dist/service/actionssdk/conversation/argument/noinput.d.ts
- dist/service/actionssdk/conversation/conversation.d.ts
- dist/service/actionssdk/conversation/helper/confirmation.d.ts
- dist/service/actionssdk/conversation/helper/datetime.d.ts
- dist/service/actionssdk/conversation/helper/helper.d.ts
- dist/service/actionssdk/conversation/helper/newsurface.d.ts
- dist/service/actionssdk/conversation/helper/option/carousel.d.ts
- dist/service/actionssdk/conversation/helper/option/list.d.ts
- dist/service/actionssdk/conversation/helper/option/option.d.ts
- dist/service/actionssdk/conversation/helper/permission/permission.d.ts
- dist/service/actionssdk/conversation/helper/permission/update.d.ts
- dist/service/actionssdk/conversation/helper/place.d.ts
- dist/service/actionssdk/conversation/helper/registerupdate.d.ts
- dist/service/actionssdk/conversation/helper/signin.d.ts
- dist/service/actionssdk/conversation/helper/transaction/completepurchase.d.ts
- dist/service/actionssdk/conversation/helper/transaction/decision.d.ts
- dist/service/actionssdk/conversation/helper/transaction/deliveryaddress.d.ts
- dist/service/actionssdk/conversation/helper/transaction/digitalpurchasecheck.d.ts
- dist/service/actionssdk/conversation/helper/transaction/requirements.d.ts
- dist/service/actionssdk/conversation/response/browse.d.ts
- dist/service/actionssdk/conversation/response/card/basic.d.ts
- dist/service/actionssdk/conversation/response/card/button.d.ts
- dist/service/actionssdk/conversation/response/card/table.d.ts
- dist/service/actionssdk/conversation/response/html.d.ts
- dist/service/actionssdk/conversation/response/image.d.ts
- dist/service/actionssdk/conversation/response/linkout.d.ts
- dist/service/actionssdk/conversation/response/media.d.ts
- dist/service/actionssdk/conversation/response/order.d.ts
- dist/service/actionssdk/conversation/response/rich.d.ts
- dist/service/actionssdk/conversation/response/simple.d.ts
- dist/service/actionssdk/conversation/response/suggestion.d.ts
- dist/service/actionssdk/conversation/response/url.d.ts
- dist/service/actionssdk/conversation/surface.d.ts
- dist/service/dialogflow/api/v1.d.ts
- dist/service/dialogflow/api/v2.d.ts
- dist/service/dialogflow/context.d.ts
- dist/service/dialogflow/conv.d.ts
- dist/service/dialogflow/dialogflow.d.ts
- dist/service/smarthome/api/v1.d.ts
- dist/service/smarthome/smarthome.d.ts
Dependencies (8)
Dev Dependencies (11)
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/actions-on-google
.
- Markdown[![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/actions-on-google)
- HTML<a href="https://www.jsdocs.io/package/actions-on-google"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 11770 ms. - Missing or incorrect documentation? Open an issue for this package.