Skip to content

Commit 9c99502

Browse files
feat: Support app authentication with admin-consent scopes for Chat API ListMessages, GetMessage, GetSpaceEvent and ListSpaceEvents (#33662)
feat: Addition of Section and SectionItem APIs PiperOrigin-RevId: 893488928 Source-Link: googleapis/googleapis@76fdbf7 Source-Link: googleapis/googleapis-gen@b4ed902 Copy-Tag: eyJwIjoiZ29vZ2xlLWFwcHMtY2hhdC12MS8uT3dsQm90LnlhbWwiLCJoIjoiYjRlZDkwMjQ5NzE3YzE3OTlhYjUzZjMzYzE0MjhmMmY1YTg5MTE4ZiJ9 * 🦉 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 * 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: eyJwIjoiZ29vZ2xlLWFwcHMtY2hhdC12MS8uT3dsQm90LnlhbWwiLCJoIjoiZWVhYzhjYTY2MTNhOWJjZmQ5MGMwN2RlNzhjYTc2ZDU4YzAwYmJiZiJ9 * 🦉 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>
1 parent 5122ec2 commit 9c99502

24 files changed

Lines changed: 4470 additions & 340 deletions

google-apps-chat-v1/.owlbot-manifest.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
"lib/google/chat/v1/membership_pb.rb",
3939
"lib/google/chat/v1/message_pb.rb",
4040
"lib/google/chat/v1/reaction_pb.rb",
41+
"lib/google/chat/v1/section_pb.rb",
4142
"lib/google/chat/v1/slash_command_pb.rb",
4243
"lib/google/chat/v1/space_event_pb.rb",
4344
"lib/google/chat/v1/space_notification_setting_pb.rb",
@@ -66,6 +67,7 @@
6667
"proto_docs/google/chat/v1/membership.rb",
6768
"proto_docs/google/chat/v1/message.rb",
6869
"proto_docs/google/chat/v1/reaction.rb",
70+
"proto_docs/google/chat/v1/section.rb",
6971
"proto_docs/google/chat/v1/slash_command.rb",
7072
"proto_docs/google/chat/v1/space.rb",
7173
"proto_docs/google/chat/v1/space_event.rb",
@@ -88,11 +90,13 @@
8890
"snippets/chat_service/create_membership.rb",
8991
"snippets/chat_service/create_message.rb",
9092
"snippets/chat_service/create_reaction.rb",
93+
"snippets/chat_service/create_section.rb",
9194
"snippets/chat_service/create_space.rb",
9295
"snippets/chat_service/delete_custom_emoji.rb",
9396
"snippets/chat_service/delete_membership.rb",
9497
"snippets/chat_service/delete_message.rb",
9598
"snippets/chat_service/delete_reaction.rb",
99+
"snippets/chat_service/delete_section.rb",
96100
"snippets/chat_service/delete_space.rb",
97101
"snippets/chat_service/find_direct_message.rb",
98102
"snippets/chat_service/get_attachment.rb",
@@ -108,12 +112,17 @@
108112
"snippets/chat_service/list_memberships.rb",
109113
"snippets/chat_service/list_messages.rb",
110114
"snippets/chat_service/list_reactions.rb",
115+
"snippets/chat_service/list_section_items.rb",
116+
"snippets/chat_service/list_sections.rb",
111117
"snippets/chat_service/list_space_events.rb",
112118
"snippets/chat_service/list_spaces.rb",
119+
"snippets/chat_service/move_section_item.rb",
120+
"snippets/chat_service/position_section.rb",
113121
"snippets/chat_service/search_spaces.rb",
114122
"snippets/chat_service/set_up_space.rb",
115123
"snippets/chat_service/update_membership.rb",
116124
"snippets/chat_service/update_message.rb",
125+
"snippets/chat_service/update_section.rb",
117126
"snippets/chat_service/update_space.rb",
118127
"snippets/chat_service/update_space_notification_setting.rb",
119128
"snippets/chat_service/update_space_read_state.rb",

google-apps-chat-v1/gapic_metadata.json

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,41 @@
184184
"methods": [
185185
"update_space_notification_setting"
186186
]
187+
},
188+
"CreateSection": {
189+
"methods": [
190+
"create_section"
191+
]
192+
},
193+
"DeleteSection": {
194+
"methods": [
195+
"delete_section"
196+
]
197+
},
198+
"UpdateSection": {
199+
"methods": [
200+
"update_section"
201+
]
202+
},
203+
"ListSections": {
204+
"methods": [
205+
"list_sections"
206+
]
207+
},
208+
"PositionSection": {
209+
"methods": [
210+
"position_section"
211+
]
212+
},
213+
"ListSectionItems": {
214+
"methods": [
215+
"list_section_items"
216+
]
217+
},
218+
"MoveSectionItem": {
219+
"methods": [
220+
"move_section_item"
221+
]
187222
}
188223
}
189224
}

google-apps-chat-v1/lib/google/apps/chat/v1/chat_service/client.rb

Lines changed: 1051 additions & 195 deletions
Large diffs are not rendered by default.

google-apps-chat-v1/lib/google/apps/chat/v1/chat_service/credentials.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,11 @@ class Credentials < ::Google::Auth::Credentials
3333
"https://www.googleapis.com/auth/chat.admin.spaces.readonly",
3434
"https://www.googleapis.com/auth/chat.app.delete",
3535
"https://www.googleapis.com/auth/chat.app.memberships",
36+
"https://www.googleapis.com/auth/chat.app.memberships.readonly",
3637
"https://www.googleapis.com/auth/chat.app.messages.readonly",
3738
"https://www.googleapis.com/auth/chat.app.spaces",
3839
"https://www.googleapis.com/auth/chat.app.spaces.create",
40+
"https://www.googleapis.com/auth/chat.app.spaces.readonly",
3941
"https://www.googleapis.com/auth/chat.bot",
4042
"https://www.googleapis.com/auth/chat.customemojis",
4143
"https://www.googleapis.com/auth/chat.customemojis.readonly",
@@ -55,6 +57,8 @@ class Credentials < ::Google::Auth::Credentials
5557
"https://www.googleapis.com/auth/chat.spaces.readonly",
5658
"https://www.googleapis.com/auth/chat.users.readstate",
5759
"https://www.googleapis.com/auth/chat.users.readstate.readonly",
60+
"https://www.googleapis.com/auth/chat.users.sections",
61+
"https://www.googleapis.com/auth/chat.users.sections.readonly",
5862
"https://www.googleapis.com/auth/chat.users.spacesettings"
5963
]
6064
self.env_vars = [

google-apps-chat-v1/lib/google/apps/chat/v1/chat_service/paths.rb

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,42 @@ def reaction_path space:, message:, reaction:
129129
"spaces/#{space}/messages/#{message}/reactions/#{reaction}"
130130
end
131131

132+
##
133+
# Create a fully-qualified Section resource string.
134+
#
135+
# The resource will be in the following format:
136+
#
137+
# `users/{user}/sections/{section}`
138+
#
139+
# @param user [String]
140+
# @param section [String]
141+
#
142+
# @return [::String]
143+
def section_path user:, section:
144+
raise ::ArgumentError, "user cannot contain /" if user.to_s.include? "/"
145+
146+
"users/#{user}/sections/#{section}"
147+
end
148+
149+
##
150+
# Create a fully-qualified SectionItem resource string.
151+
#
152+
# The resource will be in the following format:
153+
#
154+
# `users/{user}/sections/{section}/items/{item}`
155+
#
156+
# @param user [String]
157+
# @param section [String]
158+
# @param item [String]
159+
#
160+
# @return [::String]
161+
def section_item_path user:, section:, item:
162+
raise ::ArgumentError, "user cannot contain /" if user.to_s.include? "/"
163+
raise ::ArgumentError, "section cannot contain /" if section.to_s.include? "/"
164+
165+
"users/#{user}/sections/#{section}/items/#{item}"
166+
end
167+
132168
##
133169
# Create a fully-qualified Space resource string.
134170
#
@@ -230,6 +266,20 @@ def thread_read_state_path user:, space:, thread:
230266
"users/#{user}/spaces/#{space}/threads/#{thread}/threadReadState"
231267
end
232268

269+
##
270+
# Create a fully-qualified User resource string.
271+
#
272+
# The resource will be in the following format:
273+
#
274+
# `users/{user}`
275+
#
276+
# @param user [String]
277+
#
278+
# @return [::String]
279+
def user_path user:
280+
"users/#{user}"
281+
end
282+
233283
extend self
234284
end
235285
end

0 commit comments

Comments
 (0)