UNPKG

8.05 kBTypeScriptView Raw
1/**
2 * Copyright 2018 Google Inc. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16import { ApiClientObjectMap } from '../../../common';
17export declare type GoogleCloudDialogflowV2IntentDefaultResponsePlatforms = 'PLATFORM_UNSPECIFIED' | 'FACEBOOK' | 'SLACK' | 'TELEGRAM' | 'KIK' | 'SKYPE' | 'LINE' | 'VIBER' | 'ACTIONS_ON_GOOGLE';
18export declare type GoogleCloudDialogflowV2IntentMessagePlatform = 'PLATFORM_UNSPECIFIED' | 'FACEBOOK' | 'SLACK' | 'TELEGRAM' | 'KIK' | 'SKYPE' | 'LINE' | 'VIBER' | 'ACTIONS_ON_GOOGLE';
19export declare type GoogleCloudDialogflowV2IntentTrainingPhraseType = 'TYPE_UNSPECIFIED' | 'EXAMPLE' | 'TEMPLATE';
20export declare type GoogleCloudDialogflowV2IntentWebhookState = 'WEBHOOK_STATE_UNSPECIFIED' | 'WEBHOOK_STATE_ENABLED' | 'WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING';
21export interface GoogleCloudDialogflowV2Context {
22 name?: string;
23 lifespanCount?: number;
24 parameters?: ApiClientObjectMap<any>;
25}
26export interface GoogleCloudDialogflowV2EventInput {
27 name?: string;
28 parameters?: ApiClientObjectMap<any>;
29 languageCode?: string;
30}
31export interface GoogleCloudDialogflowV2Intent {
32 name?: string;
33 displayName?: string;
34 webhookState?: GoogleCloudDialogflowV2IntentWebhookState;
35 priority?: number;
36 isFallback?: boolean;
37 mlDisabled?: boolean;
38 inputContextNames?: string[];
39 events?: string[];
40 trainingPhrases?: GoogleCloudDialogflowV2IntentTrainingPhrase[];
41 action?: string;
42 outputContexts?: GoogleCloudDialogflowV2Context[];
43 resetContexts?: boolean;
44 parameters?: GoogleCloudDialogflowV2IntentParameter[];
45 messages?: GoogleCloudDialogflowV2IntentMessage[];
46 defaultResponsePlatforms?: GoogleCloudDialogflowV2IntentDefaultResponsePlatforms[];
47 rootFollowupIntentName?: string;
48 parentFollowupIntentName?: string;
49 followupIntentInfo?: GoogleCloudDialogflowV2IntentFollowupIntentInfo[];
50}
51export interface GoogleCloudDialogflowV2IntentFollowupIntentInfo {
52 followupIntentName?: string;
53 parentFollowupIntentName?: string;
54}
55export interface GoogleCloudDialogflowV2IntentMessage {
56 text?: GoogleCloudDialogflowV2IntentMessageText;
57 image?: GoogleCloudDialogflowV2IntentMessageImage;
58 quickReplies?: GoogleCloudDialogflowV2IntentMessageQuickReplies;
59 card?: GoogleCloudDialogflowV2IntentMessageCard;
60 payload?: ApiClientObjectMap<any>;
61 simpleResponses?: GoogleCloudDialogflowV2IntentMessageSimpleResponses;
62 basicCard?: GoogleCloudDialogflowV2IntentMessageBasicCard;
63 suggestions?: GoogleCloudDialogflowV2IntentMessageSuggestions;
64 linkOutSuggestion?: GoogleCloudDialogflowV2IntentMessageLinkOutSuggestion;
65 listSelect?: GoogleCloudDialogflowV2IntentMessageListSelect;
66 carouselSelect?: GoogleCloudDialogflowV2IntentMessageCarouselSelect;
67 platform?: GoogleCloudDialogflowV2IntentMessagePlatform;
68}
69export interface GoogleCloudDialogflowV2IntentMessageBasicCard {
70 title?: string;
71 subtitle?: string;
72 formattedText?: string;
73 image?: GoogleCloudDialogflowV2IntentMessageImage;
74 buttons?: GoogleCloudDialogflowV2IntentMessageBasicCardButton[];
75}
76export interface GoogleCloudDialogflowV2IntentMessageBasicCardButton {
77 title?: string;
78 openUriAction?: GoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction;
79}
80export interface GoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction {
81 uri?: string;
82}
83export interface GoogleCloudDialogflowV2IntentMessageCard {
84 title?: string;
85 subtitle?: string;
86 imageUri?: string;
87 buttons?: GoogleCloudDialogflowV2IntentMessageCardButton[];
88}
89export interface GoogleCloudDialogflowV2IntentMessageCardButton {
90 text?: string;
91 postback?: string;
92}
93export interface GoogleCloudDialogflowV2IntentMessageCarouselSelect {
94 items?: GoogleCloudDialogflowV2IntentMessageCarouselSelectItem[];
95}
96export interface GoogleCloudDialogflowV2IntentMessageCarouselSelectItem {
97 info?: GoogleCloudDialogflowV2IntentMessageSelectItemInfo;
98 title?: string;
99 description?: string;
100 image?: GoogleCloudDialogflowV2IntentMessageImage;
101}
102export interface GoogleCloudDialogflowV2IntentMessageImage {
103 imageUri?: string;
104 accessibilityText?: string;
105}
106export interface GoogleCloudDialogflowV2IntentMessageLinkOutSuggestion {
107 destinationName?: string;
108 uri?: string;
109}
110export interface GoogleCloudDialogflowV2IntentMessageListSelect {
111 title?: string;
112 items?: GoogleCloudDialogflowV2IntentMessageListSelectItem[];
113}
114export interface GoogleCloudDialogflowV2IntentMessageListSelectItem {
115 info?: GoogleCloudDialogflowV2IntentMessageSelectItemInfo;
116 title?: string;
117 description?: string;
118 image?: GoogleCloudDialogflowV2IntentMessageImage;
119}
120export interface GoogleCloudDialogflowV2IntentMessageQuickReplies {
121 title?: string;
122 quickReplies?: string[];
123}
124export interface GoogleCloudDialogflowV2IntentMessageSelectItemInfo {
125 key?: string;
126 synonyms?: string[];
127}
128export interface GoogleCloudDialogflowV2IntentMessageSimpleResponse {
129 textToSpeech?: string;
130 ssml?: string;
131 displayText?: string;
132}
133export interface GoogleCloudDialogflowV2IntentMessageSimpleResponses {
134 simpleResponses?: GoogleCloudDialogflowV2IntentMessageSimpleResponse[];
135}
136export interface GoogleCloudDialogflowV2IntentMessageSuggestion {
137 title?: string;
138}
139export interface GoogleCloudDialogflowV2IntentMessageSuggestions {
140 suggestions?: GoogleCloudDialogflowV2IntentMessageSuggestion[];
141}
142export interface GoogleCloudDialogflowV2IntentMessageText {
143 text?: string[];
144}
145export interface GoogleCloudDialogflowV2IntentParameter {
146 name?: string;
147 displayName?: string;
148 value?: string;
149 defaultValue?: string;
150 entityTypeDisplayName?: string;
151 mandatory?: boolean;
152 prompts?: string[];
153 isList?: boolean;
154}
155export interface GoogleCloudDialogflowV2IntentTrainingPhrase {
156 name?: string;
157 type?: GoogleCloudDialogflowV2IntentTrainingPhraseType;
158 parts?: GoogleCloudDialogflowV2IntentTrainingPhrasePart[];
159 timesAddedCount?: number;
160}
161export interface GoogleCloudDialogflowV2IntentTrainingPhrasePart {
162 text?: string;
163 entityType?: string;
164 alias?: string;
165 userDefined?: boolean;
166}
167export interface GoogleCloudDialogflowV2OriginalDetectIntentRequest {
168 source?: string;
169 payload?: ApiClientObjectMap<any>;
170}
171export interface GoogleCloudDialogflowV2QueryResult {
172 queryText?: string;
173 languageCode?: string;
174 speechRecognitionConfidence?: number;
175 action?: string;
176 parameters?: ApiClientObjectMap<any>;
177 allRequiredParamsPresent?: boolean;
178 fulfillmentText?: string;
179 fulfillmentMessages?: GoogleCloudDialogflowV2IntentMessage[];
180 webhookSource?: string;
181 webhookPayload?: ApiClientObjectMap<any>;
182 outputContexts?: GoogleCloudDialogflowV2Context[];
183 intent?: GoogleCloudDialogflowV2Intent;
184 intentDetectionConfidence?: number;
185 diagnosticInfo?: ApiClientObjectMap<any>;
186}
187export interface GoogleCloudDialogflowV2WebhookRequest {
188 session?: string;
189 responseId?: string;
190 queryResult?: GoogleCloudDialogflowV2QueryResult;
191 originalDetectIntentRequest?: GoogleCloudDialogflowV2OriginalDetectIntentRequest;
192}
193export interface GoogleCloudDialogflowV2WebhookResponse {
194 fulfillmentText?: string;
195 fulfillmentMessages?: GoogleCloudDialogflowV2IntentMessage[];
196 source?: string;
197 payload?: ApiClientObjectMap<any>;
198 outputContexts?: GoogleCloudDialogflowV2Context[];
199 followupEventInput?: GoogleCloudDialogflowV2EventInput;
200}