@maxim_mazurok/gapi.client.chat-v1 0.2.20260315 → 0.2.20260602

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.
Files changed (3) hide show
  1. package/index.d.ts +453 -9
  2. package/package.json +1 -1
  3. package/readme.md +29 -0
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: 20260315
12
+ // Revision: 20260602
13
13
 
14
14
  /// <reference types="gapi.client" />
15
15
 
@@ -364,6 +364,12 @@ declare namespace gapi.client {
364
364
  reactionCount?: number;
365
365
  }
366
366
  interface Empty {}
367
+ interface FindGroupChatsResponse {
368
+ /** A token that you can send as `pageToken` to retrieve the next page of results. If empty, there are no subsequent pages. */
369
+ nextPageToken?: string;
370
+ /** List of spaces in the requested (or first) page. */
371
+ spaces?: Space[];
372
+ }
367
373
  interface FormAction {
368
374
  /** The method name is used to identify which part of the form triggered the form submission. This information is echoed back to the Chat app as part of the card click event. You can use the same method name for several elements that trigger a common behavior. */
369
375
  actionMethodName?: string;
@@ -944,6 +950,21 @@ declare namespace gapi.client {
944
950
  /** TextParagraph widget. */
945
951
  textParagraph?: GoogleAppsCardV1TextParagraph;
946
952
  }
953
+ interface GoogleChatV1Section {
954
+ /** Optional. The section's display name. Only populated for sections of type `CUSTOM_SECTION`. Supports up to 80 characters. Required when creating a `CUSTOM_SECTION`. */
955
+ displayName?: string;
956
+ /** Identifier. Resource name of the section. For system sections, the section ID is a constant string: - DEFAULT_DIRECT_MESSAGES: `users/{user}/sections/default-direct-messages` - DEFAULT_SPACES: `users/{user}/sections/default-spaces` - DEFAULT_APPS: `users/{user}/sections/default-apps` Format: `users/{user}/sections/{section}` */
957
+ name?: string;
958
+ /** Output only. The order of the section in relation to other sections. Sections with a lower `sort_order` value appear before sections with a higher value. */
959
+ sortOrder?: number;
960
+ /** Required. The type of the section. */
961
+ type?:
962
+ | 'SECTION_TYPE_UNSPECIFIED'
963
+ | 'CUSTOM_SECTION'
964
+ | 'DEFAULT_DIRECT_MESSAGES'
965
+ | 'DEFAULT_SPACES'
966
+ | 'DEFAULT_APPS';
967
+ }
947
968
  interface Group {
948
969
  /** Resource name for a Google Group. Represents a [group](https://cloud.google.com/identity/docs/reference/rest/v1/groups) in Cloud Identity Groups API. Format: groups/{group} */
949
970
  name?: string;
@@ -1086,6 +1107,18 @@ declare namespace gapi.client {
1086
1107
  /** List of reactions in the requested (or first) page. */
1087
1108
  reactions?: Reaction[];
1088
1109
  }
1110
+ interface ListSectionItemsResponse {
1111
+ /** A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. */
1112
+ nextPageToken?: string;
1113
+ /** The section items from the specified section. */
1114
+ sectionItems?: SectionItem[];
1115
+ }
1116
+ interface ListSectionsResponse {
1117
+ /** A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. */
1118
+ nextPageToken?: string;
1119
+ /** The sections from the specified user. */
1120
+ sections?: GoogleChatV1Section[];
1121
+ }
1089
1122
  interface ListSpaceEventsResponse {
1090
1123
  /** Continuation token used to fetch more events. If this field is omitted, there are no subsequent pages. */
1091
1124
  nextPageToken?: string;
@@ -1119,6 +1152,12 @@ declare namespace gapi.client {
1119
1152
  type?: 'TYPE_UNSPECIFIED' | 'MEETING' | 'HUDDLE';
1120
1153
  }
1121
1154
  interface Membership {
1155
+ /** Output only. A user's relationship to the Workspace organization that owns the space. In spaces owned by consumer accounts, the affiliation of all members is `EXTERNAL`. */
1156
+ affiliation?:
1157
+ | 'AFFILIATION_UNSPECIFIED'
1158
+ | 'INTERNAL'
1159
+ | 'EXTERNAL'
1160
+ | 'MANAGED_EXTERNAL';
1122
1161
  /** Optional. Immutable. The creation time of the membership, such as when a member joined or was invited to join a space. This field is output only, except when used to import historical memberships in import mode spaces. */
1123
1162
  createTime?: string;
1124
1163
  /** Optional. Immutable. The deletion time of the membership, such as when a member left or was removed from a space. This field is output only, except when used to import historical memberships in import mode spaces. */
@@ -1201,11 +1240,11 @@ declare namespace gapi.client {
1201
1240
  emojiReactionSummaries?: EmojiReactionSummary[];
1202
1241
  /** Optional. A plain-text description of the message's cards, used when the actual cards can't be displayed—for example, mobile notifications. */
1203
1242
  fallbackText?: string;
1204
- /** Output only. Contains the message `text` with markups added to communicate formatting. This field might not capture all formatting visible in the UI, but includes the following: * [Markup syntax](https://developers.google.com/workspace/chat/format-messages) for bold, italic, strikethrough, monospace, monospace block, and bulleted list. * [User mentions](https://developers.google.com/workspace/chat/format-messages#messages-@mention) using the format ``. * Custom hyperlinks using the format `<{url}|{rendered_text}>` where the first string is the URL and the second is the rendered text—for example, ``. * Custom emoji using the format `:{emoji_name}:`—for example, `:smile:`. This doesn't apply to Unicode emoji, such as `U+1F600` for a grinning face emoji. * Bullet list items using asterisks (`*`)—for example, `* item`. For more information, see [View text formatting sent in a message](https://developers.google.com/workspace/chat/format-messages#view_text_formatting_sent_in_a_message) */
1243
+ /** Output only. Contains the message `text` with markups added to communicate formatting. This field might not capture all formatting visible in the UI, but includes the following: * [Markup syntax](https://developers.google.com/workspace/chat/format-messages) for bold, italic, strikethrough, monospace, monospace block, bulleted list, and block quote. * [User mentions](https://developers.google.com/workspace/chat/format-messages#messages-@mention) using the format ``. * Custom hyperlinks using the format `<{url}|{rendered_text}>` where the first string is the URL and the second is the rendered text—for example, ``. * Custom emoji using the format `:{emoji_name}:`—for example, `:smile:`. This doesn't apply to Unicode emoji, such as `U+1F600` for a grinning face emoji. * Bullet list items using asterisks (`*`)—for example, `* item`. For more information, see [View text formatting sent in a message](https://developers.google.com/workspace/chat/format-messages#view_text_formatting_sent_in_a_message) */
1205
1244
  formattedText?: string;
1206
1245
  /** 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. */
1207
1246
  lastUpdateTime?: string;
1208
- /** Output only. A URL in `spaces.messages.text` that matches a link preview pattern. For more information, see [Preview links](https://developers.google.com/workspace/chat/preview-links). */
1247
+ /** 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). */
1209
1248
  matchedUrl?: MatchedUrl;
1210
1249
  /** 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). */
1211
1250
  name?: string;
@@ -1215,6 +1254,8 @@ declare namespace gapi.client {
1215
1254
  quotedMessageMetadata?: QuotedMessageMetadata;
1216
1255
  /** Output only. The user who created the message. If your Chat app [authenticates as a user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), the output populates the [user](https://developers.google.com/workspace/chat/api/reference/rest/v1/User) `name` and `type`. */
1217
1256
  sender?: User;
1257
+ /** Output only. Whether this is a silent message. Silent messages are messages where Chat suppresses push notifications for recipients. */
1258
+ silent?: boolean;
1218
1259
  /** Output only. Slash command information, if applicable. */
1219
1260
  slashCommand?: SlashCommand;
1220
1261
  /** Output only. If your Chat app [authenticates as a user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), the output only populates the [space](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces) `name`. */
@@ -1250,6 +1291,14 @@ declare namespace gapi.client {
1250
1291
  /** The updated message. */
1251
1292
  message?: Message;
1252
1293
  }
1294
+ interface MoveSectionItemRequest {
1295
+ /** Required. The resource name of the section to move the section item to. Format: `users/{user}/sections/{section}` */
1296
+ targetSection?: string;
1297
+ }
1298
+ interface MoveSectionItemResponse {
1299
+ /** The updated section item. */
1300
+ sectionItem?: SectionItem;
1301
+ }
1253
1302
  interface OnClick {
1254
1303
  /** A form action is triggered by this `onclick` action if specified. */
1255
1304
  action?: FormAction;
@@ -1286,6 +1335,16 @@ declare namespace gapi.client {
1286
1335
  /** Optional. Setting for using @all in a space. */
1287
1336
  useAtMentionAll?: PermissionSetting;
1288
1337
  }
1338
+ interface PositionSectionRequest {
1339
+ /** Optional. The relative position of the section in the list of sections. */
1340
+ relativePosition?: 'POSITION_UNSPECIFIED' | 'START' | 'END';
1341
+ /** Optional. The absolute position of the section in the list of sections. The position must be greater than 0. If the position is greater than the number of sections, the section will be appended to the end of the list. This operation inserts the section at the given position and shifts the original section at that position, and those below it, to the next position. */
1342
+ sortOrder?: number;
1343
+ }
1344
+ interface PositionSectionResponse {
1345
+ /** The updated section. */
1346
+ section?: GoogleChatV1Section;
1347
+ }
1289
1348
  interface QuotedMessageMetadata {
1290
1349
  /** Output only. Metadata about the source space of the quoted message. Populated only for FORWARD quote type. */
1291
1350
  forwardedMetadata?: ForwardedMetadata;
@@ -1368,6 +1427,12 @@ declare namespace gapi.client {
1368
1427
  /** A section must contain at least one widget. */
1369
1428
  widgets?: WidgetMarkup[];
1370
1429
  }
1430
+ interface SectionItem {
1431
+ /** Identifier. The resource name of the section item. Format: `users/{user}/sections/{section}/items/{item}` */
1432
+ name?: string;
1433
+ /** Optional. The space resource name. Format: `spaces/{space}` */
1434
+ space?: string;
1435
+ }
1371
1436
  interface SelectionItems {
1372
1437
  /** An array of the SelectionItem objects. */
1373
1438
  items?: GoogleAppsCardV1SelectionItem[];
@@ -1539,7 +1604,7 @@ declare namespace gapi.client {
1539
1604
  /** The status code, which should be an enum value of google.rpc.Code. */
1540
1605
  code?: number;
1541
1606
  /** A list of messages that carry the error details. There is a common set of message types for APIs to use. */
1542
- details?: Array<{[P in string]: any}>;
1607
+ details?: {[P in string]: any}[];
1543
1608
  /** A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. */
1544
1609
  message?: string;
1545
1610
  }
@@ -2243,6 +2308,11 @@ declare namespace gapi.client {
2243
2308
  alt?: 'json' | 'media' | 'proto';
2244
2309
  /** JSONP */
2245
2310
  callback?: string;
2311
+ /** The notification type for the message. */
2312
+ 'createMessageNotificationOptions.notificationType'?:
2313
+ | 'NOTIFICATION_TYPE_NONE'
2314
+ | 'NOTIFICATION_TYPE_FORCE_NOTIFY'
2315
+ | 'NOTIFICATION_TYPE_SILENT';
2246
2316
  /** Selector specifying which fields to include in a partial response. */
2247
2317
  fields?: string;
2248
2318
  /** 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. */
@@ -2283,6 +2353,11 @@ declare namespace gapi.client {
2283
2353
  alt?: 'json' | 'media' | 'proto';
2284
2354
  /** JSONP */
2285
2355
  callback?: string;
2356
+ /** The notification type for the message. */
2357
+ 'createMessageNotificationOptions.notificationType'?:
2358
+ | 'NOTIFICATION_TYPE_NONE'
2359
+ | 'NOTIFICATION_TYPE_FORCE_NOTIFY'
2360
+ | 'NOTIFICATION_TYPE_SILENT';
2286
2361
  /** Selector specifying which fields to include in a partial response. */
2287
2362
  fields?: string;
2288
2363
  /** 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. */
@@ -2342,7 +2417,7 @@ declare namespace gapi.client {
2342
2417
  /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2343
2418
  uploadType?: string;
2344
2419
  }): Request<{}>;
2345
- /** Returns details about a message. For an example, see [Get details about a message](https://developers.google.com/workspace/chat/get-messages). Supports the following types of [authentication](https://developers.google.com/workspace/chat/authenticate-authorize): - [App authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) with one of the following authorization scopes: - `https://www.googleapis.com/auth/chat.bot`: When using this authorization scope, this method returns details about a message the Chat app has access to, like direct messages and [slash commands](https://developers.google.com/workspace/chat/slash-commands) that invoke the Chat app. - `https://www.googleapis.com/auth/chat.app.messages.readonly` with [administrator approval](https://support.google.com/a?p=chat-app-auth) (available in [Developer Preview](https://developers.google.com/workspace/preview)). When using this authentication scope, this method returns details about a public message in a space. - [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.messages.readonly` - `https://www.googleapis.com/auth/chat.messages` Note: Might return a message from a blocked member or space. */
2420
+ /** Returns details about a message. For an example, see [Get details about a message](https://developers.google.com/workspace/chat/get-messages). Supports the following types of [authentication](https://developers.google.com/workspace/chat/authenticate-authorize): - [App authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) with one of the following authorization scopes: - `https://www.googleapis.com/auth/chat.bot`: When using this authorization scope, this method returns details about a message the Chat app has access to, like direct messages and [slash commands](https://developers.google.com/workspace/chat/slash-commands) that invoke the Chat app. - `https://www.googleapis.com/auth/chat.app.messages.readonly` with [administrator approval](https://support.google.com/a?p=chat-app-auth). When using this authentication scope, this method returns details about a public message in a space. - [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.messages.readonly` - `https://www.googleapis.com/auth/chat.messages` Note: Might return a message from a blocked member or space. */
2346
2421
  get(request?: {
2347
2422
  /** V1 error format. */
2348
2423
  '$.xgafv'?: '1' | '2';
@@ -2369,7 +2444,7 @@ declare namespace gapi.client {
2369
2444
  /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2370
2445
  uploadType?: string;
2371
2446
  }): Request<Message>;
2372
- /** Lists messages in a space that the caller is a member of, including messages from blocked members and spaces. System messages, like those announcing new space members, aren't included. If you list messages from a space with no messages, the response is an empty object. When using a REST/HTTP interface, the response contains an empty JSON object, `{}`. For an example, see [List messages](https://developers.google.com/workspace/chat/api/guides/v1/messages/list). Supports the following types of [authentication](https://developers.google.com/workspace/chat/authenticate-authorize): - [App authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) with [administrator approval](https://support.google.com/a?p=chat-app-auth) in [Developer Preview](https://developers.google.com/workspace/preview) with the authorization scope: - `https://www.googleapis.com/auth/chat.app.messages.readonly`. When using this authentication scope, this method only returns public messages in a space. It doesn't include private messages. - [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.messages.readonly` - `https://www.googleapis.com/auth/chat.messages` - `https://www.googleapis.com/auth/chat.import` (import mode spaces only) */
2447
+ /** Lists messages in a space that the caller is a member of, including messages from blocked members and spaces. System messages, like those announcing new space members, aren't included. If you list messages from a space with no messages, the response is an empty object. When using a REST/HTTP interface, the response contains an empty JSON object, `{}`. For an example, see [List messages](https://developers.google.com/workspace/chat/api/guides/v1/messages/list). Supports the following types of [authentication](https://developers.google.com/workspace/chat/authenticate-authorize): - [App authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) with [administrator approval](https://support.google.com/a?p=chat-app-auth) with the authorization scope: - `https://www.googleapis.com/auth/chat.app.messages.readonly`. When using this authentication scope, this method only returns public messages in a space. It doesn't include private messages. - [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.messages.readonly` - `https://www.googleapis.com/auth/chat.messages` - `https://www.googleapis.com/auth/chat.import` (import mode spaces only) */
2373
2448
  list(request?: {
2374
2449
  /** V1 error format. */
2375
2450
  '$.xgafv'?: '1' | '2';
@@ -2542,7 +2617,7 @@ declare namespace gapi.client {
2542
2617
  reactions: ReactionsResource;
2543
2618
  }
2544
2619
  interface SpaceEventsResource {
2545
- /** Returns an event from a Google Chat space. The [event payload](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.spaceEvents#SpaceEvent.FIELDS.oneof_payload) contains the most recent version of the resource that changed. For example, if you request an event about a new message but the message was later updated, the server returns the updated `Message` resource in the event payload. Note: The `permissionSettings` field is not returned in the Space object of the Space event data for this request. Supports the following types of [authentication](https://developers.google.com/workspace/chat/authenticate-authorize) with an [authorization scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes) appropriate for reading the requested data: - [App authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) with [administrator approval](https://support.google.com/a?p=chat-app-auth) in [Developer Preview](https://developers.google.com/workspace/preview) with one of the following authorization scopes: - `https://www.googleapis.com/auth/chat.app.spaces` - `https://www.googleapis.com/auth/chat.app.messages.readonly` - `https://www.googleapis.com/auth/chat.app.memberships` - [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` - `https://www.googleapis.com/auth/chat.messages.readonly` - `https://www.googleapis.com/auth/chat.messages` - `https://www.googleapis.com/auth/chat.messages.reactions.readonly` - `https://www.googleapis.com/auth/chat.messages.reactions` - `https://www.googleapis.com/auth/chat.memberships.readonly` - `https://www.googleapis.com/auth/chat.memberships` To get an event, the authenticated caller must be a member of the space. For an example, see [Get details about an event from a Google Chat space](https://developers.google.com/workspace/chat/get-space-event). */
2620
+ /** Returns an event from a Google Chat space. The [event payload](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.spaceEvents#SpaceEvent.FIELDS.oneof_payload) contains the most recent version of the resource that changed. For example, if you request an event about a new message but the message was later updated, the server returns the updated `Message` resource in the event payload. Note: The `permissionSettings` field is not returned in the Space object of the Space event data for this request. Supports the following types of [authentication](https://developers.google.com/workspace/chat/authenticate-authorize) with an [authorization scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes) appropriate for reading the requested data: - [App authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) with [administrator approval](https://support.google.com/a?p=chat-app-auth) with one of the following authorization scopes: - `https://www.googleapis.com/auth/chat.app.spaces` - `https://www.googleapis.com/auth/chat.app.spaces.readonly` - `https://www.googleapis.com/auth/chat.app.messages.readonly` - `https://www.googleapis.com/auth/chat.app.memberships` - `https://www.googleapis.com/auth/chat.app.memberships.readonly` - [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` - `https://www.googleapis.com/auth/chat.messages.readonly` - `https://www.googleapis.com/auth/chat.messages` - `https://www.googleapis.com/auth/chat.messages.reactions.readonly` - `https://www.googleapis.com/auth/chat.messages.reactions` - `https://www.googleapis.com/auth/chat.memberships.readonly` - `https://www.googleapis.com/auth/chat.memberships` To get an event, the authenticated caller must be a member of the space. For an example, see [Get details about an event from a Google Chat space](https://developers.google.com/workspace/chat/get-space-event). */
2546
2621
  get(request?: {
2547
2622
  /** V1 error format. */
2548
2623
  '$.xgafv'?: '1' | '2';
@@ -2569,7 +2644,7 @@ declare namespace gapi.client {
2569
2644
  /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2570
2645
  uploadType?: string;
2571
2646
  }): Request<SpaceEvent>;
2572
- /** Lists events from a Google Chat space. For each event, the [payload](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.spaceEvents#SpaceEvent.FIELDS.oneof_payload) contains the most recent version of the Chat resource. For example, if you list events about new space members, the server returns `Membership` resources that contain the latest membership details. If new members were removed during the requested period, the event payload contains an empty `Membership` resource. Supports the following types of [authentication](https://developers.google.com/workspace/chat/authenticate-authorize) with an [authorization scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes) appropriate for reading the requested data: - [App authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) with [administrator approval](https://support.google.com/a?p=chat-app-auth) in [Developer Preview](https://developers.google.com/workspace/preview) with one of the following authorization scopes: - `https://www.googleapis.com/auth/chat.app.spaces` - `https://www.googleapis.com/auth/chat.app.messages.readonly` - `https://www.googleapis.com/auth/chat.app.memberships` - [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` - `https://www.googleapis.com/auth/chat.messages.readonly` - `https://www.googleapis.com/auth/chat.messages` - `https://www.googleapis.com/auth/chat.messages.reactions.readonly` - `https://www.googleapis.com/auth/chat.messages.reactions` - `https://www.googleapis.com/auth/chat.memberships.readonly` - `https://www.googleapis.com/auth/chat.memberships` To list events, the authenticated caller must be a member of the space. For an example, see [List events from a Google Chat space](https://developers.google.com/workspace/chat/list-space-events). */
2647
+ /** Lists events from a Google Chat space. For each event, the [payload](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.spaceEvents#SpaceEvent.FIELDS.oneof_payload) contains the most recent version of the Chat resource. For example, if you list events about new space members, the server returns `Membership` resources that contain the latest membership details. If new members were removed during the requested period, the event payload contains an empty `Membership` resource. Supports the following types of [authentication](https://developers.google.com/workspace/chat/authenticate-authorize) with an [authorization scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes) appropriate for reading the requested data: - [App authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) with [administrator approval](https://support.google.com/a?p=chat-app-auth) with one of the following authorization scopes: - `https://www.googleapis.com/auth/chat.app.spaces` - `https://www.googleapis.com/auth/chat.app.spaces.readonly` - `https://www.googleapis.com/auth/chat.app.messages.readonly` - `https://www.googleapis.com/auth/chat.app.memberships` - `https://www.googleapis.com/auth/chat.app.memberships.readonly` - [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` - `https://www.googleapis.com/auth/chat.messages.readonly` - `https://www.googleapis.com/auth/chat.messages` - `https://www.googleapis.com/auth/chat.messages.reactions.readonly` - `https://www.googleapis.com/auth/chat.messages.reactions` - `https://www.googleapis.com/auth/chat.memberships.readonly` - `https://www.googleapis.com/auth/chat.memberships` To list events, the authenticated caller must be a member of the space. For an example, see [List events from a Google Chat space](https://developers.google.com/workspace/chat/list-space-events). */
2573
2648
  list(request?: {
2574
2649
  /** V1 error format. */
2575
2650
  '$.xgafv'?: '1' | '2';
@@ -2776,6 +2851,42 @@ declare namespace gapi.client {
2776
2851
  /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2777
2852
  uploadType?: string;
2778
2853
  }): Request<Space>;
2854
+ /** Returns all spaces with `spaceType == GROUP_CHAT`, whose human memberships contain exactly the calling user, and the users specified in `FindGroupChatsRequest.users`. Only members that have joined the conversation are supported. For an example, see [Find group chats](https://developers.google.com/workspace/chat/find-group-chats). If the calling user blocks, or is blocked by, some users, and no spaces with the entire specified set of users are found, this method returns spaces that don't include the blocked or blocking users. The specified set of users must contain only human (non-app) memberships. A request that contains non-human users doesn't return any spaces. 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.memberships.readonly` - `https://www.googleapis.com/auth/chat.memberships` */
2855
+ findGroupChats(request?: {
2856
+ /** V1 error format. */
2857
+ '$.xgafv'?: '1' | '2';
2858
+ /** OAuth access token. */
2859
+ access_token?: string;
2860
+ /** Data format for response. */
2861
+ alt?: 'json' | 'media' | 'proto';
2862
+ /** JSONP */
2863
+ callback?: string;
2864
+ /** Selector specifying which fields to include in a partial response. */
2865
+ fields?: string;
2866
+ /** 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. */
2867
+ key?: string;
2868
+ /** OAuth 2.0 token for the current user. */
2869
+ oauth_token?: string;
2870
+ /** Optional. The maximum number of spaces to return. The service might return fewer than this value. If unspecified, at most 10 spaces are returned. The maximum value is 30. If you use a value more than 30, it's automatically changed to 30. Negative values return an `INVALID_ARGUMENT` error. */
2871
+ pageSize?: number;
2872
+ /** Optional. A page token, received from a previous call to find group chats. Provide this parameter to retrieve the subsequent page. When paginating, all other parameters provided should match the call that provided the token. Passing different values may lead to unexpected results. */
2873
+ pageToken?: string;
2874
+ /** Returns response with indentations and line breaks. */
2875
+ prettyPrint?: boolean;
2876
+ /** 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. */
2877
+ quotaUser?: string;
2878
+ /** Requested space view type. If unset, defaults to `SPACE_VIEW_RESOURCE_NAME_ONLY`. Requests that specify `SPACE_VIEW_EXPANDED` must include scopes that allow reading space data, for example, https://www.googleapis.com/auth/chat.spaces or https://www.googleapis.com/auth/chat.spaces.readonly. */
2879
+ spaceView?:
2880
+ | 'SPACE_VIEW_UNSPECIFIED'
2881
+ | 'SPACE_VIEW_RESOURCE_NAME_ONLY'
2882
+ | 'SPACE_VIEW_EXPANDED';
2883
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2884
+ upload_protocol?: string;
2885
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2886
+ uploadType?: string;
2887
+ /** Optional. Resource names of all human users in group chat with the calling user. Chat apps can't be included in the request. The maximum number of users that can be specified in a single request is `49`. Format: `users/{user}`, where `{user}` is either the `id` for the [person](https://developers.google.com/people/api/rest/v1/people) from the People API, or the `id` for the [user](https://developers.google.com/admin-sdk/directory/reference/rest/v1/users) in the Directory API. For example, to find all group chats with the calling user and two other users, with People API profile IDs `123456789` and `987654321`, you can use `users/123456789` and `users/987654321`. You can also use the email as an alias for `{user}`. For example, `users/example@gmail.com` where `example@gmail.com` is the email of the Google Chat user. */
2888
+ users?: string | string[];
2889
+ }): Request<FindGroupChatsResponse>;
2779
2890
  /** Returns details about a space. For an example, see [Get details about a space](https://developers.google.com/workspace/chat/get-spaces). Supports the following types of [authentication](https://developers.google.com/workspace/chat/authenticate-authorize): - [App authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) with one of the following authorization scopes: - `https://www.googleapis.com/auth/chat.bot` - `https://www.googleapis.com/auth/chat.app.spaces` with [administrator approval](https://support.google.com/a?p=chat-app-auth) - [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 grants administrator privileges when an administrator account authenticates, `use_admin_access` is `true`, and one of the following authorization scopes is used: - `https://www.googleapis.com/auth/chat.admin.spaces.readonly` - `https://www.googleapis.com/auth/chat.admin.spaces` App authentication has the following limitations: - `space.access_settings` is only populated when using the `chat.app.spaces` scope. - `space.predefind_permission_settings` and `space.permission_settings` are only populated when using the `chat.app.spaces` scope, and only for spaces the app created. */
2780
2891
  get(request?: {
2781
2892
  /** V1 error format. */
@@ -2926,7 +3037,7 @@ declare namespace gapi.client {
2926
3037
  pageToken?: string;
2927
3038
  /** Returns response with indentations and line breaks. */
2928
3039
  prettyPrint?: boolean;
2929
- /** Required. A search query. You can search by using the following parameters: - `create_time` - `customer` - `display_name` - `external_user_allowed` - `last_active_time` - `space_history_state` - `space_type` `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`. `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: ``` 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") ``` */
3040
+ /** Required. A search query. You can search by using the following parameters : - `create_time` - `customer` - `display_name` - `external_user_allowed` - `last_active_time` - `space_history_state` - `space_type` `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`. `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: ``` 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") ``` */
2930
3041
  query?: string;
2931
3042
  /** 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. */
2932
3043
  quotaUser?: string;
@@ -2995,6 +3106,338 @@ declare namespace gapi.client {
2995
3106
  messages: MessagesResource;
2996
3107
  spaceEvents: SpaceEventsResource;
2997
3108
  }
3109
+ interface ItemsResource {
3110
+ /** 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
+ list(request?: {
3112
+ /** V1 error format. */
3113
+ '$.xgafv'?: '1' | '2';
3114
+ /** OAuth access token. */
3115
+ access_token?: string;
3116
+ /** Data format for response. */
3117
+ alt?: 'json' | 'media' | 'proto';
3118
+ /** JSONP */
3119
+ callback?: string;
3120
+ /** Selector specifying which fields to include in a partial response. */
3121
+ fields?: string;
3122
+ /** Optional. A query filter. Currently only supports filtering by space. For example, `space = spaces/{space}`. Invalid queries are rejected with an `INVALID_ARGUMENT` error. */
3123
+ filter?: string;
3124
+ /** 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. */
3125
+ key?: string;
3126
+ /** OAuth 2.0 token for the current user. */
3127
+ oauth_token?: string;
3128
+ /** Optional. The maximum number of section items to return. The service may return fewer than this value. If unspecified, at most 10 section items will be returned. The maximum value is 100. If you use a value more than 100, it's automatically changed to 100. Negative values return an `INVALID_ARGUMENT` error. */
3129
+ pageSize?: number;
3130
+ /** Optional. A page token, received from a previous list section items call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided should match the call that provided the page token. Passing different values to the other parameters might lead to unexpected results. */
3131
+ pageToken?: string;
3132
+ /** Required. The parent, which is the section resource name that owns this collection of section items. Only supports listing section items for the calling user. When you're filtering by space, use the wildcard `-` to search across all sections. For example, `users/{user}/sections/-`. Format: `users/{user}/sections/{section}` */
3133
+ parent: string;
3134
+ /** Returns response with indentations and line breaks. */
3135
+ prettyPrint?: boolean;
3136
+ /** 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. */
3137
+ quotaUser?: string;
3138
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
3139
+ upload_protocol?: string;
3140
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
3141
+ uploadType?: string;
3142
+ }): Request<ListSectionItemsResponse>;
3143
+ /** Moves an item from one section to another. For example, if a section contains spaces, this method can be used to move a space to a different section. 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` */
3144
+ move(request: {
3145
+ /** V1 error format. */
3146
+ '$.xgafv'?: '1' | '2';
3147
+ /** OAuth access token. */
3148
+ access_token?: string;
3149
+ /** Data format for response. */
3150
+ alt?: 'json' | 'media' | 'proto';
3151
+ /** JSONP */
3152
+ callback?: string;
3153
+ /** Selector specifying which fields to include in a partial response. */
3154
+ fields?: string;
3155
+ /** 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. */
3156
+ key?: string;
3157
+ /** Required. The resource name of the section item to move. Format: `users/{user}/sections/{section}/items/{item}` */
3158
+ name: string;
3159
+ /** OAuth 2.0 token for the current user. */
3160
+ oauth_token?: string;
3161
+ /** Returns response with indentations and line breaks. */
3162
+ prettyPrint?: boolean;
3163
+ /** 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. */
3164
+ quotaUser?: string;
3165
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
3166
+ upload_protocol?: string;
3167
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
3168
+ uploadType?: string;
3169
+ /** Request body */
3170
+ resource: MoveSectionItemRequest;
3171
+ }): Request<MoveSectionItemResponse>;
3172
+ move(
3173
+ request: {
3174
+ /** V1 error format. */
3175
+ '$.xgafv'?: '1' | '2';
3176
+ /** OAuth access token. */
3177
+ access_token?: string;
3178
+ /** Data format for response. */
3179
+ alt?: 'json' | 'media' | 'proto';
3180
+ /** JSONP */
3181
+ callback?: string;
3182
+ /** Selector specifying which fields to include in a partial response. */
3183
+ fields?: string;
3184
+ /** 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. */
3185
+ key?: string;
3186
+ /** Required. The resource name of the section item to move. Format: `users/{user}/sections/{section}/items/{item}` */
3187
+ name: string;
3188
+ /** OAuth 2.0 token for the current user. */
3189
+ oauth_token?: string;
3190
+ /** Returns response with indentations and line breaks. */
3191
+ prettyPrint?: boolean;
3192
+ /** 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. */
3193
+ quotaUser?: string;
3194
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
3195
+ upload_protocol?: string;
3196
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
3197
+ uploadType?: string;
3198
+ },
3199
+ body: MoveSectionItemRequest,
3200
+ ): Request<MoveSectionItemResponse>;
3201
+ }
3202
+ interface SectionsResource {
3203
+ /** Creates a section in Google Chat. Sections help users group conversations and customize the list of spaces displayed in Chat navigation panel. Only sections of type `CUSTOM_SECTION` can be created. 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` */
3204
+ create(request: {
3205
+ /** V1 error format. */
3206
+ '$.xgafv'?: '1' | '2';
3207
+ /** OAuth access token. */
3208
+ access_token?: string;
3209
+ /** Data format for response. */
3210
+ alt?: 'json' | 'media' | 'proto';
3211
+ /** JSONP */
3212
+ callback?: string;
3213
+ /** Selector specifying which fields to include in a partial response. */
3214
+ fields?: string;
3215
+ /** 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. */
3216
+ key?: string;
3217
+ /** OAuth 2.0 token for the current user. */
3218
+ oauth_token?: string;
3219
+ /** Required. The parent resource name where the section is created. Format: `users/{user}` */
3220
+ parent: string;
3221
+ /** Returns response with indentations and line breaks. */
3222
+ prettyPrint?: boolean;
3223
+ /** 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. */
3224
+ quotaUser?: string;
3225
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
3226
+ upload_protocol?: string;
3227
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
3228
+ uploadType?: string;
3229
+ /** Request body */
3230
+ resource: GoogleChatV1Section;
3231
+ }): Request<GoogleChatV1Section>;
3232
+ create(
3233
+ request: {
3234
+ /** V1 error format. */
3235
+ '$.xgafv'?: '1' | '2';
3236
+ /** OAuth access token. */
3237
+ access_token?: string;
3238
+ /** Data format for response. */
3239
+ alt?: 'json' | 'media' | 'proto';
3240
+ /** JSONP */
3241
+ callback?: string;
3242
+ /** Selector specifying which fields to include in a partial response. */
3243
+ fields?: string;
3244
+ /** 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. */
3245
+ key?: string;
3246
+ /** OAuth 2.0 token for the current user. */
3247
+ oauth_token?: string;
3248
+ /** Required. The parent resource name where the section is created. Format: `users/{user}` */
3249
+ parent: string;
3250
+ /** Returns response with indentations and line breaks. */
3251
+ prettyPrint?: boolean;
3252
+ /** 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. */
3253
+ quotaUser?: string;
3254
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
3255
+ upload_protocol?: string;
3256
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
3257
+ uploadType?: string;
3258
+ },
3259
+ body: GoogleChatV1Section,
3260
+ ): Request<GoogleChatV1Section>;
3261
+ /** Deletes a section of type `CUSTOM_SECTION`. If the section contains items, such as spaces, the items are moved to Google Chat's default sections and are not deleted. 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` */
3262
+ delete(request?: {
3263
+ /** V1 error format. */
3264
+ '$.xgafv'?: '1' | '2';
3265
+ /** OAuth access token. */
3266
+ access_token?: string;
3267
+ /** Data format for response. */
3268
+ alt?: 'json' | 'media' | 'proto';
3269
+ /** JSONP */
3270
+ callback?: string;
3271
+ /** Selector specifying which fields to include in a partial response. */
3272
+ fields?: string;
3273
+ /** 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. */
3274
+ key?: string;
3275
+ /** Required. The name of the section to delete. Format: `users/{user}/sections/{section}` */
3276
+ name: string;
3277
+ /** OAuth 2.0 token for the current user. */
3278
+ oauth_token?: string;
3279
+ /** Returns response with indentations and line breaks. */
3280
+ prettyPrint?: boolean;
3281
+ /** 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. */
3282
+ quotaUser?: string;
3283
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
3284
+ upload_protocol?: string;
3285
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
3286
+ uploadType?: string;
3287
+ }): Request<{}>;
3288
+ /** Lists sections available to the Chat user. Sections help users group their conversations and customize the list of spaces displayed in Chat navigation panel. 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` */
3289
+ list(request?: {
3290
+ /** V1 error format. */
3291
+ '$.xgafv'?: '1' | '2';
3292
+ /** OAuth access token. */
3293
+ access_token?: string;
3294
+ /** Data format for response. */
3295
+ alt?: 'json' | 'media' | 'proto';
3296
+ /** JSONP */
3297
+ callback?: string;
3298
+ /** Selector specifying which fields to include in a partial response. */
3299
+ fields?: string;
3300
+ /** 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. */
3301
+ key?: string;
3302
+ /** OAuth 2.0 token for the current user. */
3303
+ oauth_token?: string;
3304
+ /** Optional. The maximum number of sections to return. The service may return fewer than this value. If unspecified, at most 10 sections will be returned. The maximum value is 100. If you use a value more than 100, it's automatically changed to 100. Negative values return an `INVALID_ARGUMENT` error. */
3305
+ pageSize?: number;
3306
+ /** Optional. A page token, received from a previous list sections call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided should match the call that provided the page token. Passing different values to the other parameters might lead to unexpected results. */
3307
+ pageToken?: string;
3308
+ /** Required. The parent, which is the user resource name that owns this collection of sections. Only supports listing sections for the calling user. To refer to the calling user, set one of the following: - The `me` alias. For example, `users/me`. - Their Workspace email address. For example, `users/user@example.com`. - Their user id. For example, `users/123456789`. Format: `users/{user}` */
3309
+ parent: string;
3310
+ /** Returns response with indentations and line breaks. */
3311
+ prettyPrint?: boolean;
3312
+ /** 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. */
3313
+ quotaUser?: string;
3314
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
3315
+ upload_protocol?: string;
3316
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
3317
+ uploadType?: string;
3318
+ }): Request<ListSectionsResponse>;
3319
+ /** Updates a section. Only sections of type `CUSTOM_SECTION` can be updated. 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` */
3320
+ patch(request: {
3321
+ /** V1 error format. */
3322
+ '$.xgafv'?: '1' | '2';
3323
+ /** OAuth access token. */
3324
+ access_token?: string;
3325
+ /** Data format for response. */
3326
+ alt?: 'json' | 'media' | 'proto';
3327
+ /** JSONP */
3328
+ callback?: string;
3329
+ /** Selector specifying which fields to include in a partial response. */
3330
+ fields?: string;
3331
+ /** 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. */
3332
+ key?: string;
3333
+ /** Identifier. Resource name of the section. For system sections, the section ID is a constant string: - DEFAULT_DIRECT_MESSAGES: `users/{user}/sections/default-direct-messages` - DEFAULT_SPACES: `users/{user}/sections/default-spaces` - DEFAULT_APPS: `users/{user}/sections/default-apps` Format: `users/{user}/sections/{section}` */
3334
+ name: string;
3335
+ /** OAuth 2.0 token for the current user. */
3336
+ oauth_token?: string;
3337
+ /** Returns response with indentations and line breaks. */
3338
+ prettyPrint?: boolean;
3339
+ /** 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. */
3340
+ quotaUser?: string;
3341
+ /** Required. The mask to specify which fields to update. Currently supported field paths: - `display_name` */
3342
+ updateMask?: string;
3343
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
3344
+ upload_protocol?: string;
3345
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
3346
+ uploadType?: string;
3347
+ /** Request body */
3348
+ resource: GoogleChatV1Section;
3349
+ }): Request<GoogleChatV1Section>;
3350
+ patch(
3351
+ request: {
3352
+ /** V1 error format. */
3353
+ '$.xgafv'?: '1' | '2';
3354
+ /** OAuth access token. */
3355
+ access_token?: string;
3356
+ /** Data format for response. */
3357
+ alt?: 'json' | 'media' | 'proto';
3358
+ /** JSONP */
3359
+ callback?: string;
3360
+ /** Selector specifying which fields to include in a partial response. */
3361
+ fields?: string;
3362
+ /** 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. */
3363
+ key?: string;
3364
+ /** Identifier. Resource name of the section. For system sections, the section ID is a constant string: - DEFAULT_DIRECT_MESSAGES: `users/{user}/sections/default-direct-messages` - DEFAULT_SPACES: `users/{user}/sections/default-spaces` - DEFAULT_APPS: `users/{user}/sections/default-apps` Format: `users/{user}/sections/{section}` */
3365
+ name: string;
3366
+ /** OAuth 2.0 token for the current user. */
3367
+ oauth_token?: string;
3368
+ /** Returns response with indentations and line breaks. */
3369
+ prettyPrint?: boolean;
3370
+ /** 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. */
3371
+ quotaUser?: string;
3372
+ /** Required. The mask to specify which fields to update. Currently supported field paths: - `display_name` */
3373
+ updateMask?: string;
3374
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
3375
+ upload_protocol?: string;
3376
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
3377
+ uploadType?: string;
3378
+ },
3379
+ body: GoogleChatV1Section,
3380
+ ): Request<GoogleChatV1Section>;
3381
+ /** Changes the sort order of a section. 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` */
3382
+ position(request: {
3383
+ /** V1 error format. */
3384
+ '$.xgafv'?: '1' | '2';
3385
+ /** OAuth access token. */
3386
+ access_token?: string;
3387
+ /** Data format for response. */
3388
+ alt?: 'json' | 'media' | 'proto';
3389
+ /** JSONP */
3390
+ callback?: string;
3391
+ /** Selector specifying which fields to include in a partial response. */
3392
+ fields?: string;
3393
+ /** 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. */
3394
+ key?: string;
3395
+ /** Required. The resource name of the section to position. Format: `users/{user}/sections/{section}` */
3396
+ name: string;
3397
+ /** OAuth 2.0 token for the current user. */
3398
+ oauth_token?: string;
3399
+ /** Returns response with indentations and line breaks. */
3400
+ prettyPrint?: boolean;
3401
+ /** 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. */
3402
+ quotaUser?: string;
3403
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
3404
+ upload_protocol?: string;
3405
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
3406
+ uploadType?: string;
3407
+ /** Request body */
3408
+ resource: PositionSectionRequest;
3409
+ }): Request<PositionSectionResponse>;
3410
+ position(
3411
+ request: {
3412
+ /** V1 error format. */
3413
+ '$.xgafv'?: '1' | '2';
3414
+ /** OAuth access token. */
3415
+ access_token?: string;
3416
+ /** Data format for response. */
3417
+ alt?: 'json' | 'media' | 'proto';
3418
+ /** JSONP */
3419
+ callback?: string;
3420
+ /** Selector specifying which fields to include in a partial response. */
3421
+ fields?: string;
3422
+ /** 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. */
3423
+ key?: string;
3424
+ /** Required. The resource name of the section to position. Format: `users/{user}/sections/{section}` */
3425
+ name: string;
3426
+ /** OAuth 2.0 token for the current user. */
3427
+ oauth_token?: string;
3428
+ /** Returns response with indentations and line breaks. */
3429
+ prettyPrint?: boolean;
3430
+ /** 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. */
3431
+ quotaUser?: string;
3432
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
3433
+ upload_protocol?: string;
3434
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
3435
+ uploadType?: string;
3436
+ },
3437
+ body: PositionSectionRequest,
3438
+ ): Request<PositionSectionResponse>;
3439
+ items: ItemsResource;
3440
+ }
2998
3441
  interface SpaceNotificationSettingResource {
2999
3442
  /** Gets the space notification setting. For an example, see [Get the caller's space notification setting](https://developers.google.com/workspace/chat/get-space-notification-setting). 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.spacesettings` */
3000
3443
  get(request?: {
@@ -3209,6 +3652,7 @@ declare namespace gapi.client {
3209
3652
  threads: ThreadsResource;
3210
3653
  }
3211
3654
  interface UsersResource {
3655
+ sections: SectionsResource;
3212
3656
  spaces: SpacesResource;
3213
3657
  }
3214
3658
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maxim_mazurok/gapi.client.chat-v1",
3
- "version": "0.2.20260315",
3
+ "version": "0.2.20260602",
4
4
  "description": "TypeScript typings for Google Chat API v1",
5
5
  "repository": {
6
6
  "type": "git",
package/readme.md CHANGED
@@ -11,6 +11,18 @@ Install typings for Google Chat API:
11
11
  npm install @types/gapi.client.chat-v1 --save-dev
12
12
  ```
13
13
 
14
+ ## TypeScript 6.0+
15
+
16
+ TypeScript 6.0 changed `types` to default to `[]`. You must now explicitly list type packages in `tsconfig.json`:
17
+
18
+ ```json
19
+ {
20
+ "compilerOptions": {
21
+ "types": ["gapi", "gapi.auth2", "gapi.client", "gapi.client.chat-v1"]
22
+ }
23
+ }
24
+ ```
25
+
14
26
  ## Usage
15
27
 
16
28
  You need to initialize Google API client in your code:
@@ -69,6 +81,9 @@ var client_id = '',
69
81
  // On their own behalf, apps in Google Chat can see, add, update, and remove members from conversations and spaces
70
82
  'https://www.googleapis.com/auth/chat.app.memberships',
71
83
 
84
+ // On their own behalf, apps in Google Chat can see members of conversations and spaces
85
+ 'https://www.googleapis.com/auth/chat.app.memberships.readonly',
86
+
72
87
  // On their own behalf, apps in Google Chat can see all messages and their associated reactions and message content
73
88
  'https://www.googleapis.com/auth/chat.app.messages.readonly',
74
89
 
@@ -78,6 +93,9 @@ var client_id = '',
78
93
  // On their own behalf, apps in Google Chat can create conversations and spaces
79
94
  'https://www.googleapis.com/auth/chat.app.spaces.create',
80
95
 
96
+ // On their own behalf, apps in Google Chat can see conversations and spaces and their metadata (including history settings and access settings)
97
+ 'https://www.googleapis.com/auth/chat.app.spaces.readonly',
98
+
81
99
  // Private Service: https://www.googleapis.com/auth/chat.bot
82
100
  'https://www.googleapis.com/auth/chat.bot',
83
101
 
@@ -135,6 +153,12 @@ var client_id = '',
135
153
  // View last read time for Google Chat conversations
136
154
  'https://www.googleapis.com/auth/chat.users.readstate.readonly',
137
155
 
156
+ // View, create, update, and delete your sections in Google Chat; move and list your section items in Google Chat
157
+ 'https://www.googleapis.com/auth/chat.users.sections',
158
+
159
+ // View your sections and their section items in Google Chat
160
+ 'https://www.googleapis.com/auth/chat.users.sections.readonly',
161
+
138
162
  // Read and update your space settings
139
163
  'https://www.googleapis.com/auth/chat.users.spacesettings',
140
164
  ],
@@ -206,6 +230,11 @@ Returns the existing direct message with the specified user. If no direct messag
206
230
  */
207
231
  await gapi.client.chat.spaces.findDirectMessage({});
208
232
 
233
+ /*
234
+ Returns all spaces with `spaceType == GROUP_CHAT`, whose human memberships contain exactly the calling user, and the users specified in `FindGroupChatsRequest.users`. Only members that have joined the conversation are supported. For an example, see [Find group chats](https://developers.google.com/workspace/chat/find-group-chats). If the calling user blocks, or is blocked by, some users, and no spaces with the entire specified set of users are found, this method returns spaces that don't include the blocked or blocking users. The specified set of users must contain only human (non-app) memberships. A request that contains non-human users doesn't return any spaces. 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.memberships.readonly` - `https://www.googleapis.com/auth/chat.memberships`
235
+ */
236
+ await gapi.client.chat.spaces.findGroupChats({});
237
+
209
238
  /*
210
239
  Returns details about a space. For an example, see [Get details about a space](https://developers.google.com/workspace/chat/get-spaces). Supports the following types of [authentication](https://developers.google.com/workspace/chat/authenticate-authorize): - [App authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) with one of the following authorization scopes: - `https://www.googleapis.com/auth/chat.bot` - `https://www.googleapis.com/auth/chat.app.spaces` with [administrator approval](https://support.google.com/a?p=chat-app-auth) - [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 grants administrator privileges when an administrator account authenticates, `use_admin_access` is `true`, and one of the following authorization scopes is used: - `https://www.googleapis.com/auth/chat.admin.spaces.readonly` - `https://www.googleapis.com/auth/chat.admin.spaces` App authentication has the following limitations: - `space.access_settings` is only populated when using the `chat.app.spaces` scope. - `space.predefind_permission_settings` and `space.permission_settings` are only populated when using the `chat.app.spaces` scope, and only for spaces the app created.
211
240
  */