@google-apps/chat 0.10.0 → 0.12.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 +15 -0
- package/build/protos/google/chat/v1/annotation.proto +13 -0
- package/build/protos/google/chat/v1/attachment.proto +15 -13
- package/build/protos/google/chat/v1/chat_service.proto +168 -78
- 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 +18 -14
- 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 +4278 -4056
- package/build/protos/protos.js +11699 -11136
- package/build/protos/protos.json +400 -205
- package/build/src/index.js +1 -1
- package/build/src/v1/chat_service_client.d.ts +289 -185
- package/build/src/v1/chat_service_client.js +43 -49
- package/build/src/v1/chat_service_client.js.map +1 -1
- package/build/src/v1/index.js +1 -1
- package/package.json +2 -2
|
@@ -95,22 +95,23 @@ message Space {
|
|
|
95
95
|
// discussion topic, functional purpose, or participants.
|
|
96
96
|
//
|
|
97
97
|
// Supports up to 150 characters.
|
|
98
|
-
string description = 1;
|
|
98
|
+
string description = 1 [(google.api.field_behavior) = OPTIONAL];
|
|
99
99
|
|
|
100
100
|
// Optional. The space's rules, expectations, and etiquette.
|
|
101
101
|
//
|
|
102
102
|
// Supports up to 5,000 characters.
|
|
103
|
-
string guidelines = 2;
|
|
103
|
+
string guidelines = 2 [(google.api.field_behavior) = OPTIONAL];
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
// Represents the count of memberships of a space, grouped into categories.
|
|
107
107
|
message MembershipCount {
|
|
108
|
-
// Count of human users that have directly joined the space,
|
|
109
|
-
// users joined by having membership in a joined group.
|
|
110
|
-
int32 joined_direct_human_user_count = 4
|
|
108
|
+
// Output only. Count of human users that have directly joined the space,
|
|
109
|
+
// not counting users joined by having membership in a joined group.
|
|
110
|
+
int32 joined_direct_human_user_count = 4
|
|
111
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
|
111
112
|
|
|
112
|
-
// Count of all groups that have directly joined the space.
|
|
113
|
-
int32 joined_group_count = 5;
|
|
113
|
+
// Output only. Count of all groups that have directly joined the space.
|
|
114
|
+
int32 joined_group_count = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
|
|
114
115
|
}
|
|
115
116
|
|
|
116
117
|
// Represents the [access
|
|
@@ -131,6 +132,9 @@ message Space {
|
|
|
131
132
|
// invited to the space can also discover and access the space. To learn
|
|
132
133
|
// more, see [Make a space discoverable to specific
|
|
133
134
|
// users](https://developers.google.com/workspace/chat/space-target-audience).
|
|
135
|
+
//
|
|
136
|
+
// Creating discoverable spaces requires [user
|
|
137
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
|
|
134
138
|
DISCOVERABLE = 2;
|
|
135
139
|
}
|
|
136
140
|
|
|
@@ -150,8 +154,23 @@ message Space {
|
|
|
150
154
|
// To use the default target audience for the Google Workspace organization,
|
|
151
155
|
// set to `audiences/default`.
|
|
152
156
|
//
|
|
157
|
+
// Reading the target audience supports:
|
|
158
|
+
//
|
|
159
|
+
// - [User
|
|
160
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
|
|
161
|
+
//
|
|
162
|
+
// - [App
|
|
163
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
|
|
164
|
+
// with [administrator
|
|
165
|
+
// approval](https://support.google.com/a?p=chat-app-auth)
|
|
166
|
+
// with the `chat.app.spaces` scope in [Developer
|
|
167
|
+
// Preview](https://developers.google.com/workspace/preview).
|
|
168
|
+
//
|
|
153
169
|
// This field is not populated when using the `chat.bot` scope with [app
|
|
154
170
|
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app).
|
|
171
|
+
//
|
|
172
|
+
// Setting the target audience requires [user
|
|
173
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
|
|
155
174
|
string audience = 3 [(google.api.field_behavior) = OPTIONAL];
|
|
156
175
|
}
|
|
157
176
|
|
|
@@ -178,42 +197,50 @@ message Space {
|
|
|
178
197
|
// To set permission settings when creating a space, specify the
|
|
179
198
|
// `PredefinedPermissionSettings` field in your request.
|
|
180
199
|
message PermissionSettings {
|
|
181
|
-
// Setting for managing members and groups in a space.
|
|
182
|
-
optional PermissionSetting manage_members_and_groups = 1
|
|
200
|
+
// Optional. Setting for managing members and groups in a space.
|
|
201
|
+
optional PermissionSetting manage_members_and_groups = 1
|
|
202
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
183
203
|
|
|
184
|
-
// Setting for updating space name, avatar, description and
|
|
185
|
-
|
|
204
|
+
// Optional. Setting for updating space name, avatar, description and
|
|
205
|
+
// guidelines.
|
|
206
|
+
optional PermissionSetting modify_space_details = 2
|
|
207
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
186
208
|
|
|
187
|
-
// Setting for toggling space history on and off.
|
|
188
|
-
optional PermissionSetting toggle_history = 3
|
|
209
|
+
// Optional. Setting for toggling space history on and off.
|
|
210
|
+
optional PermissionSetting toggle_history = 3
|
|
211
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
189
212
|
|
|
190
|
-
// Setting for using @all in a space.
|
|
191
|
-
optional PermissionSetting use_at_mention_all = 4
|
|
213
|
+
// Optional. Setting for using @all in a space.
|
|
214
|
+
optional PermissionSetting use_at_mention_all = 4
|
|
215
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
192
216
|
|
|
193
|
-
// Setting for managing apps in a space.
|
|
194
|
-
optional PermissionSetting manage_apps = 5
|
|
217
|
+
// Optional. Setting for managing apps in a space.
|
|
218
|
+
optional PermissionSetting manage_apps = 5
|
|
219
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
195
220
|
|
|
196
|
-
// Setting for managing webhooks in a space.
|
|
197
|
-
optional PermissionSetting manage_webhooks = 6
|
|
221
|
+
// Optional. Setting for managing webhooks in a space.
|
|
222
|
+
optional PermissionSetting manage_webhooks = 6
|
|
223
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
198
224
|
|
|
199
225
|
// Output only. Setting for posting messages in a space.
|
|
200
226
|
optional PermissionSetting post_messages = 7
|
|
201
227
|
[(google.api.field_behavior) = OUTPUT_ONLY];
|
|
202
228
|
|
|
203
|
-
// Setting for replying to messages in a space.
|
|
204
|
-
optional PermissionSetting reply_messages = 8
|
|
229
|
+
// Optional. Setting for replying to messages in a space.
|
|
230
|
+
optional PermissionSetting reply_messages = 8
|
|
231
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
205
232
|
}
|
|
206
233
|
|
|
207
234
|
// Represents a space permission setting.
|
|
208
235
|
message PermissionSetting {
|
|
209
|
-
// Whether spaces managers have this permission.
|
|
210
|
-
bool managers_allowed = 1;
|
|
236
|
+
// Optional. Whether spaces managers have this permission.
|
|
237
|
+
bool managers_allowed = 1 [(google.api.field_behavior) = OPTIONAL];
|
|
211
238
|
|
|
212
|
-
// Whether non-manager members have this permission.
|
|
213
|
-
bool members_allowed = 2;
|
|
239
|
+
// Optional. Whether non-manager members have this permission.
|
|
240
|
+
bool members_allowed = 2 [(google.api.field_behavior) = OPTIONAL];
|
|
214
241
|
}
|
|
215
242
|
|
|
216
|
-
// Resource name of the space.
|
|
243
|
+
// Identifier. Resource name of the space.
|
|
217
244
|
//
|
|
218
245
|
// Format: `spaces/{space}`
|
|
219
246
|
//
|
|
@@ -223,15 +250,15 @@ message Space {
|
|
|
223
250
|
// method or from the space URL. For example, if the space URL
|
|
224
251
|
// is `https://mail.google.com/mail/u/0/#chat/space/AAAAAAAAA`, the space ID
|
|
225
252
|
// is `AAAAAAAAA`.
|
|
226
|
-
string name = 1;
|
|
253
|
+
string name = 1 [(google.api.field_behavior) = IDENTIFIER];
|
|
227
254
|
|
|
228
255
|
// Output only. Deprecated: Use `space_type` instead.
|
|
229
256
|
// The type of a space.
|
|
230
257
|
Type type = 2 [deprecated = true, (google.api.field_behavior) = OUTPUT_ONLY];
|
|
231
258
|
|
|
232
|
-
// The type of space. Required when creating a space or updating the
|
|
233
|
-
// type of a space. Output only for other usage.
|
|
234
|
-
SpaceType space_type = 10;
|
|
259
|
+
// Optional. The type of space. Required when creating a space or updating the
|
|
260
|
+
// space type of a space. Output only for other usage.
|
|
261
|
+
SpaceType space_type = 10 [(google.api.field_behavior) = OPTIONAL];
|
|
235
262
|
|
|
236
263
|
// Optional. Whether the space is a DM between a Chat app and a single
|
|
237
264
|
// human.
|
|
@@ -242,7 +269,7 @@ message Space {
|
|
|
242
269
|
bool threaded = 5
|
|
243
270
|
[deprecated = true, (google.api.field_behavior) = OUTPUT_ONLY];
|
|
244
271
|
|
|
245
|
-
// The space's display name. Required when [creating a
|
|
272
|
+
// Optional. The space's display name. Required when [creating a
|
|
246
273
|
// space](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/create)
|
|
247
274
|
// with a `spaceType` of `SPACE`. If you receive the error message
|
|
248
275
|
// `ALREADY_EXISTS` when creating a space or updating the `displayName`, try a
|
|
@@ -252,32 +279,39 @@ message Space {
|
|
|
252
279
|
// For direct messages, this field might be empty.
|
|
253
280
|
//
|
|
254
281
|
// Supports up to 128 characters.
|
|
255
|
-
string display_name = 3;
|
|
282
|
+
string display_name = 3 [(google.api.field_behavior) = OPTIONAL];
|
|
256
283
|
|
|
257
|
-
// Immutable. Whether this space permits any Google Chat user as a
|
|
258
|
-
// Input when creating a space in a Google Workspace organization.
|
|
259
|
-
// field when creating spaces in the following conditions:
|
|
284
|
+
// Optional. Immutable. Whether this space permits any Google Chat user as a
|
|
285
|
+
// member. Input when creating a space in a Google Workspace organization.
|
|
286
|
+
// Omit this field when creating spaces in the following conditions:
|
|
260
287
|
//
|
|
261
288
|
// * The authenticated user uses a consumer account (unmanaged user
|
|
262
289
|
// account). By default, a space created by a consumer account permits any
|
|
263
290
|
// Google Chat user.
|
|
264
291
|
//
|
|
265
292
|
// For existing spaces, this field is output only.
|
|
266
|
-
bool external_user_allowed = 8 [
|
|
293
|
+
bool external_user_allowed = 8 [
|
|
294
|
+
(google.api.field_behavior) = IMMUTABLE,
|
|
295
|
+
(google.api.field_behavior) = OPTIONAL
|
|
296
|
+
];
|
|
267
297
|
|
|
268
298
|
// Output only. The threading state in the Chat space.
|
|
269
299
|
SpaceThreadingState space_threading_state = 9
|
|
270
300
|
[(google.api.field_behavior) = OUTPUT_ONLY];
|
|
271
301
|
|
|
272
|
-
// Details about the space including description and rules.
|
|
273
|
-
SpaceDetails space_details = 11;
|
|
302
|
+
// Optional. Details about the space including description and rules.
|
|
303
|
+
SpaceDetails space_details = 11 [(google.api.field_behavior) = OPTIONAL];
|
|
274
304
|
|
|
275
|
-
// The message history state for messages and threads in this space.
|
|
276
|
-
HistoryState space_history_state = 13
|
|
305
|
+
// Optional. The message history state for messages and threads in this space.
|
|
306
|
+
HistoryState space_history_state = 13
|
|
307
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
277
308
|
|
|
278
309
|
// Optional. Whether this space is created in `Import Mode` as part of a data
|
|
279
310
|
// migration into Google Workspace. While spaces are being imported, they
|
|
280
311
|
// aren't visible to users until the import is complete.
|
|
312
|
+
//
|
|
313
|
+
// Creating a space in `Import Mode`requires [user
|
|
314
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
|
|
281
315
|
bool import_mode = 16 [(google.api.field_behavior) = OPTIONAL];
|
|
282
316
|
|
|
283
317
|
// Optional. Immutable. For spaces created in Chat, the time the space was
|
|
@@ -322,6 +356,9 @@ message Space {
|
|
|
322
356
|
// Represents the [permission settings]
|
|
323
357
|
// (https://support.google.com/chat/answer/13340792) of a space. Only
|
|
324
358
|
// populated when the `space_type` is `SPACE`.
|
|
359
|
+
//
|
|
360
|
+
// Requires [user
|
|
361
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
|
|
325
362
|
oneof space_permission_settings {
|
|
326
363
|
// Optional. Input only. Predefined space permission settings, input only
|
|
327
364
|
// when creating a space. If the field is not set, a collaboration space is
|
|
@@ -338,20 +375,28 @@ message Space {
|
|
|
338
375
|
PermissionSettings permission_settings = 27
|
|
339
376
|
[(google.api.field_behavior) = OPTIONAL];
|
|
340
377
|
}
|
|
378
|
+
|
|
379
|
+
// Output only. The time when the space will be automatically deleted by the
|
|
380
|
+
// system if it remains in import mode.
|
|
381
|
+
//
|
|
382
|
+
// Each space created in import mode must exit this mode before this expire
|
|
383
|
+
// time using `spaces.completeImport`.
|
|
384
|
+
//
|
|
385
|
+
// This field is only populated for spaces that were created with import mode.
|
|
386
|
+
google.protobuf.Timestamp import_mode_expire_time = 28
|
|
387
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
|
341
388
|
}
|
|
342
389
|
|
|
343
390
|
// A request to create a named space with no members.
|
|
344
391
|
message CreateSpaceRequest {
|
|
345
392
|
// Required. The `displayName` and `spaceType` fields must be populated. Only
|
|
346
|
-
// `SpaceType.SPACE`
|
|
393
|
+
// `SpaceType.SPACE` and `SpaceType.GROUP_CHAT` are supported.
|
|
394
|
+
// `SpaceType.GROUP_CHAT` can only be used if `importMode` is set to true.
|
|
347
395
|
//
|
|
348
396
|
// If you receive the error message `ALREADY_EXISTS`,
|
|
349
397
|
// try a different `displayName`. An existing space within the Google
|
|
350
398
|
// Workspace organization might already use this display name.
|
|
351
399
|
//
|
|
352
|
-
// If you're a member of the [Developer Preview
|
|
353
|
-
// program](https://developers.google.com/workspace/preview),
|
|
354
|
-
// `SpaceType.GROUP_CHAT` can be used if `importMode` is set to true.
|
|
355
400
|
//
|
|
356
401
|
// The space `name` is assigned on the server so anything specified in this
|
|
357
402
|
// field will be ignored.
|
|
@@ -430,7 +475,7 @@ message GetSpaceRequest {
|
|
|
430
475
|
(google.api.resource_reference) = { type: "chat.googleapis.com/Space" }
|
|
431
476
|
];
|
|
432
477
|
|
|
433
|
-
// When `true`, the method runs using the user's Google Workspace
|
|
478
|
+
// Optional. When `true`, the method runs using the user's Google Workspace
|
|
434
479
|
// administrator privileges.
|
|
435
480
|
//
|
|
436
481
|
// The calling user must be a Google Workspace administrator with the
|
|
@@ -439,7 +484,7 @@ message GetSpaceRequest {
|
|
|
439
484
|
//
|
|
440
485
|
// Requires the `chat.admin.spaces` or `chat.admin.spaces.readonly` [OAuth 2.0
|
|
441
486
|
// scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes).
|
|
442
|
-
bool use_admin_access = 2;
|
|
487
|
+
bool use_admin_access = 2 [(google.api.field_behavior) = OPTIONAL];
|
|
443
488
|
}
|
|
444
489
|
|
|
445
490
|
// A request to get direct message space based on the user resource.
|
|
@@ -528,9 +573,10 @@ message UpdateSpaceRequest {
|
|
|
528
573
|
// - `permission_settings.manageApps`
|
|
529
574
|
// - `permission_settings.manageWebhooks`
|
|
530
575
|
// - `permission_settings.replyMessages`
|
|
531
|
-
google.protobuf.FieldMask update_mask = 2
|
|
576
|
+
google.protobuf.FieldMask update_mask = 2
|
|
577
|
+
[(google.api.field_behavior) = REQUIRED];
|
|
532
578
|
|
|
533
|
-
// When `true`, the method runs using the user's Google Workspace
|
|
579
|
+
// Optional. When `true`, the method runs using the user's Google Workspace
|
|
534
580
|
// administrator privileges.
|
|
535
581
|
//
|
|
536
582
|
// The calling user must be a Google Workspace administrator with the
|
|
@@ -542,7 +588,7 @@ message UpdateSpaceRequest {
|
|
|
542
588
|
//
|
|
543
589
|
// Some `FieldMask` values are not supported using admin access. For details,
|
|
544
590
|
// see the description of `update_mask`.
|
|
545
|
-
bool use_admin_access = 3;
|
|
591
|
+
bool use_admin_access = 3 [(google.api.field_behavior) = OPTIONAL];
|
|
546
592
|
}
|
|
547
593
|
|
|
548
594
|
// Request to search for a list of spaces based on a query.
|
|
@@ -700,7 +746,7 @@ message DeleteSpaceRequest {
|
|
|
700
746
|
(google.api.resource_reference) = { type: "chat.googleapis.com/Space" }
|
|
701
747
|
];
|
|
702
748
|
|
|
703
|
-
// When `true`, the method runs using the user's Google Workspace
|
|
749
|
+
// Optional. When `true`, the method runs using the user's Google Workspace
|
|
704
750
|
// administrator privileges.
|
|
705
751
|
//
|
|
706
752
|
// The calling user must be a Google Workspace administrator with the
|
|
@@ -709,7 +755,7 @@ message DeleteSpaceRequest {
|
|
|
709
755
|
//
|
|
710
756
|
// Requires the `chat.admin.delete` [OAuth 2.0
|
|
711
757
|
// scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes).
|
|
712
|
-
bool use_admin_access = 2;
|
|
758
|
+
bool use_admin_access = 2 [(google.api.field_behavior) = OPTIONAL];
|
|
713
759
|
}
|
|
714
760
|
|
|
715
761
|
// Request message for completing the import process for a space.
|
|
@@ -216,15 +216,15 @@ message ListSpaceEventsRequest {
|
|
|
216
216
|
// return fewer than this value.
|
|
217
217
|
//
|
|
218
218
|
// Negative values return an `INVALID_ARGUMENT` error.
|
|
219
|
-
int32 page_size = 5;
|
|
219
|
+
int32 page_size = 5 [(google.api.field_behavior) = OPTIONAL];
|
|
220
220
|
|
|
221
|
-
// A page token, received from a previous list space events call.
|
|
222
|
-
// to retrieve the subsequent page.
|
|
221
|
+
// Optional. A page token, received from a previous list space events call.
|
|
222
|
+
// Provide this to retrieve the subsequent page.
|
|
223
223
|
//
|
|
224
224
|
// When paginating, all other parameters provided to list space events must
|
|
225
225
|
// match the call that provided the page token. Passing different values to
|
|
226
226
|
// the other parameters might lead to unexpected results.
|
|
227
|
-
string page_token = 6;
|
|
227
|
+
string page_token = 6 [(google.api.field_behavior) = OPTIONAL];
|
|
228
228
|
|
|
229
229
|
// Required. A query filter.
|
|
230
230
|
//
|