@google-apps/chat 0.22.0 → 0.23.1
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.
- package/README.md +7 -0
- package/build/protos/google/apps/card/v1/card.proto +21 -1
- package/build/protos/google/chat/v1/chat_service.proto +152 -12
- package/build/protos/google/chat/v1/message.proto +75 -1
- package/build/protos/google/chat/v1/section.proto +344 -0
- package/build/protos/protos.d.ts +1783 -0
- package/build/protos/protos.js +13397 -9237
- package/build/protos/protos.json +514 -2
- package/build/src/index.js +1 -1
- package/build/src/v1/chat_service_client.d.ts +592 -11
- package/build/src/v1/chat_service_client.js +578 -2
- package/build/src/v1/chat_service_client.js.map +1 -1
- package/build/src/v1/chat_service_client_config.json +35 -0
- package/build/src/v1/chat_service_proto_list.json +1 -0
- package/build/src/v1/gapic_metadata.json +78 -0
- package/package.json +10 -2
- package/LICENSE +0 -202
package/README.md
CHANGED
|
@@ -62,11 +62,13 @@ Samples are in the [`samples/`][homepage_samples] directory. Each sample's `READ
|
|
|
62
62
|
| create membership | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.create_membership.js) |
|
|
63
63
|
| create message | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.create_message.js) |
|
|
64
64
|
| create reaction | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.create_reaction.js) |
|
|
65
|
+
| create section | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.create_section.js) |
|
|
65
66
|
| create space | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.create_space.js) |
|
|
66
67
|
| delete custom emoji | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.delete_custom_emoji.js) |
|
|
67
68
|
| delete membership | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.delete_membership.js) |
|
|
68
69
|
| delete message | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.delete_message.js) |
|
|
69
70
|
| delete reaction | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.delete_reaction.js) |
|
|
71
|
+
| delete section | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.delete_section.js) |
|
|
70
72
|
| delete space | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.delete_space.js) |
|
|
71
73
|
| find direct message | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.find_direct_message.js) |
|
|
72
74
|
| get attachment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.get_attachment.js) |
|
|
@@ -82,12 +84,17 @@ Samples are in the [`samples/`][homepage_samples] directory. Each sample's `READ
|
|
|
82
84
|
| list memberships | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.list_memberships.js) |
|
|
83
85
|
| list messages | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.list_messages.js) |
|
|
84
86
|
| list reactions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.list_reactions.js) |
|
|
87
|
+
| list section items | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.list_section_items.js) |
|
|
88
|
+
| list sections | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.list_sections.js) |
|
|
85
89
|
| list space events | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.list_space_events.js) |
|
|
86
90
|
| list spaces | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.list_spaces.js) |
|
|
91
|
+
| move section item | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.move_section_item.js) |
|
|
92
|
+
| position section | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.position_section.js) |
|
|
87
93
|
| search spaces | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.search_spaces.js) |
|
|
88
94
|
| set up space | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.set_up_space.js) |
|
|
89
95
|
| update membership | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.update_membership.js) |
|
|
90
96
|
| update message | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.update_message.js) |
|
|
97
|
+
| update section | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.update_section.js) |
|
|
91
98
|
| update space | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.update_space.js) |
|
|
92
99
|
| update space notification setting | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.update_space_notification_setting.js) |
|
|
93
100
|
| update space read state | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.update_space_read_state.js) |
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright
|
|
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.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright
|
|
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.
|
|
@@ -22,6 +22,7 @@ import "google/chat/v1/attachment.proto";
|
|
|
22
22
|
import "google/chat/v1/membership.proto";
|
|
23
23
|
import "google/chat/v1/message.proto";
|
|
24
24
|
import "google/chat/v1/reaction.proto";
|
|
25
|
+
import "google/chat/v1/section.proto";
|
|
25
26
|
import "google/chat/v1/space.proto";
|
|
26
27
|
import "google/chat/v1/space_event.proto";
|
|
27
28
|
import "google/chat/v1/space_notification_setting.proto";
|
|
@@ -51,9 +52,11 @@ service ChatService {
|
|
|
51
52
|
"https://www.googleapis.com/auth/chat.admin.spaces.readonly,"
|
|
52
53
|
"https://www.googleapis.com/auth/chat.app.delete,"
|
|
53
54
|
"https://www.googleapis.com/auth/chat.app.memberships,"
|
|
55
|
+
"https://www.googleapis.com/auth/chat.app.memberships.readonly,"
|
|
54
56
|
"https://www.googleapis.com/auth/chat.app.messages.readonly,"
|
|
55
57
|
"https://www.googleapis.com/auth/chat.app.spaces,"
|
|
56
58
|
"https://www.googleapis.com/auth/chat.app.spaces.create,"
|
|
59
|
+
"https://www.googleapis.com/auth/chat.app.spaces.readonly,"
|
|
57
60
|
"https://www.googleapis.com/auth/chat.bot,"
|
|
58
61
|
"https://www.googleapis.com/auth/chat.customemojis,"
|
|
59
62
|
"https://www.googleapis.com/auth/chat.customemojis.readonly,"
|
|
@@ -73,6 +76,8 @@ service ChatService {
|
|
|
73
76
|
"https://www.googleapis.com/auth/chat.spaces.readonly,"
|
|
74
77
|
"https://www.googleapis.com/auth/chat.users.readstate,"
|
|
75
78
|
"https://www.googleapis.com/auth/chat.users.readstate.readonly,"
|
|
79
|
+
"https://www.googleapis.com/auth/chat.users.sections,"
|
|
80
|
+
"https://www.googleapis.com/auth/chat.users.sections.readonly,"
|
|
76
81
|
"https://www.googleapis.com/auth/chat.users.spacesettings";
|
|
77
82
|
|
|
78
83
|
// Creates a message in a Google Chat space. For an example, see [Send a
|
|
@@ -142,9 +147,8 @@ service ChatService {
|
|
|
142
147
|
// - [App
|
|
143
148
|
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
|
|
144
149
|
// with [administrator
|
|
145
|
-
// approval](https://support.google.com/a?p=chat-app-auth)
|
|
146
|
-
//
|
|
147
|
-
// with the authorization scope:
|
|
150
|
+
// approval](https://support.google.com/a?p=chat-app-auth)
|
|
151
|
+
// with the authorization scope:
|
|
148
152
|
// - `https://www.googleapis.com/auth/chat.app.messages.readonly`. When
|
|
149
153
|
// using this authentication scope, this method only returns public
|
|
150
154
|
// messages in a space. It doesn't include private messages.
|
|
@@ -253,8 +257,7 @@ service ChatService {
|
|
|
253
257
|
// that invoke the Chat app.
|
|
254
258
|
// - `https://www.googleapis.com/auth/chat.app.messages.readonly`
|
|
255
259
|
// with [administrator
|
|
256
|
-
// approval](https://support.google.com/a?p=chat-app-auth)
|
|
257
|
-
// [Developer Preview](https://developers.google.com/workspace/preview)).
|
|
260
|
+
// approval](https://support.google.com/a?p=chat-app-auth).
|
|
258
261
|
// When using this authentication scope,
|
|
259
262
|
// this method returns details about a public message in a space.
|
|
260
263
|
//
|
|
@@ -1074,12 +1077,13 @@ service ChatService {
|
|
|
1074
1077
|
// - [App
|
|
1075
1078
|
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
|
|
1076
1079
|
// with [administrator
|
|
1077
|
-
// approval](https://support.google.com/a?p=chat-app-auth)
|
|
1078
|
-
//
|
|
1079
|
-
// with one of the following authorization scopes:
|
|
1080
|
+
// approval](https://support.google.com/a?p=chat-app-auth)
|
|
1081
|
+
// with one of the following authorization scopes:
|
|
1080
1082
|
// - `https://www.googleapis.com/auth/chat.app.spaces`
|
|
1083
|
+
// - `https://www.googleapis.com/auth/chat.app.spaces.readonly`
|
|
1081
1084
|
// - `https://www.googleapis.com/auth/chat.app.messages.readonly`
|
|
1082
1085
|
// - `https://www.googleapis.com/auth/chat.app.memberships`
|
|
1086
|
+
// - `https://www.googleapis.com/auth/chat.app.memberships.readonly`
|
|
1083
1087
|
//
|
|
1084
1088
|
// - [User
|
|
1085
1089
|
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
|
|
@@ -1123,12 +1127,13 @@ service ChatService {
|
|
|
1123
1127
|
// - [App
|
|
1124
1128
|
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
|
|
1125
1129
|
// with [administrator
|
|
1126
|
-
// approval](https://support.google.com/a?p=chat-app-auth)
|
|
1127
|
-
//
|
|
1128
|
-
// with one of the following authorization scopes:
|
|
1130
|
+
// approval](https://support.google.com/a?p=chat-app-auth)
|
|
1131
|
+
// with one of the following authorization scopes:
|
|
1129
1132
|
// - `https://www.googleapis.com/auth/chat.app.spaces`
|
|
1133
|
+
// - `https://www.googleapis.com/auth/chat.app.spaces.readonly`
|
|
1130
1134
|
// - `https://www.googleapis.com/auth/chat.app.messages.readonly`
|
|
1131
1135
|
// - `https://www.googleapis.com/auth/chat.app.memberships`
|
|
1136
|
+
// - `https://www.googleapis.com/auth/chat.app.memberships.readonly`
|
|
1132
1137
|
//
|
|
1133
1138
|
// - [User
|
|
1134
1139
|
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
|
|
@@ -1191,4 +1196,139 @@ service ChatService {
|
|
|
1191
1196
|
option (google.api.method_signature) =
|
|
1192
1197
|
"space_notification_setting,update_mask";
|
|
1193
1198
|
}
|
|
1199
|
+
|
|
1200
|
+
// Creates a section in Google Chat. Sections help users group conversations
|
|
1201
|
+
// and customize the list of spaces displayed in Chat navigation panel. Only
|
|
1202
|
+
// sections of type `CUSTOM_SECTION` can be created. For details, see [Create
|
|
1203
|
+
// and organize sections in Google
|
|
1204
|
+
// Chat](https://support.google.com/chat/answer/16059854).
|
|
1205
|
+
//
|
|
1206
|
+
// Requires [user
|
|
1207
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
|
|
1208
|
+
// with the [authorization
|
|
1209
|
+
// scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
|
|
1210
|
+
//
|
|
1211
|
+
// - `https://www.googleapis.com/auth/chat.users.sections`
|
|
1212
|
+
rpc CreateSection(CreateSectionRequest) returns (Section) {
|
|
1213
|
+
option (google.api.http) = {
|
|
1214
|
+
post: "/v1/{parent=users/*}/sections"
|
|
1215
|
+
body: "section"
|
|
1216
|
+
};
|
|
1217
|
+
option (google.api.method_signature) = "parent,section";
|
|
1218
|
+
}
|
|
1219
|
+
|
|
1220
|
+
// Deletes a section of type `CUSTOM_SECTION`.
|
|
1221
|
+
//
|
|
1222
|
+
// If the section contains items, such as spaces, the items are moved to
|
|
1223
|
+
// Google Chat's default sections and are not deleted.
|
|
1224
|
+
//
|
|
1225
|
+
// For details, see [Create and organize sections in Google
|
|
1226
|
+
// Chat](https://support.google.com/chat/answer/16059854).
|
|
1227
|
+
//
|
|
1228
|
+
// Requires [user
|
|
1229
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
|
|
1230
|
+
// with the [authorization
|
|
1231
|
+
// scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
|
|
1232
|
+
//
|
|
1233
|
+
// - `https://www.googleapis.com/auth/chat.users.sections`
|
|
1234
|
+
rpc DeleteSection(DeleteSectionRequest) returns (google.protobuf.Empty) {
|
|
1235
|
+
option (google.api.http) = {
|
|
1236
|
+
delete: "/v1/{name=users/*/sections/*}"
|
|
1237
|
+
};
|
|
1238
|
+
option (google.api.method_signature) = "name";
|
|
1239
|
+
}
|
|
1240
|
+
|
|
1241
|
+
// Updates a section. Only sections of type `CUSTOM_SECTION` can be updated.
|
|
1242
|
+
// For details, see [Create and organize sections in Google
|
|
1243
|
+
// Chat](https://support.google.com/chat/answer/16059854).
|
|
1244
|
+
//
|
|
1245
|
+
// Requires [user
|
|
1246
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
|
|
1247
|
+
// with the [authorization
|
|
1248
|
+
// scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
|
|
1249
|
+
//
|
|
1250
|
+
// - `https://www.googleapis.com/auth/chat.users.sections`
|
|
1251
|
+
rpc UpdateSection(UpdateSectionRequest) returns (Section) {
|
|
1252
|
+
option (google.api.http) = {
|
|
1253
|
+
patch: "/v1/{section.name=users/*/sections/*}"
|
|
1254
|
+
body: "section"
|
|
1255
|
+
};
|
|
1256
|
+
option (google.api.method_signature) = "section,update_mask";
|
|
1257
|
+
}
|
|
1258
|
+
|
|
1259
|
+
// Lists sections available to the Chat user. Sections help users group their
|
|
1260
|
+
// conversations and customize the list of spaces displayed in Chat
|
|
1261
|
+
// navigation panel. For details, see [Create and organize sections in Google
|
|
1262
|
+
// Chat](https://support.google.com/chat/answer/16059854).
|
|
1263
|
+
//
|
|
1264
|
+
// Requires [user
|
|
1265
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
|
|
1266
|
+
// with the [authorization
|
|
1267
|
+
// scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
|
|
1268
|
+
//
|
|
1269
|
+
// - `https://www.googleapis.com/auth/chat.users.sections`
|
|
1270
|
+
// - `https://www.googleapis.com/auth/chat.users.sections.readonly`
|
|
1271
|
+
rpc ListSections(ListSectionsRequest) returns (ListSectionsResponse) {
|
|
1272
|
+
option (google.api.http) = {
|
|
1273
|
+
get: "/v1/{parent=users/*}/sections"
|
|
1274
|
+
};
|
|
1275
|
+
option (google.api.method_signature) = "parent";
|
|
1276
|
+
}
|
|
1277
|
+
|
|
1278
|
+
// Changes the sort order of a section. For details, see [Create and organize
|
|
1279
|
+
// sections in Google Chat](https://support.google.com/chat/answer/16059854).
|
|
1280
|
+
//
|
|
1281
|
+
// Requires [user
|
|
1282
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
|
|
1283
|
+
// with the [authorization
|
|
1284
|
+
// scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
|
|
1285
|
+
//
|
|
1286
|
+
// - `https://www.googleapis.com/auth/chat.users.sections`
|
|
1287
|
+
rpc PositionSection(PositionSectionRequest)
|
|
1288
|
+
returns (PositionSectionResponse) {
|
|
1289
|
+
option (google.api.http) = {
|
|
1290
|
+
post: "/v1/{name=users/*/sections/*}:position"
|
|
1291
|
+
body: "*"
|
|
1292
|
+
};
|
|
1293
|
+
}
|
|
1294
|
+
|
|
1295
|
+
// Lists items in a section.
|
|
1296
|
+
//
|
|
1297
|
+
// Only spaces can be section items. For details, see [Create and organize
|
|
1298
|
+
// sections in Google Chat](https://support.google.com/chat/answer/16059854).
|
|
1299
|
+
//
|
|
1300
|
+
// Requires [user
|
|
1301
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
|
|
1302
|
+
// with the [authorization
|
|
1303
|
+
// scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
|
|
1304
|
+
//
|
|
1305
|
+
// - `https://www.googleapis.com/auth/chat.users.sections`
|
|
1306
|
+
// - `https://www.googleapis.com/auth/chat.users.sections.readonly`
|
|
1307
|
+
rpc ListSectionItems(ListSectionItemsRequest)
|
|
1308
|
+
returns (ListSectionItemsResponse) {
|
|
1309
|
+
option (google.api.http) = {
|
|
1310
|
+
get: "/v1/{parent=users/*/sections/*}/items"
|
|
1311
|
+
};
|
|
1312
|
+
option (google.api.method_signature) = "parent";
|
|
1313
|
+
}
|
|
1314
|
+
|
|
1315
|
+
// Moves an item from one section to another. For example, if a section
|
|
1316
|
+
// contains spaces, this method can be used to move a space to a different
|
|
1317
|
+
// section. For details, see [Create and organize sections in Google
|
|
1318
|
+
// Chat](https://support.google.com/chat/answer/16059854).
|
|
1319
|
+
//
|
|
1320
|
+
// Requires [user
|
|
1321
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
|
|
1322
|
+
// with the [authorization
|
|
1323
|
+
// scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
|
|
1324
|
+
//
|
|
1325
|
+
// - `https://www.googleapis.com/auth/chat.users.sections`
|
|
1326
|
+
rpc MoveSectionItem(MoveSectionItemRequest)
|
|
1327
|
+
returns (MoveSectionItemResponse) {
|
|
1328
|
+
option (google.api.http) = {
|
|
1329
|
+
post: "/v1/{name=users/*/sections/*/items/*}:move"
|
|
1330
|
+
body: "*"
|
|
1331
|
+
};
|
|
1332
|
+
option (google.api.method_signature) = "name,target_section";
|
|
1333
|
+
}
|
|
1194
1334
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright
|
|
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.
|
|
@@ -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
|