@google-apps/chat 0.28.0 → 0.29.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/build/protos/google/chat/v1/chat_service.proto +53 -7
- package/build/protos/google/chat/v1/message.proto +237 -7
- package/build/protos/google/chat/v1/space.proto +64 -16
- package/build/protos/protos.d.ts +2640 -1677
- package/build/protos/protos.js +1 -1
- package/build/protos/protos.json +387 -97
- package/build/src/v1/chat_service_client.d.ts +721 -34
- package/build/src/v1/chat_service_client.js +515 -18
- package/build/src/v1/chat_service_client.js.map +1 -1
- package/build/src/v1/chat_service_client_config.json +5 -0
- package/build/src/v1/gapic_metadata.json +14 -0
- package/package.json +1 -1
|
@@ -3010,6 +3010,586 @@ export declare class ChatServiceClient {
|
|
|
3010
3010
|
* region_tag:chat_v1_generated_ChatService_ListMemberships_async
|
|
3011
3011
|
*/
|
|
3012
3012
|
listMembershipsAsync(request?: protos.google.chat.v1.IListMembershipsRequest, options?: CallOptions): AsyncIterable<protos.google.chat.v1.IMembership>;
|
|
3013
|
+
/**
|
|
3014
|
+
* Searches for messages in Google Chat that the calling user has access to.
|
|
3015
|
+
* Returns a list of messages matching the search criteria.
|
|
3016
|
+
*
|
|
3017
|
+
* To search across all spaces the user has access to, set `parent` to
|
|
3018
|
+
* `spaces/-`. Using any other value for `parent` results in an
|
|
3019
|
+
* `INVALID_ARGUMENT` error. The returned messages have their `name` field
|
|
3020
|
+
* populated with the full resource name, which includes the specific `space`
|
|
3021
|
+
* in which the message resides.
|
|
3022
|
+
*
|
|
3023
|
+
* This API doesn't return all message types. The types of messages listed
|
|
3024
|
+
* below aren't included in the response. Use
|
|
3025
|
+
* {@link protos.google.chat.v1.ChatService.ListMessages|ListMessages} to list all
|
|
3026
|
+
* messages.
|
|
3027
|
+
*
|
|
3028
|
+
* - Private Messages that are visible to the authenticated user.
|
|
3029
|
+
* - Messages posted by Chat apps in spaces or group chats.
|
|
3030
|
+
* - Messages in a Chat app DM.
|
|
3031
|
+
* - Messages from blocked users.
|
|
3032
|
+
* - Messages in spaces that the caller has muted.
|
|
3033
|
+
*
|
|
3034
|
+
* Requires [user
|
|
3035
|
+
* authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
|
|
3036
|
+
* with one of the following [authorization
|
|
3037
|
+
* scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
|
|
3038
|
+
*
|
|
3039
|
+
* - `https://www.googleapis.com/auth/chat.messages.readonly`
|
|
3040
|
+
* - `https://www.googleapis.com/auth/chat.messages`
|
|
3041
|
+
*
|
|
3042
|
+
* @param {Object} request
|
|
3043
|
+
* The request object that will be sent.
|
|
3044
|
+
* @param {string} request.parent
|
|
3045
|
+
* Required. The resource name of the space to search within.
|
|
3046
|
+
*
|
|
3047
|
+
* To search across all spaces the user has access to, set this field to
|
|
3048
|
+
* `spaces/-`. Using any other value for `parent` results in an
|
|
3049
|
+
* `INVALID_ARGUMENT` error.
|
|
3050
|
+
*
|
|
3051
|
+
* To limit the search to one or more spaces, use `space.name` or
|
|
3052
|
+
* `space.display_name` in the `filter`.
|
|
3053
|
+
* @param {string} request.filter
|
|
3054
|
+
* Required. A search query.
|
|
3055
|
+
*
|
|
3056
|
+
* The query can specify one or more search keywords, which are used to filter
|
|
3057
|
+
* the results,
|
|
3058
|
+
*
|
|
3059
|
+
* You can also filter the results using the following message fields:
|
|
3060
|
+
*
|
|
3061
|
+
* - `create_time`: Accepts a timestamp in
|
|
3062
|
+
* [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339) format and the
|
|
3063
|
+
* supported comparison operators are: `<` and `>=`.
|
|
3064
|
+
* - `sender.name`: The resource name of the sender (`users/{user}`). Only
|
|
3065
|
+
* supports `=`. You can use the e-mail as an alias for `{user}`. For
|
|
3066
|
+
* example, `users/example@gmail.com`, where `example@gmail.com` is the
|
|
3067
|
+
* e-mail of the Google Chat user.
|
|
3068
|
+
* - `space.name`: The resource name of the space where the message is posted.
|
|
3069
|
+
* (`spaces/{space}`). Only supports `=`. If this filter is not set, the
|
|
3070
|
+
* search is performed across all direct messages and spaces the user has
|
|
3071
|
+
* access to as a space member.
|
|
3072
|
+
* - `space.display_name`: Supports the operator `:` (has) and filters spaces
|
|
3073
|
+
* based on a partial match of their display name. Results are limited to
|
|
3074
|
+
* the top five space matches. For example, `space.display_name:Project`
|
|
3075
|
+
* searches for messages in the top five spaces that contain the word
|
|
3076
|
+
* "Project" in their display names.
|
|
3077
|
+
* - `attachment`: Supports the operator `:*` (has any) to check for the
|
|
3078
|
+
* presence of attachments. If `attachment:*` is specified, only messages
|
|
3079
|
+
* that have at least one attachment are returned.
|
|
3080
|
+
* - `annotations.user_mentions.user.name`: The resource name of the mentioned
|
|
3081
|
+
* user (`users/{user}`). Only supports `:` (has). For example:
|
|
3082
|
+
* `annotations.user_mentions.user.name:"users/1234567890"` returns only
|
|
3083
|
+
* messages that contain a mention to the specified user. Alternatively, the
|
|
3084
|
+
* alias `me` can be used to filter for messages that mention the caller
|
|
3085
|
+
* user, for example: `annotations.user_mentions.user.name:users/me`. You
|
|
3086
|
+
* can also use the e-mail as an alias for `{user}`, for example,
|
|
3087
|
+
* `users/example@gmail.com`.
|
|
3088
|
+
*
|
|
3089
|
+
* For advanced filtering, the following functions are also available:
|
|
3090
|
+
*
|
|
3091
|
+
* - `has_link()`: Returns only messages that have at least one hyperlink in
|
|
3092
|
+
* the message text.
|
|
3093
|
+
* - `is_unread()`: Filters out messages that have been read by the calling
|
|
3094
|
+
* user.
|
|
3095
|
+
*
|
|
3096
|
+
* Using the `space.display_name` filter requires that the calling credentials
|
|
3097
|
+
* include one of the following [authorization
|
|
3098
|
+
* scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
|
|
3099
|
+
*
|
|
3100
|
+
* - `https://www.googleapis.com/auth/chat.spaces.readonly`
|
|
3101
|
+
* - `https://www.googleapis.com/auth/chat.spaces`
|
|
3102
|
+
*
|
|
3103
|
+
* Using the `is_unread()` filter requires that the calling credentials
|
|
3104
|
+
* include one of the following [authorization
|
|
3105
|
+
* scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
|
|
3106
|
+
*
|
|
3107
|
+
* - `https://www.googleapis.com/auth/chat.users.readstate.readonly`
|
|
3108
|
+
* - `https://www.googleapis.com/auth/chat.users.readstate`
|
|
3109
|
+
*
|
|
3110
|
+
*
|
|
3111
|
+
* Across different fields, only `AND` operators are supported. A valid
|
|
3112
|
+
* example is `sender.name = "users/1234567890" AND is_unread()`. The word
|
|
3113
|
+
* `AND` is optional and is implied if omitted. For example, `sender.name =
|
|
3114
|
+
* "users/1234567890" is_unread()` is valid and is equivalent to the previous
|
|
3115
|
+
* example. An invalid example is `sender.name = "users/1234567890" OR
|
|
3116
|
+
* is_unread()` because `OR` is not supported between different fields.
|
|
3117
|
+
*
|
|
3118
|
+
* Among the same field:
|
|
3119
|
+
*
|
|
3120
|
+
* - `create_time` supports only `AND`, and can only be used to represent
|
|
3121
|
+
* an interval, such as `create_time >= "2022-01-01T00:00:00+00:00" AND
|
|
3122
|
+
* create_time < "2023-01-01T00:00:00+00:00"`.
|
|
3123
|
+
* - `sender.name` supports only the `OR` operator, for example:
|
|
3124
|
+
* `sender.name = "users/1234567890" OR sender.name = "users/0987654321"`.
|
|
3125
|
+
* - `space.name` supports only the `OR` operator, for example:
|
|
3126
|
+
* `space.name = "spaces/ABCDEFGH" OR space.name = "spaces/QWERTYUI"`.
|
|
3127
|
+
* - `space.display_name` supports the operators `AND` and `OR`, but not a
|
|
3128
|
+
* mix of both. For example:
|
|
3129
|
+
* `space.display_name:Project AND space.display_name:Tasks` returns
|
|
3130
|
+
* messages that are in spaces with display names containing both `Project`
|
|
3131
|
+
* and `Tasks`, whereas
|
|
3132
|
+
* `space.display_name:Project OR space.display_name:Tasks` returns messages
|
|
3133
|
+
* that are in spaces with display names containing either `Project` or
|
|
3134
|
+
* `Tasks` or both.
|
|
3135
|
+
* - `annotations.user_mentions.user.name` supports the operators `AND` and
|
|
3136
|
+
* `OR`, but not a mix of both. For example:
|
|
3137
|
+
* `annotations.user_mentions.user.name:"users/1234567890" AND
|
|
3138
|
+
* annotations.user_mentions.user.name:"users/0987654321"` returns only
|
|
3139
|
+
* messages that mentions both users, whereas
|
|
3140
|
+
* `annotations.user_mentions.user.name:"users/1234567890" OR
|
|
3141
|
+
* annotations.user_mentions.user.name:"users/0987654321"` returns messages
|
|
3142
|
+
* that mention either user or both.
|
|
3143
|
+
*
|
|
3144
|
+
* Parentheses are required to disambiguate operator precedence when combining
|
|
3145
|
+
* `AND` and `OR` operators in the same query. For example:
|
|
3146
|
+
* `(sender.name="users/me" OR sender.name="users/123456") AND is_unread()`.
|
|
3147
|
+
* Otherwise, parentheses are optional.
|
|
3148
|
+
*
|
|
3149
|
+
* The following example queries are valid:
|
|
3150
|
+
*
|
|
3151
|
+
* ```
|
|
3152
|
+
* "Pending reports" AND create_time >= "2023-01-01T00:00:00Z"
|
|
3153
|
+
*
|
|
3154
|
+
* sender.name = "users/example@gmail.com"
|
|
3155
|
+
*
|
|
3156
|
+
* annotations.user_mentions.user.name:"users/0987654321"
|
|
3157
|
+
*
|
|
3158
|
+
* attachment:* AND space.name = "spaces/ABCDEFGH"
|
|
3159
|
+
*
|
|
3160
|
+
* tasks AND is_unread() AND sender.name = "users/1234567890"
|
|
3161
|
+
*
|
|
3162
|
+
* "things to do" "urgent"
|
|
3163
|
+
*
|
|
3164
|
+
* (sender.name = "users/1234567890")
|
|
3165
|
+
* AND (create_time < "2023-05-01T00:00:00Z")
|
|
3166
|
+
*
|
|
3167
|
+
* tasks AND space.name = "spaces/ABCDEFGH" AND has_link()
|
|
3168
|
+
*
|
|
3169
|
+
* "project one" is_unread()
|
|
3170
|
+
*
|
|
3171
|
+
* space.display_name:Project tasks
|
|
3172
|
+
* ```
|
|
3173
|
+
*
|
|
3174
|
+
* The maximum query length is 1,000 characters.
|
|
3175
|
+
*
|
|
3176
|
+
* Invalid queries are rejected by the server with an `INVALID_ARGUMENT`
|
|
3177
|
+
* error.
|
|
3178
|
+
* @param {number} [request.pageSize]
|
|
3179
|
+
* Optional. The maximum number of results to return. The service may return
|
|
3180
|
+
* fewer than this value.
|
|
3181
|
+
*
|
|
3182
|
+
* If unspecified, at most 25 are returned.
|
|
3183
|
+
*
|
|
3184
|
+
* The maximum value is 100. If you use a value more than 100, it's
|
|
3185
|
+
* automatically changed to 100.
|
|
3186
|
+
* @param {string} [request.pageToken]
|
|
3187
|
+
* Optional. A token, received from the previous search messages call. Provide
|
|
3188
|
+
* this parameter to retrieve the subsequent page.
|
|
3189
|
+
*
|
|
3190
|
+
* When paginating, all other parameters provided should match the call that
|
|
3191
|
+
* provided the page token. Passing different values to the other parameters
|
|
3192
|
+
* might lead to unexpected results.
|
|
3193
|
+
* @param {string} [request.orderBy]
|
|
3194
|
+
* Optional. How the results list is ordered.
|
|
3195
|
+
*
|
|
3196
|
+
* Supported attributes to order by are:
|
|
3197
|
+
*
|
|
3198
|
+
* - `create_time`: Sorts the results by the time of the message creation.
|
|
3199
|
+
* Default value.
|
|
3200
|
+
* - `relevance`: Sorts the results by relevance.
|
|
3201
|
+
* [Developer Preview](https://developers.google.com/workspace/preview).
|
|
3202
|
+
*
|
|
3203
|
+
* The default ordering is `create_time desc`. Only a single order per query
|
|
3204
|
+
* (`create_time` or `relevance`) is supported. Only descending order (`desc`)
|
|
3205
|
+
* is supported, and it must be specified after the order attribute.
|
|
3206
|
+
* @param {google.chat.v1.SearchMessagesRequest.SearchMessagesView} [request.view]
|
|
3207
|
+
* Optional. Specifies what kind of search results view to return. The default
|
|
3208
|
+
* is `SEARCH_MESSAGES_VIEW_BASIC`.
|
|
3209
|
+
* @param {object} [options]
|
|
3210
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
3211
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
3212
|
+
* The first element of the array is Array of {@link protos.google.chat.v1.SearchMessageResult|SearchMessageResult}.
|
|
3213
|
+
* The client library will perform auto-pagination by default: it will call the API as many
|
|
3214
|
+
* times as needed and will merge results from all the pages into this array.
|
|
3215
|
+
* Note that it can affect your quota.
|
|
3216
|
+
* We recommend using `searchMessagesAsync()`
|
|
3217
|
+
* method described below for async iteration which you can stop as needed.
|
|
3218
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
3219
|
+
* for more details and examples.
|
|
3220
|
+
*/
|
|
3221
|
+
searchMessages(request?: protos.google.chat.v1.ISearchMessagesRequest, options?: CallOptions): Promise<[
|
|
3222
|
+
protos.google.chat.v1.ISearchMessageResult[],
|
|
3223
|
+
protos.google.chat.v1.ISearchMessagesRequest | null,
|
|
3224
|
+
protos.google.chat.v1.ISearchMessagesResponse
|
|
3225
|
+
]>;
|
|
3226
|
+
searchMessages(request: protos.google.chat.v1.ISearchMessagesRequest, options: CallOptions, callback: PaginationCallback<protos.google.chat.v1.ISearchMessagesRequest, protos.google.chat.v1.ISearchMessagesResponse | null | undefined, protos.google.chat.v1.ISearchMessageResult>): void;
|
|
3227
|
+
searchMessages(request: protos.google.chat.v1.ISearchMessagesRequest, callback: PaginationCallback<protos.google.chat.v1.ISearchMessagesRequest, protos.google.chat.v1.ISearchMessagesResponse | null | undefined, protos.google.chat.v1.ISearchMessageResult>): void;
|
|
3228
|
+
/**
|
|
3229
|
+
* Equivalent to `searchMessages`, but returns a NodeJS Stream object.
|
|
3230
|
+
* @param {Object} request
|
|
3231
|
+
* The request object that will be sent.
|
|
3232
|
+
* @param {string} request.parent
|
|
3233
|
+
* Required. The resource name of the space to search within.
|
|
3234
|
+
*
|
|
3235
|
+
* To search across all spaces the user has access to, set this field to
|
|
3236
|
+
* `spaces/-`. Using any other value for `parent` results in an
|
|
3237
|
+
* `INVALID_ARGUMENT` error.
|
|
3238
|
+
*
|
|
3239
|
+
* To limit the search to one or more spaces, use `space.name` or
|
|
3240
|
+
* `space.display_name` in the `filter`.
|
|
3241
|
+
* @param {string} request.filter
|
|
3242
|
+
* Required. A search query.
|
|
3243
|
+
*
|
|
3244
|
+
* The query can specify one or more search keywords, which are used to filter
|
|
3245
|
+
* the results,
|
|
3246
|
+
*
|
|
3247
|
+
* You can also filter the results using the following message fields:
|
|
3248
|
+
*
|
|
3249
|
+
* - `create_time`: Accepts a timestamp in
|
|
3250
|
+
* [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339) format and the
|
|
3251
|
+
* supported comparison operators are: `<` and `>=`.
|
|
3252
|
+
* - `sender.name`: The resource name of the sender (`users/{user}`). Only
|
|
3253
|
+
* supports `=`. You can use the e-mail as an alias for `{user}`. For
|
|
3254
|
+
* example, `users/example@gmail.com`, where `example@gmail.com` is the
|
|
3255
|
+
* e-mail of the Google Chat user.
|
|
3256
|
+
* - `space.name`: The resource name of the space where the message is posted.
|
|
3257
|
+
* (`spaces/{space}`). Only supports `=`. If this filter is not set, the
|
|
3258
|
+
* search is performed across all direct messages and spaces the user has
|
|
3259
|
+
* access to as a space member.
|
|
3260
|
+
* - `space.display_name`: Supports the operator `:` (has) and filters spaces
|
|
3261
|
+
* based on a partial match of their display name. Results are limited to
|
|
3262
|
+
* the top five space matches. For example, `space.display_name:Project`
|
|
3263
|
+
* searches for messages in the top five spaces that contain the word
|
|
3264
|
+
* "Project" in their display names.
|
|
3265
|
+
* - `attachment`: Supports the operator `:*` (has any) to check for the
|
|
3266
|
+
* presence of attachments. If `attachment:*` is specified, only messages
|
|
3267
|
+
* that have at least one attachment are returned.
|
|
3268
|
+
* - `annotations.user_mentions.user.name`: The resource name of the mentioned
|
|
3269
|
+
* user (`users/{user}`). Only supports `:` (has). For example:
|
|
3270
|
+
* `annotations.user_mentions.user.name:"users/1234567890"` returns only
|
|
3271
|
+
* messages that contain a mention to the specified user. Alternatively, the
|
|
3272
|
+
* alias `me` can be used to filter for messages that mention the caller
|
|
3273
|
+
* user, for example: `annotations.user_mentions.user.name:users/me`. You
|
|
3274
|
+
* can also use the e-mail as an alias for `{user}`, for example,
|
|
3275
|
+
* `users/example@gmail.com`.
|
|
3276
|
+
*
|
|
3277
|
+
* For advanced filtering, the following functions are also available:
|
|
3278
|
+
*
|
|
3279
|
+
* - `has_link()`: Returns only messages that have at least one hyperlink in
|
|
3280
|
+
* the message text.
|
|
3281
|
+
* - `is_unread()`: Filters out messages that have been read by the calling
|
|
3282
|
+
* user.
|
|
3283
|
+
*
|
|
3284
|
+
* Using the `space.display_name` filter requires that the calling credentials
|
|
3285
|
+
* include one of the following [authorization
|
|
3286
|
+
* scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
|
|
3287
|
+
*
|
|
3288
|
+
* - `https://www.googleapis.com/auth/chat.spaces.readonly`
|
|
3289
|
+
* - `https://www.googleapis.com/auth/chat.spaces`
|
|
3290
|
+
*
|
|
3291
|
+
* Using the `is_unread()` filter requires that the calling credentials
|
|
3292
|
+
* include one of the following [authorization
|
|
3293
|
+
* scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
|
|
3294
|
+
*
|
|
3295
|
+
* - `https://www.googleapis.com/auth/chat.users.readstate.readonly`
|
|
3296
|
+
* - `https://www.googleapis.com/auth/chat.users.readstate`
|
|
3297
|
+
*
|
|
3298
|
+
*
|
|
3299
|
+
* Across different fields, only `AND` operators are supported. A valid
|
|
3300
|
+
* example is `sender.name = "users/1234567890" AND is_unread()`. The word
|
|
3301
|
+
* `AND` is optional and is implied if omitted. For example, `sender.name =
|
|
3302
|
+
* "users/1234567890" is_unread()` is valid and is equivalent to the previous
|
|
3303
|
+
* example. An invalid example is `sender.name = "users/1234567890" OR
|
|
3304
|
+
* is_unread()` because `OR` is not supported between different fields.
|
|
3305
|
+
*
|
|
3306
|
+
* Among the same field:
|
|
3307
|
+
*
|
|
3308
|
+
* - `create_time` supports only `AND`, and can only be used to represent
|
|
3309
|
+
* an interval, such as `create_time >= "2022-01-01T00:00:00+00:00" AND
|
|
3310
|
+
* create_time < "2023-01-01T00:00:00+00:00"`.
|
|
3311
|
+
* - `sender.name` supports only the `OR` operator, for example:
|
|
3312
|
+
* `sender.name = "users/1234567890" OR sender.name = "users/0987654321"`.
|
|
3313
|
+
* - `space.name` supports only the `OR` operator, for example:
|
|
3314
|
+
* `space.name = "spaces/ABCDEFGH" OR space.name = "spaces/QWERTYUI"`.
|
|
3315
|
+
* - `space.display_name` supports the operators `AND` and `OR`, but not a
|
|
3316
|
+
* mix of both. For example:
|
|
3317
|
+
* `space.display_name:Project AND space.display_name:Tasks` returns
|
|
3318
|
+
* messages that are in spaces with display names containing both `Project`
|
|
3319
|
+
* and `Tasks`, whereas
|
|
3320
|
+
* `space.display_name:Project OR space.display_name:Tasks` returns messages
|
|
3321
|
+
* that are in spaces with display names containing either `Project` or
|
|
3322
|
+
* `Tasks` or both.
|
|
3323
|
+
* - `annotations.user_mentions.user.name` supports the operators `AND` and
|
|
3324
|
+
* `OR`, but not a mix of both. For example:
|
|
3325
|
+
* `annotations.user_mentions.user.name:"users/1234567890" AND
|
|
3326
|
+
* annotations.user_mentions.user.name:"users/0987654321"` returns only
|
|
3327
|
+
* messages that mentions both users, whereas
|
|
3328
|
+
* `annotations.user_mentions.user.name:"users/1234567890" OR
|
|
3329
|
+
* annotations.user_mentions.user.name:"users/0987654321"` returns messages
|
|
3330
|
+
* that mention either user or both.
|
|
3331
|
+
*
|
|
3332
|
+
* Parentheses are required to disambiguate operator precedence when combining
|
|
3333
|
+
* `AND` and `OR` operators in the same query. For example:
|
|
3334
|
+
* `(sender.name="users/me" OR sender.name="users/123456") AND is_unread()`.
|
|
3335
|
+
* Otherwise, parentheses are optional.
|
|
3336
|
+
*
|
|
3337
|
+
* The following example queries are valid:
|
|
3338
|
+
*
|
|
3339
|
+
* ```
|
|
3340
|
+
* "Pending reports" AND create_time >= "2023-01-01T00:00:00Z"
|
|
3341
|
+
*
|
|
3342
|
+
* sender.name = "users/example@gmail.com"
|
|
3343
|
+
*
|
|
3344
|
+
* annotations.user_mentions.user.name:"users/0987654321"
|
|
3345
|
+
*
|
|
3346
|
+
* attachment:* AND space.name = "spaces/ABCDEFGH"
|
|
3347
|
+
*
|
|
3348
|
+
* tasks AND is_unread() AND sender.name = "users/1234567890"
|
|
3349
|
+
*
|
|
3350
|
+
* "things to do" "urgent"
|
|
3351
|
+
*
|
|
3352
|
+
* (sender.name = "users/1234567890")
|
|
3353
|
+
* AND (create_time < "2023-05-01T00:00:00Z")
|
|
3354
|
+
*
|
|
3355
|
+
* tasks AND space.name = "spaces/ABCDEFGH" AND has_link()
|
|
3356
|
+
*
|
|
3357
|
+
* "project one" is_unread()
|
|
3358
|
+
*
|
|
3359
|
+
* space.display_name:Project tasks
|
|
3360
|
+
* ```
|
|
3361
|
+
*
|
|
3362
|
+
* The maximum query length is 1,000 characters.
|
|
3363
|
+
*
|
|
3364
|
+
* Invalid queries are rejected by the server with an `INVALID_ARGUMENT`
|
|
3365
|
+
* error.
|
|
3366
|
+
* @param {number} [request.pageSize]
|
|
3367
|
+
* Optional. The maximum number of results to return. The service may return
|
|
3368
|
+
* fewer than this value.
|
|
3369
|
+
*
|
|
3370
|
+
* If unspecified, at most 25 are returned.
|
|
3371
|
+
*
|
|
3372
|
+
* The maximum value is 100. If you use a value more than 100, it's
|
|
3373
|
+
* automatically changed to 100.
|
|
3374
|
+
* @param {string} [request.pageToken]
|
|
3375
|
+
* Optional. A token, received from the previous search messages call. Provide
|
|
3376
|
+
* this parameter to retrieve the subsequent page.
|
|
3377
|
+
*
|
|
3378
|
+
* When paginating, all other parameters provided should match the call that
|
|
3379
|
+
* provided the page token. Passing different values to the other parameters
|
|
3380
|
+
* might lead to unexpected results.
|
|
3381
|
+
* @param {string} [request.orderBy]
|
|
3382
|
+
* Optional. How the results list is ordered.
|
|
3383
|
+
*
|
|
3384
|
+
* Supported attributes to order by are:
|
|
3385
|
+
*
|
|
3386
|
+
* - `create_time`: Sorts the results by the time of the message creation.
|
|
3387
|
+
* Default value.
|
|
3388
|
+
* - `relevance`: Sorts the results by relevance.
|
|
3389
|
+
* [Developer Preview](https://developers.google.com/workspace/preview).
|
|
3390
|
+
*
|
|
3391
|
+
* The default ordering is `create_time desc`. Only a single order per query
|
|
3392
|
+
* (`create_time` or `relevance`) is supported. Only descending order (`desc`)
|
|
3393
|
+
* is supported, and it must be specified after the order attribute.
|
|
3394
|
+
* @param {google.chat.v1.SearchMessagesRequest.SearchMessagesView} [request.view]
|
|
3395
|
+
* Optional. Specifies what kind of search results view to return. The default
|
|
3396
|
+
* is `SEARCH_MESSAGES_VIEW_BASIC`.
|
|
3397
|
+
* @param {object} [options]
|
|
3398
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
3399
|
+
* @returns {Stream}
|
|
3400
|
+
* An object stream which emits an object representing {@link protos.google.chat.v1.SearchMessageResult|SearchMessageResult} on 'data' event.
|
|
3401
|
+
* The client library will perform auto-pagination by default: it will call the API as many
|
|
3402
|
+
* times as needed. Note that it can affect your quota.
|
|
3403
|
+
* We recommend using `searchMessagesAsync()`
|
|
3404
|
+
* method described below for async iteration which you can stop as needed.
|
|
3405
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
3406
|
+
* for more details and examples.
|
|
3407
|
+
*/
|
|
3408
|
+
searchMessagesStream(request?: protos.google.chat.v1.ISearchMessagesRequest, options?: CallOptions): Transform;
|
|
3409
|
+
/**
|
|
3410
|
+
* Equivalent to `searchMessages`, but returns an iterable object.
|
|
3411
|
+
*
|
|
3412
|
+
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
|
3413
|
+
* @param {Object} request
|
|
3414
|
+
* The request object that will be sent.
|
|
3415
|
+
* @param {string} request.parent
|
|
3416
|
+
* Required. The resource name of the space to search within.
|
|
3417
|
+
*
|
|
3418
|
+
* To search across all spaces the user has access to, set this field to
|
|
3419
|
+
* `spaces/-`. Using any other value for `parent` results in an
|
|
3420
|
+
* `INVALID_ARGUMENT` error.
|
|
3421
|
+
*
|
|
3422
|
+
* To limit the search to one or more spaces, use `space.name` or
|
|
3423
|
+
* `space.display_name` in the `filter`.
|
|
3424
|
+
* @param {string} request.filter
|
|
3425
|
+
* Required. A search query.
|
|
3426
|
+
*
|
|
3427
|
+
* The query can specify one or more search keywords, which are used to filter
|
|
3428
|
+
* the results,
|
|
3429
|
+
*
|
|
3430
|
+
* You can also filter the results using the following message fields:
|
|
3431
|
+
*
|
|
3432
|
+
* - `create_time`: Accepts a timestamp in
|
|
3433
|
+
* [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339) format and the
|
|
3434
|
+
* supported comparison operators are: `<` and `>=`.
|
|
3435
|
+
* - `sender.name`: The resource name of the sender (`users/{user}`). Only
|
|
3436
|
+
* supports `=`. You can use the e-mail as an alias for `{user}`. For
|
|
3437
|
+
* example, `users/example@gmail.com`, where `example@gmail.com` is the
|
|
3438
|
+
* e-mail of the Google Chat user.
|
|
3439
|
+
* - `space.name`: The resource name of the space where the message is posted.
|
|
3440
|
+
* (`spaces/{space}`). Only supports `=`. If this filter is not set, the
|
|
3441
|
+
* search is performed across all direct messages and spaces the user has
|
|
3442
|
+
* access to as a space member.
|
|
3443
|
+
* - `space.display_name`: Supports the operator `:` (has) and filters spaces
|
|
3444
|
+
* based on a partial match of their display name. Results are limited to
|
|
3445
|
+
* the top five space matches. For example, `space.display_name:Project`
|
|
3446
|
+
* searches for messages in the top five spaces that contain the word
|
|
3447
|
+
* "Project" in their display names.
|
|
3448
|
+
* - `attachment`: Supports the operator `:*` (has any) to check for the
|
|
3449
|
+
* presence of attachments. If `attachment:*` is specified, only messages
|
|
3450
|
+
* that have at least one attachment are returned.
|
|
3451
|
+
* - `annotations.user_mentions.user.name`: The resource name of the mentioned
|
|
3452
|
+
* user (`users/{user}`). Only supports `:` (has). For example:
|
|
3453
|
+
* `annotations.user_mentions.user.name:"users/1234567890"` returns only
|
|
3454
|
+
* messages that contain a mention to the specified user. Alternatively, the
|
|
3455
|
+
* alias `me` can be used to filter for messages that mention the caller
|
|
3456
|
+
* user, for example: `annotations.user_mentions.user.name:users/me`. You
|
|
3457
|
+
* can also use the e-mail as an alias for `{user}`, for example,
|
|
3458
|
+
* `users/example@gmail.com`.
|
|
3459
|
+
*
|
|
3460
|
+
* For advanced filtering, the following functions are also available:
|
|
3461
|
+
*
|
|
3462
|
+
* - `has_link()`: Returns only messages that have at least one hyperlink in
|
|
3463
|
+
* the message text.
|
|
3464
|
+
* - `is_unread()`: Filters out messages that have been read by the calling
|
|
3465
|
+
* user.
|
|
3466
|
+
*
|
|
3467
|
+
* Using the `space.display_name` filter requires that the calling credentials
|
|
3468
|
+
* include one of the following [authorization
|
|
3469
|
+
* scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
|
|
3470
|
+
*
|
|
3471
|
+
* - `https://www.googleapis.com/auth/chat.spaces.readonly`
|
|
3472
|
+
* - `https://www.googleapis.com/auth/chat.spaces`
|
|
3473
|
+
*
|
|
3474
|
+
* Using the `is_unread()` filter requires that the calling credentials
|
|
3475
|
+
* include one of the following [authorization
|
|
3476
|
+
* scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
|
|
3477
|
+
*
|
|
3478
|
+
* - `https://www.googleapis.com/auth/chat.users.readstate.readonly`
|
|
3479
|
+
* - `https://www.googleapis.com/auth/chat.users.readstate`
|
|
3480
|
+
*
|
|
3481
|
+
*
|
|
3482
|
+
* Across different fields, only `AND` operators are supported. A valid
|
|
3483
|
+
* example is `sender.name = "users/1234567890" AND is_unread()`. The word
|
|
3484
|
+
* `AND` is optional and is implied if omitted. For example, `sender.name =
|
|
3485
|
+
* "users/1234567890" is_unread()` is valid and is equivalent to the previous
|
|
3486
|
+
* example. An invalid example is `sender.name = "users/1234567890" OR
|
|
3487
|
+
* is_unread()` because `OR` is not supported between different fields.
|
|
3488
|
+
*
|
|
3489
|
+
* Among the same field:
|
|
3490
|
+
*
|
|
3491
|
+
* - `create_time` supports only `AND`, and can only be used to represent
|
|
3492
|
+
* an interval, such as `create_time >= "2022-01-01T00:00:00+00:00" AND
|
|
3493
|
+
* create_time < "2023-01-01T00:00:00+00:00"`.
|
|
3494
|
+
* - `sender.name` supports only the `OR` operator, for example:
|
|
3495
|
+
* `sender.name = "users/1234567890" OR sender.name = "users/0987654321"`.
|
|
3496
|
+
* - `space.name` supports only the `OR` operator, for example:
|
|
3497
|
+
* `space.name = "spaces/ABCDEFGH" OR space.name = "spaces/QWERTYUI"`.
|
|
3498
|
+
* - `space.display_name` supports the operators `AND` and `OR`, but not a
|
|
3499
|
+
* mix of both. For example:
|
|
3500
|
+
* `space.display_name:Project AND space.display_name:Tasks` returns
|
|
3501
|
+
* messages that are in spaces with display names containing both `Project`
|
|
3502
|
+
* and `Tasks`, whereas
|
|
3503
|
+
* `space.display_name:Project OR space.display_name:Tasks` returns messages
|
|
3504
|
+
* that are in spaces with display names containing either `Project` or
|
|
3505
|
+
* `Tasks` or both.
|
|
3506
|
+
* - `annotations.user_mentions.user.name` supports the operators `AND` and
|
|
3507
|
+
* `OR`, but not a mix of both. For example:
|
|
3508
|
+
* `annotations.user_mentions.user.name:"users/1234567890" AND
|
|
3509
|
+
* annotations.user_mentions.user.name:"users/0987654321"` returns only
|
|
3510
|
+
* messages that mentions both users, whereas
|
|
3511
|
+
* `annotations.user_mentions.user.name:"users/1234567890" OR
|
|
3512
|
+
* annotations.user_mentions.user.name:"users/0987654321"` returns messages
|
|
3513
|
+
* that mention either user or both.
|
|
3514
|
+
*
|
|
3515
|
+
* Parentheses are required to disambiguate operator precedence when combining
|
|
3516
|
+
* `AND` and `OR` operators in the same query. For example:
|
|
3517
|
+
* `(sender.name="users/me" OR sender.name="users/123456") AND is_unread()`.
|
|
3518
|
+
* Otherwise, parentheses are optional.
|
|
3519
|
+
*
|
|
3520
|
+
* The following example queries are valid:
|
|
3521
|
+
*
|
|
3522
|
+
* ```
|
|
3523
|
+
* "Pending reports" AND create_time >= "2023-01-01T00:00:00Z"
|
|
3524
|
+
*
|
|
3525
|
+
* sender.name = "users/example@gmail.com"
|
|
3526
|
+
*
|
|
3527
|
+
* annotations.user_mentions.user.name:"users/0987654321"
|
|
3528
|
+
*
|
|
3529
|
+
* attachment:* AND space.name = "spaces/ABCDEFGH"
|
|
3530
|
+
*
|
|
3531
|
+
* tasks AND is_unread() AND sender.name = "users/1234567890"
|
|
3532
|
+
*
|
|
3533
|
+
* "things to do" "urgent"
|
|
3534
|
+
*
|
|
3535
|
+
* (sender.name = "users/1234567890")
|
|
3536
|
+
* AND (create_time < "2023-05-01T00:00:00Z")
|
|
3537
|
+
*
|
|
3538
|
+
* tasks AND space.name = "spaces/ABCDEFGH" AND has_link()
|
|
3539
|
+
*
|
|
3540
|
+
* "project one" is_unread()
|
|
3541
|
+
*
|
|
3542
|
+
* space.display_name:Project tasks
|
|
3543
|
+
* ```
|
|
3544
|
+
*
|
|
3545
|
+
* The maximum query length is 1,000 characters.
|
|
3546
|
+
*
|
|
3547
|
+
* Invalid queries are rejected by the server with an `INVALID_ARGUMENT`
|
|
3548
|
+
* error.
|
|
3549
|
+
* @param {number} [request.pageSize]
|
|
3550
|
+
* Optional. The maximum number of results to return. The service may return
|
|
3551
|
+
* fewer than this value.
|
|
3552
|
+
*
|
|
3553
|
+
* If unspecified, at most 25 are returned.
|
|
3554
|
+
*
|
|
3555
|
+
* The maximum value is 100. If you use a value more than 100, it's
|
|
3556
|
+
* automatically changed to 100.
|
|
3557
|
+
* @param {string} [request.pageToken]
|
|
3558
|
+
* Optional. A token, received from the previous search messages call. Provide
|
|
3559
|
+
* this parameter to retrieve the subsequent page.
|
|
3560
|
+
*
|
|
3561
|
+
* When paginating, all other parameters provided should match the call that
|
|
3562
|
+
* provided the page token. Passing different values to the other parameters
|
|
3563
|
+
* might lead to unexpected results.
|
|
3564
|
+
* @param {string} [request.orderBy]
|
|
3565
|
+
* Optional. How the results list is ordered.
|
|
3566
|
+
*
|
|
3567
|
+
* Supported attributes to order by are:
|
|
3568
|
+
*
|
|
3569
|
+
* - `create_time`: Sorts the results by the time of the message creation.
|
|
3570
|
+
* Default value.
|
|
3571
|
+
* - `relevance`: Sorts the results by relevance.
|
|
3572
|
+
* [Developer Preview](https://developers.google.com/workspace/preview).
|
|
3573
|
+
*
|
|
3574
|
+
* The default ordering is `create_time desc`. Only a single order per query
|
|
3575
|
+
* (`create_time` or `relevance`) is supported. Only descending order (`desc`)
|
|
3576
|
+
* is supported, and it must be specified after the order attribute.
|
|
3577
|
+
* @param {google.chat.v1.SearchMessagesRequest.SearchMessagesView} [request.view]
|
|
3578
|
+
* Optional. Specifies what kind of search results view to return. The default
|
|
3579
|
+
* is `SEARCH_MESSAGES_VIEW_BASIC`.
|
|
3580
|
+
* @param {object} [options]
|
|
3581
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
3582
|
+
* @returns {Object}
|
|
3583
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
|
3584
|
+
* When you iterate the returned iterable, each element will be an object representing
|
|
3585
|
+
* {@link protos.google.chat.v1.SearchMessageResult|SearchMessageResult}. The API will be called under the hood as needed, once per the page,
|
|
3586
|
+
* so you can stop the iteration when you don't need more results.
|
|
3587
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
3588
|
+
* for more details and examples.
|
|
3589
|
+
* @example <caption>include:samples/generated/v1/chat_service.search_messages.js</caption>
|
|
3590
|
+
* region_tag:chat_v1_generated_ChatService_SearchMessages_async
|
|
3591
|
+
*/
|
|
3592
|
+
searchMessagesAsync(request?: protos.google.chat.v1.ISearchMessagesRequest, options?: CallOptions): AsyncIterable<protos.google.chat.v1.ISearchMessageResult>;
|
|
3013
3593
|
/**
|
|
3014
3594
|
* Lists spaces the caller is a member of. Group chats and DMs aren't listed
|
|
3015
3595
|
* until the first message is sent. For an example, see
|
|
@@ -3199,19 +3779,30 @@ export declare class ChatServiceClient {
|
|
|
3199
3779
|
*/
|
|
3200
3780
|
listSpacesAsync(request?: protos.google.chat.v1.IListSpacesRequest, options?: CallOptions): AsyncIterable<protos.google.chat.v1.ISpace>;
|
|
3201
3781
|
/**
|
|
3202
|
-
* Returns a list of spaces in a Google Workspace organization
|
|
3203
|
-
*
|
|
3204
|
-
* For an example, see [Search for and manage
|
|
3782
|
+
* Returns a list of spaces in a Google Workspace organization. For an
|
|
3783
|
+
* example, see [Search for and manage
|
|
3205
3784
|
* spaces](https://developers.google.com/workspace/chat/search-manage-admin).
|
|
3206
3785
|
*
|
|
3207
|
-
*
|
|
3786
|
+
* When `use_admin_access` is set to `false`, the results are limited to
|
|
3787
|
+
* spaces where the calling user is a joined member. To search with
|
|
3788
|
+
* administrator privileges, set `use_admin_access` to `true`.
|
|
3789
|
+
*
|
|
3790
|
+
* Supports the following types of
|
|
3791
|
+
* [authentication](https://developers.google.com/workspace/chat/authenticate-authorize):
|
|
3792
|
+
*
|
|
3793
|
+
* - [User
|
|
3794
|
+
* authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
|
|
3795
|
+
* with one of the following authorization scopes:
|
|
3796
|
+
* - `https://www.googleapis.com/auth/chat.spaces.readonly`
|
|
3797
|
+
* - `https://www.googleapis.com/auth/chat.spaces`
|
|
3798
|
+
*
|
|
3799
|
+
* - [User
|
|
3208
3800
|
* authentication with administrator
|
|
3209
3801
|
* privileges](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user#admin-privileges)
|
|
3210
3802
|
* and one of the following [authorization
|
|
3211
3803
|
* scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
|
|
3212
|
-
*
|
|
3213
|
-
*
|
|
3214
|
-
* - `https://www.googleapis.com/auth/chat.admin.spaces`
|
|
3804
|
+
* - `https://www.googleapis.com/auth/chat.admin.spaces.readonly`
|
|
3805
|
+
* - `https://www.googleapis.com/auth/chat.admin.spaces`
|
|
3215
3806
|
*
|
|
3216
3807
|
* @param {Object} request
|
|
3217
3808
|
* The request object that will be sent.
|
|
@@ -3226,9 +3817,6 @@ export declare class ChatServiceClient {
|
|
|
3226
3817
|
* Requires either the `chat.admin.spaces.readonly` or `chat.admin.spaces`
|
|
3227
3818
|
* [OAuth 2.0
|
|
3228
3819
|
* 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
3820
|
* @param {number} request.pageSize
|
|
3233
3821
|
* The maximum number of spaces to return. The service may return fewer than
|
|
3234
3822
|
* this value.
|
|
@@ -3247,7 +3835,8 @@ export declare class ChatServiceClient {
|
|
|
3247
3835
|
* @param {string} request.query
|
|
3248
3836
|
* Required. A search query.
|
|
3249
3837
|
*
|
|
3250
|
-
* You can search by using the following parameters
|
|
3838
|
+
* You can search by using the following parameters when `useAdminAccess`
|
|
3839
|
+
* is set to `true`:
|
|
3251
3840
|
*
|
|
3252
3841
|
* - `create_time`
|
|
3253
3842
|
* - `customer`
|
|
@@ -3257,18 +3846,27 @@ export declare class ChatServiceClient {
|
|
|
3257
3846
|
* - `space_history_state`
|
|
3258
3847
|
* - `space_type`
|
|
3259
3848
|
*
|
|
3849
|
+
* When `useAdminAccess` is set to `false`:
|
|
3850
|
+
*
|
|
3851
|
+
* - `display_name`
|
|
3852
|
+
* - `external_user_allowed`
|
|
3853
|
+
* - `space_type`
|
|
3854
|
+
*
|
|
3260
3855
|
* `create_time` and `last_active_time` accept a timestamp in
|
|
3261
3856
|
* [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339) format and the supported
|
|
3262
3857
|
* comparison operators are: `=`, `<`, `>`, `<=`, `>=`.
|
|
3263
3858
|
*
|
|
3264
|
-
* `customer` is required
|
|
3265
|
-
* to
|
|
3859
|
+
* `customer` is required when `useAdminAccess` is set to `true`, and is
|
|
3860
|
+
* used to indicate which customer to fetch spaces from.
|
|
3861
|
+
* `customers/my_customer` is the only supported value.
|
|
3266
3862
|
*
|
|
3267
3863
|
* `display_name` only accepts the `HAS` (`:`) operator. The text to
|
|
3268
3864
|
* match is first tokenized into tokens and each token is prefix-matched
|
|
3269
3865
|
* case-insensitively and independently as a substring anywhere in the space's
|
|
3270
3866
|
* `display_name`. For example, `Fun Eve` matches `Fun event` or `The
|
|
3271
|
-
* evening was fun`, but not `notFun event` or `even`.
|
|
3867
|
+
* evening was fun`, but not `notFun event` or `even`. When `useAdminAccess`
|
|
3868
|
+
* is set to `false`, `display_name` is required to retrieve meaningful
|
|
3869
|
+
* results. Otherwise, the default behavior is to return an empty response.
|
|
3272
3870
|
*
|
|
3273
3871
|
* `external_user_allowed` accepts either `true` or `false`.
|
|
3274
3872
|
*
|
|
@@ -3291,7 +3889,8 @@ export declare class ChatServiceClient {
|
|
|
3291
3889
|
* < "2022-01-01T00:00:00+00:00" AND last_active_time >
|
|
3292
3890
|
* "2023-01-01T00:00:00+00:00"`.
|
|
3293
3891
|
*
|
|
3294
|
-
* The following example queries are valid
|
|
3892
|
+
* The following example queries are valid when `useAdminAccess` is set to
|
|
3893
|
+
* `true`:
|
|
3295
3894
|
*
|
|
3296
3895
|
* ```
|
|
3297
3896
|
* customer = "customers/my_customer" AND space_type = "SPACE"
|
|
@@ -3313,6 +3912,21 @@ export declare class ChatServiceClient {
|
|
|
3313
3912
|
* "2020-01-01T00:00:00+00:00") AND (external_user_allowed = "true") AND
|
|
3314
3913
|
* (space_history_state = "HISTORY_ON" OR space_history_state = "HISTORY_OFF")
|
|
3315
3914
|
* ```
|
|
3915
|
+
*
|
|
3916
|
+
* The following example queries are valid when `useAdminAccess` is set to
|
|
3917
|
+
* `false`:
|
|
3918
|
+
*
|
|
3919
|
+
* ```
|
|
3920
|
+
* display_name:"Hello World" AND space_type = "SPACE"
|
|
3921
|
+
*
|
|
3922
|
+
* (display_name:"Hello" OR display_name:"Fun") AND space_type = "SPACE"
|
|
3923
|
+
*
|
|
3924
|
+
* (external_user_allowed = "true" AND space_type = "SPACE") // Returns an
|
|
3925
|
+
* empty response.
|
|
3926
|
+
*
|
|
3927
|
+
* (external_user_allowed = "true" AND display_name:"Hello" AND space_type =
|
|
3928
|
+
* "SPACE")
|
|
3929
|
+
* ```
|
|
3316
3930
|
* @param {string} [request.orderBy]
|
|
3317
3931
|
* Optional. How the list of spaces is ordered.
|
|
3318
3932
|
*
|
|
@@ -3324,13 +3938,17 @@ export declare class ChatServiceClient {
|
|
|
3324
3938
|
* any topic of this space.
|
|
3325
3939
|
* - `create_time` — Denotes the time of the space creation.
|
|
3326
3940
|
*
|
|
3941
|
+
* When `useAdminAccess` is `false`, only `create_time` and `relevance` are
|
|
3942
|
+
* supported for ordering. Only `DESC` is supported for these fields in
|
|
3943
|
+
* non-admin searches.
|
|
3944
|
+
*
|
|
3327
3945
|
* Valid ordering operation values are:
|
|
3328
3946
|
*
|
|
3329
3947
|
* - `ASC` for ascending. Default value.
|
|
3330
3948
|
*
|
|
3331
3949
|
* - `DESC` for descending.
|
|
3332
3950
|
*
|
|
3333
|
-
* The supported syntax are
|
|
3951
|
+
* The supported syntax are when `useAdminAccess` is set to `true`:
|
|
3334
3952
|
*
|
|
3335
3953
|
* - `membership_count.joined_direct_human_user_count DESC`
|
|
3336
3954
|
* - `membership_count.joined_direct_human_user_count ASC`
|
|
@@ -3338,6 +3956,11 @@ export declare class ChatServiceClient {
|
|
|
3338
3956
|
* - `last_active_time ASC`
|
|
3339
3957
|
* - `create_time DESC`
|
|
3340
3958
|
* - `create_time ASC`
|
|
3959
|
+
*
|
|
3960
|
+
* When `useAdminAccess` is set to `false`:
|
|
3961
|
+
*
|
|
3962
|
+
* - `create_time DESC`
|
|
3963
|
+
* - `relevance DESC`
|
|
3341
3964
|
* @param {object} [options]
|
|
3342
3965
|
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
3343
3966
|
* @returns {Promise} - The promise which resolves to an array.
|
|
@@ -3372,9 +3995,6 @@ export declare class ChatServiceClient {
|
|
|
3372
3995
|
* Requires either the `chat.admin.spaces.readonly` or `chat.admin.spaces`
|
|
3373
3996
|
* [OAuth 2.0
|
|
3374
3997
|
* scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes).
|
|
3375
|
-
*
|
|
3376
|
-
* This method currently only supports admin access, thus only `true` is
|
|
3377
|
-
* accepted for this field.
|
|
3378
3998
|
* @param {number} request.pageSize
|
|
3379
3999
|
* The maximum number of spaces to return. The service may return fewer than
|
|
3380
4000
|
* this value.
|
|
@@ -3393,7 +4013,8 @@ export declare class ChatServiceClient {
|
|
|
3393
4013
|
* @param {string} request.query
|
|
3394
4014
|
* Required. A search query.
|
|
3395
4015
|
*
|
|
3396
|
-
* You can search by using the following parameters
|
|
4016
|
+
* You can search by using the following parameters when `useAdminAccess`
|
|
4017
|
+
* is set to `true`:
|
|
3397
4018
|
*
|
|
3398
4019
|
* - `create_time`
|
|
3399
4020
|
* - `customer`
|
|
@@ -3403,18 +4024,27 @@ export declare class ChatServiceClient {
|
|
|
3403
4024
|
* - `space_history_state`
|
|
3404
4025
|
* - `space_type`
|
|
3405
4026
|
*
|
|
4027
|
+
* When `useAdminAccess` is set to `false`:
|
|
4028
|
+
*
|
|
4029
|
+
* - `display_name`
|
|
4030
|
+
* - `external_user_allowed`
|
|
4031
|
+
* - `space_type`
|
|
4032
|
+
*
|
|
3406
4033
|
* `create_time` and `last_active_time` accept a timestamp in
|
|
3407
4034
|
* [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339) format and the supported
|
|
3408
4035
|
* comparison operators are: `=`, `<`, `>`, `<=`, `>=`.
|
|
3409
4036
|
*
|
|
3410
|
-
* `customer` is required
|
|
3411
|
-
* to
|
|
4037
|
+
* `customer` is required when `useAdminAccess` is set to `true`, and is
|
|
4038
|
+
* used to indicate which customer to fetch spaces from.
|
|
4039
|
+
* `customers/my_customer` is the only supported value.
|
|
3412
4040
|
*
|
|
3413
4041
|
* `display_name` only accepts the `HAS` (`:`) operator. The text to
|
|
3414
4042
|
* match is first tokenized into tokens and each token is prefix-matched
|
|
3415
4043
|
* case-insensitively and independently as a substring anywhere in the space's
|
|
3416
4044
|
* `display_name`. For example, `Fun Eve` matches `Fun event` or `The
|
|
3417
|
-
* evening was fun`, but not `notFun event` or `even`.
|
|
4045
|
+
* evening was fun`, but not `notFun event` or `even`. When `useAdminAccess`
|
|
4046
|
+
* is set to `false`, `display_name` is required to retrieve meaningful
|
|
4047
|
+
* results. Otherwise, the default behavior is to return an empty response.
|
|
3418
4048
|
*
|
|
3419
4049
|
* `external_user_allowed` accepts either `true` or `false`.
|
|
3420
4050
|
*
|
|
@@ -3437,7 +4067,8 @@ export declare class ChatServiceClient {
|
|
|
3437
4067
|
* < "2022-01-01T00:00:00+00:00" AND last_active_time >
|
|
3438
4068
|
* "2023-01-01T00:00:00+00:00"`.
|
|
3439
4069
|
*
|
|
3440
|
-
* The following example queries are valid
|
|
4070
|
+
* The following example queries are valid when `useAdminAccess` is set to
|
|
4071
|
+
* `true`:
|
|
3441
4072
|
*
|
|
3442
4073
|
* ```
|
|
3443
4074
|
* customer = "customers/my_customer" AND space_type = "SPACE"
|
|
@@ -3459,6 +4090,21 @@ export declare class ChatServiceClient {
|
|
|
3459
4090
|
* "2020-01-01T00:00:00+00:00") AND (external_user_allowed = "true") AND
|
|
3460
4091
|
* (space_history_state = "HISTORY_ON" OR space_history_state = "HISTORY_OFF")
|
|
3461
4092
|
* ```
|
|
4093
|
+
*
|
|
4094
|
+
* The following example queries are valid when `useAdminAccess` is set to
|
|
4095
|
+
* `false`:
|
|
4096
|
+
*
|
|
4097
|
+
* ```
|
|
4098
|
+
* display_name:"Hello World" AND space_type = "SPACE"
|
|
4099
|
+
*
|
|
4100
|
+
* (display_name:"Hello" OR display_name:"Fun") AND space_type = "SPACE"
|
|
4101
|
+
*
|
|
4102
|
+
* (external_user_allowed = "true" AND space_type = "SPACE") // Returns an
|
|
4103
|
+
* empty response.
|
|
4104
|
+
*
|
|
4105
|
+
* (external_user_allowed = "true" AND display_name:"Hello" AND space_type =
|
|
4106
|
+
* "SPACE")
|
|
4107
|
+
* ```
|
|
3462
4108
|
* @param {string} [request.orderBy]
|
|
3463
4109
|
* Optional. How the list of spaces is ordered.
|
|
3464
4110
|
*
|
|
@@ -3470,13 +4116,17 @@ export declare class ChatServiceClient {
|
|
|
3470
4116
|
* any topic of this space.
|
|
3471
4117
|
* - `create_time` — Denotes the time of the space creation.
|
|
3472
4118
|
*
|
|
4119
|
+
* When `useAdminAccess` is `false`, only `create_time` and `relevance` are
|
|
4120
|
+
* supported for ordering. Only `DESC` is supported for these fields in
|
|
4121
|
+
* non-admin searches.
|
|
4122
|
+
*
|
|
3473
4123
|
* Valid ordering operation values are:
|
|
3474
4124
|
*
|
|
3475
4125
|
* - `ASC` for ascending. Default value.
|
|
3476
4126
|
*
|
|
3477
4127
|
* - `DESC` for descending.
|
|
3478
4128
|
*
|
|
3479
|
-
* The supported syntax are
|
|
4129
|
+
* The supported syntax are when `useAdminAccess` is set to `true`:
|
|
3480
4130
|
*
|
|
3481
4131
|
* - `membership_count.joined_direct_human_user_count DESC`
|
|
3482
4132
|
* - `membership_count.joined_direct_human_user_count ASC`
|
|
@@ -3484,6 +4134,11 @@ export declare class ChatServiceClient {
|
|
|
3484
4134
|
* - `last_active_time ASC`
|
|
3485
4135
|
* - `create_time DESC`
|
|
3486
4136
|
* - `create_time ASC`
|
|
4137
|
+
*
|
|
4138
|
+
* When `useAdminAccess` is set to `false`:
|
|
4139
|
+
*
|
|
4140
|
+
* - `create_time DESC`
|
|
4141
|
+
* - `relevance DESC`
|
|
3487
4142
|
* @param {object} [options]
|
|
3488
4143
|
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
3489
4144
|
* @returns {Stream}
|
|
@@ -3513,9 +4168,6 @@ export declare class ChatServiceClient {
|
|
|
3513
4168
|
* Requires either the `chat.admin.spaces.readonly` or `chat.admin.spaces`
|
|
3514
4169
|
* [OAuth 2.0
|
|
3515
4170
|
* scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes).
|
|
3516
|
-
*
|
|
3517
|
-
* This method currently only supports admin access, thus only `true` is
|
|
3518
|
-
* accepted for this field.
|
|
3519
4171
|
* @param {number} request.pageSize
|
|
3520
4172
|
* The maximum number of spaces to return. The service may return fewer than
|
|
3521
4173
|
* this value.
|
|
@@ -3534,7 +4186,8 @@ export declare class ChatServiceClient {
|
|
|
3534
4186
|
* @param {string} request.query
|
|
3535
4187
|
* Required. A search query.
|
|
3536
4188
|
*
|
|
3537
|
-
* You can search by using the following parameters
|
|
4189
|
+
* You can search by using the following parameters when `useAdminAccess`
|
|
4190
|
+
* is set to `true`:
|
|
3538
4191
|
*
|
|
3539
4192
|
* - `create_time`
|
|
3540
4193
|
* - `customer`
|
|
@@ -3544,18 +4197,27 @@ export declare class ChatServiceClient {
|
|
|
3544
4197
|
* - `space_history_state`
|
|
3545
4198
|
* - `space_type`
|
|
3546
4199
|
*
|
|
4200
|
+
* When `useAdminAccess` is set to `false`:
|
|
4201
|
+
*
|
|
4202
|
+
* - `display_name`
|
|
4203
|
+
* - `external_user_allowed`
|
|
4204
|
+
* - `space_type`
|
|
4205
|
+
*
|
|
3547
4206
|
* `create_time` and `last_active_time` accept a timestamp in
|
|
3548
4207
|
* [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339) format and the supported
|
|
3549
4208
|
* comparison operators are: `=`, `<`, `>`, `<=`, `>=`.
|
|
3550
4209
|
*
|
|
3551
|
-
* `customer` is required
|
|
3552
|
-
* to
|
|
4210
|
+
* `customer` is required when `useAdminAccess` is set to `true`, and is
|
|
4211
|
+
* used to indicate which customer to fetch spaces from.
|
|
4212
|
+
* `customers/my_customer` is the only supported value.
|
|
3553
4213
|
*
|
|
3554
4214
|
* `display_name` only accepts the `HAS` (`:`) operator. The text to
|
|
3555
4215
|
* match is first tokenized into tokens and each token is prefix-matched
|
|
3556
4216
|
* case-insensitively and independently as a substring anywhere in the space's
|
|
3557
4217
|
* `display_name`. For example, `Fun Eve` matches `Fun event` or `The
|
|
3558
|
-
* evening was fun`, but not `notFun event` or `even`.
|
|
4218
|
+
* evening was fun`, but not `notFun event` or `even`. When `useAdminAccess`
|
|
4219
|
+
* is set to `false`, `display_name` is required to retrieve meaningful
|
|
4220
|
+
* results. Otherwise, the default behavior is to return an empty response.
|
|
3559
4221
|
*
|
|
3560
4222
|
* `external_user_allowed` accepts either `true` or `false`.
|
|
3561
4223
|
*
|
|
@@ -3578,7 +4240,8 @@ export declare class ChatServiceClient {
|
|
|
3578
4240
|
* < "2022-01-01T00:00:00+00:00" AND last_active_time >
|
|
3579
4241
|
* "2023-01-01T00:00:00+00:00"`.
|
|
3580
4242
|
*
|
|
3581
|
-
* The following example queries are valid
|
|
4243
|
+
* The following example queries are valid when `useAdminAccess` is set to
|
|
4244
|
+
* `true`:
|
|
3582
4245
|
*
|
|
3583
4246
|
* ```
|
|
3584
4247
|
* customer = "customers/my_customer" AND space_type = "SPACE"
|
|
@@ -3600,6 +4263,21 @@ export declare class ChatServiceClient {
|
|
|
3600
4263
|
* "2020-01-01T00:00:00+00:00") AND (external_user_allowed = "true") AND
|
|
3601
4264
|
* (space_history_state = "HISTORY_ON" OR space_history_state = "HISTORY_OFF")
|
|
3602
4265
|
* ```
|
|
4266
|
+
*
|
|
4267
|
+
* The following example queries are valid when `useAdminAccess` is set to
|
|
4268
|
+
* `false`:
|
|
4269
|
+
*
|
|
4270
|
+
* ```
|
|
4271
|
+
* display_name:"Hello World" AND space_type = "SPACE"
|
|
4272
|
+
*
|
|
4273
|
+
* (display_name:"Hello" OR display_name:"Fun") AND space_type = "SPACE"
|
|
4274
|
+
*
|
|
4275
|
+
* (external_user_allowed = "true" AND space_type = "SPACE") // Returns an
|
|
4276
|
+
* empty response.
|
|
4277
|
+
*
|
|
4278
|
+
* (external_user_allowed = "true" AND display_name:"Hello" AND space_type =
|
|
4279
|
+
* "SPACE")
|
|
4280
|
+
* ```
|
|
3603
4281
|
* @param {string} [request.orderBy]
|
|
3604
4282
|
* Optional. How the list of spaces is ordered.
|
|
3605
4283
|
*
|
|
@@ -3611,13 +4289,17 @@ export declare class ChatServiceClient {
|
|
|
3611
4289
|
* any topic of this space.
|
|
3612
4290
|
* - `create_time` — Denotes the time of the space creation.
|
|
3613
4291
|
*
|
|
4292
|
+
* When `useAdminAccess` is `false`, only `create_time` and `relevance` are
|
|
4293
|
+
* supported for ordering. Only `DESC` is supported for these fields in
|
|
4294
|
+
* non-admin searches.
|
|
4295
|
+
*
|
|
3614
4296
|
* Valid ordering operation values are:
|
|
3615
4297
|
*
|
|
3616
4298
|
* - `ASC` for ascending. Default value.
|
|
3617
4299
|
*
|
|
3618
4300
|
* - `DESC` for descending.
|
|
3619
4301
|
*
|
|
3620
|
-
* The supported syntax are
|
|
4302
|
+
* The supported syntax are when `useAdminAccess` is set to `true`:
|
|
3621
4303
|
*
|
|
3622
4304
|
* - `membership_count.joined_direct_human_user_count DESC`
|
|
3623
4305
|
* - `membership_count.joined_direct_human_user_count ASC`
|
|
@@ -3625,6 +4307,11 @@ export declare class ChatServiceClient {
|
|
|
3625
4307
|
* - `last_active_time ASC`
|
|
3626
4308
|
* - `create_time DESC`
|
|
3627
4309
|
* - `create_time ASC`
|
|
4310
|
+
*
|
|
4311
|
+
* When `useAdminAccess` is set to `false`:
|
|
4312
|
+
*
|
|
4313
|
+
* - `create_time DESC`
|
|
4314
|
+
* - `relevance DESC`
|
|
3628
4315
|
* @param {object} [options]
|
|
3629
4316
|
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
3630
4317
|
* @returns {Object}
|