docspring 4.0.0 → 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (132) hide show
  1. checksums.yaml +4 -4
  2. data/.openapi-generator/FILES +84 -0
  3. data/.travis.yml +1 -1
  4. data/CHANGELOG.md +24 -0
  5. data/Gemfile.lock +2 -2
  6. data/README.md +10 -1
  7. data/docs/AddTemplateFieldsRequest.md +18 -0
  8. data/docs/Client.md +704 -33
  9. data/docs/CreateSubmissionBatchRequest.md +2 -0
  10. data/docs/CreateSubmissionRequest.md +2 -0
  11. data/docs/CreateTemplateRequest.md +10 -2
  12. data/docs/Field.md +198 -0
  13. data/docs/FieldDependency.md +22 -0
  14. data/docs/FieldDependencyInput.md +22 -0
  15. data/docs/FieldGroup.md +32 -0
  16. data/docs/FieldGroupInput.md +30 -0
  17. data/docs/FieldGroupType.md +15 -0
  18. data/docs/FieldInput.md +196 -0
  19. data/docs/FieldType.md +15 -0
  20. data/docs/GenerateFilesFormat.md +15 -0
  21. data/docs/GenerateSubmissionFilesRequest.md +18 -0
  22. data/docs/OutputFormat.md +15 -0
  23. data/docs/PageImage.md +34 -0
  24. data/docs/PageImages.md +24 -0
  25. data/docs/PredefinedField.md +30 -0
  26. data/docs/PredefinedFieldInput.md +30 -0
  27. data/docs/RemoveTemplateFieldsRequest.md +18 -0
  28. data/docs/ReorderTemplateFieldsRequest.md +18 -0
  29. data/docs/Submission.md +3 -1
  30. data/docs/SubmissionFiles.md +3 -1
  31. data/docs/SubmissionInput.md +2 -0
  32. data/docs/SubmissionValidation.md +24 -0
  33. data/docs/Template.md +6 -0
  34. data/docs/TemplateDiff.md +30 -0
  35. data/docs/TemplateDiffSummary.md +28 -0
  36. data/docs/TemplateDocument.md +3 -3
  37. data/docs/TemplateFieldChange.md +24 -0
  38. data/docs/TemplateFieldChanges.md +24 -0
  39. data/docs/TemplateFieldDependency.md +1 -1
  40. data/docs/TemplateFieldDependencyInput.md +1 -1
  41. data/docs/TemplateFieldMove.md +22 -0
  42. data/docs/TemplateFields.md +22 -0
  43. data/docs/TemplatePageImages.md +24 -0
  44. data/docs/UpdateTemplateDocumentRequest.md +6 -2
  45. data/docs/UpdateTemplateFieldsRequest.md +18 -0
  46. data/docs/UpdateTemplateRequest.md +6 -0
  47. data/docs/ValidateSubmissionRequest.md +38 -0
  48. data/lib/docspring/api/client.rb +666 -18
  49. data/lib/docspring/api_client.rb +1 -1
  50. data/lib/docspring/models/add_template_fields_request.rb +187 -0
  51. data/lib/docspring/models/create_submission_batch_request.rb +23 -1
  52. data/lib/docspring/models/create_submission_request.rb +23 -1
  53. data/lib/docspring/models/create_template_request.rb +48 -3
  54. data/lib/docspring/models/field.rb +2217 -0
  55. data/lib/docspring/models/field_dependency.rb +246 -0
  56. data/lib/docspring/models/field_dependency_input.rb +246 -0
  57. data/lib/docspring/models/field_group.rb +368 -0
  58. data/lib/docspring/models/field_group_input.rb +247 -0
  59. data/lib/docspring/models/field_group_type.rb +41 -0
  60. data/lib/docspring/models/field_input.rb +1109 -0
  61. data/lib/docspring/models/field_type.rb +54 -0
  62. data/lib/docspring/models/generate_files_format.rb +40 -0
  63. data/lib/docspring/models/generate_submission_files_request.rb +187 -0
  64. data/lib/docspring/models/output_format.rb +41 -0
  65. data/lib/docspring/models/page_image.rb +359 -0
  66. data/lib/docspring/models/page_images.rb +248 -0
  67. data/lib/docspring/models/predefined_field.rb +287 -0
  68. data/lib/docspring/models/predefined_field_input.rb +287 -0
  69. data/lib/docspring/models/remove_template_fields_request.rb +187 -0
  70. data/lib/docspring/models/reorder_template_fields_request.rb +187 -0
  71. data/lib/docspring/models/submission.rb +31 -2
  72. data/lib/docspring/models/submission_files.rb +13 -4
  73. data/lib/docspring/models/submission_input.rb +23 -1
  74. data/lib/docspring/models/submission_validation.rb +234 -0
  75. data/lib/docspring/models/template.rb +74 -1
  76. data/lib/docspring/models/template_diff.rb +321 -0
  77. data/lib/docspring/models/template_diff_summary.rb +320 -0
  78. data/lib/docspring/models/template_document.rb +3 -3
  79. data/lib/docspring/models/template_document_state.rb +3 -1
  80. data/lib/docspring/models/template_field_change.rb +266 -0
  81. data/lib/docspring/models/template_field_changes.rb +274 -0
  82. data/lib/docspring/models/template_field_dependency.rb +1 -1
  83. data/lib/docspring/models/template_field_dependency_input.rb +1 -1
  84. data/lib/docspring/models/template_field_move.rb +239 -0
  85. data/lib/docspring/models/template_fields.rb +227 -0
  86. data/lib/docspring/models/template_page_images.rb +254 -0
  87. data/lib/docspring/models/update_template_document_request.rb +23 -20
  88. data/lib/docspring/models/update_template_fields_request.rb +187 -0
  89. data/lib/docspring/models/update_template_request.rb +38 -1
  90. data/lib/docspring/models/validate_submission_request.rb +288 -0
  91. data/lib/docspring/request_schemas.json +3364 -1584
  92. data/lib/docspring/version.rb +1 -1
  93. data/lib/docspring.rb +28 -0
  94. data/spec/api/client_spec.rb +128 -9
  95. data/spec/models/add_template_fields_request_spec.rb +36 -0
  96. data/spec/models/create_submission_batch_request_spec.rb +6 -0
  97. data/spec/models/create_submission_request_spec.rb +6 -0
  98. data/spec/models/create_template_request_spec.rb +24 -0
  99. data/spec/models/field_dependency_input_spec.rb +48 -0
  100. data/spec/models/field_dependency_spec.rb +48 -0
  101. data/spec/models/field_group_input_spec.rb +72 -0
  102. data/spec/models/field_group_spec.rb +78 -0
  103. data/spec/models/field_group_type_spec.rb +30 -0
  104. data/spec/models/field_input_spec.rb +570 -0
  105. data/spec/models/field_spec.rb +576 -0
  106. data/spec/models/field_type_spec.rb +30 -0
  107. data/spec/models/generate_files_format_spec.rb +30 -0
  108. data/spec/models/generate_submission_files_request_spec.rb +36 -0
  109. data/spec/models/output_format_spec.rb +30 -0
  110. data/spec/models/page_image_spec.rb +84 -0
  111. data/spec/models/page_images_spec.rb +54 -0
  112. data/spec/models/predefined_field_input_spec.rb +72 -0
  113. data/spec/models/predefined_field_spec.rb +72 -0
  114. data/spec/models/remove_template_fields_request_spec.rb +36 -0
  115. data/spec/models/reorder_template_fields_request_spec.rb +36 -0
  116. data/spec/models/submission_files_spec.rb +6 -0
  117. data/spec/models/submission_input_spec.rb +6 -0
  118. data/spec/models/submission_spec.rb +6 -0
  119. data/spec/models/submission_validation_spec.rb +54 -0
  120. data/spec/models/template_diff_spec.rb +72 -0
  121. data/spec/models/template_diff_summary_spec.rb +66 -0
  122. data/spec/models/template_field_change_spec.rb +54 -0
  123. data/spec/models/template_field_changes_spec.rb +54 -0
  124. data/spec/models/template_field_move_spec.rb +48 -0
  125. data/spec/models/template_fields_spec.rb +48 -0
  126. data/spec/models/template_page_images_spec.rb +54 -0
  127. data/spec/models/template_spec.rb +18 -0
  128. data/spec/models/update_template_document_request_spec.rb +12 -0
  129. data/spec/models/update_template_fields_request_spec.rb +36 -0
  130. data/spec/models/update_template_request_spec.rb +18 -0
  131. data/spec/models/validate_submission_request_spec.rb +96 -0
  132. metadata +113 -1
@@ -8,6 +8,7 @@
8
8
  | **template_id** | **String** | The template for each submission that doesn't name its own `template_id`. | [optional] |
9
9
  | **template_version** | **String** | The template version to use: a published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `latest` (the draft when no version has been published). | [optional] |
10
10
  | **test** | **Boolean** | The default `test` for each submission that doesn't set its own. | [optional] |
11
+ | **output_formats** | [**Array<OutputFormat>**](OutputFormat.md) | The default `output_formats` for each submission that doesn't set its own. | [optional] |
11
12
  | **submissions** | [**Array<SubmissionInput>**](SubmissionInput.md) | Up to 50 submissions. Each one takes the properties of POST /templates/{template_id}/submissions except `signature_requests`, plus `template_id` and `template_version` when it uses a different template from the batch. | |
12
13
 
13
14
  ## Example
@@ -20,6 +21,7 @@ instance = DocSpring::CreateSubmissionBatchRequest.new(
20
21
  template_id: null,
21
22
  template_version: null,
22
23
  test: null,
24
+ output_formats: null,
23
25
  submissions: null
24
26
  )
25
27
  ```
@@ -9,6 +9,7 @@
9
9
  | **data** | **Hash<String, Object>** | The values of the template's fields, by field name. Required for a PDF template, unless `signature_requests` collects the values. | [optional] |
10
10
  | **metadata** | **Hash<String, Object>** | Your own data about the submission, such as an ID from your app. It isn't printed on the PDF. | [optional] |
11
11
  | **password** | **String** | A password that the PDF needs to be opened with. It's never returned; `has_password` says if it's set. | [optional] |
12
+ | **output_formats** | [**Array<OutputFormat>**](OutputFormat.md) | What the submission makes: `pdf`, and `png` (an image of each page of the PDF, up to 100 pages) when you ask for it. Default `["pdf"]`. POST /submissions/{submission_id}/generate_files adds `png` to a processed submission. | [optional] |
12
13
  | **expires_in** | **Integer** | Seconds after the PDF is generated until the submission expires, up to 10 years (315360000). Default the template's expiration setting. A submission that isn't processed, such as one with invalid data, is kept for at least 48 hours. | [optional] |
13
14
  | **field_overrides** | [**Hash<String, FieldOverride>**](FieldOverride.md) | Changes to field settings for this submission only, by field name, such as `{"name": {"required": false, "font_size": 9}}`. A setting that identifies the field (`id`, `name`, `type`), that only the template sets (such as `description`), or that doesn't apply to the field's type and display type (such as `check_character` on a field displayed as text) is a 422. With `signature_requests`, `editable: true` is a 422, and a `default` for a signature or initials field makes the submission `invalid_data`. | [optional] |
14
15
  | **html** | **String** | For an HTML template, HTML to use instead of the template's. | [optional] |
@@ -26,6 +27,7 @@ instance = DocSpring::CreateSubmissionRequest.new(
26
27
  data: null,
27
28
  metadata: null,
28
29
  password: null,
30
+ output_formats: null,
29
31
  expires_in: null,
30
32
  field_overrides: null,
31
33
  html: null,
@@ -32,13 +32,17 @@
32
32
  | **slack_webhook_url** | **String** | A Slack incoming webhook URL that is notified about the template's submissions. It's never returned; `has_slack_webhook_url` says if it's set. | [optional] |
33
33
  | **defaults** | [**TemplateDefaultsInput**](TemplateDefaultsInput.md) | The default style of the template's fields. Setting it replaces the whole object. | [optional] |
34
34
  | **field_dependencies** | [**Array<TemplateFieldDependencyInput>**](TemplateFieldDependencyInput.md) | The template's conditional logic rules. Setting them replaces all of the rules. | [optional] |
35
+ | **predefined_fields** | [**Array<PredefinedFieldInput>**](PredefinedFieldInput.md) | The field names that people using the embedded template editor choose from, each with the data type and settings a field gets when it's given that name. Setting it replaces the whole list; an empty list turns them off. | [optional] |
36
+ | **predefined_fields_sample_data** | **Hash<String, Object>** | Sample submission data that sets `predefined_fields`: each value becomes a predefined field, with a type that fits it (`string`, `number`, `boolean`, `date`, `email` or `url`) and `required_in_template` true. Nested objects and arrays become names with `/`, such as `customer/email`. Without `predefined_fields` in the same request, it replaces them; with them, it adds to them and sets the types of the ones it has values for. | [optional] |
35
37
  | **html** | **String** | The HTML of an HTML template, as a Liquid template. Null for PDF templates. | [optional] |
36
38
  | **scss** | **String** | The SCSS of an HTML template. | [optional] |
37
39
  | **header_html** | **String** | The HTML printed at the top of each page of an HTML template. | [optional] |
38
40
  | **footer_html** | **String** | The HTML printed at the bottom of each page of an HTML template. | [optional] |
39
41
  | **html_engine_options** | [**HtmlEngineOptionsInput**](HtmlEngineOptionsInput.md) | Null resets the options to their defaults. | [optional] |
40
- | **cache_id** | **String** | A PDF template's document: the `fields.key` of a file you uploaded with the presigned upload (GET /uploads/presign). Required for a PDF template. To upload the PDF with the request, use POST /templates/upload. | [optional] |
41
- | **filename** | **String** | The PDF's file name, for a `cache_id` (presigned uploads don't send one). | [optional] |
42
+ | **cache_id** | **String** | A PDF template's document: the `fields.key` of a file you uploaded with the presigned upload (GET /uploads/presign). A PDF template needs one of `cache_id`, `document_url` and `document_base64`. To upload the PDF with the request, use POST /templates/upload. | [optional] |
43
+ | **document_url** | **String** | An https:// link to the template's PDF (up to 100 MB), instead of `cache_id`. DocSpring downloads it after responding, following redirects to other https:// links: the template's `document.state` is `downloading` until then (sync.api hosts wait for it). If it can't be downloaded, the state is `download_failed` and `document.error_message` says why. | [optional] |
44
+ | **document_base64** | **String** | The template's PDF, encoded as base64 (a `data:` URI works too), instead of `cache_id`. Up to 7 MB before it's encoded: send a larger file with `cache_id` or `document_url`. | [optional] |
45
+ | **filename** | **String** | The PDF's file name, for a `cache_id` (presigned uploads don't send one) or `document_base64`. A `document_url`'s is the last part of its path unless you set it. | [optional] |
42
46
  | **detect_fields** | **Boolean** | Set up the PDF's fields as DocSpring's "Automatically detect fields" upload option does: import or detect the fields, name them with AI, and set up conditional logic. `field_source`, `field_naming` and `field_logic` choose how. Default false. `document.page_processing_statuses` and `document.field_logic_status` show how it's going, and `document.state` becomes `processed` once every page's fields are set up. | [optional] |
43
47
  | **field_source** | [**FieldSetupSource**](FieldSetupSource.md) | With `detect_fields`, where the fields come from. `auto` (the default) imports the form fields of a fillable PDF and detects the fields of a PDF without them; `pdf_detection` detects the fields from the page layout, even on a fillable PDF; `pdf_form_fields` only imports the PDF's form fields. | [optional] |
44
48
  | **field_naming** | [**FieldSetupNaming**](FieldSetupNaming.md) | With `detect_fields`, how the fields are named. `ai` (the default) names them and sets their types and settings with AI; `preserve` keeps the names of the PDF's form fields, and AI only names the fields it detected. `preserve` needs `field_source` `auto` or `pdf_form_fields`. | [optional] |
@@ -78,12 +82,16 @@ instance = DocSpring::CreateTemplateRequest.new(
78
82
  slack_webhook_url: null,
79
83
  defaults: null,
80
84
  field_dependencies: null,
85
+ predefined_fields: null,
86
+ predefined_fields_sample_data: null,
81
87
  html: null,
82
88
  scss: null,
83
89
  header_html: null,
84
90
  footer_html: null,
85
91
  html_engine_options: null,
86
92
  cache_id: null,
93
+ document_url: null,
94
+ document_base64: null,
87
95
  filename: null,
88
96
  detect_fields: null,
89
97
  field_source: null,
data/docs/Field.md ADDED
@@ -0,0 +1,198 @@
1
+ # DocSpring::Field
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **Integer** | The field's ID, an integer that's unique within the template. | |
8
+ | **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`. | |
9
+ | **page** | **Integer** | 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. | |
10
+ | **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. | |
11
+ | **type** | [**FieldType**](FieldType.md) | 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`. | |
12
+ | **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`. | |
13
+ | **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`. | |
14
+ | **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`. | |
15
+ | **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`. | |
16
+ | **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`. | |
17
+ | **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`. | |
18
+ | **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`. | |
19
+ | **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`. | |
20
+ | **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`. | |
21
+ | **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`. | |
22
+ | **combined_field_type** | [**CombinedFieldType**](CombinedFieldType.md) | 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`. | |
23
+ | **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`. | |
24
+ | **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`. | |
25
+ | **integer** | **Boolean** | Number fields only: the value must be a whole number. Shared by every field with the same `name`. | |
26
+ | **minimum** | **Float** | Number fields only: the smallest value allowed. Shared by every field with the same `name`. | |
27
+ | **maximum** | **Float** | Number fields only: the largest value allowed. Shared by every field with the same `name`. | |
28
+ | **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`. | |
29
+ | **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`. | |
30
+ | **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`. | |
31
+ | **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`. | |
32
+ | **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`. | |
33
+ | **barcode_symbology** | [**BarcodeSymbology**](BarcodeSymbology.md) | 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`. | |
34
+ | **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. | |
35
+ | **x** | **Float** | 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). | |
36
+ | **y** | **Float** | 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. | |
37
+ | **width** | **Float** | The field's width, in the units of `x`. A check mark is sized to the field's width. | |
38
+ | **height** | **Float** | 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`. | |
39
+ | **rotation** | **Float** | Rotates the field clockwise by this many degrees, from -360 to 360 (negative turns it counterclockwise). | |
40
+ | **display_type** | [**FieldDisplayType**](FieldDisplayType.md) | 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. | |
41
+ | **opacity** | **Float** | The opacity of the field's content and background, from 0 (invisible) to 1. QR codes and barcodes always print at full opacity. | |
42
+ | **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`. | |
43
+ | **typeface** | [**Typeface**](Typeface.md) | 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. | |
44
+ | **font_size** | **Integer** | Text display only: the font size in points. Empty uses the template's default font size. | |
45
+ | **character_spacing** | **Float** | Text display only: extra space between characters, in points. Empty uses the template's default. | |
46
+ | **bold** | **Boolean** | Text display only: prints the text in bold. | |
47
+ | **uppercase** | **Boolean** | Text display only: prints the text in capital letters. | |
48
+ | **strikethrough** | **Boolean** | Text display only: draws a line through the text. | |
49
+ | **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. | |
50
+ | **overflow** | [**TextOverflow**](TextOverflow.md) | 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`. | |
51
+ | **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. | |
52
+ | **multiline_lines** | **Integer** | 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. | |
53
+ | **min_length** | **Float** | 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`. | |
54
+ | **max_length** | **Integer** | 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`. | |
55
+ | **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. | |
56
+ | **color** | **String** | Text display only: the text color, as a hex code such as `444444`. Empty uses the template's default text color. | |
57
+ | **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. | |
58
+ | **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. | |
59
+ | **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. | |
60
+ | **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. | |
61
+ | **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. | |
62
+ | **alignment** | [**TextAlignment**](TextAlignment.md) | 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). | |
63
+ | **v_alignment** | [**TextVerticalAlignment**](TextVerticalAlignment.md) | Text display only: how the text is aligned vertically in the field: `bottom`, `center` or `top`. | |
64
+ | **comb** | **Boolean** | Text display only: splits the field into `comb_number_of_cells` boxes of equal width and prints one character, centered, in each. | |
65
+ | **comb_number_of_cells** | **Integer** | 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`. | |
66
+ | **comb_value_offset** | **Integer** | 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. | |
67
+ | **shape_type** | [**ShapeType**](ShapeType.md) | Shape display only: `square`, `rectangle`, `circle`, `ellipse`, `triangle` or `polygon`. A square or circle uses the smaller of `width` and `height`. | |
68
+ | **shape_sides** | **Integer** | Shape display only, with `shape_type` `polygon`: the number of sides, 3 to 12. | |
69
+ | **shape_border_width** | **Integer** | Shape display only: the width of the shape's border, in points. | |
70
+ | **shape_border_color** | **String** | Shape display only: the shape's border color, as a hex code. Null draws no border. | |
71
+ | **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. | |
72
+ | **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. | |
73
+ | **shape_fill_color** | **String** | Shape display only: the color that fills the shape, as a hex code. Null leaves it unfilled. | |
74
+ | **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. | |
75
+ | **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. | |
76
+ | **check_character** | [**CheckCharacter**](CheckCharacter.md) | Check display only: the character printed, as an HTML entity: `✓` (✓), `✔` (✔, the default), `✖` (✖), `✗` (✗) or `✘` (✘). | |
77
+ | **check_color** | **String** | Check display only: the check mark's color, as a hex code. Empty uses the template's default check color. | |
78
+ | **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. | |
79
+ | **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. | |
80
+ | **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. | |
81
+ | **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. | |
82
+ | **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. | |
83
+ | **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. | |
84
+ | **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. | |
85
+ | **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. | |
86
+ | **string_condition_type** | [**StringConditionType**](StringConditionType.md) | 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. | |
87
+ | **number_condition_type** | [**NumberConditionType**](NumberConditionType.md) | 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`. | |
88
+ | **number_condition_range_min** | **Float** | With `number_condition_type` `range`: the lower end of the range, included unless `number_condition_range_exclusive_min` is set. | |
89
+ | **number_condition_range_max** | **Float** | With `number_condition_type` `range`: the upper end of the range, included unless `number_condition_range_exclusive_max` is set. | |
90
+ | **number_condition_range_exclusive_min** | **Boolean** | With `number_condition_type` `range`: leaves `number_condition_range_min` itself out of the range. | |
91
+ | **number_condition_range_exclusive_max** | **Boolean** | With `number_condition_type` `range`: leaves `number_condition_range_max` itself out of the range. | |
92
+ | **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`. | |
93
+ | **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. | |
94
+ | **decimal_places** | **Integer** | 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. | |
95
+ | **image_scale_type** | [**ImageScaleType**](ImageScaleType.md) | 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. | |
96
+ | **image_gravity** | [**ImageGravity**](ImageGravity.md) | 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`. | |
97
+ | **dependencies** | [**FieldDependency**](FieldDependency.md) | 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`. | |
98
+
99
+ ## Example
100
+
101
+ ```ruby
102
+ require 'docspring'
103
+
104
+ instance = DocSpring::Field.new(
105
+ id: null,
106
+ name: null,
107
+ page: null,
108
+ acroform_name: null,
109
+ type: null,
110
+ static: null,
111
+ editable: null,
112
+ default: null,
113
+ title: null,
114
+ description: null,
115
+ placeholder: null,
116
+ metadata: null,
117
+ required: null,
118
+ option_list: null,
119
+ combined_field_names: null,
120
+ combined_field_type: null,
121
+ combined_field_separator: null,
122
+ combined_field_format: null,
123
+ integer: null,
124
+ minimum: null,
125
+ maximum: null,
126
+ exclusive_minimum: null,
127
+ exclusive_maximum: null,
128
+ include_time: null,
129
+ signature_allow_draw: null,
130
+ signature_allow_type: null,
131
+ barcode_symbology: null,
132
+ hidden: null,
133
+ x: null,
134
+ y: null,
135
+ width: null,
136
+ height: null,
137
+ rotation: null,
138
+ display_type: null,
139
+ opacity: null,
140
+ date_time_format: null,
141
+ typeface: null,
142
+ font_size: null,
143
+ character_spacing: null,
144
+ bold: null,
145
+ uppercase: null,
146
+ strikethrough: null,
147
+ keep_leading_spaces: null,
148
+ overflow: null,
149
+ multiline: null,
150
+ multiline_lines: null,
151
+ min_length: null,
152
+ max_length: null,
153
+ auto_calculate_max_length: null,
154
+ color: null,
155
+ color_field_name: null,
156
+ color_field_required: null,
157
+ background_color: null,
158
+ background_color_field_name: null,
159
+ background_color_field_required: null,
160
+ alignment: null,
161
+ v_alignment: null,
162
+ comb: null,
163
+ comb_number_of_cells: null,
164
+ comb_value_offset: null,
165
+ shape_type: null,
166
+ shape_sides: null,
167
+ shape_border_width: null,
168
+ shape_border_color: null,
169
+ shape_border_color_field_name: null,
170
+ shape_border_color_field_required: null,
171
+ shape_fill_color: null,
172
+ shape_fill_color_field_name: null,
173
+ shape_fill_color_field_required: null,
174
+ check_character: null,
175
+ check_color: null,
176
+ check_color_field_name: null,
177
+ check_color_field_required: null,
178
+ qrcode_color: null,
179
+ qrcode_color_field_name: null,
180
+ qrcode_color_field_required: null,
181
+ true_text: null,
182
+ false_text: null,
183
+ condition: null,
184
+ string_condition_type: null,
185
+ number_condition_type: null,
186
+ number_condition_range_min: null,
187
+ number_condition_range_max: null,
188
+ number_condition_range_exclusive_min: null,
189
+ number_condition_range_exclusive_max: null,
190
+ invert_boolean_condition: null,
191
+ currency: null,
192
+ decimal_places: null,
193
+ image_scale_type: null,
194
+ image_gravity: null,
195
+ dependencies: null
196
+ )
197
+ ```
198
+
@@ -0,0 +1,22 @@
1
+ # DocSpring::FieldDependency
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **action** | [**TemplateFieldDependencyAction**](TemplateFieldDependencyAction.md) | What the rule does to the fields it applies to when its conditions are met. | |
8
+ | **match** | [**TemplateFieldDependencyMatch**](TemplateFieldDependencyMatch.md) | Whether all of the conditions (the default) or any of them must be met. | [optional] |
9
+ | **conditions** | [**Array<TemplateFieldDependencyCondition>**](TemplateFieldDependencyCondition.md) | The conditions on other fields' values. | |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'docspring'
15
+
16
+ instance = DocSpring::FieldDependency.new(
17
+ action: null,
18
+ match: null,
19
+ conditions: null
20
+ )
21
+ ```
22
+
@@ -0,0 +1,22 @@
1
+ # DocSpring::FieldDependencyInput
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **action** | [**TemplateFieldDependencyAction**](TemplateFieldDependencyAction.md) | What the rule does to the fields it applies to when its conditions are met. | |
8
+ | **match** | [**TemplateFieldDependencyMatch**](TemplateFieldDependencyMatch.md) | Whether all of the conditions (the default) or any of them must be met. | [optional] |
9
+ | **conditions** | [**Array<TemplateFieldDependencyConditionInput>**](TemplateFieldDependencyConditionInput.md) | The conditions on other fields' values. | |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'docspring'
15
+
16
+ instance = DocSpring::FieldDependencyInput.new(
17
+ action: null,
18
+ match: null,
19
+ conditions: null
20
+ )
21
+ ```
22
+
@@ -0,0 +1,32 @@
1
+ # DocSpring::FieldGroup
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **name** | **String** | The group's name: `address` for the field `address/city`. A list's item numbers are written as `~`, so the fields `items/0/price` and `items/1/price` are in the groups `items` and `items/~`, the list's items. | |
8
+ | **type** | [**FieldGroupType**](FieldGroupType.md) | `array` for a list, whose fields' names number its items after the group's name (`items/0/price`, or `items/~/price` in an HTML template), and `object` for the other groups. | |
9
+ | **title** | **String** | The group's title in the template's data schema and on forms. When it's empty, a title is made from the group's name. | |
10
+ | **description** | **String** | Help text for the group, added to the template's data schema and shown on forms. | |
11
+ | **metadata** | **String** | Text for your own use, added to the template's data schema as `x-metadata`. DocSpring doesn't use it. | |
12
+ | **min_items** | **Integer** | Lists only (`type` `array`): the fewest items submission data must have. Null for no minimum. | |
13
+ | **max_items** | **Integer** | HTML templates' lists only: the most items submission data can have. Null for no limit. A PDF template's list takes as many items as its fields are numbered for, or more with `allow_additional_items`. | |
14
+ | **allow_additional_items** | **Boolean** | PDF templates' lists only: submission data can have more items than the list's fields are numbered for. Default false. | |
15
+
16
+ ## Example
17
+
18
+ ```ruby
19
+ require 'docspring'
20
+
21
+ instance = DocSpring::FieldGroup.new(
22
+ name: null,
23
+ type: null,
24
+ title: null,
25
+ description: null,
26
+ metadata: null,
27
+ min_items: null,
28
+ max_items: null,
29
+ allow_additional_items: null
30
+ )
31
+ ```
32
+
@@ -0,0 +1,30 @@
1
+ # DocSpring::FieldGroupInput
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **name** | **String** | The group's name: `address` for the field `address/city`. A list's item numbers are written as `~`, so the fields `items/0/price` and `items/1/price` are in the groups `items` and `items/~`, the list's items. | |
8
+ | **title** | **String** | The group's title in the template's data schema and on forms. When it's empty, a title is made from the group's name. | [optional] |
9
+ | **description** | **String** | Help text for the group, added to the template's data schema and shown on forms. | [optional] |
10
+ | **metadata** | **String** | Text for your own use, added to the template's data schema as `x-metadata`. DocSpring doesn't use it. | [optional] |
11
+ | **min_items** | **Integer** | Lists only (`type` `array`): the fewest items submission data must have. Null for no minimum. | [optional] |
12
+ | **max_items** | **Integer** | HTML templates' lists only: the most items submission data can have. Null for no limit. A PDF template's list takes as many items as its fields are numbered for, or more with `allow_additional_items`. | [optional] |
13
+ | **allow_additional_items** | **Boolean** | PDF templates' lists only: submission data can have more items than the list's fields are numbered for. Default false. | [optional] |
14
+
15
+ ## Example
16
+
17
+ ```ruby
18
+ require 'docspring'
19
+
20
+ instance = DocSpring::FieldGroupInput.new(
21
+ name: null,
22
+ title: null,
23
+ description: null,
24
+ metadata: null,
25
+ min_items: null,
26
+ max_items: null,
27
+ allow_additional_items: null
28
+ )
29
+ ```
30
+
@@ -0,0 +1,15 @@
1
+ # DocSpring::FieldGroupType
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+
8
+ ## Example
9
+
10
+ ```ruby
11
+ require 'docspring'
12
+
13
+ instance = DocSpring::FieldGroupType.new()
14
+ ```
15
+