@google-apps/chat 0.10.0 → 0.11.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 +8 -0
- package/build/protos/google/chat/v1/attachment.proto +15 -13
- package/build/protos/google/chat/v1/chat_service.proto +166 -74
- package/build/protos/google/chat/v1/deletion_metadata.proto +2 -1
- package/build/protos/google/chat/v1/membership.proto +52 -32
- package/build/protos/google/chat/v1/message.proto +63 -54
- package/build/protos/google/chat/v1/reaction.proto +16 -12
- package/build/protos/google/chat/v1/space.proto +97 -51
- package/build/protos/google/chat/v1/space_event.proto +4 -4
- package/build/protos/protos.d.ts +118 -0
- package/build/protos/protos.js +313 -0
- package/build/protos/protos.json +237 -53
- package/build/src/v1/chat_service_client.d.ts +287 -181
- package/build/src/v1/chat_service_client.js +42 -48
- package/build/src/v1/chat_service_client.js.map +1 -1
- package/package.json +1 -1
|
@@ -78,12 +78,10 @@ message Membership {
|
|
|
78
78
|
ROLE_MANAGER = 2;
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
-
// Resource name of the membership, assigned by the server.
|
|
81
|
+
// Identifier. Resource name of the membership, assigned by the server.
|
|
82
82
|
//
|
|
83
83
|
// Format: `spaces/{space}/members/{member}`
|
|
84
|
-
string name = 1 [
|
|
85
|
-
(google.api.resource_reference) = { type: "chat.googleapis.com/Membership" }
|
|
86
|
-
];
|
|
84
|
+
string name = 1 [(google.api.field_behavior) = IDENTIFIER];
|
|
87
85
|
|
|
88
86
|
// Output only. State of the membership.
|
|
89
87
|
MembershipState state = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
|
|
@@ -97,16 +95,19 @@ message Membership {
|
|
|
97
95
|
// Member associated with this membership. Other member types might be
|
|
98
96
|
// supported in the future.
|
|
99
97
|
oneof memberType {
|
|
100
|
-
// The Google Chat user or app the membership corresponds to.
|
|
98
|
+
// Optional. The Google Chat user or app the membership corresponds to.
|
|
101
99
|
// If your Chat app [authenticates as a
|
|
102
100
|
// user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user),
|
|
103
101
|
// the output populates the
|
|
104
102
|
// [user](https://developers.google.com/workspace/chat/api/reference/rest/v1/User)
|
|
105
103
|
// `name` and `type`.
|
|
106
|
-
User member = 3;
|
|
104
|
+
User member = 3 [(google.api.field_behavior) = OPTIONAL];
|
|
107
105
|
|
|
108
|
-
// The Google Group the membership corresponds to.
|
|
109
|
-
|
|
106
|
+
// Optional. The Google Group the membership corresponds to.
|
|
107
|
+
//
|
|
108
|
+
// Reading or mutating memberships for Google Groups requires [user
|
|
109
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
|
|
110
|
+
Group group_member = 5 [(google.api.field_behavior) = OPTIONAL];
|
|
110
111
|
}
|
|
111
112
|
|
|
112
113
|
// Optional. Immutable. The creation time of the membership, such as when a
|
|
@@ -140,24 +141,45 @@ message CreateMembershipRequest {
|
|
|
140
141
|
];
|
|
141
142
|
|
|
142
143
|
// Required. The membership relation to create.
|
|
144
|
+
//
|
|
143
145
|
// The `memberType` field must contain a user with the `user.name` and
|
|
144
146
|
// `user.type` fields populated. The server will assign a resource name
|
|
145
147
|
// and overwrite anything specified.
|
|
148
|
+
//
|
|
146
149
|
// When a Chat app creates a membership relation for a human user, it must use
|
|
147
|
-
//
|
|
148
|
-
//
|
|
149
|
-
//
|
|
150
|
-
//
|
|
151
|
-
//
|
|
152
|
-
//
|
|
153
|
-
//
|
|
154
|
-
//
|
|
155
|
-
// `
|
|
156
|
-
//
|
|
157
|
-
//
|
|
150
|
+
// certain authorization scopes and set specific values for certain fields:
|
|
151
|
+
//
|
|
152
|
+
// - When [authenticating as a
|
|
153
|
+
// user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user),
|
|
154
|
+
// the `chat.memberships` authorization scope is required.
|
|
155
|
+
//
|
|
156
|
+
// - When [authenticating as an
|
|
157
|
+
// app](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app),
|
|
158
|
+
// the `chat.app.memberships` authorization scope is required.
|
|
159
|
+
// Authenticating as an app is available in [Developer
|
|
160
|
+
// Preview](https://developers.google.com/workspace/preview).
|
|
161
|
+
//
|
|
162
|
+
// - Set `user.type` to `HUMAN`, and set `user.name` with format
|
|
163
|
+
// `users/{user}`, where `{user}` can be the email address for the user. For
|
|
164
|
+
// users in the same Workspace organization `{user}` can also be the `id` of
|
|
165
|
+
// the [person](https://developers.google.com/people/api/rest/v1/people) from
|
|
166
|
+
// the People API, or the `id` for the user in the Directory API. For example,
|
|
167
|
+
// if the People API Person profile ID for `user@example.com` is `123456789`,
|
|
168
|
+
// you can add the user to the space by setting the `membership.member.name`
|
|
169
|
+
// to `users/user@example.com` or `users/123456789`.
|
|
170
|
+
//
|
|
171
|
+
// Inviting users external to the Workspace organization that owns the space
|
|
172
|
+
// requires [user
|
|
173
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
|
|
174
|
+
//
|
|
175
|
+
// When a Chat app creates a membership relation for itself, it must
|
|
176
|
+
// [authenticate as a
|
|
177
|
+
// user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
|
|
178
|
+
// and use the `chat.memberships.app` scope, set `user.type` to `BOT`, and set
|
|
179
|
+
// `user.name` to `users/app`.
|
|
158
180
|
Membership membership = 2 [(google.api.field_behavior) = REQUIRED];
|
|
159
181
|
|
|
160
|
-
// When `true`, the method runs using the user's Google Workspace
|
|
182
|
+
// Optional. When `true`, the method runs using the user's Google Workspace
|
|
161
183
|
// administrator privileges.
|
|
162
184
|
//
|
|
163
185
|
// The calling user must be a Google Workspace administrator with the
|
|
@@ -170,7 +192,7 @@ message CreateMembershipRequest {
|
|
|
170
192
|
// Creating app memberships or creating memberships for users outside the
|
|
171
193
|
// administrator's Google Workspace organization isn't supported using admin
|
|
172
194
|
// access.
|
|
173
|
-
bool use_admin_access = 5;
|
|
195
|
+
bool use_admin_access = 5 [(google.api.field_behavior) = OPTIONAL];
|
|
174
196
|
}
|
|
175
197
|
|
|
176
198
|
// Request message for updating a membership.
|
|
@@ -188,7 +210,7 @@ message UpdateMembershipRequest {
|
|
|
188
210
|
google.protobuf.FieldMask update_mask = 2
|
|
189
211
|
[(google.api.field_behavior) = REQUIRED];
|
|
190
212
|
|
|
191
|
-
// When `true`, the method runs using the user's Google Workspace
|
|
213
|
+
// Optional. When `true`, the method runs using the user's Google Workspace
|
|
192
214
|
// administrator privileges.
|
|
193
215
|
//
|
|
194
216
|
// The calling user must be a Google Workspace administrator with the
|
|
@@ -197,7 +219,7 @@ message UpdateMembershipRequest {
|
|
|
197
219
|
//
|
|
198
220
|
// Requires the `chat.admin.memberships` [OAuth 2.0
|
|
199
221
|
// scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes).
|
|
200
|
-
bool use_admin_access = 3;
|
|
222
|
+
bool use_admin_access = 3 [(google.api.field_behavior) = OPTIONAL];
|
|
201
223
|
}
|
|
202
224
|
|
|
203
225
|
// Request message for listing memberships.
|
|
@@ -290,7 +312,7 @@ message ListMembershipsRequest {
|
|
|
290
312
|
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
|
|
291
313
|
bool show_invited = 7 [(google.api.field_behavior) = OPTIONAL];
|
|
292
314
|
|
|
293
|
-
// When `true`, the method runs using the user's Google Workspace
|
|
315
|
+
// Optional. When `true`, the method runs using the user's Google Workspace
|
|
294
316
|
// administrator privileges.
|
|
295
317
|
//
|
|
296
318
|
// The calling user must be a Google Workspace administrator with the
|
|
@@ -302,7 +324,7 @@ message ListMembershipsRequest {
|
|
|
302
324
|
// scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes).
|
|
303
325
|
//
|
|
304
326
|
// Listing app memberships in a space isn't supported when using admin access.
|
|
305
|
-
bool use_admin_access = 8;
|
|
327
|
+
bool use_admin_access = 8 [(google.api.field_behavior) = OPTIONAL];
|
|
306
328
|
}
|
|
307
329
|
|
|
308
330
|
// Response to list memberships of the space.
|
|
@@ -326,9 +348,7 @@ message GetMembershipRequest {
|
|
|
326
348
|
//
|
|
327
349
|
// Format: `spaces/{space}/members/{member}` or `spaces/{space}/members/app`
|
|
328
350
|
//
|
|
329
|
-
//
|
|
330
|
-
// user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user),
|
|
331
|
-
// you can use the user's email as an alias for `{member}`. For example,
|
|
351
|
+
// You can use the user's email as an alias for `{member}`. For example,
|
|
332
352
|
// `spaces/{space}/members/example@gmail.com` where `example@gmail.com` is the
|
|
333
353
|
// email of the Google Chat user.
|
|
334
354
|
string name = 1 [
|
|
@@ -336,7 +356,7 @@ message GetMembershipRequest {
|
|
|
336
356
|
(google.api.resource_reference) = { type: "chat.googleapis.com/Membership" }
|
|
337
357
|
];
|
|
338
358
|
|
|
339
|
-
// When `true`, the method runs using the user's Google Workspace
|
|
359
|
+
// Optional. When `true`, the method runs using the user's Google Workspace
|
|
340
360
|
// administrator privileges.
|
|
341
361
|
//
|
|
342
362
|
// The calling user must be a Google Workspace administrator with the
|
|
@@ -348,7 +368,7 @@ message GetMembershipRequest {
|
|
|
348
368
|
// scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes).
|
|
349
369
|
//
|
|
350
370
|
// Getting app memberships in a space isn't supported when using admin access.
|
|
351
|
-
bool use_admin_access = 3;
|
|
371
|
+
bool use_admin_access = 3 [(google.api.field_behavior) = OPTIONAL];
|
|
352
372
|
}
|
|
353
373
|
|
|
354
374
|
// Request to delete a membership in a space.
|
|
@@ -372,7 +392,7 @@ message DeleteMembershipRequest {
|
|
|
372
392
|
(google.api.resource_reference) = { type: "chat.googleapis.com/Membership" }
|
|
373
393
|
];
|
|
374
394
|
|
|
375
|
-
// When `true`, the method runs using the user's Google Workspace
|
|
395
|
+
// Optional. When `true`, the method runs using the user's Google Workspace
|
|
376
396
|
// administrator privileges.
|
|
377
397
|
//
|
|
378
398
|
// The calling user must be a Google Workspace administrator with the
|
|
@@ -383,5 +403,5 @@ message DeleteMembershipRequest {
|
|
|
383
403
|
// scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes).
|
|
384
404
|
//
|
|
385
405
|
// Deleting app memberships in a space isn't supported using admin access.
|
|
386
|
-
bool use_admin_access = 2;
|
|
406
|
+
bool use_admin_access = 2 [(google.api.field_behavior) = OPTIONAL];
|
|
387
407
|
}
|
|
@@ -48,7 +48,7 @@ message Message {
|
|
|
48
48
|
pattern: "spaces/{space}/messages/{message}"
|
|
49
49
|
};
|
|
50
50
|
|
|
51
|
-
// Resource name of the message.
|
|
51
|
+
// Identifier. Resource name of the message.
|
|
52
52
|
//
|
|
53
53
|
// Format: `spaces/{space}/messages/{message}`
|
|
54
54
|
//
|
|
@@ -63,7 +63,7 @@ message Message {
|
|
|
63
63
|
// `spaces/AAAAAAAAAAA/messages/client-custom-name`. For details, see [Name
|
|
64
64
|
// a
|
|
65
65
|
// message](https://developers.google.com/workspace/chat/create-messages#name_a_created_message).
|
|
66
|
-
string name = 1;
|
|
66
|
+
string name = 1 [(google.api.field_behavior) = IDENTIFIER];
|
|
67
67
|
|
|
68
68
|
// Output only. The user who created the message.
|
|
69
69
|
// If your Chat app [authenticates as a
|
|
@@ -95,16 +95,16 @@ message Message {
|
|
|
95
95
|
google.protobuf.Timestamp delete_time = 26
|
|
96
96
|
[(google.api.field_behavior) = OUTPUT_ONLY];
|
|
97
97
|
|
|
98
|
-
// Plain-text body of the message. The first link to an image,
|
|
99
|
-
// page generates a
|
|
100
|
-
//
|
|
101
|
-
//
|
|
98
|
+
// Optional. Plain-text body of the message. The first link to an image,
|
|
99
|
+
// video, or web page generates a [preview
|
|
100
|
+
// chip](https://developers.google.com/workspace/chat/preview-links). You can
|
|
101
|
+
// also [@mention a Google Chat
|
|
102
102
|
// user](https://developers.google.com/workspace/chat/format-messages#messages-@mention),
|
|
103
103
|
// or everyone in the space.
|
|
104
104
|
//
|
|
105
105
|
// To learn about creating text messages, see [Send a
|
|
106
106
|
// message](https://developers.google.com/workspace/chat/create-messages).
|
|
107
|
-
string text = 4;
|
|
107
|
+
string text = 4 [(google.api.field_behavior) = OPTIONAL];
|
|
108
108
|
|
|
109
109
|
// Output only. Contains the message `text` with markups added to communicate
|
|
110
110
|
// formatting. This field might not capture all formatting visible in the UI,
|
|
@@ -139,7 +139,7 @@ message Message {
|
|
|
139
139
|
// `cards_v2` can have a maximum size of 32 KB.
|
|
140
140
|
repeated ContextualAddOnMarkup.Card cards = 5 [deprecated = true];
|
|
141
141
|
|
|
142
|
-
// An array of
|
|
142
|
+
// Optional. An array of
|
|
143
143
|
// [cards](https://developers.google.com/workspace/chat/api/reference/rest/v1/cards).
|
|
144
144
|
//
|
|
145
145
|
// Only Chat apps can create cards. If your Chat app [authenticates as a
|
|
@@ -150,7 +150,7 @@ message Message {
|
|
|
150
150
|
// message](https://developers.google.com/workspace/chat/create-messages).
|
|
151
151
|
//
|
|
152
152
|
// [Card builder](https://addons.gsuite.google.com/uikit/builder)
|
|
153
|
-
repeated CardWithId cards_v2 = 22;
|
|
153
|
+
repeated CardWithId cards_v2 = 22 [(google.api.field_behavior) = OPTIONAL];
|
|
154
154
|
|
|
155
155
|
// Output only. Annotations associated with the `text` in this message.
|
|
156
156
|
repeated Annotation annotations = 10
|
|
@@ -161,16 +161,16 @@ message Message {
|
|
|
161
161
|
// thread](https://developers.google.com/workspace/chat/create-messages#create-message-thread).
|
|
162
162
|
Thread thread = 11;
|
|
163
163
|
|
|
164
|
-
// If your Chat app [authenticates as a
|
|
164
|
+
// Output only. If your Chat app [authenticates as a
|
|
165
165
|
// user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user),
|
|
166
|
-
// the output populates the
|
|
166
|
+
// the output only populates the
|
|
167
167
|
// [space](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces)
|
|
168
168
|
// `name`.
|
|
169
|
-
Space space = 12;
|
|
169
|
+
Space space = 12 [(google.api.field_behavior) = OUTPUT_ONLY];
|
|
170
170
|
|
|
171
|
-
// A plain-text description of the message's cards, used when the
|
|
172
|
-
// can't be displayed—for example, mobile notifications.
|
|
173
|
-
string fallback_text = 13;
|
|
171
|
+
// Optional. A plain-text description of the message's cards, used when the
|
|
172
|
+
// actual cards can't be displayed—for example, mobile notifications.
|
|
173
|
+
string fallback_text = 13 [(google.api.field_behavior) = OPTIONAL];
|
|
174
174
|
|
|
175
175
|
// Input only. Parameters that a Chat app can use to configure how its
|
|
176
176
|
// response is posted.
|
|
@@ -184,8 +184,8 @@ message Message {
|
|
|
184
184
|
// Output only. Slash command information, if applicable.
|
|
185
185
|
SlashCommand slash_command = 17 [(google.api.field_behavior) = OUTPUT_ONLY];
|
|
186
186
|
|
|
187
|
-
// User-uploaded attachment.
|
|
188
|
-
repeated Attachment attachment = 18;
|
|
187
|
+
// Optional. User-uploaded attachment.
|
|
188
|
+
repeated Attachment attachment = 18 [(google.api.field_behavior) = OPTIONAL];
|
|
189
189
|
|
|
190
190
|
// Output only. A URL in `spaces.messages.text` that matches a link preview
|
|
191
191
|
// pattern. For more information, see [Preview
|
|
@@ -206,16 +206,17 @@ message Message {
|
|
|
206
206
|
// [`messageId`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages/create#body.QUERY_PARAMETERS.message_id)
|
|
207
207
|
// field when you create the message. For details, see [Name a
|
|
208
208
|
// message](https://developers.google.com/workspace/chat/create-messages#name_a_created_message).
|
|
209
|
-
string client_assigned_message_id = 32
|
|
209
|
+
string client_assigned_message_id = 32
|
|
210
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
210
211
|
|
|
211
212
|
// Output only. The list of emoji reaction summaries on the message.
|
|
212
213
|
repeated EmojiReactionSummary emoji_reaction_summaries = 33
|
|
213
214
|
[(google.api.field_behavior) = OUTPUT_ONLY];
|
|
214
215
|
|
|
215
|
-
// Immutable. Input for creating a message, otherwise output only.
|
|
216
|
-
// that can view the message. When set, the message is private and
|
|
217
|
-
// visible to the specified user and the Chat app. To include this field
|
|
218
|
-
// your request, you must call the Chat API using [app
|
|
216
|
+
// Optional. Immutable. Input for creating a message, otherwise output only.
|
|
217
|
+
// The user that can view the message. When set, the message is private and
|
|
218
|
+
// only visible to the specified user and the Chat app. To include this field
|
|
219
|
+
// in your request, you must call the Chat API using [app
|
|
219
220
|
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
|
|
220
221
|
// and omit the following:
|
|
221
222
|
//
|
|
@@ -225,7 +226,10 @@ message Message {
|
|
|
225
226
|
//
|
|
226
227
|
// For details, see [Send a message
|
|
227
228
|
// privately](https://developers.google.com/workspace/chat/create-messages#private).
|
|
228
|
-
User private_message_viewer = 36 [
|
|
229
|
+
User private_message_viewer = 36 [
|
|
230
|
+
(google.api.field_behavior) = IMMUTABLE,
|
|
231
|
+
(google.api.field_behavior) = OPTIONAL
|
|
232
|
+
];
|
|
229
233
|
|
|
230
234
|
// Output only. Information about a deleted message. A message is deleted when
|
|
231
235
|
// `delete_time` is set.
|
|
@@ -241,16 +245,17 @@ message Message {
|
|
|
241
245
|
repeated AttachedGif attached_gifs = 42
|
|
242
246
|
[(google.api.field_behavior) = OUTPUT_ONLY];
|
|
243
247
|
|
|
244
|
-
// One or more interactive widgets that appear at the bottom of a
|
|
245
|
-
// You can add accessory widgets to messages that contain text,
|
|
246
|
-
// text and cards. Not supported for messages that contain
|
|
247
|
-
// details, see [Add interactive widgets at the bottom of a
|
|
248
|
+
// Optional. One or more interactive widgets that appear at the bottom of a
|
|
249
|
+
// message. You can add accessory widgets to messages that contain text,
|
|
250
|
+
// cards, or both text and cards. Not supported for messages that contain
|
|
251
|
+
// dialogs. For details, see [Add interactive widgets at the bottom of a
|
|
248
252
|
// message](https://developers.google.com/workspace/chat/create-messages#add-accessory-widgets).
|
|
249
253
|
//
|
|
250
254
|
// Creating a message with accessory widgets requires [app
|
|
251
255
|
// authentication]
|
|
252
256
|
// (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app).
|
|
253
|
-
repeated AccessoryWidget accessory_widgets = 44
|
|
257
|
+
repeated AccessoryWidget accessory_widgets = 44
|
|
258
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
254
259
|
}
|
|
255
260
|
|
|
256
261
|
// A GIF image that's specified by a URL.
|
|
@@ -293,10 +298,10 @@ message Thread {
|
|
|
293
298
|
pattern: "spaces/{space}/threads/{thread}"
|
|
294
299
|
};
|
|
295
300
|
|
|
296
|
-
// Resource name of the thread.
|
|
301
|
+
// Identifier. Resource name of the thread.
|
|
297
302
|
//
|
|
298
303
|
// Example: `spaces/{space}/threads/{thread}`
|
|
299
|
-
string name = 1;
|
|
304
|
+
string name = 1 [(google.api.field_behavior) = IDENTIFIER];
|
|
300
305
|
|
|
301
306
|
// Optional. Input for creating or updating a thread. Otherwise, output only.
|
|
302
307
|
// ID for the thread. Supports up to 4000 characters.
|
|
@@ -345,8 +350,8 @@ message ActionResponse {
|
|
|
345
350
|
repeated google.apps.card.v1.SelectionInput.SelectionItem items = 1;
|
|
346
351
|
}
|
|
347
352
|
|
|
348
|
-
//
|
|
349
|
-
//
|
|
353
|
+
// For `selectionInput` widgets, returns autocomplete suggestions for a
|
|
354
|
+
// multiselect menu.
|
|
350
355
|
message UpdatedWidget {
|
|
351
356
|
// The widget updated in response to a user action.
|
|
352
357
|
oneof updated_widget {
|
|
@@ -417,14 +422,14 @@ message DeleteMessageRequest {
|
|
|
417
422
|
(google.api.resource_reference) = { type: "chat.googleapis.com/Message" }
|
|
418
423
|
];
|
|
419
424
|
|
|
420
|
-
// When `true`, deleting a message also deletes its threaded
|
|
421
|
-
// `false`, if a message has threaded replies, deletion fails.
|
|
425
|
+
// Optional. When `true`, deleting a message also deletes its threaded
|
|
426
|
+
// replies. When `false`, if a message has threaded replies, deletion fails.
|
|
422
427
|
//
|
|
423
428
|
// Only applies when [authenticating as a
|
|
424
429
|
// user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
|
|
425
430
|
// Has no effect when [authenticating as a Chat app]
|
|
426
431
|
// (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app).
|
|
427
|
-
bool force = 2;
|
|
432
|
+
bool force = 2 [(google.api.field_behavior) = OPTIONAL];
|
|
428
433
|
}
|
|
429
434
|
|
|
430
435
|
// Request to update a message.
|
|
@@ -449,7 +454,8 @@ message UpdateMessageRequest {
|
|
|
449
454
|
//
|
|
450
455
|
// - `accessory_widgets` (Requires [app
|
|
451
456
|
// authentication](/chat/api/guides/auth/service-accounts).)
|
|
452
|
-
google.protobuf.FieldMask update_mask = 2
|
|
457
|
+
google.protobuf.FieldMask update_mask = 2
|
|
458
|
+
[(google.api.field_behavior) = REQUIRED];
|
|
453
459
|
|
|
454
460
|
// Optional. If `true` and the message isn't found, a new message is created
|
|
455
461
|
// and `updateMask` is ignored. The specified message ID must be
|
|
@@ -512,6 +518,12 @@ message CreateMessageRequest {
|
|
|
512
518
|
|
|
513
519
|
// Optional. Specifies whether a message starts a thread or replies to one.
|
|
514
520
|
// Only supported in named spaces.
|
|
521
|
+
//
|
|
522
|
+
// When [responding to user
|
|
523
|
+
// interactions](https://developers.google.com/workspace/chat/receive-respond-interactions),
|
|
524
|
+
// this field is ignored. For interactions within a thread, the reply is
|
|
525
|
+
// created in the same thread. Otherwise, the reply is created as a new
|
|
526
|
+
// thread.
|
|
515
527
|
MessageReplyOption message_reply_option = 8
|
|
516
528
|
[(google.api.field_behavior) = OPTIONAL];
|
|
517
529
|
|
|
@@ -545,8 +557,8 @@ message ListMessagesRequest {
|
|
|
545
557
|
}
|
|
546
558
|
];
|
|
547
559
|
|
|
548
|
-
// The maximum number of messages returned. The service might return
|
|
549
|
-
// messages than this value.
|
|
560
|
+
// Optional. The maximum number of messages returned. The service might return
|
|
561
|
+
// fewer messages than this value.
|
|
550
562
|
//
|
|
551
563
|
// If unspecified, at most 25 are returned.
|
|
552
564
|
//
|
|
@@ -554,19 +566,17 @@ message ListMessagesRequest {
|
|
|
554
566
|
// automatically changed to 1000.
|
|
555
567
|
//
|
|
556
568
|
// Negative values return an `INVALID_ARGUMENT` error.
|
|
557
|
-
int32 page_size = 2;
|
|
569
|
+
int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
|
|
558
570
|
|
|
559
|
-
// Optional
|
|
560
|
-
//
|
|
561
|
-
// A page token received from a previous list messages call. Provide this
|
|
562
|
-
// parameter to retrieve the subsequent page.
|
|
571
|
+
// Optional. A page token received from a previous list messages call. Provide
|
|
572
|
+
// this parameter to retrieve the subsequent page.
|
|
563
573
|
//
|
|
564
574
|
// When paginating, all other parameters provided should match the call that
|
|
565
575
|
// provided the page token. Passing different values to the other parameters
|
|
566
576
|
// might lead to unexpected results.
|
|
567
|
-
string page_token = 3;
|
|
577
|
+
string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
|
|
568
578
|
|
|
569
|
-
// A query filter.
|
|
579
|
+
// Optional. A query filter.
|
|
570
580
|
//
|
|
571
581
|
// You can filter messages by date (`create_time`) and thread (`thread.name`).
|
|
572
582
|
//
|
|
@@ -603,23 +613,22 @@ message ListMessagesRequest {
|
|
|
603
613
|
//
|
|
604
614
|
// Invalid queries are rejected by the server with an `INVALID_ARGUMENT`
|
|
605
615
|
// error.
|
|
606
|
-
string filter = 4;
|
|
616
|
+
string filter = 4 [(google.api.field_behavior) = OPTIONAL];
|
|
607
617
|
|
|
608
|
-
// Optional
|
|
609
|
-
//
|
|
610
|
-
// How the list of messages is ordered. Specify a value to order by an
|
|
611
|
-
// ordering operation. Valid ordering operation values are as follows:
|
|
618
|
+
// Optional. How the list of messages is ordered. Specify a value to order by
|
|
619
|
+
// an ordering operation. Valid ordering operation values are as follows:
|
|
612
620
|
//
|
|
613
621
|
// - `ASC` for ascending.
|
|
614
622
|
//
|
|
615
623
|
// - `DESC` for descending.
|
|
616
624
|
//
|
|
617
625
|
// The default ordering is `create_time ASC`.
|
|
618
|
-
string order_by = 5;
|
|
626
|
+
string order_by = 5 [(google.api.field_behavior) = OPTIONAL];
|
|
619
627
|
|
|
620
|
-
// Whether to include deleted messages. Deleted messages include
|
|
621
|
-
// and metadata about their deletion, but message content is
|
|
622
|
-
|
|
628
|
+
// Optional. Whether to include deleted messages. Deleted messages include
|
|
629
|
+
// deleted time and metadata about their deletion, but message content is
|
|
630
|
+
// unavailable.
|
|
631
|
+
bool show_deleted = 6 [(google.api.field_behavior) = OPTIONAL];
|
|
623
632
|
}
|
|
624
633
|
|
|
625
634
|
// Response message for listing messages.
|
|
@@ -17,6 +17,7 @@ syntax = "proto3";
|
|
|
17
17
|
package google.chat.v1;
|
|
18
18
|
|
|
19
19
|
import "google/api/field_behavior.proto";
|
|
20
|
+
import "google/api/field_info.proto";
|
|
20
21
|
import "google/api/resource.proto";
|
|
21
22
|
import "google/chat/v1/user.proto";
|
|
22
23
|
|
|
@@ -36,24 +37,24 @@ message Reaction {
|
|
|
36
37
|
pattern: "spaces/{space}/messages/{message}/reactions/{reaction}"
|
|
37
38
|
};
|
|
38
39
|
|
|
39
|
-
// The resource name of the reaction.
|
|
40
|
+
// Identifier. The resource name of the reaction.
|
|
40
41
|
//
|
|
41
42
|
// Format: `spaces/{space}/messages/{message}/reactions/{reaction}`
|
|
42
|
-
string name = 1;
|
|
43
|
+
string name = 1 [(google.api.field_behavior) = IDENTIFIER];
|
|
43
44
|
|
|
44
45
|
// Output only. The user who created the reaction.
|
|
45
46
|
User user = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
|
|
46
47
|
|
|
47
|
-
// The emoji used in the reaction.
|
|
48
|
-
Emoji emoji = 3;
|
|
48
|
+
// Required. The emoji used in the reaction.
|
|
49
|
+
Emoji emoji = 3 [(google.api.field_behavior) = REQUIRED];
|
|
49
50
|
}
|
|
50
51
|
|
|
51
52
|
// An emoji that is used as a reaction to a message.
|
|
52
53
|
message Emoji {
|
|
53
|
-
// The content of the emoji.
|
|
54
|
+
// Required. The content of the emoji.
|
|
54
55
|
oneof content {
|
|
55
|
-
// A basic emoji represented by a unicode string.
|
|
56
|
-
string unicode = 1;
|
|
56
|
+
// Optional. A basic emoji represented by a unicode string.
|
|
57
|
+
string unicode = 1 [(google.api.field_behavior) = OPTIONAL];
|
|
57
58
|
|
|
58
59
|
// Output only. A custom emoji.
|
|
59
60
|
CustomEmoji custom_emoji = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
|
|
@@ -63,16 +64,19 @@ message Emoji {
|
|
|
63
64
|
// Represents a custom emoji.
|
|
64
65
|
message CustomEmoji {
|
|
65
66
|
// Output only. Unique key for the custom emoji resource.
|
|
66
|
-
string uid = 1 [
|
|
67
|
+
string uid = 1 [
|
|
68
|
+
(google.api.field_info).format = UUID4,
|
|
69
|
+
(google.api.field_behavior) = OUTPUT_ONLY
|
|
70
|
+
];
|
|
67
71
|
}
|
|
68
72
|
|
|
69
73
|
// The number of people who reacted to a message with a specific emoji.
|
|
70
74
|
message EmojiReactionSummary {
|
|
71
|
-
// Emoji associated with the reactions.
|
|
72
|
-
Emoji emoji = 1;
|
|
75
|
+
// Output only. Emoji associated with the reactions.
|
|
76
|
+
Emoji emoji = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
|
|
73
77
|
|
|
74
|
-
// The total number of reactions using the associated emoji.
|
|
75
|
-
optional int32 reaction_count = 2;
|
|
78
|
+
// Output only. The total number of reactions using the associated emoji.
|
|
79
|
+
optional int32 reaction_count = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
|
|
76
80
|
}
|
|
77
81
|
|
|
78
82
|
// Creates a reaction to a message.
|