Skip to content

Commit

Permalink
feat(chat): update the api
Browse files Browse the repository at this point in the history
#### chat:v1

The following keys were deleted:
- schemas.Membership.properties.createTime.readOnly (Total Keys: 1)

The following keys were added:
- resources.spaces.resources.members.methods.list.parameters.showGroups (Total Keys: 2)
- schemas.Group (Total Keys: 3)
- schemas.Membership.properties.groupMember.$ref (Total Keys: 1)
  • Loading branch information
yoshi-automation committed Dec 7, 2023
1 parent c21fe23 commit 00f336d
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 11 deletions.
5 changes: 4 additions & 1 deletion docs/dyn/chat_v1.spaces.html
Expand Up @@ -368,7 +368,10 @@ <h3>Method Details</h3>
{
&quot;memberships&quot;: [ # Optional. The Google Chat users to invite to join the space. Omit the calling user, as they are added automatically. The set currently allows up to 20 memberships (in addition to the caller). The `Membership.member` field must contain a `user` with `name` populated (format: `users/{user}`) and `type` set to `User.Type.HUMAN`. You can only add human users when setting up a space (adding Chat apps is only supported for direct message setup with the calling app). You can also add members using the user&#x27;s email as an alias for {user}. For example, the `user.name` can be `users/example@gmail.com`.&quot; To invite Gmail users or users from external Google Workspace domains, user&#x27;s email must be used for `{user}`. Optional when setting `Space.spaceType` to `SPACE`. Required when setting `Space.spaceType` to `GROUP_CHAT`, along with at least two memberships. Required when setting `Space.spaceType` to `DIRECT_MESSAGE` with a human user, along with exactly one membership. Must be empty when creating a 1:1 conversation between a human and the calling Chat app (when setting `Space.spaceType` to `DIRECT_MESSAGE` and `Space.singleUserBotDm` to `true`).
{ # Represents a membership relation in Google Chat, such as whether a user or Chat app is invited to, part of, or absent from a space.
&quot;createTime&quot;: &quot;A String&quot;, # Output only. The creation time of the membership, such as when a member joined or was invited to join a space.
&quot;createTime&quot;: &quot;A String&quot;, # Optional. Immutable. The creation time of the membership, such as when a member joined or was invited to join a space. [Developer Preview](https://developers.google.com/workspace/preview): This field is output only, except when used to import historical memberships in import mode spaces.
&quot;groupMember&quot;: { # A Google Group in Google Chat. # The Google Group the membership corresponds to. Only supports read operations. Other operations, like creating or updating a membership, aren&#x27;t currently supported.
&quot;name&quot;: &quot;A String&quot;, # 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}
},
&quot;member&quot;: { # A user in Google Chat. When returned as an output from a request, if your Chat app [authenticates as a user](https://developers.google.com/chat/api/guides/auth/users), the output for a `User` resource only populates the user&#x27;s `name` and `type`. # The Google Chat user or app the membership corresponds to. If your Chat app [authenticates as a user](https://developers.google.com/chat/api/guides/auth/users), the output populates the [user](https://developers.google.com/chat/api/reference/rest/v1/User) `name` and `type`.
&quot;displayName&quot;: &quot;A String&quot;, # Output only. The user&#x27;s display name.
&quot;domainId&quot;: &quot;A String&quot;, # Unique identifier of the user&#x27;s Google Workspace domain.
Expand Down
30 changes: 23 additions & 7 deletions docs/dyn/chat_v1.spaces.members.html
Expand Up @@ -87,7 +87,7 @@ <h2>Instance Methods</h2>
<code><a href="#get">get(name, x__xgafv=None)</a></code></p>
<p class="firstline">Returns details about a membership. For an example, see [Get a membership](https://developers.google.com/chat/api/guides/v1/members/get). Requires [authentication](https://developers.google.com/chat/api/guides/auth). Supports [app authentication](https://developers.google.com/chat/api/guides/auth/service-accounts) and [user authentication](https://developers.google.com/chat/api/guides/auth/users).</p>
<p class="toc_element">
<code><a href="#list">list(parent, filter=None, pageSize=None, pageToken=None, showInvited=None, x__xgafv=None)</a></code></p>
<code><a href="#list">list(parent, filter=None, pageSize=None, pageToken=None, showGroups=None, showInvited=None, x__xgafv=None)</a></code></p>
<p class="firstline">Lists memberships in a space. For an example, see [List memberships](https://developers.google.com/chat/api/guides/v1/members/list). Listing memberships with [app authentication](https://developers.google.com/chat/api/guides/auth/service-accounts) 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/chat/api/guides/auth/users) lists memberships in spaces that the authenticated user has access to. Requires [authentication](https://developers.google.com/chat/api/guides/auth). Supports [app authentication](https://developers.google.com/chat/api/guides/auth/service-accounts) and [user authentication](https://developers.google.com/chat/api/guides/auth/users).</p>
<p class="toc_element">
<code><a href="#list_next">list_next()</a></code></p>
Expand All @@ -108,7 +108,10 @@ <h3>Method Details</h3>
The object takes the form of:

{ # Represents a membership relation in Google Chat, such as whether a user or Chat app is invited to, part of, or absent from a space.
&quot;createTime&quot;: &quot;A String&quot;, # Output only. The creation time of the membership, such as when a member joined or was invited to join a space.
&quot;createTime&quot;: &quot;A String&quot;, # Optional. Immutable. The creation time of the membership, such as when a member joined or was invited to join a space. [Developer Preview](https://developers.google.com/workspace/preview): This field is output only, except when used to import historical memberships in import mode spaces.
&quot;groupMember&quot;: { # A Google Group in Google Chat. # The Google Group the membership corresponds to. Only supports read operations. Other operations, like creating or updating a membership, aren&#x27;t currently supported.
&quot;name&quot;: &quot;A String&quot;, # 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}
},
&quot;member&quot;: { # A user in Google Chat. When returned as an output from a request, if your Chat app [authenticates as a user](https://developers.google.com/chat/api/guides/auth/users), the output for a `User` resource only populates the user&#x27;s `name` and `type`. # The Google Chat user or app the membership corresponds to. If your Chat app [authenticates as a user](https://developers.google.com/chat/api/guides/auth/users), the output populates the [user](https://developers.google.com/chat/api/reference/rest/v1/User) `name` and `type`.
&quot;displayName&quot;: &quot;A String&quot;, # Output only. The user&#x27;s display name.
&quot;domainId&quot;: &quot;A String&quot;, # Unique identifier of the user&#x27;s Google Workspace domain.
Expand All @@ -130,7 +133,10 @@ <h3>Method Details</h3>
An object of the form:

{ # Represents a membership relation in Google Chat, such as whether a user or Chat app is invited to, part of, or absent from a space.
&quot;createTime&quot;: &quot;A String&quot;, # Output only. The creation time of the membership, such as when a member joined or was invited to join a space.
&quot;createTime&quot;: &quot;A String&quot;, # Optional. Immutable. The creation time of the membership, such as when a member joined or was invited to join a space. [Developer Preview](https://developers.google.com/workspace/preview): This field is output only, except when used to import historical memberships in import mode spaces.
&quot;groupMember&quot;: { # A Google Group in Google Chat. # The Google Group the membership corresponds to. Only supports read operations. Other operations, like creating or updating a membership, aren&#x27;t currently supported.
&quot;name&quot;: &quot;A String&quot;, # 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}
},
&quot;member&quot;: { # A user in Google Chat. When returned as an output from a request, if your Chat app [authenticates as a user](https://developers.google.com/chat/api/guides/auth/users), the output for a `User` resource only populates the user&#x27;s `name` and `type`. # The Google Chat user or app the membership corresponds to. If your Chat app [authenticates as a user](https://developers.google.com/chat/api/guides/auth/users), the output populates the [user](https://developers.google.com/chat/api/reference/rest/v1/User) `name` and `type`.
&quot;displayName&quot;: &quot;A String&quot;, # Output only. The user&#x27;s display name.
&quot;domainId&quot;: &quot;A String&quot;, # Unique identifier of the user&#x27;s Google Workspace domain.
Expand Down Expand Up @@ -159,7 +165,10 @@ <h3>Method Details</h3>
An object of the form:

{ # Represents a membership relation in Google Chat, such as whether a user or Chat app is invited to, part of, or absent from a space.
&quot;createTime&quot;: &quot;A String&quot;, # Output only. The creation time of the membership, such as when a member joined or was invited to join a space.
&quot;createTime&quot;: &quot;A String&quot;, # Optional. Immutable. The creation time of the membership, such as when a member joined or was invited to join a space. [Developer Preview](https://developers.google.com/workspace/preview): This field is output only, except when used to import historical memberships in import mode spaces.
&quot;groupMember&quot;: { # A Google Group in Google Chat. # The Google Group the membership corresponds to. Only supports read operations. Other operations, like creating or updating a membership, aren&#x27;t currently supported.
&quot;name&quot;: &quot;A String&quot;, # 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}
},
&quot;member&quot;: { # A user in Google Chat. When returned as an output from a request, if your Chat app [authenticates as a user](https://developers.google.com/chat/api/guides/auth/users), the output for a `User` resource only populates the user&#x27;s `name` and `type`. # The Google Chat user or app the membership corresponds to. If your Chat app [authenticates as a user](https://developers.google.com/chat/api/guides/auth/users), the output populates the [user](https://developers.google.com/chat/api/reference/rest/v1/User) `name` and `type`.
&quot;displayName&quot;: &quot;A String&quot;, # Output only. The user&#x27;s display name.
&quot;domainId&quot;: &quot;A String&quot;, # Unique identifier of the user&#x27;s Google Workspace domain.
Expand Down Expand Up @@ -188,7 +197,10 @@ <h3>Method Details</h3>
An object of the form:

{ # Represents a membership relation in Google Chat, such as whether a user or Chat app is invited to, part of, or absent from a space.
&quot;createTime&quot;: &quot;A String&quot;, # Output only. The creation time of the membership, such as when a member joined or was invited to join a space.
&quot;createTime&quot;: &quot;A String&quot;, # Optional. Immutable. The creation time of the membership, such as when a member joined or was invited to join a space. [Developer Preview](https://developers.google.com/workspace/preview): This field is output only, except when used to import historical memberships in import mode spaces.
&quot;groupMember&quot;: { # A Google Group in Google Chat. # The Google Group the membership corresponds to. Only supports read operations. Other operations, like creating or updating a membership, aren&#x27;t currently supported.
&quot;name&quot;: &quot;A String&quot;, # 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}
},
&quot;member&quot;: { # A user in Google Chat. When returned as an output from a request, if your Chat app [authenticates as a user](https://developers.google.com/chat/api/guides/auth/users), the output for a `User` resource only populates the user&#x27;s `name` and `type`. # The Google Chat user or app the membership corresponds to. If your Chat app [authenticates as a user](https://developers.google.com/chat/api/guides/auth/users), the output populates the [user](https://developers.google.com/chat/api/reference/rest/v1/User) `name` and `type`.
&quot;displayName&quot;: &quot;A String&quot;, # Output only. The user&#x27;s display name.
&quot;domainId&quot;: &quot;A String&quot;, # Unique identifier of the user&#x27;s Google Workspace domain.
Expand All @@ -203,14 +215,15 @@ <h3>Method Details</h3>
</div>

<div class="method">
<code class="details" id="list">list(parent, filter=None, pageSize=None, pageToken=None, showInvited=None, x__xgafv=None)</code>
<code class="details" id="list">list(parent, filter=None, pageSize=None, pageToken=None, showGroups=None, showInvited=None, x__xgafv=None)</code>
<pre>Lists memberships in a space. For an example, see [List memberships](https://developers.google.com/chat/api/guides/v1/members/list). Listing memberships with [app authentication](https://developers.google.com/chat/api/guides/auth/service-accounts) 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/chat/api/guides/auth/users) lists memberships in spaces that the authenticated user has access to. Requires [authentication](https://developers.google.com/chat/api/guides/auth). Supports [app authentication](https://developers.google.com/chat/api/guides/auth/service-accounts) and [user authentication](https://developers.google.com/chat/api/guides/auth/users).

Args:
parent: string, Required. The resource name of the space for which to fetch a membership list. Format: spaces/{space} (required)
filter: string, Optional. A query filter. You can filter memberships by a member&#x27;s role ([`role`](https://developers.google.com/chat/api/reference/rest/v1/spaces.members#membershiprole)) and type ([`member.type`](https://developers.google.com/chat/api/reference/rest/v1/User#type)). To filter by role, set `role` to `ROLE_MEMBER` or `ROLE_MANAGER`. To filter by type, set `member.type` to `HUMAN` or `BOT`. To filter by both role and type, use the `AND` operator. To filter by either role or type, use the `OR` operator. For example, the following queries are valid: ``` role = &quot;ROLE_MANAGER&quot; OR role = &quot;ROLE_MEMBER&quot; member.type = &quot;HUMAN&quot; AND role = &quot;ROLE_MANAGER&quot; ``` The following queries are invalid: ``` member.type = &quot;HUMAN&quot; AND member.type = &quot;BOT&quot; role = &quot;ROLE_MANAGER&quot; AND role = &quot;ROLE_MEMBER&quot; ``` Invalid queries are rejected by the server with an `INVALID_ARGUMENT` error.
pageSize: integer, Optional. The maximum number of memberships to return. The service might return fewer than this value. If unspecified, at most 100 memberships are returned. The maximum value is 1,000. If you use a value more than 1,000, it&#x27;s automatically changed to 1,000. Negative values return an `INVALID_ARGUMENT` error.
pageToken: string, Optional. A page token, received from a previous call to list memberships. 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.
showGroups: boolean, Optional. When `true`, also returns memberships associated with a Google Group, in addition to other types of memberships. If a filter is set, Google Group memberships that don&#x27;t match the filter criteria aren&#x27;t returned.
showInvited: boolean, Optional. When `true`, also returns memberships associated with invited members, in addition to other types of memberships. If a filter is set, invited memberships that don&#x27;t match the filter criteria aren&#x27;t returned. Currently requires [user authentication](https://developers.google.com/chat/api/guides/auth/users).
x__xgafv: string, V1 error format.
Allowed values
Expand All @@ -223,7 +236,10 @@ <h3>Method Details</h3>
{
&quot;memberships&quot;: [ # Unordered list. List of memberships in the requested (or first) page.
{ # Represents a membership relation in Google Chat, such as whether a user or Chat app is invited to, part of, or absent from a space.
&quot;createTime&quot;: &quot;A String&quot;, # Output only. The creation time of the membership, such as when a member joined or was invited to join a space.
&quot;createTime&quot;: &quot;A String&quot;, # Optional. Immutable. The creation time of the membership, such as when a member joined or was invited to join a space. [Developer Preview](https://developers.google.com/workspace/preview): This field is output only, except when used to import historical memberships in import mode spaces.
&quot;groupMember&quot;: { # A Google Group in Google Chat. # The Google Group the membership corresponds to. Only supports read operations. Other operations, like creating or updating a membership, aren&#x27;t currently supported.
&quot;name&quot;: &quot;A String&quot;, # 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}
},
&quot;member&quot;: { # A user in Google Chat. When returned as an output from a request, if your Chat app [authenticates as a user](https://developers.google.com/chat/api/guides/auth/users), the output for a `User` resource only populates the user&#x27;s `name` and `type`. # The Google Chat user or app the membership corresponds to. If your Chat app [authenticates as a user](https://developers.google.com/chat/api/guides/auth/users), the output populates the [user](https://developers.google.com/chat/api/reference/rest/v1/User) `name` and `type`.
&quot;displayName&quot;: &quot;A String&quot;, # Output only. The user&#x27;s display name.
&quot;domainId&quot;: &quot;A String&quot;, # Unique identifier of the user&#x27;s Google Workspace domain.
Expand Down

0 comments on commit 00f336d

Please sign in to comment.