docspring 4.2.0 → 4.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (362) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +1 -1
  3. data/AGENTS.md +2 -2
  4. data/CHANGELOG.md +27 -0
  5. data/Gemfile.lock +4 -3
  6. data/README.md +7 -6
  7. data/docs/Client.md +104 -102
  8. data/docs/CreateSubmissionRequest.md +3 -3
  9. data/docs/CreateTemplateRequest.md +11 -9
  10. data/docs/ErrorInfo.md +1 -1
  11. data/docs/FieldGroup.md +2 -2
  12. data/docs/FieldGroupInput.md +1 -1
  13. data/docs/GenerateSubmissionFilesRequest.md +1 -1
  14. data/docs/GeneratedFile.md +2 -2
  15. data/docs/Submission.md +4 -4
  16. data/docs/SubmissionBatch.md +3 -3
  17. data/docs/SubmissionFiles.md +4 -0
  18. data/docs/SubmissionInput.md +3 -3
  19. data/docs/SubmissionSummary.md +2 -2
  20. data/docs/Template.md +10 -8
  21. data/docs/TemplateDiff.md +2 -2
  22. data/docs/TemplateDocument.md +10 -10
  23. data/docs/TemplateDocumentSummary.md +4 -4
  24. data/docs/TemplatePreview.md +1 -1
  25. data/docs/TemplateSummary.md +5 -3
  26. data/docs/UpdateTemplateDocumentRequest.md +5 -5
  27. data/docs/UpdateTemplateRequest.md +6 -4
  28. data/docs/ValidateSubmissionRequest.md +3 -3
  29. data/docspring.gemspec +2 -2
  30. data/lib/docspring/api/client.rb +50 -47
  31. data/lib/docspring/api_client.rb +2 -2
  32. data/lib/docspring/api_error.rb +1 -1
  33. data/lib/docspring/api_model_base.rb +1 -1
  34. data/lib/docspring/configuration.rb +1 -1
  35. data/lib/docspring/models/add_template_fields_request.rb +1 -1
  36. data/lib/docspring/models/ai_field_naming_language.rb +1 -1
  37. data/lib/docspring/models/authentication_check.rb +1 -1
  38. data/lib/docspring/models/barcode_symbology.rb +1 -1
  39. data/lib/docspring/models/check_character.rb +1 -1
  40. data/lib/docspring/models/combined_field_type.rb +1 -1
  41. data/lib/docspring/models/combined_pdf.rb +1 -1
  42. data/lib/docspring/models/combined_pdf_files.rb +1 -1
  43. data/lib/docspring/models/combined_pdf_list.rb +1 -1
  44. data/lib/docspring/models/combined_pdf_source.rb +1 -1
  45. data/lib/docspring/models/combined_pdf_source_input.rb +1 -1
  46. data/lib/docspring/models/combined_pdf_source_pdf.rb +1 -1
  47. data/lib/docspring/models/combined_pdf_source_type.rb +1 -1
  48. data/lib/docspring/models/combined_pdf_state.rb +1 -1
  49. data/lib/docspring/models/copy_template_request.rb +1 -1
  50. data/lib/docspring/models/create_combined_pdf_request.rb +1 -1
  51. data/lib/docspring/models/create_custom_file_from_upload_request.rb +1 -1
  52. data/lib/docspring/models/create_folder_request.rb +1 -1
  53. data/lib/docspring/models/create_signature_request_event_request.rb +1 -1
  54. data/lib/docspring/models/create_signature_request_token_request.rb +1 -1
  55. data/lib/docspring/models/create_submission_batch_request.rb +1 -1
  56. data/lib/docspring/models/create_submission_request.rb +4 -4
  57. data/lib/docspring/models/create_template_preview_request.rb +1 -1
  58. data/lib/docspring/models/create_template_request.rb +21 -11
  59. data/lib/docspring/models/create_webhook_request.rb +1 -1
  60. data/lib/docspring/models/custom_file.rb +1 -1
  61. data/lib/docspring/models/custom_file_list.rb +1 -1
  62. data/lib/docspring/models/custom_file_source_pdf.rb +1 -1
  63. data/lib/docspring/models/error_code.rb +1 -1
  64. data/lib/docspring/models/error_detail.rb +1 -1
  65. data/lib/docspring/models/error_info.rb +2 -2
  66. data/lib/docspring/models/error_response.rb +1 -1
  67. data/lib/docspring/models/expiration_interval.rb +1 -1
  68. data/lib/docspring/models/field.rb +2 -2
  69. data/lib/docspring/models/field_comparison_condition.rb +1 -1
  70. data/lib/docspring/models/field_comparison_operator.rb +1 -1
  71. data/lib/docspring/models/field_dependency.rb +1 -1
  72. data/lib/docspring/models/field_dependency_input.rb +1 -1
  73. data/lib/docspring/models/field_display_type.rb +1 -1
  74. data/lib/docspring/models/field_equals_condition.rb +1 -1
  75. data/lib/docspring/models/field_equals_operator.rb +1 -1
  76. data/lib/docspring/models/field_group.rb +3 -3
  77. data/lib/docspring/models/field_group_input.rb +2 -2
  78. data/lib/docspring/models/field_group_type.rb +1 -1
  79. data/lib/docspring/models/field_in_condition.rb +1 -1
  80. data/lib/docspring/models/field_input.rb +2 -2
  81. data/lib/docspring/models/field_override.rb +1 -1
  82. data/lib/docspring/models/field_presence_condition.rb +1 -1
  83. data/lib/docspring/models/field_presence_operator.rb +1 -1
  84. data/lib/docspring/models/field_range_condition.rb +1 -1
  85. data/lib/docspring/models/field_reimport_state.rb +1 -1
  86. data/lib/docspring/models/field_setup_logic.rb +1 -1
  87. data/lib/docspring/models/field_setup_naming.rb +1 -1
  88. data/lib/docspring/models/field_setup_source.rb +1 -1
  89. data/lib/docspring/models/field_type.rb +1 -1
  90. data/lib/docspring/models/folder.rb +1 -1
  91. data/lib/docspring/models/folder_list.rb +1 -1
  92. data/lib/docspring/models/generate_files_format.rb +5 -2
  93. data/lib/docspring/models/generate_submission_files_request.rb +2 -2
  94. data/lib/docspring/models/generated_file.rb +4 -4
  95. data/lib/docspring/models/generated_file_state.rb +1 -1
  96. data/lib/docspring/models/html_engine_options.rb +1 -1
  97. data/lib/docspring/models/html_engine_options_input.rb +1 -1
  98. data/lib/docspring/models/image_gravity.rb +1 -1
  99. data/lib/docspring/models/image_scale_type.rb +1 -1
  100. data/lib/docspring/models/model_code_language.rb +3 -2
  101. data/lib/docspring/models/move_folder_request.rb +1 -1
  102. data/lib/docspring/models/move_template_request.rb +1 -1
  103. data/lib/docspring/models/number_condition_type.rb +1 -1
  104. data/lib/docspring/models/output_format.rb +4 -2
  105. data/lib/docspring/models/page_format.rb +1 -1
  106. data/lib/docspring/models/page_image.rb +1 -1
  107. data/lib/docspring/models/page_images.rb +1 -1
  108. data/lib/docspring/models/predefined_field.rb +1 -1
  109. data/lib/docspring/models/predefined_field_input.rb +1 -1
  110. data/lib/docspring/models/publish_template_version_request.rb +1 -1
  111. data/lib/docspring/models/remove_template_fields_request.rb +1 -1
  112. data/lib/docspring/models/rename_folder_request.rb +1 -1
  113. data/lib/docspring/models/reorder_template_fields_request.rb +1 -1
  114. data/lib/docspring/models/restore_template_version_request.rb +1 -1
  115. data/lib/docspring/models/shape_type.rb +1 -1
  116. data/lib/docspring/models/signature_request.rb +1 -1
  117. data/lib/docspring/models/signature_request_auth_second_factor_type.rb +1 -1
  118. data/lib/docspring/models/signature_request_auth_type.rb +1 -1
  119. data/lib/docspring/models/signature_request_event.rb +1 -1
  120. data/lib/docspring/models/signature_request_event_type.rb +1 -1
  121. data/lib/docspring/models/signature_request_input.rb +1 -1
  122. data/lib/docspring/models/signature_request_message_type.rb +1 -1
  123. data/lib/docspring/models/signature_request_state.rb +1 -1
  124. data/lib/docspring/models/signature_request_token.rb +1 -1
  125. data/lib/docspring/models/signature_request_token_type.rb +1 -1
  126. data/lib/docspring/models/string_condition_type.rb +1 -1
  127. data/lib/docspring/models/submission.rb +6 -6
  128. data/lib/docspring/models/submission_action.rb +1 -1
  129. data/lib/docspring/models/submission_action_state.rb +1 -1
  130. data/lib/docspring/models/submission_action_type.rb +1 -1
  131. data/lib/docspring/models/submission_batch.rb +5 -5
  132. data/lib/docspring/models/submission_batch_state.rb +1 -1
  133. data/lib/docspring/models/submission_files.rb +22 -2
  134. data/lib/docspring/models/submission_input.rb +4 -4
  135. data/lib/docspring/models/submission_list.rb +1 -1
  136. data/lib/docspring/models/submission_source.rb +1 -1
  137. data/lib/docspring/models/submission_source_pdf.rb +1 -1
  138. data/lib/docspring/models/submission_state.rb +1 -1
  139. data/lib/docspring/models/submission_summary.rb +3 -3
  140. data/lib/docspring/models/submission_validation.rb +1 -1
  141. data/lib/docspring/models/template.rb +37 -10
  142. data/lib/docspring/models/template_actor.rb +1 -1
  143. data/lib/docspring/models/template_actor_type.rb +1 -1
  144. data/lib/docspring/models/template_defaults.rb +1 -1
  145. data/lib/docspring/models/template_defaults_input.rb +1 -1
  146. data/lib/docspring/models/template_diff.rb +3 -3
  147. data/lib/docspring/models/template_diff_summary.rb +1 -1
  148. data/lib/docspring/models/template_document.rb +12 -12
  149. data/lib/docspring/models/template_document_state.rb +4 -2
  150. data/lib/docspring/models/template_document_summary.rb +6 -6
  151. data/lib/docspring/models/template_field_change.rb +1 -1
  152. data/lib/docspring/models/template_field_changes.rb +1 -1
  153. data/lib/docspring/models/template_field_dependency.rb +1 -1
  154. data/lib/docspring/models/template_field_dependency_action.rb +1 -1
  155. data/lib/docspring/models/template_field_dependency_condition.rb +1 -1
  156. data/lib/docspring/models/template_field_dependency_condition_input.rb +1 -1
  157. data/lib/docspring/models/template_field_dependency_input.rb +1 -1
  158. data/lib/docspring/models/template_field_dependency_match.rb +1 -1
  159. data/lib/docspring/models/template_field_dependency_operator.rb +1 -1
  160. data/lib/docspring/models/template_field_logic_status.rb +1 -1
  161. data/lib/docspring/models/template_field_move.rb +1 -1
  162. data/lib/docspring/models/template_fields.rb +1 -1
  163. data/lib/docspring/models/template_form_mode.rb +1 -1
  164. data/lib/docspring/models/template_model_code.rb +1 -1
  165. data/lib/docspring/models/template_page_ai_error.rb +1 -1
  166. data/lib/docspring/models/template_page_ai_naming_status.rb +1 -1
  167. data/lib/docspring/models/template_page_fields_status.rb +1 -1
  168. data/lib/docspring/models/template_page_image_status.rb +1 -1
  169. data/lib/docspring/models/template_page_images.rb +1 -1
  170. data/lib/docspring/models/template_page_processing_status.rb +1 -1
  171. data/lib/docspring/models/template_preview.rb +3 -3
  172. data/lib/docspring/models/template_preview_state.rb +1 -1
  173. data/lib/docspring/models/template_source_pdf.rb +1 -1
  174. data/lib/docspring/models/template_summary.rb +32 -5
  175. data/lib/docspring/models/template_summary_list.rb +1 -1
  176. data/lib/docspring/models/template_type.rb +3 -2
  177. data/lib/docspring/models/template_version.rb +1 -1
  178. data/lib/docspring/models/template_version_type.rb +1 -1
  179. data/lib/docspring/models/text_alignment.rb +1 -1
  180. data/lib/docspring/models/text_overflow.rb +1 -1
  181. data/lib/docspring/models/text_vertical_alignment.rb +1 -1
  182. data/lib/docspring/models/typeface.rb +1 -1
  183. data/lib/docspring/models/update_signature_request_request.rb +1 -1
  184. data/lib/docspring/models/update_template_document_request.rb +7 -7
  185. data/lib/docspring/models/update_template_fields_request.rb +1 -1
  186. data/lib/docspring/models/update_template_request.rb +16 -6
  187. data/lib/docspring/models/update_webhook_request.rb +1 -1
  188. data/lib/docspring/models/upload_method.rb +1 -1
  189. data/lib/docspring/models/upload_presign.rb +1 -1
  190. data/lib/docspring/models/url_source_pdf.rb +1 -1
  191. data/lib/docspring/models/validate_submission_request.rb +4 -4
  192. data/lib/docspring/models/webhook.rb +1 -1
  193. data/lib/docspring/models/webhook_event_type.rb +1 -1
  194. data/lib/docspring/models/webhook_list.rb +1 -1
  195. data/lib/docspring/models/webhook_mode.rb +1 -1
  196. data/lib/docspring/request_schemas.json +39 -2
  197. data/lib/docspring/version.rb +2 -2
  198. data/lib/docspring.rb +1 -1
  199. data/spec/api/client_spec.rb +25 -24
  200. data/spec/models/add_template_fields_request_spec.rb +1 -1
  201. data/spec/models/ai_field_naming_language_spec.rb +1 -1
  202. data/spec/models/authentication_check_spec.rb +1 -1
  203. data/spec/models/barcode_symbology_spec.rb +1 -1
  204. data/spec/models/check_character_spec.rb +1 -1
  205. data/spec/models/combined_field_type_spec.rb +1 -1
  206. data/spec/models/combined_pdf_files_spec.rb +1 -1
  207. data/spec/models/combined_pdf_list_spec.rb +1 -1
  208. data/spec/models/combined_pdf_source_input_spec.rb +1 -1
  209. data/spec/models/combined_pdf_source_pdf_spec.rb +1 -1
  210. data/spec/models/combined_pdf_source_spec.rb +1 -1
  211. data/spec/models/combined_pdf_source_type_spec.rb +1 -1
  212. data/spec/models/combined_pdf_spec.rb +1 -1
  213. data/spec/models/combined_pdf_state_spec.rb +1 -1
  214. data/spec/models/copy_template_request_spec.rb +1 -1
  215. data/spec/models/create_combined_pdf_request_spec.rb +1 -1
  216. data/spec/models/create_custom_file_from_upload_request_spec.rb +1 -1
  217. data/spec/models/create_folder_request_spec.rb +1 -1
  218. data/spec/models/create_signature_request_event_request_spec.rb +1 -1
  219. data/spec/models/create_signature_request_token_request_spec.rb +1 -1
  220. data/spec/models/create_submission_batch_request_spec.rb +1 -1
  221. data/spec/models/create_submission_request_spec.rb +1 -1
  222. data/spec/models/create_template_preview_request_spec.rb +1 -1
  223. data/spec/models/create_template_request_spec.rb +7 -1
  224. data/spec/models/create_webhook_request_spec.rb +1 -1
  225. data/spec/models/custom_file_list_spec.rb +1 -1
  226. data/spec/models/custom_file_source_pdf_spec.rb +1 -1
  227. data/spec/models/custom_file_spec.rb +1 -1
  228. data/spec/models/error_code_spec.rb +1 -1
  229. data/spec/models/error_detail_spec.rb +1 -1
  230. data/spec/models/error_info_spec.rb +1 -1
  231. data/spec/models/error_response_spec.rb +1 -1
  232. data/spec/models/expiration_interval_spec.rb +1 -1
  233. data/spec/models/field_comparison_condition_spec.rb +1 -1
  234. data/spec/models/field_comparison_operator_spec.rb +1 -1
  235. data/spec/models/field_dependency_input_spec.rb +1 -1
  236. data/spec/models/field_dependency_spec.rb +1 -1
  237. data/spec/models/field_display_type_spec.rb +1 -1
  238. data/spec/models/field_equals_condition_spec.rb +1 -1
  239. data/spec/models/field_equals_operator_spec.rb +1 -1
  240. data/spec/models/field_group_input_spec.rb +1 -1
  241. data/spec/models/field_group_spec.rb +1 -1
  242. data/spec/models/field_group_type_spec.rb +1 -1
  243. data/spec/models/field_in_condition_spec.rb +1 -1
  244. data/spec/models/field_input_spec.rb +1 -1
  245. data/spec/models/field_override_spec.rb +1 -1
  246. data/spec/models/field_presence_condition_spec.rb +1 -1
  247. data/spec/models/field_presence_operator_spec.rb +1 -1
  248. data/spec/models/field_range_condition_spec.rb +1 -1
  249. data/spec/models/field_reimport_state_spec.rb +1 -1
  250. data/spec/models/field_setup_logic_spec.rb +1 -1
  251. data/spec/models/field_setup_naming_spec.rb +1 -1
  252. data/spec/models/field_setup_source_spec.rb +1 -1
  253. data/spec/models/field_spec.rb +1 -1
  254. data/spec/models/field_type_spec.rb +1 -1
  255. data/spec/models/folder_list_spec.rb +1 -1
  256. data/spec/models/folder_spec.rb +1 -1
  257. data/spec/models/generate_files_format_spec.rb +1 -1
  258. data/spec/models/generate_submission_files_request_spec.rb +1 -1
  259. data/spec/models/generated_file_spec.rb +1 -1
  260. data/spec/models/generated_file_state_spec.rb +1 -1
  261. data/spec/models/html_engine_options_input_spec.rb +1 -1
  262. data/spec/models/html_engine_options_spec.rb +1 -1
  263. data/spec/models/image_gravity_spec.rb +1 -1
  264. data/spec/models/image_scale_type_spec.rb +1 -1
  265. data/spec/models/model_code_language_spec.rb +1 -1
  266. data/spec/models/move_folder_request_spec.rb +1 -1
  267. data/spec/models/move_template_request_spec.rb +1 -1
  268. data/spec/models/number_condition_type_spec.rb +1 -1
  269. data/spec/models/output_format_spec.rb +1 -1
  270. data/spec/models/page_format_spec.rb +1 -1
  271. data/spec/models/page_image_spec.rb +1 -1
  272. data/spec/models/page_images_spec.rb +1 -1
  273. data/spec/models/predefined_field_input_spec.rb +1 -1
  274. data/spec/models/predefined_field_spec.rb +1 -1
  275. data/spec/models/publish_template_version_request_spec.rb +1 -1
  276. data/spec/models/remove_template_fields_request_spec.rb +1 -1
  277. data/spec/models/rename_folder_request_spec.rb +1 -1
  278. data/spec/models/reorder_template_fields_request_spec.rb +1 -1
  279. data/spec/models/restore_template_version_request_spec.rb +1 -1
  280. data/spec/models/shape_type_spec.rb +1 -1
  281. data/spec/models/signature_request_auth_second_factor_type_spec.rb +1 -1
  282. data/spec/models/signature_request_auth_type_spec.rb +1 -1
  283. data/spec/models/signature_request_event_spec.rb +1 -1
  284. data/spec/models/signature_request_event_type_spec.rb +1 -1
  285. data/spec/models/signature_request_input_spec.rb +1 -1
  286. data/spec/models/signature_request_message_type_spec.rb +1 -1
  287. data/spec/models/signature_request_spec.rb +1 -1
  288. data/spec/models/signature_request_state_spec.rb +1 -1
  289. data/spec/models/signature_request_token_spec.rb +1 -1
  290. data/spec/models/signature_request_token_type_spec.rb +1 -1
  291. data/spec/models/string_condition_type_spec.rb +1 -1
  292. data/spec/models/submission_action_spec.rb +1 -1
  293. data/spec/models/submission_action_state_spec.rb +1 -1
  294. data/spec/models/submission_action_type_spec.rb +1 -1
  295. data/spec/models/submission_batch_spec.rb +1 -1
  296. data/spec/models/submission_batch_state_spec.rb +1 -1
  297. data/spec/models/submission_files_spec.rb +13 -1
  298. data/spec/models/submission_input_spec.rb +1 -1
  299. data/spec/models/submission_list_spec.rb +1 -1
  300. data/spec/models/submission_source_pdf_spec.rb +1 -1
  301. data/spec/models/submission_source_spec.rb +1 -1
  302. data/spec/models/submission_spec.rb +1 -1
  303. data/spec/models/submission_state_spec.rb +1 -1
  304. data/spec/models/submission_summary_spec.rb +1 -1
  305. data/spec/models/submission_validation_spec.rb +1 -1
  306. data/spec/models/template_actor_spec.rb +1 -1
  307. data/spec/models/template_actor_type_spec.rb +1 -1
  308. data/spec/models/template_defaults_input_spec.rb +1 -1
  309. data/spec/models/template_defaults_spec.rb +1 -1
  310. data/spec/models/template_diff_spec.rb +1 -1
  311. data/spec/models/template_diff_summary_spec.rb +1 -1
  312. data/spec/models/template_document_spec.rb +1 -1
  313. data/spec/models/template_document_state_spec.rb +1 -1
  314. data/spec/models/template_document_summary_spec.rb +1 -1
  315. data/spec/models/template_field_change_spec.rb +1 -1
  316. data/spec/models/template_field_changes_spec.rb +1 -1
  317. data/spec/models/template_field_dependency_action_spec.rb +1 -1
  318. data/spec/models/template_field_dependency_condition_input_spec.rb +1 -1
  319. data/spec/models/template_field_dependency_condition_spec.rb +1 -1
  320. data/spec/models/template_field_dependency_input_spec.rb +1 -1
  321. data/spec/models/template_field_dependency_match_spec.rb +1 -1
  322. data/spec/models/template_field_dependency_operator_spec.rb +1 -1
  323. data/spec/models/template_field_dependency_spec.rb +1 -1
  324. data/spec/models/template_field_logic_status_spec.rb +1 -1
  325. data/spec/models/template_field_move_spec.rb +1 -1
  326. data/spec/models/template_fields_spec.rb +1 -1
  327. data/spec/models/template_form_mode_spec.rb +1 -1
  328. data/spec/models/template_model_code_spec.rb +1 -1
  329. data/spec/models/template_page_ai_error_spec.rb +1 -1
  330. data/spec/models/template_page_ai_naming_status_spec.rb +1 -1
  331. data/spec/models/template_page_fields_status_spec.rb +1 -1
  332. data/spec/models/template_page_image_status_spec.rb +1 -1
  333. data/spec/models/template_page_images_spec.rb +1 -1
  334. data/spec/models/template_page_processing_status_spec.rb +1 -1
  335. data/spec/models/template_preview_spec.rb +1 -1
  336. data/spec/models/template_preview_state_spec.rb +1 -1
  337. data/spec/models/template_source_pdf_spec.rb +1 -1
  338. data/spec/models/template_spec.rb +7 -1
  339. data/spec/models/template_summary_list_spec.rb +1 -1
  340. data/spec/models/template_summary_spec.rb +7 -1
  341. data/spec/models/template_type_spec.rb +1 -1
  342. data/spec/models/template_version_spec.rb +1 -1
  343. data/spec/models/template_version_type_spec.rb +1 -1
  344. data/spec/models/text_alignment_spec.rb +1 -1
  345. data/spec/models/text_overflow_spec.rb +1 -1
  346. data/spec/models/text_vertical_alignment_spec.rb +1 -1
  347. data/spec/models/typeface_spec.rb +1 -1
  348. data/spec/models/update_signature_request_request_spec.rb +1 -1
  349. data/spec/models/update_template_document_request_spec.rb +1 -1
  350. data/spec/models/update_template_fields_request_spec.rb +1 -1
  351. data/spec/models/update_template_request_spec.rb +7 -1
  352. data/spec/models/update_webhook_request_spec.rb +1 -1
  353. data/spec/models/upload_method_spec.rb +1 -1
  354. data/spec/models/upload_presign_spec.rb +1 -1
  355. data/spec/models/url_source_pdf_spec.rb +1 -1
  356. data/spec/models/validate_submission_request_spec.rb +1 -1
  357. data/spec/models/webhook_event_type_spec.rb +1 -1
  358. data/spec/models/webhook_list_spec.rb +1 -1
  359. data/spec/models/webhook_mode_spec.rb +1 -1
  360. data/spec/models/webhook_spec.rb +1 -1
  361. data/spec/spec_helper.rb +1 -1
  362. metadata +3 -2
data/docs/Client.md CHANGED
@@ -56,11 +56,11 @@ All URIs are relative to *https://sync.api.docspring.com/api/v2*
56
56
  | [**test_authentication**](Client.md#test_authentication) | **GET** /authentication | Test authentication |
57
57
  | [**update_signature_request**](Client.md#update_signature_request) | **PUT** /signature_requests/{signature_request_id} | Update a signature request |
58
58
  | [**update_template**](Client.md#update_template) | **PUT** /templates/{template_id} | Update a template |
59
- | [**update_template_document**](Client.md#update_template_document) | **PUT** /templates/{template_id}/document | Replace a template's PDF |
59
+ | [**update_template_document**](Client.md#update_template_document) | **PUT** /templates/{template_id}/document | Replace a template's document |
60
60
  | [**update_template_fields**](Client.md#update_template_fields) | **PUT** /templates/{template_id}/fields | Update a template's fields |
61
61
  | [**update_webhook**](Client.md#update_webhook) | **PUT** /webhooks/{webhook_id} | Update a webhook |
62
- | [**upload_template**](Client.md#upload_template) | **POST** /templates/upload | Create a PDF template from an uploaded PDF |
63
- | [**upload_template_document**](Client.md#upload_template_document) | **PUT** /templates/{template_id}/document/upload | Replace a template's PDF with an uploaded PDF |
62
+ | [**upload_template**](Client.md#upload_template) | **POST** /templates/upload | Create a template from an uploaded PDF or Word document |
63
+ | [**upload_template_document**](Client.md#upload_template_document) | **PUT** /templates/{template_id}/document/upload | Replace a template's document with an uploaded file |
64
64
  | [**validate_submission**](Client.md#validate_submission) | **POST** /templates/{template_id}/submissions/validate | Check a submission without creating it |
65
65
 
66
66
 
@@ -128,7 +128,7 @@ end
128
128
 
129
129
  ### Authorization
130
130
 
131
- [api_token_basic](../README.md#api_token_basic)
131
+ [api_token_basic](../README.md#install-and-configure)
132
132
 
133
133
  ### HTTP request headers
134
134
 
@@ -202,7 +202,7 @@ end
202
202
 
203
203
  ### Authorization
204
204
 
205
- [api_token_basic](../README.md#api_token_basic)
205
+ [api_token_basic](../README.md#install-and-configure)
206
206
 
207
207
  ### HTTP request headers
208
208
 
@@ -278,7 +278,7 @@ end
278
278
 
279
279
  ### Authorization
280
280
 
281
- [api_token_basic](../README.md#api_token_basic)
281
+ [api_token_basic](../README.md#install-and-configure)
282
282
 
283
283
  ### HTTP request headers
284
284
 
@@ -348,7 +348,7 @@ end
348
348
 
349
349
  ### Authorization
350
350
 
351
- [api_token_basic](../README.md#api_token_basic)
351
+ [api_token_basic](../README.md#install-and-configure)
352
352
 
353
353
  ### HTTP request headers
354
354
 
@@ -418,7 +418,7 @@ end
418
418
 
419
419
  ### Authorization
420
420
 
421
- [api_token_basic](../README.md#api_token_basic)
421
+ [api_token_basic](../README.md#install-and-configure)
422
422
 
423
423
  ### HTTP request headers
424
424
 
@@ -490,7 +490,7 @@ end
490
490
 
491
491
  ### Authorization
492
492
 
493
- [api_token_basic](../README.md#api_token_basic)
493
+ [api_token_basic](../README.md#install-and-configure)
494
494
 
495
495
  ### HTTP request headers
496
496
 
@@ -564,7 +564,7 @@ end
564
564
 
565
565
  ### Authorization
566
566
 
567
- [api_token_basic](../README.md#api_token_basic)
567
+ [api_token_basic](../README.md#install-and-configure)
568
568
 
569
569
  ### HTTP request headers
570
570
 
@@ -644,7 +644,7 @@ end
644
644
 
645
645
  ### Authorization
646
646
 
647
- [api_token_basic](../README.md#api_token_basic)
647
+ [api_token_basic](../README.md#install-and-configure)
648
648
 
649
649
  ### HTTP request headers
650
650
 
@@ -675,7 +675,7 @@ end
675
675
  api_instance = DocSpring::Client.new
676
676
  body = DocSpring::CreateSubmissionBatchRequest.new({submissions: [DocSpring::SubmissionInput.new]}) # CreateSubmissionBatchRequest | The submissions to create, and the settings they share.
677
677
  opts = {
678
- wait: true, # Boolean | Wait until every PDF in the batch has been generated before responding. Default true on sync.api hosts.
678
+ wait: true, # Boolean | Wait until every file in the batch has been generated before responding. Default true on sync.api hosts.
679
679
  idempotency_key: 'idempotency_key_example' # String | A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of creating another batch. Send a new key with each new batch, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` means the first request is still being processed: send the request again in a few seconds.
680
680
  }
681
681
 
@@ -711,7 +711,7 @@ end
711
711
  | Name | Type | Description | Notes |
712
712
  | ---- | ---- | ----------- | ----- |
713
713
  | **body** | [**CreateSubmissionBatchRequest**](CreateSubmissionBatchRequest.md) | The submissions to create, and the settings they share. | |
714
- | **wait** | **Boolean** | Wait until every PDF in the batch has been generated before responding. Default true on sync.api hosts. | [optional] |
714
+ | **wait** | **Boolean** | Wait until every file in the batch has been generated before responding. Default true on sync.api hosts. | [optional] |
715
715
  | **idempotency_key** | **String** | A key of your own, such as a UUID, that makes it safe to send this request again: for 24 hours, DocSpring answers a request with the same key from the same API token with the first request's response (and an `Idempotent-Replayed: true` header) instead of creating another batch. Send a new key with each new batch, and the same key each time you send the same request again, such as after a timeout, a network error or a 5xx. The same key with a different request is a 422 `idempotency_key_reused`. A 409 `idempotency_key_in_use` means the first request is still being processed: send the request again in a few seconds. | [optional] |
716
716
 
717
717
  ### Return type
@@ -720,7 +720,7 @@ end
720
720
 
721
721
  ### Authorization
722
722
 
723
- [api_token_basic](../README.md#api_token_basic)
723
+ [api_token_basic](../README.md#install-and-configure)
724
724
 
725
725
  ### HTTP request headers
726
726
 
@@ -734,7 +734,7 @@ end
734
734
 
735
735
  Create a template
736
736
 
737
- 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`.
737
+ Creates an HTML template, or a PDF or Word template from a file you uploaded with the presigned upload (GET /uploads/presign): pass its `fields.key` as `cache_id`. You can send a link to the file (`document_url`) or the file in base64 (`document_base64`) instead, or send the file with the request with POST /templates/upload. A Word template is made from a Word document (.docx) or an OpenDocument text file (.odt), which DocSpring converts to a Word document. It needs its `output_format`: what each submission makes, a Word document (`docx`), an OpenDocument file (`odt`) or a PDF. A PDF template is ready to generate PDFs once DocSpring has processed its PDF, a template created from a `document_url` once its document has been downloaded, and one created from an .odt once it has been converted (`ready` is true). On sync.api hosts the request waits for that unless you pass `wait=false`.
738
738
 
739
739
  ### Examples
740
740
 
@@ -751,7 +751,7 @@ end
751
751
  api_instance = DocSpring::Client.new
752
752
  body = DocSpring::CreateTemplateRequest.new({template_type: DocSpring::TemplateType::PDF}) # CreateTemplateRequest | The template to create.
753
753
  opts = {
754
- wait: true # Boolean | Wait until the PDF has been processed, and a `document_url` downloaded, before responding. Default true on sync.api hosts.
754
+ wait: true # Boolean | Wait until the PDF has been processed, a `document_url`'s PDF or Word document downloaded, and an OpenDocument file converted, before responding. Default true on sync.api hosts.
755
755
  }
756
756
 
757
757
  begin
@@ -786,7 +786,7 @@ end
786
786
  | Name | Type | Description | Notes |
787
787
  | ---- | ---- | ----------- | ----- |
788
788
  | **body** | [**CreateTemplateRequest**](CreateTemplateRequest.md) | The template to create. | |
789
- | **wait** | **Boolean** | Wait until the PDF has been processed, and a `document_url` downloaded, before responding. Default true on sync.api hosts. | [optional] |
789
+ | **wait** | **Boolean** | Wait until the PDF has been processed, a `document_url`'s PDF or Word document downloaded, and an OpenDocument file converted, before responding. Default true on sync.api hosts. | [optional] |
790
790
 
791
791
  ### Return type
792
792
 
@@ -794,7 +794,7 @@ end
794
794
 
795
795
  ### Authorization
796
796
 
797
- [api_token_basic](../README.md#api_token_basic)
797
+ [api_token_basic](../README.md#install-and-configure)
798
798
 
799
799
  ### HTTP request headers
800
800
 
@@ -808,7 +808,7 @@ end
808
808
 
809
809
  Preview a template with data
810
810
 
811
- Makes PNG images of a template's pages filled in with the data you send (not a PDF), so you can check how an HTML or PDF template prints with your data before you publish a version or send live data. It renders the template's draft, or the published `version` you ask for. A preview makes no submission and uses no credits, and its pages are watermarked like a test submission's PDF. It's `pending` while it renders: get it with GET /templates/{template_id}/previews/{preview_id} until it's `processed`, with an image of each page, or `error`.
811
+ Makes PNG images of a template's pages filled in with the data you send (not a PDF), so you can check how an HTML, PDF or Word template prints with your data before you publish a version or send live data. A Word template's pages are its PDF's, whatever its `output_format`. It renders the template's draft, or the published `version` you ask for. A preview makes no submission and uses no credits, and its pages are watermarked like a test submission's PDF. It's `pending` while it renders: get it with GET /templates/{template_id}/previews/{preview_id} until it's `processed`, with an image of each page, or `error`.
812
812
 
813
813
  ### Examples
814
814
 
@@ -870,7 +870,7 @@ end
870
870
 
871
871
  ### Authorization
872
872
 
873
- [api_token_basic](../README.md#api_token_basic)
873
+ [api_token_basic](../README.md#install-and-configure)
874
874
 
875
875
  ### HTTP request headers
876
876
 
@@ -940,7 +940,7 @@ end
940
940
 
941
941
  ### Authorization
942
942
 
943
- [api_token_basic](../README.md#api_token_basic)
943
+ [api_token_basic](../README.md#install-and-configure)
944
944
 
945
945
  ### HTTP request headers
946
946
 
@@ -1010,7 +1010,7 @@ end
1010
1010
 
1011
1011
  ### Authorization
1012
1012
 
1013
- [api_token_basic](../README.md#api_token_basic)
1013
+ [api_token_basic](../README.md#install-and-configure)
1014
1014
 
1015
1015
  ### HTTP request headers
1016
1016
 
@@ -1080,7 +1080,7 @@ end
1080
1080
 
1081
1081
  ### Authorization
1082
1082
 
1083
- [api_token_basic](../README.md#api_token_basic)
1083
+ [api_token_basic](../README.md#install-and-configure)
1084
1084
 
1085
1085
  ### HTTP request headers
1086
1086
 
@@ -1154,7 +1154,7 @@ end
1154
1154
 
1155
1155
  ### Authorization
1156
1156
 
1157
- [api_token_basic](../README.md#api_token_basic)
1157
+ [api_token_basic](../README.md#install-and-configure)
1158
1158
 
1159
1159
  ### HTTP request headers
1160
1160
 
@@ -1224,7 +1224,7 @@ end
1224
1224
 
1225
1225
  ### Authorization
1226
1226
 
1227
- [api_token_basic](../README.md#api_token_basic)
1227
+ [api_token_basic](../README.md#install-and-configure)
1228
1228
 
1229
1229
  ### HTTP request headers
1230
1230
 
@@ -1294,7 +1294,7 @@ end
1294
1294
 
1295
1295
  ### Authorization
1296
1296
 
1297
- [api_token_basic](../README.md#api_token_basic)
1297
+ [api_token_basic](../README.md#install-and-configure)
1298
1298
 
1299
1299
  ### HTTP request headers
1300
1300
 
@@ -1364,7 +1364,7 @@ end
1364
1364
 
1365
1365
  ### Authorization
1366
1366
 
1367
- [api_token_basic](../README.md#api_token_basic)
1367
+ [api_token_basic](../README.md#install-and-configure)
1368
1368
 
1369
1369
  ### HTTP request headers
1370
1370
 
@@ -1378,7 +1378,7 @@ end
1378
1378
 
1379
1379
  Generate more files
1380
1380
 
1381
- 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.
1381
+ Adds formats to a processed submission's files, in the background, without using credits again: `pdf`, the PDF of a Word template's submission that made only its Word document (converted from that document), `docx`, the Word document of a Word template's submission that made only its PDF (made again from its data and the template version it used), `odt`, a Word template's submission's OpenDocument file (converted from its Word document, or from one made again when it didn't keep one), and `png`, a PNG image of each page of the PDF (up to 100 pages), which makes the PDF first when the submission doesn't have one. To make them with the submission, add them to `output_formats` when you create it. Each new file is listed in `files` while it's made: on sync.api hosts the request waits for them (unless you pass `wait=false`), otherwise poll GET /submissions/{submission_id} until none of their `state` is `pending`. A file that couldn't be made has the state `error` and an `error_message`, and the submission stays processed. Asking for a format the submission already has (or is making) changes nothing.
1382
1382
 
1383
1383
  ### Examples
1384
1384
 
@@ -1394,7 +1394,7 @@ end
1394
1394
 
1395
1395
  api_instance = DocSpring::Client.new
1396
1396
  submission_id = 'sub_1234567890abcdef01' # String | The submission's ID.
1397
- body = DocSpring::GenerateSubmissionFilesRequest.new({formats: [DocSpring::GenerateFilesFormat::PNG]}) # GenerateSubmissionFilesRequest | The formats to make.
1397
+ body = DocSpring::GenerateSubmissionFilesRequest.new({formats: [DocSpring::GenerateFilesFormat::PDF]}) # GenerateSubmissionFilesRequest | The formats to make.
1398
1398
  opts = {
1399
1399
  wait: true # Boolean | Wait until the files have been generated before responding. Default true on sync.api hosts.
1400
1400
  }
@@ -1440,7 +1440,7 @@ end
1440
1440
 
1441
1441
  ### Authorization
1442
1442
 
1443
- [api_token_basic](../README.md#api_token_basic)
1443
+ [api_token_basic](../README.md#install-and-configure)
1444
1444
 
1445
1445
  ### HTTP request headers
1446
1446
 
@@ -1510,7 +1510,7 @@ end
1510
1510
 
1511
1511
  ### Authorization
1512
1512
 
1513
- [api_token_basic](../README.md#api_token_basic)
1513
+ [api_token_basic](../README.md#install-and-configure)
1514
1514
 
1515
1515
  ### HTTP request headers
1516
1516
 
@@ -1580,7 +1580,7 @@ end
1580
1580
 
1581
1581
  ### Authorization
1582
1582
 
1583
- [api_token_basic](../README.md#api_token_basic)
1583
+ [api_token_basic](../README.md#install-and-configure)
1584
1584
 
1585
1585
  ### HTTP request headers
1586
1586
 
@@ -1650,7 +1650,7 @@ end
1650
1650
 
1651
1651
  ### Authorization
1652
1652
 
1653
- [api_token_basic](../README.md#api_token_basic)
1653
+ [api_token_basic](../README.md#install-and-configure)
1654
1654
 
1655
1655
  ### HTTP request headers
1656
1656
 
@@ -1720,7 +1720,7 @@ end
1720
1720
 
1721
1721
  ### Authorization
1722
1722
 
1723
- [api_token_basic](../README.md#api_token_basic)
1723
+ [api_token_basic](../README.md#install-and-configure)
1724
1724
 
1725
1725
  ### HTTP request headers
1726
1726
 
@@ -1787,7 +1787,7 @@ This endpoint does not need any parameter.
1787
1787
 
1788
1788
  ### Authorization
1789
1789
 
1790
- [api_token_basic](../README.md#api_token_basic)
1790
+ [api_token_basic](../README.md#install-and-configure)
1791
1791
 
1792
1792
  ### HTTP request headers
1793
1793
 
@@ -1857,7 +1857,7 @@ end
1857
1857
 
1858
1858
  ### Authorization
1859
1859
 
1860
- [api_token_basic](../README.md#api_token_basic)
1860
+ [api_token_basic](../README.md#install-and-configure)
1861
1861
 
1862
1862
  ### HTTP request headers
1863
1863
 
@@ -1927,7 +1927,7 @@ end
1927
1927
 
1928
1928
  ### Authorization
1929
1929
 
1930
- [api_token_basic](../README.md#api_token_basic)
1930
+ [api_token_basic](../README.md#install-and-configure)
1931
1931
 
1932
1932
  ### HTTP request headers
1933
1933
 
@@ -2001,7 +2001,7 @@ end
2001
2001
 
2002
2002
  ### Authorization
2003
2003
 
2004
- [api_token_basic](../README.md#api_token_basic)
2004
+ [api_token_basic](../README.md#install-and-configure)
2005
2005
 
2006
2006
  ### HTTP request headers
2007
2007
 
@@ -2075,7 +2075,7 @@ end
2075
2075
 
2076
2076
  ### Authorization
2077
2077
 
2078
- [api_token_basic](../README.md#api_token_basic)
2078
+ [api_token_basic](../README.md#install-and-configure)
2079
2079
 
2080
2080
  ### HTTP request headers
2081
2081
 
@@ -2149,7 +2149,7 @@ end
2149
2149
 
2150
2150
  ### Authorization
2151
2151
 
2152
- [api_token_basic](../README.md#api_token_basic)
2152
+ [api_token_basic](../README.md#install-and-configure)
2153
2153
 
2154
2154
  ### HTTP request headers
2155
2155
 
@@ -2163,7 +2163,7 @@ end
2163
2163
 
2164
2164
  Generate typed code for a template's submission data
2165
2165
 
2166
- 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, and `just_types=true` leaves out the code that converts JSON to and from the types. Java returns every class in `code`, each under a `// ClassName.java` comment. A template with no named fields returns 422.
2166
+ Generates types for a template's submission data in TypeScript, JavaScript, Ruby, Python, PHP, Java, C#, Elixir, Go or Rust, so your app catches mistakes before it calls the API. `root_type_name` is the type of the whole `data` object, and `just_types=true` leaves out the code that converts JSON to and from the types. Java returns every class in `code`, each under a `// ClassName.java` comment. A template with no named fields returns 422.
2167
2167
 
2168
2168
  ### Examples
2169
2169
 
@@ -2182,7 +2182,7 @@ template_id = 'tpl_1234567890abcdef01' # String | The template's ID.
2182
2182
  lang = DocSpring::ModelCodeLanguage::TYPESCRIPT # ModelCodeLanguage | The language to generate the code in.
2183
2183
  opts = {
2184
2184
  version: 'draft', # String | 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.
2185
- just_types: true # Boolean | Return only the types (interfaces, classes or structs), without the code that converts JSON to and from them. Default false. JavaScript has no types and PHP no types-only code, so theirs is the same either way.
2185
+ just_types: true # Boolean | Return only the types (interfaces, classes or structs), without the code that converts JSON to and from them. Default false. JavaScript has no types, PHP has no types-only code, and Rust's code is only types (serde converts the JSON), so theirs is the same either way.
2186
2186
  }
2187
2187
 
2188
2188
  begin
@@ -2219,7 +2219,7 @@ end
2219
2219
  | **template_id** | **String** | The template's ID. | |
2220
2220
  | **lang** | [**ModelCodeLanguage**](.md) | The language to generate the code in. | |
2221
2221
  | **version** | **String** | 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. | [optional] |
2222
- | **just_types** | **Boolean** | Return only the types (interfaces, classes or structs), without the code that converts JSON to and from them. Default false. JavaScript has no types and PHP no types-only code, so theirs is the same either way. | [optional] |
2222
+ | **just_types** | **Boolean** | Return only the types (interfaces, classes or structs), without the code that converts JSON to and from them. Default false. JavaScript has no types, PHP has no types-only code, and Rust's code is only types (serde converts the JSON), so theirs is the same either way. | [optional] |
2223
2223
 
2224
2224
  ### Return type
2225
2225
 
@@ -2227,7 +2227,7 @@ end
2227
2227
 
2228
2228
  ### Authorization
2229
2229
 
2230
- [api_token_basic](../README.md#api_token_basic)
2230
+ [api_token_basic](../README.md#install-and-configure)
2231
2231
 
2232
2232
  ### HTTP request headers
2233
2233
 
@@ -2301,7 +2301,7 @@ end
2301
2301
 
2302
2302
  ### Authorization
2303
2303
 
2304
- [api_token_basic](../README.md#api_token_basic)
2304
+ [api_token_basic](../README.md#install-and-configure)
2305
2305
 
2306
2306
  ### HTTP request headers
2307
2307
 
@@ -2373,7 +2373,7 @@ end
2373
2373
 
2374
2374
  ### Authorization
2375
2375
 
2376
- [api_token_basic](../README.md#api_token_basic)
2376
+ [api_token_basic](../README.md#install-and-configure)
2377
2377
 
2378
2378
  ### HTTP request headers
2379
2379
 
@@ -2447,7 +2447,7 @@ end
2447
2447
 
2448
2448
  ### Authorization
2449
2449
 
2450
- [api_token_basic](../README.md#api_token_basic)
2450
+ [api_token_basic](../README.md#install-and-configure)
2451
2451
 
2452
2452
  ### HTTP request headers
2453
2453
 
@@ -2517,7 +2517,7 @@ end
2517
2517
 
2518
2518
  ### Authorization
2519
2519
 
2520
- [api_token_basic](../README.md#api_token_basic)
2520
+ [api_token_basic](../README.md#install-and-configure)
2521
2521
 
2522
2522
  ### HTTP request headers
2523
2523
 
@@ -2591,7 +2591,7 @@ end
2591
2591
 
2592
2592
  ### Authorization
2593
2593
 
2594
- [api_token_basic](../README.md#api_token_basic)
2594
+ [api_token_basic](../README.md#install-and-configure)
2595
2595
 
2596
2596
  ### HTTP request headers
2597
2597
 
@@ -2665,7 +2665,7 @@ end
2665
2665
 
2666
2666
  ### Authorization
2667
2667
 
2668
- [api_token_basic](../README.md#api_token_basic)
2668
+ [api_token_basic](../README.md#install-and-configure)
2669
2669
 
2670
2670
  ### HTTP request headers
2671
2671
 
@@ -2741,7 +2741,7 @@ end
2741
2741
 
2742
2742
  ### Authorization
2743
2743
 
2744
- [api_token_basic](../README.md#api_token_basic)
2744
+ [api_token_basic](../README.md#install-and-configure)
2745
2745
 
2746
2746
  ### HTTP request headers
2747
2747
 
@@ -2829,7 +2829,7 @@ end
2829
2829
 
2830
2830
  ### Authorization
2831
2831
 
2832
- [api_token_basic](../README.md#api_token_basic)
2832
+ [api_token_basic](../README.md#install-and-configure)
2833
2833
 
2834
2834
  ### HTTP request headers
2835
2835
 
@@ -2903,7 +2903,7 @@ end
2903
2903
 
2904
2904
  ### Authorization
2905
2905
 
2906
- [api_token_basic](../README.md#api_token_basic)
2906
+ [api_token_basic](../README.md#install-and-configure)
2907
2907
 
2908
2908
  ### HTTP request headers
2909
2909
 
@@ -2991,7 +2991,7 @@ end
2991
2991
 
2992
2992
  ### Authorization
2993
2993
 
2994
- [api_token_basic](../README.md#api_token_basic)
2994
+ [api_token_basic](../README.md#install-and-configure)
2995
2995
 
2996
2996
  ### HTTP request headers
2997
2997
 
@@ -3069,7 +3069,7 @@ end
3069
3069
 
3070
3070
  ### Authorization
3071
3071
 
3072
- [api_token_basic](../README.md#api_token_basic)
3072
+ [api_token_basic](../README.md#install-and-configure)
3073
3073
 
3074
3074
  ### HTTP request headers
3075
3075
 
@@ -3153,7 +3153,7 @@ end
3153
3153
 
3154
3154
  ### Authorization
3155
3155
 
3156
- [api_token_basic](../README.md#api_token_basic)
3156
+ [api_token_basic](../README.md#install-and-configure)
3157
3157
 
3158
3158
  ### HTTP request headers
3159
3159
 
@@ -3225,7 +3225,7 @@ end
3225
3225
 
3226
3226
  ### Authorization
3227
3227
 
3228
- [api_token_basic](../README.md#api_token_basic)
3228
+ [api_token_basic](../README.md#install-and-configure)
3229
3229
 
3230
3230
  ### HTTP request headers
3231
3231
 
@@ -3297,7 +3297,7 @@ end
3297
3297
 
3298
3298
  ### Authorization
3299
3299
 
3300
- [api_token_basic](../README.md#api_token_basic)
3300
+ [api_token_basic](../README.md#install-and-configure)
3301
3301
 
3302
3302
  ### HTTP request headers
3303
3303
 
@@ -3311,7 +3311,7 @@ end
3311
3311
 
3312
3312
  Publish a template version
3313
3313
 
3314
- 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.
3314
+ Publishes the template's draft as a new version. Its content (the PDF or HTML, fields, name and description) never changes, while settings such as `webhook_url` and `public_submissions` keep following the draft. `version_type` says which part of the latest version number goes up. While the template's PDF is downloading or being processed, or DocSpring is setting up its fields, it returns a 409 that says so.
3315
3315
 
3316
3316
  ### Examples
3317
3317
 
@@ -3369,7 +3369,7 @@ end
3369
3369
 
3370
3370
  ### Authorization
3371
3371
 
3372
- [api_token_basic](../README.md#api_token_basic)
3372
+ [api_token_basic](../README.md#install-and-configure)
3373
3373
 
3374
3374
  ### HTTP request headers
3375
3375
 
@@ -3441,7 +3441,7 @@ end
3441
3441
 
3442
3442
  ### Authorization
3443
3443
 
3444
- [api_token_basic](../README.md#api_token_basic)
3444
+ [api_token_basic](../README.md#install-and-configure)
3445
3445
 
3446
3446
  ### HTTP request headers
3447
3447
 
@@ -3513,7 +3513,7 @@ end
3513
3513
 
3514
3514
  ### Authorization
3515
3515
 
3516
- [api_token_basic](../README.md#api_token_basic)
3516
+ [api_token_basic](../README.md#install-and-configure)
3517
3517
 
3518
3518
  ### HTTP request headers
3519
3519
 
@@ -3585,7 +3585,7 @@ end
3585
3585
 
3586
3586
  ### Authorization
3587
3587
 
3588
- [api_token_basic](../README.md#api_token_basic)
3588
+ [api_token_basic](../README.md#install-and-configure)
3589
3589
 
3590
3590
  ### HTTP request headers
3591
3591
 
@@ -3599,7 +3599,7 @@ end
3599
3599
 
3600
3600
  Restore a template version
3601
3601
 
3602
- Replaces the template's draft with a copy of one of its published versions.
3602
+ Replaces the template's draft with a copy of one of its published versions. The draft keeps its settings that apply to every version, such as `webhook_url`.
3603
3603
 
3604
3604
  ### Examples
3605
3605
 
@@ -3657,7 +3657,7 @@ end
3657
3657
 
3658
3658
  ### Authorization
3659
3659
 
3660
- [api_token_basic](../README.md#api_token_basic)
3660
+ [api_token_basic](../README.md#install-and-configure)
3661
3661
 
3662
3662
  ### HTTP request headers
3663
3663
 
@@ -3724,7 +3724,7 @@ This endpoint does not need any parameter.
3724
3724
 
3725
3725
  ### Authorization
3726
3726
 
3727
- [api_token_basic](../README.md#api_token_basic)
3727
+ [api_token_basic](../README.md#install-and-configure)
3728
3728
 
3729
3729
  ### HTTP request headers
3730
3730
 
@@ -3796,7 +3796,7 @@ end
3796
3796
 
3797
3797
  ### Authorization
3798
3798
 
3799
- [api_token_basic](../README.md#api_token_basic)
3799
+ [api_token_basic](../README.md#install-and-configure)
3800
3800
 
3801
3801
  ### HTTP request headers
3802
3802
 
@@ -3810,7 +3810,7 @@ end
3810
3810
 
3811
3811
  Update a template
3812
3812
 
3813
- 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.
3813
+ Changes a template's draft. Properties left out keep their values. `defaults` and `html_engine_options` replace the whole object, and `field_groups` changes only the groups it lists. Settings such as `webhook_url`, `public_submissions` and `expire_after` apply to every published version too, and setting `parent_folder_id` moves the template and all of its published versions.
3814
3814
 
3815
3815
  ### Examples
3816
3816
 
@@ -3868,7 +3868,7 @@ end
3868
3868
 
3869
3869
  ### Authorization
3870
3870
 
3871
- [api_token_basic](../README.md#api_token_basic)
3871
+ [api_token_basic](../README.md#install-and-configure)
3872
3872
 
3873
3873
  ### HTTP request headers
3874
3874
 
@@ -3880,9 +3880,9 @@ end
3880
3880
 
3881
3881
  > <Template> update_template_document(template_id, body, opts)
3882
3882
 
3883
- Replace a template's PDF
3883
+ Replace a template's document
3884
3884
 
3885
- 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.
3885
+ Replaces a PDF template's PDF, or a Word template's Word document (from a .docx or an .odt), with one you uploaded with the presigned upload (GET /uploads/presign) (`cache_id`), a link to download it from (`document_url`), or the file in base64 (`document_base64`). A PDF template's fields stay where they are, unless `reimport_fields` replaces them with the new PDF's fillable fields, and a Word template gets a field for each new tag. To send the file as `multipart/form-data` instead, use PUT /templates/{template_id}/document/upload.
3886
3886
 
3887
3887
  ### Examples
3888
3888
 
@@ -3898,13 +3898,13 @@ end
3898
3898
 
3899
3899
  api_instance = DocSpring::Client.new
3900
3900
  template_id = 'tpl_1234567890abcdef01' # String | The template's ID.
3901
- body = DocSpring::UpdateTemplateDocumentRequest.new # UpdateTemplateDocumentRequest | The new PDF, as one of `cache_id`, `document_url` and `document_base64`.
3901
+ body = DocSpring::UpdateTemplateDocumentRequest.new # UpdateTemplateDocumentRequest | The new PDF, or a Word template's new Word document, as one of `cache_id`, `document_url` and `document_base64`.
3902
3902
  opts = {
3903
- wait: true # Boolean | Wait until the PDF has been processed, and a `document_url` downloaded, before responding. Default true on sync.api hosts.
3903
+ wait: true # Boolean | Wait until the PDF has been processed, a `document_url`'s PDF or Word document downloaded, and an OpenDocument file converted, before responding. Default true on sync.api hosts.
3904
3904
  }
3905
3905
 
3906
3906
  begin
3907
- # Replace a template's PDF
3907
+ # Replace a template's document
3908
3908
  result = api_instance.update_template_document(template_id, body, opts)
3909
3909
  p result
3910
3910
  rescue DocSpring::ApiError => e
@@ -3920,7 +3920,7 @@ This returns an Array which contains the response data, status code and headers.
3920
3920
 
3921
3921
  ```ruby
3922
3922
  begin
3923
- # Replace a template's PDF
3923
+ # Replace a template's document
3924
3924
  data, status_code, headers = api_instance.update_template_document_with_http_info(template_id, body, opts)
3925
3925
  p status_code # => 2xx
3926
3926
  p headers # => { ... }
@@ -3935,8 +3935,8 @@ end
3935
3935
  | Name | Type | Description | Notes |
3936
3936
  | ---- | ---- | ----------- | ----- |
3937
3937
  | **template_id** | **String** | The template's ID. | |
3938
- | **body** | [**UpdateTemplateDocumentRequest**](UpdateTemplateDocumentRequest.md) | The new PDF, as one of `cache_id`, `document_url` and `document_base64`. | |
3939
- | **wait** | **Boolean** | Wait until the PDF has been processed, and a `document_url` downloaded, before responding. Default true on sync.api hosts. | [optional] |
3938
+ | **body** | [**UpdateTemplateDocumentRequest**](UpdateTemplateDocumentRequest.md) | The new PDF, or a Word template's new Word document, as one of `cache_id`, `document_url` and `document_base64`. | |
3939
+ | **wait** | **Boolean** | Wait until the PDF has been processed, a `document_url`'s PDF or Word document downloaded, and an OpenDocument file converted, before responding. Default true on sync.api hosts. | [optional] |
3940
3940
 
3941
3941
  ### Return type
3942
3942
 
@@ -3944,7 +3944,7 @@ end
3944
3944
 
3945
3945
  ### Authorization
3946
3946
 
3947
- [api_token_basic](../README.md#api_token_basic)
3947
+ [api_token_basic](../README.md#install-and-configure)
3948
3948
 
3949
3949
  ### HTTP request headers
3950
3950
 
@@ -4016,7 +4016,7 @@ end
4016
4016
 
4017
4017
  ### Authorization
4018
4018
 
4019
- [api_token_basic](../README.md#api_token_basic)
4019
+ [api_token_basic](../README.md#install-and-configure)
4020
4020
 
4021
4021
  ### HTTP request headers
4022
4022
 
@@ -4088,7 +4088,7 @@ end
4088
4088
 
4089
4089
  ### Authorization
4090
4090
 
4091
- [api_token_basic](../README.md#api_token_basic)
4091
+ [api_token_basic](../README.md#install-and-configure)
4092
4092
 
4093
4093
  ### HTTP request headers
4094
4094
 
@@ -4100,9 +4100,9 @@ end
4100
4100
 
4101
4101
  > <Template> upload_template(document, opts)
4102
4102
 
4103
- Create a PDF template from an uploaded PDF
4103
+ Create a template from an uploaded PDF or Word document
4104
4104
 
4105
- 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.
4105
+ Creates a PDF template from a PDF, or a Word template from a Word document (.docx) or an OpenDocument text file (.odt), sent with the request (`multipart/form-data`). A Word template needs its `output_format`. For large files, upload the file with the presigned upload (GET /uploads/presign) and create the template with POST /templates.
4106
4106
 
4107
4107
  ### Examples
4108
4108
 
@@ -4117,9 +4117,9 @@ DocSpring.configure do |config|
4117
4117
  end
4118
4118
 
4119
4119
  api_instance = DocSpring::Client.new
4120
- document = File.new('/path/to/some/file') # File | The PDF.
4120
+ document = File.new('/path/to/some/file') # File | A PDF (for a PDF template) or a Word document (.docx or .odt, for a Word template). DocSpring converts an OpenDocument text file (.odt) to a Word document after responding: the template's `document.state` is `converting` until then (sync.api hosts wait for it).
4121
4121
  opts = {
4122
- wait: true, # Boolean | Wait until the PDF has been processed, and a `document_url` downloaded, before responding. Default true on sync.api hosts.
4122
+ wait: true, # Boolean | Wait until the PDF has been processed, a `document_url`'s PDF or Word document downloaded, and an OpenDocument file converted, before responding. Default true on sync.api hosts.
4123
4123
  name: 'name_example', # String | The template's name.
4124
4124
  description: 'description_example', # String | The template's description.
4125
4125
  parent_folder_id: 'parent_folder_id_example', # String | The folder to put the template in. Left out, it's created at the root.
@@ -4127,11 +4127,12 @@ opts = {
4127
4127
  detect_fields: true, # Boolean | 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.
4128
4128
  field_source: DocSpring::FieldSetupSource::AUTO, # FieldSetupSource | 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.
4129
4129
  field_naming: DocSpring::FieldSetupNaming::AI, # FieldSetupNaming | 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`.
4130
- field_logic: DocSpring::FieldSetupLogic::AI # FieldSetupLogic | 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.
4130
+ field_logic: DocSpring::FieldSetupLogic::AI, # FieldSetupLogic | 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.
4131
+ output_format: DocSpring::OutputFormat::PDF # OutputFormat | What each submission of a Word template makes unless its request sets `output_formats`: `docx` (a Word document), `odt` (an OpenDocument file, converted from the Word document) or `pdf`. Required when `document` is a Word document.
4131
4132
  }
4132
4133
 
4133
4134
  begin
4134
- # Create a PDF template from an uploaded PDF
4135
+ # Create a template from an uploaded PDF or Word document
4135
4136
  result = api_instance.upload_template(document, opts)
4136
4137
  p result
4137
4138
  rescue DocSpring::ApiError => e
@@ -4147,7 +4148,7 @@ This returns an Array which contains the response data, status code and headers.
4147
4148
 
4148
4149
  ```ruby
4149
4150
  begin
4150
- # Create a PDF template from an uploaded PDF
4151
+ # Create a template from an uploaded PDF or Word document
4151
4152
  data, status_code, headers = api_instance.upload_template_with_http_info(document, opts)
4152
4153
  p status_code # => 2xx
4153
4154
  p headers # => { ... }
@@ -4161,8 +4162,8 @@ end
4161
4162
 
4162
4163
  | Name | Type | Description | Notes |
4163
4164
  | ---- | ---- | ----------- | ----- |
4164
- | **document** | **File** | The PDF. | |
4165
- | **wait** | **Boolean** | Wait until the PDF has been processed, and a `document_url` downloaded, before responding. Default true on sync.api hosts. | [optional] |
4165
+ | **document** | **File** | A PDF (for a PDF template) or a Word document (.docx or .odt, for a Word template). DocSpring converts an OpenDocument text file (.odt) to a Word document after responding: the template's `document.state` is `converting` until then (sync.api hosts wait for it). | |
4166
+ | **wait** | **Boolean** | Wait until the PDF has been processed, a `document_url`'s PDF or Word document downloaded, and an OpenDocument file converted, before responding. Default true on sync.api hosts. | [optional] |
4166
4167
  | **name** | **String** | The template's name. | [optional] |
4167
4168
  | **description** | **String** | The template's description. | [optional] |
4168
4169
  | **parent_folder_id** | **String** | The folder to put the template in. Left out, it's created at the root. | [optional] |
@@ -4171,6 +4172,7 @@ end
4171
4172
  | **field_source** | [**FieldSetupSource**](FieldSetupSource.md) | 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. | [optional] |
4172
4173
  | **field_naming** | [**FieldSetupNaming**](FieldSetupNaming.md) | 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`. | [optional] |
4173
4174
  | **field_logic** | [**FieldSetupLogic**](FieldSetupLogic.md) | 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. | [optional] |
4175
+ | **output_format** | [**OutputFormat**](OutputFormat.md) | What each submission of a Word template makes unless its request sets `output_formats`: `docx` (a Word document), `odt` (an OpenDocument file, converted from the Word document) or `pdf`. Required when `document` is a Word document. | [optional] |
4174
4176
 
4175
4177
  ### Return type
4176
4178
 
@@ -4178,7 +4180,7 @@ end
4178
4180
 
4179
4181
  ### Authorization
4180
4182
 
4181
- [api_token_basic](../README.md#api_token_basic)
4183
+ [api_token_basic](../README.md#install-and-configure)
4182
4184
 
4183
4185
  ### HTTP request headers
4184
4186
 
@@ -4190,9 +4192,9 @@ end
4190
4192
 
4191
4193
  > <Template> upload_template_document(template_id, document, opts)
4192
4194
 
4193
- Replace a template's PDF with an uploaded PDF
4195
+ Replace a template's document with an uploaded file
4194
4196
 
4195
- 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.
4197
+ Replaces a PDF template's PDF, or a Word template's Word document, with one sent with the request (`multipart/form-data`). A PDF template's fields stay where they are, unless `reimport_fields` replaces them with the new PDF's fillable fields, and a Word template gets a field for each new tag.
4196
4198
 
4197
4199
  ### Examples
4198
4200
 
@@ -4208,14 +4210,14 @@ end
4208
4210
 
4209
4211
  api_instance = DocSpring::Client.new
4210
4212
  template_id = 'tpl_1234567890abcdef01' # String | The template's ID.
4211
- document = File.new('/path/to/some/file') # File | The new PDF.
4213
+ document = File.new('/path/to/some/file') # File | The new PDF, or the new Word document (.docx or .odt) of a Word template.
4212
4214
  opts = {
4213
- wait: true, # Boolean | Wait until the PDF has been processed, and a `document_url` downloaded, before responding. Default true on sync.api hosts.
4214
- reimport_fields: true # Boolean | 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.
4215
+ wait: true, # Boolean | Wait until the PDF has been processed, a `document_url`'s PDF or Word document downloaded, and an OpenDocument file converted, before responding. Default true on sync.api hosts.
4216
+ reimport_fields: true # Boolean | Replace all of the template's fields with the fillable fields in the new PDF, once DocSpring has processed it (`document.field_reimport_state`). As on a first upload, the default typeface, font size, bold and color are taken from the PDF's fields; the template's other settings are kept. If the PDF has no fillable fields, the template keeps its fields. A locked template can't re-import its fields. Only for PDF templates: a Word template adds a field for each new tag.
4215
4217
  }
4216
4218
 
4217
4219
  begin
4218
- # Replace a template's PDF with an uploaded PDF
4220
+ # Replace a template's document with an uploaded file
4219
4221
  result = api_instance.upload_template_document(template_id, document, opts)
4220
4222
  p result
4221
4223
  rescue DocSpring::ApiError => e
@@ -4231,7 +4233,7 @@ This returns an Array which contains the response data, status code and headers.
4231
4233
 
4232
4234
  ```ruby
4233
4235
  begin
4234
- # Replace a template's PDF with an uploaded PDF
4236
+ # Replace a template's document with an uploaded file
4235
4237
  data, status_code, headers = api_instance.upload_template_document_with_http_info(template_id, document, opts)
4236
4238
  p status_code # => 2xx
4237
4239
  p headers # => { ... }
@@ -4246,9 +4248,9 @@ end
4246
4248
  | Name | Type | Description | Notes |
4247
4249
  | ---- | ---- | ----------- | ----- |
4248
4250
  | **template_id** | **String** | The template's ID. | |
4249
- | **document** | **File** | The new PDF. | |
4250
- | **wait** | **Boolean** | Wait until the PDF has been processed, and a `document_url` downloaded, before responding. Default true on sync.api hosts. | [optional] |
4251
- | **reimport_fields** | **Boolean** | 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. | [optional] |
4251
+ | **document** | **File** | The new PDF, or the new Word document (.docx or .odt) of a Word template. | |
4252
+ | **wait** | **Boolean** | Wait until the PDF has been processed, a `document_url`'s PDF or Word document downloaded, and an OpenDocument file converted, before responding. Default true on sync.api hosts. | [optional] |
4253
+ | **reimport_fields** | **Boolean** | Replace all of the template's fields with the fillable fields in the new PDF, once DocSpring has processed it (`document.field_reimport_state`). As on a first upload, the default typeface, font size, bold and color are taken from the PDF's fields; the template's other settings are kept. If the PDF has no fillable fields, the template keeps its fields. A locked template can't re-import its fields. Only for PDF templates: a Word template adds a field for each new tag. | [optional] |
4252
4254
 
4253
4255
  ### Return type
4254
4256
 
@@ -4256,7 +4258,7 @@ end
4256
4258
 
4257
4259
  ### Authorization
4258
4260
 
4259
- [api_token_basic](../README.md#api_token_basic)
4261
+ [api_token_basic](../README.md#install-and-configure)
4260
4262
 
4261
4263
  ### HTTP request headers
4262
4264
 
@@ -4332,7 +4334,7 @@ end
4332
4334
 
4333
4335
  ### Authorization
4334
4336
 
4335
- [api_token_basic](../README.md#api_token_basic)
4337
+ [api_token_basic](../README.md#install-and-configure)
4336
4338
 
4337
4339
  ### HTTP request headers
4338
4340