Skip to content

Commit 6ffe6be

Browse files
committed
v2.0.2 add .js to sha256 import
add more options to types
1 parent 39b5cdb commit 6ffe6be

File tree

3 files changed

+66
-2
lines changed

3 files changed

+66
-2
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "urlbox",
3-
"version": "2.0.1",
3+
"version": "2.0.2",
44
"description": "Generate screenshots, PDFs and other renders from URLs or HTML using the urlbox.io screenshot as a service API",
55
"scripts": {
66
"test": "vitest --run",

src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"use strict";
22
import qs from "qs";
3-
import hmacSha256 from "crypto-js/hmac-sha256";
3+
import hmacSha256 from "crypto-js/hmac-sha256.js";
44
import { RenderOptions } from "./types";
55

66
const DEFAULT_PREFIX = "https://api.urlbox.io/v1/";

src/types.ts

+64
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,70 @@ type CommonOptions = Partial<{
204204
video_chrome_height: number;
205205
video_crop_w: number;
206206
video_jitter: number;
207+
208+
disable_mql: boolean;
209+
disable_resize: boolean;
210+
disable_events: string | string[];
211+
optimise: boolean;
212+
skip_fonts: boolean;
213+
scroll_height: number;
214+
accept_lang: string;
215+
authorization: string;
216+
pdf_show_header: boolean;
217+
pdf_show_footer: boolean;
218+
219+
pdf_auto_crop: boolean;
220+
download: string;
221+
no_suffix: boolean;
222+
referer: string;
223+
referrer: string;
224+
disable_ligatures: boolean;
225+
accept_dialogs: boolean;
226+
custom_id: any;
227+
renderer: string;
228+
skip_wait: boolean | undefined;
229+
skip_wait_for_modifications: any;
230+
skip_wait_for_images: any;
231+
watermark_url: string;
232+
watermark_width: string;
233+
watermark_height: string;
234+
watermark_bgcolor: string;
235+
watermark_opacity: number;
236+
watermark_blend: string;
237+
watermark_repeat: string;
238+
watermark_position: string;
239+
watermark_angle: string;
240+
watermark_style: any;
241+
img_fit: "cover" | "contain" | "fill" | "inside" | "outside";
242+
img_bg: string;
243+
img_position:
244+
| "top"
245+
| "right top"
246+
| "right"
247+
| "right bottom"
248+
| "bottom"
249+
| "left bottom"
250+
| "left"
251+
| "left top"
252+
| "center"
253+
| "centre"
254+
| "north"
255+
| "northeast"
256+
| "east"
257+
| "southeast"
258+
| "south"
259+
| "southwest"
260+
| "west"
261+
| "northwest"
262+
| "center"
263+
| "centre"
264+
| "entropy"
265+
| "attention";
266+
srgb: boolean;
267+
rgb: boolean;
268+
gamma24: boolean;
269+
response_type: "json" | "jsondebug" | "binary" | "base64" | "none";
270+
global_timeout: number;
207271
}>;
208272

209273
const formats = [

0 commit comments

Comments
 (0)