@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.
@@ -119,8 +119,11 @@ export declare class ChatServiceClient {
119
119
  * Creates a message in a Google Chat space. For an example, see [Send a
120
120
  * message](https://developers.google.com/workspace/chat/create-messages).
121
121
  *
122
- * The `create()` method requires either user or app authentication. Chat
123
- * attributes the message sender differently depending on the type of
122
+ * The `create()` method requires either [user
123
+ * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
124
+ * or [app
125
+ * authentication](https://developers.google.com/workspace/chat/authorize-import).
126
+ * Chat attributes the message sender differently depending on the type of
124
127
  * authentication that you use in your request.
125
128
  *
126
129
  * The following image shows how Chat attributes a message when you use app
@@ -141,6 +144,12 @@ export declare class ChatServiceClient {
141
144
  *
142
145
  * The maximum message size, including the message contents, is 32,000 bytes.
143
146
  *
147
+ * For
148
+ * [webhook](https://developers.google.com/workspace/chat/quickstart/webhooks)
149
+ * requests, the response doesn't contain the full message. The response only
150
+ * populates the `name` and `thread.name` fields in addition to the
151
+ * information that was in the request.
152
+ *
144
153
  * @param {Object} request
145
154
  * The request object that will be sent.
146
155
  * @param {string} request.parent
@@ -164,6 +173,12 @@ export declare class ChatServiceClient {
164
173
  * @param {google.chat.v1.CreateMessageRequest.MessageReplyOption} [request.messageReplyOption]
165
174
  * Optional. Specifies whether a message starts a thread or replies to one.
166
175
  * Only supported in named spaces.
176
+ *
177
+ * When [responding to user
178
+ * interactions](https://developers.google.com/workspace/chat/receive-respond-interactions),
179
+ * this field is ignored. For interactions within a thread, the reply is
180
+ * created in the same thread. Otherwise, the reply is created as a new
181
+ * thread.
167
182
  * @param {string} [request.messageId]
168
183
  * Optional. A custom ID for a message. Lets Chat apps get, update, or delete
169
184
  * a message without needing to store the system-assigned ID in the message's
@@ -201,13 +216,16 @@ export declare class ChatServiceClient {
201
216
  * [Get details about a user's or Google Chat app's
202
217
  * membership](https://developers.google.com/workspace/chat/get-members).
203
218
  *
204
- * Requires
205
- * [authentication](https://developers.google.com/workspace/chat/authenticate-authorize).
206
- * Supports
207
- * [app
219
+ * Supports the following types of
220
+ * [authentication](https://developers.google.com/workspace/chat/authenticate-authorize):
221
+ *
222
+ * - [App
208
223
  * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
209
- * and [user
210
- * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
224
+ *
225
+ * - [User
226
+ * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
227
+ * You can authenticate and authorize this method with administrator
228
+ * privileges by setting the `use_admin_access` field in the request.
211
229
  *
212
230
  * @param {Object} request
213
231
  * The request object that will be sent.
@@ -220,13 +238,11 @@ export declare class ChatServiceClient {
220
238
  *
221
239
  * Format: `spaces/{space}/members/{member}` or `spaces/{space}/members/app`
222
240
  *
223
- * When [authenticated as a
224
- * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user),
225
- * you can use the user's email as an alias for `{member}`. For example,
241
+ * You can use the user's email as an alias for `{member}`. For example,
226
242
  * `spaces/{space}/members/example@gmail.com` where `example@gmail.com` is the
227
243
  * email of the Google Chat user.
228
- * @param {boolean} request.useAdminAccess
229
- * When `true`, the method runs using the user's Google Workspace
244
+ * @param {boolean} [request.useAdminAccess]
245
+ * Optional. When `true`, the method runs using the user's Google Workspace
230
246
  * administrator privileges.
231
247
  *
232
248
  * The calling user must be a Google Workspace administrator with the
@@ -259,13 +275,14 @@ export declare class ChatServiceClient {
259
275
  * For an example, see [Get details about a
260
276
  * message](https://developers.google.com/workspace/chat/get-messages).
261
277
  *
262
- * Requires
263
- * [authentication](https://developers.google.com/workspace/chat/authenticate-authorize).
264
- * Supports
265
- * [app
278
+ * Supports the following types of
279
+ * [authentication](https://developers.google.com/workspace/chat/authenticate-authorize):
280
+ *
281
+ * - [App
266
282
  * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
267
- * and [user
268
- * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
283
+ *
284
+ * - [User
285
+ * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
269
286
  *
270
287
  * Note: Might return a message from a blocked member or space.
271
288
  *
@@ -304,13 +321,15 @@ export declare class ChatServiceClient {
304
321
  * [Update a
305
322
  * message](https://developers.google.com/workspace/chat/update-messages).
306
323
  *
307
- * Requires
308
- * [authentication](https://developers.google.com/workspace/chat/authenticate-authorize).
309
- * Supports
310
- * [app
324
+ * Supports the following types of
325
+ * [authentication](https://developers.google.com/workspace/chat/authenticate-authorize):
326
+ *
327
+ * - [App
311
328
  * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
312
- * and [user
313
- * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
329
+ *
330
+ * - [User
331
+ * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
332
+ *
314
333
  * When using app authentication, requests can only update messages
315
334
  * created by the calling Chat app.
316
335
  *
@@ -362,13 +381,15 @@ export declare class ChatServiceClient {
362
381
  * For an example, see [Delete a
363
382
  * message](https://developers.google.com/workspace/chat/delete-messages).
364
383
  *
365
- * Requires
366
- * [authentication](https://developers.google.com/workspace/chat/authenticate-authorize).
367
- * Supports
368
- * [app
384
+ * Supports the following types of
385
+ * [authentication](https://developers.google.com/workspace/chat/authenticate-authorize):
386
+ *
387
+ * - [App
369
388
  * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
370
- * and [user
371
- * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
389
+ *
390
+ * - [User
391
+ * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
392
+ *
372
393
  * When using app authentication, requests can only delete messages
373
394
  * created by the calling Chat app.
374
395
  *
@@ -383,9 +404,9 @@ export declare class ChatServiceClient {
383
404
  * `clientAssignedMessageId` field for `{message}`. For details, see [Name a
384
405
  * message]
385
406
  * (https://developers.google.com/workspace/chat/create-messages#name_a_created_message).
386
- * @param {boolean} request.force
387
- * When `true`, deleting a message also deletes its threaded replies. When
388
- * `false`, if a message has threaded replies, deletion fails.
407
+ * @param {boolean} [request.force]
408
+ * Optional. When `true`, deleting a message also deletes its threaded
409
+ * replies. When `false`, if a message has threaded replies, deletion fails.
389
410
  *
390
411
  * Only applies when [authenticating as a
391
412
  * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
@@ -442,6 +463,7 @@ export declare class ChatServiceClient {
442
463
  * Uploads an attachment. For an example, see
443
464
  * [Upload media as a file
444
465
  * attachment](https://developers.google.com/workspace/chat/upload-media-attachments).
466
+ *
445
467
  * Requires user
446
468
  * [authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
447
469
  *
@@ -477,13 +499,16 @@ export declare class ChatServiceClient {
477
499
  * [Get details about a
478
500
  * space](https://developers.google.com/workspace/chat/get-spaces).
479
501
  *
480
- * Requires
481
- * [authentication](https://developers.google.com/workspace/chat/authenticate-authorize).
482
- * Supports
483
- * [app
502
+ * Supports the following types of
503
+ * [authentication](https://developers.google.com/workspace/chat/authenticate-authorize):
504
+ *
505
+ * - [App
484
506
  * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
485
- * and [user
486
- * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
507
+ *
508
+ * - [User
509
+ * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
510
+ * You can authenticate and authorize this method with administrator
511
+ * privileges by setting the `use_admin_access` field in the request.
487
512
  *
488
513
  * @param {Object} request
489
514
  * The request object that will be sent.
@@ -491,8 +516,8 @@ export declare class ChatServiceClient {
491
516
  * Required. Resource name of the space, in the form `spaces/{space}`.
492
517
  *
493
518
  * Format: `spaces/{space}`
494
- * @param {boolean} request.useAdminAccess
495
- * When `true`, the method runs using the user's Google Workspace
519
+ * @param {boolean} [request.useAdminAccess]
520
+ * Optional. When `true`, the method runs using the user's Google Workspace
496
521
  * administrator privileges.
497
522
  *
498
523
  * The calling user must be a Google Workspace administrator with the
@@ -518,35 +543,39 @@ export declare class ChatServiceClient {
518
543
  getSpace(request: protos.google.chat.v1.IGetSpaceRequest, options: CallOptions, callback: Callback<protos.google.chat.v1.ISpace, protos.google.chat.v1.IGetSpaceRequest | null | undefined, {} | null | undefined>): void;
519
544
  getSpace(request: protos.google.chat.v1.IGetSpaceRequest, callback: Callback<protos.google.chat.v1.ISpace, protos.google.chat.v1.IGetSpaceRequest | null | undefined, {} | null | undefined>): void;
520
545
  /**
521
- * Creates a space with no members. Can be used to create a named space.
522
- * Spaces grouped by topics aren't supported. For an example, see
523
- * [Create a
546
+ * Creates a space with no members. Can be used to create a named space, or a
547
+ * group chat in `Import mode`. For an example, see [Create a
524
548
  * space](https://developers.google.com/workspace/chat/create-spaces).
525
549
  *
526
550
  * If you receive the error message `ALREADY_EXISTS` when creating
527
551
  * a space, try a different `displayName`. An existing space within
528
552
  * the Google Workspace organization might already use this display name.
529
553
  *
530
- * If you're a member of the [Developer Preview
531
- * program](https://developers.google.com/workspace/preview), you can create a
532
- * group chat in import mode using `spaceType.GROUP_CHAT`.
554
+ * Supports the following types of
555
+ * [authentication](https://developers.google.com/workspace/chat/authenticate-authorize):
533
556
  *
534
- * Requires [user
535
- * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
557
+ * - [App
558
+ * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
559
+ * with [administrator approval](https://support.google.com/a?p=chat-app-auth)
560
+ * in [Developer Preview](https://developers.google.com/workspace/preview)
561
+ *
562
+ * - [User
563
+ * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
564
+ *
565
+ * When authenticating as an app, the `space.customer` field must be set in
566
+ * the request.
536
567
  *
537
568
  * @param {Object} request
538
569
  * The request object that will be sent.
539
570
  * @param {google.chat.v1.Space} request.space
540
571
  * Required. The `displayName` and `spaceType` fields must be populated. Only
541
- * `SpaceType.SPACE` is supported.
572
+ * `SpaceType.SPACE` and `SpaceType.GROUP_CHAT` are supported.
573
+ * `SpaceType.GROUP_CHAT` can only be used if `importMode` is set to true.
542
574
  *
543
575
  * If you receive the error message `ALREADY_EXISTS`,
544
576
  * try a different `displayName`. An existing space within the Google
545
577
  * Workspace organization might already use this display name.
546
578
  *
547
- * If you're a member of the [Developer Preview
548
- * program](https://developers.google.com/workspace/preview),
549
- * `SpaceType.GROUP_CHAT` can be used if `importMode` is set to true.
550
579
  *
551
580
  * The space `name` is assigned on the server so anything specified in this
552
581
  * field will be ignored.
@@ -715,8 +744,18 @@ export declare class ChatServiceClient {
715
744
  * `ALREADY_EXISTS`, try a different display name.. An existing space within
716
745
  * the Google Workspace organization might already use this display name.
717
746
  *
718
- * Requires [user
719
- * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
747
+ * Supports the following types of
748
+ * [authentication](https://developers.google.com/workspace/chat/authenticate-authorize):
749
+ *
750
+ * - [App
751
+ * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
752
+ * with [administrator approval](https://support.google.com/a?p=chat-app-auth)
753
+ * in [Developer Preview](https://developers.google.com/workspace/preview)
754
+ *
755
+ * - [User
756
+ * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
757
+ * You can authenticate and authorize this method with administrator
758
+ * privileges by setting the `use_admin_access` field in the request.
720
759
  *
721
760
  * @param {Object} request
722
761
  * The request object that will be sent.
@@ -786,8 +825,8 @@ export declare class ChatServiceClient {
786
825
  * - `permission_settings.manageApps`
787
826
  * - `permission_settings.manageWebhooks`
788
827
  * - `permission_settings.replyMessages`
789
- * @param {boolean} request.useAdminAccess
790
- * When `true`, the method runs using the user's Google Workspace
828
+ * @param {boolean} [request.useAdminAccess]
829
+ * Optional. When `true`, the method runs using the user's Google Workspace
791
830
  * administrator privileges.
792
831
  *
793
832
  * The calling user must be a Google Workspace administrator with the
@@ -821,9 +860,19 @@ export declare class ChatServiceClient {
821
860
  * memberships in the space—are also deleted. For an example, see
822
861
  * [Delete a
823
862
  * space](https://developers.google.com/workspace/chat/delete-spaces).
824
- * Requires [user
863
+ *
864
+ * Supports the following types of
865
+ * [authentication](https://developers.google.com/workspace/chat/authenticate-authorize):
866
+ *
867
+ * - [App
868
+ * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
869
+ * with [administrator approval](https://support.google.com/a?p=chat-app-auth)
870
+ * in [Developer Preview](https://developers.google.com/workspace/preview)
871
+ *
872
+ * - [User
825
873
  * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
826
- * from a user who has permission to delete the space.
874
+ * You can authenticate and authorize this method with administrator
875
+ * privileges by setting the `use_admin_access` field in the request.
827
876
  *
828
877
  * @param {Object} request
829
878
  * The request object that will be sent.
@@ -831,8 +880,8 @@ export declare class ChatServiceClient {
831
880
  * Required. Resource name of the space to delete.
832
881
  *
833
882
  * Format: `spaces/{space}`
834
- * @param {boolean} request.useAdminAccess
835
- * When `true`, the method runs using the user's Google Workspace
883
+ * @param {boolean} [request.useAdminAccess]
884
+ * Optional. When `true`, the method runs using the user's Google Workspace
836
885
  * administrator privileges.
837
886
  *
838
887
  * The calling user must be a Google Workspace administrator with the
@@ -861,8 +910,11 @@ export declare class ChatServiceClient {
861
910
  * Completes the
862
911
  * [import process](https://developers.google.com/workspace/chat/import-data)
863
912
  * for the specified space and makes it visible to users.
864
- * Requires app authentication and domain-wide delegation. For more
865
- * information, see [Authorize Google Chat apps to import
913
+ *
914
+ * Requires [app
915
+ * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
916
+ * and domain-wide delegation. For more information, see [Authorize Google
917
+ * Chat apps to import
866
918
  * data](https://developers.google.com/workspace/chat/authorize-import).
867
919
  *
868
920
  * @param {Object} request
@@ -893,20 +945,24 @@ export declare class ChatServiceClient {
893
945
  * see
894
946
  * [Find a direct message](/chat/api/guides/v1/spaces/find-direct-message).
895
947
  *
948
+ * With [app
949
+ * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app),
950
+ * returns the direct message space between the specified user and the calling
951
+ * Chat app.
952
+ *
896
953
  * With [user
897
954
  * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user),
898
955
  * returns the direct message space between the specified user and the
899
956
  * authenticated user.
900
957
  *
901
- * With [app
902
- * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app),
903
- * returns the direct message space between the specified user and the calling
904
- * Chat app.
958
+ * // Supports the following types of
959
+ * [authentication](https://developers.google.com/workspace/chat/authenticate-authorize):
905
960
  *
906
- * Requires [user
961
+ * - [App
962
+ * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
963
+ *
964
+ * - [User
907
965
  * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
908
- * or [app
909
- * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app).
910
966
  *
911
967
  * @param {Object} request
912
968
  * The request object that will be sent.
@@ -947,8 +1003,19 @@ export declare class ChatServiceClient {
947
1003
  * policy turned off, then they're invited, and must accept the space
948
1004
  * invitation before joining. Otherwise, creating a membership adds the member
949
1005
  * directly to the specified space.
950
- * Requires [user
951
- * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
1006
+ *
1007
+ * Supports the following types of
1008
+ * [authentication](https://developers.google.com/workspace/chat/authenticate-authorize):
1009
+ *
1010
+ * - [App
1011
+ * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
1012
+ * with [administrator approval](https://support.google.com/a?p=chat-app-auth)
1013
+ * in [Developer Preview](https://developers.google.com/workspace/preview)
1014
+ *
1015
+ * - [User
1016
+ * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
1017
+ * You can authenticate and authorize this method with administrator
1018
+ * privileges by setting the `use_admin_access` field in the request.
952
1019
  *
953
1020
  * For example usage, see:
954
1021
  *
@@ -970,23 +1037,44 @@ export declare class ChatServiceClient {
970
1037
  * Format: spaces/{space}
971
1038
  * @param {google.chat.v1.Membership} request.membership
972
1039
  * Required. The membership relation to create.
1040
+ *
973
1041
  * The `memberType` field must contain a user with the `user.name` and
974
1042
  * `user.type` fields populated. The server will assign a resource name
975
1043
  * and overwrite anything specified.
1044
+ *
976
1045
  * When a Chat app creates a membership relation for a human user, it must use
977
- * the `chat.memberships` scope, set `user.type` to `HUMAN`, and set
978
- * `user.name` with format `users/{user}`, where `{user}` can be the email
979
- * address for the user. For users in the same Workspace organization `{user}`
980
- * can also be the `id` of the
981
- * [person](https://developers.google.com/people/api/rest/v1/people) from the
982
- * People API, or the `id` for the user in the Directory API. For example, if
983
- * the People API Person profile ID for `user@example.com` is `123456789`, you
984
- * can add the user to the space by setting the `membership.member.name` to
985
- * `users/user@example.com` or `users/123456789`. When a Chat app creates a
986
- * membership relation for itself, it must use the `chat.memberships.app`
987
- * scope, set `user.type` to `BOT`, and set `user.name` to `users/app`.
988
- * @param {boolean} request.useAdminAccess
989
- * When `true`, the method runs using the user's Google Workspace
1046
+ * certain authorization scopes and set specific values for certain fields:
1047
+ *
1048
+ * - When [authenticating as a
1049
+ * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user),
1050
+ * the `chat.memberships` authorization scope is required.
1051
+ *
1052
+ * - When [authenticating as an
1053
+ * app](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app),
1054
+ * the `chat.app.memberships` authorization scope is required.
1055
+ * Authenticating as an app is available in [Developer
1056
+ * Preview](https://developers.google.com/workspace/preview).
1057
+ *
1058
+ * - Set `user.type` to `HUMAN`, and set `user.name` with format
1059
+ * `users/{user}`, where `{user}` can be the email address for the user. For
1060
+ * users in the same Workspace organization `{user}` can also be the `id` of
1061
+ * the [person](https://developers.google.com/people/api/rest/v1/people) from
1062
+ * the People API, or the `id` for the user in the Directory API. For example,
1063
+ * if the People API Person profile ID for `user@example.com` is `123456789`,
1064
+ * you can add the user to the space by setting the `membership.member.name`
1065
+ * to `users/user@example.com` or `users/123456789`.
1066
+ *
1067
+ * Inviting users external to the Workspace organization that owns the space
1068
+ * requires [user
1069
+ * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
1070
+ *
1071
+ * When a Chat app creates a membership relation for itself, it must
1072
+ * [authenticate as a
1073
+ * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
1074
+ * and use the `chat.memberships.app` scope, set `user.type` to `BOT`, and set
1075
+ * `user.name` to `users/app`.
1076
+ * @param {boolean} [request.useAdminAccess]
1077
+ * Optional. When `true`, the method runs using the user's Google Workspace
990
1078
  * administrator privileges.
991
1079
  *
992
1080
  * The calling user must be a Google Workspace administrator with the
@@ -1019,8 +1107,18 @@ export declare class ChatServiceClient {
1019
1107
  * Updates a membership. For an example, see [Update a user's membership in
1020
1108
  * a space](https://developers.google.com/workspace/chat/update-members).
1021
1109
  *
1022
- * Requires [user
1023
- * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
1110
+ * Supports the following types of
1111
+ * [authentication](https://developers.google.com/workspace/chat/authenticate-authorize):
1112
+ *
1113
+ * - [App
1114
+ * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
1115
+ * with [administrator approval](https://support.google.com/a?p=chat-app-auth)
1116
+ * in [Developer Preview](https://developers.google.com/workspace/preview)
1117
+ *
1118
+ * - [User
1119
+ * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
1120
+ * You can authenticate and authorize this method with administrator
1121
+ * privileges by setting the `use_admin_access` field in the request.
1024
1122
  *
1025
1123
  * @param {Object} request
1026
1124
  * The request object that will be sent.
@@ -1034,8 +1132,8 @@ export declare class ChatServiceClient {
1034
1132
  * Currently supported field paths:
1035
1133
  *
1036
1134
  * - `role`
1037
- * @param {boolean} request.useAdminAccess
1038
- * When `true`, the method runs using the user's Google Workspace
1135
+ * @param {boolean} [request.useAdminAccess]
1136
+ * Optional. When `true`, the method runs using the user's Google Workspace
1039
1137
  * administrator privileges.
1040
1138
  *
1041
1139
  * The calling user must be a Google Workspace administrator with the
@@ -1065,8 +1163,18 @@ export declare class ChatServiceClient {
1065
1163
  * [Remove a user or a Google Chat app from a
1066
1164
  * space](https://developers.google.com/workspace/chat/delete-members).
1067
1165
  *
1068
- * Requires [user
1069
- * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
1166
+ * Supports the following types of
1167
+ * [authentication](https://developers.google.com/workspace/chat/authenticate-authorize):
1168
+ *
1169
+ * - [App
1170
+ * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
1171
+ * with [administrator approval](https://support.google.com/a?p=chat-app-auth)
1172
+ * in [Developer Preview](https://developers.google.com/workspace/preview)
1173
+ *
1174
+ * - [User
1175
+ * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
1176
+ * You can authenticate and authorize this method with administrator
1177
+ * privileges by setting the `use_admin_access` field in the request.
1070
1178
  *
1071
1179
  * @param {Object} request
1072
1180
  * The request object that will be sent.
@@ -1085,8 +1193,8 @@ export declare class ChatServiceClient {
1085
1193
  * and `spaces/{space}/members/app` format.
1086
1194
  *
1087
1195
  * Format: `spaces/{space}/members/{member}` or `spaces/{space}/members/app`.
1088
- * @param {boolean} request.useAdminAccess
1089
- * When `true`, the method runs using the user's Google Workspace
1196
+ * @param {boolean} [request.useAdminAccess]
1197
+ * Optional. When `true`, the method runs using the user's Google Workspace
1090
1198
  * administrator privileges.
1091
1199
  *
1092
1200
  * The calling user must be a Google Workspace administrator with the
@@ -1114,10 +1222,10 @@ export declare class ChatServiceClient {
1114
1222
  deleteMembership(request: protos.google.chat.v1.IDeleteMembershipRequest, options: CallOptions, callback: Callback<protos.google.chat.v1.IMembership, protos.google.chat.v1.IDeleteMembershipRequest | null | undefined, {} | null | undefined>): void;
1115
1223
  deleteMembership(request: protos.google.chat.v1.IDeleteMembershipRequest, callback: Callback<protos.google.chat.v1.IMembership, protos.google.chat.v1.IDeleteMembershipRequest | null | undefined, {} | null | undefined>): void;
1116
1224
  /**
1117
- * Creates a reaction and adds it to a message. Only unicode emojis are
1118
- * supported. For an example, see
1225
+ * Creates a reaction and adds it to a message. For an example, see
1119
1226
  * [Add a reaction to a
1120
1227
  * message](https://developers.google.com/workspace/chat/create-reactions).
1228
+ *
1121
1229
  * Requires [user
1122
1230
  * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
1123
1231
  *
@@ -1146,10 +1254,10 @@ export declare class ChatServiceClient {
1146
1254
  createReaction(request: protos.google.chat.v1.ICreateReactionRequest, options: CallOptions, callback: Callback<protos.google.chat.v1.IReaction, protos.google.chat.v1.ICreateReactionRequest | null | undefined, {} | null | undefined>): void;
1147
1255
  createReaction(request: protos.google.chat.v1.ICreateReactionRequest, callback: Callback<protos.google.chat.v1.IReaction, protos.google.chat.v1.ICreateReactionRequest | null | undefined, {} | null | undefined>): void;
1148
1256
  /**
1149
- * Deletes a reaction to a message. Only unicode emojis are supported.
1150
- * For an example, see
1257
+ * Deletes a reaction to a message. For an example, see
1151
1258
  * [Delete a
1152
1259
  * reaction](https://developers.google.com/workspace/chat/delete-reactions).
1260
+ *
1153
1261
  * Requires [user
1154
1262
  * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
1155
1263
  *
@@ -1367,6 +1475,7 @@ export declare class ChatServiceClient {
1367
1475
  * For an example, see
1368
1476
  * [List
1369
1477
  * messages](https://developers.google.com/workspace/chat/api/guides/v1/messages/list).
1478
+ *
1370
1479
  * Requires [user
1371
1480
  * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
1372
1481
  *
@@ -1376,9 +1485,9 @@ export declare class ChatServiceClient {
1376
1485
  * Required. The resource name of the space to list messages from.
1377
1486
  *
1378
1487
  * Format: `spaces/{space}`
1379
- * @param {number} request.pageSize
1380
- * The maximum number of messages returned. The service might return fewer
1381
- * messages than this value.
1488
+ * @param {number} [request.pageSize]
1489
+ * Optional. The maximum number of messages returned. The service might return
1490
+ * fewer messages than this value.
1382
1491
  *
1383
1492
  * If unspecified, at most 25 are returned.
1384
1493
  *
@@ -1386,17 +1495,15 @@ export declare class ChatServiceClient {
1386
1495
  * automatically changed to 1000.
1387
1496
  *
1388
1497
  * Negative values return an `INVALID_ARGUMENT` error.
1389
- * @param {string} request.pageToken
1390
- * Optional, if resuming from a previous query.
1391
- *
1392
- * A page token received from a previous list messages call. Provide this
1393
- * parameter to retrieve the subsequent page.
1498
+ * @param {string} [request.pageToken]
1499
+ * Optional. A page token received from a previous list messages call. Provide
1500
+ * this parameter to retrieve the subsequent page.
1394
1501
  *
1395
1502
  * When paginating, all other parameters provided should match the call that
1396
1503
  * provided the page token. Passing different values to the other parameters
1397
1504
  * might lead to unexpected results.
1398
- * @param {string} request.filter
1399
- * A query filter.
1505
+ * @param {string} [request.filter]
1506
+ * Optional. A query filter.
1400
1507
  *
1401
1508
  * You can filter messages by date (`create_time`) and thread (`thread.name`).
1402
1509
  *
@@ -1433,20 +1540,19 @@ export declare class ChatServiceClient {
1433
1540
  *
1434
1541
  * Invalid queries are rejected by the server with an `INVALID_ARGUMENT`
1435
1542
  * error.
1436
- * @param {string} request.orderBy
1437
- * Optional, if resuming from a previous query.
1438
- *
1439
- * How the list of messages is ordered. Specify a value to order by an
1440
- * ordering operation. Valid ordering operation values are as follows:
1543
+ * @param {string} [request.orderBy]
1544
+ * Optional. How the list of messages is ordered. Specify a value to order by
1545
+ * an ordering operation. Valid ordering operation values are as follows:
1441
1546
  *
1442
1547
  * - `ASC` for ascending.
1443
1548
  *
1444
1549
  * - `DESC` for descending.
1445
1550
  *
1446
1551
  * The default ordering is `create_time ASC`.
1447
- * @param {boolean} request.showDeleted
1448
- * Whether to include deleted messages. Deleted messages include deleted time
1449
- * and metadata about their deletion, but message content is unavailable.
1552
+ * @param {boolean} [request.showDeleted]
1553
+ * Optional. Whether to include deleted messages. Deleted messages include
1554
+ * deleted time and metadata about their deletion, but message content is
1555
+ * unavailable.
1450
1556
  * @param {object} [options]
1451
1557
  * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
1452
1558
  * @returns {Promise} - The promise which resolves to an array.
@@ -1474,9 +1580,9 @@ export declare class ChatServiceClient {
1474
1580
  * Required. The resource name of the space to list messages from.
1475
1581
  *
1476
1582
  * Format: `spaces/{space}`
1477
- * @param {number} request.pageSize
1478
- * The maximum number of messages returned. The service might return fewer
1479
- * messages than this value.
1583
+ * @param {number} [request.pageSize]
1584
+ * Optional. The maximum number of messages returned. The service might return
1585
+ * fewer messages than this value.
1480
1586
  *
1481
1587
  * If unspecified, at most 25 are returned.
1482
1588
  *
@@ -1484,17 +1590,15 @@ export declare class ChatServiceClient {
1484
1590
  * automatically changed to 1000.
1485
1591
  *
1486
1592
  * Negative values return an `INVALID_ARGUMENT` error.
1487
- * @param {string} request.pageToken
1488
- * Optional, if resuming from a previous query.
1489
- *
1490
- * A page token received from a previous list messages call. Provide this
1491
- * parameter to retrieve the subsequent page.
1593
+ * @param {string} [request.pageToken]
1594
+ * Optional. A page token received from a previous list messages call. Provide
1595
+ * this parameter to retrieve the subsequent page.
1492
1596
  *
1493
1597
  * When paginating, all other parameters provided should match the call that
1494
1598
  * provided the page token. Passing different values to the other parameters
1495
1599
  * might lead to unexpected results.
1496
- * @param {string} request.filter
1497
- * A query filter.
1600
+ * @param {string} [request.filter]
1601
+ * Optional. A query filter.
1498
1602
  *
1499
1603
  * You can filter messages by date (`create_time`) and thread (`thread.name`).
1500
1604
  *
@@ -1531,20 +1635,19 @@ export declare class ChatServiceClient {
1531
1635
  *
1532
1636
  * Invalid queries are rejected by the server with an `INVALID_ARGUMENT`
1533
1637
  * error.
1534
- * @param {string} request.orderBy
1535
- * Optional, if resuming from a previous query.
1536
- *
1537
- * How the list of messages is ordered. Specify a value to order by an
1538
- * ordering operation. Valid ordering operation values are as follows:
1638
+ * @param {string} [request.orderBy]
1639
+ * Optional. How the list of messages is ordered. Specify a value to order by
1640
+ * an ordering operation. Valid ordering operation values are as follows:
1539
1641
  *
1540
1642
  * - `ASC` for ascending.
1541
1643
  *
1542
1644
  * - `DESC` for descending.
1543
1645
  *
1544
1646
  * The default ordering is `create_time ASC`.
1545
- * @param {boolean} request.showDeleted
1546
- * Whether to include deleted messages. Deleted messages include deleted time
1547
- * and metadata about their deletion, but message content is unavailable.
1647
+ * @param {boolean} [request.showDeleted]
1648
+ * Optional. Whether to include deleted messages. Deleted messages include
1649
+ * deleted time and metadata about their deletion, but message content is
1650
+ * unavailable.
1548
1651
  * @param {object} [options]
1549
1652
  * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
1550
1653
  * @returns {Stream}
@@ -1567,9 +1670,9 @@ export declare class ChatServiceClient {
1567
1670
  * Required. The resource name of the space to list messages from.
1568
1671
  *
1569
1672
  * Format: `spaces/{space}`
1570
- * @param {number} request.pageSize
1571
- * The maximum number of messages returned. The service might return fewer
1572
- * messages than this value.
1673
+ * @param {number} [request.pageSize]
1674
+ * Optional. The maximum number of messages returned. The service might return
1675
+ * fewer messages than this value.
1573
1676
  *
1574
1677
  * If unspecified, at most 25 are returned.
1575
1678
  *
@@ -1577,17 +1680,15 @@ export declare class ChatServiceClient {
1577
1680
  * automatically changed to 1000.
1578
1681
  *
1579
1682
  * Negative values return an `INVALID_ARGUMENT` error.
1580
- * @param {string} request.pageToken
1581
- * Optional, if resuming from a previous query.
1582
- *
1583
- * A page token received from a previous list messages call. Provide this
1584
- * parameter to retrieve the subsequent page.
1683
+ * @param {string} [request.pageToken]
1684
+ * Optional. A page token received from a previous list messages call. Provide
1685
+ * this parameter to retrieve the subsequent page.
1585
1686
  *
1586
1687
  * When paginating, all other parameters provided should match the call that
1587
1688
  * provided the page token. Passing different values to the other parameters
1588
1689
  * might lead to unexpected results.
1589
- * @param {string} request.filter
1590
- * A query filter.
1690
+ * @param {string} [request.filter]
1691
+ * Optional. A query filter.
1591
1692
  *
1592
1693
  * You can filter messages by date (`create_time`) and thread (`thread.name`).
1593
1694
  *
@@ -1624,20 +1725,19 @@ export declare class ChatServiceClient {
1624
1725
  *
1625
1726
  * Invalid queries are rejected by the server with an `INVALID_ARGUMENT`
1626
1727
  * error.
1627
- * @param {string} request.orderBy
1628
- * Optional, if resuming from a previous query.
1629
- *
1630
- * How the list of messages is ordered. Specify a value to order by an
1631
- * ordering operation. Valid ordering operation values are as follows:
1728
+ * @param {string} [request.orderBy]
1729
+ * Optional. How the list of messages is ordered. Specify a value to order by
1730
+ * an ordering operation. Valid ordering operation values are as follows:
1632
1731
  *
1633
1732
  * - `ASC` for ascending.
1634
1733
  *
1635
1734
  * - `DESC` for descending.
1636
1735
  *
1637
1736
  * The default ordering is `create_time ASC`.
1638
- * @param {boolean} request.showDeleted
1639
- * Whether to include deleted messages. Deleted messages include deleted time
1640
- * and metadata about their deletion, but message content is unavailable.
1737
+ * @param {boolean} [request.showDeleted]
1738
+ * Optional. Whether to include deleted messages. Deleted messages include
1739
+ * deleted time and metadata about their deletion, but message content is
1740
+ * unavailable.
1641
1741
  * @param {object} [options]
1642
1742
  * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
1643
1743
  * @returns {Object}
@@ -1664,13 +1764,16 @@ export declare class ChatServiceClient {
1664
1764
  * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
1665
1765
  * lists memberships in spaces that the authenticated user has access to.
1666
1766
  *
1667
- * Requires
1668
- * [authentication](https://developers.google.com/workspace/chat/authenticate-authorize).
1669
- * Supports
1670
- * [app
1767
+ * Supports the following types of
1768
+ * [authentication](https://developers.google.com/workspace/chat/authenticate-authorize):
1769
+ *
1770
+ * - [App
1671
1771
  * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
1672
- * and [user
1673
- * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
1772
+ *
1773
+ * - [User
1774
+ * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
1775
+ * You can authenticate and authorize this method with administrator
1776
+ * privileges by setting the `use_admin_access` field in the request.
1674
1777
  *
1675
1778
  * @param {Object} request
1676
1779
  * The request object that will be sent.
@@ -1751,8 +1854,8 @@ export declare class ChatServiceClient {
1751
1854
  *
1752
1855
  * Currently requires [user
1753
1856
  * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
1754
- * @param {boolean} request.useAdminAccess
1755
- * When `true`, the method runs using the user's Google Workspace
1857
+ * @param {boolean} [request.useAdminAccess]
1858
+ * Optional. When `true`, the method runs using the user's Google Workspace
1756
1859
  * administrator privileges.
1757
1860
  *
1758
1861
  * The calling user must be a Google Workspace administrator with the
@@ -1864,8 +1967,8 @@ export declare class ChatServiceClient {
1864
1967
  *
1865
1968
  * Currently requires [user
1866
1969
  * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
1867
- * @param {boolean} request.useAdminAccess
1868
- * When `true`, the method runs using the user's Google Workspace
1970
+ * @param {boolean} [request.useAdminAccess]
1971
+ * Optional. When `true`, the method runs using the user's Google Workspace
1869
1972
  * administrator privileges.
1870
1973
  *
1871
1974
  * The calling user must be a Google Workspace administrator with the
@@ -1972,8 +2075,8 @@ export declare class ChatServiceClient {
1972
2075
  *
1973
2076
  * Currently requires [user
1974
2077
  * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
1975
- * @param {boolean} request.useAdminAccess
1976
- * When `true`, the method runs using the user's Google Workspace
2078
+ * @param {boolean} [request.useAdminAccess]
2079
+ * Optional. When `true`, the method runs using the user's Google Workspace
1977
2080
  * administrator privileges.
1978
2081
  *
1979
2082
  * The calling user must be a Google Workspace administrator with the
@@ -2004,16 +2107,14 @@ export declare class ChatServiceClient {
2004
2107
  * [List
2005
2108
  * spaces](https://developers.google.com/workspace/chat/list-spaces).
2006
2109
  *
2007
- * Requires
2008
- * [authentication](https://developers.google.com/workspace/chat/authenticate-authorize).
2009
- * Supports
2010
- * [app
2110
+ * Supports the following types of
2111
+ * [authentication](https://developers.google.com/workspace/chat/authenticate-authorize):
2112
+ *
2113
+ * - [App
2011
2114
  * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
2012
- * and [user
2013
- * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
2014
2115
  *
2015
- * Lists spaces visible to the caller or authenticated user. Group chats
2016
- * and DMs aren't listed until the first message is sent.
2116
+ * - [User
2117
+ * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
2017
2118
  *
2018
2119
  * To list all named spaces by Google Workspace organization, use the
2019
2120
  * [`spaces.search()`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/search)
@@ -2185,7 +2286,9 @@ export declare class ChatServiceClient {
2185
2286
  listSpacesAsync(request?: protos.google.chat.v1.IListSpacesRequest, options?: CallOptions): AsyncIterable<protos.google.chat.v1.ISpace>;
2186
2287
  /**
2187
2288
  * Returns a list of spaces in a Google Workspace organization based on an
2188
- * administrator's search. Requires [user
2289
+ * administrator's search.
2290
+ *
2291
+ * Requires [user
2189
2292
  * authentication with administrator
2190
2293
  * privileges](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user#admin-privileges).
2191
2294
  * In the request, set `use_admin_access` to `true`.
@@ -2619,6 +2722,7 @@ export declare class ChatServiceClient {
2619
2722
  * Lists reactions to a message. For an example, see
2620
2723
  * [List reactions for a
2621
2724
  * message](https://developers.google.com/workspace/chat/list-reactions).
2725
+ *
2622
2726
  * Requires [user
2623
2727
  * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
2624
2728
  *
@@ -2885,14 +2989,14 @@ export declare class ChatServiceClient {
2885
2989
  * where the events occurred.
2886
2990
  *
2887
2991
  * Format: `spaces/{space}`.
2888
- * @param {number} request.pageSize
2992
+ * @param {number} [request.pageSize]
2889
2993
  * Optional. The maximum number of space events returned. The service might
2890
2994
  * return fewer than this value.
2891
2995
  *
2892
2996
  * Negative values return an `INVALID_ARGUMENT` error.
2893
- * @param {string} request.pageToken
2894
- * A page token, received from a previous list space events call. Provide this
2895
- * to retrieve the subsequent page.
2997
+ * @param {string} [request.pageToken]
2998
+ * Optional. A page token, received from a previous list space events call.
2999
+ * Provide this to retrieve the subsequent page.
2896
3000
  *
2897
3001
  * When paginating, all other parameters provided to list space events must
2898
3002
  * match the call that provided the page token. Passing different values to
@@ -2979,14 +3083,14 @@ export declare class ChatServiceClient {
2979
3083
  * where the events occurred.
2980
3084
  *
2981
3085
  * Format: `spaces/{space}`.
2982
- * @param {number} request.pageSize
3086
+ * @param {number} [request.pageSize]
2983
3087
  * Optional. The maximum number of space events returned. The service might
2984
3088
  * return fewer than this value.
2985
3089
  *
2986
3090
  * Negative values return an `INVALID_ARGUMENT` error.
2987
- * @param {string} request.pageToken
2988
- * A page token, received from a previous list space events call. Provide this
2989
- * to retrieve the subsequent page.
3091
+ * @param {string} [request.pageToken]
3092
+ * Optional. A page token, received from a previous list space events call.
3093
+ * Provide this to retrieve the subsequent page.
2990
3094
  *
2991
3095
  * When paginating, all other parameters provided to list space events must
2992
3096
  * match the call that provided the page token. Passing different values to
@@ -3068,14 +3172,14 @@ export declare class ChatServiceClient {
3068
3172
  * where the events occurred.
3069
3173
  *
3070
3174
  * Format: `spaces/{space}`.
3071
- * @param {number} request.pageSize
3175
+ * @param {number} [request.pageSize]
3072
3176
  * Optional. The maximum number of space events returned. The service might
3073
3177
  * return fewer than this value.
3074
3178
  *
3075
3179
  * Negative values return an `INVALID_ARGUMENT` error.
3076
- * @param {string} request.pageToken
3077
- * A page token, received from a previous list space events call. Provide this
3078
- * to retrieve the subsequent page.
3180
+ * @param {string} [request.pageToken]
3181
+ * Optional. A page token, received from a previous list space events call.
3182
+ * Provide this to retrieve the subsequent page.
3079
3183
  *
3080
3184
  * When paginating, all other parameters provided to list space events must
3081
3185
  * match the call that provided the page token. Passing different values to