Skip to content

Commit 994f048

Browse files
Merge pull request #8 from websiteshot/update-request-params
update params
2 parents ad7ec2c + 344b847 commit 994f048

File tree

4 files changed

+20
-3
lines changed

4 files changed

+20
-3
lines changed

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@websiteshot/nodejs-client",
3-
"version": "0.0.8",
3+
"version": "0.0.9",
44
"description": "NodeJS Client for Websiteshot.",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",

src/types/ScreenshotParameter.type.ts

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ export interface ScreenshotParameter {
22
name?: string
33
width: number
44
height: number
5+
tags?: string[]
56
fullPage?: boolean
67
loginParameter?: LoginParameter
78
style?: BrowserFrameStyle
@@ -16,13 +17,20 @@ export enum BrowserFrameStyle {
1617

1718
export interface ImageEffectConfig {
1819
effect: ImageEffect
19-
options?: ShadowOptions | EffectBlurOptions | EffectResizeOptions
20+
options?:
21+
| ShadowOptions
22+
| EffectBlurOptions
23+
| EffectResizeOptions
24+
| EffectRoundCornersOptions
25+
| EffectMarginOptions
2026
}
2127

2228
export enum ImageEffect {
2329
RESIZE = 'resize',
2430
BLUR = 'blur',
2531
SHADOW = 'shadow',
32+
ROUNDCORNERS = 'roundcorners',
33+
MARGIN = 'margin',
2634
}
2735

2836
export interface EffectBlurOptions {
@@ -34,6 +42,14 @@ export interface EffectResizeOptions {
3442
height?: number
3543
}
3644

45+
export interface EffectRoundCornersOptions {
46+
radius: number
47+
}
48+
49+
export interface EffectMarginOptions {
50+
margin: number
51+
}
52+
3753
export interface LoginParameter {
3854
username: {
3955
username: string

src/websiteshot.controller.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ export class WebsiteshotController {
2626
data = {
2727
scheduledTs: request.scheduledTs,
2828
scheduleDescription: request.scheduleDescription,
29+
urls: request.urls ? request.urls : undefined,
2930
}
3031
} else if (request.screenshotParameter && request.urls) {
3132
url = `${BASE_URL}/${Route.API}/${Route.PROJECTS}/${this.config.projectId}`

0 commit comments

Comments
 (0)