@google-apps/chat 0.23.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/chat/v1/chat_service.proto +152 -12
- package/build/protos/google/chat/v1/section.proto +344 -0
- package/build/protos/protos.d.ts +1532 -0
- package/build/protos/protos.js +3477 -0
- package/build/protos/protos.json +425 -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.
|
|
@@ -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
|
}
|
|
@@ -0,0 +1,344 @@
|
|
|
1
|
+
// Copyright 2026 Google LLC
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
|
|
15
|
+
syntax = "proto3";
|
|
16
|
+
|
|
17
|
+
package google.chat.v1;
|
|
18
|
+
|
|
19
|
+
import "google/api/field_behavior.proto";
|
|
20
|
+
import "google/api/resource.proto";
|
|
21
|
+
import "google/protobuf/field_mask.proto";
|
|
22
|
+
|
|
23
|
+
option csharp_namespace = "Google.Apps.Chat.V1";
|
|
24
|
+
option go_package = "cloud.google.com/go/chat/apiv1/chatpb;chatpb";
|
|
25
|
+
option java_multiple_files = true;
|
|
26
|
+
option java_outer_classname = "SectionProto";
|
|
27
|
+
option java_package = "com.google.chat.v1";
|
|
28
|
+
option objc_class_prefix = "DYNAPIProto";
|
|
29
|
+
option php_namespace = "Google\\Apps\\Chat\\V1";
|
|
30
|
+
option ruby_package = "Google::Apps::Chat::V1";
|
|
31
|
+
option (google.api.resource_definition) = {
|
|
32
|
+
type: "chat.googleapis.com/User"
|
|
33
|
+
pattern: "users/{user}"
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
// Represents a [section](https://support.google.com/chat/answer/16059854) in
|
|
37
|
+
// Google Chat. Sections help users organize their spaces. There are two types
|
|
38
|
+
// of sections:
|
|
39
|
+
//
|
|
40
|
+
// 1. **System Sections:** These are predefined sections managed by Google
|
|
41
|
+
// Chat.
|
|
42
|
+
// Their resource names are fixed, and they cannot be created, deleted, or
|
|
43
|
+
// have their `display_name` modified. Examples include:
|
|
44
|
+
// * `users/{user}/sections/default-direct-messages`
|
|
45
|
+
// * `users/{user}/sections/default-spaces`
|
|
46
|
+
// * `users/{user}/sections/default-apps`
|
|
47
|
+
//
|
|
48
|
+
// 2. **Custom Sections:** These are sections created and managed by the user.
|
|
49
|
+
// Creating a custom section using `CreateSection` **requires** a
|
|
50
|
+
// `display_name`. Custom sections can be updated using `UpdateSection` and
|
|
51
|
+
// deleted using `DeleteSection`.
|
|
52
|
+
message Section {
|
|
53
|
+
option (google.api.resource) = {
|
|
54
|
+
type: "chat.googleapis.com/Section"
|
|
55
|
+
pattern: "users/{user}/sections/{section}"
|
|
56
|
+
plural: "sections"
|
|
57
|
+
singular: "section"
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
// Section types.
|
|
61
|
+
enum SectionType {
|
|
62
|
+
// Unspecified section type.
|
|
63
|
+
SECTION_TYPE_UNSPECIFIED = 0;
|
|
64
|
+
|
|
65
|
+
// Custom section.
|
|
66
|
+
CUSTOM_SECTION = 1;
|
|
67
|
+
|
|
68
|
+
// Default section containing
|
|
69
|
+
// [DIRECT_MESSAGE](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#spacetype)
|
|
70
|
+
// between two human users or
|
|
71
|
+
// [GROUP_CHAT](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#spacetype)
|
|
72
|
+
// spaces that don't belong to any custom section.
|
|
73
|
+
DEFAULT_DIRECT_MESSAGES = 2;
|
|
74
|
+
|
|
75
|
+
// Default spaces that don't belong to any custom section.
|
|
76
|
+
DEFAULT_SPACES = 3;
|
|
77
|
+
|
|
78
|
+
// Default section containing a user's installed apps.
|
|
79
|
+
DEFAULT_APPS = 6;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// Identifier. Resource name of the section.
|
|
83
|
+
//
|
|
84
|
+
// For system sections, the section ID is a constant string:
|
|
85
|
+
//
|
|
86
|
+
// - DEFAULT_DIRECT_MESSAGES: `users/{user}/sections/default-direct-messages`
|
|
87
|
+
// - DEFAULT_SPACES: `users/{user}/sections/default-spaces`
|
|
88
|
+
// - DEFAULT_APPS: `users/{user}/sections/default-apps`
|
|
89
|
+
//
|
|
90
|
+
// Format: `users/{user}/sections/{section}`
|
|
91
|
+
string name = 1 [(google.api.field_behavior) = IDENTIFIER];
|
|
92
|
+
|
|
93
|
+
// Optional. The section's display name. Only populated for sections of type
|
|
94
|
+
// `CUSTOM_SECTION`. Supports up to 80 characters. Required when creating a
|
|
95
|
+
// `CUSTOM_SECTION`.
|
|
96
|
+
string display_name = 2 [(google.api.field_behavior) = OPTIONAL];
|
|
97
|
+
|
|
98
|
+
// Output only. The order of the section in relation to other sections.
|
|
99
|
+
// Sections with a lower `sort_order` value appear before sections with a
|
|
100
|
+
// higher value.
|
|
101
|
+
int32 sort_order = 3;
|
|
102
|
+
|
|
103
|
+
// Required. The type of the section.
|
|
104
|
+
SectionType type = 4 [(google.api.field_behavior) = REQUIRED];
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// A user's defined section item. This is used to represent section items, such
|
|
108
|
+
// as spaces, grouped under a section.
|
|
109
|
+
message SectionItem {
|
|
110
|
+
option (google.api.resource) = {
|
|
111
|
+
type: "chat.googleapis.com/SectionItem"
|
|
112
|
+
pattern: "users/{user}/sections/{section}/items/{item}"
|
|
113
|
+
plural: "sectionItems"
|
|
114
|
+
singular: "sectionItem"
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
// Identifier. The resource name of the section item.
|
|
118
|
+
//
|
|
119
|
+
// Format: `users/{user}/sections/{section}/items/{item}`
|
|
120
|
+
string name = 1 [(google.api.field_behavior) = IDENTIFIER];
|
|
121
|
+
|
|
122
|
+
// Required. The section item.
|
|
123
|
+
oneof item {
|
|
124
|
+
// Optional. The space resource name.
|
|
125
|
+
//
|
|
126
|
+
// Format: `spaces/{space}`
|
|
127
|
+
string space = 2 [
|
|
128
|
+
(google.api.field_behavior) = OPTIONAL,
|
|
129
|
+
(google.api.resource_reference) = { type: "chat.googleapis.com/Space" }
|
|
130
|
+
];
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
// Request message for creating a section.
|
|
135
|
+
message CreateSectionRequest {
|
|
136
|
+
// Required. The parent resource name where the section is created.
|
|
137
|
+
//
|
|
138
|
+
// Format: `users/{user}`
|
|
139
|
+
string parent = 1 [
|
|
140
|
+
(google.api.field_behavior) = REQUIRED,
|
|
141
|
+
(google.api.resource_reference) = { type: "chat.googleapis.com/User" }
|
|
142
|
+
];
|
|
143
|
+
|
|
144
|
+
// Required. The section to create.
|
|
145
|
+
Section section = 2 [(google.api.field_behavior) = REQUIRED];
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
// Request message for deleting a section.
|
|
149
|
+
// [Developer Preview](https://developers.google.com/workspace/preview).
|
|
150
|
+
message DeleteSectionRequest {
|
|
151
|
+
// Required. The name of the section to delete.
|
|
152
|
+
//
|
|
153
|
+
// Format: `users/{user}/sections/{section}`
|
|
154
|
+
string name = 1 [
|
|
155
|
+
(google.api.field_behavior) = REQUIRED,
|
|
156
|
+
(google.api.resource_reference) = { type: "chat.googleapis.com/Section" }
|
|
157
|
+
];
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
// Request message for updating a section.
|
|
161
|
+
message UpdateSectionRequest {
|
|
162
|
+
// Required. The section to update.
|
|
163
|
+
Section section = 1 [(google.api.field_behavior) = REQUIRED];
|
|
164
|
+
|
|
165
|
+
// Required. The mask to specify which fields to update.
|
|
166
|
+
//
|
|
167
|
+
// Currently supported field paths:
|
|
168
|
+
//
|
|
169
|
+
// - `display_name`
|
|
170
|
+
google.protobuf.FieldMask update_mask = 2
|
|
171
|
+
[(google.api.field_behavior) = REQUIRED];
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
// Request message for listing sections.
|
|
175
|
+
message ListSectionsRequest {
|
|
176
|
+
// Required. The parent, which is the user resource name that owns this
|
|
177
|
+
// collection of sections. Only supports listing sections for the calling
|
|
178
|
+
// user. To refer to the calling user, set one of the following:
|
|
179
|
+
//
|
|
180
|
+
// - The `me` alias. For example, `users/me`.
|
|
181
|
+
//
|
|
182
|
+
// - Their Workspace email address. For example, `users/user@example.com`.
|
|
183
|
+
//
|
|
184
|
+
// - Their user id. For example, `users/123456789`.
|
|
185
|
+
//
|
|
186
|
+
// Format: `users/{user}`
|
|
187
|
+
string parent = 1 [
|
|
188
|
+
(google.api.field_behavior) = REQUIRED,
|
|
189
|
+
(google.api.resource_reference) = { type: "chat.googleapis.com/User" }
|
|
190
|
+
];
|
|
191
|
+
|
|
192
|
+
// Optional. The maximum number of sections to return. The service may return
|
|
193
|
+
// fewer than this value.
|
|
194
|
+
//
|
|
195
|
+
// If unspecified, at most 10 sections will be returned.
|
|
196
|
+
//
|
|
197
|
+
// The maximum value is 100. If you use a value more than 100, it's
|
|
198
|
+
// automatically changed to 100.
|
|
199
|
+
//
|
|
200
|
+
// Negative values return an `INVALID_ARGUMENT` error.
|
|
201
|
+
int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
|
|
202
|
+
|
|
203
|
+
// Optional. A page token, received from a previous list sections call.
|
|
204
|
+
// Provide this to retrieve the subsequent page.
|
|
205
|
+
//
|
|
206
|
+
// When paginating, all other parameters provided should match the call that
|
|
207
|
+
// provided the page token. Passing different values to the other parameters
|
|
208
|
+
// might lead to unexpected results.
|
|
209
|
+
string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
// Response message for listing sections.
|
|
213
|
+
message ListSectionsResponse {
|
|
214
|
+
// The sections from the specified user.
|
|
215
|
+
repeated Section sections = 1;
|
|
216
|
+
|
|
217
|
+
// A token, which can be sent as `page_token` to retrieve the next page.
|
|
218
|
+
// If this field is omitted, there are no subsequent pages.
|
|
219
|
+
string next_page_token = 2;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
// Request message for positioning a section.
|
|
223
|
+
message PositionSectionRequest {
|
|
224
|
+
// The position of the section.
|
|
225
|
+
enum Position {
|
|
226
|
+
// Unspecified position.
|
|
227
|
+
POSITION_UNSPECIFIED = 0;
|
|
228
|
+
|
|
229
|
+
// Start of the list of sections.
|
|
230
|
+
START = 1;
|
|
231
|
+
|
|
232
|
+
// End of the list of sections.
|
|
233
|
+
END = 2;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
// Required. The resource name of the section to position.
|
|
237
|
+
//
|
|
238
|
+
// Format: `users/{user}/sections/{section}`
|
|
239
|
+
string name = 1 [
|
|
240
|
+
(google.api.field_behavior) = REQUIRED,
|
|
241
|
+
(google.api.resource_reference) = { type: "chat.googleapis.com/Section" }
|
|
242
|
+
];
|
|
243
|
+
|
|
244
|
+
// Required. The new position of the section.
|
|
245
|
+
oneof position {
|
|
246
|
+
// Optional. The absolute position of the section in the list of sections.
|
|
247
|
+
// The position must be greater than 0. If the position is greater than the
|
|
248
|
+
// number of sections, the section will be appended to the end of the list.
|
|
249
|
+
// This operation inserts the section at the given position and shifts the
|
|
250
|
+
// original section at that position, and those below it, to the next
|
|
251
|
+
// position.
|
|
252
|
+
int32 sort_order = 2 [(google.api.field_behavior) = OPTIONAL];
|
|
253
|
+
|
|
254
|
+
// Optional. The relative position of the section in the list of sections.
|
|
255
|
+
Position relative_position = 3 [(google.api.field_behavior) = OPTIONAL];
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
// Response message for positioning a section.
|
|
260
|
+
message PositionSectionResponse {
|
|
261
|
+
// The updated section.
|
|
262
|
+
Section section = 1;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
// Request message for listing section items.
|
|
266
|
+
message ListSectionItemsRequest {
|
|
267
|
+
// Required. The parent, which is the section resource name that owns this
|
|
268
|
+
// collection of section items. Only supports listing section items for the
|
|
269
|
+
// calling user.
|
|
270
|
+
//
|
|
271
|
+
// When you're filtering by space, use the wildcard `-` to search across all
|
|
272
|
+
// sections. For example, `users/{user}/sections/-`.
|
|
273
|
+
//
|
|
274
|
+
// Format: `users/{user}/sections/{section}`
|
|
275
|
+
string parent = 1 [
|
|
276
|
+
(google.api.field_behavior) = REQUIRED,
|
|
277
|
+
(google.api.resource_reference) = { type: "chat.googleapis.com/Section" }
|
|
278
|
+
];
|
|
279
|
+
|
|
280
|
+
// Optional. The maximum number of section items to return. The service may
|
|
281
|
+
// return fewer than this value.
|
|
282
|
+
//
|
|
283
|
+
// If unspecified, at most 10 section items will be returned.
|
|
284
|
+
//
|
|
285
|
+
// The maximum value is 100. If you use a value more than 100, it's
|
|
286
|
+
// automatically changed to 100.
|
|
287
|
+
//
|
|
288
|
+
// Negative values return an `INVALID_ARGUMENT` error.
|
|
289
|
+
int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
|
|
290
|
+
|
|
291
|
+
// Optional. A page token, received from a previous list section items call.
|
|
292
|
+
// Provide this to retrieve the subsequent page.
|
|
293
|
+
//
|
|
294
|
+
// When paginating, all other parameters provided should match the call that
|
|
295
|
+
// provided the page token. Passing different values to the other parameters
|
|
296
|
+
// might lead to unexpected results.
|
|
297
|
+
string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
|
|
298
|
+
|
|
299
|
+
// Optional. A query filter.
|
|
300
|
+
//
|
|
301
|
+
// Currently only supports filtering by space.
|
|
302
|
+
//
|
|
303
|
+
// For example, `space = spaces/{space}`.
|
|
304
|
+
//
|
|
305
|
+
// Invalid queries are rejected with an `INVALID_ARGUMENT` error.
|
|
306
|
+
string filter = 4 [(google.api.field_behavior) = OPTIONAL];
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
// Response message for listing section items.
|
|
310
|
+
message ListSectionItemsResponse {
|
|
311
|
+
// The section items from the specified section.
|
|
312
|
+
repeated SectionItem section_items = 1;
|
|
313
|
+
|
|
314
|
+
// A token, which can be sent as `page_token` to retrieve the next page. If
|
|
315
|
+
// this field is omitted, there are no subsequent pages.
|
|
316
|
+
string next_page_token = 2;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
// Request message for moving a section item across sections.
|
|
320
|
+
message MoveSectionItemRequest {
|
|
321
|
+
// Required. The resource name of the section item to move.
|
|
322
|
+
//
|
|
323
|
+
// Format: `users/{user}/sections/{section}/items/{item}`
|
|
324
|
+
string name = 1 [
|
|
325
|
+
(google.api.field_behavior) = REQUIRED,
|
|
326
|
+
(google.api.resource_reference) = {
|
|
327
|
+
type: "chat.googleapis.com/SectionItem"
|
|
328
|
+
}
|
|
329
|
+
];
|
|
330
|
+
|
|
331
|
+
// Required. The resource name of the section to move the section item to.
|
|
332
|
+
//
|
|
333
|
+
// Format: `users/{user}/sections/{section}`
|
|
334
|
+
string target_section = 2 [
|
|
335
|
+
(google.api.field_behavior) = REQUIRED,
|
|
336
|
+
(google.api.resource_reference) = { type: "chat.googleapis.com/Section" }
|
|
337
|
+
];
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
// Response message for moving a section item.
|
|
341
|
+
message MoveSectionItemResponse {
|
|
342
|
+
// The updated section item.
|
|
343
|
+
SectionItem section_item = 1;
|
|
344
|
+
}
|