-
Notifications
You must be signed in to change notification settings - Fork 5
/
conversation.json
2413 lines (2413 loc) · 95.2 KB
/
conversation.json
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
{
"$schema": "http://json-schema.org/draft-06/schema#",
"$id": "https://raw.githubusercontent.com/actions-on-google/assistant-conversation-schema/master/conversation.json#",
"title": "Actions SDK Fulfillment Conversational V3 Schema",
"definitions": {
"HandlerRequest": {
"description": "Represents a request sent to a developer's fulfillment by Google.",
"type": "object",
"properties": {
"handler": {
"description": "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\".",
"$ref": "#/definitions/Handler"
},
"intent": {
"description": "Required. Represents the last matched intent.",
"$ref": "#/definitions/Intent"
},
"scene": {
"description": "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.",
"$ref": "#/definitions/Scene"
},
"session": {
"description": "Required. Holds session data like the session id and session parameters.",
"$ref": "#/definitions/Session"
},
"user": {
"description": "Required. User who initiated the conversation.",
"$ref": "#/definitions/User"
},
"home": {
"description": "Optional. Information related to the HomeGraph structure that the target device belongs to. See https://developers.google.com/actions/smarthome/concepts/homegraph.",
"$ref": "#/definitions/Home"
},
"device": {
"description": "Required. Info on the device the user is using to interact with the Action.",
"$ref": "#/definitions/Device"
},
"context": {
"description": "Optional. Information of current context of the request. Includes but isn't limited to active media session info or canvas info.",
"$ref": "#/definitions/Context"
}
}
},
"Handler": {
"description": "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\".",
"type": "object",
"properties": {
"name": {
"description": "Optional. The name of the handler.",
"type": "string"
}
}
},
"Intent": {
"description": "Represents an intent.",
"type": "object",
"properties": {
"name": {
"description": "Required. The name of the last matched intent.",
"type": "string"
},
"params": {
"description": "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.",
"type": "object"
},
"query": {
"description": "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.",
"type": "string"
}
}
},
"IntentParameterValue": {
"description": "Represents a value for intent parameter.",
"type": "object",
"properties": {
"original": {
"description": "Required. Original text value extracted from user utterance.",
"type": "string"
},
"resolved": {
"description": "Required. Structured value for parameter extracted from user input. 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."
}
}
},
"Scene": {
"description": "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.",
"type": "object",
"properties": {
"name": {
"description": "Required. Name of the current scene.",
"type": "string"
},
"slotFillingStatus": {
"description": "Required. The current status of slot filling. This field is read-only.",
"type": "string",
"enum": [
"UNSPECIFIED",
"INITIALIZED",
"COLLECTING",
"FINALIZING",
"FINAL"
]
},
"slots": {
"description": "The slots associated with the current scene. Handler responses cannot return slots which were not sent in the request.",
"type": "object"
},
"next": {
"description": "Optional. Information on the scene to be executed next.",
"$ref": "#/definitions/NextScene"
}
}
},
"Slot": {
"description": "Represents a slot.",
"type": "object",
"properties": {
"mode": {
"description": "The mode of the slot (required or optional). Can be set by developer.",
"type": "string",
"enum": [
"MODE_UNSPECIFIED",
"OPTIONAL",
"REQUIRED"
]
},
"status": {
"description": "The status of the slot.",
"type": "string",
"enum": [
"SLOT_UNSPECIFIED",
"EMPTY",
"INVALID",
"FILLED"
]
},
"value": {
"description": "The value of the slot. Changing this value in the response, will modify the value in slot filling."
},
"updated": {
"description": "Indicates if the slot value was collected on the last turn. This field is read-only.",
"type": "boolean"
},
"prompt": {
"description": "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.",
"$ref": "#/definitions/Prompt"
}
}
},
"Prompt": {
"description": "Represent a response to a user.",
"type": "object",
"properties": {
"override": {
"description": "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\".",
"type": "boolean"
},
"firstSimple": {
"description": "Optional. The first voice and text-only response.",
"$ref": "#/definitions/Simple"
},
"content": {
"description": "Optional. A content like a card, list or media to display to the user.",
"$ref": "#/definitions/Content"
},
"lastSimple": {
"description": "Optional. The last voice and text-only response.",
"$ref": "#/definitions/Simple"
},
"suggestions": {
"description": "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.",
"type": "array",
"items": {
"$ref": "#/definitions/Suggestion"
}
},
"link": {
"description": "Optional. An additional suggestion chip that can link out to the associated app or site. The chip will be rendered with the title \"Open <name>\". Max 20 chars.",
"$ref": "#/definitions/Link"
},
"canvas": {
"description": "Optional. Represents a Interactive Canvas response to be sent to the user.",
"$ref": "#/definitions/Canvas"
},
"orderUpdate": {
"description": "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.",
"$ref": "#/definitions/OrderUpdate"
}
}
},
"Simple": {
"description": "Represents a simple prompt to be send to a user.",
"type": "object",
"properties": {
"speech": {
"description": "Optional. Represents the speech to be spoken to the user. Can be SSML or text to speech. If the \"override\" field in the containing prompt is \"true\", the speech defined in this field replaces the previous Simple prompt's speech.",
"type": "string"
},
"text": {
"description": "Optional text to display in the chat bubble. If not given, a display rendering of the speech field above will be used. Limited to 640 chars. If the \"override\" field in the containing prompt is \"true\", the text defined in this field replaces to the previous Simple prompt's text.",
"type": "string"
}
}
},
"Content": {
"type": "object",
"properties": {
"card": {
"description": "A basic card.",
"$ref": "#/definitions/Card"
},
"image": {
"description": "An image.",
"$ref": "#/definitions/Image"
},
"table": {
"description": "Table card.",
"$ref": "#/definitions/Table"
},
"media": {
"description": "Response indicating a set of media to be played.",
"$ref": "#/definitions/Media"
},
"collection": {
"description": "A card presenting a collection of options to select from.",
"$ref": "#/definitions/Collection"
},
"list": {
"description": "A card presenting a list of options to select from.",
"$ref": "#/definitions/List"
}
}
},
"Card": {
"description": "A basic card for displaying some information, e.g. an image and/or text.",
"type": "object",
"properties": {
"title": {
"description": "Overall title of the card. Optional.",
"type": "string"
},
"subtitle": {
"description": "Optional.",
"type": "string"
},
"text": {
"description": "Body text of the card. Supports a limited set of markdown syntax for formatting. Required, unless image is present.",
"type": "string"
},
"image": {
"description": "A hero image for the card. The height is fixed to 192dp. Optional.",
"$ref": "#/definitions/Image"
},
"imageFill": {
"description": "How the image background will be filled. Optional.",
"type": "string",
"enum": [
"UNSPECIFIED",
"GRAY",
"WHITE",
"CROPPED"
]
},
"button": {
"description": "Button. Optional.",
"$ref": "#/definitions/Link"
}
}
},
"Image": {
"description": "An image displayed in the card.",
"type": "object",
"properties": {
"url": {
"description": "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.",
"type": "string"
},
"alt": {
"description": "A text description of the image to be used for accessibility, e.g. screen readers. Required.",
"type": "string"
},
"height": {
"description": "The height of the image in pixels. Optional.",
"type": "integer",
"format": "int32"
},
"width": {
"description": "The width of the image in pixels. Optional.",
"type": "integer",
"format": "int32"
}
}
},
"Link": {
"type": "object",
"properties": {
"name": {
"description": "Name of the link",
"type": "string"
},
"open": {
"description": "What happens when a user opens the link",
"$ref": "#/definitions/OpenUrl"
}
}
},
"OpenUrl": {
"type": "object",
"properties": {
"url": {
"description": "The url field which could be any of: - http/https urls for opening an App-linked App or a webpage",
"type": "string"
},
"hint": {
"description": "Indicates a hint for the url type.",
"type": "string",
"enum": [
"LINK_UNSPECIFIED",
"AMP"
]
}
}
},
"Table": {
"description": "A table card for displaying a table of text.",
"type": "object",
"properties": {
"title": {
"description": "Overall title of the table. Optional but must be set if subtitle is set.",
"type": "string"
},
"subtitle": {
"description": "Subtitle for the table. Optional.",
"type": "string"
},
"image": {
"description": "Image associated with the table. Optional.",
"$ref": "#/definitions/Image"
},
"columns": {
"description": "Headers and alignment of columns.",
"type": "array",
"items": {
"$ref": "#/definitions/TableColumn"
}
},
"rows": {
"description": "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.",
"type": "array",
"items": {
"$ref": "#/definitions/TableRow"
}
},
"button": {
"description": "Button.",
"$ref": "#/definitions/Link"
}
}
},
"TableColumn": {
"type": "object",
"properties": {
"header": {
"description": "Header text for the column.",
"type": "string"
},
"align": {
"description": "Horizontal alignment of content w.r.t column. If unspecified, content will be aligned to the leading edge.",
"type": "string",
"enum": [
"UNSPECIFIED",
"LEADING",
"CENTER",
"TRAILING"
]
}
}
},
"TableRow": {
"description": "Describes a row in the table.",
"type": "object",
"properties": {
"cells": {
"description": "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.",
"type": "array",
"items": {
"$ref": "#/definitions/TableCell"
}
},
"divider": {
"description": "Indicates whether there should be a divider after each row.",
"type": "boolean"
}
}
},
"TableCell": {
"description": "Describes a cell in a row.",
"type": "object",
"properties": {
"text": {
"description": "Text content of the cell.",
"type": "string"
}
}
},
"Media": {
"description": "Represents one media object. Contains information about the media, such as name, description, url, etc.",
"type": "object",
"properties": {
"mediaType": {
"type": "string",
"enum": [
"MEDIA_TYPE_UNSPECIFIED",
"AUDIO",
"MEDIA_STATUS_ACK"
]
},
"startOffset": {
"description": "Start offset of the first media object.",
"type": "string",
"format": "google-duration"
},
"optionalMediaControls": {
"description": "Optional media control types this media response session can support. If set, request will be made to 3p when a certain media event happens. If not set, 3p must still handle two default control type, FINISHED and FAILED.",
"type": "array",
"items": {
"type": "string",
"enum": [
"OPTIONAL_MEDIA_CONTROLS_UNSPECIFIED",
"PAUSED",
"STOPPED"
]
}
},
"mediaObjects": {
"description": "List of Media Objects",
"type": "array",
"items": {
"$ref": "#/definitions/MediaObject"
}
},
"repeatMode": {
"description": "Repeat mode for the list of Media Objects.",
"type": "string",
"enum": [
"REPEAT_MODE_UNSPECIFIED",
"OFF",
"ALL"
]
},
"firstMediaObjectIndex": {
"description": "0-based index of the first Media Object in media_objects to play. If unspecified, zero or out-of-bounds, playback starts at the first media object in media_objects.",
"type": "integer",
"format": "int32"
}
}
},
"MediaObject": {
"description": "Represents a single media object",
"type": "object",
"properties": {
"name": {
"description": "Name of this media object.",
"type": "string"
},
"description": {
"description": "Description of this media object.",
"type": "string"
},
"url": {
"description": "The url pointing to the media content.",
"type": "string"
},
"image": {
"description": "Image to show with the media card.",
"$ref": "#/definitions/MediaImage"
}
}
},
"MediaImage": {
"type": "object",
"properties": {
"large": {
"description": "A large image, such as the cover of the album, etc.",
"$ref": "#/definitions/Image"
},
"icon": {
"description": "A small image icon displayed on the right from the title. It's resized to 36x36 dp.",
"$ref": "#/definitions/Image"
}
}
},
"Collection": {
"description": "A card for presenting a collection of options to select from.",
"type": "object",
"properties": {
"title": {
"description": "Title of the collection. Optional.",
"type": "string"
},
"subtitle": {
"description": "Subtitle of the collection. Optional.",
"type": "string"
},
"items": {
"description": "min: 2 max: 10",
"type": "array",
"items": {
"$ref": "#/definitions/CollectionItem"
}
},
"imageFill": {
"description": "How the image backgrounds of collection items will be filled. Optional.",
"type": "string",
"enum": [
"UNSPECIFIED",
"GRAY",
"WHITE",
"CROPPED"
]
}
}
},
"CollectionItem": {
"description": "An item in the collection",
"type": "object",
"properties": {
"key": {
"description": "Required. The NLU key that matches the entry key name in the associated Type.",
"type": "string"
}
}
},
"List": {
"description": "A card for presenting a list of options to select from.",
"type": "object",
"properties": {
"title": {
"description": "Title of the list. Optional.",
"type": "string"
},
"subtitle": {
"description": "Subtitle of the list. Optional.",
"type": "string"
},
"items": {
"description": "min: 2 max: 30",
"type": "array",
"items": {
"$ref": "#/definitions/ListItem"
}
}
}
},
"ListItem": {
"description": "An item in the list",
"type": "object",
"properties": {
"key": {
"description": "Required. The NLU key that matches the entry key name in the associated Type.",
"type": "string"
}
}
},
"Suggestion": {
"type": "object",
"properties": {
"title": {
"description": "Required. The text shown 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",
"type": "string"
}
}
},
"Canvas": {
"description": "Represents an Interactive Canvas response to be sent to the user.\nThis can be used in conjunction with the \"first_simple\" field in the\ncontaining prompt to speak to the user in addition to displaying a\ninteractive canvas response. The maximum size of the response is 50k bytes.",
"type": "object",
"properties": {
"url": {
"description": "URL of the interactive canvas web app to load. If not set, the url from\ncurrent active canvas will be reused.",
"type": "string"
},
"data": {
"description": "Optional. JSON data to be passed through to the immersive experience\nweb page as an event.\nIf the \"override\" field in the containing prompt is \"false\" data values\ndefined in this Canvas prompt will be added after data values defined in\nprevious Canvas prompts.",
"type": "array"
},
"suppressMic": {
"description": "Optional. Default value: false.",
"type": "boolean"
},
"enableFullScreen": {
"description": "If true the canvas application will occupy the full screen and not have a header at the top. Default value: false.",
"type": "boolean"
},
"continueTtsDuringTouch": {
"description": "If true, screen taps will not stop TTS for the entire canvas session. Default value: false.",
"type": "boolean"
}
}
},
"OrderUpdate": {
"description": "Update to an order.",
"type": "object",
"properties": {
"type": {
"description": "Deprecated: Use OrderUpdate.update_mask instead. If type = SNAPSHOT, OrderUpdate.order should be the entire order. If type = ORDER_STATUS, this is the order level status change. Only order.last_update_time and this vertical status are picked up. Note: type.ORDER_STATUS only supports PurcahaseOrderExtension status updates and there is no plan to extend this support. Instead, we recommend using update_mask as it is more generic, extensible and can be used for all verticals.",
"type": "string",
"enum": [
"TYPE_UNSPECIFIED",
"ORDER_STATUS",
"SNAPSHOT"
]
},
"order": {
"$ref": "#/definitions/Order"
},
"updateMask": {
"description": "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.",
"type": "string",
"format": "google-fieldmask"
},
"userNotification": {
"description": "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.",
"$ref": "#/definitions/UserNotification"
},
"reason": {
"description": "Reason for the change/update.",
"type": "string"
}
}
},
"Order": {
"description": "Order entity. Note: 1. All strings at all levels must be less than 1000 chars unless otherwise specified. 2. All repeated fields at all levels must be less than 50 in count unless otherwise specified. 3. All timestamps at all levels, if specified, must be valid timestamps.",
"type": "object",
"properties": {
"googleOrderId": {
"description": "Google assigned order id.",
"type": "string"
},
"merchantOrderId": {
"description": "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 128 chars.",
"type": "string"
},
"userVisibleOrderId": {
"description": "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.",
"type": "string"
},
"userVisibleStateLabel": {
"description": "Deprecated: Use OrderExtensions status instead. User visible label for the state of this order.",
"type": "string"
},
"buyerInfo": {
"description": "Info about the buyer.",
"$ref": "#/definitions/UserInfo"
},
"image": {
"description": "Image associated with the order.",
"$ref": "#/definitions/V2UiElementsImage"
},
"createTime": {
"description": "Required: Date and time the order was created.",
"type": "string",
"format": "google-datetime"
},
"lastUpdateTime": {
"description": "Date and time the order was last updated. Required for OrderUpdate.",
"type": "string",
"format": "google-datetime"
},
"transactionMerchant": {
"description": "Merchant that facilitated the checkout. This could be different from a line item level provider. Example: Expedia Order with line item from ANA.",
"$ref": "#/definitions/Merchant"
},
"contents": {
"description": "Required: Order contents which is a group of line items.",
"$ref": "#/definitions/Contents"
},
"priceAttributes": {
"description": "Price, discounts, taxes and so on.",
"type": "array",
"items": {
"$ref": "#/definitions/PriceAttribute"
}
},
"followUpActions": {
"description": "Follow up actions at order level.",
"type": "array",
"items": {
"$ref": "#/definitions/Action"
}
},
"paymentData": {
"description": "Payment related data for the order.",
"$ref": "#/definitions/PaymentData"
},
"termsOfServiceUrl": {
"description": "A link to the terms of service that apply to order/proposed order.",
"type": "string"
},
"note": {
"description": "Notes attached to an order.",
"type": "string"
},
"promotions": {
"description": "All promotions that are associated with this order.",
"type": "array",
"items": {
"$ref": "#/definitions/Promotion"
}
},
"disclosures": {
"description": "Disclosures associated with this order.",
"type": "array",
"items": {
"$ref": "#/definitions/Disclosure"
}
},
"purchase": {
"description": "Purchase order",
"$ref": "#/definitions/PurchasePurchaseOrderExtension"
},
"ticket": {
"description": "Ticket order",
"$ref": "#/definitions/TicketTicketOrderExtension"
},
"vertical": {
"description": "Deprecated: Use verticals instead. These properties will apply to all line items, unless overridden in some line item. This vertical must match the line item level vertical type. Possible values: google.actions.orders.v3.verticals.purchase.PurchaseOrderExtension google.actions.orders.v3.verticals.ticket.TicketOrderExtension",
"type": "object"
}
}
},
"UserInfo": {
"description": "Information about user. This is used to represent information of the user associated with an order.",
"type": "object",
"properties": {
"email": {
"description": "User email, Eg: janedoe@gmail.com.",
"type": "string"
},
"firstName": {
"description": "First name of the user.",
"type": "string"
},
"lastName": {
"description": "Last name of the user.",
"type": "string"
},
"displayName": {
"description": "Display name of the user, might be different from first or last name.",
"type": "string"
},
"phoneNumbers": {
"description": "Phone numbers of the user.",
"type": "array",
"items": {
"$ref": "#/definitions/PhoneNumber"
}
}
}
},
"PhoneNumber": {
"description": "Standard phone number representation.",
"type": "object",
"properties": {
"e164PhoneNumber": {
"description": "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",
"type": "string"
},
"extension": {
"description": "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.",
"type": "string"
},
"preferredDomesticCarrierCode": {
"description": "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.",
"type": "string"
}
}
},
"V2UiElementsImage": {
"description": "An image displayed in the card.",
"type": "object",
"properties": {
"url": {
"description": "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.",
"type": "string"
},
"accessibilityText": {
"description": "A text description of the image to be used for accessibility, e.g. screen readers. Required.",
"type": "string"
},
"height": {
"description": "The height of the image in pixels. Optional.",
"type": "integer",
"format": "int32"
},
"width": {
"description": "The width of the image in pixels. Optional.",
"type": "integer",
"format": "int32"
}
}
},
"Merchant": {
"description": "Merchant for the cart/order/line item.",
"type": "object",
"properties": {
"id": {
"description": "Optional ID assigned to merchant if any.",
"type": "string"
},
"name": {
"description": "The name of the merchant like \"Panera Bread\".",
"type": "string"
},
"image": {
"description": "The image associated with the merchant.",
"$ref": "#/definitions/V2UiElementsImage"
},
"phoneNumbers": {
"description": "Merchant's phone numbers.",
"type": "array",
"items": {
"$ref": "#/definitions/PhoneNumber"
}
},
"address": {
"description": "Merchant's address.",
"$ref": "#/definitions/V2Location"
}
}
},
"V2Location": {
"description": "Container that represents a location.",
"type": "object",
"properties": {
"coordinates": {
"description": "Geo coordinates. Requires the DEVICE_PRECISE_LOCATION permission.",
"$ref": "#/definitions/LatLng"
},
"formattedAddress": {
"description": "Display address, e.g., \"1600 Amphitheatre Pkwy, Mountain View, CA 94043\". Requires the DEVICE_PRECISE_LOCATION permission.",
"type": "string"
},
"zipCode": {
"description": "Zip code. Requires the DEVICE_PRECISE_LOCATION or DEVICE_COARSE_LOCATION permission.",
"type": "string"
},
"city": {
"description": "City. Requires the DEVICE_PRECISE_LOCATION or DEVICE_COARSE_LOCATION permission.",
"type": "string"
},
"postalAddress": {
"description": "Postal address. Requires the DEVICE_PRECISE_LOCATION or DEVICE_COARSE_LOCATION permission.",
"$ref": "#/definitions/PostalAddress"
},
"name": {
"description": "Name of the place.",
"type": "string"
},
"phoneNumber": {
"description": "Phone number of the location, e.g. contact number of business location or phone number for delivery location.",
"type": "string"
},
"notes": {
"description": "Notes about the location.",
"type": "string"
},
"placeId": {
"description": "place_id is used with Places API to fetch details of a place. See https://developers.google.com/places/web-service/place-id",
"type": "string"
}
}
},
"LatLng": {
"description": "An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this must conform to the WGS84 standard. Values must be within normalized ranges.",
"type": "object",
"properties": {
"latitude": {
"description": "The latitude in degrees. It must be in the range [-90.0, +90.0].",
"type": "number",
"format": "double"
},
"longitude": {
"description": "The longitude in degrees. It must be in the range [-180.0, +180.0].",
"type": "number",
"format": "double"
}
}
},
"PostalAddress": {
"description": "Represents a postal address, e.g. for postal delivery or payments addresses. Given a postal address, a postal service can deliver items to a premise, P.O. Box or similar. It is not intended to model geographical locations (roads, towns, mountains). In typical usage an address would be created via user input or from importing existing data, depending on the type of process. Advice on address input / editing: - Use an i18n-ready address widget such as https://github.com/google/libaddressinput) - Users should not be presented with UI elements for input or editing of fields outside countries where that field is used. For more guidance on how to use this schema, please see: https://support.google.com/business/answer/6397478",
"type": "object",
"properties": {
"revision": {
"description": "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.",
"type": "integer",
"format": "int32"
},
"regionCode": {
"description": "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.",
"type": "string"
},
"languageCode": {
"description": "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\".",
"type": "string"
},
"postalCode": {
"description": "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.).",
"type": "string"
},
"sortingCode": {
"description": "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).",
"type": "string"
},
"administrativeArea": {
"description": "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.",
"type": "string"
},
"locality": {
"description": "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.",
"type": "string"
},
"sublocality": {
"description": "Optional. Sublocality of the address. For example, this can be neighborhoods, boroughs, districts.",
"type": "string"
},
"addressLines": {
"description": "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).",
"type": "array",
"items": {
"type": "string"
}
},
"recipients": {
"description": "Optional. The recipient at the address. This field may, under certain circumstances, contain multiline information. For example, it might contain \"care of\" information.",
"type": "array",
"items": {
"type": "string"
}
},
"organization": {
"description": "Optional. The name of the organization at the address.",
"type": "string"
}
}
},
"Contents": {
"description": "Wrapper for line items.",
"type": "object",
"properties": {
"lineItems": {
"description": "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.",
"type": "array",
"items": {
"$ref": "#/definitions/LineItem"
}
}
}
},
"LineItem": {
"description": "One line item contains one vertical. An order or cart can have multiple line items of same vertical. Sub-line items/add-ons etc should be defined in vertical protos depending on their use cases. Note: 1. All strings at all levels must be less than 1000 chars unless otherwise specified. 2. All repeated fields at all levels must be less than 50 in count unless otherwise specified. 3. All timestamps at all levels, if specified, must be valid timestamps.",
"type": "object",
"properties": {
"id": {
"description": "Required: Merchant assigned identifier for line item. Used for identifying existing line item in applying partial updates. Max allowed length is 64 chars.",
"type": "string"
},
"name": {
"description": "Name of line item as displayed on the receipt. Max allowed length is 100 chars.",
"type": "string"
},
"userVisibleStateLabel": {
"description": "Deprecated. Use vertical level status instead. For example, for purchases, use PurchaseOrderExtension.status. User visible label for the state of this line item.",
"type": "string"
},
"provider": {
"description": "The provider of the particular line item, if different from the overall order. Example: Expedia Order with line item provider ANA.",
"$ref": "#/definitions/Merchant"
},
"priceAttributes": {
"description": "Line item level price and adjustments.",
"type": "array",
"items": {
"$ref": "#/definitions/PriceAttribute"
}
},
"followUpActions": {
"description": "Follow up actions at line item.",
"type": "array",
"items": {
"$ref": "#/definitions/Action"
}
},
"recipients": {
"description": "Line item level customers, this could be different from Order level buyer. Example: User X made restaurant reservation under name of user Y.",
"type": "array",
"items": {
"$ref": "#/definitions/UserInfo"
}
},
"image": {