From 4a028b99837ed019a80967a9b8698e450c1f5959 Mon Sep 17 00:00:00 2001 From: Google APIs Date: Wed, 12 Aug 2026 08:27:17 -0700 Subject: [PATCH] feat: Removal of beta visibility labels on markup_syntax docs: Update reference documentation for messages API markup_syntax fields PiperOrigin-RevId: 963459612 --- google/chat/v1/BUILD.bazel | 2 + google/chat/v1/chat_grpc_service_config.json | 1 + google/chat/v1/chat_service.proto | 3 ++ google/chat/v1/chat_v1.yaml | 6 +++ google/chat/v1/markup_syntax.proto | 47 ++++++++++++++++++++ google/chat/v1/message.proto | 38 ++++++++++++++-- google/chat/v1/space.proto | 1 + 7 files changed, 94 insertions(+), 4 deletions(-) create mode 100644 google/chat/v1/markup_syntax.proto diff --git a/google/chat/v1/BUILD.bazel b/google/chat/v1/BUILD.bazel index d3e0879fea..f3b324c84a 100644 --- a/google/chat/v1/BUILD.bazel +++ b/google/chat/v1/BUILD.bazel @@ -35,6 +35,7 @@ proto_library( "event_payload.proto", "group.proto", "history_state.proto", + "markup_syntax.proto", "matched_url.proto", "membership.proto", "message.proto", @@ -171,6 +172,7 @@ go_gapic_library( transport = "grpc+rest", deps = [ ":chat_go_proto", + "@io_bazel_rules_go//proto/wkt:duration_go_proto", ], ) diff --git a/google/chat/v1/chat_grpc_service_config.json b/google/chat/v1/chat_grpc_service_config.json index b3bedb2299..cf2ef395cb 100644 --- a/google/chat/v1/chat_grpc_service_config.json +++ b/google/chat/v1/chat_grpc_service_config.json @@ -45,6 +45,7 @@ { "service": "google.chat.v1.ChatService", "method": "MoveSectionItem" }, { "service": "google.chat.v1.ChatService", "method": "GetSpaceNotificationSetting" }, { "service": "google.chat.v1.ChatService", "method": "UpdateSpaceNotificationSetting" }, + { "service": "google.chat.v1.ChatService", "method": "ReplaceMessageCards" }, { "service": "google.chat.v1.ChatService", "method": "GetAvailability" }, { "service": "google.chat.v1.ChatService", "method": "UpdateAvailability" }, { "service": "google.chat.v1.ChatService", "method": "MarkAsActive" }, diff --git a/google/chat/v1/chat_service.proto b/google/chat/v1/chat_service.proto index a2fd4a9526..455ba073ce 100644 --- a/google/chat/v1/chat_service.proto +++ b/google/chat/v1/chat_service.proto @@ -51,6 +51,9 @@ service ChatService { "https://www.googleapis.com/auth/chat.admin.memberships.readonly," "https://www.googleapis.com/auth/chat.admin.spaces," "https://www.googleapis.com/auth/chat.admin.spaces.readonly," + "https://www.googleapis.com/auth/chat.app.all.memberships.readonly," + "https://www.googleapis.com/auth/chat.app.all.messages.readonly," + "https://www.googleapis.com/auth/chat.app.all.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," diff --git a/google/chat/v1/chat_v1.yaml b/google/chat/v1/chat_v1.yaml index 4c29fe5596..f99ad0d205 100644 --- a/google/chat/v1/chat_v1.yaml +++ b/google/chat/v1/chat_v1.yaml @@ -144,6 +144,9 @@ authentication: - selector: google.chat.v1.ChatService.GetSpaceEvent oauth: canonical_scopes: |- + https://www.googleapis.com/auth/chat.app.all.memberships.readonly, + https://www.googleapis.com/auth/chat.app.all.messages.readonly, + https://www.googleapis.com/auth/chat.app.all.spaces.readonly, 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, @@ -213,6 +216,9 @@ authentication: - selector: google.chat.v1.ChatService.ListSpaceEvents oauth: canonical_scopes: |- + https://www.googleapis.com/auth/chat.app.all.memberships.readonly, + https://www.googleapis.com/auth/chat.app.all.messages.readonly, + https://www.googleapis.com/auth/chat.app.all.spaces.readonly, 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, diff --git a/google/chat/v1/markup_syntax.proto b/google/chat/v1/markup_syntax.proto new file mode 100644 index 0000000000..d3ef44ceb6 --- /dev/null +++ b/google/chat/v1/markup_syntax.proto @@ -0,0 +1,47 @@ +// 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. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.chat.v1; + +option csharp_namespace = "Google.Apps.Chat.V1"; +option go_package = "cloud.google.com/go/chat/apiv1/chatpb;chatpb"; +option java_multiple_files = true; +option java_outer_classname = "MarkupSyntaxProto"; +option java_package = "com.google.chat.v1"; +option objc_class_prefix = "DYNAPIProto"; +option php_namespace = "Google\\Apps\\Chat\\V1"; +option ruby_package = "Google::Apps::Chat::V1"; + +// Specifies the markup syntax used to format the Chat message text. +// Applies to the `text` field of the `Message` resource. +enum MarkupSyntax { + // Represents the unspecified value. + MARKUP_SYNTAX_UNSPECIFIED = 0; + + // Uses Google Chat's markup syntax. + // See + // https://developers.google.com/workspace/chat/format-messages#format-texts + // for more information. + MARKUP_SYNTAX_CHAT = 1; + + // Uses Markdown syntax. This syntax is based on the + // [CommonMark](https://commonmark.org/help/) specification, with additional + // extensions. + // See + // https://developers.google.com/workspace/chat/format-messages#format-texts + // for more information. + MARKUP_SYNTAX_MARKDOWN = 2; +} diff --git a/google/chat/v1/message.proto b/google/chat/v1/message.proto index 22d53f09d3..37a07c0b9f 100644 --- a/google/chat/v1/message.proto +++ b/google/chat/v1/message.proto @@ -24,6 +24,7 @@ import "google/chat/v1/annotation.proto"; import "google/chat/v1/attachment.proto"; import "google/chat/v1/contextual_addon.proto"; import "google/chat/v1/deletion_metadata.proto"; +import "google/chat/v1/markup_syntax.proto"; import "google/chat/v1/matched_url.proto"; import "google/chat/v1/reaction.proto"; import "google/chat/v1/slash_command.proto"; @@ -145,9 +146,14 @@ message Message { // Optional. An array of // [cards](https://developers.google.com/workspace/chat/api/reference/rest/v1/cards). // - // Only Chat apps can create cards. If your Chat app [authenticates as a + // Chat apps can create cards with [app + // authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app). + // As part of the [Developer Preview + // Program](https://developers.google.com/workspace/preview), if your Chat app + // [authenticates as a // user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), - // the messages can't contain cards. + // it can create card messages. If your Chat app is not part of Developer + // Preview Program, it can't create cards with user authentication. // // To learn how to create a message that contains cards, see [Send a // message](https://developers.google.com/workspace/chat/create-messages). @@ -272,6 +278,10 @@ message Message { // (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app). repeated AccessoryWidget accessory_widgets = 44 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies how the server interprets the message `text` field + // content. + MarkupSyntax markup_syntax = 47 [(google.api.field_behavior) = OPTIONAL]; } // A GIF image that's specified by a URL. @@ -512,6 +522,10 @@ message GetMessageRequest { (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { type: "chat.googleapis.com/Message" } ]; + + // Optional. Specifies the desired output syntax for the Chat message + // `formatted_text` field. + MarkupSyntax markup_syntax = 3 [(google.api.field_behavior) = OPTIONAL]; } // Request to delete a message. @@ -775,6 +789,10 @@ message ListMessagesRequest { // deleted time and metadata about their deletion, but message content is // unavailable. bool show_deleted = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies the desired output syntax for the Chat message + // `formatted_text` field. + MarkupSyntax markup_syntax = 9 [(google.api.field_behavior) = OPTIONAL]; } // Response message for listing messages. @@ -818,9 +836,17 @@ message Dialog { // [card](https://developers.google.com/workspace/chat/api/reference/rest/v1/cards) // in a Google Chat message. // -// Only Chat apps can create cards. If your Chat app [authenticates as a +// Chat apps can create cards with [app +// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app). +// As part of the [Developer Preview +// Program](https://developers.google.com/workspace/preview), if your Chat app +// [authenticates as a // user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), -// the message can't contain cards. +// it can create card messages. If your Chat app is not part of Developer +// Preview Program, it can't create cards with user authentication. +// +// To learn how to create a message that contains cards, see [Send a +// message](https://developers.google.com/workspace/chat/create-messages). // // [Card builder](https://addons.gsuite.google.com/uikit/builder) message CardWithId { @@ -1019,6 +1045,10 @@ message SearchMessagesRequest { // is supported, and it must be specified after the order attribute. string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; + // Optional. Specifies the desired output syntax for the Chat message + // `formatted_text` field. + MarkupSyntax markup_syntax = 6 [(google.api.field_behavior) = OPTIONAL]; + // Optional. Specifies what kind of search results view to return. The default // is `SEARCH_MESSAGES_VIEW_BASIC`. SearchMessagesView view = 7 [(google.api.field_behavior) = OPTIONAL]; diff --git a/google/chat/v1/space.proto b/google/chat/v1/space.proto index b2750239ea..8c3cf641fd 100644 --- a/google/chat/v1/space.proto +++ b/google/chat/v1/space.proto @@ -916,6 +916,7 @@ message SearchSpacesRequest { // // - `create_time DESC` // - `relevance DESC` + // [Developer Preview](https://developers.google.com/workspace/preview). string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; }