screenshotone-api-sdk 1.0.34 → 1.0.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -140,6 +140,10 @@ export declare class TakeOptions {
140
140
  * Renders the full page.
141
141
  */
142
142
  fullPage(fullPage: boolean): TakeOptions;
143
+ /**
144
+ * Max height.
145
+ */
146
+ fullPageMaxHeight(maxHeight: number): TakeOptions;
143
147
  /**
144
148
  * Sets response format, one of: "png", "jpeg", "webp" or "jpg".
145
149
  */
@@ -281,6 +285,10 @@ export declare class TakeOptions {
281
285
  * Sets timeout.
282
286
  */
283
287
  timeout(timeout: number): TakeOptions;
288
+ /**
289
+ * Sets navigation timeout.
290
+ */
291
+ navigationTimeout(timeout: number): TakeOptions;
284
292
  /**
285
293
  * Default value is false. Use store=true to trigger upload of the taken screenshot,
286
294
  * rendered HTML or PDF to the configured S3 bucket.
@@ -506,6 +514,10 @@ export declare class AnimateOptions {
506
514
  * Sets timeout.
507
515
  */
508
516
  timeout(timeout: number): AnimateOptions;
517
+ /**
518
+ * Sets navigation timeout.
519
+ */
520
+ navigationTimeout(timeout: number): AnimateOptions;
509
521
  /**
510
522
  * Default value is false. Use store=true to trigger upload of the taken screenshot,
511
523
  * rendered HTML or PDF to the configured S3 bucket.
package/dist/main.js CHANGED
@@ -313,6 +313,13 @@ class TakeOptions {
313
313
  this.put("full_page", fullPage ? "true" : "false");
314
314
  return this;
315
315
  }
316
+ /**
317
+ * Max height.
318
+ */
319
+ fullPageMaxHeight(maxHeight) {
320
+ this.put("full_page_max_height", maxHeight.toString());
321
+ return this;
322
+ }
316
323
  /**
317
324
  * Sets response format, one of: "png", "jpeg", "webp" or "jpg".
318
325
  */
@@ -550,6 +557,13 @@ class TakeOptions {
550
557
  this.put("timeout", timeout.toString());
551
558
  return this;
552
559
  }
560
+ /**
561
+ * Sets navigation timeout.
562
+ */
563
+ navigationTimeout(timeout) {
564
+ this.put("navigation_timeout", timeout.toString());
565
+ return this;
566
+ }
553
567
  /**
554
568
  * Default value is false. Use store=true to trigger upload of the taken screenshot,
555
569
  * rendered HTML or PDF to the configured S3 bucket.
@@ -931,6 +945,13 @@ class AnimateOptions {
931
945
  this.put("timeout", timeout.toString());
932
946
  return this;
933
947
  }
948
+ /**
949
+ * Sets navigation timeout.
950
+ */
951
+ navigationTimeout(timeout) {
952
+ this.put("navigation_timeout", timeout.toString());
953
+ return this;
954
+ }
934
955
  /**
935
956
  * Default value is false. Use store=true to trigger upload of the taken screenshot,
936
957
  * rendered HTML or PDF to the configured S3 bucket.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "screenshotone-api-sdk",
3
3
  "homepage": "https://screenshotone.com",
4
- "version": "1.0.34",
4
+ "version": "1.0.36",
5
5
  "description": "Use ScreenshotOne.com API to generate screenshots of any website.",
6
6
  "repository": {
7
7
  "type": "git",
package/src/main.ts CHANGED
@@ -98,7 +98,7 @@ export class Client {
98
98
  throw new Error(`failed to take screenshot, response returned ${response.status} ${response.statusText}: ${data?.message}`);
99
99
  } catch (e) {
100
100
  throw new Error(`failed to take screenshot, response returned ${response.status} ${response.statusText}`);
101
- }
101
+ }
102
102
  }
103
103
 
104
104
  /**
@@ -120,7 +120,7 @@ export class Client {
120
120
  throw new Error(`failed to generate animation, response returned ${response.status} ${response.statusText}: ${data?.message}`);
121
121
  } catch (e) {
122
122
  throw new Error(`failed to generate animation, response returned ${response.status} ${response.statusText}`);
123
- }
123
+ }
124
124
  }
125
125
 
126
126
  /**
@@ -349,6 +349,16 @@ export class TakeOptions {
349
349
  return this;
350
350
  }
351
351
 
352
+ /**
353
+ * Max height.
354
+ */
355
+ fullPageMaxHeight(maxHeight: number): TakeOptions {
356
+ this.put("full_page_max_height", maxHeight.toString());
357
+
358
+ return this;
359
+ }
360
+
361
+
352
362
  /**
353
363
  * Sets response format, one of: "png", "jpeg", "webp" or "jpg".
354
364
  */
@@ -651,6 +661,15 @@ export class TakeOptions {
651
661
  return this;
652
662
  }
653
663
 
664
+ /**
665
+ * Sets navigation timeout.
666
+ */
667
+ navigationTimeout(timeout: number): TakeOptions {
668
+ this.put("navigation_timeout", timeout.toString());
669
+
670
+ return this;
671
+ }
672
+
654
673
  /**
655
674
  * Default value is false. Use store=true to trigger upload of the taken screenshot,
656
675
  * rendered HTML or PDF to the configured S3 bucket.
@@ -1127,6 +1146,15 @@ export class AnimateOptions {
1127
1146
  return this;
1128
1147
  }
1129
1148
 
1149
+ /**
1150
+ * Sets navigation timeout.
1151
+ */
1152
+ navigationTimeout(timeout: number): AnimateOptions {
1153
+ this.put("navigation_timeout", timeout.toString());
1154
+
1155
+ return this;
1156
+ }
1157
+
1130
1158
  /**
1131
1159
  * Default value is false. Use store=true to trigger upload of the taken screenshot,
1132
1160
  * rendered HTML or PDF to the configured S3 bucket.