mirror of
https://github.com/mattermost/mattermost.git
synced 2026-02-03 20:40:00 -05:00
Go side: - Log hooks returned by Implemented() - Log each hook name -> ID mapping - Log OnActivate implementation status - Log OnActivate call flow Python side: - Log Implemented() return value - Log OnActivate gRPC receipt and handler invocation This is temporary debug logging to diagnose why OnActivate isn't being called for Python plugins. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
247 lines
13 KiB
Python
247 lines
13 KiB
Python
"""
|
|
@generated by mypy-protobuf. Do not edit manually!
|
|
isort:skip_file
|
|
Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
See LICENSE.txt for license information.
|
|
"""
|
|
|
|
from google.protobuf import descriptor as _descriptor
|
|
from google.protobuf import message as _message
|
|
from google.protobuf import struct_pb2 as _struct_pb2
|
|
from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper
|
|
import builtins as _builtins
|
|
import sys
|
|
import typing as _typing
|
|
|
|
if sys.version_info >= (3, 10):
|
|
from typing import TypeAlias as _TypeAlias
|
|
else:
|
|
from typing_extensions import TypeAlias as _TypeAlias
|
|
|
|
DESCRIPTOR: _descriptor.FileDescriptor
|
|
|
|
class _ChannelType:
|
|
ValueType = _typing.NewType("ValueType", _builtins.int)
|
|
V: _TypeAlias = ValueType # noqa: Y015
|
|
|
|
class _ChannelTypeEnumTypeWrapper(_enum_type_wrapper._EnumTypeWrapper[_ChannelType.ValueType], _builtins.type):
|
|
DESCRIPTOR: _descriptor.EnumDescriptor
|
|
CHANNEL_TYPE_UNSPECIFIED: _ChannelType.ValueType # 0
|
|
"""Unspecified channel type (should not be used)"""
|
|
CHANNEL_TYPE_OPEN: _ChannelType.ValueType # 1
|
|
"""Open/public channel (anyone can join)"""
|
|
CHANNEL_TYPE_PRIVATE: _ChannelType.ValueType # 2
|
|
"""Private channel (invitation only)"""
|
|
CHANNEL_TYPE_DIRECT: _ChannelType.ValueType # 3
|
|
"""Direct message between two users"""
|
|
CHANNEL_TYPE_GROUP: _ChannelType.ValueType # 4
|
|
"""Group message between 3-8 users"""
|
|
|
|
class ChannelType(_ChannelType, metaclass=_ChannelTypeEnumTypeWrapper):
|
|
"""ChannelType represents the type of a channel.
|
|
Maps to model.ChannelType in Go.
|
|
"""
|
|
|
|
CHANNEL_TYPE_UNSPECIFIED: ChannelType.ValueType # 0
|
|
"""Unspecified channel type (should not be used)"""
|
|
CHANNEL_TYPE_OPEN: ChannelType.ValueType # 1
|
|
"""Open/public channel (anyone can join)"""
|
|
CHANNEL_TYPE_PRIVATE: ChannelType.ValueType # 2
|
|
"""Private channel (invitation only)"""
|
|
CHANNEL_TYPE_DIRECT: ChannelType.ValueType # 3
|
|
"""Direct message between two users"""
|
|
CHANNEL_TYPE_GROUP: ChannelType.ValueType # 4
|
|
"""Group message between 3-8 users"""
|
|
Global___ChannelType: _TypeAlias = ChannelType # noqa: Y015
|
|
|
|
@_typing.final
|
|
class ChannelBannerInfo(_message.Message):
|
|
"""ChannelBannerInfo contains information about a channel's banner.
|
|
Maps to model.ChannelBannerInfo in Go.
|
|
"""
|
|
|
|
DESCRIPTOR: _descriptor.Descriptor
|
|
|
|
ENABLED_FIELD_NUMBER: _builtins.int
|
|
TEXT_FIELD_NUMBER: _builtins.int
|
|
BACKGROUND_COLOR_FIELD_NUMBER: _builtins.int
|
|
enabled: _builtins.bool
|
|
"""Whether the banner is enabled"""
|
|
text: _builtins.str
|
|
"""The banner text content"""
|
|
background_color: _builtins.str
|
|
"""The banner background color (hex format, e.g., "#FF0000")"""
|
|
def __init__(
|
|
self,
|
|
*,
|
|
enabled: _builtins.bool | None = ...,
|
|
text: _builtins.str | None = ...,
|
|
background_color: _builtins.str | None = ...,
|
|
) -> None: ...
|
|
_HasFieldArgType: _TypeAlias = _typing.Literal["_background_color", b"_background_color", "_enabled", b"_enabled", "_text", b"_text", "background_color", b"background_color", "enabled", b"enabled", "text", b"text"] # noqa: Y015
|
|
def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
|
|
_ClearFieldArgType: _TypeAlias = _typing.Literal["_background_color", b"_background_color", "_enabled", b"_enabled", "_text", b"_text", "background_color", b"background_color", "enabled", b"enabled", "text", b"text"] # noqa: Y015
|
|
def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
|
|
_WhichOneofReturnType__background_color: _TypeAlias = _typing.Literal["background_color"] # noqa: Y015
|
|
_WhichOneofArgType__background_color: _TypeAlias = _typing.Literal["_background_color", b"_background_color"] # noqa: Y015
|
|
_WhichOneofReturnType__enabled: _TypeAlias = _typing.Literal["enabled"] # noqa: Y015
|
|
_WhichOneofArgType__enabled: _TypeAlias = _typing.Literal["_enabled", b"_enabled"] # noqa: Y015
|
|
_WhichOneofReturnType__text: _TypeAlias = _typing.Literal["text"] # noqa: Y015
|
|
_WhichOneofArgType__text: _TypeAlias = _typing.Literal["_text", b"_text"] # noqa: Y015
|
|
@_typing.overload
|
|
def WhichOneof(self, oneof_group: _WhichOneofArgType__background_color) -> _WhichOneofReturnType__background_color | None: ...
|
|
@_typing.overload
|
|
def WhichOneof(self, oneof_group: _WhichOneofArgType__enabled) -> _WhichOneofReturnType__enabled | None: ...
|
|
@_typing.overload
|
|
def WhichOneof(self, oneof_group: _WhichOneofArgType__text) -> _WhichOneofReturnType__text | None: ...
|
|
|
|
Global___ChannelBannerInfo: _TypeAlias = ChannelBannerInfo # noqa: Y015
|
|
|
|
@_typing.final
|
|
class Channel(_message.Message):
|
|
"""Channel represents a Mattermost channel.
|
|
Maps to model.Channel in Go.
|
|
"""
|
|
|
|
DESCRIPTOR: _descriptor.Descriptor
|
|
|
|
ID_FIELD_NUMBER: _builtins.int
|
|
CREATE_AT_FIELD_NUMBER: _builtins.int
|
|
UPDATE_AT_FIELD_NUMBER: _builtins.int
|
|
DELETE_AT_FIELD_NUMBER: _builtins.int
|
|
TEAM_ID_FIELD_NUMBER: _builtins.int
|
|
TYPE_FIELD_NUMBER: _builtins.int
|
|
DISPLAY_NAME_FIELD_NUMBER: _builtins.int
|
|
NAME_FIELD_NUMBER: _builtins.int
|
|
HEADER_FIELD_NUMBER: _builtins.int
|
|
PURPOSE_FIELD_NUMBER: _builtins.int
|
|
LAST_POST_AT_FIELD_NUMBER: _builtins.int
|
|
TOTAL_MSG_COUNT_FIELD_NUMBER: _builtins.int
|
|
EXTRA_UPDATE_AT_FIELD_NUMBER: _builtins.int
|
|
CREATOR_ID_FIELD_NUMBER: _builtins.int
|
|
SCHEME_ID_FIELD_NUMBER: _builtins.int
|
|
PROPS_FIELD_NUMBER: _builtins.int
|
|
GROUP_CONSTRAINED_FIELD_NUMBER: _builtins.int
|
|
AUTO_TRANSLATION_FIELD_NUMBER: _builtins.int
|
|
SHARED_FIELD_NUMBER: _builtins.int
|
|
TOTAL_MSG_COUNT_ROOT_FIELD_NUMBER: _builtins.int
|
|
POLICY_ID_FIELD_NUMBER: _builtins.int
|
|
LAST_ROOT_POST_AT_FIELD_NUMBER: _builtins.int
|
|
BANNER_INFO_FIELD_NUMBER: _builtins.int
|
|
POLICY_ENFORCED_FIELD_NUMBER: _builtins.int
|
|
POLICY_IS_ACTIVE_FIELD_NUMBER: _builtins.int
|
|
DEFAULT_CATEGORY_NAME_FIELD_NUMBER: _builtins.int
|
|
id: _builtins.str
|
|
"""Unique identifier for the channel (26-char ID)"""
|
|
create_at: _builtins.int
|
|
"""Timestamp when the channel was created (milliseconds since epoch)"""
|
|
update_at: _builtins.int
|
|
"""Timestamp when the channel was last updated (milliseconds since epoch)"""
|
|
delete_at: _builtins.int
|
|
"""Timestamp when the channel was deleted (0 if not deleted, milliseconds since epoch)"""
|
|
team_id: _builtins.str
|
|
"""ID of the team this channel belongs to (empty for DMs/GMs)"""
|
|
type: Global___ChannelType.ValueType
|
|
"""The type of channel"""
|
|
display_name: _builtins.str
|
|
"""The channel's display name"""
|
|
name: _builtins.str
|
|
"""The channel's URL-friendly name (unique within team)"""
|
|
header: _builtins.str
|
|
"""The channel header text (appears at top of channel)"""
|
|
purpose: _builtins.str
|
|
"""The channel's purpose description"""
|
|
last_post_at: _builtins.int
|
|
"""Timestamp of the last post in this channel (milliseconds since epoch)"""
|
|
total_msg_count: _builtins.int
|
|
"""Total number of messages in the channel"""
|
|
extra_update_at: _builtins.int
|
|
"""Timestamp for extra data updates (milliseconds since epoch)"""
|
|
creator_id: _builtins.str
|
|
"""ID of the user who created the channel"""
|
|
scheme_id: _builtins.str
|
|
"""ID of the permission scheme applied to this channel"""
|
|
group_constrained: _builtins.bool
|
|
"""Whether the channel membership is constrained by group sync"""
|
|
auto_translation: _builtins.bool
|
|
"""Whether auto-translation is enabled for this channel"""
|
|
shared: _builtins.bool
|
|
"""Whether this channel is shared with other servers"""
|
|
total_msg_count_root: _builtins.int
|
|
"""Total number of root messages (excluding replies)"""
|
|
policy_id: _builtins.str
|
|
"""ID of the data retention policy applied to this channel"""
|
|
last_root_post_at: _builtins.int
|
|
"""Timestamp of the last root post (milliseconds since epoch)"""
|
|
policy_enforced: _builtins.bool
|
|
"""Whether a data retention policy is enforced on this channel"""
|
|
policy_is_active: _builtins.bool
|
|
"""Whether the data retention policy is currently active"""
|
|
default_category_name: _builtins.str
|
|
"""Default sidebar category name for this channel"""
|
|
@_builtins.property
|
|
def props(self) -> _struct_pb2.Struct:
|
|
"""Channel-specific properties (arbitrary JSON data)
|
|
Maps to map[string]any in Go
|
|
"""
|
|
|
|
@_builtins.property
|
|
def banner_info(self) -> Global___ChannelBannerInfo:
|
|
"""Banner information for the channel"""
|
|
|
|
def __init__(
|
|
self,
|
|
*,
|
|
id: _builtins.str = ...,
|
|
create_at: _builtins.int = ...,
|
|
update_at: _builtins.int = ...,
|
|
delete_at: _builtins.int = ...,
|
|
team_id: _builtins.str = ...,
|
|
type: Global___ChannelType.ValueType = ...,
|
|
display_name: _builtins.str = ...,
|
|
name: _builtins.str = ...,
|
|
header: _builtins.str = ...,
|
|
purpose: _builtins.str = ...,
|
|
last_post_at: _builtins.int = ...,
|
|
total_msg_count: _builtins.int = ...,
|
|
extra_update_at: _builtins.int = ...,
|
|
creator_id: _builtins.str = ...,
|
|
scheme_id: _builtins.str | None = ...,
|
|
props: _struct_pb2.Struct | None = ...,
|
|
group_constrained: _builtins.bool | None = ...,
|
|
auto_translation: _builtins.bool = ...,
|
|
shared: _builtins.bool | None = ...,
|
|
total_msg_count_root: _builtins.int = ...,
|
|
policy_id: _builtins.str | None = ...,
|
|
last_root_post_at: _builtins.int = ...,
|
|
banner_info: Global___ChannelBannerInfo | None = ...,
|
|
policy_enforced: _builtins.bool = ...,
|
|
policy_is_active: _builtins.bool = ...,
|
|
default_category_name: _builtins.str = ...,
|
|
) -> None: ...
|
|
_HasFieldArgType: _TypeAlias = _typing.Literal["_banner_info", b"_banner_info", "_group_constrained", b"_group_constrained", "_policy_id", b"_policy_id", "_scheme_id", b"_scheme_id", "_shared", b"_shared", "banner_info", b"banner_info", "group_constrained", b"group_constrained", "policy_id", b"policy_id", "props", b"props", "scheme_id", b"scheme_id", "shared", b"shared"] # noqa: Y015
|
|
def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
|
|
_ClearFieldArgType: _TypeAlias = _typing.Literal["_banner_info", b"_banner_info", "_group_constrained", b"_group_constrained", "_policy_id", b"_policy_id", "_scheme_id", b"_scheme_id", "_shared", b"_shared", "auto_translation", b"auto_translation", "banner_info", b"banner_info", "create_at", b"create_at", "creator_id", b"creator_id", "default_category_name", b"default_category_name", "delete_at", b"delete_at", "display_name", b"display_name", "extra_update_at", b"extra_update_at", "group_constrained", b"group_constrained", "header", b"header", "id", b"id", "last_post_at", b"last_post_at", "last_root_post_at", b"last_root_post_at", "name", b"name", "policy_enforced", b"policy_enforced", "policy_id", b"policy_id", "policy_is_active", b"policy_is_active", "props", b"props", "purpose", b"purpose", "scheme_id", b"scheme_id", "shared", b"shared", "team_id", b"team_id", "total_msg_count", b"total_msg_count", "total_msg_count_root", b"total_msg_count_root", "type", b"type", "update_at", b"update_at"] # noqa: Y015
|
|
def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
|
|
_WhichOneofReturnType__banner_info: _TypeAlias = _typing.Literal["banner_info"] # noqa: Y015
|
|
_WhichOneofArgType__banner_info: _TypeAlias = _typing.Literal["_banner_info", b"_banner_info"] # noqa: Y015
|
|
_WhichOneofReturnType__group_constrained: _TypeAlias = _typing.Literal["group_constrained"] # noqa: Y015
|
|
_WhichOneofArgType__group_constrained: _TypeAlias = _typing.Literal["_group_constrained", b"_group_constrained"] # noqa: Y015
|
|
_WhichOneofReturnType__policy_id: _TypeAlias = _typing.Literal["policy_id"] # noqa: Y015
|
|
_WhichOneofArgType__policy_id: _TypeAlias = _typing.Literal["_policy_id", b"_policy_id"] # noqa: Y015
|
|
_WhichOneofReturnType__scheme_id: _TypeAlias = _typing.Literal["scheme_id"] # noqa: Y015
|
|
_WhichOneofArgType__scheme_id: _TypeAlias = _typing.Literal["_scheme_id", b"_scheme_id"] # noqa: Y015
|
|
_WhichOneofReturnType__shared: _TypeAlias = _typing.Literal["shared"] # noqa: Y015
|
|
_WhichOneofArgType__shared: _TypeAlias = _typing.Literal["_shared", b"_shared"] # noqa: Y015
|
|
@_typing.overload
|
|
def WhichOneof(self, oneof_group: _WhichOneofArgType__banner_info) -> _WhichOneofReturnType__banner_info | None: ...
|
|
@_typing.overload
|
|
def WhichOneof(self, oneof_group: _WhichOneofArgType__group_constrained) -> _WhichOneofReturnType__group_constrained | None: ...
|
|
@_typing.overload
|
|
def WhichOneof(self, oneof_group: _WhichOneofArgType__policy_id) -> _WhichOneofReturnType__policy_id | None: ...
|
|
@_typing.overload
|
|
def WhichOneof(self, oneof_group: _WhichOneofArgType__scheme_id) -> _WhichOneofReturnType__scheme_id | None: ...
|
|
@_typing.overload
|
|
def WhichOneof(self, oneof_group: _WhichOneofArgType__shared) -> _WhichOneofReturnType__shared | None: ...
|
|
|
|
Global___Channel: _TypeAlias = Channel # noqa: Y015
|