@maxim_mazurok/gapi.client.chat-v1 0.3.20260726 → 0.3.20260730
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/index.d.ts +29 -3
- package/package.json +1 -1
- package/readme.md +1 -1
package/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
// This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
|
|
10
10
|
// In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
|
|
11
11
|
// Generated from: https://chat.googleapis.com/$discovery/rest?version=v1
|
|
12
|
-
// Revision:
|
|
12
|
+
// Revision: 20260730
|
|
13
13
|
|
|
14
14
|
/// <reference types="gapi.client" />
|
|
15
15
|
|
|
@@ -1269,6 +1269,11 @@ declare namespace gapi.client {
|
|
|
1269
1269
|
formattedText?: string;
|
|
1270
1270
|
/** Output only. The time at which the message was last edited by a user. If the message has never been edited, this field is empty. */
|
|
1271
1271
|
lastUpdateTime?: string;
|
|
1272
|
+
/** Optional. Specifies how the server interprets the message `text` field content. */
|
|
1273
|
+
markupSyntax?:
|
|
1274
|
+
| 'MARKUP_SYNTAX_UNSPECIFIED'
|
|
1275
|
+
| 'MARKUP_SYNTAX_CHAT'
|
|
1276
|
+
| 'MARKUP_SYNTAX_MARKDOWN';
|
|
1272
1277
|
/** Output only. A URL in the Chat message `text` field that matches a link preview pattern. For more information, see [Preview links](https://developers.google.com/workspace/chat/preview-links). */
|
|
1273
1278
|
matchedUrl?: MatchedUrl;
|
|
1274
1279
|
/** Identifier. Resource name of the message. Format: `spaces/{space}/messages/{message}` Where `{space}` is the ID of the space where the message is posted and `{message}` is a system-assigned ID for the message. For example, `spaces/AAAAAAAAAAA/messages/BBBBBBBBBBB.BBBBBBBBBBB`. If you set a custom ID when you create a message, you can use this ID to specify the message in a request by replacing `{message}` with the value from the `clientAssignedMessageId` field. For example, `spaces/AAAAAAAAAAA/messages/client-custom-name`. For details, see [Name a message](https://developers.google.com/workspace/chat/create-messages#name_a_created_message). */
|
|
@@ -1453,6 +1458,11 @@ declare namespace gapi.client {
|
|
|
1453
1458
|
interface SearchMessagesRequest {
|
|
1454
1459
|
/** Required. A search query. The query can specify one or more search keywords, which are used to filter the results, You can also filter the results using the following message fields: - `create_time`: Accepts a timestamp in [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339) format and the supported comparison operators are: `<` and `>=`. - `sender.name`: The resource name of the sender (`users/{user}`). Only supports `=`. You can use the e-mail as an alias for `{user}`. For example, `users/example@gmail.com`, where `example@gmail.com` is the e-mail of the Google Chat user. - `space.name`: The resource name of the space where the message is posted. (`spaces/{space}`). Only supports `=`. If this filter is not set, the search is performed across all direct messages and spaces the user has access to as a space member. - `space.display_name`: Supports the operator `:` (has) and filters spaces based on a partial match of their display name. Results are limited to the top five space matches. For example, `space.display_name:Project` searches for messages in the top five spaces that contain the word "Project" in their display names. - `attachment`: Supports the operator `:*` (has any) to check for the presence of attachments. If `attachment:*` is specified, only messages that have at least one attachment are returned. - `annotations.user_mentions.user.name`: The resource name of the mentioned user (`users/{user}`). Only supports `:` (has). For example: `annotations.user_mentions.user.name:"users/1234567890"` returns only messages that contain a mention to the specified user. Alternatively, the alias `me` can be used to filter for messages that mention the caller user, for example: `annotations.user_mentions.user.name:users/me`. You can also use the e-mail as an alias for `{user}`, for example, `users/example@gmail.com`. For advanced filtering, the following functions are also available: - `has_link()`: Returns only messages that have at least one hyperlink in the message text. - `is_unread()`: Filters out messages that have been read by the calling user. Using the `space.display_name` filter requires that the calling credentials include one of the following [authorization scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): - `https://www.googleapis.com/auth/chat.spaces.readonly` - `https://www.googleapis.com/auth/chat.spaces` Using the `is_unread()` filter requires that the calling credentials include one of the following [authorization scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): - `https://www.googleapis.com/auth/chat.users.readstate.readonly` - `https://www.googleapis.com/auth/chat.users.readstate` Across different fields, only `AND` operators are supported. A valid example is `sender.name = "users/1234567890" AND is_unread()`. The word `AND` is optional and is implied if omitted. For example, `sender.name = "users/1234567890" is_unread()` is valid and is equivalent to the previous example. An invalid example is `sender.name = "users/1234567890" OR is_unread()` because `OR` is not supported between different fields. Among the same field: - `create_time` supports only `AND`, and can only be used to represent an interval, such as `create_time >= "2022-01-01T00:00:00+00:00" AND create_time < "2023-01-01T00:00:00+00:00"`. - `sender.name` supports only the `OR` operator, for example: `sender.name = "users/1234567890" OR sender.name = "users/0987654321"`. - `space.name` supports only the `OR` operator, for example: `space.name = "spaces/ABCDEFGH" OR space.name = "spaces/QWERTYUI"`. - `space.display_name` supports the operators `AND` and `OR`, but not a mix of both. For example: `space.display_name:Project AND space.display_name:Tasks` returns messages that are in spaces with display names containing both `Project` and `Tasks`, whereas `space.display_name:Project OR space.display_name:Tasks` returns messages that are in spaces with display names containing either `Project` or `Tasks` or both. - `annotations.user_mentions.user.name` supports the operators `AND` and `OR`, but not a mix of both. For example: `annotations.user_mentions.user.name:"users/1234567890" AND annotations.user_mentions.user.name:"users/0987654321"` returns only messages that mentions both users, whereas `annotations.user_mentions.user.name:"users/1234567890" OR annotations.user_mentions.user.name:"users/0987654321"` returns messages that mention either user or both. Parentheses are required to disambiguate operator precedence when combining `AND` and `OR` operators in the same query. For example: `(sender.name="users/me" OR sender.name="users/123456") AND is_unread()`. Otherwise, parentheses are optional. The following example queries are valid: ``` "Pending reports" AND create_time >= "2023-01-01T00:00:00Z" sender.name = "users/example@gmail.com" annotations.user_mentions.user.name:"users/0987654321" attachment:* AND space.name = "spaces/ABCDEFGH" tasks AND is_unread() AND sender.name = "users/1234567890" "things to do" "urgent" (sender.name = "users/1234567890") AND (create_time < "2023-05-01T00:00:00Z") tasks AND space.name = "spaces/ABCDEFGH" AND has_link() "project one" is_unread() space.display_name:Project tasks ``` The maximum query length is 1,000 characters. Invalid queries are rejected by the server with an `INVALID_ARGUMENT` error. */
|
|
1455
1460
|
filter?: string;
|
|
1461
|
+
/** Optional. Specifies the desired output syntax for the Chat message `formatted_text` field. */
|
|
1462
|
+
markupSyntax?:
|
|
1463
|
+
| 'MARKUP_SYNTAX_UNSPECIFIED'
|
|
1464
|
+
| 'MARKUP_SYNTAX_CHAT'
|
|
1465
|
+
| 'MARKUP_SYNTAX_MARKDOWN';
|
|
1456
1466
|
/** Optional. How the results list is ordered. Supported attributes to order by are: - `create_time`: Sorts the results by the time of the message creation. Default value. - `relevance`: Sorts the results by relevance. [Developer Preview](https://developers.google.com/workspace/preview). The default ordering is `create_time desc`. Only a single order per query (`create_time` or `relevance`) is supported. Only descending order (`desc`) is supported, and it must be specified after the order attribute. */
|
|
1457
1467
|
orderBy?: string;
|
|
1458
1468
|
/** Optional. The maximum number of results to return. The service may return fewer than this value. If unspecified, at most 25 are returned. The maximum value is 100. If you use a value more than 100, it's automatically changed to 100. */
|
|
@@ -1471,9 +1481,15 @@ declare namespace gapi.client {
|
|
|
1471
1481
|
/** The list of search results that matched the query. */
|
|
1472
1482
|
results?: SearchMessageResult[];
|
|
1473
1483
|
}
|
|
1484
|
+
interface SearchSpaceResult {
|
|
1485
|
+
/** Output only. The matched space. */
|
|
1486
|
+
space?: Space;
|
|
1487
|
+
}
|
|
1474
1488
|
interface SearchSpacesResponse {
|
|
1475
1489
|
/** A token that can be used to retrieve the next page. If this field is empty, there are no subsequent pages. */
|
|
1476
1490
|
nextPageToken?: string;
|
|
1491
|
+
/** Output only. The list of search results that matched the query. */
|
|
1492
|
+
results?: SearchSpaceResult[];
|
|
1477
1493
|
/** Deprecated: Please use the new `results` field instead. A page of the requested spaces. This field will be populated only when `useAdminAccess` is set to `true` and deprecated in favor of the new `results` field. */
|
|
1478
1494
|
spaces?: Space[];
|
|
1479
1495
|
/** The total number of spaces that match the query, across all pages. If the result is over 10,000 spaces, this value is an estimate. */
|
|
@@ -2484,6 +2500,11 @@ declare namespace gapi.client {
|
|
|
2484
2500
|
fields?: string;
|
|
2485
2501
|
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
2486
2502
|
key?: string;
|
|
2503
|
+
/** Optional. Specifies the desired output syntax for the Chat message `formatted_text` field. */
|
|
2504
|
+
markupSyntax?:
|
|
2505
|
+
| 'MARKUP_SYNTAX_UNSPECIFIED'
|
|
2506
|
+
| 'MARKUP_SYNTAX_CHAT'
|
|
2507
|
+
| 'MARKUP_SYNTAX_MARKDOWN';
|
|
2487
2508
|
/** Required. Resource name of the message. Format: `spaces/{space}/messages/{message}` If you've set a custom ID for your message, you can use the value from the `clientAssignedMessageId` field for `{message}`. For details, see [Name a message] (https://developers.google.com/workspace/chat/create-messages#name_a_created_message). */
|
|
2488
2509
|
name: string;
|
|
2489
2510
|
/** OAuth 2.0 token for the current user. */
|
|
@@ -2513,6 +2534,11 @@ declare namespace gapi.client {
|
|
|
2513
2534
|
filter?: string;
|
|
2514
2535
|
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
2515
2536
|
key?: string;
|
|
2537
|
+
/** Optional. Specifies the desired output syntax for the Chat message `formatted_text` field. */
|
|
2538
|
+
markupSyntax?:
|
|
2539
|
+
| 'MARKUP_SYNTAX_UNSPECIFIED'
|
|
2540
|
+
| 'MARKUP_SYNTAX_CHAT'
|
|
2541
|
+
| 'MARKUP_SYNTAX_MARKDOWN';
|
|
2516
2542
|
/** OAuth 2.0 token for the current user. */
|
|
2517
2543
|
oauth_token?: string;
|
|
2518
2544
|
/** Optional. How the list of messages is ordered. Specify a value to order by an ordering operation. Valid ordering operation values are as follows: - `ASC` for ascending. - `DESC` for descending. The default ordering is `create_time ASC`. */
|
|
@@ -3124,7 +3150,7 @@ declare namespace gapi.client {
|
|
|
3124
3150
|
},
|
|
3125
3151
|
body: Space,
|
|
3126
3152
|
): Request<Space>;
|
|
3127
|
-
/** Returns a list of spaces in a Google Workspace organization. For an example, see [Search for and manage spaces](https://developers.google.com/workspace/chat/search-manage-admin). When `use_admin_access` is set to `false`, the results are limited to spaces where the calling user is a joined member. To search with administrator privileges, set `use_admin_access` to `true`.
|
|
3153
|
+
/** Returns a list of spaces in a Google Workspace organization. For an example, see [Search for and manage spaces](https://developers.google.com/workspace/chat/search-manage-admin). When `use_admin_access` is set to `false`, the results are limited to spaces where the calling user is a joined member. To search with administrator privileges, set `use_admin_access` to `true`. Supports the following types of [authentication](https://developers.google.com/workspace/chat/authenticate-authorize): - [User authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) with one of the following authorization scopes: - `https://www.googleapis.com/auth/chat.spaces.readonly` - `https://www.googleapis.com/auth/chat.spaces` - [User authentication with administrator privileges](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user#admin-privileges) and one of the following [authorization scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): - `https://www.googleapis.com/auth/chat.admin.spaces.readonly` - `https://www.googleapis.com/auth/chat.admin.spaces` */
|
|
3128
3154
|
search(request?: {
|
|
3129
3155
|
/** V1 error format. */
|
|
3130
3156
|
'$.xgafv'?: '1' | '2';
|
|
@@ -3156,7 +3182,7 @@ declare namespace gapi.client {
|
|
|
3156
3182
|
upload_protocol?: string;
|
|
3157
3183
|
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
3158
3184
|
uploadType?: string;
|
|
3159
|
-
/** When `true`, the method runs using the user's Google Workspace administrator privileges. The calling user must be a Google Workspace administrator with the [manage chat and spaces conversations privilege](https://support.google.com/a/answer/13369245). Requires either the `chat.admin.spaces.readonly` or `chat.admin.spaces` [OAuth 2.0 scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes).
|
|
3185
|
+
/** When `true`, the method runs using the user's Google Workspace administrator privileges. The calling user must be a Google Workspace administrator with the [manage chat and spaces conversations privilege](https://support.google.com/a/answer/13369245). Requires either the `chat.admin.spaces.readonly` or `chat.admin.spaces` [OAuth 2.0 scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). */
|
|
3160
3186
|
useAdminAccess?: boolean;
|
|
3161
3187
|
}): Request<SearchSpacesResponse>;
|
|
3162
3188
|
/** Creates a space and adds specified users to it. The calling user is automatically added to the space, and shouldn't be specified as a membership in the request. For an example, see [Set up a space with initial members](https://developers.google.com/workspace/chat/set-up-spaces). To specify the human members to add, add memberships with the appropriate `membership.member.name`. To add a human user, use `users/{user}`, where `{user}` can be the email address for the user. For users in the same Workspace organization `{user}` can also be the `id` for the person from the People API, or the `id` for the user in the Directory API. For example, if the People API Person profile ID for `user@example.com` is `123456789`, you can add the user to the space by setting the `membership.member.name` to `users/user@example.com` or `users/123456789`. To specify the Google groups to add, add memberships with the appropriate `membership.group_member.name`. To add or invite a Google group, use `groups/{group}`, where `{group}` is the `id` for the group from the Cloud Identity Groups API. For example, you can use [Cloud Identity Groups lookup API](https://cloud.google.com/identity/docs/reference/rest/v1/groups/lookup) to retrieve the ID `123456789` for group email `group@example.com`, then you can add the group to the space by setting the `membership.group_member.name` to `groups/123456789`. Group email is not supported, and Google groups can only be added as members in named spaces. For a named space or group chat, if the caller blocks, or is blocked by some members, or doesn't have permission to add some members, then those members aren't added to the created space. To create a direct message (DM) between the calling user and another human user, specify exactly one membership to represent the human user. If one user blocks the other, the request fails and the DM isn't created. To create a DM between the calling user and the calling app, set `Space.singleUserBotDm` to `true` and don't specify any memberships. You can only use this method to set up a DM with the calling app. To add the calling app as a member of a space or an existing DM between two human users, see [Invite or add a user or app to a space](https://developers.google.com/workspace/chat/create-members). If a DM already exists between two users, even when one user blocks the other at the time a request is made, then the existing DM is returned. Spaces with threaded replies aren't supported. If you receive the error message `ALREADY_EXISTS` when setting up a space, try a different `displayName`. An existing space within the Google Workspace organization might already use this display name. Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) with one of the following [authorization scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): - `https://www.googleapis.com/auth/chat.spaces.create` - `https://www.googleapis.com/auth/chat.spaces` */
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -266,7 +266,7 @@ Updates a space. For an example, see [Update a space](https://developers.google.
|
|
|
266
266
|
await gapi.client.chat.spaces.patch({name: 'name'});
|
|
267
267
|
|
|
268
268
|
/*
|
|
269
|
-
Returns a list of spaces in a Google Workspace organization. For an example, see [Search for and manage spaces](https://developers.google.com/workspace/chat/search-manage-admin). When `use_admin_access` is set to `false`, the results are limited to spaces where the calling user is a joined member. To search with administrator privileges, set `use_admin_access` to `true`.
|
|
269
|
+
Returns a list of spaces in a Google Workspace organization. For an example, see [Search for and manage spaces](https://developers.google.com/workspace/chat/search-manage-admin). When `use_admin_access` is set to `false`, the results are limited to spaces where the calling user is a joined member. To search with administrator privileges, set `use_admin_access` to `true`. Supports the following types of [authentication](https://developers.google.com/workspace/chat/authenticate-authorize): - [User authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) with one of the following authorization scopes: - `https://www.googleapis.com/auth/chat.spaces.readonly` - `https://www.googleapis.com/auth/chat.spaces` - [User authentication with administrator privileges](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user#admin-privileges) and one of the following [authorization scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): - `https://www.googleapis.com/auth/chat.admin.spaces.readonly` - `https://www.googleapis.com/auth/chat.admin.spaces`
|
|
270
270
|
*/
|
|
271
271
|
await gapi.client.chat.spaces.search({});
|
|
272
272
|
|