@google-apps/chat 0.28.0 → 0.30.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 +56 -7
- package/build/protos/google/chat/v1/markup_syntax.proto +47 -0
- package/build/protos/google/chat/v1/message.proto +271 -11
- package/build/protos/google/chat/v1/space.proto +65 -16
- package/build/protos/protos.d.ts +2687 -1693
- package/build/protos/protos.js +1 -1
- package/build/protos/protos.json +423 -98
- package/build/src/v1/chat_service_client.d.ts +745 -34
- package/build/src/v1/chat_service_client.js +532 -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/chat_service_proto_list.json +1 -0
- package/build/src/v1/gapic_metadata.json +14 -0
- package/package.json +1 -1
|
@@ -337,6 +337,9 @@ export declare class ChatServiceClient {
|
|
|
337
337
|
* `clientAssignedMessageId` field for `{message}`. For details, see [Name a
|
|
338
338
|
* message]
|
|
339
339
|
* (https://developers.google.com/workspace/chat/create-messages#name_a_created_message).
|
|
340
|
+
* @param {google.chat.v1.MarkupSyntax} [request.markupSyntax]
|
|
341
|
+
* Optional. Specifies the desired output syntax for the Chat message
|
|
342
|
+
* `formatted_text` field.
|
|
340
343
|
* @param {object} [options]
|
|
341
344
|
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
342
345
|
* @returns {Promise} - The promise which resolves to an array.
|
|
@@ -2450,6 +2453,9 @@ export declare class ChatServiceClient {
|
|
|
2450
2453
|
* Optional. Whether to include deleted messages. Deleted messages include
|
|
2451
2454
|
* deleted time and metadata about their deletion, but message content is
|
|
2452
2455
|
* unavailable.
|
|
2456
|
+
* @param {google.chat.v1.MarkupSyntax} [request.markupSyntax]
|
|
2457
|
+
* Optional. Specifies the desired output syntax for the Chat message
|
|
2458
|
+
* `formatted_text` field.
|
|
2453
2459
|
* @param {object} [options]
|
|
2454
2460
|
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
2455
2461
|
* @returns {Promise} - The promise which resolves to an array.
|
|
@@ -2545,6 +2551,9 @@ export declare class ChatServiceClient {
|
|
|
2545
2551
|
* Optional. Whether to include deleted messages. Deleted messages include
|
|
2546
2552
|
* deleted time and metadata about their deletion, but message content is
|
|
2547
2553
|
* unavailable.
|
|
2554
|
+
* @param {google.chat.v1.MarkupSyntax} [request.markupSyntax]
|
|
2555
|
+
* Optional. Specifies the desired output syntax for the Chat message
|
|
2556
|
+
* `formatted_text` field.
|
|
2548
2557
|
* @param {object} [options]
|
|
2549
2558
|
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
2550
2559
|
* @returns {Stream}
|
|
@@ -2635,6 +2644,9 @@ export declare class ChatServiceClient {
|
|
|
2635
2644
|
* Optional. Whether to include deleted messages. Deleted messages include
|
|
2636
2645
|
* deleted time and metadata about their deletion, but message content is
|
|
2637
2646
|
* unavailable.
|
|
2647
|
+
* @param {google.chat.v1.MarkupSyntax} [request.markupSyntax]
|
|
2648
|
+
* Optional. Specifies the desired output syntax for the Chat message
|
|
2649
|
+
* `formatted_text` field.
|
|
2638
2650
|
* @param {object} [options]
|
|
2639
2651
|
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
2640
2652
|
* @returns {Object}
|
|
@@ -3010,6 +3022,595 @@ export declare class ChatServiceClient {
|
|
|
3010
3022
|
* region_tag:chat_v1_generated_ChatService_ListMemberships_async
|
|
3011
3023
|
*/
|
|
3012
3024
|
listMembershipsAsync(request?: protos.google.chat.v1.IListMembershipsRequest, options?: CallOptions): AsyncIterable<protos.google.chat.v1.IMembership>;
|
|
3025
|
+
/**
|
|
3026
|
+
* Searches for messages in Google Chat that the calling user has access to.
|
|
3027
|
+
* Returns a list of messages matching the search criteria.
|
|
3028
|
+
*
|
|
3029
|
+
* To search across all spaces the user has access to, set `parent` to
|
|
3030
|
+
* `spaces/-`. Using any other value for `parent` results in an
|
|
3031
|
+
* `INVALID_ARGUMENT` error. The returned messages have their `name` field
|
|
3032
|
+
* populated with the full resource name, which includes the specific `space`
|
|
3033
|
+
* in which the message resides.
|
|
3034
|
+
*
|
|
3035
|
+
* This API doesn't return all message types. The types of messages listed
|
|
3036
|
+
* below aren't included in the response. Use
|
|
3037
|
+
* {@link protos.google.chat.v1.ChatService.ListMessages|ListMessages} to list all
|
|
3038
|
+
* messages.
|
|
3039
|
+
*
|
|
3040
|
+
* - Private Messages that are visible to the authenticated user.
|
|
3041
|
+
* - Messages posted by Chat apps in spaces or group chats.
|
|
3042
|
+
* - Messages in a Chat app DM.
|
|
3043
|
+
* - Messages from blocked users.
|
|
3044
|
+
* - Messages in spaces that the caller has muted.
|
|
3045
|
+
*
|
|
3046
|
+
* Requires [user
|
|
3047
|
+
* authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
|
|
3048
|
+
* with one of the following [authorization
|
|
3049
|
+
* scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
|
|
3050
|
+
*
|
|
3051
|
+
* - `https://www.googleapis.com/auth/chat.messages.readonly`
|
|
3052
|
+
* - `https://www.googleapis.com/auth/chat.messages`
|
|
3053
|
+
*
|
|
3054
|
+
* @param {Object} request
|
|
3055
|
+
* The request object that will be sent.
|
|
3056
|
+
* @param {string} request.parent
|
|
3057
|
+
* Required. The resource name of the space to search within.
|
|
3058
|
+
*
|
|
3059
|
+
* To search across all spaces the user has access to, set this field to
|
|
3060
|
+
* `spaces/-`. Using any other value for `parent` results in an
|
|
3061
|
+
* `INVALID_ARGUMENT` error.
|
|
3062
|
+
*
|
|
3063
|
+
* To limit the search to one or more spaces, use `space.name` or
|
|
3064
|
+
* `space.display_name` in the `filter`.
|
|
3065
|
+
* @param {string} request.filter
|
|
3066
|
+
* Required. A search query.
|
|
3067
|
+
*
|
|
3068
|
+
* The query can specify one or more search keywords, which are used to filter
|
|
3069
|
+
* the results,
|
|
3070
|
+
*
|
|
3071
|
+
* You can also filter the results using the following message fields:
|
|
3072
|
+
*
|
|
3073
|
+
* - `create_time`: Accepts a timestamp in
|
|
3074
|
+
* [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339) format and the
|
|
3075
|
+
* supported comparison operators are: `<` and `>=`.
|
|
3076
|
+
* - `sender.name`: The resource name of the sender (`users/{user}`). Only
|
|
3077
|
+
* supports `=`. You can use the e-mail as an alias for `{user}`. For
|
|
3078
|
+
* example, `users/example@gmail.com`, where `example@gmail.com` is the
|
|
3079
|
+
* e-mail of the Google Chat user.
|
|
3080
|
+
* - `space.name`: The resource name of the space where the message is posted.
|
|
3081
|
+
* (`spaces/{space}`). Only supports `=`. If this filter is not set, the
|
|
3082
|
+
* search is performed across all direct messages and spaces the user has
|
|
3083
|
+
* access to as a space member.
|
|
3084
|
+
* - `space.display_name`: Supports the operator `:` (has) and filters spaces
|
|
3085
|
+
* based on a partial match of their display name. Results are limited to
|
|
3086
|
+
* the top five space matches. For example, `space.display_name:Project`
|
|
3087
|
+
* searches for messages in the top five spaces that contain the word
|
|
3088
|
+
* "Project" in their display names.
|
|
3089
|
+
* - `attachment`: Supports the operator `:*` (has any) to check for the
|
|
3090
|
+
* presence of attachments. If `attachment:*` is specified, only messages
|
|
3091
|
+
* that have at least one attachment are returned.
|
|
3092
|
+
* - `annotations.user_mentions.user.name`: The resource name of the mentioned
|
|
3093
|
+
* user (`users/{user}`). Only supports `:` (has). For example:
|
|
3094
|
+
* `annotations.user_mentions.user.name:"users/1234567890"` returns only
|
|
3095
|
+
* messages that contain a mention to the specified user. Alternatively, the
|
|
3096
|
+
* alias `me` can be used to filter for messages that mention the caller
|
|
3097
|
+
* user, for example: `annotations.user_mentions.user.name:users/me`. You
|
|
3098
|
+
* can also use the e-mail as an alias for `{user}`, for example,
|
|
3099
|
+
* `users/example@gmail.com`.
|
|
3100
|
+
*
|
|
3101
|
+
* For advanced filtering, the following functions are also available:
|
|
3102
|
+
*
|
|
3103
|
+
* - `has_link()`: Returns only messages that have at least one hyperlink in
|
|
3104
|
+
* the message text.
|
|
3105
|
+
* - `is_unread()`: Filters out messages that have been read by the calling
|
|
3106
|
+
* user.
|
|
3107
|
+
*
|
|
3108
|
+
* Using the `space.display_name` filter requires that the calling credentials
|
|
3109
|
+
* include one of the following [authorization
|
|
3110
|
+
* scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
|
|
3111
|
+
*
|
|
3112
|
+
* - `https://www.googleapis.com/auth/chat.spaces.readonly`
|
|
3113
|
+
* - `https://www.googleapis.com/auth/chat.spaces`
|
|
3114
|
+
*
|
|
3115
|
+
* Using the `is_unread()` filter requires that the calling credentials
|
|
3116
|
+
* include one of the following [authorization
|
|
3117
|
+
* scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
|
|
3118
|
+
*
|
|
3119
|
+
* - `https://www.googleapis.com/auth/chat.users.readstate.readonly`
|
|
3120
|
+
* - `https://www.googleapis.com/auth/chat.users.readstate`
|
|
3121
|
+
*
|
|
3122
|
+
*
|
|
3123
|
+
* Across different fields, only `AND` operators are supported. A valid
|
|
3124
|
+
* example is `sender.name = "users/1234567890" AND is_unread()`. The word
|
|
3125
|
+
* `AND` is optional and is implied if omitted. For example, `sender.name =
|
|
3126
|
+
* "users/1234567890" is_unread()` is valid and is equivalent to the previous
|
|
3127
|
+
* example. An invalid example is `sender.name = "users/1234567890" OR
|
|
3128
|
+
* is_unread()` because `OR` is not supported between different fields.
|
|
3129
|
+
*
|
|
3130
|
+
* Among the same field:
|
|
3131
|
+
*
|
|
3132
|
+
* - `create_time` supports only `AND`, and can only be used to represent
|
|
3133
|
+
* an interval, such as `create_time >= "2022-01-01T00:00:00+00:00" AND
|
|
3134
|
+
* create_time < "2023-01-01T00:00:00+00:00"`.
|
|
3135
|
+
* - `sender.name` supports only the `OR` operator, for example:
|
|
3136
|
+
* `sender.name = "users/1234567890" OR sender.name = "users/0987654321"`.
|
|
3137
|
+
* - `space.name` supports only the `OR` operator, for example:
|
|
3138
|
+
* `space.name = "spaces/ABCDEFGH" OR space.name = "spaces/QWERTYUI"`.
|
|
3139
|
+
* - `space.display_name` supports the operators `AND` and `OR`, but not a
|
|
3140
|
+
* mix of both. For example:
|
|
3141
|
+
* `space.display_name:Project AND space.display_name:Tasks` returns
|
|
3142
|
+
* messages that are in spaces with display names containing both `Project`
|
|
3143
|
+
* and `Tasks`, whereas
|
|
3144
|
+
* `space.display_name:Project OR space.display_name:Tasks` returns messages
|
|
3145
|
+
* that are in spaces with display names containing either `Project` or
|
|
3146
|
+
* `Tasks` or both.
|
|
3147
|
+
* - `annotations.user_mentions.user.name` supports the operators `AND` and
|
|
3148
|
+
* `OR`, but not a mix of both. For example:
|
|
3149
|
+
* `annotations.user_mentions.user.name:"users/1234567890" AND
|
|
3150
|
+
* annotations.user_mentions.user.name:"users/0987654321"` returns only
|
|
3151
|
+
* messages that mentions both users, whereas
|
|
3152
|
+
* `annotations.user_mentions.user.name:"users/1234567890" OR
|
|
3153
|
+
* annotations.user_mentions.user.name:"users/0987654321"` returns messages
|
|
3154
|
+
* that mention either user or both.
|
|
3155
|
+
*
|
|
3156
|
+
* Parentheses are required to disambiguate operator precedence when combining
|
|
3157
|
+
* `AND` and `OR` operators in the same query. For example:
|
|
3158
|
+
* `(sender.name="users/me" OR sender.name="users/123456") AND is_unread()`.
|
|
3159
|
+
* Otherwise, parentheses are optional.
|
|
3160
|
+
*
|
|
3161
|
+
* The following example queries are valid:
|
|
3162
|
+
*
|
|
3163
|
+
* ```
|
|
3164
|
+
* "Pending reports" AND create_time >= "2023-01-01T00:00:00Z"
|
|
3165
|
+
*
|
|
3166
|
+
* sender.name = "users/example@gmail.com"
|
|
3167
|
+
*
|
|
3168
|
+
* annotations.user_mentions.user.name:"users/0987654321"
|
|
3169
|
+
*
|
|
3170
|
+
* attachment:* AND space.name = "spaces/ABCDEFGH"
|
|
3171
|
+
*
|
|
3172
|
+
* tasks AND is_unread() AND sender.name = "users/1234567890"
|
|
3173
|
+
*
|
|
3174
|
+
* "things to do" "urgent"
|
|
3175
|
+
*
|
|
3176
|
+
* (sender.name = "users/1234567890")
|
|
3177
|
+
* AND (create_time < "2023-05-01T00:00:00Z")
|
|
3178
|
+
*
|
|
3179
|
+
* tasks AND space.name = "spaces/ABCDEFGH" AND has_link()
|
|
3180
|
+
*
|
|
3181
|
+
* "project one" is_unread()
|
|
3182
|
+
*
|
|
3183
|
+
* space.display_name:Project tasks
|
|
3184
|
+
* ```
|
|
3185
|
+
*
|
|
3186
|
+
* The maximum query length is 1,000 characters.
|
|
3187
|
+
*
|
|
3188
|
+
* Invalid queries are rejected by the server with an `INVALID_ARGUMENT`
|
|
3189
|
+
* error.
|
|
3190
|
+
* @param {number} [request.pageSize]
|
|
3191
|
+
* Optional. The maximum number of results to return. The service may return
|
|
3192
|
+
* fewer than this value.
|
|
3193
|
+
*
|
|
3194
|
+
* If unspecified, at most 25 are returned.
|
|
3195
|
+
*
|
|
3196
|
+
* The maximum value is 100. If you use a value more than 100, it's
|
|
3197
|
+
* automatically changed to 100.
|
|
3198
|
+
* @param {string} [request.pageToken]
|
|
3199
|
+
* Optional. A token, received from the previous search messages call. Provide
|
|
3200
|
+
* this parameter to retrieve the subsequent page.
|
|
3201
|
+
*
|
|
3202
|
+
* When paginating, all other parameters provided should match the call that
|
|
3203
|
+
* provided the page token. Passing different values to the other parameters
|
|
3204
|
+
* might lead to unexpected results.
|
|
3205
|
+
* @param {string} [request.orderBy]
|
|
3206
|
+
* Optional. How the results list is ordered.
|
|
3207
|
+
*
|
|
3208
|
+
* Supported attributes to order by are:
|
|
3209
|
+
*
|
|
3210
|
+
* - `create_time`: Sorts the results by the time of the message creation.
|
|
3211
|
+
* Default value.
|
|
3212
|
+
* - `relevance`: Sorts the results by relevance.
|
|
3213
|
+
* [Developer Preview](https://developers.google.com/workspace/preview).
|
|
3214
|
+
*
|
|
3215
|
+
* The default ordering is `create_time desc`. Only a single order per query
|
|
3216
|
+
* (`create_time` or `relevance`) is supported. Only descending order (`desc`)
|
|
3217
|
+
* is supported, and it must be specified after the order attribute.
|
|
3218
|
+
* @param {google.chat.v1.MarkupSyntax} [request.markupSyntax]
|
|
3219
|
+
* Optional. Specifies the desired output syntax for the Chat message
|
|
3220
|
+
* `formatted_text` field.
|
|
3221
|
+
* @param {google.chat.v1.SearchMessagesRequest.SearchMessagesView} [request.view]
|
|
3222
|
+
* Optional. Specifies what kind of search results view to return. The default
|
|
3223
|
+
* is `SEARCH_MESSAGES_VIEW_BASIC`.
|
|
3224
|
+
* @param {object} [options]
|
|
3225
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
3226
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
3227
|
+
* The first element of the array is Array of {@link protos.google.chat.v1.SearchMessageResult|SearchMessageResult}.
|
|
3228
|
+
* The client library will perform auto-pagination by default: it will call the API as many
|
|
3229
|
+
* times as needed and will merge results from all the pages into this array.
|
|
3230
|
+
* Note that it can affect your quota.
|
|
3231
|
+
* We recommend using `searchMessagesAsync()`
|
|
3232
|
+
* method described below for async iteration which you can stop as needed.
|
|
3233
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
3234
|
+
* for more details and examples.
|
|
3235
|
+
*/
|
|
3236
|
+
searchMessages(request?: protos.google.chat.v1.ISearchMessagesRequest, options?: CallOptions): Promise<[
|
|
3237
|
+
protos.google.chat.v1.ISearchMessageResult[],
|
|
3238
|
+
protos.google.chat.v1.ISearchMessagesRequest | null,
|
|
3239
|
+
protos.google.chat.v1.ISearchMessagesResponse
|
|
3240
|
+
]>;
|
|
3241
|
+
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;
|
|
3242
|
+
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;
|
|
3243
|
+
/**
|
|
3244
|
+
* Equivalent to `searchMessages`, but returns a NodeJS Stream object.
|
|
3245
|
+
* @param {Object} request
|
|
3246
|
+
* The request object that will be sent.
|
|
3247
|
+
* @param {string} request.parent
|
|
3248
|
+
* Required. The resource name of the space to search within.
|
|
3249
|
+
*
|
|
3250
|
+
* To search across all spaces the user has access to, set this field to
|
|
3251
|
+
* `spaces/-`. Using any other value for `parent` results in an
|
|
3252
|
+
* `INVALID_ARGUMENT` error.
|
|
3253
|
+
*
|
|
3254
|
+
* To limit the search to one or more spaces, use `space.name` or
|
|
3255
|
+
* `space.display_name` in the `filter`.
|
|
3256
|
+
* @param {string} request.filter
|
|
3257
|
+
* Required. A search query.
|
|
3258
|
+
*
|
|
3259
|
+
* The query can specify one or more search keywords, which are used to filter
|
|
3260
|
+
* the results,
|
|
3261
|
+
*
|
|
3262
|
+
* You can also filter the results using the following message fields:
|
|
3263
|
+
*
|
|
3264
|
+
* - `create_time`: Accepts a timestamp in
|
|
3265
|
+
* [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339) format and the
|
|
3266
|
+
* supported comparison operators are: `<` and `>=`.
|
|
3267
|
+
* - `sender.name`: The resource name of the sender (`users/{user}`). Only
|
|
3268
|
+
* supports `=`. You can use the e-mail as an alias for `{user}`. For
|
|
3269
|
+
* example, `users/example@gmail.com`, where `example@gmail.com` is the
|
|
3270
|
+
* e-mail of the Google Chat user.
|
|
3271
|
+
* - `space.name`: The resource name of the space where the message is posted.
|
|
3272
|
+
* (`spaces/{space}`). Only supports `=`. If this filter is not set, the
|
|
3273
|
+
* search is performed across all direct messages and spaces the user has
|
|
3274
|
+
* access to as a space member.
|
|
3275
|
+
* - `space.display_name`: Supports the operator `:` (has) and filters spaces
|
|
3276
|
+
* based on a partial match of their display name. Results are limited to
|
|
3277
|
+
* the top five space matches. For example, `space.display_name:Project`
|
|
3278
|
+
* searches for messages in the top five spaces that contain the word
|
|
3279
|
+
* "Project" in their display names.
|
|
3280
|
+
* - `attachment`: Supports the operator `:*` (has any) to check for the
|
|
3281
|
+
* presence of attachments. If `attachment:*` is specified, only messages
|
|
3282
|
+
* that have at least one attachment are returned.
|
|
3283
|
+
* - `annotations.user_mentions.user.name`: The resource name of the mentioned
|
|
3284
|
+
* user (`users/{user}`). Only supports `:` (has). For example:
|
|
3285
|
+
* `annotations.user_mentions.user.name:"users/1234567890"` returns only
|
|
3286
|
+
* messages that contain a mention to the specified user. Alternatively, the
|
|
3287
|
+
* alias `me` can be used to filter for messages that mention the caller
|
|
3288
|
+
* user, for example: `annotations.user_mentions.user.name:users/me`. You
|
|
3289
|
+
* can also use the e-mail as an alias for `{user}`, for example,
|
|
3290
|
+
* `users/example@gmail.com`.
|
|
3291
|
+
*
|
|
3292
|
+
* For advanced filtering, the following functions are also available:
|
|
3293
|
+
*
|
|
3294
|
+
* - `has_link()`: Returns only messages that have at least one hyperlink in
|
|
3295
|
+
* the message text.
|
|
3296
|
+
* - `is_unread()`: Filters out messages that have been read by the calling
|
|
3297
|
+
* user.
|
|
3298
|
+
*
|
|
3299
|
+
* Using the `space.display_name` filter requires that the calling credentials
|
|
3300
|
+
* include one of the following [authorization
|
|
3301
|
+
* scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
|
|
3302
|
+
*
|
|
3303
|
+
* - `https://www.googleapis.com/auth/chat.spaces.readonly`
|
|
3304
|
+
* - `https://www.googleapis.com/auth/chat.spaces`
|
|
3305
|
+
*
|
|
3306
|
+
* Using the `is_unread()` filter requires that the calling credentials
|
|
3307
|
+
* include one of the following [authorization
|
|
3308
|
+
* scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
|
|
3309
|
+
*
|
|
3310
|
+
* - `https://www.googleapis.com/auth/chat.users.readstate.readonly`
|
|
3311
|
+
* - `https://www.googleapis.com/auth/chat.users.readstate`
|
|
3312
|
+
*
|
|
3313
|
+
*
|
|
3314
|
+
* Across different fields, only `AND` operators are supported. A valid
|
|
3315
|
+
* example is `sender.name = "users/1234567890" AND is_unread()`. The word
|
|
3316
|
+
* `AND` is optional and is implied if omitted. For example, `sender.name =
|
|
3317
|
+
* "users/1234567890" is_unread()` is valid and is equivalent to the previous
|
|
3318
|
+
* example. An invalid example is `sender.name = "users/1234567890" OR
|
|
3319
|
+
* is_unread()` because `OR` is not supported between different fields.
|
|
3320
|
+
*
|
|
3321
|
+
* Among the same field:
|
|
3322
|
+
*
|
|
3323
|
+
* - `create_time` supports only `AND`, and can only be used to represent
|
|
3324
|
+
* an interval, such as `create_time >= "2022-01-01T00:00:00+00:00" AND
|
|
3325
|
+
* create_time < "2023-01-01T00:00:00+00:00"`.
|
|
3326
|
+
* - `sender.name` supports only the `OR` operator, for example:
|
|
3327
|
+
* `sender.name = "users/1234567890" OR sender.name = "users/0987654321"`.
|
|
3328
|
+
* - `space.name` supports only the `OR` operator, for example:
|
|
3329
|
+
* `space.name = "spaces/ABCDEFGH" OR space.name = "spaces/QWERTYUI"`.
|
|
3330
|
+
* - `space.display_name` supports the operators `AND` and `OR`, but not a
|
|
3331
|
+
* mix of both. For example:
|
|
3332
|
+
* `space.display_name:Project AND space.display_name:Tasks` returns
|
|
3333
|
+
* messages that are in spaces with display names containing both `Project`
|
|
3334
|
+
* and `Tasks`, whereas
|
|
3335
|
+
* `space.display_name:Project OR space.display_name:Tasks` returns messages
|
|
3336
|
+
* that are in spaces with display names containing either `Project` or
|
|
3337
|
+
* `Tasks` or both.
|
|
3338
|
+
* - `annotations.user_mentions.user.name` supports the operators `AND` and
|
|
3339
|
+
* `OR`, but not a mix of both. For example:
|
|
3340
|
+
* `annotations.user_mentions.user.name:"users/1234567890" AND
|
|
3341
|
+
* annotations.user_mentions.user.name:"users/0987654321"` returns only
|
|
3342
|
+
* messages that mentions both users, whereas
|
|
3343
|
+
* `annotations.user_mentions.user.name:"users/1234567890" OR
|
|
3344
|
+
* annotations.user_mentions.user.name:"users/0987654321"` returns messages
|
|
3345
|
+
* that mention either user or both.
|
|
3346
|
+
*
|
|
3347
|
+
* Parentheses are required to disambiguate operator precedence when combining
|
|
3348
|
+
* `AND` and `OR` operators in the same query. For example:
|
|
3349
|
+
* `(sender.name="users/me" OR sender.name="users/123456") AND is_unread()`.
|
|
3350
|
+
* Otherwise, parentheses are optional.
|
|
3351
|
+
*
|
|
3352
|
+
* The following example queries are valid:
|
|
3353
|
+
*
|
|
3354
|
+
* ```
|
|
3355
|
+
* "Pending reports" AND create_time >= "2023-01-01T00:00:00Z"
|
|
3356
|
+
*
|
|
3357
|
+
* sender.name = "users/example@gmail.com"
|
|
3358
|
+
*
|
|
3359
|
+
* annotations.user_mentions.user.name:"users/0987654321"
|
|
3360
|
+
*
|
|
3361
|
+
* attachment:* AND space.name = "spaces/ABCDEFGH"
|
|
3362
|
+
*
|
|
3363
|
+
* tasks AND is_unread() AND sender.name = "users/1234567890"
|
|
3364
|
+
*
|
|
3365
|
+
* "things to do" "urgent"
|
|
3366
|
+
*
|
|
3367
|
+
* (sender.name = "users/1234567890")
|
|
3368
|
+
* AND (create_time < "2023-05-01T00:00:00Z")
|
|
3369
|
+
*
|
|
3370
|
+
* tasks AND space.name = "spaces/ABCDEFGH" AND has_link()
|
|
3371
|
+
*
|
|
3372
|
+
* "project one" is_unread()
|
|
3373
|
+
*
|
|
3374
|
+
* space.display_name:Project tasks
|
|
3375
|
+
* ```
|
|
3376
|
+
*
|
|
3377
|
+
* The maximum query length is 1,000 characters.
|
|
3378
|
+
*
|
|
3379
|
+
* Invalid queries are rejected by the server with an `INVALID_ARGUMENT`
|
|
3380
|
+
* error.
|
|
3381
|
+
* @param {number} [request.pageSize]
|
|
3382
|
+
* Optional. The maximum number of results to return. The service may return
|
|
3383
|
+
* fewer than this value.
|
|
3384
|
+
*
|
|
3385
|
+
* If unspecified, at most 25 are returned.
|
|
3386
|
+
*
|
|
3387
|
+
* The maximum value is 100. If you use a value more than 100, it's
|
|
3388
|
+
* automatically changed to 100.
|
|
3389
|
+
* @param {string} [request.pageToken]
|
|
3390
|
+
* Optional. A token, received from the previous search messages call. Provide
|
|
3391
|
+
* this parameter to retrieve the subsequent page.
|
|
3392
|
+
*
|
|
3393
|
+
* When paginating, all other parameters provided should match the call that
|
|
3394
|
+
* provided the page token. Passing different values to the other parameters
|
|
3395
|
+
* might lead to unexpected results.
|
|
3396
|
+
* @param {string} [request.orderBy]
|
|
3397
|
+
* Optional. How the results list is ordered.
|
|
3398
|
+
*
|
|
3399
|
+
* Supported attributes to order by are:
|
|
3400
|
+
*
|
|
3401
|
+
* - `create_time`: Sorts the results by the time of the message creation.
|
|
3402
|
+
* Default value.
|
|
3403
|
+
* - `relevance`: Sorts the results by relevance.
|
|
3404
|
+
* [Developer Preview](https://developers.google.com/workspace/preview).
|
|
3405
|
+
*
|
|
3406
|
+
* The default ordering is `create_time desc`. Only a single order per query
|
|
3407
|
+
* (`create_time` or `relevance`) is supported. Only descending order (`desc`)
|
|
3408
|
+
* is supported, and it must be specified after the order attribute.
|
|
3409
|
+
* @param {google.chat.v1.MarkupSyntax} [request.markupSyntax]
|
|
3410
|
+
* Optional. Specifies the desired output syntax for the Chat message
|
|
3411
|
+
* `formatted_text` field.
|
|
3412
|
+
* @param {google.chat.v1.SearchMessagesRequest.SearchMessagesView} [request.view]
|
|
3413
|
+
* Optional. Specifies what kind of search results view to return. The default
|
|
3414
|
+
* is `SEARCH_MESSAGES_VIEW_BASIC`.
|
|
3415
|
+
* @param {object} [options]
|
|
3416
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
3417
|
+
* @returns {Stream}
|
|
3418
|
+
* An object stream which emits an object representing {@link protos.google.chat.v1.SearchMessageResult|SearchMessageResult} on 'data' event.
|
|
3419
|
+
* The client library will perform auto-pagination by default: it will call the API as many
|
|
3420
|
+
* times as needed. Note that it can affect your quota.
|
|
3421
|
+
* We recommend using `searchMessagesAsync()`
|
|
3422
|
+
* method described below for async iteration which you can stop as needed.
|
|
3423
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
3424
|
+
* for more details and examples.
|
|
3425
|
+
*/
|
|
3426
|
+
searchMessagesStream(request?: protos.google.chat.v1.ISearchMessagesRequest, options?: CallOptions): Transform;
|
|
3427
|
+
/**
|
|
3428
|
+
* Equivalent to `searchMessages`, but returns an iterable object.
|
|
3429
|
+
*
|
|
3430
|
+
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
|
3431
|
+
* @param {Object} request
|
|
3432
|
+
* The request object that will be sent.
|
|
3433
|
+
* @param {string} request.parent
|
|
3434
|
+
* Required. The resource name of the space to search within.
|
|
3435
|
+
*
|
|
3436
|
+
* To search across all spaces the user has access to, set this field to
|
|
3437
|
+
* `spaces/-`. Using any other value for `parent` results in an
|
|
3438
|
+
* `INVALID_ARGUMENT` error.
|
|
3439
|
+
*
|
|
3440
|
+
* To limit the search to one or more spaces, use `space.name` or
|
|
3441
|
+
* `space.display_name` in the `filter`.
|
|
3442
|
+
* @param {string} request.filter
|
|
3443
|
+
* Required. A search query.
|
|
3444
|
+
*
|
|
3445
|
+
* The query can specify one or more search keywords, which are used to filter
|
|
3446
|
+
* the results,
|
|
3447
|
+
*
|
|
3448
|
+
* You can also filter the results using the following message fields:
|
|
3449
|
+
*
|
|
3450
|
+
* - `create_time`: Accepts a timestamp in
|
|
3451
|
+
* [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339) format and the
|
|
3452
|
+
* supported comparison operators are: `<` and `>=`.
|
|
3453
|
+
* - `sender.name`: The resource name of the sender (`users/{user}`). Only
|
|
3454
|
+
* supports `=`. You can use the e-mail as an alias for `{user}`. For
|
|
3455
|
+
* example, `users/example@gmail.com`, where `example@gmail.com` is the
|
|
3456
|
+
* e-mail of the Google Chat user.
|
|
3457
|
+
* - `space.name`: The resource name of the space where the message is posted.
|
|
3458
|
+
* (`spaces/{space}`). Only supports `=`. If this filter is not set, the
|
|
3459
|
+
* search is performed across all direct messages and spaces the user has
|
|
3460
|
+
* access to as a space member.
|
|
3461
|
+
* - `space.display_name`: Supports the operator `:` (has) and filters spaces
|
|
3462
|
+
* based on a partial match of their display name. Results are limited to
|
|
3463
|
+
* the top five space matches. For example, `space.display_name:Project`
|
|
3464
|
+
* searches for messages in the top five spaces that contain the word
|
|
3465
|
+
* "Project" in their display names.
|
|
3466
|
+
* - `attachment`: Supports the operator `:*` (has any) to check for the
|
|
3467
|
+
* presence of attachments. If `attachment:*` is specified, only messages
|
|
3468
|
+
* that have at least one attachment are returned.
|
|
3469
|
+
* - `annotations.user_mentions.user.name`: The resource name of the mentioned
|
|
3470
|
+
* user (`users/{user}`). Only supports `:` (has). For example:
|
|
3471
|
+
* `annotations.user_mentions.user.name:"users/1234567890"` returns only
|
|
3472
|
+
* messages that contain a mention to the specified user. Alternatively, the
|
|
3473
|
+
* alias `me` can be used to filter for messages that mention the caller
|
|
3474
|
+
* user, for example: `annotations.user_mentions.user.name:users/me`. You
|
|
3475
|
+
* can also use the e-mail as an alias for `{user}`, for example,
|
|
3476
|
+
* `users/example@gmail.com`.
|
|
3477
|
+
*
|
|
3478
|
+
* For advanced filtering, the following functions are also available:
|
|
3479
|
+
*
|
|
3480
|
+
* - `has_link()`: Returns only messages that have at least one hyperlink in
|
|
3481
|
+
* the message text.
|
|
3482
|
+
* - `is_unread()`: Filters out messages that have been read by the calling
|
|
3483
|
+
* user.
|
|
3484
|
+
*
|
|
3485
|
+
* Using the `space.display_name` filter requires that the calling credentials
|
|
3486
|
+
* include one of the following [authorization
|
|
3487
|
+
* scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
|
|
3488
|
+
*
|
|
3489
|
+
* - `https://www.googleapis.com/auth/chat.spaces.readonly`
|
|
3490
|
+
* - `https://www.googleapis.com/auth/chat.spaces`
|
|
3491
|
+
*
|
|
3492
|
+
* Using the `is_unread()` filter requires that the calling credentials
|
|
3493
|
+
* include one of the following [authorization
|
|
3494
|
+
* scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
|
|
3495
|
+
*
|
|
3496
|
+
* - `https://www.googleapis.com/auth/chat.users.readstate.readonly`
|
|
3497
|
+
* - `https://www.googleapis.com/auth/chat.users.readstate`
|
|
3498
|
+
*
|
|
3499
|
+
*
|
|
3500
|
+
* Across different fields, only `AND` operators are supported. A valid
|
|
3501
|
+
* example is `sender.name = "users/1234567890" AND is_unread()`. The word
|
|
3502
|
+
* `AND` is optional and is implied if omitted. For example, `sender.name =
|
|
3503
|
+
* "users/1234567890" is_unread()` is valid and is equivalent to the previous
|
|
3504
|
+
* example. An invalid example is `sender.name = "users/1234567890" OR
|
|
3505
|
+
* is_unread()` because `OR` is not supported between different fields.
|
|
3506
|
+
*
|
|
3507
|
+
* Among the same field:
|
|
3508
|
+
*
|
|
3509
|
+
* - `create_time` supports only `AND`, and can only be used to represent
|
|
3510
|
+
* an interval, such as `create_time >= "2022-01-01T00:00:00+00:00" AND
|
|
3511
|
+
* create_time < "2023-01-01T00:00:00+00:00"`.
|
|
3512
|
+
* - `sender.name` supports only the `OR` operator, for example:
|
|
3513
|
+
* `sender.name = "users/1234567890" OR sender.name = "users/0987654321"`.
|
|
3514
|
+
* - `space.name` supports only the `OR` operator, for example:
|
|
3515
|
+
* `space.name = "spaces/ABCDEFGH" OR space.name = "spaces/QWERTYUI"`.
|
|
3516
|
+
* - `space.display_name` supports the operators `AND` and `OR`, but not a
|
|
3517
|
+
* mix of both. For example:
|
|
3518
|
+
* `space.display_name:Project AND space.display_name:Tasks` returns
|
|
3519
|
+
* messages that are in spaces with display names containing both `Project`
|
|
3520
|
+
* and `Tasks`, whereas
|
|
3521
|
+
* `space.display_name:Project OR space.display_name:Tasks` returns messages
|
|
3522
|
+
* that are in spaces with display names containing either `Project` or
|
|
3523
|
+
* `Tasks` or both.
|
|
3524
|
+
* - `annotations.user_mentions.user.name` supports the operators `AND` and
|
|
3525
|
+
* `OR`, but not a mix of both. For example:
|
|
3526
|
+
* `annotations.user_mentions.user.name:"users/1234567890" AND
|
|
3527
|
+
* annotations.user_mentions.user.name:"users/0987654321"` returns only
|
|
3528
|
+
* messages that mentions both users, whereas
|
|
3529
|
+
* `annotations.user_mentions.user.name:"users/1234567890" OR
|
|
3530
|
+
* annotations.user_mentions.user.name:"users/0987654321"` returns messages
|
|
3531
|
+
* that mention either user or both.
|
|
3532
|
+
*
|
|
3533
|
+
* Parentheses are required to disambiguate operator precedence when combining
|
|
3534
|
+
* `AND` and `OR` operators in the same query. For example:
|
|
3535
|
+
* `(sender.name="users/me" OR sender.name="users/123456") AND is_unread()`.
|
|
3536
|
+
* Otherwise, parentheses are optional.
|
|
3537
|
+
*
|
|
3538
|
+
* The following example queries are valid:
|
|
3539
|
+
*
|
|
3540
|
+
* ```
|
|
3541
|
+
* "Pending reports" AND create_time >= "2023-01-01T00:00:00Z"
|
|
3542
|
+
*
|
|
3543
|
+
* sender.name = "users/example@gmail.com"
|
|
3544
|
+
*
|
|
3545
|
+
* annotations.user_mentions.user.name:"users/0987654321"
|
|
3546
|
+
*
|
|
3547
|
+
* attachment:* AND space.name = "spaces/ABCDEFGH"
|
|
3548
|
+
*
|
|
3549
|
+
* tasks AND is_unread() AND sender.name = "users/1234567890"
|
|
3550
|
+
*
|
|
3551
|
+
* "things to do" "urgent"
|
|
3552
|
+
*
|
|
3553
|
+
* (sender.name = "users/1234567890")
|
|
3554
|
+
* AND (create_time < "2023-05-01T00:00:00Z")
|
|
3555
|
+
*
|
|
3556
|
+
* tasks AND space.name = "spaces/ABCDEFGH" AND has_link()
|
|
3557
|
+
*
|
|
3558
|
+
* "project one" is_unread()
|
|
3559
|
+
*
|
|
3560
|
+
* space.display_name:Project tasks
|
|
3561
|
+
* ```
|
|
3562
|
+
*
|
|
3563
|
+
* The maximum query length is 1,000 characters.
|
|
3564
|
+
*
|
|
3565
|
+
* Invalid queries are rejected by the server with an `INVALID_ARGUMENT`
|
|
3566
|
+
* error.
|
|
3567
|
+
* @param {number} [request.pageSize]
|
|
3568
|
+
* Optional. The maximum number of results to return. The service may return
|
|
3569
|
+
* fewer than this value.
|
|
3570
|
+
*
|
|
3571
|
+
* If unspecified, at most 25 are returned.
|
|
3572
|
+
*
|
|
3573
|
+
* The maximum value is 100. If you use a value more than 100, it's
|
|
3574
|
+
* automatically changed to 100.
|
|
3575
|
+
* @param {string} [request.pageToken]
|
|
3576
|
+
* Optional. A token, received from the previous search messages call. Provide
|
|
3577
|
+
* this parameter to retrieve the subsequent page.
|
|
3578
|
+
*
|
|
3579
|
+
* When paginating, all other parameters provided should match the call that
|
|
3580
|
+
* provided the page token. Passing different values to the other parameters
|
|
3581
|
+
* might lead to unexpected results.
|
|
3582
|
+
* @param {string} [request.orderBy]
|
|
3583
|
+
* Optional. How the results list is ordered.
|
|
3584
|
+
*
|
|
3585
|
+
* Supported attributes to order by are:
|
|
3586
|
+
*
|
|
3587
|
+
* - `create_time`: Sorts the results by the time of the message creation.
|
|
3588
|
+
* Default value.
|
|
3589
|
+
* - `relevance`: Sorts the results by relevance.
|
|
3590
|
+
* [Developer Preview](https://developers.google.com/workspace/preview).
|
|
3591
|
+
*
|
|
3592
|
+
* The default ordering is `create_time desc`. Only a single order per query
|
|
3593
|
+
* (`create_time` or `relevance`) is supported. Only descending order (`desc`)
|
|
3594
|
+
* is supported, and it must be specified after the order attribute.
|
|
3595
|
+
* @param {google.chat.v1.MarkupSyntax} [request.markupSyntax]
|
|
3596
|
+
* Optional. Specifies the desired output syntax for the Chat message
|
|
3597
|
+
* `formatted_text` field.
|
|
3598
|
+
* @param {google.chat.v1.SearchMessagesRequest.SearchMessagesView} [request.view]
|
|
3599
|
+
* Optional. Specifies what kind of search results view to return. The default
|
|
3600
|
+
* is `SEARCH_MESSAGES_VIEW_BASIC`.
|
|
3601
|
+
* @param {object} [options]
|
|
3602
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
3603
|
+
* @returns {Object}
|
|
3604
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
|
3605
|
+
* When you iterate the returned iterable, each element will be an object representing
|
|
3606
|
+
* {@link protos.google.chat.v1.SearchMessageResult|SearchMessageResult}. The API will be called under the hood as needed, once per the page,
|
|
3607
|
+
* so you can stop the iteration when you don't need more results.
|
|
3608
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
3609
|
+
* for more details and examples.
|
|
3610
|
+
* @example <caption>include:samples/generated/v1/chat_service.search_messages.js</caption>
|
|
3611
|
+
* region_tag:chat_v1_generated_ChatService_SearchMessages_async
|
|
3612
|
+
*/
|
|
3613
|
+
searchMessagesAsync(request?: protos.google.chat.v1.ISearchMessagesRequest, options?: CallOptions): AsyncIterable<protos.google.chat.v1.ISearchMessageResult>;
|
|
3013
3614
|
/**
|
|
3014
3615
|
* Lists spaces the caller is a member of. Group chats and DMs aren't listed
|
|
3015
3616
|
* until the first message is sent. For an example, see
|
|
@@ -3199,19 +3800,30 @@ export declare class ChatServiceClient {
|
|
|
3199
3800
|
*/
|
|
3200
3801
|
listSpacesAsync(request?: protos.google.chat.v1.IListSpacesRequest, options?: CallOptions): AsyncIterable<protos.google.chat.v1.ISpace>;
|
|
3201
3802
|
/**
|
|
3202
|
-
* Returns a list of spaces in a Google Workspace organization
|
|
3203
|
-
*
|
|
3204
|
-
* For an example, see [Search for and manage
|
|
3803
|
+
* Returns a list of spaces in a Google Workspace organization. For an
|
|
3804
|
+
* example, see [Search for and manage
|
|
3205
3805
|
* spaces](https://developers.google.com/workspace/chat/search-manage-admin).
|
|
3206
3806
|
*
|
|
3207
|
-
*
|
|
3807
|
+
* When `use_admin_access` is set to `false`, the results are limited to
|
|
3808
|
+
* spaces where the calling user is a joined member. To search with
|
|
3809
|
+
* administrator privileges, set `use_admin_access` to `true`.
|
|
3810
|
+
*
|
|
3811
|
+
* Supports the following types of
|
|
3812
|
+
* [authentication](https://developers.google.com/workspace/chat/authenticate-authorize):
|
|
3813
|
+
*
|
|
3814
|
+
* - [User
|
|
3815
|
+
* authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
|
|
3816
|
+
* with one of the following authorization scopes:
|
|
3817
|
+
* - `https://www.googleapis.com/auth/chat.spaces.readonly`
|
|
3818
|
+
* - `https://www.googleapis.com/auth/chat.spaces`
|
|
3819
|
+
*
|
|
3820
|
+
* - [User
|
|
3208
3821
|
* authentication with administrator
|
|
3209
3822
|
* privileges](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user#admin-privileges)
|
|
3210
3823
|
* and one of the following [authorization
|
|
3211
3824
|
* scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
|
|
3212
|
-
*
|
|
3213
|
-
*
|
|
3214
|
-
* - `https://www.googleapis.com/auth/chat.admin.spaces`
|
|
3825
|
+
* - `https://www.googleapis.com/auth/chat.admin.spaces.readonly`
|
|
3826
|
+
* - `https://www.googleapis.com/auth/chat.admin.spaces`
|
|
3215
3827
|
*
|
|
3216
3828
|
* @param {Object} request
|
|
3217
3829
|
* The request object that will be sent.
|
|
@@ -3226,9 +3838,6 @@ export declare class ChatServiceClient {
|
|
|
3226
3838
|
* Requires either the `chat.admin.spaces.readonly` or `chat.admin.spaces`
|
|
3227
3839
|
* [OAuth 2.0
|
|
3228
3840
|
* 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
3841
|
* @param {number} request.pageSize
|
|
3233
3842
|
* The maximum number of spaces to return. The service may return fewer than
|
|
3234
3843
|
* this value.
|
|
@@ -3247,7 +3856,8 @@ export declare class ChatServiceClient {
|
|
|
3247
3856
|
* @param {string} request.query
|
|
3248
3857
|
* Required. A search query.
|
|
3249
3858
|
*
|
|
3250
|
-
* You can search by using the following parameters
|
|
3859
|
+
* You can search by using the following parameters when `useAdminAccess`
|
|
3860
|
+
* is set to `true`:
|
|
3251
3861
|
*
|
|
3252
3862
|
* - `create_time`
|
|
3253
3863
|
* - `customer`
|
|
@@ -3257,18 +3867,27 @@ export declare class ChatServiceClient {
|
|
|
3257
3867
|
* - `space_history_state`
|
|
3258
3868
|
* - `space_type`
|
|
3259
3869
|
*
|
|
3870
|
+
* When `useAdminAccess` is set to `false`:
|
|
3871
|
+
*
|
|
3872
|
+
* - `display_name`
|
|
3873
|
+
* - `external_user_allowed`
|
|
3874
|
+
* - `space_type`
|
|
3875
|
+
*
|
|
3260
3876
|
* `create_time` and `last_active_time` accept a timestamp in
|
|
3261
3877
|
* [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339) format and the supported
|
|
3262
3878
|
* comparison operators are: `=`, `<`, `>`, `<=`, `>=`.
|
|
3263
3879
|
*
|
|
3264
|
-
* `customer` is required
|
|
3265
|
-
* to
|
|
3880
|
+
* `customer` is required when `useAdminAccess` is set to `true`, and is
|
|
3881
|
+
* used to indicate which customer to fetch spaces from.
|
|
3882
|
+
* `customers/my_customer` is the only supported value.
|
|
3266
3883
|
*
|
|
3267
3884
|
* `display_name` only accepts the `HAS` (`:`) operator. The text to
|
|
3268
3885
|
* match is first tokenized into tokens and each token is prefix-matched
|
|
3269
3886
|
* case-insensitively and independently as a substring anywhere in the space's
|
|
3270
3887
|
* `display_name`. For example, `Fun Eve` matches `Fun event` or `The
|
|
3271
|
-
* evening was fun`, but not `notFun event` or `even`.
|
|
3888
|
+
* evening was fun`, but not `notFun event` or `even`. When `useAdminAccess`
|
|
3889
|
+
* is set to `false`, `display_name` is required to retrieve meaningful
|
|
3890
|
+
* results. Otherwise, the default behavior is to return an empty response.
|
|
3272
3891
|
*
|
|
3273
3892
|
* `external_user_allowed` accepts either `true` or `false`.
|
|
3274
3893
|
*
|
|
@@ -3291,7 +3910,8 @@ export declare class ChatServiceClient {
|
|
|
3291
3910
|
* < "2022-01-01T00:00:00+00:00" AND last_active_time >
|
|
3292
3911
|
* "2023-01-01T00:00:00+00:00"`.
|
|
3293
3912
|
*
|
|
3294
|
-
* The following example queries are valid
|
|
3913
|
+
* The following example queries are valid when `useAdminAccess` is set to
|
|
3914
|
+
* `true`:
|
|
3295
3915
|
*
|
|
3296
3916
|
* ```
|
|
3297
3917
|
* customer = "customers/my_customer" AND space_type = "SPACE"
|
|
@@ -3313,6 +3933,21 @@ export declare class ChatServiceClient {
|
|
|
3313
3933
|
* "2020-01-01T00:00:00+00:00") AND (external_user_allowed = "true") AND
|
|
3314
3934
|
* (space_history_state = "HISTORY_ON" OR space_history_state = "HISTORY_OFF")
|
|
3315
3935
|
* ```
|
|
3936
|
+
*
|
|
3937
|
+
* The following example queries are valid when `useAdminAccess` is set to
|
|
3938
|
+
* `false`:
|
|
3939
|
+
*
|
|
3940
|
+
* ```
|
|
3941
|
+
* display_name:"Hello World" AND space_type = "SPACE"
|
|
3942
|
+
*
|
|
3943
|
+
* (display_name:"Hello" OR display_name:"Fun") AND space_type = "SPACE"
|
|
3944
|
+
*
|
|
3945
|
+
* (external_user_allowed = "true" AND space_type = "SPACE") // Returns an
|
|
3946
|
+
* empty response.
|
|
3947
|
+
*
|
|
3948
|
+
* (external_user_allowed = "true" AND display_name:"Hello" AND space_type =
|
|
3949
|
+
* "SPACE")
|
|
3950
|
+
* ```
|
|
3316
3951
|
* @param {string} [request.orderBy]
|
|
3317
3952
|
* Optional. How the list of spaces is ordered.
|
|
3318
3953
|
*
|
|
@@ -3324,13 +3959,17 @@ export declare class ChatServiceClient {
|
|
|
3324
3959
|
* any topic of this space.
|
|
3325
3960
|
* - `create_time` — Denotes the time of the space creation.
|
|
3326
3961
|
*
|
|
3962
|
+
* When `useAdminAccess` is `false`, only `create_time` and `relevance` are
|
|
3963
|
+
* supported for ordering. Only `DESC` is supported for these fields in
|
|
3964
|
+
* non-admin searches.
|
|
3965
|
+
*
|
|
3327
3966
|
* Valid ordering operation values are:
|
|
3328
3967
|
*
|
|
3329
3968
|
* - `ASC` for ascending. Default value.
|
|
3330
3969
|
*
|
|
3331
3970
|
* - `DESC` for descending.
|
|
3332
3971
|
*
|
|
3333
|
-
* The supported syntax are
|
|
3972
|
+
* The supported syntax are when `useAdminAccess` is set to `true`:
|
|
3334
3973
|
*
|
|
3335
3974
|
* - `membership_count.joined_direct_human_user_count DESC`
|
|
3336
3975
|
* - `membership_count.joined_direct_human_user_count ASC`
|
|
@@ -3338,6 +3977,12 @@ export declare class ChatServiceClient {
|
|
|
3338
3977
|
* - `last_active_time ASC`
|
|
3339
3978
|
* - `create_time DESC`
|
|
3340
3979
|
* - `create_time ASC`
|
|
3980
|
+
*
|
|
3981
|
+
* When `useAdminAccess` is set to `false`:
|
|
3982
|
+
*
|
|
3983
|
+
* - `create_time DESC`
|
|
3984
|
+
* - `relevance DESC`
|
|
3985
|
+
* [Developer Preview](https://developers.google.com/workspace/preview).
|
|
3341
3986
|
* @param {object} [options]
|
|
3342
3987
|
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
3343
3988
|
* @returns {Promise} - The promise which resolves to an array.
|
|
@@ -3372,9 +4017,6 @@ export declare class ChatServiceClient {
|
|
|
3372
4017
|
* Requires either the `chat.admin.spaces.readonly` or `chat.admin.spaces`
|
|
3373
4018
|
* [OAuth 2.0
|
|
3374
4019
|
* 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
4020
|
* @param {number} request.pageSize
|
|
3379
4021
|
* The maximum number of spaces to return. The service may return fewer than
|
|
3380
4022
|
* this value.
|
|
@@ -3393,7 +4035,8 @@ export declare class ChatServiceClient {
|
|
|
3393
4035
|
* @param {string} request.query
|
|
3394
4036
|
* Required. A search query.
|
|
3395
4037
|
*
|
|
3396
|
-
* You can search by using the following parameters
|
|
4038
|
+
* You can search by using the following parameters when `useAdminAccess`
|
|
4039
|
+
* is set to `true`:
|
|
3397
4040
|
*
|
|
3398
4041
|
* - `create_time`
|
|
3399
4042
|
* - `customer`
|
|
@@ -3403,18 +4046,27 @@ export declare class ChatServiceClient {
|
|
|
3403
4046
|
* - `space_history_state`
|
|
3404
4047
|
* - `space_type`
|
|
3405
4048
|
*
|
|
4049
|
+
* When `useAdminAccess` is set to `false`:
|
|
4050
|
+
*
|
|
4051
|
+
* - `display_name`
|
|
4052
|
+
* - `external_user_allowed`
|
|
4053
|
+
* - `space_type`
|
|
4054
|
+
*
|
|
3406
4055
|
* `create_time` and `last_active_time` accept a timestamp in
|
|
3407
4056
|
* [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339) format and the supported
|
|
3408
4057
|
* comparison operators are: `=`, `<`, `>`, `<=`, `>=`.
|
|
3409
4058
|
*
|
|
3410
|
-
* `customer` is required
|
|
3411
|
-
* to
|
|
4059
|
+
* `customer` is required when `useAdminAccess` is set to `true`, and is
|
|
4060
|
+
* used to indicate which customer to fetch spaces from.
|
|
4061
|
+
* `customers/my_customer` is the only supported value.
|
|
3412
4062
|
*
|
|
3413
4063
|
* `display_name` only accepts the `HAS` (`:`) operator. The text to
|
|
3414
4064
|
* match is first tokenized into tokens and each token is prefix-matched
|
|
3415
4065
|
* case-insensitively and independently as a substring anywhere in the space's
|
|
3416
4066
|
* `display_name`. For example, `Fun Eve` matches `Fun event` or `The
|
|
3417
|
-
* evening was fun`, but not `notFun event` or `even`.
|
|
4067
|
+
* evening was fun`, but not `notFun event` or `even`. When `useAdminAccess`
|
|
4068
|
+
* is set to `false`, `display_name` is required to retrieve meaningful
|
|
4069
|
+
* results. Otherwise, the default behavior is to return an empty response.
|
|
3418
4070
|
*
|
|
3419
4071
|
* `external_user_allowed` accepts either `true` or `false`.
|
|
3420
4072
|
*
|
|
@@ -3437,7 +4089,8 @@ export declare class ChatServiceClient {
|
|
|
3437
4089
|
* < "2022-01-01T00:00:00+00:00" AND last_active_time >
|
|
3438
4090
|
* "2023-01-01T00:00:00+00:00"`.
|
|
3439
4091
|
*
|
|
3440
|
-
* The following example queries are valid
|
|
4092
|
+
* The following example queries are valid when `useAdminAccess` is set to
|
|
4093
|
+
* `true`:
|
|
3441
4094
|
*
|
|
3442
4095
|
* ```
|
|
3443
4096
|
* customer = "customers/my_customer" AND space_type = "SPACE"
|
|
@@ -3459,6 +4112,21 @@ export declare class ChatServiceClient {
|
|
|
3459
4112
|
* "2020-01-01T00:00:00+00:00") AND (external_user_allowed = "true") AND
|
|
3460
4113
|
* (space_history_state = "HISTORY_ON" OR space_history_state = "HISTORY_OFF")
|
|
3461
4114
|
* ```
|
|
4115
|
+
*
|
|
4116
|
+
* The following example queries are valid when `useAdminAccess` is set to
|
|
4117
|
+
* `false`:
|
|
4118
|
+
*
|
|
4119
|
+
* ```
|
|
4120
|
+
* display_name:"Hello World" AND space_type = "SPACE"
|
|
4121
|
+
*
|
|
4122
|
+
* (display_name:"Hello" OR display_name:"Fun") AND space_type = "SPACE"
|
|
4123
|
+
*
|
|
4124
|
+
* (external_user_allowed = "true" AND space_type = "SPACE") // Returns an
|
|
4125
|
+
* empty response.
|
|
4126
|
+
*
|
|
4127
|
+
* (external_user_allowed = "true" AND display_name:"Hello" AND space_type =
|
|
4128
|
+
* "SPACE")
|
|
4129
|
+
* ```
|
|
3462
4130
|
* @param {string} [request.orderBy]
|
|
3463
4131
|
* Optional. How the list of spaces is ordered.
|
|
3464
4132
|
*
|
|
@@ -3470,13 +4138,17 @@ export declare class ChatServiceClient {
|
|
|
3470
4138
|
* any topic of this space.
|
|
3471
4139
|
* - `create_time` — Denotes the time of the space creation.
|
|
3472
4140
|
*
|
|
4141
|
+
* When `useAdminAccess` is `false`, only `create_time` and `relevance` are
|
|
4142
|
+
* supported for ordering. Only `DESC` is supported for these fields in
|
|
4143
|
+
* non-admin searches.
|
|
4144
|
+
*
|
|
3473
4145
|
* Valid ordering operation values are:
|
|
3474
4146
|
*
|
|
3475
4147
|
* - `ASC` for ascending. Default value.
|
|
3476
4148
|
*
|
|
3477
4149
|
* - `DESC` for descending.
|
|
3478
4150
|
*
|
|
3479
|
-
* The supported syntax are
|
|
4151
|
+
* The supported syntax are when `useAdminAccess` is set to `true`:
|
|
3480
4152
|
*
|
|
3481
4153
|
* - `membership_count.joined_direct_human_user_count DESC`
|
|
3482
4154
|
* - `membership_count.joined_direct_human_user_count ASC`
|
|
@@ -3484,6 +4156,12 @@ export declare class ChatServiceClient {
|
|
|
3484
4156
|
* - `last_active_time ASC`
|
|
3485
4157
|
* - `create_time DESC`
|
|
3486
4158
|
* - `create_time ASC`
|
|
4159
|
+
*
|
|
4160
|
+
* When `useAdminAccess` is set to `false`:
|
|
4161
|
+
*
|
|
4162
|
+
* - `create_time DESC`
|
|
4163
|
+
* - `relevance DESC`
|
|
4164
|
+
* [Developer Preview](https://developers.google.com/workspace/preview).
|
|
3487
4165
|
* @param {object} [options]
|
|
3488
4166
|
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
3489
4167
|
* @returns {Stream}
|
|
@@ -3513,9 +4191,6 @@ export declare class ChatServiceClient {
|
|
|
3513
4191
|
* Requires either the `chat.admin.spaces.readonly` or `chat.admin.spaces`
|
|
3514
4192
|
* [OAuth 2.0
|
|
3515
4193
|
* 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
4194
|
* @param {number} request.pageSize
|
|
3520
4195
|
* The maximum number of spaces to return. The service may return fewer than
|
|
3521
4196
|
* this value.
|
|
@@ -3534,7 +4209,8 @@ export declare class ChatServiceClient {
|
|
|
3534
4209
|
* @param {string} request.query
|
|
3535
4210
|
* Required. A search query.
|
|
3536
4211
|
*
|
|
3537
|
-
* You can search by using the following parameters
|
|
4212
|
+
* You can search by using the following parameters when `useAdminAccess`
|
|
4213
|
+
* is set to `true`:
|
|
3538
4214
|
*
|
|
3539
4215
|
* - `create_time`
|
|
3540
4216
|
* - `customer`
|
|
@@ -3544,18 +4220,27 @@ export declare class ChatServiceClient {
|
|
|
3544
4220
|
* - `space_history_state`
|
|
3545
4221
|
* - `space_type`
|
|
3546
4222
|
*
|
|
4223
|
+
* When `useAdminAccess` is set to `false`:
|
|
4224
|
+
*
|
|
4225
|
+
* - `display_name`
|
|
4226
|
+
* - `external_user_allowed`
|
|
4227
|
+
* - `space_type`
|
|
4228
|
+
*
|
|
3547
4229
|
* `create_time` and `last_active_time` accept a timestamp in
|
|
3548
4230
|
* [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339) format and the supported
|
|
3549
4231
|
* comparison operators are: `=`, `<`, `>`, `<=`, `>=`.
|
|
3550
4232
|
*
|
|
3551
|
-
* `customer` is required
|
|
3552
|
-
* to
|
|
4233
|
+
* `customer` is required when `useAdminAccess` is set to `true`, and is
|
|
4234
|
+
* used to indicate which customer to fetch spaces from.
|
|
4235
|
+
* `customers/my_customer` is the only supported value.
|
|
3553
4236
|
*
|
|
3554
4237
|
* `display_name` only accepts the `HAS` (`:`) operator. The text to
|
|
3555
4238
|
* match is first tokenized into tokens and each token is prefix-matched
|
|
3556
4239
|
* case-insensitively and independently as a substring anywhere in the space's
|
|
3557
4240
|
* `display_name`. For example, `Fun Eve` matches `Fun event` or `The
|
|
3558
|
-
* evening was fun`, but not `notFun event` or `even`.
|
|
4241
|
+
* evening was fun`, but not `notFun event` or `even`. When `useAdminAccess`
|
|
4242
|
+
* is set to `false`, `display_name` is required to retrieve meaningful
|
|
4243
|
+
* results. Otherwise, the default behavior is to return an empty response.
|
|
3559
4244
|
*
|
|
3560
4245
|
* `external_user_allowed` accepts either `true` or `false`.
|
|
3561
4246
|
*
|
|
@@ -3578,7 +4263,8 @@ export declare class ChatServiceClient {
|
|
|
3578
4263
|
* < "2022-01-01T00:00:00+00:00" AND last_active_time >
|
|
3579
4264
|
* "2023-01-01T00:00:00+00:00"`.
|
|
3580
4265
|
*
|
|
3581
|
-
* The following example queries are valid
|
|
4266
|
+
* The following example queries are valid when `useAdminAccess` is set to
|
|
4267
|
+
* `true`:
|
|
3582
4268
|
*
|
|
3583
4269
|
* ```
|
|
3584
4270
|
* customer = "customers/my_customer" AND space_type = "SPACE"
|
|
@@ -3600,6 +4286,21 @@ export declare class ChatServiceClient {
|
|
|
3600
4286
|
* "2020-01-01T00:00:00+00:00") AND (external_user_allowed = "true") AND
|
|
3601
4287
|
* (space_history_state = "HISTORY_ON" OR space_history_state = "HISTORY_OFF")
|
|
3602
4288
|
* ```
|
|
4289
|
+
*
|
|
4290
|
+
* The following example queries are valid when `useAdminAccess` is set to
|
|
4291
|
+
* `false`:
|
|
4292
|
+
*
|
|
4293
|
+
* ```
|
|
4294
|
+
* display_name:"Hello World" AND space_type = "SPACE"
|
|
4295
|
+
*
|
|
4296
|
+
* (display_name:"Hello" OR display_name:"Fun") AND space_type = "SPACE"
|
|
4297
|
+
*
|
|
4298
|
+
* (external_user_allowed = "true" AND space_type = "SPACE") // Returns an
|
|
4299
|
+
* empty response.
|
|
4300
|
+
*
|
|
4301
|
+
* (external_user_allowed = "true" AND display_name:"Hello" AND space_type =
|
|
4302
|
+
* "SPACE")
|
|
4303
|
+
* ```
|
|
3603
4304
|
* @param {string} [request.orderBy]
|
|
3604
4305
|
* Optional. How the list of spaces is ordered.
|
|
3605
4306
|
*
|
|
@@ -3611,13 +4312,17 @@ export declare class ChatServiceClient {
|
|
|
3611
4312
|
* any topic of this space.
|
|
3612
4313
|
* - `create_time` — Denotes the time of the space creation.
|
|
3613
4314
|
*
|
|
4315
|
+
* When `useAdminAccess` is `false`, only `create_time` and `relevance` are
|
|
4316
|
+
* supported for ordering. Only `DESC` is supported for these fields in
|
|
4317
|
+
* non-admin searches.
|
|
4318
|
+
*
|
|
3614
4319
|
* Valid ordering operation values are:
|
|
3615
4320
|
*
|
|
3616
4321
|
* - `ASC` for ascending. Default value.
|
|
3617
4322
|
*
|
|
3618
4323
|
* - `DESC` for descending.
|
|
3619
4324
|
*
|
|
3620
|
-
* The supported syntax are
|
|
4325
|
+
* The supported syntax are when `useAdminAccess` is set to `true`:
|
|
3621
4326
|
*
|
|
3622
4327
|
* - `membership_count.joined_direct_human_user_count DESC`
|
|
3623
4328
|
* - `membership_count.joined_direct_human_user_count ASC`
|
|
@@ -3625,6 +4330,12 @@ export declare class ChatServiceClient {
|
|
|
3625
4330
|
* - `last_active_time ASC`
|
|
3626
4331
|
* - `create_time DESC`
|
|
3627
4332
|
* - `create_time ASC`
|
|
4333
|
+
*
|
|
4334
|
+
* When `useAdminAccess` is set to `false`:
|
|
4335
|
+
*
|
|
4336
|
+
* - `create_time DESC`
|
|
4337
|
+
* - `relevance DESC`
|
|
4338
|
+
* [Developer Preview](https://developers.google.com/workspace/preview).
|
|
3628
4339
|
* @param {object} [options]
|
|
3629
4340
|
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
3630
4341
|
* @returns {Object}
|