@maxim_mazurok/gapi.client.chat-v1 0.3.20260818 → 0.3.20260823

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 +136 -5
  2. package/package.json +1 -1
  3. package/readme.md +6 -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: 20260818
12
+ // Revision: 20260823
13
13
 
14
14
  /// <reference types="gapi.client" />
15
15
 
@@ -1116,6 +1116,12 @@ declare namespace gapi.client {
1116
1116
  /** A token that you can send as `pageToken` to retrieve the next page of results. If empty, there are no subsequent pages. */
1117
1117
  nextPageToken?: string;
1118
1118
  }
1119
+ interface ListMessagePinsResponse {
1120
+ /** The pinned messages from the specified space. */
1121
+ messagePins?: MessagePin[];
1122
+ /** You can send a token as `pageToken` to retrieve the next page of results. If empty, there are no subsequent pages. */
1123
+ nextPageToken?: string;
1124
+ }
1119
1125
  interface ListMessagesResponse {
1120
1126
  /** List of messages. */
1121
1127
  messages?: Message[];
@@ -1320,6 +1326,12 @@ declare namespace gapi.client {
1320
1326
  /** The deleted message. Only the `name`, `createTime`, and `deletionMetadata` fields are populated. */
1321
1327
  message?: Message;
1322
1328
  }
1329
+ interface MessagePin {
1330
+ /** Required. Immutable. The resource name of the message that is pinned. Format: `spaces/{space}/messages/{message}` */
1331
+ message?: string;
1332
+ /** Identifier. The resource name of the message pin. Format: `spaces/{space}/messagePins/{message_pin}` The resource ID component matches the resource ID component of the message. For example, a message with `spaces/AAA/messages/bbb.ccc` corresponds to the message pin with the resource name `spaces/AAA/messagePins/bbb.ccc`. */
1333
+ name?: string;
1334
+ }
1323
1335
  interface MessageUpdatedEventData {
1324
1336
  /** The updated message. */
1325
1337
  message?: Message;
@@ -1489,13 +1501,13 @@ declare namespace gapi.client {
1489
1501
  space?: Space;
1490
1502
  }
1491
1503
  interface SearchSpacesResponse {
1492
- /** A token that can be used to retrieve the next page. If this field is empty, there are no subsequent pages. */
1504
+ /** A token that can be used to retrieve the next page. If this field is empty, there are no subsequent pages. Only populated when `useAdminAccess` is set to `true`. */
1493
1505
  nextPageToken?: string;
1494
1506
  /** Output only. The list of search results that matched the query. */
1495
1507
  results?: SearchSpaceResult[];
1496
1508
  /** Deprecated: Please use the new `results` field instead. A page of the requested spaces. This field will be populated only when `useAdminAccess` is set to `true` and deprecated in favor of the new `results` field. */
1497
1509
  spaces?: Space[];
1498
- /** The total number of spaces that match the query, across all pages. If the result is over 10,000 spaces, this value is an estimate. */
1510
+ /** The total number of spaces that match the query, across all pages. If the result is over 10,000 spaces, this value is an estimate. Only populated when `useAdminAccess` is set to `true`. */
1499
1511
  totalSize?: number;
1500
1512
  }
1501
1513
  interface Section {
@@ -2220,6 +2232,124 @@ declare namespace gapi.client {
2220
2232
  body: Membership,
2221
2233
  ): Request<Membership>;
2222
2234
  }
2235
+ interface MessagePinsResource {
2236
+ /** Creates a message pin. 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.pins` - `https://www.googleapis.com/auth/chat.spaces` */
2237
+ create(request: {
2238
+ /** V1 error format. */
2239
+ '$.xgafv'?: '1' | '2';
2240
+ /** OAuth access token. */
2241
+ access_token?: string;
2242
+ /** Data format for response. */
2243
+ alt?: 'json' | 'media' | 'proto';
2244
+ /** JSONP */
2245
+ callback?: string;
2246
+ /** Selector specifying which fields to include in a partial response. */
2247
+ fields?: string;
2248
+ /** 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. */
2249
+ key?: string;
2250
+ /** OAuth 2.0 token for the current user. */
2251
+ oauth_token?: string;
2252
+ /** Required. The parent space in which to create the message pin. Format: spaces/{space} */
2253
+ parent: string;
2254
+ /** Returns response with indentations and line breaks. */
2255
+ prettyPrint?: boolean;
2256
+ /** 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. */
2257
+ quotaUser?: string;
2258
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2259
+ upload_protocol?: string;
2260
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2261
+ uploadType?: string;
2262
+ /** Request body */
2263
+ resource: MessagePin;
2264
+ }): Request<MessagePin>;
2265
+ create(
2266
+ request: {
2267
+ /** V1 error format. */
2268
+ '$.xgafv'?: '1' | '2';
2269
+ /** OAuth access token. */
2270
+ access_token?: string;
2271
+ /** Data format for response. */
2272
+ alt?: 'json' | 'media' | 'proto';
2273
+ /** JSONP */
2274
+ callback?: string;
2275
+ /** Selector specifying which fields to include in a partial response. */
2276
+ fields?: string;
2277
+ /** 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. */
2278
+ key?: string;
2279
+ /** OAuth 2.0 token for the current user. */
2280
+ oauth_token?: string;
2281
+ /** Required. The parent space in which to create the message pin. Format: spaces/{space} */
2282
+ parent: string;
2283
+ /** Returns response with indentations and line breaks. */
2284
+ prettyPrint?: boolean;
2285
+ /** 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. */
2286
+ quotaUser?: string;
2287
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2288
+ upload_protocol?: string;
2289
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2290
+ uploadType?: string;
2291
+ },
2292
+ body: MessagePin,
2293
+ ): Request<MessagePin>;
2294
+ /** Deletes a message pin. 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.pins` - `https://www.googleapis.com/auth/chat.spaces` */
2295
+ delete(request?: {
2296
+ /** V1 error format. */
2297
+ '$.xgafv'?: '1' | '2';
2298
+ /** OAuth access token. */
2299
+ access_token?: string;
2300
+ /** Data format for response. */
2301
+ alt?: 'json' | 'media' | 'proto';
2302
+ /** JSONP */
2303
+ callback?: string;
2304
+ /** Selector specifying which fields to include in a partial response. */
2305
+ fields?: string;
2306
+ /** 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. */
2307
+ key?: string;
2308
+ /** Required. The resource name of the message pin to remove. Format: spaces/{space}/messagePins/{message_pin} */
2309
+ name: string;
2310
+ /** OAuth 2.0 token for the current user. */
2311
+ oauth_token?: string;
2312
+ /** Returns response with indentations and line breaks. */
2313
+ prettyPrint?: boolean;
2314
+ /** 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. */
2315
+ quotaUser?: string;
2316
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2317
+ upload_protocol?: string;
2318
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2319
+ uploadType?: string;
2320
+ }): Request<{}>;
2321
+ /** Lists message pins in a space. Users can pin important messages in spaces for easy access. For more information, see [Pin or unpin a conversation in Google Chat](https://support.google.com/chat/answer/15622437). 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.pins.readonly` - `https://www.googleapis.com/auth/chat.spaces.pins` - `https://www.googleapis.com/auth/chat.spaces.readonly` - `https://www.googleapis.com/auth/chat.spaces` */
2322
+ list(request?: {
2323
+ /** V1 error format. */
2324
+ '$.xgafv'?: '1' | '2';
2325
+ /** OAuth access token. */
2326
+ access_token?: string;
2327
+ /** Data format for response. */
2328
+ alt?: 'json' | 'media' | 'proto';
2329
+ /** JSONP */
2330
+ callback?: string;
2331
+ /** Selector specifying which fields to include in a partial response. */
2332
+ fields?: string;
2333
+ /** 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. */
2334
+ key?: string;
2335
+ /** OAuth 2.0 token for the current user. */
2336
+ oauth_token?: string;
2337
+ /** Optional. The maximum number of message pins returned. The service might return fewer messages than this value. The maximum value is 100. If you use a value more than 100, it's automatically changed to 100. If unspecified, at most 100 message pins will be returned. Negative values return an `INVALID_ARGUMENT` error. */
2338
+ pageSize?: number;
2339
+ /** Optional. A page token received from a previous list message pins call. Provide this parameter 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. */
2340
+ pageToken?: string;
2341
+ /** Required. The parent space which owns the collection of pinned items Format: `spaces/{space}` */
2342
+ parent: string;
2343
+ /** Returns response with indentations and line breaks. */
2344
+ prettyPrint?: boolean;
2345
+ /** 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. */
2346
+ quotaUser?: string;
2347
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2348
+ upload_protocol?: string;
2349
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2350
+ uploadType?: string;
2351
+ }): Request<ListMessagePinsResponse>;
2352
+ }
2223
2353
  interface AttachmentsResource {
2224
2354
  /** Gets the metadata of a message attachment. The attachment data is fetched using the [media API](https://developers.google.com/workspace/chat/api/reference/rest/v1/media/download). For an example, see [Get metadata about a message attachment](https://developers.google.com/workspace/chat/get-media-attachments). Requires [app authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) with the [authorization scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): - `https://www.googleapis.com/auth/chat.bot` */
2225
2355
  get(request?: {
@@ -3171,13 +3301,13 @@ declare namespace gapi.client {
3171
3301
  oauth_token?: string;
3172
3302
  /** Optional. How the list of spaces is ordered. Supported attributes to order by are: - `membership_count.joined_direct_human_user_count` — Denotes the count of human users that have directly joined a space. - `last_active_time` — Denotes the time when last eligible item is added to any topic of this space. - `create_time` — Denotes the time of the space creation. When `useAdminAccess` is `false`, only `create_time` and `relevance` are supported for ordering. Only `DESC` is supported for these fields in non-admin searches. Valid ordering operation values are: - `ASC` for ascending. Default value. - `DESC` for descending. The supported syntax are when `useAdminAccess` is set to `true`: - `membership_count.joined_direct_human_user_count DESC` - `membership_count.joined_direct_human_user_count ASC` - `last_active_time DESC` - `last_active_time ASC` - `create_time DESC` - `create_time ASC` When `useAdminAccess` is set to `false`: - `create_time DESC` - `relevance DESC` [Developer Preview](https://developers.google.com/workspace/preview). */
3173
3303
  orderBy?: string;
3174
- /** The maximum number of spaces to return. The service may return fewer than this value. If unspecified, at most 100 spaces are returned. The maximum value is 1000. If you use a value more than 1000, it's automatically changed to 1000. */
3304
+ /** The maximum number of spaces to return. The service may return fewer than this value. If unspecified, at most 100 spaces are returned. The maximum value is 1000 when `useAdminAccess` is set to `true`. Otherwise, the maximum value is 100. If you use a value more than the maximum value, it's automatically changed to the maximum value. */
3175
3305
  pageSize?: number;
3176
3306
  /** A token, received from the previous search spaces call. Provide this parameter 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. */
3177
3307
  pageToken?: string;
3178
3308
  /** Returns response with indentations and line breaks. */
3179
3309
  prettyPrint?: boolean;
3180
- /** 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` - `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 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 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" AND space_type = "SPACE" (display_name:"Hello" OR display_name:"Fun") AND space_type = "SPACE" (external_user_allowed = "true" AND space_type = "SPACE") // Returns an empty response. (external_user_allowed = "true" AND display_name:"Hello" AND space_type = "SPACE") ``` */
3310
+ /** 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` - `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 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 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" AND space_type = "SPACE" (display_name:"Hello" OR display_name:"Fun") AND space_type = "SPACE" (external_user_allowed = "true" AND space_type = "SPACE") // Returns an empty response. (external_user_allowed = "true" AND display_name:"Hello" AND space_type = "SPACE") ``` The maximum query length is 1,000 characters. Invalid queries are rejected by the server with an `INVALID_ARGUMENT` error. */
3181
3311
  query?: string;
3182
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. */
3183
3313
  quotaUser?: string;
@@ -3243,6 +3373,7 @@ declare namespace gapi.client {
3243
3373
  body: SetUpSpaceRequest,
3244
3374
  ): Request<Space>;
3245
3375
  members: MembersResource;
3376
+ messagePins: MessagePinsResource;
3246
3377
  messages: MessagesResource;
3247
3378
  spaceEvents: SpaceEventsResource;
3248
3379
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maxim_mazurok/gapi.client.chat-v1",
3
- "version": "0.3.20260818",
3
+ "version": "0.3.20260823",
4
4
  "description": "TypeScript typings for Google Chat API v1",
5
5
  "repository": {
6
6
  "type": "git",
package/readme.md CHANGED
@@ -153,6 +153,12 @@ var client_id = '',
153
153
  // Create new conversations and spaces in Google Chat
154
154
  'https://www.googleapis.com/auth/chat.spaces.create',
155
155
 
156
+ // See, add, and remove pins in your Google Chat spaces
157
+ 'https://www.googleapis.com/auth/chat.spaces.pins',
158
+
159
+ // See pins in your Google Chat spaces
160
+ 'https://www.googleapis.com/auth/chat.spaces.pins.readonly',
161
+
156
162
  // View chat and spaces in Google Chat
157
163
  'https://www.googleapis.com/auth/chat.spaces.readonly',
158
164