@google-apps/chat 0.21.0 → 0.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- // Copyright 2025 Google LLC
1
+ // Copyright 2026 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -1197,6 +1197,26 @@ message SelectionInput {
1197
1197
  SWITCH = 2;
1198
1198
 
1199
1199
  // A dropdown menu. Users can select one item from the menu.
1200
+ //
1201
+ // For Google Chat apps, you can populate items using a dynamic data source
1202
+ // and autosuggest items as users type in the menu. For example, users can
1203
+ // start typing the name of a Google Chat space and the widget autosuggests
1204
+ // the space. To dynamically populate items for a dropdown menu, use one of
1205
+ // the following types of data sources:
1206
+ //
1207
+ // * Google Workspace data: Items are populated using data from Google
1208
+ // Workspace, such as Google Workspace users or Google Chat spaces.
1209
+ // * External data: Items are populated from an external data
1210
+ // source outside of Google Workspace.
1211
+ //
1212
+ // For examples of how to implement dropdown menus for Chat apps, see
1213
+ // [Add a dropdown
1214
+ // menu](https://developers.google.com/workspace/chat/design-interactive-card-dialog#dropdown-menu)
1215
+ // and [Dynamically populate drop-down
1216
+ // menus](https://developers.google.com/workspace/chat/design-interactive-card-dialog#dynamic-dropdown-menu).
1217
+ //
1218
+ // [Google Workspace add-ons and Chat
1219
+ // apps](https://developers.google.com/workspace/extend):
1200
1220
  DROPDOWN = 3;
1201
1221
 
1202
1222
  // A menu with a text box. Users can type and select one or more items.
@@ -152,6 +152,11 @@ message RichLinkMetadata {
152
152
  // A Chat space rich link type. For example, a space smart chip.
153
153
  CHAT_SPACE = 2;
154
154
 
155
+ // A Gmail message rich link type. Specifically, a Gmail chip from [Share to
156
+ // Chat](https://support.google.com/chat?p=chat_gmail). The API only
157
+ // supports reading messages with GMAIL_MESSAGE rich links.
158
+ GMAIL_MESSAGE = 3;
159
+
155
160
  // A Meet message rich link type. For example, a Meet chip.
156
161
  MEET_SPACE = 4;
157
162
 
@@ -47,9 +47,10 @@ message Attachment {
47
47
  UPLOADED_CONTENT = 2;
48
48
  }
49
49
 
50
- // Optional. Resource name of the attachment, in the form
51
- // `spaces/{space}/messages/{message}/attachments/{attachment}`.
52
- string name = 1 [(google.api.field_behavior) = OPTIONAL];
50
+ // Identifier. Resource name of the attachment.
51
+ //
52
+ // Format: `spaces/{space}/messages/{message}/attachments/{attachment}`.
53
+ string name = 1 [(google.api.field_behavior) = IDENTIFIER];
53
54
 
54
55
  // Output only. The original file name for the content, not the full path.
55
56
  string content_name = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
@@ -51,6 +51,7 @@ service ChatService {
51
51
  "https://www.googleapis.com/auth/chat.admin.spaces.readonly,"
52
52
  "https://www.googleapis.com/auth/chat.app.delete,"
53
53
  "https://www.googleapis.com/auth/chat.app.memberships,"
54
+ "https://www.googleapis.com/auth/chat.app.messages.readonly,"
54
55
  "https://www.googleapis.com/auth/chat.app.spaces,"
55
56
  "https://www.googleapis.com/auth/chat.app.spaces.create,"
56
57
  "https://www.googleapis.com/auth/chat.bot,"
@@ -127,21 +128,34 @@ service ChatService {
127
128
  }
128
129
 
129
130
  // Lists messages in a space that the caller is a member of, including
130
- // messages from blocked members and spaces. If you list messages from a
131
+ // messages from blocked members and spaces. System messages, like those
132
+ // announcing new space members, aren't included. If you list messages from a
131
133
  // space with no messages, the response is an empty object. When using a
132
134
  // REST/HTTP interface, the response contains an empty JSON object, `{}`.
133
135
  // For an example, see
134
136
  // [List
135
137
  // messages](https://developers.google.com/workspace/chat/api/guides/v1/messages/list).
136
138
  //
137
- // Requires [user
138
- // authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
139
- // with one of the following [authorization
140
- // scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
139
+ // Supports the following types of
140
+ // [authentication](https://developers.google.com/workspace/chat/authenticate-authorize):
141
141
  //
142
- // - `https://www.googleapis.com/auth/chat.messages.readonly`
143
- // - `https://www.googleapis.com/auth/chat.messages`
144
- // - `https://www.googleapis.com/auth/chat.import` (import mode spaces only)
142
+ // - [App
143
+ // authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
144
+ // with [administrator
145
+ // approval](https://support.google.com/a?p=chat-app-auth) in
146
+ // [Developer Preview](https://developers.google.com/workspace/preview)
147
+ // with the authorization scope:
148
+ // - `https://www.googleapis.com/auth/chat.app.messages.readonly`. When
149
+ // using this authentication scope, this method only returns public
150
+ // messages in a space. It doesn't include private messages.
151
+ //
152
+ // - [User
153
+ // authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
154
+ // with one of the following authorization scopes:
155
+ // - `https://www.googleapis.com/auth/chat.messages.readonly`
156
+ // - `https://www.googleapis.com/auth/chat.messages`
157
+ // - `https://www.googleapis.com/auth/chat.import` (import mode spaces
158
+ // only)
145
159
  rpc ListMessages(ListMessagesRequest) returns (ListMessagesResponse) {
146
160
  option (google.api.http) = {
147
161
  get: "/v1/{parent=spaces/*}/messages"
@@ -231,8 +245,18 @@ service ChatService {
231
245
  //
232
246
  // - [App
233
247
  // authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
234
- // with the authorization scope:
235
- // - `https://www.googleapis.com/auth/chat.bot`
248
+ // with one of the following authorization scopes:
249
+ // - `https://www.googleapis.com/auth/chat.bot`: When using this
250
+ // authorization scope, this method returns details about a message the
251
+ // Chat app has access to, like direct messages and [slash
252
+ // commands](https://developers.google.com/workspace/chat/slash-commands)
253
+ // that invoke the Chat app.
254
+ // - `https://www.googleapis.com/auth/chat.app.messages.readonly`
255
+ // with [administrator
256
+ // approval](https://support.google.com/a?p=chat-app-auth) (available in
257
+ // [Developer Preview](https://developers.google.com/workspace/preview)).
258
+ // When using this authentication scope,
259
+ // this method returns details about a public message in a space.
236
260
  //
237
261
  // - [User
238
262
  // authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
@@ -386,7 +410,9 @@ service ChatService {
386
410
  }
387
411
 
388
412
  // Returns a list of spaces in a Google Workspace organization based on an
389
- // administrator's search.
413
+ // administrator's search. In the request, set `use_admin_access` to `true`.
414
+ // For an example, see [Search for and manage
415
+ // spaces](https://developers.google.com/workspace/chat/search-manage-admin).
390
416
  //
391
417
  // Requires [user
392
418
  // authentication with administrator
@@ -396,8 +422,6 @@ service ChatService {
396
422
  //
397
423
  // - `https://www.googleapis.com/auth/chat.admin.spaces.readonly`
398
424
  // - `https://www.googleapis.com/auth/chat.admin.spaces`
399
- //
400
- // In the request, set `use_admin_access` to `true`.
401
425
  rpc SearchSpaces(SearchSpacesRequest) returns (SearchSpacesResponse) {
402
426
  option (google.api.http) = {
403
427
  get: "/v1/spaces:search"
@@ -1040,22 +1064,36 @@ service ChatService {
1040
1064
  // Note: The `permissionSettings` field is not returned in the Space
1041
1065
  // object of the Space event data for this request.
1042
1066
  //
1043
- // Requires [user
1044
- // authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
1045
- // with an [authorization
1067
+ // Supports the following types of
1068
+ // [authentication](https://developers.google.com/workspace/chat/authenticate-authorize)
1069
+ // with an
1070
+ // [authorization
1046
1071
  // scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes)
1047
1072
  // appropriate for reading the requested data:
1048
1073
  //
1049
- // - `https://www.googleapis.com/auth/chat.spaces.readonly`
1050
- // - `https://www.googleapis.com/auth/chat.spaces`
1051
- // - `https://www.googleapis.com/auth/chat.messages.readonly`
1052
- // - `https://www.googleapis.com/auth/chat.messages`
1053
- // - `https://www.googleapis.com/auth/chat.messages.reactions.readonly`
1054
- // - `https://www.googleapis.com/auth/chat.messages.reactions`
1055
- // - `https://www.googleapis.com/auth/chat.memberships.readonly`
1056
- // - `https://www.googleapis.com/auth/chat.memberships`
1074
+ // - [App
1075
+ // authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
1076
+ // with [administrator
1077
+ // approval](https://support.google.com/a?p=chat-app-auth) in
1078
+ // [Developer Preview](https://developers.google.com/workspace/preview)
1079
+ // with one of the following authorization scopes:
1080
+ // - `https://www.googleapis.com/auth/chat.app.spaces`
1081
+ // - `https://www.googleapis.com/auth/chat.app.messages.readonly`
1082
+ // - `https://www.googleapis.com/auth/chat.app.memberships`
1083
+ //
1084
+ // - [User
1085
+ // authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
1086
+ // with one of the following authorization scopes:
1087
+ // - `https://www.googleapis.com/auth/chat.spaces.readonly`
1088
+ // - `https://www.googleapis.com/auth/chat.spaces`
1089
+ // - `https://www.googleapis.com/auth/chat.messages.readonly`
1090
+ // - `https://www.googleapis.com/auth/chat.messages`
1091
+ // - `https://www.googleapis.com/auth/chat.messages.reactions.readonly`
1092
+ // - `https://www.googleapis.com/auth/chat.messages.reactions`
1093
+ // - `https://www.googleapis.com/auth/chat.memberships.readonly`
1094
+ // - `https://www.googleapis.com/auth/chat.memberships`
1057
1095
  //
1058
- // To get an event, the authenticated user must be a member of the space.
1096
+ // To get an event, the authenticated caller must be a member of the space.
1059
1097
  //
1060
1098
  // For an example, see [Get details about an
1061
1099
  // event from a Google Chat
@@ -1075,22 +1113,36 @@ service ChatService {
1075
1113
  // removed during the requested period, the event payload contains an empty
1076
1114
  // `Membership` resource.
1077
1115
  //
1078
- // Requires [user
1079
- // authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
1080
- // with an [authorization
1116
+ // Supports the following types of
1117
+ // [authentication](https://developers.google.com/workspace/chat/authenticate-authorize)
1118
+ // with an
1119
+ // [authorization
1081
1120
  // scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes)
1082
1121
  // appropriate for reading the requested data:
1083
1122
  //
1084
- // - `https://www.googleapis.com/auth/chat.spaces.readonly`
1085
- // - `https://www.googleapis.com/auth/chat.spaces`
1086
- // - `https://www.googleapis.com/auth/chat.messages.readonly`
1087
- // - `https://www.googleapis.com/auth/chat.messages`
1088
- // - `https://www.googleapis.com/auth/chat.messages.reactions.readonly`
1089
- // - `https://www.googleapis.com/auth/chat.messages.reactions`
1090
- // - `https://www.googleapis.com/auth/chat.memberships.readonly`
1091
- // - `https://www.googleapis.com/auth/chat.memberships`
1123
+ // - [App
1124
+ // authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
1125
+ // with [administrator
1126
+ // approval](https://support.google.com/a?p=chat-app-auth) in
1127
+ // [Developer Preview](https://developers.google.com/workspace/preview)
1128
+ // with one of the following authorization scopes:
1129
+ // - `https://www.googleapis.com/auth/chat.app.spaces`
1130
+ // - `https://www.googleapis.com/auth/chat.app.messages.readonly`
1131
+ // - `https://www.googleapis.com/auth/chat.app.memberships`
1132
+ //
1133
+ // - [User
1134
+ // authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
1135
+ // with one of the following authorization scopes:
1136
+ // - `https://www.googleapis.com/auth/chat.spaces.readonly`
1137
+ // - `https://www.googleapis.com/auth/chat.spaces`
1138
+ // - `https://www.googleapis.com/auth/chat.messages.readonly`
1139
+ // - `https://www.googleapis.com/auth/chat.messages`
1140
+ // - `https://www.googleapis.com/auth/chat.messages.reactions.readonly`
1141
+ // - `https://www.googleapis.com/auth/chat.messages.reactions`
1142
+ // - `https://www.googleapis.com/auth/chat.memberships.readonly`
1143
+ // - `https://www.googleapis.com/auth/chat.memberships`
1092
1144
  //
1093
- // To list events, the authenticated user must be a member of the space.
1145
+ // To list events, the authenticated caller must be a member of the space.
1094
1146
  //
1095
1147
  // For an example, see [List events from a Google Chat
1096
1148
  // space](https://developers.google.com/workspace/chat/list-space-events).
@@ -99,7 +99,7 @@ message MessageUpdatedEventData {
99
99
  //
100
100
  // Event type: `google.workspace.chat.message.v1.deleted`
101
101
  message MessageDeletedEventData {
102
- // The deleted message. Only the `name`, `createTime`, `deleteTime`, and
102
+ // The deleted message. Only the `name`, `createTime`, and
103
103
  // `deletionMetadata` fields are populated.
104
104
  Message message = 1;
105
105
  }
@@ -1,4 +1,4 @@
1
- // Copyright 2025 Google LLC
1
+ // Copyright 2026 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -127,6 +127,8 @@ message Message {
127
127
  // This doesn't apply to Unicode emoji, such as `U+1F600` for a grinning
128
128
  // face emoji.
129
129
  //
130
+ // * Bullet list items using asterisks (`*`)—for example, `* item`.
131
+ //
130
132
  // For more information, see [View text formatting sent in a
131
133
  // message](https://developers.google.com/workspace/chat/format-messages#view_text_formatting_sent_in_a_message)
132
134
  string formatted_text = 43 [(google.api.field_behavior) = OUTPUT_ONLY];
@@ -223,8 +225,6 @@ message Message {
223
225
  // and omit the following:
224
226
  //
225
227
  // * [Attachments](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages.attachments)
226
- // * [Accessory
227
- // widgets](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages#Message.AccessoryWidget)
228
228
  //
229
229
  // For details, see [Send a message
230
230
  // privately](https://developers.google.com/workspace/chat/create-messages#private).
@@ -292,6 +292,23 @@ message QuotedMessageMetadata {
292
292
  pattern: "spaces/{space}/messages/{message}/quotedMessageMetadata/{quoted_message_metadata}"
293
293
  };
294
294
 
295
+ // The quote type of the quoted message.
296
+ enum QuoteType {
297
+ // Reserved. This value is unused.
298
+ QUOTE_TYPE_UNSPECIFIED = 0;
299
+
300
+ // If quote_type is `REPLY`, you can do the following:
301
+ //
302
+ // * If you're replying in a thread, you can quote another message in that
303
+ // thread.
304
+ //
305
+ // * If you're creating a root message, you can quote another root message
306
+ // in that space.
307
+ //
308
+ // You can't quote a message reply from a different thread.
309
+ REPLY = 1;
310
+ }
311
+
295
312
  // Required. Resource name of the message that is quoted.
296
313
  //
297
314
  // Format: `spaces/{space}/messages/{message}`
@@ -310,6 +327,63 @@ message QuotedMessageMetadata {
310
327
  // message, the request fails.
311
328
  google.protobuf.Timestamp last_update_time = 2
312
329
  [(google.api.field_behavior) = REQUIRED];
330
+
331
+ // Optional. Specifies the quote type. If not set, defaults to REPLY in the
332
+ // message read/write path for backward compatibility.
333
+ QuoteType quote_type = 4 [(google.api.field_behavior) = OPTIONAL];
334
+
335
+ // Output only. A snapshot of the quoted message's content.
336
+ QuotedMessageSnapshot quoted_message_snapshot = 5
337
+ [(google.api.field_behavior) = OUTPUT_ONLY];
338
+
339
+ // Output only. Metadata about the source space of the quoted message.
340
+ // Populated only for FORWARD quote type.
341
+ ForwardedMetadata forwarded_metadata = 6
342
+ [(google.api.field_behavior) = OUTPUT_ONLY];
343
+ }
344
+
345
+ // Provides a snapshot of the content of the quoted message at the time of
346
+ // quoting or forwarding
347
+ message QuotedMessageSnapshot {
348
+ // Output only. The quoted message's author name.
349
+ // Populated for both REPLY & FORWARD quote types.
350
+ string sender = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
351
+
352
+ // Output only. Snapshot of the quoted message's text content.
353
+ string text = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
354
+
355
+ // Output only. Contains the quoted message `text` with markups added to
356
+ // support rich formatting like hyperlinks,custom emojis, markup, etc.
357
+ // Populated only for FORWARD quote type.
358
+ string formatted_text = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
359
+
360
+ // Output only. Annotations parsed from the text body of the quoted message.
361
+ // Populated only for FORWARD quote type.
362
+ repeated Annotation annotations = 4
363
+ [(google.api.field_behavior) = OUTPUT_ONLY];
364
+
365
+ // Output only. Attachments that were part of the quoted message. These are
366
+ // copies of the quoted message's attachment metadata. Populated only for
367
+ // FORWARD quote type.
368
+ repeated Attachment attachments = 5
369
+ [(google.api.field_behavior) = OUTPUT_ONLY];
370
+ }
371
+
372
+ // Metadata about the source space from which a message was forwarded.
373
+ message ForwardedMetadata {
374
+ // Output only. The resource name of the source space.
375
+ // Format: spaces/{space}
376
+ string space = 1 [
377
+ (google.api.field_behavior) = OUTPUT_ONLY,
378
+ (google.api.resource_reference) = { type: "chat.googleapis.com/Space" }
379
+ ];
380
+
381
+ // Output only. The display name of the source space or DM at the time of
382
+ // forwarding. For `SPACE`, this is the space name. For `DIRECT_MESSAGE`, this
383
+ // is the other participant's name (e.g., "User A"). For `GROUP_CHAT`, this is
384
+ // a generated name based on members' first names, limited to 5 including the
385
+ // creator (e.g., "User A, User B").
386
+ string space_display_name = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
313
387
  }
314
388
 
315
389
  // A thread in a Google Chat space. For example usage, see
@@ -370,7 +370,8 @@ message Space {
370
370
  // Private apps can also use the `customers/my_customer` alias to create
371
371
  // the space in the same Google Workspace organization as the app.
372
372
  //
373
- // For DMs, this field isn't populated.
373
+ // This field isn't populated for direct messages (DMs) or when the space is
374
+ // created by non-Google Workspace users.
374
375
  optional string customer = 24 [
375
376
  (google.api.field_behavior) = IMMUTABLE,
376
377
  (google.api.field_behavior) = OPTIONAL
@@ -563,8 +564,10 @@ message UpdateSpaceRequest {
563
564
  //
564
565
  // You can update the following fields for a space:
565
566
  //
566
- // `space_details`: Updates the space's description. Supports up to 150
567
- // characters.
567
+ // `space_details`: Updates the space's description and guidelines. You must
568
+ // pass both description and guidelines in the update request as
569
+ // [`SpaceDetails`][google.chat.v1.Space.SpaceDetails]. If you only want to
570
+ // update one of the fields, pass the existing value for the other field.
568
571
  //
569
572
  // `display_name`: Only supports updating the display name for spaces where
570
573
  // `spaceType` field is `SPACE`.
@@ -608,8 +611,7 @@ message UpdateSpaceRequest {
608
611
  // of a space.
609
612
  // When updating permission settings, you can only specify
610
613
  // `permissionSettings` field masks; you cannot update other field masks
611
- // at the same time. `permissionSettings` is not supported with
612
- // `useAdminAccess`.
614
+ // at the same time.
613
615
  // The supported field masks include:
614
616
  //
615
617
  // - `permission_settings.manageMembersAndGroups`