1- // Copyright 2025 Google LLC
1+ // Copyright 2026 Google LLC
22//
33// Licensed under the Apache License, Version 2.0 (the "License");
44// you may not use this file except in compliance with the License.
@@ -22,6 +22,7 @@ import "google/chat/v1/attachment.proto";
2222import "google/chat/v1/membership.proto" ;
2323import "google/chat/v1/message.proto" ;
2424import "google/chat/v1/reaction.proto" ;
25+ import "google/chat/v1/section.proto" ;
2526import "google/chat/v1/space.proto" ;
2627import "google/chat/v1/space_event.proto" ;
2728import "google/chat/v1/space_notification_setting.proto" ;
@@ -73,6 +74,8 @@ service ChatService {
7374 "https://www.googleapis.com/auth/chat.spaces.readonly,"
7475 "https://www.googleapis.com/auth/chat.users.readstate,"
7576 "https://www.googleapis.com/auth/chat.users.readstate.readonly,"
77+ "https://www.googleapis.com/auth/chat.users.sections,"
78+ "https://www.googleapis.com/auth/chat.users.sections.readonly,"
7679 "https://www.googleapis.com/auth/chat.users.spacesettings" ;
7780
7881 // Creates a message in a Google Chat space. For an example, see [Send a
@@ -1191,4 +1194,139 @@ service ChatService {
11911194 option (google.api.method_signature ) =
11921195 "space_notification_setting,update_mask" ;
11931196 }
1197+
1198+ // Creates a section in Google Chat. Sections help users group conversations
1199+ // and customize the list of spaces displayed in Chat navigation panel. Only
1200+ // sections of type `CUSTOM_SECTION` can be created. For details, see [Create
1201+ // and organize sections in Google
1202+ // Chat](https://support.google.com/chat/answer/16059854).
1203+ //
1204+ // Requires [user
1205+ // authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
1206+ // with the [authorization
1207+ // scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
1208+ //
1209+ // - `https://www.googleapis.com/auth/chat.users.sections`
1210+ rpc CreateSection (CreateSectionRequest ) returns (Section ) {
1211+ option (google.api.http ) = {
1212+ post : "/v1/{parent=users/*}/sections"
1213+ body : "section"
1214+ };
1215+ option (google.api.method_signature ) = "parent,section" ;
1216+ }
1217+
1218+ // Deletes a section of type `CUSTOM_SECTION`.
1219+ //
1220+ // If the section contains items, such as spaces, the items are moved to
1221+ // Google Chat's default sections and are not deleted.
1222+ //
1223+ // For details, see [Create and organize sections in Google
1224+ // Chat](https://support.google.com/chat/answer/16059854).
1225+ //
1226+ // Requires [user
1227+ // authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
1228+ // with the [authorization
1229+ // scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
1230+ //
1231+ // - `https://www.googleapis.com/auth/chat.users.sections`
1232+ rpc DeleteSection (DeleteSectionRequest ) returns (google.protobuf.Empty ) {
1233+ option (google.api.http ) = {
1234+ delete : "/v1/{name=users/*/sections/*}"
1235+ };
1236+ option (google.api.method_signature ) = "name" ;
1237+ }
1238+
1239+ // Updates a section. Only sections of type `CUSTOM_SECTION` can be updated.
1240+ // For details, see [Create and organize sections in Google
1241+ // Chat](https://support.google.com/chat/answer/16059854).
1242+ //
1243+ // Requires [user
1244+ // authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
1245+ // with the [authorization
1246+ // scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
1247+ //
1248+ // - `https://www.googleapis.com/auth/chat.users.sections`
1249+ rpc UpdateSection (UpdateSectionRequest ) returns (Section ) {
1250+ option (google.api.http ) = {
1251+ patch : "/v1/{section.name=users/*/sections/*}"
1252+ body : "section"
1253+ };
1254+ option (google.api.method_signature ) = "section,update_mask" ;
1255+ }
1256+
1257+ // Lists sections available to the Chat user. Sections help users group their
1258+ // conversations and customize the list of spaces displayed in Chat
1259+ // navigation panel. For details, see [Create and organize sections in Google
1260+ // Chat](https://support.google.com/chat/answer/16059854).
1261+ //
1262+ // Requires [user
1263+ // authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
1264+ // with the [authorization
1265+ // scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
1266+ //
1267+ // - `https://www.googleapis.com/auth/chat.users.sections`
1268+ // - `https://www.googleapis.com/auth/chat.users.sections.readonly`
1269+ rpc ListSections (ListSectionsRequest ) returns (ListSectionsResponse ) {
1270+ option (google.api.http ) = {
1271+ get : "/v1/{parent=users/*}/sections"
1272+ };
1273+ option (google.api.method_signature ) = "parent" ;
1274+ }
1275+
1276+ // Changes the sort order of a section. For details, see [Create and organize
1277+ // sections in Google Chat](https://support.google.com/chat/answer/16059854).
1278+ //
1279+ // Requires [user
1280+ // authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
1281+ // with the [authorization
1282+ // scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
1283+ //
1284+ // - `https://www.googleapis.com/auth/chat.users.sections`
1285+ rpc PositionSection (PositionSectionRequest )
1286+ returns (PositionSectionResponse ) {
1287+ option (google.api.http ) = {
1288+ post : "/v1/{name=users/*/sections/*}:position"
1289+ body : "*"
1290+ };
1291+ }
1292+
1293+ // Lists items in a section.
1294+ //
1295+ // Only spaces can be section items. For details, see [Create and organize
1296+ // sections in Google Chat](https://support.google.com/chat/answer/16059854).
1297+ //
1298+ // Requires [user
1299+ // authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
1300+ // with the [authorization
1301+ // scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
1302+ //
1303+ // - `https://www.googleapis.com/auth/chat.users.sections`
1304+ // - `https://www.googleapis.com/auth/chat.users.sections.readonly`
1305+ rpc ListSectionItems (ListSectionItemsRequest )
1306+ returns (ListSectionItemsResponse ) {
1307+ option (google.api.http ) = {
1308+ get : "/v1/{parent=users/*/sections/*}/items"
1309+ };
1310+ option (google.api.method_signature ) = "parent" ;
1311+ }
1312+
1313+ // Moves an item from one section to another. For example, if a section
1314+ // contains spaces, this method can be used to move a space to a different
1315+ // section. For details, see [Create and organize sections in Google
1316+ // Chat](https://support.google.com/chat/answer/16059854).
1317+ //
1318+ // Requires [user
1319+ // authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
1320+ // with the [authorization
1321+ // scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
1322+ //
1323+ // - `https://www.googleapis.com/auth/chat.users.sections`
1324+ rpc MoveSectionItem (MoveSectionItemRequest )
1325+ returns (MoveSectionItemResponse ) {
1326+ option (google.api.http ) = {
1327+ post : "/v1/{name=users/*/sections/*/items/*}:move"
1328+ body : "*"
1329+ };
1330+ option (google.api.method_signature ) = "name,target_section" ;
1331+ }
11941332}
0 commit comments