@google-apps/chat 0.8.0 → 0.10.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 +3 -2
- package/build/protos/google/chat/v1/chat_service.proto +63 -42
- package/build/protos/google/chat/v1/membership.proto +69 -2
- package/build/protos/google/chat/v1/message.proto +14 -13
- package/build/protos/google/chat/v1/space.proto +361 -59
- package/build/protos/google/chat/v1/space_event.proto +2 -0
- package/build/protos/protos.d.ts +702 -0
- package/build/protos/protos.js +2604 -653
- package/build/protos/protos.json +270 -0
- package/build/src/v1/chat_service_client.d.ts +662 -86
- package/build/src/v1/chat_service_client.js +347 -4
- package/build/src/v1/chat_service_client.js.map +1 -1
- package/build/src/v1/chat_service_client_config.json +5 -0
- package/package.json +1 -1
|
@@ -103,6 +103,16 @@ message Space {
|
|
|
103
103
|
string guidelines = 2;
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
+
// Represents the count of memberships of a space, grouped into categories.
|
|
107
|
+
message MembershipCount {
|
|
108
|
+
// Count of human users that have directly joined the space, not counting
|
|
109
|
+
// users joined by having membership in a joined group.
|
|
110
|
+
int32 joined_direct_human_user_count = 4;
|
|
111
|
+
|
|
112
|
+
// Count of all groups that have directly joined the space.
|
|
113
|
+
int32 joined_group_count = 5;
|
|
114
|
+
}
|
|
115
|
+
|
|
106
116
|
// Represents the [access
|
|
107
117
|
// setting](https://support.google.com/chat/answer/11971020) of the space.
|
|
108
118
|
message AccessSettings {
|
|
@@ -111,12 +121,16 @@ message Space {
|
|
|
111
121
|
// Access state is unknown or not supported in this API.
|
|
112
122
|
ACCESS_STATE_UNSPECIFIED = 0;
|
|
113
123
|
|
|
114
|
-
//
|
|
124
|
+
// Only users or Google Groups that have been individually added or
|
|
125
|
+
// invited by other users or Google Workspace administrators can discover
|
|
126
|
+
// and access the space.
|
|
115
127
|
PRIVATE = 1;
|
|
116
128
|
|
|
117
|
-
//
|
|
118
|
-
//
|
|
119
|
-
//
|
|
129
|
+
// A space manager has granted a target audience access to
|
|
130
|
+
// the space. Users or Google Groups that have been individually added or
|
|
131
|
+
// invited to the space can also discover and access the space. To learn
|
|
132
|
+
// more, see [Make a space discoverable to specific
|
|
133
|
+
// users](https://developers.google.com/workspace/chat/space-target-audience).
|
|
120
134
|
DISCOVERABLE = 2;
|
|
121
135
|
}
|
|
122
136
|
|
|
@@ -125,20 +139,90 @@ message Space {
|
|
|
125
139
|
|
|
126
140
|
// Optional. The resource name of the [target
|
|
127
141
|
// audience](https://support.google.com/a/answer/9934697) who can discover
|
|
128
|
-
// the space, join the space, and preview the messages in the space.
|
|
129
|
-
//
|
|
142
|
+
// the space, join the space, and preview the messages in the space. If
|
|
143
|
+
// unset, only users or Google Groups who have been individually invited or
|
|
144
|
+
// added to the space can access it. For details, see [Make a space
|
|
145
|
+
// discoverable to a target
|
|
130
146
|
// audience](https://developers.google.com/workspace/chat/space-target-audience).
|
|
131
147
|
//
|
|
132
148
|
// Format: `audiences/{audience}`
|
|
133
149
|
//
|
|
134
150
|
// To use the default target audience for the Google Workspace organization,
|
|
135
151
|
// set to `audiences/default`.
|
|
152
|
+
//
|
|
153
|
+
// This field is not populated when using the `chat.bot` scope with [app
|
|
154
|
+
// authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app).
|
|
136
155
|
string audience = 3 [(google.api.field_behavior) = OPTIONAL];
|
|
137
156
|
}
|
|
138
157
|
|
|
158
|
+
// Predefined permission settings that you can only specify when creating a
|
|
159
|
+
// named space. More settings might be added in the future.
|
|
160
|
+
// For details about permission settings for named spaces, see [Learn about
|
|
161
|
+
// spaces](https://support.google.com/chat/answer/7659784).
|
|
162
|
+
enum PredefinedPermissionSettings {
|
|
163
|
+
// Unspecified. Don't use.
|
|
164
|
+
PREDEFINED_PERMISSION_SETTINGS_UNSPECIFIED = 0;
|
|
165
|
+
|
|
166
|
+
// Setting to make the space a collaboration space where all members can
|
|
167
|
+
// post messages.
|
|
168
|
+
COLLABORATION_SPACE = 1;
|
|
169
|
+
|
|
170
|
+
// Setting to make the space an announcement space where only space managers
|
|
171
|
+
// can post messages.
|
|
172
|
+
ANNOUNCEMENT_SPACE = 2;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
// [Permission settings](https://support.google.com/chat/answer/13340792)
|
|
176
|
+
// that you can specify when updating an existing named space.
|
|
177
|
+
//
|
|
178
|
+
// To set permission settings when creating a space, specify the
|
|
179
|
+
// `PredefinedPermissionSettings` field in your request.
|
|
180
|
+
message PermissionSettings {
|
|
181
|
+
// Setting for managing members and groups in a space.
|
|
182
|
+
optional PermissionSetting manage_members_and_groups = 1;
|
|
183
|
+
|
|
184
|
+
// Setting for updating space name, avatar, description and guidelines.
|
|
185
|
+
optional PermissionSetting modify_space_details = 2;
|
|
186
|
+
|
|
187
|
+
// Setting for toggling space history on and off.
|
|
188
|
+
optional PermissionSetting toggle_history = 3;
|
|
189
|
+
|
|
190
|
+
// Setting for using @all in a space.
|
|
191
|
+
optional PermissionSetting use_at_mention_all = 4;
|
|
192
|
+
|
|
193
|
+
// Setting for managing apps in a space.
|
|
194
|
+
optional PermissionSetting manage_apps = 5;
|
|
195
|
+
|
|
196
|
+
// Setting for managing webhooks in a space.
|
|
197
|
+
optional PermissionSetting manage_webhooks = 6;
|
|
198
|
+
|
|
199
|
+
// Output only. Setting for posting messages in a space.
|
|
200
|
+
optional PermissionSetting post_messages = 7
|
|
201
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
|
202
|
+
|
|
203
|
+
// Setting for replying to messages in a space.
|
|
204
|
+
optional PermissionSetting reply_messages = 8;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
// Represents a space permission setting.
|
|
208
|
+
message PermissionSetting {
|
|
209
|
+
// Whether spaces managers have this permission.
|
|
210
|
+
bool managers_allowed = 1;
|
|
211
|
+
|
|
212
|
+
// Whether non-manager members have this permission.
|
|
213
|
+
bool members_allowed = 2;
|
|
214
|
+
}
|
|
215
|
+
|
|
139
216
|
// Resource name of the space.
|
|
140
217
|
//
|
|
141
218
|
// Format: `spaces/{space}`
|
|
219
|
+
//
|
|
220
|
+
// Where `{space}` represents the system-assigned ID for the space. You can
|
|
221
|
+
// obtain the space ID by calling the
|
|
222
|
+
// [`spaces.list()`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/list)
|
|
223
|
+
// method or from the space URL. For example, if the space URL
|
|
224
|
+
// is `https://mail.google.com/mail/u/0/#chat/space/AAAAAAAAA`, the space ID
|
|
225
|
+
// is `AAAAAAAAA`.
|
|
142
226
|
string name = 1;
|
|
143
227
|
|
|
144
228
|
// Output only. Deprecated: Use `space_type` instead.
|
|
@@ -159,11 +243,11 @@ message Space {
|
|
|
159
243
|
[deprecated = true, (google.api.field_behavior) = OUTPUT_ONLY];
|
|
160
244
|
|
|
161
245
|
// The space's display name. Required when [creating a
|
|
162
|
-
// space](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/create)
|
|
163
|
-
// If you receive the error message
|
|
164
|
-
// updating the `displayName`, try a
|
|
165
|
-
// existing space within the Google Workspace
|
|
166
|
-
// this display name.
|
|
246
|
+
// space](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/create)
|
|
247
|
+
// with a `spaceType` of `SPACE`. If you receive the error message
|
|
248
|
+
// `ALREADY_EXISTS` when creating a space or updating the `displayName`, try a
|
|
249
|
+
// different `displayName`. An existing space within the Google Workspace
|
|
250
|
+
// organization might already use this display name.
|
|
167
251
|
//
|
|
168
252
|
// For direct messages, this field might be empty.
|
|
169
253
|
//
|
|
@@ -178,15 +262,6 @@ message Space {
|
|
|
178
262
|
// account). By default, a space created by a consumer account permits any
|
|
179
263
|
// Google Chat user.
|
|
180
264
|
//
|
|
181
|
-
// * The space is used to [import data to Google Chat]
|
|
182
|
-
// (https://developers.google.com/chat/api/guides/import-data-overview)
|
|
183
|
-
// because import mode spaces must only permit members from the same
|
|
184
|
-
// Google Workspace organization. However, as part of the [Google
|
|
185
|
-
// Workspace Developer Preview
|
|
186
|
-
// Program](https://developers.google.com/workspace/preview), import mode
|
|
187
|
-
// spaces can permit any Google Chat user so this field can then be set
|
|
188
|
-
// for import mode spaces.
|
|
189
|
-
//
|
|
190
265
|
// For existing spaces, this field is output only.
|
|
191
266
|
bool external_user_allowed = 8 [(google.api.field_behavior) = IMMUTABLE];
|
|
192
267
|
|
|
@@ -218,6 +293,10 @@ message Space {
|
|
|
218
293
|
(google.api.field_behavior) = OPTIONAL
|
|
219
294
|
];
|
|
220
295
|
|
|
296
|
+
// Output only. Timestamp of the last message in the space.
|
|
297
|
+
google.protobuf.Timestamp last_active_time = 18
|
|
298
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
|
299
|
+
|
|
221
300
|
// Output only. For direct message (DM) spaces with a Chat app, whether the
|
|
222
301
|
// space was created by a Google Workspace administrator. Administrators can
|
|
223
302
|
// install and set up a direct message with a Chat app on behalf of users in
|
|
@@ -226,6 +305,12 @@ message Space {
|
|
|
226
305
|
// To support admin install, your Chat app must feature direct messaging.
|
|
227
306
|
bool admin_installed = 19 [(google.api.field_behavior) = OUTPUT_ONLY];
|
|
228
307
|
|
|
308
|
+
// Output only. The count of joined memberships grouped by member type.
|
|
309
|
+
// Populated when the `space_type` is `SPACE`, `DIRECT_MESSAGE` or
|
|
310
|
+
// `GROUP_CHAT`.
|
|
311
|
+
MembershipCount membership_count = 20
|
|
312
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
|
313
|
+
|
|
229
314
|
// Optional. Specifies the [access
|
|
230
315
|
// setting](https://support.google.com/chat/answer/11971020) of the space.
|
|
231
316
|
// Only populated when the `space_type` is `SPACE`.
|
|
@@ -233,17 +318,41 @@ message Space {
|
|
|
233
318
|
|
|
234
319
|
// Output only. The URI for a user to access the space.
|
|
235
320
|
string space_uri = 25 [(google.api.field_behavior) = OUTPUT_ONLY];
|
|
321
|
+
|
|
322
|
+
// Represents the [permission settings]
|
|
323
|
+
// (https://support.google.com/chat/answer/13340792) of a space. Only
|
|
324
|
+
// populated when the `space_type` is `SPACE`.
|
|
325
|
+
oneof space_permission_settings {
|
|
326
|
+
// Optional. Input only. Predefined space permission settings, input only
|
|
327
|
+
// when creating a space. If the field is not set, a collaboration space is
|
|
328
|
+
// created. After you create the space, settings are populated in the
|
|
329
|
+
// `PermissionSettings` field.
|
|
330
|
+
PredefinedPermissionSettings predefined_permission_settings = 26 [
|
|
331
|
+
(google.api.field_behavior) = INPUT_ONLY,
|
|
332
|
+
(google.api.field_behavior) = OPTIONAL
|
|
333
|
+
];
|
|
334
|
+
|
|
335
|
+
// Optional. Space permission settings for existing spaces. Input for
|
|
336
|
+
// updating exact space permission settings, where existing permission
|
|
337
|
+
// settings are replaced. Output lists current permission settings.
|
|
338
|
+
PermissionSettings permission_settings = 27
|
|
339
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
340
|
+
}
|
|
236
341
|
}
|
|
237
342
|
|
|
238
|
-
// A request to create a named space.
|
|
343
|
+
// A request to create a named space with no members.
|
|
239
344
|
message CreateSpaceRequest {
|
|
240
345
|
// Required. The `displayName` and `spaceType` fields must be populated. Only
|
|
241
346
|
// `SpaceType.SPACE` is supported.
|
|
242
347
|
//
|
|
243
|
-
// If you receive the error message `ALREADY_EXISTS
|
|
348
|
+
// If you receive the error message `ALREADY_EXISTS`,
|
|
244
349
|
// try a different `displayName`. An existing space within the Google
|
|
245
350
|
// Workspace organization might already use this display name.
|
|
246
351
|
//
|
|
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
|
+
//
|
|
247
356
|
// The space `name` is assigned on the server so anything specified in this
|
|
248
357
|
// field will be ignored.
|
|
249
358
|
Space space = 1 [(google.api.field_behavior) = REQUIRED];
|
|
@@ -302,6 +411,8 @@ message ListSpacesRequest {
|
|
|
302
411
|
// The response for a list spaces request.
|
|
303
412
|
message ListSpacesResponse {
|
|
304
413
|
// List of spaces in the requested (or first) page.
|
|
414
|
+
// Note: The `permissionSettings` field is not returned in the Space
|
|
415
|
+
// object for list requests.
|
|
305
416
|
repeated Space spaces = 1;
|
|
306
417
|
|
|
307
418
|
// You can send a token as `pageToken` to retrieve the next page of
|
|
@@ -318,6 +429,17 @@ message GetSpaceRequest {
|
|
|
318
429
|
(google.api.field_behavior) = REQUIRED,
|
|
319
430
|
(google.api.resource_reference) = { type: "chat.googleapis.com/Space" }
|
|
320
431
|
];
|
|
432
|
+
|
|
433
|
+
// When `true`, the method runs using the user's Google Workspace
|
|
434
|
+
// administrator privileges.
|
|
435
|
+
//
|
|
436
|
+
// The calling user must be a Google Workspace administrator with the
|
|
437
|
+
// [manage chat and spaces conversations
|
|
438
|
+
// privilege](https://support.google.com/a/answer/13369245).
|
|
439
|
+
//
|
|
440
|
+
// Requires the `chat.admin.spaces` or `chat.admin.spaces.readonly` [OAuth 2.0
|
|
441
|
+
// scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes).
|
|
442
|
+
bool use_admin_access = 2;
|
|
321
443
|
}
|
|
322
444
|
|
|
323
445
|
// A request to get direct message space based on the user resource.
|
|
@@ -348,55 +470,224 @@ message UpdateSpaceRequest {
|
|
|
348
470
|
// Required. The updated field paths, comma separated if there are
|
|
349
471
|
// multiple.
|
|
350
472
|
//
|
|
351
|
-
//
|
|
473
|
+
// You can update the following fields for a space:
|
|
474
|
+
//
|
|
475
|
+
// `space_details`: Updates the space's description. Supports up to 150
|
|
476
|
+
// characters.
|
|
352
477
|
//
|
|
353
|
-
//
|
|
354
|
-
//
|
|
355
|
-
//
|
|
356
|
-
//
|
|
357
|
-
//
|
|
358
|
-
// `displayName`, try a different `displayName`. An existing space within the
|
|
359
|
-
// Google Workspace organization might already use this display name.)
|
|
478
|
+
// `display_name`: Only supports updating the display name for spaces where
|
|
479
|
+
// `spaceType` field is `SPACE`.
|
|
480
|
+
// If you receive the error message `ALREADY_EXISTS`, try a different
|
|
481
|
+
// value. An existing space within the
|
|
482
|
+
// Google Workspace organization might already use this display name.
|
|
360
483
|
//
|
|
361
|
-
//
|
|
484
|
+
// `space_type`: Only supports changing a `GROUP_CHAT` space type to
|
|
362
485
|
// `SPACE`. Include `display_name` together
|
|
363
486
|
// with `space_type` in the update mask and ensure that the specified space
|
|
364
487
|
// has a non-empty display name and the `SPACE` space type. Including the
|
|
365
488
|
// `space_type` mask and the `SPACE` type in the specified space when updating
|
|
366
489
|
// the display name is optional if the existing space already has the `SPACE`
|
|
367
490
|
// type. Trying to update the space type in other ways results in an invalid
|
|
368
|
-
// argument error
|
|
369
|
-
// `space_type` is not supported with
|
|
491
|
+
// argument error.
|
|
492
|
+
// `space_type` is not supported with `useAdminAccess`.
|
|
370
493
|
//
|
|
371
|
-
//
|
|
494
|
+
// `space_history_state`: Updates [space history
|
|
495
|
+
// settings](https://support.google.com/chat/answer/7664687) by turning
|
|
496
|
+
// history on or off for the space. Only supported if history settings are
|
|
497
|
+
// enabled for the Google Workspace organization. To update the
|
|
498
|
+
// space history state, you must omit all other field masks in your request.
|
|
499
|
+
// `space_history_state` is not supported with `useAdminAccess`.
|
|
372
500
|
//
|
|
373
|
-
//
|
|
374
|
-
// space](https://support.google.com/chat/answer/7664687) if [the organization
|
|
375
|
-
// allows users to change their history
|
|
376
|
-
// setting](https://support.google.com/a/answer/7664184).
|
|
377
|
-
// Warning: mutually exclusive with all other field paths.)
|
|
378
|
-
// `space_history_state` is not supported with admin access.
|
|
379
|
-
//
|
|
380
|
-
// - `access_settings.audience` (Supports changing the [access
|
|
501
|
+
// `access_settings.audience`: Updates the [access
|
|
381
502
|
// setting](https://support.google.com/chat/answer/11971020) of who can
|
|
382
|
-
// discover the space, join the space, and preview the messages in space
|
|
383
|
-
//
|
|
384
|
-
//
|
|
385
|
-
//
|
|
386
|
-
//
|
|
387
|
-
//
|
|
388
|
-
//
|
|
389
|
-
//
|
|
390
|
-
//
|
|
391
|
-
//
|
|
392
|
-
// `
|
|
393
|
-
//
|
|
394
|
-
// `permission_settings
|
|
395
|
-
//
|
|
396
|
-
//
|
|
397
|
-
//
|
|
398
|
-
//
|
|
503
|
+
// discover the space, join the space, and preview the messages in named space
|
|
504
|
+
// where `spaceType` field is `SPACE`. If the existing space has a
|
|
505
|
+
// target audience, you can remove the audience and restrict space access by
|
|
506
|
+
// omitting a value for this field mask. To update access settings for a
|
|
507
|
+
// space, the authenticating user must be a space manager and omit all other
|
|
508
|
+
// field masks in your request. You can't update this field if the space is in
|
|
509
|
+
// [import
|
|
510
|
+
// mode](https://developers.google.com/workspace/chat/import-data-overview).
|
|
511
|
+
// To learn more, see [Make a space discoverable to specific
|
|
512
|
+
// users](https://developers.google.com/workspace/chat/space-target-audience).
|
|
513
|
+
// `access_settings.audience` is not supported with `useAdminAccess`.
|
|
514
|
+
//
|
|
515
|
+
// `permission_settings`: Supports changing the
|
|
516
|
+
// [permission settings](https://support.google.com/chat/answer/13340792)
|
|
517
|
+
// of a space.
|
|
518
|
+
// When updating permission settings, you can only specify
|
|
519
|
+
// `permissionSettings` field masks; you cannot update other field masks
|
|
520
|
+
// at the same time. `permissionSettings` is not supported with
|
|
521
|
+
// `useAdminAccess`.
|
|
522
|
+
// The supported field masks include:
|
|
523
|
+
//
|
|
524
|
+
// - `permission_settings.manageMembersAndGroups`
|
|
525
|
+
// - `permission_settings.modifySpaceDetails`
|
|
526
|
+
// - `permission_settings.toggleHistory`
|
|
527
|
+
// - `permission_settings.useAtMentionAll`
|
|
528
|
+
// - `permission_settings.manageApps`
|
|
529
|
+
// - `permission_settings.manageWebhooks`
|
|
530
|
+
// - `permission_settings.replyMessages`
|
|
399
531
|
google.protobuf.FieldMask update_mask = 2;
|
|
532
|
+
|
|
533
|
+
// When `true`, the method runs using the user's Google Workspace
|
|
534
|
+
// administrator privileges.
|
|
535
|
+
//
|
|
536
|
+
// The calling user must be a Google Workspace administrator with the
|
|
537
|
+
// [manage chat and spaces conversations
|
|
538
|
+
// privilege](https://support.google.com/a/answer/13369245).
|
|
539
|
+
//
|
|
540
|
+
// Requires the `chat.admin.spaces` [OAuth 2.0
|
|
541
|
+
// scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes).
|
|
542
|
+
//
|
|
543
|
+
// Some `FieldMask` values are not supported using admin access. For details,
|
|
544
|
+
// see the description of `update_mask`.
|
|
545
|
+
bool use_admin_access = 3;
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
// Request to search for a list of spaces based on a query.
|
|
549
|
+
message SearchSpacesRequest {
|
|
550
|
+
// When `true`, the method runs using the user's Google Workspace
|
|
551
|
+
// administrator privileges.
|
|
552
|
+
//
|
|
553
|
+
// The calling user must be a Google Workspace administrator with the
|
|
554
|
+
// [manage chat and spaces conversations
|
|
555
|
+
// privilege](https://support.google.com/a/answer/13369245).
|
|
556
|
+
//
|
|
557
|
+
// Requires either the `chat.admin.spaces.readonly` or `chat.admin.spaces`
|
|
558
|
+
// [OAuth 2.0
|
|
559
|
+
// scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes).
|
|
560
|
+
//
|
|
561
|
+
// This method currently only supports admin access, thus only `true` is
|
|
562
|
+
// accepted for this field.
|
|
563
|
+
bool use_admin_access = 1;
|
|
564
|
+
|
|
565
|
+
// The maximum number of spaces to return. The service may return fewer than
|
|
566
|
+
// this value.
|
|
567
|
+
//
|
|
568
|
+
// If unspecified, at most 100 spaces are returned.
|
|
569
|
+
//
|
|
570
|
+
// The maximum value is 1000. If you use a value more than 1000, it's
|
|
571
|
+
// automatically changed to 1000.
|
|
572
|
+
int32 page_size = 2;
|
|
573
|
+
|
|
574
|
+
// A token, received from the previous search spaces call. Provide this
|
|
575
|
+
// parameter to retrieve the subsequent page.
|
|
576
|
+
//
|
|
577
|
+
// When paginating, all other parameters provided should match the call that
|
|
578
|
+
// provided the page token. Passing different values to the other parameters
|
|
579
|
+
// might lead to unexpected results.
|
|
580
|
+
string page_token = 3;
|
|
581
|
+
|
|
582
|
+
// Required. A search query.
|
|
583
|
+
//
|
|
584
|
+
// You can search by using the following parameters:
|
|
585
|
+
//
|
|
586
|
+
// - `create_time`
|
|
587
|
+
// - `customer`
|
|
588
|
+
// - `display_name`
|
|
589
|
+
// - `external_user_allowed`
|
|
590
|
+
// - `last_active_time`
|
|
591
|
+
// - `space_history_state`
|
|
592
|
+
// - `space_type`
|
|
593
|
+
//
|
|
594
|
+
// `create_time` and `last_active_time` accept a timestamp in
|
|
595
|
+
// [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339) format and the supported
|
|
596
|
+
// comparison operators are: `=`, `<`, `>`, `<=`, `>=`.
|
|
597
|
+
//
|
|
598
|
+
// `customer` is required and is used to indicate which customer
|
|
599
|
+
// to fetch spaces from. `customers/my_customer` is the only supported value.
|
|
600
|
+
//
|
|
601
|
+
// `display_name` only accepts the `HAS` (`:`) operator. The text to
|
|
602
|
+
// match is first tokenized into tokens and each token is prefix-matched
|
|
603
|
+
// case-insensitively and independently as a substring anywhere in the space's
|
|
604
|
+
// `display_name`. For example, `Fun Eve` matches `Fun event` or `The
|
|
605
|
+
// evening was fun`, but not `notFun event` or `even`.
|
|
606
|
+
//
|
|
607
|
+
// `external_user_allowed` accepts either `true` or `false`.
|
|
608
|
+
//
|
|
609
|
+
// `space_history_state` only accepts values from the [`historyState`]
|
|
610
|
+
// (https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.HistoryState)
|
|
611
|
+
// field of a `space` resource.
|
|
612
|
+
//
|
|
613
|
+
// `space_type` is required and the only valid value is `SPACE`.
|
|
614
|
+
//
|
|
615
|
+
// Across different fields, only `AND` operators are supported. A valid
|
|
616
|
+
// example is `space_type = "SPACE" AND display_name:"Hello"` and an invalid
|
|
617
|
+
// example is `space_type = "SPACE" OR display_name:"Hello"`.
|
|
618
|
+
//
|
|
619
|
+
// Among the same field,
|
|
620
|
+
// `space_type` doesn't support `AND` or `OR` operators.
|
|
621
|
+
// `display_name`, 'space_history_state', and 'external_user_allowed' only
|
|
622
|
+
// support `OR` operators.
|
|
623
|
+
// `last_active_time` and `create_time` support both `AND` and `OR` operators.
|
|
624
|
+
// `AND` can only be used to represent an interval, such as `last_active_time
|
|
625
|
+
// < "2022-01-01T00:00:00+00:00" AND last_active_time >
|
|
626
|
+
// "2023-01-01T00:00:00+00:00"`.
|
|
627
|
+
//
|
|
628
|
+
// The following example queries are valid:
|
|
629
|
+
//
|
|
630
|
+
// ```
|
|
631
|
+
// customer = "customers/my_customer" AND space_type = "SPACE"
|
|
632
|
+
//
|
|
633
|
+
// customer = "customers/my_customer" AND space_type = "SPACE" AND
|
|
634
|
+
// display_name:"Hello World"
|
|
635
|
+
//
|
|
636
|
+
// customer = "customers/my_customer" AND space_type = "SPACE" AND
|
|
637
|
+
// (last_active_time < "2020-01-01T00:00:00+00:00" OR last_active_time >
|
|
638
|
+
// "2022-01-01T00:00:00+00:00")
|
|
639
|
+
//
|
|
640
|
+
// customer = "customers/my_customer" AND space_type = "SPACE" AND
|
|
641
|
+
// (display_name:"Hello World" OR display_name:"Fun event") AND
|
|
642
|
+
// (last_active_time > "2020-01-01T00:00:00+00:00" AND last_active_time <
|
|
643
|
+
// "2022-01-01T00:00:00+00:00")
|
|
644
|
+
//
|
|
645
|
+
// customer = "customers/my_customer" AND space_type = "SPACE" AND
|
|
646
|
+
// (create_time > "2019-01-01T00:00:00+00:00" AND create_time <
|
|
647
|
+
// "2020-01-01T00:00:00+00:00") AND (external_user_allowed = "true") AND
|
|
648
|
+
// (space_history_state = "HISTORY_ON" OR space_history_state = "HISTORY_OFF")
|
|
649
|
+
// ```
|
|
650
|
+
string query = 4 [(google.api.field_behavior) = REQUIRED];
|
|
651
|
+
|
|
652
|
+
// Optional. How the list of spaces is ordered.
|
|
653
|
+
//
|
|
654
|
+
// Supported attributes to order by are:
|
|
655
|
+
//
|
|
656
|
+
// - `membership_count.joined_direct_human_user_count` — Denotes the count of
|
|
657
|
+
// human users that have directly joined a space.
|
|
658
|
+
// - `last_active_time` — Denotes the time when last eligible item is added to
|
|
659
|
+
// any topic of this space.
|
|
660
|
+
// - `create_time` — Denotes the time of the space creation.
|
|
661
|
+
//
|
|
662
|
+
// Valid ordering operation values are:
|
|
663
|
+
//
|
|
664
|
+
// - `ASC` for ascending. Default value.
|
|
665
|
+
//
|
|
666
|
+
// - `DESC` for descending.
|
|
667
|
+
//
|
|
668
|
+
// The supported syntax are:
|
|
669
|
+
//
|
|
670
|
+
// - `membership_count.joined_direct_human_user_count DESC`
|
|
671
|
+
// - `membership_count.joined_direct_human_user_count ASC`
|
|
672
|
+
// - `last_active_time DESC`
|
|
673
|
+
// - `last_active_time ASC`
|
|
674
|
+
// - `create_time DESC`
|
|
675
|
+
// - `create_time ASC`
|
|
676
|
+
string order_by = 5 [(google.api.field_behavior) = OPTIONAL];
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
// Response with a list of spaces corresponding to the search spaces request.
|
|
680
|
+
message SearchSpacesResponse {
|
|
681
|
+
// A page of the requested spaces.
|
|
682
|
+
repeated Space spaces = 1;
|
|
683
|
+
|
|
684
|
+
// A token that can be used to retrieve the next page. If this field is empty,
|
|
685
|
+
// there are no subsequent pages.
|
|
686
|
+
string next_page_token = 2;
|
|
687
|
+
|
|
688
|
+
// The total number of spaces that match the query, across all pages. If the
|
|
689
|
+
// result is over 10,000 spaces, this value is an estimate.
|
|
690
|
+
int32 total_size = 3;
|
|
400
691
|
}
|
|
401
692
|
|
|
402
693
|
// Request for deleting a space.
|
|
@@ -408,6 +699,17 @@ message DeleteSpaceRequest {
|
|
|
408
699
|
(google.api.field_behavior) = REQUIRED,
|
|
409
700
|
(google.api.resource_reference) = { type: "chat.googleapis.com/Space" }
|
|
410
701
|
];
|
|
702
|
+
|
|
703
|
+
// When `true`, the method runs using the user's Google Workspace
|
|
704
|
+
// administrator privileges.
|
|
705
|
+
//
|
|
706
|
+
// The calling user must be a Google Workspace administrator with the
|
|
707
|
+
// [manage chat and spaces conversations
|
|
708
|
+
// privilege](https://support.google.com/a/answer/13369245).
|
|
709
|
+
//
|
|
710
|
+
// Requires the `chat.admin.delete` [OAuth 2.0
|
|
711
|
+
// scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes).
|
|
712
|
+
bool use_admin_access = 2;
|
|
411
713
|
}
|
|
412
714
|
|
|
413
715
|
// Request message for completing the import process for a space.
|
|
@@ -284,6 +284,8 @@ message ListSpaceEventsRequest {
|
|
|
284
284
|
// Response message for listing space events.
|
|
285
285
|
message ListSpaceEventsResponse {
|
|
286
286
|
// Results are returned in chronological order (oldest event first).
|
|
287
|
+
// Note: The `permissionSettings` field is not returned in the Space
|
|
288
|
+
// object for list requests.
|
|
287
289
|
repeated SpaceEvent space_events = 1;
|
|
288
290
|
|
|
289
291
|
// Continuation token used to fetch more events.
|