@google-apps/chat 0.23.1 → 0.25.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.
Files changed (33) hide show
  1. package/README.md +3 -3
  2. package/build/protos/google/chat/v1/action_status.proto +1 -1
  3. package/build/protos/google/chat/v1/annotation.proto +1 -1
  4. package/build/protos/google/chat/v1/attachment.proto +1 -1
  5. package/build/protos/google/chat/v1/chat_service.proto +26 -0
  6. package/build/protos/google/chat/v1/contextual_addon.proto +1 -1
  7. package/build/protos/google/chat/v1/deletion_metadata.proto +1 -1
  8. package/build/protos/google/chat/v1/event_payload.proto +1 -1
  9. package/build/protos/google/chat/v1/group.proto +1 -1
  10. package/build/protos/google/chat/v1/history_state.proto +1 -1
  11. package/build/protos/google/chat/v1/matched_url.proto +1 -1
  12. package/build/protos/google/chat/v1/membership.proto +1 -1
  13. package/build/protos/google/chat/v1/message.proto +49 -7
  14. package/build/protos/google/chat/v1/reaction.proto +1 -1
  15. package/build/protos/google/chat/v1/slash_command.proto +1 -1
  16. package/build/protos/google/chat/v1/space.proto +81 -1
  17. package/build/protos/google/chat/v1/space_event.proto +1 -1
  18. package/build/protos/google/chat/v1/space_notification_setting.proto +1 -1
  19. package/build/protos/google/chat/v1/space_read_state.proto +1 -1
  20. package/build/protos/google/chat/v1/space_setup.proto +1 -1
  21. package/build/protos/google/chat/v1/thread_read_state.proto +1 -1
  22. package/build/protos/google/chat/v1/user.proto +1 -1
  23. package/build/protos/google/chat/v1/widgets.proto +1 -1
  24. package/build/protos/protos.d.ts +1004 -21
  25. package/build/protos/protos.js +8162 -2241
  26. package/build/protos/protos.json +311 -24
  27. package/build/src/v1/chat_service_client.d.ts +1103 -898
  28. package/build/src/v1/chat_service_client.js +830 -297
  29. package/build/src/v1/chat_service_client.js.map +1 -1
  30. package/build/src/v1/chat_service_client_config.json +5 -0
  31. package/build/src/v1/gapic_metadata.json +14 -0
  32. package/build/src/v1/index.js.map +1 -1
  33. package/package.json +1 -4
@@ -207,6 +207,10 @@ export declare class ChatServiceClient {
207
207
  *
208
208
  * For details, see [Name a
209
209
  * message](https://developers.google.com/workspace/chat/create-messages#name_a_created_message).
210
+ * @param {google.chat.v1.CreateMessageNotificationOptions} [request.createMessageNotificationOptions]
211
+ * Optional. Controls the notification behavior when the message is posted.
212
+ * To learn more, see [Force notifications or send silent
213
+ * messages](https://developer.google.com/workspace/chat/create-messages#force-notify-silent).
210
214
  * @param {object} [options]
211
215
  * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
212
216
  * @returns {Promise} - The promise which resolves to an array.
@@ -2107,121 +2111,121 @@ export declare class ChatServiceClient {
2107
2111
  moveSectionItem(request: protos.google.chat.v1.IMoveSectionItemRequest, options: CallOptions, callback: Callback<protos.google.chat.v1.IMoveSectionItemResponse, protos.google.chat.v1.IMoveSectionItemRequest | null | undefined, {} | null | undefined>): void;
2108
2112
  moveSectionItem(request: protos.google.chat.v1.IMoveSectionItemRequest, callback: Callback<protos.google.chat.v1.IMoveSectionItemResponse, protos.google.chat.v1.IMoveSectionItemRequest | null | undefined, {} | null | undefined>): void;
2109
2113
  /**
2110
- * Lists messages in a space that the caller is a member of, including
2111
- * messages from blocked members and spaces. System messages, like those
2112
- * announcing new space members, aren't included. If you list messages from a
2113
- * space with no messages, the response is an empty object. When using a
2114
- * REST/HTTP interface, the response contains an empty JSON object, `{}`.
2115
- * For an example, see
2116
- * [List
2117
- * messages](https://developers.google.com/workspace/chat/api/guides/v1/messages/list).
2118
- *
2119
- * Supports the following types of
2120
- * [authentication](https://developers.google.com/workspace/chat/authenticate-authorize):
2121
- *
2122
- * - [App
2123
- * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
2124
- * with [administrator
2125
- * approval](https://support.google.com/a?p=chat-app-auth)
2126
- * with the authorization scope:
2127
- * - `https://www.googleapis.com/auth/chat.app.messages.readonly`. When
2128
- * using this authentication scope, this method only returns public
2129
- * messages in a space. It doesn't include private messages.
2130
- *
2131
- * - [User
2132
- * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
2133
- * with one of the following authorization scopes:
2134
- * - `https://www.googleapis.com/auth/chat.messages.readonly`
2135
- * - `https://www.googleapis.com/auth/chat.messages`
2136
- * - `https://www.googleapis.com/auth/chat.import` (import mode spaces
2137
- * only)
2138
- *
2139
- * @param {Object} request
2140
- * The request object that will be sent.
2141
- * @param {string} request.parent
2142
- * Required. The resource name of the space to list messages from.
2143
- *
2144
- * Format: `spaces/{space}`
2145
- * @param {number} [request.pageSize]
2146
- * Optional. The maximum number of messages returned. The service might return
2147
- * fewer messages than this value.
2148
- *
2149
- * If unspecified, at most 25 are returned.
2150
- *
2151
- * The maximum value is 1000. If you use a value more than 1000, it's
2152
- * automatically changed to 1000.
2153
- *
2154
- * Negative values return an `INVALID_ARGUMENT` error.
2155
- * @param {string} [request.pageToken]
2156
- * Optional. A page token received from a previous list messages call. Provide
2157
- * this parameter to retrieve the subsequent page.
2158
- *
2159
- * When paginating, all other parameters provided should match the call that
2160
- * provided the page token. Passing different values to the other parameters
2161
- * might lead to unexpected results.
2162
- * @param {string} [request.filter]
2163
- * Optional. A query filter.
2164
- *
2165
- * You can filter messages by date (`create_time`) and thread (`thread.name`).
2166
- *
2167
- * To filter messages by the date they were created, specify the `create_time`
2168
- * with a timestamp in [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339)
2169
- * format and double quotation marks. For example,
2170
- * `"2023-04-21T11:30:00-04:00"`. You can use the greater than operator `>` to
2171
- * list messages that were created after a timestamp, or the less than
2172
- * operator `<` to list messages that were created before a timestamp. To
2173
- * filter messages within a time interval, use the `AND` operator between two
2174
- * timestamps.
2175
- *
2176
- * To filter by thread, specify the `thread.name`, formatted as
2177
- * `spaces/{space}/threads/{thread}`. You can only specify one
2178
- * `thread.name` per query.
2179
- *
2180
- * To filter by both thread and date, use the `AND` operator in your query.
2181
- *
2182
- * For example, the following queries are valid:
2183
- *
2184
- * ```
2185
- * create_time > "2012-04-21T11:30:00-04:00"
2186
- *
2187
- * create_time > "2012-04-21T11:30:00-04:00" AND
2188
- * thread.name = spaces/AAAAAAAAAAA/threads/123
2189
- *
2190
- * create_time > "2012-04-21T11:30:00+00:00" AND
2191
- *
2192
- * create_time < "2013-01-01T00:00:00+00:00" AND
2193
- * thread.name = spaces/AAAAAAAAAAA/threads/123
2194
- *
2195
- * thread.name = spaces/AAAAAAAAAAA/threads/123
2196
- * ```
2197
- *
2198
- * Invalid queries are rejected by the server with an `INVALID_ARGUMENT`
2199
- * error.
2200
- * @param {string} [request.orderBy]
2201
- * Optional. How the list of messages is ordered. Specify a value to order by
2202
- * an ordering operation. Valid ordering operation values are as follows:
2203
- *
2204
- * - `ASC` for ascending.
2205
- *
2206
- * - `DESC` for descending.
2207
- *
2208
- * The default ordering is `create_time ASC`.
2209
- * @param {boolean} [request.showDeleted]
2210
- * Optional. Whether to include deleted messages. Deleted messages include
2211
- * deleted time and metadata about their deletion, but message content is
2212
- * unavailable.
2213
- * @param {object} [options]
2214
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
2215
- * @returns {Promise} - The promise which resolves to an array.
2216
- * The first element of the array is Array of {@link protos.google.chat.v1.Message|Message}.
2217
- * The client library will perform auto-pagination by default: it will call the API as many
2218
- * times as needed and will merge results from all the pages into this array.
2219
- * Note that it can affect your quota.
2220
- * We recommend using `listMessagesAsync()`
2221
- * method described below for async iteration which you can stop as needed.
2222
- * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
2223
- * for more details and examples.
2224
- */
2114
+ * Lists messages in a space that the caller is a member of, including
2115
+ * messages from blocked members and spaces. System messages, like those
2116
+ * announcing new space members, aren't included. If you list messages from a
2117
+ * space with no messages, the response is an empty object. When using a
2118
+ * REST/HTTP interface, the response contains an empty JSON object, `{}`.
2119
+ * For an example, see
2120
+ * [List
2121
+ * messages](https://developers.google.com/workspace/chat/api/guides/v1/messages/list).
2122
+ *
2123
+ * Supports the following types of
2124
+ * [authentication](https://developers.google.com/workspace/chat/authenticate-authorize):
2125
+ *
2126
+ * - [App
2127
+ * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
2128
+ * with [administrator
2129
+ * approval](https://support.google.com/a?p=chat-app-auth)
2130
+ * with the authorization scope:
2131
+ * - `https://www.googleapis.com/auth/chat.app.messages.readonly`. When
2132
+ * using this authentication scope, this method only returns public
2133
+ * messages in a space. It doesn't include private messages.
2134
+ *
2135
+ * - [User
2136
+ * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
2137
+ * with one of the following authorization scopes:
2138
+ * - `https://www.googleapis.com/auth/chat.messages.readonly`
2139
+ * - `https://www.googleapis.com/auth/chat.messages`
2140
+ * - `https://www.googleapis.com/auth/chat.import` (import mode spaces
2141
+ * only)
2142
+ *
2143
+ * @param {Object} request
2144
+ * The request object that will be sent.
2145
+ * @param {string} request.parent
2146
+ * Required. The resource name of the space to list messages from.
2147
+ *
2148
+ * Format: `spaces/{space}`
2149
+ * @param {number} [request.pageSize]
2150
+ * Optional. The maximum number of messages returned. The service might return
2151
+ * fewer messages than this value.
2152
+ *
2153
+ * If unspecified, at most 25 are returned.
2154
+ *
2155
+ * The maximum value is 1000. If you use a value more than 1000, it's
2156
+ * automatically changed to 1000.
2157
+ *
2158
+ * Negative values return an `INVALID_ARGUMENT` error.
2159
+ * @param {string} [request.pageToken]
2160
+ * Optional. A page token received from a previous list messages call. Provide
2161
+ * this parameter to retrieve the subsequent page.
2162
+ *
2163
+ * When paginating, all other parameters provided should match the call that
2164
+ * provided the page token. Passing different values to the other parameters
2165
+ * might lead to unexpected results.
2166
+ * @param {string} [request.filter]
2167
+ * Optional. A query filter.
2168
+ *
2169
+ * You can filter messages by date (`create_time`) and thread (`thread.name`).
2170
+ *
2171
+ * To filter messages by the date they were created, specify the `create_time`
2172
+ * with a timestamp in [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339)
2173
+ * format and double quotation marks. For example,
2174
+ * `"2023-04-21T11:30:00-04:00"`. You can use the greater than operator `>` to
2175
+ * list messages that were created after a timestamp, or the less than
2176
+ * operator `<` to list messages that were created before a timestamp. To
2177
+ * filter messages within a time interval, use the `AND` operator between two
2178
+ * timestamps.
2179
+ *
2180
+ * To filter by thread, specify the `thread.name`, formatted as
2181
+ * `spaces/{space}/threads/{thread}`. You can only specify one
2182
+ * `thread.name` per query.
2183
+ *
2184
+ * To filter by both thread and date, use the `AND` operator in your query.
2185
+ *
2186
+ * For example, the following queries are valid:
2187
+ *
2188
+ * ```
2189
+ * create_time > "2012-04-21T11:30:00-04:00"
2190
+ *
2191
+ * create_time > "2012-04-21T11:30:00-04:00" AND
2192
+ * thread.name = spaces/AAAAAAAAAAA/threads/123
2193
+ *
2194
+ * create_time > "2012-04-21T11:30:00+00:00" AND
2195
+ *
2196
+ * create_time < "2013-01-01T00:00:00+00:00" AND
2197
+ * thread.name = spaces/AAAAAAAAAAA/threads/123
2198
+ *
2199
+ * thread.name = spaces/AAAAAAAAAAA/threads/123
2200
+ * ```
2201
+ *
2202
+ * Invalid queries are rejected by the server with an `INVALID_ARGUMENT`
2203
+ * error.
2204
+ * @param {string} [request.orderBy]
2205
+ * Optional. How the list of messages is ordered. Specify a value to order by
2206
+ * an ordering operation. Valid ordering operation values are as follows:
2207
+ *
2208
+ * - `ASC` for ascending.
2209
+ *
2210
+ * - `DESC` for descending.
2211
+ *
2212
+ * The default ordering is `create_time ASC`.
2213
+ * @param {boolean} [request.showDeleted]
2214
+ * Optional. Whether to include deleted messages. Deleted messages include
2215
+ * deleted time and metadata about their deletion, but message content is
2216
+ * unavailable.
2217
+ * @param {object} [options]
2218
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
2219
+ * @returns {Promise} - The promise which resolves to an array.
2220
+ * The first element of the array is Array of {@link protos.google.chat.v1.Message|Message}.
2221
+ * The client library will perform auto-pagination by default: it will call the API as many
2222
+ * times as needed and will merge results from all the pages into this array.
2223
+ * Note that it can affect your quota.
2224
+ * We recommend using `listMessagesAsync()`
2225
+ * method described below for async iteration which you can stop as needed.
2226
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
2227
+ * for more details and examples.
2228
+ */
2225
2229
  listMessages(request?: protos.google.chat.v1.IListMessagesRequest, options?: CallOptions): Promise<[
2226
2230
  protos.google.chat.v1.IMessage[],
2227
2231
  protos.google.chat.v1.IListMessagesRequest | null,
@@ -2409,145 +2413,145 @@ export declare class ChatServiceClient {
2409
2413
  */
2410
2414
  listMessagesAsync(request?: protos.google.chat.v1.IListMessagesRequest, options?: CallOptions): AsyncIterable<protos.google.chat.v1.IMessage>;
2411
2415
  /**
2412
- * Lists memberships in a space. For an example, see [List users and Google
2413
- * Chat apps in a
2414
- * space](https://developers.google.com/workspace/chat/list-members). Listing
2415
- * memberships with [app
2416
- * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
2417
- * lists memberships in spaces that the Chat app has
2418
- * access to, but excludes Chat app memberships,
2419
- * including its own. Listing memberships with
2420
- * [User
2421
- * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
2422
- * lists memberships in spaces that the authenticated user has access to.
2423
- *
2424
- * Supports the following types of
2425
- * [authentication](https://developers.google.com/workspace/chat/authenticate-authorize):
2426
- *
2427
- * - [App
2428
- * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
2429
- * with one of the following authorization scopes:
2430
- * - `https://www.googleapis.com/auth/chat.bot`
2431
- * - `https://www.googleapis.com/auth/chat.app.memberships` (requires
2432
- * [administrator approval](https://support.google.com/a?p=chat-app-auth))
2433
- *
2434
- * - [User
2435
- * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
2436
- * with one of the following authorization scopes:
2437
- * - `https://www.googleapis.com/auth/chat.memberships.readonly`
2438
- * - `https://www.googleapis.com/auth/chat.memberships`
2439
- * - `https://www.googleapis.com/auth/chat.import` (import mode spaces
2440
- * only)
2441
- * - User authentication grants administrator privileges when an
2442
- * administrator account authenticates, `use_admin_access` is `true`, and
2443
- * one of the following authorization scopes is used:
2444
- * - `https://www.googleapis.com/auth/chat.admin.memberships.readonly`
2445
- * - `https://www.googleapis.com/auth/chat.admin.memberships`
2446
- *
2447
- * @param {Object} request
2448
- * The request object that will be sent.
2449
- * @param {string} request.parent
2450
- * Required. The resource name of the space for which to fetch a membership
2451
- * list.
2452
- *
2453
- * Format: spaces/{space}
2454
- * @param {number} [request.pageSize]
2455
- * Optional. The maximum number of memberships to return. The service might
2456
- * return fewer than this value.
2457
- *
2458
- * If unspecified, at most 100 memberships are returned.
2459
- *
2460
- * The maximum value is 1000. If you use a value more than 1000, it's
2461
- * automatically changed to 1000.
2462
- *
2463
- * Negative values return an `INVALID_ARGUMENT` error.
2464
- * @param {string} [request.pageToken]
2465
- * Optional. A page token, received from a previous call to list memberships.
2466
- * Provide this parameter to retrieve the subsequent page.
2467
- *
2468
- * When paginating, all other parameters provided should match the call that
2469
- * provided the page token. Passing different values to the other parameters
2470
- * might lead to unexpected results.
2471
- * @param {string} [request.filter]
2472
- * Optional. A query filter.
2473
- *
2474
- * You can filter memberships by a member's role
2475
- * ([`role`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.members#membershiprole))
2476
- * and type
2477
- * ([`member.type`](https://developers.google.com/workspace/chat/api/reference/rest/v1/User#type)).
2478
- *
2479
- * To filter by role, set `role` to `ROLE_MEMBER` or `ROLE_MANAGER`.
2480
- *
2481
- * To filter by type, set `member.type` to `HUMAN` or `BOT`. You can also
2482
- * filter for `member.type` using the `!=` operator.
2483
- *
2484
- * To filter by both role and type, use the `AND` operator. To filter by
2485
- * either role or type, use the `OR` operator.
2486
- *
2487
- * Either `member.type = "HUMAN"` or `member.type != "BOT"` is required
2488
- * when `use_admin_access` is set to true. Other member type filters will be
2489
- * rejected.
2490
- *
2491
- * For example, the following queries are valid:
2492
- *
2493
- * ```
2494
- * role = "ROLE_MANAGER" OR role = "ROLE_MEMBER"
2495
- * member.type = "HUMAN" AND role = "ROLE_MANAGER"
2496
- *
2497
- * member.type != "BOT"
2498
- * ```
2499
- *
2500
- * The following queries are invalid:
2501
- *
2502
- * ```
2503
- * member.type = "HUMAN" AND member.type = "BOT"
2504
- * role = "ROLE_MANAGER" AND role = "ROLE_MEMBER"
2505
- * ```
2506
- *
2507
- * Invalid queries are rejected by the server with an `INVALID_ARGUMENT`
2508
- * error.
2509
- * @param {boolean} [request.showGroups]
2510
- * Optional. When `true`, also returns memberships associated with a
2511
- * {@link protos.google.chat.v1.Membership.group_member|Google Group}, in
2512
- * addition to other types of memberships. If a
2513
- * {@link protos.google.chat.v1.ListMembershipsRequest.filter|filter} is set,
2514
- * {@link protos.google.chat.v1.Membership.group_member|Google Group}
2515
- * memberships that don't match the filter criteria aren't returned.
2516
- * @param {boolean} [request.showInvited]
2517
- * Optional. When `true`, also returns memberships associated with
2518
- * {@link protos.google.chat.v1.Membership.MembershipState.INVITED|invited} members, in
2519
- * addition to other types of memberships. If a
2520
- * filter is set,
2521
- * {@link protos.google.chat.v1.Membership.MembershipState.INVITED|invited} memberships
2522
- * that don't match the filter criteria aren't returned.
2523
- *
2524
- * Currently requires [user
2525
- * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
2526
- * @param {boolean} [request.useAdminAccess]
2527
- * Optional. When `true`, the method runs using the user's Google Workspace
2528
- * administrator privileges.
2529
- *
2530
- * The calling user must be a Google Workspace administrator with the
2531
- * [manage chat and spaces conversations
2532
- * privilege](https://support.google.com/a/answer/13369245).
2533
- *
2534
- * Requires either the `chat.admin.memberships.readonly` or
2535
- * `chat.admin.memberships` [OAuth 2.0
2536
- * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes).
2537
- *
2538
- * Listing app memberships in a space isn't supported when using admin access.
2539
- * @param {object} [options]
2540
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
2541
- * @returns {Promise} - The promise which resolves to an array.
2542
- * The first element of the array is Array of {@link protos.google.chat.v1.Membership|Membership}.
2543
- * The client library will perform auto-pagination by default: it will call the API as many
2544
- * times as needed and will merge results from all the pages into this array.
2545
- * Note that it can affect your quota.
2546
- * We recommend using `listMembershipsAsync()`
2547
- * method described below for async iteration which you can stop as needed.
2548
- * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
2549
- * for more details and examples.
2550
- */
2416
+ * Lists memberships in a space. For an example, see [List users and Google
2417
+ * Chat apps in a
2418
+ * space](https://developers.google.com/workspace/chat/list-members). Listing
2419
+ * memberships with [app
2420
+ * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
2421
+ * lists memberships in spaces that the Chat app has
2422
+ * access to, but excludes Chat app memberships,
2423
+ * including its own. Listing memberships with
2424
+ * [User
2425
+ * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
2426
+ * lists memberships in spaces that the authenticated user has access to.
2427
+ *
2428
+ * Supports the following types of
2429
+ * [authentication](https://developers.google.com/workspace/chat/authenticate-authorize):
2430
+ *
2431
+ * - [App
2432
+ * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
2433
+ * with one of the following authorization scopes:
2434
+ * - `https://www.googleapis.com/auth/chat.bot`
2435
+ * - `https://www.googleapis.com/auth/chat.app.memberships` (requires
2436
+ * [administrator approval](https://support.google.com/a?p=chat-app-auth))
2437
+ *
2438
+ * - [User
2439
+ * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
2440
+ * with one of the following authorization scopes:
2441
+ * - `https://www.googleapis.com/auth/chat.memberships.readonly`
2442
+ * - `https://www.googleapis.com/auth/chat.memberships`
2443
+ * - `https://www.googleapis.com/auth/chat.import` (import mode spaces
2444
+ * only)
2445
+ * - User authentication grants administrator privileges when an
2446
+ * administrator account authenticates, `use_admin_access` is `true`, and
2447
+ * one of the following authorization scopes is used:
2448
+ * - `https://www.googleapis.com/auth/chat.admin.memberships.readonly`
2449
+ * - `https://www.googleapis.com/auth/chat.admin.memberships`
2450
+ *
2451
+ * @param {Object} request
2452
+ * The request object that will be sent.
2453
+ * @param {string} request.parent
2454
+ * Required. The resource name of the space for which to fetch a membership
2455
+ * list.
2456
+ *
2457
+ * Format: spaces/{space}
2458
+ * @param {number} [request.pageSize]
2459
+ * Optional. The maximum number of memberships to return. The service might
2460
+ * return fewer than this value.
2461
+ *
2462
+ * If unspecified, at most 100 memberships are returned.
2463
+ *
2464
+ * The maximum value is 1000. If you use a value more than 1000, it's
2465
+ * automatically changed to 1000.
2466
+ *
2467
+ * Negative values return an `INVALID_ARGUMENT` error.
2468
+ * @param {string} [request.pageToken]
2469
+ * Optional. A page token, received from a previous call to list memberships.
2470
+ * Provide this parameter to retrieve the subsequent page.
2471
+ *
2472
+ * When paginating, all other parameters provided should match the call that
2473
+ * provided the page token. Passing different values to the other parameters
2474
+ * might lead to unexpected results.
2475
+ * @param {string} [request.filter]
2476
+ * Optional. A query filter.
2477
+ *
2478
+ * You can filter memberships by a member's role
2479
+ * ([`role`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.members#membershiprole))
2480
+ * and type
2481
+ * ([`member.type`](https://developers.google.com/workspace/chat/api/reference/rest/v1/User#type)).
2482
+ *
2483
+ * To filter by role, set `role` to `ROLE_MEMBER` or `ROLE_MANAGER`.
2484
+ *
2485
+ * To filter by type, set `member.type` to `HUMAN` or `BOT`. You can also
2486
+ * filter for `member.type` using the `!=` operator.
2487
+ *
2488
+ * To filter by both role and type, use the `AND` operator. To filter by
2489
+ * either role or type, use the `OR` operator.
2490
+ *
2491
+ * Either `member.type = "HUMAN"` or `member.type != "BOT"` is required
2492
+ * when `use_admin_access` is set to true. Other member type filters will be
2493
+ * rejected.
2494
+ *
2495
+ * For example, the following queries are valid:
2496
+ *
2497
+ * ```
2498
+ * role = "ROLE_MANAGER" OR role = "ROLE_MEMBER"
2499
+ * member.type = "HUMAN" AND role = "ROLE_MANAGER"
2500
+ *
2501
+ * member.type != "BOT"
2502
+ * ```
2503
+ *
2504
+ * The following queries are invalid:
2505
+ *
2506
+ * ```
2507
+ * member.type = "HUMAN" AND member.type = "BOT"
2508
+ * role = "ROLE_MANAGER" AND role = "ROLE_MEMBER"
2509
+ * ```
2510
+ *
2511
+ * Invalid queries are rejected by the server with an `INVALID_ARGUMENT`
2512
+ * error.
2513
+ * @param {boolean} [request.showGroups]
2514
+ * Optional. When `true`, also returns memberships associated with a
2515
+ * {@link protos.google.chat.v1.Membership.group_member|Google Group}, in
2516
+ * addition to other types of memberships. If a
2517
+ * {@link protos.google.chat.v1.ListMembershipsRequest.filter|filter} is set,
2518
+ * {@link protos.google.chat.v1.Membership.group_member|Google Group}
2519
+ * memberships that don't match the filter criteria aren't returned.
2520
+ * @param {boolean} [request.showInvited]
2521
+ * Optional. When `true`, also returns memberships associated with
2522
+ * {@link protos.google.chat.v1.Membership.MembershipState.INVITED|invited} members, in
2523
+ * addition to other types of memberships. If a
2524
+ * filter is set,
2525
+ * {@link protos.google.chat.v1.Membership.MembershipState.INVITED|invited} memberships
2526
+ * that don't match the filter criteria aren't returned.
2527
+ *
2528
+ * Currently requires [user
2529
+ * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
2530
+ * @param {boolean} [request.useAdminAccess]
2531
+ * Optional. When `true`, the method runs using the user's Google Workspace
2532
+ * administrator privileges.
2533
+ *
2534
+ * The calling user must be a Google Workspace administrator with the
2535
+ * [manage chat and spaces conversations
2536
+ * privilege](https://support.google.com/a/answer/13369245).
2537
+ *
2538
+ * Requires either the `chat.admin.memberships.readonly` or
2539
+ * `chat.admin.memberships` [OAuth 2.0
2540
+ * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes).
2541
+ *
2542
+ * Listing app memberships in a space isn't supported when using admin access.
2543
+ * @param {object} [options]
2544
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
2545
+ * @returns {Promise} - The promise which resolves to an array.
2546
+ * The first element of the array is Array of {@link protos.google.chat.v1.Membership|Membership}.
2547
+ * The client library will perform auto-pagination by default: it will call the API as many
2548
+ * times as needed and will merge results from all the pages into this array.
2549
+ * Note that it can affect your quota.
2550
+ * We recommend using `listMembershipsAsync()`
2551
+ * method described below for async iteration which you can stop as needed.
2552
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
2553
+ * for more details and examples.
2554
+ */
2551
2555
  listMemberships(request?: protos.google.chat.v1.IListMembershipsRequest, options?: CallOptions): Promise<[
2552
2556
  protos.google.chat.v1.IMembership[],
2553
2557
  protos.google.chat.v1.IListMembershipsRequest | null,
@@ -2771,88 +2775,29 @@ export declare class ChatServiceClient {
2771
2775
  */
2772
2776
  listMembershipsAsync(request?: protos.google.chat.v1.IListMembershipsRequest, options?: CallOptions): AsyncIterable<protos.google.chat.v1.IMembership>;
2773
2777
  /**
2774
- * Lists spaces the caller is a member of. Group chats and DMs aren't listed
2775
- * until the first message is sent. For an example, see
2776
- * [List
2777
- * spaces](https://developers.google.com/workspace/chat/list-spaces).
2778
- *
2779
- * Supports the following types of
2780
- * [authentication](https://developers.google.com/workspace/chat/authenticate-authorize):
2781
- *
2782
- * - [App
2783
- * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
2784
- * with the authorization scope:
2785
- * - `https://www.googleapis.com/auth/chat.bot`
2786
- *
2787
- * - [User
2788
- * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
2789
- * with one of the following authorization scopes:
2790
- * - `https://www.googleapis.com/auth/chat.spaces.readonly`
2791
- * - `https://www.googleapis.com/auth/chat.spaces`
2792
- *
2793
- * To list all named spaces by Google Workspace organization, use the
2794
- * [`spaces.search()`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/search)
2795
- * method using Workspace administrator privileges instead.
2796
- *
2797
- * @param {Object} request
2798
- * The request object that will be sent.
2799
- * @param {number} [request.pageSize]
2800
- * Optional. The maximum number of spaces to return. The service might return
2801
- * fewer than this value.
2802
- *
2803
- * If unspecified, at most 100 spaces are returned.
2804
- *
2805
- * The maximum value is 1000. If you use a value more than 1000, it's
2806
- * automatically changed to 1000.
2807
- *
2808
- * Negative values return an `INVALID_ARGUMENT` error.
2809
- * @param {string} [request.pageToken]
2810
- * Optional. A page token, received from a previous list spaces call.
2811
- * Provide this parameter to retrieve the subsequent page.
2812
- *
2813
- * When paginating, the filter value should match the call that provided the
2814
- * page token. Passing a different value may lead to unexpected results.
2815
- * @param {string} [request.filter]
2816
- * Optional. A query filter.
2817
- *
2818
- * You can filter spaces by the space type
2819
- * ([`space_type`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#spacetype)).
2820
- *
2821
- * To filter by space type, you must specify valid enum value, such as
2822
- * `SPACE` or `GROUP_CHAT` (the `space_type` can't be
2823
- * `SPACE_TYPE_UNSPECIFIED`). To query for multiple space types, use the `OR`
2824
- * operator.
2825
- *
2826
- * For example, the following queries are valid:
2827
- *
2828
- * ```
2829
- * space_type = "SPACE"
2830
- * spaceType = "GROUP_CHAT" OR spaceType = "DIRECT_MESSAGE"
2831
- * ```
2832
- *
2833
- * Invalid queries are rejected by the server with an `INVALID_ARGUMENT`
2834
- * error.
2835
- * @param {object} [options]
2836
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
2837
- * @returns {Promise} - The promise which resolves to an array.
2838
- * The first element of the array is Array of {@link protos.google.chat.v1.Space|Space}.
2839
- * The client library will perform auto-pagination by default: it will call the API as many
2840
- * times as needed and will merge results from all the pages into this array.
2841
- * Note that it can affect your quota.
2842
- * We recommend using `listSpacesAsync()`
2843
- * method described below for async iteration which you can stop as needed.
2844
- * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
2845
- * for more details and examples.
2846
- */
2847
- listSpaces(request?: protos.google.chat.v1.IListSpacesRequest, options?: CallOptions): Promise<[
2848
- protos.google.chat.v1.ISpace[],
2849
- protos.google.chat.v1.IListSpacesRequest | null,
2850
- protos.google.chat.v1.IListSpacesResponse
2851
- ]>;
2852
- listSpaces(request: protos.google.chat.v1.IListSpacesRequest, options: CallOptions, callback: PaginationCallback<protos.google.chat.v1.IListSpacesRequest, protos.google.chat.v1.IListSpacesResponse | null | undefined, protos.google.chat.v1.ISpace>): void;
2853
- listSpaces(request: protos.google.chat.v1.IListSpacesRequest, callback: PaginationCallback<protos.google.chat.v1.IListSpacesRequest, protos.google.chat.v1.IListSpacesResponse | null | undefined, protos.google.chat.v1.ISpace>): void;
2854
- /**
2855
- * Equivalent to `listSpaces`, but returns a NodeJS Stream object.
2778
+ * Lists spaces the caller is a member of. Group chats and DMs aren't listed
2779
+ * until the first message is sent. For an example, see
2780
+ * [List
2781
+ * spaces](https://developers.google.com/workspace/chat/list-spaces).
2782
+ *
2783
+ * Supports the following types of
2784
+ * [authentication](https://developers.google.com/workspace/chat/authenticate-authorize):
2785
+ *
2786
+ * - [App
2787
+ * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
2788
+ * with the authorization scope:
2789
+ * - `https://www.googleapis.com/auth/chat.bot`
2790
+ *
2791
+ * - [User
2792
+ * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
2793
+ * with one of the following authorization scopes:
2794
+ * - `https://www.googleapis.com/auth/chat.spaces.readonly`
2795
+ * - `https://www.googleapis.com/auth/chat.spaces`
2796
+ *
2797
+ * To list all named spaces by Google Workspace organization, use the
2798
+ * [`spaces.search()`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/search)
2799
+ * method using Workspace administrator privileges instead.
2800
+ *
2856
2801
  * @param {Object} request
2857
2802
  * The request object that will be sent.
2858
2803
  * @param {number} [request.pageSize]
@@ -2893,8 +2838,67 @@ export declare class ChatServiceClient {
2893
2838
  * error.
2894
2839
  * @param {object} [options]
2895
2840
  * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
2896
- * @returns {Stream}
2897
- * An object stream which emits an object representing {@link protos.google.chat.v1.Space|Space} on 'data' event.
2841
+ * @returns {Promise} - The promise which resolves to an array.
2842
+ * The first element of the array is Array of {@link protos.google.chat.v1.Space|Space}.
2843
+ * The client library will perform auto-pagination by default: it will call the API as many
2844
+ * times as needed and will merge results from all the pages into this array.
2845
+ * Note that it can affect your quota.
2846
+ * We recommend using `listSpacesAsync()`
2847
+ * method described below for async iteration which you can stop as needed.
2848
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
2849
+ * for more details and examples.
2850
+ */
2851
+ listSpaces(request?: protos.google.chat.v1.IListSpacesRequest, options?: CallOptions): Promise<[
2852
+ protos.google.chat.v1.ISpace[],
2853
+ protos.google.chat.v1.IListSpacesRequest | null,
2854
+ protos.google.chat.v1.IListSpacesResponse
2855
+ ]>;
2856
+ listSpaces(request: protos.google.chat.v1.IListSpacesRequest, options: CallOptions, callback: PaginationCallback<protos.google.chat.v1.IListSpacesRequest, protos.google.chat.v1.IListSpacesResponse | null | undefined, protos.google.chat.v1.ISpace>): void;
2857
+ listSpaces(request: protos.google.chat.v1.IListSpacesRequest, callback: PaginationCallback<protos.google.chat.v1.IListSpacesRequest, protos.google.chat.v1.IListSpacesResponse | null | undefined, protos.google.chat.v1.ISpace>): void;
2858
+ /**
2859
+ * Equivalent to `listSpaces`, but returns a NodeJS Stream object.
2860
+ * @param {Object} request
2861
+ * The request object that will be sent.
2862
+ * @param {number} [request.pageSize]
2863
+ * Optional. The maximum number of spaces to return. The service might return
2864
+ * fewer than this value.
2865
+ *
2866
+ * If unspecified, at most 100 spaces are returned.
2867
+ *
2868
+ * The maximum value is 1000. If you use a value more than 1000, it's
2869
+ * automatically changed to 1000.
2870
+ *
2871
+ * Negative values return an `INVALID_ARGUMENT` error.
2872
+ * @param {string} [request.pageToken]
2873
+ * Optional. A page token, received from a previous list spaces call.
2874
+ * Provide this parameter to retrieve the subsequent page.
2875
+ *
2876
+ * When paginating, the filter value should match the call that provided the
2877
+ * page token. Passing a different value may lead to unexpected results.
2878
+ * @param {string} [request.filter]
2879
+ * Optional. A query filter.
2880
+ *
2881
+ * You can filter spaces by the space type
2882
+ * ([`space_type`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#spacetype)).
2883
+ *
2884
+ * To filter by space type, you must specify valid enum value, such as
2885
+ * `SPACE` or `GROUP_CHAT` (the `space_type` can't be
2886
+ * `SPACE_TYPE_UNSPECIFIED`). To query for multiple space types, use the `OR`
2887
+ * operator.
2888
+ *
2889
+ * For example, the following queries are valid:
2890
+ *
2891
+ * ```
2892
+ * space_type = "SPACE"
2893
+ * spaceType = "GROUP_CHAT" OR spaceType = "DIRECT_MESSAGE"
2894
+ * ```
2895
+ *
2896
+ * Invalid queries are rejected by the server with an `INVALID_ARGUMENT`
2897
+ * error.
2898
+ * @param {object} [options]
2899
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
2900
+ * @returns {Stream}
2901
+ * An object stream which emits an object representing {@link protos.google.chat.v1.Space|Space} on 'data' event.
2898
2902
  * The client library will perform auto-pagination by default: it will call the API as many
2899
2903
  * times as needed. Note that it can affect your quota.
2900
2904
  * We recommend using `listSpacesAsync()`
@@ -2959,157 +2963,157 @@ export declare class ChatServiceClient {
2959
2963
  */
2960
2964
  listSpacesAsync(request?: protos.google.chat.v1.IListSpacesRequest, options?: CallOptions): AsyncIterable<protos.google.chat.v1.ISpace>;
2961
2965
  /**
2962
- * Returns a list of spaces in a Google Workspace organization based on an
2963
- * administrator's search. In the request, set `use_admin_access` to `true`.
2964
- * For an example, see [Search for and manage
2965
- * spaces](https://developers.google.com/workspace/chat/search-manage-admin).
2966
- *
2967
- * Requires [user
2968
- * authentication with administrator
2969
- * privileges](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user#admin-privileges)
2970
- * and one of the following [authorization
2971
- * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
2972
- *
2973
- * - `https://www.googleapis.com/auth/chat.admin.spaces.readonly`
2974
- * - `https://www.googleapis.com/auth/chat.admin.spaces`
2975
- *
2976
- * @param {Object} request
2977
- * The request object that will be sent.
2978
- * @param {boolean} request.useAdminAccess
2979
- * When `true`, the method runs using the user's Google Workspace
2980
- * administrator privileges.
2981
- *
2982
- * The calling user must be a Google Workspace administrator with the
2983
- * [manage chat and spaces conversations
2984
- * privilege](https://support.google.com/a/answer/13369245).
2985
- *
2986
- * Requires either the `chat.admin.spaces.readonly` or `chat.admin.spaces`
2987
- * [OAuth 2.0
2988
- * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes).
2989
- *
2990
- * This method currently only supports admin access, thus only `true` is
2991
- * accepted for this field.
2992
- * @param {number} request.pageSize
2993
- * The maximum number of spaces to return. The service may return fewer than
2994
- * this value.
2995
- *
2996
- * If unspecified, at most 100 spaces are returned.
2997
- *
2998
- * The maximum value is 1000. If you use a value more than 1000, it's
2999
- * automatically changed to 1000.
3000
- * @param {string} request.pageToken
3001
- * A token, received from the previous search spaces call. Provide this
3002
- * parameter to retrieve the subsequent page.
3003
- *
3004
- * When paginating, all other parameters provided should match the call that
3005
- * provided the page token. Passing different values to the other parameters
3006
- * might lead to unexpected results.
3007
- * @param {string} request.query
3008
- * Required. A search query.
3009
- *
3010
- * You can search by using the following parameters:
3011
- *
3012
- * - `create_time`
3013
- * - `customer`
3014
- * - `display_name`
3015
- * - `external_user_allowed`
3016
- * - `last_active_time`
3017
- * - `space_history_state`
3018
- * - `space_type`
3019
- *
3020
- * `create_time` and `last_active_time` accept a timestamp in
3021
- * [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339) format and the supported
3022
- * comparison operators are: `=`, `<`, `>`, `<=`, `>=`.
3023
- *
3024
- * `customer` is required and is used to indicate which customer
3025
- * to fetch spaces from. `customers/my_customer` is the only supported value.
3026
- *
3027
- * `display_name` only accepts the `HAS` (`:`) operator. The text to
3028
- * match is first tokenized into tokens and each token is prefix-matched
3029
- * case-insensitively and independently as a substring anywhere in the space's
3030
- * `display_name`. For example, `Fun Eve` matches `Fun event` or `The
3031
- * evening was fun`, but not `notFun event` or `even`.
3032
- *
3033
- * `external_user_allowed` accepts either `true` or `false`.
3034
- *
3035
- * `space_history_state` only accepts values from the [`historyState`]
3036
- * (https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.HistoryState)
3037
- * field of a `space` resource.
3038
- *
3039
- * `space_type` is required and the only valid value is `SPACE`.
3040
- *
3041
- * Across different fields, only `AND` operators are supported. A valid
3042
- * example is `space_type = "SPACE" AND display_name:"Hello"` and an invalid
3043
- * example is `space_type = "SPACE" OR display_name:"Hello"`.
3044
- *
3045
- * Among the same field,
3046
- * `space_type` doesn't support `AND` or `OR` operators.
3047
- * `display_name`, 'space_history_state', and 'external_user_allowed' only
3048
- * support `OR` operators.
3049
- * `last_active_time` and `create_time` support both `AND` and `OR` operators.
3050
- * `AND` can only be used to represent an interval, such as `last_active_time
3051
- * < "2022-01-01T00:00:00+00:00" AND last_active_time >
3052
- * "2023-01-01T00:00:00+00:00"`.
3053
- *
3054
- * The following example queries are valid:
3055
- *
3056
- * ```
3057
- * customer = "customers/my_customer" AND space_type = "SPACE"
3058
- *
3059
- * customer = "customers/my_customer" AND space_type = "SPACE" AND
3060
- * display_name:"Hello World"
3061
- *
3062
- * customer = "customers/my_customer" AND space_type = "SPACE" AND
3063
- * (last_active_time < "2020-01-01T00:00:00+00:00" OR last_active_time >
3064
- * "2022-01-01T00:00:00+00:00")
3065
- *
3066
- * customer = "customers/my_customer" AND space_type = "SPACE" AND
3067
- * (display_name:"Hello World" OR display_name:"Fun event") AND
3068
- * (last_active_time > "2020-01-01T00:00:00+00:00" AND last_active_time <
3069
- * "2022-01-01T00:00:00+00:00")
3070
- *
3071
- * customer = "customers/my_customer" AND space_type = "SPACE" AND
3072
- * (create_time > "2019-01-01T00:00:00+00:00" AND create_time <
3073
- * "2020-01-01T00:00:00+00:00") AND (external_user_allowed = "true") AND
3074
- * (space_history_state = "HISTORY_ON" OR space_history_state = "HISTORY_OFF")
3075
- * ```
3076
- * @param {string} [request.orderBy]
3077
- * Optional. How the list of spaces is ordered.
3078
- *
3079
- * Supported attributes to order by are:
3080
- *
3081
- * - `membership_count.joined_direct_human_user_count` — Denotes the count of
3082
- * human users that have directly joined a space.
3083
- * - `last_active_time` — Denotes the time when last eligible item is added to
3084
- * any topic of this space.
3085
- * - `create_time` — Denotes the time of the space creation.
3086
- *
3087
- * Valid ordering operation values are:
3088
- *
3089
- * - `ASC` for ascending. Default value.
3090
- *
3091
- * - `DESC` for descending.
3092
- *
3093
- * The supported syntax are:
3094
- *
3095
- * - `membership_count.joined_direct_human_user_count DESC`
3096
- * - `membership_count.joined_direct_human_user_count ASC`
3097
- * - `last_active_time DESC`
3098
- * - `last_active_time ASC`
3099
- * - `create_time DESC`
3100
- * - `create_time ASC`
3101
- * @param {object} [options]
3102
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
3103
- * @returns {Promise} - The promise which resolves to an array.
3104
- * The first element of the array is Array of {@link protos.google.chat.v1.Space|Space}.
3105
- * The client library will perform auto-pagination by default: it will call the API as many
3106
- * times as needed and will merge results from all the pages into this array.
3107
- * Note that it can affect your quota.
3108
- * We recommend using `searchSpacesAsync()`
3109
- * method described below for async iteration which you can stop as needed.
3110
- * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
3111
- * for more details and examples.
3112
- */
2966
+ * Returns a list of spaces in a Google Workspace organization based on an
2967
+ * administrator's search. In the request, set `use_admin_access` to `true`.
2968
+ * For an example, see [Search for and manage
2969
+ * spaces](https://developers.google.com/workspace/chat/search-manage-admin).
2970
+ *
2971
+ * Requires [user
2972
+ * authentication with administrator
2973
+ * privileges](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user#admin-privileges)
2974
+ * and one of the following [authorization
2975
+ * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
2976
+ *
2977
+ * - `https://www.googleapis.com/auth/chat.admin.spaces.readonly`
2978
+ * - `https://www.googleapis.com/auth/chat.admin.spaces`
2979
+ *
2980
+ * @param {Object} request
2981
+ * The request object that will be sent.
2982
+ * @param {boolean} request.useAdminAccess
2983
+ * When `true`, the method runs using the user's Google Workspace
2984
+ * administrator privileges.
2985
+ *
2986
+ * The calling user must be a Google Workspace administrator with the
2987
+ * [manage chat and spaces conversations
2988
+ * privilege](https://support.google.com/a/answer/13369245).
2989
+ *
2990
+ * Requires either the `chat.admin.spaces.readonly` or `chat.admin.spaces`
2991
+ * [OAuth 2.0
2992
+ * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes).
2993
+ *
2994
+ * This method currently only supports admin access, thus only `true` is
2995
+ * accepted for this field.
2996
+ * @param {number} request.pageSize
2997
+ * The maximum number of spaces to return. The service may return fewer than
2998
+ * this value.
2999
+ *
3000
+ * If unspecified, at most 100 spaces are returned.
3001
+ *
3002
+ * The maximum value is 1000. If you use a value more than 1000, it's
3003
+ * automatically changed to 1000.
3004
+ * @param {string} request.pageToken
3005
+ * A token, received from the previous search spaces call. Provide this
3006
+ * parameter to retrieve the subsequent page.
3007
+ *
3008
+ * When paginating, all other parameters provided should match the call that
3009
+ * provided the page token. Passing different values to the other parameters
3010
+ * might lead to unexpected results.
3011
+ * @param {string} request.query
3012
+ * Required. A search query.
3013
+ *
3014
+ * You can search by using the following parameters:
3015
+ *
3016
+ * - `create_time`
3017
+ * - `customer`
3018
+ * - `display_name`
3019
+ * - `external_user_allowed`
3020
+ * - `last_active_time`
3021
+ * - `space_history_state`
3022
+ * - `space_type`
3023
+ *
3024
+ * `create_time` and `last_active_time` accept a timestamp in
3025
+ * [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339) format and the supported
3026
+ * comparison operators are: `=`, `<`, `>`, `<=`, `>=`.
3027
+ *
3028
+ * `customer` is required and is used to indicate which customer
3029
+ * to fetch spaces from. `customers/my_customer` is the only supported value.
3030
+ *
3031
+ * `display_name` only accepts the `HAS` (`:`) operator. The text to
3032
+ * match is first tokenized into tokens and each token is prefix-matched
3033
+ * case-insensitively and independently as a substring anywhere in the space's
3034
+ * `display_name`. For example, `Fun Eve` matches `Fun event` or `The
3035
+ * evening was fun`, but not `notFun event` or `even`.
3036
+ *
3037
+ * `external_user_allowed` accepts either `true` or `false`.
3038
+ *
3039
+ * `space_history_state` only accepts values from the [`historyState`]
3040
+ * (https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.HistoryState)
3041
+ * field of a `space` resource.
3042
+ *
3043
+ * `space_type` is required and the only valid value is `SPACE`.
3044
+ *
3045
+ * Across different fields, only `AND` operators are supported. A valid
3046
+ * example is `space_type = "SPACE" AND display_name:"Hello"` and an invalid
3047
+ * example is `space_type = "SPACE" OR display_name:"Hello"`.
3048
+ *
3049
+ * Among the same field,
3050
+ * `space_type` doesn't support `AND` or `OR` operators.
3051
+ * `display_name`, 'space_history_state', and 'external_user_allowed' only
3052
+ * support `OR` operators.
3053
+ * `last_active_time` and `create_time` support both `AND` and `OR` operators.
3054
+ * `AND` can only be used to represent an interval, such as `last_active_time
3055
+ * < "2022-01-01T00:00:00+00:00" AND last_active_time >
3056
+ * "2023-01-01T00:00:00+00:00"`.
3057
+ *
3058
+ * The following example queries are valid:
3059
+ *
3060
+ * ```
3061
+ * customer = "customers/my_customer" AND space_type = "SPACE"
3062
+ *
3063
+ * customer = "customers/my_customer" AND space_type = "SPACE" AND
3064
+ * display_name:"Hello World"
3065
+ *
3066
+ * customer = "customers/my_customer" AND space_type = "SPACE" AND
3067
+ * (last_active_time < "2020-01-01T00:00:00+00:00" OR last_active_time >
3068
+ * "2022-01-01T00:00:00+00:00")
3069
+ *
3070
+ * customer = "customers/my_customer" AND space_type = "SPACE" AND
3071
+ * (display_name:"Hello World" OR display_name:"Fun event") AND
3072
+ * (last_active_time > "2020-01-01T00:00:00+00:00" AND last_active_time <
3073
+ * "2022-01-01T00:00:00+00:00")
3074
+ *
3075
+ * customer = "customers/my_customer" AND space_type = "SPACE" AND
3076
+ * (create_time > "2019-01-01T00:00:00+00:00" AND create_time <
3077
+ * "2020-01-01T00:00:00+00:00") AND (external_user_allowed = "true") AND
3078
+ * (space_history_state = "HISTORY_ON" OR space_history_state = "HISTORY_OFF")
3079
+ * ```
3080
+ * @param {string} [request.orderBy]
3081
+ * Optional. How the list of spaces is ordered.
3082
+ *
3083
+ * Supported attributes to order by are:
3084
+ *
3085
+ * - `membership_count.joined_direct_human_user_count` — Denotes the count of
3086
+ * human users that have directly joined a space.
3087
+ * - `last_active_time` — Denotes the time when last eligible item is added to
3088
+ * any topic of this space.
3089
+ * - `create_time` — Denotes the time of the space creation.
3090
+ *
3091
+ * Valid ordering operation values are:
3092
+ *
3093
+ * - `ASC` for ascending. Default value.
3094
+ *
3095
+ * - `DESC` for descending.
3096
+ *
3097
+ * The supported syntax are:
3098
+ *
3099
+ * - `membership_count.joined_direct_human_user_count DESC`
3100
+ * - `membership_count.joined_direct_human_user_count ASC`
3101
+ * - `last_active_time DESC`
3102
+ * - `last_active_time ASC`
3103
+ * - `create_time DESC`
3104
+ * - `create_time ASC`
3105
+ * @param {object} [options]
3106
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
3107
+ * @returns {Promise} - The promise which resolves to an array.
3108
+ * The first element of the array is Array of {@link protos.google.chat.v1.Space|Space}.
3109
+ * The client library will perform auto-pagination by default: it will call the API as many
3110
+ * times as needed and will merge results from all the pages into this array.
3111
+ * Note that it can affect your quota.
3112
+ * We recommend using `searchSpacesAsync()`
3113
+ * method described below for async iteration which you can stop as needed.
3114
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
3115
+ * for more details and examples.
3116
+ */
3113
3117
  searchSpaces(request?: protos.google.chat.v1.ISearchSpacesRequest, options?: CallOptions): Promise<[
3114
3118
  protos.google.chat.v1.ISpace[],
3115
3119
  protos.google.chat.v1.ISearchSpacesRequest | null,
@@ -3399,94 +3403,295 @@ export declare class ChatServiceClient {
3399
3403
  */
3400
3404
  searchSpacesAsync(request?: protos.google.chat.v1.ISearchSpacesRequest, options?: CallOptions): AsyncIterable<protos.google.chat.v1.ISpace>;
3401
3405
  /**
3402
- * Lists reactions to a message. For an example, see
3403
- * [List reactions for a
3404
- * message](https://developers.google.com/workspace/chat/list-reactions).
3405
- *
3406
- * Requires [user
3407
- * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
3408
- * with one of the following [authorization
3409
- * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
3410
- *
3411
- * - `https://www.googleapis.com/auth/chat.messages.reactions.readonly`
3412
- * - `https://www.googleapis.com/auth/chat.messages.reactions`
3413
- * - `https://www.googleapis.com/auth/chat.messages.readonly`
3414
- * - `https://www.googleapis.com/auth/chat.messages`
3415
- *
3416
- * @param {Object} request
3417
- * The request object that will be sent.
3418
- * @param {string} request.parent
3419
- * Required. The message users reacted to.
3420
- *
3421
- * Format: `spaces/{space}/messages/{message}`
3422
- * @param {number} [request.pageSize]
3423
- * Optional. The maximum number of reactions returned. The service can return
3424
- * fewer reactions than this value. If unspecified, the default value is 25.
3425
- * The maximum value is 200; values above 200 are changed to 200.
3426
- * @param {string} [request.pageToken]
3427
- * Optional. (If resuming from a previous query.)
3428
- *
3429
- * A page token received from a previous list reactions call. Provide this
3430
- * to retrieve the subsequent page.
3431
- *
3432
- * When paginating, the filter value should match the call that provided the
3433
- * page token. Passing a different value might lead to unexpected results.
3434
- * @param {string} [request.filter]
3435
- * Optional. A query filter.
3436
- *
3437
- * You can filter reactions by
3438
- * [emoji](https://developers.google.com/workspace/chat/api/reference/rest/v1/Emoji)
3439
- * (either `emoji.unicode` or `emoji.custom_emoji.uid`) and
3440
- * [user](https://developers.google.com/workspace/chat/api/reference/rest/v1/User)
3441
- * (`user.name`).
3442
- *
3443
- * To filter reactions for multiple emojis or users, join similar fields
3444
- * with the `OR` operator, such as `emoji.unicode = "🙂" OR emoji.unicode =
3445
- * "👍"` and `user.name = "users/AAAAAA" OR user.name = "users/BBBBBB"`.
3446
- *
3447
- * To filter reactions by emoji and user, use the `AND` operator, such as
3448
- * `emoji.unicode = "🙂" AND user.name = "users/AAAAAA"`.
3449
- *
3450
- * If your query uses both `AND` and `OR`, group them with parentheses.
3451
- *
3452
- * For example, the following queries are valid:
3453
- *
3454
- * ```
3455
- * user.name = "users/{user}"
3456
- * emoji.unicode = "🙂"
3457
- * emoji.custom_emoji.uid = "{uid}"
3458
- * emoji.unicode = "🙂" OR emoji.unicode = "👍"
3459
- * emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}"
3460
- * emoji.unicode = "🙂" AND user.name = "users/{user}"
3461
- * (emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}")
3462
- * AND user.name = "users/{user}"
3463
- * ```
3464
- *
3465
- * The following queries are invalid:
3466
- *
3467
- * ```
3468
- * emoji.unicode = "🙂" AND emoji.unicode = "👍"
3469
- * emoji.unicode = "🙂" AND emoji.custom_emoji.uid = "{uid}"
3470
- * emoji.unicode = "🙂" OR user.name = "users/{user}"
3471
- * emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}" OR
3472
- * user.name = "users/{user}"
3473
- * emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}"
3474
- * AND user.name = "users/{user}"
3475
- * ```
3476
- *
3477
- * Invalid queries are rejected with an `INVALID_ARGUMENT` error.
3478
- * @param {object} [options]
3479
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
3480
- * @returns {Promise} - The promise which resolves to an array.
3481
- * The first element of the array is Array of {@link protos.google.chat.v1.Reaction|Reaction}.
3482
- * The client library will perform auto-pagination by default: it will call the API as many
3483
- * times as needed and will merge results from all the pages into this array.
3484
- * Note that it can affect your quota.
3485
- * We recommend using `listReactionsAsync()`
3486
- * method described below for async iteration which you can stop as needed.
3487
- * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
3488
- * for more details and examples.
3489
- */
3406
+ * Returns all spaces with `spaceType == GROUP_CHAT`, whose
3407
+ * human memberships contain exactly the calling user, and the users specified
3408
+ * in `FindGroupChatsRequest.users`. Only members that have joined the
3409
+ * conversation are supported. For an example, see [Find group
3410
+ * chats](https://developers.google.com/workspace/chat/find-group-chats).
3411
+ *
3412
+ * If the calling user blocks, or is blocked by, some users, and no spaces
3413
+ * with the entire specified set of users are found, this method returns
3414
+ * spaces that don't include the blocked or blocking users.
3415
+ *
3416
+ * The specified set of users must contain only human (non-app) memberships.
3417
+ * A request that contains non-human users doesn't return any spaces.
3418
+ *
3419
+ * Requires [user
3420
+ * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
3421
+ * with one of the following [authorization
3422
+ * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
3423
+ *
3424
+ * - `https://www.googleapis.com/auth/chat.memberships.readonly`
3425
+ * - `https://www.googleapis.com/auth/chat.memberships`
3426
+ *
3427
+ * @param {Object} request
3428
+ * The request object that will be sent.
3429
+ * @param {string[]} [request.users]
3430
+ * Optional. Resource names of all human users in group chat with the calling
3431
+ * user. Chat apps can't be included in the request.
3432
+ *
3433
+ * The maximum number of users that can be specified in a single request is
3434
+ * `49`.
3435
+ *
3436
+ * Format: `users/{user}`, where `{user}` is either the `id` for the
3437
+ * [person](https://developers.google.com/people/api/rest/v1/people) from the
3438
+ * People API, or the `id` for the
3439
+ * [user](https://developers.google.com/admin-sdk/directory/reference/rest/v1/users)
3440
+ * in the Directory API. For example, to find all group chats with the calling
3441
+ * user and two other users, with People API profile IDs `123456789` and
3442
+ * `987654321`, you can use `users/123456789` and `users/987654321`.
3443
+ * You can also use the email as an alias for `{user}`. For example,
3444
+ * `users/example@gmail.com` where `example@gmail.com` is the email of the
3445
+ * Google Chat user.
3446
+ * @param {number} [request.pageSize]
3447
+ * Optional. The maximum number of spaces to return. The service might return
3448
+ * fewer than this value.
3449
+ *
3450
+ * If unspecified, at most 10 spaces are returned.
3451
+ *
3452
+ * The maximum value is 30. If you use a value more than 30, it's
3453
+ * automatically changed to 30.
3454
+ *
3455
+ * Negative values return an `INVALID_ARGUMENT` error.
3456
+ * @param {string} [request.pageToken]
3457
+ * Optional. A page token, received from a previous call to find group chats.
3458
+ * Provide this parameter to retrieve the subsequent page.
3459
+ *
3460
+ * When paginating, all other parameters provided should match the call that
3461
+ * provided the token. Passing different values may lead to unexpected
3462
+ * results.
3463
+ * @param {google.chat.v1.SpaceView} request.spaceView
3464
+ * Requested space view type. If unset, defaults to
3465
+ * `SPACE_VIEW_RESOURCE_NAME_ONLY`. Requests that specify
3466
+ * `SPACE_VIEW_EXPANDED` must include scopes that allow reading space data,
3467
+ * for example,
3468
+ * https://www.googleapis.com/auth/chat.spaces or
3469
+ * https://www.googleapis.com/auth/chat.spaces.readonly.
3470
+ * @param {object} [options]
3471
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
3472
+ * @returns {Promise} - The promise which resolves to an array.
3473
+ * The first element of the array is Array of {@link protos.google.chat.v1.Space|Space}.
3474
+ * The client library will perform auto-pagination by default: it will call the API as many
3475
+ * times as needed and will merge results from all the pages into this array.
3476
+ * Note that it can affect your quota.
3477
+ * We recommend using `findGroupChatsAsync()`
3478
+ * method described below for async iteration which you can stop as needed.
3479
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
3480
+ * for more details and examples.
3481
+ */
3482
+ findGroupChats(request?: protos.google.chat.v1.IFindGroupChatsRequest, options?: CallOptions): Promise<[
3483
+ protos.google.chat.v1.ISpace[],
3484
+ protos.google.chat.v1.IFindGroupChatsRequest | null,
3485
+ protos.google.chat.v1.IFindGroupChatsResponse
3486
+ ]>;
3487
+ findGroupChats(request: protos.google.chat.v1.IFindGroupChatsRequest, options: CallOptions, callback: PaginationCallback<protos.google.chat.v1.IFindGroupChatsRequest, protos.google.chat.v1.IFindGroupChatsResponse | null | undefined, protos.google.chat.v1.ISpace>): void;
3488
+ findGroupChats(request: protos.google.chat.v1.IFindGroupChatsRequest, callback: PaginationCallback<protos.google.chat.v1.IFindGroupChatsRequest, protos.google.chat.v1.IFindGroupChatsResponse | null | undefined, protos.google.chat.v1.ISpace>): void;
3489
+ /**
3490
+ * Equivalent to `findGroupChats`, but returns a NodeJS Stream object.
3491
+ * @param {Object} request
3492
+ * The request object that will be sent.
3493
+ * @param {string[]} [request.users]
3494
+ * Optional. Resource names of all human users in group chat with the calling
3495
+ * user. Chat apps can't be included in the request.
3496
+ *
3497
+ * The maximum number of users that can be specified in a single request is
3498
+ * `49`.
3499
+ *
3500
+ * Format: `users/{user}`, where `{user}` is either the `id` for the
3501
+ * [person](https://developers.google.com/people/api/rest/v1/people) from the
3502
+ * People API, or the `id` for the
3503
+ * [user](https://developers.google.com/admin-sdk/directory/reference/rest/v1/users)
3504
+ * in the Directory API. For example, to find all group chats with the calling
3505
+ * user and two other users, with People API profile IDs `123456789` and
3506
+ * `987654321`, you can use `users/123456789` and `users/987654321`.
3507
+ * You can also use the email as an alias for `{user}`. For example,
3508
+ * `users/example@gmail.com` where `example@gmail.com` is the email of the
3509
+ * Google Chat user.
3510
+ * @param {number} [request.pageSize]
3511
+ * Optional. The maximum number of spaces to return. The service might return
3512
+ * fewer than this value.
3513
+ *
3514
+ * If unspecified, at most 10 spaces are returned.
3515
+ *
3516
+ * The maximum value is 30. If you use a value more than 30, it's
3517
+ * automatically changed to 30.
3518
+ *
3519
+ * Negative values return an `INVALID_ARGUMENT` error.
3520
+ * @param {string} [request.pageToken]
3521
+ * Optional. A page token, received from a previous call to find group chats.
3522
+ * Provide this parameter to retrieve the subsequent page.
3523
+ *
3524
+ * When paginating, all other parameters provided should match the call that
3525
+ * provided the token. Passing different values may lead to unexpected
3526
+ * results.
3527
+ * @param {google.chat.v1.SpaceView} request.spaceView
3528
+ * Requested space view type. If unset, defaults to
3529
+ * `SPACE_VIEW_RESOURCE_NAME_ONLY`. Requests that specify
3530
+ * `SPACE_VIEW_EXPANDED` must include scopes that allow reading space data,
3531
+ * for example,
3532
+ * https://www.googleapis.com/auth/chat.spaces or
3533
+ * https://www.googleapis.com/auth/chat.spaces.readonly.
3534
+ * @param {object} [options]
3535
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
3536
+ * @returns {Stream}
3537
+ * An object stream which emits an object representing {@link protos.google.chat.v1.Space|Space} on 'data' event.
3538
+ * The client library will perform auto-pagination by default: it will call the API as many
3539
+ * times as needed. Note that it can affect your quota.
3540
+ * We recommend using `findGroupChatsAsync()`
3541
+ * method described below for async iteration which you can stop as needed.
3542
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
3543
+ * for more details and examples.
3544
+ */
3545
+ findGroupChatsStream(request?: protos.google.chat.v1.IFindGroupChatsRequest, options?: CallOptions): Transform;
3546
+ /**
3547
+ * Equivalent to `findGroupChats`, but returns an iterable object.
3548
+ *
3549
+ * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
3550
+ * @param {Object} request
3551
+ * The request object that will be sent.
3552
+ * @param {string[]} [request.users]
3553
+ * Optional. Resource names of all human users in group chat with the calling
3554
+ * user. Chat apps can't be included in the request.
3555
+ *
3556
+ * The maximum number of users that can be specified in a single request is
3557
+ * `49`.
3558
+ *
3559
+ * Format: `users/{user}`, where `{user}` is either the `id` for the
3560
+ * [person](https://developers.google.com/people/api/rest/v1/people) from the
3561
+ * People API, or the `id` for the
3562
+ * [user](https://developers.google.com/admin-sdk/directory/reference/rest/v1/users)
3563
+ * in the Directory API. For example, to find all group chats with the calling
3564
+ * user and two other users, with People API profile IDs `123456789` and
3565
+ * `987654321`, you can use `users/123456789` and `users/987654321`.
3566
+ * You can also use the email as an alias for `{user}`. For example,
3567
+ * `users/example@gmail.com` where `example@gmail.com` is the email of the
3568
+ * Google Chat user.
3569
+ * @param {number} [request.pageSize]
3570
+ * Optional. The maximum number of spaces to return. The service might return
3571
+ * fewer than this value.
3572
+ *
3573
+ * If unspecified, at most 10 spaces are returned.
3574
+ *
3575
+ * The maximum value is 30. If you use a value more than 30, it's
3576
+ * automatically changed to 30.
3577
+ *
3578
+ * Negative values return an `INVALID_ARGUMENT` error.
3579
+ * @param {string} [request.pageToken]
3580
+ * Optional. A page token, received from a previous call to find group chats.
3581
+ * Provide this parameter to retrieve the subsequent page.
3582
+ *
3583
+ * When paginating, all other parameters provided should match the call that
3584
+ * provided the token. Passing different values may lead to unexpected
3585
+ * results.
3586
+ * @param {google.chat.v1.SpaceView} request.spaceView
3587
+ * Requested space view type. If unset, defaults to
3588
+ * `SPACE_VIEW_RESOURCE_NAME_ONLY`. Requests that specify
3589
+ * `SPACE_VIEW_EXPANDED` must include scopes that allow reading space data,
3590
+ * for example,
3591
+ * https://www.googleapis.com/auth/chat.spaces or
3592
+ * https://www.googleapis.com/auth/chat.spaces.readonly.
3593
+ * @param {object} [options]
3594
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
3595
+ * @returns {Object}
3596
+ * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
3597
+ * When you iterate the returned iterable, each element will be an object representing
3598
+ * {@link protos.google.chat.v1.Space|Space}. The API will be called under the hood as needed, once per the page,
3599
+ * so you can stop the iteration when you don't need more results.
3600
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
3601
+ * for more details and examples.
3602
+ * @example <caption>include:samples/generated/v1/chat_service.find_group_chats.js</caption>
3603
+ * region_tag:chat_v1_generated_ChatService_FindGroupChats_async
3604
+ */
3605
+ findGroupChatsAsync(request?: protos.google.chat.v1.IFindGroupChatsRequest, options?: CallOptions): AsyncIterable<protos.google.chat.v1.ISpace>;
3606
+ /**
3607
+ * Lists reactions to a message. For an example, see
3608
+ * [List reactions for a
3609
+ * message](https://developers.google.com/workspace/chat/list-reactions).
3610
+ *
3611
+ * Requires [user
3612
+ * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
3613
+ * with one of the following [authorization
3614
+ * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
3615
+ *
3616
+ * - `https://www.googleapis.com/auth/chat.messages.reactions.readonly`
3617
+ * - `https://www.googleapis.com/auth/chat.messages.reactions`
3618
+ * - `https://www.googleapis.com/auth/chat.messages.readonly`
3619
+ * - `https://www.googleapis.com/auth/chat.messages`
3620
+ *
3621
+ * @param {Object} request
3622
+ * The request object that will be sent.
3623
+ * @param {string} request.parent
3624
+ * Required. The message users reacted to.
3625
+ *
3626
+ * Format: `spaces/{space}/messages/{message}`
3627
+ * @param {number} [request.pageSize]
3628
+ * Optional. The maximum number of reactions returned. The service can return
3629
+ * fewer reactions than this value. If unspecified, the default value is 25.
3630
+ * The maximum value is 200; values above 200 are changed to 200.
3631
+ * @param {string} [request.pageToken]
3632
+ * Optional. (If resuming from a previous query.)
3633
+ *
3634
+ * A page token received from a previous list reactions call. Provide this
3635
+ * to retrieve the subsequent page.
3636
+ *
3637
+ * When paginating, the filter value should match the call that provided the
3638
+ * page token. Passing a different value might lead to unexpected results.
3639
+ * @param {string} [request.filter]
3640
+ * Optional. A query filter.
3641
+ *
3642
+ * You can filter reactions by
3643
+ * [emoji](https://developers.google.com/workspace/chat/api/reference/rest/v1/Emoji)
3644
+ * (either `emoji.unicode` or `emoji.custom_emoji.uid`) and
3645
+ * [user](https://developers.google.com/workspace/chat/api/reference/rest/v1/User)
3646
+ * (`user.name`).
3647
+ *
3648
+ * To filter reactions for multiple emojis or users, join similar fields
3649
+ * with the `OR` operator, such as `emoji.unicode = "🙂" OR emoji.unicode =
3650
+ * "👍"` and `user.name = "users/AAAAAA" OR user.name = "users/BBBBBB"`.
3651
+ *
3652
+ * To filter reactions by emoji and user, use the `AND` operator, such as
3653
+ * `emoji.unicode = "🙂" AND user.name = "users/AAAAAA"`.
3654
+ *
3655
+ * If your query uses both `AND` and `OR`, group them with parentheses.
3656
+ *
3657
+ * For example, the following queries are valid:
3658
+ *
3659
+ * ```
3660
+ * user.name = "users/{user}"
3661
+ * emoji.unicode = "🙂"
3662
+ * emoji.custom_emoji.uid = "{uid}"
3663
+ * emoji.unicode = "🙂" OR emoji.unicode = "👍"
3664
+ * emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}"
3665
+ * emoji.unicode = "🙂" AND user.name = "users/{user}"
3666
+ * (emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}")
3667
+ * AND user.name = "users/{user}"
3668
+ * ```
3669
+ *
3670
+ * The following queries are invalid:
3671
+ *
3672
+ * ```
3673
+ * emoji.unicode = "🙂" AND emoji.unicode = "👍"
3674
+ * emoji.unicode = "🙂" AND emoji.custom_emoji.uid = "{uid}"
3675
+ * emoji.unicode = "🙂" OR user.name = "users/{user}"
3676
+ * emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}" OR
3677
+ * user.name = "users/{user}"
3678
+ * emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}"
3679
+ * AND user.name = "users/{user}"
3680
+ * ```
3681
+ *
3682
+ * Invalid queries are rejected with an `INVALID_ARGUMENT` error.
3683
+ * @param {object} [options]
3684
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
3685
+ * @returns {Promise} - The promise which resolves to an array.
3686
+ * The first element of the array is Array of {@link protos.google.chat.v1.Reaction|Reaction}.
3687
+ * The client library will perform auto-pagination by default: it will call the API as many
3688
+ * times as needed and will merge results from all the pages into this array.
3689
+ * Note that it can affect your quota.
3690
+ * We recommend using `listReactionsAsync()`
3691
+ * method described below for async iteration which you can stop as needed.
3692
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
3693
+ * for more details and examples.
3694
+ */
3490
3695
  listReactions(request?: protos.google.chat.v1.IListReactionsRequest, options?: CallOptions): Promise<[
3491
3696
  protos.google.chat.v1.IReaction[],
3492
3697
  protos.google.chat.v1.IListReactionsRequest | null,
@@ -3623,92 +3828,92 @@ export declare class ChatServiceClient {
3623
3828
  * AND user.name = "users/{user}"
3624
3829
  * ```
3625
3830
  *
3626
- * The following queries are invalid:
3831
+ * The following queries are invalid:
3832
+ *
3833
+ * ```
3834
+ * emoji.unicode = "🙂" AND emoji.unicode = "👍"
3835
+ * emoji.unicode = "🙂" AND emoji.custom_emoji.uid = "{uid}"
3836
+ * emoji.unicode = "🙂" OR user.name = "users/{user}"
3837
+ * emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}" OR
3838
+ * user.name = "users/{user}"
3839
+ * emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}"
3840
+ * AND user.name = "users/{user}"
3841
+ * ```
3842
+ *
3843
+ * Invalid queries are rejected with an `INVALID_ARGUMENT` error.
3844
+ * @param {object} [options]
3845
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
3846
+ * @returns {Object}
3847
+ * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
3848
+ * When you iterate the returned iterable, each element will be an object representing
3849
+ * {@link protos.google.chat.v1.Reaction|Reaction}. The API will be called under the hood as needed, once per the page,
3850
+ * so you can stop the iteration when you don't need more results.
3851
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
3852
+ * for more details and examples.
3853
+ * @example <caption>include:samples/generated/v1/chat_service.list_reactions.js</caption>
3854
+ * region_tag:chat_v1_generated_ChatService_ListReactions_async
3855
+ */
3856
+ listReactionsAsync(request?: protos.google.chat.v1.IListReactionsRequest, options?: CallOptions): AsyncIterable<protos.google.chat.v1.IReaction>;
3857
+ /**
3858
+ * Lists custom emojis visible to the authenticated user.
3859
+ *
3860
+ * Custom emojis are only available for Google Workspace accounts, and the
3861
+ * administrator must turn custom emojis on for the organization. For more
3862
+ * information, see [Learn about custom emojis in Google
3863
+ * Chat](https://support.google.com/chat/answer/12800149) and
3864
+ * [Manage custom emoji
3865
+ * permissions](https://support.google.com/a/answer/12850085).
3866
+ *
3867
+ * Requires [user
3868
+ * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
3869
+ * with one of the following [authorization
3870
+ * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
3871
+ *
3872
+ * - `https://www.googleapis.com/auth/chat.customemojis.readonly`
3873
+ * - `https://www.googleapis.com/auth/chat.customemojis`
3874
+ *
3875
+ * @param {Object} request
3876
+ * The request object that will be sent.
3877
+ * @param {number} [request.pageSize]
3878
+ * Optional. The maximum number of custom emojis returned. The service can
3879
+ * return fewer custom emojis than this value. If unspecified, the default
3880
+ * value is 25. The maximum value is 200; values above 200 are changed to 200.
3881
+ * @param {string} [request.pageToken]
3882
+ * Optional. (If resuming from a previous query.)
3883
+ *
3884
+ * A page token received from a previous list custom emoji call. Provide this
3885
+ * to retrieve the subsequent page.
3886
+ *
3887
+ * When paginating, the filter value should match the call that provided the
3888
+ * page token. Passing a different value might lead to unexpected results.
3889
+ * @param {string} [request.filter]
3890
+ * Optional. A query filter.
3627
3891
  *
3892
+ * Supports filtering by creator.
3893
+ *
3894
+ * To filter by creator, you must specify a valid value. Currently only
3895
+ * `creator("users/me")` and `NOT creator("users/me")` are accepted to filter
3896
+ * custom emojis by whether they were created by the calling user or not.
3897
+ *
3898
+ * For example, the following query returns custom emojis created by the
3899
+ * caller:
3628
3900
  * ```
3629
- * emoji.unicode = "🙂" AND emoji.unicode = "👍"
3630
- * emoji.unicode = "🙂" AND emoji.custom_emoji.uid = "{uid}"
3631
- * emoji.unicode = "🙂" OR user.name = "users/{user}"
3632
- * emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}" OR
3633
- * user.name = "users/{user}"
3634
- * emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}"
3635
- * AND user.name = "users/{user}"
3901
+ * creator("users/me")
3636
3902
  * ```
3637
3903
  *
3638
3904
  * Invalid queries are rejected with an `INVALID_ARGUMENT` error.
3639
3905
  * @param {object} [options]
3640
3906
  * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
3641
- * @returns {Object}
3642
- * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
3643
- * When you iterate the returned iterable, each element will be an object representing
3644
- * {@link protos.google.chat.v1.Reaction|Reaction}. The API will be called under the hood as needed, once per the page,
3645
- * so you can stop the iteration when you don't need more results.
3907
+ * @returns {Promise} - The promise which resolves to an array.
3908
+ * The first element of the array is Array of {@link protos.google.chat.v1.CustomEmoji|CustomEmoji}.
3909
+ * The client library will perform auto-pagination by default: it will call the API as many
3910
+ * times as needed and will merge results from all the pages into this array.
3911
+ * Note that it can affect your quota.
3912
+ * We recommend using `listCustomEmojisAsync()`
3913
+ * method described below for async iteration which you can stop as needed.
3646
3914
  * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
3647
3915
  * for more details and examples.
3648
- * @example <caption>include:samples/generated/v1/chat_service.list_reactions.js</caption>
3649
- * region_tag:chat_v1_generated_ChatService_ListReactions_async
3650
3916
  */
3651
- listReactionsAsync(request?: protos.google.chat.v1.IListReactionsRequest, options?: CallOptions): AsyncIterable<protos.google.chat.v1.IReaction>;
3652
- /**
3653
- * Lists custom emojis visible to the authenticated user.
3654
- *
3655
- * Custom emojis are only available for Google Workspace accounts, and the
3656
- * administrator must turn custom emojis on for the organization. For more
3657
- * information, see [Learn about custom emojis in Google
3658
- * Chat](https://support.google.com/chat/answer/12800149) and
3659
- * [Manage custom emoji
3660
- * permissions](https://support.google.com/a/answer/12850085).
3661
- *
3662
- * Requires [user
3663
- * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
3664
- * with one of the following [authorization
3665
- * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
3666
- *
3667
- * - `https://www.googleapis.com/auth/chat.customemojis.readonly`
3668
- * - `https://www.googleapis.com/auth/chat.customemojis`
3669
- *
3670
- * @param {Object} request
3671
- * The request object that will be sent.
3672
- * @param {number} [request.pageSize]
3673
- * Optional. The maximum number of custom emojis returned. The service can
3674
- * return fewer custom emojis than this value. If unspecified, the default
3675
- * value is 25. The maximum value is 200; values above 200 are changed to 200.
3676
- * @param {string} [request.pageToken]
3677
- * Optional. (If resuming from a previous query.)
3678
- *
3679
- * A page token received from a previous list custom emoji call. Provide this
3680
- * to retrieve the subsequent page.
3681
- *
3682
- * When paginating, the filter value should match the call that provided the
3683
- * page token. Passing a different value might lead to unexpected results.
3684
- * @param {string} [request.filter]
3685
- * Optional. A query filter.
3686
- *
3687
- * Supports filtering by creator.
3688
- *
3689
- * To filter by creator, you must specify a valid value. Currently only
3690
- * `creator("users/me")` and `NOT creator("users/me")` are accepted to filter
3691
- * custom emojis by whether they were created by the calling user or not.
3692
- *
3693
- * For example, the following query returns custom emojis created by the
3694
- * caller:
3695
- * ```
3696
- * creator("users/me")
3697
- * ```
3698
- *
3699
- * Invalid queries are rejected with an `INVALID_ARGUMENT` error.
3700
- * @param {object} [options]
3701
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
3702
- * @returns {Promise} - The promise which resolves to an array.
3703
- * The first element of the array is Array of {@link protos.google.chat.v1.CustomEmoji|CustomEmoji}.
3704
- * The client library will perform auto-pagination by default: it will call the API as many
3705
- * times as needed and will merge results from all the pages into this array.
3706
- * Note that it can affect your quota.
3707
- * We recommend using `listCustomEmojisAsync()`
3708
- * method described below for async iteration which you can stop as needed.
3709
- * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
3710
- * for more details and examples.
3711
- */
3712
3917
  listCustomEmojis(request?: protos.google.chat.v1.IListCustomEmojisRequest, options?: CallOptions): Promise<[
3713
3918
  protos.google.chat.v1.ICustomEmoji[],
3714
3919
  protos.google.chat.v1.IListCustomEmojisRequest | null,
@@ -3808,134 +4013,134 @@ export declare class ChatServiceClient {
3808
4013
  */
3809
4014
  listCustomEmojisAsync(request?: protos.google.chat.v1.IListCustomEmojisRequest, options?: CallOptions): AsyncIterable<protos.google.chat.v1.ICustomEmoji>;
3810
4015
  /**
3811
- * Lists events from a Google Chat space. For each event, the
3812
- * [payload](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.spaceEvents#SpaceEvent.FIELDS.oneof_payload)
3813
- * contains the most recent version of the Chat resource. For example, if you
3814
- * list events about new space members, the server returns `Membership`
3815
- * resources that contain the latest membership details. If new members were
3816
- * removed during the requested period, the event payload contains an empty
3817
- * `Membership` resource.
3818
- *
3819
- * Supports the following types of
3820
- * [authentication](https://developers.google.com/workspace/chat/authenticate-authorize)
3821
- * with an
3822
- * [authorization
3823
- * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes)
3824
- * appropriate for reading the requested data:
3825
- *
3826
- * - [App
3827
- * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
3828
- * with [administrator
3829
- * approval](https://support.google.com/a?p=chat-app-auth)
3830
- * with one of the following authorization scopes:
3831
- * - `https://www.googleapis.com/auth/chat.app.spaces`
3832
- * - `https://www.googleapis.com/auth/chat.app.spaces.readonly`
3833
- * - `https://www.googleapis.com/auth/chat.app.messages.readonly`
3834
- * - `https://www.googleapis.com/auth/chat.app.memberships`
3835
- * - `https://www.googleapis.com/auth/chat.app.memberships.readonly`
3836
- *
3837
- * - [User
3838
- * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
3839
- * with one of the following authorization scopes:
3840
- * - `https://www.googleapis.com/auth/chat.spaces.readonly`
3841
- * - `https://www.googleapis.com/auth/chat.spaces`
3842
- * - `https://www.googleapis.com/auth/chat.messages.readonly`
3843
- * - `https://www.googleapis.com/auth/chat.messages`
3844
- * - `https://www.googleapis.com/auth/chat.messages.reactions.readonly`
3845
- * - `https://www.googleapis.com/auth/chat.messages.reactions`
3846
- * - `https://www.googleapis.com/auth/chat.memberships.readonly`
3847
- * - `https://www.googleapis.com/auth/chat.memberships`
3848
- *
3849
- * To list events, the authenticated caller must be a member of the space.
3850
- *
3851
- * For an example, see [List events from a Google Chat
3852
- * space](https://developers.google.com/workspace/chat/list-space-events).
3853
- *
3854
- * @param {Object} request
3855
- * The request object that will be sent.
3856
- * @param {string} request.parent
3857
- * Required. Resource name of the [Google Chat
3858
- * space](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces)
3859
- * where the events occurred.
3860
- *
3861
- * Format: `spaces/{space}`.
3862
- * @param {number} [request.pageSize]
3863
- * Optional. The maximum number of space events returned. The service might
3864
- * return fewer than this value.
3865
- *
3866
- * Negative values return an `INVALID_ARGUMENT` error.
3867
- * @param {string} [request.pageToken]
3868
- * Optional. A page token, received from a previous list space events call.
3869
- * Provide this to retrieve the subsequent page.
3870
- *
3871
- * When paginating, all other parameters provided to list space events must
3872
- * match the call that provided the page token. Passing different values to
3873
- * the other parameters might lead to unexpected results.
3874
- * @param {string} request.filter
3875
- * Required. A query filter.
3876
- *
3877
- * You must specify at least one event type (`event_type`)
3878
- * using the has `:` operator. To filter by multiple event types, use the `OR`
3879
- * operator. Omit batch event types in your filter. The request automatically
3880
- * returns any related batch events. For example, if you filter by new
3881
- * reactions
3882
- * (`google.workspace.chat.reaction.v1.created`), the server also returns
3883
- * batch new reactions events
3884
- * (`google.workspace.chat.reaction.v1.batchCreated`). For a list of supported
3885
- * event types, see the [`SpaceEvents` reference
3886
- * documentation](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.spaceEvents#SpaceEvent.FIELDS.event_type).
3887
- *
3888
- * Optionally, you can also filter by start time (`start_time`) and
3889
- * end time (`end_time`):
3890
- *
3891
- * * `start_time`: Exclusive timestamp from which to start listing space
3892
- * events.
3893
- * You can list events that occurred up to 28 days ago. If unspecified, lists
3894
- * space events from the past 28 days.
3895
- * * `end_time`: Inclusive timestamp until which space events are listed.
3896
- * If unspecified, lists events up to the time of the request.
3897
- *
3898
- * To specify a start or end time, use the equals `=` operator and format in
3899
- * [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339). To filter by both
3900
- * `start_time` and `end_time`, use the `AND` operator.
3901
- *
3902
- * For example, the following queries are valid:
3903
- *
3904
- * ```
3905
- * start_time="2023-08-23T19:20:33+00:00" AND
3906
- * end_time="2023-08-23T19:21:54+00:00"
3907
- * ```
3908
- * ```
3909
- * start_time="2023-08-23T19:20:33+00:00" AND
3910
- * (event_types:"google.workspace.chat.space.v1.updated" OR
3911
- * event_types:"google.workspace.chat.message.v1.created")
3912
- * ```
3913
- *
3914
- * The following queries are invalid:
3915
- *
3916
- * ```
3917
- * start_time="2023-08-23T19:20:33+00:00" OR
3918
- * end_time="2023-08-23T19:21:54+00:00"
3919
- * ```
3920
- * ```
3921
- * event_types:"google.workspace.chat.space.v1.updated" AND
3922
- * event_types:"google.workspace.chat.message.v1.created"
3923
- * ```
3924
- *
3925
- * Invalid queries are rejected by the server with an `INVALID_ARGUMENT`
3926
- * error.
3927
- * @param {object} [options]
3928
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
3929
- * @returns {Promise} - The promise which resolves to an array.
3930
- * The first element of the array is Array of {@link protos.google.chat.v1.SpaceEvent|SpaceEvent}.
3931
- * The client library will perform auto-pagination by default: it will call the API as many
3932
- * times as needed and will merge results from all the pages into this array.
3933
- * Note that it can affect your quota.
3934
- * We recommend using `listSpaceEventsAsync()`
3935
- * method described below for async iteration which you can stop as needed.
3936
- * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
3937
- * for more details and examples.
3938
- */
4016
+ * Lists events from a Google Chat space. For each event, the
4017
+ * [payload](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.spaceEvents#SpaceEvent.FIELDS.oneof_payload)
4018
+ * contains the most recent version of the Chat resource. For example, if you
4019
+ * list events about new space members, the server returns `Membership`
4020
+ * resources that contain the latest membership details. If new members were
4021
+ * removed during the requested period, the event payload contains an empty
4022
+ * `Membership` resource.
4023
+ *
4024
+ * Supports the following types of
4025
+ * [authentication](https://developers.google.com/workspace/chat/authenticate-authorize)
4026
+ * with an
4027
+ * [authorization
4028
+ * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes)
4029
+ * appropriate for reading the requested data:
4030
+ *
4031
+ * - [App
4032
+ * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
4033
+ * with [administrator
4034
+ * approval](https://support.google.com/a?p=chat-app-auth)
4035
+ * with one of the following authorization scopes:
4036
+ * - `https://www.googleapis.com/auth/chat.app.spaces`
4037
+ * - `https://www.googleapis.com/auth/chat.app.spaces.readonly`
4038
+ * - `https://www.googleapis.com/auth/chat.app.messages.readonly`
4039
+ * - `https://www.googleapis.com/auth/chat.app.memberships`
4040
+ * - `https://www.googleapis.com/auth/chat.app.memberships.readonly`
4041
+ *
4042
+ * - [User
4043
+ * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
4044
+ * with one of the following authorization scopes:
4045
+ * - `https://www.googleapis.com/auth/chat.spaces.readonly`
4046
+ * - `https://www.googleapis.com/auth/chat.spaces`
4047
+ * - `https://www.googleapis.com/auth/chat.messages.readonly`
4048
+ * - `https://www.googleapis.com/auth/chat.messages`
4049
+ * - `https://www.googleapis.com/auth/chat.messages.reactions.readonly`
4050
+ * - `https://www.googleapis.com/auth/chat.messages.reactions`
4051
+ * - `https://www.googleapis.com/auth/chat.memberships.readonly`
4052
+ * - `https://www.googleapis.com/auth/chat.memberships`
4053
+ *
4054
+ * To list events, the authenticated caller must be a member of the space.
4055
+ *
4056
+ * For an example, see [List events from a Google Chat
4057
+ * space](https://developers.google.com/workspace/chat/list-space-events).
4058
+ *
4059
+ * @param {Object} request
4060
+ * The request object that will be sent.
4061
+ * @param {string} request.parent
4062
+ * Required. Resource name of the [Google Chat
4063
+ * space](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces)
4064
+ * where the events occurred.
4065
+ *
4066
+ * Format: `spaces/{space}`.
4067
+ * @param {number} [request.pageSize]
4068
+ * Optional. The maximum number of space events returned. The service might
4069
+ * return fewer than this value.
4070
+ *
4071
+ * Negative values return an `INVALID_ARGUMENT` error.
4072
+ * @param {string} [request.pageToken]
4073
+ * Optional. A page token, received from a previous list space events call.
4074
+ * Provide this to retrieve the subsequent page.
4075
+ *
4076
+ * When paginating, all other parameters provided to list space events must
4077
+ * match the call that provided the page token. Passing different values to
4078
+ * the other parameters might lead to unexpected results.
4079
+ * @param {string} request.filter
4080
+ * Required. A query filter.
4081
+ *
4082
+ * You must specify at least one event type (`event_type`)
4083
+ * using the has `:` operator. To filter by multiple event types, use the `OR`
4084
+ * operator. Omit batch event types in your filter. The request automatically
4085
+ * returns any related batch events. For example, if you filter by new
4086
+ * reactions
4087
+ * (`google.workspace.chat.reaction.v1.created`), the server also returns
4088
+ * batch new reactions events
4089
+ * (`google.workspace.chat.reaction.v1.batchCreated`). For a list of supported
4090
+ * event types, see the [`SpaceEvents` reference
4091
+ * documentation](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.spaceEvents#SpaceEvent.FIELDS.event_type).
4092
+ *
4093
+ * Optionally, you can also filter by start time (`start_time`) and
4094
+ * end time (`end_time`):
4095
+ *
4096
+ * * `start_time`: Exclusive timestamp from which to start listing space
4097
+ * events.
4098
+ * You can list events that occurred up to 28 days ago. If unspecified, lists
4099
+ * space events from the past 28 days.
4100
+ * * `end_time`: Inclusive timestamp until which space events are listed.
4101
+ * If unspecified, lists events up to the time of the request.
4102
+ *
4103
+ * To specify a start or end time, use the equals `=` operator and format in
4104
+ * [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339). To filter by both
4105
+ * `start_time` and `end_time`, use the `AND` operator.
4106
+ *
4107
+ * For example, the following queries are valid:
4108
+ *
4109
+ * ```
4110
+ * start_time="2023-08-23T19:20:33+00:00" AND
4111
+ * end_time="2023-08-23T19:21:54+00:00"
4112
+ * ```
4113
+ * ```
4114
+ * start_time="2023-08-23T19:20:33+00:00" AND
4115
+ * (event_types:"google.workspace.chat.space.v1.updated" OR
4116
+ * event_types:"google.workspace.chat.message.v1.created")
4117
+ * ```
4118
+ *
4119
+ * The following queries are invalid:
4120
+ *
4121
+ * ```
4122
+ * start_time="2023-08-23T19:20:33+00:00" OR
4123
+ * end_time="2023-08-23T19:21:54+00:00"
4124
+ * ```
4125
+ * ```
4126
+ * event_types:"google.workspace.chat.space.v1.updated" AND
4127
+ * event_types:"google.workspace.chat.message.v1.created"
4128
+ * ```
4129
+ *
4130
+ * Invalid queries are rejected by the server with an `INVALID_ARGUMENT`
4131
+ * error.
4132
+ * @param {object} [options]
4133
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
4134
+ * @returns {Promise} - The promise which resolves to an array.
4135
+ * The first element of the array is Array of {@link protos.google.chat.v1.SpaceEvent|SpaceEvent}.
4136
+ * The client library will perform auto-pagination by default: it will call the API as many
4137
+ * times as needed and will merge results from all the pages into this array.
4138
+ * Note that it can affect your quota.
4139
+ * We recommend using `listSpaceEventsAsync()`
4140
+ * method described below for async iteration which you can stop as needed.
4141
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
4142
+ * for more details and examples.
4143
+ */
3939
4144
  listSpaceEvents(request?: protos.google.chat.v1.IListSpaceEventsRequest, options?: CallOptions): Promise<[
3940
4145
  protos.google.chat.v1.ISpaceEvent[],
3941
4146
  protos.google.chat.v1.IListSpaceEventsRequest | null,
@@ -4121,62 +4326,62 @@ export declare class ChatServiceClient {
4121
4326
  */
4122
4327
  listSpaceEventsAsync(request?: protos.google.chat.v1.IListSpaceEventsRequest, options?: CallOptions): AsyncIterable<protos.google.chat.v1.ISpaceEvent>;
4123
4328
  /**
4124
- * Lists sections available to the Chat user. Sections help users group their
4125
- * conversations and customize the list of spaces displayed in Chat
4126
- * navigation panel. For details, see [Create and organize sections in Google
4127
- * Chat](https://support.google.com/chat/answer/16059854).
4128
- *
4129
- * Requires [user
4130
- * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
4131
- * with the [authorization
4132
- * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
4133
- *
4134
- * - `https://www.googleapis.com/auth/chat.users.sections`
4135
- * - `https://www.googleapis.com/auth/chat.users.sections.readonly`
4136
- *
4137
- * @param {Object} request
4138
- * The request object that will be sent.
4139
- * @param {string} request.parent
4140
- * Required. The parent, which is the user resource name that owns this
4141
- * collection of sections. Only supports listing sections for the calling
4142
- * user. To refer to the calling user, set one of the following:
4143
- *
4144
- * - The `me` alias. For example, `users/me`.
4145
- *
4146
- * - Their Workspace email address. For example, `users/user@example.com`.
4147
- *
4148
- * - Their user id. For example, `users/123456789`.
4149
- *
4150
- * Format: `users/{user}`
4151
- * @param {number} [request.pageSize]
4152
- * Optional. The maximum number of sections to return. The service may return
4153
- * fewer than this value.
4154
- *
4155
- * If unspecified, at most 10 sections will be returned.
4156
- *
4157
- * The maximum value is 100. If you use a value more than 100, it's
4158
- * automatically changed to 100.
4159
- *
4160
- * Negative values return an `INVALID_ARGUMENT` error.
4161
- * @param {string} [request.pageToken]
4162
- * Optional. A page token, received from a previous list sections call.
4163
- * Provide this to retrieve the subsequent page.
4164
- *
4165
- * When paginating, all other parameters provided should match the call that
4166
- * provided the page token. Passing different values to the other parameters
4167
- * might lead to unexpected results.
4168
- * @param {object} [options]
4169
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
4170
- * @returns {Promise} - The promise which resolves to an array.
4171
- * The first element of the array is Array of {@link protos.google.chat.v1.Section|Section}.
4172
- * The client library will perform auto-pagination by default: it will call the API as many
4173
- * times as needed and will merge results from all the pages into this array.
4174
- * Note that it can affect your quota.
4175
- * We recommend using `listSectionsAsync()`
4176
- * method described below for async iteration which you can stop as needed.
4177
- * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
4178
- * for more details and examples.
4179
- */
4329
+ * Lists sections available to the Chat user. Sections help users group their
4330
+ * conversations and customize the list of spaces displayed in Chat
4331
+ * navigation panel. For details, see [Create and organize sections in Google
4332
+ * Chat](https://support.google.com/chat/answer/16059854).
4333
+ *
4334
+ * Requires [user
4335
+ * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
4336
+ * with the [authorization
4337
+ * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
4338
+ *
4339
+ * - `https://www.googleapis.com/auth/chat.users.sections`
4340
+ * - `https://www.googleapis.com/auth/chat.users.sections.readonly`
4341
+ *
4342
+ * @param {Object} request
4343
+ * The request object that will be sent.
4344
+ * @param {string} request.parent
4345
+ * Required. The parent, which is the user resource name that owns this
4346
+ * collection of sections. Only supports listing sections for the calling
4347
+ * user. To refer to the calling user, set one of the following:
4348
+ *
4349
+ * - The `me` alias. For example, `users/me`.
4350
+ *
4351
+ * - Their Workspace email address. For example, `users/user@example.com`.
4352
+ *
4353
+ * - Their user id. For example, `users/123456789`.
4354
+ *
4355
+ * Format: `users/{user}`
4356
+ * @param {number} [request.pageSize]
4357
+ * Optional. The maximum number of sections to return. The service may return
4358
+ * fewer than this value.
4359
+ *
4360
+ * If unspecified, at most 10 sections will be returned.
4361
+ *
4362
+ * The maximum value is 100. If you use a value more than 100, it's
4363
+ * automatically changed to 100.
4364
+ *
4365
+ * Negative values return an `INVALID_ARGUMENT` error.
4366
+ * @param {string} [request.pageToken]
4367
+ * Optional. A page token, received from a previous list sections call.
4368
+ * Provide this to retrieve the subsequent page.
4369
+ *
4370
+ * When paginating, all other parameters provided should match the call that
4371
+ * provided the page token. Passing different values to the other parameters
4372
+ * might lead to unexpected results.
4373
+ * @param {object} [options]
4374
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
4375
+ * @returns {Promise} - The promise which resolves to an array.
4376
+ * The first element of the array is Array of {@link protos.google.chat.v1.Section|Section}.
4377
+ * The client library will perform auto-pagination by default: it will call the API as many
4378
+ * times as needed and will merge results from all the pages into this array.
4379
+ * Note that it can affect your quota.
4380
+ * We recommend using `listSectionsAsync()`
4381
+ * method described below for async iteration which you can stop as needed.
4382
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
4383
+ * for more details and examples.
4384
+ */
4180
4385
  listSections(request?: protos.google.chat.v1.IListSectionsRequest, options?: CallOptions): Promise<[
4181
4386
  protos.google.chat.v1.ISection[],
4182
4387
  protos.google.chat.v1.IListSectionsRequest | null,
@@ -4278,67 +4483,67 @@ export declare class ChatServiceClient {
4278
4483
  */
4279
4484
  listSectionsAsync(request?: protos.google.chat.v1.IListSectionsRequest, options?: CallOptions): AsyncIterable<protos.google.chat.v1.ISection>;
4280
4485
  /**
4281
- * Lists items in a section.
4282
- *
4283
- * Only spaces can be section items. For details, see [Create and organize
4284
- * sections in Google Chat](https://support.google.com/chat/answer/16059854).
4285
- *
4286
- * Requires [user
4287
- * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
4288
- * with the [authorization
4289
- * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
4290
- *
4291
- * - `https://www.googleapis.com/auth/chat.users.sections`
4292
- * - `https://www.googleapis.com/auth/chat.users.sections.readonly`
4293
- *
4294
- * @param {Object} request
4295
- * The request object that will be sent.
4296
- * @param {string} request.parent
4297
- * Required. The parent, which is the section resource name that owns this
4298
- * collection of section items. Only supports listing section items for the
4299
- * calling user.
4300
- *
4301
- * When you're filtering by space, use the wildcard `-` to search across all
4302
- * sections. For example, `users/{user}/sections/-`.
4303
- *
4304
- * Format: `users/{user}/sections/{section}`
4305
- * @param {number} [request.pageSize]
4306
- * Optional. The maximum number of section items to return. The service may
4307
- * return fewer than this value.
4308
- *
4309
- * If unspecified, at most 10 section items will be returned.
4310
- *
4311
- * The maximum value is 100. If you use a value more than 100, it's
4312
- * automatically changed to 100.
4313
- *
4314
- * Negative values return an `INVALID_ARGUMENT` error.
4315
- * @param {string} [request.pageToken]
4316
- * Optional. A page token, received from a previous list section items call.
4317
- * Provide this to retrieve the subsequent page.
4318
- *
4319
- * When paginating, all other parameters provided should match the call that
4320
- * provided the page token. Passing different values to the other parameters
4321
- * might lead to unexpected results.
4322
- * @param {string} [request.filter]
4323
- * Optional. A query filter.
4324
- *
4325
- * Currently only supports filtering by space.
4326
- *
4327
- * For example, `space = spaces/{space}`.
4328
- *
4329
- * Invalid queries are rejected with an `INVALID_ARGUMENT` error.
4330
- * @param {object} [options]
4331
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
4332
- * @returns {Promise} - The promise which resolves to an array.
4333
- * The first element of the array is Array of {@link protos.google.chat.v1.SectionItem|SectionItem}.
4334
- * The client library will perform auto-pagination by default: it will call the API as many
4335
- * times as needed and will merge results from all the pages into this array.
4336
- * Note that it can affect your quota.
4337
- * We recommend using `listSectionItemsAsync()`
4338
- * method described below for async iteration which you can stop as needed.
4339
- * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
4340
- * for more details and examples.
4341
- */
4486
+ * Lists items in a section.
4487
+ *
4488
+ * Only spaces can be section items. For details, see [Create and organize
4489
+ * sections in Google Chat](https://support.google.com/chat/answer/16059854).
4490
+ *
4491
+ * Requires [user
4492
+ * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
4493
+ * with the [authorization
4494
+ * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
4495
+ *
4496
+ * - `https://www.googleapis.com/auth/chat.users.sections`
4497
+ * - `https://www.googleapis.com/auth/chat.users.sections.readonly`
4498
+ *
4499
+ * @param {Object} request
4500
+ * The request object that will be sent.
4501
+ * @param {string} request.parent
4502
+ * Required. The parent, which is the section resource name that owns this
4503
+ * collection of section items. Only supports listing section items for the
4504
+ * calling user.
4505
+ *
4506
+ * When you're filtering by space, use the wildcard `-` to search across all
4507
+ * sections. For example, `users/{user}/sections/-`.
4508
+ *
4509
+ * Format: `users/{user}/sections/{section}`
4510
+ * @param {number} [request.pageSize]
4511
+ * Optional. The maximum number of section items to return. The service may
4512
+ * return fewer than this value.
4513
+ *
4514
+ * If unspecified, at most 10 section items will be returned.
4515
+ *
4516
+ * The maximum value is 100. If you use a value more than 100, it's
4517
+ * automatically changed to 100.
4518
+ *
4519
+ * Negative values return an `INVALID_ARGUMENT` error.
4520
+ * @param {string} [request.pageToken]
4521
+ * Optional. A page token, received from a previous list section items call.
4522
+ * Provide this to retrieve the subsequent page.
4523
+ *
4524
+ * When paginating, all other parameters provided should match the call that
4525
+ * provided the page token. Passing different values to the other parameters
4526
+ * might lead to unexpected results.
4527
+ * @param {string} [request.filter]
4528
+ * Optional. A query filter.
4529
+ *
4530
+ * Currently only supports filtering by space.
4531
+ *
4532
+ * For example, `space = spaces/{space}`.
4533
+ *
4534
+ * Invalid queries are rejected with an `INVALID_ARGUMENT` error.
4535
+ * @param {object} [options]
4536
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
4537
+ * @returns {Promise} - The promise which resolves to an array.
4538
+ * The first element of the array is Array of {@link protos.google.chat.v1.SectionItem|SectionItem}.
4539
+ * The client library will perform auto-pagination by default: it will call the API as many
4540
+ * times as needed and will merge results from all the pages into this array.
4541
+ * Note that it can affect your quota.
4542
+ * We recommend using `listSectionItemsAsync()`
4543
+ * method described below for async iteration which you can stop as needed.
4544
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
4545
+ * for more details and examples.
4546
+ */
4342
4547
  listSectionItems(request?: protos.google.chat.v1.IListSectionItemsRequest, options?: CallOptions): Promise<[
4343
4548
  protos.google.chat.v1.ISectionItem[],
4344
4549
  protos.google.chat.v1.IListSectionItemsRequest | null,