docspring 4.0.0 → 4.2.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 (116) hide show
  1. package/AGENTS.md +3 -2
  2. package/README.md +13 -1
  3. package/dist/ApiClient.js +2 -2
  4. package/dist/RequestSchemas.js +1231 -9
  5. package/dist/WebhookSignature.js +86 -0
  6. package/dist/api/Client.js +620 -38
  7. package/dist/index.js +238 -0
  8. package/dist/model/AddTemplateFieldsRequest.js +132 -0
  9. package/dist/model/AuthenticationCheck.js +1 -1
  10. package/dist/model/CombinedPdf.js +3 -3
  11. package/dist/model/CombinedPdfFiles.js +1 -1
  12. package/dist/model/CombinedPdfList.js +1 -1
  13. package/dist/model/CombinedPdfSource.js +1 -1
  14. package/dist/model/CombinedPdfSourceInput.js +1 -1
  15. package/dist/model/CombinedPdfSourcePdf.js +1 -1
  16. package/dist/model/CopyTemplateRequest.js +1 -1
  17. package/dist/model/CreateCombinedPdfRequest.js +2 -2
  18. package/dist/model/CreateCustomFileFromUploadRequest.js +1 -1
  19. package/dist/model/CreateFolderRequest.js +1 -1
  20. package/dist/model/CreateSignatureRequestEventRequest.js +1 -1
  21. package/dist/model/CreateSignatureRequestTokenRequest.js +1 -1
  22. package/dist/model/CreateSubmissionBatchRequest.js +15 -1
  23. package/dist/model/CreateSubmissionRequest.js +17 -3
  24. package/dist/model/CreateTemplatePreviewRequest.js +112 -0
  25. package/dist/model/CreateTemplateRequest.js +81 -4
  26. package/dist/model/CreateWebhookRequest.js +1 -1
  27. package/dist/model/CustomFile.js +1 -1
  28. package/dist/model/CustomFileList.js +1 -1
  29. package/dist/model/CustomFileSourcePdf.js +1 -1
  30. package/dist/model/ErrorCode.js +11 -1
  31. package/dist/model/ErrorDetail.js +2 -2
  32. package/dist/model/ErrorInfo.js +6 -6
  33. package/dist/model/ErrorResponse.js +1 -1
  34. package/dist/model/Field.js +1230 -0
  35. package/dist/model/FieldComparisonCondition.js +1 -1
  36. package/dist/model/FieldDependency.js +154 -0
  37. package/dist/model/FieldDependencyInput.js +154 -0
  38. package/dist/model/FieldEqualsCondition.js +1 -1
  39. package/dist/model/FieldGroup.js +206 -0
  40. package/dist/model/FieldGroupInput.js +180 -0
  41. package/dist/model/FieldGroupType.js +59 -0
  42. package/dist/model/FieldInCondition.js +1 -1
  43. package/dist/model/FieldInput.js +1012 -0
  44. package/dist/model/FieldOverride.js +1 -1
  45. package/dist/model/FieldPresenceCondition.js +1 -1
  46. package/dist/model/FieldRangeCondition.js +1 -1
  47. package/dist/model/FieldType.js +124 -0
  48. package/dist/model/Folder.js +1 -1
  49. package/dist/model/FolderList.js +1 -1
  50. package/dist/model/GenerateFilesFormat.js +54 -0
  51. package/dist/model/GenerateSubmissionFilesRequest.js +115 -0
  52. package/dist/model/GeneratedFile.js +1 -1
  53. package/dist/model/HtmlEngineOptions.js +1 -1
  54. package/dist/model/HtmlEngineOptionsInput.js +1 -1
  55. package/dist/model/MoveFolderRequest.js +1 -1
  56. package/dist/model/MoveTemplateRequest.js +1 -1
  57. package/dist/model/OutputFormat.js +59 -0
  58. package/dist/model/PageImage.js +220 -0
  59. package/dist/model/PageImages.js +155 -0
  60. package/dist/model/PredefinedField.js +183 -0
  61. package/dist/model/PredefinedFieldInput.js +183 -0
  62. package/dist/model/PublishTemplateVersionRequest.js +1 -1
  63. package/dist/model/RemoveTemplateFieldsRequest.js +114 -0
  64. package/dist/model/RenameFolderRequest.js +1 -1
  65. package/dist/model/ReorderTemplateFieldsRequest.js +114 -0
  66. package/dist/model/RestoreTemplateVersionRequest.js +1 -1
  67. package/dist/model/SignatureRequest.js +1 -1
  68. package/dist/model/SignatureRequestEvent.js +1 -1
  69. package/dist/model/SignatureRequestInput.js +1 -1
  70. package/dist/model/SignatureRequestToken.js +1 -1
  71. package/dist/model/Submission.js +84 -68
  72. package/dist/model/SubmissionAction.js +1 -1
  73. package/dist/model/SubmissionBatch.js +1 -1
  74. package/dist/model/SubmissionFiles.js +10 -1
  75. package/dist/model/SubmissionInput.js +17 -3
  76. package/dist/model/SubmissionList.js +5 -5
  77. package/dist/model/SubmissionSourcePdf.js +1 -1
  78. package/dist/model/SubmissionSummary.js +343 -0
  79. package/dist/model/SubmissionValidation.js +151 -0
  80. package/dist/model/Template.js +129 -56
  81. package/dist/model/TemplateActor.js +3 -3
  82. package/dist/model/TemplateDefaults.js +1 -1
  83. package/dist/model/TemplateDefaultsInput.js +1 -1
  84. package/dist/model/TemplateDiff.js +206 -0
  85. package/dist/model/TemplateDiffSummary.js +165 -0
  86. package/dist/model/TemplateDocument.js +36 -36
  87. package/dist/model/TemplateDocumentState.js +11 -1
  88. package/dist/model/TemplateDocumentSummary.js +152 -0
  89. package/dist/model/TemplateFieldChange.js +146 -0
  90. package/dist/model/TemplateFieldChanges.js +196 -0
  91. package/dist/model/TemplateFieldDependency.js +3 -3
  92. package/dist/model/TemplateFieldDependencyCondition.js +1 -1
  93. package/dist/model/TemplateFieldDependencyConditionInput.js +1 -1
  94. package/dist/model/TemplateFieldDependencyInput.js +3 -3
  95. package/dist/model/TemplateFieldMove.js +132 -0
  96. package/dist/model/TemplateFields.js +147 -0
  97. package/dist/model/TemplateModelCode.js +1 -1
  98. package/dist/model/TemplatePageImages.js +158 -0
  99. package/dist/model/TemplatePageProcessingStatus.js +1 -1
  100. package/dist/model/TemplatePreview.js +211 -0
  101. package/dist/model/TemplatePreviewState.js +64 -0
  102. package/dist/model/TemplateSourcePdf.js +1 -1
  103. package/dist/model/TemplateSummary.js +14 -288
  104. package/dist/model/TemplateSummaryList.js +1 -1
  105. package/dist/model/TemplateVersion.js +1 -1
  106. package/dist/model/UpdateSignatureRequestRequest.js +1 -1
  107. package/dist/model/UpdateTemplateDocumentRequest.js +33 -30
  108. package/dist/model/UpdateTemplateFieldsRequest.js +132 -0
  109. package/dist/model/UpdateTemplateRequest.js +84 -2
  110. package/dist/model/UpdateWebhookRequest.js +1 -1
  111. package/dist/model/UploadPresign.js +1 -1
  112. package/dist/model/UrlSourcePdf.js +1 -1
  113. package/dist/model/ValidateSubmissionRequest.js +226 -0
  114. package/dist/model/Webhook.js +1 -1
  115. package/dist/model/WebhookList.js +1 -1
  116. package/package.json +3 -2
@@ -0,0 +1,1230 @@
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 _FieldDependency = _interopRequireDefault(require("./FieldDependency"));
12
+ var _FieldDisplayType = _interopRequireDefault(require("./FieldDisplayType"));
13
+ var _FieldType = _interopRequireDefault(require("./FieldType"));
14
+ var _ImageGravity = _interopRequireDefault(require("./ImageGravity"));
15
+ var _ImageScaleType = _interopRequireDefault(require("./ImageScaleType"));
16
+ var _NumberConditionType = _interopRequireDefault(require("./NumberConditionType"));
17
+ var _ShapeType = _interopRequireDefault(require("./ShapeType"));
18
+ var _StringConditionType = _interopRequireDefault(require("./StringConditionType"));
19
+ var _TextAlignment = _interopRequireDefault(require("./TextAlignment"));
20
+ var _TextOverflow = _interopRequireDefault(require("./TextOverflow"));
21
+ var _TextVerticalAlignment = _interopRequireDefault(require("./TextVerticalAlignment"));
22
+ var _Typeface = _interopRequireDefault(require("./Typeface"));
23
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
24
+ 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); }
25
+ 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; } } }; }
26
+ 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; } }
27
+ 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; }
28
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
29
+ 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); } }
30
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
31
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
32
+ 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); } /**
33
+ * DocSpring API
34
+ * Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
35
+ *
36
+ * The version of the OpenAPI document: v2
37
+ *
38
+ *
39
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
40
+ * https://openapi-generator.tech
41
+ * Do not edit the class manually.
42
+ *
43
+ */
44
+ /**
45
+ * The Field model module.
46
+ * @module model/Field
47
+ * @version 4.2.0
48
+ */
49
+ var Field = /*#__PURE__*/function () {
50
+ /**
51
+ * Constructs a new <code>Field</code>.
52
+ * A field of a template: the name of a value in submission data, and how and where it prints. Fields with the same `name` share one value and the settings the descriptions say are shared. A PDF template's fields are placed on its pages: `x`, `y`, `width` and `height` are in units where every page is 2480 wide, measured from the top-left corner of the field's `page`. To convert from PDF points, multiply by 2480 and divide by the page's width in points (`document.page_dimensions` on the template). An HTML template's fields are all on page 1, and their placement and style settings aren't used.
53
+ * @alias module:model/Field
54
+ * @extends Object
55
+ * @param id {Number} The field's ID, an integer that's unique within the template.
56
+ * @param name {String} The field's name, the key of its value in submission data. A `/` nests the key in objects and arrays (`client/address`, `items/0/price`); write a literal `/` as `~1` and `~` as `~0`. Fields with the same name share one value and their shared settings, and array indexes inside a name are ignored for settings, so `items/0/price` and `items/1/price` share settings but not values. A `#` and a line number (`notes#0`, `notes#1`) splits one value over several fields as lines of text, and names that start with `@@` print submission details such as `@@date`.
57
+ * @param page {Number} The number of the page the field is on, starting at 1. A field added without one goes on page 1, and a field moved to another page without a new `y` keeps its place on the page.
58
+ * @param acroform_name {String} The name of the PDF form field this field was made from, when the template's PDF had fillable fields. Null for fields added in DocSpring.
59
+ * @param type {module:model/FieldType} The data type of the field's value: `string`, `number`, `boolean`, `date`, `address`, `country`, `email`, `url`, `image`, `signature`, `initials`, `barcode`, or `combined` (made from other fields' values, never sent in submission data). It sets how the value is validated and which `display_type`s the field can use. `object` and `array` are the types of field groups (the template's `field_groups`), not of fields. Shared by every field with the same `name`.
60
+ * @param _static {Boolean} The field prints fixed content, its `default`, instead of a value from submission data, and it's left out of the template's data schema and forms. Static check marks and shapes always print unless `hidden`, and a static number field's `default` can be a formula. Shared by every field with the same `name`.
61
+ * @param editable {Boolean} Text and check display only: prints the field as a fillable PDF form field instead of flat content (a text field with an `option_list` becomes a dropdown). A submission's `editable` option, when set, overrides this for every field. Shared by every field with the same `name`.
62
+ * @param _default {String} The value used when a submission leaves the field out, and the value forms are pre-filled with. A required field still needs a value in each submission. An image field's default is an image URL, a number field's can be a formula, and a static field's is the content it prints. Shared by every field with the same `name`.
63
+ * @param title {String} The field's title in the template's data schema and on forms. When it's empty, a title is made from the field's name. Shared by every field with the same `name`.
64
+ * @param description {String} Help text for the field, added to the template's data schema and shown on forms. Shared by every field with the same `name`.
65
+ * @param placeholder {String} Placeholder text for the field's input on forms, added to the template's data schema as `x-placeholder`. Shared by every field with the same `name`.
66
+ * @param metadata {String} Text for your own use, added to the template's data schema as `x-metadata`. DocSpring doesn't use it. Shared by every field with the same `name`.
67
+ * @param required {Boolean} Whether each submission must include a value for the field. A submission without one fails validation, and no PDF is generated. Shared by every field with the same `name`.
68
+ * @param option_list {String} String fields only: a comma-separated list of the values the field accepts. It's added to the template's data schema as an `enum`, forms show it as a select list, and an `editable` field becomes a dropdown. Shared by every field with the same `name`.
69
+ * @param combined_field_names {String} Combined fields only: a comma-separated list of the names of the fields whose values are combined, in order. Shared by every field with the same `name`.
70
+ * @param combined_field_type {module:model/CombinedFieldType} Combined fields only: `separator` joins the values with `combined_field_separator`, and `format` puts them into `combined_field_format`. Shared by every field with the same `name`.
71
+ * @param combined_field_separator {String} Combined fields only: the text placed between the values when `combined_field_type` is `separator`. Empty values are skipped. Defaults to a space. Shared by every field with the same `name`.
72
+ * @param combined_field_format {String} Combined fields only: the text for `combined_field_type` `format`, where `$0`, `$1` and so on are replaced with the values of `combined_field_names` in order, such as `Full name: $0, Occupation: $1`. Shared by every field with the same `name`.
73
+ * @param integer {Boolean} Number fields only: the value must be a whole number. Shared by every field with the same `name`.
74
+ * @param minimum {Number} Number fields only: the smallest value allowed. Shared by every field with the same `name`.
75
+ * @param maximum {Number} Number fields only: the largest value allowed. Shared by every field with the same `name`.
76
+ * @param exclusive_minimum {Boolean} Number fields only: the value must be greater than `minimum`, not equal to it. Shared by every field with the same `name`.
77
+ * @param exclusive_maximum {Boolean} Number fields only: the value must be less than `maximum`, not equal to it. Shared by every field with the same `name`.
78
+ * @param include_time {Boolean} Date fields only: the value is a date and time (`YYYY-MM-DDThh:mm:ss.fffZ`) instead of a date (`YYYY-MM-DD`), and it prints with the template's date-time format unless `date_time_format` is set. Shared by every field with the same `name`.
79
+ * @param signature_allow_draw {Boolean} Signature and initials fields only: lets signers draw their signature on forms and in data requests. Shared by every field with the same `name`.
80
+ * @param signature_allow_type {Boolean} Signature and initials fields only: lets signers type their name and choose a script font instead of drawing, on forms and in data requests. Shared by every field with the same `name`.
81
+ * @param barcode_symbology {module:model/BarcodeSymbology} Barcode fields only: the barcode format, which the value must match. `code_128` and `pdf417` take any ASCII text; `code_39` and `code_93` take capital letters, digits, spaces and `- . $ / + %`; `code_25` takes digits; `ean_13` takes 12 digits, `ean_8` 7 digits and `upc_a` 11 digits (the check digit is added). Shared by every field with the same `name`.
82
+ * @param hidden {Boolean} Leaves the field off the PDF. It stays in the template's data schema (marked `x-hidden`) and on forms, so other fields, such as combined fields, can use its value. A hidden static check mark or shape isn't printed.
83
+ * @param x {Number} The distance from the page's left edge to the field's left edge. Positions and sizes are in units where every page is 2480 wide: one unit is the page's width in points divided by 2480 (about 0.247 points on a US Letter page).
84
+ * @param y {Number} The distance from the top edge of the field's `page` down to the field's top edge, in the units of `x`. A page is 2480 times its height divided by its width units tall: about 3209 for US Letter and 3508 for A4.
85
+ * @param width {Number} The field's width, in the units of `x`. A check mark is sized to the field's width.
86
+ * @param height {Number} The field's height, in the units of `x`. The template editor keeps check marks, QR codes, and square and circle shapes square, with `height` equal to `width`.
87
+ * @param rotation {Number} Rotates the field clockwise by this many degrees, from -360 to 360 (negative turns it counterclockwise).
88
+ * @param display_type {module:model/FieldDisplayType} How the value appears on the PDF: `text`, `check` (a check mark), `shape`, `qrcode`, `barcode`, or `image` (image, signature and initials fields). Check marks and shapes print only when the value meets the field's `condition`, and the field's `type` limits which display types it can use.
89
+ * @param opacity {Number} The opacity of the field's content and background, from 0 (invisible) to 1. QR codes and barcodes always print at full opacity.
90
+ * @param date_time_format {String} Date fields only: how the date prints, as a strftime format such as `%m/%d/%Y`, or a calculation such as `@years_since`, `@years_until` or `@diff_years` (also months, weeks, days, hours, minutes and seconds), counted to when the PDF is generated. Empty uses the template's date format, or its date-time format with `include_time`.
91
+ * @param typeface {module:model/Typeface} Text display only: the font, one of `Helvetica`, `Arial`, `Calibri`, `Open Sans`, `Roboto`, `Lato`, `Poppins`, `Public Sans`, `Questrial`, `Times New Roman`, `Dancing Script`, `Lovtony Script`, or the monospace `Courier`, `Inconsolata`, `Menlo`, `Roboto Mono` and `Ubuntu Mono`. Empty uses the template's default typeface.
92
+ * @param font_size {Number} Text display only: the font size in points. Empty uses the template's default font size.
93
+ * @param character_spacing {Number} Text display only: extra space between characters, in points. Empty uses the template's default.
94
+ * @param bold {Boolean} Text display only: prints the text in bold.
95
+ * @param uppercase {Boolean} Text display only: prints the text in capital letters.
96
+ * @param strikethrough {Boolean} Text display only: draws a line through the text.
97
+ * @param keep_leading_spaces {Boolean} Text display only: keeps the spaces at the start of the text and of each line, so text can be lined up with spaces.
98
+ * @param overflow {module:model/TextOverflow} Text display only: what happens to text that doesn't fit the field. `shrink_to_fit` makes the font smaller, down to 5 points; `truncate` cuts the text off and returns the rest in the submission's `truncated_text`.
99
+ * @param multiline {Boolean} Text display only: wraps the text over as many lines as fit in the field's height instead of printing one line, and forms show a multi-line input.
100
+ * @param multiline_lines {Number} Text display only, with `multiline`: spreads the text over exactly this many evenly spaced lines in the field's height (up to 300), to line up with lines printed on the form. Empty uses the font's normal line spacing.
101
+ * @param min_length {Number} Text display only: the fewest characters the value can have, added to the template's data schema. Not used for date, address, country or number fields, or fields with an `option_list`.
102
+ * @param max_length {Number} Text display only: the most characters the value can have, added to the template's data schema; it also limits an `editable` field. Not used for date, address, country or number fields, or fields with an `option_list`.
103
+ * @param auto_calculate_max_length {Boolean} Text display only, with a monospace `typeface` (`Courier`, `Inconsolata`, `Menlo`, `Roboto Mono` or `Ubuntu Mono`): adds the number of characters that fit in the field to the template's data schema as its maximum length.
104
+ * @param color {String} Text display only: the text color, as a hex code such as `444444`. Empty uses the template's default text color.
105
+ * @param color_field_name {String} Text display only: the name of a data field whose value, a hex code such as `FF0000`, sets the text color for each submission. That field is added to the template's data schema, with `color` as its default.
106
+ * @param color_field_required {Boolean} Makes the `color_field_name` field required. When it isn't required and a submission leaves it out, `color` is used.
107
+ * @param background_color {String} Text and check display only: a color that fills the field's area behind its content, as a hex code, to cover what the page shows there. Check fields print it even when unchecked; text fields print it only when they have a value.
108
+ * @param background_color_field_name {String} Text and check display only: the name of a data field whose value, a hex code, sets the background color for each submission. That field is added to the template's data schema, with `background_color` as its default.
109
+ * @param background_color_field_required {Boolean} Makes the `background_color_field_name` field required. When it isn't required and a submission leaves it out, `background_color` is used.
110
+ * @param alignment {module:model/TextAlignment} Text display only: how the text is aligned across the field: `left`, `center`, `right` or `justify` (both edges of every line of multiline text except the last of each paragraph).
111
+ * @param v_alignment {module:model/TextVerticalAlignment} Text display only: how the text is aligned vertically in the field: `bottom`, `center` or `top`.
112
+ * @param comb {Boolean} Text display only: splits the field into `comb_number_of_cells` boxes of equal width and prints one character, centered, in each.
113
+ * @param comb_number_of_cells {Number} With `comb`: how many boxes the field has. The value's maximum length in the template's data schema is this plus `comb_value_offset`.
114
+ * @param comb_value_offset {Number} With `comb`: the position, from 0, of the first character of the value that this field prints. For an SSN printed in boxes of 3, 2 and 4 digits, three fields named `ssn` use offsets 0, 3 and 5.
115
+ * @param shape_type {module:model/ShapeType} Shape display only: `square`, `rectangle`, `circle`, `ellipse`, `triangle` or `polygon`. A square or circle uses the smaller of `width` and `height`.
116
+ * @param shape_sides {Number} Shape display only, with `shape_type` `polygon`: the number of sides, 3 to 12.
117
+ * @param shape_border_width {Number} Shape display only: the width of the shape's border, in points.
118
+ * @param shape_border_color {String} Shape display only: the shape's border color, as a hex code. Null draws no border.
119
+ * @param shape_border_color_field_name {String} Shape display only: the name of a data field whose value, a hex code, sets the border color for each submission. That field is added to the template's data schema, with `shape_border_color` as its default.
120
+ * @param shape_border_color_field_required {Boolean} Makes the `shape_border_color_field_name` field required. When it isn't required and a submission leaves it out, `shape_border_color` is used.
121
+ * @param shape_fill_color {String} Shape display only: the color that fills the shape, as a hex code. Null leaves it unfilled.
122
+ * @param shape_fill_color_field_name {String} Shape display only: the name of a data field whose value, a hex code, sets the fill color for each submission. That field is added to the template's data schema, with `shape_fill_color` as its default.
123
+ * @param shape_fill_color_field_required {Boolean} Makes the `shape_fill_color_field_name` field required. When it isn't required and a submission leaves it out, `shape_fill_color` is used.
124
+ * @param check_character {module:model/CheckCharacter} Check display only: the character printed, as an HTML entity: `&#10003;` (✓), `&#10004;` (✔, the default), `&#10006;` (✖), `&#10007;` (✗) or `&#10008;` (✘).
125
+ * @param check_color {String} Check display only: the check mark's color, as a hex code. Empty uses the template's default check color.
126
+ * @param check_color_field_name {String} Check display only: the name of a data field whose value, a hex code, sets the check mark's color for each submission. That field is added to the template's data schema, with `check_color` as its default.
127
+ * @param check_color_field_required {Boolean} Makes the `check_color_field_name` field required. When it isn't required and a submission leaves it out, `check_color` is used.
128
+ * @param qrcode_color {String} QR code display only: the QR code's color, as a hex code, printed on a white background. Empty prints it in black.
129
+ * @param qrcode_color_field_name {String} QR code display only: the name of a data field whose value, a hex code, sets the QR code's color for each submission. That field is added to the template's data schema, with `qrcode_color` as its default.
130
+ * @param qrcode_color_field_required {Boolean} Makes the `qrcode_color_field_name` field required. When it isn't required and a submission leaves it out, `qrcode_color` is used.
131
+ * @param true_text {String} Boolean fields with text display: the text printed when the value is `true`. Empty uses the template's `true_text`; when neither is set, nothing prints.
132
+ * @param false_text {String} Boolean fields with text display: the text printed when the value is `false`. Empty uses the template's `false_text`; when neither is set, nothing prints.
133
+ * @param condition {String} Check and shape display only: the value a string or number field's value is compared with, by `string_condition_type` or `number_condition_type`, to decide whether the check mark or shape prints. Boolean fields print when `true` (see `invert_boolean_condition`), and other types print when they have a value.
134
+ * @param string_condition_type {module:model/StringConditionType} String fields with check or shape display: how the value is compared with `condition`: `equals`, `contains`, `starts_with`, `ends_with`, or `regex`, where `condition` is a regular expression the value must match.
135
+ * @param number_condition_type {module:model/NumberConditionType} Number fields with check or shape display: how the value is compared with `condition`: `equals`, `gt` (greater than), `gte` (greater than or equal to), `lt` (less than), `lte` (less than or equal to), or `range`, between `number_condition_range_min` and `number_condition_range_max`.
136
+ * @param number_condition_range_min {Number} With `number_condition_type` `range`: the lower end of the range, included unless `number_condition_range_exclusive_min` is set.
137
+ * @param number_condition_range_max {Number} With `number_condition_type` `range`: the upper end of the range, included unless `number_condition_range_exclusive_max` is set.
138
+ * @param number_condition_range_exclusive_min {Boolean} With `number_condition_type` `range`: leaves `number_condition_range_min` itself out of the range.
139
+ * @param number_condition_range_exclusive_max {Boolean} With `number_condition_type` `range`: leaves `number_condition_range_max` itself out of the range.
140
+ * @param invert_boolean_condition {Boolean} Boolean fields with check or shape display: prints the check mark or shape when the value is `false` or missing, instead of `true`.
141
+ * @param currency {Boolean} Number fields only: forms show a currency input, and the template's data schema gives the field `format: currency`. It doesn't change how the number prints.
142
+ * @param decimal_places {Number} Number fields with text display: prints the number with this many decimal places, from 0 (rounds to a whole number) to 99. Empty prints the number as it was sent.
143
+ * @param image_scale_type {module:model/ImageScaleType} Image fields only: how the image is resized to the field. `fit` keeps its proportions and fits it inside the field, which can leave empty space; `fill` keeps its proportions and crops it to fill the field; `stretch` stretches it to the field's size. Signatures and initials always fit.
144
+ * @param image_gravity {module:model/ImageGravity} Image, signature and initials fields: where the image sits in the field with `fit`, or which part is kept with `fill`: `NorthWest` (top left), `North`, `NorthEast`, `West`, `Center`, `East`, `SouthWest`, `South` or `SouthEast` (bottom right). It also aligns typed signatures, and isn't used with `stretch`.
145
+ * @param dependencies {module:model/FieldDependency} The field's own conditional logic rule: when other fields' values meet its conditions, the field is shown, made required, or both. Null when it has none. The template's rules (`field_dependencies`) can apply to the field too. Shared by every field with the same `name`.
146
+ */
147
+ function Field(id, name, page, acroform_name, type, _static, editable, _default, title, description, placeholder, metadata, required, option_list, combined_field_names, combined_field_type, combined_field_separator, combined_field_format, integer, minimum, maximum, exclusive_minimum, exclusive_maximum, include_time, signature_allow_draw, signature_allow_type, barcode_symbology, hidden, x, y, width, height, rotation, display_type, opacity, date_time_format, typeface, font_size, character_spacing, bold, uppercase, strikethrough, keep_leading_spaces, overflow, multiline, multiline_lines, min_length, max_length, auto_calculate_max_length, color, color_field_name, color_field_required, background_color, background_color_field_name, background_color_field_required, alignment, v_alignment, comb, comb_number_of_cells, comb_value_offset, shape_type, shape_sides, shape_border_width, shape_border_color, shape_border_color_field_name, shape_border_color_field_required, shape_fill_color, shape_fill_color_field_name, shape_fill_color_field_required, check_character, check_color, check_color_field_name, check_color_field_required, qrcode_color, qrcode_color_field_name, qrcode_color_field_required, true_text, false_text, condition, string_condition_type, number_condition_type, number_condition_range_min, number_condition_range_max, number_condition_range_exclusive_min, number_condition_range_exclusive_max, invert_boolean_condition, currency, decimal_places, image_scale_type, image_gravity, dependencies) {
148
+ _classCallCheck(this, Field);
149
+ Field.initialize(this, id, name, page, acroform_name, type, _static, editable, _default, title, description, placeholder, metadata, required, option_list, combined_field_names, combined_field_type, combined_field_separator, combined_field_format, integer, minimum, maximum, exclusive_minimum, exclusive_maximum, include_time, signature_allow_draw, signature_allow_type, barcode_symbology, hidden, x, y, width, height, rotation, display_type, opacity, date_time_format, typeface, font_size, character_spacing, bold, uppercase, strikethrough, keep_leading_spaces, overflow, multiline, multiline_lines, min_length, max_length, auto_calculate_max_length, color, color_field_name, color_field_required, background_color, background_color_field_name, background_color_field_required, alignment, v_alignment, comb, comb_number_of_cells, comb_value_offset, shape_type, shape_sides, shape_border_width, shape_border_color, shape_border_color_field_name, shape_border_color_field_required, shape_fill_color, shape_fill_color_field_name, shape_fill_color_field_required, check_character, check_color, check_color_field_name, check_color_field_required, qrcode_color, qrcode_color_field_name, qrcode_color_field_required, true_text, false_text, condition, string_condition_type, number_condition_type, number_condition_range_min, number_condition_range_max, number_condition_range_exclusive_min, number_condition_range_exclusive_max, invert_boolean_condition, currency, decimal_places, image_scale_type, image_gravity, dependencies);
150
+ }
151
+
152
+ /**
153
+ * Initializes the fields of this object.
154
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
155
+ * Only for internal use.
156
+ */
157
+ return _createClass(Field, null, [{
158
+ key: "initialize",
159
+ value: function initialize(obj, id, name, page, acroform_name, type, _static, editable, _default, title, description, placeholder, metadata, required, option_list, combined_field_names, combined_field_type, combined_field_separator, combined_field_format, integer, minimum, maximum, exclusive_minimum, exclusive_maximum, include_time, signature_allow_draw, signature_allow_type, barcode_symbology, hidden, x, y, width, height, rotation, display_type, opacity, date_time_format, typeface, font_size, character_spacing, bold, uppercase, strikethrough, keep_leading_spaces, overflow, multiline, multiline_lines, min_length, max_length, auto_calculate_max_length, color, color_field_name, color_field_required, background_color, background_color_field_name, background_color_field_required, alignment, v_alignment, comb, comb_number_of_cells, comb_value_offset, shape_type, shape_sides, shape_border_width, shape_border_color, shape_border_color_field_name, shape_border_color_field_required, shape_fill_color, shape_fill_color_field_name, shape_fill_color_field_required, check_character, check_color, check_color_field_name, check_color_field_required, qrcode_color, qrcode_color_field_name, qrcode_color_field_required, true_text, false_text, condition, string_condition_type, number_condition_type, number_condition_range_min, number_condition_range_max, number_condition_range_exclusive_min, number_condition_range_exclusive_max, invert_boolean_condition, currency, decimal_places, image_scale_type, image_gravity, dependencies) {
160
+ obj['id'] = id;
161
+ obj['name'] = name;
162
+ obj['page'] = page;
163
+ obj['acroform_name'] = acroform_name;
164
+ obj['type'] = type;
165
+ obj['static'] = _static;
166
+ obj['editable'] = editable;
167
+ obj['default'] = _default;
168
+ obj['title'] = title;
169
+ obj['description'] = description;
170
+ obj['placeholder'] = placeholder;
171
+ obj['metadata'] = metadata;
172
+ obj['required'] = required;
173
+ obj['option_list'] = option_list;
174
+ obj['combined_field_names'] = combined_field_names;
175
+ obj['combined_field_type'] = combined_field_type;
176
+ obj['combined_field_separator'] = combined_field_separator;
177
+ obj['combined_field_format'] = combined_field_format;
178
+ obj['integer'] = integer;
179
+ obj['minimum'] = minimum;
180
+ obj['maximum'] = maximum;
181
+ obj['exclusive_minimum'] = exclusive_minimum;
182
+ obj['exclusive_maximum'] = exclusive_maximum;
183
+ obj['include_time'] = include_time;
184
+ obj['signature_allow_draw'] = signature_allow_draw;
185
+ obj['signature_allow_type'] = signature_allow_type;
186
+ obj['barcode_symbology'] = barcode_symbology;
187
+ obj['hidden'] = hidden;
188
+ obj['x'] = x;
189
+ obj['y'] = y;
190
+ obj['width'] = width;
191
+ obj['height'] = height;
192
+ obj['rotation'] = rotation;
193
+ obj['display_type'] = display_type;
194
+ obj['opacity'] = opacity;
195
+ obj['date_time_format'] = date_time_format;
196
+ obj['typeface'] = typeface;
197
+ obj['font_size'] = font_size;
198
+ obj['character_spacing'] = character_spacing;
199
+ obj['bold'] = bold;
200
+ obj['uppercase'] = uppercase;
201
+ obj['strikethrough'] = strikethrough;
202
+ obj['keep_leading_spaces'] = keep_leading_spaces;
203
+ obj['overflow'] = overflow;
204
+ obj['multiline'] = multiline;
205
+ obj['multiline_lines'] = multiline_lines;
206
+ obj['min_length'] = min_length;
207
+ obj['max_length'] = max_length;
208
+ obj['auto_calculate_max_length'] = auto_calculate_max_length;
209
+ obj['color'] = color;
210
+ obj['color_field_name'] = color_field_name;
211
+ obj['color_field_required'] = color_field_required;
212
+ obj['background_color'] = background_color;
213
+ obj['background_color_field_name'] = background_color_field_name;
214
+ obj['background_color_field_required'] = background_color_field_required;
215
+ obj['alignment'] = alignment;
216
+ obj['v_alignment'] = v_alignment;
217
+ obj['comb'] = comb;
218
+ obj['comb_number_of_cells'] = comb_number_of_cells;
219
+ obj['comb_value_offset'] = comb_value_offset;
220
+ obj['shape_type'] = shape_type;
221
+ obj['shape_sides'] = shape_sides;
222
+ obj['shape_border_width'] = shape_border_width;
223
+ obj['shape_border_color'] = shape_border_color;
224
+ obj['shape_border_color_field_name'] = shape_border_color_field_name;
225
+ obj['shape_border_color_field_required'] = shape_border_color_field_required;
226
+ obj['shape_fill_color'] = shape_fill_color;
227
+ obj['shape_fill_color_field_name'] = shape_fill_color_field_name;
228
+ obj['shape_fill_color_field_required'] = shape_fill_color_field_required;
229
+ obj['check_character'] = check_character;
230
+ obj['check_color'] = check_color;
231
+ obj['check_color_field_name'] = check_color_field_name;
232
+ obj['check_color_field_required'] = check_color_field_required;
233
+ obj['qrcode_color'] = qrcode_color;
234
+ obj['qrcode_color_field_name'] = qrcode_color_field_name;
235
+ obj['qrcode_color_field_required'] = qrcode_color_field_required;
236
+ obj['true_text'] = true_text;
237
+ obj['false_text'] = false_text;
238
+ obj['condition'] = condition;
239
+ obj['string_condition_type'] = string_condition_type;
240
+ obj['number_condition_type'] = number_condition_type;
241
+ obj['number_condition_range_min'] = number_condition_range_min;
242
+ obj['number_condition_range_max'] = number_condition_range_max;
243
+ obj['number_condition_range_exclusive_min'] = number_condition_range_exclusive_min;
244
+ obj['number_condition_range_exclusive_max'] = number_condition_range_exclusive_max;
245
+ obj['invert_boolean_condition'] = invert_boolean_condition;
246
+ obj['currency'] = currency;
247
+ obj['decimal_places'] = decimal_places;
248
+ obj['image_scale_type'] = image_scale_type;
249
+ obj['image_gravity'] = image_gravity;
250
+ obj['dependencies'] = dependencies;
251
+ }
252
+
253
+ /**
254
+ * Constructs a <code>Field</code> from a plain JavaScript object, optionally creating a new instance.
255
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
256
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
257
+ * @param {module:model/Field} obj Optional instance to populate.
258
+ * @return {module:model/Field} The populated <code>Field</code> instance.
259
+ */
260
+ }, {
261
+ key: "constructFromObject",
262
+ value: function constructFromObject(data, obj) {
263
+ if (data) {
264
+ obj = obj || new Field();
265
+ _ApiClient["default"].constructFromObject(data, obj, 'Object');
266
+ if (data.hasOwnProperty('id')) {
267
+ obj['id'] = _ApiClient["default"].convertToType(data['id'], 'Number');
268
+ }
269
+ if (data.hasOwnProperty('name')) {
270
+ obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String');
271
+ }
272
+ if (data.hasOwnProperty('page')) {
273
+ obj['page'] = _ApiClient["default"].convertToType(data['page'], 'Number');
274
+ }
275
+ if (data.hasOwnProperty('acroform_name')) {
276
+ obj['acroform_name'] = _ApiClient["default"].convertToType(data['acroform_name'], 'String');
277
+ }
278
+ if (data.hasOwnProperty('type')) {
279
+ obj['type'] = _ApiClient["default"].convertToType(data['type'], _FieldType["default"]);
280
+ }
281
+ if (data.hasOwnProperty('static')) {
282
+ obj['static'] = _ApiClient["default"].convertToType(data['static'], 'Boolean');
283
+ }
284
+ if (data.hasOwnProperty('editable')) {
285
+ obj['editable'] = _ApiClient["default"].convertToType(data['editable'], 'Boolean');
286
+ }
287
+ if (data.hasOwnProperty('default')) {
288
+ obj['default'] = _ApiClient["default"].convertToType(data['default'], 'String');
289
+ }
290
+ if (data.hasOwnProperty('title')) {
291
+ obj['title'] = _ApiClient["default"].convertToType(data['title'], 'String');
292
+ }
293
+ if (data.hasOwnProperty('description')) {
294
+ obj['description'] = _ApiClient["default"].convertToType(data['description'], 'String');
295
+ }
296
+ if (data.hasOwnProperty('placeholder')) {
297
+ obj['placeholder'] = _ApiClient["default"].convertToType(data['placeholder'], 'String');
298
+ }
299
+ if (data.hasOwnProperty('metadata')) {
300
+ obj['metadata'] = _ApiClient["default"].convertToType(data['metadata'], 'String');
301
+ }
302
+ if (data.hasOwnProperty('required')) {
303
+ obj['required'] = _ApiClient["default"].convertToType(data['required'], 'Boolean');
304
+ }
305
+ if (data.hasOwnProperty('option_list')) {
306
+ obj['option_list'] = _ApiClient["default"].convertToType(data['option_list'], 'String');
307
+ }
308
+ if (data.hasOwnProperty('combined_field_names')) {
309
+ obj['combined_field_names'] = _ApiClient["default"].convertToType(data['combined_field_names'], 'String');
310
+ }
311
+ if (data.hasOwnProperty('combined_field_type')) {
312
+ obj['combined_field_type'] = _ApiClient["default"].convertToType(data['combined_field_type'], _CombinedFieldType["default"]);
313
+ }
314
+ if (data.hasOwnProperty('combined_field_separator')) {
315
+ obj['combined_field_separator'] = _ApiClient["default"].convertToType(data['combined_field_separator'], 'String');
316
+ }
317
+ if (data.hasOwnProperty('combined_field_format')) {
318
+ obj['combined_field_format'] = _ApiClient["default"].convertToType(data['combined_field_format'], 'String');
319
+ }
320
+ if (data.hasOwnProperty('integer')) {
321
+ obj['integer'] = _ApiClient["default"].convertToType(data['integer'], 'Boolean');
322
+ }
323
+ if (data.hasOwnProperty('minimum')) {
324
+ obj['minimum'] = _ApiClient["default"].convertToType(data['minimum'], 'Number');
325
+ }
326
+ if (data.hasOwnProperty('maximum')) {
327
+ obj['maximum'] = _ApiClient["default"].convertToType(data['maximum'], 'Number');
328
+ }
329
+ if (data.hasOwnProperty('exclusive_minimum')) {
330
+ obj['exclusive_minimum'] = _ApiClient["default"].convertToType(data['exclusive_minimum'], 'Boolean');
331
+ }
332
+ if (data.hasOwnProperty('exclusive_maximum')) {
333
+ obj['exclusive_maximum'] = _ApiClient["default"].convertToType(data['exclusive_maximum'], 'Boolean');
334
+ }
335
+ if (data.hasOwnProperty('include_time')) {
336
+ obj['include_time'] = _ApiClient["default"].convertToType(data['include_time'], 'Boolean');
337
+ }
338
+ if (data.hasOwnProperty('signature_allow_draw')) {
339
+ obj['signature_allow_draw'] = _ApiClient["default"].convertToType(data['signature_allow_draw'], 'Boolean');
340
+ }
341
+ if (data.hasOwnProperty('signature_allow_type')) {
342
+ obj['signature_allow_type'] = _ApiClient["default"].convertToType(data['signature_allow_type'], 'Boolean');
343
+ }
344
+ if (data.hasOwnProperty('barcode_symbology')) {
345
+ obj['barcode_symbology'] = _ApiClient["default"].convertToType(data['barcode_symbology'], _BarcodeSymbology["default"]);
346
+ }
347
+ if (data.hasOwnProperty('hidden')) {
348
+ obj['hidden'] = _ApiClient["default"].convertToType(data['hidden'], 'Boolean');
349
+ }
350
+ if (data.hasOwnProperty('x')) {
351
+ obj['x'] = _ApiClient["default"].convertToType(data['x'], 'Number');
352
+ }
353
+ if (data.hasOwnProperty('y')) {
354
+ obj['y'] = _ApiClient["default"].convertToType(data['y'], 'Number');
355
+ }
356
+ if (data.hasOwnProperty('width')) {
357
+ obj['width'] = _ApiClient["default"].convertToType(data['width'], 'Number');
358
+ }
359
+ if (data.hasOwnProperty('height')) {
360
+ obj['height'] = _ApiClient["default"].convertToType(data['height'], 'Number');
361
+ }
362
+ if (data.hasOwnProperty('rotation')) {
363
+ obj['rotation'] = _ApiClient["default"].convertToType(data['rotation'], 'Number');
364
+ }
365
+ if (data.hasOwnProperty('display_type')) {
366
+ obj['display_type'] = _ApiClient["default"].convertToType(data['display_type'], _FieldDisplayType["default"]);
367
+ }
368
+ if (data.hasOwnProperty('opacity')) {
369
+ obj['opacity'] = _ApiClient["default"].convertToType(data['opacity'], 'Number');
370
+ }
371
+ if (data.hasOwnProperty('date_time_format')) {
372
+ obj['date_time_format'] = _ApiClient["default"].convertToType(data['date_time_format'], 'String');
373
+ }
374
+ if (data.hasOwnProperty('typeface')) {
375
+ obj['typeface'] = _ApiClient["default"].convertToType(data['typeface'], _Typeface["default"]);
376
+ }
377
+ if (data.hasOwnProperty('font_size')) {
378
+ obj['font_size'] = _ApiClient["default"].convertToType(data['font_size'], 'Number');
379
+ }
380
+ if (data.hasOwnProperty('character_spacing')) {
381
+ obj['character_spacing'] = _ApiClient["default"].convertToType(data['character_spacing'], 'Number');
382
+ }
383
+ if (data.hasOwnProperty('bold')) {
384
+ obj['bold'] = _ApiClient["default"].convertToType(data['bold'], 'Boolean');
385
+ }
386
+ if (data.hasOwnProperty('uppercase')) {
387
+ obj['uppercase'] = _ApiClient["default"].convertToType(data['uppercase'], 'Boolean');
388
+ }
389
+ if (data.hasOwnProperty('strikethrough')) {
390
+ obj['strikethrough'] = _ApiClient["default"].convertToType(data['strikethrough'], 'Boolean');
391
+ }
392
+ if (data.hasOwnProperty('keep_leading_spaces')) {
393
+ obj['keep_leading_spaces'] = _ApiClient["default"].convertToType(data['keep_leading_spaces'], 'Boolean');
394
+ }
395
+ if (data.hasOwnProperty('overflow')) {
396
+ obj['overflow'] = _ApiClient["default"].convertToType(data['overflow'], _TextOverflow["default"]);
397
+ }
398
+ if (data.hasOwnProperty('multiline')) {
399
+ obj['multiline'] = _ApiClient["default"].convertToType(data['multiline'], 'Boolean');
400
+ }
401
+ if (data.hasOwnProperty('multiline_lines')) {
402
+ obj['multiline_lines'] = _ApiClient["default"].convertToType(data['multiline_lines'], 'Number');
403
+ }
404
+ if (data.hasOwnProperty('min_length')) {
405
+ obj['min_length'] = _ApiClient["default"].convertToType(data['min_length'], 'Number');
406
+ }
407
+ if (data.hasOwnProperty('max_length')) {
408
+ obj['max_length'] = _ApiClient["default"].convertToType(data['max_length'], 'Number');
409
+ }
410
+ if (data.hasOwnProperty('auto_calculate_max_length')) {
411
+ obj['auto_calculate_max_length'] = _ApiClient["default"].convertToType(data['auto_calculate_max_length'], 'Boolean');
412
+ }
413
+ if (data.hasOwnProperty('color')) {
414
+ obj['color'] = _ApiClient["default"].convertToType(data['color'], 'String');
415
+ }
416
+ if (data.hasOwnProperty('color_field_name')) {
417
+ obj['color_field_name'] = _ApiClient["default"].convertToType(data['color_field_name'], 'String');
418
+ }
419
+ if (data.hasOwnProperty('color_field_required')) {
420
+ obj['color_field_required'] = _ApiClient["default"].convertToType(data['color_field_required'], 'Boolean');
421
+ }
422
+ if (data.hasOwnProperty('background_color')) {
423
+ obj['background_color'] = _ApiClient["default"].convertToType(data['background_color'], 'String');
424
+ }
425
+ if (data.hasOwnProperty('background_color_field_name')) {
426
+ obj['background_color_field_name'] = _ApiClient["default"].convertToType(data['background_color_field_name'], 'String');
427
+ }
428
+ if (data.hasOwnProperty('background_color_field_required')) {
429
+ obj['background_color_field_required'] = _ApiClient["default"].convertToType(data['background_color_field_required'], 'Boolean');
430
+ }
431
+ if (data.hasOwnProperty('alignment')) {
432
+ obj['alignment'] = _ApiClient["default"].convertToType(data['alignment'], _TextAlignment["default"]);
433
+ }
434
+ if (data.hasOwnProperty('v_alignment')) {
435
+ obj['v_alignment'] = _ApiClient["default"].convertToType(data['v_alignment'], _TextVerticalAlignment["default"]);
436
+ }
437
+ if (data.hasOwnProperty('comb')) {
438
+ obj['comb'] = _ApiClient["default"].convertToType(data['comb'], 'Boolean');
439
+ }
440
+ if (data.hasOwnProperty('comb_number_of_cells')) {
441
+ obj['comb_number_of_cells'] = _ApiClient["default"].convertToType(data['comb_number_of_cells'], 'Number');
442
+ }
443
+ if (data.hasOwnProperty('comb_value_offset')) {
444
+ obj['comb_value_offset'] = _ApiClient["default"].convertToType(data['comb_value_offset'], 'Number');
445
+ }
446
+ if (data.hasOwnProperty('shape_type')) {
447
+ obj['shape_type'] = _ApiClient["default"].convertToType(data['shape_type'], _ShapeType["default"]);
448
+ }
449
+ if (data.hasOwnProperty('shape_sides')) {
450
+ obj['shape_sides'] = _ApiClient["default"].convertToType(data['shape_sides'], 'Number');
451
+ }
452
+ if (data.hasOwnProperty('shape_border_width')) {
453
+ obj['shape_border_width'] = _ApiClient["default"].convertToType(data['shape_border_width'], 'Number');
454
+ }
455
+ if (data.hasOwnProperty('shape_border_color')) {
456
+ obj['shape_border_color'] = _ApiClient["default"].convertToType(data['shape_border_color'], 'String');
457
+ }
458
+ if (data.hasOwnProperty('shape_border_color_field_name')) {
459
+ obj['shape_border_color_field_name'] = _ApiClient["default"].convertToType(data['shape_border_color_field_name'], 'String');
460
+ }
461
+ if (data.hasOwnProperty('shape_border_color_field_required')) {
462
+ obj['shape_border_color_field_required'] = _ApiClient["default"].convertToType(data['shape_border_color_field_required'], 'Boolean');
463
+ }
464
+ if (data.hasOwnProperty('shape_fill_color')) {
465
+ obj['shape_fill_color'] = _ApiClient["default"].convertToType(data['shape_fill_color'], 'String');
466
+ }
467
+ if (data.hasOwnProperty('shape_fill_color_field_name')) {
468
+ obj['shape_fill_color_field_name'] = _ApiClient["default"].convertToType(data['shape_fill_color_field_name'], 'String');
469
+ }
470
+ if (data.hasOwnProperty('shape_fill_color_field_required')) {
471
+ obj['shape_fill_color_field_required'] = _ApiClient["default"].convertToType(data['shape_fill_color_field_required'], 'Boolean');
472
+ }
473
+ if (data.hasOwnProperty('check_character')) {
474
+ obj['check_character'] = _ApiClient["default"].convertToType(data['check_character'], _CheckCharacter["default"]);
475
+ }
476
+ if (data.hasOwnProperty('check_color')) {
477
+ obj['check_color'] = _ApiClient["default"].convertToType(data['check_color'], 'String');
478
+ }
479
+ if (data.hasOwnProperty('check_color_field_name')) {
480
+ obj['check_color_field_name'] = _ApiClient["default"].convertToType(data['check_color_field_name'], 'String');
481
+ }
482
+ if (data.hasOwnProperty('check_color_field_required')) {
483
+ obj['check_color_field_required'] = _ApiClient["default"].convertToType(data['check_color_field_required'], 'Boolean');
484
+ }
485
+ if (data.hasOwnProperty('qrcode_color')) {
486
+ obj['qrcode_color'] = _ApiClient["default"].convertToType(data['qrcode_color'], 'String');
487
+ }
488
+ if (data.hasOwnProperty('qrcode_color_field_name')) {
489
+ obj['qrcode_color_field_name'] = _ApiClient["default"].convertToType(data['qrcode_color_field_name'], 'String');
490
+ }
491
+ if (data.hasOwnProperty('qrcode_color_field_required')) {
492
+ obj['qrcode_color_field_required'] = _ApiClient["default"].convertToType(data['qrcode_color_field_required'], 'Boolean');
493
+ }
494
+ if (data.hasOwnProperty('true_text')) {
495
+ obj['true_text'] = _ApiClient["default"].convertToType(data['true_text'], 'String');
496
+ }
497
+ if (data.hasOwnProperty('false_text')) {
498
+ obj['false_text'] = _ApiClient["default"].convertToType(data['false_text'], 'String');
499
+ }
500
+ if (data.hasOwnProperty('condition')) {
501
+ obj['condition'] = _ApiClient["default"].convertToType(data['condition'], 'String');
502
+ }
503
+ if (data.hasOwnProperty('string_condition_type')) {
504
+ obj['string_condition_type'] = _ApiClient["default"].convertToType(data['string_condition_type'], _StringConditionType["default"]);
505
+ }
506
+ if (data.hasOwnProperty('number_condition_type')) {
507
+ obj['number_condition_type'] = _ApiClient["default"].convertToType(data['number_condition_type'], _NumberConditionType["default"]);
508
+ }
509
+ if (data.hasOwnProperty('number_condition_range_min')) {
510
+ obj['number_condition_range_min'] = _ApiClient["default"].convertToType(data['number_condition_range_min'], 'Number');
511
+ }
512
+ if (data.hasOwnProperty('number_condition_range_max')) {
513
+ obj['number_condition_range_max'] = _ApiClient["default"].convertToType(data['number_condition_range_max'], 'Number');
514
+ }
515
+ if (data.hasOwnProperty('number_condition_range_exclusive_min')) {
516
+ obj['number_condition_range_exclusive_min'] = _ApiClient["default"].convertToType(data['number_condition_range_exclusive_min'], 'Boolean');
517
+ }
518
+ if (data.hasOwnProperty('number_condition_range_exclusive_max')) {
519
+ obj['number_condition_range_exclusive_max'] = _ApiClient["default"].convertToType(data['number_condition_range_exclusive_max'], 'Boolean');
520
+ }
521
+ if (data.hasOwnProperty('invert_boolean_condition')) {
522
+ obj['invert_boolean_condition'] = _ApiClient["default"].convertToType(data['invert_boolean_condition'], 'Boolean');
523
+ }
524
+ if (data.hasOwnProperty('currency')) {
525
+ obj['currency'] = _ApiClient["default"].convertToType(data['currency'], 'Boolean');
526
+ }
527
+ if (data.hasOwnProperty('decimal_places')) {
528
+ obj['decimal_places'] = _ApiClient["default"].convertToType(data['decimal_places'], 'Number');
529
+ }
530
+ if (data.hasOwnProperty('image_scale_type')) {
531
+ obj['image_scale_type'] = _ApiClient["default"].convertToType(data['image_scale_type'], _ImageScaleType["default"]);
532
+ }
533
+ if (data.hasOwnProperty('image_gravity')) {
534
+ obj['image_gravity'] = _ApiClient["default"].convertToType(data['image_gravity'], _ImageGravity["default"]);
535
+ }
536
+ if (data.hasOwnProperty('dependencies')) {
537
+ obj['dependencies'] = _ApiClient["default"].convertToType(data['dependencies'], _FieldDependency["default"]);
538
+ }
539
+ }
540
+ return obj;
541
+ }
542
+
543
+ /**
544
+ * Validates the JSON data with respect to <code>Field</code>.
545
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
546
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>Field</code>.
547
+ */
548
+ }, {
549
+ key: "validateJSON",
550
+ value: function validateJSON(data) {
551
+ // check to make sure all required properties are present in the JSON string
552
+ var _iterator = _createForOfIteratorHelper(Field.RequiredProperties),
553
+ _step;
554
+ try {
555
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
556
+ var property = _step.value;
557
+ if (!data.hasOwnProperty(property)) {
558
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
559
+ }
560
+ }
561
+ // ensure the json data is a string
562
+ } catch (err) {
563
+ _iterator.e(err);
564
+ } finally {
565
+ _iterator.f();
566
+ }
567
+ if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) {
568
+ throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']);
569
+ }
570
+ // ensure the json data is a string
571
+ if (data['acroform_name'] && !(typeof data['acroform_name'] === 'string' || data['acroform_name'] instanceof String)) {
572
+ throw new Error("Expected the field `acroform_name` to be a primitive type in the JSON string but got " + data['acroform_name']);
573
+ }
574
+ // ensure the json data is a string
575
+ if (data['default'] && !(typeof data['default'] === 'string' || data['default'] instanceof String)) {
576
+ throw new Error("Expected the field `default` to be a primitive type in the JSON string but got " + data['default']);
577
+ }
578
+ // ensure the json data is a string
579
+ if (data['title'] && !(typeof data['title'] === 'string' || data['title'] instanceof String)) {
580
+ throw new Error("Expected the field `title` to be a primitive type in the JSON string but got " + data['title']);
581
+ }
582
+ // ensure the json data is a string
583
+ if (data['description'] && !(typeof data['description'] === 'string' || data['description'] instanceof String)) {
584
+ throw new Error("Expected the field `description` to be a primitive type in the JSON string but got " + data['description']);
585
+ }
586
+ // ensure the json data is a string
587
+ if (data['placeholder'] && !(typeof data['placeholder'] === 'string' || data['placeholder'] instanceof String)) {
588
+ throw new Error("Expected the field `placeholder` to be a primitive type in the JSON string but got " + data['placeholder']);
589
+ }
590
+ // ensure the json data is a string
591
+ if (data['metadata'] && !(typeof data['metadata'] === 'string' || data['metadata'] instanceof String)) {
592
+ throw new Error("Expected the field `metadata` to be a primitive type in the JSON string but got " + data['metadata']);
593
+ }
594
+ // ensure the json data is a string
595
+ if (data['option_list'] && !(typeof data['option_list'] === 'string' || data['option_list'] instanceof String)) {
596
+ throw new Error("Expected the field `option_list` to be a primitive type in the JSON string but got " + data['option_list']);
597
+ }
598
+ // ensure the json data is a string
599
+ if (data['combined_field_names'] && !(typeof data['combined_field_names'] === 'string' || data['combined_field_names'] instanceof String)) {
600
+ throw new Error("Expected the field `combined_field_names` to be a primitive type in the JSON string but got " + data['combined_field_names']);
601
+ }
602
+ // ensure the json data is a string
603
+ if (data['combined_field_separator'] && !(typeof data['combined_field_separator'] === 'string' || data['combined_field_separator'] instanceof String)) {
604
+ throw new Error("Expected the field `combined_field_separator` to be a primitive type in the JSON string but got " + data['combined_field_separator']);
605
+ }
606
+ // ensure the json data is a string
607
+ if (data['combined_field_format'] && !(typeof data['combined_field_format'] === 'string' || data['combined_field_format'] instanceof String)) {
608
+ throw new Error("Expected the field `combined_field_format` to be a primitive type in the JSON string but got " + data['combined_field_format']);
609
+ }
610
+ // ensure the json data is a string
611
+ if (data['date_time_format'] && !(typeof data['date_time_format'] === 'string' || data['date_time_format'] instanceof String)) {
612
+ throw new Error("Expected the field `date_time_format` to be a primitive type in the JSON string but got " + data['date_time_format']);
613
+ }
614
+ // ensure the json data is a string
615
+ if (data['color'] && !(typeof data['color'] === 'string' || data['color'] instanceof String)) {
616
+ throw new Error("Expected the field `color` to be a primitive type in the JSON string but got " + data['color']);
617
+ }
618
+ // ensure the json data is a string
619
+ if (data['color_field_name'] && !(typeof data['color_field_name'] === 'string' || data['color_field_name'] instanceof String)) {
620
+ throw new Error("Expected the field `color_field_name` to be a primitive type in the JSON string but got " + data['color_field_name']);
621
+ }
622
+ // ensure the json data is a string
623
+ if (data['background_color'] && !(typeof data['background_color'] === 'string' || data['background_color'] instanceof String)) {
624
+ throw new Error("Expected the field `background_color` to be a primitive type in the JSON string but got " + data['background_color']);
625
+ }
626
+ // ensure the json data is a string
627
+ if (data['background_color_field_name'] && !(typeof data['background_color_field_name'] === 'string' || data['background_color_field_name'] instanceof String)) {
628
+ throw new Error("Expected the field `background_color_field_name` to be a primitive type in the JSON string but got " + data['background_color_field_name']);
629
+ }
630
+ // ensure the json data is a string
631
+ if (data['shape_border_color'] && !(typeof data['shape_border_color'] === 'string' || data['shape_border_color'] instanceof String)) {
632
+ throw new Error("Expected the field `shape_border_color` to be a primitive type in the JSON string but got " + data['shape_border_color']);
633
+ }
634
+ // ensure the json data is a string
635
+ if (data['shape_border_color_field_name'] && !(typeof data['shape_border_color_field_name'] === 'string' || data['shape_border_color_field_name'] instanceof String)) {
636
+ throw new Error("Expected the field `shape_border_color_field_name` to be a primitive type in the JSON string but got " + data['shape_border_color_field_name']);
637
+ }
638
+ // ensure the json data is a string
639
+ if (data['shape_fill_color'] && !(typeof data['shape_fill_color'] === 'string' || data['shape_fill_color'] instanceof String)) {
640
+ throw new Error("Expected the field `shape_fill_color` to be a primitive type in the JSON string but got " + data['shape_fill_color']);
641
+ }
642
+ // ensure the json data is a string
643
+ if (data['shape_fill_color_field_name'] && !(typeof data['shape_fill_color_field_name'] === 'string' || data['shape_fill_color_field_name'] instanceof String)) {
644
+ throw new Error("Expected the field `shape_fill_color_field_name` to be a primitive type in the JSON string but got " + data['shape_fill_color_field_name']);
645
+ }
646
+ // ensure the json data is a string
647
+ if (data['check_color'] && !(typeof data['check_color'] === 'string' || data['check_color'] instanceof String)) {
648
+ throw new Error("Expected the field `check_color` to be a primitive type in the JSON string but got " + data['check_color']);
649
+ }
650
+ // ensure the json data is a string
651
+ if (data['check_color_field_name'] && !(typeof data['check_color_field_name'] === 'string' || data['check_color_field_name'] instanceof String)) {
652
+ throw new Error("Expected the field `check_color_field_name` to be a primitive type in the JSON string but got " + data['check_color_field_name']);
653
+ }
654
+ // ensure the json data is a string
655
+ if (data['qrcode_color'] && !(typeof data['qrcode_color'] === 'string' || data['qrcode_color'] instanceof String)) {
656
+ throw new Error("Expected the field `qrcode_color` to be a primitive type in the JSON string but got " + data['qrcode_color']);
657
+ }
658
+ // ensure the json data is a string
659
+ if (data['qrcode_color_field_name'] && !(typeof data['qrcode_color_field_name'] === 'string' || data['qrcode_color_field_name'] instanceof String)) {
660
+ throw new Error("Expected the field `qrcode_color_field_name` to be a primitive type in the JSON string but got " + data['qrcode_color_field_name']);
661
+ }
662
+ // ensure the json data is a string
663
+ if (data['true_text'] && !(typeof data['true_text'] === 'string' || data['true_text'] instanceof String)) {
664
+ throw new Error("Expected the field `true_text` to be a primitive type in the JSON string but got " + data['true_text']);
665
+ }
666
+ // ensure the json data is a string
667
+ if (data['false_text'] && !(typeof data['false_text'] === 'string' || data['false_text'] instanceof String)) {
668
+ throw new Error("Expected the field `false_text` to be a primitive type in the JSON string but got " + data['false_text']);
669
+ }
670
+ // ensure the json data is a string
671
+ if (data['condition'] && !(typeof data['condition'] === 'string' || data['condition'] instanceof String)) {
672
+ throw new Error("Expected the field `condition` to be a primitive type in the JSON string but got " + data['condition']);
673
+ }
674
+ // validate the optional field `dependencies`
675
+ if (data['dependencies']) {
676
+ // data not null
677
+ _FieldDependency["default"].validateJSON(data['dependencies']);
678
+ }
679
+ return true;
680
+ }
681
+ }]);
682
+ }();
683
+ Field.RequiredProperties = ["id", "name", "page", "acroform_name", "type", "static", "editable", "default", "title", "description", "placeholder", "metadata", "required", "option_list", "combined_field_names", "combined_field_type", "combined_field_separator", "combined_field_format", "integer", "minimum", "maximum", "exclusive_minimum", "exclusive_maximum", "include_time", "signature_allow_draw", "signature_allow_type", "barcode_symbology", "hidden", "x", "y", "width", "height", "rotation", "display_type", "opacity", "date_time_format", "typeface", "font_size", "character_spacing", "bold", "uppercase", "strikethrough", "keep_leading_spaces", "overflow", "multiline", "multiline_lines", "min_length", "max_length", "auto_calculate_max_length", "color", "color_field_name", "color_field_required", "background_color", "background_color_field_name", "background_color_field_required", "alignment", "v_alignment", "comb", "comb_number_of_cells", "comb_value_offset", "shape_type", "shape_sides", "shape_border_width", "shape_border_color", "shape_border_color_field_name", "shape_border_color_field_required", "shape_fill_color", "shape_fill_color_field_name", "shape_fill_color_field_required", "check_character", "check_color", "check_color_field_name", "check_color_field_required", "qrcode_color", "qrcode_color_field_name", "qrcode_color_field_required", "true_text", "false_text", "condition", "string_condition_type", "number_condition_type", "number_condition_range_min", "number_condition_range_max", "number_condition_range_exclusive_min", "number_condition_range_exclusive_max", "invert_boolean_condition", "currency", "decimal_places", "image_scale_type", "image_gravity", "dependencies"];
684
+
685
+ /**
686
+ * The field's ID, an integer that's unique within the template.
687
+ * @member {Number} id
688
+ */
689
+ Field.prototype['id'] = undefined;
690
+
691
+ /**
692
+ * The field's name, the key of its value in submission data. A `/` nests the key in objects and arrays (`client/address`, `items/0/price`); write a literal `/` as `~1` and `~` as `~0`. Fields with the same name share one value and their shared settings, and array indexes inside a name are ignored for settings, so `items/0/price` and `items/1/price` share settings but not values. A `#` and a line number (`notes#0`, `notes#1`) splits one value over several fields as lines of text, and names that start with `@@` print submission details such as `@@date`.
693
+ * @member {String} name
694
+ */
695
+ Field.prototype['name'] = undefined;
696
+
697
+ /**
698
+ * The number of the page the field is on, starting at 1. A field added without one goes on page 1, and a field moved to another page without a new `y` keeps its place on the page.
699
+ * @member {Number} page
700
+ */
701
+ Field.prototype['page'] = undefined;
702
+
703
+ /**
704
+ * The name of the PDF form field this field was made from, when the template's PDF had fillable fields. Null for fields added in DocSpring.
705
+ * @member {String} acroform_name
706
+ */
707
+ Field.prototype['acroform_name'] = undefined;
708
+
709
+ /**
710
+ * The data type of the field's value: `string`, `number`, `boolean`, `date`, `address`, `country`, `email`, `url`, `image`, `signature`, `initials`, `barcode`, or `combined` (made from other fields' values, never sent in submission data). It sets how the value is validated and which `display_type`s the field can use. `object` and `array` are the types of field groups (the template's `field_groups`), not of fields. Shared by every field with the same `name`.
711
+ * @member {module:model/FieldType} type
712
+ */
713
+ Field.prototype['type'] = undefined;
714
+
715
+ /**
716
+ * The field prints fixed content, its `default`, instead of a value from submission data, and it's left out of the template's data schema and forms. Static check marks and shapes always print unless `hidden`, and a static number field's `default` can be a formula. Shared by every field with the same `name`.
717
+ * @member {Boolean} static
718
+ */
719
+ Field.prototype['static'] = undefined;
720
+
721
+ /**
722
+ * Text and check display only: prints the field as a fillable PDF form field instead of flat content (a text field with an `option_list` becomes a dropdown). A submission's `editable` option, when set, overrides this for every field. Shared by every field with the same `name`.
723
+ * @member {Boolean} editable
724
+ */
725
+ Field.prototype['editable'] = undefined;
726
+
727
+ /**
728
+ * The value used when a submission leaves the field out, and the value forms are pre-filled with. A required field still needs a value in each submission. An image field's default is an image URL, a number field's can be a formula, and a static field's is the content it prints. Shared by every field with the same `name`.
729
+ * @member {String} default
730
+ */
731
+ Field.prototype['default'] = undefined;
732
+
733
+ /**
734
+ * The field's title in the template's data schema and on forms. When it's empty, a title is made from the field's name. Shared by every field with the same `name`.
735
+ * @member {String} title
736
+ */
737
+ Field.prototype['title'] = undefined;
738
+
739
+ /**
740
+ * Help text for the field, added to the template's data schema and shown on forms. Shared by every field with the same `name`.
741
+ * @member {String} description
742
+ */
743
+ Field.prototype['description'] = undefined;
744
+
745
+ /**
746
+ * Placeholder text for the field's input on forms, added to the template's data schema as `x-placeholder`. Shared by every field with the same `name`.
747
+ * @member {String} placeholder
748
+ */
749
+ Field.prototype['placeholder'] = undefined;
750
+
751
+ /**
752
+ * Text for your own use, added to the template's data schema as `x-metadata`. DocSpring doesn't use it. Shared by every field with the same `name`.
753
+ * @member {String} metadata
754
+ */
755
+ Field.prototype['metadata'] = undefined;
756
+
757
+ /**
758
+ * Whether each submission must include a value for the field. A submission without one fails validation, and no PDF is generated. Shared by every field with the same `name`.
759
+ * @member {Boolean} required
760
+ */
761
+ Field.prototype['required'] = undefined;
762
+
763
+ /**
764
+ * String fields only: a comma-separated list of the values the field accepts. It's added to the template's data schema as an `enum`, forms show it as a select list, and an `editable` field becomes a dropdown. Shared by every field with the same `name`.
765
+ * @member {String} option_list
766
+ */
767
+ Field.prototype['option_list'] = undefined;
768
+
769
+ /**
770
+ * Combined fields only: a comma-separated list of the names of the fields whose values are combined, in order. Shared by every field with the same `name`.
771
+ * @member {String} combined_field_names
772
+ */
773
+ Field.prototype['combined_field_names'] = undefined;
774
+
775
+ /**
776
+ * Combined fields only: `separator` joins the values with `combined_field_separator`, and `format` puts them into `combined_field_format`. Shared by every field with the same `name`.
777
+ * @member {module:model/CombinedFieldType} combined_field_type
778
+ */
779
+ Field.prototype['combined_field_type'] = undefined;
780
+
781
+ /**
782
+ * Combined fields only: the text placed between the values when `combined_field_type` is `separator`. Empty values are skipped. Defaults to a space. Shared by every field with the same `name`.
783
+ * @member {String} combined_field_separator
784
+ */
785
+ Field.prototype['combined_field_separator'] = undefined;
786
+
787
+ /**
788
+ * Combined fields only: the text for `combined_field_type` `format`, where `$0`, `$1` and so on are replaced with the values of `combined_field_names` in order, such as `Full name: $0, Occupation: $1`. Shared by every field with the same `name`.
789
+ * @member {String} combined_field_format
790
+ */
791
+ Field.prototype['combined_field_format'] = undefined;
792
+
793
+ /**
794
+ * Number fields only: the value must be a whole number. Shared by every field with the same `name`.
795
+ * @member {Boolean} integer
796
+ */
797
+ Field.prototype['integer'] = undefined;
798
+
799
+ /**
800
+ * Number fields only: the smallest value allowed. Shared by every field with the same `name`.
801
+ * @member {Number} minimum
802
+ */
803
+ Field.prototype['minimum'] = undefined;
804
+
805
+ /**
806
+ * Number fields only: the largest value allowed. Shared by every field with the same `name`.
807
+ * @member {Number} maximum
808
+ */
809
+ Field.prototype['maximum'] = undefined;
810
+
811
+ /**
812
+ * Number fields only: the value must be greater than `minimum`, not equal to it. Shared by every field with the same `name`.
813
+ * @member {Boolean} exclusive_minimum
814
+ */
815
+ Field.prototype['exclusive_minimum'] = undefined;
816
+
817
+ /**
818
+ * Number fields only: the value must be less than `maximum`, not equal to it. Shared by every field with the same `name`.
819
+ * @member {Boolean} exclusive_maximum
820
+ */
821
+ Field.prototype['exclusive_maximum'] = undefined;
822
+
823
+ /**
824
+ * Date fields only: the value is a date and time (`YYYY-MM-DDThh:mm:ss.fffZ`) instead of a date (`YYYY-MM-DD`), and it prints with the template's date-time format unless `date_time_format` is set. Shared by every field with the same `name`.
825
+ * @member {Boolean} include_time
826
+ */
827
+ Field.prototype['include_time'] = undefined;
828
+
829
+ /**
830
+ * Signature and initials fields only: lets signers draw their signature on forms and in data requests. Shared by every field with the same `name`.
831
+ * @member {Boolean} signature_allow_draw
832
+ */
833
+ Field.prototype['signature_allow_draw'] = undefined;
834
+
835
+ /**
836
+ * Signature and initials fields only: lets signers type their name and choose a script font instead of drawing, on forms and in data requests. Shared by every field with the same `name`.
837
+ * @member {Boolean} signature_allow_type
838
+ */
839
+ Field.prototype['signature_allow_type'] = undefined;
840
+
841
+ /**
842
+ * Barcode fields only: the barcode format, which the value must match. `code_128` and `pdf417` take any ASCII text; `code_39` and `code_93` take capital letters, digits, spaces and `- . $ / + %`; `code_25` takes digits; `ean_13` takes 12 digits, `ean_8` 7 digits and `upc_a` 11 digits (the check digit is added). Shared by every field with the same `name`.
843
+ * @member {module:model/BarcodeSymbology} barcode_symbology
844
+ */
845
+ Field.prototype['barcode_symbology'] = undefined;
846
+
847
+ /**
848
+ * Leaves the field off the PDF. It stays in the template's data schema (marked `x-hidden`) and on forms, so other fields, such as combined fields, can use its value. A hidden static check mark or shape isn't printed.
849
+ * @member {Boolean} hidden
850
+ */
851
+ Field.prototype['hidden'] = undefined;
852
+
853
+ /**
854
+ * The distance from the page's left edge to the field's left edge. Positions and sizes are in units where every page is 2480 wide: one unit is the page's width in points divided by 2480 (about 0.247 points on a US Letter page).
855
+ * @member {Number} x
856
+ */
857
+ Field.prototype['x'] = undefined;
858
+
859
+ /**
860
+ * The distance from the top edge of the field's `page` down to the field's top edge, in the units of `x`. A page is 2480 times its height divided by its width units tall: about 3209 for US Letter and 3508 for A4.
861
+ * @member {Number} y
862
+ */
863
+ Field.prototype['y'] = undefined;
864
+
865
+ /**
866
+ * The field's width, in the units of `x`. A check mark is sized to the field's width.
867
+ * @member {Number} width
868
+ */
869
+ Field.prototype['width'] = undefined;
870
+
871
+ /**
872
+ * The field's height, in the units of `x`. The template editor keeps check marks, QR codes, and square and circle shapes square, with `height` equal to `width`.
873
+ * @member {Number} height
874
+ */
875
+ Field.prototype['height'] = undefined;
876
+
877
+ /**
878
+ * Rotates the field clockwise by this many degrees, from -360 to 360 (negative turns it counterclockwise).
879
+ * @member {Number} rotation
880
+ */
881
+ Field.prototype['rotation'] = undefined;
882
+
883
+ /**
884
+ * How the value appears on the PDF: `text`, `check` (a check mark), `shape`, `qrcode`, `barcode`, or `image` (image, signature and initials fields). Check marks and shapes print only when the value meets the field's `condition`, and the field's `type` limits which display types it can use.
885
+ * @member {module:model/FieldDisplayType} display_type
886
+ */
887
+ Field.prototype['display_type'] = undefined;
888
+
889
+ /**
890
+ * The opacity of the field's content and background, from 0 (invisible) to 1. QR codes and barcodes always print at full opacity.
891
+ * @member {Number} opacity
892
+ */
893
+ Field.prototype['opacity'] = undefined;
894
+
895
+ /**
896
+ * Date fields only: how the date prints, as a strftime format such as `%m/%d/%Y`, or a calculation such as `@years_since`, `@years_until` or `@diff_years` (also months, weeks, days, hours, minutes and seconds), counted to when the PDF is generated. Empty uses the template's date format, or its date-time format with `include_time`.
897
+ * @member {String} date_time_format
898
+ */
899
+ Field.prototype['date_time_format'] = undefined;
900
+
901
+ /**
902
+ * Text display only: the font, one of `Helvetica`, `Arial`, `Calibri`, `Open Sans`, `Roboto`, `Lato`, `Poppins`, `Public Sans`, `Questrial`, `Times New Roman`, `Dancing Script`, `Lovtony Script`, or the monospace `Courier`, `Inconsolata`, `Menlo`, `Roboto Mono` and `Ubuntu Mono`. Empty uses the template's default typeface.
903
+ * @member {module:model/Typeface} typeface
904
+ */
905
+ Field.prototype['typeface'] = undefined;
906
+
907
+ /**
908
+ * Text display only: the font size in points. Empty uses the template's default font size.
909
+ * @member {Number} font_size
910
+ */
911
+ Field.prototype['font_size'] = undefined;
912
+
913
+ /**
914
+ * Text display only: extra space between characters, in points. Empty uses the template's default.
915
+ * @member {Number} character_spacing
916
+ */
917
+ Field.prototype['character_spacing'] = undefined;
918
+
919
+ /**
920
+ * Text display only: prints the text in bold.
921
+ * @member {Boolean} bold
922
+ */
923
+ Field.prototype['bold'] = undefined;
924
+
925
+ /**
926
+ * Text display only: prints the text in capital letters.
927
+ * @member {Boolean} uppercase
928
+ */
929
+ Field.prototype['uppercase'] = undefined;
930
+
931
+ /**
932
+ * Text display only: draws a line through the text.
933
+ * @member {Boolean} strikethrough
934
+ */
935
+ Field.prototype['strikethrough'] = undefined;
936
+
937
+ /**
938
+ * Text display only: keeps the spaces at the start of the text and of each line, so text can be lined up with spaces.
939
+ * @member {Boolean} keep_leading_spaces
940
+ */
941
+ Field.prototype['keep_leading_spaces'] = undefined;
942
+
943
+ /**
944
+ * Text display only: what happens to text that doesn't fit the field. `shrink_to_fit` makes the font smaller, down to 5 points; `truncate` cuts the text off and returns the rest in the submission's `truncated_text`.
945
+ * @member {module:model/TextOverflow} overflow
946
+ */
947
+ Field.prototype['overflow'] = undefined;
948
+
949
+ /**
950
+ * Text display only: wraps the text over as many lines as fit in the field's height instead of printing one line, and forms show a multi-line input.
951
+ * @member {Boolean} multiline
952
+ */
953
+ Field.prototype['multiline'] = undefined;
954
+
955
+ /**
956
+ * Text display only, with `multiline`: spreads the text over exactly this many evenly spaced lines in the field's height (up to 300), to line up with lines printed on the form. Empty uses the font's normal line spacing.
957
+ * @member {Number} multiline_lines
958
+ */
959
+ Field.prototype['multiline_lines'] = undefined;
960
+
961
+ /**
962
+ * Text display only: the fewest characters the value can have, added to the template's data schema. Not used for date, address, country or number fields, or fields with an `option_list`.
963
+ * @member {Number} min_length
964
+ */
965
+ Field.prototype['min_length'] = undefined;
966
+
967
+ /**
968
+ * Text display only: the most characters the value can have, added to the template's data schema; it also limits an `editable` field. Not used for date, address, country or number fields, or fields with an `option_list`.
969
+ * @member {Number} max_length
970
+ */
971
+ Field.prototype['max_length'] = undefined;
972
+
973
+ /**
974
+ * Text display only, with a monospace `typeface` (`Courier`, `Inconsolata`, `Menlo`, `Roboto Mono` or `Ubuntu Mono`): adds the number of characters that fit in the field to the template's data schema as its maximum length.
975
+ * @member {Boolean} auto_calculate_max_length
976
+ */
977
+ Field.prototype['auto_calculate_max_length'] = undefined;
978
+
979
+ /**
980
+ * Text display only: the text color, as a hex code such as `444444`. Empty uses the template's default text color.
981
+ * @member {String} color
982
+ */
983
+ Field.prototype['color'] = undefined;
984
+
985
+ /**
986
+ * Text display only: the name of a data field whose value, a hex code such as `FF0000`, sets the text color for each submission. That field is added to the template's data schema, with `color` as its default.
987
+ * @member {String} color_field_name
988
+ */
989
+ Field.prototype['color_field_name'] = undefined;
990
+
991
+ /**
992
+ * Makes the `color_field_name` field required. When it isn't required and a submission leaves it out, `color` is used.
993
+ * @member {Boolean} color_field_required
994
+ */
995
+ Field.prototype['color_field_required'] = undefined;
996
+
997
+ /**
998
+ * Text and check display only: a color that fills the field's area behind its content, as a hex code, to cover what the page shows there. Check fields print it even when unchecked; text fields print it only when they have a value.
999
+ * @member {String} background_color
1000
+ */
1001
+ Field.prototype['background_color'] = undefined;
1002
+
1003
+ /**
1004
+ * Text and check display only: the name of a data field whose value, a hex code, sets the background color for each submission. That field is added to the template's data schema, with `background_color` as its default.
1005
+ * @member {String} background_color_field_name
1006
+ */
1007
+ Field.prototype['background_color_field_name'] = undefined;
1008
+
1009
+ /**
1010
+ * Makes the `background_color_field_name` field required. When it isn't required and a submission leaves it out, `background_color` is used.
1011
+ * @member {Boolean} background_color_field_required
1012
+ */
1013
+ Field.prototype['background_color_field_required'] = undefined;
1014
+
1015
+ /**
1016
+ * Text display only: how the text is aligned across the field: `left`, `center`, `right` or `justify` (both edges of every line of multiline text except the last of each paragraph).
1017
+ * @member {module:model/TextAlignment} alignment
1018
+ */
1019
+ Field.prototype['alignment'] = undefined;
1020
+
1021
+ /**
1022
+ * Text display only: how the text is aligned vertically in the field: `bottom`, `center` or `top`.
1023
+ * @member {module:model/TextVerticalAlignment} v_alignment
1024
+ */
1025
+ Field.prototype['v_alignment'] = undefined;
1026
+
1027
+ /**
1028
+ * Text display only: splits the field into `comb_number_of_cells` boxes of equal width and prints one character, centered, in each.
1029
+ * @member {Boolean} comb
1030
+ */
1031
+ Field.prototype['comb'] = undefined;
1032
+
1033
+ /**
1034
+ * With `comb`: how many boxes the field has. The value's maximum length in the template's data schema is this plus `comb_value_offset`.
1035
+ * @member {Number} comb_number_of_cells
1036
+ */
1037
+ Field.prototype['comb_number_of_cells'] = undefined;
1038
+
1039
+ /**
1040
+ * With `comb`: the position, from 0, of the first character of the value that this field prints. For an SSN printed in boxes of 3, 2 and 4 digits, three fields named `ssn` use offsets 0, 3 and 5.
1041
+ * @member {Number} comb_value_offset
1042
+ */
1043
+ Field.prototype['comb_value_offset'] = undefined;
1044
+
1045
+ /**
1046
+ * Shape display only: `square`, `rectangle`, `circle`, `ellipse`, `triangle` or `polygon`. A square or circle uses the smaller of `width` and `height`.
1047
+ * @member {module:model/ShapeType} shape_type
1048
+ */
1049
+ Field.prototype['shape_type'] = undefined;
1050
+
1051
+ /**
1052
+ * Shape display only, with `shape_type` `polygon`: the number of sides, 3 to 12.
1053
+ * @member {Number} shape_sides
1054
+ */
1055
+ Field.prototype['shape_sides'] = undefined;
1056
+
1057
+ /**
1058
+ * Shape display only: the width of the shape's border, in points.
1059
+ * @member {Number} shape_border_width
1060
+ */
1061
+ Field.prototype['shape_border_width'] = undefined;
1062
+
1063
+ /**
1064
+ * Shape display only: the shape's border color, as a hex code. Null draws no border.
1065
+ * @member {String} shape_border_color
1066
+ */
1067
+ Field.prototype['shape_border_color'] = undefined;
1068
+
1069
+ /**
1070
+ * Shape display only: the name of a data field whose value, a hex code, sets the border color for each submission. That field is added to the template's data schema, with `shape_border_color` as its default.
1071
+ * @member {String} shape_border_color_field_name
1072
+ */
1073
+ Field.prototype['shape_border_color_field_name'] = undefined;
1074
+
1075
+ /**
1076
+ * Makes the `shape_border_color_field_name` field required. When it isn't required and a submission leaves it out, `shape_border_color` is used.
1077
+ * @member {Boolean} shape_border_color_field_required
1078
+ */
1079
+ Field.prototype['shape_border_color_field_required'] = undefined;
1080
+
1081
+ /**
1082
+ * Shape display only: the color that fills the shape, as a hex code. Null leaves it unfilled.
1083
+ * @member {String} shape_fill_color
1084
+ */
1085
+ Field.prototype['shape_fill_color'] = undefined;
1086
+
1087
+ /**
1088
+ * Shape display only: the name of a data field whose value, a hex code, sets the fill color for each submission. That field is added to the template's data schema, with `shape_fill_color` as its default.
1089
+ * @member {String} shape_fill_color_field_name
1090
+ */
1091
+ Field.prototype['shape_fill_color_field_name'] = undefined;
1092
+
1093
+ /**
1094
+ * Makes the `shape_fill_color_field_name` field required. When it isn't required and a submission leaves it out, `shape_fill_color` is used.
1095
+ * @member {Boolean} shape_fill_color_field_required
1096
+ */
1097
+ Field.prototype['shape_fill_color_field_required'] = undefined;
1098
+
1099
+ /**
1100
+ * Check display only: the character printed, as an HTML entity: `&#10003;` (✓), `&#10004;` (✔, the default), `&#10006;` (✖), `&#10007;` (✗) or `&#10008;` (✘).
1101
+ * @member {module:model/CheckCharacter} check_character
1102
+ */
1103
+ Field.prototype['check_character'] = undefined;
1104
+
1105
+ /**
1106
+ * Check display only: the check mark's color, as a hex code. Empty uses the template's default check color.
1107
+ * @member {String} check_color
1108
+ */
1109
+ Field.prototype['check_color'] = undefined;
1110
+
1111
+ /**
1112
+ * Check display only: the name of a data field whose value, a hex code, sets the check mark's color for each submission. That field is added to the template's data schema, with `check_color` as its default.
1113
+ * @member {String} check_color_field_name
1114
+ */
1115
+ Field.prototype['check_color_field_name'] = undefined;
1116
+
1117
+ /**
1118
+ * Makes the `check_color_field_name` field required. When it isn't required and a submission leaves it out, `check_color` is used.
1119
+ * @member {Boolean} check_color_field_required
1120
+ */
1121
+ Field.prototype['check_color_field_required'] = undefined;
1122
+
1123
+ /**
1124
+ * QR code display only: the QR code's color, as a hex code, printed on a white background. Empty prints it in black.
1125
+ * @member {String} qrcode_color
1126
+ */
1127
+ Field.prototype['qrcode_color'] = undefined;
1128
+
1129
+ /**
1130
+ * QR code display only: the name of a data field whose value, a hex code, sets the QR code's color for each submission. That field is added to the template's data schema, with `qrcode_color` as its default.
1131
+ * @member {String} qrcode_color_field_name
1132
+ */
1133
+ Field.prototype['qrcode_color_field_name'] = undefined;
1134
+
1135
+ /**
1136
+ * Makes the `qrcode_color_field_name` field required. When it isn't required and a submission leaves it out, `qrcode_color` is used.
1137
+ * @member {Boolean} qrcode_color_field_required
1138
+ */
1139
+ Field.prototype['qrcode_color_field_required'] = undefined;
1140
+
1141
+ /**
1142
+ * Boolean fields with text display: the text printed when the value is `true`. Empty uses the template's `true_text`; when neither is set, nothing prints.
1143
+ * @member {String} true_text
1144
+ */
1145
+ Field.prototype['true_text'] = undefined;
1146
+
1147
+ /**
1148
+ * Boolean fields with text display: the text printed when the value is `false`. Empty uses the template's `false_text`; when neither is set, nothing prints.
1149
+ * @member {String} false_text
1150
+ */
1151
+ Field.prototype['false_text'] = undefined;
1152
+
1153
+ /**
1154
+ * Check and shape display only: the value a string or number field's value is compared with, by `string_condition_type` or `number_condition_type`, to decide whether the check mark or shape prints. Boolean fields print when `true` (see `invert_boolean_condition`), and other types print when they have a value.
1155
+ * @member {String} condition
1156
+ */
1157
+ Field.prototype['condition'] = undefined;
1158
+
1159
+ /**
1160
+ * String fields with check or shape display: how the value is compared with `condition`: `equals`, `contains`, `starts_with`, `ends_with`, or `regex`, where `condition` is a regular expression the value must match.
1161
+ * @member {module:model/StringConditionType} string_condition_type
1162
+ */
1163
+ Field.prototype['string_condition_type'] = undefined;
1164
+
1165
+ /**
1166
+ * Number fields with check or shape display: how the value is compared with `condition`: `equals`, `gt` (greater than), `gte` (greater than or equal to), `lt` (less than), `lte` (less than or equal to), or `range`, between `number_condition_range_min` and `number_condition_range_max`.
1167
+ * @member {module:model/NumberConditionType} number_condition_type
1168
+ */
1169
+ Field.prototype['number_condition_type'] = undefined;
1170
+
1171
+ /**
1172
+ * With `number_condition_type` `range`: the lower end of the range, included unless `number_condition_range_exclusive_min` is set.
1173
+ * @member {Number} number_condition_range_min
1174
+ */
1175
+ Field.prototype['number_condition_range_min'] = undefined;
1176
+
1177
+ /**
1178
+ * With `number_condition_type` `range`: the upper end of the range, included unless `number_condition_range_exclusive_max` is set.
1179
+ * @member {Number} number_condition_range_max
1180
+ */
1181
+ Field.prototype['number_condition_range_max'] = undefined;
1182
+
1183
+ /**
1184
+ * With `number_condition_type` `range`: leaves `number_condition_range_min` itself out of the range.
1185
+ * @member {Boolean} number_condition_range_exclusive_min
1186
+ */
1187
+ Field.prototype['number_condition_range_exclusive_min'] = undefined;
1188
+
1189
+ /**
1190
+ * With `number_condition_type` `range`: leaves `number_condition_range_max` itself out of the range.
1191
+ * @member {Boolean} number_condition_range_exclusive_max
1192
+ */
1193
+ Field.prototype['number_condition_range_exclusive_max'] = undefined;
1194
+
1195
+ /**
1196
+ * Boolean fields with check or shape display: prints the check mark or shape when the value is `false` or missing, instead of `true`.
1197
+ * @member {Boolean} invert_boolean_condition
1198
+ */
1199
+ Field.prototype['invert_boolean_condition'] = undefined;
1200
+
1201
+ /**
1202
+ * Number fields only: forms show a currency input, and the template's data schema gives the field `format: currency`. It doesn't change how the number prints.
1203
+ * @member {Boolean} currency
1204
+ */
1205
+ Field.prototype['currency'] = undefined;
1206
+
1207
+ /**
1208
+ * Number fields with text display: prints the number with this many decimal places, from 0 (rounds to a whole number) to 99. Empty prints the number as it was sent.
1209
+ * @member {Number} decimal_places
1210
+ */
1211
+ Field.prototype['decimal_places'] = undefined;
1212
+
1213
+ /**
1214
+ * Image fields only: how the image is resized to the field. `fit` keeps its proportions and fits it inside the field, which can leave empty space; `fill` keeps its proportions and crops it to fill the field; `stretch` stretches it to the field's size. Signatures and initials always fit.
1215
+ * @member {module:model/ImageScaleType} image_scale_type
1216
+ */
1217
+ Field.prototype['image_scale_type'] = undefined;
1218
+
1219
+ /**
1220
+ * Image, signature and initials fields: where the image sits in the field with `fit`, or which part is kept with `fill`: `NorthWest` (top left), `North`, `NorthEast`, `West`, `Center`, `East`, `SouthWest`, `South` or `SouthEast` (bottom right). It also aligns typed signatures, and isn't used with `stretch`.
1221
+ * @member {module:model/ImageGravity} image_gravity
1222
+ */
1223
+ Field.prototype['image_gravity'] = undefined;
1224
+
1225
+ /**
1226
+ * The field's own conditional logic rule: when other fields' values meet its conditions, the field is shown, made required, or both. Null when it has none. The template's rules (`field_dependencies`) can apply to the field too. Shared by every field with the same `name`.
1227
+ * @member {module:model/FieldDependency} dependencies
1228
+ */
1229
+ Field.prototype['dependencies'] = undefined;
1230
+ var _default2 = exports["default"] = Field;