docspring 3.5.0 → 4.1.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 (588) hide show
  1. checksums.yaml +4 -4
  2. data/.openapi-generator/FILES +445 -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 +147 -0
  8. data/Gemfile.lock +7 -7
  9. data/README.md +69 -53
  10. data/docs/AddTemplateFieldsRequest.md +18 -0
  11. data/docs/{RenameFolderData.md → AiFieldNamingLanguage.md} +2 -5
  12. data/docs/AuthenticationCheck.md +18 -0
  13. data/docs/{CreateFolderData.md → BarcodeSymbology.md} +2 -5
  14. data/docs/{CreateWebhookData.md → CheckCharacter.md} +2 -5
  15. data/docs/Client.md +1570 -786
  16. data/docs/{UpdateWebhookData.md → CombinedFieldType.md} +2 -5
  17. data/docs/CombinedPdf.md +44 -0
  18. data/docs/CombinedPdfFiles.md +18 -0
  19. data/docs/CombinedPdfList.md +20 -0
  20. data/docs/CombinedPdfSource.md +26 -0
  21. data/docs/CombinedPdfSourceInput.md +88 -0
  22. data/docs/CombinedPdfSourcePdf.md +20 -0
  23. data/docs/CombinedPdfSourceType.md +15 -0
  24. data/docs/CombinedPdfState.md +15 -0
  25. data/docs/CopyTemplateRequest.md +22 -0
  26. data/docs/CreateCombinedPdfRequest.md +26 -0
  27. data/docs/CreateCustomFileFromUploadRequest.md +18 -0
  28. data/docs/CreateFolderRequest.md +20 -0
  29. data/docs/CreateSignatureRequestEventRequest.md +24 -0
  30. data/docs/CreateSignatureRequestTokenRequest.md +18 -0
  31. data/docs/CreateSubmissionBatchRequest.md +28 -0
  32. data/docs/CreateSubmissionRequest.md +38 -0
  33. data/docs/CreateTemplateRequest.md +102 -0
  34. data/docs/CreateWebhookRequest.md +38 -0
  35. data/docs/CustomFile.md +11 -3
  36. data/docs/CustomFileList.md +20 -0
  37. data/docs/CustomFileSourcePdf.md +20 -0
  38. data/docs/ErrorCode.md +15 -0
  39. data/docs/ErrorDetail.md +26 -0
  40. data/docs/ErrorInfo.md +32 -0
  41. data/docs/ErrorResponse.md +1 -3
  42. data/docs/ExpirationInterval.md +15 -0
  43. data/docs/Field.md +198 -0
  44. data/docs/FieldComparisonCondition.md +22 -0
  45. data/docs/FieldComparisonOperator.md +15 -0
  46. data/docs/FieldDependency.md +22 -0
  47. data/docs/FieldDependencyInput.md +22 -0
  48. data/docs/FieldDisplayType.md +15 -0
  49. data/docs/FieldEqualsCondition.md +22 -0
  50. data/docs/FieldEqualsOperator.md +15 -0
  51. data/docs/FieldGroup.md +32 -0
  52. data/docs/FieldGroupInput.md +30 -0
  53. data/docs/FieldGroupType.md +15 -0
  54. data/docs/FieldInCondition.md +22 -0
  55. data/docs/FieldInput.md +196 -0
  56. data/docs/FieldOverride.md +142 -0
  57. data/docs/FieldPresenceCondition.md +20 -0
  58. data/docs/FieldPresenceOperator.md +15 -0
  59. data/docs/FieldRangeCondition.md +24 -0
  60. data/docs/FieldReimportState.md +15 -0
  61. data/docs/FieldSetupLogic.md +15 -0
  62. data/docs/FieldSetupNaming.md +15 -0
  63. data/docs/FieldSetupSource.md +15 -0
  64. data/docs/FieldType.md +15 -0
  65. data/docs/Folder.md +9 -5
  66. data/docs/FolderList.md +20 -0
  67. data/docs/GenerateFilesFormat.md +15 -0
  68. data/docs/GenerateSubmissionFilesRequest.md +18 -0
  69. data/docs/GeneratedFile.md +32 -0
  70. data/docs/GeneratedFileState.md +15 -0
  71. data/docs/HtmlEngineOptions.md +36 -0
  72. data/docs/HtmlEngineOptionsInput.md +36 -0
  73. data/docs/ImageGravity.md +15 -0
  74. data/docs/ImageScaleType.md +15 -0
  75. data/docs/ModelCodeLanguage.md +15 -0
  76. data/docs/MoveFolderRequest.md +18 -0
  77. data/docs/MoveTemplateRequest.md +18 -0
  78. data/docs/NumberConditionType.md +15 -0
  79. data/docs/OutputFormat.md +15 -0
  80. data/docs/PageFormat.md +15 -0
  81. data/docs/PageImage.md +34 -0
  82. data/docs/PageImages.md +24 -0
  83. data/docs/PredefinedField.md +30 -0
  84. data/docs/PredefinedFieldInput.md +30 -0
  85. data/docs/PublishTemplateVersionRequest.md +20 -0
  86. data/docs/RemoveTemplateFieldsRequest.md +18 -0
  87. data/docs/RenameFolderRequest.md +18 -0
  88. data/docs/ReorderTemplateFieldsRequest.md +18 -0
  89. data/docs/RestoreTemplateVersionRequest.md +18 -0
  90. data/docs/ShapeType.md +15 -0
  91. data/docs/SignatureRequest.md +66 -0
  92. data/docs/SignatureRequestAuthSecondFactorType.md +15 -0
  93. data/docs/SignatureRequestAuthType.md +15 -0
  94. data/docs/SignatureRequestEvent.md +32 -0
  95. data/docs/SignatureRequestEventType.md +15 -0
  96. data/docs/SignatureRequestInput.md +46 -0
  97. data/docs/SignatureRequestMessageType.md +15 -0
  98. data/docs/SignatureRequestState.md +15 -0
  99. data/docs/SignatureRequestToken.md +30 -0
  100. data/docs/SignatureRequestTokenType.md +15 -0
  101. data/docs/StringConditionType.md +15 -0
  102. data/docs/Submission.md +43 -47
  103. data/docs/SubmissionAction.md +6 -8
  104. data/docs/SubmissionActionState.md +15 -0
  105. data/docs/SubmissionActionType.md +15 -0
  106. data/docs/SubmissionBatch.md +16 -10
  107. data/docs/SubmissionBatchState.md +15 -0
  108. data/docs/SubmissionFiles.md +24 -0
  109. data/docs/SubmissionInput.md +40 -0
  110. data/docs/SubmissionList.md +20 -0
  111. data/docs/SubmissionSource.md +15 -0
  112. data/docs/SubmissionSourcePdf.md +20 -0
  113. data/docs/SubmissionState.md +15 -0
  114. data/docs/SubmissionValidation.md +24 -0
  115. data/docs/Template.md +79 -107
  116. data/docs/TemplateActor.md +26 -0
  117. data/docs/TemplateActorType.md +15 -0
  118. data/docs/TemplateDefaults.md +56 -0
  119. data/docs/TemplateDefaultsInput.md +56 -0
  120. data/docs/TemplateDiff.md +30 -0
  121. data/docs/TemplateDiffSummary.md +28 -0
  122. data/docs/TemplateDocument.md +40 -0
  123. data/docs/TemplateDocumentState.md +15 -0
  124. data/docs/TemplateFieldChange.md +24 -0
  125. data/docs/TemplateFieldChanges.md +24 -0
  126. data/docs/TemplateFieldDependency.md +26 -0
  127. data/docs/TemplateFieldDependencyAction.md +15 -0
  128. data/docs/TemplateFieldDependencyCondition.md +24 -0
  129. data/docs/TemplateFieldDependencyConditionInput.md +93 -0
  130. data/docs/TemplateFieldDependencyInput.md +26 -0
  131. data/docs/TemplateFieldDependencyMatch.md +15 -0
  132. data/docs/TemplateFieldDependencyOperator.md +15 -0
  133. data/docs/TemplateFieldLogicStatus.md +15 -0
  134. data/docs/TemplateFieldMove.md +22 -0
  135. data/docs/TemplateFields.md +22 -0
  136. data/docs/TemplateFormMode.md +15 -0
  137. data/docs/TemplateModelCode.md +22 -0
  138. data/docs/TemplatePageAiError.md +15 -0
  139. data/docs/TemplatePageAiNamingStatus.md +15 -0
  140. data/docs/TemplatePageFieldsStatus.md +15 -0
  141. data/docs/TemplatePageImageStatus.md +15 -0
  142. data/docs/TemplatePageImages.md +24 -0
  143. data/docs/TemplatePageProcessingStatus.md +26 -0
  144. data/docs/TemplateSourcePdf.md +24 -0
  145. data/docs/TemplateSummary.md +90 -0
  146. data/docs/TemplateSummaryList.md +20 -0
  147. data/docs/TemplateType.md +15 -0
  148. data/docs/TemplateVersion.md +24 -0
  149. data/docs/TemplateVersionType.md +15 -0
  150. data/docs/TextAlignment.md +15 -0
  151. data/docs/TextOverflow.md +15 -0
  152. data/docs/TextVerticalAlignment.md +15 -0
  153. data/docs/Typeface.md +15 -0
  154. data/docs/UpdateSignatureRequestRequest.md +34 -0
  155. data/docs/UpdateTemplateDocumentRequest.md +26 -0
  156. data/docs/UpdateTemplateFieldsRequest.md +18 -0
  157. data/docs/UpdateTemplateRequest.md +86 -0
  158. data/docs/UpdateWebhookRequest.md +38 -0
  159. data/docs/UploadMethod.md +15 -0
  160. data/docs/UploadPresign.md +24 -0
  161. data/docs/UrlSourcePdf.md +20 -0
  162. data/docs/ValidateSubmissionRequest.md +38 -0
  163. data/docs/Webhook.md +20 -20
  164. data/docs/WebhookEventType.md +15 -0
  165. data/docs/WebhookList.md +20 -0
  166. data/docs/WebhookMode.md +15 -0
  167. data/docspring.gemspec +3 -3
  168. data/lib/docspring/api/client.rb +1606 -905
  169. data/lib/docspring/api_client.rb +14 -6
  170. data/lib/docspring/api_error.rb +3 -3
  171. data/lib/docspring/api_model_base.rb +88 -0
  172. data/lib/docspring/configuration.rb +12 -7
  173. data/lib/docspring/models/add_template_fields_request.rb +187 -0
  174. data/lib/docspring/models/ai_field_naming_language.rb +42 -0
  175. data/lib/docspring/models/authentication_check.rb +185 -0
  176. data/lib/docspring/models/barcode_symbology.rb +47 -0
  177. data/lib/docspring/models/check_character.rb +44 -0
  178. data/lib/docspring/models/combined_field_type.rb +41 -0
  179. data/lib/docspring/models/{combined_submission.rb → combined_pdf.rb} +228 -206
  180. data/lib/docspring/models/combined_pdf_files.rb +167 -0
  181. data/lib/docspring/models/combined_pdf_list.rb +200 -0
  182. data/lib/docspring/models/{create_webhook_data.rb → combined_pdf_source.rb} +107 -103
  183. data/lib/docspring/models/combined_pdf_source_input.rb +62 -0
  184. data/lib/docspring/models/combined_pdf_source_pdf.rb +212 -0
  185. data/lib/docspring/models/combined_pdf_source_type.rb +44 -0
  186. data/lib/docspring/models/combined_pdf_state.rb +44 -0
  187. data/lib/docspring/models/{copy_template_options.rb → copy_template_request.rb} +32 -87
  188. data/lib/docspring/models/{combine_pdfs_data.rb → create_combined_pdf_request.rb} +60 -123
  189. data/lib/docspring/models/{create_custom_file_data.rb → create_custom_file_from_upload_request.rb} +29 -96
  190. data/lib/docspring/models/{move_template_data.rb → create_folder_request.rb} +60 -102
  191. data/lib/docspring/models/{create_submission_data_request_event_request.rb → create_signature_request_event_request.rb} +50 -122
  192. data/lib/docspring/models/create_signature_request_token_request.rb +190 -0
  193. data/lib/docspring/models/{submission_batch_data.rb → create_submission_batch_request.rb} +75 -108
  194. data/lib/docspring/models/{create_pdf_submission_data.rb → create_submission_request.rb} +114 -144
  195. data/lib/docspring/models/create_template_request.rb +646 -0
  196. data/lib/docspring/models/create_webhook_request.rb +368 -0
  197. data/lib/docspring/models/custom_file.rb +132 -95
  198. data/lib/docspring/models/custom_file_list.rb +200 -0
  199. data/lib/docspring/models/custom_file_source_pdf.rb +212 -0
  200. data/lib/docspring/models/error_code.rb +60 -0
  201. data/lib/docspring/models/error_detail.rb +242 -0
  202. data/lib/docspring/models/error_info.rb +316 -0
  203. data/lib/docspring/models/error_response.rb +28 -138
  204. data/lib/docspring/models/expiration_interval.rb +42 -0
  205. data/lib/docspring/models/field.rb +2217 -0
  206. data/lib/docspring/models/field_comparison_condition.rb +247 -0
  207. data/lib/docspring/models/field_comparison_operator.rb +43 -0
  208. data/lib/docspring/models/field_dependency.rb +246 -0
  209. data/lib/docspring/models/field_dependency_input.rb +246 -0
  210. data/lib/docspring/models/field_display_type.rb +45 -0
  211. data/lib/docspring/models/field_equals_condition.rb +247 -0
  212. data/lib/docspring/models/field_equals_operator.rb +41 -0
  213. data/lib/docspring/models/field_group.rb +368 -0
  214. data/lib/docspring/models/field_group_input.rb +247 -0
  215. data/lib/docspring/models/field_group_type.rb +41 -0
  216. data/lib/docspring/models/{create_folder_data.rb → field_in_condition.rb} +101 -103
  217. data/lib/docspring/models/field_input.rb +1109 -0
  218. data/lib/docspring/models/field_override.rb +829 -0
  219. data/lib/docspring/models/field_presence_condition.rb +234 -0
  220. data/lib/docspring/models/field_presence_operator.rb +41 -0
  221. data/lib/docspring/models/field_range_condition.rb +234 -0
  222. data/lib/docspring/models/field_reimport_state.rb +43 -0
  223. data/lib/docspring/models/field_setup_logic.rb +41 -0
  224. data/lib/docspring/models/field_setup_naming.rb +41 -0
  225. data/lib/docspring/models/field_setup_source.rb +42 -0
  226. data/lib/docspring/models/field_type.rb +54 -0
  227. data/lib/docspring/models/folder.rb +134 -93
  228. data/lib/docspring/models/folder_list.rb +200 -0
  229. data/lib/docspring/models/generate_files_format.rb +40 -0
  230. data/lib/docspring/models/generate_submission_files_request.rb +187 -0
  231. data/lib/docspring/models/generated_file.rb +326 -0
  232. data/lib/docspring/models/generated_file_state.rb +42 -0
  233. data/lib/docspring/models/html_engine_options.rb +416 -0
  234. data/lib/docspring/models/html_engine_options_input.rb +280 -0
  235. data/lib/docspring/models/image_gravity.rb +48 -0
  236. data/lib/docspring/models/image_scale_type.rb +42 -0
  237. data/lib/docspring/models/model_code_language.rb +48 -0
  238. data/lib/docspring/models/{move_folder_data.rb → move_folder_request.rb} +31 -87
  239. data/lib/docspring/models/move_template_request.rb +171 -0
  240. data/lib/docspring/models/number_condition_type.rb +45 -0
  241. data/lib/docspring/models/output_format.rb +41 -0
  242. data/lib/docspring/models/page_format.rb +52 -0
  243. data/lib/docspring/models/page_image.rb +359 -0
  244. data/lib/docspring/models/page_images.rb +248 -0
  245. data/lib/docspring/models/predefined_field.rb +287 -0
  246. data/lib/docspring/models/predefined_field_input.rb +287 -0
  247. data/lib/docspring/models/{publish_version_data.rb → publish_template_version_request.rb} +64 -99
  248. data/lib/docspring/models/remove_template_fields_request.rb +187 -0
  249. data/lib/docspring/models/{rename_folder_data.rb → rename_folder_request.rb} +29 -87
  250. data/lib/docspring/models/reorder_template_fields_request.rb +187 -0
  251. data/lib/docspring/models/{restore_version_data.rb → restore_template_version_request.rb} +29 -87
  252. data/lib/docspring/models/shape_type.rb +45 -0
  253. data/lib/docspring/models/{submission_data_request_show.rb → signature_request.rb} +240 -171
  254. data/lib/docspring/models/signature_request_auth_second_factor_type.rb +45 -0
  255. data/lib/docspring/models/signature_request_auth_type.rb +46 -0
  256. data/lib/docspring/models/{submission_data_request_event.rb → signature_request_event.rb} +137 -122
  257. data/lib/docspring/models/signature_request_event_type.rb +45 -0
  258. data/lib/docspring/models/{update_submission_data_request_data.rb → signature_request_input.rb} +156 -173
  259. data/lib/docspring/models/signature_request_message_type.rb +48 -0
  260. data/lib/docspring/models/signature_request_state.rb +42 -0
  261. data/lib/docspring/models/signature_request_token.rb +369 -0
  262. data/lib/docspring/models/signature_request_token_type.rb +41 -0
  263. data/lib/docspring/models/string_condition_type.rb +44 -0
  264. data/lib/docspring/models/submission.rb +399 -335
  265. data/lib/docspring/models/submission_action.rb +64 -136
  266. data/lib/docspring/models/submission_action_state.rb +43 -0
  267. data/lib/docspring/models/submission_action_type.rb +46 -0
  268. data/lib/docspring/models/submission_batch.rb +157 -112
  269. data/lib/docspring/models/submission_batch_state.rb +42 -0
  270. data/lib/docspring/models/submission_files.rb +197 -0
  271. data/lib/docspring/models/submission_input.rb +296 -0
  272. data/lib/docspring/models/submission_list.rb +200 -0
  273. data/lib/docspring/models/submission_source.rb +43 -0
  274. data/lib/docspring/models/submission_source_pdf.rb +212 -0
  275. data/lib/docspring/models/submission_state.rb +52 -0
  276. data/lib/docspring/models/submission_validation.rb +234 -0
  277. data/lib/docspring/models/template.rb +528 -736
  278. data/lib/docspring/models/template_actor.rb +259 -0
  279. data/lib/docspring/models/template_actor_type.rb +42 -0
  280. data/lib/docspring/models/template_defaults.rb +395 -0
  281. data/lib/docspring/models/template_defaults_input.rb +395 -0
  282. data/lib/docspring/models/template_diff.rb +321 -0
  283. data/lib/docspring/models/template_diff_summary.rb +320 -0
  284. data/lib/docspring/models/template_document.rb +396 -0
  285. data/lib/docspring/models/template_document_state.rb +46 -0
  286. data/lib/docspring/models/template_field_change.rb +266 -0
  287. data/lib/docspring/models/template_field_changes.rb +274 -0
  288. data/lib/docspring/models/{success_error_response.rb → template_field_dependency.rb} +122 -114
  289. data/lib/docspring/models/template_field_dependency_action.rb +42 -0
  290. data/lib/docspring/models/{create_pdf_template.rb → template_field_dependency_condition.rb} +116 -103
  291. data/lib/docspring/models/template_field_dependency_condition_input.rb +67 -0
  292. data/lib/docspring/models/template_field_dependency_input.rb +285 -0
  293. data/lib/docspring/models/template_field_dependency_match.rb +41 -0
  294. data/lib/docspring/models/template_field_dependency_operator.rb +49 -0
  295. data/lib/docspring/models/template_field_logic_status.rb +44 -0
  296. data/lib/docspring/models/{update_webhook_data.rb → template_field_move.rb} +99 -103
  297. data/lib/docspring/models/{add_fields_data.rb → template_fields.rb} +71 -89
  298. data/lib/docspring/models/template_form_mode.rb +42 -0
  299. data/lib/docspring/models/{template_model_code_response.rb → template_model_code.rb} +37 -96
  300. data/lib/docspring/models/template_page_ai_error.rb +43 -0
  301. data/lib/docspring/models/template_page_ai_naming_status.rb +41 -0
  302. data/lib/docspring/models/template_page_fields_status.rb +44 -0
  303. data/lib/docspring/models/template_page_image_status.rb +41 -0
  304. data/lib/docspring/models/template_page_images.rb +254 -0
  305. data/lib/docspring/models/template_page_processing_status.rb +275 -0
  306. data/lib/docspring/models/{update_pdf_template.rb → template_source_pdf.rb} +92 -103
  307. data/lib/docspring/models/{template_preview.rb → template_summary.rb} +436 -589
  308. data/lib/docspring/models/template_summary_list.rb +200 -0
  309. data/lib/docspring/models/template_type.rb +41 -0
  310. data/lib/docspring/models/template_version.rb +238 -0
  311. data/lib/docspring/models/template_version_type.rb +42 -0
  312. data/lib/docspring/models/text_alignment.rb +43 -0
  313. data/lib/docspring/models/text_overflow.rb +41 -0
  314. data/lib/docspring/models/text_vertical_alignment.rb +42 -0
  315. data/lib/docspring/models/typeface.rb +56 -0
  316. data/lib/docspring/models/{create_submission_data_request_data.rb → update_signature_request_request.rb} +72 -196
  317. data/lib/docspring/models/update_template_document_request.rb +208 -0
  318. data/lib/docspring/models/update_template_fields_request.rb +187 -0
  319. data/lib/docspring/models/update_template_request.rb +551 -0
  320. data/lib/docspring/models/update_webhook_request.rb +344 -0
  321. data/lib/docspring/models/upload_method.rb +40 -0
  322. data/lib/docspring/models/{upload_presign_response.rb → upload_presign.rb} +93 -140
  323. data/lib/docspring/models/url_source_pdf.rb +212 -0
  324. data/lib/docspring/models/validate_submission_request.rb +288 -0
  325. data/lib/docspring/models/webhook.rb +97 -107
  326. data/lib/docspring/models/webhook_event_type.rb +64 -0
  327. data/lib/docspring/models/webhook_list.rb +200 -0
  328. data/lib/docspring/models/webhook_mode.rb +41 -0
  329. data/lib/docspring/request_schemas.json +4967 -0
  330. data/lib/docspring/request_validator.rb +396 -0
  331. data/lib/docspring/version.rb +4 -4
  332. data/lib/docspring.rb +153 -53
  333. data/spec/api/client_spec.rb +411 -265
  334. data/spec/models/add_template_fields_request_spec.rb +36 -0
  335. data/spec/models/ai_field_naming_language_spec.rb +30 -0
  336. data/spec/models/authentication_check_spec.rb +36 -0
  337. data/spec/models/barcode_symbology_spec.rb +30 -0
  338. data/spec/models/check_character_spec.rb +30 -0
  339. data/spec/models/combined_field_type_spec.rb +30 -0
  340. data/spec/models/combined_pdf_files_spec.rb +36 -0
  341. data/spec/models/combined_pdf_list_spec.rb +42 -0
  342. data/spec/models/combined_pdf_source_input_spec.rb +44 -0
  343. data/spec/models/combined_pdf_source_pdf_spec.rb +42 -0
  344. data/spec/models/{submission_data_request_token_spec.rb → combined_pdf_source_spec.rb} +18 -12
  345. data/spec/models/combined_pdf_source_type_spec.rb +30 -0
  346. data/spec/models/{combined_submission_spec.rb → combined_pdf_spec.rb} +20 -24
  347. data/spec/models/combined_pdf_state_spec.rb +30 -0
  348. data/spec/models/{copy_template_options_spec.rb → copy_template_request_spec.rb} +9 -9
  349. data/spec/models/{combine_pdfs_data_spec.rb → create_combined_pdf_request_spec.rb} +12 -18
  350. data/spec/models/{create_custom_file_data_spec.rb → create_custom_file_from_upload_request_spec.rb} +9 -9
  351. data/spec/models/{move_template_data_spec.rb → create_folder_request_spec.rb} +11 -11
  352. data/spec/models/{list_submissions_response_spec.rb → create_signature_request_event_request_spec.rb} +18 -12
  353. data/spec/models/create_signature_request_token_request_spec.rb +36 -0
  354. data/spec/models/{submission_batch_data_spec.rb → create_submission_batch_request_spec.rb} +19 -13
  355. data/spec/models/{create_pdf_submission_data_spec.rb → create_submission_request_spec.rb} +29 -17
  356. data/spec/models/{template_preview_spec.rb → create_template_request_spec.rb} +49 -103
  357. data/spec/models/create_webhook_request_spec.rb +96 -0
  358. data/spec/models/custom_file_list_spec.rb +42 -0
  359. data/spec/models/custom_file_source_pdf_spec.rb +42 -0
  360. data/spec/models/custom_file_spec.rb +29 -5
  361. data/spec/models/error_code_spec.rb +30 -0
  362. data/spec/models/{create_submission_response_spec.rb → error_detail_spec.rb} +14 -18
  363. data/spec/models/{batch_generate_pdfs201_response_spec.rb → error_info_spec.rb} +27 -19
  364. data/spec/models/error_response_spec.rb +4 -14
  365. data/spec/models/expiration_interval_spec.rb +30 -0
  366. data/spec/models/field_comparison_condition_spec.rb +48 -0
  367. data/spec/models/field_comparison_operator_spec.rb +30 -0
  368. data/spec/models/field_dependency_input_spec.rb +48 -0
  369. data/spec/models/field_dependency_spec.rb +48 -0
  370. data/spec/models/field_display_type_spec.rb +30 -0
  371. data/spec/models/field_equals_condition_spec.rb +48 -0
  372. data/spec/models/field_equals_operator_spec.rb +30 -0
  373. data/spec/models/field_group_input_spec.rb +72 -0
  374. data/spec/models/field_group_spec.rb +78 -0
  375. data/spec/models/field_group_type_spec.rb +30 -0
  376. data/spec/models/field_in_condition_spec.rb +48 -0
  377. data/spec/models/field_input_spec.rb +570 -0
  378. data/spec/models/field_override_spec.rb +408 -0
  379. data/spec/models/field_presence_condition_spec.rb +42 -0
  380. data/spec/models/field_presence_operator_spec.rb +30 -0
  381. data/spec/models/field_range_condition_spec.rb +54 -0
  382. data/spec/models/field_reimport_state_spec.rb +30 -0
  383. data/spec/models/field_setup_logic_spec.rb +30 -0
  384. data/spec/models/field_setup_naming_spec.rb +30 -0
  385. data/spec/models/field_setup_source_spec.rb +30 -0
  386. data/spec/models/field_spec.rb +576 -0
  387. data/spec/models/field_type_spec.rb +30 -0
  388. data/spec/models/folder_list_spec.rb +42 -0
  389. data/spec/models/folder_spec.rb +16 -4
  390. data/spec/models/generate_files_format_spec.rb +30 -0
  391. data/spec/models/generate_submission_files_request_spec.rb +36 -0
  392. data/spec/models/generated_file_spec.rb +78 -0
  393. data/spec/models/generated_file_state_spec.rb +30 -0
  394. data/spec/models/html_engine_options_input_spec.rb +90 -0
  395. data/spec/models/html_engine_options_spec.rb +90 -0
  396. data/spec/models/image_gravity_spec.rb +30 -0
  397. data/spec/models/image_scale_type_spec.rb +30 -0
  398. data/spec/models/model_code_language_spec.rb +30 -0
  399. data/spec/models/move_folder_request_spec.rb +36 -0
  400. data/spec/models/move_template_request_spec.rb +36 -0
  401. data/spec/models/number_condition_type_spec.rb +30 -0
  402. data/spec/models/output_format_spec.rb +30 -0
  403. data/spec/models/page_format_spec.rb +30 -0
  404. data/spec/models/page_image_spec.rb +84 -0
  405. data/spec/models/page_images_spec.rb +54 -0
  406. data/spec/models/predefined_field_input_spec.rb +72 -0
  407. data/spec/models/predefined_field_spec.rb +72 -0
  408. data/spec/models/{publish_version_data_spec.rb → publish_template_version_request_spec.rb} +11 -11
  409. data/spec/models/remove_template_fields_request_spec.rb +36 -0
  410. data/spec/models/{rename_folder_data_spec.rb → rename_folder_request_spec.rb} +9 -9
  411. data/spec/models/reorder_template_fields_request_spec.rb +36 -0
  412. data/spec/models/restore_template_version_request_spec.rb +36 -0
  413. data/spec/models/shape_type_spec.rb +30 -0
  414. data/spec/models/signature_request_auth_second_factor_type_spec.rb +30 -0
  415. data/spec/models/signature_request_auth_type_spec.rb +30 -0
  416. data/spec/models/{submission_data_request_event_spec.rb → signature_request_event_spec.rb} +16 -18
  417. data/spec/models/signature_request_event_type_spec.rb +30 -0
  418. data/spec/models/{create_submission_data_request_data_spec.rb → signature_request_input_spec.rb} +28 -30
  419. data/spec/models/signature_request_message_type_spec.rb +30 -0
  420. data/spec/models/{submission_data_request_show_spec.rb → signature_request_spec.rb} +31 -31
  421. data/spec/models/signature_request_state_spec.rb +30 -0
  422. data/spec/models/signature_request_token_spec.rb +72 -0
  423. data/spec/models/signature_request_token_type_spec.rb +30 -0
  424. data/spec/models/string_condition_type_spec.rb +30 -0
  425. data/spec/models/submission_action_spec.rb +4 -22
  426. data/spec/models/submission_action_state_spec.rb +30 -0
  427. data/spec/models/submission_action_type_spec.rb +30 -0
  428. data/spec/models/submission_batch_spec.rb +27 -13
  429. data/spec/models/submission_batch_state_spec.rb +30 -0
  430. data/spec/models/submission_files_spec.rb +54 -0
  431. data/spec/models/{json_schema_spec.rb → submission_input_spec.rb} +21 -21
  432. data/spec/models/submission_list_spec.rb +42 -0
  433. data/spec/models/submission_source_pdf_spec.rb +42 -0
  434. data/spec/models/submission_source_spec.rb +30 -0
  435. data/spec/models/submission_spec.rb +27 -51
  436. data/spec/models/submission_state_spec.rb +30 -0
  437. data/spec/models/submission_validation_spec.rb +54 -0
  438. data/spec/models/template_actor_spec.rb +60 -0
  439. data/spec/models/template_actor_type_spec.rb +30 -0
  440. data/spec/models/{submission_data_request_spec.rb → template_defaults_input_spec.rb} +29 -53
  441. data/spec/models/{submission_preview_spec.rb → template_defaults_spec.rb} +29 -61
  442. data/spec/models/template_diff_spec.rb +72 -0
  443. data/spec/models/template_diff_summary_spec.rb +66 -0
  444. data/spec/models/template_document_spec.rb +102 -0
  445. data/spec/models/template_document_state_spec.rb +30 -0
  446. data/spec/models/template_field_change_spec.rb +54 -0
  447. data/spec/models/template_field_changes_spec.rb +54 -0
  448. data/spec/models/template_field_dependency_action_spec.rb +30 -0
  449. data/spec/models/template_field_dependency_condition_input_spec.rb +44 -0
  450. data/spec/models/template_field_dependency_condition_spec.rb +54 -0
  451. data/spec/models/template_field_dependency_input_spec.rb +60 -0
  452. data/spec/models/template_field_dependency_match_spec.rb +30 -0
  453. data/spec/models/template_field_dependency_operator_spec.rb +30 -0
  454. data/spec/models/template_field_dependency_spec.rb +60 -0
  455. data/spec/models/template_field_logic_status_spec.rb +30 -0
  456. data/spec/models/template_field_move_spec.rb +48 -0
  457. data/spec/models/template_fields_spec.rb +48 -0
  458. data/spec/models/template_form_mode_spec.rb +30 -0
  459. data/spec/models/{template_model_code_response_spec.rb → template_model_code_spec.rb} +9 -13
  460. data/spec/models/template_page_ai_error_spec.rb +30 -0
  461. data/spec/models/template_page_ai_naming_status_spec.rb +30 -0
  462. data/spec/models/template_page_fields_status_spec.rb +30 -0
  463. data/spec/models/template_page_image_status_spec.rb +30 -0
  464. data/spec/models/template_page_images_spec.rb +54 -0
  465. data/spec/models/template_page_processing_status_spec.rb +60 -0
  466. data/spec/models/template_source_pdf_spec.rb +54 -0
  467. data/spec/models/template_spec.rb +44 -140
  468. data/spec/models/template_summary_list_spec.rb +42 -0
  469. data/spec/models/template_summary_spec.rb +252 -0
  470. data/spec/models/template_type_spec.rb +30 -0
  471. data/spec/models/template_version_spec.rb +54 -0
  472. data/spec/models/template_version_type_spec.rb +30 -0
  473. data/spec/models/text_alignment_spec.rb +30 -0
  474. data/spec/models/text_overflow_spec.rb +30 -0
  475. data/spec/models/text_vertical_alignment_spec.rb +30 -0
  476. data/spec/models/typeface_spec.rb +30 -0
  477. data/spec/models/{submission_batch_with_submissions_spec.rb → update_signature_request_request_spec.rb} +18 -22
  478. data/spec/models/update_template_document_request_spec.rb +60 -0
  479. data/spec/models/update_template_fields_request_spec.rb +36 -0
  480. data/spec/models/update_template_request_spec.rb +240 -0
  481. data/spec/models/update_webhook_request_spec.rb +96 -0
  482. data/spec/models/upload_method_spec.rb +30 -0
  483. data/spec/models/{upload_presign_response_spec.rb → upload_presign_spec.rb} +13 -17
  484. data/spec/models/url_source_pdf_spec.rb +42 -0
  485. data/spec/models/validate_submission_request_spec.rb +96 -0
  486. data/spec/models/webhook_event_type_spec.rb +30 -0
  487. data/spec/models/webhook_list_spec.rb +42 -0
  488. data/spec/models/webhook_mode_spec.rb +30 -0
  489. data/spec/models/webhook_spec.rb +4 -8
  490. data/spec/spec_helper.rb +3 -3
  491. metadata +597 -202
  492. data/docs/AddFieldsData.md +0 -18
  493. data/docs/BatchGeneratePdfs201Response.md +0 -28
  494. data/docs/CombinePdfsData.md +0 -28
  495. data/docs/CombinedSubmission.md +0 -44
  496. data/docs/CombinedSubmissionAction.md +0 -30
  497. data/docs/CopyTemplateOptions.md +0 -22
  498. data/docs/CreateCombinedSubmissionResponse.md +0 -26
  499. data/docs/CreateCustomFileData.md +0 -18
  500. data/docs/CreateCustomFileResponse.md +0 -24
  501. data/docs/CreateHtmlTemplate.md +0 -18
  502. data/docs/CreatePdfSubmissionData.md +0 -34
  503. data/docs/CreatePdfTemplate.md +0 -18
  504. data/docs/CreateSubmissionDataRequestData.md +0 -44
  505. data/docs/CreateSubmissionDataRequestEventRequest.md +0 -24
  506. data/docs/CreateSubmissionDataRequestEventResponse.md +0 -24
  507. data/docs/CreateSubmissionDataRequestResponse.md +0 -24
  508. data/docs/CreateSubmissionDataRequestTokenResponse.md +0 -24
  509. data/docs/CreateSubmissionResponse.md +0 -26
  510. data/docs/ErrorOrMultipleErrorsResponse.md +0 -22
  511. data/docs/ForbiddenErrorResponse.md +0 -22
  512. data/docs/JsonSchema.md +0 -40
  513. data/docs/ListSubmissionsResponse.md +0 -22
  514. data/docs/MoveFolderData.md +0 -18
  515. data/docs/MoveTemplateData.md +0 -20
  516. data/docs/MultipleErrorsResponse.md +0 -20
  517. data/docs/PublishVersionData.md +0 -20
  518. data/docs/RestoreVersionData.md +0 -18
  519. data/docs/Submission422Response.md +0 -24
  520. data/docs/SubmissionBatchData.md +0 -26
  521. data/docs/SubmissionBatchWithSubmissions.md +0 -34
  522. data/docs/SubmissionDataRequest.md +0 -60
  523. data/docs/SubmissionDataRequestEvent.md +0 -30
  524. data/docs/SubmissionDataRequestShow.md +0 -62
  525. data/docs/SubmissionDataRequestToken.md +0 -24
  526. data/docs/SubmissionPreview.md +0 -64
  527. data/docs/SuccessErrorResponse.md +0 -20
  528. data/docs/SuccessMultipleErrorsResponse.md +0 -20
  529. data/docs/TemplateAddFieldsResponse.md +0 -22
  530. data/docs/TemplateDeleteResponse.md +0 -24
  531. data/docs/TemplateModelCodeResponse.md +0 -22
  532. data/docs/TemplatePreview.md +0 -116
  533. data/docs/TemplatePublishVersionResponse.md +0 -22
  534. data/docs/UpdateHtmlTemplate.md +0 -18
  535. data/docs/UpdatePdfTemplate.md +0 -18
  536. data/docs/UpdateSubmissionDataRequestData.md +0 -42
  537. data/docs/UploadPresignResponse.md +0 -24
  538. data/lib/docspring/models/batch_generate_pdfs201_response.rb +0 -352
  539. data/lib/docspring/models/combined_submission_action.rb +0 -384
  540. data/lib/docspring/models/create_combined_submission_response.rb +0 -324
  541. data/lib/docspring/models/create_custom_file_response.rb +0 -314
  542. data/lib/docspring/models/create_html_template.rb +0 -243
  543. data/lib/docspring/models/create_submission_data_request_event_response.rb +0 -314
  544. data/lib/docspring/models/create_submission_data_request_response.rb +0 -314
  545. data/lib/docspring/models/create_submission_data_request_token_response.rb +0 -314
  546. data/lib/docspring/models/create_submission_response.rb +0 -324
  547. data/lib/docspring/models/error_or_multiple_errors_response.rb +0 -290
  548. data/lib/docspring/models/forbidden_error_response.rb +0 -323
  549. data/lib/docspring/models/json_schema.rb +0 -329
  550. data/lib/docspring/models/list_submissions_response.rb +0 -283
  551. data/lib/docspring/models/multiple_errors_response.rb +0 -296
  552. data/lib/docspring/models/submission422_response.rb +0 -299
  553. data/lib/docspring/models/submission_batch_with_submissions.rb +0 -433
  554. data/lib/docspring/models/submission_data_request.rb +0 -570
  555. data/lib/docspring/models/submission_data_request_token.rb +0 -279
  556. data/lib/docspring/models/submission_preview.rb +0 -637
  557. data/lib/docspring/models/success_multiple_errors_response.rb +0 -279
  558. data/lib/docspring/models/template_add_fields_response.rb +0 -290
  559. data/lib/docspring/models/template_delete_response.rb +0 -300
  560. data/lib/docspring/models/template_publish_version_response.rb +0 -305
  561. data/lib/docspring/models/update_html_template.rb +0 -243
  562. data/spec/models/add_fields_data_spec.rb +0 -36
  563. data/spec/models/combined_submission_action_spec.rb +0 -84
  564. data/spec/models/create_combined_submission_response_spec.rb +0 -64
  565. data/spec/models/create_custom_file_response_spec.rb +0 -58
  566. data/spec/models/create_folder_data_spec.rb +0 -36
  567. data/spec/models/create_html_template_spec.rb +0 -36
  568. data/spec/models/create_pdf_template_spec.rb +0 -36
  569. data/spec/models/create_submission_data_request_event_request_spec.rb +0 -62
  570. data/spec/models/create_submission_data_request_event_response_spec.rb +0 -58
  571. data/spec/models/create_submission_data_request_response_spec.rb +0 -58
  572. data/spec/models/create_submission_data_request_token_response_spec.rb +0 -58
  573. data/spec/models/create_webhook_data_spec.rb +0 -36
  574. data/spec/models/error_or_multiple_errors_response_spec.rb +0 -52
  575. data/spec/models/forbidden_error_response_spec.rb +0 -56
  576. data/spec/models/move_folder_data_spec.rb +0 -36
  577. data/spec/models/multiple_errors_response_spec.rb +0 -46
  578. data/spec/models/restore_version_data_spec.rb +0 -36
  579. data/spec/models/submission422_response_spec.rb +0 -58
  580. data/spec/models/success_error_response_spec.rb +0 -46
  581. data/spec/models/success_multiple_errors_response_spec.rb +0 -46
  582. data/spec/models/template_add_fields_response_spec.rb +0 -52
  583. data/spec/models/template_delete_response_spec.rb +0 -58
  584. data/spec/models/template_publish_version_response_spec.rb +0 -52
  585. data/spec/models/update_html_template_spec.rb +0 -36
  586. data/spec/models/update_pdf_template_spec.rb +0 -36
  587. data/spec/models/update_submission_data_request_data_spec.rb +0 -116
  588. 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,131 @@ 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
35
+ # unit tests for add_template_fields
36
+ # Add fields to a template
37
+ # Adds fields to a template's draft and returns all of its fields. Publish a version for submissions of published versions to have them.
38
+ # @param template_id The template's ID.
39
+ # @param body The fields to add to the template's draft.
40
40
  # @param [Hash] opts the optional parameters
41
- # @return [TemplateAddFieldsResponse]
42
- describe 'add_fields_to_template test' do
41
+ # @return [TemplateFields]
42
+ describe 'add_template_fields test' do
43
43
  it 'should work' do
44
44
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
45
45
  end
46
46
  end
47
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
48
+ # unit tests for copy_template
49
+ # Copy a template
50
+ # Copies a template (its draft, or a published version) into a new template.
51
+ # @param template_id The template's ID.
65
52
  # @param [Hash] opts the optional parameters
66
- # @return [CreateCombinedSubmissionResponse]
67
- describe 'combine_pdfs test' do
53
+ # @option opts [CopyTemplateRequest] :body Settings for the copy.
54
+ # @return [Template]
55
+ describe 'copy_template test' do
68
56
  it 'should work' do
69
57
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
70
58
  end
71
59
  end
72
60
 
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
61
+ # unit tests for create_combined_pdf
62
+ # Combine PDFs
63
+ # 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.
64
+ # @param body The PDFs to merge, and the combined PDF's settings.
77
65
  # @param [Hash] opts the optional parameters
78
- # @option opts [CopyTemplateOptions] :options
79
- # @return [TemplatePreview]
80
- describe 'copy_template test' do
66
+ # @option opts [Boolean] :wait Wait until the PDF has been generated before responding. Default true on sync.api hosts.
67
+ # @return [CombinedPdf]
68
+ describe 'create_combined_pdf test' do
81
69
  it 'should work' do
82
70
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
83
71
  end
84
72
  end
85
73
 
86
74
  # 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
75
+ # Create a custom file from an upload
76
+ # 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`.
77
+ # @param body The uploaded file to create the custom file from.
90
78
  # @param [Hash] opts the optional parameters
91
- # @return [CreateCustomFileResponse]
79
+ # @return [CustomFile]
92
80
  describe 'create_custom_file_from_upload test' do
93
81
  it 'should work' do
94
82
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
95
83
  end
96
84
  end
97
85
 
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
86
+ # unit tests for create_folder
87
+ # Create a folder
88
+ # Creates a folder for organizing templates. Pass `parent_folder_id` to create it inside another folder. Folder names are unique within their parent folder.
89
+ # @param body The folder to create.
103
90
  # @param [Hash] opts the optional parameters
104
- # @return [CreateSubmissionDataRequestEventResponse]
105
- describe 'create_data_request_event test' do
91
+ # @return [Folder]
92
+ describe 'create_folder test' do
106
93
  it 'should work' do
107
94
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
108
95
  end
109
96
  end
110
97
 
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
98
+ # unit tests for create_signature_request_event
99
+ # Record a signature request event
100
+ # 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.
101
+ # @param signature_request_id The signature request's ID.
102
+ # @param body The event to record.
115
103
  # @param [Hash] opts the optional parameters
116
- # @option opts [String] :type
117
- # @return [CreateSubmissionDataRequestTokenResponse]
118
- describe 'create_data_request_token test' do
104
+ # @return [SignatureRequestEvent]
105
+ describe 'create_signature_request_event test' do
119
106
  it 'should work' do
120
107
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
121
108
  end
122
109
  end
123
110
 
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
111
+ # unit tests for create_signature_request_token
112
+ # Create a signature request token
113
+ # 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.
114
+ # @param signature_request_id The signature request's ID.
128
115
  # @param [Hash] opts the optional parameters
129
- # @return [Folder]
130
- describe 'create_folder test' do
116
+ # @option opts [CreateSignatureRequestTokenRequest] :body The kind of link to make. Send no body for an `api` token.
117
+ # @return [SignatureRequestToken]
118
+ describe 'create_signature_request_token test' do
131
119
  it 'should work' do
132
120
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
133
121
  end
134
122
  end
135
123
 
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
124
+ # unit tests for create_submission
125
+ # Generate a PDF
126
+ # 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.
127
+ # @param template_id The template's ID.
128
+ # @param body The submission's data and settings.
140
129
  # @param [Hash] opts the optional parameters
141
- # @return [TemplatePreview]
142
- describe 'create_html_template test' do
130
+ # @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).
131
+ # @option opts [Boolean] :wait Wait until the files have been generated before responding. Default true on sync.api hosts.
132
+ # @return [Submission]
133
+ describe 'create_submission test' do
143
134
  it 'should work' do
144
135
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
145
136
  end
146
137
  end
147
138
 
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
139
+ # unit tests for create_submission_batch
140
+ # Generate PDFs in a batch
141
+ # 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.
142
+ # @param body The submissions to create, and the settings they share.
153
143
  # @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
144
+ # @option opts [Boolean] :wait Wait until every PDF in the batch has been generated before responding. Default true on sync.api hosts.
145
+ # @return [SubmissionBatch]
146
+ describe 'create_submission_batch test' do
159
147
  it 'should work' do
160
148
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
161
149
  end
162
150
  end
163
151
 
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
152
+ # unit tests for create_template
153
+ # Create a template
154
+ # 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`.
155
+ # @param body The template to create.
168
156
  # @param [Hash] opts the optional parameters
169
- # @return [TemplatePreview]
170
- describe 'create_pdf_template_from_upload test' do
157
+ # @option opts [Boolean] :wait Wait until the PDF has been processed, and a `document_url` downloaded, before responding. Default true on sync.api hosts.
158
+ # @return [Template]
159
+ describe 'create_template test' do
171
160
  it 'should work' do
172
161
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
173
162
  end
@@ -175,8 +164,8 @@ describe 'Client' do
175
164
 
176
165
  # unit tests for create_webhook
177
166
  # 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
167
+ # 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.
168
+ # @param body The webhook to create.
180
169
  # @param [Hash] opts the optional parameters
181
170
  # @return [Webhook]
182
171
  describe 'create_webhook test' do
@@ -185,10 +174,22 @@ describe 'Client' do
185
174
  end
186
175
  end
187
176
 
177
+ # unit tests for delete_custom_file
178
+ # Delete a custom file
179
+ # Deletes a custom file and returns it. Use a live API token: test tokens can't delete custom files.
180
+ # @param custom_file_id The custom file's ID.
181
+ # @param [Hash] opts the optional parameters
182
+ # @return [CustomFile]
183
+ describe 'delete_custom_file test' do
184
+ it 'should work' do
185
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
186
+ end
187
+ end
188
+
188
189
  # unit tests for delete_folder
189
190
  # 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
191
+ # Deletes an empty folder and returns it. A folder that still has templates or folders in it can't be deleted.
192
+ # @param folder_id The folder's ID.
192
193
  # @param [Hash] opts the optional parameters
193
194
  # @return [Folder]
194
195
  describe 'delete_folder test' do
@@ -199,11 +200,11 @@ describe 'Client' do
199
200
 
200
201
  # unit tests for delete_template
201
202
  # 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
203
+ # 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.
204
+ # @param template_id The template's ID.
204
205
  # @param [Hash] opts the optional parameters
205
- # @option opts [String] :version
206
- # @return [TemplateDeleteResponse]
206
+ # @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.
207
+ # @return [Template]
207
208
  describe 'delete_template test' do
208
209
  it 'should work' do
209
210
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
@@ -212,8 +213,8 @@ describe 'Client' do
212
213
 
213
214
  # unit tests for delete_webhook
214
215
  # Delete a webhook
215
- # Permanently deletes a webhook so it stops receiving events, and returns the deleted webhook.
216
- # @param webhook_id
216
+ # Deletes a webhook so it stops receiving events, and returns it.
217
+ # @param webhook_id The webhook's ID.
217
218
  # @param [Hash] opts the optional parameters
218
219
  # @return [Webhook]
219
220
  describe 'delete_webhook test' do
@@ -222,109 +223,120 @@ describe 'Client' do
222
223
  end
223
224
  end
224
225
 
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
226
+ # unit tests for expire_combined_pdf
227
+ # Expire a combined PDF
228
+ # Deletes a combined PDF's PDF and returns the expired combined PDF.
229
+ # @param combined_pdf_id The combined PDF's ID.
229
230
  # @param [Hash] opts the optional parameters
230
- # @return [CombinedSubmission]
231
- describe 'expire_combined_submission test' do
231
+ # @return [CombinedPdf]
232
+ describe 'expire_combined_pdf test' do
232
233
  it 'should work' do
233
234
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
234
235
  end
235
236
  end
236
237
 
237
238
  # 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
239
+ # Expire a submission
240
+ # Deletes a submission's data and PDF now, and returns the expired submission.
241
+ # @param submission_id The submission's ID.
241
242
  # @param [Hash] opts the optional parameters
242
- # @return [SubmissionPreview]
243
+ # @return [Submission]
243
244
  describe 'expire_submission test' do
244
245
  it 'should work' do
245
246
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
246
247
  end
247
248
  end
248
249
 
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
250
+ # unit tests for generate_submission_files
251
+ # Generate more files
252
+ # Adds formats to a processed submission's files, in the background: `png`, a PNG image of each page of the PDF (up to 100 pages). To make them with the submission, add them to `output_formats` when you create it. Each new file is listed in `files` while it's made: on sync.api hosts the request waits for them (unless you pass `wait=false`), otherwise poll GET /submissions/{submission_id} until none of their `state` is `pending`. A file that couldn't be made has the state `error` and an `error_message`, and the submission stays processed. Asking for a format the submission already has (or is making) changes nothing.
253
+ # @param submission_id The submission's ID.
254
+ # @param body The formats to make.
254
255
  # @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
256
+ # @option opts [Boolean] :wait Wait until the files have been generated before responding. Default true on sync.api hosts.
257
+ # @return [Submission]
258
+ describe 'generate_submission_files test' do
258
259
  it 'should work' do
259
260
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
260
261
  end
261
262
  end
262
263
 
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
264
+ # unit tests for generate_submission_preview
265
+ # Generate a preview PDF
266
+ # 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.
267
+ # @param submission_id The submission's ID.
267
268
  # @param [Hash] opts the optional parameters
268
- # @return [SuccessErrorResponse]
269
- describe 'generate_preview test' do
269
+ # @return [Submission]
270
+ describe 'generate_submission_preview test' do
270
271
  it 'should work' do
271
272
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
272
273
  end
273
274
  end
274
275
 
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
276
+ # unit tests for get_combined_pdf
277
+ # Get a combined PDF
278
+ # Returns a combined PDF, with a temporary link to download it once it has been generated.
279
+ # @param combined_pdf_id The combined PDF's ID.
279
280
  # @param [Hash] opts the optional parameters
280
- # @return [CombinedSubmission]
281
- describe 'get_combined_submission test' do
281
+ # @return [CombinedPdf]
282
+ describe 'get_combined_pdf test' do
282
283
  it 'should work' do
283
284
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
284
285
  end
285
286
  end
286
287
 
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
288
+ # unit tests for get_custom_file
289
+ # Get a custom file
290
+ # Returns a custom file, with a temporary URL to download it.
291
+ # @param custom_file_id The custom file's ID.
291
292
  # @param [Hash] opts the optional parameters
292
- # @return [SubmissionDataRequestShow]
293
- describe 'get_data_request test' do
293
+ # @return [CustomFile]
294
+ describe 'get_custom_file test' do
294
295
  it 'should work' do
295
296
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
296
297
  end
297
298
  end
298
299
 
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
300
+ # unit tests for get_folder
301
+ # Get a folder
302
+ # Returns a folder.
303
+ # @param folder_id The folder's ID.
303
304
  # @param [Hash] opts the optional parameters
304
- # @return [Template]
305
- describe 'get_full_template test' do
305
+ # @return [Folder]
306
+ describe 'get_folder test' do
306
307
  it 'should work' do
307
308
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
308
309
  end
309
310
  end
310
311
 
311
312
  # 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)
313
+ # Get a presigned URL to upload a file
314
+ # 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.
314
315
  # @param [Hash] opts the optional parameters
315
- # @return [UploadPresignResponse]
316
+ # @return [UploadPresign]
316
317
  describe 'get_presign_url test' do
317
318
  it 'should work' do
318
319
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
319
320
  end
320
321
  end
321
322
 
323
+ # unit tests for get_signature_request
324
+ # Get a signature request
325
+ # Returns a signature request, with the values the person has entered so far.
326
+ # @param signature_request_id The signature request's ID.
327
+ # @param [Hash] opts the optional parameters
328
+ # @return [SignatureRequest]
329
+ describe 'get_signature_request test' do
330
+ it 'should work' do
331
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
332
+ end
333
+ end
334
+
322
335
  # 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
336
+ # Get a submission
337
+ # Returns a submission, with its data and links to download its PDF.
338
+ # @param submission_id The submission's ID.
326
339
  # @param [Hash] opts the optional parameters
327
- # @option opts [Boolean] :include_data
328
340
  # @return [Submission]
329
341
  describe 'get_submission test' do
330
342
  it 'should work' do
@@ -333,12 +345,12 @@ describe 'Client' do
333
345
  end
334
346
 
335
347
  # 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
348
+ # Get a batch
349
+ # 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.
350
+ # @param submission_batch_id The batch's ID.
339
351
  # @param [Hash] opts the optional parameters
340
- # @option opts [Boolean] :include_submissions
341
- # @return [SubmissionBatchWithSubmissions]
352
+ # @option opts [Boolean] :include_data Include each submission's `data` (null without it).
353
+ # @return [SubmissionBatch]
342
354
  describe 'get_submission_batch test' do
343
355
  it 'should work' do
344
356
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
@@ -346,36 +358,65 @@ describe 'Client' do
346
358
  end
347
359
 
348
360
  # 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
361
+ # Get a template
362
+ # Returns a template: its draft, or one of its published versions.
363
+ # @param template_id The template's ID.
352
364
  # @param [Hash] opts the optional parameters
353
- # @return [TemplatePreview]
365
+ # @option opts [String] :version A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `draft`.
366
+ # @return [Template]
354
367
  describe 'get_template test' do
355
368
  it 'should work' do
356
369
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
357
370
  end
358
371
  end
359
372
 
373
+ # unit tests for get_template_diff
374
+ # Compare a version of a template with the one before it
375
+ # Returns what changed in the template's draft since its latest published version (or in a published version since the one before it): fields added, removed, changed and moved, the settings that changed, and whether the document was replaced. Check it before you publish a version.
376
+ # @param template_id The template's ID.
377
+ # @param [Hash] opts the optional parameters
378
+ # @option opts [String] :version A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `draft`.
379
+ # @return [TemplateDiff]
380
+ describe 'get_template_diff test' do
381
+ it 'should work' do
382
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
383
+ end
384
+ end
385
+
360
386
  # 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
387
+ # Generate typed code for a template's submission data
388
+ # 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.
389
+ # @param template_id The template's ID.
390
+ # @param lang The language to generate the code in.
365
391
  # @param [Hash] opts the optional parameters
366
- # @return [TemplateModelCodeResponse]
392
+ # @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.
393
+ # @return [TemplateModelCode]
367
394
  describe 'get_template_model_code test' do
368
395
  it 'should work' do
369
396
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
370
397
  end
371
398
  end
372
399
 
400
+ # unit tests for get_template_page_images
401
+ # Get images of a template's pages
402
+ # Returns a JPEG image of each page of a PDF template's PDF, with temporary links to download them: the draft's PDF, or a published version's. Use them to see the pages that fields are placed on.
403
+ # @param template_id The template's ID.
404
+ # @param [Hash] opts the optional parameters
405
+ # @option opts [String] :version A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `draft`.
406
+ # @return [TemplatePageImages]
407
+ describe 'get_template_page_images test' do
408
+ it 'should work' do
409
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
410
+ end
411
+ end
412
+
373
413
  # 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
414
+ # Get the JSON Schema of a template's submission data
415
+ # 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.
416
+ # @param template_id The template's ID.
377
417
  # @param [Hash] opts the optional parameters
378
- # @return [JsonSchema]
418
+ # @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.
419
+ # @return [Hash<String, Object>]
379
420
  describe 'get_template_schema test' do
380
421
  it 'should work' do
381
422
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
@@ -384,8 +425,8 @@ describe 'Client' do
384
425
 
385
426
  # unit tests for get_webhook
386
427
  # Get a webhook
387
- # Retrieves a single webhook by its ID.
388
- # @param webhook_id
428
+ # Returns a webhook.
429
+ # @param webhook_id The webhook's ID.
389
430
  # @param [Hash] opts the optional parameters
390
431
  # @return [Webhook]
391
432
  describe 'get_webhook test' do
@@ -394,25 +435,40 @@ describe 'Client' do
394
435
  end
395
436
  end
396
437
 
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.
438
+ # unit tests for list_combined_pdfs
439
+ # List combined PDFs
440
+ # Returns the combined PDFs in your account, newest first, one page at a time.
400
441
  # @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
442
+ # @option opts [Integer] :limit How many items to return (1-100, default 50).
443
+ # @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.
444
+ # @return [CombinedPdfList]
445
+ describe 'list_combined_pdfs test' do
446
+ it 'should work' do
447
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
448
+ end
449
+ end
450
+
451
+ # unit tests for list_custom_files
452
+ # List custom files
453
+ # Returns the custom files in your account, newest first, one page at a time.
454
+ # @param [Hash] opts the optional parameters
455
+ # @option opts [Integer] :limit How many items to return (1-100, default 50).
456
+ # @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.
457
+ # @return [CustomFileList]
458
+ describe 'list_custom_files test' do
405
459
  it 'should work' do
406
460
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
407
461
  end
408
462
  end
409
463
 
410
464
  # 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.
465
+ # List folders
466
+ # 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
467
  # @param [Hash] opts the optional parameters
414
- # @option opts [String] :parent_folder_id Filter By Folder Id
415
- # @return [Array<Folder>]
468
+ # @option opts [String] :parent_folder_id Only list the folders in this folder. Without it, the list has every folder, at any depth.
469
+ # @option opts [Integer] :limit How many items to return (1-100, default 50).
470
+ # @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.
471
+ # @return [FolderList]
416
472
  describe 'list_folders test' do
417
473
  it 'should work' do
418
474
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
@@ -420,34 +476,48 @@ describe 'Client' do
420
476
  end
421
477
 
422
478
  # 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]
479
+ # List submissions
480
+ # 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`.
481
+ # @param [Hash] opts the optional parameters
482
+ # @option opts [String] :template_id Only list this template's submissions.
483
+ # @option opts [Boolean] :test Only list test submissions (true) or live submissions (false).
484
+ # @option opts [Time] :created_after Only list submissions created after this time (RFC 3339, such as `2025-01-31T09:00:00Z`).
485
+ # @option opts [Time] :created_before Only list submissions created before this time.
486
+ # @option opts [Boolean] :include_data Include each submission's `data` (null without it).
487
+ # @option opts [Integer] :limit How many items to return (1-100, default 50).
488
+ # @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.
489
+ # @return [SubmissionList]
433
490
  describe 'list_submissions test' do
434
491
  it 'should work' do
435
492
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
436
493
  end
437
494
  end
438
495
 
496
+ # unit tests for list_template_fields
497
+ # List a template's fields
498
+ # Returns a template's fields with all of their settings, page by page: the draft's fields, or a published version's. A PDF template's fields are placed on its pages: GET /templates/{template_id}/page_images has images of the pages.
499
+ # @param template_id The template's ID.
500
+ # @param [Hash] opts the optional parameters
501
+ # @option opts [String] :version A published version (`1.2.0`, or `1` for the latest 1.x.x), `latest` or `draft`. Default `draft`.
502
+ # @return [TemplateFields]
503
+ describe 'list_template_fields test' do
504
+ it 'should work' do
505
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
506
+ end
507
+ end
508
+
439
509
  # 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]
510
+ # List a template's submissions
511
+ # Returns a template's submissions (from every version of the template), newest first.
512
+ # @param template_id The template's ID.
513
+ # @param [Hash] opts the optional parameters
514
+ # @option opts [Boolean] :test Only list test submissions (true) or live submissions (false).
515
+ # @option opts [Time] :created_after Only list submissions created after this time (RFC 3339, such as `2025-01-31T09:00:00Z`).
516
+ # @option opts [Time] :created_before Only list submissions created before this time.
517
+ # @option opts [Boolean] :include_data Include each submission's `data` (null without it).
518
+ # @option opts [Integer] :limit How many items to return (1-100, default 50).
519
+ # @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.
520
+ # @return [SubmissionList]
451
521
  describe 'list_template_submissions test' do
452
522
  it 'should work' do
453
523
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
@@ -455,14 +525,14 @@ describe 'Client' do
455
525
  end
456
526
 
457
527
  # 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>]
528
+ # List templates
529
+ # 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.
530
+ # @param [Hash] opts the optional parameters
531
+ # @option opts [String] :query Only list templates whose name contains this text (ignoring case).
532
+ # @option opts [String] :parent_folder_id Only list the templates in this folder (not in its subfolders).
533
+ # @option opts [Integer] :limit How many items to return (1-100, default 50).
534
+ # @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.
535
+ # @return [TemplateSummaryList]
466
536
  describe 'list_templates test' do
467
537
  it 'should work' do
468
538
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
@@ -470,44 +540,44 @@ describe 'Client' do
470
540
  end
471
541
 
472
542
  # 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>]
543
+ # List webhooks
544
+ # 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.
545
+ # @param [Hash] opts the optional parameters
546
+ # @option opts [WebhookEventType] :event_type Only list webhooks that subscribe to this event.
547
+ # @option opts [WebhookMode] :mode Only list webhooks set to this mode.
548
+ # @option opts [String] :template_id Only list webhooks scoped to this template.
549
+ # @option opts [String] :folder_id Only list webhooks scoped to this folder.
550
+ # @option opts [String] :api_token_id Only list webhooks scoped to this API token.
551
+ # @option opts [Integer] :limit How many items to return (1-100, default 50).
552
+ # @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.
553
+ # @return [WebhookList]
484
554
  describe 'list_webhooks test' do
485
555
  it 'should work' do
486
556
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
487
557
  end
488
558
  end
489
559
 
490
- # unit tests for move_folder_to_folder
560
+ # unit tests for move_folder
491
561
  # 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
562
+ # 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.
563
+ # @param folder_id The folder's ID.
564
+ # @param body Where to move the folder.
495
565
  # @param [Hash] opts the optional parameters
496
566
  # @return [Folder]
497
- describe 'move_folder_to_folder test' do
567
+ describe 'move_folder test' do
498
568
  it 'should work' do
499
569
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
500
570
  end
501
571
  end
502
572
 
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
573
+ # unit tests for move_template
574
+ # Move a template to a folder
575
+ # Moves a template and all of its published versions to a folder, or to the root (`null`).
576
+ # @param template_id The template's ID.
577
+ # @param body Where to move the template.
508
578
  # @param [Hash] opts the optional parameters
509
- # @return [TemplatePreview]
510
- describe 'move_template_to_folder test' do
579
+ # @return [Template]
580
+ describe 'move_template test' do
511
581
  it 'should work' do
512
582
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
513
583
  end
@@ -515,22 +585,35 @@ describe 'Client' do
515
585
 
516
586
  # unit tests for publish_template_version
517
587
  # 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
588
+ # 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. While the template's PDF is downloading or being processed, or DocSpring is setting up its fields, it returns a 409 that says so.
589
+ # @param template_id The template's ID.
590
+ # @param body The version to publish.
521
591
  # @param [Hash] opts the optional parameters
522
- # @return [TemplatePublishVersionResponse]
592
+ # @return [TemplateVersion]
523
593
  describe 'publish_template_version test' do
524
594
  it 'should work' do
525
595
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
526
596
  end
527
597
  end
528
598
 
599
+ # unit tests for remove_template_fields
600
+ # Remove fields from a template
601
+ # Removes fields from a template's draft and returns the fields that are left. Conditional logic that used only the removed fields is removed too.
602
+ # @param template_id The template's ID.
603
+ # @param body The fields to remove from the template's draft.
604
+ # @param [Hash] opts the optional parameters
605
+ # @return [TemplateFields]
606
+ describe 'remove_template_fields test' do
607
+ it 'should work' do
608
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
609
+ end
610
+ end
611
+
529
612
  # unit tests for rename_folder
530
613
  # 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
614
+ # Renames a folder. The name must be unique within its parent folder.
615
+ # @param folder_id The folder's ID.
616
+ # @param body The folder's new name.
534
617
  # @param [Hash] opts the optional parameters
535
618
  # @return [Folder]
536
619
  describe 'rename_folder test' do
@@ -539,13 +622,26 @@ describe 'Client' do
539
622
  end
540
623
  end
541
624
 
625
+ # unit tests for reorder_template_fields
626
+ # Reorder a template's fields
627
+ # Changes the order of the fields in a template's draft and returns them in their new order. Send every field's ID: each field stays on its page, and a page's fields are printed in this order, so a later field prints over an earlier one where they overlap. Their values are in this order in the template's data schema and forms.
628
+ # @param template_id The template's ID.
629
+ # @param body The new order of the fields in the template's draft.
630
+ # @param [Hash] opts the optional parameters
631
+ # @return [TemplateFields]
632
+ describe 'reorder_template_fields test' do
633
+ it 'should work' do
634
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
635
+ end
636
+ end
637
+
542
638
  # unit tests for restore_template_version
543
639
  # 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
640
+ # Replaces the template's draft with a copy of one of its published versions.
641
+ # @param template_id The template's ID.
642
+ # @param body The version to restore.
547
643
  # @param [Hash] opts the optional parameters
548
- # @return [SuccessErrorResponse]
644
+ # @return [Template]
549
645
  describe 'restore_template_version test' do
550
646
  it 'should work' do
551
647
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
@@ -554,35 +650,35 @@ describe 'Client' do
554
650
 
555
651
  # unit tests for test_authentication
556
652
  # 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.
653
+ # 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
654
  # @param [Hash] opts the optional parameters
559
- # @return [SuccessErrorResponse]
655
+ # @return [AuthenticationCheck]
560
656
  describe 'test_authentication test' do
561
657
  it 'should work' do
562
658
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
563
659
  end
564
660
  end
565
661
 
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
662
+ # unit tests for update_signature_request
663
+ # Update a signature request
664
+ # 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.
665
+ # @param signature_request_id The signature request's ID.
666
+ # @param body The settings to change. Properties left out keep their values.
571
667
  # @param [Hash] opts the optional parameters
572
- # @return [CreateSubmissionDataRequestResponse]
573
- describe 'update_data_request test' do
668
+ # @return [SignatureRequest]
669
+ describe 'update_signature_request test' do
574
670
  it 'should work' do
575
671
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
576
672
  end
577
673
  end
578
674
 
579
675
  # 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
676
+ # Update a template
677
+ # Changes a template's draft. Properties left out keep their values. `defaults` and `html_engine_options` replace the whole object, and `field_groups` changes only the groups it lists. Setting `parent_folder_id` moves the template and all of its published versions.
678
+ # @param template_id The template's ID.
679
+ # @param body The settings to change. Properties left out keep their values.
584
680
  # @param [Hash] opts the optional parameters
585
- # @return [SuccessMultipleErrorsResponse]
681
+ # @return [Template]
586
682
  describe 'update_template test' do
587
683
  it 'should work' do
588
684
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
@@ -590,27 +686,27 @@ describe 'Client' do
590
686
  end
591
687
 
592
688
  # 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
689
+ # Replace a template's PDF
690
+ # Replaces a PDF template's PDF with one you uploaded with the presigned upload (GET /uploads/presign) (`cache_id`), a link to download it from (`document_url`), or the file in base64 (`document_base64`). The fields stay where they are, unless `reimport_fields` replaces them with the new PDF's fillable fields. To send the PDF as `multipart/form-data` instead, use PUT /templates/{template_id}/document/upload.
691
+ # @param template_id The template's ID.
692
+ # @param body The new PDF, as one of `cache_id`, `document_url` and `document_base64`.
597
693
  # @param [Hash] opts the optional parameters
598
- # @option opts [String] :template_name
599
- # @return [SuccessMultipleErrorsResponse]
694
+ # @option opts [Boolean] :wait Wait until the PDF has been processed, and a `document_url` downloaded, before responding. Default true on sync.api hosts.
695
+ # @return [Template]
600
696
  describe 'update_template_document test' do
601
697
  it 'should work' do
602
698
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
603
699
  end
604
700
  end
605
701
 
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
702
+ # unit tests for update_template_fields
703
+ # Update a template's fields
704
+ # Changes fields of a template's draft and returns all of its fields. Settings left out keep their values. A shared setting (`type`, `required`, `default`, ...) changes for every field with the same name.
705
+ # @param template_id The template's ID.
706
+ # @param body The fields to change in the template's draft.
611
707
  # @param [Hash] opts the optional parameters
612
- # @return [SuccessMultipleErrorsResponse]
613
- describe 'update_template_document_from_upload test' do
708
+ # @return [TemplateFields]
709
+ describe 'update_template_fields test' do
614
710
  it 'should work' do
615
711
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
616
712
  end
@@ -618,9 +714,9 @@ describe 'Client' do
618
714
 
619
715
  # unit tests for update_webhook
620
716
  # Update a webhook
621
- # Updates the configuration of an existing webhook.
622
- # @param webhook_id
623
- # @param data
717
+ # Updates a webhook. Only the properties you send change.
718
+ # @param webhook_id The webhook's ID.
719
+ # @param body The settings to change. Properties left out keep their values.
624
720
  # @param [Hash] opts the optional parameters
625
721
  # @return [Webhook]
626
722
  describe 'update_webhook test' do
@@ -629,4 +725,54 @@ describe 'Client' do
629
725
  end
630
726
  end
631
727
 
728
+ # unit tests for upload_template
729
+ # Create a PDF template from an uploaded PDF
730
+ # 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.
731
+ # @param document The PDF.
732
+ # @param [Hash] opts the optional parameters
733
+ # @option opts [Boolean] :wait Wait until the PDF has been processed, and a `document_url` downloaded, before responding. Default true on sync.api hosts.
734
+ # @option opts [String] :name The template's name.
735
+ # @option opts [String] :description The template's description.
736
+ # @option opts [String] :parent_folder_id The folder to put the template in. Left out, it's created at the root.
737
+ # @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.
738
+ # @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.
739
+ # @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.
740
+ # @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`.
741
+ # @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.
742
+ # @return [Template]
743
+ describe 'upload_template test' do
744
+ it 'should work' do
745
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
746
+ end
747
+ end
748
+
749
+ # unit tests for upload_template_document
750
+ # Replace a template's PDF with an uploaded PDF
751
+ # 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.
752
+ # @param template_id The template's ID.
753
+ # @param document The new PDF.
754
+ # @param [Hash] opts the optional parameters
755
+ # @option opts [Boolean] :wait Wait until the PDF has been processed, and a `document_url` downloaded, before responding. Default true on sync.api hosts.
756
+ # @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.
757
+ # @return [Template]
758
+ describe 'upload_template_document test' do
759
+ it 'should work' do
760
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
761
+ end
762
+ end
763
+
764
+ # unit tests for validate_submission
765
+ # Check a submission without creating it
766
+ # Checks a submission as creating it would (its data against the template's fields, its settings and signature requests) without saving it, generating anything or using credits. It doesn't check your account's credits. The response says whether the submission is valid, and if not, has the error that creating it would return.
767
+ # @param template_id The template's ID.
768
+ # @param body The submission's data and settings.
769
+ # @param [Hash] opts the optional parameters
770
+ # @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).
771
+ # @return [SubmissionValidation]
772
+ describe 'validate_submission test' do
773
+ it 'should work' do
774
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
775
+ end
776
+ end
777
+
632
778
  end