docspring 3.1.0 → 3.3.0

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.
Files changed (64) hide show
  1. package/AGENTS.md +33 -0
  2. package/README.md +148 -215
  3. package/dist/ApiClient.js +3 -3
  4. package/dist/api/Client.js +9 -8
  5. package/dist/index.js +7 -0
  6. package/dist/model/AddFieldsData.js +2 -2
  7. package/dist/model/BatchGeneratePdfs201Response.js +17 -7
  8. package/dist/model/CombinePdfsData.js +3 -3
  9. package/dist/model/CombinedSubmission.js +13 -23
  10. package/dist/model/CombinedSubmissionAction.js +4 -2
  11. package/dist/model/CopyTemplateOptions.js +2 -2
  12. package/dist/model/CreateCombinedSubmissionResponse.js +28 -6
  13. package/dist/model/CreateCustomFileData.js +2 -2
  14. package/dist/model/CreateCustomFileResponse.js +15 -6
  15. package/dist/model/CreateFolderData.js +2 -2
  16. package/dist/model/CreateHtmlTemplate.js +2 -2
  17. package/dist/model/CreatePdfSubmissionData.js +3 -2
  18. package/dist/model/CreatePdfTemplate.js +2 -2
  19. package/dist/model/CreateSubmissionDataRequestData.js +2 -2
  20. package/dist/model/CreateSubmissionDataRequestEventRequest.js +2 -2
  21. package/dist/model/CreateSubmissionDataRequestEventResponse.js +15 -6
  22. package/dist/model/CreateSubmissionDataRequestResponse.js +15 -6
  23. package/dist/model/CreateSubmissionDataRequestTokenResponse.js +15 -6
  24. package/dist/model/CreateSubmissionResponse.js +28 -6
  25. package/dist/model/CreateWebhookData.js +2 -2
  26. package/dist/model/CustomFile.js +4 -2
  27. package/dist/model/ErrorOrMultipleErrorsResponse.js +4 -2
  28. package/dist/model/ErrorResponse.js +4 -2
  29. package/dist/model/Folder.js +4 -2
  30. package/dist/model/ForbiddenErrorResponse.js +173 -0
  31. package/dist/model/JsonSchema.js +2 -2
  32. package/dist/model/ListSubmissionsResponse.js +7 -22
  33. package/dist/model/MoveFolderData.js +2 -2
  34. package/dist/model/MoveTemplateData.js +2 -2
  35. package/dist/model/MultipleErrorsResponse.js +4 -2
  36. package/dist/model/PublishVersionData.js +2 -2
  37. package/dist/model/RenameFolderData.js +2 -2
  38. package/dist/model/RestoreVersionData.js +2 -2
  39. package/dist/model/Submission.js +15 -42
  40. package/dist/model/Submission422Response.js +4 -7
  41. package/dist/model/SubmissionAction.js +4 -2
  42. package/dist/model/SubmissionBatch.js +4 -2
  43. package/dist/model/SubmissionBatchData.js +3 -2
  44. package/dist/model/SubmissionBatchWithSubmissions.js +7 -22
  45. package/dist/model/SubmissionDataRequest.js +4 -2
  46. package/dist/model/SubmissionDataRequestEvent.js +4 -2
  47. package/dist/model/SubmissionDataRequestShow.js +4 -2
  48. package/dist/model/SubmissionDataRequestToken.js +4 -2
  49. package/dist/model/SubmissionPreview.js +15 -42
  50. package/dist/model/SuccessErrorResponse.js +4 -2
  51. package/dist/model/SuccessMultipleErrorsResponse.js +4 -2
  52. package/dist/model/Template.js +18 -6
  53. package/dist/model/TemplateAddFieldsResponse.js +4 -2
  54. package/dist/model/TemplateDeleteResponse.js +4 -2
  55. package/dist/model/TemplateModelCodeResponse.js +4 -2
  56. package/dist/model/TemplatePreview.js +18 -6
  57. package/dist/model/TemplatePublishVersionResponse.js +4 -2
  58. package/dist/model/UpdateHtmlTemplate.js +2 -2
  59. package/dist/model/UpdatePdfTemplate.js +2 -2
  60. package/dist/model/UpdateSubmissionDataRequestData.js +2 -2
  61. package/dist/model/UpdateWebhookData.js +2 -2
  62. package/dist/model/UploadPresignResponse.js +4 -2
  63. package/dist/model/Webhook.js +4 -2
  64. package/package.json +13 -3
@@ -13,7 +13,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
13
13
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
14
14
  function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r; if ("undefined" != typeof Symbol && void 0 !== (r = t[Symbol.toPrimitive])) { var i = r.call(t, e || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === e ? String : Number)(t); } /**
15
15
  * DocSpring API
16
- * Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
16
+ * Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures. Requests are rate limited per account, and live PDFs use credits: a request over the limit returns 429 with a Retry-After header, and one your credits can't cover returns 402. See [Credits & Rate Limits](https://docspring.com/docs/api-guide/credits-and-rate-limits/).
17
17
  *
18
18
  * The version of the OpenAPI document: v1
19
19
  *
@@ -26,7 +26,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
26
26
  /**
27
27
  * The MoveFolderData model module.
28
28
  * @module model/MoveFolderData
29
- * @version 3.1.0
29
+ * @version 3.3.0
30
30
  */
31
31
  var MoveFolderData = /*#__PURE__*/function () {
32
32
  /**
@@ -16,7 +16,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
16
16
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
17
17
  function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r; if ("undefined" != typeof Symbol && void 0 !== (r = t[Symbol.toPrimitive])) { var i = r.call(t, e || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === e ? String : Number)(t); } /**
18
18
  * DocSpring API
19
- * Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
19
+ * Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures. Requests are rate limited per account, and live PDFs use credits: a request over the limit returns 429 with a Retry-After header, and one your credits can't cover returns 402. See [Credits & Rate Limits](https://docspring.com/docs/api-guide/credits-and-rate-limits/).
20
20
  *
21
21
  * The version of the OpenAPI document: v1
22
22
  *
@@ -29,7 +29,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
29
29
  /**
30
30
  * The MoveTemplateData model module.
31
31
  * @module model/MoveTemplateData
32
- * @version 3.1.0
32
+ * @version 3.3.0
33
33
  */
34
34
  var MoveTemplateData = /*#__PURE__*/function () {
35
35
  /**
@@ -16,7 +16,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
16
16
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
17
17
  function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r; if ("undefined" != typeof Symbol && void 0 !== (r = t[Symbol.toPrimitive])) { var i = r.call(t, e || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === e ? String : Number)(t); } /**
18
18
  * DocSpring API
19
- * Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
19
+ * Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures. Requests are rate limited per account, and live PDFs use credits: a request over the limit returns 429 with a Retry-After header, and one your credits can't cover returns 402. See [Credits & Rate Limits](https://docspring.com/docs/api-guide/credits-and-rate-limits/).
20
20
  *
21
21
  * The version of the OpenAPI document: v1
22
22
  *
@@ -29,12 +29,13 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
29
29
  /**
30
30
  * The MultipleErrorsResponse model module.
31
31
  * @module model/MultipleErrorsResponse
32
- * @version 3.1.0
32
+ * @version 3.3.0
33
33
  */
34
34
  var MultipleErrorsResponse = /*#__PURE__*/function () {
35
35
  /**
36
36
  * Constructs a new <code>MultipleErrorsResponse</code>.
37
37
  * @alias module:model/MultipleErrorsResponse
38
+ * @extends Object
38
39
  * @param status {module:model/MultipleErrorsResponse.StatusEnum}
39
40
  * @param errors {Array.<String>}
40
41
  */
@@ -67,6 +68,7 @@ var MultipleErrorsResponse = /*#__PURE__*/function () {
67
68
  value: function constructFromObject(data, obj) {
68
69
  if (data) {
69
70
  obj = obj || new MultipleErrorsResponse();
71
+ _ApiClient["default"].constructFromObject(data, obj, 'Object');
70
72
  if (data.hasOwnProperty('status')) {
71
73
  obj['status'] = _ApiClient["default"].convertToType(data['status'], 'String');
72
74
  }
@@ -16,7 +16,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
16
16
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
17
17
  function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r; if ("undefined" != typeof Symbol && void 0 !== (r = t[Symbol.toPrimitive])) { var i = r.call(t, e || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === e ? String : Number)(t); } /**
18
18
  * DocSpring API
19
- * Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
19
+ * Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures. Requests are rate limited per account, and live PDFs use credits: a request over the limit returns 429 with a Retry-After header, and one your credits can't cover returns 402. See [Credits & Rate Limits](https://docspring.com/docs/api-guide/credits-and-rate-limits/).
20
20
  *
21
21
  * The version of the OpenAPI document: v1
22
22
  *
@@ -29,7 +29,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
29
29
  /**
30
30
  * The PublishVersionData model module.
31
31
  * @module model/PublishVersionData
32
- * @version 3.1.0
32
+ * @version 3.3.0
33
33
  */
34
34
  var PublishVersionData = /*#__PURE__*/function () {
35
35
  /**
@@ -16,7 +16,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
16
16
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
17
17
  function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r; if ("undefined" != typeof Symbol && void 0 !== (r = t[Symbol.toPrimitive])) { var i = r.call(t, e || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === e ? String : Number)(t); } /**
18
18
  * DocSpring API
19
- * Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
19
+ * Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures. Requests are rate limited per account, and live PDFs use credits: a request over the limit returns 429 with a Retry-After header, and one your credits can't cover returns 402. See [Credits & Rate Limits](https://docspring.com/docs/api-guide/credits-and-rate-limits/).
20
20
  *
21
21
  * The version of the OpenAPI document: v1
22
22
  *
@@ -29,7 +29,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
29
29
  /**
30
30
  * The RenameFolderData model module.
31
31
  * @module model/RenameFolderData
32
- * @version 3.1.0
32
+ * @version 3.3.0
33
33
  */
34
34
  var RenameFolderData = /*#__PURE__*/function () {
35
35
  /**
@@ -16,7 +16,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
16
16
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
17
17
  function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r; if ("undefined" != typeof Symbol && void 0 !== (r = t[Symbol.toPrimitive])) { var i = r.call(t, e || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === e ? String : Number)(t); } /**
18
18
  * DocSpring API
19
- * Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
19
+ * Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures. Requests are rate limited per account, and live PDFs use credits: a request over the limit returns 429 with a Retry-After header, and one your credits can't cover returns 402. See [Credits & Rate Limits](https://docspring.com/docs/api-guide/credits-and-rate-limits/).
20
20
  *
21
21
  * The version of the OpenAPI document: v1
22
22
  *
@@ -29,7 +29,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
29
29
  /**
30
30
  * The RestoreVersionData model module.
31
31
  * @module model/RestoreVersionData
32
- * @version 3.1.0
32
+ * @version 3.3.0
33
33
  */
34
34
  var RestoreVersionData = /*#__PURE__*/function () {
35
35
  /**
@@ -18,7 +18,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
18
18
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
19
19
  function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r; if ("undefined" != typeof Symbol && void 0 !== (r = t[Symbol.toPrimitive])) { var i = r.call(t, e || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === e ? String : Number)(t); } /**
20
20
  * DocSpring API
21
- * Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
21
+ * Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures. Requests are rate limited per account, and live PDFs use credits: a request over the limit returns 429 with a Retry-After header, and one your credits can't cover returns 402. See [Credits & Rate Limits](https://docspring.com/docs/api-guide/credits-and-rate-limits/).
22
22
  *
23
23
  * The version of the OpenAPI document: v1
24
24
  *
@@ -31,12 +31,13 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
31
31
  /**
32
32
  * The Submission model module.
33
33
  * @module model/Submission
34
- * @version 3.1.0
34
+ * @version 3.3.0
35
35
  */
36
36
  var Submission = /*#__PURE__*/function () {
37
37
  /**
38
38
  * Constructs a new <code>Submission</code>.
39
39
  * @alias module:model/Submission
40
+ * @extends Object
40
41
  * @param batch_id {String}
41
42
  * @param data_requests {Array.<module:model/SubmissionDataRequest>}
42
43
  * @param editable {Boolean}
@@ -113,6 +114,7 @@ var Submission = /*#__PURE__*/function () {
113
114
  value: function constructFromObject(data, obj) {
114
115
  if (data) {
115
116
  obj = obj || new Submission();
117
+ _ApiClient["default"].constructFromObject(data, obj, 'Object');
116
118
  if (data.hasOwnProperty('batch_id')) {
117
119
  obj['batch_id'] = _ApiClient["default"].convertToType(data['batch_id'], 'String');
118
120
  }
@@ -225,26 +227,9 @@ var Submission = /*#__PURE__*/function () {
225
227
  if (data['batch_id'] && !(typeof data['batch_id'] === 'string' || data['batch_id'] instanceof String)) {
226
228
  throw new Error("Expected the field `batch_id` to be a primitive type in the JSON string but got " + data['batch_id']);
227
229
  }
228
- if (data['data_requests']) {
229
- // data not null
230
- // ensure the json data is an array
231
- if (!Array.isArray(data['data_requests'])) {
232
- throw new Error("Expected the field `data_requests` to be an array in the JSON data but got " + data['data_requests']);
233
- }
234
- // validate the optional field `data_requests` (array)
235
- var _iterator2 = _createForOfIteratorHelper(data['data_requests']),
236
- _step2;
237
- try {
238
- for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
239
- var item = _step2.value;
240
- _SubmissionDataRequest["default"].validateJSON(item);
241
- }
242
- } catch (err) {
243
- _iterator2.e(err);
244
- } finally {
245
- _iterator2.f();
246
- }
247
- ;
230
+ // ensure the json data is an array
231
+ if (!Array.isArray(data['data_requests'])) {
232
+ throw new Error("Expected the field `data_requests` to be an array in the JSON data but got " + data['data_requests']);
248
233
  }
249
234
  // ensure the json data is a string
250
235
  if (data['error_message'] && !(typeof data['error_message'] === 'string' || data['error_message'] instanceof String)) {
@@ -310,26 +295,9 @@ var Submission = /*#__PURE__*/function () {
310
295
  if (data['audit_trail_download_url'] && !(typeof data['audit_trail_download_url'] === 'string' || data['audit_trail_download_url'] instanceof String)) {
311
296
  throw new Error("Expected the field `audit_trail_download_url` to be a primitive type in the JSON string but got " + data['audit_trail_download_url']);
312
297
  }
313
- if (data['actions']) {
314
- // data not null
315
- // ensure the json data is an array
316
- if (!Array.isArray(data['actions'])) {
317
- throw new Error("Expected the field `actions` to be an array in the JSON data but got " + data['actions']);
318
- }
319
- // validate the optional field `actions` (array)
320
- var _iterator3 = _createForOfIteratorHelper(data['actions']),
321
- _step3;
322
- try {
323
- for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
324
- var _item = _step3.value;
325
- _SubmissionAction["default"].validateJSON(_item);
326
- }
327
- } catch (err) {
328
- _iterator3.e(err);
329
- } finally {
330
- _iterator3.f();
331
- }
332
- ;
298
+ // ensure the json data is an array
299
+ if (!Array.isArray(data['actions'])) {
300
+ throw new Error("Expected the field `actions` to be an array in the JSON data but got " + data['actions']);
333
301
  }
334
302
  // ensure the json data is a string
335
303
  if (data['source'] && !(typeof data['source'] === 'string' || data['source'] instanceof String)) {
@@ -526,6 +494,11 @@ Submission['StateEnum'] = {
526
494
  * @const
527
495
  */
528
496
  "syntax_error": "syntax_error",
497
+ /**
498
+ * value: "insufficient_credits"
499
+ * @const
500
+ */
501
+ "insufficient_credits": "insufficient_credits",
529
502
  /**
530
503
  * value: "account_suspended"
531
504
  * @const
@@ -17,7 +17,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
17
17
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
18
18
  function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r; if ("undefined" != typeof Symbol && void 0 !== (r = t[Symbol.toPrimitive])) { var i = r.call(t, e || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === e ? String : Number)(t); } /**
19
19
  * DocSpring API
20
- * Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
20
+ * Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures. Requests are rate limited per account, and live PDFs use credits: a request over the limit returns 429 with a Retry-After header, and one your credits can't cover returns 402. See [Credits & Rate Limits](https://docspring.com/docs/api-guide/credits-and-rate-limits/).
21
21
  *
22
22
  * The version of the OpenAPI document: v1
23
23
  *
@@ -30,12 +30,13 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
30
30
  /**
31
31
  * The Submission422Response model module.
32
32
  * @module model/Submission422Response
33
- * @version 3.1.0
33
+ * @version 3.3.0
34
34
  */
35
35
  var Submission422Response = /*#__PURE__*/function () {
36
36
  /**
37
37
  * Constructs a new <code>Submission422Response</code>.
38
38
  * @alias module:model/Submission422Response
39
+ * @extends Object
39
40
  * @param status {module:model/Submission422Response.StatusEnum}
40
41
  */
41
42
  function Submission422Response(status) {
@@ -66,6 +67,7 @@ var Submission422Response = /*#__PURE__*/function () {
66
67
  value: function constructFromObject(data, obj) {
67
68
  if (data) {
68
69
  obj = obj || new Submission422Response();
70
+ _ApiClient["default"].constructFromObject(data, obj, 'Object');
69
71
  if (data.hasOwnProperty('status')) {
70
72
  obj['status'] = _ApiClient["default"].convertToType(data['status'], 'String');
71
73
  }
@@ -113,11 +115,6 @@ var Submission422Response = /*#__PURE__*/function () {
113
115
  if (data['error'] && !(typeof data['error'] === 'string' || data['error'] instanceof String)) {
114
116
  throw new Error("Expected the field `error` to be a primitive type in the JSON string but got " + data['error']);
115
117
  }
116
- // validate the optional field `submission`
117
- if (data['submission']) {
118
- // data not null
119
- _SubmissionPreview["default"].validateJSON(data['submission']);
120
- }
121
118
  // ensure the json data is an array
122
119
  if (!Array.isArray(data['errors'])) {
123
120
  throw new Error("Expected the field `errors` to be an array in the JSON data but got " + data['errors']);
@@ -16,7 +16,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
16
16
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
17
17
  function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r; if ("undefined" != typeof Symbol && void 0 !== (r = t[Symbol.toPrimitive])) { var i = r.call(t, e || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === e ? String : Number)(t); } /**
18
18
  * DocSpring API
19
- * Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
19
+ * Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures. Requests are rate limited per account, and live PDFs use credits: a request over the limit returns 429 with a Retry-After header, and one your credits can't cover returns 402. See [Credits & Rate Limits](https://docspring.com/docs/api-guide/credits-and-rate-limits/).
20
20
  *
21
21
  * The version of the OpenAPI document: v1
22
22
  *
@@ -29,12 +29,13 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
29
29
  /**
30
30
  * The SubmissionAction model module.
31
31
  * @module model/SubmissionAction
32
- * @version 3.1.0
32
+ * @version 3.3.0
33
33
  */
34
34
  var SubmissionAction = /*#__PURE__*/function () {
35
35
  /**
36
36
  * Constructs a new <code>SubmissionAction</code>.
37
37
  * @alias module:model/SubmissionAction
38
+ * @extends Object
38
39
  * @param id {String}
39
40
  * @param integration_id {String}
40
41
  * @param state {module:model/SubmissionAction.StateEnum}
@@ -77,6 +78,7 @@ var SubmissionAction = /*#__PURE__*/function () {
77
78
  value: function constructFromObject(data, obj) {
78
79
  if (data) {
79
80
  obj = obj || new SubmissionAction();
81
+ _ApiClient["default"].constructFromObject(data, obj, 'Object');
80
82
  if (data.hasOwnProperty('id')) {
81
83
  obj['id'] = _ApiClient["default"].convertToType(data['id'], 'String');
82
84
  }
@@ -16,7 +16,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
16
16
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
17
17
  function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r; if ("undefined" != typeof Symbol && void 0 !== (r = t[Symbol.toPrimitive])) { var i = r.call(t, e || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === e ? String : Number)(t); } /**
18
18
  * DocSpring API
19
- * Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
19
+ * Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures. Requests are rate limited per account, and live PDFs use credits: a request over the limit returns 429 with a Retry-After header, and one your credits can't cover returns 402. See [Credits & Rate Limits](https://docspring.com/docs/api-guide/credits-and-rate-limits/).
20
20
  *
21
21
  * The version of the OpenAPI document: v1
22
22
  *
@@ -29,12 +29,13 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
29
29
  /**
30
30
  * The SubmissionBatch model module.
31
31
  * @module model/SubmissionBatch
32
- * @version 3.1.0
32
+ * @version 3.3.0
33
33
  */
34
34
  var SubmissionBatch = /*#__PURE__*/function () {
35
35
  /**
36
36
  * Constructs a new <code>SubmissionBatch</code>.
37
37
  * @alias module:model/SubmissionBatch
38
+ * @extends Object
38
39
  * @param id {String}
39
40
  * @param state {module:model/SubmissionBatch.StateEnum}
40
41
  * @param metadata {Object}
@@ -79,6 +80,7 @@ var SubmissionBatch = /*#__PURE__*/function () {
79
80
  value: function constructFromObject(data, obj) {
80
81
  if (data) {
81
82
  obj = obj || new SubmissionBatch();
83
+ _ApiClient["default"].constructFromObject(data, obj, 'Object');
82
84
  if (data.hasOwnProperty('id')) {
83
85
  obj['id'] = _ApiClient["default"].convertToType(data['id'], 'String');
84
86
  }
@@ -16,7 +16,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
16
16
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
17
17
  function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r; if ("undefined" != typeof Symbol && void 0 !== (r = t[Symbol.toPrimitive])) { var i = r.call(t, e || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === e ? String : Number)(t); } /**
18
18
  * DocSpring API
19
- * Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
19
+ * Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures. Requests are rate limited per account, and live PDFs use credits: a request over the limit returns 429 with a Retry-After header, and one your credits can't cover returns 402. See [Credits & Rate Limits](https://docspring.com/docs/api-guide/credits-and-rate-limits/).
20
20
  *
21
21
  * The version of the OpenAPI document: v1
22
22
  *
@@ -29,7 +29,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
29
29
  /**
30
30
  * The SubmissionBatchData model module.
31
31
  * @module model/SubmissionBatchData
32
- * @version 3.1.0
32
+ * @version 3.3.0
33
33
  */
34
34
  var SubmissionBatchData = /*#__PURE__*/function () {
35
35
  /**
@@ -146,6 +146,7 @@ SubmissionBatchData.prototype['template_id'] = undefined;
146
146
  SubmissionBatchData.prototype['template_version'] = undefined;
147
147
 
148
148
  /**
149
+ * Generate a watermarked test PDF. Test PDFs are free; live PDFs (the default) use credits.
149
150
  * @member {Boolean} test
150
151
  */
151
152
  SubmissionBatchData.prototype['test'] = undefined;
@@ -17,7 +17,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
17
17
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
18
18
  function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r; if ("undefined" != typeof Symbol && void 0 !== (r = t[Symbol.toPrimitive])) { var i = r.call(t, e || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === e ? String : Number)(t); } /**
19
19
  * DocSpring API
20
- * Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
20
+ * Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures. Requests are rate limited per account, and live PDFs use credits: a request over the limit returns 429 with a Retry-After header, and one your credits can't cover returns 402. See [Credits & Rate Limits](https://docspring.com/docs/api-guide/credits-and-rate-limits/).
21
21
  *
22
22
  * The version of the OpenAPI document: v1
23
23
  *
@@ -30,12 +30,13 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
30
30
  /**
31
31
  * The SubmissionBatchWithSubmissions model module.
32
32
  * @module model/SubmissionBatchWithSubmissions
33
- * @version 3.1.0
33
+ * @version 3.3.0
34
34
  */
35
35
  var SubmissionBatchWithSubmissions = /*#__PURE__*/function () {
36
36
  /**
37
37
  * Constructs a new <code>SubmissionBatchWithSubmissions</code>.
38
38
  * @alias module:model/SubmissionBatchWithSubmissions
39
+ * @extends Object
39
40
  * @param id {String}
40
41
  * @param state {module:model/SubmissionBatchWithSubmissions.StateEnum}
41
42
  * @param metadata {Object}
@@ -80,6 +81,7 @@ var SubmissionBatchWithSubmissions = /*#__PURE__*/function () {
80
81
  value: function constructFromObject(data, obj) {
81
82
  if (data) {
82
83
  obj = obj || new SubmissionBatchWithSubmissions();
84
+ _ApiClient["default"].constructFromObject(data, obj, 'Object');
83
85
  if (data.hasOwnProperty('id')) {
84
86
  obj['id'] = _ApiClient["default"].convertToType(data['id'], 'String');
85
87
  }
@@ -146,26 +148,9 @@ var SubmissionBatchWithSubmissions = /*#__PURE__*/function () {
146
148
  if (data['processed_at'] && !(typeof data['processed_at'] === 'string' || data['processed_at'] instanceof String)) {
147
149
  throw new Error("Expected the field `processed_at` to be a primitive type in the JSON string but got " + data['processed_at']);
148
150
  }
149
- if (data['submissions']) {
150
- // data not null
151
- // ensure the json data is an array
152
- if (!Array.isArray(data['submissions'])) {
153
- throw new Error("Expected the field `submissions` to be an array in the JSON data but got " + data['submissions']);
154
- }
155
- // validate the optional field `submissions` (array)
156
- var _iterator2 = _createForOfIteratorHelper(data['submissions']),
157
- _step2;
158
- try {
159
- for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
160
- var item = _step2.value;
161
- _SubmissionPreview["default"].validateJSON(item);
162
- }
163
- } catch (err) {
164
- _iterator2.e(err);
165
- } finally {
166
- _iterator2.f();
167
- }
168
- ;
151
+ // ensure the json data is an array
152
+ if (!Array.isArray(data['submissions'])) {
153
+ throw new Error("Expected the field `submissions` to be an array in the JSON data but got " + data['submissions']);
169
154
  }
170
155
  return true;
171
156
  }
@@ -16,7 +16,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
16
16
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
17
17
  function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r; if ("undefined" != typeof Symbol && void 0 !== (r = t[Symbol.toPrimitive])) { var i = r.call(t, e || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === e ? String : Number)(t); } /**
18
18
  * DocSpring API
19
- * Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
19
+ * Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures. Requests are rate limited per account, and live PDFs use credits: a request over the limit returns 429 with a Retry-After header, and one your credits can't cover returns 402. See [Credits & Rate Limits](https://docspring.com/docs/api-guide/credits-and-rate-limits/).
20
20
  *
21
21
  * The version of the OpenAPI document: v1
22
22
  *
@@ -29,12 +29,13 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
29
29
  /**
30
30
  * The SubmissionDataRequest model module.
31
31
  * @module model/SubmissionDataRequest
32
- * @version 3.1.0
32
+ * @version 3.3.0
33
33
  */
34
34
  var SubmissionDataRequest = /*#__PURE__*/function () {
35
35
  /**
36
36
  * Constructs a new <code>SubmissionDataRequest</code>.
37
37
  * @alias module:model/SubmissionDataRequest
38
+ * @extends Object
38
39
  * @param id {String}
39
40
  * @param email {String}
40
41
  * @param name {String}
@@ -107,6 +108,7 @@ var SubmissionDataRequest = /*#__PURE__*/function () {
107
108
  value: function constructFromObject(data, obj) {
108
109
  if (data) {
109
110
  obj = obj || new SubmissionDataRequest();
111
+ _ApiClient["default"].constructFromObject(data, obj, 'Object');
110
112
  if (data.hasOwnProperty('id')) {
111
113
  obj['id'] = _ApiClient["default"].convertToType(data['id'], 'String');
112
114
  }
@@ -16,7 +16,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
16
16
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
17
17
  function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r; if ("undefined" != typeof Symbol && void 0 !== (r = t[Symbol.toPrimitive])) { var i = r.call(t, e || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === e ? String : Number)(t); } /**
18
18
  * DocSpring API
19
- * Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
19
+ * Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures. Requests are rate limited per account, and live PDFs use credits: a request over the limit returns 429 with a Retry-After header, and one your credits can't cover returns 402. See [Credits & Rate Limits](https://docspring.com/docs/api-guide/credits-and-rate-limits/).
20
20
  *
21
21
  * The version of the OpenAPI document: v1
22
22
  *
@@ -29,12 +29,13 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
29
29
  /**
30
30
  * The SubmissionDataRequestEvent model module.
31
31
  * @module model/SubmissionDataRequestEvent
32
- * @version 3.1.0
32
+ * @version 3.3.0
33
33
  */
34
34
  var SubmissionDataRequestEvent = /*#__PURE__*/function () {
35
35
  /**
36
36
  * Constructs a new <code>SubmissionDataRequestEvent</code>.
37
37
  * @alias module:model/SubmissionDataRequestEvent
38
+ * @extends Object
38
39
  * @param id {String}
39
40
  * @param submission_id {String}
40
41
  * @param submission_data_request_id {String}
@@ -77,6 +78,7 @@ var SubmissionDataRequestEvent = /*#__PURE__*/function () {
77
78
  value: function constructFromObject(data, obj) {
78
79
  if (data) {
79
80
  obj = obj || new SubmissionDataRequestEvent();
81
+ _ApiClient["default"].constructFromObject(data, obj, 'Object');
80
82
  if (data.hasOwnProperty('id')) {
81
83
  obj['id'] = _ApiClient["default"].convertToType(data['id'], 'String');
82
84
  }
@@ -16,7 +16,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
16
16
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
17
17
  function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r; if ("undefined" != typeof Symbol && void 0 !== (r = t[Symbol.toPrimitive])) { var i = r.call(t, e || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === e ? String : Number)(t); } /**
18
18
  * DocSpring API
19
- * Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
19
+ * Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures. Requests are rate limited per account, and live PDFs use credits: a request over the limit returns 429 with a Retry-After header, and one your credits can't cover returns 402. See [Credits & Rate Limits](https://docspring.com/docs/api-guide/credits-and-rate-limits/).
20
20
  *
21
21
  * The version of the OpenAPI document: v1
22
22
  *
@@ -29,12 +29,13 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
29
29
  /**
30
30
  * The SubmissionDataRequestShow model module.
31
31
  * @module model/SubmissionDataRequestShow
32
- * @version 3.1.0
32
+ * @version 3.3.0
33
33
  */
34
34
  var SubmissionDataRequestShow = /*#__PURE__*/function () {
35
35
  /**
36
36
  * Constructs a new <code>SubmissionDataRequestShow</code>.
37
37
  * @alias module:model/SubmissionDataRequestShow
38
+ * @extends Object
38
39
  * @param id {String}
39
40
  * @param email {String}
40
41
  * @param name {String}
@@ -109,6 +110,7 @@ var SubmissionDataRequestShow = /*#__PURE__*/function () {
109
110
  value: function constructFromObject(data, obj) {
110
111
  if (data) {
111
112
  obj = obj || new SubmissionDataRequestShow();
113
+ _ApiClient["default"].constructFromObject(data, obj, 'Object');
112
114
  if (data.hasOwnProperty('id')) {
113
115
  obj['id'] = _ApiClient["default"].convertToType(data['id'], 'String');
114
116
  }
@@ -16,7 +16,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
16
16
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
17
17
  function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r; if ("undefined" != typeof Symbol && void 0 !== (r = t[Symbol.toPrimitive])) { var i = r.call(t, e || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === e ? String : Number)(t); } /**
18
18
  * DocSpring API
19
- * Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
19
+ * Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures. Requests are rate limited per account, and live PDFs use credits: a request over the limit returns 429 with a Retry-After header, and one your credits can't cover returns 402. See [Credits & Rate Limits](https://docspring.com/docs/api-guide/credits-and-rate-limits/).
20
20
  *
21
21
  * The version of the OpenAPI document: v1
22
22
  *
@@ -29,12 +29,13 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
29
29
  /**
30
30
  * The SubmissionDataRequestToken model module.
31
31
  * @module model/SubmissionDataRequestToken
32
- * @version 3.1.0
32
+ * @version 3.3.0
33
33
  */
34
34
  var SubmissionDataRequestToken = /*#__PURE__*/function () {
35
35
  /**
36
36
  * Constructs a new <code>SubmissionDataRequestToken</code>.
37
37
  * @alias module:model/SubmissionDataRequestToken
38
+ * @extends Object
38
39
  * @param id {String}
39
40
  * @param secret {String}
40
41
  * @param expires_at {String}
@@ -71,6 +72,7 @@ var SubmissionDataRequestToken = /*#__PURE__*/function () {
71
72
  value: function constructFromObject(data, obj) {
72
73
  if (data) {
73
74
  obj = obj || new SubmissionDataRequestToken();
75
+ _ApiClient["default"].constructFromObject(data, obj, 'Object');
74
76
  if (data.hasOwnProperty('id')) {
75
77
  obj['id'] = _ApiClient["default"].convertToType(data['id'], 'String');
76
78
  }