Files
server-serverless-e2e-mqxtf1ju/packages/functions/.pikku/workflow/pikku-workflow-map.gen.d.ts
2026-06-28 15:19:06 +02:00

47 lines
1.1 KiB
TypeScript

/**
* This file was generated by @pikku/cli@0.12.48
*/
/**
* 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>;
}