@google-apps/chat 0.5.0 → 0.7.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.
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import type * as gax from 'google-gax';
3
2
  import type { Callback, CallOptions, Descriptors, ClientOptions, PaginationCallback } from 'google-gax';
4
3
  import { Transform } from 'stream';
@@ -397,7 +396,7 @@ export declare class ChatServiceClient {
397
396
  * The request object that will be sent.
398
397
  * @param {string} request.name
399
398
  * Required. Resource name of the attachment, in the form
400
- * `spaces/* /messages/* /attachments/*`.
399
+ * `spaces/{space}/messages/{message}/attachments/{attachment}`.
401
400
  * @param {object} [options]
402
401
  * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
403
402
  * @returns {Promise} - The promise which resolves to an array.
@@ -464,7 +463,7 @@ export declare class ChatServiceClient {
464
463
  * @param {Object} request
465
464
  * The request object that will be sent.
466
465
  * @param {string} request.name
467
- * Required. Resource name of the space, in the form "spaces/*".
466
+ * Required. Resource name of the space, in the form `spaces/{space}`.
468
467
  *
469
468
  * Format: `spaces/{space}`
470
469
  * @param {object} [options]
@@ -546,6 +545,17 @@ export declare class ChatServiceClient {
546
545
  * you can add the user to the space by setting the `membership.member.name`
547
546
  * to `users/user@example.com` or `users/123456789`.
548
547
  *
548
+ * To specify the Google groups to add, add memberships with the
549
+ * appropriate `membership.group_member.name`. To add or invite a Google
550
+ * group, use `groups/{group}`, where `{group}` is the `id` for the group from
551
+ * the Cloud Identity Groups API. For example, you can use [Cloud Identity
552
+ * Groups lookup
553
+ * API](https://cloud.google.com/identity/docs/reference/rest/v1/groups/lookup)
554
+ * to retrieve the ID `123456789` for group email `group@example.com`, then
555
+ * you can add the group to the space by setting the
556
+ * `membership.group_member.name` to `groups/123456789`. Group email is not
557
+ * supported, and Google groups can only be added as members in named spaces.
558
+ *
549
559
  * For a named space or group chat, if the caller blocks, or is blocked
550
560
  * by some members, or doesn't have permission to add some members, then
551
561
  * those members aren't added to the created space.
@@ -607,8 +617,8 @@ export declare class ChatServiceClient {
607
617
  * Specifying an existing request ID from the same Chat app with a different
608
618
  * authenticated user returns an error.
609
619
  * @param {number[]} [request.memberships]
610
- * Optional. The Google Chat users to invite to join the space. Omit the
611
- * calling user, as they are added automatically.
620
+ * Optional. The Google Chat users or groups to invite to join the space. Omit
621
+ * the calling user, as they are added automatically.
612
622
  *
613
623
  * The set currently allows up to 20 memberships (in addition to the caller).
614
624
  *
@@ -621,6 +631,10 @@ export declare class ChatServiceClient {
621
631
  * To invite Gmail users or users from external Google Workspace domains,
622
632
  * user's email must be used for `{user}`.
623
633
  *
634
+ * For Google group membership, the `Membership.group_member` field must
635
+ * contain a `group` with `name` populated (format `groups/{group}`). You
636
+ * can only add Google groups when setting `Space.spaceType` to `SPACE`.
637
+ *
624
638
  * Optional when setting `Space.spaceType` to `SPACE`.
625
639
  *
626
640
  * Required when setting `Space.spaceType` to `GROUP_CHAT`, along with at
@@ -688,6 +702,7 @@ export declare class ChatServiceClient {
688
702
  * the display name is optional if the existing space already has the `SPACE`
689
703
  * type. Trying to update the space type in other ways results in an invalid
690
704
  * argument error).
705
+ * `space_type` is not supported with admin access.
691
706
  *
692
707
  * - `space_details`
693
708
  *
@@ -696,12 +711,27 @@ export declare class ChatServiceClient {
696
711
  * allows users to change their history
697
712
  * setting](https://support.google.com/a/answer/7664184).
698
713
  * Warning: mutually exclusive with all other field paths.)
699
- *
700
- * - Developer Preview: `access_settings.audience` (Supports changing the
701
- * [access setting](https://support.google.com/chat/answer/11971020) of a
702
- * space. If no audience is specified in the access setting, the space's
703
- * access setting is updated to restricted. Warning: mutually exclusive with
704
- * all other field paths.)
714
+ * `space_history_state` is not supported with admin access.
715
+ *
716
+ * - `access_settings.audience` (Supports changing the [access
717
+ * setting](https://support.google.com/chat/answer/11971020) of who can
718
+ * discover the space, join the space, and preview the messages in space. If
719
+ * no audience is specified in the access setting, the space's access setting
720
+ * is updated to private. Warning: mutually exclusive with all other field
721
+ * paths.)
722
+ * `access_settings.audience` is not supported with admin access.
723
+ *
724
+ * - Developer Preview: Supports changing the [permission
725
+ * settings](https://support.google.com/chat/answer/13340792) of a space,
726
+ * supported field paths
727
+ * include: `permission_settings.manage_members_and_groups`,
728
+ * `permission_settings.modify_space_details`,
729
+ * `permission_settings.toggle_history`,
730
+ * `permission_settings.use_at_mention_all`,
731
+ * `permission_settings.manage_apps`, `permission_settings.manage_webhooks`,
732
+ * `permission_settings.reply_messages`
733
+ * (Warning: mutually exclusive with all other non-permission settings field
734
+ * paths). `permission_settings` is not supported with admin access.
705
735
  * @param {object} [options]
706
736
  * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
707
737
  * @returns {Promise} - The promise which resolves to an array.
@@ -845,7 +875,8 @@ export declare class ChatServiceClient {
845
875
  * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
846
876
  *
847
877
  * To specify the member to add, set the `membership.member.name` for the
848
- * human or app member.
878
+ * human or app member, or set the `membership.group_member.name` for the
879
+ * group member.
849
880
  *
850
881
  * - To add the calling app to a space or a direct message between two human
851
882
  * users, use `users/app`. Unable to add other
@@ -859,6 +890,15 @@ export declare class ChatServiceClient {
859
890
  * the space by setting the `membership.member.name` to
860
891
  * `users/user@example.com` or `users/123456789`.
861
892
  *
893
+ * - To add or invite a Google group in a named space, use
894
+ * `groups/{group}`, where `{group}` is the `id` for the group from the Cloud
895
+ * Identity Groups API. For example, you can use [Cloud Identity Groups lookup
896
+ * API](https://cloud.google.com/identity/docs/reference/rest/v1/groups/lookup)
897
+ * to retrieve the ID `123456789` for group email `group@example.com`, then
898
+ * you can add or invite the group to a named space by setting the
899
+ * `membership.group_member.name` to `groups/123456789`. Group email is not
900
+ * supported, and Google groups can only be added as members in named spaces.
901
+ *
862
902
  * @param {Object} request
863
903
  * The request object that will be sent.
864
904
  * @param {string} request.parent
@@ -1180,6 +1220,44 @@ export declare class ChatServiceClient {
1180
1220
  ]>;
1181
1221
  getThreadReadState(request: protos.google.chat.v1.IGetThreadReadStateRequest, options: CallOptions, callback: Callback<protos.google.chat.v1.IThreadReadState, protos.google.chat.v1.IGetThreadReadStateRequest | null | undefined, {} | null | undefined>): void;
1182
1222
  getThreadReadState(request: protos.google.chat.v1.IGetThreadReadStateRequest, callback: Callback<protos.google.chat.v1.IThreadReadState, protos.google.chat.v1.IGetThreadReadStateRequest | null | undefined, {} | null | undefined>): void;
1223
+ /**
1224
+ * Returns an event from a Google Chat space. The [event
1225
+ * payload](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.spaceEvents#SpaceEvent.FIELDS.oneof_payload)
1226
+ * contains the most recent version of the resource that changed. For example,
1227
+ * if you request an event about a new message but the message was later
1228
+ * updated, the server returns the updated `Message` resource in the event
1229
+ * payload.
1230
+ *
1231
+ * Requires [user
1232
+ * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
1233
+ * To get an event, the authenticated user must be a member of the space.
1234
+ *
1235
+ * For an example, see [Get details about an
1236
+ * event from a Google Chat
1237
+ * space](https://developers.google.com/workspace/chat/get-space-event).
1238
+ *
1239
+ * @param {Object} request
1240
+ * The request object that will be sent.
1241
+ * @param {string} request.name
1242
+ * Required. The resource name of the space event.
1243
+ *
1244
+ * Format: `spaces/{space}/spaceEvents/{spaceEvent}`
1245
+ * @param {object} [options]
1246
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
1247
+ * @returns {Promise} - The promise which resolves to an array.
1248
+ * The first element of the array is an object representing {@link protos.google.chat.v1.SpaceEvent|SpaceEvent}.
1249
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
1250
+ * for more details and examples.
1251
+ * @example <caption>include:samples/generated/v1/chat_service.get_space_event.js</caption>
1252
+ * region_tag:chat_v1_generated_ChatService_GetSpaceEvent_async
1253
+ */
1254
+ getSpaceEvent(request?: protos.google.chat.v1.IGetSpaceEventRequest, options?: CallOptions): Promise<[
1255
+ protos.google.chat.v1.ISpaceEvent,
1256
+ protos.google.chat.v1.IGetSpaceEventRequest | undefined,
1257
+ {} | undefined
1258
+ ]>;
1259
+ getSpaceEvent(request: protos.google.chat.v1.IGetSpaceEventRequest, options: CallOptions, callback: Callback<protos.google.chat.v1.ISpaceEvent, protos.google.chat.v1.IGetSpaceEventRequest | null | undefined, {} | null | undefined>): void;
1260
+ getSpaceEvent(request: protos.google.chat.v1.IGetSpaceEventRequest, callback: Callback<protos.google.chat.v1.ISpaceEvent, protos.google.chat.v1.IGetSpaceEventRequest | null | undefined, {} | null | undefined>): void;
1183
1261
  /**
1184
1262
  * Lists messages in a space that the caller is a member of, including
1185
1263
  * messages from blocked members and spaces. For an example, see
@@ -1523,16 +1601,23 @@ export declare class ChatServiceClient {
1523
1601
  *
1524
1602
  * To filter by role, set `role` to `ROLE_MEMBER` or `ROLE_MANAGER`.
1525
1603
  *
1526
- * To filter by type, set `member.type` to `HUMAN` or `BOT`.
1604
+ * To filter by type, set `member.type` to `HUMAN` or `BOT`. Developer
1605
+ * Preview: You can also filter for `member.type` using the `!=` operator.
1527
1606
  *
1528
1607
  * To filter by both role and type, use the `AND` operator. To filter by
1529
1608
  * either role or type, use the `OR` operator.
1530
1609
  *
1610
+ * Either `member.type = "HUMAN"` or `member.type != "BOT"` is required
1611
+ * when `use_admin_access` is set to true. Other member type filters will be
1612
+ * rejected.
1613
+ *
1531
1614
  * For example, the following queries are valid:
1532
1615
  *
1533
1616
  * ```
1534
1617
  * role = "ROLE_MANAGER" OR role = "ROLE_MEMBER"
1535
1618
  * member.type = "HUMAN" AND role = "ROLE_MANAGER"
1619
+ *
1620
+ * member.type != "BOT"
1536
1621
  * ```
1537
1622
  *
1538
1623
  * The following queries are invalid:
@@ -1542,7 +1627,6 @@ export declare class ChatServiceClient {
1542
1627
  * role = "ROLE_MANAGER" AND role = "ROLE_MEMBER"
1543
1628
  * ```
1544
1629
  *
1545
- *
1546
1630
  * Invalid queries are rejected by the server with an `INVALID_ARGUMENT`
1547
1631
  * error.
1548
1632
  * @param {boolean} [request.showGroups]
@@ -1617,16 +1701,23 @@ export declare class ChatServiceClient {
1617
1701
  *
1618
1702
  * To filter by role, set `role` to `ROLE_MEMBER` or `ROLE_MANAGER`.
1619
1703
  *
1620
- * To filter by type, set `member.type` to `HUMAN` or `BOT`.
1704
+ * To filter by type, set `member.type` to `HUMAN` or `BOT`. Developer
1705
+ * Preview: You can also filter for `member.type` using the `!=` operator.
1621
1706
  *
1622
1707
  * To filter by both role and type, use the `AND` operator. To filter by
1623
1708
  * either role or type, use the `OR` operator.
1624
1709
  *
1710
+ * Either `member.type = "HUMAN"` or `member.type != "BOT"` is required
1711
+ * when `use_admin_access` is set to true. Other member type filters will be
1712
+ * rejected.
1713
+ *
1625
1714
  * For example, the following queries are valid:
1626
1715
  *
1627
1716
  * ```
1628
1717
  * role = "ROLE_MANAGER" OR role = "ROLE_MEMBER"
1629
1718
  * member.type = "HUMAN" AND role = "ROLE_MANAGER"
1719
+ *
1720
+ * member.type != "BOT"
1630
1721
  * ```
1631
1722
  *
1632
1723
  * The following queries are invalid:
@@ -1636,7 +1727,6 @@ export declare class ChatServiceClient {
1636
1727
  * role = "ROLE_MANAGER" AND role = "ROLE_MEMBER"
1637
1728
  * ```
1638
1729
  *
1639
- *
1640
1730
  * Invalid queries are rejected by the server with an `INVALID_ARGUMENT`
1641
1731
  * error.
1642
1732
  * @param {boolean} [request.showGroups]
@@ -1706,16 +1796,23 @@ export declare class ChatServiceClient {
1706
1796
  *
1707
1797
  * To filter by role, set `role` to `ROLE_MEMBER` or `ROLE_MANAGER`.
1708
1798
  *
1709
- * To filter by type, set `member.type` to `HUMAN` or `BOT`.
1799
+ * To filter by type, set `member.type` to `HUMAN` or `BOT`. Developer
1800
+ * Preview: You can also filter for `member.type` using the `!=` operator.
1710
1801
  *
1711
1802
  * To filter by both role and type, use the `AND` operator. To filter by
1712
1803
  * either role or type, use the `OR` operator.
1713
1804
  *
1805
+ * Either `member.type = "HUMAN"` or `member.type != "BOT"` is required
1806
+ * when `use_admin_access` is set to true. Other member type filters will be
1807
+ * rejected.
1808
+ *
1714
1809
  * For example, the following queries are valid:
1715
1810
  *
1716
1811
  * ```
1717
1812
  * role = "ROLE_MANAGER" OR role = "ROLE_MEMBER"
1718
1813
  * member.type = "HUMAN" AND role = "ROLE_MANAGER"
1814
+ *
1815
+ * member.type != "BOT"
1719
1816
  * ```
1720
1817
  *
1721
1818
  * The following queries are invalid:
@@ -1725,7 +1822,6 @@ export declare class ChatServiceClient {
1725
1822
  * role = "ROLE_MANAGER" AND role = "ROLE_MEMBER"
1726
1823
  * ```
1727
1824
  *
1728
- *
1729
1825
  * Invalid queries are rejected by the server with an `INVALID_ARGUMENT`
1730
1826
  * error.
1731
1827
  * @param {boolean} [request.showGroups]
@@ -1775,6 +1871,9 @@ export declare class ChatServiceClient {
1775
1871
  * Lists spaces visible to the caller or authenticated user. Group chats
1776
1872
  * and DMs aren't listed until the first message is sent.
1777
1873
  *
1874
+ * To list all named spaces by Google Workspace organization, use the
1875
+ * [`spaces.search()`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/search)
1876
+ * method using Workspace administrator privileges instead.
1778
1877
  *
1779
1878
  * @param {Object} request
1780
1879
  * The request object that will be sent.
@@ -2186,6 +2285,291 @@ export declare class ChatServiceClient {
2186
2285
  * region_tag:chat_v1_generated_ChatService_ListReactions_async
2187
2286
  */
2188
2287
  listReactionsAsync(request?: protos.google.chat.v1.IListReactionsRequest, options?: CallOptions): AsyncIterable<protos.google.chat.v1.IReaction>;
2288
+ /**
2289
+ * Lists events from a Google Chat space. For each event, the
2290
+ * [payload](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.spaceEvents#SpaceEvent.FIELDS.oneof_payload)
2291
+ * contains the most recent version of the Chat resource. For example, if you
2292
+ * list events about new space members, the server returns `Membership`
2293
+ * resources that contain the latest membership details. If new members were
2294
+ * removed during the requested period, the event payload contains an empty
2295
+ * `Membership` resource.
2296
+ *
2297
+ * Requires [user
2298
+ * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
2299
+ * To list events, the authenticated user must be a member of the space.
2300
+ *
2301
+ * For an example, see [List events from a Google Chat
2302
+ * space](https://developers.google.com/workspace/chat/list-space-events).
2303
+ *
2304
+ * @param {Object} request
2305
+ * The request object that will be sent.
2306
+ * @param {string} request.parent
2307
+ * Required. Resource name of the [Google Chat
2308
+ * space](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces)
2309
+ * where the events occurred.
2310
+ *
2311
+ * Format: `spaces/{space}`.
2312
+ * @param {number} request.pageSize
2313
+ * Optional. The maximum number of space events returned. The service might
2314
+ * return fewer than this value.
2315
+ *
2316
+ * Negative values return an `INVALID_ARGUMENT` error.
2317
+ * @param {string} request.pageToken
2318
+ * A page token, received from a previous list space events call. Provide this
2319
+ * to retrieve the subsequent page.
2320
+ *
2321
+ * When paginating, all other parameters provided to list space events must
2322
+ * match the call that provided the page token. Passing different values to
2323
+ * the other parameters might lead to unexpected results.
2324
+ * @param {string} request.filter
2325
+ * Required. A query filter.
2326
+ *
2327
+ * You must specify at least one event type (`event_type`)
2328
+ * using the has `:` operator. To filter by multiple event types, use the `OR`
2329
+ * operator. Omit batch event types in your filter. The request automatically
2330
+ * returns any related batch events. For example, if you filter by new
2331
+ * reactions
2332
+ * (`google.workspace.chat.reaction.v1.created`), the server also returns
2333
+ * batch new reactions events
2334
+ * (`google.workspace.chat.reaction.v1.batchCreated`). For a list of supported
2335
+ * event types, see the [`SpaceEvents` reference
2336
+ * documentation](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.spaceEvents#SpaceEvent.FIELDS.event_type).
2337
+ *
2338
+ * Optionally, you can also filter by start time (`start_time`) and
2339
+ * end time (`end_time`):
2340
+ *
2341
+ * * `start_time`: Exclusive timestamp from which to start listing space
2342
+ * events.
2343
+ * You can list events that occurred up to 28 days ago. If unspecified, lists
2344
+ * space events from the past 28 days.
2345
+ * * `end_time`: Inclusive timestamp until which space events are listed.
2346
+ * If unspecified, lists events up to the time of the request.
2347
+ *
2348
+ * To specify a start or end time, use the equals `=` operator and format in
2349
+ * [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339). To filter by both
2350
+ * `start_time` and `end_time`, use the `AND` operator.
2351
+ *
2352
+ * For example, the following queries are valid:
2353
+ *
2354
+ * ```
2355
+ * start_time="2023-08-23T19:20:33+00:00" AND
2356
+ * end_time="2023-08-23T19:21:54+00:00"
2357
+ * ```
2358
+ * ```
2359
+ * start_time="2023-08-23T19:20:33+00:00" AND
2360
+ * (event_types:"google.workspace.chat.space.v1.updated" OR
2361
+ * event_types:"google.workspace.chat.message.v1.created")
2362
+ * ```
2363
+ *
2364
+ * The following queries are invalid:
2365
+ *
2366
+ * ```
2367
+ * start_time="2023-08-23T19:20:33+00:00" OR
2368
+ * end_time="2023-08-23T19:21:54+00:00"
2369
+ * ```
2370
+ * ```
2371
+ * event_types:"google.workspace.chat.space.v1.updated" AND
2372
+ * event_types:"google.workspace.chat.message.v1.created"
2373
+ * ```
2374
+ *
2375
+ * Invalid queries are rejected by the server with an `INVALID_ARGUMENT`
2376
+ * error.
2377
+ * @param {object} [options]
2378
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
2379
+ * @returns {Promise} - The promise which resolves to an array.
2380
+ * The first element of the array is Array of {@link protos.google.chat.v1.SpaceEvent|SpaceEvent}.
2381
+ * The client library will perform auto-pagination by default: it will call the API as many
2382
+ * times as needed and will merge results from all the pages into this array.
2383
+ * Note that it can affect your quota.
2384
+ * We recommend using `listSpaceEventsAsync()`
2385
+ * method described below for async iteration which you can stop as needed.
2386
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
2387
+ * for more details and examples.
2388
+ */
2389
+ listSpaceEvents(request?: protos.google.chat.v1.IListSpaceEventsRequest, options?: CallOptions): Promise<[
2390
+ protos.google.chat.v1.ISpaceEvent[],
2391
+ protos.google.chat.v1.IListSpaceEventsRequest | null,
2392
+ protos.google.chat.v1.IListSpaceEventsResponse
2393
+ ]>;
2394
+ listSpaceEvents(request: protos.google.chat.v1.IListSpaceEventsRequest, options: CallOptions, callback: PaginationCallback<protos.google.chat.v1.IListSpaceEventsRequest, protos.google.chat.v1.IListSpaceEventsResponse | null | undefined, protos.google.chat.v1.ISpaceEvent>): void;
2395
+ listSpaceEvents(request: protos.google.chat.v1.IListSpaceEventsRequest, callback: PaginationCallback<protos.google.chat.v1.IListSpaceEventsRequest, protos.google.chat.v1.IListSpaceEventsResponse | null | undefined, protos.google.chat.v1.ISpaceEvent>): void;
2396
+ /**
2397
+ * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object.
2398
+ * @param {Object} request
2399
+ * The request object that will be sent.
2400
+ * @param {string} request.parent
2401
+ * Required. Resource name of the [Google Chat
2402
+ * space](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces)
2403
+ * where the events occurred.
2404
+ *
2405
+ * Format: `spaces/{space}`.
2406
+ * @param {number} request.pageSize
2407
+ * Optional. The maximum number of space events returned. The service might
2408
+ * return fewer than this value.
2409
+ *
2410
+ * Negative values return an `INVALID_ARGUMENT` error.
2411
+ * @param {string} request.pageToken
2412
+ * A page token, received from a previous list space events call. Provide this
2413
+ * to retrieve the subsequent page.
2414
+ *
2415
+ * When paginating, all other parameters provided to list space events must
2416
+ * match the call that provided the page token. Passing different values to
2417
+ * the other parameters might lead to unexpected results.
2418
+ * @param {string} request.filter
2419
+ * Required. A query filter.
2420
+ *
2421
+ * You must specify at least one event type (`event_type`)
2422
+ * using the has `:` operator. To filter by multiple event types, use the `OR`
2423
+ * operator. Omit batch event types in your filter. The request automatically
2424
+ * returns any related batch events. For example, if you filter by new
2425
+ * reactions
2426
+ * (`google.workspace.chat.reaction.v1.created`), the server also returns
2427
+ * batch new reactions events
2428
+ * (`google.workspace.chat.reaction.v1.batchCreated`). For a list of supported
2429
+ * event types, see the [`SpaceEvents` reference
2430
+ * documentation](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.spaceEvents#SpaceEvent.FIELDS.event_type).
2431
+ *
2432
+ * Optionally, you can also filter by start time (`start_time`) and
2433
+ * end time (`end_time`):
2434
+ *
2435
+ * * `start_time`: Exclusive timestamp from which to start listing space
2436
+ * events.
2437
+ * You can list events that occurred up to 28 days ago. If unspecified, lists
2438
+ * space events from the past 28 days.
2439
+ * * `end_time`: Inclusive timestamp until which space events are listed.
2440
+ * If unspecified, lists events up to the time of the request.
2441
+ *
2442
+ * To specify a start or end time, use the equals `=` operator and format in
2443
+ * [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339). To filter by both
2444
+ * `start_time` and `end_time`, use the `AND` operator.
2445
+ *
2446
+ * For example, the following queries are valid:
2447
+ *
2448
+ * ```
2449
+ * start_time="2023-08-23T19:20:33+00:00" AND
2450
+ * end_time="2023-08-23T19:21:54+00:00"
2451
+ * ```
2452
+ * ```
2453
+ * start_time="2023-08-23T19:20:33+00:00" AND
2454
+ * (event_types:"google.workspace.chat.space.v1.updated" OR
2455
+ * event_types:"google.workspace.chat.message.v1.created")
2456
+ * ```
2457
+ *
2458
+ * The following queries are invalid:
2459
+ *
2460
+ * ```
2461
+ * start_time="2023-08-23T19:20:33+00:00" OR
2462
+ * end_time="2023-08-23T19:21:54+00:00"
2463
+ * ```
2464
+ * ```
2465
+ * event_types:"google.workspace.chat.space.v1.updated" AND
2466
+ * event_types:"google.workspace.chat.message.v1.created"
2467
+ * ```
2468
+ *
2469
+ * Invalid queries are rejected by the server with an `INVALID_ARGUMENT`
2470
+ * error.
2471
+ * @param {object} [options]
2472
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
2473
+ * @returns {Stream}
2474
+ * An object stream which emits an object representing {@link protos.google.chat.v1.SpaceEvent|SpaceEvent} on 'data' event.
2475
+ * The client library will perform auto-pagination by default: it will call the API as many
2476
+ * times as needed. Note that it can affect your quota.
2477
+ * We recommend using `listSpaceEventsAsync()`
2478
+ * method described below for async iteration which you can stop as needed.
2479
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
2480
+ * for more details and examples.
2481
+ */
2482
+ listSpaceEventsStream(request?: protos.google.chat.v1.IListSpaceEventsRequest, options?: CallOptions): Transform;
2483
+ /**
2484
+ * Equivalent to `listSpaceEvents`, but returns an iterable object.
2485
+ *
2486
+ * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
2487
+ * @param {Object} request
2488
+ * The request object that will be sent.
2489
+ * @param {string} request.parent
2490
+ * Required. Resource name of the [Google Chat
2491
+ * space](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces)
2492
+ * where the events occurred.
2493
+ *
2494
+ * Format: `spaces/{space}`.
2495
+ * @param {number} request.pageSize
2496
+ * Optional. The maximum number of space events returned. The service might
2497
+ * return fewer than this value.
2498
+ *
2499
+ * Negative values return an `INVALID_ARGUMENT` error.
2500
+ * @param {string} request.pageToken
2501
+ * A page token, received from a previous list space events call. Provide this
2502
+ * to retrieve the subsequent page.
2503
+ *
2504
+ * When paginating, all other parameters provided to list space events must
2505
+ * match the call that provided the page token. Passing different values to
2506
+ * the other parameters might lead to unexpected results.
2507
+ * @param {string} request.filter
2508
+ * Required. A query filter.
2509
+ *
2510
+ * You must specify at least one event type (`event_type`)
2511
+ * using the has `:` operator. To filter by multiple event types, use the `OR`
2512
+ * operator. Omit batch event types in your filter. The request automatically
2513
+ * returns any related batch events. For example, if you filter by new
2514
+ * reactions
2515
+ * (`google.workspace.chat.reaction.v1.created`), the server also returns
2516
+ * batch new reactions events
2517
+ * (`google.workspace.chat.reaction.v1.batchCreated`). For a list of supported
2518
+ * event types, see the [`SpaceEvents` reference
2519
+ * documentation](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.spaceEvents#SpaceEvent.FIELDS.event_type).
2520
+ *
2521
+ * Optionally, you can also filter by start time (`start_time`) and
2522
+ * end time (`end_time`):
2523
+ *
2524
+ * * `start_time`: Exclusive timestamp from which to start listing space
2525
+ * events.
2526
+ * You can list events that occurred up to 28 days ago. If unspecified, lists
2527
+ * space events from the past 28 days.
2528
+ * * `end_time`: Inclusive timestamp until which space events are listed.
2529
+ * If unspecified, lists events up to the time of the request.
2530
+ *
2531
+ * To specify a start or end time, use the equals `=` operator and format in
2532
+ * [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339). To filter by both
2533
+ * `start_time` and `end_time`, use the `AND` operator.
2534
+ *
2535
+ * For example, the following queries are valid:
2536
+ *
2537
+ * ```
2538
+ * start_time="2023-08-23T19:20:33+00:00" AND
2539
+ * end_time="2023-08-23T19:21:54+00:00"
2540
+ * ```
2541
+ * ```
2542
+ * start_time="2023-08-23T19:20:33+00:00" AND
2543
+ * (event_types:"google.workspace.chat.space.v1.updated" OR
2544
+ * event_types:"google.workspace.chat.message.v1.created")
2545
+ * ```
2546
+ *
2547
+ * The following queries are invalid:
2548
+ *
2549
+ * ```
2550
+ * start_time="2023-08-23T19:20:33+00:00" OR
2551
+ * end_time="2023-08-23T19:21:54+00:00"
2552
+ * ```
2553
+ * ```
2554
+ * event_types:"google.workspace.chat.space.v1.updated" AND
2555
+ * event_types:"google.workspace.chat.message.v1.created"
2556
+ * ```
2557
+ *
2558
+ * Invalid queries are rejected by the server with an `INVALID_ARGUMENT`
2559
+ * error.
2560
+ * @param {object} [options]
2561
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
2562
+ * @returns {Object}
2563
+ * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
2564
+ * When you iterate the returned iterable, each element will be an object representing
2565
+ * {@link protos.google.chat.v1.SpaceEvent|SpaceEvent}. The API will be called under the hood as needed, once per the page,
2566
+ * so you can stop the iteration when you don't need more results.
2567
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
2568
+ * for more details and examples.
2569
+ * @example <caption>include:samples/generated/v1/chat_service.list_space_events.js</caption>
2570
+ * region_tag:chat_v1_generated_ChatService_ListSpaceEvents_async
2571
+ */
2572
+ listSpaceEventsAsync(request?: protos.google.chat.v1.IListSpaceEventsRequest, options?: CallOptions): AsyncIterable<protos.google.chat.v1.ISpaceEvent>;
2189
2573
  /**
2190
2574
  * Return a fully-qualified attachment resource name string.
2191
2575
  *
@@ -2348,6 +2732,30 @@ export declare class ChatServiceClient {
2348
2732
  * @returns {string} A string representing the space.
2349
2733
  */
2350
2734
  matchSpaceFromSpaceName(spaceName: string): string | number;
2735
+ /**
2736
+ * Return a fully-qualified spaceEvent resource name string.
2737
+ *
2738
+ * @param {string} space
2739
+ * @param {string} space_event
2740
+ * @returns {string} Resource name string.
2741
+ */
2742
+ spaceEventPath(space: string, spaceEvent: string): string;
2743
+ /**
2744
+ * Parse the space from SpaceEvent resource.
2745
+ *
2746
+ * @param {string} spaceEventName
2747
+ * A fully-qualified path representing SpaceEvent resource.
2748
+ * @returns {string} A string representing the space.
2749
+ */
2750
+ matchSpaceFromSpaceEventName(spaceEventName: string): string | number;
2751
+ /**
2752
+ * Parse the space_event from SpaceEvent resource.
2753
+ *
2754
+ * @param {string} spaceEventName
2755
+ * A fully-qualified path representing SpaceEvent resource.
2756
+ * @returns {string} A string representing the space_event.
2757
+ */
2758
+ matchSpaceEventFromSpaceEventName(spaceEventName: string): string | number;
2351
2759
  /**
2352
2760
  * Return a fully-qualified spaceReadState resource name string.
2353
2761
  *