90 lines
4.5 KiB
TypeScript
90 lines
4.5 KiB
TypeScript
/**
|
|
* This file was generated by @pikku/cli@0.12.76
|
|
*/
|
|
/**
|
|
* This provides the structure needed for TypeScript to be aware of channels
|
|
*/
|
|
|
|
import type { StubCall } from '.bun/@pikku+core@0.12.57/node_modules/@pikku/core/dist/services/stub-tracker'
|
|
|
|
import type { StubCall } from '/Users/yasser/git/pikku/fabric/templates/starter-template/node_modules/.bun/@pikku+core@0.12.57/node_modules/@pikku/core/dist/services/stub-tracker.d.ts'
|
|
|
|
export type AgentApproveCallerInput = { agentName: string; runId: string; approvals: { toolCallId: string; approved: boolean; }[]; }
|
|
export type AgentCallerInput = { agentName: string; message: string; threadId: string; resourceId: string; }
|
|
export type AgentResumeCallerInput = { agentName: string; runId: string; toolCallId: string; approved: boolean; }
|
|
export type AgentStreamCallerInput = { agentName: string; message: string; threadId: string; resourceId: string; context?: string | undefined; }
|
|
export type AuthHandlerOutput = Promise<void> | Promise<any>
|
|
export type DeleteAgentThreadInput = { threadId: string; resourceId?: string | undefined; }
|
|
export type DeleteAgentThreadOutput = { deleted: boolean; }
|
|
export type GetAgentThreadMessagesInput = { threadId: string; resourceId?: string | undefined; }
|
|
export type GetAgentThreadMessagesOutput = any[]
|
|
export type GetAgentThreadRunsInput = { threadId: string; resourceId?: string | undefined; }
|
|
export type GetAgentThreadRunsOutput = any[]
|
|
export type GetAgentThreadsInput = { agentName?: string | undefined; resourceId?: string | undefined; limit?: number | undefined; offset?: number | undefined; }
|
|
export type GetAgentThreadsOutput = any[]
|
|
export type GetSessionInput = {}
|
|
export type GetSessionOutput = {
|
|
userId: string;
|
|
email: string;
|
|
name: string | null;
|
|
}
|
|
export type GraphStarterInput = { workflowName: string; nodeId: string; data?: unknown; }
|
|
export type GraphStarterOutput = { runId: string; }
|
|
export type PikkuConsoleGetSecretInput = { secretId: string; }
|
|
export type PikkuConsoleGetSecretOutput = { exists: boolean; value: unknown; }
|
|
export type PikkuConsoleGetVariableInput = { variableId: string; }
|
|
export type PikkuConsoleGetVariableOutput = { exists: boolean; value: unknown; }
|
|
export type PikkuConsoleHasSecretInput = { secretId: string; }
|
|
export type PikkuConsoleHasSecretOutput = { exists: boolean; }
|
|
export type PikkuConsoleSetSecretInput = { secretId: string; value: unknown; }
|
|
export type PikkuConsoleSetSecretOutput = { success: boolean; }
|
|
export type PikkuConsoleSetVariableInput = { variableId: string; value: unknown; }
|
|
export type PikkuConsoleSetVariableOutput = { success: boolean; }
|
|
export type PikkuScenarioGetStubCallsInput = { service?: string | undefined; }
|
|
export type PikkuScenarioGetStubCallsOutput = StubCall[]
|
|
export type PikkuScenarioResetLiveCoverageOutput = { enabled: boolean; }
|
|
export type PikkuScenarioResetStubsOutput = { enabled: boolean; }
|
|
export type RealtimeEventStreamInput = { topic: string; }
|
|
export type RealtimeSubscribeInput = { topic: string; }
|
|
export type RealtimeUnsubscribeInput = { topic: string; }
|
|
export type RpcCallerInput = { rpcName: string; data?: unknown; }
|
|
export type SecretSchema_betterAuthSecret = string
|
|
export type SessionHealthScenarioOutput = { email: string; userId: string; }
|
|
export type WorkflowRunnerInput = { workflowName: string; data?: unknown; }
|
|
export type WorkflowStarterInput = { workflowName: string; data?: unknown; }
|
|
export type WorkflowStarterOutput = { runId: string; }
|
|
export type WorkflowStatusCheckerInput = { workflowName: string; runId: string; }
|
|
export type WorkflowStatusStreamFullInput = { workflowName: string; runId: string; }
|
|
export type WorkflowStatusStreamInput = { workflowName: string; runId: string; }
|
|
|
|
interface ChannelHandler<I, O> {
|
|
input: I;
|
|
output: O;
|
|
}
|
|
|
|
export type ChannelsMap = {
|
|
readonly 'events': {
|
|
readonly routes: {
|
|
readonly action: {
|
|
readonly subscribe: ChannelHandler<RealtimeSubscribeInput, never>,
|
|
readonly unsubscribe: ChannelHandler<RealtimeUnsubscribeInput, never>,
|
|
},
|
|
},
|
|
readonly defaultMessage: never,
|
|
},
|
|
};
|
|
|
|
export type ChannelDefaultHandlerOf<Channel extends keyof ChannelsMap> =
|
|
ChannelsMap[Channel]['defaultMessage'] extends { input: infer I; output: infer O }
|
|
? ChannelHandler<I, O>
|
|
: never;
|
|
|
|
export type ChannelWiringHandlerOf<
|
|
Channel extends keyof ChannelsMap,
|
|
Route extends keyof ChannelsMap[Channel]['routes'],
|
|
Method extends keyof ChannelsMap[Channel]['routes'][Route],
|
|
> =
|
|
ChannelsMap[Channel]['routes'][Route][Method] extends { input: infer I; output: infer O }
|
|
? ChannelHandler<I, O>
|
|
: never;
|