n8n-nodes-base
Version:
Base nodes of n8n
54 lines (50 loc) • 1.64 kB
text/typescript
/**
* One Simple API Node - Version 1
* Discriminator: resource=website, operation=screenshot
*/
interface Credentials {
oneSimpleApi: CredentialReference;
}
/** Create a screenshot from a webpage */
export type OneSimpleApiV1WebsiteScreenshotParams = {
resource: 'website';
operation: 'screenshot';
/**
* Link to webpage to convert
*/
link?: string | Expression<string> | PlaceholderValue;
/**
* Whether to download the screenshot or return a link to it
* @default false
*/
download?: boolean | Expression<boolean>;
/**
* The name of the output field to put the binary file data in
* @displayOptions.show { download: [true] }
* @default data
*/
output?: string | Expression<string> | PlaceholderValue;
/**
* Options
* @default {}
*/
options?: {
/** Screen Size
*/
screen?: 'phone' | 'phone-landscape' | 'retina' | 'tablet' | 'tablet-landscape' | Expression<string>;
/** Normally the API will reuse a previously taken screenshot of the URL to give a faster response. This option allows you to retake the screenshot at that exact time, for those times when it's necessary.
* @default false
*/
force?: boolean | Expression<boolean>;
/** The API takes a screenshot of the viewable area for the desired screen size. If you need a screenshot of the whole length of the page, use this option.
* @default false
*/
fullpage?: boolean | Expression<boolean>;
};
};
export type OneSimpleApiV1WebsiteScreenshotNode = {
type: 'n8n-nodes-base.oneSimpleApi';
version: 1;
credentials?: Credentials;
config: NodeConfig<OneSimpleApiV1WebsiteScreenshotParams>;
};