Skip to content
Open
3 changes: 2 additions & 1 deletion packages/google-chat/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"extends": "./node_modules/gts"
"extends": "./node_modules/gts",
"root": true
}
7 changes: 7 additions & 0 deletions packages/google-chat/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,13 @@ Samples are in the [`samples/`][homepage_samples] directory. Each sample's `READ
| create membership | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.create_membership.js) |
| create message | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.create_message.js) |
| create reaction | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.create_reaction.js) |
| create section | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.create_section.js) |
| create space | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.create_space.js) |
| 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) |
| delete membership | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.delete_membership.js) |
| delete message | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.delete_message.js) |
| delete reaction | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.delete_reaction.js) |
| delete section | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.delete_section.js) |
| delete space | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.delete_space.js) |
| 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) |
| get attachment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.get_attachment.js) |
Expand All @@ -82,12 +84,17 @@ Samples are in the [`samples/`][homepage_samples] directory. Each sample's `READ
| list memberships | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.list_memberships.js) |
| list messages | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.list_messages.js) |
| list reactions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.list_reactions.js) |
| 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) |
| list sections | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.list_sections.js) |
| 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) |
| list spaces | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.list_spaces.js) |
| 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) |
| position section | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.position_section.js) |
| search spaces | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.search_spaces.js) |
| 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) |
| update membership | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.update_membership.js) |
| update message | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.update_message.js) |
| update section | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.update_section.js) |
| update space | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-chat/samples/generated/v1/chat_service.update_space.js) |
| 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) |
| 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) |
Expand Down
164 changes: 152 additions & 12 deletions packages/google-chat/protos/google/chat/v1/chat_service.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2025 Google LLC
// Copyright 2026 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -22,6 +22,7 @@ import "google/chat/v1/attachment.proto";
import "google/chat/v1/membership.proto";
import "google/chat/v1/message.proto";
import "google/chat/v1/reaction.proto";
import "google/chat/v1/section.proto";
import "google/chat/v1/space.proto";
import "google/chat/v1/space_event.proto";
import "google/chat/v1/space_notification_setting.proto";
Expand Down Expand Up @@ -51,9 +52,11 @@ service ChatService {
"https://www.googleapis.com/auth/chat.admin.spaces.readonly,"
"https://www.googleapis.com/auth/chat.app.delete,"
"https://www.googleapis.com/auth/chat.app.memberships,"
"https://www.googleapis.com/auth/chat.app.memberships.readonly,"
"https://www.googleapis.com/auth/chat.app.messages.readonly,"
"https://www.googleapis.com/auth/chat.app.spaces,"
"https://www.googleapis.com/auth/chat.app.spaces.create,"
"https://www.googleapis.com/auth/chat.app.spaces.readonly,"
"https://www.googleapis.com/auth/chat.bot,"
"https://www.googleapis.com/auth/chat.customemojis,"
"https://www.googleapis.com/auth/chat.customemojis.readonly,"
Expand All @@ -73,6 +76,8 @@ service ChatService {
"https://www.googleapis.com/auth/chat.spaces.readonly,"
"https://www.googleapis.com/auth/chat.users.readstate,"
"https://www.googleapis.com/auth/chat.users.readstate.readonly,"
"https://www.googleapis.com/auth/chat.users.sections,"
"https://www.googleapis.com/auth/chat.users.sections.readonly,"
"https://www.googleapis.com/auth/chat.users.spacesettings";

// Creates a message in a Google Chat space. For an example, see [Send a
Expand Down Expand Up @@ -142,9 +147,8 @@ service ChatService {
// - [App
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
// with [administrator
// approval](https://support.google.com/a?p=chat-app-auth) in
// [Developer Preview](https://developers.google.com/workspace/preview)
// with the authorization scope:
// approval](https://support.google.com/a?p=chat-app-auth)
// with the authorization scope:
// - `https://www.googleapis.com/auth/chat.app.messages.readonly`. When
// using this authentication scope, this method only returns public
// messages in a space. It doesn't include private messages.
Expand Down Expand Up @@ -253,8 +257,7 @@ service ChatService {
// that invoke the Chat app.
// - `https://www.googleapis.com/auth/chat.app.messages.readonly`
// with [administrator
// approval](https://support.google.com/a?p=chat-app-auth) (available in
// [Developer Preview](https://developers.google.com/workspace/preview)).
// approval](https://support.google.com/a?p=chat-app-auth).
// When using this authentication scope,
// this method returns details about a public message in a space.
//
Expand Down Expand Up @@ -1074,12 +1077,13 @@ service ChatService {
// - [App
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
// with [administrator
// approval](https://support.google.com/a?p=chat-app-auth) in
// [Developer Preview](https://developers.google.com/workspace/preview)
// with one of the following authorization scopes:
// approval](https://support.google.com/a?p=chat-app-auth)
// with one of the following authorization scopes:
// - `https://www.googleapis.com/auth/chat.app.spaces`
// - `https://www.googleapis.com/auth/chat.app.spaces.readonly`
// - `https://www.googleapis.com/auth/chat.app.messages.readonly`
// - `https://www.googleapis.com/auth/chat.app.memberships`
// - `https://www.googleapis.com/auth/chat.app.memberships.readonly`
//
// - [User
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
Expand Down Expand Up @@ -1123,12 +1127,13 @@ service ChatService {
// - [App
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
// with [administrator
// approval](https://support.google.com/a?p=chat-app-auth) in
// [Developer Preview](https://developers.google.com/workspace/preview)
// with one of the following authorization scopes:
// approval](https://support.google.com/a?p=chat-app-auth)
// with one of the following authorization scopes:
// - `https://www.googleapis.com/auth/chat.app.spaces`
// - `https://www.googleapis.com/auth/chat.app.spaces.readonly`
// - `https://www.googleapis.com/auth/chat.app.messages.readonly`
// - `https://www.googleapis.com/auth/chat.app.memberships`
// - `https://www.googleapis.com/auth/chat.app.memberships.readonly`
//
// - [User
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
Expand Down Expand Up @@ -1191,4 +1196,139 @@ service ChatService {
option (google.api.method_signature) =
"space_notification_setting,update_mask";
}

// Creates a section in Google Chat. Sections help users group conversations
// and customize the list of spaces displayed in Chat navigation panel. Only
// sections of type `CUSTOM_SECTION` can be created. For details, see [Create
// and organize sections in Google
// Chat](https://support.google.com/chat/answer/16059854).
//
// Requires [user
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
// with the [authorization
// scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
//
// - `https://www.googleapis.com/auth/chat.users.sections`
rpc CreateSection(CreateSectionRequest) returns (Section) {
option (google.api.http) = {
post: "/v1/{parent=users/*}/sections"
body: "section"
};
option (google.api.method_signature) = "parent,section";
}

// Deletes a section of type `CUSTOM_SECTION`.
//
// If the section contains items, such as spaces, the items are moved to
// Google Chat's default sections and are not deleted.
//
// For details, see [Create and organize sections in Google
// Chat](https://support.google.com/chat/answer/16059854).
//
// Requires [user
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
// with the [authorization
// scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
//
// - `https://www.googleapis.com/auth/chat.users.sections`
rpc DeleteSection(DeleteSectionRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
delete: "/v1/{name=users/*/sections/*}"
};
option (google.api.method_signature) = "name";
}

// Updates a section. Only sections of type `CUSTOM_SECTION` can be updated.
// For details, see [Create and organize sections in Google
// Chat](https://support.google.com/chat/answer/16059854).
//
// Requires [user
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
// with the [authorization
// scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
//
// - `https://www.googleapis.com/auth/chat.users.sections`
rpc UpdateSection(UpdateSectionRequest) returns (Section) {
option (google.api.http) = {
patch: "/v1/{section.name=users/*/sections/*}"
body: "section"
};
option (google.api.method_signature) = "section,update_mask";
}

// Lists sections available to the Chat user. Sections help users group their
// conversations and customize the list of spaces displayed in Chat
// navigation panel. For details, see [Create and organize sections in Google
// Chat](https://support.google.com/chat/answer/16059854).
//
// Requires [user
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
// with the [authorization
// scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
//
// - `https://www.googleapis.com/auth/chat.users.sections`
// - `https://www.googleapis.com/auth/chat.users.sections.readonly`
rpc ListSections(ListSectionsRequest) returns (ListSectionsResponse) {
option (google.api.http) = {
get: "/v1/{parent=users/*}/sections"
};
option (google.api.method_signature) = "parent";
}

// Changes the sort order of a section. For details, see [Create and organize
// sections in Google Chat](https://support.google.com/chat/answer/16059854).
//
// Requires [user
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
// with the [authorization
// scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
//
// - `https://www.googleapis.com/auth/chat.users.sections`
rpc PositionSection(PositionSectionRequest)
returns (PositionSectionResponse) {
option (google.api.http) = {
post: "/v1/{name=users/*/sections/*}:position"
body: "*"
};
}

// Lists items in a section.
//
// Only spaces can be section items. For details, see [Create and organize
// sections in Google Chat](https://support.google.com/chat/answer/16059854).
//
// Requires [user
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
// with the [authorization
// scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
//
// - `https://www.googleapis.com/auth/chat.users.sections`
// - `https://www.googleapis.com/auth/chat.users.sections.readonly`
rpc ListSectionItems(ListSectionItemsRequest)
returns (ListSectionItemsResponse) {
option (google.api.http) = {
get: "/v1/{parent=users/*/sections/*}/items"
};
option (google.api.method_signature) = "parent";
}

// Moves an item from one section to another. For example, if a section
// contains spaces, this method can be used to move a space to a different
// section. For details, see [Create and organize sections in Google
// Chat](https://support.google.com/chat/answer/16059854).
//
// Requires [user
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
// with the [authorization
// scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
//
// - `https://www.googleapis.com/auth/chat.users.sections`
rpc MoveSectionItem(MoveSectionItemRequest)
returns (MoveSectionItemResponse) {
option (google.api.http) = {
post: "/v1/{name=users/*/sections/*/items/*}:move"
body: "*"
};
option (google.api.method_signature) = "name,target_section";
}
}
Loading
Loading