@google-apps/chat 0.25.0 → 0.26.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.
@@ -3631,10 +3631,220 @@
3631
3631
  }
3632
3632
  }
3633
3633
  },
3634
+ "Audience": {
3635
+ "fields": {
3636
+ "name": {
3637
+ "type": "string",
3638
+ "id": 1
3639
+ }
3640
+ }
3641
+ },
3642
+ "Availability": {
3643
+ "options": {
3644
+ "(google.api.resource).type": "chat.googleapis.com/Availability",
3645
+ "(google.api.resource).pattern": "users/{user}/availability",
3646
+ "(google.api.resource).plural": "availabilities",
3647
+ "(google.api.resource).singular": "availability"
3648
+ },
3649
+ "oneofs": {
3650
+ "stateMetadata": {
3651
+ "oneof": [
3652
+ "doNotDisturbMetadata"
3653
+ ]
3654
+ }
3655
+ },
3656
+ "fields": {
3657
+ "name": {
3658
+ "type": "string",
3659
+ "id": 1,
3660
+ "options": {
3661
+ "(google.api.field_behavior)": "IDENTIFIER"
3662
+ }
3663
+ },
3664
+ "state": {
3665
+ "type": "State",
3666
+ "id": 2,
3667
+ "options": {
3668
+ "(google.api.field_behavior)": "OUTPUT_ONLY"
3669
+ }
3670
+ },
3671
+ "doNotDisturbMetadata": {
3672
+ "type": "DoNotDisturbMetadata",
3673
+ "id": 3,
3674
+ "options": {
3675
+ "(google.api.field_behavior)": "OUTPUT_ONLY"
3676
+ }
3677
+ },
3678
+ "customStatus": {
3679
+ "type": "CustomStatus",
3680
+ "id": 4,
3681
+ "options": {
3682
+ "(google.api.field_behavior)": "OPTIONAL"
3683
+ }
3684
+ }
3685
+ },
3686
+ "nested": {
3687
+ "State": {
3688
+ "values": {
3689
+ "STATE_UNSPECIFIED": 0,
3690
+ "ACTIVE": 1,
3691
+ "IDLE": 2,
3692
+ "AWAY": 3,
3693
+ "DO_NOT_DISTURB": 4
3694
+ }
3695
+ }
3696
+ }
3697
+ },
3698
+ "CustomStatus": {
3699
+ "oneofs": {
3700
+ "expiration": {
3701
+ "oneof": [
3702
+ "expireTime",
3703
+ "ttl"
3704
+ ]
3705
+ }
3706
+ },
3707
+ "fields": {
3708
+ "text": {
3709
+ "type": "string",
3710
+ "id": 1,
3711
+ "options": {
3712
+ "(google.api.field_behavior)": "REQUIRED"
3713
+ }
3714
+ },
3715
+ "emoji": {
3716
+ "type": "Emoji",
3717
+ "id": 2,
3718
+ "options": {
3719
+ "(google.api.field_behavior)": "REQUIRED"
3720
+ }
3721
+ },
3722
+ "expireTime": {
3723
+ "type": "google.protobuf.Timestamp",
3724
+ "id": 3
3725
+ },
3726
+ "ttl": {
3727
+ "type": "google.protobuf.Duration",
3728
+ "id": 4,
3729
+ "options": {
3730
+ "(google.api.field_behavior)": "INPUT_ONLY"
3731
+ }
3732
+ }
3733
+ }
3734
+ },
3735
+ "DoNotDisturbMetadata": {
3736
+ "fields": {
3737
+ "expirationTime": {
3738
+ "type": "google.protobuf.Timestamp",
3739
+ "id": 1,
3740
+ "options": {
3741
+ "(google.api.field_behavior)": "OUTPUT_ONLY"
3742
+ }
3743
+ }
3744
+ }
3745
+ },
3746
+ "GetAvailabilityRequest": {
3747
+ "fields": {
3748
+ "name": {
3749
+ "type": "string",
3750
+ "id": 1,
3751
+ "options": {
3752
+ "(google.api.field_behavior)": "REQUIRED",
3753
+ "(google.api.resource_reference).type": "chat.googleapis.com/Availability"
3754
+ }
3755
+ }
3756
+ }
3757
+ },
3758
+ "UpdateAvailabilityRequest": {
3759
+ "fields": {
3760
+ "availability": {
3761
+ "type": "Availability",
3762
+ "id": 1,
3763
+ "options": {
3764
+ "(google.api.field_behavior)": "REQUIRED"
3765
+ }
3766
+ },
3767
+ "updateMask": {
3768
+ "type": "google.protobuf.FieldMask",
3769
+ "id": 2,
3770
+ "options": {
3771
+ "(google.api.field_behavior)": "REQUIRED"
3772
+ }
3773
+ }
3774
+ }
3775
+ },
3776
+ "MarkAsActiveRequest": {
3777
+ "oneofs": {
3778
+ "expiration": {
3779
+ "oneof": [
3780
+ "expireTime",
3781
+ "ttl"
3782
+ ]
3783
+ }
3784
+ },
3785
+ "fields": {
3786
+ "name": {
3787
+ "type": "string",
3788
+ "id": 1,
3789
+ "options": {
3790
+ "(google.api.field_behavior)": "REQUIRED",
3791
+ "(google.api.resource_reference).type": "chat.googleapis.com/Availability"
3792
+ }
3793
+ },
3794
+ "expireTime": {
3795
+ "type": "google.protobuf.Timestamp",
3796
+ "id": 2
3797
+ },
3798
+ "ttl": {
3799
+ "type": "google.protobuf.Duration",
3800
+ "id": 3
3801
+ }
3802
+ }
3803
+ },
3804
+ "MarkAsAwayRequest": {
3805
+ "fields": {
3806
+ "name": {
3807
+ "type": "string",
3808
+ "id": 1,
3809
+ "options": {
3810
+ "(google.api.field_behavior)": "REQUIRED",
3811
+ "(google.api.resource_reference).type": "chat.googleapis.com/Availability"
3812
+ }
3813
+ }
3814
+ }
3815
+ },
3816
+ "MarkAsDoNotDisturbRequest": {
3817
+ "oneofs": {
3818
+ "expiration": {
3819
+ "oneof": [
3820
+ "expireTime",
3821
+ "ttl"
3822
+ ]
3823
+ }
3824
+ },
3825
+ "fields": {
3826
+ "name": {
3827
+ "type": "string",
3828
+ "id": 1,
3829
+ "options": {
3830
+ "(google.api.field_behavior)": "REQUIRED",
3831
+ "(google.api.resource_reference).type": "chat.googleapis.com/Availability"
3832
+ }
3833
+ },
3834
+ "expireTime": {
3835
+ "type": "google.protobuf.Timestamp",
3836
+ "id": 2
3837
+ },
3838
+ "ttl": {
3839
+ "type": "google.protobuf.Duration",
3840
+ "id": 3
3841
+ }
3842
+ }
3843
+ },
3634
3844
  "ChatService": {
3635
3845
  "options": {
3636
3846
  "(google.api.default_host)": "chat.googleapis.com",
3637
- "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/chat.admin.delete,https://www.googleapis.com/auth/chat.admin.memberships,https://www.googleapis.com/auth/chat.admin.memberships.readonly,https://www.googleapis.com/auth/chat.admin.spaces,https://www.googleapis.com/auth/chat.admin.spaces.readonly,https://www.googleapis.com/auth/chat.app.delete,https://www.googleapis.com/auth/chat.app.memberships,https://www.googleapis.com/auth/chat.app.memberships.readonly,https://www.googleapis.com/auth/chat.app.messages.readonly,https://www.googleapis.com/auth/chat.app.spaces,https://www.googleapis.com/auth/chat.app.spaces.create,https://www.googleapis.com/auth/chat.app.spaces.readonly,https://www.googleapis.com/auth/chat.bot,https://www.googleapis.com/auth/chat.customemojis,https://www.googleapis.com/auth/chat.customemojis.readonly,https://www.googleapis.com/auth/chat.delete,https://www.googleapis.com/auth/chat.import,https://www.googleapis.com/auth/chat.memberships,https://www.googleapis.com/auth/chat.memberships.app,https://www.googleapis.com/auth/chat.memberships.readonly,https://www.googleapis.com/auth/chat.messages,https://www.googleapis.com/auth/chat.messages.create,https://www.googleapis.com/auth/chat.messages.reactions,https://www.googleapis.com/auth/chat.messages.reactions.create,https://www.googleapis.com/auth/chat.messages.reactions.readonly,https://www.googleapis.com/auth/chat.messages.readonly,https://www.googleapis.com/auth/chat.spaces,https://www.googleapis.com/auth/chat.spaces.create,https://www.googleapis.com/auth/chat.spaces.readonly,https://www.googleapis.com/auth/chat.users.readstate,https://www.googleapis.com/auth/chat.users.readstate.readonly,https://www.googleapis.com/auth/chat.users.sections,https://www.googleapis.com/auth/chat.users.sections.readonly,https://www.googleapis.com/auth/chat.users.spacesettings"
3847
+ "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/chat.admin.delete,https://www.googleapis.com/auth/chat.admin.memberships,https://www.googleapis.com/auth/chat.admin.memberships.readonly,https://www.googleapis.com/auth/chat.admin.spaces,https://www.googleapis.com/auth/chat.admin.spaces.readonly,https://www.googleapis.com/auth/chat.app.delete,https://www.googleapis.com/auth/chat.app.memberships,https://www.googleapis.com/auth/chat.app.memberships.readonly,https://www.googleapis.com/auth/chat.app.messages.readonly,https://www.googleapis.com/auth/chat.app.spaces,https://www.googleapis.com/auth/chat.app.spaces.create,https://www.googleapis.com/auth/chat.app.spaces.readonly,https://www.googleapis.com/auth/chat.bot,https://www.googleapis.com/auth/chat.customemojis,https://www.googleapis.com/auth/chat.customemojis.readonly,https://www.googleapis.com/auth/chat.delete,https://www.googleapis.com/auth/chat.import,https://www.googleapis.com/auth/chat.memberships,https://www.googleapis.com/auth/chat.memberships.app,https://www.googleapis.com/auth/chat.memberships.readonly,https://www.googleapis.com/auth/chat.messages,https://www.googleapis.com/auth/chat.messages.create,https://www.googleapis.com/auth/chat.messages.reactions,https://www.googleapis.com/auth/chat.messages.reactions.create,https://www.googleapis.com/auth/chat.messages.reactions.readonly,https://www.googleapis.com/auth/chat.messages.readonly,https://www.googleapis.com/auth/chat.spaces,https://www.googleapis.com/auth/chat.spaces.create,https://www.googleapis.com/auth/chat.spaces.readonly,https://www.googleapis.com/auth/chat.users.availability,https://www.googleapis.com/auth/chat.users.availability.readonly,https://www.googleapis.com/auth/chat.users.readstate,https://www.googleapis.com/auth/chat.users.readstate.readonly,https://www.googleapis.com/auth/chat.users.sections,https://www.googleapis.com/auth/chat.users.sections.readonly,https://www.googleapis.com/auth/chat.users.spacesettings"
3638
3848
  },
3639
3849
  "methods": {
3640
3850
  "CreateMessage": {
@@ -4223,6 +4433,92 @@
4223
4433
  }
4224
4434
  ]
4225
4435
  },
4436
+ "GetAvailability": {
4437
+ "requestType": "GetAvailabilityRequest",
4438
+ "responseType": "Availability",
4439
+ "options": {
4440
+ "(google.api.http).get": "/v1/{name=users/*/availability}",
4441
+ "(google.api.method_signature)": "name"
4442
+ },
4443
+ "parsedOptions": [
4444
+ {
4445
+ "(google.api.http)": {
4446
+ "get": "/v1/{name=users/*/availability}"
4447
+ }
4448
+ },
4449
+ {
4450
+ "(google.api.method_signature)": "name"
4451
+ }
4452
+ ]
4453
+ },
4454
+ "MarkAsActive": {
4455
+ "requestType": "MarkAsActiveRequest",
4456
+ "responseType": "Availability",
4457
+ "options": {
4458
+ "(google.api.http).post": "/v1/{name=users/*/availability}:markAsActive",
4459
+ "(google.api.http).body": "*"
4460
+ },
4461
+ "parsedOptions": [
4462
+ {
4463
+ "(google.api.http)": {
4464
+ "post": "/v1/{name=users/*/availability}:markAsActive",
4465
+ "body": "*"
4466
+ }
4467
+ }
4468
+ ]
4469
+ },
4470
+ "MarkAsAway": {
4471
+ "requestType": "MarkAsAwayRequest",
4472
+ "responseType": "Availability",
4473
+ "options": {
4474
+ "(google.api.http).post": "/v1/{name=users/*/availability}:markAsAway",
4475
+ "(google.api.http).body": "*"
4476
+ },
4477
+ "parsedOptions": [
4478
+ {
4479
+ "(google.api.http)": {
4480
+ "post": "/v1/{name=users/*/availability}:markAsAway",
4481
+ "body": "*"
4482
+ }
4483
+ }
4484
+ ]
4485
+ },
4486
+ "MarkAsDoNotDisturb": {
4487
+ "requestType": "MarkAsDoNotDisturbRequest",
4488
+ "responseType": "Availability",
4489
+ "options": {
4490
+ "(google.api.http).post": "/v1/{name=users/*/availability}:markAsDoNotDisturb",
4491
+ "(google.api.http).body": "*"
4492
+ },
4493
+ "parsedOptions": [
4494
+ {
4495
+ "(google.api.http)": {
4496
+ "post": "/v1/{name=users/*/availability}:markAsDoNotDisturb",
4497
+ "body": "*"
4498
+ }
4499
+ }
4500
+ ]
4501
+ },
4502
+ "UpdateAvailability": {
4503
+ "requestType": "UpdateAvailabilityRequest",
4504
+ "responseType": "Availability",
4505
+ "options": {
4506
+ "(google.api.http).patch": "/v1/{availability.name=users/*/availability}",
4507
+ "(google.api.http).body": "availability",
4508
+ "(google.api.method_signature)": "availability,update_mask"
4509
+ },
4510
+ "parsedOptions": [
4511
+ {
4512
+ "(google.api.http)": {
4513
+ "patch": "/v1/{availability.name=users/*/availability}",
4514
+ "body": "availability"
4515
+ }
4516
+ },
4517
+ {
4518
+ "(google.api.method_signature)": "availability,update_mask"
4519
+ }
4520
+ ]
4521
+ },
4226
4522
  "GetSpaceEvent": {
4227
4523
  "requestType": "GetSpaceEventRequest",
4228
4524
  "responseType": "SpaceEvent",
@@ -5983,6 +6279,13 @@
5983
6279
  "options": {
5984
6280
  "(google.api.field_behavior)": "OPTIONAL"
5985
6281
  }
6282
+ },
6283
+ "accessPermissionSettings": {
6284
+ "type": "AccessPermissionSettings",
6285
+ "id": 5,
6286
+ "options": {
6287
+ "(google.api.field_behavior)": "OPTIONAL"
6288
+ }
5986
6289
  }
5987
6290
  },
5988
6291
  "nested": {
@@ -5995,6 +6298,51 @@
5995
6298
  }
5996
6299
  }
5997
6300
  },
6301
+ "AccessPermissionSettings": {
6302
+ "fields": {
6303
+ "discoverSpaceSetting": {
6304
+ "type": "AccessPermissionSetting",
6305
+ "id": 1,
6306
+ "options": {
6307
+ "(google.api.field_behavior)": "OPTIONAL"
6308
+ }
6309
+ },
6310
+ "joinSpaceSetting": {
6311
+ "type": "AccessPermissionSetting",
6312
+ "id": 2,
6313
+ "options": {
6314
+ "(google.api.field_behavior)": "OPTIONAL"
6315
+ }
6316
+ }
6317
+ }
6318
+ },
6319
+ "AccessPermissionSetting": {
6320
+ "fields": {
6321
+ "principals": {
6322
+ "rule": "repeated",
6323
+ "type": "Principal",
6324
+ "id": 1,
6325
+ "options": {
6326
+ "(google.api.field_behavior)": "UNORDERED_LIST"
6327
+ }
6328
+ }
6329
+ }
6330
+ },
6331
+ "Principal": {
6332
+ "oneofs": {
6333
+ "principalType": {
6334
+ "oneof": [
6335
+ "audience"
6336
+ ]
6337
+ }
6338
+ },
6339
+ "fields": {
6340
+ "audience": {
6341
+ "type": "Audience",
6342
+ "id": 1
6343
+ }
6344
+ }
6345
+ },
5998
6346
  "PredefinedPermissionSettings": {
5999
6347
  "values": {
6000
6348
  "PREDEFINED_PERMISSION_SETTINGS_UNSPECIFIED": 0,
@@ -934,6 +934,24 @@ export declare class ChatServiceClient {
934
934
  * users](https://developers.google.com/workspace/chat/space-target-audience).
935
935
  * `access_settings.audience` is not supported with `useAdminAccess`.
936
936
  *
937
+ * `access_settings.access_permission_settings`: Updates the [access
938
+ * permission
939
+ * settings](https://support.google.com/chat/answer/11971020) of who can
940
+ * discover and join the space where `spaceType` field is `SPACE`. Principals
941
+ * allowed to join the space must also be allowed to discover it. To update
942
+ * access permission settings for a space, the authenticating user must be a
943
+ * space manager or assistant manager and omit all other field masks in the
944
+ * request. You can't update this field if the space is in [import
945
+ * mode](https://developers.google.com/workspace/chat/import-data-overview).
946
+ * To learn more, see [Make a space discoverable to specific
947
+ * users](https://developers.google.com/workspace/chat/space-target-audience).
948
+ * `access_settings.access_permission_settings` is not supported with
949
+ * `useAdminAccess`.
950
+ * The supported field masks include:
951
+ *
952
+ * - `access_settings.access_permission_settings.discoverSpaceSetting`
953
+ * - `access_settings.access_permission_settings.joinSpaceSetting`
954
+ *
937
955
  * `permission_settings`: Supports changing the
938
956
  * [permission settings](https://support.google.com/chat/answer/13340792)
939
957
  * of a space.
@@ -1768,6 +1786,224 @@ export declare class ChatServiceClient {
1768
1786
  ]>;
1769
1787
  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;
1770
1788
  getThreadReadState(request: protos.google.chat.v1.IGetThreadReadStateRequest, callback: Callback<protos.google.chat.v1.IThreadReadState, protos.google.chat.v1.IGetThreadReadStateRequest | null | undefined, {} | null | undefined>): void;
1789
+ /**
1790
+ * Returns availability information for a human user in Google Chat. For
1791
+ * example, this can be used to check if a user is online or away, or to
1792
+ * retrieve their custom status message.
1793
+ *
1794
+ * This method only retrieves the authenticated user's availability.
1795
+ *
1796
+ * Requires [user
1797
+ * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
1798
+ * with one of the following [authorization
1799
+ * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
1800
+ *
1801
+ * - `https://www.googleapis.com/auth/chat.users.availability.readonly`
1802
+ * - `https://www.googleapis.com/auth/chat.users.availability`
1803
+ *
1804
+ * @param {Object} request
1805
+ * The request object that will be sent.
1806
+ * @param {string} request.name
1807
+ * Required. The resource name of the availability to retrieve.
1808
+ *
1809
+ * Format: users/{user}/availability
1810
+ *
1811
+ * `{user}` is the id for the Person in the People API or Admin SDK directory
1812
+ * API. For example, `users/123456789`.
1813
+ *
1814
+ * The user's email address or `me` can also be used as an alias to refer to
1815
+ * the caller. For example, `users/user@example.com` or `users/me`.
1816
+ * @param {object} [options]
1817
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
1818
+ * @returns {Promise} - The promise which resolves to an array.
1819
+ * The first element of the array is an object representing {@link protos.google.chat.v1.Availability|Availability}.
1820
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
1821
+ * for more details and examples.
1822
+ * @example <caption>include:samples/generated/v1/chat_service.get_availability.js</caption>
1823
+ * region_tag:chat_v1_generated_ChatService_GetAvailability_async
1824
+ */
1825
+ getAvailability(request?: protos.google.chat.v1.IGetAvailabilityRequest, options?: CallOptions): Promise<[
1826
+ protos.google.chat.v1.IAvailability,
1827
+ protos.google.chat.v1.IGetAvailabilityRequest | undefined,
1828
+ {} | undefined
1829
+ ]>;
1830
+ getAvailability(request: protos.google.chat.v1.IGetAvailabilityRequest, options: CallOptions, callback: Callback<protos.google.chat.v1.IAvailability, protos.google.chat.v1.IGetAvailabilityRequest | null | undefined, {} | null | undefined>): void;
1831
+ getAvailability(request: protos.google.chat.v1.IGetAvailabilityRequest, callback: Callback<protos.google.chat.v1.IAvailability, protos.google.chat.v1.IGetAvailabilityRequest | null | undefined, {} | null | undefined>): void;
1832
+ /**
1833
+ * Marks user as `ACTIVE` in Google Chat.
1834
+ *
1835
+ * Sets the user's availability state to `ACTIVE`. The `ACTIVE` state
1836
+ * lasts until the specified expiration, at which point the user's state
1837
+ * becomes `AWAY`. Note that if the user is actively using Chat, the `ACTIVE`
1838
+ * state duration may extend beyond the provided expiration.
1839
+ *
1840
+ * This method only updates the authenticated user's availability.
1841
+ *
1842
+ * Requires [user
1843
+ * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
1844
+ * with [authorization
1845
+ * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
1846
+ *
1847
+ * - `https://www.googleapis.com/auth/chat.users.availability`
1848
+ *
1849
+ * @param {Object} request
1850
+ * The request object that will be sent.
1851
+ * @param {string} request.name
1852
+ * Required. The resource name of the availability to mark as active.
1853
+ * Format: users/{user}/availability
1854
+ *
1855
+ * `{user}` is the id for the Person in the People API or Admin SDK directory
1856
+ * API. For example, `users/123456789`.
1857
+ *
1858
+ * The user's email address or `me` can also be used as an alias to refer to
1859
+ * the caller. For example, `users/user@example.com` or `users/me`.
1860
+ * @param {google.protobuf.Timestamp} request.expireTime
1861
+ * The absolute timestamp when the ACTIVE state expires.
1862
+ * @param {google.protobuf.Duration} request.ttl
1863
+ * The duration from the current time until the ACTIVE state expires.
1864
+ * Using a short TTL can effectively reset the user's state to be based
1865
+ * on activity after this brief duration.
1866
+ * @param {object} [options]
1867
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
1868
+ * @returns {Promise} - The promise which resolves to an array.
1869
+ * The first element of the array is an object representing {@link protos.google.chat.v1.Availability|Availability}.
1870
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
1871
+ * for more details and examples.
1872
+ * @example <caption>include:samples/generated/v1/chat_service.mark_as_active.js</caption>
1873
+ * region_tag:chat_v1_generated_ChatService_MarkAsActive_async
1874
+ */
1875
+ markAsActive(request?: protos.google.chat.v1.IMarkAsActiveRequest, options?: CallOptions): Promise<[
1876
+ protos.google.chat.v1.IAvailability,
1877
+ protos.google.chat.v1.IMarkAsActiveRequest | undefined,
1878
+ {} | undefined
1879
+ ]>;
1880
+ markAsActive(request: protos.google.chat.v1.IMarkAsActiveRequest, options: CallOptions, callback: Callback<protos.google.chat.v1.IAvailability, protos.google.chat.v1.IMarkAsActiveRequest | null | undefined, {} | null | undefined>): void;
1881
+ markAsActive(request: protos.google.chat.v1.IMarkAsActiveRequest, callback: Callback<protos.google.chat.v1.IAvailability, protos.google.chat.v1.IMarkAsActiveRequest | null | undefined, {} | null | undefined>): void;
1882
+ /**
1883
+ * Marks user as `AWAY` in Google Chat.
1884
+ *
1885
+ * Sets the user's state to away and is not affected by the user's
1886
+ * activity.
1887
+ *
1888
+ * This method only updates the authenticated user's availability.
1889
+ *
1890
+ * Requires [user
1891
+ * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
1892
+ * with [authorization
1893
+ * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
1894
+ *
1895
+ * - `https://www.googleapis.com/auth/chat.users.availability`
1896
+ *
1897
+ * @param {Object} request
1898
+ * The request object that will be sent.
1899
+ * @param {string} request.name
1900
+ * Required. The resource name of the availability to mark as away.
1901
+ * Format: users/{user}/availability
1902
+ *
1903
+ * `{user}` is the id for the Person in the People API or Admin SDK directory
1904
+ * API. For example, `users/123456789`.
1905
+ *
1906
+ * The user's email address or `me` can also be used as an alias to refer to
1907
+ * the caller. For example, `users/user@example.com` or `users/me`.
1908
+ * @param {object} [options]
1909
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
1910
+ * @returns {Promise} - The promise which resolves to an array.
1911
+ * The first element of the array is an object representing {@link protos.google.chat.v1.Availability|Availability}.
1912
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
1913
+ * for more details and examples.
1914
+ * @example <caption>include:samples/generated/v1/chat_service.mark_as_away.js</caption>
1915
+ * region_tag:chat_v1_generated_ChatService_MarkAsAway_async
1916
+ */
1917
+ markAsAway(request?: protos.google.chat.v1.IMarkAsAwayRequest, options?: CallOptions): Promise<[
1918
+ protos.google.chat.v1.IAvailability,
1919
+ protos.google.chat.v1.IMarkAsAwayRequest | undefined,
1920
+ {} | undefined
1921
+ ]>;
1922
+ markAsAway(request: protos.google.chat.v1.IMarkAsAwayRequest, options: CallOptions, callback: Callback<protos.google.chat.v1.IAvailability, protos.google.chat.v1.IMarkAsAwayRequest | null | undefined, {} | null | undefined>): void;
1923
+ markAsAway(request: protos.google.chat.v1.IMarkAsAwayRequest, callback: Callback<protos.google.chat.v1.IAvailability, protos.google.chat.v1.IMarkAsAwayRequest | null | undefined, {} | null | undefined>): void;
1924
+ /**
1925
+ * Marks user as `DO_NOT_DISTURB` in Google Chat.
1926
+ *
1927
+ * Sets a user's availability state to `DO_NOT_DISTURB` until a specified
1928
+ * expiration time.
1929
+ * When in `DO_NOT_DISTURB`, users typically won't receive notifications.
1930
+ *
1931
+ * This method only updates the authenticated user's availability.
1932
+ *
1933
+ * Requires [user
1934
+ * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
1935
+ * with [authorization
1936
+ * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
1937
+ *
1938
+ * - `https://www.googleapis.com/auth/chat.users.availability`
1939
+ *
1940
+ * @param {Object} request
1941
+ * The request object that will be sent.
1942
+ * @param {string} request.name
1943
+ * Required. The resource name of the availability to mark as Do Not Disturb.
1944
+ * Format: users/{user}/availability
1945
+ *
1946
+ * `{user}` is the id for the Person in the People API or Admin SDK directory
1947
+ * API. For example, `users/123456789`.
1948
+ *
1949
+ * The user's email address or `me` can also be used as an alias to refer to
1950
+ * the caller. For example, `users/user@example.com` or `users/me`.
1951
+ * @param {google.protobuf.Timestamp} request.expireTime
1952
+ * The absolute timestamp when the DND state expires.
1953
+ * @param {google.protobuf.Duration} request.ttl
1954
+ * The duration from the current time until the DND state expires.
1955
+ * @param {object} [options]
1956
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
1957
+ * @returns {Promise} - The promise which resolves to an array.
1958
+ * The first element of the array is an object representing {@link protos.google.chat.v1.Availability|Availability}.
1959
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
1960
+ * for more details and examples.
1961
+ * @example <caption>include:samples/generated/v1/chat_service.mark_as_do_not_disturb.js</caption>
1962
+ * region_tag:chat_v1_generated_ChatService_MarkAsDoNotDisturb_async
1963
+ */
1964
+ markAsDoNotDisturb(request?: protos.google.chat.v1.IMarkAsDoNotDisturbRequest, options?: CallOptions): Promise<[
1965
+ protos.google.chat.v1.IAvailability,
1966
+ protos.google.chat.v1.IMarkAsDoNotDisturbRequest | undefined,
1967
+ {} | undefined
1968
+ ]>;
1969
+ markAsDoNotDisturb(request: protos.google.chat.v1.IMarkAsDoNotDisturbRequest, options: CallOptions, callback: Callback<protos.google.chat.v1.IAvailability, protos.google.chat.v1.IMarkAsDoNotDisturbRequest | null | undefined, {} | null | undefined>): void;
1970
+ markAsDoNotDisturb(request: protos.google.chat.v1.IMarkAsDoNotDisturbRequest, callback: Callback<protos.google.chat.v1.IAvailability, protos.google.chat.v1.IMarkAsDoNotDisturbRequest | null | undefined, {} | null | undefined>): void;
1971
+ /**
1972
+ * Updates availability information for a human user. Only the `custom_status`
1973
+ * field can be updated through this method.
1974
+ *
1975
+ * This method only updates the authenticated user's availability.
1976
+ *
1977
+ * Requires [user
1978
+ * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
1979
+ * with one of the following [authorization
1980
+ * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
1981
+ *
1982
+ * - `https://www.googleapis.com/auth/chat.users.availability`
1983
+ *
1984
+ * @param {Object} request
1985
+ * The request object that will be sent.
1986
+ * @param {google.chat.v1.Availability} request.availability
1987
+ * Required. The availability to update.
1988
+ * @param {google.protobuf.FieldMask} request.updateMask
1989
+ * Required. The list of fields to update.
1990
+ * The only field that can be updated is `custom_status`.
1991
+ * @param {object} [options]
1992
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
1993
+ * @returns {Promise} - The promise which resolves to an array.
1994
+ * The first element of the array is an object representing {@link protos.google.chat.v1.Availability|Availability}.
1995
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
1996
+ * for more details and examples.
1997
+ * @example <caption>include:samples/generated/v1/chat_service.update_availability.js</caption>
1998
+ * region_tag:chat_v1_generated_ChatService_UpdateAvailability_async
1999
+ */
2000
+ updateAvailability(request?: protos.google.chat.v1.IUpdateAvailabilityRequest, options?: CallOptions): Promise<[
2001
+ protos.google.chat.v1.IAvailability,
2002
+ protos.google.chat.v1.IUpdateAvailabilityRequest | undefined,
2003
+ {} | undefined
2004
+ ]>;
2005
+ updateAvailability(request: protos.google.chat.v1.IUpdateAvailabilityRequest, options: CallOptions, callback: Callback<protos.google.chat.v1.IAvailability, protos.google.chat.v1.IUpdateAvailabilityRequest | null | undefined, {} | null | undefined>): void;
2006
+ updateAvailability(request: protos.google.chat.v1.IUpdateAvailabilityRequest, callback: Callback<protos.google.chat.v1.IAvailability, protos.google.chat.v1.IUpdateAvailabilityRequest | null | undefined, {} | null | undefined>): void;
1771
2007
  /**
1772
2008
  * Returns an event from a Google Chat space. The [event
1773
2009
  * payload](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.spaceEvents#SpaceEvent.FIELDS.oneof_payload)
@@ -4687,6 +4923,21 @@ export declare class ChatServiceClient {
4687
4923
  * @returns {string} A string representing the attachment.
4688
4924
  */
4689
4925
  matchAttachmentFromAttachmentName(attachmentName: string): string | number;
4926
+ /**
4927
+ * Return a fully-qualified availability resource name string.
4928
+ *
4929
+ * @param {string} user
4930
+ * @returns {string} Resource name string.
4931
+ */
4932
+ availabilityPath(user: string): string;
4933
+ /**
4934
+ * Parse the user from Availability resource.
4935
+ *
4936
+ * @param {string} availabilityName
4937
+ * A fully-qualified path representing Availability resource.
4938
+ * @returns {string} A string representing the user.
4939
+ */
4940
+ matchUserFromAvailabilityName(availabilityName: string): string | number;
4690
4941
  /**
4691
4942
  * Return a fully-qualified customEmoji resource name string.
4692
4943
  *