docspring 3.5.0 → 4.0.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 +361 -150
- data/.openapi-generator/VERSION +1 -1
- data/.rubocop.yml +1 -1
- data/.travis.yml +1 -1
- data/AGENTS.md +79 -19
- data/CHANGELOG.md +123 -0
- data/Gemfile.lock +7 -7
- data/README.md +60 -53
- data/docs/{RenameFolderData.md → AiFieldNamingLanguage.md} +2 -5
- data/docs/AuthenticationCheck.md +18 -0
- data/docs/{CreateFolderData.md → BarcodeSymbology.md} +2 -5
- data/docs/{CreateWebhookData.md → CheckCharacter.md} +2 -5
- data/docs/Client.md +890 -777
- data/docs/{UpdateWebhookData.md → CombinedFieldType.md} +2 -5
- data/docs/CombinedPdf.md +44 -0
- data/docs/CombinedPdfFiles.md +18 -0
- data/docs/CombinedPdfList.md +20 -0
- data/docs/CombinedPdfSource.md +26 -0
- data/docs/CombinedPdfSourceInput.md +88 -0
- data/docs/CombinedPdfSourcePdf.md +20 -0
- data/docs/CombinedPdfSourceType.md +15 -0
- data/docs/CombinedPdfState.md +15 -0
- data/docs/CopyTemplateRequest.md +22 -0
- data/docs/CreateCombinedPdfRequest.md +26 -0
- data/docs/CreateCustomFileFromUploadRequest.md +18 -0
- data/docs/CreateFolderRequest.md +20 -0
- data/docs/CreateSignatureRequestEventRequest.md +24 -0
- data/docs/CreateSignatureRequestTokenRequest.md +18 -0
- data/docs/CreateSubmissionBatchRequest.md +26 -0
- data/docs/CreateSubmissionRequest.md +36 -0
- data/docs/CreateTemplateRequest.md +94 -0
- data/docs/CreateWebhookRequest.md +38 -0
- data/docs/CustomFile.md +11 -3
- data/docs/CustomFileList.md +20 -0
- data/docs/CustomFileSourcePdf.md +20 -0
- data/docs/ErrorCode.md +15 -0
- data/docs/ErrorDetail.md +26 -0
- data/docs/ErrorInfo.md +32 -0
- data/docs/ErrorResponse.md +1 -3
- data/docs/ExpirationInterval.md +15 -0
- data/docs/FieldComparisonCondition.md +22 -0
- data/docs/FieldComparisonOperator.md +15 -0
- data/docs/FieldDisplayType.md +15 -0
- data/docs/FieldEqualsCondition.md +22 -0
- data/docs/FieldEqualsOperator.md +15 -0
- data/docs/FieldInCondition.md +22 -0
- data/docs/FieldOverride.md +142 -0
- data/docs/FieldPresenceCondition.md +20 -0
- data/docs/FieldPresenceOperator.md +15 -0
- data/docs/FieldRangeCondition.md +24 -0
- data/docs/FieldReimportState.md +15 -0
- data/docs/FieldSetupLogic.md +15 -0
- data/docs/FieldSetupNaming.md +15 -0
- data/docs/FieldSetupSource.md +15 -0
- data/docs/Folder.md +9 -5
- data/docs/FolderList.md +20 -0
- data/docs/GeneratedFile.md +32 -0
- data/docs/GeneratedFileState.md +15 -0
- data/docs/HtmlEngineOptions.md +36 -0
- data/docs/HtmlEngineOptionsInput.md +36 -0
- data/docs/ImageGravity.md +15 -0
- data/docs/ImageScaleType.md +15 -0
- data/docs/ModelCodeLanguage.md +15 -0
- data/docs/MoveFolderRequest.md +18 -0
- data/docs/MoveTemplateRequest.md +18 -0
- data/docs/NumberConditionType.md +15 -0
- data/docs/PageFormat.md +15 -0
- data/docs/PublishTemplateVersionRequest.md +20 -0
- data/docs/RenameFolderRequest.md +18 -0
- data/docs/RestoreTemplateVersionRequest.md +18 -0
- data/docs/ShapeType.md +15 -0
- data/docs/SignatureRequest.md +66 -0
- data/docs/SignatureRequestAuthSecondFactorType.md +15 -0
- data/docs/SignatureRequestAuthType.md +15 -0
- data/docs/SignatureRequestEvent.md +32 -0
- data/docs/SignatureRequestEventType.md +15 -0
- data/docs/SignatureRequestInput.md +46 -0
- data/docs/SignatureRequestMessageType.md +15 -0
- data/docs/SignatureRequestState.md +15 -0
- data/docs/SignatureRequestToken.md +30 -0
- data/docs/SignatureRequestTokenType.md +15 -0
- data/docs/StringConditionType.md +15 -0
- data/docs/Submission.md +41 -47
- data/docs/SubmissionAction.md +6 -8
- data/docs/SubmissionActionState.md +15 -0
- data/docs/SubmissionActionType.md +15 -0
- data/docs/SubmissionBatch.md +16 -10
- data/docs/SubmissionBatchState.md +15 -0
- data/docs/SubmissionFiles.md +22 -0
- data/docs/SubmissionInput.md +38 -0
- data/docs/SubmissionList.md +20 -0
- data/docs/SubmissionSource.md +15 -0
- data/docs/SubmissionSourcePdf.md +20 -0
- data/docs/SubmissionState.md +15 -0
- data/docs/Template.md +73 -107
- data/docs/TemplateActor.md +26 -0
- data/docs/TemplateActorType.md +15 -0
- data/docs/TemplateDefaults.md +56 -0
- data/docs/TemplateDefaultsInput.md +56 -0
- data/docs/TemplateDocument.md +40 -0
- data/docs/TemplateDocumentState.md +15 -0
- data/docs/TemplateFieldDependency.md +26 -0
- data/docs/TemplateFieldDependencyAction.md +15 -0
- data/docs/TemplateFieldDependencyCondition.md +24 -0
- data/docs/TemplateFieldDependencyConditionInput.md +93 -0
- data/docs/TemplateFieldDependencyInput.md +26 -0
- data/docs/TemplateFieldDependencyMatch.md +15 -0
- data/docs/TemplateFieldDependencyOperator.md +15 -0
- data/docs/TemplateFieldLogicStatus.md +15 -0
- data/docs/TemplateFormMode.md +15 -0
- data/docs/TemplateModelCode.md +22 -0
- data/docs/TemplatePageAiError.md +15 -0
- data/docs/TemplatePageAiNamingStatus.md +15 -0
- data/docs/TemplatePageFieldsStatus.md +15 -0
- data/docs/TemplatePageImageStatus.md +15 -0
- data/docs/TemplatePageProcessingStatus.md +26 -0
- data/docs/TemplateSourcePdf.md +24 -0
- data/docs/TemplateSummary.md +90 -0
- data/docs/TemplateSummaryList.md +20 -0
- data/docs/TemplateType.md +15 -0
- data/docs/TemplateVersion.md +24 -0
- data/docs/TemplateVersionType.md +15 -0
- data/docs/TextAlignment.md +15 -0
- data/docs/TextOverflow.md +15 -0
- data/docs/TextVerticalAlignment.md +15 -0
- data/docs/Typeface.md +15 -0
- data/docs/UpdateSignatureRequestRequest.md +34 -0
- data/docs/UpdateTemplateDocumentRequest.md +22 -0
- data/docs/UpdateTemplateRequest.md +80 -0
- data/docs/UpdateWebhookRequest.md +38 -0
- data/docs/UploadMethod.md +15 -0
- data/docs/UploadPresign.md +24 -0
- data/docs/UrlSourcePdf.md +20 -0
- data/docs/Webhook.md +20 -20
- data/docs/WebhookEventType.md +15 -0
- data/docs/WebhookList.md +20 -0
- data/docs/WebhookMode.md +15 -0
- data/docspring.gemspec +3 -3
- data/lib/docspring/api/client.rb +995 -942
- data/lib/docspring/api_client.rb +14 -6
- data/lib/docspring/api_error.rb +3 -3
- data/lib/docspring/api_model_base.rb +88 -0
- data/lib/docspring/configuration.rb +12 -7
- data/lib/docspring/models/ai_field_naming_language.rb +42 -0
- data/lib/docspring/models/authentication_check.rb +185 -0
- data/lib/docspring/models/barcode_symbology.rb +47 -0
- data/lib/docspring/models/check_character.rb +44 -0
- data/lib/docspring/models/combined_field_type.rb +41 -0
- data/lib/docspring/models/{combined_submission.rb → combined_pdf.rb} +228 -206
- data/lib/docspring/models/combined_pdf_files.rb +167 -0
- data/lib/docspring/models/combined_pdf_list.rb +200 -0
- data/lib/docspring/models/{update_webhook_data.rb → combined_pdf_source.rb} +107 -103
- data/lib/docspring/models/combined_pdf_source_input.rb +62 -0
- data/lib/docspring/models/combined_pdf_source_pdf.rb +212 -0
- data/lib/docspring/models/combined_pdf_source_type.rb +44 -0
- data/lib/docspring/models/combined_pdf_state.rb +44 -0
- data/lib/docspring/models/{copy_template_options.rb → copy_template_request.rb} +32 -87
- data/lib/docspring/models/{combine_pdfs_data.rb → create_combined_pdf_request.rb} +60 -123
- data/lib/docspring/models/{create_custom_file_data.rb → create_custom_file_from_upload_request.rb} +29 -96
- data/lib/docspring/models/{move_template_data.rb → create_folder_request.rb} +60 -102
- data/lib/docspring/models/{create_submission_data_request_event_request.rb → create_signature_request_event_request.rb} +50 -122
- data/lib/docspring/models/create_signature_request_token_request.rb +190 -0
- data/lib/docspring/models/{submission_batch_data.rb → create_submission_batch_request.rb} +53 -108
- data/lib/docspring/models/{create_pdf_submission_data.rb → create_submission_request.rb} +97 -149
- data/lib/docspring/models/create_template_request.rb +601 -0
- data/lib/docspring/models/create_webhook_request.rb +368 -0
- data/lib/docspring/models/custom_file.rb +132 -95
- data/lib/docspring/models/custom_file_list.rb +200 -0
- data/lib/docspring/models/custom_file_source_pdf.rb +212 -0
- data/lib/docspring/models/error_code.rb +60 -0
- data/lib/docspring/models/error_detail.rb +242 -0
- data/lib/docspring/models/error_info.rb +316 -0
- data/lib/docspring/models/error_response.rb +28 -138
- data/lib/docspring/models/expiration_interval.rb +42 -0
- data/lib/docspring/models/field_comparison_condition.rb +247 -0
- data/lib/docspring/models/field_comparison_operator.rb +43 -0
- data/lib/docspring/models/field_display_type.rb +45 -0
- data/lib/docspring/models/field_equals_condition.rb +247 -0
- data/lib/docspring/models/field_equals_operator.rb +41 -0
- data/lib/docspring/models/{create_folder_data.rb → field_in_condition.rb} +101 -103
- data/lib/docspring/models/field_override.rb +829 -0
- data/lib/docspring/models/field_presence_condition.rb +234 -0
- data/lib/docspring/models/field_presence_operator.rb +41 -0
- data/lib/docspring/models/field_range_condition.rb +234 -0
- data/lib/docspring/models/field_reimport_state.rb +43 -0
- data/lib/docspring/models/field_setup_logic.rb +41 -0
- data/lib/docspring/models/field_setup_naming.rb +41 -0
- data/lib/docspring/models/field_setup_source.rb +42 -0
- data/lib/docspring/models/folder.rb +134 -93
- data/lib/docspring/models/folder_list.rb +200 -0
- data/lib/docspring/models/generated_file.rb +326 -0
- data/lib/docspring/models/generated_file_state.rb +42 -0
- data/lib/docspring/models/html_engine_options.rb +416 -0
- data/lib/docspring/models/html_engine_options_input.rb +280 -0
- data/lib/docspring/models/image_gravity.rb +48 -0
- data/lib/docspring/models/image_scale_type.rb +42 -0
- data/lib/docspring/models/model_code_language.rb +48 -0
- data/lib/docspring/models/{move_folder_data.rb → move_folder_request.rb} +31 -87
- data/lib/docspring/models/move_template_request.rb +171 -0
- data/lib/docspring/models/number_condition_type.rb +45 -0
- data/lib/docspring/models/page_format.rb +52 -0
- data/lib/docspring/models/{publish_version_data.rb → publish_template_version_request.rb} +64 -99
- data/lib/docspring/models/{rename_folder_data.rb → rename_folder_request.rb} +29 -87
- data/lib/docspring/models/{restore_version_data.rb → restore_template_version_request.rb} +29 -87
- data/lib/docspring/models/shape_type.rb +45 -0
- data/lib/docspring/models/{submission_data_request_show.rb → signature_request.rb} +240 -171
- data/lib/docspring/models/signature_request_auth_second_factor_type.rb +45 -0
- data/lib/docspring/models/signature_request_auth_type.rb +46 -0
- data/lib/docspring/models/{submission_data_request_event.rb → signature_request_event.rb} +137 -122
- data/lib/docspring/models/signature_request_event_type.rb +45 -0
- data/lib/docspring/models/{update_submission_data_request_data.rb → signature_request_input.rb} +156 -173
- data/lib/docspring/models/signature_request_message_type.rb +48 -0
- data/lib/docspring/models/signature_request_state.rb +42 -0
- data/lib/docspring/models/signature_request_token.rb +369 -0
- data/lib/docspring/models/signature_request_token_type.rb +41 -0
- data/lib/docspring/models/string_condition_type.rb +44 -0
- data/lib/docspring/models/submission.rb +374 -339
- data/lib/docspring/models/submission_action.rb +64 -136
- data/lib/docspring/models/submission_action_state.rb +43 -0
- data/lib/docspring/models/submission_action_type.rb +46 -0
- data/lib/docspring/models/submission_batch.rb +157 -112
- data/lib/docspring/models/submission_batch_state.rb +42 -0
- data/lib/docspring/models/submission_files.rb +188 -0
- data/lib/docspring/models/submission_input.rb +274 -0
- data/lib/docspring/models/submission_list.rb +200 -0
- data/lib/docspring/models/submission_source.rb +43 -0
- data/lib/docspring/models/submission_source_pdf.rb +212 -0
- data/lib/docspring/models/submission_state.rb +52 -0
- data/lib/docspring/models/template.rb +485 -766
- data/lib/docspring/models/{add_fields_data.rb → template_actor.rb} +119 -105
- data/lib/docspring/models/template_actor_type.rb +42 -0
- data/lib/docspring/models/template_defaults.rb +395 -0
- data/lib/docspring/models/template_defaults_input.rb +395 -0
- data/lib/docspring/models/template_document.rb +396 -0
- data/lib/docspring/models/template_document_state.rb +44 -0
- data/lib/docspring/models/{success_error_response.rb → template_field_dependency.rb} +122 -114
- data/lib/docspring/models/template_field_dependency_action.rb +42 -0
- data/lib/docspring/models/{create_pdf_template.rb → template_field_dependency_condition.rb} +116 -103
- data/lib/docspring/models/template_field_dependency_condition_input.rb +67 -0
- data/lib/docspring/models/template_field_dependency_input.rb +285 -0
- data/lib/docspring/models/template_field_dependency_match.rb +41 -0
- data/lib/docspring/models/template_field_dependency_operator.rb +49 -0
- data/lib/docspring/models/template_field_logic_status.rb +44 -0
- data/lib/docspring/models/template_form_mode.rb +42 -0
- data/lib/docspring/models/{template_model_code_response.rb → template_model_code.rb} +37 -96
- data/lib/docspring/models/template_page_ai_error.rb +43 -0
- data/lib/docspring/models/template_page_ai_naming_status.rb +41 -0
- data/lib/docspring/models/template_page_fields_status.rb +44 -0
- data/lib/docspring/models/template_page_image_status.rb +41 -0
- data/lib/docspring/models/template_page_processing_status.rb +275 -0
- data/lib/docspring/models/{create_webhook_data.rb → template_source_pdf.rb} +92 -103
- data/lib/docspring/models/{template_preview.rb → template_summary.rb} +436 -589
- data/lib/docspring/models/template_summary_list.rb +200 -0
- data/lib/docspring/models/template_type.rb +41 -0
- data/lib/docspring/models/template_version.rb +238 -0
- data/lib/docspring/models/template_version_type.rb +42 -0
- data/lib/docspring/models/text_alignment.rb +43 -0
- data/lib/docspring/models/text_overflow.rb +41 -0
- data/lib/docspring/models/text_vertical_alignment.rb +42 -0
- data/lib/docspring/models/typeface.rb +56 -0
- data/lib/docspring/models/{create_submission_data_request_data.rb → update_signature_request_request.rb} +72 -196
- data/lib/docspring/models/update_template_document_request.rb +205 -0
- data/lib/docspring/models/update_template_request.rb +514 -0
- data/lib/docspring/models/update_webhook_request.rb +344 -0
- data/lib/docspring/models/upload_method.rb +40 -0
- data/lib/docspring/models/{upload_presign_response.rb → upload_presign.rb} +93 -140
- data/lib/docspring/models/url_source_pdf.rb +212 -0
- data/lib/docspring/models/webhook.rb +97 -107
- data/lib/docspring/models/webhook_event_type.rb +64 -0
- data/lib/docspring/models/webhook_list.rb +200 -0
- data/lib/docspring/models/webhook_mode.rb +41 -0
- data/lib/docspring/request_schemas.json +3187 -0
- data/lib/docspring/request_validator.rb +396 -0
- data/lib/docspring/version.rb +4 -4
- data/lib/docspring.rb +125 -53
- data/spec/api/client_spec.rb +304 -277
- data/spec/models/ai_field_naming_language_spec.rb +30 -0
- data/spec/models/authentication_check_spec.rb +36 -0
- data/spec/models/barcode_symbology_spec.rb +30 -0
- data/spec/models/check_character_spec.rb +30 -0
- data/spec/models/combined_field_type_spec.rb +30 -0
- data/spec/models/combined_pdf_files_spec.rb +36 -0
- data/spec/models/combined_pdf_list_spec.rb +42 -0
- data/spec/models/combined_pdf_source_input_spec.rb +44 -0
- data/spec/models/combined_pdf_source_pdf_spec.rb +42 -0
- data/spec/models/{submission_data_request_token_spec.rb → combined_pdf_source_spec.rb} +18 -12
- data/spec/models/combined_pdf_source_type_spec.rb +30 -0
- data/spec/models/{combined_submission_spec.rb → combined_pdf_spec.rb} +20 -24
- data/spec/models/combined_pdf_state_spec.rb +30 -0
- data/spec/models/{copy_template_options_spec.rb → copy_template_request_spec.rb} +9 -9
- data/spec/models/{combine_pdfs_data_spec.rb → create_combined_pdf_request_spec.rb} +12 -18
- data/spec/models/{create_custom_file_data_spec.rb → create_custom_file_from_upload_request_spec.rb} +9 -9
- data/spec/models/{move_template_data_spec.rb → create_folder_request_spec.rb} +11 -11
- data/spec/models/{list_submissions_response_spec.rb → create_signature_request_event_request_spec.rb} +18 -12
- data/spec/models/create_signature_request_token_request_spec.rb +36 -0
- data/spec/models/{submission_batch_data_spec.rb → create_submission_batch_request_spec.rb} +13 -13
- data/spec/models/{create_pdf_submission_data_spec.rb → create_submission_request_spec.rb} +24 -18
- data/spec/models/{template_preview_spec.rb → create_template_request_spec.rb} +40 -118
- data/spec/models/create_webhook_request_spec.rb +96 -0
- data/spec/models/custom_file_list_spec.rb +42 -0
- data/spec/models/custom_file_source_pdf_spec.rb +42 -0
- data/spec/models/custom_file_spec.rb +29 -5
- data/spec/models/error_code_spec.rb +30 -0
- data/spec/models/{create_submission_response_spec.rb → error_detail_spec.rb} +14 -18
- data/spec/models/{batch_generate_pdfs201_response_spec.rb → error_info_spec.rb} +27 -19
- data/spec/models/error_response_spec.rb +4 -14
- data/spec/models/expiration_interval_spec.rb +30 -0
- data/spec/models/field_comparison_condition_spec.rb +48 -0
- data/spec/models/field_comparison_operator_spec.rb +30 -0
- data/spec/models/field_display_type_spec.rb +30 -0
- data/spec/models/field_equals_condition_spec.rb +48 -0
- data/spec/models/field_equals_operator_spec.rb +30 -0
- data/spec/models/field_in_condition_spec.rb +48 -0
- data/spec/models/field_override_spec.rb +408 -0
- data/spec/models/field_presence_condition_spec.rb +42 -0
- data/spec/models/field_presence_operator_spec.rb +30 -0
- data/spec/models/field_range_condition_spec.rb +54 -0
- data/spec/models/field_reimport_state_spec.rb +30 -0
- data/spec/models/field_setup_logic_spec.rb +30 -0
- data/spec/models/field_setup_naming_spec.rb +30 -0
- data/spec/models/field_setup_source_spec.rb +30 -0
- data/spec/models/folder_list_spec.rb +42 -0
- data/spec/models/folder_spec.rb +16 -4
- data/spec/models/generated_file_spec.rb +78 -0
- data/spec/models/generated_file_state_spec.rb +30 -0
- data/spec/models/html_engine_options_input_spec.rb +90 -0
- data/spec/models/html_engine_options_spec.rb +90 -0
- data/spec/models/image_gravity_spec.rb +30 -0
- data/spec/models/image_scale_type_spec.rb +30 -0
- data/spec/models/model_code_language_spec.rb +30 -0
- data/spec/models/move_folder_request_spec.rb +36 -0
- data/spec/models/move_template_request_spec.rb +36 -0
- data/spec/models/number_condition_type_spec.rb +30 -0
- data/spec/models/page_format_spec.rb +30 -0
- data/spec/models/{publish_version_data_spec.rb → publish_template_version_request_spec.rb} +11 -11
- data/spec/models/{rename_folder_data_spec.rb → rename_folder_request_spec.rb} +9 -9
- data/spec/models/restore_template_version_request_spec.rb +36 -0
- data/spec/models/shape_type_spec.rb +30 -0
- data/spec/models/signature_request_auth_second_factor_type_spec.rb +30 -0
- data/spec/models/signature_request_auth_type_spec.rb +30 -0
- data/spec/models/{submission_data_request_event_spec.rb → signature_request_event_spec.rb} +16 -18
- data/spec/models/signature_request_event_type_spec.rb +30 -0
- data/spec/models/{create_submission_data_request_data_spec.rb → signature_request_input_spec.rb} +28 -30
- data/spec/models/signature_request_message_type_spec.rb +30 -0
- data/spec/models/{submission_data_request_show_spec.rb → signature_request_spec.rb} +31 -31
- data/spec/models/signature_request_state_spec.rb +30 -0
- data/spec/models/signature_request_token_spec.rb +72 -0
- data/spec/models/signature_request_token_type_spec.rb +30 -0
- data/spec/models/string_condition_type_spec.rb +30 -0
- data/spec/models/submission_action_spec.rb +4 -22
- data/spec/models/submission_action_state_spec.rb +30 -0
- data/spec/models/submission_action_type_spec.rb +30 -0
- data/spec/models/submission_batch_spec.rb +27 -13
- data/spec/models/submission_batch_state_spec.rb +30 -0
- data/spec/models/submission_files_spec.rb +48 -0
- data/spec/models/submission_input_spec.rb +96 -0
- data/spec/models/submission_list_spec.rb +42 -0
- data/spec/models/submission_source_pdf_spec.rb +42 -0
- data/spec/models/submission_source_spec.rb +30 -0
- data/spec/models/submission_spec.rb +26 -56
- data/spec/models/submission_state_spec.rb +30 -0
- data/spec/models/template_actor_spec.rb +60 -0
- data/spec/models/template_actor_type_spec.rb +30 -0
- data/spec/models/{submission_data_request_spec.rb → template_defaults_input_spec.rb} +29 -53
- data/spec/models/template_defaults_spec.rb +150 -0
- data/spec/models/{json_schema_spec.rb → template_document_spec.rb} +21 -21
- data/spec/models/template_document_state_spec.rb +30 -0
- data/spec/models/template_field_dependency_action_spec.rb +30 -0
- data/spec/models/template_field_dependency_condition_input_spec.rb +44 -0
- data/spec/models/template_field_dependency_condition_spec.rb +54 -0
- data/spec/models/template_field_dependency_input_spec.rb +60 -0
- data/spec/models/template_field_dependency_match_spec.rb +30 -0
- data/spec/models/template_field_dependency_operator_spec.rb +30 -0
- data/spec/models/template_field_dependency_spec.rb +60 -0
- data/spec/models/template_field_logic_status_spec.rb +30 -0
- data/spec/models/template_form_mode_spec.rb +30 -0
- data/spec/models/{template_model_code_response_spec.rb → template_model_code_spec.rb} +9 -13
- data/spec/models/template_page_ai_error_spec.rb +30 -0
- data/spec/models/template_page_ai_naming_status_spec.rb +30 -0
- data/spec/models/template_page_fields_status_spec.rb +30 -0
- data/spec/models/template_page_image_status_spec.rb +30 -0
- data/spec/models/template_page_processing_status_spec.rb +60 -0
- data/spec/models/template_source_pdf_spec.rb +54 -0
- data/spec/models/template_spec.rb +40 -154
- data/spec/models/template_summary_list_spec.rb +42 -0
- data/spec/models/template_summary_spec.rb +252 -0
- data/spec/models/template_type_spec.rb +30 -0
- data/spec/models/template_version_spec.rb +54 -0
- data/spec/models/template_version_type_spec.rb +30 -0
- data/spec/models/text_alignment_spec.rb +30 -0
- data/spec/models/text_overflow_spec.rb +30 -0
- data/spec/models/text_vertical_alignment_spec.rb +30 -0
- data/spec/models/typeface_spec.rb +30 -0
- data/spec/models/{submission_batch_with_submissions_spec.rb → update_signature_request_request_spec.rb} +18 -22
- data/spec/models/update_template_document_request_spec.rb +48 -0
- data/spec/models/{submission_preview_spec.rb → update_template_request_spec.rb} +81 -41
- data/spec/models/update_webhook_request_spec.rb +96 -0
- data/spec/models/upload_method_spec.rb +30 -0
- data/spec/models/{upload_presign_response_spec.rb → upload_presign_spec.rb} +13 -17
- data/spec/models/url_source_pdf_spec.rb +42 -0
- data/spec/models/webhook_event_type_spec.rb +30 -0
- data/spec/models/webhook_list_spec.rb +42 -0
- data/spec/models/webhook_mode_spec.rb +30 -0
- data/spec/models/webhook_spec.rb +4 -8
- data/spec/spec_helper.rb +3 -3
- metadata +485 -202
- data/docs/AddFieldsData.md +0 -18
- data/docs/BatchGeneratePdfs201Response.md +0 -28
- data/docs/CombinePdfsData.md +0 -28
- data/docs/CombinedSubmission.md +0 -44
- data/docs/CombinedSubmissionAction.md +0 -30
- data/docs/CopyTemplateOptions.md +0 -22
- data/docs/CreateCombinedSubmissionResponse.md +0 -26
- data/docs/CreateCustomFileData.md +0 -18
- data/docs/CreateCustomFileResponse.md +0 -24
- data/docs/CreateHtmlTemplate.md +0 -18
- data/docs/CreatePdfSubmissionData.md +0 -34
- data/docs/CreatePdfTemplate.md +0 -18
- data/docs/CreateSubmissionDataRequestData.md +0 -44
- data/docs/CreateSubmissionDataRequestEventRequest.md +0 -24
- data/docs/CreateSubmissionDataRequestEventResponse.md +0 -24
- data/docs/CreateSubmissionDataRequestResponse.md +0 -24
- data/docs/CreateSubmissionDataRequestTokenResponse.md +0 -24
- data/docs/CreateSubmissionResponse.md +0 -26
- data/docs/ErrorOrMultipleErrorsResponse.md +0 -22
- data/docs/ForbiddenErrorResponse.md +0 -22
- data/docs/JsonSchema.md +0 -40
- data/docs/ListSubmissionsResponse.md +0 -22
- data/docs/MoveFolderData.md +0 -18
- data/docs/MoveTemplateData.md +0 -20
- data/docs/MultipleErrorsResponse.md +0 -20
- data/docs/PublishVersionData.md +0 -20
- data/docs/RestoreVersionData.md +0 -18
- data/docs/Submission422Response.md +0 -24
- data/docs/SubmissionBatchData.md +0 -26
- data/docs/SubmissionBatchWithSubmissions.md +0 -34
- data/docs/SubmissionDataRequest.md +0 -60
- data/docs/SubmissionDataRequestEvent.md +0 -30
- data/docs/SubmissionDataRequestShow.md +0 -62
- data/docs/SubmissionDataRequestToken.md +0 -24
- data/docs/SubmissionPreview.md +0 -64
- data/docs/SuccessErrorResponse.md +0 -20
- data/docs/SuccessMultipleErrorsResponse.md +0 -20
- data/docs/TemplateAddFieldsResponse.md +0 -22
- data/docs/TemplateDeleteResponse.md +0 -24
- data/docs/TemplateModelCodeResponse.md +0 -22
- data/docs/TemplatePreview.md +0 -116
- data/docs/TemplatePublishVersionResponse.md +0 -22
- data/docs/UpdateHtmlTemplate.md +0 -18
- data/docs/UpdatePdfTemplate.md +0 -18
- data/docs/UpdateSubmissionDataRequestData.md +0 -42
- data/docs/UploadPresignResponse.md +0 -24
- data/lib/docspring/models/batch_generate_pdfs201_response.rb +0 -352
- data/lib/docspring/models/combined_submission_action.rb +0 -384
- data/lib/docspring/models/create_combined_submission_response.rb +0 -324
- data/lib/docspring/models/create_custom_file_response.rb +0 -314
- data/lib/docspring/models/create_html_template.rb +0 -243
- data/lib/docspring/models/create_submission_data_request_event_response.rb +0 -314
- data/lib/docspring/models/create_submission_data_request_response.rb +0 -314
- data/lib/docspring/models/create_submission_data_request_token_response.rb +0 -314
- data/lib/docspring/models/create_submission_response.rb +0 -324
- data/lib/docspring/models/error_or_multiple_errors_response.rb +0 -290
- data/lib/docspring/models/forbidden_error_response.rb +0 -323
- data/lib/docspring/models/json_schema.rb +0 -329
- data/lib/docspring/models/list_submissions_response.rb +0 -283
- data/lib/docspring/models/multiple_errors_response.rb +0 -296
- data/lib/docspring/models/submission422_response.rb +0 -299
- data/lib/docspring/models/submission_batch_with_submissions.rb +0 -433
- data/lib/docspring/models/submission_data_request.rb +0 -570
- data/lib/docspring/models/submission_data_request_token.rb +0 -279
- data/lib/docspring/models/submission_preview.rb +0 -637
- data/lib/docspring/models/success_multiple_errors_response.rb +0 -279
- data/lib/docspring/models/template_add_fields_response.rb +0 -290
- data/lib/docspring/models/template_delete_response.rb +0 -300
- data/lib/docspring/models/template_publish_version_response.rb +0 -305
- data/lib/docspring/models/update_html_template.rb +0 -243
- data/lib/docspring/models/update_pdf_template.rb +0 -243
- data/spec/models/add_fields_data_spec.rb +0 -36
- data/spec/models/combined_submission_action_spec.rb +0 -84
- data/spec/models/create_combined_submission_response_spec.rb +0 -64
- data/spec/models/create_custom_file_response_spec.rb +0 -58
- data/spec/models/create_folder_data_spec.rb +0 -36
- data/spec/models/create_html_template_spec.rb +0 -36
- data/spec/models/create_pdf_template_spec.rb +0 -36
- data/spec/models/create_submission_data_request_event_request_spec.rb +0 -62
- data/spec/models/create_submission_data_request_event_response_spec.rb +0 -58
- data/spec/models/create_submission_data_request_response_spec.rb +0 -58
- data/spec/models/create_submission_data_request_token_response_spec.rb +0 -58
- data/spec/models/create_webhook_data_spec.rb +0 -36
- data/spec/models/error_or_multiple_errors_response_spec.rb +0 -52
- data/spec/models/forbidden_error_response_spec.rb +0 -56
- data/spec/models/move_folder_data_spec.rb +0 -36
- data/spec/models/multiple_errors_response_spec.rb +0 -46
- data/spec/models/restore_version_data_spec.rb +0 -36
- data/spec/models/submission422_response_spec.rb +0 -58
- data/spec/models/success_error_response_spec.rb +0 -46
- data/spec/models/success_multiple_errors_response_spec.rb +0 -46
- data/spec/models/template_add_fields_response_spec.rb +0 -52
- data/spec/models/template_delete_response_spec.rb +0 -58
- data/spec/models/template_publish_version_response_spec.rb +0 -52
- data/spec/models/update_html_template_spec.rb +0 -36
- data/spec/models/update_pdf_template_spec.rb +0 -36
- data/spec/models/update_submission_data_request_data_spec.rb +0 -116
- data/spec/models/update_webhook_data_spec.rb +0 -36
data/AGENTS.md
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
# AGENTS.md
|
|
2
2
|
|
|
3
|
-
Notes for AI coding agents working with the DocSpring Ruby SDK (`docspring`)
|
|
4
|
-
|
|
3
|
+
Notes for AI coding agents working with the DocSpring Ruby SDK (`docspring`): integrating it into an
|
|
4
|
+
app, or working in this repository.
|
|
5
5
|
|
|
6
6
|
## This code is generated
|
|
7
7
|
|
|
8
8
|
Every file here is generated from DocSpring's OpenAPI spec by
|
|
9
9
|
[DocSpring's fork of OpenAPI Generator](https://github.com/DocSpring/openapi-generator/tree/docspring/all_patches), and each release replaces
|
|
10
|
-
all of it. Don't
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
all of it. Don't patch an installed copy: the next release overwrites the change. Issues and pull requests are welcome
|
|
11
|
+
at https://github.com/DocSpring/docspring-ruby (or email support@docspring.com), and DocSpring makes the fix in the generator so that every release
|
|
12
|
+
keeps it.
|
|
13
13
|
|
|
14
14
|
## Where to look
|
|
15
15
|
|
|
@@ -17,17 +17,77 @@ the generator.
|
|
|
17
17
|
- [docs/Client.md](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md): every method, with its parameters and return type.
|
|
18
18
|
- [docs/](https://github.com/DocSpring/docspring-ruby/tree/main/docs): every model and its fields.
|
|
19
19
|
- https://docspring.com/docs/llms.txt: DocSpring's documentation for LLMs (`llms-small.txt`, `llms-full.txt`).
|
|
20
|
-
- https://docspring.com/docs/api/: the API reference, with Ruby code
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
-
|
|
30
|
-
|
|
31
|
-
-
|
|
32
|
-
|
|
33
|
-
|
|
20
|
+
- https://docspring.com/docs/: the guides. https://docspring.com/docs/api/: the API reference, with Ruby code
|
|
21
|
+
for every method.
|
|
22
|
+
- https://docspring.com/api-docs/v2/openapi.json: the OpenAPI spec this SDK is generated from.
|
|
23
|
+
|
|
24
|
+
## Set up
|
|
25
|
+
|
|
26
|
+
- Credentials come from `DOCSPRING_TOKEN_ID` and `DOCSPRING_TOKEN_SECRET` (an API token from
|
|
27
|
+
https://app.docspring.com/api_tokens). Keep them in the environment or a secret store, never in code. An account in
|
|
28
|
+
the EU region also needs `DOCSPRING_REGION=EU`.
|
|
29
|
+
- Call DocSpring from your server. The token secret gives full access to the account, so it must never reach a browser
|
|
30
|
+
or a mobile app. Signers use signing links or the embedded signing form instead (see Signature requests).
|
|
31
|
+
- `test_authentication` checks the credentials.
|
|
32
|
+
|
|
33
|
+
## Generate PDFs
|
|
34
|
+
|
|
35
|
+
- Read a template's data shape before writing the request: `get_template_schema` returns the
|
|
36
|
+
JSON Schema of its submission data (its field names and types), and `get_template_model_code`
|
|
37
|
+
generates typed code for it. The keys of `data` are the template's field names. Date fields take `YYYY-MM-DD`.
|
|
38
|
+
- Template IDs look like `tpl_...` and submission IDs like `sub_...`. Store the submission ID with your own record.
|
|
39
|
+
- Pass `test: true` while you build: test PDFs are free and watermarked. Live PDFs use credits.
|
|
40
|
+
- A submission uses the template's latest published version (its draft when nothing has been published yet). Pass
|
|
41
|
+
`version` (`draft`, `1.2.0`, or `1` for the latest 1.x.x) to use another one.
|
|
42
|
+
- `create_submission` waits for the PDF, for up to 95 seconds, and returns the submission in
|
|
43
|
+
its final state: check its `state` (`processed`, or a failure state with an `error_message`). If the PDF takes longer,
|
|
44
|
+
the call fails with a 504 `polling_timeout` error that has the submission's ID. The submission exists and is still
|
|
45
|
+
being made, so don't send the request again (that makes a second one): get it with
|
|
46
|
+
`get_submission` until its state isn't `pending`. For slow templates or many PDFs, set
|
|
47
|
+
`wait` to false and use webhooks (https://docspring.com/docs/api-guide/synchronous-requests/).
|
|
48
|
+
`create_submission_batch` sends up to 50 submissions in one request.
|
|
49
|
+
- `files.pdf.download_url` is a temporary link. Keep the submission ID (or `files.pdf.permanent_url`, which needs your
|
|
50
|
+
API token) and get a fresh link when someone downloads the PDF.
|
|
51
|
+
- Submission data is often personal data: don't log request or response bodies. `expires_in` deletes a submission's PDF
|
|
52
|
+
and data that many seconds after it's created, and `expire_submission` deletes them now.
|
|
53
|
+
|
|
54
|
+
## Errors
|
|
55
|
+
|
|
56
|
+
- Methods raise `DocSpring::ApiError` for an error response, with the HTTP status in `code` and the body in `response_body`.
|
|
57
|
+
- Every error response has one body: `{"error": {"code", "message", "details", "request_id"}}`. Branch on `code`, not
|
|
58
|
+
on the message. Each detail has a `pointer` to the request body value it's about, or the query `parameter`.
|
|
59
|
+
- 422 `invalid_data`: the data doesn't match the template. The submission is saved anyway, as `invalid_data`, and the
|
|
60
|
+
error has its `submission_id`.
|
|
61
|
+
- 402 `insufficient_credits`: the submission is saved and is made automatically once the account has credits. Don't
|
|
62
|
+
send it again (https://docspring.com/docs/api-guide/credits-and-rate-limits/).
|
|
63
|
+
- 429 `rate_limited`: wait for the seconds in the `Retry-After` header, then retry.
|
|
64
|
+
- Requests are checked against the API's request schemas before they're sent. A request the API would reject raises `DocSpring::ValidationError` (an `ArgumentError`), whose `details` are hashes with `code`, `message` and a `pointer` into the body (or a `parameter`). Turn the check off with `client.api_client.config.client_side_validation = false`.
|
|
65
|
+
|
|
66
|
+
## Webhooks
|
|
67
|
+
|
|
68
|
+
- Webhooks tell your server when a submission is processed or fails, instead of polling
|
|
69
|
+
(https://docspring.com/docs/webhooks/overview/). A webhook created with API v2 sends events in API v2's format
|
|
70
|
+
(version 4).
|
|
71
|
+
- Verify each request's `X-DocSpring-Signature` header before acting on it: an HMAC-SHA256 of `{t}.{raw body}` with the
|
|
72
|
+
webhook's signing secret, computed over the raw body exactly as received
|
|
73
|
+
(https://docspring.com/docs/webhooks/verifying-signatures/).
|
|
74
|
+
- No webhook is sent when a submission starts waiting for credits.
|
|
75
|
+
|
|
76
|
+
## Signature requests
|
|
77
|
+
|
|
78
|
+
- To have people fill in fields and sign before the PDF is made, create the submission with `signature_requests`. Each
|
|
79
|
+
one has the `fields` its signer fills in (a field belongs to one signature request), and their `name` and `email`.
|
|
80
|
+
The PDF is made when every signer has finished
|
|
81
|
+
(https://docspring.com/docs/api-guide/create-signature-requests/).
|
|
82
|
+
- Send a signer to the `signature_request_url` of a token from
|
|
83
|
+
`create_signature_request_token`. An `api` token's link opens the form for 24 hours and an
|
|
84
|
+
`email` token's for 7 days (`expires_at`), so create a new token when a signer comes back later.
|
|
85
|
+
- To show the signing form on your own site, use Signature Requests JS, and add the site's domain to the template's
|
|
86
|
+
Embed Domains (https://docspring.com/docs/guides/embedded-forms/embedded-signature-requests/).
|
|
87
|
+
|
|
88
|
+
## Responses
|
|
89
|
+
|
|
90
|
+
- List methods return `data` and `next_cursor`: pass `next_cursor` as `cursor` to get the next page.
|
|
91
|
+
- Responses can be newer than this SDK, because DocSpring adds fields and enum values to API v2 without a new
|
|
92
|
+
version. The model leaves out a response field added to the API after this release. Enum values in responses are strings, so a
|
|
93
|
+
value added after this release comes back as it is: handle values you don't recognize.
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,126 @@
|
|
|
1
|
+
### 4.0.0 [October 26, 2026]
|
|
2
|
+
|
|
3
|
+
- **BREAKING CHANGE**: This version calls DocSpring API v2 (`/api/v2`). The 3.x versions call API v1, which keeps
|
|
4
|
+
working. Every change is in the migration guide: https://docspring.com/docs/api-guide/migrating-to-api-v2/
|
|
5
|
+
- **BREAKING CHANGE**: If you set the API's full base URL yourself, change `/api/v1` in it to `/api/v2`. The client only
|
|
6
|
+
picks the version in the URLs it builds from a region or host.
|
|
7
|
+
- **BREAKING CHANGE**: Operations are named after the resource they act on. generate_pdf is create_submission,
|
|
8
|
+
batch_generate_pdfs is create_submission_batch, combine_pdfs is create_combined_pdf, create_html_template and
|
|
9
|
+
create_pdf_template_from_upload are create_template (with a `template_type`), create_pdf_template (which uploads a PDF
|
|
10
|
+
file) is upload_template, get_full_template is get_template (which returns the template, without its fields for now),
|
|
11
|
+
update_template_document (which uploads a PDF file) is upload_template_document, update_template_document_from_upload
|
|
12
|
+
is update_template_document, generate_preview is generate_submission_preview, get_combined_submission is
|
|
13
|
+
get_combined_pdf, list_combined_submissions is list_combined_pdfs, expire_combined_submission is expire_combined_pdf,
|
|
14
|
+
move_template_to_folder is move_template and move_folder_to_folder is move_folder. New: get_folder, list_custom_files,
|
|
15
|
+
get_custom_file and delete_custom_file. A template's fields, and adding fields to a template, aren't in API v2 yet.
|
|
16
|
+
- **BREAKING CHANGE**: Data requests are called signature requests. `get_data_request`, `update_data_request`,
|
|
17
|
+
`create_data_request_token` and `create_data_request_event` are `get_signature_request`, `update_signature_request`,
|
|
18
|
+
`create_signature_request_token` and `create_signature_request_event` (at `/signature_requests`), and their models are
|
|
19
|
+
`SignatureRequest`, `SignatureRequestToken` and `SignatureRequestEvent`. A submission's `data_requests` is
|
|
20
|
+
`signature_requests` (also when you create one), `data_request_id` is `signature_request_id`, a token's
|
|
21
|
+
`data_request_url` is `signature_request_url`, the `waiting_for_data_requests` state is
|
|
22
|
+
`waiting_for_signature_requests`, and a template's `add_data_request_submission_id_footers` is
|
|
23
|
+
`add_signature_request_submission_id_footers`. New ones get IDs that start with `srq_` instead of `drq_`.
|
|
24
|
+
- **BREAKING CHANGE**: A response is the resource itself, with no `status` or wrapper key. Lists return `data` and
|
|
25
|
+
`next_cursor`: pass `next_cursor` as `cursor` to get the next page, and `limit` (1 to 100, default 50) for its size.
|
|
26
|
+
`page` and `per_page` are gone. Every create returns 201.
|
|
27
|
+
- **BREAKING CHANGE**: Every error has one shape, `{"error": {"code", "message", "details", "request_id"}}`, with a
|
|
28
|
+
`code` to check (`validation_failed`, `not_found`, `insufficient_credits`, `rate_limited`, ...), and each detail has a
|
|
29
|
+
`pointer` to the body value it's about, or a `parameter` with the query parameter's name.
|
|
30
|
+
- **BREAKING CHANGE**: Requests are validated strictly: an unknown property or query parameter, or a value of the wrong
|
|
31
|
+
type, is a 422 instead of being ignored. Request bodies must be JSON (`Content-Type: application/json`, or it's a
|
|
32
|
+
415), except the PDF uploads. Request bodies are flat, with no `template`, `folder` or `webhook` key around them.
|
|
33
|
+
- **BREAKING CHANGE**: Submission data is checked more strictly. An empty `data` is validated like any other, date
|
|
34
|
+
fields take `YYYY-MM-DD` (or the template's date format when `parse_dates_using_template_date_format` is on), and a
|
|
35
|
+
signature request's `fields` must be fields on the template (set `ignore_unknown_fields` to leave out the others). A
|
|
36
|
+
submission that fails because of the template is still saved as `invalid_data`, and the 422 includes its
|
|
37
|
+
`submission_id`.
|
|
38
|
+
- **BREAKING CHANGE**: A submission's or combined PDF's files are in `files`, by format. `files.pdf` has `state`,
|
|
39
|
+
`error_message`, `download_url`, `permanent_url`, `filename`, `content_type`, `size` and `sha256`, and replaces
|
|
40
|
+
`download_url`, `permanent_download_url` and `pdf_hash`. A submission's `files.audit_trail` and `files.preview`, with
|
|
41
|
+
the same properties, replace `audit_trail_download_url` and `preview_download_url`. A file made after its submission
|
|
42
|
+
was processed is listed while it's being made, so check its `state` before using its links. Combined submissions are
|
|
43
|
+
combined PDFs (`CombinedPdf`), a template's `document_url` is `document.download_url`, and a custom file's `url` is
|
|
44
|
+
`download_url`.
|
|
45
|
+
- **BREAKING CHANGE**: A template's `embed_domains` is a list of domains, not a comma-separated string, and each entry
|
|
46
|
+
is checked. Copying a template with `parent_folder_id` null puts the copy at the root (leave it out to keep the
|
|
47
|
+
template's folder). A template's schema and model code describe the version that submissions use by default (the
|
|
48
|
+
latest published version), not the draft: pass `version` for another one.
|
|
49
|
+
- **BREAKING CHANGE**: Every property name is snake_case, including template `defaults` (`font_size`, was `fontSize`),
|
|
50
|
+
`html_engine_options` (`margin_top`), a field dependency condition's `range_max`, and the field settings in a
|
|
51
|
+
submission's `field_overrides`.
|
|
52
|
+
- `field_overrides` takes a `DocSpring::FieldOverride` per field name, with every setting an override can change
|
|
53
|
+
(`required`, `font_size`, `color`, ...), so a misspelt setting or a value of the wrong type is caught before the
|
|
54
|
+
request is sent.
|
|
55
|
+
- A combined PDF's `source_pdfs` and a rule's `conditions` take a model per kind, with only the properties that kind
|
|
56
|
+
uses (another kind's property is a 422 `not_allowed`). `CombinedPdfSourceInput` is a `SubmissionSourcePdf`,
|
|
57
|
+
`CombinedPdfSourcePdf`, `TemplateSourcePdf`, `CustomFileSourcePdf` or `UrlSourcePdf`, picked by its `type`.
|
|
58
|
+
`TemplateFieldDependencyConditionInput` is a `FieldPresenceCondition` (`present`, `blank`), `FieldEqualsCondition`
|
|
59
|
+
(`equals`, `not_equals`), `FieldInCondition` (`in`, with a list), `FieldComparisonCondition` (`gt`, `gte`, `lt`,
|
|
60
|
+
`lte`, on a number field) or `FieldRangeCondition` (`range`), picked by its `operator`. Pass hashes, or the models,
|
|
61
|
+
which set their own `type` (and `FieldInCondition` and `FieldRangeCondition` their `operator`):
|
|
62
|
+
`DocSpring::UrlSourcePdf.new(url: url)`. A template returns its conditions with only the properties their operators
|
|
63
|
+
use, in the shape an update takes.
|
|
64
|
+
- **BREAKING CHANGE**: Templates: `ready` and a `document` object (with its `state`, `page_count` and
|
|
65
|
+
`page_dimensions`) replace `document_processed`, `document_state`, `document_parse_error` and the `page_*` fields.
|
|
66
|
+
`list_templates` returns template summaries. Templates have no `webhook_url` or `webhook_options`: create a webhook
|
|
67
|
+
with `template_ids` instead.
|
|
68
|
+
- **BREAKING CHANGE**: Secrets are write-only. A submission's or combined PDF's `password` and a template's
|
|
69
|
+
`encrypt_pdfs_password` and `slack_webhook_url` aren't returned; `has_password`, `has_encrypt_pdfs_password` and
|
|
70
|
+
`has_slack_webhook_url` say whether one is set.
|
|
71
|
+
- **BREAKING CHANGE**: Webhooks created with this version send payload version 4, `{"id", "event_type", "created_at",
|
|
72
|
+
"data"}`, where `data` is the resource as API v2 returns it. Their events have API v2's names
|
|
73
|
+
(`combined_pdf.processed`, `signature_request.completed`). Webhooks created with 3.x or in the dashboard keep their
|
|
74
|
+
payload version.
|
|
75
|
+
- **BREAKING CHANGE**: Models are named after the API's resources (`Submission`, `CombinedPdf`, `Template`,
|
|
76
|
+
`TemplateSummary`, `SignatureRequest`), request bodies after their operation (`CreateSubmissionRequest`), and
|
|
77
|
+
enums are their own types (`SubmissionState`, `WebhookEventType`).
|
|
78
|
+
- Response enums are types too (`SubmissionState`, `TemplateType`). Their constants are the values this version knows
|
|
79
|
+
(`DocSpring::SubmissionState::PROCESSED`), and the values stay strings, so a value added to the API after this release
|
|
80
|
+
comes back as it came.
|
|
81
|
+
- The client checks each request against the API's request schemas before sending it, so an invalid request fails
|
|
82
|
+
without a round trip, with the details the API's 422 response would have. A request the API would reject raises
|
|
83
|
+
`DocSpring::ValidationError` (an `ArgumentError`), whose `details` are hashes with `code`, `message` and a `pointer`
|
|
84
|
+
into the body (or a `parameter`). The models' setters no longer check patterns, lengths or ranges themselves. Turn
|
|
85
|
+
the check off with `client.api_client.config.client_side_validation = false`.
|
|
86
|
+
- A waited request to `sync.api.docspring.com` that times out returns a 504 `polling_timeout` error with the resource's
|
|
87
|
+
ID, so you can get it later. Without an ID, the request got no answer in time: check whether the resource was created
|
|
88
|
+
before you send it again.
|
|
89
|
+
- A nullable map or list that you set to `nil` (such as a template's `html_engine_options`) is sent as `null` instead of
|
|
90
|
+
being left out.
|
|
91
|
+
- **BREAKING CHANGE**: A client created with credentials, a host or a region has its own `ApiClient`, with a copy of
|
|
92
|
+
`DocSpring::Configuration.default`, so two clients with different credentials or hosts no longer change each other's.
|
|
93
|
+
`DocSpring::Client.new` with no arguments still uses `ApiClient.default`. Pass `api_client:` to share one.
|
|
94
|
+
- An empty API token ID or secret counts as not set, so the client reads `DOCSPRING_TOKEN_ID` or
|
|
95
|
+
`DOCSPRING_TOKEN_SECRET` instead. It was sent as an empty string.
|
|
96
|
+
- Templates: new `default_form_mode` setting (`web`, `visual` or `dual`), when you create or update a template.
|
|
97
|
+
It's the hosted form that `/templates/<id>/form` opens when the link has no `mode` parameter: the web form, the
|
|
98
|
+
visual form (filled in on the PDF), or both in tabs. HTML templates have no visual form, so they only accept
|
|
99
|
+
`web`.
|
|
100
|
+
- Templates: `defaults` can set `required_field_background_color`, the background colour that visual forms and
|
|
101
|
+
signature requests give required fields. PDFs don't draw it.
|
|
102
|
+
- Templates: new `allow_skipping_optional_fields` setting (boolean), when you create or update a template. Visual
|
|
103
|
+
forms and signature requests then show the Continue button as soon as the required fields are filled in, without
|
|
104
|
+
visiting each optional field. The `allowSkippingOptionalFields` embed option overrides it.
|
|
105
|
+
- Templates: when you replace a template's PDF, `reimport_fields` (boolean) replaces the template's fields with the
|
|
106
|
+
fillable fields in the new PDF (or in its current PDF when you don't upload one). A PDF with no fillable fields
|
|
107
|
+
keeps the template's fields.
|
|
108
|
+
- Fields: `shape_type` can be `triangle` or `polygon`, with `shape_sides` (3 to 12) for a polygon. Text fields can set
|
|
109
|
+
`keep_leading_spaces` to keep the spaces at the start of each line in the PDF.
|
|
110
|
+
- Templates: create_template and upload_template take `detect_fields` (boolean, default false). DocSpring then sets
|
|
111
|
+
up the PDF's fields as the "Automatically detect fields" upload option does: it imports or detects them, names them
|
|
112
|
+
with AI and sets up conditional logic. `field_source` (`auto`, `pdf_detection` or `pdf_form_fields`),
|
|
113
|
+
`field_naming` (`ai` or `preserve`) and `field_logic` (`ai` or `none`) choose how, like the Set Up Fields choices
|
|
114
|
+
in the template editor. With `pdf_form_fields`, `preserve` and `none`, the PDF's form fields are imported with their
|
|
115
|
+
own names and no AI. Each account gets free AI pages every month, and further pages are paid from credits. See
|
|
116
|
+
https://docspring.com/docs/template-editor/automatic-field-detection/.
|
|
117
|
+
- Templates: new `ai_field_naming_language` setting (`auto`, `english` or `form_language`) for PDF templates, when
|
|
118
|
+
you create or update one: the language AI uses for field names. It's null for HTML templates.
|
|
119
|
+
- Templates: a template's `document` includes `has_fillable_fields`, `page_processing_statuses` (how processing is
|
|
120
|
+
going on each page: its image, its fields and AI naming) and `field_logic_status` (the AI logic step that runs once
|
|
121
|
+
every page's fields are done, and can still rename fields and add rules). Field setup is finished when
|
|
122
|
+
`document.state` is `processed` and `field_logic_status` isn't `pending` or `processing`.
|
|
123
|
+
|
|
1
124
|
### 3.5.0 [October 18, 2026]
|
|
2
125
|
|
|
3
126
|
- Submissions and combined submissions can be in the new `insufficient_credits` state: a live PDF that your credit
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
docspring (
|
|
4
|
+
docspring (4.0.0)
|
|
5
5
|
logger
|
|
6
6
|
typhoeus (~> 1.0, >= 1.0.1)
|
|
7
7
|
|
|
@@ -33,10 +33,10 @@ GEM
|
|
|
33
33
|
logger (1.7.0)
|
|
34
34
|
method_source (1.1.0)
|
|
35
35
|
parallel (1.28.0)
|
|
36
|
-
parser (3.3.
|
|
36
|
+
parser (3.3.13.0)
|
|
37
37
|
ast (~> 2.4.1)
|
|
38
38
|
racc
|
|
39
|
-
pry (0.16.
|
|
39
|
+
pry (0.16.1)
|
|
40
40
|
coderay (~> 1.1)
|
|
41
41
|
method_source (~> 1.0)
|
|
42
42
|
reline (>= 0.6.0)
|
|
@@ -104,7 +104,7 @@ CHECKSUMS
|
|
|
104
104
|
coderay (1.1.3) sha256=dc530018a4684512f8f38143cd2a096c9f02a1fc2459edcfe534787a7fc77d4b
|
|
105
105
|
date (3.6.0) sha256=18ac945c4e24ebd93534f8eab8c2fd8c5604b3e977105b3798d62a1e8d27b580
|
|
106
106
|
diff-lcs (1.6.2) sha256=9ae0d2cba7d4df3075fe8cd8602a8604993efc0dfa934cff568969efb1909962
|
|
107
|
-
docspring (
|
|
107
|
+
docspring (4.0.0)
|
|
108
108
|
ethon (0.18.0) sha256=b598afc9f30448cb068b850714b7d6948e941476095d04f90a4ac65b8d6efcb2
|
|
109
109
|
ffi (1.17.4) sha256=bcd1642e06f0d16fc9e09ac6d49c3a7298b9789bcb58127302f934e437d60acf
|
|
110
110
|
ffi (1.17.4-aarch64-linux-gnu) sha256=b208f06f91ffd8f5e1193da3cae3d2ccfc27fc36fba577baf698d26d91c080df
|
|
@@ -122,8 +122,8 @@ CHECKSUMS
|
|
|
122
122
|
logger (1.7.0) sha256=196edec7cc44b66cfb40f9755ce11b392f21f7967696af15d274dde7edff0203
|
|
123
123
|
method_source (1.1.0) sha256=181301c9c45b731b4769bc81e8860e72f9161ad7d66dd99103c9ab84f560f5c5
|
|
124
124
|
parallel (1.28.0) sha256=33e6de1484baf2524792d178b0913fc8eb94c628d6cfe45599ad4458c638c970
|
|
125
|
-
parser (3.3.
|
|
126
|
-
pry (0.16.
|
|
125
|
+
parser (3.3.13.0) sha256=e02f9b63c2fe05b0c68f692ba4df89b3cb113b663964f75d988fbebfd6c3deca
|
|
126
|
+
pry (0.16.1) sha256=d92d82c86e7f2dc34beec6d2892d5cf5ea517eea22eed3ceabb38ee62a98accc
|
|
127
127
|
pry-byebug (3.12.0) sha256=594e094ae8a8390a7ad4c7b36ae36e13304ed02664c67417d108dc5f7213d1b7
|
|
128
128
|
psych (5.5.0) sha256=4b245bbbd0f3238df8ccee766ebc1a6b062b10e4ee1d3284eb588739ba156a0a
|
|
129
129
|
racc (1.8.1) sha256=4a7f6929691dbec8b5209a0b373bc2614882b55fc5d2e447a21aaa691303d62f
|
|
@@ -142,4 +142,4 @@ CHECKSUMS
|
|
|
142
142
|
unicode-display_width (1.5.0) sha256=9890eebd24feb4cb0e0542c9b8c6beecb40cda27be8c7afe49312625b36156eb
|
|
143
143
|
|
|
144
144
|
BUNDLED WITH
|
|
145
|
-
4.0.
|
|
145
|
+
4.0.20
|
data/README.md
CHANGED
|
@@ -6,7 +6,10 @@ templates with your data, generates PDFs from HTML templates, combines PDFs and
|
|
|
6
6
|
[Documentation](https://docspring.com/docs/) · [API reference](https://docspring.com/docs/api/) ·
|
|
7
7
|
[RubyGems](https://rubygems.org/gems/docspring) · [Changelog](https://github.com/DocSpring/docspring-ruby/blob/main/CHANGELOG.md)
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
The code in this repository is generated from DocSpring's OpenAPI spec ([About this SDK](#about-this-sdk)). Issues and
|
|
10
|
+
pull requests are welcome.
|
|
11
|
+
|
|
12
|
+
Version 4.0.0. Requires Ruby >= 2.7.
|
|
10
13
|
|
|
11
14
|
## Install and configure
|
|
12
15
|
|
|
@@ -57,22 +60,21 @@ Fill a template with data (use your template's ID in place of `tpl_1234567890abc
|
|
|
57
60
|
|
|
58
61
|
```ruby
|
|
59
62
|
template_id = 'tpl_1234567890abcdef01'
|
|
60
|
-
|
|
61
|
-
data: { first_name
|
|
62
|
-
metadata: {
|
|
63
|
+
body = {
|
|
64
|
+
data: { 'first_name' => 'John', 'last_name' => 'Smith', 'phone_number' => '+11234567890' },
|
|
65
|
+
metadata: { user_id: 42 },
|
|
66
|
+
test: true,
|
|
63
67
|
}
|
|
64
|
-
wait = nil
|
|
65
68
|
|
|
66
|
-
response = client.
|
|
69
|
+
response = client.create_submission(
|
|
67
70
|
template_id,
|
|
68
|
-
|
|
69
|
-
wait: wait
|
|
71
|
+
body
|
|
70
72
|
)
|
|
71
73
|
puts response
|
|
72
74
|
```
|
|
73
75
|
|
|
74
|
-
By default the call waits for the PDF, for up to 95 seconds, and the submission in the response has
|
|
75
|
-
`download_url
|
|
76
|
+
By default the call waits for the PDF, for up to 95 seconds, and the submission in the response has a link to
|
|
77
|
+
download it (`files.pdf.download_url`). Set `wait` to false to get a pending submission straight away.
|
|
76
78
|
[Sync vs. async processing](https://docspring.com/docs/api-guide/synchronous-requests/) covers the time limit, status
|
|
77
79
|
checks and webhooks.
|
|
78
80
|
|
|
@@ -84,86 +86,91 @@ Ruby code for every method.
|
|
|
84
86
|
|
|
85
87
|
| Method | Description |
|
|
86
88
|
| ------ | ----------- |
|
|
87
|
-
| [`add_fields_to_template`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#add_fields_to_template) | Add new fields to a Template |
|
|
88
|
-
| [`batch_generate_pdfs`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#batch_generate_pdfs) | Generate multiple PDFs |
|
|
89
|
-
| [`combine_pdfs`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#combine_pdfs) | Merge submission PDFs, template PDFs, or custom files |
|
|
90
89
|
| [`copy_template`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#copy_template) | Copy a template |
|
|
91
|
-
| [`
|
|
92
|
-
| [`
|
|
93
|
-
| [`create_data_request_token`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#create_data_request_token) | Create a new data request token for form authentication |
|
|
90
|
+
| [`create_combined_pdf`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#create_combined_pdf) | Combine PDFs |
|
|
91
|
+
| [`create_custom_file_from_upload`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#create_custom_file_from_upload) | Create a custom file from an upload |
|
|
94
92
|
| [`create_folder`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#create_folder) | Create a folder |
|
|
95
|
-
| [`
|
|
96
|
-
| [`
|
|
97
|
-
| [`
|
|
93
|
+
| [`create_signature_request_event`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#create_signature_request_event) | Record a signature request event |
|
|
94
|
+
| [`create_signature_request_token`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#create_signature_request_token) | Create a signature request token |
|
|
95
|
+
| [`create_submission`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#create_submission) | Generate a PDF |
|
|
96
|
+
| [`create_submission_batch`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#create_submission_batch) | Generate PDFs in a batch |
|
|
97
|
+
| [`create_template`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#create_template) | Create a template |
|
|
98
98
|
| [`create_webhook`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#create_webhook) | Create a webhook |
|
|
99
|
+
| [`delete_custom_file`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#delete_custom_file) | Delete a custom file |
|
|
99
100
|
| [`delete_folder`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#delete_folder) | Delete a folder |
|
|
100
101
|
| [`delete_template`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#delete_template) | Delete a template |
|
|
101
102
|
| [`delete_webhook`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#delete_webhook) | Delete a webhook |
|
|
102
|
-
| [`
|
|
103
|
-
| [`expire_submission`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#expire_submission) | Expire a
|
|
104
|
-
| [`
|
|
105
|
-
| [`
|
|
106
|
-
| [`
|
|
107
|
-
| [`
|
|
108
|
-
| [`
|
|
109
|
-
| [`
|
|
110
|
-
| [`get_submission`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#get_submission) |
|
|
111
|
-
| [`get_submission_batch`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#get_submission_batch) |
|
|
112
|
-
| [`get_template`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#get_template) |
|
|
113
|
-
| [`get_template_model_code`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#get_template_model_code) | Generate typed
|
|
114
|
-
| [`get_template_schema`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#get_template_schema) |
|
|
103
|
+
| [`expire_combined_pdf`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#expire_combined_pdf) | Expire a combined PDF |
|
|
104
|
+
| [`expire_submission`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#expire_submission) | Expire a submission |
|
|
105
|
+
| [`generate_submission_preview`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#generate_submission_preview) | Generate a preview PDF |
|
|
106
|
+
| [`get_combined_pdf`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#get_combined_pdf) | Get a combined PDF |
|
|
107
|
+
| [`get_custom_file`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#get_custom_file) | Get a custom file |
|
|
108
|
+
| [`get_folder`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#get_folder) | Get a folder |
|
|
109
|
+
| [`get_presign_url`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#get_presign_url) | Get a presigned URL to upload a file |
|
|
110
|
+
| [`get_signature_request`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#get_signature_request) | Get a signature request |
|
|
111
|
+
| [`get_submission`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#get_submission) | Get a submission |
|
|
112
|
+
| [`get_submission_batch`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#get_submission_batch) | Get a batch |
|
|
113
|
+
| [`get_template`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#get_template) | Get a template |
|
|
114
|
+
| [`get_template_model_code`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#get_template_model_code) | Generate typed code for a template's submission data |
|
|
115
|
+
| [`get_template_schema`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#get_template_schema) | Get the JSON Schema of a template's submission data |
|
|
115
116
|
| [`get_webhook`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#get_webhook) | Get a webhook |
|
|
116
|
-
| [`
|
|
117
|
-
| [`
|
|
118
|
-
| [`
|
|
119
|
-
| [`
|
|
120
|
-
| [`
|
|
121
|
-
| [`
|
|
122
|
-
| [`
|
|
123
|
-
| [`
|
|
117
|
+
| [`list_combined_pdfs`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#list_combined_pdfs) | List combined PDFs |
|
|
118
|
+
| [`list_custom_files`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#list_custom_files) | List custom files |
|
|
119
|
+
| [`list_folders`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#list_folders) | List folders |
|
|
120
|
+
| [`list_submissions`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#list_submissions) | List submissions |
|
|
121
|
+
| [`list_template_submissions`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#list_template_submissions) | List a template's submissions |
|
|
122
|
+
| [`list_templates`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#list_templates) | List templates |
|
|
123
|
+
| [`list_webhooks`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#list_webhooks) | List webhooks |
|
|
124
|
+
| [`move_folder`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#move_folder) | Move a folder |
|
|
125
|
+
| [`move_template`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#move_template) | Move a template to a folder |
|
|
124
126
|
| [`publish_template_version`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#publish_template_version) | Publish a template version |
|
|
125
127
|
| [`rename_folder`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#rename_folder) | Rename a folder |
|
|
126
128
|
| [`restore_template_version`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#restore_template_version) | Restore a template version |
|
|
127
129
|
| [`test_authentication`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#test_authentication) | Test authentication |
|
|
128
|
-
| [`
|
|
129
|
-
| [`update_template`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#update_template) | Update a
|
|
130
|
-
| [`update_template_document`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#update_template_document) |
|
|
131
|
-
| [`update_template_document_from_upload`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#update_template_document_from_upload) | Update a template's document with a cached S3 file upload |
|
|
130
|
+
| [`update_signature_request`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#update_signature_request) | Update a signature request |
|
|
131
|
+
| [`update_template`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#update_template) | Update a template |
|
|
132
|
+
| [`update_template_document`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#update_template_document) | Replace a template's PDF |
|
|
132
133
|
| [`update_webhook`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#update_webhook) | Update a webhook |
|
|
134
|
+
| [`upload_template`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#upload_template) | Create a PDF template from an uploaded PDF |
|
|
135
|
+
| [`upload_template_document`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#upload_template_document) | Replace a template's PDF with an uploaded PDF |
|
|
133
136
|
|
|
134
137
|
## Errors
|
|
135
138
|
|
|
136
139
|
Methods raise `DocSpring::ApiError` for an error response, with the HTTP status in `code` and the body in `response_body`.
|
|
137
140
|
|
|
141
|
+
The client checks each request against the API's request schemas before sending it. A request the API would reject raises `DocSpring::ValidationError` (an `ArgumentError`), whose `details` are hashes with `code`, `message` and a `pointer` into the body (or a `parameter`). Turn the check off with `client.api_client.config.client_side_validation = false`.
|
|
142
|
+
The details are the ones the API's 422 response would have, so you get them without a round trip.
|
|
143
|
+
|
|
138
144
|
## API changes
|
|
139
145
|
|
|
140
|
-
DocSpring adds fields and enum values to API
|
|
146
|
+
DocSpring adds fields and enum values to API v2 without releasing a new API version. Changes that would break
|
|
141
147
|
existing code, such as removing or renaming a field, go in a new API version
|
|
142
148
|
([API changes](https://docspring.com/docs/api-guide/openapi-schema/#api-changes)). So this SDK keeps working with
|
|
143
149
|
responses that are newer than it is:
|
|
144
150
|
|
|
145
151
|
- The model leaves out a response field added to the API after this release.
|
|
146
|
-
-
|
|
152
|
+
- Enum values in responses are strings, so a value added to the API after this release comes back as it is: handle values you don't recognize.
|
|
147
153
|
|
|
148
154
|
Upgrade the SDK to read new fields and enum values. The [changelog](https://github.com/DocSpring/docspring-ruby/blob/main/CHANGELOG.md) lists
|
|
149
155
|
what each release adds.
|
|
150
156
|
|
|
151
157
|
## About this SDK
|
|
152
158
|
|
|
153
|
-
This SDK is generated from DocSpring's [OpenAPI spec](https://docspring.com/api-docs/
|
|
154
|
-
[DocSpring's fork of OpenAPI Generator](https://github.com/DocSpring/openapi-generator/tree/docspring/all_patches) 7.
|
|
159
|
+
This SDK is generated from DocSpring's [OpenAPI spec](https://docspring.com/api-docs/v2/openapi.json) with
|
|
160
|
+
[DocSpring's fork of OpenAPI Generator](https://github.com/DocSpring/openapi-generator/tree/docspring/all_patches) 7.26.0.
|
|
155
161
|
The fork changes the Ruby generator:
|
|
156
162
|
|
|
157
|
-
-
|
|
163
|
+
- An enum value added to the API after this release comes back as the API sent it, instead of raising `ArgumentError`. An enum type's constants are the values this release knows, and the values are strings.
|
|
158
164
|
|
|
159
165
|
On top of the generated code, we add:
|
|
160
166
|
|
|
161
167
|
- A client constructor that reads your credentials, region and host from the environment.
|
|
162
|
-
- A fix for multipart PUT requests in Ethon (file uploads to `
|
|
168
|
+
- A fix for multipart PUT requests in Ethon (file uploads to `upload_template_document`).
|
|
163
169
|
|
|
164
|
-
|
|
165
|
-
[open an issue](https://github.com/DocSpring/docspring-ruby/issues) or
|
|
166
|
-
we'll fix
|
|
170
|
+
Each release regenerates every file, so a change made only here would be lost in the next one. Issues and pull
|
|
171
|
+
requests are welcome all the same: [open an issue](https://github.com/DocSpring/docspring-ruby/issues) or a pull request, or email
|
|
172
|
+
[support@docspring.com](mailto:support@docspring.com), and we'll make the fix in the generator so that every release
|
|
173
|
+
keeps it. [AGENTS.md](https://github.com/DocSpring/docspring-ruby/blob/main/AGENTS.md) is a guide for AI coding agents that integrate this SDK.
|
|
167
174
|
|
|
168
175
|
## License
|
|
169
176
|
|
|
@@ -1,18 +1,15 @@
|
|
|
1
|
-
# DocSpring::
|
|
1
|
+
# DocSpring::AiFieldNamingLanguage
|
|
2
2
|
|
|
3
3
|
## Properties
|
|
4
4
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **name** | **String** | | |
|
|
8
7
|
|
|
9
8
|
## Example
|
|
10
9
|
|
|
11
10
|
```ruby
|
|
12
11
|
require 'docspring'
|
|
13
12
|
|
|
14
|
-
instance = DocSpring::
|
|
15
|
-
name: null
|
|
16
|
-
)
|
|
13
|
+
instance = DocSpring::AiFieldNamingLanguage.new()
|
|
17
14
|
```
|
|
18
15
|
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# DocSpring::AuthenticationCheck
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **authenticated** | **Boolean** | Always true. | |
|
|
8
|
+
|
|
9
|
+
## Example
|
|
10
|
+
|
|
11
|
+
```ruby
|
|
12
|
+
require 'docspring'
|
|
13
|
+
|
|
14
|
+
instance = DocSpring::AuthenticationCheck.new(
|
|
15
|
+
authenticated: null
|
|
16
|
+
)
|
|
17
|
+
```
|
|
18
|
+
|
|
@@ -1,18 +1,15 @@
|
|
|
1
|
-
# DocSpring::
|
|
1
|
+
# DocSpring::BarcodeSymbology
|
|
2
2
|
|
|
3
3
|
## Properties
|
|
4
4
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **folder** | **Object** | | |
|
|
8
7
|
|
|
9
8
|
## Example
|
|
10
9
|
|
|
11
10
|
```ruby
|
|
12
11
|
require 'docspring'
|
|
13
12
|
|
|
14
|
-
instance = DocSpring::
|
|
15
|
-
folder: null
|
|
16
|
-
)
|
|
13
|
+
instance = DocSpring::BarcodeSymbology.new()
|
|
17
14
|
```
|
|
18
15
|
|
|
@@ -1,18 +1,15 @@
|
|
|
1
|
-
# DocSpring::
|
|
1
|
+
# DocSpring::CheckCharacter
|
|
2
2
|
|
|
3
3
|
## Properties
|
|
4
4
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **webhook** | **Object** | | |
|
|
8
7
|
|
|
9
8
|
## Example
|
|
10
9
|
|
|
11
10
|
```ruby
|
|
12
11
|
require 'docspring'
|
|
13
12
|
|
|
14
|
-
instance = DocSpring::
|
|
15
|
-
webhook: null
|
|
16
|
-
)
|
|
13
|
+
instance = DocSpring::CheckCharacter.new()
|
|
17
14
|
```
|
|
18
15
|
|