@google-apps/chat 0.24.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.
- package/README.md +2 -3
- package/build/protos/google/chat/v1/audience.proto +48 -0
- package/build/protos/google/chat/v1/availability.proto +232 -0
- package/build/protos/google/chat/v1/chat_service.proto +105 -0
- package/build/protos/google/chat/v1/message.proto +8 -7
- package/build/protos/google/chat/v1/space.proto +55 -0
- package/build/protos/protos.d.ts +2133 -141
- package/build/protos/protos.js +1 -75666
- package/build/protos/protos.json +565 -25
- package/build/src/index.js +1 -1
- package/build/src/v1/chat_service_client.d.ts +1260 -1009
- package/build/src/v1/chat_service_client.js +912 -300
- package/build/src/v1/chat_service_client.js.map +1 -1
- package/build/src/v1/chat_service_client_config.json +25 -0
- package/build/src/v1/chat_service_proto_list.json +2 -0
- package/build/src/v1/gapic_metadata.json +50 -0
- package/build/src/v1/index.js.map +1 -1
- package/package.json +3 -6
- package/LICENSE +0 -202
|
@@ -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)
|
|
@@ -2111,121 +2347,121 @@ export declare class ChatServiceClient {
|
|
|
2111
2347
|
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;
|
|
2112
2348
|
moveSectionItem(request: protos.google.chat.v1.IMoveSectionItemRequest, callback: Callback<protos.google.chat.v1.IMoveSectionItemResponse, protos.google.chat.v1.IMoveSectionItemRequest | null | undefined, {} | null | undefined>): void;
|
|
2113
2349
|
/**
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2350
|
+
* Lists messages in a space that the caller is a member of, including
|
|
2351
|
+
* messages from blocked members and spaces. System messages, like those
|
|
2352
|
+
* announcing new space members, aren't included. If you list messages from a
|
|
2353
|
+
* space with no messages, the response is an empty object. When using a
|
|
2354
|
+
* REST/HTTP interface, the response contains an empty JSON object, `{}`.
|
|
2355
|
+
* For an example, see
|
|
2356
|
+
* [List
|
|
2357
|
+
* messages](https://developers.google.com/workspace/chat/api/guides/v1/messages/list).
|
|
2358
|
+
*
|
|
2359
|
+
* Supports the following types of
|
|
2360
|
+
* [authentication](https://developers.google.com/workspace/chat/authenticate-authorize):
|
|
2361
|
+
*
|
|
2362
|
+
* - [App
|
|
2363
|
+
* authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
|
|
2364
|
+
* with [administrator
|
|
2365
|
+
* approval](https://support.google.com/a?p=chat-app-auth)
|
|
2366
|
+
* with the authorization scope:
|
|
2367
|
+
* - `https://www.googleapis.com/auth/chat.app.messages.readonly`. When
|
|
2368
|
+
* using this authentication scope, this method only returns public
|
|
2369
|
+
* messages in a space. It doesn't include private messages.
|
|
2370
|
+
*
|
|
2371
|
+
* - [User
|
|
2372
|
+
* authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
|
|
2373
|
+
* with one of the following authorization scopes:
|
|
2374
|
+
* - `https://www.googleapis.com/auth/chat.messages.readonly`
|
|
2375
|
+
* - `https://www.googleapis.com/auth/chat.messages`
|
|
2376
|
+
* - `https://www.googleapis.com/auth/chat.import` (import mode spaces
|
|
2377
|
+
* only)
|
|
2378
|
+
*
|
|
2379
|
+
* @param {Object} request
|
|
2380
|
+
* The request object that will be sent.
|
|
2381
|
+
* @param {string} request.parent
|
|
2382
|
+
* Required. The resource name of the space to list messages from.
|
|
2383
|
+
*
|
|
2384
|
+
* Format: `spaces/{space}`
|
|
2385
|
+
* @param {number} [request.pageSize]
|
|
2386
|
+
* Optional. The maximum number of messages returned. The service might return
|
|
2387
|
+
* fewer messages than this value.
|
|
2388
|
+
*
|
|
2389
|
+
* If unspecified, at most 25 are returned.
|
|
2390
|
+
*
|
|
2391
|
+
* The maximum value is 1000. If you use a value more than 1000, it's
|
|
2392
|
+
* automatically changed to 1000.
|
|
2393
|
+
*
|
|
2394
|
+
* Negative values return an `INVALID_ARGUMENT` error.
|
|
2395
|
+
* @param {string} [request.pageToken]
|
|
2396
|
+
* Optional. A page token received from a previous list messages call. Provide
|
|
2397
|
+
* this parameter to retrieve the subsequent page.
|
|
2398
|
+
*
|
|
2399
|
+
* When paginating, all other parameters provided should match the call that
|
|
2400
|
+
* provided the page token. Passing different values to the other parameters
|
|
2401
|
+
* might lead to unexpected results.
|
|
2402
|
+
* @param {string} [request.filter]
|
|
2403
|
+
* Optional. A query filter.
|
|
2404
|
+
*
|
|
2405
|
+
* You can filter messages by date (`create_time`) and thread (`thread.name`).
|
|
2406
|
+
*
|
|
2407
|
+
* To filter messages by the date they were created, specify the `create_time`
|
|
2408
|
+
* with a timestamp in [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339)
|
|
2409
|
+
* format and double quotation marks. For example,
|
|
2410
|
+
* `"2023-04-21T11:30:00-04:00"`. You can use the greater than operator `>` to
|
|
2411
|
+
* list messages that were created after a timestamp, or the less than
|
|
2412
|
+
* operator `<` to list messages that were created before a timestamp. To
|
|
2413
|
+
* filter messages within a time interval, use the `AND` operator between two
|
|
2414
|
+
* timestamps.
|
|
2415
|
+
*
|
|
2416
|
+
* To filter by thread, specify the `thread.name`, formatted as
|
|
2417
|
+
* `spaces/{space}/threads/{thread}`. You can only specify one
|
|
2418
|
+
* `thread.name` per query.
|
|
2419
|
+
*
|
|
2420
|
+
* To filter by both thread and date, use the `AND` operator in your query.
|
|
2421
|
+
*
|
|
2422
|
+
* For example, the following queries are valid:
|
|
2423
|
+
*
|
|
2424
|
+
* ```
|
|
2425
|
+
* create_time > "2012-04-21T11:30:00-04:00"
|
|
2426
|
+
*
|
|
2427
|
+
* create_time > "2012-04-21T11:30:00-04:00" AND
|
|
2428
|
+
* thread.name = spaces/AAAAAAAAAAA/threads/123
|
|
2429
|
+
*
|
|
2430
|
+
* create_time > "2012-04-21T11:30:00+00:00" AND
|
|
2431
|
+
*
|
|
2432
|
+
* create_time < "2013-01-01T00:00:00+00:00" AND
|
|
2433
|
+
* thread.name = spaces/AAAAAAAAAAA/threads/123
|
|
2434
|
+
*
|
|
2435
|
+
* thread.name = spaces/AAAAAAAAAAA/threads/123
|
|
2436
|
+
* ```
|
|
2437
|
+
*
|
|
2438
|
+
* Invalid queries are rejected by the server with an `INVALID_ARGUMENT`
|
|
2439
|
+
* error.
|
|
2440
|
+
* @param {string} [request.orderBy]
|
|
2441
|
+
* Optional. How the list of messages is ordered. Specify a value to order by
|
|
2442
|
+
* an ordering operation. Valid ordering operation values are as follows:
|
|
2443
|
+
*
|
|
2444
|
+
* - `ASC` for ascending.
|
|
2445
|
+
*
|
|
2446
|
+
* - `DESC` for descending.
|
|
2447
|
+
*
|
|
2448
|
+
* The default ordering is `create_time ASC`.
|
|
2449
|
+
* @param {boolean} [request.showDeleted]
|
|
2450
|
+
* Optional. Whether to include deleted messages. Deleted messages include
|
|
2451
|
+
* deleted time and metadata about their deletion, but message content is
|
|
2452
|
+
* unavailable.
|
|
2453
|
+
* @param {object} [options]
|
|
2454
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
2455
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
2456
|
+
* The first element of the array is Array of {@link protos.google.chat.v1.Message|Message}.
|
|
2457
|
+
* The client library will perform auto-pagination by default: it will call the API as many
|
|
2458
|
+
* times as needed and will merge results from all the pages into this array.
|
|
2459
|
+
* Note that it can affect your quota.
|
|
2460
|
+
* We recommend using `listMessagesAsync()`
|
|
2461
|
+
* method described below for async iteration which you can stop as needed.
|
|
2462
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
2463
|
+
* for more details and examples.
|
|
2464
|
+
*/
|
|
2229
2465
|
listMessages(request?: protos.google.chat.v1.IListMessagesRequest, options?: CallOptions): Promise<[
|
|
2230
2466
|
protos.google.chat.v1.IMessage[],
|
|
2231
2467
|
protos.google.chat.v1.IListMessagesRequest | null,
|
|
@@ -2413,154 +2649,41 @@ export declare class ChatServiceClient {
|
|
|
2413
2649
|
*/
|
|
2414
2650
|
listMessagesAsync(request?: protos.google.chat.v1.IListMessagesRequest, options?: CallOptions): AsyncIterable<protos.google.chat.v1.IMessage>;
|
|
2415
2651
|
/**
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
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
|
-
*/
|
|
2555
|
-
listMemberships(request?: protos.google.chat.v1.IListMembershipsRequest, options?: CallOptions): Promise<[
|
|
2556
|
-
protos.google.chat.v1.IMembership[],
|
|
2557
|
-
protos.google.chat.v1.IListMembershipsRequest | null,
|
|
2558
|
-
protos.google.chat.v1.IListMembershipsResponse
|
|
2559
|
-
]>;
|
|
2560
|
-
listMemberships(request: protos.google.chat.v1.IListMembershipsRequest, options: CallOptions, callback: PaginationCallback<protos.google.chat.v1.IListMembershipsRequest, protos.google.chat.v1.IListMembershipsResponse | null | undefined, protos.google.chat.v1.IMembership>): void;
|
|
2561
|
-
listMemberships(request: protos.google.chat.v1.IListMembershipsRequest, callback: PaginationCallback<protos.google.chat.v1.IListMembershipsRequest, protos.google.chat.v1.IListMembershipsResponse | null | undefined, protos.google.chat.v1.IMembership>): void;
|
|
2562
|
-
/**
|
|
2563
|
-
* Equivalent to `listMemberships`, but returns a NodeJS Stream object.
|
|
2652
|
+
* Lists memberships in a space. For an example, see [List users and Google
|
|
2653
|
+
* Chat apps in a
|
|
2654
|
+
* space](https://developers.google.com/workspace/chat/list-members). Listing
|
|
2655
|
+
* memberships with [app
|
|
2656
|
+
* authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
|
|
2657
|
+
* lists memberships in spaces that the Chat app has
|
|
2658
|
+
* access to, but excludes Chat app memberships,
|
|
2659
|
+
* including its own. Listing memberships with
|
|
2660
|
+
* [User
|
|
2661
|
+
* authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
|
|
2662
|
+
* lists memberships in spaces that the authenticated user has access to.
|
|
2663
|
+
*
|
|
2664
|
+
* Supports the following types of
|
|
2665
|
+
* [authentication](https://developers.google.com/workspace/chat/authenticate-authorize):
|
|
2666
|
+
*
|
|
2667
|
+
* - [App
|
|
2668
|
+
* authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
|
|
2669
|
+
* with one of the following authorization scopes:
|
|
2670
|
+
* - `https://www.googleapis.com/auth/chat.bot`
|
|
2671
|
+
* - `https://www.googleapis.com/auth/chat.app.memberships` (requires
|
|
2672
|
+
* [administrator approval](https://support.google.com/a?p=chat-app-auth))
|
|
2673
|
+
*
|
|
2674
|
+
* - [User
|
|
2675
|
+
* authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
|
|
2676
|
+
* with one of the following authorization scopes:
|
|
2677
|
+
* - `https://www.googleapis.com/auth/chat.memberships.readonly`
|
|
2678
|
+
* - `https://www.googleapis.com/auth/chat.memberships`
|
|
2679
|
+
* - `https://www.googleapis.com/auth/chat.import` (import mode spaces
|
|
2680
|
+
* only)
|
|
2681
|
+
* - User authentication grants administrator privileges when an
|
|
2682
|
+
* administrator account authenticates, `use_admin_access` is `true`, and
|
|
2683
|
+
* one of the following authorization scopes is used:
|
|
2684
|
+
* - `https://www.googleapis.com/auth/chat.admin.memberships.readonly`
|
|
2685
|
+
* - `https://www.googleapis.com/auth/chat.admin.memberships`
|
|
2686
|
+
*
|
|
2564
2687
|
* @param {Object} request
|
|
2565
2688
|
* The request object that will be sent.
|
|
2566
2689
|
* @param {string} request.parent
|
|
@@ -2655,19 +2778,132 @@ export declare class ChatServiceClient {
|
|
|
2655
2778
|
* Listing app memberships in a space isn't supported when using admin access.
|
|
2656
2779
|
* @param {object} [options]
|
|
2657
2780
|
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
2658
|
-
* @returns {
|
|
2659
|
-
*
|
|
2781
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
2782
|
+
* The first element of the array is Array of {@link protos.google.chat.v1.Membership|Membership}.
|
|
2660
2783
|
* The client library will perform auto-pagination by default: it will call the API as many
|
|
2661
|
-
* times as needed
|
|
2784
|
+
* times as needed and will merge results from all the pages into this array.
|
|
2785
|
+
* Note that it can affect your quota.
|
|
2662
2786
|
* We recommend using `listMembershipsAsync()`
|
|
2663
2787
|
* method described below for async iteration which you can stop as needed.
|
|
2664
2788
|
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
2665
2789
|
* for more details and examples.
|
|
2666
2790
|
*/
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2791
|
+
listMemberships(request?: protos.google.chat.v1.IListMembershipsRequest, options?: CallOptions): Promise<[
|
|
2792
|
+
protos.google.chat.v1.IMembership[],
|
|
2793
|
+
protos.google.chat.v1.IListMembershipsRequest | null,
|
|
2794
|
+
protos.google.chat.v1.IListMembershipsResponse
|
|
2795
|
+
]>;
|
|
2796
|
+
listMemberships(request: protos.google.chat.v1.IListMembershipsRequest, options: CallOptions, callback: PaginationCallback<protos.google.chat.v1.IListMembershipsRequest, protos.google.chat.v1.IListMembershipsResponse | null | undefined, protos.google.chat.v1.IMembership>): void;
|
|
2797
|
+
listMemberships(request: protos.google.chat.v1.IListMembershipsRequest, callback: PaginationCallback<protos.google.chat.v1.IListMembershipsRequest, protos.google.chat.v1.IListMembershipsResponse | null | undefined, protos.google.chat.v1.IMembership>): void;
|
|
2798
|
+
/**
|
|
2799
|
+
* Equivalent to `listMemberships`, but returns a NodeJS Stream object.
|
|
2800
|
+
* @param {Object} request
|
|
2801
|
+
* The request object that will be sent.
|
|
2802
|
+
* @param {string} request.parent
|
|
2803
|
+
* Required. The resource name of the space for which to fetch a membership
|
|
2804
|
+
* list.
|
|
2805
|
+
*
|
|
2806
|
+
* Format: spaces/{space}
|
|
2807
|
+
* @param {number} [request.pageSize]
|
|
2808
|
+
* Optional. The maximum number of memberships to return. The service might
|
|
2809
|
+
* return fewer than this value.
|
|
2810
|
+
*
|
|
2811
|
+
* If unspecified, at most 100 memberships are returned.
|
|
2812
|
+
*
|
|
2813
|
+
* The maximum value is 1000. If you use a value more than 1000, it's
|
|
2814
|
+
* automatically changed to 1000.
|
|
2815
|
+
*
|
|
2816
|
+
* Negative values return an `INVALID_ARGUMENT` error.
|
|
2817
|
+
* @param {string} [request.pageToken]
|
|
2818
|
+
* Optional. A page token, received from a previous call to list memberships.
|
|
2819
|
+
* Provide this parameter to retrieve the subsequent page.
|
|
2820
|
+
*
|
|
2821
|
+
* When paginating, all other parameters provided should match the call that
|
|
2822
|
+
* provided the page token. Passing different values to the other parameters
|
|
2823
|
+
* might lead to unexpected results.
|
|
2824
|
+
* @param {string} [request.filter]
|
|
2825
|
+
* Optional. A query filter.
|
|
2826
|
+
*
|
|
2827
|
+
* You can filter memberships by a member's role
|
|
2828
|
+
* ([`role`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.members#membershiprole))
|
|
2829
|
+
* and type
|
|
2830
|
+
* ([`member.type`](https://developers.google.com/workspace/chat/api/reference/rest/v1/User#type)).
|
|
2831
|
+
*
|
|
2832
|
+
* To filter by role, set `role` to `ROLE_MEMBER` or `ROLE_MANAGER`.
|
|
2833
|
+
*
|
|
2834
|
+
* To filter by type, set `member.type` to `HUMAN` or `BOT`. You can also
|
|
2835
|
+
* filter for `member.type` using the `!=` operator.
|
|
2836
|
+
*
|
|
2837
|
+
* To filter by both role and type, use the `AND` operator. To filter by
|
|
2838
|
+
* either role or type, use the `OR` operator.
|
|
2839
|
+
*
|
|
2840
|
+
* Either `member.type = "HUMAN"` or `member.type != "BOT"` is required
|
|
2841
|
+
* when `use_admin_access` is set to true. Other member type filters will be
|
|
2842
|
+
* rejected.
|
|
2843
|
+
*
|
|
2844
|
+
* For example, the following queries are valid:
|
|
2845
|
+
*
|
|
2846
|
+
* ```
|
|
2847
|
+
* role = "ROLE_MANAGER" OR role = "ROLE_MEMBER"
|
|
2848
|
+
* member.type = "HUMAN" AND role = "ROLE_MANAGER"
|
|
2849
|
+
*
|
|
2850
|
+
* member.type != "BOT"
|
|
2851
|
+
* ```
|
|
2852
|
+
*
|
|
2853
|
+
* The following queries are invalid:
|
|
2854
|
+
*
|
|
2855
|
+
* ```
|
|
2856
|
+
* member.type = "HUMAN" AND member.type = "BOT"
|
|
2857
|
+
* role = "ROLE_MANAGER" AND role = "ROLE_MEMBER"
|
|
2858
|
+
* ```
|
|
2859
|
+
*
|
|
2860
|
+
* Invalid queries are rejected by the server with an `INVALID_ARGUMENT`
|
|
2861
|
+
* error.
|
|
2862
|
+
* @param {boolean} [request.showGroups]
|
|
2863
|
+
* Optional. When `true`, also returns memberships associated with a
|
|
2864
|
+
* {@link protos.google.chat.v1.Membership.group_member|Google Group}, in
|
|
2865
|
+
* addition to other types of memberships. If a
|
|
2866
|
+
* {@link protos.google.chat.v1.ListMembershipsRequest.filter|filter} is set,
|
|
2867
|
+
* {@link protos.google.chat.v1.Membership.group_member|Google Group}
|
|
2868
|
+
* memberships that don't match the filter criteria aren't returned.
|
|
2869
|
+
* @param {boolean} [request.showInvited]
|
|
2870
|
+
* Optional. When `true`, also returns memberships associated with
|
|
2871
|
+
* {@link protos.google.chat.v1.Membership.MembershipState.INVITED|invited} members, in
|
|
2872
|
+
* addition to other types of memberships. If a
|
|
2873
|
+
* filter is set,
|
|
2874
|
+
* {@link protos.google.chat.v1.Membership.MembershipState.INVITED|invited} memberships
|
|
2875
|
+
* that don't match the filter criteria aren't returned.
|
|
2876
|
+
*
|
|
2877
|
+
* Currently requires [user
|
|
2878
|
+
* authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
|
|
2879
|
+
* @param {boolean} [request.useAdminAccess]
|
|
2880
|
+
* Optional. When `true`, the method runs using the user's Google Workspace
|
|
2881
|
+
* administrator privileges.
|
|
2882
|
+
*
|
|
2883
|
+
* The calling user must be a Google Workspace administrator with the
|
|
2884
|
+
* [manage chat and spaces conversations
|
|
2885
|
+
* privilege](https://support.google.com/a/answer/13369245).
|
|
2886
|
+
*
|
|
2887
|
+
* Requires either the `chat.admin.memberships.readonly` or
|
|
2888
|
+
* `chat.admin.memberships` [OAuth 2.0
|
|
2889
|
+
* scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes).
|
|
2890
|
+
*
|
|
2891
|
+
* Listing app memberships in a space isn't supported when using admin access.
|
|
2892
|
+
* @param {object} [options]
|
|
2893
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
2894
|
+
* @returns {Stream}
|
|
2895
|
+
* An object stream which emits an object representing {@link protos.google.chat.v1.Membership|Membership} on 'data' event.
|
|
2896
|
+
* The client library will perform auto-pagination by default: it will call the API as many
|
|
2897
|
+
* times as needed. Note that it can affect your quota.
|
|
2898
|
+
* We recommend using `listMembershipsAsync()`
|
|
2899
|
+
* method described below for async iteration which you can stop as needed.
|
|
2900
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
2901
|
+
* for more details and examples.
|
|
2902
|
+
*/
|
|
2903
|
+
listMembershipsStream(request?: protos.google.chat.v1.IListMembershipsRequest, options?: CallOptions): Transform;
|
|
2904
|
+
/**
|
|
2905
|
+
* Equivalent to `listMemberships`, but returns an iterable object.
|
|
2906
|
+
*
|
|
2671
2907
|
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
|
2672
2908
|
* @param {Object} request
|
|
2673
2909
|
* The request object that will be sent.
|
|
@@ -2775,79 +3011,79 @@ export declare class ChatServiceClient {
|
|
|
2775
3011
|
*/
|
|
2776
3012
|
listMembershipsAsync(request?: protos.google.chat.v1.IListMembershipsRequest, options?: CallOptions): AsyncIterable<protos.google.chat.v1.IMembership>;
|
|
2777
3013
|
/**
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
3014
|
+
* Lists spaces the caller is a member of. Group chats and DMs aren't listed
|
|
3015
|
+
* until the first message is sent. For an example, see
|
|
3016
|
+
* [List
|
|
3017
|
+
* spaces](https://developers.google.com/workspace/chat/list-spaces).
|
|
3018
|
+
*
|
|
3019
|
+
* Supports the following types of
|
|
3020
|
+
* [authentication](https://developers.google.com/workspace/chat/authenticate-authorize):
|
|
3021
|
+
*
|
|
3022
|
+
* - [App
|
|
3023
|
+
* authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
|
|
3024
|
+
* with the authorization scope:
|
|
3025
|
+
* - `https://www.googleapis.com/auth/chat.bot`
|
|
3026
|
+
*
|
|
3027
|
+
* - [User
|
|
3028
|
+
* authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
|
|
3029
|
+
* with one of the following authorization scopes:
|
|
3030
|
+
* - `https://www.googleapis.com/auth/chat.spaces.readonly`
|
|
3031
|
+
* - `https://www.googleapis.com/auth/chat.spaces`
|
|
3032
|
+
*
|
|
3033
|
+
* To list all named spaces by Google Workspace organization, use the
|
|
3034
|
+
* [`spaces.search()`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/search)
|
|
3035
|
+
* method using Workspace administrator privileges instead.
|
|
3036
|
+
*
|
|
3037
|
+
* @param {Object} request
|
|
3038
|
+
* The request object that will be sent.
|
|
3039
|
+
* @param {number} [request.pageSize]
|
|
3040
|
+
* Optional. The maximum number of spaces to return. The service might return
|
|
3041
|
+
* fewer than this value.
|
|
3042
|
+
*
|
|
3043
|
+
* If unspecified, at most 100 spaces are returned.
|
|
3044
|
+
*
|
|
3045
|
+
* The maximum value is 1000. If you use a value more than 1000, it's
|
|
3046
|
+
* automatically changed to 1000.
|
|
3047
|
+
*
|
|
3048
|
+
* Negative values return an `INVALID_ARGUMENT` error.
|
|
3049
|
+
* @param {string} [request.pageToken]
|
|
3050
|
+
* Optional. A page token, received from a previous list spaces call.
|
|
3051
|
+
* Provide this parameter to retrieve the subsequent page.
|
|
3052
|
+
*
|
|
3053
|
+
* When paginating, the filter value should match the call that provided the
|
|
3054
|
+
* page token. Passing a different value may lead to unexpected results.
|
|
3055
|
+
* @param {string} [request.filter]
|
|
3056
|
+
* Optional. A query filter.
|
|
3057
|
+
*
|
|
3058
|
+
* You can filter spaces by the space type
|
|
3059
|
+
* ([`space_type`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#spacetype)).
|
|
3060
|
+
*
|
|
3061
|
+
* To filter by space type, you must specify valid enum value, such as
|
|
3062
|
+
* `SPACE` or `GROUP_CHAT` (the `space_type` can't be
|
|
3063
|
+
* `SPACE_TYPE_UNSPECIFIED`). To query for multiple space types, use the `OR`
|
|
3064
|
+
* operator.
|
|
3065
|
+
*
|
|
3066
|
+
* For example, the following queries are valid:
|
|
3067
|
+
*
|
|
3068
|
+
* ```
|
|
3069
|
+
* space_type = "SPACE"
|
|
3070
|
+
* spaceType = "GROUP_CHAT" OR spaceType = "DIRECT_MESSAGE"
|
|
3071
|
+
* ```
|
|
3072
|
+
*
|
|
3073
|
+
* Invalid queries are rejected by the server with an `INVALID_ARGUMENT`
|
|
3074
|
+
* error.
|
|
3075
|
+
* @param {object} [options]
|
|
3076
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
3077
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
3078
|
+
* The first element of the array is Array of {@link protos.google.chat.v1.Space|Space}.
|
|
3079
|
+
* The client library will perform auto-pagination by default: it will call the API as many
|
|
3080
|
+
* times as needed and will merge results from all the pages into this array.
|
|
3081
|
+
* Note that it can affect your quota.
|
|
3082
|
+
* We recommend using `listSpacesAsync()`
|
|
3083
|
+
* method described below for async iteration which you can stop as needed.
|
|
3084
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
3085
|
+
* for more details and examples.
|
|
3086
|
+
*/
|
|
2851
3087
|
listSpaces(request?: protos.google.chat.v1.IListSpacesRequest, options?: CallOptions): Promise<[
|
|
2852
3088
|
protos.google.chat.v1.ISpace[],
|
|
2853
3089
|
protos.google.chat.v1.IListSpacesRequest | null,
|
|
@@ -2922,198 +3158,198 @@ export declare class ChatServiceClient {
|
|
|
2922
3158
|
* The maximum value is 1000. If you use a value more than 1000, it's
|
|
2923
3159
|
* automatically changed to 1000.
|
|
2924
3160
|
*
|
|
2925
|
-
* Negative values return an `INVALID_ARGUMENT` error.
|
|
2926
|
-
* @param {string} [request.pageToken]
|
|
2927
|
-
* Optional. A page token, received from a previous list spaces call.
|
|
2928
|
-
* Provide this parameter to retrieve the subsequent page.
|
|
3161
|
+
* Negative values return an `INVALID_ARGUMENT` error.
|
|
3162
|
+
* @param {string} [request.pageToken]
|
|
3163
|
+
* Optional. A page token, received from a previous list spaces call.
|
|
3164
|
+
* Provide this parameter to retrieve the subsequent page.
|
|
3165
|
+
*
|
|
3166
|
+
* When paginating, the filter value should match the call that provided the
|
|
3167
|
+
* page token. Passing a different value may lead to unexpected results.
|
|
3168
|
+
* @param {string} [request.filter]
|
|
3169
|
+
* Optional. A query filter.
|
|
3170
|
+
*
|
|
3171
|
+
* You can filter spaces by the space type
|
|
3172
|
+
* ([`space_type`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#spacetype)).
|
|
3173
|
+
*
|
|
3174
|
+
* To filter by space type, you must specify valid enum value, such as
|
|
3175
|
+
* `SPACE` or `GROUP_CHAT` (the `space_type` can't be
|
|
3176
|
+
* `SPACE_TYPE_UNSPECIFIED`). To query for multiple space types, use the `OR`
|
|
3177
|
+
* operator.
|
|
3178
|
+
*
|
|
3179
|
+
* For example, the following queries are valid:
|
|
3180
|
+
*
|
|
3181
|
+
* ```
|
|
3182
|
+
* space_type = "SPACE"
|
|
3183
|
+
* spaceType = "GROUP_CHAT" OR spaceType = "DIRECT_MESSAGE"
|
|
3184
|
+
* ```
|
|
3185
|
+
*
|
|
3186
|
+
* Invalid queries are rejected by the server with an `INVALID_ARGUMENT`
|
|
3187
|
+
* error.
|
|
3188
|
+
* @param {object} [options]
|
|
3189
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
3190
|
+
* @returns {Object}
|
|
3191
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
|
3192
|
+
* When you iterate the returned iterable, each element will be an object representing
|
|
3193
|
+
* {@link protos.google.chat.v1.Space|Space}. The API will be called under the hood as needed, once per the page,
|
|
3194
|
+
* so you can stop the iteration when you don't need more results.
|
|
3195
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
3196
|
+
* for more details and examples.
|
|
3197
|
+
* @example <caption>include:samples/generated/v1/chat_service.list_spaces.js</caption>
|
|
3198
|
+
* region_tag:chat_v1_generated_ChatService_ListSpaces_async
|
|
3199
|
+
*/
|
|
3200
|
+
listSpacesAsync(request?: protos.google.chat.v1.IListSpacesRequest, options?: CallOptions): AsyncIterable<protos.google.chat.v1.ISpace>;
|
|
3201
|
+
/**
|
|
3202
|
+
* Returns a list of spaces in a Google Workspace organization based on an
|
|
3203
|
+
* administrator's search. In the request, set `use_admin_access` to `true`.
|
|
3204
|
+
* For an example, see [Search for and manage
|
|
3205
|
+
* spaces](https://developers.google.com/workspace/chat/search-manage-admin).
|
|
3206
|
+
*
|
|
3207
|
+
* Requires [user
|
|
3208
|
+
* authentication with administrator
|
|
3209
|
+
* privileges](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user#admin-privileges)
|
|
3210
|
+
* and one of the following [authorization
|
|
3211
|
+
* scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
|
|
3212
|
+
*
|
|
3213
|
+
* - `https://www.googleapis.com/auth/chat.admin.spaces.readonly`
|
|
3214
|
+
* - `https://www.googleapis.com/auth/chat.admin.spaces`
|
|
3215
|
+
*
|
|
3216
|
+
* @param {Object} request
|
|
3217
|
+
* The request object that will be sent.
|
|
3218
|
+
* @param {boolean} request.useAdminAccess
|
|
3219
|
+
* When `true`, the method runs using the user's Google Workspace
|
|
3220
|
+
* administrator privileges.
|
|
3221
|
+
*
|
|
3222
|
+
* The calling user must be a Google Workspace administrator with the
|
|
3223
|
+
* [manage chat and spaces conversations
|
|
3224
|
+
* privilege](https://support.google.com/a/answer/13369245).
|
|
3225
|
+
*
|
|
3226
|
+
* Requires either the `chat.admin.spaces.readonly` or `chat.admin.spaces`
|
|
3227
|
+
* [OAuth 2.0
|
|
3228
|
+
* scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes).
|
|
3229
|
+
*
|
|
3230
|
+
* This method currently only supports admin access, thus only `true` is
|
|
3231
|
+
* accepted for this field.
|
|
3232
|
+
* @param {number} request.pageSize
|
|
3233
|
+
* The maximum number of spaces to return. The service may return fewer than
|
|
3234
|
+
* this value.
|
|
3235
|
+
*
|
|
3236
|
+
* If unspecified, at most 100 spaces are returned.
|
|
3237
|
+
*
|
|
3238
|
+
* The maximum value is 1000. If you use a value more than 1000, it's
|
|
3239
|
+
* automatically changed to 1000.
|
|
3240
|
+
* @param {string} request.pageToken
|
|
3241
|
+
* A token, received from the previous search spaces call. Provide this
|
|
3242
|
+
* parameter to retrieve the subsequent page.
|
|
3243
|
+
*
|
|
3244
|
+
* When paginating, all other parameters provided should match the call that
|
|
3245
|
+
* provided the page token. Passing different values to the other parameters
|
|
3246
|
+
* might lead to unexpected results.
|
|
3247
|
+
* @param {string} request.query
|
|
3248
|
+
* Required. A search query.
|
|
3249
|
+
*
|
|
3250
|
+
* You can search by using the following parameters:
|
|
3251
|
+
*
|
|
3252
|
+
* - `create_time`
|
|
3253
|
+
* - `customer`
|
|
3254
|
+
* - `display_name`
|
|
3255
|
+
* - `external_user_allowed`
|
|
3256
|
+
* - `last_active_time`
|
|
3257
|
+
* - `space_history_state`
|
|
3258
|
+
* - `space_type`
|
|
3259
|
+
*
|
|
3260
|
+
* `create_time` and `last_active_time` accept a timestamp in
|
|
3261
|
+
* [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339) format and the supported
|
|
3262
|
+
* comparison operators are: `=`, `<`, `>`, `<=`, `>=`.
|
|
3263
|
+
*
|
|
3264
|
+
* `customer` is required and is used to indicate which customer
|
|
3265
|
+
* to fetch spaces from. `customers/my_customer` is the only supported value.
|
|
3266
|
+
*
|
|
3267
|
+
* `display_name` only accepts the `HAS` (`:`) operator. The text to
|
|
3268
|
+
* match is first tokenized into tokens and each token is prefix-matched
|
|
3269
|
+
* case-insensitively and independently as a substring anywhere in the space's
|
|
3270
|
+
* `display_name`. For example, `Fun Eve` matches `Fun event` or `The
|
|
3271
|
+
* evening was fun`, but not `notFun event` or `even`.
|
|
3272
|
+
*
|
|
3273
|
+
* `external_user_allowed` accepts either `true` or `false`.
|
|
3274
|
+
*
|
|
3275
|
+
* `space_history_state` only accepts values from the [`historyState`]
|
|
3276
|
+
* (https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.HistoryState)
|
|
3277
|
+
* field of a `space` resource.
|
|
3278
|
+
*
|
|
3279
|
+
* `space_type` is required and the only valid value is `SPACE`.
|
|
3280
|
+
*
|
|
3281
|
+
* Across different fields, only `AND` operators are supported. A valid
|
|
3282
|
+
* example is `space_type = "SPACE" AND display_name:"Hello"` and an invalid
|
|
3283
|
+
* example is `space_type = "SPACE" OR display_name:"Hello"`.
|
|
3284
|
+
*
|
|
3285
|
+
* Among the same field,
|
|
3286
|
+
* `space_type` doesn't support `AND` or `OR` operators.
|
|
3287
|
+
* `display_name`, 'space_history_state', and 'external_user_allowed' only
|
|
3288
|
+
* support `OR` operators.
|
|
3289
|
+
* `last_active_time` and `create_time` support both `AND` and `OR` operators.
|
|
3290
|
+
* `AND` can only be used to represent an interval, such as `last_active_time
|
|
3291
|
+
* < "2022-01-01T00:00:00+00:00" AND last_active_time >
|
|
3292
|
+
* "2023-01-01T00:00:00+00:00"`.
|
|
3293
|
+
*
|
|
3294
|
+
* The following example queries are valid:
|
|
3295
|
+
*
|
|
3296
|
+
* ```
|
|
3297
|
+
* customer = "customers/my_customer" AND space_type = "SPACE"
|
|
3298
|
+
*
|
|
3299
|
+
* customer = "customers/my_customer" AND space_type = "SPACE" AND
|
|
3300
|
+
* display_name:"Hello World"
|
|
3301
|
+
*
|
|
3302
|
+
* customer = "customers/my_customer" AND space_type = "SPACE" AND
|
|
3303
|
+
* (last_active_time < "2020-01-01T00:00:00+00:00" OR last_active_time >
|
|
3304
|
+
* "2022-01-01T00:00:00+00:00")
|
|
3305
|
+
*
|
|
3306
|
+
* customer = "customers/my_customer" AND space_type = "SPACE" AND
|
|
3307
|
+
* (display_name:"Hello World" OR display_name:"Fun event") AND
|
|
3308
|
+
* (last_active_time > "2020-01-01T00:00:00+00:00" AND last_active_time <
|
|
3309
|
+
* "2022-01-01T00:00:00+00:00")
|
|
3310
|
+
*
|
|
3311
|
+
* customer = "customers/my_customer" AND space_type = "SPACE" AND
|
|
3312
|
+
* (create_time > "2019-01-01T00:00:00+00:00" AND create_time <
|
|
3313
|
+
* "2020-01-01T00:00:00+00:00") AND (external_user_allowed = "true") AND
|
|
3314
|
+
* (space_history_state = "HISTORY_ON" OR space_history_state = "HISTORY_OFF")
|
|
3315
|
+
* ```
|
|
3316
|
+
* @param {string} [request.orderBy]
|
|
3317
|
+
* Optional. How the list of spaces is ordered.
|
|
3318
|
+
*
|
|
3319
|
+
* Supported attributes to order by are:
|
|
2929
3320
|
*
|
|
2930
|
-
*
|
|
2931
|
-
*
|
|
2932
|
-
*
|
|
2933
|
-
*
|
|
3321
|
+
* - `membership_count.joined_direct_human_user_count` — Denotes the count of
|
|
3322
|
+
* human users that have directly joined a space.
|
|
3323
|
+
* - `last_active_time` — Denotes the time when last eligible item is added to
|
|
3324
|
+
* any topic of this space.
|
|
3325
|
+
* - `create_time` — Denotes the time of the space creation.
|
|
2934
3326
|
*
|
|
2935
|
-
*
|
|
2936
|
-
* ([`space_type`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#spacetype)).
|
|
3327
|
+
* Valid ordering operation values are:
|
|
2937
3328
|
*
|
|
2938
|
-
*
|
|
2939
|
-
* `SPACE` or `GROUP_CHAT` (the `space_type` can't be
|
|
2940
|
-
* `SPACE_TYPE_UNSPECIFIED`). To query for multiple space types, use the `OR`
|
|
2941
|
-
* operator.
|
|
3329
|
+
* - `ASC` for ascending. Default value.
|
|
2942
3330
|
*
|
|
2943
|
-
*
|
|
3331
|
+
* - `DESC` for descending.
|
|
2944
3332
|
*
|
|
2945
|
-
*
|
|
2946
|
-
* space_type = "SPACE"
|
|
2947
|
-
* spaceType = "GROUP_CHAT" OR spaceType = "DIRECT_MESSAGE"
|
|
2948
|
-
* ```
|
|
3333
|
+
* The supported syntax are:
|
|
2949
3334
|
*
|
|
2950
|
-
*
|
|
2951
|
-
*
|
|
3335
|
+
* - `membership_count.joined_direct_human_user_count DESC`
|
|
3336
|
+
* - `membership_count.joined_direct_human_user_count ASC`
|
|
3337
|
+
* - `last_active_time DESC`
|
|
3338
|
+
* - `last_active_time ASC`
|
|
3339
|
+
* - `create_time DESC`
|
|
3340
|
+
* - `create_time ASC`
|
|
2952
3341
|
* @param {object} [options]
|
|
2953
3342
|
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
2954
|
-
* @returns {
|
|
2955
|
-
*
|
|
2956
|
-
*
|
|
2957
|
-
*
|
|
2958
|
-
*
|
|
3343
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
3344
|
+
* The first element of the array is Array of {@link protos.google.chat.v1.Space|Space}.
|
|
3345
|
+
* The client library will perform auto-pagination by default: it will call the API as many
|
|
3346
|
+
* times as needed and will merge results from all the pages into this array.
|
|
3347
|
+
* Note that it can affect your quota.
|
|
3348
|
+
* We recommend using `searchSpacesAsync()`
|
|
3349
|
+
* method described below for async iteration which you can stop as needed.
|
|
2959
3350
|
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
2960
3351
|
* for more details and examples.
|
|
2961
|
-
* @example <caption>include:samples/generated/v1/chat_service.list_spaces.js</caption>
|
|
2962
|
-
* region_tag:chat_v1_generated_ChatService_ListSpaces_async
|
|
2963
3352
|
*/
|
|
2964
|
-
listSpacesAsync(request?: protos.google.chat.v1.IListSpacesRequest, options?: CallOptions): AsyncIterable<protos.google.chat.v1.ISpace>;
|
|
2965
|
-
/**
|
|
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
|
-
*/
|
|
3117
3353
|
searchSpaces(request?: protos.google.chat.v1.ISearchSpacesRequest, options?: CallOptions): Promise<[
|
|
3118
3354
|
protos.google.chat.v1.ISpace[],
|
|
3119
3355
|
protos.google.chat.v1.ISearchSpacesRequest | null,
|
|
@@ -3403,82 +3639,82 @@ export declare class ChatServiceClient {
|
|
|
3403
3639
|
*/
|
|
3404
3640
|
searchSpacesAsync(request?: protos.google.chat.v1.ISearchSpacesRequest, options?: CallOptions): AsyncIterable<protos.google.chat.v1.ISpace>;
|
|
3405
3641
|
/**
|
|
3406
|
-
|
|
3407
|
-
|
|
3408
|
-
|
|
3409
|
-
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
|
|
3414
|
-
|
|
3415
|
-
|
|
3416
|
-
|
|
3417
|
-
|
|
3418
|
-
|
|
3419
|
-
|
|
3420
|
-
|
|
3421
|
-
|
|
3422
|
-
|
|
3423
|
-
|
|
3424
|
-
|
|
3425
|
-
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
|
|
3433
|
-
|
|
3434
|
-
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
|
|
3443
|
-
|
|
3444
|
-
|
|
3445
|
-
|
|
3446
|
-
|
|
3447
|
-
|
|
3448
|
-
|
|
3449
|
-
|
|
3450
|
-
|
|
3451
|
-
|
|
3452
|
-
|
|
3453
|
-
|
|
3454
|
-
|
|
3455
|
-
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
|
|
3468
|
-
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
|
|
3472
|
-
|
|
3473
|
-
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
|
|
3477
|
-
|
|
3478
|
-
|
|
3479
|
-
|
|
3480
|
-
|
|
3481
|
-
|
|
3642
|
+
* Returns all spaces with `spaceType == GROUP_CHAT`, whose
|
|
3643
|
+
* human memberships contain exactly the calling user, and the users specified
|
|
3644
|
+
* in `FindGroupChatsRequest.users`. Only members that have joined the
|
|
3645
|
+
* conversation are supported. For an example, see [Find group
|
|
3646
|
+
* chats](https://developers.google.com/workspace/chat/find-group-chats).
|
|
3647
|
+
*
|
|
3648
|
+
* If the calling user blocks, or is blocked by, some users, and no spaces
|
|
3649
|
+
* with the entire specified set of users are found, this method returns
|
|
3650
|
+
* spaces that don't include the blocked or blocking users.
|
|
3651
|
+
*
|
|
3652
|
+
* The specified set of users must contain only human (non-app) memberships.
|
|
3653
|
+
* A request that contains non-human users doesn't return any spaces.
|
|
3654
|
+
*
|
|
3655
|
+
* Requires [user
|
|
3656
|
+
* authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
|
|
3657
|
+
* with one of the following [authorization
|
|
3658
|
+
* scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
|
|
3659
|
+
*
|
|
3660
|
+
* - `https://www.googleapis.com/auth/chat.memberships.readonly`
|
|
3661
|
+
* - `https://www.googleapis.com/auth/chat.memberships`
|
|
3662
|
+
*
|
|
3663
|
+
* @param {Object} request
|
|
3664
|
+
* The request object that will be sent.
|
|
3665
|
+
* @param {string[]} [request.users]
|
|
3666
|
+
* Optional. Resource names of all human users in group chat with the calling
|
|
3667
|
+
* user. Chat apps can't be included in the request.
|
|
3668
|
+
*
|
|
3669
|
+
* The maximum number of users that can be specified in a single request is
|
|
3670
|
+
* `49`.
|
|
3671
|
+
*
|
|
3672
|
+
* Format: `users/{user}`, where `{user}` is either the `id` for the
|
|
3673
|
+
* [person](https://developers.google.com/people/api/rest/v1/people) from the
|
|
3674
|
+
* People API, or the `id` for the
|
|
3675
|
+
* [user](https://developers.google.com/admin-sdk/directory/reference/rest/v1/users)
|
|
3676
|
+
* in the Directory API. For example, to find all group chats with the calling
|
|
3677
|
+
* user and two other users, with People API profile IDs `123456789` and
|
|
3678
|
+
* `987654321`, you can use `users/123456789` and `users/987654321`.
|
|
3679
|
+
* You can also use the email as an alias for `{user}`. For example,
|
|
3680
|
+
* `users/example@gmail.com` where `example@gmail.com` is the email of the
|
|
3681
|
+
* Google Chat user.
|
|
3682
|
+
* @param {number} [request.pageSize]
|
|
3683
|
+
* Optional. The maximum number of spaces to return. The service might return
|
|
3684
|
+
* fewer than this value.
|
|
3685
|
+
*
|
|
3686
|
+
* If unspecified, at most 10 spaces are returned.
|
|
3687
|
+
*
|
|
3688
|
+
* The maximum value is 30. If you use a value more than 30, it's
|
|
3689
|
+
* automatically changed to 30.
|
|
3690
|
+
*
|
|
3691
|
+
* Negative values return an `INVALID_ARGUMENT` error.
|
|
3692
|
+
* @param {string} [request.pageToken]
|
|
3693
|
+
* Optional. A page token, received from a previous call to find group chats.
|
|
3694
|
+
* Provide this parameter to retrieve the subsequent page.
|
|
3695
|
+
*
|
|
3696
|
+
* When paginating, all other parameters provided should match the call that
|
|
3697
|
+
* provided the token. Passing different values may lead to unexpected
|
|
3698
|
+
* results.
|
|
3699
|
+
* @param {google.chat.v1.SpaceView} request.spaceView
|
|
3700
|
+
* Requested space view type. If unset, defaults to
|
|
3701
|
+
* `SPACE_VIEW_RESOURCE_NAME_ONLY`. Requests that specify
|
|
3702
|
+
* `SPACE_VIEW_EXPANDED` must include scopes that allow reading space data,
|
|
3703
|
+
* for example,
|
|
3704
|
+
* https://www.googleapis.com/auth/chat.spaces or
|
|
3705
|
+
* https://www.googleapis.com/auth/chat.spaces.readonly.
|
|
3706
|
+
* @param {object} [options]
|
|
3707
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
3708
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
3709
|
+
* The first element of the array is Array of {@link protos.google.chat.v1.Space|Space}.
|
|
3710
|
+
* The client library will perform auto-pagination by default: it will call the API as many
|
|
3711
|
+
* times as needed and will merge results from all the pages into this array.
|
|
3712
|
+
* Note that it can affect your quota.
|
|
3713
|
+
* We recommend using `findGroupChatsAsync()`
|
|
3714
|
+
* method described below for async iteration which you can stop as needed.
|
|
3715
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
3716
|
+
* for more details and examples.
|
|
3717
|
+
*/
|
|
3482
3718
|
findGroupChats(request?: protos.google.chat.v1.IFindGroupChatsRequest, options?: CallOptions): Promise<[
|
|
3483
3719
|
protos.google.chat.v1.ISpace[],
|
|
3484
3720
|
protos.google.chat.v1.IFindGroupChatsRequest | null,
|
|
@@ -3604,94 +3840,94 @@ export declare class ChatServiceClient {
|
|
|
3604
3840
|
*/
|
|
3605
3841
|
findGroupChatsAsync(request?: protos.google.chat.v1.IFindGroupChatsRequest, options?: CallOptions): AsyncIterable<protos.google.chat.v1.ISpace>;
|
|
3606
3842
|
/**
|
|
3607
|
-
|
|
3608
|
-
|
|
3609
|
-
|
|
3610
|
-
|
|
3611
|
-
|
|
3612
|
-
|
|
3613
|
-
|
|
3614
|
-
|
|
3615
|
-
|
|
3616
|
-
|
|
3617
|
-
|
|
3618
|
-
|
|
3619
|
-
|
|
3620
|
-
|
|
3621
|
-
|
|
3622
|
-
|
|
3623
|
-
|
|
3624
|
-
|
|
3625
|
-
|
|
3626
|
-
|
|
3627
|
-
|
|
3628
|
-
|
|
3629
|
-
|
|
3630
|
-
|
|
3631
|
-
|
|
3632
|
-
|
|
3633
|
-
|
|
3634
|
-
|
|
3635
|
-
|
|
3636
|
-
|
|
3637
|
-
|
|
3638
|
-
|
|
3639
|
-
|
|
3640
|
-
|
|
3641
|
-
|
|
3642
|
-
|
|
3643
|
-
|
|
3644
|
-
|
|
3645
|
-
|
|
3646
|
-
|
|
3647
|
-
|
|
3648
|
-
|
|
3649
|
-
|
|
3650
|
-
|
|
3651
|
-
|
|
3652
|
-
|
|
3653
|
-
|
|
3654
|
-
|
|
3655
|
-
|
|
3656
|
-
|
|
3657
|
-
|
|
3658
|
-
|
|
3659
|
-
|
|
3660
|
-
|
|
3661
|
-
|
|
3662
|
-
|
|
3663
|
-
|
|
3664
|
-
|
|
3665
|
-
|
|
3666
|
-
|
|
3667
|
-
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
|
|
3671
|
-
|
|
3672
|
-
|
|
3673
|
-
|
|
3674
|
-
|
|
3675
|
-
|
|
3676
|
-
|
|
3677
|
-
|
|
3678
|
-
|
|
3679
|
-
|
|
3680
|
-
|
|
3681
|
-
|
|
3682
|
-
|
|
3683
|
-
|
|
3684
|
-
|
|
3685
|
-
|
|
3686
|
-
|
|
3687
|
-
|
|
3688
|
-
|
|
3689
|
-
|
|
3690
|
-
|
|
3691
|
-
|
|
3692
|
-
|
|
3693
|
-
|
|
3694
|
-
|
|
3843
|
+
* Lists reactions to a message. For an example, see
|
|
3844
|
+
* [List reactions for a
|
|
3845
|
+
* message](https://developers.google.com/workspace/chat/list-reactions).
|
|
3846
|
+
*
|
|
3847
|
+
* Requires [user
|
|
3848
|
+
* authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
|
|
3849
|
+
* with one of the following [authorization
|
|
3850
|
+
* scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
|
|
3851
|
+
*
|
|
3852
|
+
* - `https://www.googleapis.com/auth/chat.messages.reactions.readonly`
|
|
3853
|
+
* - `https://www.googleapis.com/auth/chat.messages.reactions`
|
|
3854
|
+
* - `https://www.googleapis.com/auth/chat.messages.readonly`
|
|
3855
|
+
* - `https://www.googleapis.com/auth/chat.messages`
|
|
3856
|
+
*
|
|
3857
|
+
* @param {Object} request
|
|
3858
|
+
* The request object that will be sent.
|
|
3859
|
+
* @param {string} request.parent
|
|
3860
|
+
* Required. The message users reacted to.
|
|
3861
|
+
*
|
|
3862
|
+
* Format: `spaces/{space}/messages/{message}`
|
|
3863
|
+
* @param {number} [request.pageSize]
|
|
3864
|
+
* Optional. The maximum number of reactions returned. The service can return
|
|
3865
|
+
* fewer reactions than this value. If unspecified, the default value is 25.
|
|
3866
|
+
* The maximum value is 200; values above 200 are changed to 200.
|
|
3867
|
+
* @param {string} [request.pageToken]
|
|
3868
|
+
* Optional. (If resuming from a previous query.)
|
|
3869
|
+
*
|
|
3870
|
+
* A page token received from a previous list reactions call. Provide this
|
|
3871
|
+
* to retrieve the subsequent page.
|
|
3872
|
+
*
|
|
3873
|
+
* When paginating, the filter value should match the call that provided the
|
|
3874
|
+
* page token. Passing a different value might lead to unexpected results.
|
|
3875
|
+
* @param {string} [request.filter]
|
|
3876
|
+
* Optional. A query filter.
|
|
3877
|
+
*
|
|
3878
|
+
* You can filter reactions by
|
|
3879
|
+
* [emoji](https://developers.google.com/workspace/chat/api/reference/rest/v1/Emoji)
|
|
3880
|
+
* (either `emoji.unicode` or `emoji.custom_emoji.uid`) and
|
|
3881
|
+
* [user](https://developers.google.com/workspace/chat/api/reference/rest/v1/User)
|
|
3882
|
+
* (`user.name`).
|
|
3883
|
+
*
|
|
3884
|
+
* To filter reactions for multiple emojis or users, join similar fields
|
|
3885
|
+
* with the `OR` operator, such as `emoji.unicode = "🙂" OR emoji.unicode =
|
|
3886
|
+
* "👍"` and `user.name = "users/AAAAAA" OR user.name = "users/BBBBBB"`.
|
|
3887
|
+
*
|
|
3888
|
+
* To filter reactions by emoji and user, use the `AND` operator, such as
|
|
3889
|
+
* `emoji.unicode = "🙂" AND user.name = "users/AAAAAA"`.
|
|
3890
|
+
*
|
|
3891
|
+
* If your query uses both `AND` and `OR`, group them with parentheses.
|
|
3892
|
+
*
|
|
3893
|
+
* For example, the following queries are valid:
|
|
3894
|
+
*
|
|
3895
|
+
* ```
|
|
3896
|
+
* user.name = "users/{user}"
|
|
3897
|
+
* emoji.unicode = "🙂"
|
|
3898
|
+
* emoji.custom_emoji.uid = "{uid}"
|
|
3899
|
+
* emoji.unicode = "🙂" OR emoji.unicode = "👍"
|
|
3900
|
+
* emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}"
|
|
3901
|
+
* emoji.unicode = "🙂" AND user.name = "users/{user}"
|
|
3902
|
+
* (emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}")
|
|
3903
|
+
* AND user.name = "users/{user}"
|
|
3904
|
+
* ```
|
|
3905
|
+
*
|
|
3906
|
+
* The following queries are invalid:
|
|
3907
|
+
*
|
|
3908
|
+
* ```
|
|
3909
|
+
* emoji.unicode = "🙂" AND emoji.unicode = "👍"
|
|
3910
|
+
* emoji.unicode = "🙂" AND emoji.custom_emoji.uid = "{uid}"
|
|
3911
|
+
* emoji.unicode = "🙂" OR user.name = "users/{user}"
|
|
3912
|
+
* emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}" OR
|
|
3913
|
+
* user.name = "users/{user}"
|
|
3914
|
+
* emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}"
|
|
3915
|
+
* AND user.name = "users/{user}"
|
|
3916
|
+
* ```
|
|
3917
|
+
*
|
|
3918
|
+
* Invalid queries are rejected with an `INVALID_ARGUMENT` error.
|
|
3919
|
+
* @param {object} [options]
|
|
3920
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
3921
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
3922
|
+
* The first element of the array is Array of {@link protos.google.chat.v1.Reaction|Reaction}.
|
|
3923
|
+
* The client library will perform auto-pagination by default: it will call the API as many
|
|
3924
|
+
* times as needed and will merge results from all the pages into this array.
|
|
3925
|
+
* Note that it can affect your quota.
|
|
3926
|
+
* We recommend using `listReactionsAsync()`
|
|
3927
|
+
* method described below for async iteration which you can stop as needed.
|
|
3928
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
3929
|
+
* for more details and examples.
|
|
3930
|
+
*/
|
|
3695
3931
|
listReactions(request?: protos.google.chat.v1.IListReactionsRequest, options?: CallOptions): Promise<[
|
|
3696
3932
|
protos.google.chat.v1.IReaction[],
|
|
3697
3933
|
protos.google.chat.v1.IListReactionsRequest | null,
|
|
@@ -3828,92 +4064,92 @@ export declare class ChatServiceClient {
|
|
|
3828
4064
|
* AND user.name = "users/{user}"
|
|
3829
4065
|
* ```
|
|
3830
4066
|
*
|
|
3831
|
-
* The following queries are invalid:
|
|
4067
|
+
* The following queries are invalid:
|
|
4068
|
+
*
|
|
4069
|
+
* ```
|
|
4070
|
+
* emoji.unicode = "🙂" AND emoji.unicode = "👍"
|
|
4071
|
+
* emoji.unicode = "🙂" AND emoji.custom_emoji.uid = "{uid}"
|
|
4072
|
+
* emoji.unicode = "🙂" OR user.name = "users/{user}"
|
|
4073
|
+
* emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}" OR
|
|
4074
|
+
* user.name = "users/{user}"
|
|
4075
|
+
* emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}"
|
|
4076
|
+
* AND user.name = "users/{user}"
|
|
4077
|
+
* ```
|
|
4078
|
+
*
|
|
4079
|
+
* Invalid queries are rejected with an `INVALID_ARGUMENT` error.
|
|
4080
|
+
* @param {object} [options]
|
|
4081
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
4082
|
+
* @returns {Object}
|
|
4083
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
|
4084
|
+
* When you iterate the returned iterable, each element will be an object representing
|
|
4085
|
+
* {@link protos.google.chat.v1.Reaction|Reaction}. The API will be called under the hood as needed, once per the page,
|
|
4086
|
+
* so you can stop the iteration when you don't need more results.
|
|
4087
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
4088
|
+
* for more details and examples.
|
|
4089
|
+
* @example <caption>include:samples/generated/v1/chat_service.list_reactions.js</caption>
|
|
4090
|
+
* region_tag:chat_v1_generated_ChatService_ListReactions_async
|
|
4091
|
+
*/
|
|
4092
|
+
listReactionsAsync(request?: protos.google.chat.v1.IListReactionsRequest, options?: CallOptions): AsyncIterable<protos.google.chat.v1.IReaction>;
|
|
4093
|
+
/**
|
|
4094
|
+
* Lists custom emojis visible to the authenticated user.
|
|
4095
|
+
*
|
|
4096
|
+
* Custom emojis are only available for Google Workspace accounts, and the
|
|
4097
|
+
* administrator must turn custom emojis on for the organization. For more
|
|
4098
|
+
* information, see [Learn about custom emojis in Google
|
|
4099
|
+
* Chat](https://support.google.com/chat/answer/12800149) and
|
|
4100
|
+
* [Manage custom emoji
|
|
4101
|
+
* permissions](https://support.google.com/a/answer/12850085).
|
|
4102
|
+
*
|
|
4103
|
+
* Requires [user
|
|
4104
|
+
* authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
|
|
4105
|
+
* with one of the following [authorization
|
|
4106
|
+
* scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
|
|
4107
|
+
*
|
|
4108
|
+
* - `https://www.googleapis.com/auth/chat.customemojis.readonly`
|
|
4109
|
+
* - `https://www.googleapis.com/auth/chat.customemojis`
|
|
4110
|
+
*
|
|
4111
|
+
* @param {Object} request
|
|
4112
|
+
* The request object that will be sent.
|
|
4113
|
+
* @param {number} [request.pageSize]
|
|
4114
|
+
* Optional. The maximum number of custom emojis returned. The service can
|
|
4115
|
+
* return fewer custom emojis than this value. If unspecified, the default
|
|
4116
|
+
* value is 25. The maximum value is 200; values above 200 are changed to 200.
|
|
4117
|
+
* @param {string} [request.pageToken]
|
|
4118
|
+
* Optional. (If resuming from a previous query.)
|
|
4119
|
+
*
|
|
4120
|
+
* A page token received from a previous list custom emoji call. Provide this
|
|
4121
|
+
* to retrieve the subsequent page.
|
|
4122
|
+
*
|
|
4123
|
+
* When paginating, the filter value should match the call that provided the
|
|
4124
|
+
* page token. Passing a different value might lead to unexpected results.
|
|
4125
|
+
* @param {string} [request.filter]
|
|
4126
|
+
* Optional. A query filter.
|
|
4127
|
+
*
|
|
4128
|
+
* Supports filtering by creator.
|
|
4129
|
+
*
|
|
4130
|
+
* To filter by creator, you must specify a valid value. Currently only
|
|
4131
|
+
* `creator("users/me")` and `NOT creator("users/me")` are accepted to filter
|
|
4132
|
+
* custom emojis by whether they were created by the calling user or not.
|
|
3832
4133
|
*
|
|
4134
|
+
* For example, the following query returns custom emojis created by the
|
|
4135
|
+
* caller:
|
|
3833
4136
|
* ```
|
|
3834
|
-
*
|
|
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}"
|
|
4137
|
+
* creator("users/me")
|
|
3841
4138
|
* ```
|
|
3842
4139
|
*
|
|
3843
4140
|
* Invalid queries are rejected with an `INVALID_ARGUMENT` error.
|
|
3844
4141
|
* @param {object} [options]
|
|
3845
4142
|
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
3846
|
-
* @returns {
|
|
3847
|
-
*
|
|
3848
|
-
*
|
|
3849
|
-
*
|
|
3850
|
-
*
|
|
4143
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
4144
|
+
* The first element of the array is Array of {@link protos.google.chat.v1.CustomEmoji|CustomEmoji}.
|
|
4145
|
+
* The client library will perform auto-pagination by default: it will call the API as many
|
|
4146
|
+
* times as needed and will merge results from all the pages into this array.
|
|
4147
|
+
* Note that it can affect your quota.
|
|
4148
|
+
* We recommend using `listCustomEmojisAsync()`
|
|
4149
|
+
* method described below for async iteration which you can stop as needed.
|
|
3851
4150
|
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
3852
4151
|
* 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
4152
|
*/
|
|
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.
|
|
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:
|
|
3900
|
-
* ```
|
|
3901
|
-
* creator("users/me")
|
|
3902
|
-
* ```
|
|
3903
|
-
*
|
|
3904
|
-
* Invalid queries are rejected with an `INVALID_ARGUMENT` error.
|
|
3905
|
-
* @param {object} [options]
|
|
3906
|
-
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
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.
|
|
3914
|
-
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
3915
|
-
* for more details and examples.
|
|
3916
|
-
*/
|
|
3917
4153
|
listCustomEmojis(request?: protos.google.chat.v1.IListCustomEmojisRequest, options?: CallOptions): Promise<[
|
|
3918
4154
|
protos.google.chat.v1.ICustomEmoji[],
|
|
3919
4155
|
protos.google.chat.v1.IListCustomEmojisRequest | null,
|
|
@@ -4013,134 +4249,134 @@ export declare class ChatServiceClient {
|
|
|
4013
4249
|
*/
|
|
4014
4250
|
listCustomEmojisAsync(request?: protos.google.chat.v1.IListCustomEmojisRequest, options?: CallOptions): AsyncIterable<protos.google.chat.v1.ICustomEmoji>;
|
|
4015
4251
|
/**
|
|
4016
|
-
|
|
4017
|
-
|
|
4018
|
-
|
|
4019
|
-
|
|
4020
|
-
|
|
4021
|
-
|
|
4022
|
-
|
|
4023
|
-
|
|
4024
|
-
|
|
4025
|
-
|
|
4026
|
-
|
|
4027
|
-
|
|
4028
|
-
|
|
4029
|
-
|
|
4030
|
-
|
|
4031
|
-
|
|
4032
|
-
|
|
4033
|
-
|
|
4034
|
-
|
|
4035
|
-
|
|
4036
|
-
|
|
4037
|
-
|
|
4038
|
-
|
|
4039
|
-
|
|
4040
|
-
|
|
4041
|
-
|
|
4042
|
-
|
|
4043
|
-
|
|
4044
|
-
|
|
4045
|
-
|
|
4046
|
-
|
|
4047
|
-
|
|
4048
|
-
|
|
4049
|
-
|
|
4050
|
-
|
|
4051
|
-
|
|
4052
|
-
|
|
4053
|
-
|
|
4054
|
-
|
|
4055
|
-
|
|
4056
|
-
|
|
4057
|
-
|
|
4058
|
-
|
|
4059
|
-
|
|
4060
|
-
|
|
4061
|
-
|
|
4062
|
-
|
|
4063
|
-
|
|
4064
|
-
|
|
4065
|
-
|
|
4066
|
-
|
|
4067
|
-
|
|
4068
|
-
|
|
4069
|
-
|
|
4070
|
-
|
|
4071
|
-
|
|
4072
|
-
|
|
4073
|
-
|
|
4074
|
-
|
|
4075
|
-
|
|
4076
|
-
|
|
4077
|
-
|
|
4078
|
-
|
|
4079
|
-
|
|
4080
|
-
|
|
4081
|
-
|
|
4082
|
-
|
|
4083
|
-
|
|
4084
|
-
|
|
4085
|
-
|
|
4086
|
-
|
|
4087
|
-
|
|
4088
|
-
|
|
4089
|
-
|
|
4090
|
-
|
|
4091
|
-
|
|
4092
|
-
|
|
4093
|
-
|
|
4094
|
-
|
|
4095
|
-
|
|
4096
|
-
|
|
4097
|
-
|
|
4098
|
-
|
|
4099
|
-
|
|
4100
|
-
|
|
4101
|
-
|
|
4102
|
-
|
|
4103
|
-
|
|
4104
|
-
|
|
4105
|
-
|
|
4106
|
-
|
|
4107
|
-
|
|
4108
|
-
|
|
4109
|
-
|
|
4110
|
-
|
|
4111
|
-
|
|
4112
|
-
|
|
4113
|
-
|
|
4114
|
-
|
|
4115
|
-
|
|
4116
|
-
|
|
4117
|
-
|
|
4118
|
-
|
|
4119
|
-
|
|
4120
|
-
|
|
4121
|
-
|
|
4122
|
-
|
|
4123
|
-
|
|
4124
|
-
|
|
4125
|
-
|
|
4126
|
-
|
|
4127
|
-
|
|
4128
|
-
|
|
4129
|
-
|
|
4130
|
-
|
|
4131
|
-
|
|
4132
|
-
|
|
4133
|
-
|
|
4134
|
-
|
|
4135
|
-
|
|
4136
|
-
|
|
4137
|
-
|
|
4138
|
-
|
|
4139
|
-
|
|
4140
|
-
|
|
4141
|
-
|
|
4142
|
-
|
|
4143
|
-
|
|
4252
|
+
* Lists events from a Google Chat space. For each event, the
|
|
4253
|
+
* [payload](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.spaceEvents#SpaceEvent.FIELDS.oneof_payload)
|
|
4254
|
+
* contains the most recent version of the Chat resource. For example, if you
|
|
4255
|
+
* list events about new space members, the server returns `Membership`
|
|
4256
|
+
* resources that contain the latest membership details. If new members were
|
|
4257
|
+
* removed during the requested period, the event payload contains an empty
|
|
4258
|
+
* `Membership` resource.
|
|
4259
|
+
*
|
|
4260
|
+
* Supports the following types of
|
|
4261
|
+
* [authentication](https://developers.google.com/workspace/chat/authenticate-authorize)
|
|
4262
|
+
* with an
|
|
4263
|
+
* [authorization
|
|
4264
|
+
* scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes)
|
|
4265
|
+
* appropriate for reading the requested data:
|
|
4266
|
+
*
|
|
4267
|
+
* - [App
|
|
4268
|
+
* authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
|
|
4269
|
+
* with [administrator
|
|
4270
|
+
* approval](https://support.google.com/a?p=chat-app-auth)
|
|
4271
|
+
* with one of the following authorization scopes:
|
|
4272
|
+
* - `https://www.googleapis.com/auth/chat.app.spaces`
|
|
4273
|
+
* - `https://www.googleapis.com/auth/chat.app.spaces.readonly`
|
|
4274
|
+
* - `https://www.googleapis.com/auth/chat.app.messages.readonly`
|
|
4275
|
+
* - `https://www.googleapis.com/auth/chat.app.memberships`
|
|
4276
|
+
* - `https://www.googleapis.com/auth/chat.app.memberships.readonly`
|
|
4277
|
+
*
|
|
4278
|
+
* - [User
|
|
4279
|
+
* authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
|
|
4280
|
+
* with one of the following authorization scopes:
|
|
4281
|
+
* - `https://www.googleapis.com/auth/chat.spaces.readonly`
|
|
4282
|
+
* - `https://www.googleapis.com/auth/chat.spaces`
|
|
4283
|
+
* - `https://www.googleapis.com/auth/chat.messages.readonly`
|
|
4284
|
+
* - `https://www.googleapis.com/auth/chat.messages`
|
|
4285
|
+
* - `https://www.googleapis.com/auth/chat.messages.reactions.readonly`
|
|
4286
|
+
* - `https://www.googleapis.com/auth/chat.messages.reactions`
|
|
4287
|
+
* - `https://www.googleapis.com/auth/chat.memberships.readonly`
|
|
4288
|
+
* - `https://www.googleapis.com/auth/chat.memberships`
|
|
4289
|
+
*
|
|
4290
|
+
* To list events, the authenticated caller must be a member of the space.
|
|
4291
|
+
*
|
|
4292
|
+
* For an example, see [List events from a Google Chat
|
|
4293
|
+
* space](https://developers.google.com/workspace/chat/list-space-events).
|
|
4294
|
+
*
|
|
4295
|
+
* @param {Object} request
|
|
4296
|
+
* The request object that will be sent.
|
|
4297
|
+
* @param {string} request.parent
|
|
4298
|
+
* Required. Resource name of the [Google Chat
|
|
4299
|
+
* space](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces)
|
|
4300
|
+
* where the events occurred.
|
|
4301
|
+
*
|
|
4302
|
+
* Format: `spaces/{space}`.
|
|
4303
|
+
* @param {number} [request.pageSize]
|
|
4304
|
+
* Optional. The maximum number of space events returned. The service might
|
|
4305
|
+
* return fewer than this value.
|
|
4306
|
+
*
|
|
4307
|
+
* Negative values return an `INVALID_ARGUMENT` error.
|
|
4308
|
+
* @param {string} [request.pageToken]
|
|
4309
|
+
* Optional. A page token, received from a previous list space events call.
|
|
4310
|
+
* Provide this to retrieve the subsequent page.
|
|
4311
|
+
*
|
|
4312
|
+
* When paginating, all other parameters provided to list space events must
|
|
4313
|
+
* match the call that provided the page token. Passing different values to
|
|
4314
|
+
* the other parameters might lead to unexpected results.
|
|
4315
|
+
* @param {string} request.filter
|
|
4316
|
+
* Required. A query filter.
|
|
4317
|
+
*
|
|
4318
|
+
* You must specify at least one event type (`event_type`)
|
|
4319
|
+
* using the has `:` operator. To filter by multiple event types, use the `OR`
|
|
4320
|
+
* operator. Omit batch event types in your filter. The request automatically
|
|
4321
|
+
* returns any related batch events. For example, if you filter by new
|
|
4322
|
+
* reactions
|
|
4323
|
+
* (`google.workspace.chat.reaction.v1.created`), the server also returns
|
|
4324
|
+
* batch new reactions events
|
|
4325
|
+
* (`google.workspace.chat.reaction.v1.batchCreated`). For a list of supported
|
|
4326
|
+
* event types, see the [`SpaceEvents` reference
|
|
4327
|
+
* documentation](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.spaceEvents#SpaceEvent.FIELDS.event_type).
|
|
4328
|
+
*
|
|
4329
|
+
* Optionally, you can also filter by start time (`start_time`) and
|
|
4330
|
+
* end time (`end_time`):
|
|
4331
|
+
*
|
|
4332
|
+
* * `start_time`: Exclusive timestamp from which to start listing space
|
|
4333
|
+
* events.
|
|
4334
|
+
* You can list events that occurred up to 28 days ago. If unspecified, lists
|
|
4335
|
+
* space events from the past 28 days.
|
|
4336
|
+
* * `end_time`: Inclusive timestamp until which space events are listed.
|
|
4337
|
+
* If unspecified, lists events up to the time of the request.
|
|
4338
|
+
*
|
|
4339
|
+
* To specify a start or end time, use the equals `=` operator and format in
|
|
4340
|
+
* [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339). To filter by both
|
|
4341
|
+
* `start_time` and `end_time`, use the `AND` operator.
|
|
4342
|
+
*
|
|
4343
|
+
* For example, the following queries are valid:
|
|
4344
|
+
*
|
|
4345
|
+
* ```
|
|
4346
|
+
* start_time="2023-08-23T19:20:33+00:00" AND
|
|
4347
|
+
* end_time="2023-08-23T19:21:54+00:00"
|
|
4348
|
+
* ```
|
|
4349
|
+
* ```
|
|
4350
|
+
* start_time="2023-08-23T19:20:33+00:00" AND
|
|
4351
|
+
* (event_types:"google.workspace.chat.space.v1.updated" OR
|
|
4352
|
+
* event_types:"google.workspace.chat.message.v1.created")
|
|
4353
|
+
* ```
|
|
4354
|
+
*
|
|
4355
|
+
* The following queries are invalid:
|
|
4356
|
+
*
|
|
4357
|
+
* ```
|
|
4358
|
+
* start_time="2023-08-23T19:20:33+00:00" OR
|
|
4359
|
+
* end_time="2023-08-23T19:21:54+00:00"
|
|
4360
|
+
* ```
|
|
4361
|
+
* ```
|
|
4362
|
+
* event_types:"google.workspace.chat.space.v1.updated" AND
|
|
4363
|
+
* event_types:"google.workspace.chat.message.v1.created"
|
|
4364
|
+
* ```
|
|
4365
|
+
*
|
|
4366
|
+
* Invalid queries are rejected by the server with an `INVALID_ARGUMENT`
|
|
4367
|
+
* error.
|
|
4368
|
+
* @param {object} [options]
|
|
4369
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
4370
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
4371
|
+
* The first element of the array is Array of {@link protos.google.chat.v1.SpaceEvent|SpaceEvent}.
|
|
4372
|
+
* The client library will perform auto-pagination by default: it will call the API as many
|
|
4373
|
+
* times as needed and will merge results from all the pages into this array.
|
|
4374
|
+
* Note that it can affect your quota.
|
|
4375
|
+
* We recommend using `listSpaceEventsAsync()`
|
|
4376
|
+
* method described below for async iteration which you can stop as needed.
|
|
4377
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
4378
|
+
* for more details and examples.
|
|
4379
|
+
*/
|
|
4144
4380
|
listSpaceEvents(request?: protos.google.chat.v1.IListSpaceEventsRequest, options?: CallOptions): Promise<[
|
|
4145
4381
|
protos.google.chat.v1.ISpaceEvent[],
|
|
4146
4382
|
protos.google.chat.v1.IListSpaceEventsRequest | null,
|
|
@@ -4326,62 +4562,62 @@ export declare class ChatServiceClient {
|
|
|
4326
4562
|
*/
|
|
4327
4563
|
listSpaceEventsAsync(request?: protos.google.chat.v1.IListSpaceEventsRequest, options?: CallOptions): AsyncIterable<protos.google.chat.v1.ISpaceEvent>;
|
|
4328
4564
|
/**
|
|
4329
|
-
|
|
4330
|
-
|
|
4331
|
-
|
|
4332
|
-
|
|
4333
|
-
|
|
4334
|
-
|
|
4335
|
-
|
|
4336
|
-
|
|
4337
|
-
|
|
4338
|
-
|
|
4339
|
-
|
|
4340
|
-
|
|
4341
|
-
|
|
4342
|
-
|
|
4343
|
-
|
|
4344
|
-
|
|
4345
|
-
|
|
4346
|
-
|
|
4347
|
-
|
|
4348
|
-
|
|
4349
|
-
|
|
4350
|
-
|
|
4351
|
-
|
|
4352
|
-
|
|
4353
|
-
|
|
4354
|
-
|
|
4355
|
-
|
|
4356
|
-
|
|
4357
|
-
|
|
4358
|
-
|
|
4359
|
-
|
|
4360
|
-
|
|
4361
|
-
|
|
4362
|
-
|
|
4363
|
-
|
|
4364
|
-
|
|
4365
|
-
|
|
4366
|
-
|
|
4367
|
-
|
|
4368
|
-
|
|
4369
|
-
|
|
4370
|
-
|
|
4371
|
-
|
|
4372
|
-
|
|
4373
|
-
|
|
4374
|
-
|
|
4375
|
-
|
|
4376
|
-
|
|
4377
|
-
|
|
4378
|
-
|
|
4379
|
-
|
|
4380
|
-
|
|
4381
|
-
|
|
4382
|
-
|
|
4383
|
-
|
|
4384
|
-
|
|
4565
|
+
* Lists sections available to the Chat user. Sections help users group their
|
|
4566
|
+
* conversations and customize the list of spaces displayed in Chat
|
|
4567
|
+
* navigation panel. For details, see [Create and organize sections in Google
|
|
4568
|
+
* Chat](https://support.google.com/chat/answer/16059854).
|
|
4569
|
+
*
|
|
4570
|
+
* Requires [user
|
|
4571
|
+
* authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
|
|
4572
|
+
* with the [authorization
|
|
4573
|
+
* scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
|
|
4574
|
+
*
|
|
4575
|
+
* - `https://www.googleapis.com/auth/chat.users.sections`
|
|
4576
|
+
* - `https://www.googleapis.com/auth/chat.users.sections.readonly`
|
|
4577
|
+
*
|
|
4578
|
+
* @param {Object} request
|
|
4579
|
+
* The request object that will be sent.
|
|
4580
|
+
* @param {string} request.parent
|
|
4581
|
+
* Required. The parent, which is the user resource name that owns this
|
|
4582
|
+
* collection of sections. Only supports listing sections for the calling
|
|
4583
|
+
* user. To refer to the calling user, set one of the following:
|
|
4584
|
+
*
|
|
4585
|
+
* - The `me` alias. For example, `users/me`.
|
|
4586
|
+
*
|
|
4587
|
+
* - Their Workspace email address. For example, `users/user@example.com`.
|
|
4588
|
+
*
|
|
4589
|
+
* - Their user id. For example, `users/123456789`.
|
|
4590
|
+
*
|
|
4591
|
+
* Format: `users/{user}`
|
|
4592
|
+
* @param {number} [request.pageSize]
|
|
4593
|
+
* Optional. The maximum number of sections to return. The service may return
|
|
4594
|
+
* fewer than this value.
|
|
4595
|
+
*
|
|
4596
|
+
* If unspecified, at most 10 sections will be returned.
|
|
4597
|
+
*
|
|
4598
|
+
* The maximum value is 100. If you use a value more than 100, it's
|
|
4599
|
+
* automatically changed to 100.
|
|
4600
|
+
*
|
|
4601
|
+
* Negative values return an `INVALID_ARGUMENT` error.
|
|
4602
|
+
* @param {string} [request.pageToken]
|
|
4603
|
+
* Optional. A page token, received from a previous list sections call.
|
|
4604
|
+
* Provide this to retrieve the subsequent page.
|
|
4605
|
+
*
|
|
4606
|
+
* When paginating, all other parameters provided should match the call that
|
|
4607
|
+
* provided the page token. Passing different values to the other parameters
|
|
4608
|
+
* might lead to unexpected results.
|
|
4609
|
+
* @param {object} [options]
|
|
4610
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
4611
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
4612
|
+
* The first element of the array is Array of {@link protos.google.chat.v1.Section|Section}.
|
|
4613
|
+
* The client library will perform auto-pagination by default: it will call the API as many
|
|
4614
|
+
* times as needed and will merge results from all the pages into this array.
|
|
4615
|
+
* Note that it can affect your quota.
|
|
4616
|
+
* We recommend using `listSectionsAsync()`
|
|
4617
|
+
* method described below for async iteration which you can stop as needed.
|
|
4618
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
4619
|
+
* for more details and examples.
|
|
4620
|
+
*/
|
|
4385
4621
|
listSections(request?: protos.google.chat.v1.IListSectionsRequest, options?: CallOptions): Promise<[
|
|
4386
4622
|
protos.google.chat.v1.ISection[],
|
|
4387
4623
|
protos.google.chat.v1.IListSectionsRequest | null,
|
|
@@ -4483,67 +4719,67 @@ export declare class ChatServiceClient {
|
|
|
4483
4719
|
*/
|
|
4484
4720
|
listSectionsAsync(request?: protos.google.chat.v1.IListSectionsRequest, options?: CallOptions): AsyncIterable<protos.google.chat.v1.ISection>;
|
|
4485
4721
|
/**
|
|
4486
|
-
|
|
4487
|
-
|
|
4488
|
-
|
|
4489
|
-
|
|
4490
|
-
|
|
4491
|
-
|
|
4492
|
-
|
|
4493
|
-
|
|
4494
|
-
|
|
4495
|
-
|
|
4496
|
-
|
|
4497
|
-
|
|
4498
|
-
|
|
4499
|
-
|
|
4500
|
-
|
|
4501
|
-
|
|
4502
|
-
|
|
4503
|
-
|
|
4504
|
-
|
|
4505
|
-
|
|
4506
|
-
|
|
4507
|
-
|
|
4508
|
-
|
|
4509
|
-
|
|
4510
|
-
|
|
4511
|
-
|
|
4512
|
-
|
|
4513
|
-
|
|
4514
|
-
|
|
4515
|
-
|
|
4516
|
-
|
|
4517
|
-
|
|
4518
|
-
|
|
4519
|
-
|
|
4520
|
-
|
|
4521
|
-
|
|
4522
|
-
|
|
4523
|
-
|
|
4524
|
-
|
|
4525
|
-
|
|
4526
|
-
|
|
4527
|
-
|
|
4528
|
-
|
|
4529
|
-
|
|
4530
|
-
|
|
4531
|
-
|
|
4532
|
-
|
|
4533
|
-
|
|
4534
|
-
|
|
4535
|
-
|
|
4536
|
-
|
|
4537
|
-
|
|
4538
|
-
|
|
4539
|
-
|
|
4540
|
-
|
|
4541
|
-
|
|
4542
|
-
|
|
4543
|
-
|
|
4544
|
-
|
|
4545
|
-
|
|
4546
|
-
|
|
4722
|
+
* Lists items in a section.
|
|
4723
|
+
*
|
|
4724
|
+
* Only spaces can be section items. For details, see [Create and organize
|
|
4725
|
+
* sections in Google Chat](https://support.google.com/chat/answer/16059854).
|
|
4726
|
+
*
|
|
4727
|
+
* Requires [user
|
|
4728
|
+
* authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
|
|
4729
|
+
* with the [authorization
|
|
4730
|
+
* scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
|
|
4731
|
+
*
|
|
4732
|
+
* - `https://www.googleapis.com/auth/chat.users.sections`
|
|
4733
|
+
* - `https://www.googleapis.com/auth/chat.users.sections.readonly`
|
|
4734
|
+
*
|
|
4735
|
+
* @param {Object} request
|
|
4736
|
+
* The request object that will be sent.
|
|
4737
|
+
* @param {string} request.parent
|
|
4738
|
+
* Required. The parent, which is the section resource name that owns this
|
|
4739
|
+
* collection of section items. Only supports listing section items for the
|
|
4740
|
+
* calling user.
|
|
4741
|
+
*
|
|
4742
|
+
* When you're filtering by space, use the wildcard `-` to search across all
|
|
4743
|
+
* sections. For example, `users/{user}/sections/-`.
|
|
4744
|
+
*
|
|
4745
|
+
* Format: `users/{user}/sections/{section}`
|
|
4746
|
+
* @param {number} [request.pageSize]
|
|
4747
|
+
* Optional. The maximum number of section items to return. The service may
|
|
4748
|
+
* return fewer than this value.
|
|
4749
|
+
*
|
|
4750
|
+
* If unspecified, at most 10 section items will be returned.
|
|
4751
|
+
*
|
|
4752
|
+
* The maximum value is 100. If you use a value more than 100, it's
|
|
4753
|
+
* automatically changed to 100.
|
|
4754
|
+
*
|
|
4755
|
+
* Negative values return an `INVALID_ARGUMENT` error.
|
|
4756
|
+
* @param {string} [request.pageToken]
|
|
4757
|
+
* Optional. A page token, received from a previous list section items call.
|
|
4758
|
+
* Provide this to retrieve the subsequent page.
|
|
4759
|
+
*
|
|
4760
|
+
* When paginating, all other parameters provided should match the call that
|
|
4761
|
+
* provided the page token. Passing different values to the other parameters
|
|
4762
|
+
* might lead to unexpected results.
|
|
4763
|
+
* @param {string} [request.filter]
|
|
4764
|
+
* Optional. A query filter.
|
|
4765
|
+
*
|
|
4766
|
+
* Currently only supports filtering by space.
|
|
4767
|
+
*
|
|
4768
|
+
* For example, `space = spaces/{space}`.
|
|
4769
|
+
*
|
|
4770
|
+
* Invalid queries are rejected with an `INVALID_ARGUMENT` error.
|
|
4771
|
+
* @param {object} [options]
|
|
4772
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
4773
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
4774
|
+
* The first element of the array is Array of {@link protos.google.chat.v1.SectionItem|SectionItem}.
|
|
4775
|
+
* The client library will perform auto-pagination by default: it will call the API as many
|
|
4776
|
+
* times as needed and will merge results from all the pages into this array.
|
|
4777
|
+
* Note that it can affect your quota.
|
|
4778
|
+
* We recommend using `listSectionItemsAsync()`
|
|
4779
|
+
* method described below for async iteration which you can stop as needed.
|
|
4780
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
4781
|
+
* for more details and examples.
|
|
4782
|
+
*/
|
|
4547
4783
|
listSectionItems(request?: protos.google.chat.v1.IListSectionItemsRequest, options?: CallOptions): Promise<[
|
|
4548
4784
|
protos.google.chat.v1.ISectionItem[],
|
|
4549
4785
|
protos.google.chat.v1.IListSectionItemsRequest | null,
|
|
@@ -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
|
*
|