Skip to content

Commit a4e7673

Browse files
feat: [chat] Launch AccessoryAction for GA (#5197)
* feat: Launch AccessoryAction for GA docs: updated comments PiperOrigin-RevId: 619423474 Source-Link: googleapis/googleapis@e7b48a7 Source-Link: googleapis/googleapis-gen@db29826 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNoYXQvLk93bEJvdC55YW1sIiwiaCI6ImRiMjk4MjZlMDRkZTVjM2MyNjJmMThjMDA3NTEyYjg2ZmVjMDA1NjQifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent fac55ac commit a4e7673

7 files changed

Lines changed: 517 additions & 8 deletions

File tree

packages/google-chat/protos/google/chat/v1/message.proto

Lines changed: 74 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,71 @@ message Message {
237237
// Output only. GIF images that are attached to the message.
238238
repeated AttachedGif attached_gifs = 42
239239
[(google.api.field_behavior) = OUTPUT_ONLY];
240+
241+
// One or more interactive widgets that appear at the bottom of a message.
242+
// You can add accessory widgets to messages that contain text, cards, or both
243+
// text and cards. Not supported for messages that contain dialogs.
244+
//
245+
// Creating a message with accessory widgets requires [app
246+
// authentication]
247+
// (https://developers.google.com/chat/api/guides/auth/service-accounts).
248+
//
249+
// The following example shows a Chat app that uses accessory widgets (thumbs
250+
// up and thumbs down buttons) in a text message:
251+
//
252+
// ![Example accessory widgets
253+
// message](https://developers.google.com/chat/images/message-accessory-widgets-reference.png)
254+
//
255+
// The JSON for this example message is the following:
256+
//
257+
// ```
258+
// {
259+
// "text": "Rate your experience with this Chat app.",
260+
// "accessoryWidgets": [
261+
// {
262+
// "buttonList": {
263+
// "buttons": [
264+
// {
265+
// "icon": {
266+
// "material_icon": {
267+
// "name": "thumb_up"
268+
// }
269+
// },
270+
// "color": {
271+
// "red": 0,
272+
// "blue": 255,
273+
// "green": 0
274+
// },
275+
// "onClick": {
276+
// "action": {
277+
// "function": "doUpvote",
278+
// }
279+
// }
280+
// },
281+
// {
282+
// "icon": {
283+
// "material_icon": {
284+
// "name": "thumb_down"
285+
// }
286+
// },
287+
// "color": {
288+
// "red": 0,
289+
// "blue": 255,
290+
// "green": 0
291+
// },
292+
// "onClick": {
293+
// "action": {
294+
// "function": "doDownvote",
295+
// }
296+
// }
297+
// }
298+
// ]
299+
// }
300+
// }
301+
// ]
302+
// }
303+
// ```
304+
repeated AccessoryWidget accessory_widgets = 44;
240305
}
241306

242307
// A GIF image that's specified by a URL.
@@ -360,6 +425,14 @@ message ActionResponse {
360425
UpdatedWidget updated_widget = 4 [(google.api.field_behavior) = INPUT_ONLY];
361426
}
362427

428+
// A borderless widget attached to the bottom of an app's message.
429+
message AccessoryWidget {
430+
oneof action {
431+
// A list of buttons that are displayed under the message.
432+
google.apps.card.v1.ButtonList button_list = 1;
433+
}
434+
}
435+
363436
message GetMessageRequest {
364437
// Required. Resource name of the message.
365438
//
@@ -418,7 +491,7 @@ message UpdateMessageRequest {
418491
// - `cards_v2` (Requires [app
419492
// authentication](/chat/api/guides/auth/service-accounts).)
420493
//
421-
// - Developer Preview: `accessory_widgets` (Requires [app
494+
// - `accessory_widgets` (Requires [app
422495
// authentication](/chat/api/guides/auth/service-accounts).)
423496
google.protobuf.FieldMask update_mask = 2;
424497

packages/google-chat/protos/protos.d.ts

Lines changed: 106 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)