docspring 2.0.0 → 3.0.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 (59) hide show
  1. package/README.md +53 -46
  2. package/dist/ApiClient.js +3 -3
  3. package/dist/api/{PDFApi.js → Client.js} +534 -372
  4. package/dist/index.js +52 -17
  5. package/dist/model/AddFieldsData.js +2 -2
  6. package/dist/model/BatchGeneratePdfs201Response.js +7 -7
  7. package/dist/model/CombinePdfsData.js +7 -7
  8. package/dist/model/CombinedSubmission.js +21 -21
  9. package/dist/model/CombinedSubmissionAction.js +13 -13
  10. package/dist/model/CopyTemplateOptions.js +7 -7
  11. package/dist/model/CreateCombinedSubmissionResponse.js +7 -7
  12. package/dist/model/CreateCustomFileData.js +7 -7
  13. package/dist/model/CreateCustomFileResponse.js +7 -7
  14. package/dist/model/CreateFolderData.js +2 -2
  15. package/dist/model/CreateHtmlTemplate.js +2 -2
  16. package/dist/model/CreatePdfSubmissionData.js +14 -2
  17. package/dist/model/CreatePdfTemplate.js +2 -2
  18. package/dist/model/CreateSubmissionDataRequestData.js +106 -2
  19. package/dist/model/CreateSubmissionDataRequestEventRequest.js +31 -7
  20. package/dist/model/CreateSubmissionDataRequestEventResponse.js +2 -2
  21. package/dist/model/CreateSubmissionDataRequestResponse.js +7 -7
  22. package/dist/model/CreateSubmissionDataRequestTokenResponse.js +2 -2
  23. package/dist/model/CreateSubmissionResponse.js +2 -2
  24. package/dist/model/CustomFile.js +2 -2
  25. package/dist/model/ErrorOrMultipleErrorsResponse.js +151 -0
  26. package/dist/model/ErrorResponse.js +2 -2
  27. package/dist/model/Folder.js +7 -7
  28. package/dist/model/JsonSchema.js +2 -2
  29. package/dist/model/ListSubmissionsResponse.js +7 -7
  30. package/dist/model/MoveFolderData.js +2 -2
  31. package/dist/model/MoveTemplateData.js +7 -7
  32. package/dist/model/MultipleErrorsResponse.js +2 -2
  33. package/dist/model/PublishVersionData.js +124 -0
  34. package/dist/model/RenameFolderData.js +2 -2
  35. package/dist/model/RestoreVersionData.js +112 -0
  36. package/dist/model/Submission.js +78 -32
  37. package/dist/model/Submission422Response.js +165 -0
  38. package/dist/model/SubmissionAction.js +13 -13
  39. package/dist/model/SubmissionBatch.js +15 -15
  40. package/dist/model/SubmissionBatchData.js +26 -2
  41. package/dist/model/SubmissionBatchWithSubmissions.js +15 -15
  42. package/dist/model/SubmissionDataRequest.js +31 -31
  43. package/dist/model/SubmissionDataRequestEvent.js +17 -17
  44. package/dist/model/SubmissionDataRequestShow.js +33 -33
  45. package/dist/model/SubmissionDataRequestToken.js +9 -9
  46. package/dist/model/SubmissionPreview.js +78 -32
  47. package/dist/model/SuccessErrorResponse.js +2 -2
  48. package/dist/model/SuccessMultipleErrorsResponse.js +2 -2
  49. package/dist/model/Template.js +194 -78
  50. package/dist/model/TemplateAddFieldsResponse.js +2 -2
  51. package/dist/model/TemplateDeleteResponse.js +166 -0
  52. package/dist/model/TemplatePreview.js +168 -66
  53. package/dist/model/{CombinedSubmissionData.js → TemplatePublishVersionResponse.js} +56 -52
  54. package/dist/model/UpdateHtmlTemplate.js +2 -2
  55. package/dist/model/UpdatePdfTemplate.js +108 -0
  56. package/dist/model/UpdateSubmissionDataRequestData.js +153 -2
  57. package/dist/model/UploadPresignResponse.js +2 -2
  58. package/package.json +1 -1
  59. package/dist/model/CreateHtmlSubmissionData.js +0 -161
@@ -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, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
18
18
  * DocSpring API
19
- * DocSpring provides an API that helps you fill out and sign PDF templates.
19
+ * Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
20
20
  *
21
21
  * The version of the OpenAPI document: v1
22
22
  *
@@ -29,7 +29,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
29
29
  /**
30
30
  * The Folder model module.
31
31
  * @module model/Folder
32
- * @version 2.0.0
32
+ * @version 3.0.0
33
33
  */
34
34
  var Folder = /*#__PURE__*/function () {
35
35
  /**
@@ -38,11 +38,11 @@ var Folder = /*#__PURE__*/function () {
38
38
  * @param id {String}
39
39
  * @param name {String}
40
40
  * @param path {String}
41
- * @param parentFolderId {String}
41
+ * @param parent_folder_id {String}
42
42
  */
43
- function Folder(id, name, path, parentFolderId) {
43
+ function Folder(id, name, path, parent_folder_id) {
44
44
  _classCallCheck(this, Folder);
45
- Folder.initialize(this, id, name, path, parentFolderId);
45
+ Folder.initialize(this, id, name, path, parent_folder_id);
46
46
  }
47
47
 
48
48
  /**
@@ -52,11 +52,11 @@ var Folder = /*#__PURE__*/function () {
52
52
  */
53
53
  return _createClass(Folder, null, [{
54
54
  key: "initialize",
55
- value: function initialize(obj, id, name, path, parentFolderId) {
55
+ value: function initialize(obj, id, name, path, parent_folder_id) {
56
56
  obj['id'] = id;
57
57
  obj['name'] = name;
58
58
  obj['path'] = path;
59
- obj['parent_folder_id'] = parentFolderId;
59
+ obj['parent_folder_id'] = parent_folder_id;
60
60
  }
61
61
 
62
62
  /**
@@ -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, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
15
15
  * DocSpring API
16
- * DocSpring provides an API that helps you fill out and sign PDF templates.
16
+ * Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
17
17
  *
18
18
  * The version of the OpenAPI document: v1
19
19
  *
@@ -26,7 +26,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
26
26
  /**
27
27
  * The JsonSchema model module.
28
28
  * @module model/JsonSchema
29
- * @version 2.0.0
29
+ * @version 3.0.0
30
30
  */
31
31
  var JsonSchema = /*#__PURE__*/function () {
32
32
  /**
@@ -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, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
19
19
  * DocSpring API
20
- * DocSpring provides an API that helps you fill out and sign PDF templates.
20
+ * Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
21
21
  *
22
22
  * The version of the OpenAPI document: v1
23
23
  *
@@ -30,7 +30,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
30
30
  /**
31
31
  * The ListSubmissionsResponse model module.
32
32
  * @module model/ListSubmissionsResponse
33
- * @version 2.0.0
33
+ * @version 3.0.0
34
34
  */
35
35
  var ListSubmissionsResponse = /*#__PURE__*/function () {
36
36
  /**
@@ -38,11 +38,11 @@ var ListSubmissionsResponse = /*#__PURE__*/function () {
38
38
  * @alias module:model/ListSubmissionsResponse
39
39
  * @param submissions {Array.<module:model/Submission>}
40
40
  * @param limit {Number}
41
- * @param nextCursor {String}
41
+ * @param next_cursor {String}
42
42
  */
43
- function ListSubmissionsResponse(submissions, limit, nextCursor) {
43
+ function ListSubmissionsResponse(submissions, limit, next_cursor) {
44
44
  _classCallCheck(this, ListSubmissionsResponse);
45
- ListSubmissionsResponse.initialize(this, submissions, limit, nextCursor);
45
+ ListSubmissionsResponse.initialize(this, submissions, limit, next_cursor);
46
46
  }
47
47
 
48
48
  /**
@@ -52,10 +52,10 @@ var ListSubmissionsResponse = /*#__PURE__*/function () {
52
52
  */
53
53
  return _createClass(ListSubmissionsResponse, null, [{
54
54
  key: "initialize",
55
- value: function initialize(obj, submissions, limit, nextCursor) {
55
+ value: function initialize(obj, submissions, limit, next_cursor) {
56
56
  obj['submissions'] = submissions;
57
57
  obj['limit'] = limit;
58
- obj['next_cursor'] = nextCursor;
58
+ obj['next_cursor'] = next_cursor;
59
59
  }
60
60
 
61
61
  /**
@@ -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, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
15
15
  * DocSpring API
16
- * DocSpring provides an API that helps you fill out and sign PDF templates.
16
+ * Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
17
17
  *
18
18
  * The version of the OpenAPI document: v1
19
19
  *
@@ -26,7 +26,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
26
26
  /**
27
27
  * The MoveFolderData model module.
28
28
  * @module model/MoveFolderData
29
- * @version 2.0.0
29
+ * @version 3.0.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, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
18
18
  * DocSpring API
19
- * DocSpring provides an API that helps you fill out and sign PDF templates.
19
+ * Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
20
20
  *
21
21
  * The version of the OpenAPI document: v1
22
22
  *
@@ -29,17 +29,17 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
29
29
  /**
30
30
  * The MoveTemplateData model module.
31
31
  * @module model/MoveTemplateData
32
- * @version 2.0.0
32
+ * @version 3.0.0
33
33
  */
34
34
  var MoveTemplateData = /*#__PURE__*/function () {
35
35
  /**
36
36
  * Constructs a new <code>MoveTemplateData</code>.
37
37
  * @alias module:model/MoveTemplateData
38
- * @param parentFolderId {String}
38
+ * @param parent_folder_id {String}
39
39
  */
40
- function MoveTemplateData(parentFolderId) {
40
+ function MoveTemplateData(parent_folder_id) {
41
41
  _classCallCheck(this, MoveTemplateData);
42
- MoveTemplateData.initialize(this, parentFolderId);
42
+ MoveTemplateData.initialize(this, parent_folder_id);
43
43
  }
44
44
 
45
45
  /**
@@ -49,8 +49,8 @@ var MoveTemplateData = /*#__PURE__*/function () {
49
49
  */
50
50
  return _createClass(MoveTemplateData, null, [{
51
51
  key: "initialize",
52
- value: function initialize(obj, parentFolderId) {
53
- obj['parent_folder_id'] = parentFolderId;
52
+ value: function initialize(obj, parent_folder_id) {
53
+ obj['parent_folder_id'] = parent_folder_id;
54
54
  }
55
55
 
56
56
  /**
@@ -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, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
18
18
  * DocSpring API
19
- * DocSpring provides an API that helps you fill out and sign PDF templates.
19
+ * Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
20
20
  *
21
21
  * The version of the OpenAPI document: v1
22
22
  *
@@ -29,7 +29,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
29
29
  /**
30
30
  * The MultipleErrorsResponse model module.
31
31
  * @module model/MultipleErrorsResponse
32
- * @version 2.0.0
32
+ * @version 3.0.0
33
33
  */
34
34
  var MultipleErrorsResponse = /*#__PURE__*/function () {
35
35
  /**
@@ -0,0 +1,124 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
9
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
10
+ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
11
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
12
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
13
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
14
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
15
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
16
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
17
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
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.
20
+ *
21
+ * The version of the OpenAPI document: v1
22
+ *
23
+ *
24
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
25
+ * https://openapi-generator.tech
26
+ * Do not edit the class manually.
27
+ *
28
+ */
29
+ /**
30
+ * The PublishVersionData model module.
31
+ * @module model/PublishVersionData
32
+ * @version 3.0.0
33
+ */
34
+ var PublishVersionData = /*#__PURE__*/function () {
35
+ /**
36
+ * Constructs a new <code>PublishVersionData</code>.
37
+ * @alias module:model/PublishVersionData
38
+ * @param version_type {String}
39
+ */
40
+ function PublishVersionData(version_type) {
41
+ _classCallCheck(this, PublishVersionData);
42
+ PublishVersionData.initialize(this, version_type);
43
+ }
44
+
45
+ /**
46
+ * Initializes the fields of this object.
47
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
48
+ * Only for internal use.
49
+ */
50
+ return _createClass(PublishVersionData, null, [{
51
+ key: "initialize",
52
+ value: function initialize(obj, version_type) {
53
+ obj['version_type'] = version_type;
54
+ }
55
+
56
+ /**
57
+ * Constructs a <code>PublishVersionData</code> from a plain JavaScript object, optionally creating a new instance.
58
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
59
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
60
+ * @param {module:model/PublishVersionData} obj Optional instance to populate.
61
+ * @return {module:model/PublishVersionData} The populated <code>PublishVersionData</code> instance.
62
+ */
63
+ }, {
64
+ key: "constructFromObject",
65
+ value: function constructFromObject(data, obj) {
66
+ if (data) {
67
+ obj = obj || new PublishVersionData();
68
+ if (data.hasOwnProperty('description')) {
69
+ obj['description'] = _ApiClient["default"].convertToType(data['description'], 'String');
70
+ }
71
+ if (data.hasOwnProperty('version_type')) {
72
+ obj['version_type'] = _ApiClient["default"].convertToType(data['version_type'], 'String');
73
+ }
74
+ }
75
+ return obj;
76
+ }
77
+
78
+ /**
79
+ * Validates the JSON data with respect to <code>PublishVersionData</code>.
80
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
81
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>PublishVersionData</code>.
82
+ */
83
+ }, {
84
+ key: "validateJSON",
85
+ value: function validateJSON(data) {
86
+ // check to make sure all required properties are present in the JSON string
87
+ var _iterator = _createForOfIteratorHelper(PublishVersionData.RequiredProperties),
88
+ _step;
89
+ try {
90
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
91
+ var property = _step.value;
92
+ if (!data.hasOwnProperty(property)) {
93
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
94
+ }
95
+ }
96
+ // ensure the json data is a string
97
+ } catch (err) {
98
+ _iterator.e(err);
99
+ } finally {
100
+ _iterator.f();
101
+ }
102
+ if (data['description'] && !(typeof data['description'] === 'string' || data['description'] instanceof String)) {
103
+ throw new Error("Expected the field `description` to be a primitive type in the JSON string but got " + data['description']);
104
+ }
105
+ // ensure the json data is a string
106
+ if (data['version_type'] && !(typeof data['version_type'] === 'string' || data['version_type'] instanceof String)) {
107
+ throw new Error("Expected the field `version_type` to be a primitive type in the JSON string but got " + data['version_type']);
108
+ }
109
+ return true;
110
+ }
111
+ }]);
112
+ }();
113
+ PublishVersionData.RequiredProperties = ["version_type"];
114
+
115
+ /**
116
+ * @member {String} description
117
+ */
118
+ PublishVersionData.prototype['description'] = undefined;
119
+
120
+ /**
121
+ * @member {String} version_type
122
+ */
123
+ PublishVersionData.prototype['version_type'] = undefined;
124
+ var _default = exports["default"] = PublishVersionData;
@@ -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, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
18
18
  * DocSpring API
19
- * DocSpring provides an API that helps you fill out and sign PDF templates.
19
+ * Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
20
20
  *
21
21
  * The version of the OpenAPI document: v1
22
22
  *
@@ -29,7 +29,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
29
29
  /**
30
30
  * The RenameFolderData model module.
31
31
  * @module model/RenameFolderData
32
- * @version 2.0.0
32
+ * @version 3.0.0
33
33
  */
34
34
  var RenameFolderData = /*#__PURE__*/function () {
35
35
  /**
@@ -0,0 +1,112 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
9
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
10
+ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
11
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
12
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
13
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
14
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
15
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
16
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
17
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
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.
20
+ *
21
+ * The version of the OpenAPI document: v1
22
+ *
23
+ *
24
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
25
+ * https://openapi-generator.tech
26
+ * Do not edit the class manually.
27
+ *
28
+ */
29
+ /**
30
+ * The RestoreVersionData model module.
31
+ * @module model/RestoreVersionData
32
+ * @version 3.0.0
33
+ */
34
+ var RestoreVersionData = /*#__PURE__*/function () {
35
+ /**
36
+ * Constructs a new <code>RestoreVersionData</code>.
37
+ * @alias module:model/RestoreVersionData
38
+ * @param version {String}
39
+ */
40
+ function RestoreVersionData(version) {
41
+ _classCallCheck(this, RestoreVersionData);
42
+ RestoreVersionData.initialize(this, version);
43
+ }
44
+
45
+ /**
46
+ * Initializes the fields of this object.
47
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
48
+ * Only for internal use.
49
+ */
50
+ return _createClass(RestoreVersionData, null, [{
51
+ key: "initialize",
52
+ value: function initialize(obj, version) {
53
+ obj['version'] = version;
54
+ }
55
+
56
+ /**
57
+ * Constructs a <code>RestoreVersionData</code> from a plain JavaScript object, optionally creating a new instance.
58
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
59
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
60
+ * @param {module:model/RestoreVersionData} obj Optional instance to populate.
61
+ * @return {module:model/RestoreVersionData} The populated <code>RestoreVersionData</code> instance.
62
+ */
63
+ }, {
64
+ key: "constructFromObject",
65
+ value: function constructFromObject(data, obj) {
66
+ if (data) {
67
+ obj = obj || new RestoreVersionData();
68
+ if (data.hasOwnProperty('version')) {
69
+ obj['version'] = _ApiClient["default"].convertToType(data['version'], 'String');
70
+ }
71
+ }
72
+ return obj;
73
+ }
74
+
75
+ /**
76
+ * Validates the JSON data with respect to <code>RestoreVersionData</code>.
77
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
78
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>RestoreVersionData</code>.
79
+ */
80
+ }, {
81
+ key: "validateJSON",
82
+ value: function validateJSON(data) {
83
+ // check to make sure all required properties are present in the JSON string
84
+ var _iterator = _createForOfIteratorHelper(RestoreVersionData.RequiredProperties),
85
+ _step;
86
+ try {
87
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
88
+ var property = _step.value;
89
+ if (!data.hasOwnProperty(property)) {
90
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
91
+ }
92
+ }
93
+ // ensure the json data is a string
94
+ } catch (err) {
95
+ _iterator.e(err);
96
+ } finally {
97
+ _iterator.f();
98
+ }
99
+ if (data['version'] && !(typeof data['version'] === 'string' || data['version'] instanceof String)) {
100
+ throw new Error("Expected the field `version` to be a primitive type in the JSON string but got " + data['version']);
101
+ }
102
+ return true;
103
+ }
104
+ }]);
105
+ }();
106
+ RestoreVersionData.RequiredProperties = ["version"];
107
+
108
+ /**
109
+ * @member {String} version
110
+ */
111
+ RestoreVersionData.prototype['version'] = undefined;
112
+ var _default = exports["default"] = RestoreVersionData;
@@ -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, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
20
20
  * DocSpring API
21
- * DocSpring provides an API that helps you fill out and sign PDF templates.
21
+ * Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
22
22
  *
23
23
  * The version of the OpenAPI document: v1
24
24
  *
@@ -31,40 +31,42 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
31
31
  /**
32
32
  * The Submission model module.
33
33
  * @module model/Submission
34
- * @version 2.0.0
34
+ * @version 3.0.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
- * @param batchId {String}
41
- * @param dataRequests {Array.<module:model/SubmissionDataRequest>}
40
+ * @param batch_id {String}
41
+ * @param data_requests {Array.<module:model/SubmissionDataRequest>}
42
42
  * @param editable {Boolean}
43
43
  * @param expired {Boolean}
44
- * @param expiresAt {String}
44
+ * @param expires_at {String}
45
45
  * @param id {String}
46
- * @param jsonSchemaErrors {Array.<String>}
46
+ * @param json_schema_errors {Array.<String>}
47
47
  * @param metadata {Object}
48
48
  * @param password {String}
49
- * @param processedAt {String}
49
+ * @param processed_at {String}
50
50
  * @param state {module:model/Submission.StateEnum}
51
- * @param templateId {String}
51
+ * @param template_id {String}
52
+ * @param template_type {module:model/Submission.TemplateTypeEnum}
53
+ * @param template_version {String}
52
54
  * @param test {Boolean}
53
- * @param truncatedText {Object}
54
- * @param pdfHash {String}
55
- * @param downloadUrl {String}
56
- * @param permanentDownloadUrl {String}
57
- * @param previewDownloadUrl {String}
58
- * @param previewGeneratedAt {String}
59
- * @param auditTrailDownloadUrl {String}
55
+ * @param truncated_text {Object}
56
+ * @param pdf_hash {String}
57
+ * @param download_url {String}
58
+ * @param permanent_download_url {String}
59
+ * @param preview_download_url {String}
60
+ * @param preview_generated_at {String}
61
+ * @param audit_trail_download_url {String}
60
62
  * @param actions {Array.<module:model/SubmissionAction>}
61
63
  * @param source {module:model/Submission.SourceEnum}
62
64
  * @param referrer {String}
63
65
  * @param data {Object}
64
66
  */
65
- function Submission(batchId, dataRequests, editable, expired, expiresAt, id, jsonSchemaErrors, metadata, password, processedAt, state, templateId, test, truncatedText, pdfHash, downloadUrl, permanentDownloadUrl, previewDownloadUrl, previewGeneratedAt, auditTrailDownloadUrl, actions, source, referrer, data) {
67
+ function Submission(batch_id, data_requests, editable, expired, expires_at, id, json_schema_errors, metadata, password, processed_at, state, template_id, template_type, template_version, test, truncated_text, pdf_hash, download_url, permanent_download_url, preview_download_url, preview_generated_at, audit_trail_download_url, actions, source, referrer, data) {
66
68
  _classCallCheck(this, Submission);
67
- Submission.initialize(this, batchId, dataRequests, editable, expired, expiresAt, id, jsonSchemaErrors, metadata, password, processedAt, state, templateId, test, truncatedText, pdfHash, downloadUrl, permanentDownloadUrl, previewDownloadUrl, previewGeneratedAt, auditTrailDownloadUrl, actions, source, referrer, data);
69
+ Submission.initialize(this, batch_id, data_requests, editable, expired, expires_at, id, json_schema_errors, metadata, password, processed_at, state, template_id, template_type, template_version, test, truncated_text, pdf_hash, download_url, permanent_download_url, preview_download_url, preview_generated_at, audit_trail_download_url, actions, source, referrer, data);
68
70
  }
69
71
 
70
72
  /**
@@ -74,27 +76,29 @@ var Submission = /*#__PURE__*/function () {
74
76
  */
75
77
  return _createClass(Submission, null, [{
76
78
  key: "initialize",
77
- value: function initialize(obj, batchId, dataRequests, editable, expired, expiresAt, id, jsonSchemaErrors, metadata, password, processedAt, state, templateId, test, truncatedText, pdfHash, downloadUrl, permanentDownloadUrl, previewDownloadUrl, previewGeneratedAt, auditTrailDownloadUrl, actions, source, referrer, data) {
78
- obj['batch_id'] = batchId;
79
- obj['data_requests'] = dataRequests;
79
+ value: function initialize(obj, batch_id, data_requests, editable, expired, expires_at, id, json_schema_errors, metadata, password, processed_at, state, template_id, template_type, template_version, test, truncated_text, pdf_hash, download_url, permanent_download_url, preview_download_url, preview_generated_at, audit_trail_download_url, actions, source, referrer, data) {
80
+ obj['batch_id'] = batch_id;
81
+ obj['data_requests'] = data_requests;
80
82
  obj['editable'] = editable;
81
83
  obj['expired'] = expired;
82
- obj['expires_at'] = expiresAt;
84
+ obj['expires_at'] = expires_at;
83
85
  obj['id'] = id;
84
- obj['json_schema_errors'] = jsonSchemaErrors;
86
+ obj['json_schema_errors'] = json_schema_errors;
85
87
  obj['metadata'] = metadata;
86
88
  obj['password'] = password;
87
- obj['processed_at'] = processedAt;
89
+ obj['processed_at'] = processed_at;
88
90
  obj['state'] = state;
89
- obj['template_id'] = templateId;
91
+ obj['template_id'] = template_id;
92
+ obj['template_type'] = template_type;
93
+ obj['template_version'] = template_version;
90
94
  obj['test'] = test;
91
- obj['truncated_text'] = truncatedText;
92
- obj['pdf_hash'] = pdfHash;
93
- obj['download_url'] = downloadUrl;
94
- obj['permanent_download_url'] = permanentDownloadUrl;
95
- obj['preview_download_url'] = previewDownloadUrl;
96
- obj['preview_generated_at'] = previewGeneratedAt;
97
- obj['audit_trail_download_url'] = auditTrailDownloadUrl;
95
+ obj['truncated_text'] = truncated_text;
96
+ obj['pdf_hash'] = pdf_hash;
97
+ obj['download_url'] = download_url;
98
+ obj['permanent_download_url'] = permanent_download_url;
99
+ obj['preview_download_url'] = preview_download_url;
100
+ obj['preview_generated_at'] = preview_generated_at;
101
+ obj['audit_trail_download_url'] = audit_trail_download_url;
98
102
  obj['actions'] = actions;
99
103
  obj['source'] = source;
100
104
  obj['referrer'] = referrer;
@@ -149,6 +153,12 @@ var Submission = /*#__PURE__*/function () {
149
153
  if (data.hasOwnProperty('template_id')) {
150
154
  obj['template_id'] = _ApiClient["default"].convertToType(data['template_id'], 'String');
151
155
  }
156
+ if (data.hasOwnProperty('template_type')) {
157
+ obj['template_type'] = _ApiClient["default"].convertToType(data['template_type'], 'String');
158
+ }
159
+ if (data.hasOwnProperty('template_version')) {
160
+ obj['template_version'] = _ApiClient["default"].convertToType(data['template_version'], 'String');
161
+ }
152
162
  if (data.hasOwnProperty('test')) {
153
163
  obj['test'] = _ApiClient["default"].convertToType(data['test'], 'Boolean');
154
164
  }
@@ -266,6 +276,14 @@ var Submission = /*#__PURE__*/function () {
266
276
  throw new Error("Expected the field `template_id` to be a primitive type in the JSON string but got " + data['template_id']);
267
277
  }
268
278
  // ensure the json data is a string
279
+ if (data['template_type'] && !(typeof data['template_type'] === 'string' || data['template_type'] instanceof String)) {
280
+ throw new Error("Expected the field `template_type` to be a primitive type in the JSON string but got " + data['template_type']);
281
+ }
282
+ // ensure the json data is a string
283
+ if (data['template_version'] && !(typeof data['template_version'] === 'string' || data['template_version'] instanceof String)) {
284
+ throw new Error("Expected the field `template_version` to be a primitive type in the JSON string but got " + data['template_version']);
285
+ }
286
+ // ensure the json data is a string
269
287
  if (data['pdf_hash'] && !(typeof data['pdf_hash'] === 'string' || data['pdf_hash'] instanceof String)) {
270
288
  throw new Error("Expected the field `pdf_hash` to be a primitive type in the JSON string but got " + data['pdf_hash']);
271
289
  }
@@ -322,7 +340,7 @@ var Submission = /*#__PURE__*/function () {
322
340
  }
323
341
  }]);
324
342
  }();
325
- Submission.RequiredProperties = ["batch_id", "data_requests", "editable", "expired", "expires_at", "id", "json_schema_errors", "metadata", "password", "processed_at", "state", "template_id", "test", "truncated_text", "pdf_hash", "download_url", "permanent_download_url", "preview_download_url", "preview_generated_at", "audit_trail_download_url", "actions", "source", "referrer", "data"];
343
+ Submission.RequiredProperties = ["batch_id", "data_requests", "editable", "expired", "expires_at", "id", "json_schema_errors", "metadata", "password", "processed_at", "state", "template_id", "template_type", "template_version", "test", "truncated_text", "pdf_hash", "download_url", "permanent_download_url", "preview_download_url", "preview_generated_at", "audit_trail_download_url", "actions", "source", "referrer", "data"];
326
344
 
327
345
  /**
328
346
  * @member {String} batch_id
@@ -384,6 +402,16 @@ Submission.prototype['state'] = undefined;
384
402
  */
385
403
  Submission.prototype['template_id'] = undefined;
386
404
 
405
+ /**
406
+ * @member {module:model/Submission.TemplateTypeEnum} template_type
407
+ */
408
+ Submission.prototype['template_type'] = undefined;
409
+
410
+ /**
411
+ * @member {String} template_version
412
+ */
413
+ Submission.prototype['template_version'] = undefined;
414
+
387
415
  /**
388
416
  * @member {Boolean} test
389
417
  */
@@ -507,6 +535,24 @@ Submission['StateEnum'] = {
507
535
  "accidental": "accidental"
508
536
  };
509
537
 
538
+ /**
539
+ * Allowed values for the <code>template_type</code> property.
540
+ * @enum {String}
541
+ * @readonly
542
+ */
543
+ Submission['TemplateTypeEnum'] = {
544
+ /**
545
+ * value: "pdf"
546
+ * @const
547
+ */
548
+ "pdf": "pdf",
549
+ /**
550
+ * value: "html"
551
+ * @const
552
+ */
553
+ "html": "html"
554
+ };
555
+
510
556
  /**
511
557
  * Allowed values for the <code>source</code> property.
512
558
  * @enum {String}