docspring 3.2.0 → 4.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 (157) hide show
  1. package/AGENTS.md +79 -19
  2. package/README.md +65 -63
  3. package/dist/ApiClient.js +62 -27
  4. package/dist/RequestSchemas.js +2297 -0
  5. package/dist/RequestValidator.js +494 -0
  6. package/dist/api/Client.js +1345 -946
  7. package/dist/index.js +655 -151
  8. package/dist/model/AiFieldNamingLanguage.js +64 -0
  9. package/dist/model/{AddFieldsData.js → AuthenticationCheck.js} +31 -31
  10. package/dist/model/BarcodeSymbology.js +89 -0
  11. package/dist/model/CheckCharacter.js +74 -0
  12. package/dist/model/CombinedFieldType.js +59 -0
  13. package/dist/model/CombinedPdf.js +294 -0
  14. package/dist/model/{MoveFolderData.js → CombinedPdfFiles.js} +26 -26
  15. package/dist/model/CombinedPdfList.js +132 -0
  16. package/dist/model/{SubmissionDataRequestToken.js → CombinedPdfSource.js} +55 -52
  17. package/dist/model/CombinedPdfSourceInput.js +270 -0
  18. package/dist/model/{SuccessErrorResponse.js → CombinedPdfSourcePdf.js} +41 -55
  19. package/dist/model/CombinedPdfSourceType.js +74 -0
  20. package/dist/model/CombinedPdfState.js +74 -0
  21. package/dist/model/{CopyTemplateOptions.js → CopyTemplateRequest.js} +25 -21
  22. package/dist/model/{CombinePdfsData.js → CreateCombinedPdfRequest.js} +68 -52
  23. package/dist/model/{CreateCustomFileData.js → CreateCustomFileFromUploadRequest.js} +24 -22
  24. package/dist/model/{CreateFolderData.js → CreateFolderRequest.js} +46 -27
  25. package/dist/model/{CreateSubmissionDataRequestEventRequest.js → CreateSignatureRequestEventRequest.js} +41 -137
  26. package/dist/model/CreateSignatureRequestTokenRequest.js +88 -0
  27. package/dist/model/{CreatePdfSubmissionData.js → CreateSubmissionBatchRequest.js} +63 -87
  28. package/dist/model/CreateSubmissionRequest.js +212 -0
  29. package/dist/model/CreateTemplateRequest.js +545 -0
  30. package/dist/model/CreateWebhookRequest.js +234 -0
  31. package/dist/model/CustomFile.js +66 -15
  32. package/dist/model/CustomFileList.js +132 -0
  33. package/dist/model/CustomFileSourcePdf.js +130 -0
  34. package/dist/model/ErrorCode.js +154 -0
  35. package/dist/model/{BatchGeneratePdfs201Response.js → ErrorDetail.js} +65 -76
  36. package/dist/model/ErrorInfo.js +211 -0
  37. package/dist/model/ErrorResponse.js +11 -40
  38. package/dist/model/ExpirationInterval.js +64 -0
  39. package/dist/model/{CreateSubmissionResponse.js → FieldComparisonCondition.js} +46 -64
  40. package/dist/model/FieldComparisonOperator.js +69 -0
  41. package/dist/model/FieldDisplayType.js +79 -0
  42. package/dist/model/FieldEqualsCondition.js +137 -0
  43. package/dist/model/FieldEqualsOperator.js +59 -0
  44. package/dist/model/FieldInCondition.js +145 -0
  45. package/dist/model/FieldOverride.js +722 -0
  46. package/dist/model/{MultipleErrorsResponse.js → FieldPresenceCondition.js} +39 -54
  47. package/dist/model/FieldPresenceOperator.js +59 -0
  48. package/dist/model/FieldRangeCondition.js +148 -0
  49. package/dist/model/FieldReimportState.js +69 -0
  50. package/dist/model/FieldSetupLogic.js +59 -0
  51. package/dist/model/FieldSetupNaming.js +59 -0
  52. package/dist/model/FieldSetupSource.js +64 -0
  53. package/dist/model/Folder.js +37 -10
  54. package/dist/model/FolderList.js +132 -0
  55. package/dist/model/GeneratedFile.js +214 -0
  56. package/dist/model/GeneratedFileState.js +64 -0
  57. package/dist/model/HtmlEngineOptions.js +230 -0
  58. package/dist/model/HtmlEngineOptionsInput.js +193 -0
  59. package/dist/model/ImageGravity.js +94 -0
  60. package/dist/model/ImageScaleType.js +64 -0
  61. package/dist/model/ModelCodeLanguage.js +94 -0
  62. package/dist/model/{UpdatePdfTemplate.js → MoveFolderRequest.js} +33 -27
  63. package/dist/model/{MoveTemplateData.js → MoveTemplateRequest.js} +24 -34
  64. package/dist/model/NumberConditionType.js +79 -0
  65. package/dist/model/PageFormat.js +114 -0
  66. package/dist/model/{PublishVersionData.js → PublishTemplateVersionRequest.js} +32 -32
  67. package/dist/model/{RenameFolderData.js → RenameFolderRequest.js} +24 -22
  68. package/dist/model/{RestoreVersionData.js → RestoreTemplateVersionRequest.js} +24 -22
  69. package/dist/model/ShapeType.js +79 -0
  70. package/dist/model/{SubmissionDataRequestShow.js → SignatureRequest.js} +164 -239
  71. package/dist/model/SignatureRequestAuthSecondFactorType.js +79 -0
  72. package/dist/model/SignatureRequestAuthType.js +84 -0
  73. package/dist/model/{SubmissionDataRequestEvent.js → SignatureRequestEvent.js} +66 -148
  74. package/dist/model/SignatureRequestEventType.js +79 -0
  75. package/dist/model/SignatureRequestInput.js +278 -0
  76. package/dist/model/SignatureRequestMessageType.js +94 -0
  77. package/dist/model/SignatureRequestState.js +64 -0
  78. package/dist/model/SignatureRequestToken.js +195 -0
  79. package/dist/model/SignatureRequestTokenType.js +59 -0
  80. package/dist/model/StringConditionType.js +74 -0
  81. package/dist/model/Submission.js +185 -339
  82. package/dist/model/SubmissionAction.js +29 -114
  83. package/dist/model/SubmissionActionState.js +69 -0
  84. package/dist/model/SubmissionActionType.js +84 -0
  85. package/dist/model/SubmissionBatch.js +73 -54
  86. package/dist/model/SubmissionBatchState.js +64 -0
  87. package/dist/model/SubmissionFiles.js +108 -0
  88. package/dist/model/SubmissionInput.js +204 -0
  89. package/dist/model/{ListSubmissionsResponse.js → SubmissionList.js} +34 -41
  90. package/dist/model/SubmissionSource.js +69 -0
  91. package/dist/model/SubmissionSourcePdf.js +130 -0
  92. package/dist/model/SubmissionState.js +114 -0
  93. package/dist/model/Template.js +309 -572
  94. package/dist/model/TemplateActor.js +171 -0
  95. package/dist/model/TemplateActorType.js +64 -0
  96. package/dist/model/TemplateDefaults.js +307 -0
  97. package/dist/model/TemplateDefaultsInput.js +305 -0
  98. package/dist/model/TemplateDocument.js +280 -0
  99. package/dist/model/TemplateDocumentState.js +74 -0
  100. package/dist/model/TemplateFieldDependency.js +184 -0
  101. package/dist/model/TemplateFieldDependencyAction.js +64 -0
  102. package/dist/model/{CreateCombinedSubmissionResponse.js → TemplateFieldDependencyCondition.js} +50 -61
  103. package/dist/model/TemplateFieldDependencyConditionInput.js +304 -0
  104. package/dist/model/TemplateFieldDependencyInput.js +182 -0
  105. package/dist/model/TemplateFieldDependencyMatch.js +59 -0
  106. package/dist/model/TemplateFieldDependencyOperator.js +99 -0
  107. package/dist/model/TemplateFieldLogicStatus.js +74 -0
  108. package/dist/model/TemplateFormMode.js +64 -0
  109. package/dist/model/{TemplateModelCodeResponse.js → TemplateModelCode.js} +33 -85
  110. package/dist/model/TemplatePageAiError.js +69 -0
  111. package/dist/model/TemplatePageAiNamingStatus.js +59 -0
  112. package/dist/model/TemplatePageFieldsStatus.js +74 -0
  113. package/dist/model/TemplatePageImageStatus.js +59 -0
  114. package/dist/model/TemplatePageProcessingStatus.js +162 -0
  115. package/dist/model/{SubmissionBatchData.js → TemplateSourcePdf.js} +49 -49
  116. package/dist/model/TemplateSummary.js +560 -0
  117. package/dist/model/{SuccessMultipleErrorsResponse.js → TemplateSummaryList.js} +43 -55
  118. package/dist/model/TemplateType.js +59 -0
  119. package/dist/model/{Submission422Response.js → TemplateVersion.js} +59 -62
  120. package/dist/model/TemplateVersionType.js +64 -0
  121. package/dist/model/TextAlignment.js +69 -0
  122. package/dist/model/TextOverflow.js +59 -0
  123. package/dist/model/TextVerticalAlignment.js +64 -0
  124. package/dist/model/Typeface.js +134 -0
  125. package/dist/model/UpdateSignatureRequestRequest.js +183 -0
  126. package/dist/model/{ErrorOrMultipleErrorsResponse.js → UpdateTemplateDocumentRequest.js} +43 -60
  127. package/dist/model/UpdateTemplateRequest.js +450 -0
  128. package/dist/model/UpdateWebhookRequest.js +209 -0
  129. package/dist/model/UploadMethod.js +54 -0
  130. package/dist/model/{UploadPresignResponse.js → UploadPresign.js} +52 -57
  131. package/dist/model/UrlSourcePdf.js +130 -0
  132. package/dist/model/Webhook.js +57 -72
  133. package/dist/model/WebhookEventType.js +174 -0
  134. package/dist/model/WebhookList.js +132 -0
  135. package/dist/model/WebhookMode.js +59 -0
  136. package/package.json +1 -1
  137. package/dist/model/CombinedSubmission.js +0 -308
  138. package/dist/model/CombinedSubmissionAction.js +0 -268
  139. package/dist/model/CreateCustomFileResponse.js +0 -155
  140. package/dist/model/CreateHtmlTemplate.js +0 -108
  141. package/dist/model/CreatePdfTemplate.js +0 -108
  142. package/dist/model/CreateSubmissionDataRequestData.js +0 -314
  143. package/dist/model/CreateSubmissionDataRequestEventResponse.js +0 -155
  144. package/dist/model/CreateSubmissionDataRequestResponse.js +0 -155
  145. package/dist/model/CreateSubmissionDataRequestTokenResponse.js +0 -155
  146. package/dist/model/CreateWebhookData.js +0 -108
  147. package/dist/model/JsonSchema.js +0 -205
  148. package/dist/model/SubmissionBatchWithSubmissions.js +0 -228
  149. package/dist/model/SubmissionDataRequest.js +0 -496
  150. package/dist/model/SubmissionPreview.js +0 -504
  151. package/dist/model/TemplateAddFieldsResponse.js +0 -156
  152. package/dist/model/TemplateDeleteResponse.js +0 -168
  153. package/dist/model/TemplatePreview.js +0 -796
  154. package/dist/model/TemplatePublishVersionResponse.js +0 -154
  155. package/dist/model/UpdateHtmlTemplate.js +0 -108
  156. package/dist/model/UpdateSubmissionDataRequestData.js +0 -311
  157. package/dist/model/UpdateWebhookData.js +0 -108
@@ -0,0 +1,722 @@
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
+ var _BarcodeSymbology = _interopRequireDefault(require("./BarcodeSymbology"));
9
+ var _CheckCharacter = _interopRequireDefault(require("./CheckCharacter"));
10
+ var _CombinedFieldType = _interopRequireDefault(require("./CombinedFieldType"));
11
+ var _FieldDisplayType = _interopRequireDefault(require("./FieldDisplayType"));
12
+ var _ImageGravity = _interopRequireDefault(require("./ImageGravity"));
13
+ var _ImageScaleType = _interopRequireDefault(require("./ImageScaleType"));
14
+ var _NumberConditionType = _interopRequireDefault(require("./NumberConditionType"));
15
+ var _ShapeType = _interopRequireDefault(require("./ShapeType"));
16
+ var _StringConditionType = _interopRequireDefault(require("./StringConditionType"));
17
+ var _TextAlignment = _interopRequireDefault(require("./TextAlignment"));
18
+ var _TextOverflow = _interopRequireDefault(require("./TextOverflow"));
19
+ var _TextVerticalAlignment = _interopRequireDefault(require("./TextVerticalAlignment"));
20
+ var _Typeface = _interopRequireDefault(require("./Typeface"));
21
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
22
+ 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); }
23
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
24
+ 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); } }
25
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
26
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
27
+ 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); } /**
28
+ * DocSpring API
29
+ * Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
30
+ *
31
+ * The version of the OpenAPI document: v2
32
+ *
33
+ *
34
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
35
+ * https://openapi-generator.tech
36
+ * Do not edit the class manually.
37
+ *
38
+ */
39
+ /**
40
+ * The FieldOverride model module.
41
+ * @module model/FieldOverride
42
+ * @version 4.0.0
43
+ */
44
+ var FieldOverride = /*#__PURE__*/function () {
45
+ /**
46
+ * Constructs a new <code>FieldOverride</code>.
47
+ * Changes to one field's settings for this submission only. Settings left out keep the template's.
48
+ * @alias module:model/FieldOverride
49
+ */
50
+ function FieldOverride() {
51
+ _classCallCheck(this, FieldOverride);
52
+ FieldOverride.initialize(this);
53
+ }
54
+
55
+ /**
56
+ * Initializes the fields of this object.
57
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
58
+ * Only for internal use.
59
+ */
60
+ return _createClass(FieldOverride, null, [{
61
+ key: "initialize",
62
+ value: function initialize(obj) {}
63
+
64
+ /**
65
+ * Constructs a <code>FieldOverride</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/FieldOverride} obj Optional instance to populate.
69
+ * @return {module:model/FieldOverride} The populated <code>FieldOverride</code> instance.
70
+ */
71
+ }, {
72
+ key: "constructFromObject",
73
+ value: function constructFromObject(data, obj) {
74
+ if (data) {
75
+ obj = obj || new FieldOverride();
76
+ if (data.hasOwnProperty('static')) {
77
+ obj['static'] = _ApiClient["default"].convertToType(data['static'], 'Boolean');
78
+ }
79
+ if (data.hasOwnProperty('editable')) {
80
+ obj['editable'] = _ApiClient["default"].convertToType(data['editable'], 'Boolean');
81
+ }
82
+ if (data.hasOwnProperty('default')) {
83
+ obj['default'] = _ApiClient["default"].convertToType(data['default'], 'String');
84
+ }
85
+ if (data.hasOwnProperty('title')) {
86
+ obj['title'] = _ApiClient["default"].convertToType(data['title'], 'String');
87
+ }
88
+ if (data.hasOwnProperty('required')) {
89
+ obj['required'] = _ApiClient["default"].convertToType(data['required'], 'Boolean');
90
+ }
91
+ if (data.hasOwnProperty('option_list')) {
92
+ obj['option_list'] = _ApiClient["default"].convertToType(data['option_list'], 'String');
93
+ }
94
+ if (data.hasOwnProperty('combined_field_names')) {
95
+ obj['combined_field_names'] = _ApiClient["default"].convertToType(data['combined_field_names'], 'String');
96
+ }
97
+ if (data.hasOwnProperty('combined_field_type')) {
98
+ obj['combined_field_type'] = _ApiClient["default"].convertToType(data['combined_field_type'], _CombinedFieldType["default"]);
99
+ }
100
+ if (data.hasOwnProperty('combined_field_separator')) {
101
+ obj['combined_field_separator'] = _ApiClient["default"].convertToType(data['combined_field_separator'], 'String');
102
+ }
103
+ if (data.hasOwnProperty('combined_field_format')) {
104
+ obj['combined_field_format'] = _ApiClient["default"].convertToType(data['combined_field_format'], 'String');
105
+ }
106
+ if (data.hasOwnProperty('integer')) {
107
+ obj['integer'] = _ApiClient["default"].convertToType(data['integer'], 'Boolean');
108
+ }
109
+ if (data.hasOwnProperty('include_time')) {
110
+ obj['include_time'] = _ApiClient["default"].convertToType(data['include_time'], 'Boolean');
111
+ }
112
+ if (data.hasOwnProperty('signature_allow_draw')) {
113
+ obj['signature_allow_draw'] = _ApiClient["default"].convertToType(data['signature_allow_draw'], 'Boolean');
114
+ }
115
+ if (data.hasOwnProperty('signature_allow_type')) {
116
+ obj['signature_allow_type'] = _ApiClient["default"].convertToType(data['signature_allow_type'], 'Boolean');
117
+ }
118
+ if (data.hasOwnProperty('barcode_symbology')) {
119
+ obj['barcode_symbology'] = _ApiClient["default"].convertToType(data['barcode_symbology'], _BarcodeSymbology["default"]);
120
+ }
121
+ if (data.hasOwnProperty('hidden')) {
122
+ obj['hidden'] = _ApiClient["default"].convertToType(data['hidden'], 'Boolean');
123
+ }
124
+ if (data.hasOwnProperty('x')) {
125
+ obj['x'] = _ApiClient["default"].convertToType(data['x'], 'Number');
126
+ }
127
+ if (data.hasOwnProperty('y')) {
128
+ obj['y'] = _ApiClient["default"].convertToType(data['y'], 'Number');
129
+ }
130
+ if (data.hasOwnProperty('width')) {
131
+ obj['width'] = _ApiClient["default"].convertToType(data['width'], 'Number');
132
+ }
133
+ if (data.hasOwnProperty('height')) {
134
+ obj['height'] = _ApiClient["default"].convertToType(data['height'], 'Number');
135
+ }
136
+ if (data.hasOwnProperty('rotation')) {
137
+ obj['rotation'] = _ApiClient["default"].convertToType(data['rotation'], 'Number');
138
+ }
139
+ if (data.hasOwnProperty('display_type')) {
140
+ obj['display_type'] = _ApiClient["default"].convertToType(data['display_type'], _FieldDisplayType["default"]);
141
+ }
142
+ if (data.hasOwnProperty('opacity')) {
143
+ obj['opacity'] = _ApiClient["default"].convertToType(data['opacity'], 'Number');
144
+ }
145
+ if (data.hasOwnProperty('date_time_format')) {
146
+ obj['date_time_format'] = _ApiClient["default"].convertToType(data['date_time_format'], 'String');
147
+ }
148
+ if (data.hasOwnProperty('typeface')) {
149
+ obj['typeface'] = _ApiClient["default"].convertToType(data['typeface'], _Typeface["default"]);
150
+ }
151
+ if (data.hasOwnProperty('font_size')) {
152
+ obj['font_size'] = _ApiClient["default"].convertToType(data['font_size'], 'Number');
153
+ }
154
+ if (data.hasOwnProperty('character_spacing')) {
155
+ obj['character_spacing'] = _ApiClient["default"].convertToType(data['character_spacing'], 'Number');
156
+ }
157
+ if (data.hasOwnProperty('bold')) {
158
+ obj['bold'] = _ApiClient["default"].convertToType(data['bold'], 'Boolean');
159
+ }
160
+ if (data.hasOwnProperty('uppercase')) {
161
+ obj['uppercase'] = _ApiClient["default"].convertToType(data['uppercase'], 'Boolean');
162
+ }
163
+ if (data.hasOwnProperty('strikethrough')) {
164
+ obj['strikethrough'] = _ApiClient["default"].convertToType(data['strikethrough'], 'Boolean');
165
+ }
166
+ if (data.hasOwnProperty('keep_leading_spaces')) {
167
+ obj['keep_leading_spaces'] = _ApiClient["default"].convertToType(data['keep_leading_spaces'], 'Boolean');
168
+ }
169
+ if (data.hasOwnProperty('overflow')) {
170
+ obj['overflow'] = _ApiClient["default"].convertToType(data['overflow'], _TextOverflow["default"]);
171
+ }
172
+ if (data.hasOwnProperty('multiline')) {
173
+ obj['multiline'] = _ApiClient["default"].convertToType(data['multiline'], 'Boolean');
174
+ }
175
+ if (data.hasOwnProperty('multiline_lines')) {
176
+ obj['multiline_lines'] = _ApiClient["default"].convertToType(data['multiline_lines'], 'Number');
177
+ }
178
+ if (data.hasOwnProperty('max_length')) {
179
+ obj['max_length'] = _ApiClient["default"].convertToType(data['max_length'], 'Number');
180
+ }
181
+ if (data.hasOwnProperty('color')) {
182
+ obj['color'] = _ApiClient["default"].convertToType(data['color'], 'String');
183
+ }
184
+ if (data.hasOwnProperty('background_color')) {
185
+ obj['background_color'] = _ApiClient["default"].convertToType(data['background_color'], 'String');
186
+ }
187
+ if (data.hasOwnProperty('alignment')) {
188
+ obj['alignment'] = _ApiClient["default"].convertToType(data['alignment'], _TextAlignment["default"]);
189
+ }
190
+ if (data.hasOwnProperty('v_alignment')) {
191
+ obj['v_alignment'] = _ApiClient["default"].convertToType(data['v_alignment'], _TextVerticalAlignment["default"]);
192
+ }
193
+ if (data.hasOwnProperty('comb')) {
194
+ obj['comb'] = _ApiClient["default"].convertToType(data['comb'], 'Boolean');
195
+ }
196
+ if (data.hasOwnProperty('comb_number_of_cells')) {
197
+ obj['comb_number_of_cells'] = _ApiClient["default"].convertToType(data['comb_number_of_cells'], 'Number');
198
+ }
199
+ if (data.hasOwnProperty('comb_value_offset')) {
200
+ obj['comb_value_offset'] = _ApiClient["default"].convertToType(data['comb_value_offset'], 'Number');
201
+ }
202
+ if (data.hasOwnProperty('shape_type')) {
203
+ obj['shape_type'] = _ApiClient["default"].convertToType(data['shape_type'], _ShapeType["default"]);
204
+ }
205
+ if (data.hasOwnProperty('shape_sides')) {
206
+ obj['shape_sides'] = _ApiClient["default"].convertToType(data['shape_sides'], 'Number');
207
+ }
208
+ if (data.hasOwnProperty('shape_border_width')) {
209
+ obj['shape_border_width'] = _ApiClient["default"].convertToType(data['shape_border_width'], 'Number');
210
+ }
211
+ if (data.hasOwnProperty('shape_border_color')) {
212
+ obj['shape_border_color'] = _ApiClient["default"].convertToType(data['shape_border_color'], 'String');
213
+ }
214
+ if (data.hasOwnProperty('shape_fill_color')) {
215
+ obj['shape_fill_color'] = _ApiClient["default"].convertToType(data['shape_fill_color'], 'String');
216
+ }
217
+ if (data.hasOwnProperty('check_character')) {
218
+ obj['check_character'] = _ApiClient["default"].convertToType(data['check_character'], _CheckCharacter["default"]);
219
+ }
220
+ if (data.hasOwnProperty('check_color')) {
221
+ obj['check_color'] = _ApiClient["default"].convertToType(data['check_color'], 'String');
222
+ }
223
+ if (data.hasOwnProperty('qrcode_color')) {
224
+ obj['qrcode_color'] = _ApiClient["default"].convertToType(data['qrcode_color'], 'String');
225
+ }
226
+ if (data.hasOwnProperty('true_text')) {
227
+ obj['true_text'] = _ApiClient["default"].convertToType(data['true_text'], 'String');
228
+ }
229
+ if (data.hasOwnProperty('false_text')) {
230
+ obj['false_text'] = _ApiClient["default"].convertToType(data['false_text'], 'String');
231
+ }
232
+ if (data.hasOwnProperty('condition')) {
233
+ obj['condition'] = _ApiClient["default"].convertToType(data['condition'], 'String');
234
+ }
235
+ if (data.hasOwnProperty('string_condition_type')) {
236
+ obj['string_condition_type'] = _ApiClient["default"].convertToType(data['string_condition_type'], _StringConditionType["default"]);
237
+ }
238
+ if (data.hasOwnProperty('number_condition_type')) {
239
+ obj['number_condition_type'] = _ApiClient["default"].convertToType(data['number_condition_type'], _NumberConditionType["default"]);
240
+ }
241
+ if (data.hasOwnProperty('number_condition_range_min')) {
242
+ obj['number_condition_range_min'] = _ApiClient["default"].convertToType(data['number_condition_range_min'], 'Number');
243
+ }
244
+ if (data.hasOwnProperty('number_condition_range_max')) {
245
+ obj['number_condition_range_max'] = _ApiClient["default"].convertToType(data['number_condition_range_max'], 'Number');
246
+ }
247
+ if (data.hasOwnProperty('number_condition_range_exclusive_min')) {
248
+ obj['number_condition_range_exclusive_min'] = _ApiClient["default"].convertToType(data['number_condition_range_exclusive_min'], 'Boolean');
249
+ }
250
+ if (data.hasOwnProperty('number_condition_range_exclusive_max')) {
251
+ obj['number_condition_range_exclusive_max'] = _ApiClient["default"].convertToType(data['number_condition_range_exclusive_max'], 'Boolean');
252
+ }
253
+ if (data.hasOwnProperty('invert_boolean_condition')) {
254
+ obj['invert_boolean_condition'] = _ApiClient["default"].convertToType(data['invert_boolean_condition'], 'Boolean');
255
+ }
256
+ if (data.hasOwnProperty('decimal_places')) {
257
+ obj['decimal_places'] = _ApiClient["default"].convertToType(data['decimal_places'], 'Number');
258
+ }
259
+ if (data.hasOwnProperty('image_scale_type')) {
260
+ obj['image_scale_type'] = _ApiClient["default"].convertToType(data['image_scale_type'], _ImageScaleType["default"]);
261
+ }
262
+ if (data.hasOwnProperty('image_gravity')) {
263
+ obj['image_gravity'] = _ApiClient["default"].convertToType(data['image_gravity'], _ImageGravity["default"]);
264
+ }
265
+ }
266
+ return obj;
267
+ }
268
+
269
+ /**
270
+ * Validates the JSON data with respect to <code>FieldOverride</code>.
271
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
272
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>FieldOverride</code>.
273
+ */
274
+ }, {
275
+ key: "validateJSON",
276
+ value: function validateJSON(data) {
277
+ // ensure the json data is a string
278
+ if (data['default'] && !(typeof data['default'] === 'string' || data['default'] instanceof String)) {
279
+ throw new Error("Expected the field `default` to be a primitive type in the JSON string but got " + data['default']);
280
+ }
281
+ // ensure the json data is a string
282
+ if (data['title'] && !(typeof data['title'] === 'string' || data['title'] instanceof String)) {
283
+ throw new Error("Expected the field `title` to be a primitive type in the JSON string but got " + data['title']);
284
+ }
285
+ // ensure the json data is a string
286
+ if (data['option_list'] && !(typeof data['option_list'] === 'string' || data['option_list'] instanceof String)) {
287
+ throw new Error("Expected the field `option_list` to be a primitive type in the JSON string but got " + data['option_list']);
288
+ }
289
+ // ensure the json data is a string
290
+ if (data['combined_field_names'] && !(typeof data['combined_field_names'] === 'string' || data['combined_field_names'] instanceof String)) {
291
+ throw new Error("Expected the field `combined_field_names` to be a primitive type in the JSON string but got " + data['combined_field_names']);
292
+ }
293
+ // ensure the json data is a string
294
+ if (data['combined_field_separator'] && !(typeof data['combined_field_separator'] === 'string' || data['combined_field_separator'] instanceof String)) {
295
+ throw new Error("Expected the field `combined_field_separator` to be a primitive type in the JSON string but got " + data['combined_field_separator']);
296
+ }
297
+ // ensure the json data is a string
298
+ if (data['combined_field_format'] && !(typeof data['combined_field_format'] === 'string' || data['combined_field_format'] instanceof String)) {
299
+ throw new Error("Expected the field `combined_field_format` to be a primitive type in the JSON string but got " + data['combined_field_format']);
300
+ }
301
+ // ensure the json data is a string
302
+ if (data['date_time_format'] && !(typeof data['date_time_format'] === 'string' || data['date_time_format'] instanceof String)) {
303
+ throw new Error("Expected the field `date_time_format` to be a primitive type in the JSON string but got " + data['date_time_format']);
304
+ }
305
+ // ensure the json data is a string
306
+ if (data['color'] && !(typeof data['color'] === 'string' || data['color'] instanceof String)) {
307
+ throw new Error("Expected the field `color` to be a primitive type in the JSON string but got " + data['color']);
308
+ }
309
+ // ensure the json data is a string
310
+ if (data['background_color'] && !(typeof data['background_color'] === 'string' || data['background_color'] instanceof String)) {
311
+ throw new Error("Expected the field `background_color` to be a primitive type in the JSON string but got " + data['background_color']);
312
+ }
313
+ // ensure the json data is a string
314
+ if (data['shape_border_color'] && !(typeof data['shape_border_color'] === 'string' || data['shape_border_color'] instanceof String)) {
315
+ throw new Error("Expected the field `shape_border_color` to be a primitive type in the JSON string but got " + data['shape_border_color']);
316
+ }
317
+ // ensure the json data is a string
318
+ if (data['shape_fill_color'] && !(typeof data['shape_fill_color'] === 'string' || data['shape_fill_color'] instanceof String)) {
319
+ throw new Error("Expected the field `shape_fill_color` to be a primitive type in the JSON string but got " + data['shape_fill_color']);
320
+ }
321
+ // ensure the json data is a string
322
+ if (data['check_color'] && !(typeof data['check_color'] === 'string' || data['check_color'] instanceof String)) {
323
+ throw new Error("Expected the field `check_color` to be a primitive type in the JSON string but got " + data['check_color']);
324
+ }
325
+ // ensure the json data is a string
326
+ if (data['qrcode_color'] && !(typeof data['qrcode_color'] === 'string' || data['qrcode_color'] instanceof String)) {
327
+ throw new Error("Expected the field `qrcode_color` to be a primitive type in the JSON string but got " + data['qrcode_color']);
328
+ }
329
+ // ensure the json data is a string
330
+ if (data['true_text'] && !(typeof data['true_text'] === 'string' || data['true_text'] instanceof String)) {
331
+ throw new Error("Expected the field `true_text` to be a primitive type in the JSON string but got " + data['true_text']);
332
+ }
333
+ // ensure the json data is a string
334
+ if (data['false_text'] && !(typeof data['false_text'] === 'string' || data['false_text'] instanceof String)) {
335
+ throw new Error("Expected the field `false_text` to be a primitive type in the JSON string but got " + data['false_text']);
336
+ }
337
+ // ensure the json data is a string
338
+ if (data['condition'] && !(typeof data['condition'] === 'string' || data['condition'] instanceof String)) {
339
+ throw new Error("Expected the field `condition` to be a primitive type in the JSON string but got " + data['condition']);
340
+ }
341
+ return true;
342
+ }
343
+ }]);
344
+ }();
345
+ /**
346
+ * Print the field's `default` (a fixed value, or a formula for a number field) on the PDF instead of a value from `data`.
347
+ * @member {Boolean} static
348
+ */
349
+ FieldOverride.prototype['static'] = undefined;
350
+
351
+ /**
352
+ * Keep this field fillable in the PDF instead of flattening it to text. The submission's `editable` overrides it.
353
+ * @member {Boolean} editable
354
+ */
355
+ FieldOverride.prototype['editable'] = undefined;
356
+
357
+ /**
358
+ * The value used when `data` has none for the field.
359
+ * @member {String} default
360
+ */
361
+ FieldOverride.prototype['default'] = undefined;
362
+
363
+ /**
364
+ * The field's label on the signing form.
365
+ * @member {String} title
366
+ */
367
+ FieldOverride.prototype['title'] = undefined;
368
+
369
+ /**
370
+ * Whether `data` must have a value for the field.
371
+ * @member {Boolean} required
372
+ */
373
+ FieldOverride.prototype['required'] = undefined;
374
+
375
+ /**
376
+ * The values the field can take, separated by commas, such as `Yes,No`. Null allows any value.
377
+ * @member {String} option_list
378
+ */
379
+ FieldOverride.prototype['option_list'] = undefined;
380
+
381
+ /**
382
+ * The names of the fields a combined field joins, separated by commas.
383
+ * @member {String} combined_field_names
384
+ */
385
+ FieldOverride.prototype['combined_field_names'] = undefined;
386
+
387
+ /**
388
+ * How a combined field joins its fields' values.
389
+ * @member {module:model/CombinedFieldType} combined_field_type
390
+ */
391
+ FieldOverride.prototype['combined_field_type'] = undefined;
392
+
393
+ /**
394
+ * The text between the values of a combined field, such as `, `.
395
+ * @member {String} combined_field_separator
396
+ */
397
+ FieldOverride.prototype['combined_field_separator'] = undefined;
398
+
399
+ /**
400
+ * The text a combined field prints, with `$0`, `$1` and so on for its fields' values, such as `$0, $1`.
401
+ * @member {String} combined_field_format
402
+ */
403
+ FieldOverride.prototype['combined_field_format'] = undefined;
404
+
405
+ /**
406
+ * Whether a number field takes only whole numbers.
407
+ * @member {Boolean} integer
408
+ */
409
+ FieldOverride.prototype['integer'] = undefined;
410
+
411
+ /**
412
+ * Whether a date field takes a date and time (RFC 3339) rather than a date (YYYY-MM-DD).
413
+ * @member {Boolean} include_time
414
+ */
415
+ FieldOverride.prototype['include_time'] = undefined;
416
+
417
+ /**
418
+ * Let the person draw their signature or initials on the signing form.
419
+ * @member {Boolean} signature_allow_draw
420
+ */
421
+ FieldOverride.prototype['signature_allow_draw'] = undefined;
422
+
423
+ /**
424
+ * Let the person type their signature or initials on the signing form.
425
+ * @member {Boolean} signature_allow_type
426
+ */
427
+ FieldOverride.prototype['signature_allow_type'] = undefined;
428
+
429
+ /**
430
+ * The kind of barcode a field with display_type `barcode` prints.
431
+ * @member {module:model/BarcodeSymbology} barcode_symbology
432
+ */
433
+ FieldOverride.prototype['barcode_symbology'] = undefined;
434
+
435
+ /**
436
+ * Leave the field off the PDF. Its value is still in the data, and combined fields can use it.
437
+ * @member {Boolean} hidden
438
+ */
439
+ FieldOverride.prototype['hidden'] = undefined;
440
+
441
+ /**
442
+ * The distance from the left edge of the page, in the template editor's page units.
443
+ * @member {Number} x
444
+ */
445
+ FieldOverride.prototype['x'] = undefined;
446
+
447
+ /**
448
+ * The distance from the top of the page, in the template editor's page units.
449
+ * @member {Number} y
450
+ */
451
+ FieldOverride.prototype['y'] = undefined;
452
+
453
+ /**
454
+ * The field's width, in the template editor's page units.
455
+ * @member {Number} width
456
+ */
457
+ FieldOverride.prototype['width'] = undefined;
458
+
459
+ /**
460
+ * The field's height, in the template editor's page units.
461
+ * @member {Number} height
462
+ */
463
+ FieldOverride.prototype['height'] = undefined;
464
+
465
+ /**
466
+ * The field's rotation in degrees, clockwise.
467
+ * @member {Number} rotation
468
+ */
469
+ FieldOverride.prototype['rotation'] = undefined;
470
+
471
+ /**
472
+ * How the field's value is drawn on the PDF.
473
+ * @member {module:model/FieldDisplayType} display_type
474
+ */
475
+ FieldOverride.prototype['display_type'] = undefined;
476
+
477
+ /**
478
+ * The field's opacity, from 0 (invisible) to 1 (solid).
479
+ * @member {Number} opacity
480
+ */
481
+ FieldOverride.prototype['opacity'] = undefined;
482
+
483
+ /**
484
+ * How a date field's value is printed, as a strftime format such as `%m/%d/%Y`. Null uses the template's date format.
485
+ * @member {String} date_time_format
486
+ */
487
+ FieldOverride.prototype['date_time_format'] = undefined;
488
+
489
+ /**
490
+ * The font of the field's text. Null uses the template's default.
491
+ * @member {module:model/Typeface} typeface
492
+ */
493
+ FieldOverride.prototype['typeface'] = undefined;
494
+
495
+ /**
496
+ * The font size in points, a whole number. Null uses the template's default.
497
+ * @member {Number} font_size
498
+ */
499
+ FieldOverride.prototype['font_size'] = undefined;
500
+
501
+ /**
502
+ * Extra space between characters, in points (0 to 50).
503
+ * @member {Number} character_spacing
504
+ */
505
+ FieldOverride.prototype['character_spacing'] = undefined;
506
+
507
+ /**
508
+ * Print the text in bold.
509
+ * @member {Boolean} bold
510
+ */
511
+ FieldOverride.prototype['bold'] = undefined;
512
+
513
+ /**
514
+ * Print the text in capitals.
515
+ * @member {Boolean} uppercase
516
+ */
517
+ FieldOverride.prototype['uppercase'] = undefined;
518
+
519
+ /**
520
+ * Strike through the text.
521
+ * @member {Boolean} strikethrough
522
+ */
523
+ FieldOverride.prototype['strikethrough'] = undefined;
524
+
525
+ /**
526
+ * Keep the spaces at the start of the text and of each line, so you can line text up with spaces.
527
+ * @member {Boolean} keep_leading_spaces
528
+ */
529
+ FieldOverride.prototype['keep_leading_spaces'] = undefined;
530
+
531
+ /**
532
+ * What happens to text that doesn't fit in the field.
533
+ * @member {module:model/TextOverflow} overflow
534
+ */
535
+ FieldOverride.prototype['overflow'] = undefined;
536
+
537
+ /**
538
+ * Wrap the text over several lines when it doesn't fit on one.
539
+ * @member {Boolean} multiline
540
+ */
541
+ FieldOverride.prototype['multiline'] = undefined;
542
+
543
+ /**
544
+ * The number of lines in a multiline field, for a PDF with ruled lines. Null for no fixed number of lines.
545
+ * @member {Number} multiline_lines
546
+ */
547
+ FieldOverride.prototype['multiline_lines'] = undefined;
548
+
549
+ /**
550
+ * The most characters the field takes. Null for no limit.
551
+ * @member {Number} max_length
552
+ */
553
+ FieldOverride.prototype['max_length'] = undefined;
554
+
555
+ /**
556
+ * The text color, as 6 hex digits without `#`, such as `444444`. Null uses the template's default.
557
+ * @member {String} color
558
+ */
559
+ FieldOverride.prototype['color'] = undefined;
560
+
561
+ /**
562
+ * The field's background color, as 6 hex digits without `#`. Null for none.
563
+ * @member {String} background_color
564
+ */
565
+ FieldOverride.prototype['background_color'] = undefined;
566
+
567
+ /**
568
+ * How text is aligned in its field. `justify` lines up both edges of every line of multiline text except the last of each paragraph.
569
+ * @member {module:model/TextAlignment} alignment
570
+ */
571
+ FieldOverride.prototype['alignment'] = undefined;
572
+
573
+ /**
574
+ * How text is aligned vertically in its field.
575
+ * @member {module:model/TextVerticalAlignment} v_alignment
576
+ */
577
+ FieldOverride.prototype['v_alignment'] = undefined;
578
+
579
+ /**
580
+ * Print one character in each of the field's equally spaced boxes (combs).
581
+ * @member {Boolean} comb
582
+ */
583
+ FieldOverride.prototype['comb'] = undefined;
584
+
585
+ /**
586
+ * The number of boxes in a comb field.
587
+ * @member {Number} comb_number_of_cells
588
+ */
589
+ FieldOverride.prototype['comb_number_of_cells'] = undefined;
590
+
591
+ /**
592
+ * The character of the value that the first box starts from, for a value split over several comb fields (such as the parts of a Social Security number).
593
+ * @member {Number} comb_value_offset
594
+ */
595
+ FieldOverride.prototype['comb_value_offset'] = undefined;
596
+
597
+ /**
598
+ * The shape a field with display_type `shape` draws.
599
+ * @member {module:model/ShapeType} shape_type
600
+ */
601
+ FieldOverride.prototype['shape_type'] = undefined;
602
+
603
+ /**
604
+ * The number of sides of a `polygon` shape.
605
+ * @member {Number} shape_sides
606
+ */
607
+ FieldOverride.prototype['shape_sides'] = undefined;
608
+
609
+ /**
610
+ * The width of a shape's border, in points, a whole number.
611
+ * @member {Number} shape_border_width
612
+ */
613
+ FieldOverride.prototype['shape_border_width'] = undefined;
614
+
615
+ /**
616
+ * The color of a shape's border, as 6 hex digits without `#`.
617
+ * @member {String} shape_border_color
618
+ */
619
+ FieldOverride.prototype['shape_border_color'] = undefined;
620
+
621
+ /**
622
+ * The color a shape is filled with, as 6 hex digits without `#`. Null for no fill.
623
+ * @member {String} shape_fill_color
624
+ */
625
+ FieldOverride.prototype['shape_fill_color'] = undefined;
626
+
627
+ /**
628
+ * The character that a ticked check box prints.
629
+ * @member {module:model/CheckCharacter} check_character
630
+ */
631
+ FieldOverride.prototype['check_character'] = undefined;
632
+
633
+ /**
634
+ * The color of the check mark, as 6 hex digits without `#`. Null uses the template's default.
635
+ * @member {String} check_color
636
+ */
637
+ FieldOverride.prototype['check_color'] = undefined;
638
+
639
+ /**
640
+ * The color of a QR code, as 6 hex digits without `#`. Null for black.
641
+ * @member {String} qrcode_color
642
+ */
643
+ FieldOverride.prototype['qrcode_color'] = undefined;
644
+
645
+ /**
646
+ * What a boolean field with display_type `text` prints for `true`.
647
+ * @member {String} true_text
648
+ */
649
+ FieldOverride.prototype['true_text'] = undefined;
650
+
651
+ /**
652
+ * What a boolean field with display_type `text` prints for `false`.
653
+ * @member {String} false_text
654
+ */
655
+ FieldOverride.prototype['false_text'] = undefined;
656
+
657
+ /**
658
+ * The value a check mark or shape is drawn for: it's drawn when the field's value matches, as `string_condition_type` or `number_condition_type` says.
659
+ * @member {String} condition
660
+ */
661
+ FieldOverride.prototype['condition'] = undefined;
662
+
663
+ /**
664
+ * How a string field's value is compared with `condition`.
665
+ * @member {module:model/StringConditionType} string_condition_type
666
+ */
667
+ FieldOverride.prototype['string_condition_type'] = undefined;
668
+
669
+ /**
670
+ * How a number field's value is compared with `condition`, or with `number_condition_range_min` and `number_condition_range_max` for `range`.
671
+ * @member {module:model/NumberConditionType} number_condition_type
672
+ */
673
+ FieldOverride.prototype['number_condition_type'] = undefined;
674
+
675
+ /**
676
+ * The lower end of a `range` condition.
677
+ * @member {Number} number_condition_range_min
678
+ */
679
+ FieldOverride.prototype['number_condition_range_min'] = undefined;
680
+
681
+ /**
682
+ * The upper end of a `range` condition.
683
+ * @member {Number} number_condition_range_max
684
+ */
685
+ FieldOverride.prototype['number_condition_range_max'] = undefined;
686
+
687
+ /**
688
+ * Leave the lower end itself out of a `range` condition.
689
+ * @member {Boolean} number_condition_range_exclusive_min
690
+ */
691
+ FieldOverride.prototype['number_condition_range_exclusive_min'] = undefined;
692
+
693
+ /**
694
+ * Leave the upper end itself out of a `range` condition.
695
+ * @member {Boolean} number_condition_range_exclusive_max
696
+ */
697
+ FieldOverride.prototype['number_condition_range_exclusive_max'] = undefined;
698
+
699
+ /**
700
+ * Draw a boolean field's check mark or shape for `false` instead of `true`.
701
+ * @member {Boolean} invert_boolean_condition
702
+ */
703
+ FieldOverride.prototype['invert_boolean_condition'] = undefined;
704
+
705
+ /**
706
+ * The number of decimal places a number field prints. Null prints the value as it was sent.
707
+ * @member {Number} decimal_places
708
+ */
709
+ FieldOverride.prototype['decimal_places'] = undefined;
710
+
711
+ /**
712
+ * How an image is resized to its field.
713
+ * @member {module:model/ImageScaleType} image_scale_type
714
+ */
715
+ FieldOverride.prototype['image_scale_type'] = undefined;
716
+
717
+ /**
718
+ * Where an image sits in its field when it doesn't fill it, or which part is kept when it's cropped.
719
+ * @member {module:model/ImageGravity} image_gravity
720
+ */
721
+ FieldOverride.prototype['image_gravity'] = undefined;
722
+ var _default = exports["default"] = FieldOverride;