From 0322d85e5aacb4f115a9cb0f050d6bd319c37715 Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Fri, 21 Jun 2024 22:23:03 +0530 Subject: [PATCH] feat: global workflow action types --- src/shared/types.ts | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 src/shared/types.ts diff --git a/src/shared/types.ts b/src/shared/types.ts new file mode 100644 index 00000000..72e86a0e --- /dev/null +++ b/src/shared/types.ts @@ -0,0 +1,26 @@ +import { WorkflowFile } from "@wbr-project/wbr-interpret"; +import { Locator } from "playwright"; + +export type Workflow = WorkflowFile["workflow"]; + +export interface ScreenshotSettings { + animations?: "disabled" | "allow"; + caret?: "hide" | "initial"; + clip?: { + x: number; + y: number; + width: number; + height: number; + }; + fullPage?: boolean; + mask?: Locator[]; + omitBackground?: boolean; + // is this still needed? - @wbr-project/wbr-interpret outputs to a binary output + path?: string; + quality?: number; + scale?: "css" | "device"; + timeout?: number; + type?: "jpeg" | "png"; +}; + +export declare type CustomActions = 'scrape' | 'scrapeSchema' | 'scroll' | 'screenshot' | 'script' | 'enqueueLinks' | 'flag';