This repository has been archived by the owner on Aug 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 32
/
schema.ts
2906 lines (2773 loc) · 80.2 KB
/
schema.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/**
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// DO NOT MANUALLY EDIT: this file contains types generated from protobuf messages
/* tslint:disable:no-any max-line-length auto generated from protobufs */
/**
* Represents a request sent to a developer's fulfillment by Google.
*/
export interface HandlerRequest {
/**
* Optional. Information of current context of the request. Includes but isn't limited to
* active media session info or canvas info.
*/
context?: Context
/**
* Required. Info on the device the user is using to interact with the Action.
*/
device?: Device
/**
* Required. Information to fulfillment on how to handle the request. For example a request
* intending to get a fact might have a handler with a name of "getFact".
*/
handler?: Handler
/**
* Optional. Information related to the HomeGraph structure that the target device belongs
* to. See https://developers.google.com/actions/smarthome/concepts/homegraph.
*/
home?: Home
/**
* Required. Represents the last matched intent.
*/
intent?: Intent
/**
* Optional. Info on the current and next scene when the function was called. Will be filled
* when the fulfillment call is made within the scope of a scene.
*/
scene?: Scene
/**
* Required. Holds session data like the session id and session parameters.
*/
session?: Session
/**
* Required. User who initiated the conversation.
*/
user?: User
}
/**
* Optional. Information of current context of the request. Includes but isn't limited to
* active media session info or canvas info.
*
* Contains context information when user makes query. Such context includes but not limited
* to info about active media session, state of canvas web app, etc.
*/
export interface Context {
/**
* Contains context information about current canvas.
*/
canvas?: CanvasContext
/**
* Contains context information about current active media session.
*/
media?: MediaContext
}
/**
* Contains context information about current canvas.
*/
export interface CanvasContext {
/**
* Optional. State set by 3P Interactive Canvas app. This is only set for request, not for
* response. For example, if this is a recipe app, the state can be a value of struct : {
* "current_page" : 5, "last_page" : 3, } The size limit is 50KB.
*/
state?: any
}
/**
* Contains context information about current active media session.
*/
export interface MediaContext {
/**
* 0-based index of the current active media file in the list of media files in the media
* response.
*/
index?: number
/**
* Media progress of current active media file.
*/
progress?: string
}
/**
* Required. Info on the device the user is using to interact with the Action.
*
* Represents the device the user is using to make a request to the Action.
*
* Optional. Use to move between Assistant devices the user has access to.
*/
export interface Device {
/**
* Required. the capabilities of the device making a request to the Action.
*/
capabilities?: Capability[]
/**
* Optional. The device location of the user. Note, this is only populated after location
* permissions are granted by the end user. See the location message for more details on
* which fields are set depending on coarse vs. fine grained permission.
*/
currentLocation?: Location
/**
* Optional. Timezone associated with the request used to resolve datetime values. If not
* set, "UTC" is used.
*/
timeZone?: TimeZone
}
export enum Capability {
InteractiveCanvas = 'INTERACTIVE_CANVAS',
LongFormAudio = 'LONG_FORM_AUDIO',
RichResponse = 'RICH_RESPONSE',
Speech = 'SPEECH',
Unspecified = 'UNSPECIFIED',
WebLink = 'WEB_LINK',
HomeStorage = 'HOME_STORAGE',
}
/**
* Optional. The device location of the user. Note, this is only populated after location
* permissions are granted by the end user. See the location message for more details on
* which fields are set depending on coarse vs. fine grained permission.
*
* Container that represents a location.
*/
export interface Location {
/**
* Geo coordinates. Requires the [DEVICE_PRECISE_LOCATION] permission.
*/
coordinates?: LatLng
/**
* Postal address. Requires the [DEVICE_PRECISE_LOCATION] or [DEVICE_COARSE_LOCATION]
* permission. When the coarse location permission is granted, only the 'postal_code' and
* 'locality' fields are expected to be populated. Precise location permission will populate
* additional fields like 'administrative_area' and 'address_lines'.
*/
postalAddress?: PostalAddress
}
/**
* Optional. Timezone associated with the request used to resolve datetime values. If not
* set, "UTC" is used.
*
* Represents a time zone from the [IANA Time Zone
* Database](https://www.iana.org/time-zones).
*/
export interface TimeZone {
/**
* IANA Time Zone Database time zone, e.g. "America/New_York".
*/
id?: string
/**
* Optional. IANA Time Zone Database version number, e.g. "2019a".
*/
version?: string
}
/**
* Required. Information to fulfillment on how to handle the request. For example a request
* intending to get a fact might have a handler with a name of "getFact".
*
* Represents a fulfillment handler that maps event information from Actions on Google to
* fulfillment. Use the handler name to determine what code you should run in fulfillment.
* For instance, a handler might be used to get information on a user's order information
* with a handler name like "OrderLookup" while another might get product information from a
* database, with a handler name like "GetProductInfo".
*/
export interface Handler {
/**
* Optional. The name of the handler.
*/
name?: string
}
/**
* Optional. Information related to the HomeGraph structure that the target device belongs
* to. See https://developers.google.com/actions/smarthome/concepts/homegraph.
*
* Represents the HomeGraph structure that the user's target device belongs to.
*
* Optional. Used to specify parameters related to the HomeGraph structure that the target
* device belongs to. See https://developers.google.com/actions/smarthome/concepts/homegraph.
*/
export interface Home {
/**
* Optional. List of parameters associated with the HomeGraph structure the target device
* belongs to.
*/
params?: { [key: string]: any }
}
/**
* Required. Represents the last matched intent.
*
* Represents an intent.
*/
export interface Intent {
/**
* Required. The name of the last matched intent.
*/
name?: string
/**
* Required. Represents parameters identified as part of intent matching. This is a map of
* the name of the identified parameter to the value of the parameter identified from user
* input. All parameters defined in the matched intent that are identified will be surfaced
* here.
*/
params?: { [key: string]: IntentParameterValue }
/**
* Optional. Typed or spoken input from the end user that matched this intent. This will be
* populated when an intent is matched, based on the user input.
*/
query?: string
}
export interface IntentParameterValue {
/**
* Required. Original text value extracted from user utterance.
*/
original?: string
/**
* Required. Structured value for parameter extracted from user utterance.
* This will only be populated if the parameter is defined in the matched
* intent and the value of the parameter could be identified during intent
* matching.
*/
resolved?: any
}
/**
* Optional. Info on the current and next scene when the function was called. Will be filled
* when the fulfillment call is made within the scope of a scene.
*
* Represent a scene. Scenes can call fulfillment, add prompts, and collect slot values from
* the user. Scenes are triggered by events or intents and can trigger events and match
* intents to transition to other scenes.
*
* Optional. Represents the current and next scene. If `Scene.next` is set the runtime will
* immediately transition to the specified scene.
*/
export interface Scene {
/**
* Required. Name of the current scene.
*/
name?: string
/**
* Optional. Information on the scene to be executed next.
*/
next?: NextScene
/**
* Required. The current status of slot filling. This field is read-only.
*/
slotFillingStatus?: SlotFillingStatus
/**
* The slots associated with the current scene. Handler responses cannot return slots which
* were not sent in the request.
*/
slots?: { [key: string]: Slot }
}
export interface Slot {
/**
* The mode of the slot (required or optional). Settable by developer.
*/
mode?: SlotMode
/**
* Optional. This prompt is sent to the user when needed to fill a required
* slot. This prompt overrides the existing prompt defined in the console.
* This field is not included in the webhook request.
*/
prompt?: Prompt
/**
* The status of the slot.
*/
status?: SlotStatus
/**
* Indicates if the slot value was collected on the last turn.
* This field is read-only.
*/
updated?: boolean
/**
* The value of the slot. Changing this value in the response, will
* modify the value in slot filling.
*/
value?: any
}
export enum SlotMode {
ModeUnspecified = 'MODE_UNSPECIFIED',
Optional = 'OPTIONAL',
Required = 'REQUIRED',
}
export enum SlotStatus {
SlotUnspecified = 'SLOT_UNSPECIFIED',
Empty = 'EMPTY',
Invalid = 'INVALID',
Filled = 'FILLED',
}
/**
* Optional. Information on the scene to be executed next.
*
* Represents the scene to be executed next.
*/
export interface NextScene {
/**
* Name of the scene to be executed next.
*/
name?: string
}
/**
* Required. The current status of slot filling. This field is read-only.
*/
export enum SlotFillingStatus {
Collecting = 'COLLECTING',
Final = 'FINAL',
Initialized = 'INITIALIZED',
Unspecified = 'UNSPECIFIED',
}
/**
* Required. Holds session data like the session id and session parameters.
*
* Contains information on the current conversation session
*
* Optional. Describes data for the current session, session parameters can be created,
* updated, or removed by the fulfillment.
*/
export interface Session {
/**
* Required. Globally unique ID of the current conversation session. This field is read-only.
*/
id?: string
/**
* Language of the current conversation session. Follows IETF BCP-47 language code
* http://www.rfc-editor.org/rfc/bcp/bcp47.txt. This could be different from user locale if
* the action uses multi-language features. For example, when
* handler_response.expected.language_code is set, it changes the conversation language for
* all following turns, which will be reflected in this field.
*/
languageCode?: string
/**
* Required. List of all parameters collected from forms and intents during the session. Key
* is the parameter name. Parameters defined here will be merged with parameters already
* defined in the session. Parameters with a null value will be removed from the session.
*/
params?: { [key: string]: any }
/**
* Optional. Types scoped to the session. Session type defines can supplement or replace
* existing types. Type names must be unique.
*/
typeOverrides?: TypeOverride[]
}
/**
* Represents an override for a type.
*/
export interface TypeOverride {
/**
* Required. How this type should be merged with other type values.
*/
mode?: Mode
/**
* Required. Name of the type to supplement or override.
*/
name?: string
synonym?: SynonymType
}
/**
* Required. How this type should be merged with other type values.
*/
export enum Mode {
TypeMerge = 'TYPE_MERGE',
TypeReplace = 'TYPE_REPLACE',
TypeUnspecified = 'TYPE_UNSPECIFIED',
}
/**
* Represents a type with synonyms.
*/
export interface SynonymType {
/**
* Required. List of entries for the synonym type.
*/
entries?: Entry[]
}
/**
* Represents a entry for a synonym type.
*/
export interface Entry {
/**
* Optional. The item display's information.
*/
display?: EntryDisplay
/**
* Required. Name of the entry (e.g. "bicycle"). The entry in this field must be included in
* repeated synonyms field to be recogonized as a valid type value.
*/
name?: string
/**
* Required. List of synonyms for the entry (e.g. "bike", "cycle").
*/
synonyms?: string[]
}
/**
* Optional. The item display's information.
*/
export interface EntryDisplay {
/**
* Optional. Body text of the card.
*/
description?: string
/**
* Optional. Footer text for the browsing collection item, displayed below the description.
* Single line of text, truncated with an ellipsis.
*/
footer?: string
/**
* Optional. The image to display.
*/
image?: Image
/**
* URL of document associated with browsing carousel item. Required for browsing carousel.
*/
openUrl?: OpenURL
/**
* Required. Title of the 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.
*/
title?: string
}
/**
* Optional. The image to display.
*
* An image displayed in the card.
*
* A hero image for the card. The height is fixed to 192dp. Optional.
*
* Image for the collection item.
*
* An image.
*
* A small image icon displayed on the right from the title. It's resized to 36x36 dp.
*
* A large image, such as the cover of the album, etc.
*
* Image associated with the table. Optional.
*/
export interface Image {
/**
* A text description of the image to be used for accessibility, e.g. screen readers.
* Required.
*/
alt?: string
/**
* The height of the image in pixels. Optional.
*/
height?: number
/**
* 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.
*/
url?: string
/**
* The width of the image in pixels. Optional.
*/
width?: number
}
/**
* URL of document associated with browsing carousel item. Required for browsing carousel.
*
* What happens when a user opens the link
*
* Required. URI to open if the item selected.
*/
export interface OpenURL {
/**
* Indicates a hint for the url type.
*/
hint?: Hint
/**
* The url field which could be any of: - http/https urls for opening an App-linked App or a
* webpage
*/
url?: string
}
/**
* Indicates a hint for the url type.
*/
export enum Hint {
Amp = 'AMP',
LinkUnspecified = 'LINK_UNSPECIFIED',
}
/**
* Required. User who initiated the conversation.
*
* Represents the user making a request to the Action.
*
* Optional. Use to specify user parameters to send back.
*/
export interface User {
/**
* Whether the user account is linked to the app.
*/
accountLinkingStatus?: AccountLinkingStatus
/**
* The engagement of the current user including any subscriptions to intents.
*/
engagement?: Engagement
/**
* The timestamp of the last interaction with this user. This field will be omitted if the
* user has not interacted with the agent before.
*/
lastSeenTime?: 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.
*/
locale?: string
/**
* User's entitlements related to the Android package associated with the current action.
*/
packageEntitlements?: PackageEntitlements[]
/**
* Optional. List of all parameters associated with the current user.
*/
params?: { [key: string]: any }
/**
* Contains permissions granted by user to this Action.
*/
permissions?: Permission[]
/**
* Indicates the verification status of the user.
*/
verificationStatus?: VerificationStatus
}
/**
* Whether the user account is linked to the app.
*/
export enum AccountLinkingStatus {
AccountLinkingStatusUnspecified = 'ACCOUNT_LINKING_STATUS_UNSPECIFIED',
Linked = 'LINKED',
NotLinked = 'NOT_LINKED',
}
/**
* The engagement of the current user including any subscriptions to intents.
*
* Provides additional read-only information about what engagement mechanisms the current
* user has registered for. For example, it can be useful to know what intents the user is
* already subscribed to in order to avoid asking them to subscribe to the same intent
* again. i.e. This information can be used to conditionally route to a scene to set up
* DailyUpdates or PushNotifications only if the user has not subscribed already.
*/
export interface Engagement {
/**
* Contains a list of intents which the user has enabled daily update for.
*/
dailyUpdateIntents?: IntentSubscription[]
/**
* Contains a list of intents which the user has enabled push notification for.
*/
pushNotificationIntents?: IntentSubscription[]
}
/**
* Describes an existing IntentSubscription.
*/
export interface IntentSubscription {
/**
* A short description of the subscription. It is used as the notification's label and when
* Assistant is requesting permission from the user.
*/
contentTitle?: string
/**
* Name of the intent which is subscribed to.
*/
intent?: string
}
/**
* A List of user's entitlements related to a package name.
*/
export interface PackageEntitlements {
/**
* The user's entitlements for the given package.
*/
entitlements?: Entitlement[]
/**
* The Android package name specified in the action package.
*/
packageName?: string
}
/**
* Defines a user's digital entitlement.
*/
export interface Entitlement {
/**
* Only present for in-app purchase and in-app subs.
*/
inAppDetails?: SignedData
/**
* 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.
*/
sku?: string
/**
* The type of SKU.
*/
skuType?: SkuType
}
/**
* Only present for in-app purchase and in-app subs.
*/
export interface SignedData {
/**
* Matches IN_APP_DATA_SIGNATURE from getPurchases() method in Play InApp Billing API.
*/
inAppDataSignature?: string
/**
* Contains all inapp purchase data in JSON format. See details in table 6 of
* https://developer.android.com/google/play/billing/billing_reference.html.
*/
inAppPurchaseData?: { [key: string]: any }
}
/**
* The type of SKU.
*/
export enum SkuType {
App = 'APP',
InApp = 'IN_APP',
SkuTypeUnspecified = 'SKU_TYPE_UNSPECIFIED',
Subscription = 'SUBSCRIPTION',
}
export enum Permission {
DeviceCoarseLocation = 'DEVICE_COARSE_LOCATION',
DevicePreciseLocation = 'DEVICE_PRECISE_LOCATION',
PermissionUnspecified = 'PERMISSION_UNSPECIFIED',
Update = 'UPDATE',
}
/**
* Indicates the verification status of the user.
*/
export enum VerificationStatus {
Guest = 'GUEST',
UserVerificationStatusUnspecified = 'USER_VERIFICATION_STATUS_UNSPECIFIED',
Verified = 'VERIFIED',
}
/**
* Represents a response sent from a developer's fulfillment to Actions on Google.
*/
export interface HandlerResponse {
/**
* Optional. Use to move between Assistant devices the user has access to.
*/
device?: Device
/**
* Optional. Describes the expectations for the next dialog turn.
*/
expected?: Expected
/**
* Optional. Used to specify parameters related to the HomeGraph structure that the target
* device belongs to. See https://developers.google.com/actions/smarthome/concepts/homegraph.
*/
home?: Home
/**
* Optional. Represents the prompts to be sent to the user, these prompts will be appended
* to previously added messages unless explicitly overwritten.
*/
prompt?: Prompt
/**
* Optional. Represents the current and next scene. If `Scene.next` is set the runtime will
* immediately transition to the specified scene.
*/
scene?: Scene
/**
* Optional. Describes data for the current session, session parameters can be created,
* updated, or removed by the fulfillment.
*/
session?: Session
/**
* Optional. Use to specify user parameters to send back.
*/
user?: User
}
/**
* Optional. Describes the expectations for the next dialog turn.
*
* Describes the expectations for the next dialog turn.
*/
export interface Expected {
/**
* Expected language (in BCP-47 format) of user's next input.
* For a list of supported languages, see
* https://developers.google.com/assistant/console/languages-locales
*/
languageCode?: string
/**
* List of phrases the Action expects from the user's utterance for speech biasing. Up to
* 1000 phrases are allowed. Note: This field has the same meaning as
* ExpectedInput.speech_biasing_hints in the v2 API.
*/
speech?: string[]
}
/**
* Optional. Represents the prompts to be sent to the user, these prompts will be appended
* to previously added messages unless explicitly overwritten.
*
* Represent a response to a user.
*/
export interface Prompt {
/**
* Optional. Represents a Interactive Canvas response to be sent to the user.
*/
canvas?: Canvas
/**
* Optional. A content like a card, list or media to display to the user.
*/
content?: Content
/**
* Optional. The first voice and text-only response.
*/
firstSimple?: Simple
/**
* Optional. The last voice and text-only response.
*/
lastSimple?: Simple
/**
* Optional. An additional suggestion chip that can link out to the associated app or site.
* The chip will be rendered with the title "Open ". Max 20 chars.
*/
link?: Link
/**
* Optional Action responds with an OrderUpdate after receiving the order during the
* transactions flow. On receipt of this, Google records this update to the order, and if
* successful, displays a receipt card along with the TTS sent on display devices.
*/
orderUpdate?: OrderUpdate
/**
* Optional. Mode for how this messages should be merged with previously defined messages.
* "true" clears all previously defined messages (first and last simple, content,
* suggestions link and canvas) and adds messages defined in this prompt. "false" adds
* messages defined in this prompt to messages defined in previous responses. Leaving this
* field to "false" also enables appending to some fields inside Simple prompts, the
* Suggestions prompt, and the Canvas prompt (part of the Content prompt). The Content and
* Link messages are always overwritten if defined in the prompt. Default value is "false".
*/
override?: boolean
/**
* Optional. Suggestions to be displayed to the user which will always appear at the end of
* the response. If the "override" field in the containing prompt is "false", the titles
* defined in this field will be added to titles defined in any previously defined
* suggestions prompts and duplicate values will be removed.
*/
suggestions?: Suggestion[]
}
/**
* Optional. Represents a Interactive Canvas response to be sent to the user.
*
* Represents an Interactive Canvas response to be sent to the user. This can be used in
* conjunction with the "first_simple" field in the containing prompt to speak to the user
* in addition to displaying a interactive canvas response. The maximum size of the response
* is 50k bytes.
*
* A response to be used for interactive canvas experience.
*/
export interface Canvas {
/**
* Optional. JSON data to be passed through to the immersive experience web page as an
* event. If the "override" field in the containing prompt is "false" data values defined in
* this Canvas prompt will be added after data values defined in previous Canvas prompts.
*/
data?: any[]
/**
* If `true` the canvas application occupies the full screen and won't
* have a header at the top. A toast message will also be displayed on the
* loading screen that includes the Action's display name, the developer's
* name, and instructions for exiting the Action. Default value: `false`.
*/
enableFullScreen?: boolean
/**
* If `true`, screen taps will not stop TTS for the entire canvas session.
* Default value: `false`.
*/
continueTtsDuringTouch?: boolean
/**
* Optional. Default value: false.
*/
suppressMic?: boolean
/**
* URL of the interactive canvas web app to load. If not set, the url from current active
* canvas will be reused.
*/
url?: string
}
/**
* Optional. A content like a card, list or media to display to the user.
*/
export interface Content {
/**
* A basic card.
*/
card?: Card
/**
* A card presenting a collection of options to select from.
*/
collection?: Collection
/**
* A card presenting a collection of web pages to open.
*/
collectionBrowse?: CollectionBrowse
/**
* An image.
*/
image?: Image
/**
* A card presenting a list of options to select from.
*/
list?: List
/**
* Response indicating a set of media to be played.
*/
media?: Media
/**
* Table card.
*/
table?: Table
}
/**
* A basic card.
*
* A basic card for displaying some information, e.g. an image and/or text.
*/
export interface Card {
/**
* Button. Optional.
*/
button?: Link
/**
* A hero image for the card. The height is fixed to 192dp. Optional.
*/
image?: Image
/**
* How the image background will be filled. Optional.
*/
imageFill?: ImageFill
/**
* Optional.
*/
subtitle?: string
/**
* Body text of the card. Supports a limited set of markdown syntax for formatting.
* Required, unless image is present.
*/
text?: string
/**
* Overall title of the card. Optional.
*/
title?: string
}
/**
* Button. Optional.
*
* Button.
*
* Optional. An additional suggestion chip that can link out to the associated app or site.
* The chip will be rendered with the title "Open ". Max 20 chars.
*/
export interface Link {
/**
* Name of the link
*/
name?: string
/**
* What happens when a user opens the link
*/
open?: OpenURL
}
/**
* How the image background will be filled. Optional.
*
* How the image backgrounds of collection items will be filled. Optional.
*
* Type of image display option.
*/
export enum ImageFill {
Cropped = 'CROPPED',
Gray = 'GRAY',
Unspecified = 'UNSPECIFIED',
White = 'WHITE',
}
/**
* A card presenting a collection of options to select from.
*
* A card for presenting a collection of options to select from.
*/
export interface Collection {
/**
* How the image backgrounds of collection items will be filled. Optional.
*/
imageFill?: ImageFill
/**
* min: 2 max: 10
*/
items?: CollectionItem[]
/**
* Subtitle of the collection. Optional.
*/
subtitle?: string
/**
* Title of the collection. Optional.
*/
title?: string
}
/**
* An item in the collection
*/
export interface CollectionItem {
/**
* Required. The NLU key that matches the entry key name in the associated Type.
*/
key?: string
}
/**
* A card presenting a collection of web pages to open.
*
* Presents a set of web documents as a collection of large-tile items. Items may be
* selected to launch their associated web document in a web viewer.
*/
export interface CollectionBrowse {
/**
* Type of image display option.
*/
imageFill?: ImageFill
/**
* Min: 2. Max: 10.
*/
items?: CollectionBrowseItem[]
}
/**
* Item in the collection.
*/
export interface CollectionBrowseItem {
/**
* Description of the collection item.
*/
description?: string
/**