docspring 4.3.0 → 4.5.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 (145) hide show
  1. package/AGENTS.md +2 -0
  2. package/LICENSE +1 -1
  3. package/README.md +23 -1
  4. package/dist/ApiClient.js +2 -2
  5. package/dist/RequestSchemas.js +1212 -132
  6. package/dist/RequestValidator.js +4 -0
  7. package/dist/api/Client.js +1364 -207
  8. package/dist/index.js +210 -0
  9. package/dist/model/AddTemplateFieldsRequest.js +3 -3
  10. package/dist/model/AuthenticationCheck.js +1 -1
  11. package/dist/model/CombinedPdf.js +1 -1
  12. package/dist/model/CombinedPdfFiles.js +1 -1
  13. package/dist/model/CombinedPdfList.js +1 -1
  14. package/dist/model/CombinedPdfSource.js +2 -2
  15. package/dist/model/CombinedPdfSourceInput.js +2 -2
  16. package/dist/model/CombinedPdfSourcePdf.js +1 -1
  17. package/dist/model/CopyTemplateRequest.js +1 -1
  18. package/dist/model/CreateAccountEmailActionRequest.js +306 -0
  19. package/dist/model/CreateCombinedPdfRequest.js +1 -1
  20. package/dist/model/CreateCustomFileFromUploadRequest.js +1 -1
  21. package/dist/model/CreateEmailActionRequest.js +280 -0
  22. package/dist/model/CreateEmailDomainRequest.js +114 -0
  23. package/dist/model/CreateFolderRequest.js +1 -1
  24. package/dist/model/CreateSignatureRequestEventRequest.js +1 -1
  25. package/dist/model/CreateSignatureRequestTokenRequest.js +1 -1
  26. package/dist/model/CreateSubmissionBatchRequest.js +4 -4
  27. package/dist/model/CreateSubmissionRequest.js +114 -6
  28. package/dist/model/CreateTemplatePreviewRequest.js +1 -1
  29. package/dist/model/CreateTemplateRequest.js +148 -9
  30. package/dist/model/CreateWebhookRequest.js +1 -1
  31. package/dist/model/CustomFile.js +1 -1
  32. package/dist/model/CustomFileList.js +1 -1
  33. package/dist/model/CustomFileSourcePdf.js +1 -1
  34. package/dist/model/DnsRecordType.js +64 -0
  35. package/dist/model/EmailAction.js +510 -0
  36. package/dist/model/EmailActionConditions.js +142 -0
  37. package/dist/model/EmailActionConditionsInput.js +142 -0
  38. package/dist/model/EmailActionCustomization.js +222 -0
  39. package/dist/model/EmailActionDelivery.js +59 -0
  40. package/dist/model/EmailActionFileFormats.js +69 -0
  41. package/dist/model/EmailActionList.js +132 -0
  42. package/dist/model/EmailActionSetting.js +119 -0
  43. package/dist/model/EmailActionSubmissionType.js +64 -0
  44. package/dist/model/EmailActionTestEmail.js +116 -0
  45. package/dist/model/EmailDomain.js +245 -0
  46. package/dist/model/EmailDomainDnsRecord.js +155 -0
  47. package/dist/model/EmailDomainDnsRecordPurpose.js +64 -0
  48. package/dist/model/EmailDomainList.js +132 -0
  49. package/dist/model/EmailDomainRecordState.js +64 -0
  50. package/dist/model/EmailDomainState.js +64 -0
  51. package/dist/model/ErrorCode.js +10 -0
  52. package/dist/model/ErrorDetail.js +1 -1
  53. package/dist/model/ErrorInfo.js +72 -7
  54. package/dist/model/ErrorResponse.js +1 -1
  55. package/dist/model/Field.js +3 -3
  56. package/dist/model/FieldComparisonCondition.js +1 -1
  57. package/dist/model/FieldDependency.js +1 -1
  58. package/dist/model/FieldDependencyInput.js +1 -1
  59. package/dist/model/FieldEqualsCondition.js +1 -1
  60. package/dist/model/FieldGroup.js +1 -1
  61. package/dist/model/FieldGroupInput.js +1 -1
  62. package/dist/model/FieldInCondition.js +1 -1
  63. package/dist/model/FieldInput.js +2 -2
  64. package/dist/model/FieldOverride.js +1 -1
  65. package/dist/model/FieldPresenceCondition.js +1 -1
  66. package/dist/model/FieldRangeCondition.js +1 -1
  67. package/dist/model/Folder.js +1 -1
  68. package/dist/model/FolderList.js +1 -1
  69. package/dist/model/GenerateSubmissionFilesRequest.js +1 -1
  70. package/dist/model/GeneratedFile.js +1 -1
  71. package/dist/model/HtmlEngineOptions.js +9 -9
  72. package/dist/model/HtmlEngineOptionsInput.js +6 -6
  73. package/dist/model/MoveFolderRequest.js +1 -1
  74. package/dist/model/MoveTemplateRequest.js +1 -1
  75. package/dist/model/PageImage.js +1 -1
  76. package/dist/model/PageImages.js +1 -1
  77. package/dist/model/PredefinedField.js +1 -1
  78. package/dist/model/PredefinedFieldInput.js +1 -1
  79. package/dist/model/PublishTemplateVersionRequest.js +1 -1
  80. package/dist/model/RemoveTemplateFieldsRequest.js +1 -1
  81. package/dist/model/RenameFolderRequest.js +1 -1
  82. package/dist/model/ReorderTemplateFieldsRequest.js +1 -1
  83. package/dist/model/RestoreTemplateVersionRequest.js +1 -1
  84. package/dist/model/SendAccountEmailActionTestEmailRequest.js +91 -0
  85. package/dist/model/SignatureRequest.js +52 -7
  86. package/dist/model/SignatureRequestEmailAttachments.js +59 -0
  87. package/dist/model/SignatureRequestEmailStatus.js +89 -0
  88. package/dist/model/SignatureRequestEvent.js +1 -1
  89. package/dist/model/SignatureRequestEventType.js +11 -1
  90. package/dist/model/SignatureRequestInput.js +24 -8
  91. package/dist/model/SignatureRequestReminders.js +121 -0
  92. package/dist/model/SignatureRequestToken.js +1 -1
  93. package/dist/model/SigningOrder.js +59 -0
  94. package/dist/model/StringConditionType.js +36 -1
  95. package/dist/model/Submission.js +21 -9
  96. package/dist/model/SubmissionAction.js +27 -12
  97. package/dist/model/SubmissionBatch.js +1 -1
  98. package/dist/model/SubmissionFiles.js +1 -1
  99. package/dist/model/SubmissionInput.js +5 -5
  100. package/dist/model/SubmissionList.js +1 -1
  101. package/dist/model/SubmissionSourcePdf.js +1 -1
  102. package/dist/model/SubmissionSummary.js +3 -3
  103. package/dist/model/SubmissionValidation.js +1 -1
  104. package/dist/model/Template.js +189 -21
  105. package/dist/model/TemplateActor.js +1 -1
  106. package/dist/model/TemplateDefaults.js +1 -1
  107. package/dist/model/TemplateDefaultsInput.js +1 -1
  108. package/dist/model/TemplateDiff.js +1 -1
  109. package/dist/model/TemplateDiffSummary.js +1 -1
  110. package/dist/model/TemplateDocument.js +1 -1
  111. package/dist/model/TemplateDocumentSummary.js +1 -1
  112. package/dist/model/TemplateFieldChange.js +1 -1
  113. package/dist/model/TemplateFieldChanges.js +1 -1
  114. package/dist/model/TemplateFieldDependency.js +1 -1
  115. package/dist/model/TemplateFieldDependencyCondition.js +1 -1
  116. package/dist/model/TemplateFieldDependencyConditionInput.js +1 -1
  117. package/dist/model/TemplateFieldDependencyInput.js +1 -1
  118. package/dist/model/TemplateFieldMove.js +1 -1
  119. package/dist/model/TemplateFields.js +1 -1
  120. package/dist/model/TemplateFormSection.js +161 -0
  121. package/dist/model/TemplateFormSectionInput.js +157 -0
  122. package/dist/model/TemplateModelCode.js +1 -1
  123. package/dist/model/TemplatePageImages.js +1 -1
  124. package/dist/model/TemplatePageProcessingStatus.js +1 -1
  125. package/dist/model/TemplatePreview.js +1 -1
  126. package/dist/model/TemplateSourcePdf.js +2 -2
  127. package/dist/model/TemplateSummary.js +9 -9
  128. package/dist/model/TemplateSummaryList.js +1 -1
  129. package/dist/model/TemplateType.js +6 -1
  130. package/dist/model/TemplateVersion.js +1 -1
  131. package/dist/model/UpdateAccountEmailActionRequest.js +306 -0
  132. package/dist/model/UpdateEmailActionCustomizationRequest.js +258 -0
  133. package/dist/model/UpdateEmailActionRequest.js +280 -0
  134. package/dist/model/UpdateSignatureRequestRequest.js +1 -1
  135. package/dist/model/UpdateTemplateDocumentRequest.js +2 -2
  136. package/dist/model/UpdateTemplateFieldsRequest.js +1 -1
  137. package/dist/model/UpdateTemplateRequest.js +173 -12
  138. package/dist/model/UpdateWebhookRequest.js +1 -1
  139. package/dist/model/UploadPresign.js +1 -1
  140. package/dist/model/UrlSourcePdf.js +1 -1
  141. package/dist/model/ValidateSubmissionRequest.js +114 -6
  142. package/dist/model/Webhook.js +1 -1
  143. package/dist/model/WebhookEventType.js +10 -0
  144. package/dist/model/WebhookList.js +1 -1
  145. package/package.json +1 -1
@@ -0,0 +1,161 @@
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, 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
+ * DocSpring API
19
+ * Use DocSpring's API to fill PDF forms, generate PDFs and Word documents from HTML or Word templates, merge PDFs, and request legally binding e-signatures.
20
+ *
21
+ * The version of the OpenAPI document: v2
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 TemplateFormSection model module.
31
+ * @module model/TemplateFormSection
32
+ * @version 4.5.0
33
+ */
34
+ var TemplateFormSection = /*#__PURE__*/function () {
35
+ /**
36
+ * Constructs a new <code>TemplateFormSection</code>.
37
+ * A section of the template's web form, with its fields in order.
38
+ * @alias module:model/TemplateFormSection
39
+ * @extends Object
40
+ * @param id {String} The section's ID, unique among the template's sections. Any string you choose.
41
+ * @param title {String} The section's heading on the web form.
42
+ * @param description {String} Text shown under the section's heading. Null for none.
43
+ * @param field_ids {Array.<Number>} The IDs of the section's fields (Field's `id`), in the order the web form shows them. A field can be in one section only.
44
+ */
45
+ function TemplateFormSection(id, title, description, field_ids) {
46
+ _classCallCheck(this, TemplateFormSection);
47
+ TemplateFormSection.initialize(this, id, title, description, field_ids);
48
+ }
49
+
50
+ /**
51
+ * Initializes the fields of this object.
52
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
53
+ * Only for internal use.
54
+ */
55
+ return _createClass(TemplateFormSection, null, [{
56
+ key: "initialize",
57
+ value: function initialize(obj, id, title, description, field_ids) {
58
+ obj['id'] = id;
59
+ obj['title'] = title;
60
+ obj['description'] = description;
61
+ obj['field_ids'] = field_ids;
62
+ }
63
+
64
+ /**
65
+ * Constructs a <code>TemplateFormSection</code> from a plain JavaScript object, optionally creating a new instance.
66
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
67
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
68
+ * @param {module:model/TemplateFormSection} obj Optional instance to populate.
69
+ * @return {module:model/TemplateFormSection} The populated <code>TemplateFormSection</code> instance.
70
+ */
71
+ }, {
72
+ key: "constructFromObject",
73
+ value: function constructFromObject(data, obj) {
74
+ if (data) {
75
+ obj = obj || new TemplateFormSection();
76
+ _ApiClient["default"].constructFromObject(data, obj, 'Object');
77
+ if (data.hasOwnProperty('id')) {
78
+ obj['id'] = _ApiClient["default"].convertToType(data['id'], 'String');
79
+ }
80
+ if (data.hasOwnProperty('title')) {
81
+ obj['title'] = _ApiClient["default"].convertToType(data['title'], 'String');
82
+ }
83
+ if (data.hasOwnProperty('description')) {
84
+ obj['description'] = _ApiClient["default"].convertToType(data['description'], 'String');
85
+ }
86
+ if (data.hasOwnProperty('field_ids')) {
87
+ obj['field_ids'] = _ApiClient["default"].convertToType(data['field_ids'], ['Number']);
88
+ }
89
+ }
90
+ return obj;
91
+ }
92
+
93
+ /**
94
+ * Validates the JSON data with respect to <code>TemplateFormSection</code>.
95
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
96
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>TemplateFormSection</code>.
97
+ */
98
+ }, {
99
+ key: "validateJSON",
100
+ value: function validateJSON(data) {
101
+ // check to make sure all required properties are present in the JSON string
102
+ var _iterator = _createForOfIteratorHelper(TemplateFormSection.RequiredProperties),
103
+ _step;
104
+ try {
105
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
106
+ var property = _step.value;
107
+ if (!data.hasOwnProperty(property)) {
108
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
109
+ }
110
+ }
111
+ // ensure the json data is a string
112
+ } catch (err) {
113
+ _iterator.e(err);
114
+ } finally {
115
+ _iterator.f();
116
+ }
117
+ if (data['id'] && !(typeof data['id'] === 'string' || data['id'] instanceof String)) {
118
+ throw new Error("Expected the field `id` to be a primitive type in the JSON string but got " + data['id']);
119
+ }
120
+ // ensure the json data is a string
121
+ if (data['title'] && !(typeof data['title'] === 'string' || data['title'] instanceof String)) {
122
+ throw new Error("Expected the field `title` to be a primitive type in the JSON string but got " + data['title']);
123
+ }
124
+ // ensure the json data is a string
125
+ if (data['description'] && !(typeof data['description'] === 'string' || data['description'] instanceof String)) {
126
+ throw new Error("Expected the field `description` to be a primitive type in the JSON string but got " + data['description']);
127
+ }
128
+ // ensure the json data is an array
129
+ if (!Array.isArray(data['field_ids'])) {
130
+ throw new Error("Expected the field `field_ids` to be an array in the JSON data but got " + data['field_ids']);
131
+ }
132
+ return true;
133
+ }
134
+ }]);
135
+ }();
136
+ TemplateFormSection.RequiredProperties = ["id", "title", "description", "field_ids"];
137
+
138
+ /**
139
+ * The section's ID, unique among the template's sections. Any string you choose.
140
+ * @member {String} id
141
+ */
142
+ TemplateFormSection.prototype['id'] = undefined;
143
+
144
+ /**
145
+ * The section's heading on the web form.
146
+ * @member {String} title
147
+ */
148
+ TemplateFormSection.prototype['title'] = undefined;
149
+
150
+ /**
151
+ * Text shown under the section's heading. Null for none.
152
+ * @member {String} description
153
+ */
154
+ TemplateFormSection.prototype['description'] = undefined;
155
+
156
+ /**
157
+ * The IDs of the section's fields (Field's `id`), in the order the web form shows them. A field can be in one section only.
158
+ * @member {Array.<Number>} field_ids
159
+ */
160
+ TemplateFormSection.prototype['field_ids'] = undefined;
161
+ var _default = exports["default"] = TemplateFormSection;
@@ -0,0 +1,157 @@
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, 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
+ * DocSpring API
19
+ * Use DocSpring's API to fill PDF forms, generate PDFs and Word documents from HTML or Word templates, merge PDFs, and request legally binding e-signatures.
20
+ *
21
+ * The version of the OpenAPI document: v2
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 TemplateFormSectionInput model module.
31
+ * @module model/TemplateFormSectionInput
32
+ * @version 4.5.0
33
+ */
34
+ var TemplateFormSectionInput = /*#__PURE__*/function () {
35
+ /**
36
+ * Constructs a new <code>TemplateFormSectionInput</code>.
37
+ * A section of the template's web form, with its fields in order.
38
+ * @alias module:model/TemplateFormSectionInput
39
+ * @param id {String} The section's ID, unique among the template's sections. Any string you choose.
40
+ * @param title {String} The section's heading on the web form.
41
+ * @param field_ids {Array.<Number>} The IDs of the section's fields (Field's `id`), in the order the web form shows them. A field can be in one section only.
42
+ */
43
+ function TemplateFormSectionInput(id, title, field_ids) {
44
+ _classCallCheck(this, TemplateFormSectionInput);
45
+ TemplateFormSectionInput.initialize(this, id, title, field_ids);
46
+ }
47
+
48
+ /**
49
+ * Initializes the fields of this object.
50
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
51
+ * Only for internal use.
52
+ */
53
+ return _createClass(TemplateFormSectionInput, null, [{
54
+ key: "initialize",
55
+ value: function initialize(obj, id, title, field_ids) {
56
+ obj['id'] = id;
57
+ obj['title'] = title;
58
+ obj['field_ids'] = field_ids;
59
+ }
60
+
61
+ /**
62
+ * Constructs a <code>TemplateFormSectionInput</code> from a plain JavaScript object, optionally creating a new instance.
63
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
64
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
65
+ * @param {module:model/TemplateFormSectionInput} obj Optional instance to populate.
66
+ * @return {module:model/TemplateFormSectionInput} The populated <code>TemplateFormSectionInput</code> instance.
67
+ */
68
+ }, {
69
+ key: "constructFromObject",
70
+ value: function constructFromObject(data, obj) {
71
+ if (data) {
72
+ obj = obj || new TemplateFormSectionInput();
73
+ if (data.hasOwnProperty('id')) {
74
+ obj['id'] = _ApiClient["default"].convertToType(data['id'], 'String');
75
+ }
76
+ if (data.hasOwnProperty('title')) {
77
+ obj['title'] = _ApiClient["default"].convertToType(data['title'], 'String');
78
+ }
79
+ if (data.hasOwnProperty('description')) {
80
+ obj['description'] = _ApiClient["default"].convertToType(data['description'], 'String');
81
+ }
82
+ if (data.hasOwnProperty('field_ids')) {
83
+ obj['field_ids'] = _ApiClient["default"].convertToType(data['field_ids'], ['Number']);
84
+ }
85
+ }
86
+ return obj;
87
+ }
88
+
89
+ /**
90
+ * Validates the JSON data with respect to <code>TemplateFormSectionInput</code>.
91
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
92
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>TemplateFormSectionInput</code>.
93
+ */
94
+ }, {
95
+ key: "validateJSON",
96
+ value: function validateJSON(data) {
97
+ // check to make sure all required properties are present in the JSON string
98
+ var _iterator = _createForOfIteratorHelper(TemplateFormSectionInput.RequiredProperties),
99
+ _step;
100
+ try {
101
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
102
+ var property = _step.value;
103
+ if (!data.hasOwnProperty(property)) {
104
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
105
+ }
106
+ }
107
+ // ensure the json data is a string
108
+ } catch (err) {
109
+ _iterator.e(err);
110
+ } finally {
111
+ _iterator.f();
112
+ }
113
+ if (data['id'] && !(typeof data['id'] === 'string' || data['id'] instanceof String)) {
114
+ throw new Error("Expected the field `id` to be a primitive type in the JSON string but got " + data['id']);
115
+ }
116
+ // ensure the json data is a string
117
+ if (data['title'] && !(typeof data['title'] === 'string' || data['title'] instanceof String)) {
118
+ throw new Error("Expected the field `title` to be a primitive type in the JSON string but got " + data['title']);
119
+ }
120
+ // ensure the json data is a string
121
+ if (data['description'] && !(typeof data['description'] === 'string' || data['description'] instanceof String)) {
122
+ throw new Error("Expected the field `description` to be a primitive type in the JSON string but got " + data['description']);
123
+ }
124
+ // ensure the json data is an array
125
+ if (!Array.isArray(data['field_ids'])) {
126
+ throw new Error("Expected the field `field_ids` to be an array in the JSON data but got " + data['field_ids']);
127
+ }
128
+ return true;
129
+ }
130
+ }]);
131
+ }();
132
+ TemplateFormSectionInput.RequiredProperties = ["id", "title", "field_ids"];
133
+
134
+ /**
135
+ * The section's ID, unique among the template's sections. Any string you choose.
136
+ * @member {String} id
137
+ */
138
+ TemplateFormSectionInput.prototype['id'] = undefined;
139
+
140
+ /**
141
+ * The section's heading on the web form.
142
+ * @member {String} title
143
+ */
144
+ TemplateFormSectionInput.prototype['title'] = undefined;
145
+
146
+ /**
147
+ * Text shown under the section's heading. Null for none.
148
+ * @member {String} description
149
+ */
150
+ TemplateFormSectionInput.prototype['description'] = undefined;
151
+
152
+ /**
153
+ * The IDs of the section's fields (Field's `id`), in the order the web form shows them. A field can be in one section only.
154
+ * @member {Array.<Number>} field_ids
155
+ */
156
+ TemplateFormSectionInput.prototype['field_ids'] = undefined;
157
+ var _default = exports["default"] = TemplateFormSectionInput;
@@ -30,7 +30,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
30
30
  /**
31
31
  * The TemplateModelCode model module.
32
32
  * @module model/TemplateModelCode
33
- * @version 4.3.0
33
+ * @version 4.5.0
34
34
  */
35
35
  var TemplateModelCode = /*#__PURE__*/function () {
36
36
  /**
@@ -30,7 +30,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
30
30
  /**
31
31
  * The TemplatePageImages model module.
32
32
  * @module model/TemplatePageImages
33
- * @version 4.3.0
33
+ * @version 4.5.0
34
34
  */
35
35
  var TemplatePageImages = /*#__PURE__*/function () {
36
36
  /**
@@ -33,7 +33,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
33
33
  /**
34
34
  * The TemplatePageProcessingStatus model module.
35
35
  * @module model/TemplatePageProcessingStatus
36
- * @version 4.3.0
36
+ * @version 4.5.0
37
37
  */
38
38
  var TemplatePageProcessingStatus = /*#__PURE__*/function () {
39
39
  /**
@@ -31,7 +31,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
31
31
  /**
32
32
  * The TemplatePreview model module.
33
33
  * @module model/TemplatePreview
34
- * @version 4.3.0
34
+ * @version 4.5.0
35
35
  */
36
36
  var TemplatePreview = /*#__PURE__*/function () {
37
37
  /**
@@ -29,7 +29,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
29
29
  /**
30
30
  * The TemplateSourcePdf model module.
31
31
  * @module model/TemplateSourcePdf
32
- * @version 4.3.0
32
+ * @version 4.5.0
33
33
  */
34
34
  var TemplateSourcePdf = /*#__PURE__*/function () {
35
35
  /**
@@ -139,7 +139,7 @@ TemplateSourcePdf.prototype['type'] = 'template';
139
139
  TemplateSourcePdf.prototype['id'] = undefined;
140
140
 
141
141
  /**
142
- * For a `template` source, the version to use: a published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `latest` (the draft when no version has been published).
142
+ * For a `template` source, the version to use: a published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` (the newest published version, or the draft when none has been published) or `draft`. Default `latest`.
143
143
  * @member {String} template_version
144
144
  */
145
145
  TemplateSourcePdf.prototype['template_version'] = undefined;
@@ -32,7 +32,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
32
32
  /**
33
33
  * The TemplateSummary model module.
34
34
  * @module model/TemplateSummary
35
- * @version 4.3.0
35
+ * @version 4.5.0
36
36
  */
37
37
  var TemplateSummary = /*#__PURE__*/function () {
38
38
  /**
@@ -43,10 +43,10 @@ var TemplateSummary = /*#__PURE__*/function () {
43
43
  * @param id {String} The template's ID.
44
44
  * @param name {String} The template's name.
45
45
  * @param description {String} Shown under the template's name at the top of its hosted forms, and used as their meta description. Not shown on embedded forms or signature requests.
46
- * @param template_type {module:model/TemplateType} `pdf`: fields placed on an uploaded PDF. `html`: a PDF rendered from HTML and SCSS. `docx`: a Word document with tags where the data goes, which makes Word documents or PDFs. It can't be changed after the template is created.
47
- * @param output_format {module:model/OutputFormat} What each submission makes unless its request sets `output_formats`: `docx` (a Word document), `odt` (an OpenDocument file, converted from the Word document) or `pdf`. A Word template's is chosen when it's created; PDF and HTML templates always make PDFs. A Word template that encrypts its PDFs makes PDFs, because Word documents and OpenDocument files can't be password-protected.
48
- * @param ready {Boolean} Whether the template can make documents. HTML templates are always ready. A PDF template is ready once DocSpring has stored its PDF, made an image of each page and finished looking for fields on each page, which can be after `document.state` becomes `processed`. A PDF template with no PDF (`document` is null) isn't ready. A Word template is ready once it has a Word document (a `document_url`'s has been downloaded).
49
- * @param document {module:model/TemplateDocumentSummary} The PDF of a PDF template, or the Word document of a Word template: its file name, page count and processing state. Null for HTML templates, and for a PDF template that has no PDF yet. A template created from a `document_url`, or a Word template created from an OpenDocument file (.odt), has one, with no file, while it's downloaded or converted.
46
+ * @param template_type {module:model/TemplateType} `pdf`: fields placed on an uploaded PDF. `html`: a PDF rendered from HTML and SCSS. `docx`: a Word document with tags where the data goes, which makes Word documents or PDFs. `page_designer`: a page design, a PDF laid out in the Page Designer from its `layout`. It can't be changed after the template is created.
47
+ * @param output_format {module:model/OutputFormat} What each submission makes unless its request sets `output_formats`: `docx` (a Word document), `odt` (an OpenDocument file, converted from the Word document) or `pdf`. A Word template's is chosen when it's created; other templates always make PDFs. A Word template that encrypts its PDFs makes PDFs, because Word documents and OpenDocument files can't be password-protected.
48
+ * @param ready {Boolean} Whether the template can make documents. HTML templates and page designs are always ready. A PDF template is ready once DocSpring has stored its PDF, made an image of each page and finished looking for fields on each page, which can be after `document.state` becomes `processed`. A PDF template with no PDF (`document` is null) isn't ready. A Word template is ready once it has a Word document (a `document_url`'s has been downloaded).
49
+ * @param document {module:model/TemplateDocumentSummary} The PDF of a PDF template, or the Word document of a Word template: its file name, page count and processing state. Null for HTML templates and page designs, and for a PDF template that has no PDF yet. A template created from a `document_url`, or a Word template created from an OpenDocument file (.odt), has one, with no file, while it's downloaded or converted.
50
50
  * @param parent_folder_id {String} The ID of the folder the template is in. Null for a template at the root. Setting it moves the template and all of its published versions.
51
51
  * @param path {String} The path of the folder the template is in, such as `/Contracts`. `/` for a template at the root.
52
52
  * @param latest_version {String} The template's latest published version. Null if no version has been published.
@@ -225,25 +225,25 @@ TemplateSummary.prototype['name'] = undefined;
225
225
  TemplateSummary.prototype['description'] = undefined;
226
226
 
227
227
  /**
228
- * `pdf`: fields placed on an uploaded PDF. `html`: a PDF rendered from HTML and SCSS. `docx`: a Word document with tags where the data goes, which makes Word documents or PDFs. It can't be changed after the template is created.
228
+ * `pdf`: fields placed on an uploaded PDF. `html`: a PDF rendered from HTML and SCSS. `docx`: a Word document with tags where the data goes, which makes Word documents or PDFs. `page_designer`: a page design, a PDF laid out in the Page Designer from its `layout`. It can't be changed after the template is created.
229
229
  * @member {module:model/TemplateType} template_type
230
230
  */
231
231
  TemplateSummary.prototype['template_type'] = undefined;
232
232
 
233
233
  /**
234
- * What each submission makes unless its request sets `output_formats`: `docx` (a Word document), `odt` (an OpenDocument file, converted from the Word document) or `pdf`. A Word template's is chosen when it's created; PDF and HTML templates always make PDFs. A Word template that encrypts its PDFs makes PDFs, because Word documents and OpenDocument files can't be password-protected.
234
+ * What each submission makes unless its request sets `output_formats`: `docx` (a Word document), `odt` (an OpenDocument file, converted from the Word document) or `pdf`. A Word template's is chosen when it's created; other templates always make PDFs. A Word template that encrypts its PDFs makes PDFs, because Word documents and OpenDocument files can't be password-protected.
235
235
  * @member {module:model/OutputFormat} output_format
236
236
  */
237
237
  TemplateSummary.prototype['output_format'] = undefined;
238
238
 
239
239
  /**
240
- * Whether the template can make documents. HTML templates are always ready. A PDF template is ready once DocSpring has stored its PDF, made an image of each page and finished looking for fields on each page, which can be after `document.state` becomes `processed`. A PDF template with no PDF (`document` is null) isn't ready. A Word template is ready once it has a Word document (a `document_url`'s has been downloaded).
240
+ * Whether the template can make documents. HTML templates and page designs are always ready. A PDF template is ready once DocSpring has stored its PDF, made an image of each page and finished looking for fields on each page, which can be after `document.state` becomes `processed`. A PDF template with no PDF (`document` is null) isn't ready. A Word template is ready once it has a Word document (a `document_url`'s has been downloaded).
241
241
  * @member {Boolean} ready
242
242
  */
243
243
  TemplateSummary.prototype['ready'] = undefined;
244
244
 
245
245
  /**
246
- * The PDF of a PDF template, or the Word document of a Word template: its file name, page count and processing state. Null for HTML templates, and for a PDF template that has no PDF yet. A template created from a `document_url`, or a Word template created from an OpenDocument file (.odt), has one, with no file, while it's downloaded or converted.
246
+ * The PDF of a PDF template, or the Word document of a Word template: its file name, page count and processing state. Null for HTML templates and page designs, and for a PDF template that has no PDF yet. A template created from a `document_url`, or a Word template created from an OpenDocument file (.odt), has one, with no file, while it's downloaded or converted.
247
247
  * @member {module:model/TemplateDocumentSummary} document
248
248
  */
249
249
  TemplateSummary.prototype['document'] = undefined;
@@ -30,7 +30,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
30
30
  /**
31
31
  * The TemplateSummaryList model module.
32
32
  * @module model/TemplateSummaryList
33
- * @version 4.3.0
33
+ * @version 4.5.0
34
34
  */
35
35
  var TemplateSummaryList = /*#__PURE__*/function () {
36
36
  /**
@@ -61,4 +61,9 @@ _defineProperty(TemplateType, "html", "html");
61
61
  * value: "docx"
62
62
  * @const
63
63
  */
64
- _defineProperty(TemplateType, "docx", "docx");
64
+ _defineProperty(TemplateType, "docx", "docx");
65
+ /**
66
+ * value: "page_designer"
67
+ * @const
68
+ */
69
+ _defineProperty(TemplateType, "page_designer", "page_designer");
@@ -30,7 +30,7 @@ function _toPrimitive(t, e) { if ("object" != _typeof(t) || !t) return t; var r;
30
30
  /**
31
31
  * The TemplateVersion model module.
32
32
  * @module model/TemplateVersion
33
- * @version 4.3.0
33
+ * @version 4.5.0
34
34
  */
35
35
  var TemplateVersion = /*#__PURE__*/function () {
36
36
  /**