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>
172 lines
7.4 KiB
Python
172 lines
7.4 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 collections import abc as _abc
|
|
from google.protobuf import descriptor as _descriptor
|
|
from google.protobuf import message as _message
|
|
from google.protobuf.internal import containers as _containers
|
|
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
|
|
|
|
@_typing.final
|
|
class FileInfo(_message.Message):
|
|
"""FileInfo represents metadata about an uploaded file.
|
|
This is a standalone definition for use outside of Post context.
|
|
Maps to model.FileInfo in Go.
|
|
|
|
Note: A FileInfo message is also defined in post.proto as part of PostMetadata.
|
|
This file provides the canonical standalone definition for file-related API methods.
|
|
"""
|
|
|
|
DESCRIPTOR: _descriptor.Descriptor
|
|
|
|
ID_FIELD_NUMBER: _builtins.int
|
|
CREATOR_ID_FIELD_NUMBER: _builtins.int
|
|
POST_ID_FIELD_NUMBER: _builtins.int
|
|
CHANNEL_ID_FIELD_NUMBER: _builtins.int
|
|
CREATE_AT_FIELD_NUMBER: _builtins.int
|
|
UPDATE_AT_FIELD_NUMBER: _builtins.int
|
|
DELETE_AT_FIELD_NUMBER: _builtins.int
|
|
NAME_FIELD_NUMBER: _builtins.int
|
|
EXTENSION_FIELD_NUMBER: _builtins.int
|
|
SIZE_FIELD_NUMBER: _builtins.int
|
|
MIME_TYPE_FIELD_NUMBER: _builtins.int
|
|
WIDTH_FIELD_NUMBER: _builtins.int
|
|
HEIGHT_FIELD_NUMBER: _builtins.int
|
|
HAS_PREVIEW_IMAGE_FIELD_NUMBER: _builtins.int
|
|
MINI_PREVIEW_FIELD_NUMBER: _builtins.int
|
|
REMOTE_ID_FIELD_NUMBER: _builtins.int
|
|
ARCHIVED_FIELD_NUMBER: _builtins.int
|
|
id: _builtins.str
|
|
"""Unique identifier for the file (26-char ID)"""
|
|
creator_id: _builtins.str
|
|
"""ID of the user who uploaded the file"""
|
|
post_id: _builtins.str
|
|
"""ID of the post this file is attached to (may be empty before attachment)"""
|
|
channel_id: _builtins.str
|
|
"""ID of the channel this file is in (denormalized from post)"""
|
|
create_at: _builtins.int
|
|
"""Timestamp when the file was created (milliseconds since epoch)"""
|
|
update_at: _builtins.int
|
|
"""Timestamp when the file was last updated (milliseconds since epoch)"""
|
|
delete_at: _builtins.int
|
|
"""Timestamp when the file was deleted (0 if not deleted, milliseconds since epoch)"""
|
|
name: _builtins.str
|
|
"""Original filename as uploaded"""
|
|
extension: _builtins.str
|
|
"""File extension without the leading dot (e.g., "png", "pdf")"""
|
|
size: _builtins.int
|
|
"""File size in bytes"""
|
|
mime_type: _builtins.str
|
|
"""MIME type of the file (e.g., "image/png", "application/pdf")"""
|
|
width: _builtins.int
|
|
"""Image width in pixels (0 for non-image files)"""
|
|
height: _builtins.int
|
|
"""Image height in pixels (0 for non-image files)"""
|
|
has_preview_image: _builtins.bool
|
|
"""Whether a preview image was generated for this file"""
|
|
mini_preview: _builtins.bytes
|
|
"""Mini preview data (small base64-encoded thumbnail for images)"""
|
|
remote_id: _builtins.str
|
|
"""Remote cluster ID if this file is from a shared channel"""
|
|
archived: _builtins.bool
|
|
"""Whether the file content has been archived and is no longer accessible"""
|
|
def __init__(
|
|
self,
|
|
*,
|
|
id: _builtins.str = ...,
|
|
creator_id: _builtins.str = ...,
|
|
post_id: _builtins.str = ...,
|
|
channel_id: _builtins.str = ...,
|
|
create_at: _builtins.int = ...,
|
|
update_at: _builtins.int = ...,
|
|
delete_at: _builtins.int = ...,
|
|
name: _builtins.str = ...,
|
|
extension: _builtins.str = ...,
|
|
size: _builtins.int = ...,
|
|
mime_type: _builtins.str = ...,
|
|
width: _builtins.int = ...,
|
|
height: _builtins.int = ...,
|
|
has_preview_image: _builtins.bool = ...,
|
|
mini_preview: _builtins.bytes | None = ...,
|
|
remote_id: _builtins.str | None = ...,
|
|
archived: _builtins.bool = ...,
|
|
) -> None: ...
|
|
_HasFieldArgType: _TypeAlias = _typing.Literal["_mini_preview", b"_mini_preview", "_remote_id", b"_remote_id", "mini_preview", b"mini_preview", "remote_id", b"remote_id"] # noqa: Y015
|
|
def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
|
|
_ClearFieldArgType: _TypeAlias = _typing.Literal["_mini_preview", b"_mini_preview", "_remote_id", b"_remote_id", "archived", b"archived", "channel_id", b"channel_id", "create_at", b"create_at", "creator_id", b"creator_id", "delete_at", b"delete_at", "extension", b"extension", "has_preview_image", b"has_preview_image", "height", b"height", "id", b"id", "mime_type", b"mime_type", "mini_preview", b"mini_preview", "name", b"name", "post_id", b"post_id", "remote_id", b"remote_id", "size", b"size", "update_at", b"update_at", "width", b"width"] # noqa: Y015
|
|
def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
|
|
_WhichOneofReturnType__mini_preview: _TypeAlias = _typing.Literal["mini_preview"] # noqa: Y015
|
|
_WhichOneofArgType__mini_preview: _TypeAlias = _typing.Literal["_mini_preview", b"_mini_preview"] # noqa: Y015
|
|
_WhichOneofReturnType__remote_id: _TypeAlias = _typing.Literal["remote_id"] # noqa: Y015
|
|
_WhichOneofArgType__remote_id: _TypeAlias = _typing.Literal["_remote_id", b"_remote_id"] # noqa: Y015
|
|
@_typing.overload
|
|
def WhichOneof(self, oneof_group: _WhichOneofArgType__mini_preview) -> _WhichOneofReturnType__mini_preview | None: ...
|
|
@_typing.overload
|
|
def WhichOneof(self, oneof_group: _WhichOneofArgType__remote_id) -> _WhichOneofReturnType__remote_id | None: ...
|
|
|
|
Global___FileInfo: _TypeAlias = FileInfo # noqa: Y015
|
|
|
|
@_typing.final
|
|
class FileUploadResponse(_message.Message):
|
|
"""FileUploadResponse represents the response from a file upload."""
|
|
|
|
DESCRIPTOR: _descriptor.Descriptor
|
|
|
|
FILE_INFOS_FIELD_NUMBER: _builtins.int
|
|
CLIENT_IDS_FIELD_NUMBER: _builtins.int
|
|
@_builtins.property
|
|
def file_infos(self) -> _containers.RepeatedCompositeFieldContainer[Global___FileInfo]:
|
|
"""The uploaded file info"""
|
|
|
|
@_builtins.property
|
|
def client_ids(self) -> _containers.RepeatedScalarFieldContainer[_builtins.str]:
|
|
"""Client-provided IDs for tracking uploads"""
|
|
|
|
def __init__(
|
|
self,
|
|
*,
|
|
file_infos: _abc.Iterable[Global___FileInfo] | None = ...,
|
|
client_ids: _abc.Iterable[_builtins.str] | None = ...,
|
|
) -> None: ...
|
|
_ClearFieldArgType: _TypeAlias = _typing.Literal["client_ids", b"client_ids", "file_infos", b"file_infos"] # noqa: Y015
|
|
def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
|
|
|
|
Global___FileUploadResponse: _TypeAlias = FileUploadResponse # noqa: Y015
|
|
|
|
@_typing.final
|
|
class FileData(_message.Message):
|
|
"""FileData represents the raw file content for upload.
|
|
Maps to model.FileData in Go.
|
|
"""
|
|
|
|
DESCRIPTOR: _descriptor.Descriptor
|
|
|
|
FILENAME_FIELD_NUMBER: _builtins.int
|
|
DATA_FIELD_NUMBER: _builtins.int
|
|
filename: _builtins.str
|
|
"""The filename"""
|
|
data: _builtins.bytes
|
|
"""The raw file content"""
|
|
def __init__(
|
|
self,
|
|
*,
|
|
filename: _builtins.str = ...,
|
|
data: _builtins.bytes = ...,
|
|
) -> None: ...
|
|
_ClearFieldArgType: _TypeAlias = _typing.Literal["data", b"data", "filename", b"filename"] # noqa: Y015
|
|
def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
|
|
|
|
Global___FileData: _TypeAlias = FileData # noqa: Y015
|