docspring 4.0.0 → 4.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.openapi-generator/FILES +99 -0
- data/.travis.yml +1 -1
- data/AGENTS.md +3 -2
- data/CHANGELOG.md +64 -0
- data/Gemfile.lock +9 -9
- data/README.md +14 -1
- data/docs/AddTemplateFieldsRequest.md +18 -0
- data/docs/Client.md +917 -80
- data/docs/CombinedPdf.md +1 -1
- data/docs/CreateCombinedPdfRequest.md +1 -1
- data/docs/CreateSubmissionBatchRequest.md +2 -0
- data/docs/CreateSubmissionRequest.md +4 -2
- data/docs/CreateTemplatePreviewRequest.md +18 -0
- data/docs/CreateTemplateRequest.md +13 -3
- data/docs/ErrorDetail.md +1 -1
- data/docs/ErrorInfo.md +4 -4
- 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 +16 -14
- data/docs/SubmissionFiles.md +3 -1
- data/docs/SubmissionInput.md +4 -2
- data/docs/SubmissionList.md +1 -1
- data/docs/SubmissionSummary.md +54 -0
- data/docs/SubmissionValidation.md +24 -0
- data/docs/Template.md +18 -10
- data/docs/TemplateActor.md +1 -1
- data/docs/TemplateDiff.md +30 -0
- data/docs/TemplateDiffSummary.md +28 -0
- data/docs/TemplateDocument.md +6 -6
- data/docs/TemplateDocumentSummary.md +24 -0
- 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/TemplatePreview.md +32 -0
- data/docs/TemplatePreviewState.md +15 -0
- data/docs/TemplateSummary.md +2 -48
- data/docs/UpdateTemplateDocumentRequest.md +6 -2
- data/docs/UpdateTemplateFieldsRequest.md +18 -0
- data/docs/UpdateTemplateRequest.md +10 -2
- data/docs/ValidateSubmissionRequest.md +38 -0
- data/lib/docspring/api/client.rb +869 -51
- data/lib/docspring/api_client.rb +4 -2
- data/lib/docspring/date_time_values.rb +33 -0
- data/lib/docspring/models/add_template_fields_request.rb +187 -0
- data/lib/docspring/models/combined_pdf.rb +1 -1
- data/lib/docspring/models/create_combined_pdf_request.rb +1 -1
- data/lib/docspring/models/create_submission_batch_request.rb +23 -1
- data/lib/docspring/models/create_submission_request.rb +25 -3
- data/lib/docspring/models/create_template_preview_request.rb +187 -0
- data/lib/docspring/models/create_template_request.rb +59 -4
- data/lib/docspring/models/error_code.rb +3 -1
- data/lib/docspring/models/error_detail.rb +1 -1
- data/lib/docspring/models/error_info.rb +4 -4
- 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 +146 -117
- data/lib/docspring/models/submission_files.rb +13 -4
- data/lib/docspring/models/submission_input.rb +25 -3
- data/lib/docspring/models/submission_list.rb +1 -1
- data/lib/docspring/models/submission_summary.rb +601 -0
- data/lib/docspring/models/submission_validation.rb +234 -0
- data/lib/docspring/models/template.rb +169 -83
- data/lib/docspring/models/template_actor.rb +1 -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 +44 -44
- data/lib/docspring/models/template_document_state.rb +3 -1
- data/lib/docspring/models/template_document_summary.rb +260 -0
- 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/template_preview.rb +356 -0
- data/lib/docspring/models/template_preview_state.rb +42 -0
- data/lib/docspring/models/template_summary.rb +5 -572
- 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 +53 -6
- data/lib/docspring/models/validate_submission_request.rb +288 -0
- data/lib/docspring/request_schemas.json +3465 -1588
- data/lib/docspring/version.rb +1 -1
- data/lib/docspring/webhook_signature.rb +45 -0
- data/lib/docspring.rb +34 -0
- data/spec/api/client_spec.rb +167 -13
- 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_preview_request_spec.rb +36 -0
- data/spec/models/create_template_request_spec.rb +30 -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 +17 -11
- data/spec/models/submission_summary_spec.rb +144 -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_document_spec.rb +5 -5
- data/spec/models/template_document_summary_spec.rb +54 -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_preview_spec.rb +78 -0
- data/spec/models/template_preview_state_spec.rb +30 -0
- data/spec/models/template_spec.rb +34 -10
- data/spec/models/template_summary_spec.rb +0 -138
- 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 +24 -0
- data/spec/models/validate_submission_request_spec.rb +96 -0
- metadata +135 -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
|
@@ -13,21 +13,22 @@
|
|
|
13
13
|
| **state** | [**SubmissionState**](SubmissionState.md) | `pending` until the PDF has been generated, then `processed`. `waiting_for_signature_requests` until every signature request is completed. `insufficient_credits`: waiting for credits; `error_message` says whether the PDF is generated once you add them. `account_suspended`: waiting for the account to be reactivated, for up to 30 days. Waiting ends in `error` if it's discarded or takes over 30 days. Every other state is final, with no PDF: `invalid_data` (the data doesn't match the template's fields: see `data_errors`), `declined` (a signature request was declined), and the states where generating the PDF failed, which have an `error_message`: `syntax_error` (a mistake in an HTML template's Liquid or SCSS), `image_download_failed` or `image_processing_failed` (an image in the data or the template couldn't be downloaded or read) and `error` (anything else). Older submissions can also be `license_revoked` or `accidental`. | |
|
|
14
14
|
| **test** | **Boolean** | Test PDFs have a watermark and are free. Live PDFs use credits. Submissions made with a test API token are always test submissions. | |
|
|
15
15
|
| **editable** | **Boolean** | `true` keeps the PDF's text and check fields fillable, and `false` flattens every field. Left out, the template decides: its `editable_submissions` setting, or each field's own Editable option. A response shows the template's setting when the request left this out. Can't be `true` with `signature_requests`. | |
|
|
16
|
-
| **data** | **Hash<String, Object>** | The submission's data, with the values entered in completed signature requests.
|
|
16
|
+
| **data** | **Hash<String, Object>** | The submission's data, with the values entered in completed signature requests. Empty once the submission has expired. Null in a batch's submissions unless you pass `include_data=true`, and in the events of a webhook that leaves out submission data. | |
|
|
17
17
|
| **data_errors** | [**Array<ErrorDetail>**](ErrorDetail.md) | Why the data doesn't match the template's fields, when `state` is `invalid_data`: the same details as the 422 response that recorded it, with pointers into the request that created the submission (`/data/name`). Cleared once the submission has expired. | |
|
|
18
18
|
| **error_message** | **String** | Why the PDF couldn't be generated, when `state` is `error`. | |
|
|
19
|
-
| **metadata** | **Hash<String, Object>** | Your own data about the submission, such as an ID from your app. It isn't printed on the PDF. | |
|
|
20
|
-
| **
|
|
21
|
-
| **signature_requests** | [**Array<SignatureRequest>**](SignatureRequest.md) | The people asked to sign the submission (and fill in their fields), in order. | |
|
|
22
|
-
| **actions** | [**Array<SubmissionAction>**](SubmissionAction.md) | The uploads of the submission's PDF to your storage (account integrations). | |
|
|
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
|
-
| **files** | [**SubmissionFiles**](SubmissionFiles.md) | The generated files: `pdf` once the submission has been processed, `audit_trail` once its signature requests are completed, and `preview` once a preview PDF has been generated. Empty once the submission has expired. | |
|
|
25
|
-
| **preview_generated_at** | **Time** | When the preview PDF was generated. Null if there is no preview. | |
|
|
19
|
+
| **metadata** | **Hash<String, Object>** | Your own data about the submission, such as an ID from your app. It isn't printed on the PDF. Two keys also change the PDF: `pdf_filename` names its file (`files.pdf.filename`, and its download), and `pdf_title` is its title in the PDF's document properties (and an HTML template's `<title>`, unless its HTML has one). Without `pdf_title`, the title is the template's name. In `pdf_filename`, a `.pdf` ending is removed, each run of characters other than letters, digits, `-`, `_` and `.` becomes one `_`, and the first 128 characters are kept, then `.pdf` is added. Without it, the file is named after the submission's ID (`sub_1234567890abcdef01.pdf`). | |
|
|
20
|
+
| **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. | |
|
|
26
21
|
| **expired** | **Boolean** | An expired submission's data, metadata, password and PDF have been deleted. | |
|
|
27
22
|
| **expires_at** | **Time** | When the submission expires. Null if it's kept until you delete it. | |
|
|
28
23
|
| **processed_at** | **Time** | When the PDF was generated. Null until then. | |
|
|
29
24
|
| **created_at** | **Time** | When the submission was created. | |
|
|
30
25
|
| **updated_at** | **Time** | When the submission was last updated. | |
|
|
26
|
+
| **has_password** | **Boolean** | Whether the PDF needs a password to open (`password`). | |
|
|
27
|
+
| **signature_requests** | [**Array<SignatureRequest>**](SignatureRequest.md) | The people asked to sign the submission (and fill in their fields), in order. | |
|
|
28
|
+
| **actions** | [**Array<SubmissionAction>**](SubmissionAction.md) | The uploads of the submission's PDF to your storage (account integrations). | |
|
|
29
|
+
| **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. | |
|
|
30
|
+
| **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. | |
|
|
31
|
+
| **preview_generated_at** | **Time** | When the preview PDF was generated. Null if there is no preview. | |
|
|
31
32
|
|
|
32
33
|
## Example
|
|
33
34
|
|
|
@@ -48,17 +49,18 @@ instance = DocSpring::Submission.new(
|
|
|
48
49
|
data_errors: null,
|
|
49
50
|
error_message: null,
|
|
50
51
|
metadata: null,
|
|
51
|
-
has_password: null,
|
|
52
|
-
signature_requests: null,
|
|
53
|
-
actions: null,
|
|
54
|
-
truncated_text: null,
|
|
55
52
|
files: null,
|
|
56
|
-
preview_generated_at: null,
|
|
57
53
|
expired: null,
|
|
58
54
|
expires_at: null,
|
|
59
55
|
processed_at: null,
|
|
60
56
|
created_at: null,
|
|
61
|
-
updated_at: null
|
|
57
|
+
updated_at: null,
|
|
58
|
+
has_password: null,
|
|
59
|
+
signature_requests: null,
|
|
60
|
+
actions: null,
|
|
61
|
+
truncated_text: null,
|
|
62
|
+
output_formats: null,
|
|
63
|
+
preview_generated_at: null
|
|
62
64
|
)
|
|
63
65
|
```
|
|
64
66
|
|
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
|
@@ -7,12 +7,13 @@
|
|
|
7
7
|
| **test** | **Boolean** | Test PDFs have a watermark and are free. Live PDFs use credits. Submissions made with a test API token are always test submissions. | [optional] |
|
|
8
8
|
| **editable** | **Boolean** | `true` keeps the PDF's text and check fields fillable, and `false` flattens every field. Left out, the template decides: its `editable_submissions` setting, or each field's own Editable option. A response shows the template's setting when the request left this out. Can't be `true` with `signature_requests`. | [optional] |
|
|
9
9
|
| **data** | **Hash<String, Object>** | The values of the template's fields, by field name. Required for a PDF template. | [optional] |
|
|
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] |
|
|
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. Two keys also change the PDF: `pdf_filename` names its file (`files.pdf.filename`, and its download), and `pdf_title` is its title in the PDF's document properties (and an HTML template's `<title>`, unless its HTML has one). Without `pdf_title`, the title is the template's name. In `pdf_filename`, a `.pdf` ending is removed, each run of characters other than letters, digits, `-`, `_` and `.` becomes one `_`, and the first 128 characters are kept, then `.pdf` is added. Without it, the file is named after the submission's ID (`sub_1234567890abcdef01.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] |
|
|
15
|
-
| **css** | **String** | For an HTML template, CSS
|
|
16
|
+
| **css** | **String** | For an HTML template, SCSS (plain CSS works too) added after the template's styles, on the page and in its header and footer. It doesn't replace them: its rules come later, so they win over the template's rules of the same specificity. | [optional] |
|
|
16
17
|
| **template_id** | **String** | The submission's template. Default the batch's `template_id`. | [optional] |
|
|
17
18
|
| **template_version** | **String** | The version of the submission's template. Default the batch's `template_version`. | [optional] |
|
|
18
19
|
|
|
@@ -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,
|
data/docs/SubmissionList.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **data** | [**Array<
|
|
7
|
+
| **data** | [**Array<SubmissionSummary>**](SubmissionSummary.md) | The items on this page. | |
|
|
8
8
|
| **next_cursor** | **String** | Pass it as `cursor` to get the next page. Null on the last page. | |
|
|
9
9
|
|
|
10
10
|
## Example
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# DocSpring::SubmissionSummary
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **id** | **String** | The submission's ID. | |
|
|
8
|
+
| **template_id** | **String** | Null once the template has been permanently deleted. | |
|
|
9
|
+
| **template_type** | [**TemplateType**](TemplateType.md) | The template's type: `pdf` or `html`. | |
|
|
10
|
+
| **template_version** | **String** | The published version of the template the submission used. Null for the draft. | |
|
|
11
|
+
| **batch_id** | **String** | The ID of the batch the submission was created in. | |
|
|
12
|
+
| **source** | [**SubmissionSource**](SubmissionSource.md) | `api`: created with the API. `web`: a web form. `reprocess`: a copy of another submission, made to generate its PDF again. | |
|
|
13
|
+
| **state** | [**SubmissionState**](SubmissionState.md) | `pending` until the PDF has been generated, then `processed`. `waiting_for_signature_requests` until every signature request is completed. `insufficient_credits`: waiting for credits; `error_message` says whether the PDF is generated once you add them. `account_suspended`: waiting for the account to be reactivated, for up to 30 days. Waiting ends in `error` if it's discarded or takes over 30 days. Every other state is final, with no PDF: `invalid_data` (the data doesn't match the template's fields: see `data_errors`), `declined` (a signature request was declined), and the states where generating the PDF failed, which have an `error_message`: `syntax_error` (a mistake in an HTML template's Liquid or SCSS), `image_download_failed` or `image_processing_failed` (an image in the data or the template couldn't be downloaded or read) and `error` (anything else). Older submissions can also be `license_revoked` or `accidental`. | |
|
|
14
|
+
| **test** | **Boolean** | Test PDFs have a watermark and are free. Live PDFs use credits. Submissions made with a test API token are always test submissions. | |
|
|
15
|
+
| **editable** | **Boolean** | `true` keeps the PDF's text and check fields fillable, and `false` flattens every field. Left out, the template decides: its `editable_submissions` setting, or each field's own Editable option. A response shows the template's setting when the request left this out. Can't be `true` with `signature_requests`. | |
|
|
16
|
+
| **data** | **Hash<String, Object>** | The submission's data, with the values entered in completed signature requests. Null unless you pass `include_data=true`. Empty once the submission has expired. | |
|
|
17
|
+
| **data_errors** | [**Array<ErrorDetail>**](ErrorDetail.md) | Why the data doesn't match the template's fields, when `state` is `invalid_data`: the same details as the 422 response that recorded it, with pointers into the request that created the submission (`/data/name`). Cleared once the submission has expired. | |
|
|
18
|
+
| **error_message** | **String** | Why the PDF couldn't be generated, when `state` is `error`. | |
|
|
19
|
+
| **metadata** | **Hash<String, Object>** | Your own data about the submission, such as an ID from your app. It isn't printed on the PDF. Two keys also change the PDF: `pdf_filename` names its file (`files.pdf.filename`, and its download), and `pdf_title` is its title in the PDF's document properties (and an HTML template's `<title>`, unless its HTML has one). Without `pdf_title`, the title is the template's name. In `pdf_filename`, a `.pdf` ending is removed, each run of characters other than letters, digits, `-`, `_` and `.` becomes one `_`, and the first 128 characters are kept, then `.pdf` is added. Without it, the file is named after the submission's ID (`sub_1234567890abcdef01.pdf`). | |
|
|
20
|
+
| **files** | [**SubmissionFiles**](SubmissionFiles.md) | Empty unless you pass `include_files=true`: then the generated files, as when you get the submission, without the `png` pages' links (`files.png.pages` is null). Get the submission for its page images. | |
|
|
21
|
+
| **expired** | **Boolean** | An expired submission's data, metadata, password and PDF have been deleted. | |
|
|
22
|
+
| **expires_at** | **Time** | When the submission expires. Null if it's kept until you delete it. | |
|
|
23
|
+
| **processed_at** | **Time** | When the PDF was generated. Null until then. | |
|
|
24
|
+
| **created_at** | **Time** | When the submission was created. | |
|
|
25
|
+
| **updated_at** | **Time** | When the submission was last updated. | |
|
|
26
|
+
|
|
27
|
+
## Example
|
|
28
|
+
|
|
29
|
+
```ruby
|
|
30
|
+
require 'docspring'
|
|
31
|
+
|
|
32
|
+
instance = DocSpring::SubmissionSummary.new(
|
|
33
|
+
id: null,
|
|
34
|
+
template_id: null,
|
|
35
|
+
template_type: null,
|
|
36
|
+
template_version: null,
|
|
37
|
+
batch_id: null,
|
|
38
|
+
source: null,
|
|
39
|
+
state: null,
|
|
40
|
+
test: null,
|
|
41
|
+
editable: null,
|
|
42
|
+
data: null,
|
|
43
|
+
data_errors: null,
|
|
44
|
+
error_message: null,
|
|
45
|
+
metadata: null,
|
|
46
|
+
files: null,
|
|
47
|
+
expired: null,
|
|
48
|
+
expires_at: null,
|
|
49
|
+
processed_at: null,
|
|
50
|
+
created_at: null,
|
|
51
|
+
updated_at: null
|
|
52
|
+
)
|
|
53
|
+
```
|
|
54
|
+
|