@google-apps/chat 0.2.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/README.md +4 -0
- package/build/protos/google/apps/card/v1/card.proto +242 -160
- package/build/protos/google/chat/v1/action_status.proto +1 -1
- package/build/protos/google/chat/v1/annotation.proto +2 -2
- package/build/protos/google/chat/v1/attachment.proto +9 -0
- package/build/protos/google/chat/v1/chat_service.proto +135 -81
- package/build/protos/google/chat/v1/contextual_addon.proto +1 -1
- package/build/protos/google/chat/v1/membership.proto +33 -11
- package/build/protos/google/chat/v1/message.proto +71 -113
- package/build/protos/google/chat/v1/reaction.proto +4 -2
- package/build/protos/google/chat/v1/slash_command.proto +3 -2
- package/build/protos/google/chat/v1/space.proto +28 -17
- package/build/protos/google/chat/v1/space_read_state.proto +112 -0
- package/build/protos/google/chat/v1/space_setup.proto +1 -0
- package/build/protos/google/chat/v1/thread_read_state.proto +74 -0
- package/build/protos/google/chat/v1/user.proto +3 -2
- package/build/protos/google/chat/v1/widgets.proto +4 -4
- package/build/protos/protos.d.ts +887 -76
- package/build/protos/protos.js +1976 -192
- package/build/protos/protos.json +210 -12
- package/build/src/v1/chat_service_client.d.ts +368 -134
- package/build/src/v1/chat_service_client.js +196 -24
- package/build/src/v1/chat_service_client.js.map +1 -1
- package/build/src/v1/chat_service_client_config.json +20 -0
- package/package.json +1 -1
|
@@ -20,6 +20,7 @@ import "google/api/field_behavior.proto";
|
|
|
20
20
|
import "google/api/resource.proto";
|
|
21
21
|
import "google/chat/v1/group.proto";
|
|
22
22
|
import "google/chat/v1/user.proto";
|
|
23
|
+
import "google/protobuf/field_mask.proto";
|
|
23
24
|
import "google/protobuf/timestamp.proto";
|
|
24
25
|
|
|
25
26
|
option csharp_namespace = "Google.Apps.Chat.V1";
|
|
@@ -89,7 +90,6 @@ message Membership {
|
|
|
89
90
|
// Optional. User's role within a Chat space, which determines their permitted
|
|
90
91
|
// actions in the space.
|
|
91
92
|
//
|
|
92
|
-
// [Developer Preview](https://developers.google.com/workspace/preview):
|
|
93
93
|
// This field can only be used as input in `UpdateMembership`.
|
|
94
94
|
MembershipRole role = 7 [(google.api.field_behavior) = OPTIONAL];
|
|
95
95
|
|
|
@@ -98,9 +98,9 @@ message Membership {
|
|
|
98
98
|
oneof memberType {
|
|
99
99
|
// The Google Chat user or app the membership corresponds to.
|
|
100
100
|
// If your Chat app [authenticates as a
|
|
101
|
-
// user](https://developers.google.com/chat/
|
|
102
|
-
// output populates the
|
|
103
|
-
// [user](https://developers.google.com/chat/api/reference/rest/v1/User)
|
|
101
|
+
// user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user),
|
|
102
|
+
// the output populates the
|
|
103
|
+
// [user](https://developers.google.com/workspace/chat/api/reference/rest/v1/User)
|
|
104
104
|
// `name` and `type`.
|
|
105
105
|
User member = 3;
|
|
106
106
|
|
|
@@ -127,6 +127,7 @@ message Membership {
|
|
|
127
127
|
];
|
|
128
128
|
}
|
|
129
129
|
|
|
130
|
+
// Request message for creating a membership.
|
|
130
131
|
message CreateMembershipRequest {
|
|
131
132
|
// Required. The resource name of the space for which to create the
|
|
132
133
|
// membership.
|
|
@@ -158,6 +159,23 @@ message CreateMembershipRequest {
|
|
|
158
159
|
Membership membership = 2 [(google.api.field_behavior) = REQUIRED];
|
|
159
160
|
}
|
|
160
161
|
|
|
162
|
+
// Request message for updating a membership.
|
|
163
|
+
message UpdateMembershipRequest {
|
|
164
|
+
// Required. The membership to update. Only fields specified by `update_mask`
|
|
165
|
+
// are updated.
|
|
166
|
+
Membership membership = 1 [(google.api.field_behavior) = REQUIRED];
|
|
167
|
+
|
|
168
|
+
// Required. The field paths to update. Separate multiple values with commas
|
|
169
|
+
// or use `*` to update all field paths.
|
|
170
|
+
//
|
|
171
|
+
// Currently supported field paths:
|
|
172
|
+
//
|
|
173
|
+
// - `role`
|
|
174
|
+
google.protobuf.FieldMask update_mask = 2
|
|
175
|
+
[(google.api.field_behavior) = REQUIRED];
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
// Request message for listing memberships.
|
|
161
179
|
message ListMembershipsRequest {
|
|
162
180
|
// Required. The resource name of the space for which to fetch a membership
|
|
163
181
|
// list.
|
|
@@ -175,8 +193,8 @@ message ListMembershipsRequest {
|
|
|
175
193
|
//
|
|
176
194
|
// If unspecified, at most 100 memberships are returned.
|
|
177
195
|
//
|
|
178
|
-
// The maximum value is
|
|
179
|
-
// automatically changed to
|
|
196
|
+
// The maximum value is 1000. If you use a value more than 1000, it's
|
|
197
|
+
// automatically changed to 1000.
|
|
180
198
|
//
|
|
181
199
|
// Negative values return an `INVALID_ARGUMENT` error.
|
|
182
200
|
int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
|
|
@@ -192,9 +210,9 @@ message ListMembershipsRequest {
|
|
|
192
210
|
// Optional. A query filter.
|
|
193
211
|
//
|
|
194
212
|
// You can filter memberships by a member's role
|
|
195
|
-
// ([`role`](https://developers.google.com/chat/api/reference/rest/v1/spaces.members#membershiprole))
|
|
213
|
+
// ([`role`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.members#membershiprole))
|
|
196
214
|
// and type
|
|
197
|
-
// ([`member.type`](https://developers.google.com/chat/api/reference/rest/v1/User#type)).
|
|
215
|
+
// ([`member.type`](https://developers.google.com/workspace/chat/api/reference/rest/v1/User#type)).
|
|
198
216
|
//
|
|
199
217
|
// To filter by role, set `role` to `ROLE_MEMBER` or `ROLE_MANAGER`.
|
|
200
218
|
//
|
|
@@ -217,6 +235,7 @@ message ListMembershipsRequest {
|
|
|
217
235
|
// role = "ROLE_MANAGER" AND role = "ROLE_MEMBER"
|
|
218
236
|
// ```
|
|
219
237
|
//
|
|
238
|
+
//
|
|
220
239
|
// Invalid queries are rejected by the server with an `INVALID_ARGUMENT`
|
|
221
240
|
// error.
|
|
222
241
|
string filter = 5 [(google.api.field_behavior) = OPTIONAL];
|
|
@@ -237,10 +256,11 @@ message ListMembershipsRequest {
|
|
|
237
256
|
// that don't match the filter criteria aren't returned.
|
|
238
257
|
//
|
|
239
258
|
// Currently requires [user
|
|
240
|
-
// authentication](https://developers.google.com/chat/
|
|
259
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
|
|
241
260
|
bool show_invited = 7 [(google.api.field_behavior) = OPTIONAL];
|
|
242
261
|
}
|
|
243
262
|
|
|
263
|
+
// Response to list memberships of the space.
|
|
244
264
|
message ListMembershipsResponse {
|
|
245
265
|
// Unordered list. List of memberships in the requested (or first) page.
|
|
246
266
|
repeated Membership memberships = 1
|
|
@@ -251,6 +271,7 @@ message ListMembershipsResponse {
|
|
|
251
271
|
string next_page_token = 2;
|
|
252
272
|
}
|
|
253
273
|
|
|
274
|
+
// Request to get a membership of a space.
|
|
254
275
|
message GetMembershipRequest {
|
|
255
276
|
// Required. Resource name of the membership to retrieve.
|
|
256
277
|
//
|
|
@@ -260,8 +281,8 @@ message GetMembershipRequest {
|
|
|
260
281
|
// Format: `spaces/{space}/members/{member}` or `spaces/{space}/members/app`
|
|
261
282
|
//
|
|
262
283
|
// When [authenticated as a
|
|
263
|
-
// user](https://developers.google.com/chat/
|
|
264
|
-
// use the user's email as an alias for `{member}`. For example,
|
|
284
|
+
// user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user),
|
|
285
|
+
// you can use the user's email as an alias for `{member}`. For example,
|
|
265
286
|
// `spaces/{space}/members/example@gmail.com` where `example@gmail.com` is the
|
|
266
287
|
// email of the Google Chat user.
|
|
267
288
|
string name = 1 [
|
|
@@ -270,6 +291,7 @@ message GetMembershipRequest {
|
|
|
270
291
|
];
|
|
271
292
|
}
|
|
272
293
|
|
|
294
|
+
// Request to delete a membership in a space.
|
|
273
295
|
message DeleteMembershipRequest {
|
|
274
296
|
// Required. Resource name of the membership to delete. Chat apps can delete
|
|
275
297
|
// human users' or their own memberships. Chat apps can't delete other apps'
|
|
@@ -61,14 +61,14 @@ message Message {
|
|
|
61
61
|
// from the `clientAssignedMessageId` field. For example,
|
|
62
62
|
// `spaces/AAAAAAAAAAA/messages/client-custom-name`. For details, see [Name
|
|
63
63
|
// a
|
|
64
|
-
// message](https://developers.google.com/chat/
|
|
64
|
+
// message](https://developers.google.com/workspace/chat/create-messages#name_a_created_message).
|
|
65
65
|
string name = 1;
|
|
66
66
|
|
|
67
67
|
// Output only. The user who created the message.
|
|
68
68
|
// If your Chat app [authenticates as a
|
|
69
|
-
// user](https://developers.google.com/chat/
|
|
70
|
-
// populates the
|
|
71
|
-
// [user](https://developers.google.com/chat/api/reference/rest/v1/User)
|
|
69
|
+
// user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user),
|
|
70
|
+
// the output populates the
|
|
71
|
+
// [user](https://developers.google.com/workspace/chat/api/reference/rest/v1/User)
|
|
72
72
|
// `name` and `type`.
|
|
73
73
|
User sender = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
|
|
74
74
|
|
|
@@ -96,13 +96,13 @@ message Message {
|
|
|
96
96
|
|
|
97
97
|
// Plain-text body of the message. The first link to an image, video, or web
|
|
98
98
|
// page generates a
|
|
99
|
-
// [preview chip](https://developers.google.com/chat/
|
|
99
|
+
// [preview chip](https://developers.google.com/workspace/chat/preview-links).
|
|
100
100
|
// You can also [@mention a Google Chat
|
|
101
|
-
// user](https://developers.google.com/chat/format-messages#messages-@mention),
|
|
101
|
+
// user](https://developers.google.com/workspace/chat/format-messages#messages-@mention),
|
|
102
102
|
// or everyone in the space.
|
|
103
103
|
//
|
|
104
104
|
// To learn about creating text messages, see [Send a text
|
|
105
|
-
// message](https://developers.google.com/chat/
|
|
105
|
+
// message](https://developers.google.com/workspace/chat/create-messages#create-text-messages).
|
|
106
106
|
string text = 4;
|
|
107
107
|
|
|
108
108
|
// Output only. Contains the message `text` with markups added to communicate
|
|
@@ -110,23 +110,24 @@ message Message {
|
|
|
110
110
|
// but includes the following:
|
|
111
111
|
//
|
|
112
112
|
// * [Markup
|
|
113
|
-
//
|
|
114
|
-
//
|
|
113
|
+
// syntax](https://developers.google.com/workspace/chat/format-messages)
|
|
114
|
+
// for bold, italic, strikethrough, monospace, monospace block, and bulleted
|
|
115
|
+
// list.
|
|
115
116
|
//
|
|
116
117
|
// * [User
|
|
117
|
-
//
|
|
118
|
-
//
|
|
118
|
+
// mentions](https://developers.google.com/workspace/chat/format-messages#messages-@mention)
|
|
119
|
+
// using the format `<users/{user}>`.
|
|
119
120
|
//
|
|
120
121
|
// * Custom hyperlinks using the format `<{url}|{rendered_text}>` where the
|
|
121
|
-
//
|
|
122
|
-
//
|
|
122
|
+
// first string is the URL and the second is the rendered text—for example,
|
|
123
|
+
// `<http://example.com|custom text>`.
|
|
123
124
|
//
|
|
124
125
|
// * Custom emoji using the format `:{emoji_name}:`—for example, `:smile:`.
|
|
125
|
-
//
|
|
126
|
+
// This doesn't apply to Unicode emoji, such as `U+1F600` for a grinning
|
|
126
127
|
// face emoji.
|
|
127
128
|
//
|
|
128
129
|
// For more information, see [View text formatting sent in a
|
|
129
|
-
// message](https://developers.google.com/chat/format-messages#view_text_formatting_sent_in_a_message)
|
|
130
|
+
// message](https://developers.google.com/workspace/chat/format-messages#view_text_formatting_sent_in_a_message)
|
|
130
131
|
string formatted_text = 43 [(google.api.field_behavior) = OUTPUT_ONLY];
|
|
131
132
|
|
|
132
133
|
// Deprecated: Use `cards_v2` instead.
|
|
@@ -138,15 +139,14 @@ message Message {
|
|
|
138
139
|
repeated ContextualAddOnMarkup.Card cards = 5 [deprecated = true];
|
|
139
140
|
|
|
140
141
|
// An array of
|
|
141
|
-
// [cards](https://developers.google.com/chat/api/reference/rest/v1/cards).
|
|
142
|
+
// [cards](https://developers.google.com/workspace/chat/api/reference/rest/v1/cards).
|
|
142
143
|
//
|
|
143
144
|
// Only Chat apps can create cards. If your Chat app [authenticates as a
|
|
144
|
-
// user](https://developers.google.com/chat/
|
|
145
|
-
// messages can't contain cards.
|
|
145
|
+
// user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user),
|
|
146
|
+
// the messages can't contain cards.
|
|
146
147
|
//
|
|
147
|
-
// To learn about cards and how to create them, see [
|
|
148
|
-
//
|
|
149
|
-
// cards](https://developers.google.com/chat/ui).
|
|
148
|
+
// To learn about cards and how to create them, see [Send card
|
|
149
|
+
// messages](https://developers.google.com/workspace/chat/create-messages#create).
|
|
150
150
|
//
|
|
151
151
|
// [Card builder](https://addons.gsuite.google.com/uikit/builder)
|
|
152
152
|
repeated CardWithId cards_v2 = 22;
|
|
@@ -157,13 +157,13 @@ message Message {
|
|
|
157
157
|
|
|
158
158
|
// The thread the message belongs to. For example usage, see
|
|
159
159
|
// [Start or reply to a message
|
|
160
|
-
// thread](https://developers.google.com/chat/
|
|
160
|
+
// thread](https://developers.google.com/workspace/chat/create-messages#create-message-thread).
|
|
161
161
|
Thread thread = 11;
|
|
162
162
|
|
|
163
163
|
// If your Chat app [authenticates as a
|
|
164
|
-
// user](https://developers.google.com/chat/
|
|
165
|
-
// populates the
|
|
166
|
-
// [space](https://developers.google.com/chat/api/reference/rest/v1/spaces)
|
|
164
|
+
// user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user),
|
|
165
|
+
// the output populates the
|
|
166
|
+
// [space](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces)
|
|
167
167
|
// `name`.
|
|
168
168
|
Space space = 12;
|
|
169
169
|
|
|
@@ -188,7 +188,7 @@ message Message {
|
|
|
188
188
|
|
|
189
189
|
// Output only. A URL in `spaces.messages.text` that matches a link preview
|
|
190
190
|
// pattern. For more information, see [Preview
|
|
191
|
-
// links](https://developers.google.com/chat/
|
|
191
|
+
// links](https://developers.google.com/workspace/chat/preview-links).
|
|
192
192
|
MatchedUrl matched_url = 20 [(google.api.field_behavior) = OUTPUT_ONLY];
|
|
193
193
|
|
|
194
194
|
// Output only. When `true`, the message is a response in a reply thread. When
|
|
@@ -202,9 +202,9 @@ message Message {
|
|
|
202
202
|
// Optional. A custom ID for the message. You can use field to identify a
|
|
203
203
|
// message, or to get, delete, or update a message. To set a custom ID,
|
|
204
204
|
// specify the
|
|
205
|
-
// [`messageId`](https://developers.google.com/chat/api/reference/rest/v1/spaces.messages/create#body.QUERY_PARAMETERS.message_id)
|
|
205
|
+
// [`messageId`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages/create#body.QUERY_PARAMETERS.message_id)
|
|
206
206
|
// field when you create the message. For details, see [Name a
|
|
207
|
-
// message](https://developers.google.com/chat/
|
|
207
|
+
// message](https://developers.google.com/workspace/chat/create-messages#name_a_created_message).
|
|
208
208
|
string client_assigned_message_id = 32;
|
|
209
209
|
|
|
210
210
|
// Output only. The list of emoji reaction summaries on the message.
|
|
@@ -217,11 +217,12 @@ message Message {
|
|
|
217
217
|
// attachments aren't supported for private messages.
|
|
218
218
|
//
|
|
219
219
|
// Only Chat apps can send private messages. If your Chat app [authenticates
|
|
220
|
-
// as a
|
|
221
|
-
//
|
|
220
|
+
// as a
|
|
221
|
+
// user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
|
|
222
|
+
// to send a message, the message can't be private and must omit this field.
|
|
222
223
|
//
|
|
223
224
|
// For details, see [Send private messages to Google Chat
|
|
224
|
-
// users](https://developers.google.com/chat/
|
|
225
|
+
// users](https://developers.google.com/workspace/chat/private-messages).
|
|
225
226
|
User private_message_viewer = 36 [(google.api.field_behavior) = IMMUTABLE];
|
|
226
227
|
|
|
227
228
|
// Output only. Information about a deleted message. A message is deleted when
|
|
@@ -240,67 +241,13 @@ message Message {
|
|
|
240
241
|
|
|
241
242
|
// One or more interactive widgets that appear at the bottom of a message.
|
|
242
243
|
// You can add accessory widgets to messages that contain text, cards, or both
|
|
243
|
-
// text and cards. Not supported for messages that contain dialogs.
|
|
244
|
+
// text and cards. Not supported for messages that contain dialogs. For
|
|
245
|
+
// details, see [Add interactive widgets at the bottom of a
|
|
246
|
+
// message](https://developers.google.com/workspace/chat/create-messages#add-accessory-widgets).
|
|
244
247
|
//
|
|
245
248
|
// Creating a message with accessory widgets requires [app
|
|
246
249
|
// authentication]
|
|
247
|
-
// (https://developers.google.com/chat/
|
|
248
|
-
//
|
|
249
|
-
// The following example shows a Chat app that uses accessory widgets (thumbs
|
|
250
|
-
// up and thumbs down buttons) in a text message:
|
|
251
|
-
//
|
|
252
|
-
// 
|
|
254
|
-
//
|
|
255
|
-
// The JSON for this example message is the following:
|
|
256
|
-
//
|
|
257
|
-
// ```
|
|
258
|
-
// {
|
|
259
|
-
// "text": "Rate your experience with this Chat app.",
|
|
260
|
-
// "accessoryWidgets": [
|
|
261
|
-
// {
|
|
262
|
-
// "buttonList": {
|
|
263
|
-
// "buttons": [
|
|
264
|
-
// {
|
|
265
|
-
// "icon": {
|
|
266
|
-
// "material_icon": {
|
|
267
|
-
// "name": "thumb_up"
|
|
268
|
-
// }
|
|
269
|
-
// },
|
|
270
|
-
// "color": {
|
|
271
|
-
// "red": 0,
|
|
272
|
-
// "blue": 255,
|
|
273
|
-
// "green": 0
|
|
274
|
-
// },
|
|
275
|
-
// "onClick": {
|
|
276
|
-
// "action": {
|
|
277
|
-
// "function": "doUpvote",
|
|
278
|
-
// }
|
|
279
|
-
// }
|
|
280
|
-
// },
|
|
281
|
-
// {
|
|
282
|
-
// "icon": {
|
|
283
|
-
// "material_icon": {
|
|
284
|
-
// "name": "thumb_down"
|
|
285
|
-
// }
|
|
286
|
-
// },
|
|
287
|
-
// "color": {
|
|
288
|
-
// "red": 0,
|
|
289
|
-
// "blue": 255,
|
|
290
|
-
// "green": 0
|
|
291
|
-
// },
|
|
292
|
-
// "onClick": {
|
|
293
|
-
// "action": {
|
|
294
|
-
// "function": "doDownvote",
|
|
295
|
-
// }
|
|
296
|
-
// }
|
|
297
|
-
// }
|
|
298
|
-
// ]
|
|
299
|
-
// }
|
|
300
|
-
// }
|
|
301
|
-
// ]
|
|
302
|
-
// }
|
|
303
|
-
// ```
|
|
250
|
+
// (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app).
|
|
304
251
|
repeated AccessoryWidget accessory_widgets = 44;
|
|
305
252
|
}
|
|
306
253
|
|
|
@@ -333,10 +280,10 @@ message QuotedMessageMetadata {
|
|
|
333
280
|
|
|
334
281
|
// A thread in a Google Chat space. For example usage, see
|
|
335
282
|
// [Start or reply to a message
|
|
336
|
-
// thread](https://developers.google.com/chat/
|
|
283
|
+
// thread](https://developers.google.com/workspace/chat/create-messages#create-message-thread).
|
|
337
284
|
//
|
|
338
285
|
// If you specify a thread when creating a message, you can set the
|
|
339
|
-
// [`messageReplyOption`](https://developers.google.com/chat/api/reference/rest/v1/spaces.messages/create#messagereplyoption)
|
|
286
|
+
// [`messageReplyOption`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages/create#messagereplyoption)
|
|
340
287
|
// field to determine what happens if no matching thread is found.
|
|
341
288
|
message Thread {
|
|
342
289
|
option (google.api.resource) = {
|
|
@@ -383,7 +330,7 @@ message ActionResponse {
|
|
|
383
330
|
REQUEST_CONFIG = 3;
|
|
384
331
|
|
|
385
332
|
// Presents a
|
|
386
|
-
// [dialog](https://developers.google.com/chat/
|
|
333
|
+
// [dialog](https://developers.google.com/workspace/chat/dialogs).
|
|
387
334
|
DIALOG = 4;
|
|
388
335
|
|
|
389
336
|
// Widget text autocomplete options query.
|
|
@@ -399,6 +346,7 @@ message ActionResponse {
|
|
|
399
346
|
// The response of the updated widget.
|
|
400
347
|
// Used to provide autocomplete options for a widget.
|
|
401
348
|
message UpdatedWidget {
|
|
349
|
+
// The widget updated in response to a user action.
|
|
402
350
|
oneof updated_widget {
|
|
403
351
|
// List of widget autocomplete results
|
|
404
352
|
SelectionItems suggestions = 1;
|
|
@@ -417,7 +365,7 @@ message ActionResponse {
|
|
|
417
365
|
string url = 2 [(google.api.field_behavior) = INPUT_ONLY];
|
|
418
366
|
|
|
419
367
|
// Input only. A response to an interaction event related to a
|
|
420
|
-
// [dialog](https://developers.google.com/chat/
|
|
368
|
+
// [dialog](https://developers.google.com/workspace/chat/dialogs). Must be
|
|
421
369
|
// accompanied by `ResponseType.Dialog`.
|
|
422
370
|
DialogAction dialog_action = 3 [(google.api.field_behavior) = INPUT_ONLY];
|
|
423
371
|
|
|
@@ -425,14 +373,18 @@ message ActionResponse {
|
|
|
425
373
|
UpdatedWidget updated_widget = 4 [(google.api.field_behavior) = INPUT_ONLY];
|
|
426
374
|
}
|
|
427
375
|
|
|
428
|
-
//
|
|
376
|
+
// One or more interactive widgets that appear at the bottom of a message. For
|
|
377
|
+
// details, see [Add interactive widgets at the bottom of a
|
|
378
|
+
// message](https://developers.google.com/workspace/chat/create-messages#add-accessory-widgets).
|
|
429
379
|
message AccessoryWidget {
|
|
380
|
+
// The type of action.
|
|
430
381
|
oneof action {
|
|
431
|
-
// A list of buttons
|
|
382
|
+
// A list of buttons.
|
|
432
383
|
google.apps.card.v1.ButtonList button_list = 1;
|
|
433
384
|
}
|
|
434
385
|
}
|
|
435
386
|
|
|
387
|
+
// Request to get a message.
|
|
436
388
|
message GetMessageRequest {
|
|
437
389
|
// Required. Resource name of the message.
|
|
438
390
|
//
|
|
@@ -441,13 +393,14 @@ message GetMessageRequest {
|
|
|
441
393
|
// If you've set a custom ID for your message, you can use the value from the
|
|
442
394
|
// `clientAssignedMessageId` field for `{message}`. For details, see [Name a
|
|
443
395
|
// message]
|
|
444
|
-
// (https://developers.google.com/chat/
|
|
396
|
+
// (https://developers.google.com/workspace/chat/create-messages#name_a_created_message).
|
|
445
397
|
string name = 1 [
|
|
446
398
|
(google.api.field_behavior) = REQUIRED,
|
|
447
399
|
(google.api.resource_reference) = { type: "chat.googleapis.com/Message" }
|
|
448
400
|
];
|
|
449
401
|
}
|
|
450
402
|
|
|
403
|
+
// Request to delete a message.
|
|
451
404
|
message DeleteMessageRequest {
|
|
452
405
|
// Required. Resource name of the message.
|
|
453
406
|
//
|
|
@@ -456,7 +409,7 @@ message DeleteMessageRequest {
|
|
|
456
409
|
// If you've set a custom ID for your message, you can use the value from the
|
|
457
410
|
// `clientAssignedMessageId` field for `{message}`. For details, see [Name a
|
|
458
411
|
// message]
|
|
459
|
-
// (https://developers.google.com/chat/
|
|
412
|
+
// (https://developers.google.com/workspace/chat/create-messages#name_a_created_message).
|
|
460
413
|
string name = 1 [
|
|
461
414
|
(google.api.field_behavior) = REQUIRED,
|
|
462
415
|
(google.api.resource_reference) = { type: "chat.googleapis.com/Message" }
|
|
@@ -466,12 +419,13 @@ message DeleteMessageRequest {
|
|
|
466
419
|
// `false`, if a message has threaded replies, deletion fails.
|
|
467
420
|
//
|
|
468
421
|
// Only applies when [authenticating as a
|
|
469
|
-
// user](https://developers.google.com/chat/
|
|
470
|
-
// effect when [authenticating as a Chat app]
|
|
471
|
-
// (https://developers.google.com/chat/
|
|
422
|
+
// user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
|
|
423
|
+
// Has no effect when [authenticating as a Chat app]
|
|
424
|
+
// (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app).
|
|
472
425
|
bool force = 2;
|
|
473
426
|
}
|
|
474
427
|
|
|
428
|
+
// Request to update a message.
|
|
475
429
|
message UpdateMessageRequest {
|
|
476
430
|
// Required. Message with fields updated.
|
|
477
431
|
Message message = 1 [(google.api.field_behavior) = REQUIRED];
|
|
@@ -497,7 +451,7 @@ message UpdateMessageRequest {
|
|
|
497
451
|
|
|
498
452
|
// Optional. If `true` and the message isn't found, a new message is created
|
|
499
453
|
// and `updateMask` is ignored. The specified message ID must be
|
|
500
|
-
// [client-assigned](https://developers.google.com/chat/
|
|
454
|
+
// [client-assigned](https://developers.google.com/workspace/chat/create-messages#name_a_created_message)
|
|
501
455
|
// or the request fails.
|
|
502
456
|
bool allow_missing = 4 [(google.api.field_behavior) = OPTIONAL];
|
|
503
457
|
}
|
|
@@ -545,7 +499,7 @@ message CreateMessageRequest {
|
|
|
545
499
|
// a message and specify a `threadKey` or the
|
|
546
500
|
// [thread.name][google.chat.v1.Thread.name]. For example usage, see [Start or
|
|
547
501
|
// reply to a message
|
|
548
|
-
// thread](https://developers.google.com/chat/
|
|
502
|
+
// thread](https://developers.google.com/workspace/chat/create-messages#create-message-thread).
|
|
549
503
|
string thread_key = 6
|
|
550
504
|
[deprecated = true, (google.api.field_behavior) = OPTIONAL];
|
|
551
505
|
|
|
@@ -573,7 +527,7 @@ message CreateMessageRequest {
|
|
|
573
527
|
// different messages.
|
|
574
528
|
//
|
|
575
529
|
// For details, see [Name a
|
|
576
|
-
// message](https://developers.google.com/chat/
|
|
530
|
+
// message](https://developers.google.com/workspace/chat/create-messages#name_a_created_message).
|
|
577
531
|
string message_id = 9 [(google.api.field_behavior) = OPTIONAL];
|
|
578
532
|
}
|
|
579
533
|
|
|
@@ -594,8 +548,8 @@ message ListMessagesRequest {
|
|
|
594
548
|
//
|
|
595
549
|
// If unspecified, at most 25 are returned.
|
|
596
550
|
//
|
|
597
|
-
// The maximum value is
|
|
598
|
-
// automatically changed to
|
|
551
|
+
// The maximum value is 1000. If you use a value more than 1000, it's
|
|
552
|
+
// automatically changed to 1000.
|
|
599
553
|
//
|
|
600
554
|
// Negative values return an `INVALID_ARGUMENT` error.
|
|
601
555
|
int32 page_size = 2;
|
|
@@ -666,6 +620,7 @@ message ListMessagesRequest {
|
|
|
666
620
|
bool show_deleted = 6;
|
|
667
621
|
}
|
|
668
622
|
|
|
623
|
+
// Response message for listing messages.
|
|
669
624
|
message ListMessagesResponse {
|
|
670
625
|
// List of messages.
|
|
671
626
|
repeated Message messages = 1;
|
|
@@ -676,17 +631,19 @@ message ListMessagesResponse {
|
|
|
676
631
|
}
|
|
677
632
|
|
|
678
633
|
// Contains a
|
|
679
|
-
// [dialog](https://developers.google.com/chat/
|
|
634
|
+
// [dialog](https://developers.google.com/workspace/chat/dialogs) and request
|
|
680
635
|
// status code.
|
|
681
636
|
message DialogAction {
|
|
637
|
+
// Action to perform.
|
|
682
638
|
oneof action {
|
|
683
|
-
// Input only.
|
|
684
|
-
// for the
|
|
639
|
+
// Input only.
|
|
640
|
+
// [Dialog](https://developers.google.com/workspace/chat/dialogs) for the
|
|
641
|
+
// request.
|
|
685
642
|
Dialog dialog = 1 [(google.api.field_behavior) = INPUT_ONLY];
|
|
686
643
|
}
|
|
687
644
|
|
|
688
645
|
// Input only. Status for a request to either invoke or submit a
|
|
689
|
-
// [dialog](https://developers.google.com/chat/
|
|
646
|
+
// [dialog](https://developers.google.com/workspace/chat/dialogs). Displays
|
|
690
647
|
// a status and message to users, if necessary.
|
|
691
648
|
// For example, in case of an error or success.
|
|
692
649
|
ActionStatus action_status = 2 [(google.api.field_behavior) = INPUT_ONLY];
|
|
@@ -700,12 +657,13 @@ message Dialog {
|
|
|
700
657
|
google.apps.card.v1.Card body = 1 [(google.api.field_behavior) = INPUT_ONLY];
|
|
701
658
|
}
|
|
702
659
|
|
|
703
|
-
// A
|
|
704
|
-
//
|
|
660
|
+
// A
|
|
661
|
+
// [card](https://developers.google.com/workspace/chat/api/reference/rest/v1/cards)
|
|
662
|
+
// in a Google Chat message.
|
|
705
663
|
//
|
|
706
664
|
// Only Chat apps can create cards. If your Chat app [authenticates as a
|
|
707
|
-
// user](https://developers.google.com/chat/
|
|
708
|
-
// can't contain cards.
|
|
665
|
+
// user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user),
|
|
666
|
+
// the message can't contain cards.
|
|
709
667
|
//
|
|
710
668
|
// [Card builder](https://addons.gsuite.google.com/uikit/builder)
|
|
711
669
|
message CardWithId {
|
|
@@ -49,6 +49,7 @@ message Reaction {
|
|
|
49
49
|
|
|
50
50
|
// An emoji that is used as a reaction to a message.
|
|
51
51
|
message Emoji {
|
|
52
|
+
// The content of the emoji.
|
|
52
53
|
oneof content {
|
|
53
54
|
// A basic emoji represented by a unicode string.
|
|
54
55
|
string unicode = 1;
|
|
@@ -118,9 +119,9 @@ message ListReactionsRequest {
|
|
|
118
119
|
// Optional. A query filter.
|
|
119
120
|
//
|
|
120
121
|
// You can filter reactions by
|
|
121
|
-
// [emoji](https://developers.google.com/chat/api/reference/rest/v1/Emoji)
|
|
122
|
+
// [emoji](https://developers.google.com/workspace/chat/api/reference/rest/v1/Emoji)
|
|
122
123
|
// (either `emoji.unicode` or `emoji.custom_emoji.uid`) and
|
|
123
|
-
// [user](https://developers.google.com/chat/api/reference/rest/v1/User)
|
|
124
|
+
// [user](https://developers.google.com/workspace/chat/api/reference/rest/v1/User)
|
|
124
125
|
// (`user.name`).
|
|
125
126
|
//
|
|
126
127
|
// To filter reactions for multiple emojis or users, join similar fields
|
|
@@ -162,6 +163,7 @@ message ListReactionsRequest {
|
|
|
162
163
|
string filter = 4 [(google.api.field_behavior) = OPTIONAL];
|
|
163
164
|
}
|
|
164
165
|
|
|
166
|
+
// Response to a list reactions request.
|
|
165
167
|
message ListReactionsResponse {
|
|
166
168
|
// List of reactions in the requested (or first) page.
|
|
167
169
|
repeated Reaction reactions = 1;
|
|
@@ -24,8 +24,9 @@ option java_package = "com.google.chat.v1";
|
|
|
24
24
|
option php_namespace = "Google\\Apps\\Chat\\V1";
|
|
25
25
|
option ruby_package = "Google::Apps::Chat::V1";
|
|
26
26
|
|
|
27
|
-
// A [slash
|
|
28
|
-
// in
|
|
27
|
+
// A [slash
|
|
28
|
+
// command](https://developers.google.com/workspace/chat/slash-commands) in
|
|
29
|
+
// Google Chat.
|
|
29
30
|
message SlashCommand {
|
|
30
31
|
// The ID of the slash command invoked.
|
|
31
32
|
int64 command_id = 1;
|