signwell_sdk 0.0.1.pre.alpha.1

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 (227) hide show
  1. checksums.yaml +7 -0
  2. data/.ignore +2 -0
  3. data/CHANGELOG.md +24 -0
  4. data/README.md +398 -0
  5. data/SECURITY.md +23 -0
  6. data/lib/signwell_sdk/client.rb +72 -0
  7. data/lib/signwell_sdk/errors.rb +228 -0
  8. data/lib/signwell_sdk/file_part.rb +58 -0
  9. data/lib/signwell_sdk/internal/transport/base_client.rb +573 -0
  10. data/lib/signwell_sdk/internal/transport/pooled_net_requester.rb +210 -0
  11. data/lib/signwell_sdk/internal/type/array_of.rb +168 -0
  12. data/lib/signwell_sdk/internal/type/base_model.rb +531 -0
  13. data/lib/signwell_sdk/internal/type/base_page.rb +55 -0
  14. data/lib/signwell_sdk/internal/type/boolean.rb +77 -0
  15. data/lib/signwell_sdk/internal/type/converter.rb +327 -0
  16. data/lib/signwell_sdk/internal/type/enum.rb +156 -0
  17. data/lib/signwell_sdk/internal/type/file_input.rb +111 -0
  18. data/lib/signwell_sdk/internal/type/hash_of.rb +188 -0
  19. data/lib/signwell_sdk/internal/type/request_parameters.rb +42 -0
  20. data/lib/signwell_sdk/internal/type/union.rb +243 -0
  21. data/lib/signwell_sdk/internal/type/unknown.rb +81 -0
  22. data/lib/signwell_sdk/internal/util.rb +920 -0
  23. data/lib/signwell_sdk/internal.rb +20 -0
  24. data/lib/signwell_sdk/models/attachment_request_info.rb +34 -0
  25. data/lib/signwell_sdk/models/checkbox_group_info.rb +66 -0
  26. data/lib/signwell_sdk/models/checkbox_validation.rb +18 -0
  27. data/lib/signwell_sdk/models/copied_contact_info.rb +34 -0
  28. data/lib/signwell_sdk/models/date_format.rb +20 -0
  29. data/lib/signwell_sdk/models/field_type.rb +29 -0
  30. data/lib/signwell_sdk/models/file_info.rb +26 -0
  31. data/lib/signwell_sdk/models/label_info.rb +26 -0
  32. data/lib/signwell_sdk/models/text_validation.rb +25 -0
  33. data/lib/signwell_sdk/models/v1/api_application_delete_params.rb +16 -0
  34. data/lib/signwell_sdk/models/v1/api_application_retrieve_params.rb +16 -0
  35. data/lib/signwell_sdk/models/v1/attachment_request.rb +38 -0
  36. data/lib/signwell_sdk/models/v1/bulk_send_create_params.rb +107 -0
  37. data/lib/signwell_sdk/models/v1/bulk_send_list_params.rb +55 -0
  38. data/lib/signwell_sdk/models/v1/bulk_send_retrieve_csv_template_params.rb +39 -0
  39. data/lib/signwell_sdk/models/v1/bulk_send_retrieve_documents_params.rb +32 -0
  40. data/lib/signwell_sdk/models/v1/bulk_send_retrieve_params.rb +16 -0
  41. data/lib/signwell_sdk/models/v1/bulk_send_validate_csv_params.rb +39 -0
  42. data/lib/signwell_sdk/models/v1/checkbox_group.rb +80 -0
  43. data/lib/signwell_sdk/models/v1/copied_contact.rb +26 -0
  44. data/lib/signwell_sdk/models/v1/document.rb +543 -0
  45. data/lib/signwell_sdk/models/v1/document_create_from_template_params.rb +740 -0
  46. data/lib/signwell_sdk/models/v1/document_create_from_template_response.rb +500 -0
  47. data/lib/signwell_sdk/models/v1/document_create_params.rb +620 -0
  48. data/lib/signwell_sdk/models/v1/document_delete_params.rb +16 -0
  49. data/lib/signwell_sdk/models/v1/document_file.rb +34 -0
  50. data/lib/signwell_sdk/models/v1/document_list_params.rb +32 -0
  51. data/lib/signwell_sdk/models/v1/document_list_response.rb +50 -0
  52. data/lib/signwell_sdk/models/v1/document_remind_params.rb +49 -0
  53. data/lib/signwell_sdk/models/v1/document_retrieve_completed_pdf_params.rb +55 -0
  54. data/lib/signwell_sdk/models/v1/document_retrieve_completed_pdf_response.rb +22 -0
  55. data/lib/signwell_sdk/models/v1/document_retrieve_params.rb +16 -0
  56. data/lib/signwell_sdk/models/v1/document_send_params.rb +198 -0
  57. data/lib/signwell_sdk/models/v1/document_template.rb +503 -0
  58. data/lib/signwell_sdk/models/v1/document_template_create_params.rb +599 -0
  59. data/lib/signwell_sdk/models/v1/document_template_delete_params.rb +16 -0
  60. data/lib/signwell_sdk/models/v1/document_template_list_params.rb +32 -0
  61. data/lib/signwell_sdk/models/v1/document_template_list_response.rb +50 -0
  62. data/lib/signwell_sdk/models/v1/document_template_retrieve_params.rb +16 -0
  63. data/lib/signwell_sdk/models/v1/document_template_update_params.rb +162 -0
  64. data/lib/signwell_sdk/models/v1/hook_create_params.rb +32 -0
  65. data/lib/signwell_sdk/models/v1/hook_delete_params.rb +16 -0
  66. data/lib/signwell_sdk/models/v1/hook_list_params.rb +16 -0
  67. data/lib/signwell_sdk/models/v1/label.rb +22 -0
  68. data/lib/signwell_sdk/models/v1/template_checkbox_group.rb +80 -0
  69. data/lib/signwell_sdk/models/v1_me_params.rb +14 -0
  70. data/lib/signwell_sdk/models.rb +63 -0
  71. data/lib/signwell_sdk/request_options.rb +77 -0
  72. data/lib/signwell_sdk/resources/v1/api_applications.rb +59 -0
  73. data/lib/signwell_sdk/resources/v1/bulk_sends.rb +198 -0
  74. data/lib/signwell_sdk/resources/v1/document_templates.rb +204 -0
  75. data/lib/signwell_sdk/resources/v1/documents.rb +372 -0
  76. data/lib/signwell_sdk/resources/v1/hooks.rb +78 -0
  77. data/lib/signwell_sdk/resources/v1.rb +47 -0
  78. data/lib/signwell_sdk/version.rb +5 -0
  79. data/lib/signwell_sdk.rb +107 -0
  80. data/manifest.yaml +17 -0
  81. data/rbi/signwell_sdk/client.rbi +49 -0
  82. data/rbi/signwell_sdk/errors.rbi +205 -0
  83. data/rbi/signwell_sdk/file_part.rbi +37 -0
  84. data/rbi/signwell_sdk/internal/transport/base_client.rbi +302 -0
  85. data/rbi/signwell_sdk/internal/transport/pooled_net_requester.rbi +84 -0
  86. data/rbi/signwell_sdk/internal/type/array_of.rbi +104 -0
  87. data/rbi/signwell_sdk/internal/type/base_model.rbi +308 -0
  88. data/rbi/signwell_sdk/internal/type/base_page.rbi +43 -0
  89. data/rbi/signwell_sdk/internal/type/boolean.rbi +58 -0
  90. data/rbi/signwell_sdk/internal/type/converter.rbi +216 -0
  91. data/rbi/signwell_sdk/internal/type/enum.rbi +82 -0
  92. data/rbi/signwell_sdk/internal/type/file_input.rbi +59 -0
  93. data/rbi/signwell_sdk/internal/type/hash_of.rbi +104 -0
  94. data/rbi/signwell_sdk/internal/type/request_parameters.rbi +31 -0
  95. data/rbi/signwell_sdk/internal/type/union.rbi +128 -0
  96. data/rbi/signwell_sdk/internal/type/unknown.rbi +58 -0
  97. data/rbi/signwell_sdk/internal/util.rbi +487 -0
  98. data/rbi/signwell_sdk/internal.rbi +18 -0
  99. data/rbi/signwell_sdk/models/attachment_request_info.rbi +52 -0
  100. data/rbi/signwell_sdk/models/checkbox_group_info.rbi +89 -0
  101. data/rbi/signwell_sdk/models/checkbox_validation.rbi +27 -0
  102. data/rbi/signwell_sdk/models/copied_contact_info.rbi +50 -0
  103. data/rbi/signwell_sdk/models/date_format.rbi +26 -0
  104. data/rbi/signwell_sdk/models/field_type.rbi +41 -0
  105. data/rbi/signwell_sdk/models/file_info.rbi +36 -0
  106. data/rbi/signwell_sdk/models/label_info.rbi +40 -0
  107. data/rbi/signwell_sdk/models/text_validation.rbi +44 -0
  108. data/rbi/signwell_sdk/models/v1/api_application_delete_params.rbi +34 -0
  109. data/rbi/signwell_sdk/models/v1/api_application_retrieve_params.rbi +34 -0
  110. data/rbi/signwell_sdk/models/v1/attachment_request.rbi +59 -0
  111. data/rbi/signwell_sdk/models/v1/bulk_send_create_params.rbi +160 -0
  112. data/rbi/signwell_sdk/models/v1/bulk_send_list_params.rbi +92 -0
  113. data/rbi/signwell_sdk/models/v1/bulk_send_retrieve_csv_template_params.rbi +67 -0
  114. data/rbi/signwell_sdk/models/v1/bulk_send_retrieve_documents_params.rbi +62 -0
  115. data/rbi/signwell_sdk/models/v1/bulk_send_retrieve_params.rbi +34 -0
  116. data/rbi/signwell_sdk/models/v1/bulk_send_validate_csv_params.rbi +64 -0
  117. data/rbi/signwell_sdk/models/v1/checkbox_group.rbi +121 -0
  118. data/rbi/signwell_sdk/models/v1/copied_contact.rbi +41 -0
  119. data/rbi/signwell_sdk/models/v1/document.rbi +833 -0
  120. data/rbi/signwell_sdk/models/v1/document_create_from_template_params.rbi +1270 -0
  121. data/rbi/signwell_sdk/models/v1/document_create_from_template_response.rbi +856 -0
  122. data/rbi/signwell_sdk/models/v1/document_create_params.rbi +1019 -0
  123. data/rbi/signwell_sdk/models/v1/document_delete_params.rbi +34 -0
  124. data/rbi/signwell_sdk/models/v1/document_file.rbi +55 -0
  125. data/rbi/signwell_sdk/models/v1/document_list_params.rbi +62 -0
  126. data/rbi/signwell_sdk/models/v1/document_list_response.rbi +71 -0
  127. data/rbi/signwell_sdk/models/v1/document_remind_params.rbi +107 -0
  128. data/rbi/signwell_sdk/models/v1/document_retrieve_completed_pdf_params.rbi +123 -0
  129. data/rbi/signwell_sdk/models/v1/document_retrieve_completed_pdf_response.rbi +34 -0
  130. data/rbi/signwell_sdk/models/v1/document_retrieve_params.rbi +34 -0
  131. data/rbi/signwell_sdk/models/v1/document_send_params.rbi +307 -0
  132. data/rbi/signwell_sdk/models/v1/document_template.rbi +830 -0
  133. data/rbi/signwell_sdk/models/v1/document_template_create_params.rbi +1050 -0
  134. data/rbi/signwell_sdk/models/v1/document_template_delete_params.rbi +34 -0
  135. data/rbi/signwell_sdk/models/v1/document_template_list_params.rbi +62 -0
  136. data/rbi/signwell_sdk/models/v1/document_template_list_response.rbi +71 -0
  137. data/rbi/signwell_sdk/models/v1/document_template_retrieve_params.rbi +34 -0
  138. data/rbi/signwell_sdk/models/v1/document_template_update_params.rbi +257 -0
  139. data/rbi/signwell_sdk/models/v1/hook_create_params.rbi +59 -0
  140. data/rbi/signwell_sdk/models/v1/hook_delete_params.rbi +34 -0
  141. data/rbi/signwell_sdk/models/v1/hook_list_params.rbi +34 -0
  142. data/rbi/signwell_sdk/models/v1/label.rbi +29 -0
  143. data/rbi/signwell_sdk/models/v1/template_checkbox_group.rbi +121 -0
  144. data/rbi/signwell_sdk/models/v1_me_params.rbi +27 -0
  145. data/rbi/signwell_sdk/models.rbi +25 -0
  146. data/rbi/signwell_sdk/request_options.rbi +59 -0
  147. data/rbi/signwell_sdk/resources/v1/api_applications.rbi +45 -0
  148. data/rbi/signwell_sdk/resources/v1/bulk_sends.rbi +173 -0
  149. data/rbi/signwell_sdk/resources/v1/document_templates.rbi +276 -0
  150. data/rbi/signwell_sdk/resources/v1/documents.rbi +527 -0
  151. data/rbi/signwell_sdk/resources/v1/hooks.rbi +52 -0
  152. data/rbi/signwell_sdk/resources/v1.rbi +32 -0
  153. data/rbi/signwell_sdk/version.rbi +5 -0
  154. data/sig/signwell_sdk/client.rbs +26 -0
  155. data/sig/signwell_sdk/errors.rbs +117 -0
  156. data/sig/signwell_sdk/file_part.rbs +21 -0
  157. data/sig/signwell_sdk/internal/transport/base_client.rbs +133 -0
  158. data/sig/signwell_sdk/internal/transport/pooled_net_requester.rbs +48 -0
  159. data/sig/signwell_sdk/internal/type/array_of.rbs +48 -0
  160. data/sig/signwell_sdk/internal/type/base_model.rbs +102 -0
  161. data/sig/signwell_sdk/internal/type/base_page.rbs +24 -0
  162. data/sig/signwell_sdk/internal/type/boolean.rbs +26 -0
  163. data/sig/signwell_sdk/internal/type/converter.rbs +79 -0
  164. data/sig/signwell_sdk/internal/type/enum.rbs +32 -0
  165. data/sig/signwell_sdk/internal/type/file_input.rbs +25 -0
  166. data/sig/signwell_sdk/internal/type/hash_of.rbs +48 -0
  167. data/sig/signwell_sdk/internal/type/request_parameters.rbs +19 -0
  168. data/sig/signwell_sdk/internal/type/union.rbs +52 -0
  169. data/sig/signwell_sdk/internal/type/unknown.rbs +26 -0
  170. data/sig/signwell_sdk/internal/util.rbs +185 -0
  171. data/sig/signwell_sdk/internal.rbs +9 -0
  172. data/sig/signwell_sdk/models/attachment_request_info.rbs +19 -0
  173. data/sig/signwell_sdk/models/checkbox_group_info.rbs +52 -0
  174. data/sig/signwell_sdk/models/checkbox_validation.rbs +16 -0
  175. data/sig/signwell_sdk/models/copied_contact_info.rbs +21 -0
  176. data/sig/signwell_sdk/models/date_format.rbs +22 -0
  177. data/sig/signwell_sdk/models/field_type.rbs +42 -0
  178. data/sig/signwell_sdk/models/file_info.rbs +15 -0
  179. data/sig/signwell_sdk/models/label_info.rbs +19 -0
  180. data/sig/signwell_sdk/models/text_validation.rbs +34 -0
  181. data/sig/signwell_sdk/models/v1/api_application_delete_params.rbs +17 -0
  182. data/sig/signwell_sdk/models/v1/api_application_retrieve_params.rbs +17 -0
  183. data/sig/signwell_sdk/models/v1/attachment_request.rbs +26 -0
  184. data/sig/signwell_sdk/models/v1/bulk_send_create_params.rbs +89 -0
  185. data/sig/signwell_sdk/models/v1/bulk_send_list_params.rbs +51 -0
  186. data/sig/signwell_sdk/models/v1/bulk_send_retrieve_csv_template_params.rbs +32 -0
  187. data/sig/signwell_sdk/models/v1/bulk_send_retrieve_documents_params.rbs +34 -0
  188. data/sig/signwell_sdk/models/v1/bulk_send_retrieve_params.rbs +17 -0
  189. data/sig/signwell_sdk/models/v1/bulk_send_validate_csv_params.rbs +30 -0
  190. data/sig/signwell_sdk/models/v1/checkbox_group.rbs +69 -0
  191. data/sig/signwell_sdk/models/v1/copied_contact.rbs +19 -0
  192. data/sig/signwell_sdk/models/v1/document.rbs +563 -0
  193. data/sig/signwell_sdk/models/v1/document_create_from_template_params.rbs +570 -0
  194. data/sig/signwell_sdk/models/v1/document_create_from_template_response.rbs +518 -0
  195. data/sig/signwell_sdk/models/v1/document_create_params.rbs +473 -0
  196. data/sig/signwell_sdk/models/v1/document_delete_params.rbs +17 -0
  197. data/sig/signwell_sdk/models/v1/document_file.rbs +32 -0
  198. data/sig/signwell_sdk/models/v1/document_list_params.rbs +34 -0
  199. data/sig/signwell_sdk/models/v1/document_list_response.rbs +47 -0
  200. data/sig/signwell_sdk/models/v1/document_remind_params.rbs +48 -0
  201. data/sig/signwell_sdk/models/v1/document_retrieve_completed_pdf_params.rbs +57 -0
  202. data/sig/signwell_sdk/models/v1/document_retrieve_completed_pdf_response.rbs +15 -0
  203. data/sig/signwell_sdk/models/v1/document_retrieve_params.rbs +17 -0
  204. data/sig/signwell_sdk/models/v1/document_send_params.rbs +160 -0
  205. data/sig/signwell_sdk/models/v1/document_template.rbs +530 -0
  206. data/sig/signwell_sdk/models/v1/document_template_create_params.rbs +459 -0
  207. data/sig/signwell_sdk/models/v1/document_template_delete_params.rbs +17 -0
  208. data/sig/signwell_sdk/models/v1/document_template_list_params.rbs +34 -0
  209. data/sig/signwell_sdk/models/v1/document_template_list_response.rbs +47 -0
  210. data/sig/signwell_sdk/models/v1/document_template_retrieve_params.rbs +17 -0
  211. data/sig/signwell_sdk/models/v1/document_template_update_params.rbs +132 -0
  212. data/sig/signwell_sdk/models/v1/hook_create_params.rbs +32 -0
  213. data/sig/signwell_sdk/models/v1/hook_delete_params.rbs +17 -0
  214. data/sig/signwell_sdk/models/v1/hook_list_params.rbs +17 -0
  215. data/sig/signwell_sdk/models/v1/label.rbs +15 -0
  216. data/sig/signwell_sdk/models/v1/template_checkbox_group.rbs +69 -0
  217. data/sig/signwell_sdk/models/v1_me_params.rbs +14 -0
  218. data/sig/signwell_sdk/models.rbs +23 -0
  219. data/sig/signwell_sdk/request_options.rbs +36 -0
  220. data/sig/signwell_sdk/resources/v1/api_applications.rbs +19 -0
  221. data/sig/signwell_sdk/resources/v1/bulk_sends.rbs +55 -0
  222. data/sig/signwell_sdk/resources/v1/document_templates.rbs +71 -0
  223. data/sig/signwell_sdk/resources/v1/documents.rbs +130 -0
  224. data/sig/signwell_sdk/resources/v1/hooks.rbs +22 -0
  225. data/sig/signwell_sdk/resources/v1.rbs +19 -0
  226. data/sig/signwell_sdk/version.rbs +3 -0
  227. metadata +298 -0
@@ -0,0 +1,50 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SignwellSDK
4
+ module Models
5
+ module V1
6
+ # @see SignwellSDK::Resources::V1::DocumentTemplates#list
7
+ class DocumentTemplateListResponse < SignwellSDK::Internal::Type::BaseModel
8
+ # @!attribute current_page
9
+ #
10
+ # @return [Integer]
11
+ required :current_page, Integer
12
+
13
+ # @!attribute templates
14
+ #
15
+ # @return [Array<SignwellSDK::Models::V1::DocumentTemplate>]
16
+ required :templates, -> { SignwellSDK::Internal::Type::ArrayOf[SignwellSDK::V1::DocumentTemplate] }
17
+
18
+ # @!attribute total_count
19
+ #
20
+ # @return [Integer]
21
+ required :total_count, Integer
22
+
23
+ # @!attribute total_pages
24
+ #
25
+ # @return [Integer]
26
+ required :total_pages, Integer
27
+
28
+ # @!attribute next_page
29
+ #
30
+ # @return [Integer, nil]
31
+ optional :next_page, Integer, nil?: true
32
+
33
+ # @!attribute previous_page
34
+ #
35
+ # @return [Integer, nil]
36
+ optional :previous_page, Integer, nil?: true
37
+
38
+ # @!method initialize(current_page:, templates:, total_count:, total_pages:, next_page: nil, previous_page: nil)
39
+ # List of templates with pagination
40
+ #
41
+ # @param current_page [Integer]
42
+ # @param templates [Array<SignwellSDK::Models::V1::DocumentTemplate>]
43
+ # @param total_count [Integer]
44
+ # @param total_pages [Integer]
45
+ # @param next_page [Integer, nil]
46
+ # @param previous_page [Integer, nil]
47
+ end
48
+ end
49
+ end
50
+ end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SignwellSDK
4
+ module Models
5
+ module V1
6
+ # @see SignwellSDK::Resources::V1::DocumentTemplates#retrieve
7
+ class DocumentTemplateRetrieveParams < SignwellSDK::Internal::Type::BaseModel
8
+ extend SignwellSDK::Internal::Type::RequestParameters::Converter
9
+ include SignwellSDK::Internal::Type::RequestParameters
10
+
11
+ # @!method initialize(request_options: {})
12
+ # @param request_options [SignwellSDK::RequestOptions, Hash{Symbol=>Object}]
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,162 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SignwellSDK
4
+ module Models
5
+ module V1
6
+ # @see SignwellSDK::Resources::V1::DocumentTemplates#update
7
+ class DocumentTemplateUpdateParams < SignwellSDK::Internal::Type::BaseModel
8
+ extend SignwellSDK::Internal::Type::RequestParameters::Converter
9
+ include SignwellSDK::Internal::Type::RequestParameters
10
+
11
+ # @!attribute allow_decline
12
+ # Whether to allow recipients the option to decline signing a document. If
13
+ # multiple signers are involved in a document, any single recipient can cancel the
14
+ # entire document signing process by declining to sign.
15
+ #
16
+ # @return [Boolean, nil]
17
+ optional :allow_decline, SignwellSDK::Internal::Type::Boolean
18
+
19
+ # @!attribute allow_reassign
20
+ # In some cases a signer is not the right person to sign and may need to reassign
21
+ # their signing responsibilities to another person. This feature allows them to
22
+ # reassign the document to someone else.
23
+ #
24
+ # @return [Boolean, nil]
25
+ optional :allow_reassign, SignwellSDK::Internal::Type::Boolean
26
+
27
+ # @!attribute api_application_id
28
+ # Unique identifier for API Application settings to use. API Applications are
29
+ # optional and mainly used when isolating OAuth apps or for more control over
30
+ # embedded API settings
31
+ #
32
+ # @return [String, nil]
33
+ optional :api_application_id, String
34
+
35
+ # @!attribute apply_signing_order
36
+ # When set to `true` recipients will sign one at a time in the order of the
37
+ # `recipients` collection of this request.
38
+ #
39
+ # @return [Boolean, nil]
40
+ optional :apply_signing_order, SignwellSDK::Internal::Type::Boolean
41
+
42
+ # @!attribute checkbox_groups
43
+ # Checkbox fields that are placed on a document can be grouped with selection
44
+ # requirements. At least 2 checkbox fields in an array of fields must be assigned
45
+ # to the same recipient.
46
+ #
47
+ # @return [Array<SignwellSDK::Models::V1::TemplateCheckboxGroup>, nil]
48
+ optional :checkbox_groups,
49
+ -> { SignwellSDK::Internal::Type::ArrayOf[SignwellSDK::V1::TemplateCheckboxGroup] }
50
+
51
+ # @!attribute decline_redirect_url
52
+ # A URL that recipients are redirected to if the document is declined.
53
+ #
54
+ # @return [String, nil]
55
+ optional :decline_redirect_url, String
56
+
57
+ # @!attribute draft
58
+ # Whether the template can still be updated before it is ready for usage. If set
59
+ # to `false` the template is marked as `Available` and it will be ready for use.
60
+ # Defaults to `false`.
61
+ #
62
+ # @return [Boolean, nil]
63
+ optional :draft, SignwellSDK::Internal::Type::Boolean
64
+
65
+ # @!attribute expires_in
66
+ # Number of days before the signature request expires. Defaults to the account
67
+ # expiration setting or template expiration (if the document is created from a
68
+ # template).
69
+ #
70
+ # @return [Integer, nil]
71
+ optional :expires_in, Integer
72
+
73
+ # @!attribute labels
74
+ # Labels can be used to organize documents in a way that can make it easy to find
75
+ # using the document search in SignWell. A document can have multiple labels.
76
+ # Updating labels on a document will replace any existing labels for that
77
+ # document.
78
+ #
79
+ # @return [Array<SignwellSDK::Models::V1::Label>, nil]
80
+ optional :labels, -> { SignwellSDK::Internal::Type::ArrayOf[SignwellSDK::V1::Label] }
81
+
82
+ # @!attribute message
83
+ # Email message for the signature request that recipients will see. Defaults to
84
+ # the default system message or a template message (if the document is created
85
+ # from a template).
86
+ #
87
+ # @return [String, nil]
88
+ optional :message, String
89
+
90
+ # @!attribute metadata
91
+ # Optional key-value data that can be associated with the document. If set, will
92
+ # be available every time the document data is returned.
93
+ #
94
+ # @return [Hash{Symbol=>String}, nil]
95
+ optional :metadata, SignwellSDK::Internal::Type::HashOf[String]
96
+
97
+ # @!attribute name
98
+ # The name of the template.
99
+ #
100
+ # @return [String, nil]
101
+ optional :name, String
102
+
103
+ # @!attribute redirect_url
104
+ # A URL that recipients are redirected to after successfully signing a document.
105
+ #
106
+ # @return [String, nil]
107
+ optional :redirect_url, String
108
+
109
+ # @!attribute reminders
110
+ # Whether to send signing reminders to recipients. Reminders are sent on day 3,
111
+ # day 6, and day 10 if set to `true`. Defaults to `true`.
112
+ #
113
+ # @return [Boolean, nil]
114
+ optional :reminders, SignwellSDK::Internal::Type::Boolean
115
+
116
+ # @!attribute subject
117
+ # Email subject for the signature request that recipients will see. Defaults to
118
+ # the default system subject or a template subject (if the document is created
119
+ # from a template).
120
+ #
121
+ # @return [String, nil]
122
+ optional :subject, String
123
+
124
+ # @!method initialize(allow_decline: nil, allow_reassign: nil, api_application_id: nil, apply_signing_order: nil, checkbox_groups: nil, decline_redirect_url: nil, draft: nil, expires_in: nil, labels: nil, message: nil, metadata: nil, name: nil, redirect_url: nil, reminders: nil, subject: nil, request_options: {})
125
+ # Some parameter documentations has been truncated, see
126
+ # {SignwellSDK::Models::V1::DocumentTemplateUpdateParams} for more details.
127
+ #
128
+ # @param allow_decline [Boolean] Whether to allow recipients the option to decline signing a document. If multipl
129
+ #
130
+ # @param allow_reassign [Boolean] In some cases a signer is not the right person to sign and may need to reassign
131
+ #
132
+ # @param api_application_id [String] Unique identifier for API Application settings to use. API Applications are opti
133
+ #
134
+ # @param apply_signing_order [Boolean] When set to `true` recipients will sign one at a time in the order of the `recip
135
+ #
136
+ # @param checkbox_groups [Array<SignwellSDK::Models::V1::TemplateCheckboxGroup>] Checkbox fields that are placed on a document can be grouped with selection requ
137
+ #
138
+ # @param decline_redirect_url [String] A URL that recipients are redirected to if the document is declined.
139
+ #
140
+ # @param draft [Boolean] Whether the template can still be updated before it is ready for usage. If set t
141
+ #
142
+ # @param expires_in [Integer] Number of days before the signature request expires. Defaults to the account exp
143
+ #
144
+ # @param labels [Array<SignwellSDK::Models::V1::Label>] Labels can be used to organize documents in a way that can make it easy to find
145
+ #
146
+ # @param message [String] Email message for the signature request that recipients will see. Defaults to th
147
+ #
148
+ # @param metadata [Hash{Symbol=>String}] Optional key-value data that can be associated with the document. If set, will b
149
+ #
150
+ # @param name [String] The name of the template.
151
+ #
152
+ # @param redirect_url [String] A URL that recipients are redirected to after successfully signing a document.
153
+ #
154
+ # @param reminders [Boolean] Whether to send signing reminders to recipients. Reminders are sent on day 3, da
155
+ #
156
+ # @param subject [String] Email subject for the signature request that recipients will see. Defaults to th
157
+ #
158
+ # @param request_options [SignwellSDK::RequestOptions, Hash{Symbol=>Object}]
159
+ end
160
+ end
161
+ end
162
+ end
@@ -0,0 +1,32 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SignwellSDK
4
+ module Models
5
+ module V1
6
+ # @see SignwellSDK::Resources::V1::Hooks#create
7
+ class HookCreateParams < SignwellSDK::Internal::Type::BaseModel
8
+ extend SignwellSDK::Internal::Type::RequestParameters::Converter
9
+ include SignwellSDK::Internal::Type::RequestParameters
10
+
11
+ # @!attribute callback_url
12
+ # URL that we will post document events to.
13
+ #
14
+ # @return [String]
15
+ required :callback_url, String
16
+
17
+ # @!attribute api_application_id
18
+ # Unique identifier for the API Application.
19
+ #
20
+ # @return [String, nil]
21
+ optional :api_application_id, String
22
+
23
+ # @!method initialize(callback_url:, api_application_id: nil, request_options: {})
24
+ # @param callback_url [String] URL that we will post document events to.
25
+ #
26
+ # @param api_application_id [String] Unique identifier for the API Application.
27
+ #
28
+ # @param request_options [SignwellSDK::RequestOptions, Hash{Symbol=>Object}]
29
+ end
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SignwellSDK
4
+ module Models
5
+ module V1
6
+ # @see SignwellSDK::Resources::V1::Hooks#delete
7
+ class HookDeleteParams < SignwellSDK::Internal::Type::BaseModel
8
+ extend SignwellSDK::Internal::Type::RequestParameters::Converter
9
+ include SignwellSDK::Internal::Type::RequestParameters
10
+
11
+ # @!method initialize(request_options: {})
12
+ # @param request_options [SignwellSDK::RequestOptions, Hash{Symbol=>Object}]
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SignwellSDK
4
+ module Models
5
+ module V1
6
+ # @see SignwellSDK::Resources::V1::Hooks#list
7
+ class HookListParams < SignwellSDK::Internal::Type::BaseModel
8
+ extend SignwellSDK::Internal::Type::RequestParameters::Converter
9
+ include SignwellSDK::Internal::Type::RequestParameters
10
+
11
+ # @!method initialize(request_options: {})
12
+ # @param request_options [SignwellSDK::RequestOptions, Hash{Symbol=>Object}]
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SignwellSDK
4
+ module Models
5
+ module V1
6
+ class Label < SignwellSDK::Internal::Type::BaseModel
7
+ # @!attribute name
8
+ #
9
+ # @return [String]
10
+ required :name, String
11
+
12
+ # @!method initialize(name:)
13
+ # Labels can be used to organize documents and templates in a way that can make it
14
+ # easy to find using the document search/template search in SignWell. Labels can
15
+ # be used to organize documents in a way that can make it easy to find using the
16
+ # document search in SignWell.
17
+ #
18
+ # @param name [String]
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,80 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SignwellSDK
4
+ module Models
5
+ module V1
6
+ class TemplateCheckboxGroup < SignwellSDK::Internal::Type::BaseModel
7
+ # @!attribute checkbox_ids
8
+ #
9
+ # @return [Array<String>]
10
+ required :checkbox_ids, SignwellSDK::Internal::Type::ArrayOf[String]
11
+
12
+ # @!attribute group_name
13
+ # A unique identifier for the checkbox group.
14
+ #
15
+ # @return [String]
16
+ required :group_name, String
17
+
18
+ # @!attribute placeholder_id
19
+ # The recipient ID associated with the checkbox group.
20
+ #
21
+ # @return [String]
22
+ required :placeholder_id, String
23
+
24
+ # @!attribute exact_value
25
+ # The exact number of checkboxes that must be checked in the group. (Only for
26
+ # validation: exact)
27
+ #
28
+ # @return [Integer, nil]
29
+ optional :exact_value, Integer
30
+
31
+ # @!attribute max_value
32
+ # The maximum number of checkboxes that can be checked in the group. (Only for
33
+ # validation: maximum and range)
34
+ #
35
+ # @return [Integer, nil]
36
+ optional :max_value, Integer
37
+
38
+ # @!attribute min_value
39
+ # The minimum number of checkboxes that must be checked in the group. (Only for
40
+ # validation: minimum and range)
41
+ #
42
+ # @return [Integer, nil]
43
+ optional :min_value, Integer
44
+
45
+ # @!attribute required
46
+ # Whether the group must be completed by the recipient. Defaults to false.
47
+ #
48
+ # @return [Boolean, nil]
49
+ optional :required, SignwellSDK::Internal::Type::Boolean
50
+
51
+ # @!attribute validation
52
+ # Set requirements for the group of one or multiple selections by the recipient.
53
+ # Defaults to minimum. Validation values: minimum, maximum, exact, range.
54
+ #
55
+ # @return [Symbol, SignwellSDK::Models::CheckboxValidation, nil]
56
+ optional :validation, enum: -> { SignwellSDK::CheckboxValidation }
57
+
58
+ # @!method initialize(checkbox_ids:, group_name:, placeholder_id:, exact_value: nil, max_value: nil, min_value: nil, required: nil, validation: nil)
59
+ # Some parameter documentations has been truncated, see
60
+ # {SignwellSDK::Models::V1::TemplateCheckboxGroup} for more details.
61
+ #
62
+ # @param checkbox_ids [Array<String>]
63
+ #
64
+ # @param group_name [String] A unique identifier for the checkbox group.
65
+ #
66
+ # @param placeholder_id [String] The recipient ID associated with the checkbox group.
67
+ #
68
+ # @param exact_value [Integer] The exact number of checkboxes that must be checked in the group. (Only for vali
69
+ #
70
+ # @param max_value [Integer] The maximum number of checkboxes that can be checked in the group. (Only for val
71
+ #
72
+ # @param min_value [Integer] The minimum number of checkboxes that must be checked in the group. (Only for va
73
+ #
74
+ # @param required [Boolean] Whether the group must be completed by the recipient. Defaults to false.
75
+ #
76
+ # @param validation [Symbol, SignwellSDK::Models::CheckboxValidation] Set requirements for the group of one or multiple selections by the recipient. D
77
+ end
78
+ end
79
+ end
80
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SignwellSDK
4
+ module Models
5
+ # @see SignwellSDK::Resources::V1#me
6
+ class V1MeParams < SignwellSDK::Internal::Type::BaseModel
7
+ extend SignwellSDK::Internal::Type::RequestParameters::Converter
8
+ include SignwellSDK::Internal::Type::RequestParameters
9
+
10
+ # @!method initialize(request_options: {})
11
+ # @param request_options [SignwellSDK::RequestOptions, Hash{Symbol=>Object}]
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,63 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SignwellSDK
4
+ [SignwellSDK::Internal::Type::BaseModel, *SignwellSDK::Internal::Type::BaseModel.subclasses].each do |cls|
5
+ cls.define_sorbet_constant!(:OrHash) { T.type_alias { T.any(cls, SignwellSDK::Internal::AnyHash) } }
6
+ end
7
+
8
+ SignwellSDK::Internal::Util.walk_namespaces(SignwellSDK::Models).each do |mod|
9
+ case mod
10
+ in SignwellSDK::Internal::Type::Enum | SignwellSDK::Internal::Type::Union
11
+ mod.constants.each do |name|
12
+ case mod.const_get(name)
13
+ in true | false
14
+ mod.define_sorbet_constant!(:TaggedBoolean) { T.type_alias { T::Boolean } }
15
+ mod.define_sorbet_constant!(:OrBoolean) { T.type_alias { T::Boolean } }
16
+ in Integer
17
+ mod.define_sorbet_constant!(:TaggedInteger) { T.type_alias { Integer } }
18
+ mod.define_sorbet_constant!(:OrInteger) { T.type_alias { Integer } }
19
+ in Float
20
+ mod.define_sorbet_constant!(:TaggedFloat) { T.type_alias { Float } }
21
+ mod.define_sorbet_constant!(:OrFloat) { T.type_alias { Float } }
22
+ in Symbol
23
+ mod.define_sorbet_constant!(:TaggedSymbol) { T.type_alias { Symbol } }
24
+ mod.define_sorbet_constant!(:OrSymbol) { T.type_alias { T.any(Symbol, String) } }
25
+ else
26
+ end
27
+ end
28
+ else
29
+ end
30
+ end
31
+
32
+ SignwellSDK::Internal::Util.walk_namespaces(SignwellSDK::Models)
33
+ .lazy
34
+ .grep(SignwellSDK::Internal::Type::Union)
35
+ .each do |mod|
36
+ const = :Variants
37
+ next if mod.sorbet_constant_defined?(const)
38
+
39
+ mod.define_sorbet_constant!(const) { T.type_alias { mod.to_sorbet_type } }
40
+ end
41
+
42
+ AttachmentRequestInfo = SignwellSDK::Models::AttachmentRequestInfo
43
+
44
+ CheckboxGroupInfo = SignwellSDK::Models::CheckboxGroupInfo
45
+
46
+ CheckboxValidation = SignwellSDK::Models::CheckboxValidation
47
+
48
+ CopiedContactInfo = SignwellSDK::Models::CopiedContactInfo
49
+
50
+ DateFormat = SignwellSDK::Models::DateFormat
51
+
52
+ FieldType = SignwellSDK::Models::FieldType
53
+
54
+ FileInfo = SignwellSDK::Models::FileInfo
55
+
56
+ LabelInfo = SignwellSDK::Models::LabelInfo
57
+
58
+ TextValidation = SignwellSDK::Models::TextValidation
59
+
60
+ V1 = SignwellSDK::Models::V1
61
+
62
+ V1MeParams = SignwellSDK::Models::V1MeParams
63
+ end
@@ -0,0 +1,77 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SignwellSDK
4
+ # Specify HTTP behaviour to use for a specific request. These options supplement
5
+ # or override those provided at the client level.
6
+ #
7
+ # When making a request, you can pass an actual {RequestOptions} instance, or
8
+ # simply pass a Hash with symbol keys matching the attributes on this class.
9
+ class RequestOptions < SignwellSDK::Internal::Type::BaseModel
10
+ # @api private
11
+ #
12
+ # @param opts [SignwellSDK::RequestOptions, Hash{Symbol=>Object}]
13
+ #
14
+ # @raise [ArgumentError]
15
+ def self.validate!(opts)
16
+ case opts
17
+ in SignwellSDK::RequestOptions | Hash
18
+ opts.to_h.each_key do |k|
19
+ unless fields.include?(k)
20
+ raise ArgumentError.new("Request `opts` keys must be one of #{fields.keys}, got #{k.inspect}")
21
+ end
22
+ end
23
+ else
24
+ raise ArgumentError.new("Request `opts` must be a Hash or RequestOptions, got #{opts.inspect}")
25
+ end
26
+ end
27
+
28
+ # @!attribute idempotency_key
29
+ # Idempotency key to send with request and all associated retries. Will only be
30
+ # sent for write requests.
31
+ #
32
+ # @return [String, nil]
33
+ optional :idempotency_key, String
34
+
35
+ # @!attribute extra_query
36
+ # Extra query params to send with the request. These are `.merge`’d into any
37
+ # `query` given at the client level.
38
+ #
39
+ # @return [Hash{String=>Array<String>, String, nil}, nil]
40
+ optional :extra_query, SignwellSDK::Internal::Type::HashOf[SignwellSDK::Internal::Type::ArrayOf[String]]
41
+
42
+ # @!attribute extra_headers
43
+ # Extra headers to send with the request. These are `.merged`’d into any
44
+ # `extra_headers` given at the client level.
45
+ #
46
+ # @return [Hash{String=>String, nil}, nil]
47
+ optional :extra_headers, SignwellSDK::Internal::Type::HashOf[String, nil?: true]
48
+
49
+ # @!attribute extra_body
50
+ # Extra data to send with the request. These are deep merged into any data
51
+ # generated as part of the normal request.
52
+ #
53
+ # @return [Object, nil]
54
+ optional :extra_body, SignwellSDK::Internal::Type::HashOf[SignwellSDK::Internal::Type::Unknown]
55
+
56
+ # @!attribute max_retries
57
+ # Maximum number of retries to attempt after a failed initial request.
58
+ #
59
+ # @return [Integer, nil]
60
+ optional :max_retries, Integer
61
+
62
+ # @!attribute timeout
63
+ # Request timeout in seconds.
64
+ #
65
+ # @return [Float, nil]
66
+ optional :timeout, Float
67
+
68
+ # @!method initialize(values = {})
69
+ # Returns a new instance of RequestOptions.
70
+ #
71
+ # @param values [Hash{Symbol=>Object}]
72
+
73
+ define_sorbet_constant!(:OrHash) do
74
+ T.type_alias { T.any(SignwellSDK::RequestOptions, SignwellSDK::Internal::AnyHash) }
75
+ end
76
+ end
77
+ end
@@ -0,0 +1,59 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SignwellSDK
4
+ module Resources
5
+ class V1
6
+ class APIApplications
7
+ # Gets the details of a specific API Application within an account. Supply the
8
+ # unique Application ID from either the Create API Application response or the API
9
+ # Application edit page.
10
+ #
11
+ # @overload retrieve(id, request_options: {})
12
+ #
13
+ # @param id [String] Unique identifier for the API Application.
14
+ #
15
+ # @param request_options [SignwellSDK::RequestOptions, Hash{Symbol=>Object}, nil]
16
+ #
17
+ # @return [nil]
18
+ #
19
+ # @see SignwellSDK::Models::V1::APIApplicationRetrieveParams
20
+ def retrieve(id, params = {})
21
+ @client.request(
22
+ method: :get,
23
+ path: ["api/v1/api_applications/%1$s", id],
24
+ model: NilClass,
25
+ options: params[:request_options]
26
+ )
27
+ end
28
+
29
+ # Deletes an API Application from an account. Supply the unique Application ID
30
+ # from either the Create API Application response or the API Application edit page
31
+ #
32
+ # @overload delete(id, request_options: {})
33
+ #
34
+ # @param id [String] Unique identifier for the API Application.
35
+ #
36
+ # @param request_options [SignwellSDK::RequestOptions, Hash{Symbol=>Object}, nil]
37
+ #
38
+ # @return [nil]
39
+ #
40
+ # @see SignwellSDK::Models::V1::APIApplicationDeleteParams
41
+ def delete(id, params = {})
42
+ @client.request(
43
+ method: :delete,
44
+ path: ["api/v1/api_applications/%1$s", id],
45
+ model: NilClass,
46
+ options: params[:request_options]
47
+ )
48
+ end
49
+
50
+ # @api private
51
+ #
52
+ # @param client [SignwellSDK::Client]
53
+ def initialize(client:)
54
+ @client = client
55
+ end
56
+ end
57
+ end
58
+ end
59
+ end