@maxim_mazurok/gapi.client.chat-v1 0.0.20240813 → 0.0.20240818
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 +79 -4
- package/package.json +1 -1
- package/readme.md +5 -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:
|
|
12
|
+
// Revision: 20240818
|
|
13
13
|
|
|
14
14
|
/// <reference types="gapi.client" />
|
|
15
15
|
|
|
@@ -492,7 +492,7 @@ declare namespace gapi.client {
|
|
|
492
492
|
interface GoogleAppsCardV1PlatformDataSource {
|
|
493
493
|
/** A data source shared by all Google Workspace applications, such as users in a Google Workspace organization. */
|
|
494
494
|
commonDataSource?: string;
|
|
495
|
-
/** A data source that's unique to a Google Workspace host application, such spaces in Google Chat. */
|
|
495
|
+
/** A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries). */
|
|
496
496
|
hostAppDataSource?: HostAppDataSourceMarkup;
|
|
497
497
|
}
|
|
498
498
|
interface GoogleAppsCardV1Section {
|
|
@@ -741,6 +741,12 @@ declare namespace gapi.client {
|
|
|
741
741
|
/** A list of updated memberships. */
|
|
742
742
|
memberships?: MembershipUpdatedEventData[];
|
|
743
743
|
}
|
|
744
|
+
interface MembershipCount {
|
|
745
|
+
/** Count of human users that have directly joined the space, not counting users joined by having membership in a joined group. */
|
|
746
|
+
joinedDirectHumanUserCount?: number;
|
|
747
|
+
/** Count of all groups that have directly joined the space. */
|
|
748
|
+
joinedGroupCount?: number;
|
|
749
|
+
}
|
|
744
750
|
interface MembershipCreatedEventData {
|
|
745
751
|
/** The new membership. */
|
|
746
752
|
membership?: Membership;
|
|
@@ -879,6 +885,14 @@ declare namespace gapi.client {
|
|
|
879
885
|
/** The URI of this link. */
|
|
880
886
|
uri?: string;
|
|
881
887
|
}
|
|
888
|
+
interface SearchSpacesResponse {
|
|
889
|
+
/** A token that can be used to retrieve the next page. If this field is empty, there are no subsequent pages. */
|
|
890
|
+
nextPageToken?: string;
|
|
891
|
+
/** A page of the requested spaces. */
|
|
892
|
+
spaces?: Space[];
|
|
893
|
+
/** 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. */
|
|
894
|
+
totalSize?: number;
|
|
895
|
+
}
|
|
882
896
|
interface Section {
|
|
883
897
|
/** The header of the section. Formatted text is supported. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). */
|
|
884
898
|
header?: string;
|
|
@@ -926,6 +940,10 @@ declare namespace gapi.client {
|
|
|
926
940
|
externalUserAllowed?: boolean;
|
|
927
941
|
/** Optional. Whether this space is created in `Import Mode` as part of a data migration into Google Workspace. While spaces are being imported, they aren't visible to users until the import is complete. */
|
|
928
942
|
importMode?: boolean;
|
|
943
|
+
/** Output only. Timestamp of the last message in the space. [Developer Preview](https://developers.google.com/workspace/preview). */
|
|
944
|
+
lastActiveTime?: string;
|
|
945
|
+
/** Output only. The count of joined memberships grouped by member type. Populated when the `space_type` is `SPACE`, `DIRECT_MESSAGE` or `GROUP_CHAT`. [Developer Preview](https://developers.google.com/workspace/preview). */
|
|
946
|
+
membershipCount?: MembershipCount;
|
|
929
947
|
/** Resource name of the space. Format: `spaces/{space}` */
|
|
930
948
|
name?: string;
|
|
931
949
|
/** Optional. Whether the space is a DM between a Chat app and a single human. */
|
|
@@ -1188,7 +1206,7 @@ declare namespace gapi.client {
|
|
|
1188
1206
|
): Request<UploadAttachmentResponse>;
|
|
1189
1207
|
}
|
|
1190
1208
|
interface MembersResource {
|
|
1191
|
-
/** Creates a
|
|
1209
|
+
/** Creates a membership for the calling Chat app, a user, or a Google Group. Creating memberships for other Chat apps isn't supported. When creating a membership, if the specified member has their auto-accept policy turned off, then they're invited, and must accept the space invitation before joining. Otherwise, creating a membership adds the member directly to the specified space. Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). For example usage, see: - [Invite or add a user to a space](https://developers.google.com/workspace/chat/create-members#create-user-membership). - [Invite or add a Google Group to a space](https://developers.google.com/workspace/chat/create-members#create-group-membership). - [Add the Chat app to a space](https://developers.google.com/workspace/chat/create-members#create-membership-calling-api). */
|
|
1192
1210
|
create(request: {
|
|
1193
1211
|
/** V1 error format. */
|
|
1194
1212
|
'$.xgafv'?: string;
|
|
@@ -1214,6 +1232,8 @@ declare namespace gapi.client {
|
|
|
1214
1232
|
upload_protocol?: string;
|
|
1215
1233
|
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
1216
1234
|
uploadType?: string;
|
|
1235
|
+
/** [Developer Preview](https://developers.google.com/workspace/preview). 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 the `chat.admin.memberships` [OAuth 2.0 scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). Creating app memberships or creating memberships for users outside the administrator's Google Workspace organization isn't supported using admin access. */
|
|
1236
|
+
useAdminAccess?: boolean;
|
|
1217
1237
|
/** Request body */
|
|
1218
1238
|
resource: Membership;
|
|
1219
1239
|
}): Request<Membership>;
|
|
@@ -1243,6 +1263,8 @@ declare namespace gapi.client {
|
|
|
1243
1263
|
upload_protocol?: string;
|
|
1244
1264
|
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
1245
1265
|
uploadType?: string;
|
|
1266
|
+
/** [Developer Preview](https://developers.google.com/workspace/preview). 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 the `chat.admin.memberships` [OAuth 2.0 scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). Creating app memberships or creating memberships for users outside the administrator's Google Workspace organization isn't supported using admin access. */
|
|
1267
|
+
useAdminAccess?: boolean;
|
|
1246
1268
|
},
|
|
1247
1269
|
body: Membership
|
|
1248
1270
|
): Request<Membership>;
|
|
@@ -1272,6 +1294,8 @@ declare namespace gapi.client {
|
|
|
1272
1294
|
upload_protocol?: string;
|
|
1273
1295
|
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
1274
1296
|
uploadType?: string;
|
|
1297
|
+
/** [Developer Preview](https://developers.google.com/workspace/preview). 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 the `chat.admin.memberships` [OAuth 2.0 scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). Deleting app memberships in a space isn't supported using admin access. */
|
|
1298
|
+
useAdminAccess?: boolean;
|
|
1275
1299
|
}): Request<Membership>;
|
|
1276
1300
|
/** Returns details about a membership. For an example, see [Get details about a user's or Google Chat app's membership](https://developers.google.com/workspace/chat/get-members). Requires [authentication](https://developers.google.com/workspace/chat/authenticate-authorize). Supports [app authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) and [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). */
|
|
1277
1301
|
get(request?: {
|
|
@@ -1299,6 +1323,8 @@ declare namespace gapi.client {
|
|
|
1299
1323
|
upload_protocol?: string;
|
|
1300
1324
|
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
1301
1325
|
uploadType?: string;
|
|
1326
|
+
/** [Developer Preview](https://developers.google.com/workspace/preview). 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 the `chat.admin.memberships` or `chat.admin.memberships.readonly` [OAuth 2.0 scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). Getting app memberships in a space isn't supported when using admin access. */
|
|
1327
|
+
useAdminAccess?: boolean;
|
|
1302
1328
|
}): Request<Membership>;
|
|
1303
1329
|
/** Lists memberships in a space. For an example, see [List users and Google Chat apps in a space](https://developers.google.com/workspace/chat/list-members). Listing memberships with [app authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) lists memberships in spaces that the Chat app has access to, but excludes Chat app memberships, including its own. Listing memberships with [User authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) lists memberships in spaces that the authenticated user has access to. Requires [authentication](https://developers.google.com/workspace/chat/authenticate-authorize). Supports [app authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) and [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). */
|
|
1304
1330
|
list(request?: {
|
|
@@ -1336,6 +1362,8 @@ declare namespace gapi.client {
|
|
|
1336
1362
|
upload_protocol?: string;
|
|
1337
1363
|
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
1338
1364
|
uploadType?: string;
|
|
1365
|
+
/** [Developer Preview](https://developers.google.com/workspace/preview). 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.memberships.readonly` or `chat.admin.memberships` [OAuth 2.0 scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). Listing app memberships in a space isn't supported when using admin access. */
|
|
1366
|
+
useAdminAccess?: boolean;
|
|
1339
1367
|
}): Request<ListMembershipsResponse>;
|
|
1340
1368
|
/** Updates a membership. For an example, see [Update a user's membership in a space](https://developers.google.com/workspace/chat/update-members). Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). */
|
|
1341
1369
|
patch(request: {
|
|
@@ -1365,6 +1393,8 @@ declare namespace gapi.client {
|
|
|
1365
1393
|
upload_protocol?: string;
|
|
1366
1394
|
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
1367
1395
|
uploadType?: string;
|
|
1396
|
+
/** [Developer Preview](https://developers.google.com/workspace/preview). 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 the `chat.admin.memberships` [OAuth 2.0 scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). */
|
|
1397
|
+
useAdminAccess?: boolean;
|
|
1368
1398
|
/** Request body */
|
|
1369
1399
|
resource: Membership;
|
|
1370
1400
|
}): Request<Membership>;
|
|
@@ -1396,6 +1426,8 @@ declare namespace gapi.client {
|
|
|
1396
1426
|
upload_protocol?: string;
|
|
1397
1427
|
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
1398
1428
|
uploadType?: string;
|
|
1429
|
+
/** [Developer Preview](https://developers.google.com/workspace/preview). 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 the `chat.admin.memberships` [OAuth 2.0 scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). */
|
|
1430
|
+
useAdminAccess?: boolean;
|
|
1399
1431
|
},
|
|
1400
1432
|
body: Membership
|
|
1401
1433
|
): Request<Membership>;
|
|
@@ -1680,7 +1712,7 @@ declare namespace gapi.client {
|
|
|
1680
1712
|
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
1681
1713
|
uploadType?: string;
|
|
1682
1714
|
}): Request<Message>;
|
|
1683
|
-
/** Lists messages in a space that the caller is a member of, including messages from blocked members and spaces. For an example, see [List messages](/chat/api/guides/v1/messages/list). Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). */
|
|
1715
|
+
/** Lists messages in a space that the caller is a member of, including messages from blocked members and spaces. 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). Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). */
|
|
1684
1716
|
list(request?: {
|
|
1685
1717
|
/** V1 error format. */
|
|
1686
1718
|
'$.xgafv'?: string;
|
|
@@ -2057,6 +2089,8 @@ declare namespace gapi.client {
|
|
|
2057
2089
|
upload_protocol?: string;
|
|
2058
2090
|
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
2059
2091
|
uploadType?: string;
|
|
2092
|
+
/** [Developer Preview](https://developers.google.com/workspace/preview). 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 the `chat.admin.delete` [OAuth 2.0 scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). */
|
|
2093
|
+
useAdminAccess?: boolean;
|
|
2060
2094
|
}): Request<{}>;
|
|
2061
2095
|
/** Returns the existing direct message with the specified user. If no direct message space is found, returns a `404 NOT_FOUND` error. For an example, see [Find a direct message](/chat/api/guides/v1/spaces/find-direct-message). With [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), returns the direct message space between the specified user and the authenticated user. With [app authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app), returns the direct message space between the specified user and the calling Chat app. Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) or [app authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app). */
|
|
2062
2096
|
findDirectMessage(request?: {
|
|
@@ -2111,6 +2145,8 @@ declare namespace gapi.client {
|
|
|
2111
2145
|
upload_protocol?: string;
|
|
2112
2146
|
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
2113
2147
|
uploadType?: string;
|
|
2148
|
+
/** [Developer Preview](https://developers.google.com/workspace/preview). 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 the `chat.admin.spaces` or `chat.admin.spaces.readonly` [OAuth 2.0 scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). */
|
|
2149
|
+
useAdminAccess?: boolean;
|
|
2114
2150
|
}): Request<Space>;
|
|
2115
2151
|
/** Lists spaces the caller is a member of. Group chats and DMs aren't listed until the first message is sent. For an example, see [List spaces](https://developers.google.com/workspace/chat/list-spaces). Requires [authentication](https://developers.google.com/workspace/chat/authenticate-authorize). Supports [app authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) and [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). Lists spaces visible to the caller or authenticated user. Group chats and DMs aren't listed until the first message is sent. To list all named spaces by Google Workspace organization, use the [`spaces.search()`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/search) method using Workspace administrator privileges instead. */
|
|
2116
2152
|
list(request?: {
|
|
@@ -2171,6 +2207,8 @@ declare namespace gapi.client {
|
|
|
2171
2207
|
upload_protocol?: string;
|
|
2172
2208
|
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
2173
2209
|
uploadType?: string;
|
|
2210
|
+
/** [Developer Preview](https://developers.google.com/workspace/preview). 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 the `chat.admin.spaces` [OAuth 2.0 scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). Some `FieldMask` values are not supported using admin access. For details, see the description of `update_mask`. */
|
|
2211
|
+
useAdminAccess?: boolean;
|
|
2174
2212
|
/** Request body */
|
|
2175
2213
|
resource: Space;
|
|
2176
2214
|
}): Request<Space>;
|
|
@@ -2202,9 +2240,46 @@ declare namespace gapi.client {
|
|
|
2202
2240
|
upload_protocol?: string;
|
|
2203
2241
|
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
2204
2242
|
uploadType?: string;
|
|
2243
|
+
/** [Developer Preview](https://developers.google.com/workspace/preview). 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 the `chat.admin.spaces` [OAuth 2.0 scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). Some `FieldMask` values are not supported using admin access. For details, see the description of `update_mask`. */
|
|
2244
|
+
useAdminAccess?: boolean;
|
|
2205
2245
|
},
|
|
2206
2246
|
body: Space
|
|
2207
2247
|
): Request<Space>;
|
|
2248
|
+
/** [Developer Preview](https://developers.google.com/workspace/preview). Returns a list of spaces based on a user's search. Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). The user must be an administrator for the Google Workspace organization. In the request, set `use_admin_access` to `true`. */
|
|
2249
|
+
search(request?: {
|
|
2250
|
+
/** V1 error format. */
|
|
2251
|
+
'$.xgafv'?: string;
|
|
2252
|
+
/** OAuth access token. */
|
|
2253
|
+
access_token?: string;
|
|
2254
|
+
/** Data format for response. */
|
|
2255
|
+
alt?: string;
|
|
2256
|
+
/** JSONP */
|
|
2257
|
+
callback?: string;
|
|
2258
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
2259
|
+
fields?: string;
|
|
2260
|
+
/** 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. */
|
|
2261
|
+
key?: string;
|
|
2262
|
+
/** OAuth 2.0 token for the current user. */
|
|
2263
|
+
oauth_token?: string;
|
|
2264
|
+
/** 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. Valid ordering operation values are: - `ASC` for ascending. Default value. - `DESC` for descending. The supported syntax are: - `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` */
|
|
2265
|
+
orderBy?: string;
|
|
2266
|
+
/** 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. */
|
|
2267
|
+
pageSize?: number;
|
|
2268
|
+
/** 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. */
|
|
2269
|
+
pageToken?: string;
|
|
2270
|
+
/** Returns response with indentations and line breaks. */
|
|
2271
|
+
prettyPrint?: boolean;
|
|
2272
|
+
/** 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") ``` */
|
|
2273
|
+
query?: string;
|
|
2274
|
+
/** 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. */
|
|
2275
|
+
quotaUser?: string;
|
|
2276
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
2277
|
+
upload_protocol?: string;
|
|
2278
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
2279
|
+
uploadType?: string;
|
|
2280
|
+
/** 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). This method currently only supports admin access, thus only `true` is accepted for this field. */
|
|
2281
|
+
useAdminAccess?: boolean;
|
|
2282
|
+
}): Request<SearchSpacesResponse>;
|
|
2208
2283
|
/** 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). */
|
|
2209
2284
|
setup(request: {
|
|
2210
2285
|
/** V1 error format. */
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -177,6 +177,11 @@ Updates a space. For an example, see [Update a space](https://developers.google.
|
|
|
177
177
|
*/
|
|
178
178
|
await gapi.client.chat.spaces.patch({name: 'name'});
|
|
179
179
|
|
|
180
|
+
/*
|
|
181
|
+
[Developer Preview](https://developers.google.com/workspace/preview). Returns a list of spaces based on a user's search. Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). The user must be an administrator for the Google Workspace organization. In the request, set `use_admin_access` to `true`.
|
|
182
|
+
*/
|
|
183
|
+
await gapi.client.chat.spaces.search({});
|
|
184
|
+
|
|
180
185
|
/*
|
|
181
186
|
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).
|
|
182
187
|
*/
|