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
@@ -1,12 +1,12 @@
1
1
  =begin
2
2
  #DocSpring API
3
3
 
4
- #Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures. Requests are rate limited per account, and live PDFs use credits: a request over the limit returns 429 with a Retry-After header, and one your credits can't cover returns 402. See [Credits & Rate Limits](https://docspring.com/docs/api-guide/credits-and-rate-limits/).
4
+ #Use DocSpring's API to programmatically fill out PDF forms, convert HTML to PDFs, merge PDFs, or request legally binding e-signatures.
5
5
 
6
- The version of the OpenAPI document: v1
6
+ The version of the OpenAPI document: v2
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.16.0-DOCSPRING
9
+ Generator version: 7.26.0-DOCSPRING
10
10
 
11
11
  =end
12
12
 
@@ -32,142 +32,118 @@ describe 'Client' do
32
32
  end
33
33
  end
34
34
 
35
- # unit tests for add_fields_to_template
36
- # Add new fields to a Template
37
- # Adds fields to a PDF template. Configure field types, positions, defaults, and formatting options.
38
- # @param template_id
39
- # @param data
40
- # @param [Hash] opts the optional parameters
41
- # @return [TemplateAddFieldsResponse]
42
- describe 'add_fields_to_template test' do
43
- it 'should work' do
44
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
45
- end
46
- end
47
-
48
- # unit tests for batch_generate_pdfs
49
- # Generate multiple PDFs
50
- # Generates up to 50 PDFs in a single request. Each submission can use a different template and data. Supports both synchronous (wait for all PDFs) and asynchronous processing. More efficient than individual requests when creating multiple PDFs. Live PDFs use credits. If any live submission is waiting for credits, the API returns 402 and the others are still processed: check each submission's `state`. See [Credits & Rate Limits](https://docspring.com/docs/api-guide/credits-and-rate-limits/). See also: - [Batch Generate PDFs](https://docspring.com/docs/api-guide/generate-pdfs/batch-generate-pdfs/) - Request format, responses, and limits
51
- # @param data
52
- # @param [Hash] opts the optional parameters
53
- # @option opts [Boolean] :wait Wait for submission batch to be processed before returning. Set to false to return immediately. Default: true (on sync.* subdomain)
54
- # @return [BatchGeneratePdfs201Response]
55
- describe 'batch_generate_pdfs test' do
56
- it 'should work' do
57
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
58
- end
59
- end
60
-
61
- # unit tests for combine_pdfs
62
- # Merge submission PDFs, template PDFs, or custom files
63
- # Combines multiple PDFs from various sources into a single PDF file. Supports merging submission PDFs, template PDFs, custom files, other merged PDFs, and PDFs from URLs. Merges the PDFs in the order provided. Combining uses credits (4 per source PDF, plus 4 per unit of the combined PDF), even with a test API token or watermarked source PDFs. If your balance can't cover it, the API returns 402 and the combined submission waits in the `insufficient_credits` state until you add credits. See [Credits & Rate Limits](https://docspring.com/docs/api-guide/credits-and-rate-limits/).
64
- # @param data
35
+ # unit tests for copy_template
36
+ # Copy a template
37
+ # Copies a template (its draft, or a published version) into a new template.
38
+ # @param template_id The template's ID.
65
39
  # @param [Hash] opts the optional parameters
66
- # @return [CreateCombinedSubmissionResponse]
67
- describe 'combine_pdfs test' do
40
+ # @option opts [CopyTemplateRequest] :body Settings for the copy.
41
+ # @return [Template]
42
+ describe 'copy_template test' do
68
43
  it 'should work' do
69
44
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
70
45
  end
71
46
  end
72
47
 
73
- # unit tests for copy_template
74
- # Copy a template
75
- # Creates a copy of an existing template with all its fields and configuration. Optionally specify a new name and target folder. The copied template starts as a new draft that can be modified independently of the original.
76
- # @param template_id
48
+ # unit tests for create_combined_pdf
49
+ # Combine PDFs
50
+ # Merges PDFs into one: submissions, other combined PDFs, templates, custom files (POST /custom_files) and PDFs from URLs, in the order of `source_pdfs`. The PDF is generated in the background: on sync.api hosts the request waits for it (unless you pass `wait=false`), otherwise poll GET /combined_pdfs/{combined_pdf_id} until `state` isn't `pending`. A template source merges the template's processed PDF by default: the PDF submissions are filled in on, decrypted and with its form fields removed. Pass `processed: false` to merge the PDF as it was uploaded.
51
+ # @param body The PDFs to merge, and the combined PDF's settings.
77
52
  # @param [Hash] opts the optional parameters
78
- # @option opts [CopyTemplateOptions] :options
79
- # @return [TemplatePreview]
80
- describe 'copy_template test' do
53
+ # @option opts [Boolean] :wait Wait until the PDF has been generated before responding. Default true on sync.api hosts.
54
+ # @return [CombinedPdf]
55
+ describe 'create_combined_pdf test' do
81
56
  it 'should work' do
82
57
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
83
58
  end
84
59
  end
85
60
 
86
61
  # unit tests for create_custom_file_from_upload
87
- # Create a new custom file from a cached S3 upload
88
- # The Custom Files API endpoint allows you to upload PDFs to DocSpring and then merge them with other PDFs. First upload your file using the presigned URL endpoint, then use the returned cache_id to create the custom file.
89
- # @param data
62
+ # Create a custom file from an upload
63
+ # Creates a custom file from a PDF you uploaded, so you can merge it with other PDFs. Upload the file with the presigned upload (GET /uploads/presign) first, then pass its `fields.key` as `cache_id`.
64
+ # @param body The uploaded file to create the custom file from.
90
65
  # @param [Hash] opts the optional parameters
91
- # @return [CreateCustomFileResponse]
66
+ # @return [CustomFile]
92
67
  describe 'create_custom_file_from_upload test' do
93
68
  it 'should work' do
94
69
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
95
70
  end
96
71
  end
97
72
 
98
- # unit tests for create_data_request_event
99
- # Create a new event for emailing a signee a request for signature
100
- # Records user notification events for data requests. Use this to create an audit trail showing when and how users were notified about data request forms. Supports email, SMS, and other notification types. Records the notification time for compliance tracking. See also: - [Embedded Data Requests Guide](https://docspring.com/docs/guides/embedded-forms/embedded-data-requests/) - User notification workflow
101
- # @param data_request_id
102
- # @param event
73
+ # unit tests for create_folder
74
+ # Create a folder
75
+ # Creates a folder for organizing templates. Pass `parent_folder_id` to create it inside another folder. Folder names are unique within their parent folder.
76
+ # @param body The folder to create.
103
77
  # @param [Hash] opts the optional parameters
104
- # @return [CreateSubmissionDataRequestEventResponse]
105
- describe 'create_data_request_event test' do
78
+ # @return [Folder]
79
+ describe 'create_folder test' do
106
80
  it 'should work' do
107
81
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
108
82
  end
109
83
  end
110
84
 
111
- # unit tests for create_data_request_token
112
- # Create a new data request token for form authentication
113
- # Creates an authentication token for accessing a data request form. Returns a token and a pre-authenticated URL for the data request form. The token remains valid until the data request is completed. See also: - [Embedded Data Requests Guide](https://docspring.com/docs/guides/embedded-forms/embedded-data-requests/)
114
- # @param data_request_id
85
+ # unit tests for create_signature_request_event
86
+ # Record a signature request event
87
+ # Records something that happened outside DocSpring in the signature request's audit trail: you sent the request to the person (`send_request`). The audit trail shows it as reported by your account.
88
+ # @param signature_request_id The signature request's ID.
89
+ # @param body The event to record.
115
90
  # @param [Hash] opts the optional parameters
116
- # @option opts [String] :type
117
- # @return [CreateSubmissionDataRequestTokenResponse]
118
- describe 'create_data_request_token test' do
91
+ # @return [SignatureRequestEvent]
92
+ describe 'create_signature_request_event test' do
119
93
  it 'should work' do
120
94
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
121
95
  end
122
96
  end
123
97
 
124
- # unit tests for create_folder
125
- # Create a folder
126
- # Creates a new folder for organizing templates. Folders can be nested within other folders by providing a `parent_folder_id`. Folder names must be unique within the same parent.
127
- # @param data
98
+ # unit tests for create_signature_request_token
99
+ # Create a signature request token
100
+ # Creates a token that opens the signature request without signing in, in a form embedded in your app or from a link you send. The response is the only time the token's secret is returned. The link works for 24 hours, or 7 days for an `email` token, and a signing page that opened in time keeps working for 7 more days. A test API token can't create a token for a live signature request.
101
+ # @param signature_request_id The signature request's ID.
128
102
  # @param [Hash] opts the optional parameters
129
- # @return [Folder]
130
- describe 'create_folder test' do
103
+ # @option opts [CreateSignatureRequestTokenRequest] :body The kind of link to make. Send no body for an `api` token.
104
+ # @return [SignatureRequestToken]
105
+ describe 'create_signature_request_token test' do
131
106
  it 'should work' do
132
107
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
133
108
  end
134
109
  end
135
110
 
136
- # unit tests for create_html_template
137
- # Create a new HTML template
138
- # Creates a new HTML template using HTML, CSS/SCSS, and Liquid templating. Allows complete control over PDF layout and styling. Supports headers, footers, and dynamic content using Liquid syntax for field values, conditions, loops, and filters.
139
- # @param data
111
+ # unit tests for create_submission
112
+ # Generate a PDF
113
+ # Creates a submission: fills in a template with your data and generates a PDF. The PDF is generated in the background: on sync.api hosts the request waits for it (unless you pass `wait=false`), otherwise poll GET /submissions/{submission_id} until `state` isn't `pending`. Data that doesn't match the template's fields returns a 422 with an `invalid_data` error. The submission is still saved, with its errors, so you can find it in DocSpring: the error's `submission_id` is its ID.
114
+ # @param template_id The template's ID.
115
+ # @param body The submission's data and settings.
140
116
  # @param [Hash] opts the optional parameters
141
- # @return [TemplatePreview]
142
- describe 'create_html_template test' do
117
+ # @option opts [String] :version The template version to use: a published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `latest` (the draft when no version has been published).
118
+ # @option opts [Boolean] :wait Wait until the PDF has been generated before responding. Default true on sync.api hosts.
119
+ # @return [Submission]
120
+ describe 'create_submission test' do
143
121
  it 'should work' do
144
122
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
145
123
  end
146
124
  end
147
125
 
148
- # unit tests for create_pdf_template
149
- # Create a new PDF template with a form POST file upload
150
- # Creates a new PDF template by uploading a PDF file. The uploaded PDF becomes the foundation for your template, and you can then add fillable fields using the template editor. Use the wait parameter to control whether the request waits for document processing to complete.
151
- # @param template_document
152
- # @param template_name
126
+ # unit tests for create_submission_batch
127
+ # Generate PDFs in a batch
128
+ # Creates up to 50 submissions in one request, from one template or several. The PDFs are only generated when every submission is valid. On sync.api hosts the request waits until every PDF has been generated (unless you pass `wait=false`), otherwise poll GET /submissions/batches/{submission_batch_id} until `processed_at` is set. When any submission is invalid, nothing is generated and the request returns a 422. Submissions whose data doesn't match their template's fields are still saved with their errors (an `invalid_data` error, with each one's `submission_id` in its details), so you can find them in DocSpring. The other submissions aren't saved.
129
+ # @param body The submissions to create, and the settings they share.
153
130
  # @param [Hash] opts the optional parameters
154
- # @option opts [Boolean] :wait Wait for template document to be processed before returning. Set to false to return immediately. Default: true (on sync.* subdomain)
155
- # @option opts [String] :template_description
156
- # @option opts [String] :template_parent_folder_id
157
- # @return [TemplatePreview]
158
- describe 'create_pdf_template test' do
131
+ # @option opts [Boolean] :wait Wait until every PDF in the batch has been generated before responding. Default true on sync.api hosts.
132
+ # @return [SubmissionBatch]
133
+ describe 'create_submission_batch test' do
159
134
  it 'should work' do
160
135
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
161
136
  end
162
137
  end
163
138
 
164
- # unit tests for create_pdf_template_from_upload
165
- # Create a new PDF template from a cached S3 file upload
166
- # Creates a new PDF template from a file previously uploaded to S3 using a presigned URL. This two-step process allows for more reliable large file uploads by first uploading the file to S3, then creating the template using the cached upload ID.
167
- # @param data
139
+ # unit tests for create_template
140
+ # Create a template
141
+ # Creates an HTML template, or a PDF template from a PDF you uploaded with the presigned upload (GET /uploads/presign): pass its `fields.key` as `cache_id`. To send the PDF with the request instead, use POST /templates/upload. A PDF template is ready to generate PDFs once DocSpring has processed its PDF (`ready` is true). On sync.api hosts the request waits for that unless you pass `wait=false`.
142
+ # @param body The template to create.
168
143
  # @param [Hash] opts the optional parameters
169
- # @return [TemplatePreview]
170
- describe 'create_pdf_template_from_upload test' do
144
+ # @option opts [Boolean] :wait Wait until the PDF has been processed before responding. Default true on sync.api hosts.
145
+ # @return [Template]
146
+ describe 'create_template test' do
171
147
  it 'should work' do
172
148
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
173
149
  end
@@ -175,8 +151,8 @@ describe 'Client' do
175
151
 
176
152
  # unit tests for create_webhook
177
153
  # Create a webhook
178
- # Creates a webhook that delivers a POST request to your endpoint whenever a subscribed event occurs. Optionally scope the webhook to specific API tokens, templates, or folders.
179
- # @param data
154
+ # Creates a webhook that sends a POST request to your endpoint whenever a subscribed event happens. Scope it to API tokens, templates or folders to receive only their events.
155
+ # @param body The webhook to create.
180
156
  # @param [Hash] opts the optional parameters
181
157
  # @return [Webhook]
182
158
  describe 'create_webhook test' do
@@ -185,10 +161,22 @@ describe 'Client' do
185
161
  end
186
162
  end
187
163
 
164
+ # unit tests for delete_custom_file
165
+ # Delete a custom file
166
+ # Deletes a custom file and returns it. Use a live API token: test tokens can't delete custom files.
167
+ # @param custom_file_id The custom file's ID.
168
+ # @param [Hash] opts the optional parameters
169
+ # @return [CustomFile]
170
+ describe 'delete_custom_file test' do
171
+ it 'should work' do
172
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
173
+ end
174
+ end
175
+
188
176
  # unit tests for delete_folder
189
177
  # Delete a folder
190
- # Deletes an empty folder. The folder must not contain any templates or subfolders. Move or delete all contents before attempting to delete the folder.
191
- # @param folder_id
178
+ # Deletes an empty folder and returns it. A folder that still has templates or folders in it can't be deleted.
179
+ # @param folder_id The folder's ID.
192
180
  # @param [Hash] opts the optional parameters
193
181
  # @return [Folder]
194
182
  describe 'delete_folder test' do
@@ -199,11 +187,11 @@ describe 'Client' do
199
187
 
200
188
  # unit tests for delete_template
201
189
  # Delete a template
202
- # Deletes a template or a specific template version. When no version is specified, deletes the entire template including all versions. When a version is specified, deletes only that version while preserving others. Returns remaining version information.
203
- # @param template_id
190
+ # Deletes a template's draft and all of its published versions, or one published version (`version`). Returns the template as it was before it was deleted.
191
+ # @param template_id The template's ID.
204
192
  # @param [Hash] opts the optional parameters
205
- # @option opts [String] :version
206
- # @return [TemplateDeleteResponse]
193
+ # @option opts [String] :version Delete only this published version (`1.2.0`) or the draft (`draft`, when no version has been published). Without it, the draft and every published version are deleted.
194
+ # @return [Template]
207
195
  describe 'delete_template test' do
208
196
  it 'should work' do
209
197
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
@@ -212,8 +200,8 @@ describe 'Client' do
212
200
 
213
201
  # unit tests for delete_webhook
214
202
  # Delete a webhook
215
- # Permanently deletes a webhook so it stops receiving events, and returns the deleted webhook.
216
- # @param webhook_id
203
+ # Deletes a webhook so it stops receiving events, and returns it.
204
+ # @param webhook_id The webhook's ID.
217
205
  # @param [Hash] opts the optional parameters
218
206
  # @return [Webhook]
219
207
  describe 'delete_webhook test' do
@@ -222,109 +210,106 @@ describe 'Client' do
222
210
  end
223
211
  end
224
212
 
225
- # unit tests for expire_combined_submission
226
- # Expire a combined submission
227
- # Expiring a combined submission deletes the PDF from our system. This is useful for invalidating sensitive documents.
228
- # @param combined_submission_id
213
+ # unit tests for expire_combined_pdf
214
+ # Expire a combined PDF
215
+ # Deletes a combined PDF's PDF and returns the expired combined PDF.
216
+ # @param combined_pdf_id The combined PDF's ID.
229
217
  # @param [Hash] opts the optional parameters
230
- # @return [CombinedSubmission]
231
- describe 'expire_combined_submission test' do
218
+ # @return [CombinedPdf]
219
+ describe 'expire_combined_pdf test' do
232
220
  it 'should work' do
233
221
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
234
222
  end
235
223
  end
236
224
 
237
225
  # unit tests for expire_submission
238
- # Expire a PDF submission
239
- # Expiring a PDF submission deletes the PDF and removes the data from our database. This is useful for invalidating sensitive documents after they've been downloaded. You can also [configure a data retention policy for your submissions](https://docspring.com/docs/template-editor/settings/#expire-submissions) so that they automatically expire.
240
- # @param submission_id
226
+ # Expire a submission
227
+ # Deletes a submission's data and PDF now, and returns the expired submission.
228
+ # @param submission_id The submission's ID.
241
229
  # @param [Hash] opts the optional parameters
242
- # @return [SubmissionPreview]
230
+ # @return [Submission]
243
231
  describe 'expire_submission test' do
244
232
  it 'should work' do
245
233
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
246
234
  end
247
235
  end
248
236
 
249
- # unit tests for generate_pdf
250
- # Generate a PDF
251
- # Creates a PDF submission by filling in a template with data. Supports both synchronous (default) and asynchronous processing. Add the `wait=false` query parameter to return immediately. Live PDFs use credits; test PDFs (`test: true`) are free and watermarked. If your balance can't cover a live PDF, the API returns 402 and the submission waits in the `insufficient_credits` state until you add credits. See [Credits & Rate Limits](https://docspring.com/docs/api-guide/credits-and-rate-limits/). See also: - [Customize the PDF Title and Filename](https://docspring.com/docs/api-guide/generate-pdfs/customize-pdf-title-and-filename/) - Set custom metadata - [Handling Truncated Text](https://docspring.com/docs/api-guide/generate-pdfs/handle-truncated-text/) - Handle text that doesn't fit in fields
252
- # @param template_id
253
- # @param submission
237
+ # unit tests for generate_submission_preview
238
+ # Generate a preview PDF
239
+ # Generates a preview of a submission's PDF in the background, such as for a submission still waiting for its signature requests. It's in `files.preview` once `preview_generated_at` changes.
240
+ # @param submission_id The submission's ID.
254
241
  # @param [Hash] opts the optional parameters
255
- # @option opts [Boolean] :wait Wait for submission to be processed before returning. Set to false to return immediately. Default: true (on sync.* subdomain)
256
- # @return [CreateSubmissionResponse]
257
- describe 'generate_pdf test' do
242
+ # @return [Submission]
243
+ describe 'generate_submission_preview test' do
258
244
  it 'should work' do
259
245
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
260
246
  end
261
247
  end
262
248
 
263
- # unit tests for generate_preview
264
- # Generate a preview PDF for partially completed data requests
265
- # Generates a preview PDF for a submission with partially completed data requests. Useful for showing users what the final document will look like before all signatures or data have been collected. The preview includes any data collected so far.
266
- # @param submission_id
249
+ # unit tests for get_combined_pdf
250
+ # Get a combined PDF
251
+ # Returns a combined PDF, with a temporary link to download it once it has been generated.
252
+ # @param combined_pdf_id The combined PDF's ID.
267
253
  # @param [Hash] opts the optional parameters
268
- # @return [SuccessErrorResponse]
269
- describe 'generate_preview test' do
254
+ # @return [CombinedPdf]
255
+ describe 'get_combined_pdf test' do
270
256
  it 'should work' do
271
257
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
272
258
  end
273
259
  end
274
260
 
275
- # unit tests for get_combined_submission
276
- # Check the status of a combined submission (merged PDFs)
277
- # Retrieves the details and status of a combined submission. Returns processing state, download URL (if processed), metadata, and information about any integrated actions (e.g., S3 uploads). `insufficient_credits` means the combined submission is waiting for credits and is processed once you add them. If it's still waiting after 30 days, it moves to `error`.
278
- # @param combined_submission_id
261
+ # unit tests for get_custom_file
262
+ # Get a custom file
263
+ # Returns a custom file, with a temporary URL to download it.
264
+ # @param custom_file_id The custom file's ID.
279
265
  # @param [Hash] opts the optional parameters
280
- # @return [CombinedSubmission]
281
- describe 'get_combined_submission test' do
266
+ # @return [CustomFile]
267
+ describe 'get_custom_file test' do
282
268
  it 'should work' do
283
269
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
284
270
  end
285
271
  end
286
272
 
287
- # unit tests for get_data_request
288
- # Look up a submission data request
289
- # Retrieves the details and status of a data request. Returns information about the request state (pending, viewed, completed), authentication details, and metadata. Includes audit information like IP address, browseruser agent, and timestamps. See also: - [Embedded Data Requests Guide](https://docspring.com/docs/guides/embedded-forms/embedded-data-requests/) - Complete guide to data request workflow
290
- # @param data_request_id
273
+ # unit tests for get_folder
274
+ # Get a folder
275
+ # Returns a folder.
276
+ # @param folder_id The folder's ID.
291
277
  # @param [Hash] opts the optional parameters
292
- # @return [SubmissionDataRequestShow]
293
- describe 'get_data_request test' do
278
+ # @return [Folder]
279
+ describe 'get_folder test' do
294
280
  it 'should work' do
295
281
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
296
282
  end
297
283
  end
298
284
 
299
- # unit tests for get_full_template
300
- # Fetch the full attributes for a PDF template
301
- # Retrieves complete template information including fields, defaults, settings, and HTML/SCSS content. Use this to get all template data needed for automated updates or analysis. Returns more detailed information than the basic `getTemplate` endpoint.
302
- # @param template_id
285
+ # unit tests for get_presign_url
286
+ # Get a presigned URL to upload a file
287
+ # Returns a presigned S3 form for uploading a file directly to DocSpring, for files too large to send in a request body. POST the `fields` and the file (as `file`) to `url` as multipart/form-data, then pass `fields.key` as the `cache_id` when you create a custom file.
303
288
  # @param [Hash] opts the optional parameters
304
- # @return [Template]
305
- describe 'get_full_template test' do
289
+ # @return [UploadPresign]
290
+ describe 'get_presign_url test' do
306
291
  it 'should work' do
307
292
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
308
293
  end
309
294
  end
310
295
 
311
- # unit tests for get_presign_url
312
- # Get a presigned S3 URL for direct file upload
313
- # Returns a presigned S3 URL for uploading files directly to our S3 bucket. Use this endpoint to upload large files before creating templates or custom files. S3 will respond with a JSON object that you can include in your DocSpring API request. Uploaded files can be used to: - [Create templates](https://docspring.com/docs/api/#tag/templates/post/templates?endpoint_variant=create_template_from_cached_upload) - [Update templates](https://docspring.com/docs/api/#tag/templates/put/templates/{template_id}?endpoint_variant=update_template_pdf_with_cached_upload) - [Create custom files](https://docspring.com/docs/api/#tag/custom-files/post/custom_files) and then [merge them with other PDFs](https://docspring.com/docs/api/#tag/combine-pdfs/post/combined_submissions)
296
+ # unit tests for get_signature_request
297
+ # Get a signature request
298
+ # Returns a signature request, with the values the person has entered so far.
299
+ # @param signature_request_id The signature request's ID.
314
300
  # @param [Hash] opts the optional parameters
315
- # @return [UploadPresignResponse]
316
- describe 'get_presign_url test' do
301
+ # @return [SignatureRequest]
302
+ describe 'get_signature_request test' do
317
303
  it 'should work' do
318
304
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
319
305
  end
320
306
  end
321
307
 
322
308
  # unit tests for get_submission
323
- # Check the status of a PDF
324
- # Retrieves the details and status of a PDF submission. Returns processing state, download URL (if processed), metadata, submission data (optional), and information about any integrated actions. Use this to poll for completion when using asynchronous processing. `insufficient_credits` means the submission is waiting for credits and is processed once you add them. If it's still waiting after 30 days, it moves to `error`.
325
- # @param submission_id
309
+ # Get a submission
310
+ # Returns a submission, with its data and links to download its PDF.
311
+ # @param submission_id The submission's ID.
326
312
  # @param [Hash] opts the optional parameters
327
- # @option opts [Boolean] :include_data
328
313
  # @return [Submission]
329
314
  describe 'get_submission test' do
330
315
  it 'should work' do
@@ -333,12 +318,12 @@ describe 'Client' do
333
318
  end
334
319
 
335
320
  # unit tests for get_submission_batch
336
- # Check the status of a submission batch job
337
- # Retrieves the status and results of a batch PDF generation job. Returns processing state, completion statistics, and optionally includes all individual submission details. Use this to poll for completion when using asynchronous batch processing. Submissions waiting for credits are in the `insufficient_credits` state and count as pending, so the batch stays `pending` until you add credits or they stop waiting after 30 days.
338
- # @param submission_batch_id
321
+ # Get a batch
322
+ # Returns a batch with its submissions. The batch has finished once `processed_at` is set: its `state` is `processed` when every PDF was generated, or `error` when any submission failed.
323
+ # @param submission_batch_id The batch's ID.
339
324
  # @param [Hash] opts the optional parameters
340
- # @option opts [Boolean] :include_submissions
341
- # @return [SubmissionBatchWithSubmissions]
325
+ # @option opts [Boolean] :include_data Include each submission's `data` (null without it).
326
+ # @return [SubmissionBatch]
342
327
  describe 'get_submission_batch test' do
343
328
  it 'should work' do
344
329
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
@@ -346,11 +331,12 @@ describe 'Client' do
346
331
  end
347
332
 
348
333
  # unit tests for get_template
349
- # Check the status of an uploaded template
350
- # Retrieves information about a template including processing status and document URL. Use this to check if template is ready to view in the template editor or generate PDFs.
351
- # @param template_id
334
+ # Get a template
335
+ # Returns a template: its draft, or one of its published versions.
336
+ # @param template_id The template's ID.
352
337
  # @param [Hash] opts the optional parameters
353
- # @return [TemplatePreview]
338
+ # @option opts [String] :version A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `draft`.
339
+ # @return [Template]
354
340
  describe 'get_template test' do
355
341
  it 'should work' do
356
342
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
@@ -358,12 +344,13 @@ describe 'Client' do
358
344
  end
359
345
 
360
346
  # unit tests for get_template_model_code
361
- # Generate typed model code for a template
362
- # Generates typed model code for a template's submission data from its JSON schema, in TypeScript, JavaScript, Ruby, Python, PHP, Java, C#, Elixir or Go. Build your submission data with the generated types so your app catches mistakes before it calls the API. `root_type_name` is the type that describes the whole submission data object, qualified with its namespace or package where there is one. Java returns every class in `code`, each under a `// ClassName.java` comment: split them into one file per class. A template with no named fields returns 422, since there are no types to generate. See also: - [Generate Model Code](https://docspring.com/docs/template-editor/generate-model-code/) - Use the generated types
363
- # @param template_id
364
- # @param lang The language to generate code for
347
+ # Generate typed code for a template's submission data
348
+ # Generates types for a template's submission data in TypeScript, JavaScript, Ruby, Python, PHP, Java, C#, Elixir or Go, so your app catches mistakes before it calls the API. `root_type_name` is the type of the whole `data` object. Java returns every class in `code`, each under a `// ClassName.java` comment. A template with no named fields returns 422.
349
+ # @param template_id The template's ID.
350
+ # @param lang The language to generate the code in.
365
351
  # @param [Hash] opts the optional parameters
366
- # @return [TemplateModelCodeResponse]
352
+ # @option opts [String] :version The template version: a published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `latest` (the draft when no version has been published), the version a submission uses by default.
353
+ # @return [TemplateModelCode]
367
354
  describe 'get_template_model_code test' do
368
355
  it 'should work' do
369
356
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
@@ -371,11 +358,12 @@ describe 'Client' do
371
358
  end
372
359
 
373
360
  # unit tests for get_template_schema
374
- # Fetch the JSON schema for a template
375
- # Retrieves the JSON Schema definition for a template's fields. Use this to validate data before submitting it for PDF generation, or to build dynamic forms that match the template's field structure and validation requirements. See also: - [Generate PDFs Guide](https://docspring.com/docs/api-guide/generate-pdfs/generate-pdfs-via-api/) - Use schema to validate submission data
376
- # @param template_id
361
+ # Get the JSON Schema of a template's submission data
362
+ # Returns the JSON Schema that a submission's `data` must match. Use it to check data before you create submissions, or to build a form for the template's fields.
363
+ # @param template_id The template's ID.
377
364
  # @param [Hash] opts the optional parameters
378
- # @return [JsonSchema]
365
+ # @option opts [String] :version The template version: a published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `latest` (the draft when no version has been published), the version a submission uses by default.
366
+ # @return [Hash<String, Object>]
379
367
  describe 'get_template_schema test' do
380
368
  it 'should work' do
381
369
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
@@ -384,8 +372,8 @@ describe 'Client' do
384
372
 
385
373
  # unit tests for get_webhook
386
374
  # Get a webhook
387
- # Retrieves a single webhook by its ID.
388
- # @param webhook_id
375
+ # Returns a webhook.
376
+ # @param webhook_id The webhook's ID.
389
377
  # @param [Hash] opts the optional parameters
390
378
  # @return [Webhook]
391
379
  describe 'get_webhook test' do
@@ -394,25 +382,40 @@ describe 'Client' do
394
382
  end
395
383
  end
396
384
 
397
- # unit tests for list_combined_submissions
398
- # Get a list of all combined submissions
399
- # Returns a paginated list of combined submissions (merged PDFs) for your account. Includes processing status, expiration details, and download URLs for processed PDFs.
385
+ # unit tests for list_combined_pdfs
386
+ # List combined PDFs
387
+ # Returns the combined PDFs in your account, newest first, one page at a time.
400
388
  # @param [Hash] opts the optional parameters
401
- # @option opts [Integer] :page Default: 1
402
- # @option opts [Integer] :per_page Default: 50
403
- # @return [Array<CombinedSubmission>]
404
- describe 'list_combined_submissions test' do
389
+ # @option opts [Integer] :limit How many items to return (1-100, default 50).
390
+ # @option opts [String] :cursor The previous page's `next_cursor`, to get the next page. It's the ID of that page's last item, so get the next page before you delete or change the items on this one.
391
+ # @return [CombinedPdfList]
392
+ describe 'list_combined_pdfs test' do
393
+ it 'should work' do
394
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
395
+ end
396
+ end
397
+
398
+ # unit tests for list_custom_files
399
+ # List custom files
400
+ # Returns the custom files in your account, newest first, one page at a time.
401
+ # @param [Hash] opts the optional parameters
402
+ # @option opts [Integer] :limit How many items to return (1-100, default 50).
403
+ # @option opts [String] :cursor The previous page's `next_cursor`, to get the next page. It's the ID of that page's last item, so get the next page before you delete or change the items on this one.
404
+ # @return [CustomFileList]
405
+ describe 'list_custom_files test' do
405
406
  it 'should work' do
406
407
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
407
408
  end
408
409
  end
409
410
 
410
411
  # unit tests for list_folders
411
- # Get a list of all folders
412
- # Returns a list of folders in your account. Can be filtered by parent folder ID to retrieve subfolders. Folders help organize templates and maintain a hierarchical structure.
412
+ # List folders
413
+ # Returns the folders in your account, newest first, one page at a time. Pass `parent_folder_id` to list the folders in one folder.
413
414
  # @param [Hash] opts the optional parameters
414
- # @option opts [String] :parent_folder_id Filter By Folder Id
415
- # @return [Array<Folder>]
415
+ # @option opts [String] :parent_folder_id Only list the folders in this folder. Without it, the list has every folder, at any depth.
416
+ # @option opts [Integer] :limit How many items to return (1-100, default 50).
417
+ # @option opts [String] :cursor The previous page's `next_cursor`, to get the next page. It's the ID of that page's last item, so get the next page before you delete or change the items on this one.
418
+ # @return [FolderList]
416
419
  describe 'list_folders test' do
417
420
  it 'should work' do
418
421
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
@@ -420,16 +423,17 @@ describe 'Client' do
420
423
  end
421
424
 
422
425
  # unit tests for list_submissions
423
- # List all submissions
424
- # Returns a paginated list of all PDF submissions across all templates in your account. Can be filtered by date range and submission type (test/live). Supports cursor-based pagination and optionally includes submission data for each result.
425
- # @param [Hash] opts the optional parameters
426
- # @option opts [String] :cursor
427
- # @option opts [Integer] :limit
428
- # @option opts [String] :created_after
429
- # @option opts [String] :created_before
430
- # @option opts [String] :type
431
- # @option opts [Boolean] :include_data
432
- # @return [ListSubmissionsResponse]
426
+ # List submissions
427
+ # Returns the submissions in your account, newest first, one page at a time. Lists leave out each submission's `data` unless you pass `include_data=true`.
428
+ # @param [Hash] opts the optional parameters
429
+ # @option opts [String] :template_id Only list this template's submissions.
430
+ # @option opts [Boolean] :test Only list test submissions (true) or live submissions (false).
431
+ # @option opts [Time] :created_after Only list submissions created after this time (RFC 3339, such as `2025-01-31T09:00:00Z`).
432
+ # @option opts [Time] :created_before Only list submissions created before this time.
433
+ # @option opts [Boolean] :include_data Include each submission's `data` (null without it).
434
+ # @option opts [Integer] :limit How many items to return (1-100, default 50).
435
+ # @option opts [String] :cursor The previous page's `next_cursor`, to get the next page. It's the ID of that page's last item, so get the next page before you delete or change the items on this one.
436
+ # @return [SubmissionList]
433
437
  describe 'list_submissions test' do
434
438
  it 'should work' do
435
439
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
@@ -437,17 +441,17 @@ describe 'Client' do
437
441
  end
438
442
 
439
443
  # unit tests for list_template_submissions
440
- # List all submissions for a given template
441
- # Returns a paginated list of all submissions for a specific template. Can be filtered by date range, submission type (test/live), and optionally include submission data. Supports cursor-based pagination for efficient retrieval of large result sets.
442
- # @param template_id
443
- # @param [Hash] opts the optional parameters
444
- # @option opts [String] :cursor
445
- # @option opts [Integer] :limit
446
- # @option opts [String] :created_after
447
- # @option opts [String] :created_before
448
- # @option opts [String] :type
449
- # @option opts [Boolean] :include_data
450
- # @return [ListSubmissionsResponse]
444
+ # List a template's submissions
445
+ # Returns a template's submissions (from every version of the template), newest first.
446
+ # @param template_id The template's ID.
447
+ # @param [Hash] opts the optional parameters
448
+ # @option opts [Boolean] :test Only list test submissions (true) or live submissions (false).
449
+ # @option opts [Time] :created_after Only list submissions created after this time (RFC 3339, such as `2025-01-31T09:00:00Z`).
450
+ # @option opts [Time] :created_before Only list submissions created before this time.
451
+ # @option opts [Boolean] :include_data Include each submission's `data` (null without it).
452
+ # @option opts [Integer] :limit How many items to return (1-100, default 50).
453
+ # @option opts [String] :cursor The previous page's `next_cursor`, to get the next page. It's the ID of that page's last item, so get the next page before you delete or change the items on this one.
454
+ # @return [SubmissionList]
451
455
  describe 'list_template_submissions test' do
452
456
  it 'should work' do
453
457
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
@@ -455,14 +459,14 @@ describe 'Client' do
455
459
  end
456
460
 
457
461
  # unit tests for list_templates
458
- # Get a list of all templates
459
- # Retrieves a list of your templates with search, filtering, and pagination options. Returns basic template information including ID, name, type (PDF or HTML), and folder location. Supports text search by name and filtering by parent folder.
460
- # @param [Hash] opts the optional parameters
461
- # @option opts [String] :query Search By Name
462
- # @option opts [String] :parent_folder_id Filter By Folder Id
463
- # @option opts [Integer] :page Default: 1
464
- # @option opts [Integer] :per_page Default: 50
465
- # @return [Array<TemplatePreview>]
462
+ # List templates
463
+ # Returns the templates in your account (their drafts), newest first, one page at a time. Get a template by its ID for its HTML, defaults and published versions.
464
+ # @param [Hash] opts the optional parameters
465
+ # @option opts [String] :query Only list templates whose name contains this text (ignoring case).
466
+ # @option opts [String] :parent_folder_id Only list the templates in this folder (not in its subfolders).
467
+ # @option opts [Integer] :limit How many items to return (1-100, default 50).
468
+ # @option opts [String] :cursor The previous page's `next_cursor`, to get the next page. It's the ID of that page's last item, so get the next page before you delete or change the items on this one.
469
+ # @return [TemplateSummaryList]
466
470
  describe 'list_templates test' do
467
471
  it 'should work' do
468
472
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
@@ -470,44 +474,44 @@ describe 'Client' do
470
474
  end
471
475
 
472
476
  # unit tests for list_webhooks
473
- # Get a list of all webhooks
474
- # Returns a list of the webhooks configured for your account. Supports pagination and filtering by event type, mode, and the API token, template, or folder a webhook is scoped to.
475
- # @param [Hash] opts the optional parameters
476
- # @option opts [Integer] :page Default: 1
477
- # @option opts [Integer] :per_page Default: 50
478
- # @option opts [String] :event_type Filter by a subscribed event type
479
- # @option opts [String] :mode Filter by mode (test or live)
480
- # @option opts [String] :template_id Filter by a scoped template ID
481
- # @option opts [String] :folder_id Filter by a scoped folder ID
482
- # @option opts [String] :api_token_id Filter by a scoped API token ID
483
- # @return [Array<Webhook>]
477
+ # List webhooks
478
+ # Returns the webhooks in your account, newest first, one page at a time. Filter them by event type, mode, or the API token, template or folder they're scoped to.
479
+ # @param [Hash] opts the optional parameters
480
+ # @option opts [WebhookEventType] :event_type Only list webhooks that subscribe to this event.
481
+ # @option opts [WebhookMode] :mode Only list webhooks set to this mode.
482
+ # @option opts [String] :template_id Only list webhooks scoped to this template.
483
+ # @option opts [String] :folder_id Only list webhooks scoped to this folder.
484
+ # @option opts [String] :api_token_id Only list webhooks scoped to this API token.
485
+ # @option opts [Integer] :limit How many items to return (1-100, default 50).
486
+ # @option opts [String] :cursor The previous page's `next_cursor`, to get the next page. It's the ID of that page's last item, so get the next page before you delete or change the items on this one.
487
+ # @return [WebhookList]
484
488
  describe 'list_webhooks test' do
485
489
  it 'should work' do
486
490
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
487
491
  end
488
492
  end
489
493
 
490
- # unit tests for move_folder_to_folder
494
+ # unit tests for move_folder
491
495
  # Move a folder
492
- # Moves a folder to a new parent folder or to the root level. All templates and subfolders within the folder are moved together. Cannot move a folder into one of its own subfolders.
493
- # @param folder_id
494
- # @param data
496
+ # Moves a folder into another folder, or to the root with `parent_folder_id: null`. Its templates and folders move with it. A folder can't move into itself or one of its own folders.
497
+ # @param folder_id The folder's ID.
498
+ # @param body Where to move the folder.
495
499
  # @param [Hash] opts the optional parameters
496
500
  # @return [Folder]
497
- describe 'move_folder_to_folder test' do
501
+ describe 'move_folder test' do
498
502
  it 'should work' do
499
503
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
500
504
  end
501
505
  end
502
506
 
503
- # unit tests for move_template_to_folder
504
- # Move Template to folder
505
- # Moves a template to a different folder or to the root level. Use this to organize templates within your folders. Provide a folder ID to move to a specific folder, or &#x60;null&#x60; to move to the root level.
506
- # @param template_id
507
- # @param data
507
+ # unit tests for move_template
508
+ # Move a template to a folder
509
+ # Moves a template and all of its published versions to a folder, or to the root (`null`).
510
+ # @param template_id The template's ID.
511
+ # @param body Where to move the template.
508
512
  # @param [Hash] opts the optional parameters
509
- # @return [TemplatePreview]
510
- describe 'move_template_to_folder test' do
513
+ # @return [Template]
514
+ describe 'move_template test' do
511
515
  it 'should work' do
512
516
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
513
517
  end
@@ -515,11 +519,11 @@ describe 'Client' do
515
519
 
516
520
  # unit tests for publish_template_version
517
521
  # Publish a template version
518
- # Publishes the current draft version of a template and creates a new immutable version with semantic versioning (major.minor.patch).
519
- # @param template_id
520
- # @param data
522
+ # Publishes the template's draft as a new version that doesn't change. `version_type` says which part of the latest version number goes up.
523
+ # @param template_id The template's ID.
524
+ # @param body The version to publish.
521
525
  # @param [Hash] opts the optional parameters
522
- # @return [TemplatePublishVersionResponse]
526
+ # @return [TemplateVersion]
523
527
  describe 'publish_template_version test' do
524
528
  it 'should work' do
525
529
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
@@ -528,9 +532,9 @@ describe 'Client' do
528
532
 
529
533
  # unit tests for rename_folder
530
534
  # Rename a folder
531
- # Renames an existing folder. The new name must be unique within the same parent folder. This operation only changes the folder name, not its location or contents.
532
- # @param folder_id
533
- # @param data
535
+ # Renames a folder. The name must be unique within its parent folder.
536
+ # @param folder_id The folder's ID.
537
+ # @param body The folder's new name.
534
538
  # @param [Hash] opts the optional parameters
535
539
  # @return [Folder]
536
540
  describe 'rename_folder test' do
@@ -541,11 +545,11 @@ describe 'Client' do
541
545
 
542
546
  # unit tests for restore_template_version
543
547
  # Restore a template version
544
- # Restores your template to a previously published version, copying that version&#39;s content and configuration to the current draft. Use this to revert changes or recover from an unwanted modification.
545
- # @param template_id
546
- # @param data
548
+ # Replaces the template's draft with a copy of one of its published versions.
549
+ # @param template_id The template's ID.
550
+ # @param body The version to restore.
547
551
  # @param [Hash] opts the optional parameters
548
- # @return [SuccessErrorResponse]
552
+ # @return [Template]
549
553
  describe 'restore_template_version test' do
550
554
  it 'should work' do
551
555
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
@@ -554,35 +558,35 @@ describe 'Client' do
554
558
 
555
559
  # unit tests for test_authentication
556
560
  # Test authentication
557
- # Checks whether your API token is valid by making an authenticated request. Returns a success response if authentication passes. This endpoint is useful for verifying credentials during setup or troubleshooting issues.
561
+ # Checks whether your API token is valid by making an authenticated request. This endpoint is useful for verifying credentials during setup or troubleshooting issues.
558
562
  # @param [Hash] opts the optional parameters
559
- # @return [SuccessErrorResponse]
563
+ # @return [AuthenticationCheck]
560
564
  describe 'test_authentication test' do
561
565
  it 'should work' do
562
566
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
563
567
  end
564
568
  end
565
569
 
566
- # unit tests for update_data_request
567
- # Update a submission data request
568
- # Updates authentication details for a data request. Use this when a user logs in to record their authentication method, provider, session information, and hashed identifiers. Updates metadata and tracks authentication state changes for auditing and compliance.
569
- # @param data_request_id
570
- # @param data
570
+ # unit tests for update_signature_request
571
+ # Update a signature request
572
+ # Changes a pending signature request's metadata, or how your app authenticated the person (for the audit trail). Once the person has opened it, only its metadata can be changed, and a completed or declined signature request can't be changed.
573
+ # @param signature_request_id The signature request's ID.
574
+ # @param body The settings to change. Properties left out keep their values.
571
575
  # @param [Hash] opts the optional parameters
572
- # @return [CreateSubmissionDataRequestResponse]
573
- describe 'update_data_request test' do
576
+ # @return [SignatureRequest]
577
+ describe 'update_signature_request test' do
574
578
  it 'should work' do
575
579
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
576
580
  end
577
581
  end
578
582
 
579
583
  # unit tests for update_template
580
- # Update a Template
581
- # Updates template content and properties. For HTML templates, you can modify the HTML, SCSS, headers, footers, name, and description. Changes are applied to your draft template and do not affect published template versions. The exception is &#x60;parent_folder_id&#x60;: moving the template to another folder moves its published versions too.
582
- # @param template_id
583
- # @param data
584
+ # Update a template
585
+ # Changes a template's draft. Properties left out keep their values. `defaults` and `html_engine_options` replace the whole object. Setting `parent_folder_id` moves the template and all of its published versions.
586
+ # @param template_id The template's ID.
587
+ # @param body The settings to change. Properties left out keep their values.
584
588
  # @param [Hash] opts the optional parameters
585
- # @return [SuccessMultipleErrorsResponse]
589
+ # @return [Template]
586
590
  describe 'update_template test' do
587
591
  it 'should work' do
588
592
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
@@ -590,40 +594,63 @@ describe 'Client' do
590
594
  end
591
595
 
592
596
  # unit tests for update_template_document
593
- # Update a template&#39;s document with a form POST file upload
594
- # Upload a new PDF file to update a PDF template&#39;s document. This replaces the template&#39;s PDF while preserving all of the existing fields. If you upload a PDF with fewer pages than the current document, any fields on the removed pages will be deleted.
595
- # @param template_id
596
- # @param template_document
597
+ # Replace a template's PDF
598
+ # Replaces a PDF template's PDF with one you uploaded with the presigned upload (GET /uploads/presign). The fields stay where they are, unless `reimport_fields` replaces them with the new PDF's fillable fields. To send the PDF with the request instead, use PUT /templates/{template_id}/document/upload.
599
+ # @param template_id The template's ID.
600
+ # @param body The new PDF.
597
601
  # @param [Hash] opts the optional parameters
598
- # @option opts [String] :template_name
599
- # @return [SuccessMultipleErrorsResponse]
602
+ # @option opts [Boolean] :wait Wait until the PDF has been processed before responding. Default true on sync.api hosts.
603
+ # @return [Template]
600
604
  describe 'update_template_document test' do
601
605
  it 'should work' do
602
606
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
603
607
  end
604
608
  end
605
609
 
606
- # unit tests for update_template_document_from_upload
607
- # Update a template&#39;s document with a cached S3 file upload
608
- # Updates a PDF template&#39;s document using a cached file upload. This is a three-step process: First, request a presigned URL to upload your PDF file to our S3 bucket. Then, use that URL to upload your PDF file. Finally, submit the ID of the uploaded file to replace the template&#39;s document.
609
- # @param template_id
610
- # @param data
610
+ # unit tests for update_webhook
611
+ # Update a webhook
612
+ # Updates a webhook. Only the properties you send change.
613
+ # @param webhook_id The webhook's ID.
614
+ # @param body The settings to change. Properties left out keep their values.
611
615
  # @param [Hash] opts the optional parameters
612
- # @return [SuccessMultipleErrorsResponse]
613
- describe 'update_template_document_from_upload test' do
616
+ # @return [Webhook]
617
+ describe 'update_webhook test' do
614
618
  it 'should work' do
615
619
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
616
620
  end
617
621
  end
618
622
 
619
- # unit tests for update_webhook
620
- # Update a webhook
621
- # Updates the configuration of an existing webhook.
622
- # @param webhook_id
623
- # @param data
623
+ # unit tests for upload_template
624
+ # Create a PDF template from an uploaded PDF
625
+ # Creates a PDF template from a PDF sent with the request (`multipart/form-data`). For large files, upload the PDF with the presigned upload (GET /uploads/presign) and create the template with POST /templates.
626
+ # @param document The PDF.
624
627
  # @param [Hash] opts the optional parameters
625
- # @return [Webhook]
626
- describe 'update_webhook test' do
628
+ # @option opts [Boolean] :wait Wait until the PDF has been processed before responding. Default true on sync.api hosts.
629
+ # @option opts [String] :name The template's name.
630
+ # @option opts [String] :description The template's description.
631
+ # @option opts [String] :parent_folder_id The folder to put the template in. Left out, it's created at the root.
632
+ # @option opts [AiFieldNamingLanguage] :ai_field_naming_language The language AI field setup names fields in: `auto` uses the form's language when it's written in the Latin alphabet without accents, and English otherwise; `english` always uses English; `form_language` uses the form's language and script. Default: your account's template settings.
633
+ # @option opts [Boolean] :detect_fields Set up the PDF's fields as DocSpring's "Automatically detect fields" upload option does: import or detect the fields, name them with AI, and set up conditional logic. `field_source`, `field_naming` and `field_logic` choose how. Default false. `document.page_processing_statuses` and `document.field_logic_status` show how it's going, and `document.state` becomes `processed` once every page's fields are set up.
634
+ # @option opts [FieldSetupSource] :field_source With `detect_fields`, where the fields come from. `auto` (the default) imports the form fields of a fillable PDF and detects the fields of a PDF without them; `pdf_detection` detects the fields from the page layout, even on a fillable PDF; `pdf_form_fields` only imports the PDF's form fields.
635
+ # @option opts [FieldSetupNaming] :field_naming With `detect_fields`, how the fields are named. `ai` (the default) names them and sets their types and settings with AI; `preserve` keeps the names of the PDF's form fields, and AI only names the fields it detected. `preserve` needs `field_source` `auto` or `pdf_form_fields`.
636
+ # @option opts [FieldSetupLogic] :field_logic With `detect_fields`, whether AI reads the whole form once the fields are named and sets up conditional logic and required fields (`ai`) or not (`none`). Default: your account's template settings.
637
+ # @return [Template]
638
+ describe 'upload_template test' do
639
+ it 'should work' do
640
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
641
+ end
642
+ end
643
+
644
+ # unit tests for upload_template_document
645
+ # Replace a template's PDF with an uploaded PDF
646
+ # Replaces a PDF template's PDF with one sent with the request (`multipart/form-data`). The fields stay where they are, unless `reimport_fields` replaces them with the new PDF's fillable fields.
647
+ # @param template_id The template's ID.
648
+ # @param document The new PDF.
649
+ # @param [Hash] opts the optional parameters
650
+ # @option opts [Boolean] :wait Wait until the PDF has been processed before responding. Default true on sync.api hosts.
651
+ # @option opts [Boolean] :reimport_fields Replace all of the template's fields with the fillable fields in the new PDF, once DocSpring has processed it (`document.field_reimport_state`). As on a first upload, the default typeface, font size, bold and color are taken from the PDF's fields; the template's other settings are kept. If the PDF has no fillable fields, the template keeps its fields. A locked template can't re-import its fields.
652
+ # @return [Template]
653
+ describe 'upload_template_document test' do
627
654
  it 'should work' do
628
655
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
629
656
  end