@google-apps/chat 0.7.0 → 0.9.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/CHANGELOG.md +14 -0
- package/README.md +1 -0
- package/build/protos/google/chat/v1/annotation.proto +29 -0
- package/build/protos/google/chat/v1/chat_service.proto +12 -0
- package/build/protos/google/chat/v1/membership.proto +69 -2
- package/build/protos/google/chat/v1/space.proto +201 -0
- package/build/protos/protos.d.ts +532 -2
- package/build/protos/protos.js +1412 -48
- package/build/protos/protos.json +156 -2
- package/build/src/v1/chat_service_client.d.ts +559 -6
- package/build/src/v1/chat_service_client.js +347 -4
- package/build/src/v1/chat_service_client.js.map +1 -1
- package/build/src/v1/chat_service_client_config.json +5 -0
- package/package.json +1 -1
|
@@ -213,6 +213,19 @@ export declare class ChatServiceClient {
|
|
|
213
213
|
* you can use the user's email as an alias for `{member}`. For example,
|
|
214
214
|
* `spaces/{space}/members/example@gmail.com` where `example@gmail.com` is the
|
|
215
215
|
* email of the Google Chat user.
|
|
216
|
+
* @param {boolean} request.useAdminAccess
|
|
217
|
+
* When `true`, the method runs using the user's Google Workspace
|
|
218
|
+
* administrator privileges.
|
|
219
|
+
*
|
|
220
|
+
* The calling user must be a Google Workspace administrator with the
|
|
221
|
+
* [manage chat and spaces conversations
|
|
222
|
+
* privilege](https://support.google.com/a/answer/13369245).
|
|
223
|
+
*
|
|
224
|
+
* Requires the `chat.admin.memberships` or `chat.admin.memberships.readonly`
|
|
225
|
+
* [OAuth 2.0
|
|
226
|
+
* scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes).
|
|
227
|
+
*
|
|
228
|
+
* Getting app memberships in a space isn't supported when using admin access.
|
|
216
229
|
* @param {object} [options]
|
|
217
230
|
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
218
231
|
* @returns {Promise} - The promise which resolves to an array.
|
|
@@ -466,6 +479,16 @@ export declare class ChatServiceClient {
|
|
|
466
479
|
* Required. Resource name of the space, in the form `spaces/{space}`.
|
|
467
480
|
*
|
|
468
481
|
* Format: `spaces/{space}`
|
|
482
|
+
* @param {boolean} request.useAdminAccess
|
|
483
|
+
* When `true`, the method runs using the user's Google Workspace
|
|
484
|
+
* administrator privileges.
|
|
485
|
+
*
|
|
486
|
+
* The calling user must be a Google Workspace administrator with the
|
|
487
|
+
* [manage chat and spaces conversations
|
|
488
|
+
* privilege](https://support.google.com/a/answer/13369245).
|
|
489
|
+
*
|
|
490
|
+
* Requires the `chat.admin.spaces` or `chat.admin.spaces.readonly` [OAuth 2.0
|
|
491
|
+
* scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes).
|
|
469
492
|
* @param {object} [options]
|
|
470
493
|
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
471
494
|
* @returns {Promise} - The promise which resolves to an array.
|
|
@@ -732,6 +755,19 @@ export declare class ChatServiceClient {
|
|
|
732
755
|
* `permission_settings.reply_messages`
|
|
733
756
|
* (Warning: mutually exclusive with all other non-permission settings field
|
|
734
757
|
* paths). `permission_settings` is not supported with admin access.
|
|
758
|
+
* @param {boolean} request.useAdminAccess
|
|
759
|
+
* When `true`, the method runs using the user's Google Workspace
|
|
760
|
+
* administrator privileges.
|
|
761
|
+
*
|
|
762
|
+
* The calling user must be a Google Workspace administrator with the
|
|
763
|
+
* [manage chat and spaces conversations
|
|
764
|
+
* privilege](https://support.google.com/a/answer/13369245).
|
|
765
|
+
*
|
|
766
|
+
* Requires the `chat.admin.spaces` [OAuth 2.0
|
|
767
|
+
* scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes).
|
|
768
|
+
*
|
|
769
|
+
* Some `FieldMask` values are not supported using admin access. For details,
|
|
770
|
+
* see the description of `update_mask`.
|
|
735
771
|
* @param {object} [options]
|
|
736
772
|
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
737
773
|
* @returns {Promise} - The promise which resolves to an array.
|
|
@@ -764,6 +800,16 @@ export declare class ChatServiceClient {
|
|
|
764
800
|
* Required. Resource name of the space to delete.
|
|
765
801
|
*
|
|
766
802
|
* Format: `spaces/{space}`
|
|
803
|
+
* @param {boolean} request.useAdminAccess
|
|
804
|
+
* When `true`, the method runs using the user's Google Workspace
|
|
805
|
+
* administrator privileges.
|
|
806
|
+
*
|
|
807
|
+
* The calling user must be a Google Workspace administrator with the
|
|
808
|
+
* [manage chat and spaces conversations
|
|
809
|
+
* privilege](https://support.google.com/a/answer/13369245).
|
|
810
|
+
*
|
|
811
|
+
* Requires the `chat.admin.delete` [OAuth 2.0
|
|
812
|
+
* scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes).
|
|
767
813
|
* @param {object} [options]
|
|
768
814
|
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
769
815
|
* @returns {Promise} - The promise which resolves to an array.
|
|
@@ -923,6 +969,20 @@ export declare class ChatServiceClient {
|
|
|
923
969
|
* `users/user@example.com` or `users/123456789`. When a Chat app creates a
|
|
924
970
|
* membership relation for itself, it must use the `chat.memberships.app`
|
|
925
971
|
* scope, set `user.type` to `BOT`, and set `user.name` to `users/app`.
|
|
972
|
+
* @param {boolean} request.useAdminAccess
|
|
973
|
+
* When `true`, the method runs using the user's Google Workspace
|
|
974
|
+
* administrator privileges.
|
|
975
|
+
*
|
|
976
|
+
* The calling user must be a Google Workspace administrator with the
|
|
977
|
+
* [manage chat and spaces conversations
|
|
978
|
+
* privilege](https://support.google.com/a/answer/13369245).
|
|
979
|
+
*
|
|
980
|
+
* Requires the `chat.admin.memberships` [OAuth 2.0
|
|
981
|
+
* scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes).
|
|
982
|
+
*
|
|
983
|
+
* Creating app memberships or creating memberships for users outside the
|
|
984
|
+
* administrator's Google Workspace organization isn't supported using admin
|
|
985
|
+
* access.
|
|
926
986
|
* @param {object} [options]
|
|
927
987
|
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
928
988
|
* @returns {Promise} - The promise which resolves to an array.
|
|
@@ -958,6 +1018,16 @@ export declare class ChatServiceClient {
|
|
|
958
1018
|
* Currently supported field paths:
|
|
959
1019
|
*
|
|
960
1020
|
* - `role`
|
|
1021
|
+
* @param {boolean} request.useAdminAccess
|
|
1022
|
+
* When `true`, the method runs using the user's Google Workspace
|
|
1023
|
+
* administrator privileges.
|
|
1024
|
+
*
|
|
1025
|
+
* The calling user must be a Google Workspace administrator with the
|
|
1026
|
+
* [manage chat and spaces conversations
|
|
1027
|
+
* privilege](https://support.google.com/a/answer/13369245).
|
|
1028
|
+
*
|
|
1029
|
+
* Requires the `chat.admin.memberships` [OAuth 2.0
|
|
1030
|
+
* scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes).
|
|
961
1031
|
* @param {object} [options]
|
|
962
1032
|
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
963
1033
|
* @returns {Promise} - The promise which resolves to an array.
|
|
@@ -999,6 +1069,18 @@ export declare class ChatServiceClient {
|
|
|
999
1069
|
* and `spaces/{space}/members/app` format.
|
|
1000
1070
|
*
|
|
1001
1071
|
* Format: `spaces/{space}/members/{member}` or `spaces/{space}/members/app`.
|
|
1072
|
+
* @param {boolean} request.useAdminAccess
|
|
1073
|
+
* When `true`, the method runs using the user's Google Workspace
|
|
1074
|
+
* administrator privileges.
|
|
1075
|
+
*
|
|
1076
|
+
* The calling user must be a Google Workspace administrator with the
|
|
1077
|
+
* [manage chat and spaces conversations
|
|
1078
|
+
* privilege](https://support.google.com/a/answer/13369245).
|
|
1079
|
+
*
|
|
1080
|
+
* Requires the `chat.admin.memberships` [OAuth 2.0
|
|
1081
|
+
* scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes).
|
|
1082
|
+
*
|
|
1083
|
+
* Deleting app memberships in a space isn't supported using admin access.
|
|
1002
1084
|
* @param {object} [options]
|
|
1003
1085
|
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
1004
1086
|
* @returns {Promise} - The promise which resolves to an array.
|
|
@@ -1601,8 +1683,8 @@ export declare class ChatServiceClient {
|
|
|
1601
1683
|
*
|
|
1602
1684
|
* To filter by role, set `role` to `ROLE_MEMBER` or `ROLE_MANAGER`.
|
|
1603
1685
|
*
|
|
1604
|
-
* To filter by type, set `member.type` to `HUMAN` or `BOT`.
|
|
1605
|
-
*
|
|
1686
|
+
* To filter by type, set `member.type` to `HUMAN` or `BOT`. You can also
|
|
1687
|
+
* filter for `member.type` using the `!=` operator.
|
|
1606
1688
|
*
|
|
1607
1689
|
* To filter by both role and type, use the `AND` operator. To filter by
|
|
1608
1690
|
* either role or type, use the `OR` operator.
|
|
@@ -1646,6 +1728,19 @@ export declare class ChatServiceClient {
|
|
|
1646
1728
|
*
|
|
1647
1729
|
* Currently requires [user
|
|
1648
1730
|
* authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
|
|
1731
|
+
* @param {boolean} request.useAdminAccess
|
|
1732
|
+
* When `true`, the method runs using the user's Google Workspace
|
|
1733
|
+
* administrator privileges.
|
|
1734
|
+
*
|
|
1735
|
+
* The calling user must be a Google Workspace administrator with the
|
|
1736
|
+
* [manage chat and spaces conversations
|
|
1737
|
+
* privilege](https://support.google.com/a/answer/13369245).
|
|
1738
|
+
*
|
|
1739
|
+
* Requires either the `chat.admin.memberships.readonly` or
|
|
1740
|
+
* `chat.admin.memberships` [OAuth 2.0
|
|
1741
|
+
* scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes).
|
|
1742
|
+
*
|
|
1743
|
+
* Listing app memberships in a space isn't supported when using admin access.
|
|
1649
1744
|
* @param {object} [options]
|
|
1650
1745
|
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
1651
1746
|
* @returns {Promise} - The promise which resolves to an array.
|
|
@@ -1701,8 +1796,8 @@ export declare class ChatServiceClient {
|
|
|
1701
1796
|
*
|
|
1702
1797
|
* To filter by role, set `role` to `ROLE_MEMBER` or `ROLE_MANAGER`.
|
|
1703
1798
|
*
|
|
1704
|
-
* To filter by type, set `member.type` to `HUMAN` or `BOT`.
|
|
1705
|
-
*
|
|
1799
|
+
* To filter by type, set `member.type` to `HUMAN` or `BOT`. You can also
|
|
1800
|
+
* filter for `member.type` using the `!=` operator.
|
|
1706
1801
|
*
|
|
1707
1802
|
* To filter by both role and type, use the `AND` operator. To filter by
|
|
1708
1803
|
* either role or type, use the `OR` operator.
|
|
@@ -1746,6 +1841,19 @@ export declare class ChatServiceClient {
|
|
|
1746
1841
|
*
|
|
1747
1842
|
* Currently requires [user
|
|
1748
1843
|
* authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
|
|
1844
|
+
* @param {boolean} request.useAdminAccess
|
|
1845
|
+
* When `true`, the method runs using the user's Google Workspace
|
|
1846
|
+
* administrator privileges.
|
|
1847
|
+
*
|
|
1848
|
+
* The calling user must be a Google Workspace administrator with the
|
|
1849
|
+
* [manage chat and spaces conversations
|
|
1850
|
+
* privilege](https://support.google.com/a/answer/13369245).
|
|
1851
|
+
*
|
|
1852
|
+
* Requires either the `chat.admin.memberships.readonly` or
|
|
1853
|
+
* `chat.admin.memberships` [OAuth 2.0
|
|
1854
|
+
* scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes).
|
|
1855
|
+
*
|
|
1856
|
+
* Listing app memberships in a space isn't supported when using admin access.
|
|
1749
1857
|
* @param {object} [options]
|
|
1750
1858
|
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
1751
1859
|
* @returns {Stream}
|
|
@@ -1796,8 +1904,8 @@ export declare class ChatServiceClient {
|
|
|
1796
1904
|
*
|
|
1797
1905
|
* To filter by role, set `role` to `ROLE_MEMBER` or `ROLE_MANAGER`.
|
|
1798
1906
|
*
|
|
1799
|
-
* To filter by type, set `member.type` to `HUMAN` or `BOT`.
|
|
1800
|
-
*
|
|
1907
|
+
* To filter by type, set `member.type` to `HUMAN` or `BOT`. You can also
|
|
1908
|
+
* filter for `member.type` using the `!=` operator.
|
|
1801
1909
|
*
|
|
1802
1910
|
* To filter by both role and type, use the `AND` operator. To filter by
|
|
1803
1911
|
* either role or type, use the `OR` operator.
|
|
@@ -1841,6 +1949,19 @@ export declare class ChatServiceClient {
|
|
|
1841
1949
|
*
|
|
1842
1950
|
* Currently requires [user
|
|
1843
1951
|
* authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
|
|
1952
|
+
* @param {boolean} request.useAdminAccess
|
|
1953
|
+
* When `true`, the method runs using the user's Google Workspace
|
|
1954
|
+
* administrator privileges.
|
|
1955
|
+
*
|
|
1956
|
+
* The calling user must be a Google Workspace administrator with the
|
|
1957
|
+
* [manage chat and spaces conversations
|
|
1958
|
+
* privilege](https://support.google.com/a/answer/13369245).
|
|
1959
|
+
*
|
|
1960
|
+
* Requires either the `chat.admin.memberships.readonly` or
|
|
1961
|
+
* `chat.admin.memberships` [OAuth 2.0
|
|
1962
|
+
* scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes).
|
|
1963
|
+
*
|
|
1964
|
+
* Listing app memberships in a space isn't supported when using admin access.
|
|
1844
1965
|
* @param {object} [options]
|
|
1845
1966
|
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
1846
1967
|
* @returns {Object}
|
|
@@ -2039,6 +2160,438 @@ export declare class ChatServiceClient {
|
|
|
2039
2160
|
* region_tag:chat_v1_generated_ChatService_ListSpaces_async
|
|
2040
2161
|
*/
|
|
2041
2162
|
listSpacesAsync(request?: protos.google.chat.v1.IListSpacesRequest, options?: CallOptions): AsyncIterable<protos.google.chat.v1.ISpace>;
|
|
2163
|
+
/**
|
|
2164
|
+
* Returns a list of spaces in a Google Workspace organization based on an
|
|
2165
|
+
* administrator's search. Requires [user
|
|
2166
|
+
* authentication with administrator
|
|
2167
|
+
* privileges](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user#admin-privileges).
|
|
2168
|
+
* In the request, set `use_admin_access` to `true`.
|
|
2169
|
+
*
|
|
2170
|
+
* @param {Object} request
|
|
2171
|
+
* The request object that will be sent.
|
|
2172
|
+
* @param {boolean} request.useAdminAccess
|
|
2173
|
+
* When `true`, the method runs using the user's Google Workspace
|
|
2174
|
+
* administrator privileges.
|
|
2175
|
+
*
|
|
2176
|
+
* The calling user must be a Google Workspace administrator with the
|
|
2177
|
+
* [manage chat and spaces conversations
|
|
2178
|
+
* privilege](https://support.google.com/a/answer/13369245).
|
|
2179
|
+
*
|
|
2180
|
+
* Requires either the `chat.admin.spaces.readonly` or `chat.admin.spaces`
|
|
2181
|
+
* [OAuth 2.0
|
|
2182
|
+
* scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes).
|
|
2183
|
+
*
|
|
2184
|
+
* This method currently only supports admin access, thus only `true` is
|
|
2185
|
+
* accepted for this field.
|
|
2186
|
+
* @param {number} request.pageSize
|
|
2187
|
+
* The maximum number of spaces to return. The service may return fewer than
|
|
2188
|
+
* this value.
|
|
2189
|
+
*
|
|
2190
|
+
* If unspecified, at most 100 spaces are returned.
|
|
2191
|
+
*
|
|
2192
|
+
* The maximum value is 1000. If you use a value more than 1000, it's
|
|
2193
|
+
* automatically changed to 1000.
|
|
2194
|
+
* @param {string} request.pageToken
|
|
2195
|
+
* A token, received from the previous search spaces call. Provide this
|
|
2196
|
+
* parameter to retrieve the subsequent page.
|
|
2197
|
+
*
|
|
2198
|
+
* When paginating, all other parameters provided should match the call that
|
|
2199
|
+
* provided the page token. Passing different values to the other parameters
|
|
2200
|
+
* might lead to unexpected results.
|
|
2201
|
+
* @param {string} request.query
|
|
2202
|
+
* Required. A search query.
|
|
2203
|
+
*
|
|
2204
|
+
* You can search by using the following parameters:
|
|
2205
|
+
*
|
|
2206
|
+
* - `create_time`
|
|
2207
|
+
* - `customer`
|
|
2208
|
+
* - `display_name`
|
|
2209
|
+
* - `external_user_allowed`
|
|
2210
|
+
* - `last_active_time`
|
|
2211
|
+
* - `space_history_state`
|
|
2212
|
+
* - `space_type`
|
|
2213
|
+
*
|
|
2214
|
+
* `create_time` and `last_active_time` accept a timestamp in
|
|
2215
|
+
* [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339) format and the supported
|
|
2216
|
+
* comparison operators are: `=`, `<`, `>`, `<=`, `>=`.
|
|
2217
|
+
*
|
|
2218
|
+
* `customer` is required and is used to indicate which customer
|
|
2219
|
+
* to fetch spaces from. `customers/my_customer` is the only supported value.
|
|
2220
|
+
*
|
|
2221
|
+
* `display_name` only accepts the `HAS` (`:`) operator. The text to
|
|
2222
|
+
* match is first tokenized into tokens and each token is prefix-matched
|
|
2223
|
+
* case-insensitively and independently as a substring anywhere in the space's
|
|
2224
|
+
* `display_name`. For example, `Fun Eve` matches `Fun event` or `The
|
|
2225
|
+
* evening was fun`, but not `notFun event` or `even`.
|
|
2226
|
+
*
|
|
2227
|
+
* `external_user_allowed` accepts either `true` or `false`.
|
|
2228
|
+
*
|
|
2229
|
+
* `space_history_state` only accepts values from the [`historyState`]
|
|
2230
|
+
* (https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.HistoryState)
|
|
2231
|
+
* field of a `space` resource.
|
|
2232
|
+
*
|
|
2233
|
+
* `space_type` is required and the only valid value is `SPACE`.
|
|
2234
|
+
*
|
|
2235
|
+
* Across different fields, only `AND` operators are supported. A valid
|
|
2236
|
+
* example is `space_type = "SPACE" AND display_name:"Hello"` and an invalid
|
|
2237
|
+
* example is `space_type = "SPACE" OR display_name:"Hello"`.
|
|
2238
|
+
*
|
|
2239
|
+
* Among the same field,
|
|
2240
|
+
* `space_type` doesn't support `AND` or `OR` operators.
|
|
2241
|
+
* `display_name`, 'space_history_state', and 'external_user_allowed' only
|
|
2242
|
+
* support `OR` operators.
|
|
2243
|
+
* `last_active_time` and `create_time` support both `AND` and `OR` operators.
|
|
2244
|
+
* `AND` can only be used to represent an interval, such as `last_active_time
|
|
2245
|
+
* < "2022-01-01T00:00:00+00:00" AND last_active_time >
|
|
2246
|
+
* "2023-01-01T00:00:00+00:00"`.
|
|
2247
|
+
*
|
|
2248
|
+
* The following example queries are valid:
|
|
2249
|
+
*
|
|
2250
|
+
* ```
|
|
2251
|
+
* customer = "customers/my_customer" AND space_type = "SPACE"
|
|
2252
|
+
*
|
|
2253
|
+
* customer = "customers/my_customer" AND space_type = "SPACE" AND
|
|
2254
|
+
* display_name:"Hello World"
|
|
2255
|
+
*
|
|
2256
|
+
* customer = "customers/my_customer" AND space_type = "SPACE" AND
|
|
2257
|
+
* (last_active_time < "2020-01-01T00:00:00+00:00" OR last_active_time >
|
|
2258
|
+
* "2022-01-01T00:00:00+00:00")
|
|
2259
|
+
*
|
|
2260
|
+
* customer = "customers/my_customer" AND space_type = "SPACE" AND
|
|
2261
|
+
* (display_name:"Hello World" OR display_name:"Fun event") AND
|
|
2262
|
+
* (last_active_time > "2020-01-01T00:00:00+00:00" AND last_active_time <
|
|
2263
|
+
* "2022-01-01T00:00:00+00:00")
|
|
2264
|
+
*
|
|
2265
|
+
* customer = "customers/my_customer" AND space_type = "SPACE" AND
|
|
2266
|
+
* (create_time > "2019-01-01T00:00:00+00:00" AND create_time <
|
|
2267
|
+
* "2020-01-01T00:00:00+00:00") AND (external_user_allowed = "true") AND
|
|
2268
|
+
* (space_history_state = "HISTORY_ON" OR space_history_state = "HISTORY_OFF")
|
|
2269
|
+
* ```
|
|
2270
|
+
* @param {string} [request.orderBy]
|
|
2271
|
+
* Optional. How the list of spaces is ordered.
|
|
2272
|
+
*
|
|
2273
|
+
* Supported attributes to order by are:
|
|
2274
|
+
*
|
|
2275
|
+
* - `membership_count.joined_direct_human_user_count` — Denotes the count of
|
|
2276
|
+
* human users that have directly joined a space.
|
|
2277
|
+
* - `last_active_time` — Denotes the time when last eligible item is added to
|
|
2278
|
+
* any topic of this space.
|
|
2279
|
+
* - `create_time` — Denotes the time of the space creation.
|
|
2280
|
+
*
|
|
2281
|
+
* Valid ordering operation values are:
|
|
2282
|
+
*
|
|
2283
|
+
* - `ASC` for ascending. Default value.
|
|
2284
|
+
*
|
|
2285
|
+
* - `DESC` for descending.
|
|
2286
|
+
*
|
|
2287
|
+
* The supported syntax are:
|
|
2288
|
+
*
|
|
2289
|
+
* - `membership_count.joined_direct_human_user_count DESC`
|
|
2290
|
+
* - `membership_count.joined_direct_human_user_count ASC`
|
|
2291
|
+
* - `last_active_time DESC`
|
|
2292
|
+
* - `last_active_time ASC`
|
|
2293
|
+
* - `create_time DESC`
|
|
2294
|
+
* - `create_time ASC`
|
|
2295
|
+
* @param {object} [options]
|
|
2296
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
2297
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
2298
|
+
* The first element of the array is Array of {@link protos.google.chat.v1.Space|Space}.
|
|
2299
|
+
* The client library will perform auto-pagination by default: it will call the API as many
|
|
2300
|
+
* times as needed and will merge results from all the pages into this array.
|
|
2301
|
+
* Note that it can affect your quota.
|
|
2302
|
+
* We recommend using `searchSpacesAsync()`
|
|
2303
|
+
* method described below for async iteration which you can stop as needed.
|
|
2304
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
2305
|
+
* for more details and examples.
|
|
2306
|
+
*/
|
|
2307
|
+
searchSpaces(request?: protos.google.chat.v1.ISearchSpacesRequest, options?: CallOptions): Promise<[
|
|
2308
|
+
protos.google.chat.v1.ISpace[],
|
|
2309
|
+
protos.google.chat.v1.ISearchSpacesRequest | null,
|
|
2310
|
+
protos.google.chat.v1.ISearchSpacesResponse
|
|
2311
|
+
]>;
|
|
2312
|
+
searchSpaces(request: protos.google.chat.v1.ISearchSpacesRequest, options: CallOptions, callback: PaginationCallback<protos.google.chat.v1.ISearchSpacesRequest, protos.google.chat.v1.ISearchSpacesResponse | null | undefined, protos.google.chat.v1.ISpace>): void;
|
|
2313
|
+
searchSpaces(request: protos.google.chat.v1.ISearchSpacesRequest, callback: PaginationCallback<protos.google.chat.v1.ISearchSpacesRequest, protos.google.chat.v1.ISearchSpacesResponse | null | undefined, protos.google.chat.v1.ISpace>): void;
|
|
2314
|
+
/**
|
|
2315
|
+
* Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object.
|
|
2316
|
+
* @param {Object} request
|
|
2317
|
+
* The request object that will be sent.
|
|
2318
|
+
* @param {boolean} request.useAdminAccess
|
|
2319
|
+
* When `true`, the method runs using the user's Google Workspace
|
|
2320
|
+
* administrator privileges.
|
|
2321
|
+
*
|
|
2322
|
+
* The calling user must be a Google Workspace administrator with the
|
|
2323
|
+
* [manage chat and spaces conversations
|
|
2324
|
+
* privilege](https://support.google.com/a/answer/13369245).
|
|
2325
|
+
*
|
|
2326
|
+
* Requires either the `chat.admin.spaces.readonly` or `chat.admin.spaces`
|
|
2327
|
+
* [OAuth 2.0
|
|
2328
|
+
* scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes).
|
|
2329
|
+
*
|
|
2330
|
+
* This method currently only supports admin access, thus only `true` is
|
|
2331
|
+
* accepted for this field.
|
|
2332
|
+
* @param {number} request.pageSize
|
|
2333
|
+
* The maximum number of spaces to return. The service may return fewer than
|
|
2334
|
+
* this value.
|
|
2335
|
+
*
|
|
2336
|
+
* If unspecified, at most 100 spaces are returned.
|
|
2337
|
+
*
|
|
2338
|
+
* The maximum value is 1000. If you use a value more than 1000, it's
|
|
2339
|
+
* automatically changed to 1000.
|
|
2340
|
+
* @param {string} request.pageToken
|
|
2341
|
+
* A token, received from the previous search spaces call. Provide this
|
|
2342
|
+
* parameter to retrieve the subsequent page.
|
|
2343
|
+
*
|
|
2344
|
+
* When paginating, all other parameters provided should match the call that
|
|
2345
|
+
* provided the page token. Passing different values to the other parameters
|
|
2346
|
+
* might lead to unexpected results.
|
|
2347
|
+
* @param {string} request.query
|
|
2348
|
+
* Required. A search query.
|
|
2349
|
+
*
|
|
2350
|
+
* You can search by using the following parameters:
|
|
2351
|
+
*
|
|
2352
|
+
* - `create_time`
|
|
2353
|
+
* - `customer`
|
|
2354
|
+
* - `display_name`
|
|
2355
|
+
* - `external_user_allowed`
|
|
2356
|
+
* - `last_active_time`
|
|
2357
|
+
* - `space_history_state`
|
|
2358
|
+
* - `space_type`
|
|
2359
|
+
*
|
|
2360
|
+
* `create_time` and `last_active_time` accept a timestamp in
|
|
2361
|
+
* [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339) format and the supported
|
|
2362
|
+
* comparison operators are: `=`, `<`, `>`, `<=`, `>=`.
|
|
2363
|
+
*
|
|
2364
|
+
* `customer` is required and is used to indicate which customer
|
|
2365
|
+
* to fetch spaces from. `customers/my_customer` is the only supported value.
|
|
2366
|
+
*
|
|
2367
|
+
* `display_name` only accepts the `HAS` (`:`) operator. The text to
|
|
2368
|
+
* match is first tokenized into tokens and each token is prefix-matched
|
|
2369
|
+
* case-insensitively and independently as a substring anywhere in the space's
|
|
2370
|
+
* `display_name`. For example, `Fun Eve` matches `Fun event` or `The
|
|
2371
|
+
* evening was fun`, but not `notFun event` or `even`.
|
|
2372
|
+
*
|
|
2373
|
+
* `external_user_allowed` accepts either `true` or `false`.
|
|
2374
|
+
*
|
|
2375
|
+
* `space_history_state` only accepts values from the [`historyState`]
|
|
2376
|
+
* (https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.HistoryState)
|
|
2377
|
+
* field of a `space` resource.
|
|
2378
|
+
*
|
|
2379
|
+
* `space_type` is required and the only valid value is `SPACE`.
|
|
2380
|
+
*
|
|
2381
|
+
* Across different fields, only `AND` operators are supported. A valid
|
|
2382
|
+
* example is `space_type = "SPACE" AND display_name:"Hello"` and an invalid
|
|
2383
|
+
* example is `space_type = "SPACE" OR display_name:"Hello"`.
|
|
2384
|
+
*
|
|
2385
|
+
* Among the same field,
|
|
2386
|
+
* `space_type` doesn't support `AND` or `OR` operators.
|
|
2387
|
+
* `display_name`, 'space_history_state', and 'external_user_allowed' only
|
|
2388
|
+
* support `OR` operators.
|
|
2389
|
+
* `last_active_time` and `create_time` support both `AND` and `OR` operators.
|
|
2390
|
+
* `AND` can only be used to represent an interval, such as `last_active_time
|
|
2391
|
+
* < "2022-01-01T00:00:00+00:00" AND last_active_time >
|
|
2392
|
+
* "2023-01-01T00:00:00+00:00"`.
|
|
2393
|
+
*
|
|
2394
|
+
* The following example queries are valid:
|
|
2395
|
+
*
|
|
2396
|
+
* ```
|
|
2397
|
+
* customer = "customers/my_customer" AND space_type = "SPACE"
|
|
2398
|
+
*
|
|
2399
|
+
* customer = "customers/my_customer" AND space_type = "SPACE" AND
|
|
2400
|
+
* display_name:"Hello World"
|
|
2401
|
+
*
|
|
2402
|
+
* customer = "customers/my_customer" AND space_type = "SPACE" AND
|
|
2403
|
+
* (last_active_time < "2020-01-01T00:00:00+00:00" OR last_active_time >
|
|
2404
|
+
* "2022-01-01T00:00:00+00:00")
|
|
2405
|
+
*
|
|
2406
|
+
* customer = "customers/my_customer" AND space_type = "SPACE" AND
|
|
2407
|
+
* (display_name:"Hello World" OR display_name:"Fun event") AND
|
|
2408
|
+
* (last_active_time > "2020-01-01T00:00:00+00:00" AND last_active_time <
|
|
2409
|
+
* "2022-01-01T00:00:00+00:00")
|
|
2410
|
+
*
|
|
2411
|
+
* customer = "customers/my_customer" AND space_type = "SPACE" AND
|
|
2412
|
+
* (create_time > "2019-01-01T00:00:00+00:00" AND create_time <
|
|
2413
|
+
* "2020-01-01T00:00:00+00:00") AND (external_user_allowed = "true") AND
|
|
2414
|
+
* (space_history_state = "HISTORY_ON" OR space_history_state = "HISTORY_OFF")
|
|
2415
|
+
* ```
|
|
2416
|
+
* @param {string} [request.orderBy]
|
|
2417
|
+
* Optional. How the list of spaces is ordered.
|
|
2418
|
+
*
|
|
2419
|
+
* Supported attributes to order by are:
|
|
2420
|
+
*
|
|
2421
|
+
* - `membership_count.joined_direct_human_user_count` — Denotes the count of
|
|
2422
|
+
* human users that have directly joined a space.
|
|
2423
|
+
* - `last_active_time` — Denotes the time when last eligible item is added to
|
|
2424
|
+
* any topic of this space.
|
|
2425
|
+
* - `create_time` — Denotes the time of the space creation.
|
|
2426
|
+
*
|
|
2427
|
+
* Valid ordering operation values are:
|
|
2428
|
+
*
|
|
2429
|
+
* - `ASC` for ascending. Default value.
|
|
2430
|
+
*
|
|
2431
|
+
* - `DESC` for descending.
|
|
2432
|
+
*
|
|
2433
|
+
* The supported syntax are:
|
|
2434
|
+
*
|
|
2435
|
+
* - `membership_count.joined_direct_human_user_count DESC`
|
|
2436
|
+
* - `membership_count.joined_direct_human_user_count ASC`
|
|
2437
|
+
* - `last_active_time DESC`
|
|
2438
|
+
* - `last_active_time ASC`
|
|
2439
|
+
* - `create_time DESC`
|
|
2440
|
+
* - `create_time ASC`
|
|
2441
|
+
* @param {object} [options]
|
|
2442
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
2443
|
+
* @returns {Stream}
|
|
2444
|
+
* An object stream which emits an object representing {@link protos.google.chat.v1.Space|Space} on 'data' event.
|
|
2445
|
+
* The client library will perform auto-pagination by default: it will call the API as many
|
|
2446
|
+
* times as needed. Note that it can affect your quota.
|
|
2447
|
+
* We recommend using `searchSpacesAsync()`
|
|
2448
|
+
* method described below for async iteration which you can stop as needed.
|
|
2449
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
2450
|
+
* for more details and examples.
|
|
2451
|
+
*/
|
|
2452
|
+
searchSpacesStream(request?: protos.google.chat.v1.ISearchSpacesRequest, options?: CallOptions): Transform;
|
|
2453
|
+
/**
|
|
2454
|
+
* Equivalent to `searchSpaces`, but returns an iterable object.
|
|
2455
|
+
*
|
|
2456
|
+
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
|
2457
|
+
* @param {Object} request
|
|
2458
|
+
* The request object that will be sent.
|
|
2459
|
+
* @param {boolean} request.useAdminAccess
|
|
2460
|
+
* When `true`, the method runs using the user's Google Workspace
|
|
2461
|
+
* administrator privileges.
|
|
2462
|
+
*
|
|
2463
|
+
* The calling user must be a Google Workspace administrator with the
|
|
2464
|
+
* [manage chat and spaces conversations
|
|
2465
|
+
* privilege](https://support.google.com/a/answer/13369245).
|
|
2466
|
+
*
|
|
2467
|
+
* Requires either the `chat.admin.spaces.readonly` or `chat.admin.spaces`
|
|
2468
|
+
* [OAuth 2.0
|
|
2469
|
+
* scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes).
|
|
2470
|
+
*
|
|
2471
|
+
* This method currently only supports admin access, thus only `true` is
|
|
2472
|
+
* accepted for this field.
|
|
2473
|
+
* @param {number} request.pageSize
|
|
2474
|
+
* The maximum number of spaces to return. The service may return fewer than
|
|
2475
|
+
* this value.
|
|
2476
|
+
*
|
|
2477
|
+
* If unspecified, at most 100 spaces are returned.
|
|
2478
|
+
*
|
|
2479
|
+
* The maximum value is 1000. If you use a value more than 1000, it's
|
|
2480
|
+
* automatically changed to 1000.
|
|
2481
|
+
* @param {string} request.pageToken
|
|
2482
|
+
* A token, received from the previous search spaces call. Provide this
|
|
2483
|
+
* parameter to retrieve the subsequent page.
|
|
2484
|
+
*
|
|
2485
|
+
* When paginating, all other parameters provided should match the call that
|
|
2486
|
+
* provided the page token. Passing different values to the other parameters
|
|
2487
|
+
* might lead to unexpected results.
|
|
2488
|
+
* @param {string} request.query
|
|
2489
|
+
* Required. A search query.
|
|
2490
|
+
*
|
|
2491
|
+
* You can search by using the following parameters:
|
|
2492
|
+
*
|
|
2493
|
+
* - `create_time`
|
|
2494
|
+
* - `customer`
|
|
2495
|
+
* - `display_name`
|
|
2496
|
+
* - `external_user_allowed`
|
|
2497
|
+
* - `last_active_time`
|
|
2498
|
+
* - `space_history_state`
|
|
2499
|
+
* - `space_type`
|
|
2500
|
+
*
|
|
2501
|
+
* `create_time` and `last_active_time` accept a timestamp in
|
|
2502
|
+
* [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339) format and the supported
|
|
2503
|
+
* comparison operators are: `=`, `<`, `>`, `<=`, `>=`.
|
|
2504
|
+
*
|
|
2505
|
+
* `customer` is required and is used to indicate which customer
|
|
2506
|
+
* to fetch spaces from. `customers/my_customer` is the only supported value.
|
|
2507
|
+
*
|
|
2508
|
+
* `display_name` only accepts the `HAS` (`:`) operator. The text to
|
|
2509
|
+
* match is first tokenized into tokens and each token is prefix-matched
|
|
2510
|
+
* case-insensitively and independently as a substring anywhere in the space's
|
|
2511
|
+
* `display_name`. For example, `Fun Eve` matches `Fun event` or `The
|
|
2512
|
+
* evening was fun`, but not `notFun event` or `even`.
|
|
2513
|
+
*
|
|
2514
|
+
* `external_user_allowed` accepts either `true` or `false`.
|
|
2515
|
+
*
|
|
2516
|
+
* `space_history_state` only accepts values from the [`historyState`]
|
|
2517
|
+
* (https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.HistoryState)
|
|
2518
|
+
* field of a `space` resource.
|
|
2519
|
+
*
|
|
2520
|
+
* `space_type` is required and the only valid value is `SPACE`.
|
|
2521
|
+
*
|
|
2522
|
+
* Across different fields, only `AND` operators are supported. A valid
|
|
2523
|
+
* example is `space_type = "SPACE" AND display_name:"Hello"` and an invalid
|
|
2524
|
+
* example is `space_type = "SPACE" OR display_name:"Hello"`.
|
|
2525
|
+
*
|
|
2526
|
+
* Among the same field,
|
|
2527
|
+
* `space_type` doesn't support `AND` or `OR` operators.
|
|
2528
|
+
* `display_name`, 'space_history_state', and 'external_user_allowed' only
|
|
2529
|
+
* support `OR` operators.
|
|
2530
|
+
* `last_active_time` and `create_time` support both `AND` and `OR` operators.
|
|
2531
|
+
* `AND` can only be used to represent an interval, such as `last_active_time
|
|
2532
|
+
* < "2022-01-01T00:00:00+00:00" AND last_active_time >
|
|
2533
|
+
* "2023-01-01T00:00:00+00:00"`.
|
|
2534
|
+
*
|
|
2535
|
+
* The following example queries are valid:
|
|
2536
|
+
*
|
|
2537
|
+
* ```
|
|
2538
|
+
* customer = "customers/my_customer" AND space_type = "SPACE"
|
|
2539
|
+
*
|
|
2540
|
+
* customer = "customers/my_customer" AND space_type = "SPACE" AND
|
|
2541
|
+
* display_name:"Hello World"
|
|
2542
|
+
*
|
|
2543
|
+
* customer = "customers/my_customer" AND space_type = "SPACE" AND
|
|
2544
|
+
* (last_active_time < "2020-01-01T00:00:00+00:00" OR last_active_time >
|
|
2545
|
+
* "2022-01-01T00:00:00+00:00")
|
|
2546
|
+
*
|
|
2547
|
+
* customer = "customers/my_customer" AND space_type = "SPACE" AND
|
|
2548
|
+
* (display_name:"Hello World" OR display_name:"Fun event") AND
|
|
2549
|
+
* (last_active_time > "2020-01-01T00:00:00+00:00" AND last_active_time <
|
|
2550
|
+
* "2022-01-01T00:00:00+00:00")
|
|
2551
|
+
*
|
|
2552
|
+
* customer = "customers/my_customer" AND space_type = "SPACE" AND
|
|
2553
|
+
* (create_time > "2019-01-01T00:00:00+00:00" AND create_time <
|
|
2554
|
+
* "2020-01-01T00:00:00+00:00") AND (external_user_allowed = "true") AND
|
|
2555
|
+
* (space_history_state = "HISTORY_ON" OR space_history_state = "HISTORY_OFF")
|
|
2556
|
+
* ```
|
|
2557
|
+
* @param {string} [request.orderBy]
|
|
2558
|
+
* Optional. How the list of spaces is ordered.
|
|
2559
|
+
*
|
|
2560
|
+
* Supported attributes to order by are:
|
|
2561
|
+
*
|
|
2562
|
+
* - `membership_count.joined_direct_human_user_count` — Denotes the count of
|
|
2563
|
+
* human users that have directly joined a space.
|
|
2564
|
+
* - `last_active_time` — Denotes the time when last eligible item is added to
|
|
2565
|
+
* any topic of this space.
|
|
2566
|
+
* - `create_time` — Denotes the time of the space creation.
|
|
2567
|
+
*
|
|
2568
|
+
* Valid ordering operation values are:
|
|
2569
|
+
*
|
|
2570
|
+
* - `ASC` for ascending. Default value.
|
|
2571
|
+
*
|
|
2572
|
+
* - `DESC` for descending.
|
|
2573
|
+
*
|
|
2574
|
+
* The supported syntax are:
|
|
2575
|
+
*
|
|
2576
|
+
* - `membership_count.joined_direct_human_user_count DESC`
|
|
2577
|
+
* - `membership_count.joined_direct_human_user_count ASC`
|
|
2578
|
+
* - `last_active_time DESC`
|
|
2579
|
+
* - `last_active_time ASC`
|
|
2580
|
+
* - `create_time DESC`
|
|
2581
|
+
* - `create_time ASC`
|
|
2582
|
+
* @param {object} [options]
|
|
2583
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
2584
|
+
* @returns {Object}
|
|
2585
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
|
2586
|
+
* When you iterate the returned iterable, each element will be an object representing
|
|
2587
|
+
* {@link protos.google.chat.v1.Space|Space}. The API will be called under the hood as needed, once per the page,
|
|
2588
|
+
* so you can stop the iteration when you don't need more results.
|
|
2589
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
2590
|
+
* for more details and examples.
|
|
2591
|
+
* @example <caption>include:samples/generated/v1/chat_service.search_spaces.js</caption>
|
|
2592
|
+
* region_tag:chat_v1_generated_ChatService_SearchSpaces_async
|
|
2593
|
+
*/
|
|
2594
|
+
searchSpacesAsync(request?: protos.google.chat.v1.ISearchSpacesRequest, options?: CallOptions): AsyncIterable<protos.google.chat.v1.ISpace>;
|
|
2042
2595
|
/**
|
|
2043
2596
|
* Lists reactions to a message. For an example, see
|
|
2044
2597
|
* [List reactions for a
|