@maxim_mazurok/gapi.client.chat-v1 0.2.20260618 → 0.2.20260623
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 +312 -4
- package/package.json +1 -1
- package/readme.md +7 -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: 20260623
|
|
13
13
|
|
|
14
14
|
/// <reference types="gapi.client" />
|
|
15
15
|
|
|
@@ -138,6 +138,21 @@ declare namespace gapi.client {
|
|
|
138
138
|
/** Optional. The resource name of the attachment data. This field is used with the media API to download the attachment data. */
|
|
139
139
|
resourceName?: string;
|
|
140
140
|
}
|
|
141
|
+
interface Availability {
|
|
142
|
+
/** Optional. The user's custom status. */
|
|
143
|
+
customStatus?: CustomStatus;
|
|
144
|
+
/** Output only. Metadata if the user state is set to DO_NOT_DISTURB. */
|
|
145
|
+
doNotDisturbMetadata?: DoNotDisturbMetadata;
|
|
146
|
+
/** Identifier. Resource name of the user's availability. Format: `users/{user}/availability` `{user}` is the id for the Person in the People API or Admin SDK directory API. For example, `users/123456789`. The user's email address or `me` can also be used as an alias to refer to the caller. For example, `users/user@example.com` or `users/me`. */
|
|
147
|
+
name?: string;
|
|
148
|
+
/** Output only. The user's current availability state. */
|
|
149
|
+
state?:
|
|
150
|
+
| 'STATE_UNSPECIFIED'
|
|
151
|
+
| 'ACTIVE'
|
|
152
|
+
| 'IDLE'
|
|
153
|
+
| 'AWAY'
|
|
154
|
+
| 'DO_NOT_DISTURB';
|
|
155
|
+
}
|
|
141
156
|
interface Button {
|
|
142
157
|
/** A button with image and `onclick` action. */
|
|
143
158
|
imageButton?: ImageButton;
|
|
@@ -266,6 +281,16 @@ declare namespace gapi.client {
|
|
|
266
281
|
/** Required. Input only. The image file name. Supported file extensions: `.png`, `.jpg`, `.gif`. */
|
|
267
282
|
filename?: string;
|
|
268
283
|
}
|
|
284
|
+
interface CustomStatus {
|
|
285
|
+
/** Required. The emoji of the custom status. Only Unicode emojis are supported; custom emojis are not supported. */
|
|
286
|
+
emoji?: Emoji;
|
|
287
|
+
/** The timestamp when the custom status expires. */
|
|
288
|
+
expireTime?: string;
|
|
289
|
+
/** Required. The text of the custom status. This will be a string with maximum length of 64. */
|
|
290
|
+
text?: string;
|
|
291
|
+
/** Input only. The time-to-live duration after which the custom status expires. */
|
|
292
|
+
ttl?: string;
|
|
293
|
+
}
|
|
269
294
|
interface DateInput {
|
|
270
295
|
/** Time since epoch time, in milliseconds. */
|
|
271
296
|
msSinceEpoch?: string;
|
|
@@ -341,6 +366,10 @@ declare namespace gapi.client {
|
|
|
341
366
|
/** Input only. [Dialog](https://developers.google.com/workspace/chat/dialogs) for the request. */
|
|
342
367
|
dialog?: Dialog;
|
|
343
368
|
}
|
|
369
|
+
interface DoNotDisturbMetadata {
|
|
370
|
+
/** Output only. Timestamp until which the user should be marked as DO_NOT_DISTURB. This can be maximum of 1 year in the future. */
|
|
371
|
+
expirationTime?: string;
|
|
372
|
+
}
|
|
344
373
|
interface DriveDataRef {
|
|
345
374
|
/** The ID for the drive file. Use with the Drive API. */
|
|
346
375
|
driveFileId?: string;
|
|
@@ -1131,6 +1160,19 @@ declare namespace gapi.client {
|
|
|
1131
1160
|
/** List of spaces in the requested (or first) page. Note: The `permissionSettings` field is not returned in the Space object for list requests. */
|
|
1132
1161
|
spaces?: Space[];
|
|
1133
1162
|
}
|
|
1163
|
+
interface MarkAsActiveRequest {
|
|
1164
|
+
/** The absolute timestamp when the ACTIVE state expires. */
|
|
1165
|
+
expireTime?: string;
|
|
1166
|
+
/** The duration from the current time until the ACTIVE state expires. Using a short TTL can effectively reset the user's state to be based on activity after this brief duration. */
|
|
1167
|
+
ttl?: string;
|
|
1168
|
+
}
|
|
1169
|
+
interface MarkAsAwayRequest {}
|
|
1170
|
+
interface MarkAsDoNotDisturbRequest {
|
|
1171
|
+
/** The absolute timestamp when the DND state expires. */
|
|
1172
|
+
expireTime?: string;
|
|
1173
|
+
/** The duration from the current time until the DND state expires. */
|
|
1174
|
+
ttl?: string;
|
|
1175
|
+
}
|
|
1134
1176
|
interface MatchedUrl {
|
|
1135
1177
|
/** Output only. The URL that was matched. */
|
|
1136
1178
|
url?: string;
|
|
@@ -3013,7 +3055,7 @@ declare namespace gapi.client {
|
|
|
3013
3055
|
},
|
|
3014
3056
|
body: Space,
|
|
3015
3057
|
): Request<Space>;
|
|
3016
|
-
/** 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` */
|
|
3058
|
+
/** 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`. Setting `use_admin_access` to `false` is available under Developer Preview. 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` */
|
|
3017
3059
|
search(request?: {
|
|
3018
3060
|
/** V1 error format. */
|
|
3019
3061
|
'$.xgafv'?: '1' | '2';
|
|
@@ -3037,7 +3079,7 @@ declare namespace gapi.client {
|
|
|
3037
3079
|
pageToken?: string;
|
|
3038
3080
|
/** Returns response with indentations and line breaks. */
|
|
3039
3081
|
prettyPrint?: boolean;
|
|
3040
|
-
/** Required. A search query. You can search by using the following parameters when `useAdminAccess` is set to `true`: - `create_time` - `customer` - `display_name` - `external_user_allowed` - `last_active_time` - `space_history_state` - `space_type` When `useAdminAccess` is set to `false`: - `display_name` - `external_user_allowed` `create_time` and `last_active_time` accept a timestamp in [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339) format and the supported comparison operators are: `=`, `<`, `>`, `<=`, `>=`. `customer` is required and is used to indicate which customer to fetch spaces from. `customers/my_customer` is the only supported value. `display_name` only accepts the `HAS` (`:`) operator. The text to match is first tokenized into tokens and each token is prefix-matched case-insensitively and independently as a substring anywhere in the space's `display_name`. For example, `Fun Eve` matches `Fun event` or `The evening was fun`, but not `notFun event` or `even`. When `useAdminAccess` is set to `false`, `display_name` is required to retrieve meaningful results. Otherwise, the default behavior is to return an empty response. `external_user_allowed` accepts either `true` or `false`. `space_history_state` only accepts values from the [`historyState`] (https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.HistoryState) field of a `space` resource. `space_type` is required and the only valid value is `SPACE`. Across different fields, only `AND` operators are supported. A valid example is `space_type = "SPACE" AND display_name:"Hello"` and an invalid example is `space_type = "SPACE" OR display_name:"Hello"`. Among the same field, `space_type` doesn't support `AND` or `OR` operators. `display_name`, 'space_history_state', and 'external_user_allowed' only support `OR` operators. `last_active_time` and `create_time` support both `AND` and `OR` operators. `AND` can only be used to represent an interval, such as `last_active_time < "2022-01-01T00:00:00+00:00" AND last_active_time > "2023-01-01T00:00:00+00:00"`. The following example queries are valid when `useAdminAccess` is set to `true`: ``` customer = "customers/my_customer" AND space_type = "SPACE" customer = "customers/my_customer" AND space_type = "SPACE" AND display_name:"Hello World" customer = "customers/my_customer" AND space_type = "SPACE" AND (last_active_time < "2020-01-01T00:00:00+00:00" OR last_active_time > "2022-01-01T00:00:00+00:00") customer = "customers/my_customer" AND space_type = "SPACE" AND (display_name:"Hello World" OR display_name:"Fun event") AND (last_active_time > "2020-01-01T00:00:00+00:00" AND last_active_time < "2022-01-01T00:00:00+00:00") customer = "customers/my_customer" AND space_type = "SPACE" AND (create_time > "2019-01-01T00:00:00+00:00" AND create_time < "2020-01-01T00:00:00+00:00") AND (external_user_allowed = "true") AND (space_history_state = "HISTORY_ON" OR space_history_state = "HISTORY_OFF") ``` The following example queries are valid when `useAdminAccess` is set to `false`: ``` display_name:"Hello World" (display_name:"Hello" OR display_name:"Fun") (external_user_allowed = "true") (external_user_allowed = "true" AND display_name:"Hello") ``` */
|
|
3082
|
+
/** Required. A search query. You can search by using the following parameters when `useAdminAccess` is set to `true`: - `create_time` - `customer` - `display_name` - `external_user_allowed` - `last_active_time` - `space_history_state` - `space_type` When `useAdminAccess` is set to `false`: - `display_name` - `external_user_allowed` `create_time` and `last_active_time` accept a timestamp in [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339) format and the supported comparison operators are: `=`, `<`, `>`, `<=`, `>=`. `customer` is required when `useAdminAccess` is set to `true`, and is used to indicate which customer to fetch spaces from. `customers/my_customer` is the only supported value. `display_name` only accepts the `HAS` (`:`) operator. The text to match is first tokenized into tokens and each token is prefix-matched case-insensitively and independently as a substring anywhere in the space's `display_name`. For example, `Fun Eve` matches `Fun event` or `The evening was fun`, but not `notFun event` or `even`. When `useAdminAccess` is set to `false`, `display_name` is required to retrieve meaningful results. Otherwise, the default behavior is to return an empty response. `external_user_allowed` accepts either `true` or `false`. `space_history_state` only accepts values from the [`historyState`] (https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.HistoryState) field of a `space` resource. `space_type` is required when `useAdminAccess` is set to `true`, and the only valid value is `SPACE`. Across different fields, only `AND` operators are supported. A valid example is `space_type = "SPACE" AND display_name:"Hello"` and an invalid example is `space_type = "SPACE" OR display_name:"Hello"`. Among the same field, `space_type` doesn't support `AND` or `OR` operators. `display_name`, 'space_history_state', and 'external_user_allowed' only support `OR` operators. `last_active_time` and `create_time` support both `AND` and `OR` operators. `AND` can only be used to represent an interval, such as `last_active_time < "2022-01-01T00:00:00+00:00" AND last_active_time > "2023-01-01T00:00:00+00:00"`. The following example queries are valid when `useAdminAccess` is set to `true`: ``` customer = "customers/my_customer" AND space_type = "SPACE" customer = "customers/my_customer" AND space_type = "SPACE" AND display_name:"Hello World" customer = "customers/my_customer" AND space_type = "SPACE" AND (last_active_time < "2020-01-01T00:00:00+00:00" OR last_active_time > "2022-01-01T00:00:00+00:00") customer = "customers/my_customer" AND space_type = "SPACE" AND (display_name:"Hello World" OR display_name:"Fun event") AND (last_active_time > "2020-01-01T00:00:00+00:00" AND last_active_time < "2022-01-01T00:00:00+00:00") customer = "customers/my_customer" AND space_type = "SPACE" AND (create_time > "2019-01-01T00:00:00+00:00" AND create_time < "2020-01-01T00:00:00+00:00") AND (external_user_allowed = "true") AND (space_history_state = "HISTORY_ON" OR space_history_state = "HISTORY_OFF") ``` The following example queries are valid when `useAdminAccess` is set to `false`: ``` display_name:"Hello World" (display_name:"Hello" OR display_name:"Fun") (external_user_allowed = "true") // Returns an empty response. (external_user_allowed = "true" AND display_name:"Hello") ``` */
|
|
3041
3083
|
query?: string;
|
|
3042
3084
|
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
3043
3085
|
quotaUser?: string;
|
|
@@ -3045,7 +3087,7 @@ declare namespace gapi.client {
|
|
|
3045
3087
|
upload_protocol?: string;
|
|
3046
3088
|
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
3047
3089
|
uploadType?: string;
|
|
3048
|
-
/** 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). */
|
|
3090
|
+
/** 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). Setting `use_admin_access` to `false` is available under Developer Preview. [Developer Preview](https://developers.google.com/workspace/preview). */
|
|
3049
3091
|
useAdminAccess?: boolean;
|
|
3050
3092
|
}): Request<SearchSpacesResponse>;
|
|
3051
3093
|
/** 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` */
|
|
@@ -3106,6 +3148,271 @@ declare namespace gapi.client {
|
|
|
3106
3148
|
messages: MessagesResource;
|
|
3107
3149
|
spaceEvents: SpaceEventsResource;
|
|
3108
3150
|
}
|
|
3151
|
+
interface AvailabilityResource {
|
|
3152
|
+
/** Returns availability information for a human user in Google Chat. For example, this can be used to check if a user is online or away, or to retrieve their custom status message. This method only retrieves the authenticated user's availability. 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.users.availability.readonly` - `https://www.googleapis.com/auth/chat.users.availability` */
|
|
3153
|
+
getAvailability(request?: {
|
|
3154
|
+
/** V1 error format. */
|
|
3155
|
+
'$.xgafv'?: '1' | '2';
|
|
3156
|
+
/** OAuth access token. */
|
|
3157
|
+
access_token?: string;
|
|
3158
|
+
/** Data format for response. */
|
|
3159
|
+
alt?: 'json' | 'media' | 'proto';
|
|
3160
|
+
/** JSONP */
|
|
3161
|
+
callback?: string;
|
|
3162
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
3163
|
+
fields?: string;
|
|
3164
|
+
/** 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. */
|
|
3165
|
+
key?: string;
|
|
3166
|
+
/** Required. The resource name of the availability to retrieve. Format: users/{user}/availability `{user}` is the id for the Person in the People API or Admin SDK directory API. For example, `users/123456789`. The user's email address or `me` can also be used as an alias to refer to the caller. For example, `users/user@example.com` or `users/me`. */
|
|
3167
|
+
name: string;
|
|
3168
|
+
/** OAuth 2.0 token for the current user. */
|
|
3169
|
+
oauth_token?: string;
|
|
3170
|
+
/** Returns response with indentations and line breaks. */
|
|
3171
|
+
prettyPrint?: boolean;
|
|
3172
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
3173
|
+
quotaUser?: string;
|
|
3174
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
3175
|
+
upload_protocol?: string;
|
|
3176
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
3177
|
+
uploadType?: string;
|
|
3178
|
+
}): Request<Availability>;
|
|
3179
|
+
/** Marks user as `ACTIVE` in Google Chat. Sets the user's availability state to `ACTIVE`. The `ACTIVE` state lasts until the specified expiration, at which point the user's state becomes `AWAY`. Note that if the user is actively using Chat, the `ACTIVE` state duration may extend beyond the provided expiration. This method only updates the authenticated user's availability. Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) with [authorization scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): - `https://www.googleapis.com/auth/chat.users.availability` */
|
|
3180
|
+
markAsActive(request: {
|
|
3181
|
+
/** V1 error format. */
|
|
3182
|
+
'$.xgafv'?: '1' | '2';
|
|
3183
|
+
/** OAuth access token. */
|
|
3184
|
+
access_token?: string;
|
|
3185
|
+
/** Data format for response. */
|
|
3186
|
+
alt?: 'json' | 'media' | 'proto';
|
|
3187
|
+
/** JSONP */
|
|
3188
|
+
callback?: string;
|
|
3189
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
3190
|
+
fields?: string;
|
|
3191
|
+
/** 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. */
|
|
3192
|
+
key?: string;
|
|
3193
|
+
/** Required. The resource name of the availability to mark as active. Format: users/{user}/availability `{user}` is the id for the Person in the People API or Admin SDK directory API. For example, `users/123456789`. The user's email address or `me` can also be used as an alias to refer to the caller. For example, `users/user@example.com` or `users/me`. */
|
|
3194
|
+
name: string;
|
|
3195
|
+
/** OAuth 2.0 token for the current user. */
|
|
3196
|
+
oauth_token?: string;
|
|
3197
|
+
/** Returns response with indentations and line breaks. */
|
|
3198
|
+
prettyPrint?: boolean;
|
|
3199
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
3200
|
+
quotaUser?: string;
|
|
3201
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
3202
|
+
upload_protocol?: string;
|
|
3203
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
3204
|
+
uploadType?: string;
|
|
3205
|
+
/** Request body */
|
|
3206
|
+
resource: MarkAsActiveRequest;
|
|
3207
|
+
}): Request<Availability>;
|
|
3208
|
+
markAsActive(
|
|
3209
|
+
request: {
|
|
3210
|
+
/** V1 error format. */
|
|
3211
|
+
'$.xgafv'?: '1' | '2';
|
|
3212
|
+
/** OAuth access token. */
|
|
3213
|
+
access_token?: string;
|
|
3214
|
+
/** Data format for response. */
|
|
3215
|
+
alt?: 'json' | 'media' | 'proto';
|
|
3216
|
+
/** JSONP */
|
|
3217
|
+
callback?: string;
|
|
3218
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
3219
|
+
fields?: string;
|
|
3220
|
+
/** 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. */
|
|
3221
|
+
key?: string;
|
|
3222
|
+
/** Required. The resource name of the availability to mark as active. Format: users/{user}/availability `{user}` is the id for the Person in the People API or Admin SDK directory API. For example, `users/123456789`. The user's email address or `me` can also be used as an alias to refer to the caller. For example, `users/user@example.com` or `users/me`. */
|
|
3223
|
+
name: string;
|
|
3224
|
+
/** OAuth 2.0 token for the current user. */
|
|
3225
|
+
oauth_token?: string;
|
|
3226
|
+
/** Returns response with indentations and line breaks. */
|
|
3227
|
+
prettyPrint?: boolean;
|
|
3228
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
3229
|
+
quotaUser?: string;
|
|
3230
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
3231
|
+
upload_protocol?: string;
|
|
3232
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
3233
|
+
uploadType?: string;
|
|
3234
|
+
},
|
|
3235
|
+
body: MarkAsActiveRequest,
|
|
3236
|
+
): Request<Availability>;
|
|
3237
|
+
/** Marks user as `AWAY` in Google Chat. Sets the user's state to away and is not affected by the user's activity. This method only updates the authenticated user's availability. Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) with [authorization scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): - `https://www.googleapis.com/auth/chat.users.availability` */
|
|
3238
|
+
markAsAway(request: {
|
|
3239
|
+
/** V1 error format. */
|
|
3240
|
+
'$.xgafv'?: '1' | '2';
|
|
3241
|
+
/** OAuth access token. */
|
|
3242
|
+
access_token?: string;
|
|
3243
|
+
/** Data format for response. */
|
|
3244
|
+
alt?: 'json' | 'media' | 'proto';
|
|
3245
|
+
/** JSONP */
|
|
3246
|
+
callback?: string;
|
|
3247
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
3248
|
+
fields?: string;
|
|
3249
|
+
/** 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. */
|
|
3250
|
+
key?: string;
|
|
3251
|
+
/** Required. The resource name of the availability to mark as away. Format: users/{user}/availability `{user}` is the id for the Person in the People API or Admin SDK directory API. For example, `users/123456789`. The user's email address or `me` can also be used as an alias to refer to the caller. For example, `users/user@example.com` or `users/me`. */
|
|
3252
|
+
name: string;
|
|
3253
|
+
/** OAuth 2.0 token for the current user. */
|
|
3254
|
+
oauth_token?: string;
|
|
3255
|
+
/** Returns response with indentations and line breaks. */
|
|
3256
|
+
prettyPrint?: boolean;
|
|
3257
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
3258
|
+
quotaUser?: string;
|
|
3259
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
3260
|
+
upload_protocol?: string;
|
|
3261
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
3262
|
+
uploadType?: string;
|
|
3263
|
+
/** Request body */
|
|
3264
|
+
resource: MarkAsAwayRequest;
|
|
3265
|
+
}): Request<Availability>;
|
|
3266
|
+
markAsAway(
|
|
3267
|
+
request: {
|
|
3268
|
+
/** V1 error format. */
|
|
3269
|
+
'$.xgafv'?: '1' | '2';
|
|
3270
|
+
/** OAuth access token. */
|
|
3271
|
+
access_token?: string;
|
|
3272
|
+
/** Data format for response. */
|
|
3273
|
+
alt?: 'json' | 'media' | 'proto';
|
|
3274
|
+
/** JSONP */
|
|
3275
|
+
callback?: string;
|
|
3276
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
3277
|
+
fields?: string;
|
|
3278
|
+
/** 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. */
|
|
3279
|
+
key?: string;
|
|
3280
|
+
/** Required. The resource name of the availability to mark as away. Format: users/{user}/availability `{user}` is the id for the Person in the People API or Admin SDK directory API. For example, `users/123456789`. The user's email address or `me` can also be used as an alias to refer to the caller. For example, `users/user@example.com` or `users/me`. */
|
|
3281
|
+
name: string;
|
|
3282
|
+
/** OAuth 2.0 token for the current user. */
|
|
3283
|
+
oauth_token?: string;
|
|
3284
|
+
/** Returns response with indentations and line breaks. */
|
|
3285
|
+
prettyPrint?: boolean;
|
|
3286
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
3287
|
+
quotaUser?: string;
|
|
3288
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
3289
|
+
upload_protocol?: string;
|
|
3290
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
3291
|
+
uploadType?: string;
|
|
3292
|
+
},
|
|
3293
|
+
body: MarkAsAwayRequest,
|
|
3294
|
+
): Request<Availability>;
|
|
3295
|
+
/** Marks user as`DO_NOT_DISTURB` in Google Chat. Sets a user's availability state to `DO_NOT_DISTURB` until a specified expiration time. When in `DO_NOT_DISTURB`, users typically won't receive notifications. This method only updates the authenticated user's availability. Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) with [authorization scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): - `https://www.googleapis.com/auth/chat.users.availability` */
|
|
3296
|
+
markAsDoNotDisturb(request: {
|
|
3297
|
+
/** V1 error format. */
|
|
3298
|
+
'$.xgafv'?: '1' | '2';
|
|
3299
|
+
/** OAuth access token. */
|
|
3300
|
+
access_token?: string;
|
|
3301
|
+
/** Data format for response. */
|
|
3302
|
+
alt?: 'json' | 'media' | 'proto';
|
|
3303
|
+
/** JSONP */
|
|
3304
|
+
callback?: string;
|
|
3305
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
3306
|
+
fields?: string;
|
|
3307
|
+
/** 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. */
|
|
3308
|
+
key?: string;
|
|
3309
|
+
/** Required. The resource name of the availability to mark as Do Not Disturb. Format: users/{user}/availability `{user}` is the id for the Person in the People API or Admin SDK directory API. For example, `users/123456789`. The user's email address or `me` can also be used as an alias to refer to the caller. For example, `users/user@example.com` or `users/me`. */
|
|
3310
|
+
name: string;
|
|
3311
|
+
/** OAuth 2.0 token for the current user. */
|
|
3312
|
+
oauth_token?: string;
|
|
3313
|
+
/** Returns response with indentations and line breaks. */
|
|
3314
|
+
prettyPrint?: boolean;
|
|
3315
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
3316
|
+
quotaUser?: string;
|
|
3317
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
3318
|
+
upload_protocol?: string;
|
|
3319
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
3320
|
+
uploadType?: string;
|
|
3321
|
+
/** Request body */
|
|
3322
|
+
resource: MarkAsDoNotDisturbRequest;
|
|
3323
|
+
}): Request<Availability>;
|
|
3324
|
+
markAsDoNotDisturb(
|
|
3325
|
+
request: {
|
|
3326
|
+
/** V1 error format. */
|
|
3327
|
+
'$.xgafv'?: '1' | '2';
|
|
3328
|
+
/** OAuth access token. */
|
|
3329
|
+
access_token?: string;
|
|
3330
|
+
/** Data format for response. */
|
|
3331
|
+
alt?: 'json' | 'media' | 'proto';
|
|
3332
|
+
/** JSONP */
|
|
3333
|
+
callback?: string;
|
|
3334
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
3335
|
+
fields?: string;
|
|
3336
|
+
/** 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. */
|
|
3337
|
+
key?: string;
|
|
3338
|
+
/** Required. The resource name of the availability to mark as Do Not Disturb. Format: users/{user}/availability `{user}` is the id for the Person in the People API or Admin SDK directory API. For example, `users/123456789`. The user's email address or `me` can also be used as an alias to refer to the caller. For example, `users/user@example.com` or `users/me`. */
|
|
3339
|
+
name: string;
|
|
3340
|
+
/** OAuth 2.0 token for the current user. */
|
|
3341
|
+
oauth_token?: string;
|
|
3342
|
+
/** Returns response with indentations and line breaks. */
|
|
3343
|
+
prettyPrint?: boolean;
|
|
3344
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
3345
|
+
quotaUser?: string;
|
|
3346
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
3347
|
+
upload_protocol?: string;
|
|
3348
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
3349
|
+
uploadType?: string;
|
|
3350
|
+
},
|
|
3351
|
+
body: MarkAsDoNotDisturbRequest,
|
|
3352
|
+
): Request<Availability>;
|
|
3353
|
+
/** Updates availability information for a human user. Only the `custom_status` field can be updated through this method. This method only updates the authenticated user's availability. 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.users.availability` */
|
|
3354
|
+
updateAvailability(request: {
|
|
3355
|
+
/** V1 error format. */
|
|
3356
|
+
'$.xgafv'?: '1' | '2';
|
|
3357
|
+
/** OAuth access token. */
|
|
3358
|
+
access_token?: string;
|
|
3359
|
+
/** Data format for response. */
|
|
3360
|
+
alt?: 'json' | 'media' | 'proto';
|
|
3361
|
+
/** JSONP */
|
|
3362
|
+
callback?: string;
|
|
3363
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
3364
|
+
fields?: string;
|
|
3365
|
+
/** 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. */
|
|
3366
|
+
key?: string;
|
|
3367
|
+
/** Identifier. Resource name of the user's availability. Format: `users/{user}/availability` `{user}` is the id for the Person in the People API or Admin SDK directory API. For example, `users/123456789`. The user's email address or `me` can also be used as an alias to refer to the caller. For example, `users/user@example.com` or `users/me`. */
|
|
3368
|
+
name: string;
|
|
3369
|
+
/** OAuth 2.0 token for the current user. */
|
|
3370
|
+
oauth_token?: string;
|
|
3371
|
+
/** Returns response with indentations and line breaks. */
|
|
3372
|
+
prettyPrint?: boolean;
|
|
3373
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
3374
|
+
quotaUser?: string;
|
|
3375
|
+
/** Required. The list of fields to update. The only field that can be updated is `custom_status`. */
|
|
3376
|
+
updateMask?: string;
|
|
3377
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
3378
|
+
upload_protocol?: string;
|
|
3379
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
3380
|
+
uploadType?: string;
|
|
3381
|
+
/** Request body */
|
|
3382
|
+
resource: Availability;
|
|
3383
|
+
}): Request<Availability>;
|
|
3384
|
+
updateAvailability(
|
|
3385
|
+
request: {
|
|
3386
|
+
/** V1 error format. */
|
|
3387
|
+
'$.xgafv'?: '1' | '2';
|
|
3388
|
+
/** OAuth access token. */
|
|
3389
|
+
access_token?: string;
|
|
3390
|
+
/** Data format for response. */
|
|
3391
|
+
alt?: 'json' | 'media' | 'proto';
|
|
3392
|
+
/** JSONP */
|
|
3393
|
+
callback?: string;
|
|
3394
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
3395
|
+
fields?: string;
|
|
3396
|
+
/** 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. */
|
|
3397
|
+
key?: string;
|
|
3398
|
+
/** Identifier. Resource name of the user's availability. Format: `users/{user}/availability` `{user}` is the id for the Person in the People API or Admin SDK directory API. For example, `users/123456789`. The user's email address or `me` can also be used as an alias to refer to the caller. For example, `users/user@example.com` or `users/me`. */
|
|
3399
|
+
name: string;
|
|
3400
|
+
/** OAuth 2.0 token for the current user. */
|
|
3401
|
+
oauth_token?: string;
|
|
3402
|
+
/** Returns response with indentations and line breaks. */
|
|
3403
|
+
prettyPrint?: boolean;
|
|
3404
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
3405
|
+
quotaUser?: string;
|
|
3406
|
+
/** Required. The list of fields to update. The only field that can be updated is `custom_status`. */
|
|
3407
|
+
updateMask?: string;
|
|
3408
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
3409
|
+
upload_protocol?: string;
|
|
3410
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
3411
|
+
uploadType?: string;
|
|
3412
|
+
},
|
|
3413
|
+
body: Availability,
|
|
3414
|
+
): Request<Availability>;
|
|
3415
|
+
}
|
|
3109
3416
|
interface ItemsResource {
|
|
3110
3417
|
/** Lists items in a section. Only spaces can be section items. For details, see [Create and organize sections in Google Chat](https://support.google.com/chat/answer/16059854). Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) with the [authorization scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): - `https://www.googleapis.com/auth/chat.users.sections` - `https://www.googleapis.com/auth/chat.users.sections.readonly` */
|
|
3111
3418
|
list(request?: {
|
|
@@ -3652,6 +3959,7 @@ declare namespace gapi.client {
|
|
|
3652
3959
|
threads: ThreadsResource;
|
|
3653
3960
|
}
|
|
3654
3961
|
interface UsersResource {
|
|
3962
|
+
availability: AvailabilityResource;
|
|
3655
3963
|
sections: SectionsResource;
|
|
3656
3964
|
spaces: SpacesResource;
|
|
3657
3965
|
}
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -147,6 +147,12 @@ var client_id = '',
|
|
|
147
147
|
// View chat and spaces in Google Chat
|
|
148
148
|
'https://www.googleapis.com/auth/chat.spaces.readonly',
|
|
149
149
|
|
|
150
|
+
// See and change your availability status in Google Chat.
|
|
151
|
+
'https://www.googleapis.com/auth/chat.users.availability',
|
|
152
|
+
|
|
153
|
+
// See your availability status in Google Chat.
|
|
154
|
+
'https://www.googleapis.com/auth/chat.users.availability.readonly',
|
|
155
|
+
|
|
150
156
|
// View and modify last read time for Google Chat conversations
|
|
151
157
|
'https://www.googleapis.com/auth/chat.users.readstate',
|
|
152
158
|
|
|
@@ -251,7 +257,7 @@ Updates a space. For an example, see [Update a space](https://developers.google.
|
|
|
251
257
|
await gapi.client.chat.spaces.patch({name: 'name'});
|
|
252
258
|
|
|
253
259
|
/*
|
|
254
|
-
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`
|
|
260
|
+
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`. Setting `use_admin_access` to `false` is available under Developer Preview. 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`
|
|
255
261
|
*/
|
|
256
262
|
await gapi.client.chat.spaces.search({});
|
|
257
263
|
|