screenshotone-api-sdk 1.0.34 → 1.0.35

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.
@@ -281,6 +281,10 @@ export declare class TakeOptions {
281
281
  * Sets timeout.
282
282
  */
283
283
  timeout(timeout: number): TakeOptions;
284
+ /**
285
+ * Sets navigation timeout.
286
+ */
287
+ navigationTimeout(timeout: number): TakeOptions;
284
288
  /**
285
289
  * Default value is false. Use store=true to trigger upload of the taken screenshot,
286
290
  * rendered HTML or PDF to the configured S3 bucket.
@@ -506,6 +510,10 @@ export declare class AnimateOptions {
506
510
  * Sets timeout.
507
511
  */
508
512
  timeout(timeout: number): AnimateOptions;
513
+ /**
514
+ * Sets navigation timeout.
515
+ */
516
+ navigationTimeout(timeout: number): AnimateOptions;
509
517
  /**
510
518
  * Default value is false. Use store=true to trigger upload of the taken screenshot,
511
519
  * rendered HTML or PDF to the configured S3 bucket.
package/dist/main.js CHANGED
@@ -550,6 +550,13 @@ class TakeOptions {
550
550
  this.put("timeout", timeout.toString());
551
551
  return this;
552
552
  }
553
+ /**
554
+ * Sets navigation timeout.
555
+ */
556
+ navigationTimeout(timeout) {
557
+ this.put("navigation_timeout", timeout.toString());
558
+ return this;
559
+ }
553
560
  /**
554
561
  * Default value is false. Use store=true to trigger upload of the taken screenshot,
555
562
  * rendered HTML or PDF to the configured S3 bucket.
@@ -931,6 +938,13 @@ class AnimateOptions {
931
938
  this.put("timeout", timeout.toString());
932
939
  return this;
933
940
  }
941
+ /**
942
+ * Sets navigation timeout.
943
+ */
944
+ navigationTimeout(timeout) {
945
+ this.put("navigation_timeout", timeout.toString());
946
+ return this;
947
+ }
934
948
  /**
935
949
  * Default value is false. Use store=true to trigger upload of the taken screenshot,
936
950
  * 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.35",
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
  /**
@@ -651,6 +651,15 @@ export class TakeOptions {
651
651
  return this;
652
652
  }
653
653
 
654
+ /**
655
+ * Sets navigation timeout.
656
+ */
657
+ navigationTimeout(timeout: number): TakeOptions {
658
+ this.put("navigation_timeout", timeout.toString());
659
+
660
+ return this;
661
+ }
662
+
654
663
  /**
655
664
  * Default value is false. Use store=true to trigger upload of the taken screenshot,
656
665
  * rendered HTML or PDF to the configured S3 bucket.
@@ -1127,6 +1136,15 @@ export class AnimateOptions {
1127
1136
  return this;
1128
1137
  }
1129
1138
 
1139
+ /**
1140
+ * Sets navigation timeout.
1141
+ */
1142
+ navigationTimeout(timeout: number): AnimateOptions {
1143
+ this.put("navigation_timeout", timeout.toString());
1144
+
1145
+ return this;
1146
+ }
1147
+
1130
1148
  /**
1131
1149
  * Default value is false. Use store=true to trigger upload of the taken screenshot,
1132
1150
  * rendered HTML or PDF to the configured S3 bucket.