import { Trigger } from './trigger/trigger'; import { Action } from './action/action'; import { EventPayload, ParseEventResponse, PieceCategory } from '@activepieces/shared'; import { PieceBase, PieceMetadata } from './piece-metadata'; import { PieceAuthProperty } from './property/authentication'; import { ServerContext } from './context'; import { ContextVersion } from './context/versioning'; export declare class Piece implements Omit { readonly displayName: string; readonly logoUrl: string; readonly authors: string[]; readonly events: PieceEventProcessors | undefined; readonly categories: PieceCategory[]; readonly auth?: PieceAuth | undefined; readonly minimumSupportedRelease: string; readonly maximumSupportedRelease?: string | undefined; readonly description: string; private readonly _actions; private readonly _triggers; getContextInfo: (() => { version: ContextVersion; }) | undefined; constructor(displayName: string, logoUrl: string, authors: string[], events: PieceEventProcessors | undefined, actions: Action[], triggers: Trigger[], categories: PieceCategory[], auth?: PieceAuth | undefined, minimumSupportedRelease?: string, maximumSupportedRelease?: string | undefined, description?: string); metadata(): BackwardCompatiblePieceMetadata; getAction(actionName: string): Action | undefined; getTrigger(triggerName: string): Trigger | undefined; actions(): Record; triggers(): Record; } export declare const createPiece: (params: CreatePieceParams) => Piece; type CreatePieceParams = { displayName: string; logoUrl: string; authors: string[]; description?: string; auth: PieceAuth | undefined; events?: PieceEventProcessors; minimumSupportedRelease?: string; maximumSupportedRelease?: string; actions: Action[]; triggers: Trigger[]; categories?: PieceCategory[]; }; type PieceEventProcessors = { parseAndReply: (ctx: { payload: EventPayload; server: Omit; }) => ParseEventResponse; verify: (ctx: { webhookSecret: string | Record; payload: EventPayload; appWebhookUrl: string; }) => boolean; }; type BackwardCompatiblePieceMetadata = Omit & { authors?: PieceMetadata['authors']; i18n?: PieceMetadata['i18n']; }; export {}; //# sourceMappingURL=piece.d.ts.map