docspring 4.2.0 → 4.3.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/.travis.yml +1 -1
- data/AGENTS.md +2 -2
- data/CHANGELOG.md +27 -0
- data/Gemfile.lock +4 -3
- data/README.md +7 -6
- data/docs/Client.md +104 -102
- data/docs/CreateSubmissionRequest.md +3 -3
- data/docs/CreateTemplateRequest.md +11 -9
- data/docs/ErrorInfo.md +1 -1
- data/docs/FieldGroup.md +2 -2
- data/docs/FieldGroupInput.md +1 -1
- data/docs/GenerateSubmissionFilesRequest.md +1 -1
- data/docs/GeneratedFile.md +2 -2
- data/docs/Submission.md +4 -4
- data/docs/SubmissionBatch.md +3 -3
- data/docs/SubmissionFiles.md +4 -0
- data/docs/SubmissionInput.md +3 -3
- data/docs/SubmissionSummary.md +2 -2
- data/docs/Template.md +10 -8
- data/docs/TemplateDiff.md +2 -2
- data/docs/TemplateDocument.md +10 -10
- data/docs/TemplateDocumentSummary.md +4 -4
- data/docs/TemplatePreview.md +1 -1
- data/docs/TemplateSummary.md +5 -3
- data/docs/UpdateTemplateDocumentRequest.md +5 -5
- data/docs/UpdateTemplateRequest.md +6 -4
- data/docs/ValidateSubmissionRequest.md +3 -3
- data/docspring.gemspec +2 -2
- data/lib/docspring/api/client.rb +50 -47
- data/lib/docspring/api_client.rb +2 -2
- data/lib/docspring/api_error.rb +1 -1
- data/lib/docspring/api_model_base.rb +1 -1
- data/lib/docspring/configuration.rb +1 -1
- data/lib/docspring/models/add_template_fields_request.rb +1 -1
- data/lib/docspring/models/ai_field_naming_language.rb +1 -1
- data/lib/docspring/models/authentication_check.rb +1 -1
- data/lib/docspring/models/barcode_symbology.rb +1 -1
- data/lib/docspring/models/check_character.rb +1 -1
- data/lib/docspring/models/combined_field_type.rb +1 -1
- data/lib/docspring/models/combined_pdf.rb +1 -1
- data/lib/docspring/models/combined_pdf_files.rb +1 -1
- data/lib/docspring/models/combined_pdf_list.rb +1 -1
- data/lib/docspring/models/combined_pdf_source.rb +1 -1
- data/lib/docspring/models/combined_pdf_source_input.rb +1 -1
- data/lib/docspring/models/combined_pdf_source_pdf.rb +1 -1
- data/lib/docspring/models/combined_pdf_source_type.rb +1 -1
- data/lib/docspring/models/combined_pdf_state.rb +1 -1
- data/lib/docspring/models/copy_template_request.rb +1 -1
- data/lib/docspring/models/create_combined_pdf_request.rb +1 -1
- data/lib/docspring/models/create_custom_file_from_upload_request.rb +1 -1
- data/lib/docspring/models/create_folder_request.rb +1 -1
- data/lib/docspring/models/create_signature_request_event_request.rb +1 -1
- data/lib/docspring/models/create_signature_request_token_request.rb +1 -1
- data/lib/docspring/models/create_submission_batch_request.rb +1 -1
- data/lib/docspring/models/create_submission_request.rb +4 -4
- data/lib/docspring/models/create_template_preview_request.rb +1 -1
- data/lib/docspring/models/create_template_request.rb +21 -11
- data/lib/docspring/models/create_webhook_request.rb +1 -1
- data/lib/docspring/models/custom_file.rb +1 -1
- data/lib/docspring/models/custom_file_list.rb +1 -1
- data/lib/docspring/models/custom_file_source_pdf.rb +1 -1
- data/lib/docspring/models/error_code.rb +1 -1
- data/lib/docspring/models/error_detail.rb +1 -1
- data/lib/docspring/models/error_info.rb +2 -2
- data/lib/docspring/models/error_response.rb +1 -1
- data/lib/docspring/models/expiration_interval.rb +1 -1
- data/lib/docspring/models/field.rb +2 -2
- data/lib/docspring/models/field_comparison_condition.rb +1 -1
- data/lib/docspring/models/field_comparison_operator.rb +1 -1
- data/lib/docspring/models/field_dependency.rb +1 -1
- data/lib/docspring/models/field_dependency_input.rb +1 -1
- data/lib/docspring/models/field_display_type.rb +1 -1
- data/lib/docspring/models/field_equals_condition.rb +1 -1
- data/lib/docspring/models/field_equals_operator.rb +1 -1
- data/lib/docspring/models/field_group.rb +3 -3
- data/lib/docspring/models/field_group_input.rb +2 -2
- data/lib/docspring/models/field_group_type.rb +1 -1
- data/lib/docspring/models/field_in_condition.rb +1 -1
- data/lib/docspring/models/field_input.rb +2 -2
- data/lib/docspring/models/field_override.rb +1 -1
- data/lib/docspring/models/field_presence_condition.rb +1 -1
- data/lib/docspring/models/field_presence_operator.rb +1 -1
- data/lib/docspring/models/field_range_condition.rb +1 -1
- data/lib/docspring/models/field_reimport_state.rb +1 -1
- data/lib/docspring/models/field_setup_logic.rb +1 -1
- data/lib/docspring/models/field_setup_naming.rb +1 -1
- data/lib/docspring/models/field_setup_source.rb +1 -1
- data/lib/docspring/models/field_type.rb +1 -1
- data/lib/docspring/models/folder.rb +1 -1
- data/lib/docspring/models/folder_list.rb +1 -1
- data/lib/docspring/models/generate_files_format.rb +5 -2
- data/lib/docspring/models/generate_submission_files_request.rb +2 -2
- data/lib/docspring/models/generated_file.rb +4 -4
- data/lib/docspring/models/generated_file_state.rb +1 -1
- data/lib/docspring/models/html_engine_options.rb +1 -1
- data/lib/docspring/models/html_engine_options_input.rb +1 -1
- data/lib/docspring/models/image_gravity.rb +1 -1
- data/lib/docspring/models/image_scale_type.rb +1 -1
- data/lib/docspring/models/model_code_language.rb +3 -2
- data/lib/docspring/models/move_folder_request.rb +1 -1
- data/lib/docspring/models/move_template_request.rb +1 -1
- data/lib/docspring/models/number_condition_type.rb +1 -1
- data/lib/docspring/models/output_format.rb +4 -2
- data/lib/docspring/models/page_format.rb +1 -1
- data/lib/docspring/models/page_image.rb +1 -1
- data/lib/docspring/models/page_images.rb +1 -1
- data/lib/docspring/models/predefined_field.rb +1 -1
- data/lib/docspring/models/predefined_field_input.rb +1 -1
- data/lib/docspring/models/publish_template_version_request.rb +1 -1
- data/lib/docspring/models/remove_template_fields_request.rb +1 -1
- data/lib/docspring/models/rename_folder_request.rb +1 -1
- data/lib/docspring/models/reorder_template_fields_request.rb +1 -1
- data/lib/docspring/models/restore_template_version_request.rb +1 -1
- data/lib/docspring/models/shape_type.rb +1 -1
- data/lib/docspring/models/signature_request.rb +1 -1
- data/lib/docspring/models/signature_request_auth_second_factor_type.rb +1 -1
- data/lib/docspring/models/signature_request_auth_type.rb +1 -1
- data/lib/docspring/models/signature_request_event.rb +1 -1
- data/lib/docspring/models/signature_request_event_type.rb +1 -1
- data/lib/docspring/models/signature_request_input.rb +1 -1
- data/lib/docspring/models/signature_request_message_type.rb +1 -1
- data/lib/docspring/models/signature_request_state.rb +1 -1
- data/lib/docspring/models/signature_request_token.rb +1 -1
- data/lib/docspring/models/signature_request_token_type.rb +1 -1
- data/lib/docspring/models/string_condition_type.rb +1 -1
- data/lib/docspring/models/submission.rb +6 -6
- data/lib/docspring/models/submission_action.rb +1 -1
- data/lib/docspring/models/submission_action_state.rb +1 -1
- data/lib/docspring/models/submission_action_type.rb +1 -1
- data/lib/docspring/models/submission_batch.rb +5 -5
- data/lib/docspring/models/submission_batch_state.rb +1 -1
- data/lib/docspring/models/submission_files.rb +22 -2
- data/lib/docspring/models/submission_input.rb +4 -4
- data/lib/docspring/models/submission_list.rb +1 -1
- data/lib/docspring/models/submission_source.rb +1 -1
- data/lib/docspring/models/submission_source_pdf.rb +1 -1
- data/lib/docspring/models/submission_state.rb +1 -1
- data/lib/docspring/models/submission_summary.rb +3 -3
- data/lib/docspring/models/submission_validation.rb +1 -1
- data/lib/docspring/models/template.rb +37 -10
- data/lib/docspring/models/template_actor.rb +1 -1
- data/lib/docspring/models/template_actor_type.rb +1 -1
- data/lib/docspring/models/template_defaults.rb +1 -1
- data/lib/docspring/models/template_defaults_input.rb +1 -1
- data/lib/docspring/models/template_diff.rb +3 -3
- data/lib/docspring/models/template_diff_summary.rb +1 -1
- data/lib/docspring/models/template_document.rb +12 -12
- data/lib/docspring/models/template_document_state.rb +4 -2
- data/lib/docspring/models/template_document_summary.rb +6 -6
- data/lib/docspring/models/template_field_change.rb +1 -1
- data/lib/docspring/models/template_field_changes.rb +1 -1
- data/lib/docspring/models/template_field_dependency.rb +1 -1
- data/lib/docspring/models/template_field_dependency_action.rb +1 -1
- data/lib/docspring/models/template_field_dependency_condition.rb +1 -1
- data/lib/docspring/models/template_field_dependency_condition_input.rb +1 -1
- data/lib/docspring/models/template_field_dependency_input.rb +1 -1
- data/lib/docspring/models/template_field_dependency_match.rb +1 -1
- data/lib/docspring/models/template_field_dependency_operator.rb +1 -1
- data/lib/docspring/models/template_field_logic_status.rb +1 -1
- data/lib/docspring/models/template_field_move.rb +1 -1
- data/lib/docspring/models/template_fields.rb +1 -1
- data/lib/docspring/models/template_form_mode.rb +1 -1
- data/lib/docspring/models/template_model_code.rb +1 -1
- data/lib/docspring/models/template_page_ai_error.rb +1 -1
- data/lib/docspring/models/template_page_ai_naming_status.rb +1 -1
- data/lib/docspring/models/template_page_fields_status.rb +1 -1
- data/lib/docspring/models/template_page_image_status.rb +1 -1
- data/lib/docspring/models/template_page_images.rb +1 -1
- data/lib/docspring/models/template_page_processing_status.rb +1 -1
- data/lib/docspring/models/template_preview.rb +3 -3
- data/lib/docspring/models/template_preview_state.rb +1 -1
- data/lib/docspring/models/template_source_pdf.rb +1 -1
- data/lib/docspring/models/template_summary.rb +32 -5
- data/lib/docspring/models/template_summary_list.rb +1 -1
- data/lib/docspring/models/template_type.rb +3 -2
- data/lib/docspring/models/template_version.rb +1 -1
- data/lib/docspring/models/template_version_type.rb +1 -1
- data/lib/docspring/models/text_alignment.rb +1 -1
- data/lib/docspring/models/text_overflow.rb +1 -1
- data/lib/docspring/models/text_vertical_alignment.rb +1 -1
- data/lib/docspring/models/typeface.rb +1 -1
- data/lib/docspring/models/update_signature_request_request.rb +1 -1
- data/lib/docspring/models/update_template_document_request.rb +7 -7
- data/lib/docspring/models/update_template_fields_request.rb +1 -1
- data/lib/docspring/models/update_template_request.rb +16 -6
- data/lib/docspring/models/update_webhook_request.rb +1 -1
- data/lib/docspring/models/upload_method.rb +1 -1
- data/lib/docspring/models/upload_presign.rb +1 -1
- data/lib/docspring/models/url_source_pdf.rb +1 -1
- data/lib/docspring/models/validate_submission_request.rb +4 -4
- data/lib/docspring/models/webhook.rb +1 -1
- data/lib/docspring/models/webhook_event_type.rb +1 -1
- data/lib/docspring/models/webhook_list.rb +1 -1
- data/lib/docspring/models/webhook_mode.rb +1 -1
- data/lib/docspring/request_schemas.json +39 -2
- data/lib/docspring/version.rb +2 -2
- data/lib/docspring.rb +1 -1
- data/spec/api/client_spec.rb +25 -24
- data/spec/models/add_template_fields_request_spec.rb +1 -1
- data/spec/models/ai_field_naming_language_spec.rb +1 -1
- data/spec/models/authentication_check_spec.rb +1 -1
- data/spec/models/barcode_symbology_spec.rb +1 -1
- data/spec/models/check_character_spec.rb +1 -1
- data/spec/models/combined_field_type_spec.rb +1 -1
- data/spec/models/combined_pdf_files_spec.rb +1 -1
- data/spec/models/combined_pdf_list_spec.rb +1 -1
- data/spec/models/combined_pdf_source_input_spec.rb +1 -1
- data/spec/models/combined_pdf_source_pdf_spec.rb +1 -1
- data/spec/models/combined_pdf_source_spec.rb +1 -1
- data/spec/models/combined_pdf_source_type_spec.rb +1 -1
- data/spec/models/combined_pdf_spec.rb +1 -1
- data/spec/models/combined_pdf_state_spec.rb +1 -1
- data/spec/models/copy_template_request_spec.rb +1 -1
- data/spec/models/create_combined_pdf_request_spec.rb +1 -1
- data/spec/models/create_custom_file_from_upload_request_spec.rb +1 -1
- data/spec/models/create_folder_request_spec.rb +1 -1
- data/spec/models/create_signature_request_event_request_spec.rb +1 -1
- data/spec/models/create_signature_request_token_request_spec.rb +1 -1
- data/spec/models/create_submission_batch_request_spec.rb +1 -1
- data/spec/models/create_submission_request_spec.rb +1 -1
- data/spec/models/create_template_preview_request_spec.rb +1 -1
- data/spec/models/create_template_request_spec.rb +7 -1
- data/spec/models/create_webhook_request_spec.rb +1 -1
- data/spec/models/custom_file_list_spec.rb +1 -1
- data/spec/models/custom_file_source_pdf_spec.rb +1 -1
- data/spec/models/custom_file_spec.rb +1 -1
- data/spec/models/error_code_spec.rb +1 -1
- data/spec/models/error_detail_spec.rb +1 -1
- data/spec/models/error_info_spec.rb +1 -1
- data/spec/models/error_response_spec.rb +1 -1
- data/spec/models/expiration_interval_spec.rb +1 -1
- data/spec/models/field_comparison_condition_spec.rb +1 -1
- data/spec/models/field_comparison_operator_spec.rb +1 -1
- data/spec/models/field_dependency_input_spec.rb +1 -1
- data/spec/models/field_dependency_spec.rb +1 -1
- data/spec/models/field_display_type_spec.rb +1 -1
- data/spec/models/field_equals_condition_spec.rb +1 -1
- data/spec/models/field_equals_operator_spec.rb +1 -1
- data/spec/models/field_group_input_spec.rb +1 -1
- data/spec/models/field_group_spec.rb +1 -1
- data/spec/models/field_group_type_spec.rb +1 -1
- data/spec/models/field_in_condition_spec.rb +1 -1
- data/spec/models/field_input_spec.rb +1 -1
- data/spec/models/field_override_spec.rb +1 -1
- data/spec/models/field_presence_condition_spec.rb +1 -1
- data/spec/models/field_presence_operator_spec.rb +1 -1
- data/spec/models/field_range_condition_spec.rb +1 -1
- data/spec/models/field_reimport_state_spec.rb +1 -1
- data/spec/models/field_setup_logic_spec.rb +1 -1
- data/spec/models/field_setup_naming_spec.rb +1 -1
- data/spec/models/field_setup_source_spec.rb +1 -1
- data/spec/models/field_spec.rb +1 -1
- data/spec/models/field_type_spec.rb +1 -1
- data/spec/models/folder_list_spec.rb +1 -1
- data/spec/models/folder_spec.rb +1 -1
- data/spec/models/generate_files_format_spec.rb +1 -1
- data/spec/models/generate_submission_files_request_spec.rb +1 -1
- data/spec/models/generated_file_spec.rb +1 -1
- data/spec/models/generated_file_state_spec.rb +1 -1
- data/spec/models/html_engine_options_input_spec.rb +1 -1
- data/spec/models/html_engine_options_spec.rb +1 -1
- data/spec/models/image_gravity_spec.rb +1 -1
- data/spec/models/image_scale_type_spec.rb +1 -1
- data/spec/models/model_code_language_spec.rb +1 -1
- data/spec/models/move_folder_request_spec.rb +1 -1
- data/spec/models/move_template_request_spec.rb +1 -1
- data/spec/models/number_condition_type_spec.rb +1 -1
- data/spec/models/output_format_spec.rb +1 -1
- data/spec/models/page_format_spec.rb +1 -1
- data/spec/models/page_image_spec.rb +1 -1
- data/spec/models/page_images_spec.rb +1 -1
- data/spec/models/predefined_field_input_spec.rb +1 -1
- data/spec/models/predefined_field_spec.rb +1 -1
- data/spec/models/publish_template_version_request_spec.rb +1 -1
- data/spec/models/remove_template_fields_request_spec.rb +1 -1
- data/spec/models/rename_folder_request_spec.rb +1 -1
- data/spec/models/reorder_template_fields_request_spec.rb +1 -1
- data/spec/models/restore_template_version_request_spec.rb +1 -1
- data/spec/models/shape_type_spec.rb +1 -1
- data/spec/models/signature_request_auth_second_factor_type_spec.rb +1 -1
- data/spec/models/signature_request_auth_type_spec.rb +1 -1
- data/spec/models/signature_request_event_spec.rb +1 -1
- data/spec/models/signature_request_event_type_spec.rb +1 -1
- data/spec/models/signature_request_input_spec.rb +1 -1
- data/spec/models/signature_request_message_type_spec.rb +1 -1
- data/spec/models/signature_request_spec.rb +1 -1
- data/spec/models/signature_request_state_spec.rb +1 -1
- data/spec/models/signature_request_token_spec.rb +1 -1
- data/spec/models/signature_request_token_type_spec.rb +1 -1
- data/spec/models/string_condition_type_spec.rb +1 -1
- data/spec/models/submission_action_spec.rb +1 -1
- data/spec/models/submission_action_state_spec.rb +1 -1
- data/spec/models/submission_action_type_spec.rb +1 -1
- data/spec/models/submission_batch_spec.rb +1 -1
- data/spec/models/submission_batch_state_spec.rb +1 -1
- data/spec/models/submission_files_spec.rb +13 -1
- data/spec/models/submission_input_spec.rb +1 -1
- data/spec/models/submission_list_spec.rb +1 -1
- data/spec/models/submission_source_pdf_spec.rb +1 -1
- data/spec/models/submission_source_spec.rb +1 -1
- data/spec/models/submission_spec.rb +1 -1
- data/spec/models/submission_state_spec.rb +1 -1
- data/spec/models/submission_summary_spec.rb +1 -1
- data/spec/models/submission_validation_spec.rb +1 -1
- data/spec/models/template_actor_spec.rb +1 -1
- data/spec/models/template_actor_type_spec.rb +1 -1
- data/spec/models/template_defaults_input_spec.rb +1 -1
- data/spec/models/template_defaults_spec.rb +1 -1
- data/spec/models/template_diff_spec.rb +1 -1
- data/spec/models/template_diff_summary_spec.rb +1 -1
- data/spec/models/template_document_spec.rb +1 -1
- data/spec/models/template_document_state_spec.rb +1 -1
- data/spec/models/template_document_summary_spec.rb +1 -1
- data/spec/models/template_field_change_spec.rb +1 -1
- data/spec/models/template_field_changes_spec.rb +1 -1
- data/spec/models/template_field_dependency_action_spec.rb +1 -1
- data/spec/models/template_field_dependency_condition_input_spec.rb +1 -1
- data/spec/models/template_field_dependency_condition_spec.rb +1 -1
- data/spec/models/template_field_dependency_input_spec.rb +1 -1
- data/spec/models/template_field_dependency_match_spec.rb +1 -1
- data/spec/models/template_field_dependency_operator_spec.rb +1 -1
- data/spec/models/template_field_dependency_spec.rb +1 -1
- data/spec/models/template_field_logic_status_spec.rb +1 -1
- data/spec/models/template_field_move_spec.rb +1 -1
- data/spec/models/template_fields_spec.rb +1 -1
- data/spec/models/template_form_mode_spec.rb +1 -1
- data/spec/models/template_model_code_spec.rb +1 -1
- data/spec/models/template_page_ai_error_spec.rb +1 -1
- data/spec/models/template_page_ai_naming_status_spec.rb +1 -1
- data/spec/models/template_page_fields_status_spec.rb +1 -1
- data/spec/models/template_page_image_status_spec.rb +1 -1
- data/spec/models/template_page_images_spec.rb +1 -1
- data/spec/models/template_page_processing_status_spec.rb +1 -1
- data/spec/models/template_preview_spec.rb +1 -1
- data/spec/models/template_preview_state_spec.rb +1 -1
- data/spec/models/template_source_pdf_spec.rb +1 -1
- data/spec/models/template_spec.rb +7 -1
- data/spec/models/template_summary_list_spec.rb +1 -1
- data/spec/models/template_summary_spec.rb +7 -1
- data/spec/models/template_type_spec.rb +1 -1
- data/spec/models/template_version_spec.rb +1 -1
- data/spec/models/template_version_type_spec.rb +1 -1
- data/spec/models/text_alignment_spec.rb +1 -1
- data/spec/models/text_overflow_spec.rb +1 -1
- data/spec/models/text_vertical_alignment_spec.rb +1 -1
- data/spec/models/typeface_spec.rb +1 -1
- data/spec/models/update_signature_request_request_spec.rb +1 -1
- data/spec/models/update_template_document_request_spec.rb +1 -1
- data/spec/models/update_template_fields_request_spec.rb +1 -1
- data/spec/models/update_template_request_spec.rb +7 -1
- data/spec/models/update_webhook_request_spec.rb +1 -1
- data/spec/models/upload_method_spec.rb +1 -1
- data/spec/models/upload_presign_spec.rb +1 -1
- data/spec/models/url_source_pdf_spec.rb +1 -1
- data/spec/models/validate_submission_request_spec.rb +1 -1
- data/spec/models/webhook_event_type_spec.rb +1 -1
- data/spec/models/webhook_list_spec.rb +1 -1
- data/spec/models/webhook_mode_spec.rb +1 -1
- data/spec/models/webhook_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- metadata +3 -2
data/docspring.gemspec
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
=begin
|
|
4
4
|
#DocSpring API
|
|
5
5
|
|
|
6
|
-
#Use DocSpring's API to
|
|
6
|
+
#Use DocSpring's API to fill PDF forms, generate PDFs and Word documents from HTML or Word templates, merge PDFs, and request legally binding e-signatures.
|
|
7
7
|
|
|
8
8
|
The version of the OpenAPI document: v2
|
|
9
9
|
|
|
@@ -23,7 +23,7 @@ Gem::Specification.new do |s|
|
|
|
23
23
|
s.email = ["support@docspring.com"]
|
|
24
24
|
s.homepage = "https://github.com/DocSpring/docspring-ruby"
|
|
25
25
|
s.summary = "DocSpring API Client"
|
|
26
|
-
s.description = "Client library for the DocSpring PDF
|
|
26
|
+
s.description = "Client library for the DocSpring API: fill PDF forms, generate PDFs and Word documents, and collect e-signatures"
|
|
27
27
|
s.license = "MIT"
|
|
28
28
|
s.required_ruby_version = ">= 2.7"
|
|
29
29
|
s.metadata = {}
|
data/lib/docspring/api/client.rb
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#DocSpring API
|
|
3
3
|
|
|
4
|
-
#Use DocSpring's API to
|
|
4
|
+
#Use DocSpring's API to fill PDF forms, generate PDFs and Word documents from HTML or Word templates, merge PDFs, and request legally binding e-signatures.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: v2
|
|
7
7
|
|
|
@@ -651,7 +651,7 @@ end
|
|
|
651
651
|
# Creates up to 50 submissions in one request, from one template or several. The PDFs are only generated when every submission is valid. On sync.api hosts the request waits until every PDF has been generated (unless you pass `wait=false`), otherwise poll GET /submissions/batches/{submission_batch_id} until `processed_at` is set. When any submission is invalid, nothing is generated and the request returns a 422. Submissions whose data doesn't match their template's fields are still saved with their errors (an `invalid_data` error, with each one's `submission_id` in its details), so you can find them in DocSpring. The other submissions aren't saved.
|
|
652
652
|
# @param body [CreateSubmissionBatchRequest] The submissions to create, and the settings they share.
|
|
653
653
|
# @param [Hash] opts the optional parameters
|
|
654
|
-
# @option opts [Boolean] :wait Wait until every
|
|
654
|
+
# @option opts [Boolean] :wait Wait until every file in the batch has been generated before responding. Default true on sync.api hosts.
|
|
655
655
|
# @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of creating another batch. Send a new key with each new batch, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` means the first request is still being processed: send the request again in a few seconds.
|
|
656
656
|
# @return [SubmissionBatch]
|
|
657
657
|
def create_submission_batch(body, opts = {})
|
|
@@ -663,7 +663,7 @@ end
|
|
|
663
663
|
# Creates up to 50 submissions in one request, from one template or several. The PDFs are only generated when every submission is valid. On sync.api hosts the request waits until every PDF has been generated (unless you pass `wait=false`), otherwise poll GET /submissions/batches/{submission_batch_id} until `processed_at` is set. When any submission is invalid, nothing is generated and the request returns a 422. Submissions whose data doesn't match their template's fields are still saved with their errors (an `invalid_data` error, with each one's `submission_id` in its details), so you can find them in DocSpring. The other submissions aren't saved.
|
|
664
664
|
# @param body [CreateSubmissionBatchRequest] The submissions to create, and the settings they share.
|
|
665
665
|
# @param [Hash] opts the optional parameters
|
|
666
|
-
# @option opts [Boolean] :wait Wait until every
|
|
666
|
+
# @option opts [Boolean] :wait Wait until every file in the batch has been generated before responding. Default true on sync.api hosts.
|
|
667
667
|
# @option opts [String] :idempotency_key A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of creating another batch. Send a new key with each new batch, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` means the first request is still being processed: send the request again in a few seconds.
|
|
668
668
|
# @return [Array<(SubmissionBatch, Integer, Hash)>] SubmissionBatch data, response status code and response headers
|
|
669
669
|
def create_submission_batch_with_http_info(body, opts = {})
|
|
@@ -722,10 +722,10 @@ end
|
|
|
722
722
|
end
|
|
723
723
|
|
|
724
724
|
# Create a template
|
|
725
|
-
# Creates an HTML template, or a PDF template from a
|
|
725
|
+
# Creates an HTML template, or a PDF or Word template from a file you uploaded with the presigned upload (GET /uploads/presign): pass its `fields.key` as `cache_id`. You can send a link to the file (`document_url`) or the file in base64 (`document_base64`) instead, or send the file with the request with POST /templates/upload. A Word template is made from a Word document (.docx) or an OpenDocument text file (.odt), which DocSpring converts to a Word document. It needs its `output_format`: what each submission makes, a Word document (`docx`), an OpenDocument file (`odt`) or a PDF. A PDF template is ready to generate PDFs once DocSpring has processed its PDF, a template created from a `document_url` once its document has been downloaded, and one created from an .odt once it has been converted (`ready` is true). On sync.api hosts the request waits for that unless you pass `wait=false`.
|
|
726
726
|
# @param body [CreateTemplateRequest] The template to create.
|
|
727
727
|
# @param [Hash] opts the optional parameters
|
|
728
|
-
# @option opts [Boolean] :wait Wait until the PDF has been processed,
|
|
728
|
+
# @option opts [Boolean] :wait Wait until the PDF has been processed, a `document_url`'s PDF or Word document downloaded, and an OpenDocument file converted, before responding. Default true on sync.api hosts.
|
|
729
729
|
# @return [Template]
|
|
730
730
|
def create_template(body, opts = {})
|
|
731
731
|
data, _status_code, _headers = create_template_with_http_info(body, opts)
|
|
@@ -733,10 +733,10 @@ end
|
|
|
733
733
|
end
|
|
734
734
|
|
|
735
735
|
# Create a template
|
|
736
|
-
# Creates an HTML template, or a PDF template from a
|
|
736
|
+
# Creates an HTML template, or a PDF or Word template from a file you uploaded with the presigned upload (GET /uploads/presign): pass its `fields.key` as `cache_id`. You can send a link to the file (`document_url`) or the file in base64 (`document_base64`) instead, or send the file with the request with POST /templates/upload. A Word template is made from a Word document (.docx) or an OpenDocument text file (.odt), which DocSpring converts to a Word document. It needs its `output_format`: what each submission makes, a Word document (`docx`), an OpenDocument file (`odt`) or a PDF. A PDF template is ready to generate PDFs once DocSpring has processed its PDF, a template created from a `document_url` once its document has been downloaded, and one created from an .odt once it has been converted (`ready` is true). On sync.api hosts the request waits for that unless you pass `wait=false`.
|
|
737
737
|
# @param body [CreateTemplateRequest] The template to create.
|
|
738
738
|
# @param [Hash] opts the optional parameters
|
|
739
|
-
# @option opts [Boolean] :wait Wait until the PDF has been processed,
|
|
739
|
+
# @option opts [Boolean] :wait Wait until the PDF has been processed, a `document_url`'s PDF or Word document downloaded, and an OpenDocument file converted, before responding. Default true on sync.api hosts.
|
|
740
740
|
# @return [Array<(Template, Integer, Hash)>] Template data, response status code and response headers
|
|
741
741
|
def create_template_with_http_info(body, opts = {})
|
|
742
742
|
if @api_client.config.debugging
|
|
@@ -793,7 +793,7 @@ end
|
|
|
793
793
|
end
|
|
794
794
|
|
|
795
795
|
# Preview a template with data
|
|
796
|
-
# Makes PNG images of a template's pages filled in with the data you send (not a PDF), so you can check how an HTML or
|
|
796
|
+
# Makes PNG images of a template's pages filled in with the data you send (not a PDF), so you can check how an HTML, PDF or Word template prints with your data before you publish a version or send live data. A Word template's pages are its PDF's, whatever its `output_format`. It renders the template's draft, or the published `version` you ask for. A preview makes no submission and uses no credits, and its pages are watermarked like a test submission's PDF. It's `pending` while it renders: get it with GET /templates/{template_id}/previews/{preview_id} until it's `processed`, with an image of each page, or `error`.
|
|
797
797
|
# @param template_id [String] The template's ID.
|
|
798
798
|
# @param body [CreateTemplatePreviewRequest] The data to render the template with.
|
|
799
799
|
# @param [Hash] opts the optional parameters
|
|
@@ -805,7 +805,7 @@ end
|
|
|
805
805
|
end
|
|
806
806
|
|
|
807
807
|
# Preview a template with data
|
|
808
|
-
# Makes PNG images of a template's pages filled in with the data you send (not a PDF), so you can check how an HTML or
|
|
808
|
+
# Makes PNG images of a template's pages filled in with the data you send (not a PDF), so you can check how an HTML, PDF or Word template prints with your data before you publish a version or send live data. A Word template's pages are its PDF's, whatever its `output_format`. It renders the template's draft, or the published `version` you ask for. A preview makes no submission and uses no credits, and its pages are watermarked like a test submission's PDF. It's `pending` while it renders: get it with GET /templates/{template_id}/previews/{preview_id} until it's `processed`, with an image of each page, or `error`.
|
|
809
809
|
# @param template_id [String] The template's ID.
|
|
810
810
|
# @param body [CreateTemplatePreviewRequest] The data to render the template with.
|
|
811
811
|
# @param [Hash] opts the optional parameters
|
|
@@ -1319,7 +1319,7 @@ end
|
|
|
1319
1319
|
end
|
|
1320
1320
|
|
|
1321
1321
|
# Generate more files
|
|
1322
|
-
# Adds formats to a processed submission's files, in the background: `png`, a PNG image of each page of the PDF (up to 100 pages). To make them with the submission, add them to `output_formats` when you create it. Each new file is listed in `files` while it's made: on sync.api hosts the request waits for them (unless you pass `wait=false`), otherwise poll GET /submissions/{submission_id} until none of their `state` is `pending`. A file that couldn't be made has the state `error` and an `error_message`, and the submission stays processed. Asking for a format the submission already has (or is making) changes nothing.
|
|
1322
|
+
# Adds formats to a processed submission's files, in the background, without using credits again: `pdf`, the PDF of a Word template's submission that made only its Word document (converted from that document), `docx`, the Word document of a Word template's submission that made only its PDF (made again from its data and the template version it used), `odt`, a Word template's submission's OpenDocument file (converted from its Word document, or from one made again when it didn't keep one), and `png`, a PNG image of each page of the PDF (up to 100 pages), which makes the PDF first when the submission doesn't have one. To make them with the submission, add them to `output_formats` when you create it. Each new file is listed in `files` while it's made: on sync.api hosts the request waits for them (unless you pass `wait=false`), otherwise poll GET /submissions/{submission_id} until none of their `state` is `pending`. A file that couldn't be made has the state `error` and an `error_message`, and the submission stays processed. Asking for a format the submission already has (or is making) changes nothing.
|
|
1323
1323
|
# @param submission_id [String] The submission's ID.
|
|
1324
1324
|
# @param body [GenerateSubmissionFilesRequest] The formats to make.
|
|
1325
1325
|
# @param [Hash] opts the optional parameters
|
|
@@ -1331,7 +1331,7 @@ end
|
|
|
1331
1331
|
end
|
|
1332
1332
|
|
|
1333
1333
|
# Generate more files
|
|
1334
|
-
# Adds formats to a processed submission's files, in the background: `png`, a PNG image of each page of the PDF (up to 100 pages). To make them with the submission, add them to `output_formats` when you create it. Each new file is listed in `files` while it's made: on sync.api hosts the request waits for them (unless you pass `wait=false`), otherwise poll GET /submissions/{submission_id} until none of their `state` is `pending`. A file that couldn't be made has the state `error` and an `error_message`, and the submission stays processed. Asking for a format the submission already has (or is making) changes nothing.
|
|
1334
|
+
# Adds formats to a processed submission's files, in the background, without using credits again: `pdf`, the PDF of a Word template's submission that made only its Word document (converted from that document), `docx`, the Word document of a Word template's submission that made only its PDF (made again from its data and the template version it used), `odt`, a Word template's submission's OpenDocument file (converted from its Word document, or from one made again when it didn't keep one), and `png`, a PNG image of each page of the PDF (up to 100 pages), which makes the PDF first when the submission doesn't have one. To make them with the submission, add them to `output_formats` when you create it. Each new file is listed in `files` while it's made: on sync.api hosts the request waits for them (unless you pass `wait=false`), otherwise poll GET /submissions/{submission_id} until none of their `state` is `pending`. A file that couldn't be made has the state `error` and an `error_message`, and the submission stays processed. Asking for a format the submission already has (or is making) changes nothing.
|
|
1335
1335
|
# @param submission_id [String] The submission's ID.
|
|
1336
1336
|
# @param body [GenerateSubmissionFilesRequest] The formats to make.
|
|
1337
1337
|
# @param [Hash] opts the optional parameters
|
|
@@ -2029,12 +2029,12 @@ end
|
|
|
2029
2029
|
end
|
|
2030
2030
|
|
|
2031
2031
|
# Generate typed code for a template's submission data
|
|
2032
|
-
# Generates types for a template's submission data in TypeScript, JavaScript, Ruby, Python, PHP, Java, C#, Elixir or
|
|
2032
|
+
# Generates types for a template's submission data in TypeScript, JavaScript, Ruby, Python, PHP, Java, C#, Elixir, Go or Rust, so your app catches mistakes before it calls the API. `root_type_name` is the type of the whole `data` object, and `just_types=true` leaves out the code that converts JSON to and from the types. Java returns every class in `code`, each under a `// ClassName.java` comment. A template with no named fields returns 422.
|
|
2033
2033
|
# @param template_id [String] The template's ID.
|
|
2034
2034
|
# @param lang [ModelCodeLanguage] The language to generate the code in.
|
|
2035
2035
|
# @param [Hash] opts the optional parameters
|
|
2036
2036
|
# @option opts [String] :version The template version: a published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `latest` (the draft when no version has been published), the version a submission uses by default.
|
|
2037
|
-
# @option opts [Boolean] :just_types Return only the types (interfaces, classes or structs), without the code that converts JSON to and from them. Default false. JavaScript has no types
|
|
2037
|
+
# @option opts [Boolean] :just_types Return only the types (interfaces, classes or structs), without the code that converts JSON to and from them. Default false. JavaScript has no types, PHP has no types-only code, and Rust's code is only types (serde converts the JSON), so theirs is the same either way.
|
|
2038
2038
|
# @return [TemplateModelCode]
|
|
2039
2039
|
def get_template_model_code(template_id, lang, opts = {})
|
|
2040
2040
|
data, _status_code, _headers = get_template_model_code_with_http_info(template_id, lang, opts)
|
|
@@ -2042,12 +2042,12 @@ end
|
|
|
2042
2042
|
end
|
|
2043
2043
|
|
|
2044
2044
|
# Generate typed code for a template's submission data
|
|
2045
|
-
# Generates types for a template's submission data in TypeScript, JavaScript, Ruby, Python, PHP, Java, C#, Elixir or
|
|
2045
|
+
# Generates types for a template's submission data in TypeScript, JavaScript, Ruby, Python, PHP, Java, C#, Elixir, Go or Rust, so your app catches mistakes before it calls the API. `root_type_name` is the type of the whole `data` object, and `just_types=true` leaves out the code that converts JSON to and from the types. Java returns every class in `code`, each under a `// ClassName.java` comment. A template with no named fields returns 422.
|
|
2046
2046
|
# @param template_id [String] The template's ID.
|
|
2047
2047
|
# @param lang [ModelCodeLanguage] The language to generate the code in.
|
|
2048
2048
|
# @param [Hash] opts the optional parameters
|
|
2049
2049
|
# @option opts [String] :version The template version: a published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `latest` (the draft when no version has been published), the version a submission uses by default.
|
|
2050
|
-
# @option opts [Boolean] :just_types Return only the types (interfaces, classes or structs), without the code that converts JSON to and from them. Default false. JavaScript has no types
|
|
2050
|
+
# @option opts [Boolean] :just_types Return only the types (interfaces, classes or structs), without the code that converts JSON to and from them. Default false. JavaScript has no types, PHP has no types-only code, and Rust's code is only types (serde converts the JSON), so theirs is the same either way.
|
|
2051
2051
|
# @return [Array<(TemplateModelCode, Integer, Hash)>] TemplateModelCode data, response status code and response headers
|
|
2052
2052
|
def get_template_model_code_with_http_info(template_id, lang, opts = {})
|
|
2053
2053
|
if @api_client.config.debugging
|
|
@@ -3093,7 +3093,7 @@ end
|
|
|
3093
3093
|
end
|
|
3094
3094
|
|
|
3095
3095
|
# Publish a template version
|
|
3096
|
-
# Publishes the template's draft as a new version
|
|
3096
|
+
# Publishes the template's draft as a new version. Its content (the PDF or HTML, fields, name and description) never changes, while settings such as `webhook_url` and `public_submissions` keep following the draft. `version_type` says which part of the latest version number goes up. While the template's PDF is downloading or being processed, or DocSpring is setting up its fields, it returns a 409 that says so.
|
|
3097
3097
|
# @param template_id [String] The template's ID.
|
|
3098
3098
|
# @param body [PublishTemplateVersionRequest] The version to publish.
|
|
3099
3099
|
# @param [Hash] opts the optional parameters
|
|
@@ -3104,7 +3104,7 @@ end
|
|
|
3104
3104
|
end
|
|
3105
3105
|
|
|
3106
3106
|
# Publish a template version
|
|
3107
|
-
# Publishes the template's draft as a new version
|
|
3107
|
+
# Publishes the template's draft as a new version. Its content (the PDF or HTML, fields, name and description) never changes, while settings such as `webhook_url` and `public_submissions` keep following the draft. `version_type` says which part of the latest version number goes up. While the template's PDF is downloading or being processed, or DocSpring is setting up its fields, it returns a 409 that says so.
|
|
3108
3108
|
# @param template_id [String] The template's ID.
|
|
3109
3109
|
# @param body [PublishTemplateVersionRequest] The version to publish.
|
|
3110
3110
|
# @param [Hash] opts the optional parameters
|
|
@@ -3389,7 +3389,7 @@ end
|
|
|
3389
3389
|
end
|
|
3390
3390
|
|
|
3391
3391
|
# Restore a template version
|
|
3392
|
-
# Replaces the template's draft with a copy of one of its published versions.
|
|
3392
|
+
# Replaces the template's draft with a copy of one of its published versions. The draft keeps its settings that apply to every version, such as `webhook_url`.
|
|
3393
3393
|
# @param template_id [String] The template's ID.
|
|
3394
3394
|
# @param body [RestoreTemplateVersionRequest] The version to restore.
|
|
3395
3395
|
# @param [Hash] opts the optional parameters
|
|
@@ -3400,7 +3400,7 @@ end
|
|
|
3400
3400
|
end
|
|
3401
3401
|
|
|
3402
3402
|
# Restore a template version
|
|
3403
|
-
# Replaces the template's draft with a copy of one of its published versions.
|
|
3403
|
+
# Replaces the template's draft with a copy of one of its published versions. The draft keeps its settings that apply to every version, such as `webhook_url`.
|
|
3404
3404
|
# @param template_id [String] The template's ID.
|
|
3405
3405
|
# @param body [RestoreTemplateVersionRequest] The version to restore.
|
|
3406
3406
|
# @param [Hash] opts the optional parameters
|
|
@@ -3594,7 +3594,7 @@ end
|
|
|
3594
3594
|
end
|
|
3595
3595
|
|
|
3596
3596
|
# Update a template
|
|
3597
|
-
# Changes a template's draft. Properties left out keep their values. `defaults` and `html_engine_options` replace the whole object, and `field_groups` changes only the groups it lists.
|
|
3597
|
+
# Changes a template's draft. Properties left out keep their values. `defaults` and `html_engine_options` replace the whole object, and `field_groups` changes only the groups it lists. Settings such as `webhook_url`, `public_submissions` and `expire_after` apply to every published version too, and setting `parent_folder_id` moves the template and all of its published versions.
|
|
3598
3598
|
# @param template_id [String] The template's ID.
|
|
3599
3599
|
# @param body [UpdateTemplateRequest] The settings to change. Properties left out keep their values.
|
|
3600
3600
|
# @param [Hash] opts the optional parameters
|
|
@@ -3605,7 +3605,7 @@ end
|
|
|
3605
3605
|
end
|
|
3606
3606
|
|
|
3607
3607
|
# Update a template
|
|
3608
|
-
# Changes a template's draft. Properties left out keep their values. `defaults` and `html_engine_options` replace the whole object, and `field_groups` changes only the groups it lists.
|
|
3608
|
+
# Changes a template's draft. Properties left out keep their values. `defaults` and `html_engine_options` replace the whole object, and `field_groups` changes only the groups it lists. Settings such as `webhook_url`, `public_submissions` and `expire_after` apply to every published version too, and setting `parent_folder_id` moves the template and all of its published versions.
|
|
3609
3609
|
# @param template_id [String] The template's ID.
|
|
3610
3610
|
# @param body [UpdateTemplateRequest] The settings to change. Properties left out keep their values.
|
|
3611
3611
|
# @param [Hash] opts the optional parameters
|
|
@@ -3667,24 +3667,24 @@ end
|
|
|
3667
3667
|
return data, status_code, headers
|
|
3668
3668
|
end
|
|
3669
3669
|
|
|
3670
|
-
# Replace a template's
|
|
3671
|
-
# Replaces a PDF template's PDF with one you uploaded with the presigned upload (GET /uploads/presign) (`cache_id`), a link to download it from (`document_url`), or the file in base64 (`document_base64`).
|
|
3670
|
+
# Replace a template's document
|
|
3671
|
+
# Replaces a PDF template's PDF, or a Word template's Word document (from a .docx or an .odt), with one you uploaded with the presigned upload (GET /uploads/presign) (`cache_id`), a link to download it from (`document_url`), or the file in base64 (`document_base64`). A PDF template's fields stay where they are, unless `reimport_fields` replaces them with the new PDF's fillable fields, and a Word template gets a field for each new tag. To send the file as `multipart/form-data` instead, use PUT /templates/{template_id}/document/upload.
|
|
3672
3672
|
# @param template_id [String] The template's ID.
|
|
3673
|
-
# @param body [UpdateTemplateDocumentRequest] The new PDF, as one of `cache_id`, `document_url` and `document_base64`.
|
|
3673
|
+
# @param body [UpdateTemplateDocumentRequest] The new PDF, or a Word template's new Word document, as one of `cache_id`, `document_url` and `document_base64`.
|
|
3674
3674
|
# @param [Hash] opts the optional parameters
|
|
3675
|
-
# @option opts [Boolean] :wait Wait until the PDF has been processed,
|
|
3675
|
+
# @option opts [Boolean] :wait Wait until the PDF has been processed, a `document_url`'s PDF or Word document downloaded, and an OpenDocument file converted, before responding. Default true on sync.api hosts.
|
|
3676
3676
|
# @return [Template]
|
|
3677
3677
|
def update_template_document(template_id, body, opts = {})
|
|
3678
3678
|
data, _status_code, _headers = update_template_document_with_http_info(template_id, body, opts)
|
|
3679
3679
|
data
|
|
3680
3680
|
end
|
|
3681
3681
|
|
|
3682
|
-
# Replace a template's
|
|
3683
|
-
# Replaces a PDF template's PDF with one you uploaded with the presigned upload (GET /uploads/presign) (`cache_id`), a link to download it from (`document_url`), or the file in base64 (`document_base64`).
|
|
3682
|
+
# Replace a template's document
|
|
3683
|
+
# Replaces a PDF template's PDF, or a Word template's Word document (from a .docx or an .odt), with one you uploaded with the presigned upload (GET /uploads/presign) (`cache_id`), a link to download it from (`document_url`), or the file in base64 (`document_base64`). A PDF template's fields stay where they are, unless `reimport_fields` replaces them with the new PDF's fillable fields, and a Word template gets a field for each new tag. To send the file as `multipart/form-data` instead, use PUT /templates/{template_id}/document/upload.
|
|
3684
3684
|
# @param template_id [String] The template's ID.
|
|
3685
|
-
# @param body [UpdateTemplateDocumentRequest] The new PDF, as one of `cache_id`, `document_url` and `document_base64`.
|
|
3685
|
+
# @param body [UpdateTemplateDocumentRequest] The new PDF, or a Word template's new Word document, as one of `cache_id`, `document_url` and `document_base64`.
|
|
3686
3686
|
# @param [Hash] opts the optional parameters
|
|
3687
|
-
# @option opts [Boolean] :wait Wait until the PDF has been processed,
|
|
3687
|
+
# @option opts [Boolean] :wait Wait until the PDF has been processed, a `document_url`'s PDF or Word document downloaded, and an OpenDocument file converted, before responding. Default true on sync.api hosts.
|
|
3688
3688
|
# @return [Array<(Template, Integer, Hash)>] Template data, response status code and response headers
|
|
3689
3689
|
def update_template_document_with_http_info(template_id, body, opts = {})
|
|
3690
3690
|
if @api_client.config.debugging
|
|
@@ -3892,11 +3892,11 @@ end
|
|
|
3892
3892
|
return data, status_code, headers
|
|
3893
3893
|
end
|
|
3894
3894
|
|
|
3895
|
-
# Create a
|
|
3896
|
-
# Creates a PDF template from a PDF sent with the request (`multipart/form-data`). For large files, upload the
|
|
3897
|
-
# @param document [File]
|
|
3895
|
+
# Create a template from an uploaded PDF or Word document
|
|
3896
|
+
# Creates a PDF template from a PDF, or a Word template from a Word document (.docx) or an OpenDocument text file (.odt), sent with the request (`multipart/form-data`). A Word template needs its `output_format`. For large files, upload the file with the presigned upload (GET /uploads/presign) and create the template with POST /templates.
|
|
3897
|
+
# @param document [File] A PDF (for a PDF template) or a Word document (.docx or .odt, for a Word template). DocSpring converts an OpenDocument text file (.odt) to a Word document after responding: the template's `document.state` is `converting` until then (sync.api hosts wait for it).
|
|
3898
3898
|
# @param [Hash] opts the optional parameters
|
|
3899
|
-
# @option opts [Boolean] :wait Wait until the PDF has been processed,
|
|
3899
|
+
# @option opts [Boolean] :wait Wait until the PDF has been processed, a `document_url`'s PDF or Word document downloaded, and an OpenDocument file converted, before responding. Default true on sync.api hosts.
|
|
3900
3900
|
# @option opts [String] :name The template's name.
|
|
3901
3901
|
# @option opts [String] :description The template's description.
|
|
3902
3902
|
# @option opts [String] :parent_folder_id The folder to put the template in. Left out, it's created at the root.
|
|
@@ -3905,17 +3905,18 @@ end
|
|
|
3905
3905
|
# @option opts [FieldSetupSource] :field_source With `detect_fields`, where the fields come from. `auto` (the default) imports the form fields of a fillable PDF and detects the fields of a PDF without them; `pdf_detection` detects the fields from the page layout, even on a fillable PDF; `pdf_form_fields` only imports the PDF's form fields.
|
|
3906
3906
|
# @option opts [FieldSetupNaming] :field_naming With `detect_fields`, how the fields are named. `ai` (the default) names them and sets their types and settings with AI; `preserve` keeps the names of the PDF's form fields, and AI only names the fields it detected. `preserve` needs `field_source` `auto` or `pdf_form_fields`.
|
|
3907
3907
|
# @option opts [FieldSetupLogic] :field_logic With `detect_fields`, whether AI reads the whole form once the fields are named and sets up conditional logic and required fields (`ai`) or not (`none`). Default: your account's template settings.
|
|
3908
|
+
# @option opts [OutputFormat] :output_format What each submission of a Word template makes unless its request sets `output_formats`: `docx` (a Word document), `odt` (an OpenDocument file, converted from the Word document) or `pdf`. Required when `document` is a Word document.
|
|
3908
3909
|
# @return [Template]
|
|
3909
3910
|
def upload_template(document, opts = {})
|
|
3910
3911
|
data, _status_code, _headers = upload_template_with_http_info(document, opts)
|
|
3911
3912
|
data
|
|
3912
3913
|
end
|
|
3913
3914
|
|
|
3914
|
-
# Create a
|
|
3915
|
-
# Creates a PDF template from a PDF sent with the request (`multipart/form-data`). For large files, upload the
|
|
3916
|
-
# @param document [File]
|
|
3915
|
+
# Create a template from an uploaded PDF or Word document
|
|
3916
|
+
# Creates a PDF template from a PDF, or a Word template from a Word document (.docx) or an OpenDocument text file (.odt), sent with the request (`multipart/form-data`). A Word template needs its `output_format`. For large files, upload the file with the presigned upload (GET /uploads/presign) and create the template with POST /templates.
|
|
3917
|
+
# @param document [File] A PDF (for a PDF template) or a Word document (.docx or .odt, for a Word template). DocSpring converts an OpenDocument text file (.odt) to a Word document after responding: the template's `document.state` is `converting` until then (sync.api hosts wait for it).
|
|
3917
3918
|
# @param [Hash] opts the optional parameters
|
|
3918
|
-
# @option opts [Boolean] :wait Wait until the PDF has been processed,
|
|
3919
|
+
# @option opts [Boolean] :wait Wait until the PDF has been processed, a `document_url`'s PDF or Word document downloaded, and an OpenDocument file converted, before responding. Default true on sync.api hosts.
|
|
3919
3920
|
# @option opts [String] :name The template's name.
|
|
3920
3921
|
# @option opts [String] :description The template's description.
|
|
3921
3922
|
# @option opts [String] :parent_folder_id The folder to put the template in. Left out, it's created at the root.
|
|
@@ -3924,6 +3925,7 @@ end
|
|
|
3924
3925
|
# @option opts [FieldSetupSource] :field_source With `detect_fields`, where the fields come from. `auto` (the default) imports the form fields of a fillable PDF and detects the fields of a PDF without them; `pdf_detection` detects the fields from the page layout, even on a fillable PDF; `pdf_form_fields` only imports the PDF's form fields.
|
|
3925
3926
|
# @option opts [FieldSetupNaming] :field_naming With `detect_fields`, how the fields are named. `ai` (the default) names them and sets their types and settings with AI; `preserve` keeps the names of the PDF's form fields, and AI only names the fields it detected. `preserve` needs `field_source` `auto` or `pdf_form_fields`.
|
|
3926
3927
|
# @option opts [FieldSetupLogic] :field_logic With `detect_fields`, whether AI reads the whole form once the fields are named and sets up conditional logic and required fields (`ai`) or not (`none`). Default: your account's template settings.
|
|
3928
|
+
# @option opts [OutputFormat] :output_format What each submission of a Word template makes unless its request sets `output_formats`: `docx` (a Word document), `odt` (an OpenDocument file, converted from the Word document) or `pdf`. Required when `document` is a Word document.
|
|
3927
3929
|
# @return [Array<(Template, Integer, Hash)>] Template data, response status code and response headers
|
|
3928
3930
|
def upload_template_with_http_info(document, opts = {})
|
|
3929
3931
|
if @api_client.config.debugging
|
|
@@ -3961,6 +3963,7 @@ end
|
|
|
3961
3963
|
form_params['field_source'] = opts[:'field_source'] if !opts[:'field_source'].nil?
|
|
3962
3964
|
form_params['field_naming'] = opts[:'field_naming'] if !opts[:'field_naming'].nil?
|
|
3963
3965
|
form_params['field_logic'] = opts[:'field_logic'] if !opts[:'field_logic'].nil?
|
|
3966
|
+
form_params['output_format'] = opts[:'output_format'] if !opts[:'output_format'].nil?
|
|
3964
3967
|
|
|
3965
3968
|
# http body (model)
|
|
3966
3969
|
post_body = opts[:debug_body]
|
|
@@ -3988,26 +3991,26 @@ end
|
|
|
3988
3991
|
return data, status_code, headers
|
|
3989
3992
|
end
|
|
3990
3993
|
|
|
3991
|
-
# Replace a template's
|
|
3992
|
-
# Replaces a PDF template's PDF with one sent with the request (`multipart/form-data`).
|
|
3994
|
+
# Replace a template's document with an uploaded file
|
|
3995
|
+
# Replaces a PDF template's PDF, or a Word template's Word document, with one sent with the request (`multipart/form-data`). A PDF template's fields stay where they are, unless `reimport_fields` replaces them with the new PDF's fillable fields, and a Word template gets a field for each new tag.
|
|
3993
3996
|
# @param template_id [String] The template's ID.
|
|
3994
|
-
# @param document [File] The new PDF.
|
|
3997
|
+
# @param document [File] The new PDF, or the new Word document (.docx or .odt) of a Word template.
|
|
3995
3998
|
# @param [Hash] opts the optional parameters
|
|
3996
|
-
# @option opts [Boolean] :wait Wait until the PDF has been processed,
|
|
3997
|
-
# @option opts [Boolean] :reimport_fields Replace all of the template's fields with the fillable fields in the new PDF, once DocSpring has processed it (`document.field_reimport_state`). As on a first upload, the default typeface, font size, bold and color are taken from the PDF's fields; the template's other settings are kept. If the PDF has no fillable fields, the template keeps its fields. A locked template can't re-import its fields.
|
|
3999
|
+
# @option opts [Boolean] :wait Wait until the PDF has been processed, a `document_url`'s PDF or Word document downloaded, and an OpenDocument file converted, before responding. Default true on sync.api hosts.
|
|
4000
|
+
# @option opts [Boolean] :reimport_fields Replace all of the template's fields with the fillable fields in the new PDF, once DocSpring has processed it (`document.field_reimport_state`). As on a first upload, the default typeface, font size, bold and color are taken from the PDF's fields; the template's other settings are kept. If the PDF has no fillable fields, the template keeps its fields. A locked template can't re-import its fields. Only for PDF templates: a Word template adds a field for each new tag.
|
|
3998
4001
|
# @return [Template]
|
|
3999
4002
|
def upload_template_document(template_id, document, opts = {})
|
|
4000
4003
|
data, _status_code, _headers = upload_template_document_with_http_info(template_id, document, opts)
|
|
4001
4004
|
data
|
|
4002
4005
|
end
|
|
4003
4006
|
|
|
4004
|
-
# Replace a template's
|
|
4005
|
-
# Replaces a PDF template's PDF with one sent with the request (`multipart/form-data`).
|
|
4007
|
+
# Replace a template's document with an uploaded file
|
|
4008
|
+
# Replaces a PDF template's PDF, or a Word template's Word document, with one sent with the request (`multipart/form-data`). A PDF template's fields stay where they are, unless `reimport_fields` replaces them with the new PDF's fillable fields, and a Word template gets a field for each new tag.
|
|
4006
4009
|
# @param template_id [String] The template's ID.
|
|
4007
|
-
# @param document [File] The new PDF.
|
|
4010
|
+
# @param document [File] The new PDF, or the new Word document (.docx or .odt) of a Word template.
|
|
4008
4011
|
# @param [Hash] opts the optional parameters
|
|
4009
|
-
# @option opts [Boolean] :wait Wait until the PDF has been processed,
|
|
4010
|
-
# @option opts [Boolean] :reimport_fields Replace all of the template's fields with the fillable fields in the new PDF, once DocSpring has processed it (`document.field_reimport_state`). As on a first upload, the default typeface, font size, bold and color are taken from the PDF's fields; the template's other settings are kept. If the PDF has no fillable fields, the template keeps its fields. A locked template can't re-import its fields.
|
|
4012
|
+
# @option opts [Boolean] :wait Wait until the PDF has been processed, a `document_url`'s PDF or Word document downloaded, and an OpenDocument file converted, before responding. Default true on sync.api hosts.
|
|
4013
|
+
# @option opts [Boolean] :reimport_fields Replace all of the template's fields with the fillable fields in the new PDF, once DocSpring has processed it (`document.field_reimport_state`). As on a first upload, the default typeface, font size, bold and color are taken from the PDF's fields; the template's other settings are kept. If the PDF has no fillable fields, the template keeps its fields. A locked template can't re-import its fields. Only for PDF templates: a Word template adds a field for each new tag.
|
|
4011
4014
|
# @return [Array<(Template, Integer, Hash)>] Template data, response status code and response headers
|
|
4012
4015
|
def upload_template_document_with_http_info(template_id, document, opts = {})
|
|
4013
4016
|
if @api_client.config.debugging
|
data/lib/docspring/api_client.rb
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#DocSpring API
|
|
3
3
|
|
|
4
|
-
#Use DocSpring's API to
|
|
4
|
+
#Use DocSpring's API to fill PDF forms, generate PDFs and Word documents from HTML or Word templates, merge PDFs, and request legally binding e-signatures.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: v2
|
|
7
7
|
|
|
@@ -34,7 +34,7 @@ module DocSpring
|
|
|
34
34
|
# @option config [Configuration] Configuration for initializing the object, default to Configuration.default
|
|
35
35
|
def initialize(config = Configuration.default)
|
|
36
36
|
@config = config
|
|
37
|
-
@user_agent = "docspring-ruby-4.
|
|
37
|
+
@user_agent = "docspring-ruby-4.3.0"
|
|
38
38
|
@default_headers = {
|
|
39
39
|
'Content-Type' => 'application/json',
|
|
40
40
|
'User-Agent' => @user_agent
|
data/lib/docspring/api_error.rb
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#DocSpring API
|
|
3
3
|
|
|
4
|
-
#Use DocSpring's API to
|
|
4
|
+
#Use DocSpring's API to fill PDF forms, generate PDFs and Word documents from HTML or Word templates, merge PDFs, and request legally binding e-signatures.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: v2
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#DocSpring API
|
|
3
3
|
|
|
4
|
-
#Use DocSpring's API to
|
|
4
|
+
#Use DocSpring's API to fill PDF forms, generate PDFs and Word documents from HTML or Word templates, merge PDFs, and request legally binding e-signatures.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: v2
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#DocSpring API
|
|
3
3
|
|
|
4
|
-
#Use DocSpring's API to
|
|
4
|
+
#Use DocSpring's API to fill PDF forms, generate PDFs and Word documents from HTML or Word templates, merge PDFs, and request legally binding e-signatures.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: v2
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#DocSpring API
|
|
3
3
|
|
|
4
|
-
#Use DocSpring's API to
|
|
4
|
+
#Use DocSpring's API to fill PDF forms, generate PDFs and Word documents from HTML or Word templates, merge PDFs, and request legally binding e-signatures.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: v2
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#DocSpring API
|
|
3
3
|
|
|
4
|
-
#Use DocSpring's API to
|
|
4
|
+
#Use DocSpring's API to fill PDF forms, generate PDFs and Word documents from HTML or Word templates, merge PDFs, and request legally binding e-signatures.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: v2
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#DocSpring API
|
|
3
3
|
|
|
4
|
-
#Use DocSpring's API to
|
|
4
|
+
#Use DocSpring's API to fill PDF forms, generate PDFs and Word documents from HTML or Word templates, merge PDFs, and request legally binding e-signatures.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: v2
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#DocSpring API
|
|
3
3
|
|
|
4
|
-
#Use DocSpring's API to
|
|
4
|
+
#Use DocSpring's API to fill PDF forms, generate PDFs and Word documents from HTML or Word templates, merge PDFs, and request legally binding e-signatures.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: v2
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#DocSpring API
|
|
3
3
|
|
|
4
|
-
#Use DocSpring's API to
|
|
4
|
+
#Use DocSpring's API to fill PDF forms, generate PDFs and Word documents from HTML or Word templates, merge PDFs, and request legally binding e-signatures.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: v2
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#DocSpring API
|
|
3
3
|
|
|
4
|
-
#Use DocSpring's API to
|
|
4
|
+
#Use DocSpring's API to fill PDF forms, generate PDFs and Word documents from HTML or Word templates, merge PDFs, and request legally binding e-signatures.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: v2
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#DocSpring API
|
|
3
3
|
|
|
4
|
-
#Use DocSpring's API to
|
|
4
|
+
#Use DocSpring's API to fill PDF forms, generate PDFs and Word documents from HTML or Word templates, merge PDFs, and request legally binding e-signatures.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: v2
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#DocSpring API
|
|
3
3
|
|
|
4
|
-
#Use DocSpring's API to
|
|
4
|
+
#Use DocSpring's API to fill PDF forms, generate PDFs and Word documents from HTML or Word templates, merge PDFs, and request legally binding e-signatures.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: v2
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#DocSpring API
|
|
3
3
|
|
|
4
|
-
#Use DocSpring's API to
|
|
4
|
+
#Use DocSpring's API to fill PDF forms, generate PDFs and Word documents from HTML or Word templates, merge PDFs, and request legally binding e-signatures.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: v2
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#DocSpring API
|
|
3
3
|
|
|
4
|
-
#Use DocSpring's API to
|
|
4
|
+
#Use DocSpring's API to fill PDF forms, generate PDFs and Word documents from HTML or Word templates, merge PDFs, and request legally binding e-signatures.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: v2
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#DocSpring API
|
|
3
3
|
|
|
4
|
-
#Use DocSpring's API to
|
|
4
|
+
#Use DocSpring's API to fill PDF forms, generate PDFs and Word documents from HTML or Word templates, merge PDFs, and request legally binding e-signatures.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: v2
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#DocSpring API
|
|
3
3
|
|
|
4
|
-
#Use DocSpring's API to
|
|
4
|
+
#Use DocSpring's API to fill PDF forms, generate PDFs and Word documents from HTML or Word templates, merge PDFs, and request legally binding e-signatures.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: v2
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#DocSpring API
|
|
3
3
|
|
|
4
|
-
#Use DocSpring's API to
|
|
4
|
+
#Use DocSpring's API to fill PDF forms, generate PDFs and Word documents from HTML or Word templates, merge PDFs, and request legally binding e-signatures.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: v2
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#DocSpring API
|
|
3
3
|
|
|
4
|
-
#Use DocSpring's API to
|
|
4
|
+
#Use DocSpring's API to fill PDF forms, generate PDFs and Word documents from HTML or Word templates, merge PDFs, and request legally binding e-signatures.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: v2
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#DocSpring API
|
|
3
3
|
|
|
4
|
-
#Use DocSpring's API to
|
|
4
|
+
#Use DocSpring's API to fill PDF forms, generate PDFs and Word documents from HTML or Word templates, merge PDFs, and request legally binding e-signatures.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: v2
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#DocSpring API
|
|
3
3
|
|
|
4
|
-
#Use DocSpring's API to
|
|
4
|
+
#Use DocSpring's API to fill PDF forms, generate PDFs and Word documents from HTML or Word templates, merge PDFs, and request legally binding e-signatures.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: v2
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#DocSpring API
|
|
3
3
|
|
|
4
|
-
#Use DocSpring's API to
|
|
4
|
+
#Use DocSpring's API to fill PDF forms, generate PDFs and Word documents from HTML or Word templates, merge PDFs, and request legally binding e-signatures.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: v2
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#DocSpring API
|
|
3
3
|
|
|
4
|
-
#Use DocSpring's API to
|
|
4
|
+
#Use DocSpring's API to fill PDF forms, generate PDFs and Word documents from HTML or Word templates, merge PDFs, and request legally binding e-signatures.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: v2
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#DocSpring API
|
|
3
3
|
|
|
4
|
-
#Use DocSpring's API to
|
|
4
|
+
#Use DocSpring's API to fill PDF forms, generate PDFs and Word documents from HTML or Word templates, merge PDFs, and request legally binding e-signatures.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: v2
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#DocSpring API
|
|
3
3
|
|
|
4
|
-
#Use DocSpring's API to
|
|
4
|
+
#Use DocSpring's API to fill PDF forms, generate PDFs and Word documents from HTML or Word templates, merge PDFs, and request legally binding e-signatures.
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: v2
|
|
7
7
|
|