import { z } from 'zod'; import { ActionContext } from '../context'; import { ActionBase } from '../piece-metadata'; import { InputPropertyMap } from '../property'; import { ExtractPieceAuthPropertyTypeForMethods, PieceAuthProperty } from '../property/authentication'; export type ActionRunner = (ctx: ActionContext) => Promise; export declare const ErrorHandlingOptionsParam: z.ZodObject<{ retryOnFailure: z.ZodObject<{ defaultValue: z.ZodOptional; hide: z.ZodOptional; }, z.core.$strip>; continueOnFailure: z.ZodObject<{ defaultValue: z.ZodOptional; hide: z.ZodOptional; }, z.core.$strip>; }, z.core.$strip>; export type ErrorHandlingOptionsParam = z.infer; type CreateActionParams = { /** * A dummy parameter used to infer {@code PieceAuth} type */ name: string; /** * this parameter is used to infer the type of the piece auth value in run and test methods */ auth?: PieceAuth; displayName: string; description: string; props: ActionProps; run: ActionRunner, ActionProps>; test?: ActionRunner, ActionProps>; requireAuth?: boolean; errorHandlingOptions?: ErrorHandlingOptionsParam; }; export declare class IAction implements ActionBase { readonly name: string; readonly displayName: string; readonly description: string; readonly props: ActionProps; readonly run: ActionRunner, ActionProps>; readonly test: ActionRunner, ActionProps>; readonly requireAuth: boolean; readonly errorHandlingOptions: ErrorHandlingOptionsParam; constructor(name: string, displayName: string, description: string, props: ActionProps, run: ActionRunner, ActionProps>, test: ActionRunner, ActionProps>, requireAuth: boolean, errorHandlingOptions: ErrorHandlingOptionsParam); } export type Action = IAction; export declare const createAction: (params: CreateActionParams) => IAction; export {}; //# sourceMappingURL=action.d.ts.map