docspring 2.0.0 → 2.1.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 (57) hide show
  1. package/README.md +8 -2
  2. package/dist/ApiClient.js +2 -2
  3. package/dist/api/PDFApi.js +96 -7
  4. package/dist/index.js +28 -0
  5. package/dist/model/AddFieldsData.js +1 -1
  6. package/dist/model/BatchGeneratePdfs201Response.js +1 -1
  7. package/dist/model/CombinePdfsData.js +1 -1
  8. package/dist/model/CombinedSubmission.js +1 -1
  9. package/dist/model/CombinedSubmissionAction.js +1 -1
  10. package/dist/model/CombinedSubmissionData.js +1 -1
  11. package/dist/model/CopyTemplateOptions.js +1 -1
  12. package/dist/model/CreateCombinedSubmissionResponse.js +1 -1
  13. package/dist/model/CreateCustomFileData.js +1 -1
  14. package/dist/model/CreateCustomFileResponse.js +1 -1
  15. package/dist/model/CreateFolderData.js +1 -1
  16. package/dist/model/CreateHtmlSubmissionData.js +13 -1
  17. package/dist/model/CreateHtmlTemplate.js +1 -1
  18. package/dist/model/CreatePdfSubmissionData.js +13 -1
  19. package/dist/model/CreatePdfTemplate.js +1 -1
  20. package/dist/model/CreateSubmissionDataRequestData.js +1 -1
  21. package/dist/model/CreateSubmissionDataRequestEventRequest.js +1 -1
  22. package/dist/model/CreateSubmissionDataRequestEventResponse.js +1 -1
  23. package/dist/model/CreateSubmissionDataRequestResponse.js +1 -1
  24. package/dist/model/CreateSubmissionDataRequestTokenResponse.js +1 -1
  25. package/dist/model/CreateSubmissionResponse.js +1 -1
  26. package/dist/model/CustomFile.js +1 -1
  27. package/dist/model/ErrorResponse.js +1 -1
  28. package/dist/model/Folder.js +1 -1
  29. package/dist/model/JsonSchema.js +1 -1
  30. package/dist/model/ListSubmissionsResponse.js +1 -1
  31. package/dist/model/MoveFolderData.js +1 -1
  32. package/dist/model/MoveTemplateData.js +1 -1
  33. package/dist/model/MultipleErrorsResponse.js +1 -1
  34. package/dist/model/PublishVersionData.js +124 -0
  35. package/dist/model/RenameFolderData.js +1 -1
  36. package/dist/model/RestoreVersionData.js +112 -0
  37. package/dist/model/Submission.js +51 -5
  38. package/dist/model/SubmissionAction.js +1 -1
  39. package/dist/model/SubmissionBatch.js +1 -1
  40. package/dist/model/SubmissionBatchData.js +1 -1
  41. package/dist/model/SubmissionBatchWithSubmissions.js +1 -1
  42. package/dist/model/SubmissionDataRequest.js +1 -1
  43. package/dist/model/SubmissionDataRequestEvent.js +1 -1
  44. package/dist/model/SubmissionDataRequestShow.js +1 -1
  45. package/dist/model/SubmissionDataRequestToken.js +1 -1
  46. package/dist/model/SubmissionPreview.js +51 -5
  47. package/dist/model/SuccessErrorResponse.js +1 -1
  48. package/dist/model/SuccessMultipleErrorsResponse.js +1 -1
  49. package/dist/model/Template.js +121 -5
  50. package/dist/model/TemplateAddFieldsResponse.js +1 -1
  51. package/dist/model/TemplateDeleteResponse.js +166 -0
  52. package/dist/model/TemplatePreview.js +107 -5
  53. package/dist/model/TemplatePublishVersionResponse.js +152 -0
  54. package/dist/model/UpdateHtmlTemplate.js +1 -1
  55. package/dist/model/UpdateSubmissionDataRequestData.js +1 -1
  56. package/dist/model/UploadPresignResponse.js +1 -1
  57. package/package.json +1 -1
@@ -29,7 +29,7 @@ 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 2.1.0
33
33
  */
34
34
  var MoveTemplateData = /*#__PURE__*/function () {
35
35
  /**
@@ -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 2.1.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
+ * DocSpring provides an API that helps you fill out and sign PDF templates.
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 2.1.0
33
+ */
34
+ var PublishVersionData = /*#__PURE__*/function () {
35
+ /**
36
+ * Constructs a new <code>PublishVersionData</code>.
37
+ * @alias module:model/PublishVersionData
38
+ * @param versionType {String}
39
+ */
40
+ function PublishVersionData(versionType) {
41
+ _classCallCheck(this, PublishVersionData);
42
+ PublishVersionData.initialize(this, versionType);
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, versionType) {
53
+ obj['version_type'] = versionType;
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;
@@ -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 2.1.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
+ * DocSpring provides an API that helps you fill out and sign PDF templates.
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 2.1.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;
@@ -31,7 +31,7 @@ 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 2.1.0
35
35
  */
36
36
  var Submission = /*#__PURE__*/function () {
37
37
  /**
@@ -49,6 +49,8 @@ var Submission = /*#__PURE__*/function () {
49
49
  * @param processedAt {String}
50
50
  * @param state {module:model/Submission.StateEnum}
51
51
  * @param templateId {String}
52
+ * @param templateType {module:model/Submission.TemplateTypeEnum}
53
+ * @param templateVersion {String}
52
54
  * @param test {Boolean}
53
55
  * @param truncatedText {Object}
54
56
  * @param pdfHash {String}
@@ -62,9 +64,9 @@ var Submission = /*#__PURE__*/function () {
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(batchId, dataRequests, editable, expired, expiresAt, id, jsonSchemaErrors, metadata, password, processedAt, state, templateId, templateType, templateVersion, test, truncatedText, pdfHash, downloadUrl, permanentDownloadUrl, previewDownloadUrl, previewGeneratedAt, auditTrailDownloadUrl, 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, batchId, dataRequests, editable, expired, expiresAt, id, jsonSchemaErrors, metadata, password, processedAt, state, templateId, templateType, templateVersion, test, truncatedText, pdfHash, downloadUrl, permanentDownloadUrl, previewDownloadUrl, previewGeneratedAt, auditTrailDownloadUrl, actions, source, referrer, data);
68
70
  }
69
71
 
70
72
  /**
@@ -74,7 +76,7 @@ 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) {
79
+ value: function initialize(obj, batchId, dataRequests, editable, expired, expiresAt, id, jsonSchemaErrors, metadata, password, processedAt, state, templateId, templateType, templateVersion, test, truncatedText, pdfHash, downloadUrl, permanentDownloadUrl, previewDownloadUrl, previewGeneratedAt, auditTrailDownloadUrl, actions, source, referrer, data) {
78
80
  obj['batch_id'] = batchId;
79
81
  obj['data_requests'] = dataRequests;
80
82
  obj['editable'] = editable;
@@ -87,6 +89,8 @@ var Submission = /*#__PURE__*/function () {
87
89
  obj['processed_at'] = processedAt;
88
90
  obj['state'] = state;
89
91
  obj['template_id'] = templateId;
92
+ obj['template_type'] = templateType;
93
+ obj['template_version'] = templateVersion;
90
94
  obj['test'] = test;
91
95
  obj['truncated_text'] = truncatedText;
92
96
  obj['pdf_hash'] = pdfHash;
@@ -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}
@@ -29,7 +29,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
29
29
  /**
30
30
  * The SubmissionAction model module.
31
31
  * @module model/SubmissionAction
32
- * @version 2.0.0
32
+ * @version 2.1.0
33
33
  */
34
34
  var SubmissionAction = /*#__PURE__*/function () {
35
35
  /**
@@ -29,7 +29,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
29
29
  /**
30
30
  * The SubmissionBatch model module.
31
31
  * @module model/SubmissionBatch
32
- * @version 2.0.0
32
+ * @version 2.1.0
33
33
  */
34
34
  var SubmissionBatch = /*#__PURE__*/function () {
35
35
  /**
@@ -29,7 +29,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
29
29
  /**
30
30
  * The SubmissionBatchData model module.
31
31
  * @module model/SubmissionBatchData
32
- * @version 2.0.0
32
+ * @version 2.1.0
33
33
  */
34
34
  var SubmissionBatchData = /*#__PURE__*/function () {
35
35
  /**
@@ -30,7 +30,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
30
30
  /**
31
31
  * The SubmissionBatchWithSubmissions model module.
32
32
  * @module model/SubmissionBatchWithSubmissions
33
- * @version 2.0.0
33
+ * @version 2.1.0
34
34
  */
35
35
  var SubmissionBatchWithSubmissions = /*#__PURE__*/function () {
36
36
  /**
@@ -29,7 +29,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
29
29
  /**
30
30
  * The SubmissionDataRequest model module.
31
31
  * @module model/SubmissionDataRequest
32
- * @version 2.0.0
32
+ * @version 2.1.0
33
33
  */
34
34
  var SubmissionDataRequest = /*#__PURE__*/function () {
35
35
  /**
@@ -29,7 +29,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
29
29
  /**
30
30
  * The SubmissionDataRequestEvent model module.
31
31
  * @module model/SubmissionDataRequestEvent
32
- * @version 2.0.0
32
+ * @version 2.1.0
33
33
  */
34
34
  var SubmissionDataRequestEvent = /*#__PURE__*/function () {
35
35
  /**
@@ -29,7 +29,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
29
29
  /**
30
30
  * The SubmissionDataRequestShow model module.
31
31
  * @module model/SubmissionDataRequestShow
32
- * @version 2.0.0
32
+ * @version 2.1.0
33
33
  */
34
34
  var SubmissionDataRequestShow = /*#__PURE__*/function () {
35
35
  /**
@@ -29,7 +29,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
29
29
  /**
30
30
  * The SubmissionDataRequestToken model module.
31
31
  * @module model/SubmissionDataRequestToken
32
- * @version 2.0.0
32
+ * @version 2.1.0
33
33
  */
34
34
  var SubmissionDataRequestToken = /*#__PURE__*/function () {
35
35
  /**
@@ -31,7 +31,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
31
31
  /**
32
32
  * The SubmissionPreview model module.
33
33
  * @module model/SubmissionPreview
34
- * @version 2.0.0
34
+ * @version 2.1.0
35
35
  */
36
36
  var SubmissionPreview = /*#__PURE__*/function () {
37
37
  /**
@@ -49,6 +49,8 @@ var SubmissionPreview = /*#__PURE__*/function () {
49
49
  * @param processedAt {String}
50
50
  * @param state {module:model/SubmissionPreview.StateEnum}
51
51
  * @param templateId {String}
52
+ * @param templateType {module:model/SubmissionPreview.TemplateTypeEnum}
53
+ * @param templateVersion {String}
52
54
  * @param test {Boolean}
53
55
  * @param truncatedText {Object}
54
56
  * @param pdfHash {String}
@@ -59,9 +61,9 @@ var SubmissionPreview = /*#__PURE__*/function () {
59
61
  * @param auditTrailDownloadUrl {String}
60
62
  * @param actions {Array.<module:model/SubmissionAction>}
61
63
  */
62
- function SubmissionPreview(batchId, dataRequests, editable, expired, expiresAt, id, jsonSchemaErrors, metadata, password, processedAt, state, templateId, test, truncatedText, pdfHash, downloadUrl, permanentDownloadUrl, previewDownloadUrl, previewGeneratedAt, auditTrailDownloadUrl, actions) {
64
+ function SubmissionPreview(batchId, dataRequests, editable, expired, expiresAt, id, jsonSchemaErrors, metadata, password, processedAt, state, templateId, templateType, templateVersion, test, truncatedText, pdfHash, downloadUrl, permanentDownloadUrl, previewDownloadUrl, previewGeneratedAt, auditTrailDownloadUrl, actions) {
63
65
  _classCallCheck(this, SubmissionPreview);
64
- SubmissionPreview.initialize(this, batchId, dataRequests, editable, expired, expiresAt, id, jsonSchemaErrors, metadata, password, processedAt, state, templateId, test, truncatedText, pdfHash, downloadUrl, permanentDownloadUrl, previewDownloadUrl, previewGeneratedAt, auditTrailDownloadUrl, actions);
66
+ SubmissionPreview.initialize(this, batchId, dataRequests, editable, expired, expiresAt, id, jsonSchemaErrors, metadata, password, processedAt, state, templateId, templateType, templateVersion, test, truncatedText, pdfHash, downloadUrl, permanentDownloadUrl, previewDownloadUrl, previewGeneratedAt, auditTrailDownloadUrl, actions);
65
67
  }
66
68
 
67
69
  /**
@@ -71,7 +73,7 @@ var SubmissionPreview = /*#__PURE__*/function () {
71
73
  */
72
74
  return _createClass(SubmissionPreview, null, [{
73
75
  key: "initialize",
74
- 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) {
76
+ value: function initialize(obj, batchId, dataRequests, editable, expired, expiresAt, id, jsonSchemaErrors, metadata, password, processedAt, state, templateId, templateType, templateVersion, test, truncatedText, pdfHash, downloadUrl, permanentDownloadUrl, previewDownloadUrl, previewGeneratedAt, auditTrailDownloadUrl, actions) {
75
77
  obj['batch_id'] = batchId;
76
78
  obj['data_requests'] = dataRequests;
77
79
  obj['editable'] = editable;
@@ -84,6 +86,8 @@ var SubmissionPreview = /*#__PURE__*/function () {
84
86
  obj['processed_at'] = processedAt;
85
87
  obj['state'] = state;
86
88
  obj['template_id'] = templateId;
89
+ obj['template_type'] = templateType;
90
+ obj['template_version'] = templateVersion;
87
91
  obj['test'] = test;
88
92
  obj['truncated_text'] = truncatedText;
89
93
  obj['pdf_hash'] = pdfHash;
@@ -143,6 +147,12 @@ var SubmissionPreview = /*#__PURE__*/function () {
143
147
  if (data.hasOwnProperty('template_id')) {
144
148
  obj['template_id'] = _ApiClient["default"].convertToType(data['template_id'], 'String');
145
149
  }
150
+ if (data.hasOwnProperty('template_type')) {
151
+ obj['template_type'] = _ApiClient["default"].convertToType(data['template_type'], 'String');
152
+ }
153
+ if (data.hasOwnProperty('template_version')) {
154
+ obj['template_version'] = _ApiClient["default"].convertToType(data['template_version'], 'String');
155
+ }
146
156
  if (data.hasOwnProperty('test')) {
147
157
  obj['test'] = _ApiClient["default"].convertToType(data['test'], 'Boolean');
148
158
  }
@@ -251,6 +261,14 @@ var SubmissionPreview = /*#__PURE__*/function () {
251
261
  throw new Error("Expected the field `template_id` to be a primitive type in the JSON string but got " + data['template_id']);
252
262
  }
253
263
  // ensure the json data is a string
264
+ if (data['template_type'] && !(typeof data['template_type'] === 'string' || data['template_type'] instanceof String)) {
265
+ throw new Error("Expected the field `template_type` to be a primitive type in the JSON string but got " + data['template_type']);
266
+ }
267
+ // ensure the json data is a string
268
+ if (data['template_version'] && !(typeof data['template_version'] === 'string' || data['template_version'] instanceof String)) {
269
+ throw new Error("Expected the field `template_version` to be a primitive type in the JSON string but got " + data['template_version']);
270
+ }
271
+ // ensure the json data is a string
254
272
  if (data['pdf_hash'] && !(typeof data['pdf_hash'] === 'string' || data['pdf_hash'] instanceof String)) {
255
273
  throw new Error("Expected the field `pdf_hash` to be a primitive type in the JSON string but got " + data['pdf_hash']);
256
274
  }
@@ -299,7 +317,7 @@ var SubmissionPreview = /*#__PURE__*/function () {
299
317
  }
300
318
  }]);
301
319
  }();
302
- SubmissionPreview.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"];
320
+ SubmissionPreview.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"];
303
321
 
304
322
  /**
305
323
  * @member {String} batch_id
@@ -361,6 +379,16 @@ SubmissionPreview.prototype['state'] = undefined;
361
379
  */
362
380
  SubmissionPreview.prototype['template_id'] = undefined;
363
381
 
382
+ /**
383
+ * @member {module:model/SubmissionPreview.TemplateTypeEnum} template_type
384
+ */
385
+ SubmissionPreview.prototype['template_type'] = undefined;
386
+
387
+ /**
388
+ * @member {String} template_version
389
+ */
390
+ SubmissionPreview.prototype['template_version'] = undefined;
391
+
364
392
  /**
365
393
  * @member {Boolean} test
366
394
  */
@@ -468,4 +496,22 @@ SubmissionPreview['StateEnum'] = {
468
496
  */
469
497
  "accidental": "accidental"
470
498
  };
499
+
500
+ /**
501
+ * Allowed values for the <code>template_type</code> property.
502
+ * @enum {String}
503
+ * @readonly
504
+ */
505
+ SubmissionPreview['TemplateTypeEnum'] = {
506
+ /**
507
+ * value: "pdf"
508
+ * @const
509
+ */
510
+ "pdf": "pdf",
511
+ /**
512
+ * value: "html"
513
+ * @const
514
+ */
515
+ "html": "html"
516
+ };
471
517
  var _default = exports["default"] = SubmissionPreview;
@@ -29,7 +29,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
29
29
  /**
30
30
  * The SuccessErrorResponse model module.
31
31
  * @module model/SuccessErrorResponse
32
- * @version 2.0.0
32
+ * @version 2.1.0
33
33
  */
34
34
  var SuccessErrorResponse = /*#__PURE__*/function () {
35
35
  /**
@@ -29,7 +29,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
29
29
  /**
30
30
  * The SuccessMultipleErrorsResponse model module.
31
31
  * @module model/SuccessMultipleErrorsResponse
32
- * @version 2.0.0
32
+ * @version 2.1.0
33
33
  */
34
34
  var SuccessMultipleErrorsResponse = /*#__PURE__*/function () {
35
35
  /**