Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "0.2.7" # {x-release-please-version}
__version__ = "0.0.0" # {x-release-please-version}
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "0.2.7" # {x-release-please-version}
__version__ = "0.0.0" # {x-release-please-version}

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ class ChatServiceTransport(abc.ABC):
"https://www.googleapis.com/auth/chat.admin.memberships.readonly",
"https://www.googleapis.com/auth/chat.admin.spaces",
"https://www.googleapis.com/auth/chat.admin.spaces.readonly",
"https://www.googleapis.com/auth/chat.app.delete",
"https://www.googleapis.com/auth/chat.app.memberships",
"https://www.googleapis.com/auth/chat.app.spaces",
"https://www.googleapis.com/auth/chat.app.spaces.create",
"https://www.googleapis.com/auth/chat.bot",
"https://www.googleapis.com/auth/chat.customemojis",
"https://www.googleapis.com/auth/chat.customemojis.readonly",
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -37,30 +37,35 @@ class DeletionMetadata(proto.Message):
"""

class DeletionType(proto.Enum):
r"""Who deleted the message and how it was deleted. More values
may be added in the future.
r"""Who deleted the message and how it was deleted. More values may be
added in the future. See `Edit or delete a message in Google
Chat <https://support.google.com/chat/answer/7653281>`__ for details
on when messages can be deleted.

Values:
DELETION_TYPE_UNSPECIFIED (0):
This value is unused.
CREATOR (1):
User deleted their own message.
SPACE_OWNER (2):
The space owner deleted the message.
A space manager deleted the message.
ADMIN (3):
A Google Workspace admin deleted the message.
A Google Workspace administrator deleted the
message. Administrators can delete any message
in the space, including messages sent by any
space member or Chat app.
APP_MESSAGE_EXPIRY (4):
A Chat app deleted its own message when it
expired.
CREATOR_VIA_APP (5):
A Chat app deleted the message on behalf of
the user.
the creator (using user authentication).
SPACE_OWNER_VIA_APP (6):
A Chat app deleted the message on behalf of
the space owner.
A Chat app deleted the message on behalf of a
space manager (using user authentication).
SPACE_MEMBER (7):
A member of the space deleted the message.
Human users can delete messages sent by apps.
Users can delete messages sent by apps.
"""
DELETION_TYPE_UNSPECIFIED = 0
CREATOR = 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,9 +210,7 @@ class CreateMembershipRequest(proto.Message):
- When `authenticating as an
app <https://developers.google.com/workspace/chat/authenticate-authorize-chat-app>`__,
the ``chat.app.memberships`` authorization scope is
required. Authenticating as an app is available in
`Developer
Preview <https://developers.google.com/workspace/preview>`__.
required.

- Set ``user.type`` to ``HUMAN``, and set ``user.name``
with format ``users/{user}``, where ``{user}`` can be the
Expand Down Expand Up @@ -527,9 +525,12 @@ class DeleteMembershipRequest(proto.Message):
apps can't delete other apps' memberships.

When deleting a human membership, requires the
``chat.memberships`` scope and
``spaces/{space}/members/{member}`` format. You can use the
email as an alias for ``{member}``. For example,
``chat.memberships`` scope with `user
authentication <https://developers.google.com/workspace/chat/authenticate-authorize-chat-user>`__
or the ``chat.memberships.app`` scope with `app
authentication <https://developers.google.com/workspace/chat/authenticate-authorize-chat-app>`__
and the ``spaces/{space}/members/{member}`` format. You can
use the email as an alias for ``{member}``. For example,
``spaces/{space}/members/[email protected]`` where
``[email protected]`` is the email of the Google Chat user.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@


class SlashCommand(proto.Message):
r"""A `slash
r"""Metadata about a `slash
command <https://developers.google.com/workspace/chat/commands>`__
in Google Chat.

Attributes:
command_id (int):
The ID of the slash command invoked.
The ID of the slash command.
"""

command_id: int = proto.Field(
Expand Down
57 changes: 50 additions & 7 deletions packages/google-apps-chat/google/apps/chat_v1/types/space.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,22 @@ class Space(proto.Message):
setting <https://support.google.com/chat/answer/11971020>`__
of the space. Only populated when the ``space_type`` is
``SPACE``.
customer (str):
Optional. Immutable. The customer id of the domain of the
space. Required only when creating a space with `app
authentication <https://developers.google.com/workspace/chat/authenticate-authorize-chat-app>`__
and ``SpaceType`` is ``SPACE``, otherwise should not be set.

In the format ``customers/{customer}``, where ``customer``
is the ``id`` from the `Admin SDK customer
resource <https://developers.google.com/admin-sdk/directory/reference/rest/v1/customers>`__.
Private apps can also use the ``customers/my_customer``
alias to create the space in the same Google Workspace
organization as the app.

For DMs, this field isn't populated.

This field is a member of `oneof`_ ``_customer``.
space_uri (str):
Output only. The URI for a user to access the
space.
Expand All @@ -162,13 +178,36 @@ class Space(proto.Message):
collaboration space is created. After you create the space,
settings are populated in the ``PermissionSettings`` field.

Setting predefined permission settings supports:

- `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 ``chat.app.spaces`` or
``chat.app.spaces.create`` scopes.

- `User
authentication <https://developers.google.com/workspace/chat/authenticate-authorize-chat-user>`__

This field is a member of `oneof`_ ``space_permission_settings``.
permission_settings (google.apps.chat_v1.types.Space.PermissionSettings):
Optional. Space permission settings for
existing spaces. Input for updating exact space
permission settings, where existing permission
settings are replaced. Output lists current
permission settings.
Optional. Space permission settings for existing spaces.
Input for updating exact space permission settings, where
existing permission settings are replaced. Output lists
current permission settings.

Reading and updating permission settings supports:

- `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 ``chat.app.spaces`` scope. Only populated and
settable when the Chat app created the space.

- `User
authentication <https://developers.google.com/workspace/chat/authenticate-authorize-chat-user>`__

This field is a member of `oneof`_ ``space_permission_settings``.
import_mode_expire_time (google.protobuf.timestamp_pb2.Timestamp):
Expand Down Expand Up @@ -348,8 +387,7 @@ class AccessSettings(proto.Message):
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 ``chat.app.spaces`` scope in `Developer
Preview <https://developers.google.com/workspace/preview>`__.
with the ``chat.app.spaces`` scope.

This field is not populated when using the ``chat.bot``
scope with `app
Expand Down Expand Up @@ -592,6 +630,11 @@ class PermissionSetting(proto.Message):
number=23,
message=AccessSettings,
)
customer: str = proto.Field(
proto.STRING,
number=24,
optional=True,
)
space_uri: str = proto.Field(
proto.STRING,
number=25,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class SetUpSpaceRequest(proto.Message):
the space. Omit the calling user, as they are added
automatically.

The set currently allows up to 20 memberships (in addition
The set currently allows up to 49 memberships (in addition
to the caller).

For human membership, the ``Membership.member`` field must
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"language": "PYTHON",
"name": "google-apps-chat",
"version": "0.2.7"
"version": "0.1.0"
},
"snippets": [
{
Expand Down
Loading
Loading