@@ -36,14 +36,16 @@ export type ActionsRegistryActionOptions<
|
||||
name: string;
|
||||
title: string;
|
||||
description: string;
|
||||
schema?: {
|
||||
input?: (zod: typeof z) => TInputSchema;
|
||||
output?: (zod: typeof z) => TOutputSchema;
|
||||
schema: {
|
||||
input: (zod: typeof z) => TInputSchema;
|
||||
output: (zod: typeof z) => TOutputSchema;
|
||||
};
|
||||
action: (
|
||||
context: ActionsRegistryActionContext<TInputSchema>,
|
||||
) => Promise<
|
||||
TOutputSchema extends ZodType ? { output: z.infer<TOutputSchema> } : void
|
||||
z.infer<TOutputSchema> extends void
|
||||
? void
|
||||
: { output: z.infer<TOutputSchema> }
|
||||
>;
|
||||
};
|
||||
|
||||
|
||||
@@ -25,9 +25,9 @@ export type ActionsServiceAction = {
|
||||
name: string;
|
||||
title: string;
|
||||
description: string;
|
||||
schema?: {
|
||||
input?: JSONSchema7;
|
||||
output?: JSONSchema7;
|
||||
schema: {
|
||||
input: JSONSchema7;
|
||||
output: JSONSchema7;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -35,10 +35,10 @@ export type ActionsServiceAction = {
|
||||
* @public
|
||||
*/
|
||||
export interface ActionsService {
|
||||
listActions: (opts: {
|
||||
list: (opts: {
|
||||
credentials: BackstageCredentials;
|
||||
}) => Promise<{ actions: ActionsServiceAction[] }>;
|
||||
invokeAction(opts: {
|
||||
invoke(opts: {
|
||||
id: string;
|
||||
input?: JsonObject;
|
||||
credentials: BackstageCredentials;
|
||||
|
||||
Reference in New Issue
Block a user