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.
- checksums.yaml +4 -4
- data/.openapi-generator/FILES +84 -0
- data/.travis.yml +1 -1
- data/CHANGELOG.md +24 -0
- data/Gemfile.lock +2 -2
- data/README.md +10 -1
- data/docs/AddTemplateFieldsRequest.md +18 -0
- data/docs/Client.md +704 -33
- data/docs/CreateSubmissionBatchRequest.md +2 -0
- data/docs/CreateSubmissionRequest.md +2 -0
- data/docs/CreateTemplateRequest.md +10 -2
- data/docs/Field.md +198 -0
- data/docs/FieldDependency.md +22 -0
- data/docs/FieldDependencyInput.md +22 -0
- data/docs/FieldGroup.md +32 -0
- data/docs/FieldGroupInput.md +30 -0
- data/docs/FieldGroupType.md +15 -0
- data/docs/FieldInput.md +196 -0
- data/docs/FieldType.md +15 -0
- data/docs/GenerateFilesFormat.md +15 -0
- data/docs/GenerateSubmissionFilesRequest.md +18 -0
- data/docs/OutputFormat.md +15 -0
- data/docs/PageImage.md +34 -0
- data/docs/PageImages.md +24 -0
- data/docs/PredefinedField.md +30 -0
- data/docs/PredefinedFieldInput.md +30 -0
- data/docs/RemoveTemplateFieldsRequest.md +18 -0
- data/docs/ReorderTemplateFieldsRequest.md +18 -0
- data/docs/Submission.md +3 -1
- data/docs/SubmissionFiles.md +3 -1
- data/docs/SubmissionInput.md +2 -0
- data/docs/SubmissionValidation.md +24 -0
- data/docs/Template.md +6 -0
- data/docs/TemplateDiff.md +30 -0
- data/docs/TemplateDiffSummary.md +28 -0
- data/docs/TemplateDocument.md +3 -3
- data/docs/TemplateFieldChange.md +24 -0
- data/docs/TemplateFieldChanges.md +24 -0
- data/docs/TemplateFieldDependency.md +1 -1
- data/docs/TemplateFieldDependencyInput.md +1 -1
- data/docs/TemplateFieldMove.md +22 -0
- data/docs/TemplateFields.md +22 -0
- data/docs/TemplatePageImages.md +24 -0
- data/docs/UpdateTemplateDocumentRequest.md +6 -2
- data/docs/UpdateTemplateFieldsRequest.md +18 -0
- data/docs/UpdateTemplateRequest.md +6 -0
- data/docs/ValidateSubmissionRequest.md +38 -0
- data/lib/docspring/api/client.rb +666 -18
- data/lib/docspring/api_client.rb +1 -1
- data/lib/docspring/models/add_template_fields_request.rb +187 -0
- data/lib/docspring/models/create_submission_batch_request.rb +23 -1
- data/lib/docspring/models/create_submission_request.rb +23 -1
- data/lib/docspring/models/create_template_request.rb +48 -3
- data/lib/docspring/models/field.rb +2217 -0
- data/lib/docspring/models/field_dependency.rb +246 -0
- data/lib/docspring/models/field_dependency_input.rb +246 -0
- data/lib/docspring/models/field_group.rb +368 -0
- data/lib/docspring/models/field_group_input.rb +247 -0
- data/lib/docspring/models/field_group_type.rb +41 -0
- data/lib/docspring/models/field_input.rb +1109 -0
- data/lib/docspring/models/field_type.rb +54 -0
- data/lib/docspring/models/generate_files_format.rb +40 -0
- data/lib/docspring/models/generate_submission_files_request.rb +187 -0
- data/lib/docspring/models/output_format.rb +41 -0
- data/lib/docspring/models/page_image.rb +359 -0
- data/lib/docspring/models/page_images.rb +248 -0
- data/lib/docspring/models/predefined_field.rb +287 -0
- data/lib/docspring/models/predefined_field_input.rb +287 -0
- data/lib/docspring/models/remove_template_fields_request.rb +187 -0
- data/lib/docspring/models/reorder_template_fields_request.rb +187 -0
- data/lib/docspring/models/submission.rb +31 -2
- data/lib/docspring/models/submission_files.rb +13 -4
- data/lib/docspring/models/submission_input.rb +23 -1
- data/lib/docspring/models/submission_validation.rb +234 -0
- data/lib/docspring/models/template.rb +74 -1
- data/lib/docspring/models/template_diff.rb +321 -0
- data/lib/docspring/models/template_diff_summary.rb +320 -0
- data/lib/docspring/models/template_document.rb +3 -3
- data/lib/docspring/models/template_document_state.rb +3 -1
- data/lib/docspring/models/template_field_change.rb +266 -0
- data/lib/docspring/models/template_field_changes.rb +274 -0
- data/lib/docspring/models/template_field_dependency.rb +1 -1
- data/lib/docspring/models/template_field_dependency_input.rb +1 -1
- data/lib/docspring/models/template_field_move.rb +239 -0
- data/lib/docspring/models/template_fields.rb +227 -0
- data/lib/docspring/models/template_page_images.rb +254 -0
- data/lib/docspring/models/update_template_document_request.rb +23 -20
- data/lib/docspring/models/update_template_fields_request.rb +187 -0
- data/lib/docspring/models/update_template_request.rb +38 -1
- data/lib/docspring/models/validate_submission_request.rb +288 -0
- data/lib/docspring/request_schemas.json +3364 -1584
- data/lib/docspring/version.rb +1 -1
- data/lib/docspring.rb +28 -0
- data/spec/api/client_spec.rb +128 -9
- data/spec/models/add_template_fields_request_spec.rb +36 -0
- data/spec/models/create_submission_batch_request_spec.rb +6 -0
- data/spec/models/create_submission_request_spec.rb +6 -0
- data/spec/models/create_template_request_spec.rb +24 -0
- data/spec/models/field_dependency_input_spec.rb +48 -0
- data/spec/models/field_dependency_spec.rb +48 -0
- data/spec/models/field_group_input_spec.rb +72 -0
- data/spec/models/field_group_spec.rb +78 -0
- data/spec/models/field_group_type_spec.rb +30 -0
- data/spec/models/field_input_spec.rb +570 -0
- data/spec/models/field_spec.rb +576 -0
- data/spec/models/field_type_spec.rb +30 -0
- data/spec/models/generate_files_format_spec.rb +30 -0
- data/spec/models/generate_submission_files_request_spec.rb +36 -0
- data/spec/models/output_format_spec.rb +30 -0
- data/spec/models/page_image_spec.rb +84 -0
- data/spec/models/page_images_spec.rb +54 -0
- data/spec/models/predefined_field_input_spec.rb +72 -0
- data/spec/models/predefined_field_spec.rb +72 -0
- data/spec/models/remove_template_fields_request_spec.rb +36 -0
- data/spec/models/reorder_template_fields_request_spec.rb +36 -0
- data/spec/models/submission_files_spec.rb +6 -0
- data/spec/models/submission_input_spec.rb +6 -0
- data/spec/models/submission_spec.rb +6 -0
- data/spec/models/submission_validation_spec.rb +54 -0
- data/spec/models/template_diff_spec.rb +72 -0
- data/spec/models/template_diff_summary_spec.rb +66 -0
- data/spec/models/template_field_change_spec.rb +54 -0
- data/spec/models/template_field_changes_spec.rb +54 -0
- data/spec/models/template_field_move_spec.rb +48 -0
- data/spec/models/template_fields_spec.rb +48 -0
- data/spec/models/template_page_images_spec.rb +54 -0
- data/spec/models/template_spec.rb +18 -0
- data/spec/models/update_template_document_request_spec.rb +12 -0
- data/spec/models/update_template_fields_request_spec.rb +36 -0
- data/spec/models/update_template_request_spec.rb +18 -0
- data/spec/models/validate_submission_request_spec.rb +96 -0
- metadata +113 -1
data/docs/FieldInput.md
ADDED
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
# DocSpring::FieldInput
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **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`. | [optional] |
|
|
8
|
+
| **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. | [optional] |
|
|
9
|
+
| **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`. | [optional] |
|
|
10
|
+
| **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`. | [optional] |
|
|
11
|
+
| **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`. | [optional] |
|
|
12
|
+
| **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`. | [optional] |
|
|
13
|
+
| **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`. | [optional] |
|
|
14
|
+
| **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`. | [optional] |
|
|
15
|
+
| **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`. | [optional] |
|
|
16
|
+
| **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`. | [optional] |
|
|
17
|
+
| **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`. | [optional] |
|
|
18
|
+
| **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`. | [optional] |
|
|
19
|
+
| **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`. | [optional] |
|
|
20
|
+
| **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`. | [optional] |
|
|
21
|
+
| **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`. | [optional] |
|
|
22
|
+
| **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`. | [optional] |
|
|
23
|
+
| **integer** | **Boolean** | Number fields only: the value must be a whole number. Shared by every field with the same `name`. | [optional] |
|
|
24
|
+
| **minimum** | **Float** | Number fields only: the smallest value allowed. Shared by every field with the same `name`. | [optional] |
|
|
25
|
+
| **maximum** | **Float** | Number fields only: the largest value allowed. Shared by every field with the same `name`. | [optional] |
|
|
26
|
+
| **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`. | [optional] |
|
|
27
|
+
| **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`. | [optional] |
|
|
28
|
+
| **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`. | [optional] |
|
|
29
|
+
| **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`. | [optional] |
|
|
30
|
+
| **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`. | [optional] |
|
|
31
|
+
| **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`. | [optional] |
|
|
32
|
+
| **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. | [optional] |
|
|
33
|
+
| **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). | [optional] |
|
|
34
|
+
| **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. | [optional] |
|
|
35
|
+
| **width** | **Float** | The field's width, in the units of `x`. A check mark is sized to the field's width. | [optional] |
|
|
36
|
+
| **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`. | [optional] |
|
|
37
|
+
| **rotation** | **Float** | Rotates the field clockwise by this many degrees, from -360 to 360 (negative turns it counterclockwise). | [optional] |
|
|
38
|
+
| **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. | [optional] |
|
|
39
|
+
| **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. | [optional] |
|
|
40
|
+
| **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`. | [optional] |
|
|
41
|
+
| **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. | [optional] |
|
|
42
|
+
| **font_size** | **Integer** | Text display only: the font size in points. Empty uses the template's default font size. | [optional] |
|
|
43
|
+
| **character_spacing** | **Float** | Text display only: extra space between characters, in points. Empty uses the template's default. | [optional] |
|
|
44
|
+
| **bold** | **Boolean** | Text display only: prints the text in bold. | [optional] |
|
|
45
|
+
| **uppercase** | **Boolean** | Text display only: prints the text in capital letters. | [optional] |
|
|
46
|
+
| **strikethrough** | **Boolean** | Text display only: draws a line through the text. | [optional] |
|
|
47
|
+
| **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. | [optional] |
|
|
48
|
+
| **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`. | [optional] |
|
|
49
|
+
| **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. | [optional] |
|
|
50
|
+
| **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. | [optional] |
|
|
51
|
+
| **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`. | [optional] |
|
|
52
|
+
| **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`. | [optional] |
|
|
53
|
+
| **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. | [optional] |
|
|
54
|
+
| **color** | **String** | Text display only: the text color, as a hex code such as `444444`. Empty uses the template's default text color. | [optional] |
|
|
55
|
+
| **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. | [optional] |
|
|
56
|
+
| **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. | [optional] |
|
|
57
|
+
| **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. | [optional] |
|
|
58
|
+
| **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. | [optional] |
|
|
59
|
+
| **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. | [optional] |
|
|
60
|
+
| **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). | [optional] |
|
|
61
|
+
| **v_alignment** | [**TextVerticalAlignment**](TextVerticalAlignment.md) | Text display only: how the text is aligned vertically in the field: `bottom`, `center` or `top`. | [optional] |
|
|
62
|
+
| **comb** | **Boolean** | Text display only: splits the field into `comb_number_of_cells` boxes of equal width and prints one character, centered, in each. | [optional] |
|
|
63
|
+
| **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`. | [optional] |
|
|
64
|
+
| **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. | [optional] |
|
|
65
|
+
| **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`. | [optional] |
|
|
66
|
+
| **shape_sides** | **Integer** | Shape display only, with `shape_type` `polygon`: the number of sides, 3 to 12. | [optional] |
|
|
67
|
+
| **shape_border_width** | **Integer** | Shape display only: the width of the shape's border, in points. | [optional] |
|
|
68
|
+
| **shape_border_color** | **String** | Shape display only: the shape's border color, as a hex code. Null draws no border. | [optional] |
|
|
69
|
+
| **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. | [optional] |
|
|
70
|
+
| **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. | [optional] |
|
|
71
|
+
| **shape_fill_color** | **String** | Shape display only: the color that fills the shape, as a hex code. Null leaves it unfilled. | [optional] |
|
|
72
|
+
| **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. | [optional] |
|
|
73
|
+
| **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. | [optional] |
|
|
74
|
+
| **check_character** | [**CheckCharacter**](CheckCharacter.md) | Check display only: the character printed, as an HTML entity: `✓` (✓), `✔` (✔, the default), `✖` (✖), `✗` (✗) or `✘` (✘). | [optional] |
|
|
75
|
+
| **check_color** | **String** | Check display only: the check mark's color, as a hex code. Empty uses the template's default check color. | [optional] |
|
|
76
|
+
| **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. | [optional] |
|
|
77
|
+
| **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. | [optional] |
|
|
78
|
+
| **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. | [optional] |
|
|
79
|
+
| **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. | [optional] |
|
|
80
|
+
| **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. | [optional] |
|
|
81
|
+
| **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. | [optional] |
|
|
82
|
+
| **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. | [optional] |
|
|
83
|
+
| **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. | [optional] |
|
|
84
|
+
| **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. | [optional] |
|
|
85
|
+
| **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`. | [optional] |
|
|
86
|
+
| **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. | [optional] |
|
|
87
|
+
| **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. | [optional] |
|
|
88
|
+
| **number_condition_range_exclusive_min** | **Boolean** | With `number_condition_type` `range`: leaves `number_condition_range_min` itself out of the range. | [optional] |
|
|
89
|
+
| **number_condition_range_exclusive_max** | **Boolean** | With `number_condition_type` `range`: leaves `number_condition_range_max` itself out of the range. | [optional] |
|
|
90
|
+
| **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`. | [optional] |
|
|
91
|
+
| **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. | [optional] |
|
|
92
|
+
| **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. | [optional] |
|
|
93
|
+
| **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. | [optional] |
|
|
94
|
+
| **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`. | [optional] |
|
|
95
|
+
| **dependencies** | [**FieldDependencyInput**](FieldDependencyInput.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`. | [optional] |
|
|
96
|
+
| **id** | **Integer** | The field's ID. Required when updating a field. When adding one, leave it out for the next free ID. | [optional] |
|
|
97
|
+
|
|
98
|
+
## Example
|
|
99
|
+
|
|
100
|
+
```ruby
|
|
101
|
+
require 'docspring'
|
|
102
|
+
|
|
103
|
+
instance = DocSpring::FieldInput.new(
|
|
104
|
+
name: null,
|
|
105
|
+
page: null,
|
|
106
|
+
type: null,
|
|
107
|
+
static: null,
|
|
108
|
+
editable: null,
|
|
109
|
+
default: null,
|
|
110
|
+
title: null,
|
|
111
|
+
description: null,
|
|
112
|
+
placeholder: null,
|
|
113
|
+
metadata: null,
|
|
114
|
+
required: null,
|
|
115
|
+
option_list: null,
|
|
116
|
+
combined_field_names: null,
|
|
117
|
+
combined_field_type: null,
|
|
118
|
+
combined_field_separator: null,
|
|
119
|
+
combined_field_format: null,
|
|
120
|
+
integer: null,
|
|
121
|
+
minimum: null,
|
|
122
|
+
maximum: null,
|
|
123
|
+
exclusive_minimum: null,
|
|
124
|
+
exclusive_maximum: null,
|
|
125
|
+
include_time: null,
|
|
126
|
+
signature_allow_draw: null,
|
|
127
|
+
signature_allow_type: null,
|
|
128
|
+
barcode_symbology: null,
|
|
129
|
+
hidden: null,
|
|
130
|
+
x: null,
|
|
131
|
+
y: null,
|
|
132
|
+
width: null,
|
|
133
|
+
height: null,
|
|
134
|
+
rotation: null,
|
|
135
|
+
display_type: null,
|
|
136
|
+
opacity: null,
|
|
137
|
+
date_time_format: null,
|
|
138
|
+
typeface: null,
|
|
139
|
+
font_size: null,
|
|
140
|
+
character_spacing: null,
|
|
141
|
+
bold: null,
|
|
142
|
+
uppercase: null,
|
|
143
|
+
strikethrough: null,
|
|
144
|
+
keep_leading_spaces: null,
|
|
145
|
+
overflow: null,
|
|
146
|
+
multiline: null,
|
|
147
|
+
multiline_lines: null,
|
|
148
|
+
min_length: null,
|
|
149
|
+
max_length: null,
|
|
150
|
+
auto_calculate_max_length: null,
|
|
151
|
+
color: null,
|
|
152
|
+
color_field_name: null,
|
|
153
|
+
color_field_required: null,
|
|
154
|
+
background_color: null,
|
|
155
|
+
background_color_field_name: null,
|
|
156
|
+
background_color_field_required: null,
|
|
157
|
+
alignment: null,
|
|
158
|
+
v_alignment: null,
|
|
159
|
+
comb: null,
|
|
160
|
+
comb_number_of_cells: null,
|
|
161
|
+
comb_value_offset: null,
|
|
162
|
+
shape_type: null,
|
|
163
|
+
shape_sides: null,
|
|
164
|
+
shape_border_width: null,
|
|
165
|
+
shape_border_color: null,
|
|
166
|
+
shape_border_color_field_name: null,
|
|
167
|
+
shape_border_color_field_required: null,
|
|
168
|
+
shape_fill_color: null,
|
|
169
|
+
shape_fill_color_field_name: null,
|
|
170
|
+
shape_fill_color_field_required: null,
|
|
171
|
+
check_character: null,
|
|
172
|
+
check_color: null,
|
|
173
|
+
check_color_field_name: null,
|
|
174
|
+
check_color_field_required: null,
|
|
175
|
+
qrcode_color: null,
|
|
176
|
+
qrcode_color_field_name: null,
|
|
177
|
+
qrcode_color_field_required: null,
|
|
178
|
+
true_text: null,
|
|
179
|
+
false_text: null,
|
|
180
|
+
condition: null,
|
|
181
|
+
string_condition_type: null,
|
|
182
|
+
number_condition_type: null,
|
|
183
|
+
number_condition_range_min: null,
|
|
184
|
+
number_condition_range_max: null,
|
|
185
|
+
number_condition_range_exclusive_min: null,
|
|
186
|
+
number_condition_range_exclusive_max: null,
|
|
187
|
+
invert_boolean_condition: null,
|
|
188
|
+
currency: null,
|
|
189
|
+
decimal_places: null,
|
|
190
|
+
image_scale_type: null,
|
|
191
|
+
image_gravity: null,
|
|
192
|
+
dependencies: null,
|
|
193
|
+
id: null
|
|
194
|
+
)
|
|
195
|
+
```
|
|
196
|
+
|
data/docs/FieldType.md
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# DocSpring::GenerateSubmissionFilesRequest
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **formats** | [**Array<GenerateFilesFormat>**](GenerateFilesFormat.md) | The formats to add to the submission's files: `png`, an image of each page of the submission's PDF (up to 100 pages). A format the submission already has (or is making) is left as it is. | |
|
|
8
|
+
|
|
9
|
+
## Example
|
|
10
|
+
|
|
11
|
+
```ruby
|
|
12
|
+
require 'docspring'
|
|
13
|
+
|
|
14
|
+
instance = DocSpring::GenerateSubmissionFilesRequest.new(
|
|
15
|
+
formats: null
|
|
16
|
+
)
|
|
17
|
+
```
|
|
18
|
+
|
data/docs/PageImage.md
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# DocSpring::PageImage
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **page** | **Integer** | The page number, from 1. | |
|
|
8
|
+
| **width** | **Integer** | The image's width in pixels. | |
|
|
9
|
+
| **height** | **Integer** | The image's height in pixels. | |
|
|
10
|
+
| **download_url** | **String** | A temporary link to download the image. A submission's is null when your account turns off download links for submissions. | |
|
|
11
|
+
| **permanent_url** | **String** | A link to download a submission's image that doesn't expire: it redirects to a new temporary link. It needs your API token or a signed-in session, except for a submission of a template that makes its submissions public. Null for a template's page images. | |
|
|
12
|
+
| **filename** | **String** | The image's file name, such as `sub_123_page_1.png`. | |
|
|
13
|
+
| **content_type** | **String** | The image's media type, `image/png` for a submission's pages or `image/jpeg` for a template's. | |
|
|
14
|
+
| **size** | **Integer** | The image's size in bytes. | |
|
|
15
|
+
| **sha256** | **String** | The SHA-256 hash of the image. Null for a template's page images. | |
|
|
16
|
+
|
|
17
|
+
## Example
|
|
18
|
+
|
|
19
|
+
```ruby
|
|
20
|
+
require 'docspring'
|
|
21
|
+
|
|
22
|
+
instance = DocSpring::PageImage.new(
|
|
23
|
+
page: null,
|
|
24
|
+
width: null,
|
|
25
|
+
height: null,
|
|
26
|
+
download_url: null,
|
|
27
|
+
permanent_url: null,
|
|
28
|
+
filename: null,
|
|
29
|
+
content_type: null,
|
|
30
|
+
size: null,
|
|
31
|
+
sha256: null
|
|
32
|
+
)
|
|
33
|
+
```
|
|
34
|
+
|
data/docs/PageImages.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# DocSpring::PageImages
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **state** | [**GeneratedFileState**](GeneratedFileState.md) | `processed` once the images have been made, with the PDF or by POST /submissions/{submission_id}/generate_files. `pending` until then, and `error` if they couldn't be made (see `error_message`). | |
|
|
8
|
+
| **error_message** | **String** | Why the images couldn't be made, when `state` is `error`. | |
|
|
9
|
+
| **page_count** | **Integer** | How many pages have an image. Null until the images have been made. | |
|
|
10
|
+
| **pages** | [**Array<PageImage>**](PageImage.md) | An image of each page, in order: `pages[0]` is page 1. Lists of submissions leave it out (null): get the submission to see them. Empty until the images have been made. | |
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```ruby
|
|
15
|
+
require 'docspring'
|
|
16
|
+
|
|
17
|
+
instance = DocSpring::PageImages.new(
|
|
18
|
+
state: null,
|
|
19
|
+
error_message: null,
|
|
20
|
+
page_count: null,
|
|
21
|
+
pages: null
|
|
22
|
+
)
|
|
23
|
+
```
|
|
24
|
+
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# DocSpring::PredefinedField
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **name** | **String** | The field's name, the key of its value in submission data. A `/` nests the key in objects and arrays (`customer/email`, `signers/0/name`). | |
|
|
8
|
+
| **display_name** | **String** | The name the template editor shows instead of `name`, where a `/` puts it in a folder, such as `Defendant/Name`. Null shows `name`. Two names can't share a display name. | [optional] |
|
|
9
|
+
| **title** | **String** | The Title setting a field gets when it's given this name. Null leaves the field's title as it is. | [optional] |
|
|
10
|
+
| **type** | [**FieldType**](FieldType.md) | The data type a field gets when it's given this name, as a field's `type`. | |
|
|
11
|
+
| **option_list** | **String** | String fields only: the values allowed, separated by commas, such as `Yes,No`. Null allows any value. | [optional] |
|
|
12
|
+
| **required_in_template** | **Boolean** | Whether the template must have a field with this name. The embedded editor shows the names that are missing, and with `disableDoneButtonIfPredefinedFieldsMissing` keeps its Done button disabled until the template has them. Default false. | [optional] |
|
|
13
|
+
| **field_required** | **Boolean** | The Required setting a field gets when it's given this name. Default true. | [optional] |
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
```ruby
|
|
18
|
+
require 'docspring'
|
|
19
|
+
|
|
20
|
+
instance = DocSpring::PredefinedField.new(
|
|
21
|
+
name: null,
|
|
22
|
+
display_name: null,
|
|
23
|
+
title: null,
|
|
24
|
+
type: null,
|
|
25
|
+
option_list: null,
|
|
26
|
+
required_in_template: null,
|
|
27
|
+
field_required: null
|
|
28
|
+
)
|
|
29
|
+
```
|
|
30
|
+
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# DocSpring::PredefinedFieldInput
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **name** | **String** | The field's name, the key of its value in submission data. A `/` nests the key in objects and arrays (`customer/email`, `signers/0/name`). | |
|
|
8
|
+
| **display_name** | **String** | The name the template editor shows instead of `name`, where a `/` puts it in a folder, such as `Defendant/Name`. Null shows `name`. Two names can't share a display name. | [optional] |
|
|
9
|
+
| **title** | **String** | The Title setting a field gets when it's given this name. Null leaves the field's title as it is. | [optional] |
|
|
10
|
+
| **type** | [**FieldType**](FieldType.md) | The data type a field gets when it's given this name, as a field's `type`. | |
|
|
11
|
+
| **option_list** | **String** | String fields only: the values allowed, separated by commas, such as `Yes,No`. Null allows any value. | [optional] |
|
|
12
|
+
| **required_in_template** | **Boolean** | Whether the template must have a field with this name. The embedded editor shows the names that are missing, and with `disableDoneButtonIfPredefinedFieldsMissing` keeps its Done button disabled until the template has them. Default false. | [optional] |
|
|
13
|
+
| **field_required** | **Boolean** | The Required setting a field gets when it's given this name. Default true. | [optional] |
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
```ruby
|
|
18
|
+
require 'docspring'
|
|
19
|
+
|
|
20
|
+
instance = DocSpring::PredefinedFieldInput.new(
|
|
21
|
+
name: null,
|
|
22
|
+
display_name: null,
|
|
23
|
+
title: null,
|
|
24
|
+
type: null,
|
|
25
|
+
option_list: null,
|
|
26
|
+
required_in_template: null,
|
|
27
|
+
field_required: null
|
|
28
|
+
)
|
|
29
|
+
```
|
|
30
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# DocSpring::RemoveTemplateFieldsRequest
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **field_ids** | **Array<Integer>** | The IDs of the fields to remove. | |
|
|
8
|
+
|
|
9
|
+
## Example
|
|
10
|
+
|
|
11
|
+
```ruby
|
|
12
|
+
require 'docspring'
|
|
13
|
+
|
|
14
|
+
instance = DocSpring::RemoveTemplateFieldsRequest.new(
|
|
15
|
+
field_ids: null
|
|
16
|
+
)
|
|
17
|
+
```
|
|
18
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# DocSpring::ReorderTemplateFieldsRequest
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **field_ids** | **Array<Integer>** | The ID of every field, in the new order. Each field stays on its page, and a page's fields take the order their IDs have here: the order they're printed in (a later field prints over an earlier one where they overlap), and the order of their values in the template's data schema and forms. | |
|
|
8
|
+
|
|
9
|
+
## Example
|
|
10
|
+
|
|
11
|
+
```ruby
|
|
12
|
+
require 'docspring'
|
|
13
|
+
|
|
14
|
+
instance = DocSpring::ReorderTemplateFieldsRequest.new(
|
|
15
|
+
field_ids: null
|
|
16
|
+
)
|
|
17
|
+
```
|
|
18
|
+
|
data/docs/Submission.md
CHANGED
|
@@ -21,7 +21,8 @@
|
|
|
21
21
|
| **signature_requests** | [**Array<SignatureRequest>**](SignatureRequest.md) | The people asked to sign the submission (and fill in their fields), in order. | |
|
|
22
22
|
| **actions** | [**Array<SubmissionAction>**](SubmissionAction.md) | The uploads of the submission's PDF to your storage (account integrations). | |
|
|
23
23
|
| **truncated_text** | **Hash<String, Array<String>>** | The text of each field that didn't fit in it, by field name. Left out (null) with `data`, and empty once the submission has expired. | |
|
|
24
|
-
| **
|
|
24
|
+
| **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. | |
|
|
25
|
+
| **files** | [**SubmissionFiles**](SubmissionFiles.md) | The generated files: `pdf` once the submission has been processed, `png` (the images of the PDF's pages, when `output_formats` has it: `files.png.pages[0]` is page 1), `audit_trail` once its signature requests are completed, and `preview` once a preview PDF has been generated. Empty once the submission has expired. | |
|
|
25
26
|
| **preview_generated_at** | **Time** | When the preview PDF was generated. Null if there is no preview. | |
|
|
26
27
|
| **expired** | **Boolean** | An expired submission's data, metadata, password and PDF have been deleted. | |
|
|
27
28
|
| **expires_at** | **Time** | When the submission expires. Null if it's kept until you delete it. | |
|
|
@@ -52,6 +53,7 @@ instance = DocSpring::Submission.new(
|
|
|
52
53
|
signature_requests: null,
|
|
53
54
|
actions: null,
|
|
54
55
|
truncated_text: null,
|
|
56
|
+
output_formats: null,
|
|
55
57
|
files: null,
|
|
56
58
|
preview_generated_at: null,
|
|
57
59
|
expired: null,
|
data/docs/SubmissionFiles.md
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
| **pdf** | [**GeneratedFile**](GeneratedFile.md) | The submission's PDF. | [optional] |
|
|
8
8
|
| **audit_trail** | [**GeneratedFile**](GeneratedFile.md) | The audit trail of a submission with signature requests: who signed, when and how. It's also added to the end of the PDF when the template's `merge_audit_trail_pdf` is on. | [optional] |
|
|
9
9
|
| **preview** | [**GeneratedFile**](GeneratedFile.md) | The preview PDF from POST /submissions/{submission_id}/generate_preview, such as for a submission still waiting for its signature requests. | [optional] |
|
|
10
|
+
| **png** | [**PageImages**](PageImages.md) | | [optional] |
|
|
10
11
|
|
|
11
12
|
## Example
|
|
12
13
|
|
|
@@ -16,7 +17,8 @@ require 'docspring'
|
|
|
16
17
|
instance = DocSpring::SubmissionFiles.new(
|
|
17
18
|
pdf: null,
|
|
18
19
|
audit_trail: null,
|
|
19
|
-
preview: null
|
|
20
|
+
preview: null,
|
|
21
|
+
png: null
|
|
20
22
|
)
|
|
21
23
|
```
|
|
22
24
|
|
data/docs/SubmissionInput.md
CHANGED
|
@@ -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. | [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] |
|
|
@@ -27,6 +28,7 @@ instance = DocSpring::SubmissionInput.new(
|
|
|
27
28
|
data: null,
|
|
28
29
|
metadata: null,
|
|
29
30
|
password: null,
|
|
31
|
+
output_formats: null,
|
|
30
32
|
expires_in: null,
|
|
31
33
|
field_overrides: null,
|
|
32
34
|
html: null,
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# DocSpring::SubmissionValidation
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **valid** | **Boolean** | True when creating the submission would succeed. | |
|
|
8
|
+
| **template_id** | **String** | The template's ID. | |
|
|
9
|
+
| **template_version** | **String** | The published version the request was checked against, such as `1.2.0`. Null for the draft. | |
|
|
10
|
+
| **error** | [**ErrorInfo**](ErrorInfo.md) | | [optional] |
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```ruby
|
|
15
|
+
require 'docspring'
|
|
16
|
+
|
|
17
|
+
instance = DocSpring::SubmissionValidation.new(
|
|
18
|
+
valid: null,
|
|
19
|
+
template_id: null,
|
|
20
|
+
template_version: null,
|
|
21
|
+
error: null
|
|
22
|
+
)
|
|
23
|
+
```
|
|
24
|
+
|
data/docs/Template.md
CHANGED
|
@@ -43,6 +43,9 @@
|
|
|
43
43
|
| **updated_at** | **Time** | When the template was last updated. | |
|
|
44
44
|
| **defaults** | [**TemplateDefaults**](TemplateDefaults.md) | | |
|
|
45
45
|
| **field_dependencies** | [**Array<TemplateFieldDependency>**](TemplateFieldDependency.md) | Conditional logic: each rule shows or hides its target fields, or makes them required, depending on the values of other fields. | |
|
|
46
|
+
| **field_groups** | [**Array<FieldGroup>**](FieldGroup.md) | The groups of the template's fields, with their settings. A field's name puts it in groups: `address/city` is in the group `address`, and `items/0/price` is in the list `items` and its items' group `items/~`. | |
|
|
47
|
+
| **predefined_fields** | [**Array<PredefinedField>**](PredefinedField.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. | |
|
|
48
|
+
| **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. | |
|
|
46
49
|
| **html** | **String** | The HTML of an HTML template, as a Liquid template. Null for PDF templates. | |
|
|
47
50
|
| **scss** | **String** | The SCSS of an HTML template. | |
|
|
48
51
|
| **header_html** | **String** | The HTML printed at the top of each page of an HTML template. | |
|
|
@@ -96,6 +99,9 @@ instance = DocSpring::Template.new(
|
|
|
96
99
|
updated_at: null,
|
|
97
100
|
defaults: null,
|
|
98
101
|
field_dependencies: null,
|
|
102
|
+
field_groups: null,
|
|
103
|
+
predefined_fields: null,
|
|
104
|
+
predefined_fields_sample_data: null,
|
|
99
105
|
html: null,
|
|
100
106
|
scss: null,
|
|
101
107
|
header_html: null,
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# DocSpring::TemplateDiff
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **template_id** | **String** | The template's ID. | |
|
|
8
|
+
| **from_version** | **String** | The earlier version, such as `1.1.0`. Null when no version was published before `to_version`: it's compared with a new template, so all of its fields are added. | |
|
|
9
|
+
| **to_version** | **String** | The later version, such as `1.2.0`. Null for the draft. | |
|
|
10
|
+
| **summary** | [**TemplateDiffSummary**](TemplateDiffSummary.md) | How many changes of each kind there are. | |
|
|
11
|
+
| **fields** | [**TemplateFieldChanges**](TemplateFieldChanges.md) | The fields that changed. | |
|
|
12
|
+
| **changed_settings** | **Array<String>** | The names of the template's settings that changed, as they're named on the Template (`name`, `html`, `defaults`, `expire_after`, ...). Values aren't included, and secrets like `encrypt_pdfs_password` are named when they change. | |
|
|
13
|
+
| **document_changed** | **Boolean** | The template's PDF was replaced (or added, when there's no `from_version`). | |
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
```ruby
|
|
18
|
+
require 'docspring'
|
|
19
|
+
|
|
20
|
+
instance = DocSpring::TemplateDiff.new(
|
|
21
|
+
template_id: null,
|
|
22
|
+
from_version: null,
|
|
23
|
+
to_version: null,
|
|
24
|
+
summary: null,
|
|
25
|
+
fields: null,
|
|
26
|
+
changed_settings: null,
|
|
27
|
+
document_changed: null
|
|
28
|
+
)
|
|
29
|
+
```
|
|
30
|
+
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# DocSpring::TemplateDiffSummary
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **fields_added** | **Integer** | How many fields were added. | |
|
|
8
|
+
| **fields_removed** | **Integer** | How many fields were removed. | |
|
|
9
|
+
| **fields_changed** | **Integer** | How many fields have changed settings. | |
|
|
10
|
+
| **fields_reordered** | **Integer** | How many fields moved in the template's field order. | |
|
|
11
|
+
| **settings_changed** | **Integer** | How many of the template's settings changed. | |
|
|
12
|
+
| **total_changes** | **Integer** | All the changes, counting a new document as one. Zero when the versions are the same. | |
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```ruby
|
|
17
|
+
require 'docspring'
|
|
18
|
+
|
|
19
|
+
instance = DocSpring::TemplateDiffSummary.new(
|
|
20
|
+
fields_added: null,
|
|
21
|
+
fields_removed: null,
|
|
22
|
+
fields_changed: null,
|
|
23
|
+
fields_reordered: null,
|
|
24
|
+
settings_changed: null,
|
|
25
|
+
total_changes: null
|
|
26
|
+
)
|
|
27
|
+
```
|
|
28
|
+
|
data/docs/TemplateDocument.md
CHANGED
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **filename** | **String** | The PDF's file name. | |
|
|
7
|
+
| **filename** | **String** | The PDF's file name. Null until a `document_url` has been downloaded. | |
|
|
8
8
|
| **md5** | **String** | The MD5 hash of the PDF. | |
|
|
9
|
-
| **state** | [**TemplateDocumentState**](TemplateDocumentState.md) | `pending` while DocSpring processes the PDF, then `processed`. `password_required`, `malformed_pdf` and `unknown_error` mean the PDF couldn't be processed, and `error_message` says why: upload it again or upload another one. | |
|
|
10
|
-
| **error_message** | **String** | Why the PDF couldn't be processed, and how to fix it. Null unless `state` is an error. | |
|
|
9
|
+
| **state** | [**TemplateDocumentState**](TemplateDocumentState.md) | `pending` while DocSpring processes the PDF, then `processed`. `password_required`, `malformed_pdf` and `unknown_error` mean the PDF couldn't be processed, and `error_message` says why: upload it again or upload another one. `downloading` while DocSpring downloads a `document_url`, then as for an upload. `download_failed` means it couldn't be downloaded, and `error_message` says why. A template keeps its PDF while a new one is downloaded, and when it couldn't be. | |
|
|
10
|
+
| **error_message** | **String** | Why the PDF couldn't be processed or downloaded, and how to fix it. Null unless `state` is an error. | |
|
|
11
11
|
| **field_reimport_state** | [**FieldReimportState**](FieldReimportState.md) | Whether the fields are being re-imported from this PDF (`reimport_fields` when the PDF was replaced): `requested` while DocSpring processes the PDF, then `imported`, or `no_fields` when the PDF had no fillable fields and the template kept its fields. `none` when no re-import was asked for, or when it couldn't run (the PDF couldn't be processed, or the template was locked or published while it was). | |
|
|
12
12
|
| **page_count** | **Integer** | 0 until the PDF has been processed. | |
|
|
13
13
|
| **page_dimensions** | **Array<Array<Float>>** | Each page's width and height in PDF points. Null until the PDF has been processed. | |
|