/**
 * This file was generated by @pikku/cli@0.12.23
 */
/**
 * Workflow type map with input/output types for each workflow
 */




// Addon package Workflow maps
import type { WorkflowMap as ConsoleWorkflowMap } from '@pikku/addon-console/.pikku/workflow/pikku-workflow-map.gen.d.js'


interface WorkflowHandler<I, O> {
    input: I;
    output: O;
}

interface GraphNodeHandler<I> {
    input: I;
}

export type WorkflowMap = {
};

export type GraphsMap = {
};

type PrefixWorkflowKeys<T, Prefix extends string> = unknown extends T ? {} : {
  [K in keyof T as `${Prefix}:${string & K}`]: T[K]
}

export type FlattenedWorkflowMap =
  WorkflowMap & PrefixWorkflowKeys<ConsoleWorkflowMap, 'console'>


export type WorkflowClient<Name extends keyof FlattenedWorkflowMap> = {
  start: (input: FlattenedWorkflowMap[Name]['input']) => Promise<{ runId: string }>;
  getRun: <output extends keyof FlattenedWorkflowMap[Name]>(runId: string) => Promise<FlattenedWorkflowMap[Name][output]>;
  cancelRun: (runId: string) => Promise<boolean>;
}

export type TypedWorkflowClients = {
  [Name in keyof FlattenedWorkflowMap]: WorkflowClient<Name>;
}
