Skip to content

Commit 1937163

Browse files
gcf-owl-bot[bot]pearigeeshivanee-p
authored
chore: [chat] migrate generator to google-cloud-node (#7947)
* feat: Addition of Section and SectionItem APIs PiperOrigin-RevId: 893488928 Source-Link: googleapis/googleapis@76fdbf7 Source-Link: googleapis/googleapis-gen@b4ed902 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNoYXQvLk93bEJvdC55YW1sIiwiaCI6ImI0ZWQ5MDI0OTcxN2MxNzk5YWI1M2YzM2MxNDI4ZjJmNWE4OTExOGYifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: Support app authentication with admin-consent scopes for Chat API ListMessages, GetMessage, GetSpaceEvent and ListSpaceEvents docs: Update reference documentation for Chat API ListMessages, GetMessage, GetSpaceEvent and ListSpaceEvents. PiperOrigin-RevId: 893619899 Source-Link: googleapis/googleapis@8d52a0b Source-Link: googleapis/googleapis-gen@eeac8ca Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNoYXQvLk93bEJvdC55YW1sIiwiaCI6ImVlYWM4Y2E2NjEzYTliY2ZkOTBjMDdkZTc4Y2E3NmQ1OGMwMGJiYmYifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * chore: migrate generator to google-cloud-node chore: update generator system tests PiperOrigin-RevId: 896174961 Source-Link: googleapis/googleapis@2233f63 Source-Link: googleapis/googleapis-gen@c4a8c4e Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNoYXQvLk93bEJvdC55YW1sIiwiaCI6ImM0YThjNGVlZjk1OWFhNzQ0ZmIxYzY3MTQ4NzVmYTI5NWUwNmFhZDMifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 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> Co-authored-by: Gabe Pearhill <86282859+pearigee@users.noreply.github.com> Co-authored-by: Shivanee <46910562+shivanee-p@users.noreply.github.com>
1 parent f6f9040 commit 1937163

21 files changed

Lines changed: 11344 additions & 2144 deletions
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
{
2-
"extends": "./node_modules/gts"
2+
"extends": "./node_modules/gts",
3+
"root": true
34
}

packages/google-chat/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,13 @@ Samples are in the [`samples/`][homepage_samples] directory. Each sample's `READ
6262
| create membership | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.create_membership.js) |
6363
| create message | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.create_message.js) |
6464
| 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) |
6566
| create space | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.create_space.js) |
6667
| 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) |
6768
| delete membership | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.delete_membership.js) |
6869
| delete message | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.delete_message.js) |
6970
| 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) |
7072
| delete space | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.delete_space.js) |
7173
| 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) |
7274
| 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
8284
| list memberships | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.list_memberships.js) |
8385
| list messages | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.list_messages.js) |
8486
| 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) |
8589
| 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) |
8690
| 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) |
8793
| search spaces | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.search_spaces.js) |
8894
| 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) |
8995
| update membership | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.update_membership.js) |
9096
| 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) |
9198
| update space | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.update_space.js) |
9299
| 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) |
93100
| 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) |

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

Lines changed: 152 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
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";
2222
import "google/chat/v1/membership.proto";
2323
import "google/chat/v1/message.proto";
2424
import "google/chat/v1/reaction.proto";
25+
import "google/chat/v1/section.proto";
2526
import "google/chat/v1/space.proto";
2627
import "google/chat/v1/space_event.proto";
2728
import "google/chat/v1/space_notification_setting.proto";
@@ -51,9 +52,11 @@ service ChatService {
5152
"https://www.googleapis.com/auth/chat.admin.spaces.readonly,"
5253
"https://www.googleapis.com/auth/chat.app.delete,"
5354
"https://www.googleapis.com/auth/chat.app.memberships,"
55+
"https://www.googleapis.com/auth/chat.app.memberships.readonly,"
5456
"https://www.googleapis.com/auth/chat.app.messages.readonly,"
5557
"https://www.googleapis.com/auth/chat.app.spaces,"
5658
"https://www.googleapis.com/auth/chat.app.spaces.create,"
59+
"https://www.googleapis.com/auth/chat.app.spaces.readonly,"
5760
"https://www.googleapis.com/auth/chat.bot,"
5861
"https://www.googleapis.com/auth/chat.customemojis,"
5962
"https://www.googleapis.com/auth/chat.customemojis.readonly,"
@@ -73,6 +76,8 @@ service ChatService {
7376
"https://www.googleapis.com/auth/chat.spaces.readonly,"
7477
"https://www.googleapis.com/auth/chat.users.readstate,"
7578
"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,"
7681
"https://www.googleapis.com/auth/chat.users.spacesettings";
7782

7883
// Creates a message in a Google Chat space. For an example, see [Send a
@@ -142,9 +147,8 @@ service ChatService {
142147
// - [App
143148
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
144149
// 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:
150+
// approval](https://support.google.com/a?p=chat-app-auth)
151+
// with the authorization scope:
148152
// - `https://www.googleapis.com/auth/chat.app.messages.readonly`. When
149153
// using this authentication scope, this method only returns public
150154
// messages in a space. It doesn't include private messages.
@@ -253,8 +257,7 @@ service ChatService {
253257
// that invoke the Chat app.
254258
// - `https://www.googleapis.com/auth/chat.app.messages.readonly`
255259
// with [administrator
256-
// approval](https://support.google.com/a?p=chat-app-auth) (available in
257-
// [Developer Preview](https://developers.google.com/workspace/preview)).
260+
// approval](https://support.google.com/a?p=chat-app-auth).
258261
// When using this authentication scope,
259262
// this method returns details about a public message in a space.
260263
//
@@ -1074,12 +1077,13 @@ service ChatService {
10741077
// - [App
10751078
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
10761079
// 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+
// approval](https://support.google.com/a?p=chat-app-auth)
1081+
// with one of the following authorization scopes:
10801082
// - `https://www.googleapis.com/auth/chat.app.spaces`
1083+
// - `https://www.googleapis.com/auth/chat.app.spaces.readonly`
10811084
// - `https://www.googleapis.com/auth/chat.app.messages.readonly`
10821085
// - `https://www.googleapis.com/auth/chat.app.memberships`
1086+
// - `https://www.googleapis.com/auth/chat.app.memberships.readonly`
10831087
//
10841088
// - [User
10851089
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
@@ -1123,12 +1127,13 @@ service ChatService {
11231127
// - [App
11241128
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
11251129
// 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:
1130+
// approval](https://support.google.com/a?p=chat-app-auth)
1131+
// with one of the following authorization scopes:
11291132
// - `https://www.googleapis.com/auth/chat.app.spaces`
1133+
// - `https://www.googleapis.com/auth/chat.app.spaces.readonly`
11301134
// - `https://www.googleapis.com/auth/chat.app.messages.readonly`
11311135
// - `https://www.googleapis.com/auth/chat.app.memberships`
1136+
// - `https://www.googleapis.com/auth/chat.app.memberships.readonly`
11321137
//
11331138
// - [User
11341139
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
@@ -1191,4 +1196,139 @@ service ChatService {
11911196
option (google.api.method_signature) =
11921197
"space_notification_setting,update_mask";
11931198
}
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+
}
11941334
}

0 commit comments

Comments
 (0)