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>
813 lines
34 KiB
Python
813 lines
34 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 import struct_pb2 as _struct_pb2
|
|
from google.protobuf.internal import containers as _containers
|
|
import api_remaining_pb2 as _api_remaining_pb2
|
|
import builtins as _builtins
|
|
import common_pb2 as _common_pb2
|
|
import file_pb2 as _file_pb2
|
|
import hooks_common_pb2 as _hooks_common_pb2
|
|
import post_pb2 as _post_pb2
|
|
import sys
|
|
import typing as _typing
|
|
import user_pb2 as _user_pb2
|
|
|
|
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 WebSocketRequest(_message.Message):
|
|
"""-----------------------------------------------------------------------------
|
|
Model Types (types not already defined elsewhere)
|
|
-----------------------------------------------------------------------------
|
|
|
|
WebSocketRequest represents a WebSocket message request from a client.
|
|
Maps to model.WebSocketRequest in Go (server/public/model/websocket_request.go).
|
|
|
|
Note: Server-provided fields (Session, T, Locale) are not passed over the wire.
|
|
"""
|
|
|
|
DESCRIPTOR: _descriptor.Descriptor
|
|
|
|
SEQ_FIELD_NUMBER: _builtins.int
|
|
ACTION_FIELD_NUMBER: _builtins.int
|
|
DATA_FIELD_NUMBER: _builtins.int
|
|
seq: _builtins.int
|
|
"""Sequence number incremented for every request"""
|
|
action: _builtins.str
|
|
"""The action to perform (e.g., "get_statuses", "user_typing")"""
|
|
@_builtins.property
|
|
def data(self) -> _struct_pb2.Struct:
|
|
"""Action metadata"""
|
|
|
|
def __init__(
|
|
self,
|
|
*,
|
|
seq: _builtins.int = ...,
|
|
action: _builtins.str = ...,
|
|
data: _struct_pb2.Struct | None = ...,
|
|
) -> None: ...
|
|
_HasFieldArgType: _TypeAlias = _typing.Literal["data", b"data"] # noqa: Y015
|
|
def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
|
|
_ClearFieldArgType: _TypeAlias = _typing.Literal["action", b"action", "data", b"data", "seq", b"seq"] # noqa: Y015
|
|
def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
|
|
|
|
Global___WebSocketRequest: _TypeAlias = WebSocketRequest # noqa: Y015
|
|
|
|
@_typing.final
|
|
class SyncMsgJson(_message.Message):
|
|
"""SyncMsgJson wraps a serialized model.SyncMsg as JSON bytes.
|
|
SyncMsg is a complex type with nested maps and slices of various models
|
|
(User, Post, Reaction, Status, MembershipChangeMsg, PostAcknowledgement).
|
|
Using a JSON blob avoids creating extensive proto definitions and provides
|
|
flexibility for changes in the SyncMsg structure.
|
|
"""
|
|
|
|
DESCRIPTOR: _descriptor.Descriptor
|
|
|
|
SYNC_MSG_JSON_FIELD_NUMBER: _builtins.int
|
|
sync_msg_json: _builtins.bytes
|
|
"""JSON-encoded model.SyncMsg"""
|
|
def __init__(
|
|
self,
|
|
*,
|
|
sync_msg_json: _builtins.bytes = ...,
|
|
) -> None: ...
|
|
_ClearFieldArgType: _TypeAlias = _typing.Literal["sync_msg_json", b"sync_msg_json"] # noqa: Y015
|
|
def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
|
|
|
|
Global___SyncMsgJson: _TypeAlias = SyncMsgJson # noqa: Y015
|
|
|
|
@_typing.final
|
|
class SyncResponse(_message.Message):
|
|
"""SyncResponse represents the response to a shared channels synchronization event.
|
|
Maps to model.SyncResponse in Go (server/public/model/shared_channel.go).
|
|
"""
|
|
|
|
DESCRIPTOR: _descriptor.Descriptor
|
|
|
|
USERS_LAST_UPDATE_AT_FIELD_NUMBER: _builtins.int
|
|
USER_ERRORS_FIELD_NUMBER: _builtins.int
|
|
USERS_SYNCD_FIELD_NUMBER: _builtins.int
|
|
POSTS_LAST_UPDATE_AT_FIELD_NUMBER: _builtins.int
|
|
POST_ERRORS_FIELD_NUMBER: _builtins.int
|
|
REACTIONS_LAST_UPDATE_AT_FIELD_NUMBER: _builtins.int
|
|
REACTION_ERRORS_FIELD_NUMBER: _builtins.int
|
|
ACKNOWLEDGEMENTS_LAST_UPDATE_AT_FIELD_NUMBER: _builtins.int
|
|
ACKNOWLEDGEMENT_ERRORS_FIELD_NUMBER: _builtins.int
|
|
STATUS_ERRORS_FIELD_NUMBER: _builtins.int
|
|
users_last_update_at: _builtins.int
|
|
"""Timestamp of the last user update processed"""
|
|
posts_last_update_at: _builtins.int
|
|
"""Timestamp of the last post update processed"""
|
|
reactions_last_update_at: _builtins.int
|
|
"""Timestamp of the last reaction update processed"""
|
|
acknowledgements_last_update_at: _builtins.int
|
|
"""Timestamp of the last acknowledgement update processed"""
|
|
@_builtins.property
|
|
def user_errors(self) -> _containers.RepeatedScalarFieldContainer[_builtins.str]:
|
|
"""User IDs that failed to sync"""
|
|
|
|
@_builtins.property
|
|
def users_syncd(self) -> _containers.RepeatedScalarFieldContainer[_builtins.str]:
|
|
"""User IDs that were successfully synced"""
|
|
|
|
@_builtins.property
|
|
def post_errors(self) -> _containers.RepeatedScalarFieldContainer[_builtins.str]:
|
|
"""Post IDs that failed to sync"""
|
|
|
|
@_builtins.property
|
|
def reaction_errors(self) -> _containers.RepeatedScalarFieldContainer[_builtins.str]:
|
|
"""Reaction post IDs that failed to sync"""
|
|
|
|
@_builtins.property
|
|
def acknowledgement_errors(self) -> _containers.RepeatedScalarFieldContainer[_builtins.str]:
|
|
"""Acknowledgement IDs that failed to sync"""
|
|
|
|
@_builtins.property
|
|
def status_errors(self) -> _containers.RepeatedScalarFieldContainer[_builtins.str]:
|
|
"""User IDs for which status sync failed"""
|
|
|
|
def __init__(
|
|
self,
|
|
*,
|
|
users_last_update_at: _builtins.int = ...,
|
|
user_errors: _abc.Iterable[_builtins.str] | None = ...,
|
|
users_syncd: _abc.Iterable[_builtins.str] | None = ...,
|
|
posts_last_update_at: _builtins.int = ...,
|
|
post_errors: _abc.Iterable[_builtins.str] | None = ...,
|
|
reactions_last_update_at: _builtins.int = ...,
|
|
reaction_errors: _abc.Iterable[_builtins.str] | None = ...,
|
|
acknowledgements_last_update_at: _builtins.int = ...,
|
|
acknowledgement_errors: _abc.Iterable[_builtins.str] | None = ...,
|
|
status_errors: _abc.Iterable[_builtins.str] | None = ...,
|
|
) -> None: ...
|
|
_ClearFieldArgType: _TypeAlias = _typing.Literal["acknowledgement_errors", b"acknowledgement_errors", "acknowledgements_last_update_at", b"acknowledgements_last_update_at", "post_errors", b"post_errors", "posts_last_update_at", b"posts_last_update_at", "reaction_errors", b"reaction_errors", "reactions_last_update_at", b"reactions_last_update_at", "status_errors", b"status_errors", "user_errors", b"user_errors", "users_last_update_at", b"users_last_update_at", "users_syncd", b"users_syncd"] # noqa: Y015
|
|
def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
|
|
|
|
Global___SyncResponse: _TypeAlias = SyncResponse # noqa: Y015
|
|
|
|
@_typing.final
|
|
class RemoteCluster(_message.Message):
|
|
"""RemoteCluster represents a remote cluster for shared channels.
|
|
Maps to model.RemoteCluster in Go (server/public/model/remote_cluster.go).
|
|
"""
|
|
|
|
DESCRIPTOR: _descriptor.Descriptor
|
|
|
|
REMOTE_ID_FIELD_NUMBER: _builtins.int
|
|
REMOTE_TEAM_ID_FIELD_NUMBER: _builtins.int
|
|
NAME_FIELD_NUMBER: _builtins.int
|
|
DISPLAY_NAME_FIELD_NUMBER: _builtins.int
|
|
SITE_URL_FIELD_NUMBER: _builtins.int
|
|
DEFAULT_TEAM_ID_FIELD_NUMBER: _builtins.int
|
|
CREATE_AT_FIELD_NUMBER: _builtins.int
|
|
DELETE_AT_FIELD_NUMBER: _builtins.int
|
|
LAST_PING_AT_FIELD_NUMBER: _builtins.int
|
|
LAST_GLOBAL_USER_SYNC_AT_FIELD_NUMBER: _builtins.int
|
|
TOKEN_FIELD_NUMBER: _builtins.int
|
|
REMOTE_TOKEN_FIELD_NUMBER: _builtins.int
|
|
TOPICS_FIELD_NUMBER: _builtins.int
|
|
CREATOR_ID_FIELD_NUMBER: _builtins.int
|
|
PLUGIN_ID_FIELD_NUMBER: _builtins.int
|
|
OPTIONS_FIELD_NUMBER: _builtins.int
|
|
remote_id: _builtins.str
|
|
"""Unique identifier for the remote cluster"""
|
|
remote_team_id: _builtins.str
|
|
"""Deprecated: remote_team_id is no longer used"""
|
|
name: _builtins.str
|
|
"""Internal name of the remote cluster"""
|
|
display_name: _builtins.str
|
|
"""Display name shown to users"""
|
|
site_url: _builtins.str
|
|
"""URL of the remote Mattermost server"""
|
|
default_team_id: _builtins.str
|
|
"""Default team ID for the remote cluster"""
|
|
create_at: _builtins.int
|
|
"""Timestamp when the remote cluster was created"""
|
|
delete_at: _builtins.int
|
|
"""Timestamp when the remote cluster was deleted (0 if active)"""
|
|
last_ping_at: _builtins.int
|
|
"""Timestamp of last successful ping"""
|
|
last_global_user_sync_at: _builtins.int
|
|
"""Timestamp of last global user sync"""
|
|
token: _builtins.str
|
|
"""Authentication token (sensitive, may be empty in responses)"""
|
|
remote_token: _builtins.str
|
|
"""Token from the remote cluster (sensitive, may be empty)"""
|
|
topics: _builtins.str
|
|
"""Space-separated list of topics"""
|
|
creator_id: _builtins.str
|
|
"""ID of the user who created the remote cluster"""
|
|
plugin_id: _builtins.str
|
|
"""Plugin ID if sync messages are delivered via plugin API"""
|
|
options: _builtins.int
|
|
"""Bit-flag options"""
|
|
def __init__(
|
|
self,
|
|
*,
|
|
remote_id: _builtins.str = ...,
|
|
remote_team_id: _builtins.str = ...,
|
|
name: _builtins.str = ...,
|
|
display_name: _builtins.str = ...,
|
|
site_url: _builtins.str = ...,
|
|
default_team_id: _builtins.str = ...,
|
|
create_at: _builtins.int = ...,
|
|
delete_at: _builtins.int = ...,
|
|
last_ping_at: _builtins.int = ...,
|
|
last_global_user_sync_at: _builtins.int = ...,
|
|
token: _builtins.str = ...,
|
|
remote_token: _builtins.str = ...,
|
|
topics: _builtins.str = ...,
|
|
creator_id: _builtins.str = ...,
|
|
plugin_id: _builtins.str = ...,
|
|
options: _builtins.int = ...,
|
|
) -> None: ...
|
|
_ClearFieldArgType: _TypeAlias = _typing.Literal["create_at", b"create_at", "creator_id", b"creator_id", "default_team_id", b"default_team_id", "delete_at", b"delete_at", "display_name", b"display_name", "last_global_user_sync_at", b"last_global_user_sync_at", "last_ping_at", b"last_ping_at", "name", b"name", "options", b"options", "plugin_id", b"plugin_id", "remote_id", b"remote_id", "remote_team_id", b"remote_team_id", "remote_token", b"remote_token", "site_url", b"site_url", "token", b"token", "topics", b"topics"] # noqa: Y015
|
|
def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
|
|
|
|
Global___RemoteCluster: _TypeAlias = RemoteCluster # noqa: Y015
|
|
|
|
@_typing.final
|
|
class ExecuteCommandRequest(_message.Message):
|
|
"""-----------------------------------------------------------------------------
|
|
ExecuteCommand Hook
|
|
Signature: ExecuteCommand(c *Context, args *model.CommandArgs) (*model.CommandResponse, *model.AppError)
|
|
Executes a registered slash command.
|
|
|
|
Note: Uses CommandArgs and CommandResponse from api_remaining.proto
|
|
-----------------------------------------------------------------------------
|
|
"""
|
|
|
|
DESCRIPTOR: _descriptor.Descriptor
|
|
|
|
CONTEXT_FIELD_NUMBER: _builtins.int
|
|
PLUGIN_CONTEXT_FIELD_NUMBER: _builtins.int
|
|
ARGS_FIELD_NUMBER: _builtins.int
|
|
@_builtins.property
|
|
def context(self) -> _common_pb2.RequestContext: ...
|
|
@_builtins.property
|
|
def plugin_context(self) -> _hooks_common_pb2.PluginContext:
|
|
"""Plugin context with session/request metadata"""
|
|
|
|
@_builtins.property
|
|
def args(self) -> _api_remaining_pb2.CommandArgs:
|
|
"""The command arguments (from api_remaining.proto)"""
|
|
|
|
def __init__(
|
|
self,
|
|
*,
|
|
context: _common_pb2.RequestContext | None = ...,
|
|
plugin_context: _hooks_common_pb2.PluginContext | None = ...,
|
|
args: _api_remaining_pb2.CommandArgs | None = ...,
|
|
) -> None: ...
|
|
_HasFieldArgType: _TypeAlias = _typing.Literal["args", b"args", "context", b"context", "plugin_context", b"plugin_context"] # noqa: Y015
|
|
def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
|
|
_ClearFieldArgType: _TypeAlias = _typing.Literal["args", b"args", "context", b"context", "plugin_context", b"plugin_context"] # noqa: Y015
|
|
def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
|
|
|
|
Global___ExecuteCommandRequest: _TypeAlias = ExecuteCommandRequest # noqa: Y015
|
|
|
|
@_typing.final
|
|
class ExecuteCommandResponse(_message.Message):
|
|
DESCRIPTOR: _descriptor.Descriptor
|
|
|
|
ERROR_FIELD_NUMBER: _builtins.int
|
|
RESPONSE_FIELD_NUMBER: _builtins.int
|
|
@_builtins.property
|
|
def error(self) -> _common_pb2.AppError:
|
|
"""Error returned by the plugin (null on success)"""
|
|
|
|
@_builtins.property
|
|
def response(self) -> _api_remaining_pb2.CommandResponse:
|
|
"""The command response (may be null if only error is returned)
|
|
Note: Uses CommandResponse from api_remaining.proto
|
|
"""
|
|
|
|
def __init__(
|
|
self,
|
|
*,
|
|
error: _common_pb2.AppError | None = ...,
|
|
response: _api_remaining_pb2.CommandResponse | None = ...,
|
|
) -> None: ...
|
|
_HasFieldArgType: _TypeAlias = _typing.Literal["error", b"error", "response", b"response"] # noqa: Y015
|
|
def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
|
|
_ClearFieldArgType: _TypeAlias = _typing.Literal["error", b"error", "response", b"response"] # noqa: Y015
|
|
def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
|
|
|
|
Global___ExecuteCommandResponse: _TypeAlias = ExecuteCommandResponse # noqa: Y015
|
|
|
|
@_typing.final
|
|
class OnPluginClusterEventRequest(_message.Message):
|
|
"""-----------------------------------------------------------------------------
|
|
OnPluginClusterEvent Hook
|
|
Signature: OnPluginClusterEvent(c *Context, ev model.PluginClusterEvent)
|
|
Receives intra-cluster plugin events. This is a notification hook.
|
|
|
|
Note: Uses PluginClusterEvent from api_remaining.proto
|
|
-----------------------------------------------------------------------------
|
|
"""
|
|
|
|
DESCRIPTOR: _descriptor.Descriptor
|
|
|
|
CONTEXT_FIELD_NUMBER: _builtins.int
|
|
PLUGIN_CONTEXT_FIELD_NUMBER: _builtins.int
|
|
EVENT_FIELD_NUMBER: _builtins.int
|
|
@_builtins.property
|
|
def context(self) -> _common_pb2.RequestContext: ...
|
|
@_builtins.property
|
|
def plugin_context(self) -> _hooks_common_pb2.PluginContext:
|
|
"""Plugin context with session/request metadata"""
|
|
|
|
@_builtins.property
|
|
def event(self) -> _api_remaining_pb2.PluginClusterEvent:
|
|
"""The cluster event (from api_remaining.proto)"""
|
|
|
|
def __init__(
|
|
self,
|
|
*,
|
|
context: _common_pb2.RequestContext | None = ...,
|
|
plugin_context: _hooks_common_pb2.PluginContext | None = ...,
|
|
event: _api_remaining_pb2.PluginClusterEvent | None = ...,
|
|
) -> None: ...
|
|
_HasFieldArgType: _TypeAlias = _typing.Literal["context", b"context", "event", b"event", "plugin_context", b"plugin_context"] # noqa: Y015
|
|
def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
|
|
_ClearFieldArgType: _TypeAlias = _typing.Literal["context", b"context", "event", b"event", "plugin_context", b"plugin_context"] # noqa: Y015
|
|
def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
|
|
|
|
Global___OnPluginClusterEventRequest: _TypeAlias = OnPluginClusterEventRequest # noqa: Y015
|
|
|
|
@_typing.final
|
|
class OnPluginClusterEventResponse(_message.Message):
|
|
"""No error field because the Go signature has no return value.
|
|
Hook failures are logged but do not affect server operation.
|
|
"""
|
|
|
|
DESCRIPTOR: _descriptor.Descriptor
|
|
|
|
def __init__(
|
|
self,
|
|
) -> None: ...
|
|
|
|
Global___OnPluginClusterEventResponse: _TypeAlias = OnPluginClusterEventResponse # noqa: Y015
|
|
|
|
@_typing.final
|
|
class OnWebSocketConnectRequest(_message.Message):
|
|
"""-----------------------------------------------------------------------------
|
|
OnWebSocketConnect Hook
|
|
Signature: OnWebSocketConnect(webConnID, userID string)
|
|
Invoked when a new WebSocket connection is opened. No Context parameter.
|
|
-----------------------------------------------------------------------------
|
|
"""
|
|
|
|
DESCRIPTOR: _descriptor.Descriptor
|
|
|
|
CONTEXT_FIELD_NUMBER: _builtins.int
|
|
WEB_CONN_ID_FIELD_NUMBER: _builtins.int
|
|
USER_ID_FIELD_NUMBER: _builtins.int
|
|
web_conn_id: _builtins.str
|
|
"""The WebSocket connection ID"""
|
|
user_id: _builtins.str
|
|
"""The ID of the user who connected"""
|
|
@_builtins.property
|
|
def context(self) -> _common_pb2.RequestContext: ...
|
|
def __init__(
|
|
self,
|
|
*,
|
|
context: _common_pb2.RequestContext | None = ...,
|
|
web_conn_id: _builtins.str = ...,
|
|
user_id: _builtins.str = ...,
|
|
) -> None: ...
|
|
_HasFieldArgType: _TypeAlias = _typing.Literal["context", b"context"] # noqa: Y015
|
|
def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
|
|
_ClearFieldArgType: _TypeAlias = _typing.Literal["context", b"context", "user_id", b"user_id", "web_conn_id", b"web_conn_id"] # noqa: Y015
|
|
def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
|
|
|
|
Global___OnWebSocketConnectRequest: _TypeAlias = OnWebSocketConnectRequest # noqa: Y015
|
|
|
|
@_typing.final
|
|
class OnWebSocketConnectResponse(_message.Message):
|
|
"""No error field because the Go signature has no return value.
|
|
Hook failures are logged but do not affect server operation.
|
|
"""
|
|
|
|
DESCRIPTOR: _descriptor.Descriptor
|
|
|
|
def __init__(
|
|
self,
|
|
) -> None: ...
|
|
|
|
Global___OnWebSocketConnectResponse: _TypeAlias = OnWebSocketConnectResponse # noqa: Y015
|
|
|
|
@_typing.final
|
|
class OnWebSocketDisconnectRequest(_message.Message):
|
|
"""-----------------------------------------------------------------------------
|
|
OnWebSocketDisconnect Hook
|
|
Signature: OnWebSocketDisconnect(webConnID, userID string)
|
|
Invoked when a WebSocket connection is closed. No Context parameter.
|
|
-----------------------------------------------------------------------------
|
|
"""
|
|
|
|
DESCRIPTOR: _descriptor.Descriptor
|
|
|
|
CONTEXT_FIELD_NUMBER: _builtins.int
|
|
WEB_CONN_ID_FIELD_NUMBER: _builtins.int
|
|
USER_ID_FIELD_NUMBER: _builtins.int
|
|
web_conn_id: _builtins.str
|
|
"""The WebSocket connection ID"""
|
|
user_id: _builtins.str
|
|
"""The ID of the user who disconnected"""
|
|
@_builtins.property
|
|
def context(self) -> _common_pb2.RequestContext: ...
|
|
def __init__(
|
|
self,
|
|
*,
|
|
context: _common_pb2.RequestContext | None = ...,
|
|
web_conn_id: _builtins.str = ...,
|
|
user_id: _builtins.str = ...,
|
|
) -> None: ...
|
|
_HasFieldArgType: _TypeAlias = _typing.Literal["context", b"context"] # noqa: Y015
|
|
def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
|
|
_ClearFieldArgType: _TypeAlias = _typing.Literal["context", b"context", "user_id", b"user_id", "web_conn_id", b"web_conn_id"] # noqa: Y015
|
|
def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
|
|
|
|
Global___OnWebSocketDisconnectRequest: _TypeAlias = OnWebSocketDisconnectRequest # noqa: Y015
|
|
|
|
@_typing.final
|
|
class OnWebSocketDisconnectResponse(_message.Message):
|
|
"""No error field because the Go signature has no return value.
|
|
Hook failures are logged but do not affect server operation.
|
|
"""
|
|
|
|
DESCRIPTOR: _descriptor.Descriptor
|
|
|
|
def __init__(
|
|
self,
|
|
) -> None: ...
|
|
|
|
Global___OnWebSocketDisconnectResponse: _TypeAlias = OnWebSocketDisconnectResponse # noqa: Y015
|
|
|
|
@_typing.final
|
|
class WebSocketMessageHasBeenPostedRequest(_message.Message):
|
|
"""-----------------------------------------------------------------------------
|
|
WebSocketMessageHasBeenPosted Hook
|
|
Signature: WebSocketMessageHasBeenPosted(webConnID, userID string, req *model.WebSocketRequest)
|
|
Invoked when a WebSocket message is received. No Context parameter.
|
|
-----------------------------------------------------------------------------
|
|
"""
|
|
|
|
DESCRIPTOR: _descriptor.Descriptor
|
|
|
|
CONTEXT_FIELD_NUMBER: _builtins.int
|
|
WEB_CONN_ID_FIELD_NUMBER: _builtins.int
|
|
USER_ID_FIELD_NUMBER: _builtins.int
|
|
REQUEST_FIELD_NUMBER: _builtins.int
|
|
web_conn_id: _builtins.str
|
|
"""The WebSocket connection ID"""
|
|
user_id: _builtins.str
|
|
"""The ID of the user who sent the message"""
|
|
@_builtins.property
|
|
def context(self) -> _common_pb2.RequestContext: ...
|
|
@_builtins.property
|
|
def request(self) -> Global___WebSocketRequest:
|
|
"""The WebSocket request"""
|
|
|
|
def __init__(
|
|
self,
|
|
*,
|
|
context: _common_pb2.RequestContext | None = ...,
|
|
web_conn_id: _builtins.str = ...,
|
|
user_id: _builtins.str = ...,
|
|
request: Global___WebSocketRequest | None = ...,
|
|
) -> None: ...
|
|
_HasFieldArgType: _TypeAlias = _typing.Literal["context", b"context", "request", b"request"] # noqa: Y015
|
|
def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
|
|
_ClearFieldArgType: _TypeAlias = _typing.Literal["context", b"context", "request", b"request", "user_id", b"user_id", "web_conn_id", b"web_conn_id"] # noqa: Y015
|
|
def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
|
|
|
|
Global___WebSocketMessageHasBeenPostedRequest: _TypeAlias = WebSocketMessageHasBeenPostedRequest # noqa: Y015
|
|
|
|
@_typing.final
|
|
class WebSocketMessageHasBeenPostedResponse(_message.Message):
|
|
"""No error field because the Go signature has no return value.
|
|
Hook failures are logged but do not affect server operation.
|
|
"""
|
|
|
|
DESCRIPTOR: _descriptor.Descriptor
|
|
|
|
def __init__(
|
|
self,
|
|
) -> None: ...
|
|
|
|
Global___WebSocketMessageHasBeenPostedResponse: _TypeAlias = WebSocketMessageHasBeenPostedResponse # noqa: Y015
|
|
|
|
@_typing.final
|
|
class OnSharedChannelsSyncMsgRequest(_message.Message):
|
|
"""-----------------------------------------------------------------------------
|
|
OnSharedChannelsSyncMsg Hook
|
|
Signature: OnSharedChannelsSyncMsg(msg *model.SyncMsg, rc *model.RemoteCluster) (model.SyncResponse, error)
|
|
Receives shared channels sync messages.
|
|
-----------------------------------------------------------------------------
|
|
"""
|
|
|
|
DESCRIPTOR: _descriptor.Descriptor
|
|
|
|
CONTEXT_FIELD_NUMBER: _builtins.int
|
|
SYNC_MSG_FIELD_NUMBER: _builtins.int
|
|
REMOTE_CLUSTER_FIELD_NUMBER: _builtins.int
|
|
@_builtins.property
|
|
def context(self) -> _common_pb2.RequestContext: ...
|
|
@_builtins.property
|
|
def sync_msg(self) -> Global___SyncMsgJson:
|
|
"""The sync message as JSON (complex nested structure)"""
|
|
|
|
@_builtins.property
|
|
def remote_cluster(self) -> Global___RemoteCluster:
|
|
"""The remote cluster that sent the message"""
|
|
|
|
def __init__(
|
|
self,
|
|
*,
|
|
context: _common_pb2.RequestContext | None = ...,
|
|
sync_msg: Global___SyncMsgJson | None = ...,
|
|
remote_cluster: Global___RemoteCluster | None = ...,
|
|
) -> None: ...
|
|
_HasFieldArgType: _TypeAlias = _typing.Literal["context", b"context", "remote_cluster", b"remote_cluster", "sync_msg", b"sync_msg"] # noqa: Y015
|
|
def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
|
|
_ClearFieldArgType: _TypeAlias = _typing.Literal["context", b"context", "remote_cluster", b"remote_cluster", "sync_msg", b"sync_msg"] # noqa: Y015
|
|
def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
|
|
|
|
Global___OnSharedChannelsSyncMsgRequest: _TypeAlias = OnSharedChannelsSyncMsgRequest # noqa: Y015
|
|
|
|
@_typing.final
|
|
class OnSharedChannelsSyncMsgResponse(_message.Message):
|
|
DESCRIPTOR: _descriptor.Descriptor
|
|
|
|
ERROR_FIELD_NUMBER: _builtins.int
|
|
RESPONSE_FIELD_NUMBER: _builtins.int
|
|
@_builtins.property
|
|
def error(self) -> _common_pb2.AppError:
|
|
"""Error returned by the plugin (null on success)"""
|
|
|
|
@_builtins.property
|
|
def response(self) -> Global___SyncResponse:
|
|
"""The sync response"""
|
|
|
|
def __init__(
|
|
self,
|
|
*,
|
|
error: _common_pb2.AppError | None = ...,
|
|
response: Global___SyncResponse | None = ...,
|
|
) -> None: ...
|
|
_HasFieldArgType: _TypeAlias = _typing.Literal["error", b"error", "response", b"response"] # noqa: Y015
|
|
def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
|
|
_ClearFieldArgType: _TypeAlias = _typing.Literal["error", b"error", "response", b"response"] # noqa: Y015
|
|
def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
|
|
|
|
Global___OnSharedChannelsSyncMsgResponse: _TypeAlias = OnSharedChannelsSyncMsgResponse # noqa: Y015
|
|
|
|
@_typing.final
|
|
class OnSharedChannelsPingRequest(_message.Message):
|
|
"""-----------------------------------------------------------------------------
|
|
OnSharedChannelsPing Hook
|
|
Signature: OnSharedChannelsPing(rc *model.RemoteCluster) bool
|
|
Health check for shared channels plugin. Returns true if healthy.
|
|
-----------------------------------------------------------------------------
|
|
"""
|
|
|
|
DESCRIPTOR: _descriptor.Descriptor
|
|
|
|
CONTEXT_FIELD_NUMBER: _builtins.int
|
|
REMOTE_CLUSTER_FIELD_NUMBER: _builtins.int
|
|
@_builtins.property
|
|
def context(self) -> _common_pb2.RequestContext: ...
|
|
@_builtins.property
|
|
def remote_cluster(self) -> Global___RemoteCluster:
|
|
"""The remote cluster performing the ping"""
|
|
|
|
def __init__(
|
|
self,
|
|
*,
|
|
context: _common_pb2.RequestContext | None = ...,
|
|
remote_cluster: Global___RemoteCluster | None = ...,
|
|
) -> None: ...
|
|
_HasFieldArgType: _TypeAlias = _typing.Literal["context", b"context", "remote_cluster", b"remote_cluster"] # noqa: Y015
|
|
def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
|
|
_ClearFieldArgType: _TypeAlias = _typing.Literal["context", b"context", "remote_cluster", b"remote_cluster"] # noqa: Y015
|
|
def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
|
|
|
|
Global___OnSharedChannelsPingRequest: _TypeAlias = OnSharedChannelsPingRequest # noqa: Y015
|
|
|
|
@_typing.final
|
|
class OnSharedChannelsPingResponse(_message.Message):
|
|
DESCRIPTOR: _descriptor.Descriptor
|
|
|
|
HEALTHY_FIELD_NUMBER: _builtins.int
|
|
healthy: _builtins.bool
|
|
"""True if the plugin is healthy, false otherwise"""
|
|
def __init__(
|
|
self,
|
|
*,
|
|
healthy: _builtins.bool = ...,
|
|
) -> None: ...
|
|
_ClearFieldArgType: _TypeAlias = _typing.Literal["healthy", b"healthy"] # noqa: Y015
|
|
def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
|
|
|
|
Global___OnSharedChannelsPingResponse: _TypeAlias = OnSharedChannelsPingResponse # noqa: Y015
|
|
|
|
@_typing.final
|
|
class OnSharedChannelsAttachmentSyncMsgRequest(_message.Message):
|
|
"""-----------------------------------------------------------------------------
|
|
OnSharedChannelsAttachmentSyncMsg Hook
|
|
Signature: OnSharedChannelsAttachmentSyncMsg(fi *model.FileInfo, post *model.Post, rc *model.RemoteCluster) error
|
|
Receives file attachment sync messages from shared channels.
|
|
-----------------------------------------------------------------------------
|
|
"""
|
|
|
|
DESCRIPTOR: _descriptor.Descriptor
|
|
|
|
CONTEXT_FIELD_NUMBER: _builtins.int
|
|
FILE_INFO_FIELD_NUMBER: _builtins.int
|
|
POST_FIELD_NUMBER: _builtins.int
|
|
REMOTE_CLUSTER_FIELD_NUMBER: _builtins.int
|
|
@_builtins.property
|
|
def context(self) -> _common_pb2.RequestContext: ...
|
|
@_builtins.property
|
|
def file_info(self) -> _file_pb2.FileInfo:
|
|
"""The file info to sync"""
|
|
|
|
@_builtins.property
|
|
def post(self) -> _post_pb2.Post:
|
|
"""The post the file is attached to"""
|
|
|
|
@_builtins.property
|
|
def remote_cluster(self) -> Global___RemoteCluster:
|
|
"""The remote cluster that sent the message"""
|
|
|
|
def __init__(
|
|
self,
|
|
*,
|
|
context: _common_pb2.RequestContext | None = ...,
|
|
file_info: _file_pb2.FileInfo | None = ...,
|
|
post: _post_pb2.Post | None = ...,
|
|
remote_cluster: Global___RemoteCluster | None = ...,
|
|
) -> None: ...
|
|
_HasFieldArgType: _TypeAlias = _typing.Literal["context", b"context", "file_info", b"file_info", "post", b"post", "remote_cluster", b"remote_cluster"] # noqa: Y015
|
|
def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
|
|
_ClearFieldArgType: _TypeAlias = _typing.Literal["context", b"context", "file_info", b"file_info", "post", b"post", "remote_cluster", b"remote_cluster"] # noqa: Y015
|
|
def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
|
|
|
|
Global___OnSharedChannelsAttachmentSyncMsgRequest: _TypeAlias = OnSharedChannelsAttachmentSyncMsgRequest # noqa: Y015
|
|
|
|
@_typing.final
|
|
class OnSharedChannelsAttachmentSyncMsgResponse(_message.Message):
|
|
DESCRIPTOR: _descriptor.Descriptor
|
|
|
|
ERROR_FIELD_NUMBER: _builtins.int
|
|
@_builtins.property
|
|
def error(self) -> _common_pb2.AppError:
|
|
"""Error returned by the plugin (null on success)"""
|
|
|
|
def __init__(
|
|
self,
|
|
*,
|
|
error: _common_pb2.AppError | None = ...,
|
|
) -> None: ...
|
|
_HasFieldArgType: _TypeAlias = _typing.Literal["error", b"error"] # noqa: Y015
|
|
def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
|
|
_ClearFieldArgType: _TypeAlias = _typing.Literal["error", b"error"] # noqa: Y015
|
|
def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
|
|
|
|
Global___OnSharedChannelsAttachmentSyncMsgResponse: _TypeAlias = OnSharedChannelsAttachmentSyncMsgResponse # noqa: Y015
|
|
|
|
@_typing.final
|
|
class OnSharedChannelsProfileImageSyncMsgRequest(_message.Message):
|
|
"""-----------------------------------------------------------------------------
|
|
OnSharedChannelsProfileImageSyncMsg Hook
|
|
Signature: OnSharedChannelsProfileImageSyncMsg(user *model.User, rc *model.RemoteCluster) error
|
|
Receives profile image sync messages from shared channels.
|
|
-----------------------------------------------------------------------------
|
|
"""
|
|
|
|
DESCRIPTOR: _descriptor.Descriptor
|
|
|
|
CONTEXT_FIELD_NUMBER: _builtins.int
|
|
USER_FIELD_NUMBER: _builtins.int
|
|
REMOTE_CLUSTER_FIELD_NUMBER: _builtins.int
|
|
@_builtins.property
|
|
def context(self) -> _common_pb2.RequestContext: ...
|
|
@_builtins.property
|
|
def user(self) -> _user_pb2.User:
|
|
"""The user whose profile image should be synced"""
|
|
|
|
@_builtins.property
|
|
def remote_cluster(self) -> Global___RemoteCluster:
|
|
"""The remote cluster that sent the message"""
|
|
|
|
def __init__(
|
|
self,
|
|
*,
|
|
context: _common_pb2.RequestContext | None = ...,
|
|
user: _user_pb2.User | None = ...,
|
|
remote_cluster: Global___RemoteCluster | None = ...,
|
|
) -> None: ...
|
|
_HasFieldArgType: _TypeAlias = _typing.Literal["context", b"context", "remote_cluster", b"remote_cluster", "user", b"user"] # noqa: Y015
|
|
def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
|
|
_ClearFieldArgType: _TypeAlias = _typing.Literal["context", b"context", "remote_cluster", b"remote_cluster", "user", b"user"] # noqa: Y015
|
|
def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
|
|
|
|
Global___OnSharedChannelsProfileImageSyncMsgRequest: _TypeAlias = OnSharedChannelsProfileImageSyncMsgRequest # noqa: Y015
|
|
|
|
@_typing.final
|
|
class OnSharedChannelsProfileImageSyncMsgResponse(_message.Message):
|
|
DESCRIPTOR: _descriptor.Descriptor
|
|
|
|
ERROR_FIELD_NUMBER: _builtins.int
|
|
@_builtins.property
|
|
def error(self) -> _common_pb2.AppError:
|
|
"""Error returned by the plugin (null on success)"""
|
|
|
|
def __init__(
|
|
self,
|
|
*,
|
|
error: _common_pb2.AppError | None = ...,
|
|
) -> None: ...
|
|
_HasFieldArgType: _TypeAlias = _typing.Literal["error", b"error"] # noqa: Y015
|
|
def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
|
|
_ClearFieldArgType: _TypeAlias = _typing.Literal["error", b"error"] # noqa: Y015
|
|
def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
|
|
|
|
Global___OnSharedChannelsProfileImageSyncMsgResponse: _TypeAlias = OnSharedChannelsProfileImageSyncMsgResponse # noqa: Y015
|
|
|
|
@_typing.final
|
|
class GenerateSupportDataRequest(_message.Message):
|
|
"""-----------------------------------------------------------------------------
|
|
GenerateSupportData Hook
|
|
Signature: GenerateSupportData(c *Context) ([]*model.FileData, error)
|
|
Generates plugin support data for inclusion in Support Packets.
|
|
-----------------------------------------------------------------------------
|
|
"""
|
|
|
|
DESCRIPTOR: _descriptor.Descriptor
|
|
|
|
CONTEXT_FIELD_NUMBER: _builtins.int
|
|
PLUGIN_CONTEXT_FIELD_NUMBER: _builtins.int
|
|
@_builtins.property
|
|
def context(self) -> _common_pb2.RequestContext: ...
|
|
@_builtins.property
|
|
def plugin_context(self) -> _hooks_common_pb2.PluginContext:
|
|
"""Plugin context with session/request metadata"""
|
|
|
|
def __init__(
|
|
self,
|
|
*,
|
|
context: _common_pb2.RequestContext | None = ...,
|
|
plugin_context: _hooks_common_pb2.PluginContext | None = ...,
|
|
) -> None: ...
|
|
_HasFieldArgType: _TypeAlias = _typing.Literal["context", b"context", "plugin_context", b"plugin_context"] # noqa: Y015
|
|
def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
|
|
_ClearFieldArgType: _TypeAlias = _typing.Literal["context", b"context", "plugin_context", b"plugin_context"] # noqa: Y015
|
|
def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
|
|
|
|
Global___GenerateSupportDataRequest: _TypeAlias = GenerateSupportDataRequest # noqa: Y015
|
|
|
|
@_typing.final
|
|
class GenerateSupportDataResponse(_message.Message):
|
|
DESCRIPTOR: _descriptor.Descriptor
|
|
|
|
ERROR_FIELD_NUMBER: _builtins.int
|
|
FILES_FIELD_NUMBER: _builtins.int
|
|
@_builtins.property
|
|
def error(self) -> _common_pb2.AppError:
|
|
"""Error returned by the plugin (null on success)"""
|
|
|
|
@_builtins.property
|
|
def files(self) -> _containers.RepeatedCompositeFieldContainer[_file_pb2.FileData]:
|
|
"""Files to include in the support packet
|
|
Note: Uses FileData from file.proto
|
|
"""
|
|
|
|
def __init__(
|
|
self,
|
|
*,
|
|
error: _common_pb2.AppError | None = ...,
|
|
files: _abc.Iterable[_file_pb2.FileData] | None = ...,
|
|
) -> None: ...
|
|
_HasFieldArgType: _TypeAlias = _typing.Literal["error", b"error"] # noqa: Y015
|
|
def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
|
|
_ClearFieldArgType: _TypeAlias = _typing.Literal["error", b"error", "files", b"files"] # noqa: Y015
|
|
def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
|
|
|
|
Global___GenerateSupportDataResponse: _TypeAlias = GenerateSupportDataResponse # noqa: Y015
|