@channel.io/be-user-chat-mcp
Version:
Backend UserChat Model Context Protocol server for Channel.io
69 lines • 2.05 kB
TypeScript
import type { RequestContext } from "../config/index.js";
export interface Workflow {
id: string;
channel_id: string;
trigger_type: string;
trigger: unknown;
draft?: unknown;
exclusive: boolean;
revision_id?: string;
bot_name?: string;
name: string;
rank: number | string;
state: string;
manager_id?: string;
start: number;
end: number;
chat_open: number;
use_alf: boolean;
draft_manager_id?: string;
draft_updated_at?: string;
batched_at: string;
created_at: string;
updated_at: string;
migration_info?: unknown;
recipe_case_id?: string;
removed_at?: string;
resume_parent: number;
}
export interface WorkflowRevision {
id: string;
title?: string;
description?: string;
workflow_id: string;
sections?: unknown;
preview_section?: unknown;
created_at: string;
}
export interface UserChatWorkflowSectionPath {
userChatId: string;
handlingTraceId: string;
handlingId: string;
sectionPath: string;
workflowId: string;
revisionId: string;
parent?: unknown;
chatOpen: boolean;
end: boolean;
resumeParent: boolean;
createdAt: string;
updatedAt: string;
channelId: string;
version?: number;
}
/**
* Fetches a workflow by its ID using a raw Redash query.
* Throws an error if the query fails.
*/
export declare function getWorkflow(workflowId: string, context: RequestContext): Promise<Workflow | null>;
/**
* Fetches all workflow revisions for a given workflow ID using a raw Redash query.
* Throws an error if the query fails.
*/
export declare function getWorkflowRevisions(workflowId: string, context: RequestContext): Promise<WorkflowRevision[]>;
/**
* Fetches all UserChatWorkflowSectionPath items for a given userChatId from DynamoDB.
* Throws an error if the query fails.
*/
export declare function getWorkflowSectionPaths(userChatId: string, context: RequestContext): Promise<UserChatWorkflowSectionPath[]>;
//# sourceMappingURL=workflow.repository.d.ts.map