Files
server-serverless-e2e-mqxnlema/packages/functions/.pikku/http/pikku-http-wirings-map.gen.d.ts
2026-06-28 12:36:05 +02:00

151 lines
6.3 KiB
TypeScript

/**
* This file was generated by @pikku/cli@0.12.48
*/
/**
* This provides the structure needed for typescript to be aware of routes and their return types
*/
import type { StreamWorkflowRunInput, StreamFunctionTestsOutput } from '@pikku/addon-console/dist/.pikku/rpc/pikku-rpc-wirings-map.internal.gen'
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; }
export type AuthHandlerOutput = Promise<any> | Promise<void>
export type DeleteAgentThreadInput = { threadId: string; resourceId?: string; }
export type DeleteAgentThreadOutput = { deleted: boolean; }
export type EdgeEchoInput = {
message: string;
}
export type EdgeEchoOutput = {
echoed: string;
serverless: boolean;
}
export type GetAgentThreadMessagesInput = { threadId: string; resourceId?: string; }
export type GetAgentThreadMessagesOutput = any[]
export type GetAgentThreadRunsInput = { threadId: string; resourceId?: string; }
export type GetAgentThreadRunsOutput = any[]
export type GetAgentThreadsInput = { agentName?: string; resourceId?: string; limit?: number; offset?: number; }
export type GetAgentThreadsOutput = any[]
export type GetMessageInput = {}
export type GetMessageOutput = {
message: string;
updatedAt: string;
updatedBy: {
email: string;
name: string | null;
} | null;
}
export type GetSessionInput = {}
export type GetSessionOutput = {
userId: string;
email: string;
name: string | null;
}
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 RemoteRPCHandlerInput = { rpcName: string; data?: unknown; }
export type RpcCallerInput = { rpcName: string; data?: unknown; }
export type SecretSchema_betterAuthSecret = string
export type ServerCounterInput = {}
export type ServerCounterOutput = {
count: number;
pid: number;
}
export type ServerUptimeInput = {}
export type ServerUptimeOutput = {
uptimeSeconds: number;
nodeVersion: string;
rssMb: number;
}
export type UpdateMessageInput = {
message: string;
}
export type UpdateMessageOutput = {
message: string;
updatedAt: string;
updatedBy: {
email: string;
name: string | null;
} | null;
}
// The '& {}' is a workaround for not directly refering to a type since it confuses typescript
export type AgentCallerInputParams = Pick<AgentCallerInput, 'agentName'> & {}
export type AgentCallerInputBody = Omit<AgentCallerInput, 'agentName'> & {}
export type AgentStreamCallerInputParams = Pick<AgentStreamCallerInput, 'agentName'> & {}
export type AgentStreamCallerInputBody = Omit<AgentStreamCallerInput, 'agentName'> & {}
export type AgentApproveCallerInputParams = Pick<AgentApproveCallerInput, 'agentName'> & {}
export type AgentApproveCallerInputBody = Omit<AgentApproveCallerInput, 'agentName'> & {}
export type AgentResumeCallerInputParams = Pick<AgentResumeCallerInput, 'agentName'> & {}
export type AgentResumeCallerInputBody = Omit<AgentResumeCallerInput, 'agentName'> & {}
export type StreamWorkflowRunInputParams = Pick<StreamWorkflowRunInput, 'runId'> & {}
export type StreamWorkflowRunInputBody = Omit<StreamWorkflowRunInput, 'runId'> & {}
export type RpcCallerInputParams = Pick<RpcCallerInput, 'rpcName'> & {}
export type RpcCallerInputBody = Omit<RpcCallerInput, 'rpcName'> & {}
export type RemoteRPCHandlerInputParams = Pick<RemoteRPCHandlerInput, 'rpcName'> & {}
export type RemoteRPCHandlerInputBody = Omit<RemoteRPCHandlerInput, 'rpcName'> & {}
export type ServerUptimeInputBody = ServerUptimeInput & {}
export type ServerCounterInputBody = ServerCounterInput & {}
interface HTTPWiringHandler<I, O> {
input: I;
output: O;
}
export type HTTPWiringsMap = {
readonly '/api/auth{/*splat}': {
readonly GET: HTTPWiringHandler<null, AuthHandlerOutput>,
readonly POST: HTTPWiringHandler<null, AuthHandlerOutput>,
},
readonly '/workflow-run/:runId/stream': {
readonly GET: HTTPWiringHandler<StreamWorkflowRunInput, null>,
},
readonly '/function-tests/stream': {
readonly GET: HTTPWiringHandler<null, StreamFunctionTestsOutput>,
},
readonly '/rpc/agent/:agentName': {
readonly POST: HTTPWiringHandler<AgentCallerInput, null>,
},
readonly '/rpc/agent/:agentName/stream': {
readonly POST: HTTPWiringHandler<AgentStreamCallerInput, null>,
},
readonly '/rpc/agent/:agentName/approve': {
readonly POST: HTTPWiringHandler<AgentApproveCallerInput, null>,
},
readonly '/rpc/agent/:agentName/resume': {
readonly POST: HTTPWiringHandler<AgentResumeCallerInput, null>,
},
readonly '/rpc/:rpcName': {
readonly POST: HTTPWiringHandler<RpcCallerInput, null>,
},
readonly '/remote/rpc/:rpcName': {
readonly POST: HTTPWiringHandler<RemoteRPCHandlerInput, null>,
},
readonly '/server/uptime': {
readonly POST: HTTPWiringHandler<ServerUptimeInput, ServerUptimeOutput>,
},
readonly '/server/counter': {
readonly POST: HTTPWiringHandler<ServerCounterInput, ServerCounterOutput>,
},
};
export type HTTPWiringHandlerOf<HTTPWiring extends keyof HTTPWiringsMap, Method extends keyof HTTPWiringsMap[HTTPWiring]> =
HTTPWiringsMap[HTTPWiring][Method] extends { input: infer I; output: infer O }
? HTTPWiringHandler<I, O>
: never;
export type HTTPWiringsWithMethod<Method extends string> = {
[HTTPWiring in keyof HTTPWiringsMap]: Method extends keyof HTTPWiringsMap[HTTPWiring] ? HTTPWiring : never;
}[keyof HTTPWiringsMap];