import type { ChatHubMessageStatus, PushMessage, WorkerStatus } from '@n8n/api-types';
import type { IWorkflowBase, WorkflowActivateMode } from 'n8n-workflow';
export type PubSubCommandMap = {
    'reload-license': never;
    'restart-event-bus': never;
    'reload-external-secrets-providers': never;
    'reload-overwrite-credentials': never;
    'reload-oidc-config': never;
    'reload-saml-config': never;
    'reload-sso-provisioning-configuration': never;
    'reload-source-control-config': never;
    'community-package-install': {
        packageName: string;
        packageVersion: string;
    };
    'community-package-update': {
        packageName: string;
        packageVersion: string;
    };
    'community-package-uninstall': {
        packageName: string;
    };
    'get-worker-id': never;
    'get-worker-status': {
        requestingUserId: string;
    };
    'add-webhooks-triggers-and-pollers': {
        workflowId: string;
        activeVersionId: string;
        activationMode: WorkflowActivateMode;
    };
    'remove-triggers-and-pollers': {
        workflowId: string;
    };
    'display-workflow-activation': {
        workflowId: string;
        activeVersionId: string;
    };
    'display-workflow-deactivation': {
        workflowId: string;
    };
    'display-workflow-activation-error': {
        workflowId: string;
        errorMessage: string;
        errorDescription?: string;
        nodeId?: string;
    };
    'relay-execution-lifecycle-event': PushMessage & {
        pushRef: string;
        asBinary: boolean;
    };
    'clear-test-webhooks': {
        webhookKey: string;
        workflowEntity: IWorkflowBase;
        pushRef: string;
    };
    'relay-chat-stream-event': {
        eventType: 'execution-begin' | 'execution-end' | 'begin' | 'chunk' | 'end' | 'error';
        userId: string;
        sessionId: string;
        messageId: string;
        sequenceNumber: number;
        payload: {
            previousMessageId?: string | null;
            retryOfMessageId?: string | null;
            executionId?: number | null;
            content?: string;
            status?: ChatHubMessageStatus;
            error?: string;
        };
    };
    'relay-chat-human-message': {
        userId: string;
        sessionId: string;
        messageId: string;
        previousMessageId: string | null;
        content: string;
        attachments: Array<{
            id: string;
            fileName: string;
            mimeType: string;
        }>;
    };
    'relay-chat-message-edit': {
        userId: string;
        sessionId: string;
        revisionOfMessageId: string;
        messageId: string;
        content: string;
        attachments: Array<{
            id: string;
            fileName: string;
            mimeType: string;
        }>;
    };
    'cancel-test-run': {
        testRunId: string;
    };
    'agent-chat-integration-changed': {
        agentId: string;
        type: string;
        credentialId: string;
        action: 'connect' | 'disconnect';
    };
    'agent-config-changed': {
        agentId: string;
    };
};
export type PubSubWorkerResponseMap = {
    'response-to-get-worker-status': WorkerStatus & {
        requestingUserId: string;
    };
};
export type PubSubEventMap = PubSubCommandMap & PubSubWorkerResponseMap;
