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.
Files changed (505) hide show
  1. checksums.yaml +4 -4
  2. data/.openapi-generator/FILES +361 -150
  3. data/.openapi-generator/VERSION +1 -1
  4. data/.rubocop.yml +1 -1
  5. data/.travis.yml +1 -1
  6. data/AGENTS.md +79 -19
  7. data/CHANGELOG.md +123 -0
  8. data/Gemfile.lock +7 -7
  9. data/README.md +60 -53
  10. data/docs/{RenameFolderData.md → AiFieldNamingLanguage.md} +2 -5
  11. data/docs/AuthenticationCheck.md +18 -0
  12. data/docs/{CreateFolderData.md → BarcodeSymbology.md} +2 -5
  13. data/docs/{CreateWebhookData.md → CheckCharacter.md} +2 -5
  14. data/docs/Client.md +890 -777
  15. data/docs/{UpdateWebhookData.md → CombinedFieldType.md} +2 -5
  16. data/docs/CombinedPdf.md +44 -0
  17. data/docs/CombinedPdfFiles.md +18 -0
  18. data/docs/CombinedPdfList.md +20 -0
  19. data/docs/CombinedPdfSource.md +26 -0
  20. data/docs/CombinedPdfSourceInput.md +88 -0
  21. data/docs/CombinedPdfSourcePdf.md +20 -0
  22. data/docs/CombinedPdfSourceType.md +15 -0
  23. data/docs/CombinedPdfState.md +15 -0
  24. data/docs/CopyTemplateRequest.md +22 -0
  25. data/docs/CreateCombinedPdfRequest.md +26 -0
  26. data/docs/CreateCustomFileFromUploadRequest.md +18 -0
  27. data/docs/CreateFolderRequest.md +20 -0
  28. data/docs/CreateSignatureRequestEventRequest.md +24 -0
  29. data/docs/CreateSignatureRequestTokenRequest.md +18 -0
  30. data/docs/CreateSubmissionBatchRequest.md +26 -0
  31. data/docs/CreateSubmissionRequest.md +36 -0
  32. data/docs/CreateTemplateRequest.md +94 -0
  33. data/docs/CreateWebhookRequest.md +38 -0
  34. data/docs/CustomFile.md +11 -3
  35. data/docs/CustomFileList.md +20 -0
  36. data/docs/CustomFileSourcePdf.md +20 -0
  37. data/docs/ErrorCode.md +15 -0
  38. data/docs/ErrorDetail.md +26 -0
  39. data/docs/ErrorInfo.md +32 -0
  40. data/docs/ErrorResponse.md +1 -3
  41. data/docs/ExpirationInterval.md +15 -0
  42. data/docs/FieldComparisonCondition.md +22 -0
  43. data/docs/FieldComparisonOperator.md +15 -0
  44. data/docs/FieldDisplayType.md +15 -0
  45. data/docs/FieldEqualsCondition.md +22 -0
  46. data/docs/FieldEqualsOperator.md +15 -0
  47. data/docs/FieldInCondition.md +22 -0
  48. data/docs/FieldOverride.md +142 -0
  49. data/docs/FieldPresenceCondition.md +20 -0
  50. data/docs/FieldPresenceOperator.md +15 -0
  51. data/docs/FieldRangeCondition.md +24 -0
  52. data/docs/FieldReimportState.md +15 -0
  53. data/docs/FieldSetupLogic.md +15 -0
  54. data/docs/FieldSetupNaming.md +15 -0
  55. data/docs/FieldSetupSource.md +15 -0
  56. data/docs/Folder.md +9 -5
  57. data/docs/FolderList.md +20 -0
  58. data/docs/GeneratedFile.md +32 -0
  59. data/docs/GeneratedFileState.md +15 -0
  60. data/docs/HtmlEngineOptions.md +36 -0
  61. data/docs/HtmlEngineOptionsInput.md +36 -0
  62. data/docs/ImageGravity.md +15 -0
  63. data/docs/ImageScaleType.md +15 -0
  64. data/docs/ModelCodeLanguage.md +15 -0
  65. data/docs/MoveFolderRequest.md +18 -0
  66. data/docs/MoveTemplateRequest.md +18 -0
  67. data/docs/NumberConditionType.md +15 -0
  68. data/docs/PageFormat.md +15 -0
  69. data/docs/PublishTemplateVersionRequest.md +20 -0
  70. data/docs/RenameFolderRequest.md +18 -0
  71. data/docs/RestoreTemplateVersionRequest.md +18 -0
  72. data/docs/ShapeType.md +15 -0
  73. data/docs/SignatureRequest.md +66 -0
  74. data/docs/SignatureRequestAuthSecondFactorType.md +15 -0
  75. data/docs/SignatureRequestAuthType.md +15 -0
  76. data/docs/SignatureRequestEvent.md +32 -0
  77. data/docs/SignatureRequestEventType.md +15 -0
  78. data/docs/SignatureRequestInput.md +46 -0
  79. data/docs/SignatureRequestMessageType.md +15 -0
  80. data/docs/SignatureRequestState.md +15 -0
  81. data/docs/SignatureRequestToken.md +30 -0
  82. data/docs/SignatureRequestTokenType.md +15 -0
  83. data/docs/StringConditionType.md +15 -0
  84. data/docs/Submission.md +41 -47
  85. data/docs/SubmissionAction.md +6 -8
  86. data/docs/SubmissionActionState.md +15 -0
  87. data/docs/SubmissionActionType.md +15 -0
  88. data/docs/SubmissionBatch.md +16 -10
  89. data/docs/SubmissionBatchState.md +15 -0
  90. data/docs/SubmissionFiles.md +22 -0
  91. data/docs/SubmissionInput.md +38 -0
  92. data/docs/SubmissionList.md +20 -0
  93. data/docs/SubmissionSource.md +15 -0
  94. data/docs/SubmissionSourcePdf.md +20 -0
  95. data/docs/SubmissionState.md +15 -0
  96. data/docs/Template.md +73 -107
  97. data/docs/TemplateActor.md +26 -0
  98. data/docs/TemplateActorType.md +15 -0
  99. data/docs/TemplateDefaults.md +56 -0
  100. data/docs/TemplateDefaultsInput.md +56 -0
  101. data/docs/TemplateDocument.md +40 -0
  102. data/docs/TemplateDocumentState.md +15 -0
  103. data/docs/TemplateFieldDependency.md +26 -0
  104. data/docs/TemplateFieldDependencyAction.md +15 -0
  105. data/docs/TemplateFieldDependencyCondition.md +24 -0
  106. data/docs/TemplateFieldDependencyConditionInput.md +93 -0
  107. data/docs/TemplateFieldDependencyInput.md +26 -0
  108. data/docs/TemplateFieldDependencyMatch.md +15 -0
  109. data/docs/TemplateFieldDependencyOperator.md +15 -0
  110. data/docs/TemplateFieldLogicStatus.md +15 -0
  111. data/docs/TemplateFormMode.md +15 -0
  112. data/docs/TemplateModelCode.md +22 -0
  113. data/docs/TemplatePageAiError.md +15 -0
  114. data/docs/TemplatePageAiNamingStatus.md +15 -0
  115. data/docs/TemplatePageFieldsStatus.md +15 -0
  116. data/docs/TemplatePageImageStatus.md +15 -0
  117. data/docs/TemplatePageProcessingStatus.md +26 -0
  118. data/docs/TemplateSourcePdf.md +24 -0
  119. data/docs/TemplateSummary.md +90 -0
  120. data/docs/TemplateSummaryList.md +20 -0
  121. data/docs/TemplateType.md +15 -0
  122. data/docs/TemplateVersion.md +24 -0
  123. data/docs/TemplateVersionType.md +15 -0
  124. data/docs/TextAlignment.md +15 -0
  125. data/docs/TextOverflow.md +15 -0
  126. data/docs/TextVerticalAlignment.md +15 -0
  127. data/docs/Typeface.md +15 -0
  128. data/docs/UpdateSignatureRequestRequest.md +34 -0
  129. data/docs/UpdateTemplateDocumentRequest.md +22 -0
  130. data/docs/UpdateTemplateRequest.md +80 -0
  131. data/docs/UpdateWebhookRequest.md +38 -0
  132. data/docs/UploadMethod.md +15 -0
  133. data/docs/UploadPresign.md +24 -0
  134. data/docs/UrlSourcePdf.md +20 -0
  135. data/docs/Webhook.md +20 -20
  136. data/docs/WebhookEventType.md +15 -0
  137. data/docs/WebhookList.md +20 -0
  138. data/docs/WebhookMode.md +15 -0
  139. data/docspring.gemspec +3 -3
  140. data/lib/docspring/api/client.rb +995 -942
  141. data/lib/docspring/api_client.rb +14 -6
  142. data/lib/docspring/api_error.rb +3 -3
  143. data/lib/docspring/api_model_base.rb +88 -0
  144. data/lib/docspring/configuration.rb +12 -7
  145. data/lib/docspring/models/ai_field_naming_language.rb +42 -0
  146. data/lib/docspring/models/authentication_check.rb +185 -0
  147. data/lib/docspring/models/barcode_symbology.rb +47 -0
  148. data/lib/docspring/models/check_character.rb +44 -0
  149. data/lib/docspring/models/combined_field_type.rb +41 -0
  150. data/lib/docspring/models/{combined_submission.rb → combined_pdf.rb} +228 -206
  151. data/lib/docspring/models/combined_pdf_files.rb +167 -0
  152. data/lib/docspring/models/combined_pdf_list.rb +200 -0
  153. data/lib/docspring/models/{update_webhook_data.rb → combined_pdf_source.rb} +107 -103
  154. data/lib/docspring/models/combined_pdf_source_input.rb +62 -0
  155. data/lib/docspring/models/combined_pdf_source_pdf.rb +212 -0
  156. data/lib/docspring/models/combined_pdf_source_type.rb +44 -0
  157. data/lib/docspring/models/combined_pdf_state.rb +44 -0
  158. data/lib/docspring/models/{copy_template_options.rb → copy_template_request.rb} +32 -87
  159. data/lib/docspring/models/{combine_pdfs_data.rb → create_combined_pdf_request.rb} +60 -123
  160. data/lib/docspring/models/{create_custom_file_data.rb → create_custom_file_from_upload_request.rb} +29 -96
  161. data/lib/docspring/models/{move_template_data.rb → create_folder_request.rb} +60 -102
  162. data/lib/docspring/models/{create_submission_data_request_event_request.rb → create_signature_request_event_request.rb} +50 -122
  163. data/lib/docspring/models/create_signature_request_token_request.rb +190 -0
  164. data/lib/docspring/models/{submission_batch_data.rb → create_submission_batch_request.rb} +53 -108
  165. data/lib/docspring/models/{create_pdf_submission_data.rb → create_submission_request.rb} +97 -149
  166. data/lib/docspring/models/create_template_request.rb +601 -0
  167. data/lib/docspring/models/create_webhook_request.rb +368 -0
  168. data/lib/docspring/models/custom_file.rb +132 -95
  169. data/lib/docspring/models/custom_file_list.rb +200 -0
  170. data/lib/docspring/models/custom_file_source_pdf.rb +212 -0
  171. data/lib/docspring/models/error_code.rb +60 -0
  172. data/lib/docspring/models/error_detail.rb +242 -0
  173. data/lib/docspring/models/error_info.rb +316 -0
  174. data/lib/docspring/models/error_response.rb +28 -138
  175. data/lib/docspring/models/expiration_interval.rb +42 -0
  176. data/lib/docspring/models/field_comparison_condition.rb +247 -0
  177. data/lib/docspring/models/field_comparison_operator.rb +43 -0
  178. data/lib/docspring/models/field_display_type.rb +45 -0
  179. data/lib/docspring/models/field_equals_condition.rb +247 -0
  180. data/lib/docspring/models/field_equals_operator.rb +41 -0
  181. data/lib/docspring/models/{create_folder_data.rb → field_in_condition.rb} +101 -103
  182. data/lib/docspring/models/field_override.rb +829 -0
  183. data/lib/docspring/models/field_presence_condition.rb +234 -0
  184. data/lib/docspring/models/field_presence_operator.rb +41 -0
  185. data/lib/docspring/models/field_range_condition.rb +234 -0
  186. data/lib/docspring/models/field_reimport_state.rb +43 -0
  187. data/lib/docspring/models/field_setup_logic.rb +41 -0
  188. data/lib/docspring/models/field_setup_naming.rb +41 -0
  189. data/lib/docspring/models/field_setup_source.rb +42 -0
  190. data/lib/docspring/models/folder.rb +134 -93
  191. data/lib/docspring/models/folder_list.rb +200 -0
  192. data/lib/docspring/models/generated_file.rb +326 -0
  193. data/lib/docspring/models/generated_file_state.rb +42 -0
  194. data/lib/docspring/models/html_engine_options.rb +416 -0
  195. data/lib/docspring/models/html_engine_options_input.rb +280 -0
  196. data/lib/docspring/models/image_gravity.rb +48 -0
  197. data/lib/docspring/models/image_scale_type.rb +42 -0
  198. data/lib/docspring/models/model_code_language.rb +48 -0
  199. data/lib/docspring/models/{move_folder_data.rb → move_folder_request.rb} +31 -87
  200. data/lib/docspring/models/move_template_request.rb +171 -0
  201. data/lib/docspring/models/number_condition_type.rb +45 -0
  202. data/lib/docspring/models/page_format.rb +52 -0
  203. data/lib/docspring/models/{publish_version_data.rb → publish_template_version_request.rb} +64 -99
  204. data/lib/docspring/models/{rename_folder_data.rb → rename_folder_request.rb} +29 -87
  205. data/lib/docspring/models/{restore_version_data.rb → restore_template_version_request.rb} +29 -87
  206. data/lib/docspring/models/shape_type.rb +45 -0
  207. data/lib/docspring/models/{submission_data_request_show.rb → signature_request.rb} +240 -171
  208. data/lib/docspring/models/signature_request_auth_second_factor_type.rb +45 -0
  209. data/lib/docspring/models/signature_request_auth_type.rb +46 -0
  210. data/lib/docspring/models/{submission_data_request_event.rb → signature_request_event.rb} +137 -122
  211. data/lib/docspring/models/signature_request_event_type.rb +45 -0
  212. data/lib/docspring/models/{update_submission_data_request_data.rb → signature_request_input.rb} +156 -173
  213. data/lib/docspring/models/signature_request_message_type.rb +48 -0
  214. data/lib/docspring/models/signature_request_state.rb +42 -0
  215. data/lib/docspring/models/signature_request_token.rb +369 -0
  216. data/lib/docspring/models/signature_request_token_type.rb +41 -0
  217. data/lib/docspring/models/string_condition_type.rb +44 -0
  218. data/lib/docspring/models/submission.rb +374 -339
  219. data/lib/docspring/models/submission_action.rb +64 -136
  220. data/lib/docspring/models/submission_action_state.rb +43 -0
  221. data/lib/docspring/models/submission_action_type.rb +46 -0
  222. data/lib/docspring/models/submission_batch.rb +157 -112
  223. data/lib/docspring/models/submission_batch_state.rb +42 -0
  224. data/lib/docspring/models/submission_files.rb +188 -0
  225. data/lib/docspring/models/submission_input.rb +274 -0
  226. data/lib/docspring/models/submission_list.rb +200 -0
  227. data/lib/docspring/models/submission_source.rb +43 -0
  228. data/lib/docspring/models/submission_source_pdf.rb +212 -0
  229. data/lib/docspring/models/submission_state.rb +52 -0
  230. data/lib/docspring/models/template.rb +485 -766
  231. data/lib/docspring/models/{add_fields_data.rb → template_actor.rb} +119 -105
  232. data/lib/docspring/models/template_actor_type.rb +42 -0
  233. data/lib/docspring/models/template_defaults.rb +395 -0
  234. data/lib/docspring/models/template_defaults_input.rb +395 -0
  235. data/lib/docspring/models/template_document.rb +396 -0
  236. data/lib/docspring/models/template_document_state.rb +44 -0
  237. data/lib/docspring/models/{success_error_response.rb → template_field_dependency.rb} +122 -114
  238. data/lib/docspring/models/template_field_dependency_action.rb +42 -0
  239. data/lib/docspring/models/{create_pdf_template.rb → template_field_dependency_condition.rb} +116 -103
  240. data/lib/docspring/models/template_field_dependency_condition_input.rb +67 -0
  241. data/lib/docspring/models/template_field_dependency_input.rb +285 -0
  242. data/lib/docspring/models/template_field_dependency_match.rb +41 -0
  243. data/lib/docspring/models/template_field_dependency_operator.rb +49 -0
  244. data/lib/docspring/models/template_field_logic_status.rb +44 -0
  245. data/lib/docspring/models/template_form_mode.rb +42 -0
  246. data/lib/docspring/models/{template_model_code_response.rb → template_model_code.rb} +37 -96
  247. data/lib/docspring/models/template_page_ai_error.rb +43 -0
  248. data/lib/docspring/models/template_page_ai_naming_status.rb +41 -0
  249. data/lib/docspring/models/template_page_fields_status.rb +44 -0
  250. data/lib/docspring/models/template_page_image_status.rb +41 -0
  251. data/lib/docspring/models/template_page_processing_status.rb +275 -0
  252. data/lib/docspring/models/{create_webhook_data.rb → template_source_pdf.rb} +92 -103
  253. data/lib/docspring/models/{template_preview.rb → template_summary.rb} +436 -589
  254. data/lib/docspring/models/template_summary_list.rb +200 -0
  255. data/lib/docspring/models/template_type.rb +41 -0
  256. data/lib/docspring/models/template_version.rb +238 -0
  257. data/lib/docspring/models/template_version_type.rb +42 -0
  258. data/lib/docspring/models/text_alignment.rb +43 -0
  259. data/lib/docspring/models/text_overflow.rb +41 -0
  260. data/lib/docspring/models/text_vertical_alignment.rb +42 -0
  261. data/lib/docspring/models/typeface.rb +56 -0
  262. data/lib/docspring/models/{create_submission_data_request_data.rb → update_signature_request_request.rb} +72 -196
  263. data/lib/docspring/models/update_template_document_request.rb +205 -0
  264. data/lib/docspring/models/update_template_request.rb +514 -0
  265. data/lib/docspring/models/update_webhook_request.rb +344 -0
  266. data/lib/docspring/models/upload_method.rb +40 -0
  267. data/lib/docspring/models/{upload_presign_response.rb → upload_presign.rb} +93 -140
  268. data/lib/docspring/models/url_source_pdf.rb +212 -0
  269. data/lib/docspring/models/webhook.rb +97 -107
  270. data/lib/docspring/models/webhook_event_type.rb +64 -0
  271. data/lib/docspring/models/webhook_list.rb +200 -0
  272. data/lib/docspring/models/webhook_mode.rb +41 -0
  273. data/lib/docspring/request_schemas.json +3187 -0
  274. data/lib/docspring/request_validator.rb +396 -0
  275. data/lib/docspring/version.rb +4 -4
  276. data/lib/docspring.rb +125 -53
  277. data/spec/api/client_spec.rb +304 -277
  278. data/spec/models/ai_field_naming_language_spec.rb +30 -0
  279. data/spec/models/authentication_check_spec.rb +36 -0
  280. data/spec/models/barcode_symbology_spec.rb +30 -0
  281. data/spec/models/check_character_spec.rb +30 -0
  282. data/spec/models/combined_field_type_spec.rb +30 -0
  283. data/spec/models/combined_pdf_files_spec.rb +36 -0
  284. data/spec/models/combined_pdf_list_spec.rb +42 -0
  285. data/spec/models/combined_pdf_source_input_spec.rb +44 -0
  286. data/spec/models/combined_pdf_source_pdf_spec.rb +42 -0
  287. data/spec/models/{submission_data_request_token_spec.rb → combined_pdf_source_spec.rb} +18 -12
  288. data/spec/models/combined_pdf_source_type_spec.rb +30 -0
  289. data/spec/models/{combined_submission_spec.rb → combined_pdf_spec.rb} +20 -24
  290. data/spec/models/combined_pdf_state_spec.rb +30 -0
  291. data/spec/models/{copy_template_options_spec.rb → copy_template_request_spec.rb} +9 -9
  292. data/spec/models/{combine_pdfs_data_spec.rb → create_combined_pdf_request_spec.rb} +12 -18
  293. data/spec/models/{create_custom_file_data_spec.rb → create_custom_file_from_upload_request_spec.rb} +9 -9
  294. data/spec/models/{move_template_data_spec.rb → create_folder_request_spec.rb} +11 -11
  295. data/spec/models/{list_submissions_response_spec.rb → create_signature_request_event_request_spec.rb} +18 -12
  296. data/spec/models/create_signature_request_token_request_spec.rb +36 -0
  297. data/spec/models/{submission_batch_data_spec.rb → create_submission_batch_request_spec.rb} +13 -13
  298. data/spec/models/{create_pdf_submission_data_spec.rb → create_submission_request_spec.rb} +24 -18
  299. data/spec/models/{template_preview_spec.rb → create_template_request_spec.rb} +40 -118
  300. data/spec/models/create_webhook_request_spec.rb +96 -0
  301. data/spec/models/custom_file_list_spec.rb +42 -0
  302. data/spec/models/custom_file_source_pdf_spec.rb +42 -0
  303. data/spec/models/custom_file_spec.rb +29 -5
  304. data/spec/models/error_code_spec.rb +30 -0
  305. data/spec/models/{create_submission_response_spec.rb → error_detail_spec.rb} +14 -18
  306. data/spec/models/{batch_generate_pdfs201_response_spec.rb → error_info_spec.rb} +27 -19
  307. data/spec/models/error_response_spec.rb +4 -14
  308. data/spec/models/expiration_interval_spec.rb +30 -0
  309. data/spec/models/field_comparison_condition_spec.rb +48 -0
  310. data/spec/models/field_comparison_operator_spec.rb +30 -0
  311. data/spec/models/field_display_type_spec.rb +30 -0
  312. data/spec/models/field_equals_condition_spec.rb +48 -0
  313. data/spec/models/field_equals_operator_spec.rb +30 -0
  314. data/spec/models/field_in_condition_spec.rb +48 -0
  315. data/spec/models/field_override_spec.rb +408 -0
  316. data/spec/models/field_presence_condition_spec.rb +42 -0
  317. data/spec/models/field_presence_operator_spec.rb +30 -0
  318. data/spec/models/field_range_condition_spec.rb +54 -0
  319. data/spec/models/field_reimport_state_spec.rb +30 -0
  320. data/spec/models/field_setup_logic_spec.rb +30 -0
  321. data/spec/models/field_setup_naming_spec.rb +30 -0
  322. data/spec/models/field_setup_source_spec.rb +30 -0
  323. data/spec/models/folder_list_spec.rb +42 -0
  324. data/spec/models/folder_spec.rb +16 -4
  325. data/spec/models/generated_file_spec.rb +78 -0
  326. data/spec/models/generated_file_state_spec.rb +30 -0
  327. data/spec/models/html_engine_options_input_spec.rb +90 -0
  328. data/spec/models/html_engine_options_spec.rb +90 -0
  329. data/spec/models/image_gravity_spec.rb +30 -0
  330. data/spec/models/image_scale_type_spec.rb +30 -0
  331. data/spec/models/model_code_language_spec.rb +30 -0
  332. data/spec/models/move_folder_request_spec.rb +36 -0
  333. data/spec/models/move_template_request_spec.rb +36 -0
  334. data/spec/models/number_condition_type_spec.rb +30 -0
  335. data/spec/models/page_format_spec.rb +30 -0
  336. data/spec/models/{publish_version_data_spec.rb → publish_template_version_request_spec.rb} +11 -11
  337. data/spec/models/{rename_folder_data_spec.rb → rename_folder_request_spec.rb} +9 -9
  338. data/spec/models/restore_template_version_request_spec.rb +36 -0
  339. data/spec/models/shape_type_spec.rb +30 -0
  340. data/spec/models/signature_request_auth_second_factor_type_spec.rb +30 -0
  341. data/spec/models/signature_request_auth_type_spec.rb +30 -0
  342. data/spec/models/{submission_data_request_event_spec.rb → signature_request_event_spec.rb} +16 -18
  343. data/spec/models/signature_request_event_type_spec.rb +30 -0
  344. data/spec/models/{create_submission_data_request_data_spec.rb → signature_request_input_spec.rb} +28 -30
  345. data/spec/models/signature_request_message_type_spec.rb +30 -0
  346. data/spec/models/{submission_data_request_show_spec.rb → signature_request_spec.rb} +31 -31
  347. data/spec/models/signature_request_state_spec.rb +30 -0
  348. data/spec/models/signature_request_token_spec.rb +72 -0
  349. data/spec/models/signature_request_token_type_spec.rb +30 -0
  350. data/spec/models/string_condition_type_spec.rb +30 -0
  351. data/spec/models/submission_action_spec.rb +4 -22
  352. data/spec/models/submission_action_state_spec.rb +30 -0
  353. data/spec/models/submission_action_type_spec.rb +30 -0
  354. data/spec/models/submission_batch_spec.rb +27 -13
  355. data/spec/models/submission_batch_state_spec.rb +30 -0
  356. data/spec/models/submission_files_spec.rb +48 -0
  357. data/spec/models/submission_input_spec.rb +96 -0
  358. data/spec/models/submission_list_spec.rb +42 -0
  359. data/spec/models/submission_source_pdf_spec.rb +42 -0
  360. data/spec/models/submission_source_spec.rb +30 -0
  361. data/spec/models/submission_spec.rb +26 -56
  362. data/spec/models/submission_state_spec.rb +30 -0
  363. data/spec/models/template_actor_spec.rb +60 -0
  364. data/spec/models/template_actor_type_spec.rb +30 -0
  365. data/spec/models/{submission_data_request_spec.rb → template_defaults_input_spec.rb} +29 -53
  366. data/spec/models/template_defaults_spec.rb +150 -0
  367. data/spec/models/{json_schema_spec.rb → template_document_spec.rb} +21 -21
  368. data/spec/models/template_document_state_spec.rb +30 -0
  369. data/spec/models/template_field_dependency_action_spec.rb +30 -0
  370. data/spec/models/template_field_dependency_condition_input_spec.rb +44 -0
  371. data/spec/models/template_field_dependency_condition_spec.rb +54 -0
  372. data/spec/models/template_field_dependency_input_spec.rb +60 -0
  373. data/spec/models/template_field_dependency_match_spec.rb +30 -0
  374. data/spec/models/template_field_dependency_operator_spec.rb +30 -0
  375. data/spec/models/template_field_dependency_spec.rb +60 -0
  376. data/spec/models/template_field_logic_status_spec.rb +30 -0
  377. data/spec/models/template_form_mode_spec.rb +30 -0
  378. data/spec/models/{template_model_code_response_spec.rb → template_model_code_spec.rb} +9 -13
  379. data/spec/models/template_page_ai_error_spec.rb +30 -0
  380. data/spec/models/template_page_ai_naming_status_spec.rb +30 -0
  381. data/spec/models/template_page_fields_status_spec.rb +30 -0
  382. data/spec/models/template_page_image_status_spec.rb +30 -0
  383. data/spec/models/template_page_processing_status_spec.rb +60 -0
  384. data/spec/models/template_source_pdf_spec.rb +54 -0
  385. data/spec/models/template_spec.rb +40 -154
  386. data/spec/models/template_summary_list_spec.rb +42 -0
  387. data/spec/models/template_summary_spec.rb +252 -0
  388. data/spec/models/template_type_spec.rb +30 -0
  389. data/spec/models/template_version_spec.rb +54 -0
  390. data/spec/models/template_version_type_spec.rb +30 -0
  391. data/spec/models/text_alignment_spec.rb +30 -0
  392. data/spec/models/text_overflow_spec.rb +30 -0
  393. data/spec/models/text_vertical_alignment_spec.rb +30 -0
  394. data/spec/models/typeface_spec.rb +30 -0
  395. data/spec/models/{submission_batch_with_submissions_spec.rb → update_signature_request_request_spec.rb} +18 -22
  396. data/spec/models/update_template_document_request_spec.rb +48 -0
  397. data/spec/models/{submission_preview_spec.rb → update_template_request_spec.rb} +81 -41
  398. data/spec/models/update_webhook_request_spec.rb +96 -0
  399. data/spec/models/upload_method_spec.rb +30 -0
  400. data/spec/models/{upload_presign_response_spec.rb → upload_presign_spec.rb} +13 -17
  401. data/spec/models/url_source_pdf_spec.rb +42 -0
  402. data/spec/models/webhook_event_type_spec.rb +30 -0
  403. data/spec/models/webhook_list_spec.rb +42 -0
  404. data/spec/models/webhook_mode_spec.rb +30 -0
  405. data/spec/models/webhook_spec.rb +4 -8
  406. data/spec/spec_helper.rb +3 -3
  407. metadata +485 -202
  408. data/docs/AddFieldsData.md +0 -18
  409. data/docs/BatchGeneratePdfs201Response.md +0 -28
  410. data/docs/CombinePdfsData.md +0 -28
  411. data/docs/CombinedSubmission.md +0 -44
  412. data/docs/CombinedSubmissionAction.md +0 -30
  413. data/docs/CopyTemplateOptions.md +0 -22
  414. data/docs/CreateCombinedSubmissionResponse.md +0 -26
  415. data/docs/CreateCustomFileData.md +0 -18
  416. data/docs/CreateCustomFileResponse.md +0 -24
  417. data/docs/CreateHtmlTemplate.md +0 -18
  418. data/docs/CreatePdfSubmissionData.md +0 -34
  419. data/docs/CreatePdfTemplate.md +0 -18
  420. data/docs/CreateSubmissionDataRequestData.md +0 -44
  421. data/docs/CreateSubmissionDataRequestEventRequest.md +0 -24
  422. data/docs/CreateSubmissionDataRequestEventResponse.md +0 -24
  423. data/docs/CreateSubmissionDataRequestResponse.md +0 -24
  424. data/docs/CreateSubmissionDataRequestTokenResponse.md +0 -24
  425. data/docs/CreateSubmissionResponse.md +0 -26
  426. data/docs/ErrorOrMultipleErrorsResponse.md +0 -22
  427. data/docs/ForbiddenErrorResponse.md +0 -22
  428. data/docs/JsonSchema.md +0 -40
  429. data/docs/ListSubmissionsResponse.md +0 -22
  430. data/docs/MoveFolderData.md +0 -18
  431. data/docs/MoveTemplateData.md +0 -20
  432. data/docs/MultipleErrorsResponse.md +0 -20
  433. data/docs/PublishVersionData.md +0 -20
  434. data/docs/RestoreVersionData.md +0 -18
  435. data/docs/Submission422Response.md +0 -24
  436. data/docs/SubmissionBatchData.md +0 -26
  437. data/docs/SubmissionBatchWithSubmissions.md +0 -34
  438. data/docs/SubmissionDataRequest.md +0 -60
  439. data/docs/SubmissionDataRequestEvent.md +0 -30
  440. data/docs/SubmissionDataRequestShow.md +0 -62
  441. data/docs/SubmissionDataRequestToken.md +0 -24
  442. data/docs/SubmissionPreview.md +0 -64
  443. data/docs/SuccessErrorResponse.md +0 -20
  444. data/docs/SuccessMultipleErrorsResponse.md +0 -20
  445. data/docs/TemplateAddFieldsResponse.md +0 -22
  446. data/docs/TemplateDeleteResponse.md +0 -24
  447. data/docs/TemplateModelCodeResponse.md +0 -22
  448. data/docs/TemplatePreview.md +0 -116
  449. data/docs/TemplatePublishVersionResponse.md +0 -22
  450. data/docs/UpdateHtmlTemplate.md +0 -18
  451. data/docs/UpdatePdfTemplate.md +0 -18
  452. data/docs/UpdateSubmissionDataRequestData.md +0 -42
  453. data/docs/UploadPresignResponse.md +0 -24
  454. data/lib/docspring/models/batch_generate_pdfs201_response.rb +0 -352
  455. data/lib/docspring/models/combined_submission_action.rb +0 -384
  456. data/lib/docspring/models/create_combined_submission_response.rb +0 -324
  457. data/lib/docspring/models/create_custom_file_response.rb +0 -314
  458. data/lib/docspring/models/create_html_template.rb +0 -243
  459. data/lib/docspring/models/create_submission_data_request_event_response.rb +0 -314
  460. data/lib/docspring/models/create_submission_data_request_response.rb +0 -314
  461. data/lib/docspring/models/create_submission_data_request_token_response.rb +0 -314
  462. data/lib/docspring/models/create_submission_response.rb +0 -324
  463. data/lib/docspring/models/error_or_multiple_errors_response.rb +0 -290
  464. data/lib/docspring/models/forbidden_error_response.rb +0 -323
  465. data/lib/docspring/models/json_schema.rb +0 -329
  466. data/lib/docspring/models/list_submissions_response.rb +0 -283
  467. data/lib/docspring/models/multiple_errors_response.rb +0 -296
  468. data/lib/docspring/models/submission422_response.rb +0 -299
  469. data/lib/docspring/models/submission_batch_with_submissions.rb +0 -433
  470. data/lib/docspring/models/submission_data_request.rb +0 -570
  471. data/lib/docspring/models/submission_data_request_token.rb +0 -279
  472. data/lib/docspring/models/submission_preview.rb +0 -637
  473. data/lib/docspring/models/success_multiple_errors_response.rb +0 -279
  474. data/lib/docspring/models/template_add_fields_response.rb +0 -290
  475. data/lib/docspring/models/template_delete_response.rb +0 -300
  476. data/lib/docspring/models/template_publish_version_response.rb +0 -305
  477. data/lib/docspring/models/update_html_template.rb +0 -243
  478. data/lib/docspring/models/update_pdf_template.rb +0 -243
  479. data/spec/models/add_fields_data_spec.rb +0 -36
  480. data/spec/models/combined_submission_action_spec.rb +0 -84
  481. data/spec/models/create_combined_submission_response_spec.rb +0 -64
  482. data/spec/models/create_custom_file_response_spec.rb +0 -58
  483. data/spec/models/create_folder_data_spec.rb +0 -36
  484. data/spec/models/create_html_template_spec.rb +0 -36
  485. data/spec/models/create_pdf_template_spec.rb +0 -36
  486. data/spec/models/create_submission_data_request_event_request_spec.rb +0 -62
  487. data/spec/models/create_submission_data_request_event_response_spec.rb +0 -58
  488. data/spec/models/create_submission_data_request_response_spec.rb +0 -58
  489. data/spec/models/create_submission_data_request_token_response_spec.rb +0 -58
  490. data/spec/models/create_webhook_data_spec.rb +0 -36
  491. data/spec/models/error_or_multiple_errors_response_spec.rb +0 -52
  492. data/spec/models/forbidden_error_response_spec.rb +0 -56
  493. data/spec/models/move_folder_data_spec.rb +0 -36
  494. data/spec/models/multiple_errors_response_spec.rb +0 -46
  495. data/spec/models/restore_version_data_spec.rb +0 -36
  496. data/spec/models/submission422_response_spec.rb +0 -58
  497. data/spec/models/success_error_response_spec.rb +0 -46
  498. data/spec/models/success_multiple_errors_response_spec.rb +0 -46
  499. data/spec/models/template_add_fields_response_spec.rb +0 -52
  500. data/spec/models/template_delete_response_spec.rb +0 -58
  501. data/spec/models/template_publish_version_response_spec.rb +0 -52
  502. data/spec/models/update_html_template_spec.rb +0 -36
  503. data/spec/models/update_pdf_template_spec.rb +0 -36
  504. data/spec/models/update_submission_data_request_data_spec.rb +0 -116
  505. 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`), in this repository or
4
- as a dependency of an app.
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 edit it or open pull requests that change it, and don't patch an installed copy: the next release
11
- overwrites the change. Report bugs at https://github.com/DocSpring/docspring-ruby/issues or to support@docspring.com, and DocSpring fixes them in
12
- the generator.
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 for every method.
21
- - https://docspring.com/api-docs/v1/openapi.json: the OpenAPI spec this SDK is generated from.
22
-
23
- ## Using it in an app
24
-
25
- - Credentials come from `DOCSPRING_TOKEN_ID` and `DOCSPRING_TOKEN_SECRET`. Keep them in the environment or a secret
26
- store, never in code. Accounts in the EU region also need `DOCSPRING_REGION=EU`.
27
- - Template IDs look like `tpl_...` and submission IDs like `sub_...`.
28
- - Pass `test: true` when you generate PDFs during development: test PDFs are free and watermarked.
29
- - Generating a PDF waits for it, for up to 95 seconds. For many PDFs or slow templates, set `wait` to false and use
30
- webhooks or check the submission later (https://docspring.com/docs/api-guide/synchronous-requests/).
31
- - Errors: Methods raise `DocSpring::ApiError` for an error response, with the HTTP status in `code` and the body in `response_body`.
32
- - Responses can be newer than this SDK, because DocSpring adds fields and enum values to API v1 without a new
33
- version. The model leaves out a response field added to the API after this release. An enum value added to the API after this release comes back as a string, so handle values you don't recognize.
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 (3.5.0)
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.12.0)
36
+ parser (3.3.13.0)
37
37
  ast (~> 2.4.1)
38
38
  racc
39
- pry (0.16.0)
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 (3.5.0)
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.12.0) sha256=21a6d7f755d5a24dfbdc6e6b772e4e879a52e7631a88bc5a3a134606052c9828
126
- pry (0.16.0) sha256=d76c69065698ed1f85e717bd33d7942c38a50868f6b0673c636192b3d1b6054e
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.8
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
- Version 3.5.0. Requires Ruby >= 2.7.
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
- submission = {
61
- data: { first_name: 'John', last_name: 'Smith', phone_number: '+11234567890' },
62
- metadata: { foo: 123, bar: :baz },
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.generate_pdf(
69
+ response = client.create_submission(
67
70
  template_id,
68
- submission,
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 its
75
- `download_url`. Set `wait` to false to get a pending submission straight away.
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
- | [`create_custom_file_from_upload`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#create_custom_file_from_upload) | Create a new custom file from a cached S3 upload |
92
- | [`create_data_request_event`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#create_data_request_event) | Create a new event for emailing a signee a request for signature |
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
- | [`create_html_template`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#create_html_template) | Create a new HTML template |
96
- | [`create_pdf_template`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#create_pdf_template) | Create a new PDF template with a form POST file upload |
97
- | [`create_pdf_template_from_upload`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#create_pdf_template_from_upload) | Create a new PDF template from a cached S3 file upload |
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
- | [`expire_combined_submission`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#expire_combined_submission) | Expire a combined submission |
103
- | [`expire_submission`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#expire_submission) | Expire a PDF submission |
104
- | [`generate_pdf`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#generate_pdf) | Generate a PDF |
105
- | [`generate_preview`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#generate_preview) | Generate a preview PDF for partially completed data requests |
106
- | [`get_combined_submission`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#get_combined_submission) | Check the status of a combined submission (merged PDFs) |
107
- | [`get_data_request`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#get_data_request) | Look up a submission data request |
108
- | [`get_full_template`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#get_full_template) | Fetch the full attributes for a PDF template |
109
- | [`get_presign_url`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#get_presign_url) | Get a presigned S3 URL for direct file upload |
110
- | [`get_submission`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#get_submission) | Check the status of a PDF |
111
- | [`get_submission_batch`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#get_submission_batch) | Check the status of a submission batch job |
112
- | [`get_template`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#get_template) | Check the status of an uploaded template |
113
- | [`get_template_model_code`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#get_template_model_code) | Generate typed model code for a template |
114
- | [`get_template_schema`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#get_template_schema) | Fetch the JSON schema for a template |
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
- | [`list_combined_submissions`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#list_combined_submissions) | Get a list of all combined submissions |
117
- | [`list_folders`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#list_folders) | Get a list of all folders |
118
- | [`list_submissions`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#list_submissions) | List all submissions |
119
- | [`list_template_submissions`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#list_template_submissions) | List all submissions for a given template |
120
- | [`list_templates`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#list_templates) | Get a list of all templates |
121
- | [`list_webhooks`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#list_webhooks) | Get a list of all webhooks |
122
- | [`move_folder_to_folder`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#move_folder_to_folder) | Move a folder |
123
- | [`move_template_to_folder`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#move_template_to_folder) | Move Template to folder |
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
- | [`update_data_request`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#update_data_request) | Update a submission data request |
129
- | [`update_template`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#update_template) | Update a Template |
130
- | [`update_template_document`](https://github.com/DocSpring/docspring-ruby/blob/main/docs/Client.md#update_template_document) | Update a template's document with a form POST file upload |
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 v1 without releasing a new API version. Changes that would break
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
- - An enum value added to the API after this release comes back as a string, so handle values you don't recognize.
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/v1/openapi.json) with
154
- [DocSpring's fork of OpenAPI Generator](https://github.com/DocSpring/openapi-generator/tree/docspring/all_patches) 7.16.0.
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
- - Responses with an enum value added to the API after this release don't raise `ArgumentError`. Setting an attribute yourself still checks its value.
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 `update_template_document`).
168
+ - A fix for multipart PUT requests in Ethon (file uploads to `upload_template_document`).
163
169
 
164
- Because the code is generated, we can't merge pull requests that change it. Please
165
- [open an issue](https://github.com/DocSpring/docspring-ruby/issues) or email [support@docspring.com](mailto:support@docspring.com) instead, and
166
- we'll fix it in the generator. [AGENTS.md](https://github.com/DocSpring/docspring-ruby/blob/main/AGENTS.md) is a short guide for AI coding agents.
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::RenameFolderData
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::RenameFolderData.new(
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::CreateFolderData
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::CreateFolderData.new(
15
- folder: null
16
- )
13
+ instance = DocSpring::BarcodeSymbology.new()
17
14
  ```
18
15
 
@@ -1,18 +1,15 @@
1
- # DocSpring::CreateWebhookData
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::CreateWebhookData.new(
15
- webhook: null
16
- )
13
+ instance = DocSpring::CheckCharacter.new()
17
14
  ```
18
15