@documenso/sdk-typescript 0.5.0 → 0.6.2

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 (418) hide show
  1. package/README.md +385 -355
  2. package/_speakeasy/.github/action-inputs-config.json +53 -0
  3. package/_speakeasy/.github/action-security-config.json +88 -0
  4. package/bin/mcp-server.js +51156 -29112
  5. package/bin/mcp-server.js.map +272 -85
  6. package/examples/package-lock.json +2 -10
  7. package/funcs/documentDocumentGetMany.d.ts +18 -0
  8. package/funcs/documentDocumentGetMany.d.ts.map +1 -0
  9. package/funcs/documentDocumentGetMany.js +118 -0
  10. package/funcs/documentDocumentGetMany.js.map +1 -0
  11. package/funcs/envelopeEnvelopeAuditLogFind.d.ts +18 -0
  12. package/funcs/envelopeEnvelopeAuditLogFind.d.ts.map +1 -0
  13. package/funcs/envelopeEnvelopeAuditLogFind.js +130 -0
  14. package/funcs/envelopeEnvelopeAuditLogFind.js.map +1 -0
  15. package/funcs/envelopeEnvelopeFind.d.ts +18 -0
  16. package/funcs/envelopeEnvelopeFind.d.ts.map +1 -0
  17. package/funcs/envelopeEnvelopeFind.js +130 -0
  18. package/funcs/envelopeEnvelopeFind.js.map +1 -0
  19. package/funcs/envelopeEnvelopeGetMany.d.ts +18 -0
  20. package/funcs/envelopeEnvelopeGetMany.d.ts.map +1 -0
  21. package/funcs/envelopeEnvelopeGetMany.js +118 -0
  22. package/funcs/envelopeEnvelopeGetMany.js.map +1 -0
  23. package/funcs/templateTemplateGetMany.d.ts +18 -0
  24. package/funcs/templateTemplateGetMany.d.ts.map +1 -0
  25. package/funcs/templateTemplateGetMany.js +118 -0
  26. package/funcs/templateTemplateGetMany.js.map +1 -0
  27. package/jsr.json +1 -1
  28. package/lib/config.d.ts +3 -3
  29. package/lib/config.js +3 -3
  30. package/lib/encodings.d.ts +1 -0
  31. package/lib/encodings.d.ts.map +1 -1
  32. package/lib/encodings.js +12 -1
  33. package/lib/encodings.js.map +1 -1
  34. package/lib/sdks.js +2 -2
  35. package/lib/sdks.js.map +1 -1
  36. package/mcp-server/mcp-server.js +1 -1
  37. package/mcp-server/prompts.d.ts +3 -3
  38. package/mcp-server/prompts.d.ts.map +1 -1
  39. package/mcp-server/prompts.js.map +1 -1
  40. package/mcp-server/resources.d.ts +3 -3
  41. package/mcp-server/resources.d.ts.map +1 -1
  42. package/mcp-server/resources.js.map +1 -1
  43. package/mcp-server/server.d.ts.map +1 -1
  44. package/mcp-server/server.js +11 -1
  45. package/mcp-server/server.js.map +1 -1
  46. package/mcp-server/tools/documentDocumentGetMany.d.ts +8 -0
  47. package/mcp-server/tools/documentDocumentGetMany.d.ts.map +1 -0
  48. package/mcp-server/tools/documentDocumentGetMany.js +64 -0
  49. package/mcp-server/tools/documentDocumentGetMany.js.map +1 -0
  50. package/mcp-server/tools/envelopeEnvelopeAuditLogFind.d.ts +8 -0
  51. package/mcp-server/tools/envelopeEnvelopeAuditLogFind.d.ts.map +1 -0
  52. package/mcp-server/tools/envelopeEnvelopeAuditLogFind.js +64 -0
  53. package/mcp-server/tools/envelopeEnvelopeAuditLogFind.js.map +1 -0
  54. package/mcp-server/tools/envelopeEnvelopeFind.d.ts +8 -0
  55. package/mcp-server/tools/envelopeEnvelopeFind.d.ts.map +1 -0
  56. package/mcp-server/tools/envelopeEnvelopeFind.js +64 -0
  57. package/mcp-server/tools/envelopeEnvelopeFind.js.map +1 -0
  58. package/mcp-server/tools/envelopeEnvelopeGetMany.d.ts +8 -0
  59. package/mcp-server/tools/envelopeEnvelopeGetMany.d.ts.map +1 -0
  60. package/mcp-server/tools/envelopeEnvelopeGetMany.js +64 -0
  61. package/mcp-server/tools/envelopeEnvelopeGetMany.js.map +1 -0
  62. package/mcp-server/tools/templateTemplateGetMany.d.ts +8 -0
  63. package/mcp-server/tools/templateTemplateGetMany.d.ts.map +1 -0
  64. package/mcp-server/tools/templateTemplateGetMany.js +64 -0
  65. package/mcp-server/tools/templateTemplateGetMany.js.map +1 -0
  66. package/mcp-server/tools.d.ts +3 -3
  67. package/mcp-server/tools.d.ts.map +1 -1
  68. package/mcp-server/tools.js.map +1 -1
  69. package/models/errors/documentgetmany.d.ts +185 -0
  70. package/models/errors/documentgetmany.d.ts.map +1 -0
  71. package/models/errors/documentgetmany.js +268 -0
  72. package/models/errors/documentgetmany.js.map +1 -0
  73. package/models/errors/envelopeauditlogfind.d.ts +230 -0
  74. package/models/errors/envelopeauditlogfind.d.ts.map +1 -0
  75. package/models/errors/envelopeauditlogfind.js +319 -0
  76. package/models/errors/envelopeauditlogfind.js.map +1 -0
  77. package/models/errors/envelopefind.d.ts +230 -0
  78. package/models/errors/envelopefind.d.ts.map +1 -0
  79. package/models/errors/envelopefind.js +326 -0
  80. package/models/errors/envelopefind.js.map +1 -0
  81. package/models/errors/envelopegetmany.d.ts +185 -0
  82. package/models/errors/envelopegetmany.d.ts.map +1 -0
  83. package/models/errors/envelopegetmany.js +268 -0
  84. package/models/errors/envelopegetmany.js.map +1 -0
  85. package/models/errors/index.d.ts +5 -0
  86. package/models/errors/index.d.ts.map +1 -1
  87. package/models/errors/index.js +5 -0
  88. package/models/errors/index.js.map +1 -1
  89. package/models/errors/templategetmany.d.ts +185 -0
  90. package/models/errors/templategetmany.d.ts.map +1 -0
  91. package/models/errors/templategetmany.js +268 -0
  92. package/models/errors/templategetmany.js.map +1 -0
  93. package/models/operations/documentcreate.d.ts +77 -160
  94. package/models/operations/documentcreate.d.ts.map +1 -1
  95. package/models/operations/documentcreate.js +81 -153
  96. package/models/operations/documentcreate.js.map +1 -1
  97. package/models/operations/documentcreatedocumenttemporary.d.ts +102 -265
  98. package/models/operations/documentcreatedocumenttemporary.d.ts.map +1 -1
  99. package/models/operations/documentcreatedocumenttemporary.js +118 -263
  100. package/models/operations/documentcreatedocumenttemporary.js.map +1 -1
  101. package/models/operations/documentdistribute.d.ts +5 -0
  102. package/models/operations/documentdistribute.d.ts.map +1 -1
  103. package/models/operations/documentdistribute.js +5 -0
  104. package/models/operations/documentdistribute.js.map +1 -1
  105. package/models/operations/documentfind.d.ts +30 -30
  106. package/models/operations/documentfind.d.ts.map +1 -1
  107. package/models/operations/documentfind.js +31 -33
  108. package/models/operations/documentfind.js.map +1 -1
  109. package/models/operations/documentget.d.ts +25 -105
  110. package/models/operations/documentget.d.ts.map +1 -1
  111. package/models/operations/documentget.js +28 -99
  112. package/models/operations/documentget.js.map +1 -1
  113. package/models/operations/documentgetmany.d.ts +323 -0
  114. package/models/operations/documentgetmany.d.ts.map +1 -0
  115. package/models/operations/documentgetmany.js +370 -0
  116. package/models/operations/documentgetmany.js.map +1 -0
  117. package/models/operations/documentupdate.d.ts +20 -15
  118. package/models/operations/documentupdate.d.ts.map +1 -1
  119. package/models/operations/documentupdate.js +21 -18
  120. package/models/operations/documentupdate.js.map +1 -1
  121. package/models/operations/embeddingpresigncreateembeddingpresigntoken.d.ts +2 -0
  122. package/models/operations/embeddingpresigncreateembeddingpresigntoken.d.ts.map +1 -1
  123. package/models/operations/embeddingpresigncreateembeddingpresigntoken.js +2 -0
  124. package/models/operations/embeddingpresigncreateembeddingpresigntoken.js.map +1 -1
  125. package/models/operations/embeddingpresignverifyembeddingpresigntoken.d.ts +2 -0
  126. package/models/operations/embeddingpresignverifyembeddingpresigntoken.d.ts.map +1 -1
  127. package/models/operations/embeddingpresignverifyembeddingpresigntoken.js +2 -0
  128. package/models/operations/embeddingpresignverifyembeddingpresigntoken.js.map +1 -1
  129. package/models/operations/envelopeauditlogfind.d.ts +2844 -0
  130. package/models/operations/envelopeauditlogfind.d.ts.map +1 -0
  131. package/models/operations/envelopeauditlogfind.js +3579 -0
  132. package/models/operations/envelopeauditlogfind.js.map +1 -0
  133. package/models/operations/envelopecreate.d.ts +103 -167
  134. package/models/operations/envelopecreate.d.ts.map +1 -1
  135. package/models/operations/envelopecreate.js +109 -161
  136. package/models/operations/envelopecreate.js.map +1 -1
  137. package/models/operations/envelopedistribute.d.ts +46 -0
  138. package/models/operations/envelopedistribute.d.ts.map +1 -1
  139. package/models/operations/envelopedistribute.js +49 -1
  140. package/models/operations/envelopedistribute.js.map +1 -1
  141. package/models/operations/envelopefieldcreatemany.d.ts +97 -265
  142. package/models/operations/envelopefieldcreatemany.d.ts.map +1 -1
  143. package/models/operations/envelopefieldcreatemany.js +106 -280
  144. package/models/operations/envelopefieldcreatemany.js.map +1 -1
  145. package/models/operations/envelopefieldget.d.ts +25 -105
  146. package/models/operations/envelopefieldget.d.ts.map +1 -1
  147. package/models/operations/envelopefieldget.js +27 -97
  148. package/models/operations/envelopefieldget.js.map +1 -1
  149. package/models/operations/envelopefieldupdatemany.d.ts +97 -265
  150. package/models/operations/envelopefieldupdatemany.d.ts.map +1 -1
  151. package/models/operations/envelopefieldupdatemany.js +106 -280
  152. package/models/operations/envelopefieldupdatemany.js.map +1 -1
  153. package/models/operations/envelopefind.d.ts +465 -0
  154. package/models/operations/envelopefind.d.ts.map +1 -0
  155. package/models/operations/envelopefind.js +466 -0
  156. package/models/operations/envelopefind.js.map +1 -0
  157. package/models/operations/envelopeget.d.ts +30 -110
  158. package/models/operations/envelopeget.d.ts.map +1 -1
  159. package/models/operations/envelopeget.js +33 -104
  160. package/models/operations/envelopeget.js.map +1 -1
  161. package/models/operations/envelopegetmany.d.ts +1020 -0
  162. package/models/operations/envelopegetmany.d.ts.map +1 -0
  163. package/models/operations/envelopegetmany.js +1190 -0
  164. package/models/operations/envelopegetmany.js.map +1 -0
  165. package/models/operations/enveloperecipientcreatemany.d.ts +29 -12
  166. package/models/operations/enveloperecipientcreatemany.d.ts.map +1 -1
  167. package/models/operations/enveloperecipientcreatemany.js +40 -15
  168. package/models/operations/enveloperecipientcreatemany.js.map +1 -1
  169. package/models/operations/enveloperecipientget.d.ts +25 -105
  170. package/models/operations/enveloperecipientget.d.ts.map +1 -1
  171. package/models/operations/enveloperecipientget.js +27 -98
  172. package/models/operations/enveloperecipientget.js.map +1 -1
  173. package/models/operations/enveloperecipientupdatemany.d.ts +29 -12
  174. package/models/operations/enveloperecipientupdatemany.d.ts.map +1 -1
  175. package/models/operations/enveloperecipientupdatemany.js +40 -15
  176. package/models/operations/enveloperecipientupdatemany.js.map +1 -1
  177. package/models/operations/enveloperedistribute.d.ts +42 -0
  178. package/models/operations/enveloperedistribute.d.ts.map +1 -1
  179. package/models/operations/enveloperedistribute.js +44 -1
  180. package/models/operations/enveloperedistribute.js.map +1 -1
  181. package/models/operations/envelopeupdate.d.ts +20 -15
  182. package/models/operations/envelopeupdate.d.ts.map +1 -1
  183. package/models/operations/envelopeupdate.js +21 -18
  184. package/models/operations/envelopeupdate.js.map +1 -1
  185. package/models/operations/envelopeuse.d.ts +106 -78
  186. package/models/operations/envelopeuse.d.ts.map +1 -1
  187. package/models/operations/envelopeuse.js +118 -77
  188. package/models/operations/envelopeuse.js.map +1 -1
  189. package/models/operations/fieldcreatedocumentfield.d.ts +97 -265
  190. package/models/operations/fieldcreatedocumentfield.d.ts.map +1 -1
  191. package/models/operations/fieldcreatedocumentfield.js +106 -280
  192. package/models/operations/fieldcreatedocumentfield.js.map +1 -1
  193. package/models/operations/fieldcreatedocumentfields.d.ts +97 -265
  194. package/models/operations/fieldcreatedocumentfields.d.ts.map +1 -1
  195. package/models/operations/fieldcreatedocumentfields.js +107 -280
  196. package/models/operations/fieldcreatedocumentfields.js.map +1 -1
  197. package/models/operations/fieldcreatetemplatefield.d.ts +97 -265
  198. package/models/operations/fieldcreatetemplatefield.d.ts.map +1 -1
  199. package/models/operations/fieldcreatetemplatefield.js +106 -280
  200. package/models/operations/fieldcreatetemplatefield.js.map +1 -1
  201. package/models/operations/fieldcreatetemplatefields.d.ts +97 -265
  202. package/models/operations/fieldcreatetemplatefields.d.ts.map +1 -1
  203. package/models/operations/fieldcreatetemplatefields.js +107 -280
  204. package/models/operations/fieldcreatetemplatefields.js.map +1 -1
  205. package/models/operations/fieldgetdocumentfield.d.ts +25 -105
  206. package/models/operations/fieldgetdocumentfield.d.ts.map +1 -1
  207. package/models/operations/fieldgetdocumentfield.js +27 -97
  208. package/models/operations/fieldgetdocumentfield.js.map +1 -1
  209. package/models/operations/fieldgettemplatefield.d.ts +25 -105
  210. package/models/operations/fieldgettemplatefield.d.ts.map +1 -1
  211. package/models/operations/fieldgettemplatefield.js +27 -97
  212. package/models/operations/fieldgettemplatefield.js.map +1 -1
  213. package/models/operations/fieldupdatedocumentfield.d.ts +97 -265
  214. package/models/operations/fieldupdatedocumentfield.d.ts.map +1 -1
  215. package/models/operations/fieldupdatedocumentfield.js +106 -280
  216. package/models/operations/fieldupdatedocumentfield.js.map +1 -1
  217. package/models/operations/fieldupdatedocumentfields.d.ts +97 -265
  218. package/models/operations/fieldupdatedocumentfields.d.ts.map +1 -1
  219. package/models/operations/fieldupdatedocumentfields.js +107 -280
  220. package/models/operations/fieldupdatedocumentfields.js.map +1 -1
  221. package/models/operations/fieldupdatetemplatefield.d.ts +97 -265
  222. package/models/operations/fieldupdatetemplatefield.d.ts.map +1 -1
  223. package/models/operations/fieldupdatetemplatefield.js +106 -280
  224. package/models/operations/fieldupdatetemplatefield.js.map +1 -1
  225. package/models/operations/fieldupdatetemplatefields.d.ts +97 -265
  226. package/models/operations/fieldupdatetemplatefields.d.ts.map +1 -1
  227. package/models/operations/fieldupdatetemplatefields.js +107 -280
  228. package/models/operations/fieldupdatetemplatefields.js.map +1 -1
  229. package/models/operations/folderupdatefolder.d.ts +5 -5
  230. package/models/operations/folderupdatefolder.d.ts.map +1 -1
  231. package/models/operations/folderupdatefolder.js +6 -6
  232. package/models/operations/folderupdatefolder.js.map +1 -1
  233. package/models/operations/index.d.ts +5 -0
  234. package/models/operations/index.d.ts.map +1 -1
  235. package/models/operations/index.js +5 -0
  236. package/models/operations/index.js.map +1 -1
  237. package/models/operations/recipientcreatedocumentrecipient.d.ts +10 -10
  238. package/models/operations/recipientcreatedocumentrecipient.d.ts.map +1 -1
  239. package/models/operations/recipientcreatedocumentrecipient.js +11 -13
  240. package/models/operations/recipientcreatedocumentrecipient.js.map +1 -1
  241. package/models/operations/recipientcreatedocumentrecipients.d.ts +10 -10
  242. package/models/operations/recipientcreatedocumentrecipients.d.ts.map +1 -1
  243. package/models/operations/recipientcreatedocumentrecipients.js +11 -11
  244. package/models/operations/recipientcreatedocumentrecipients.js.map +1 -1
  245. package/models/operations/recipientcreatetemplaterecipient.d.ts +10 -10
  246. package/models/operations/recipientcreatetemplaterecipient.d.ts.map +1 -1
  247. package/models/operations/recipientcreatetemplaterecipient.js +11 -13
  248. package/models/operations/recipientcreatetemplaterecipient.js.map +1 -1
  249. package/models/operations/recipientcreatetemplaterecipients.d.ts +10 -10
  250. package/models/operations/recipientcreatetemplaterecipients.d.ts.map +1 -1
  251. package/models/operations/recipientcreatetemplaterecipients.js +11 -11
  252. package/models/operations/recipientcreatetemplaterecipients.js.map +1 -1
  253. package/models/operations/recipientgetdocumentrecipient.d.ts +25 -105
  254. package/models/operations/recipientgetdocumentrecipient.d.ts.map +1 -1
  255. package/models/operations/recipientgetdocumentrecipient.js +27 -103
  256. package/models/operations/recipientgetdocumentrecipient.js.map +1 -1
  257. package/models/operations/recipientgettemplaterecipient.d.ts +25 -105
  258. package/models/operations/recipientgettemplaterecipient.d.ts.map +1 -1
  259. package/models/operations/recipientgettemplaterecipient.js +27 -103
  260. package/models/operations/recipientgettemplaterecipient.js.map +1 -1
  261. package/models/operations/recipientupdatedocumentrecipient.d.ts +35 -115
  262. package/models/operations/recipientupdatedocumentrecipient.d.ts.map +1 -1
  263. package/models/operations/recipientupdatedocumentrecipient.js +38 -120
  264. package/models/operations/recipientupdatedocumentrecipient.js.map +1 -1
  265. package/models/operations/recipientupdatedocumentrecipients.d.ts +35 -115
  266. package/models/operations/recipientupdatedocumentrecipients.d.ts.map +1 -1
  267. package/models/operations/recipientupdatedocumentrecipients.js +38 -118
  268. package/models/operations/recipientupdatedocumentrecipients.js.map +1 -1
  269. package/models/operations/recipientupdatetemplaterecipient.d.ts +35 -115
  270. package/models/operations/recipientupdatetemplaterecipient.d.ts.map +1 -1
  271. package/models/operations/recipientupdatetemplaterecipient.js +38 -120
  272. package/models/operations/recipientupdatetemplaterecipient.js.map +1 -1
  273. package/models/operations/recipientupdatetemplaterecipients.d.ts +35 -115
  274. package/models/operations/recipientupdatetemplaterecipients.d.ts.map +1 -1
  275. package/models/operations/recipientupdatetemplaterecipients.js +38 -118
  276. package/models/operations/recipientupdatetemplaterecipients.js.map +1 -1
  277. package/models/operations/templatecreatedocumentfromtemplate.d.ts +239 -186
  278. package/models/operations/templatecreatedocumentfromtemplate.d.ts.map +1 -1
  279. package/models/operations/templatecreatedocumentfromtemplate.js +277 -178
  280. package/models/operations/templatecreatedocumentfromtemplate.js.map +1 -1
  281. package/models/operations/templatecreatetemplate.d.ts +5 -0
  282. package/models/operations/templatecreatetemplate.d.ts.map +1 -1
  283. package/models/operations/templatecreatetemplate.js +5 -0
  284. package/models/operations/templatecreatetemplate.js.map +1 -1
  285. package/models/operations/templatecreatetemplatetemporary.d.ts +35 -110
  286. package/models/operations/templatecreatetemplatetemporary.d.ts.map +1 -1
  287. package/models/operations/templatecreatetemplatetemporary.js +41 -116
  288. package/models/operations/templatecreatetemplatetemporary.js.map +1 -1
  289. package/models/operations/templatefindtemplates.d.ts +30 -110
  290. package/models/operations/templatefindtemplates.d.ts.map +1 -1
  291. package/models/operations/templatefindtemplates.js +33 -103
  292. package/models/operations/templatefindtemplates.js.map +1 -1
  293. package/models/operations/templategetmany.d.ts +822 -0
  294. package/models/operations/templategetmany.d.ts.map +1 -0
  295. package/models/operations/templategetmany.js +958 -0
  296. package/models/operations/templategetmany.js.map +1 -0
  297. package/models/operations/templategettemplatebyid.d.ts +30 -110
  298. package/models/operations/templategettemplatebyid.d.ts.map +1 -1
  299. package/models/operations/templategettemplatebyid.js +33 -104
  300. package/models/operations/templategettemplatebyid.js.map +1 -1
  301. package/models/operations/templateupdatetemplate.d.ts +20 -15
  302. package/models/operations/templateupdatetemplate.d.ts.map +1 -1
  303. package/models/operations/templateupdatetemplate.js +24 -18
  304. package/models/operations/templateupdatetemplate.js.map +1 -1
  305. package/package.json +3 -6
  306. package/sdk/document.d.ts +7 -0
  307. package/sdk/document.d.ts.map +1 -1
  308. package/sdk/document.js +10 -0
  309. package/sdk/document.js.map +1 -1
  310. package/sdk/envelope.d.ts +26 -0
  311. package/sdk/envelope.d.ts.map +1 -0
  312. package/sdk/envelope.js +42 -0
  313. package/sdk/envelope.js.map +1 -0
  314. package/sdk/sdk.d.ts +3 -0
  315. package/sdk/sdk.d.ts.map +1 -1
  316. package/sdk/sdk.js +4 -0
  317. package/sdk/sdk.js.map +1 -1
  318. package/sdk/template.d.ts +7 -0
  319. package/sdk/template.d.ts.map +1 -1
  320. package/sdk/template.js +10 -0
  321. package/sdk/template.js.map +1 -1
  322. package/src/funcs/documentDocumentGetMany.ts +181 -0
  323. package/src/funcs/envelopeEnvelopeAuditLogFind.ts +203 -0
  324. package/src/funcs/envelopeEnvelopeFind.ts +198 -0
  325. package/src/funcs/envelopeEnvelopeGetMany.ts +181 -0
  326. package/src/funcs/templateTemplateGetMany.ts +181 -0
  327. package/src/lib/config.ts +3 -3
  328. package/src/lib/encodings.ts +17 -3
  329. package/src/lib/sdks.ts +2 -2
  330. package/src/mcp-server/mcp-server.ts +1 -1
  331. package/src/mcp-server/prompts.ts +7 -3
  332. package/src/mcp-server/resources.ts +7 -3
  333. package/src/mcp-server/server.ts +11 -1
  334. package/src/mcp-server/tools/documentDocumentGetMany.ts +37 -0
  335. package/src/mcp-server/tools/envelopeEnvelopeAuditLogFind.ts +37 -0
  336. package/src/mcp-server/tools/envelopeEnvelopeFind.ts +37 -0
  337. package/src/mcp-server/tools/envelopeEnvelopeGetMany.ts +37 -0
  338. package/src/mcp-server/tools/templateTemplateGetMany.ts +37 -0
  339. package/src/mcp-server/tools.ts +7 -3
  340. package/src/models/errors/documentgetmany.ts +503 -0
  341. package/src/models/errors/envelopeauditlogfind.ts +637 -0
  342. package/src/models/errors/envelopefind.ts +613 -0
  343. package/src/models/errors/envelopegetmany.ts +503 -0
  344. package/src/models/errors/index.ts +5 -0
  345. package/src/models/errors/templategetmany.ts +503 -0
  346. package/src/models/operations/documentcreate.ts +169 -340
  347. package/src/models/operations/documentcreatedocumenttemporary.ts +220 -547
  348. package/src/models/operations/documentdistribute.ts +5 -0
  349. package/src/models/operations/documentfind.ts +74 -62
  350. package/src/models/operations/documentget.ts +52 -198
  351. package/src/models/operations/documentgetmany.ts +772 -0
  352. package/src/models/operations/documentupdate.ts +47 -38
  353. package/src/models/operations/embeddingpresigncreateembeddingpresigntoken.ts +4 -0
  354. package/src/models/operations/embeddingpresignverifyembeddingpresigntoken.ts +4 -0
  355. package/src/models/operations/envelopeauditlogfind.ts +8406 -0
  356. package/src/models/operations/envelopecreate.ts +239 -355
  357. package/src/models/operations/envelopedistribute.ts +100 -0
  358. package/src/models/operations/envelopefieldcreatemany.ts +219 -552
  359. package/src/models/operations/envelopefieldget.ts +52 -210
  360. package/src/models/operations/envelopefieldupdatemany.ts +219 -552
  361. package/src/models/operations/envelopefind.ts +979 -0
  362. package/src/models/operations/envelopeget.ts +63 -209
  363. package/src/models/operations/envelopegetmany.ts +2658 -0
  364. package/src/models/operations/enveloperecipientcreatemany.ts +91 -28
  365. package/src/models/operations/enveloperecipientget.ts +52 -212
  366. package/src/models/operations/enveloperecipientupdatemany.ts +91 -28
  367. package/src/models/operations/enveloperedistribute.ts +102 -0
  368. package/src/models/operations/envelopeupdate.ts +47 -38
  369. package/src/models/operations/envelopeuse.ts +259 -151
  370. package/src/models/operations/fieldcreatedocumentfield.ts +222 -553
  371. package/src/models/operations/fieldcreatedocumentfields.ts +221 -553
  372. package/src/models/operations/fieldcreatetemplatefield.ts +222 -553
  373. package/src/models/operations/fieldcreatetemplatefields.ts +221 -553
  374. package/src/models/operations/fieldgetdocumentfield.ts +52 -212
  375. package/src/models/operations/fieldgettemplatefield.ts +52 -212
  376. package/src/models/operations/fieldupdatedocumentfield.ts +222 -553
  377. package/src/models/operations/fieldupdatedocumentfields.ts +221 -553
  378. package/src/models/operations/fieldupdatetemplatefield.ts +222 -553
  379. package/src/models/operations/fieldupdatetemplatefields.ts +221 -553
  380. package/src/models/operations/folderupdatefolder.ts +12 -12
  381. package/src/models/operations/index.ts +5 -0
  382. package/src/models/operations/recipientcreatedocumentrecipient.ts +28 -24
  383. package/src/models/operations/recipientcreatedocumentrecipients.ts +28 -24
  384. package/src/models/operations/recipientcreatetemplaterecipient.ts +28 -24
  385. package/src/models/operations/recipientcreatetemplaterecipients.ts +28 -24
  386. package/src/models/operations/recipientgetdocumentrecipient.ts +53 -217
  387. package/src/models/operations/recipientgettemplaterecipient.ts +53 -217
  388. package/src/models/operations/recipientupdatedocumentrecipient.ts +80 -237
  389. package/src/models/operations/recipientupdatedocumentrecipients.ts +80 -237
  390. package/src/models/operations/recipientupdatetemplaterecipient.ts +80 -237
  391. package/src/models/operations/recipientupdatetemplaterecipients.ts +80 -237
  392. package/src/models/operations/templatecreatedocumentfromtemplate.ts +671 -420
  393. package/src/models/operations/templatecreatetemplate.ts +5 -0
  394. package/src/models/operations/templatecreatetemplatetemporary.ts +69 -224
  395. package/src/models/operations/templatefindtemplates.ts +64 -224
  396. package/src/models/operations/templategetmany.ts +2134 -0
  397. package/src/models/operations/templategettemplatebyid.ts +65 -225
  398. package/src/models/operations/templateupdatetemplate.ts +41 -37
  399. package/src/sdk/document.ts +18 -0
  400. package/src/sdk/envelope.ts +63 -0
  401. package/src/sdk/sdk.ts +6 -0
  402. package/src/sdk/template.ts +18 -0
  403. package/src/types/enums.ts +1 -21
  404. package/src/types/index.ts +2 -1
  405. package/src/types/unrecognized.ts +35 -0
  406. package/tsconfig.json +1 -2
  407. package/types/enums.d.ts +1 -8
  408. package/types/enums.d.ts.map +1 -1
  409. package/types/enums.js +3 -21
  410. package/types/enums.js.map +1 -1
  411. package/types/index.d.ts +2 -1
  412. package/types/index.d.ts.map +1 -1
  413. package/types/index.js +15 -0
  414. package/types/index.js.map +1 -1
  415. package/types/unrecognized.d.ts +16 -0
  416. package/types/unrecognized.d.ts.map +1 -0
  417. package/types/unrecognized.js +34 -0
  418. package/types/unrecognized.js.map +1 -0
@@ -0,0 +1,2658 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { ClosedEnum } from "../../types/enums.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+
11
+ export type IdsTemplateID = {
12
+ type: "templateId";
13
+ ids: Array<number>;
14
+ };
15
+
16
+ export type IdsDocumentID = {
17
+ type: "documentId";
18
+ ids: Array<number>;
19
+ };
20
+
21
+ export type IdsEnvelopeID = {
22
+ type: "envelopeId";
23
+ ids: Array<string>;
24
+ };
25
+
26
+ export type Ids = IdsEnvelopeID | IdsDocumentID | IdsTemplateID;
27
+
28
+ export type EnvelopeGetManyRequest = {
29
+ ids: IdsEnvelopeID | IdsDocumentID | IdsTemplateID;
30
+ };
31
+
32
+ export const EnvelopeGetManyTypeEnum = {
33
+ Document: "DOCUMENT",
34
+ Template: "TEMPLATE",
35
+ } as const;
36
+ export type EnvelopeGetManyTypeEnum = ClosedEnum<
37
+ typeof EnvelopeGetManyTypeEnum
38
+ >;
39
+
40
+ export const EnvelopeGetManyStatus = {
41
+ Draft: "DRAFT",
42
+ Pending: "PENDING",
43
+ Completed: "COMPLETED",
44
+ Rejected: "REJECTED",
45
+ } as const;
46
+ export type EnvelopeGetManyStatus = ClosedEnum<typeof EnvelopeGetManyStatus>;
47
+
48
+ export const EnvelopeGetManySource = {
49
+ Document: "DOCUMENT",
50
+ Template: "TEMPLATE",
51
+ TemplateDirectLink: "TEMPLATE_DIRECT_LINK",
52
+ } as const;
53
+ export type EnvelopeGetManySource = ClosedEnum<typeof EnvelopeGetManySource>;
54
+
55
+ export const EnvelopeGetManyVisibility = {
56
+ Everyone: "EVERYONE",
57
+ ManagerAndAbove: "MANAGER_AND_ABOVE",
58
+ Admin: "ADMIN",
59
+ } as const;
60
+ export type EnvelopeGetManyVisibility = ClosedEnum<
61
+ typeof EnvelopeGetManyVisibility
62
+ >;
63
+
64
+ export const EnvelopeGetManyTemplateType = {
65
+ Public: "PUBLIC",
66
+ Private: "PRIVATE",
67
+ } as const;
68
+ export type EnvelopeGetManyTemplateType = ClosedEnum<
69
+ typeof EnvelopeGetManyTemplateType
70
+ >;
71
+
72
+ export const EnvelopeGetManyGlobalAccessAuth = {
73
+ Account: "ACCOUNT",
74
+ TwoFactorAuth: "TWO_FACTOR_AUTH",
75
+ } as const;
76
+ export type EnvelopeGetManyGlobalAccessAuth = ClosedEnum<
77
+ typeof EnvelopeGetManyGlobalAccessAuth
78
+ >;
79
+
80
+ export const EnvelopeGetManyGlobalActionAuth = {
81
+ Account: "ACCOUNT",
82
+ Passkey: "PASSKEY",
83
+ TwoFactorAuth: "TWO_FACTOR_AUTH",
84
+ Password: "PASSWORD",
85
+ } as const;
86
+ export type EnvelopeGetManyGlobalActionAuth = ClosedEnum<
87
+ typeof EnvelopeGetManyGlobalActionAuth
88
+ >;
89
+
90
+ export type EnvelopeGetManyAuthOptions = {
91
+ globalAccessAuth: Array<EnvelopeGetManyGlobalAccessAuth>;
92
+ globalActionAuth: Array<EnvelopeGetManyGlobalActionAuth>;
93
+ };
94
+
95
+ export type EnvelopeGetManyFormValues = string | boolean | number;
96
+
97
+ export const EnvelopeGetManySigningOrder = {
98
+ Parallel: "PARALLEL",
99
+ Sequential: "SEQUENTIAL",
100
+ } as const;
101
+ export type EnvelopeGetManySigningOrder = ClosedEnum<
102
+ typeof EnvelopeGetManySigningOrder
103
+ >;
104
+
105
+ export const EnvelopeGetManyDistributionMethod = {
106
+ Email: "EMAIL",
107
+ None: "NONE",
108
+ } as const;
109
+ export type EnvelopeGetManyDistributionMethod = ClosedEnum<
110
+ typeof EnvelopeGetManyDistributionMethod
111
+ >;
112
+
113
+ export type EnvelopeGetManyEmailSettings = {
114
+ recipientSigningRequest?: boolean | undefined;
115
+ recipientRemoved?: boolean | undefined;
116
+ recipientSigned?: boolean | undefined;
117
+ documentPending?: boolean | undefined;
118
+ documentCompleted?: boolean | undefined;
119
+ documentDeleted?: boolean | undefined;
120
+ ownerDocumentCompleted?: boolean | undefined;
121
+ };
122
+
123
+ export type EnvelopeGetManyDocumentMeta = {
124
+ signingOrder: EnvelopeGetManySigningOrder;
125
+ distributionMethod: EnvelopeGetManyDistributionMethod;
126
+ id: string;
127
+ subject: string | null;
128
+ message: string | null;
129
+ timezone: string | null;
130
+ dateFormat: string | null;
131
+ redirectUrl: string | null;
132
+ typedSignatureEnabled: boolean;
133
+ uploadSignatureEnabled: boolean;
134
+ drawSignatureEnabled: boolean;
135
+ allowDictateNextSigner: boolean;
136
+ language: string;
137
+ emailSettings: EnvelopeGetManyEmailSettings | null;
138
+ emailId: string | null;
139
+ emailReplyTo: string | null;
140
+ };
141
+
142
+ export const EnvelopeGetManyRole = {
143
+ Cc: "CC",
144
+ Signer: "SIGNER",
145
+ Viewer: "VIEWER",
146
+ Approver: "APPROVER",
147
+ Assistant: "ASSISTANT",
148
+ } as const;
149
+ export type EnvelopeGetManyRole = ClosedEnum<typeof EnvelopeGetManyRole>;
150
+
151
+ export const EnvelopeGetManyReadStatus = {
152
+ NotOpened: "NOT_OPENED",
153
+ Opened: "OPENED",
154
+ } as const;
155
+ export type EnvelopeGetManyReadStatus = ClosedEnum<
156
+ typeof EnvelopeGetManyReadStatus
157
+ >;
158
+
159
+ export const EnvelopeGetManySigningStatus = {
160
+ NotSigned: "NOT_SIGNED",
161
+ Signed: "SIGNED",
162
+ Rejected: "REJECTED",
163
+ } as const;
164
+ export type EnvelopeGetManySigningStatus = ClosedEnum<
165
+ typeof EnvelopeGetManySigningStatus
166
+ >;
167
+
168
+ export const EnvelopeGetManySendStatus = {
169
+ NotSent: "NOT_SENT",
170
+ Sent: "SENT",
171
+ } as const;
172
+ export type EnvelopeGetManySendStatus = ClosedEnum<
173
+ typeof EnvelopeGetManySendStatus
174
+ >;
175
+
176
+ export const EnvelopeGetManyAccessAuth = {
177
+ Account: "ACCOUNT",
178
+ TwoFactorAuth: "TWO_FACTOR_AUTH",
179
+ } as const;
180
+ export type EnvelopeGetManyAccessAuth = ClosedEnum<
181
+ typeof EnvelopeGetManyAccessAuth
182
+ >;
183
+
184
+ export const EnvelopeGetManyActionAuth = {
185
+ Account: "ACCOUNT",
186
+ Passkey: "PASSKEY",
187
+ TwoFactorAuth: "TWO_FACTOR_AUTH",
188
+ Password: "PASSWORD",
189
+ ExplicitNone: "EXPLICIT_NONE",
190
+ } as const;
191
+ export type EnvelopeGetManyActionAuth = ClosedEnum<
192
+ typeof EnvelopeGetManyActionAuth
193
+ >;
194
+
195
+ export type EnvelopeGetManyRecipientAuthOptions = {
196
+ accessAuth: Array<EnvelopeGetManyAccessAuth>;
197
+ actionAuth: Array<EnvelopeGetManyActionAuth>;
198
+ };
199
+
200
+ export type EnvelopeGetManyRecipient = {
201
+ envelopeId: string;
202
+ role: EnvelopeGetManyRole;
203
+ readStatus: EnvelopeGetManyReadStatus;
204
+ signingStatus: EnvelopeGetManySigningStatus;
205
+ sendStatus: EnvelopeGetManySendStatus;
206
+ id: number;
207
+ email: string;
208
+ name: string;
209
+ token: string;
210
+ documentDeletedAt: string | null;
211
+ expired: string | null;
212
+ signedAt: string | null;
213
+ authOptions: EnvelopeGetManyRecipientAuthOptions | null;
214
+ signingOrder: number | null;
215
+ rejectionReason: string | null;
216
+ };
217
+
218
+ export const EnvelopeGetManyFieldTypeEnum = {
219
+ Signature: "SIGNATURE",
220
+ FreeSignature: "FREE_SIGNATURE",
221
+ Initials: "INITIALS",
222
+ Name: "NAME",
223
+ Email: "EMAIL",
224
+ Date: "DATE",
225
+ Text: "TEXT",
226
+ Number: "NUMBER",
227
+ Radio: "RADIO",
228
+ Checkbox: "CHECKBOX",
229
+ Dropdown: "DROPDOWN",
230
+ } as const;
231
+ export type EnvelopeGetManyFieldTypeEnum = ClosedEnum<
232
+ typeof EnvelopeGetManyFieldTypeEnum
233
+ >;
234
+
235
+ export type EnvelopeGetManyValue3 = {
236
+ value: string;
237
+ };
238
+
239
+ export type EnvelopeGetManyFieldMetaDropdown = {
240
+ label?: string | undefined;
241
+ placeholder?: string | undefined;
242
+ required?: boolean | undefined;
243
+ readOnly?: boolean | undefined;
244
+ fontSize?: number | undefined;
245
+ type: "dropdown";
246
+ values?: Array<EnvelopeGetManyValue3> | undefined;
247
+ defaultValue?: string | undefined;
248
+ };
249
+
250
+ export type EnvelopeGetManyValue2 = {
251
+ id: number;
252
+ checked: boolean;
253
+ value: string;
254
+ };
255
+
256
+ export const EnvelopeGetManyDirection2 = {
257
+ Vertical: "vertical",
258
+ Horizontal: "horizontal",
259
+ } as const;
260
+ export type EnvelopeGetManyDirection2 = ClosedEnum<
261
+ typeof EnvelopeGetManyDirection2
262
+ >;
263
+
264
+ export type EnvelopeGetManyFieldMetaCheckbox = {
265
+ label?: string | undefined;
266
+ placeholder?: string | undefined;
267
+ required?: boolean | undefined;
268
+ readOnly?: boolean | undefined;
269
+ fontSize?: number | undefined;
270
+ type: "checkbox";
271
+ values?: Array<EnvelopeGetManyValue2> | undefined;
272
+ validationRule?: string | undefined;
273
+ validationLength?: number | undefined;
274
+ direction?: EnvelopeGetManyDirection2 | undefined;
275
+ };
276
+
277
+ export type EnvelopeGetManyValue1 = {
278
+ id: number;
279
+ checked: boolean;
280
+ value: string;
281
+ };
282
+
283
+ export const EnvelopeGetManyDirection1 = {
284
+ Vertical: "vertical",
285
+ Horizontal: "horizontal",
286
+ } as const;
287
+ export type EnvelopeGetManyDirection1 = ClosedEnum<
288
+ typeof EnvelopeGetManyDirection1
289
+ >;
290
+
291
+ export type EnvelopeGetManyFieldMetaRadio = {
292
+ label?: string | undefined;
293
+ placeholder?: string | undefined;
294
+ required?: boolean | undefined;
295
+ readOnly?: boolean | undefined;
296
+ fontSize?: number | undefined;
297
+ type: "radio";
298
+ values?: Array<EnvelopeGetManyValue1> | undefined;
299
+ direction?: EnvelopeGetManyDirection1 | undefined;
300
+ };
301
+
302
+ export const EnvelopeGetManyTextAlign6 = {
303
+ Left: "left",
304
+ Center: "center",
305
+ Right: "right",
306
+ } as const;
307
+ export type EnvelopeGetManyTextAlign6 = ClosedEnum<
308
+ typeof EnvelopeGetManyTextAlign6
309
+ >;
310
+
311
+ export const EnvelopeGetManyVerticalAlign2 = {
312
+ Top: "top",
313
+ Middle: "middle",
314
+ Bottom: "bottom",
315
+ } as const;
316
+ export type EnvelopeGetManyVerticalAlign2 = ClosedEnum<
317
+ typeof EnvelopeGetManyVerticalAlign2
318
+ >;
319
+
320
+ export type EnvelopeGetManyFieldMetaNumber = {
321
+ label?: string | undefined;
322
+ placeholder?: string | undefined;
323
+ required?: boolean | undefined;
324
+ readOnly?: boolean | undefined;
325
+ fontSize?: number | undefined;
326
+ type: "number";
327
+ numberFormat?: string | null | undefined;
328
+ value?: string | undefined;
329
+ minValue?: number | null | undefined;
330
+ maxValue?: number | null | undefined;
331
+ textAlign?: EnvelopeGetManyTextAlign6 | undefined;
332
+ lineHeight?: number | null | undefined;
333
+ letterSpacing?: number | null | undefined;
334
+ verticalAlign?: EnvelopeGetManyVerticalAlign2 | null | undefined;
335
+ };
336
+
337
+ export const EnvelopeGetManyTextAlign5 = {
338
+ Left: "left",
339
+ Center: "center",
340
+ Right: "right",
341
+ } as const;
342
+ export type EnvelopeGetManyTextAlign5 = ClosedEnum<
343
+ typeof EnvelopeGetManyTextAlign5
344
+ >;
345
+
346
+ export const EnvelopeGetManyVerticalAlign1 = {
347
+ Top: "top",
348
+ Middle: "middle",
349
+ Bottom: "bottom",
350
+ } as const;
351
+ export type EnvelopeGetManyVerticalAlign1 = ClosedEnum<
352
+ typeof EnvelopeGetManyVerticalAlign1
353
+ >;
354
+
355
+ export type EnvelopeGetManyFieldMetaText = {
356
+ label?: string | undefined;
357
+ placeholder?: string | undefined;
358
+ required?: boolean | undefined;
359
+ readOnly?: boolean | undefined;
360
+ fontSize?: number | undefined;
361
+ type: "text";
362
+ text?: string | undefined;
363
+ characterLimit?: number | undefined;
364
+ textAlign?: EnvelopeGetManyTextAlign5 | undefined;
365
+ lineHeight?: number | null | undefined;
366
+ letterSpacing?: number | null | undefined;
367
+ verticalAlign?: EnvelopeGetManyVerticalAlign1 | null | undefined;
368
+ };
369
+
370
+ export const EnvelopeGetManyTextAlign4 = {
371
+ Left: "left",
372
+ Center: "center",
373
+ Right: "right",
374
+ } as const;
375
+ export type EnvelopeGetManyTextAlign4 = ClosedEnum<
376
+ typeof EnvelopeGetManyTextAlign4
377
+ >;
378
+
379
+ export type EnvelopeGetManyFieldMetaDate = {
380
+ label?: string | undefined;
381
+ placeholder?: string | undefined;
382
+ required?: boolean | undefined;
383
+ readOnly?: boolean | undefined;
384
+ fontSize?: number | undefined;
385
+ type: "date";
386
+ textAlign?: EnvelopeGetManyTextAlign4 | undefined;
387
+ };
388
+
389
+ export const EnvelopeGetManyTextAlign3 = {
390
+ Left: "left",
391
+ Center: "center",
392
+ Right: "right",
393
+ } as const;
394
+ export type EnvelopeGetManyTextAlign3 = ClosedEnum<
395
+ typeof EnvelopeGetManyTextAlign3
396
+ >;
397
+
398
+ export type EnvelopeGetManyFieldMetaEmail = {
399
+ label?: string | undefined;
400
+ placeholder?: string | undefined;
401
+ required?: boolean | undefined;
402
+ readOnly?: boolean | undefined;
403
+ fontSize?: number | undefined;
404
+ type: "email";
405
+ textAlign?: EnvelopeGetManyTextAlign3 | undefined;
406
+ };
407
+
408
+ export const EnvelopeGetManyTextAlign2 = {
409
+ Left: "left",
410
+ Center: "center",
411
+ Right: "right",
412
+ } as const;
413
+ export type EnvelopeGetManyTextAlign2 = ClosedEnum<
414
+ typeof EnvelopeGetManyTextAlign2
415
+ >;
416
+
417
+ export type EnvelopeGetManyFieldMetaName = {
418
+ label?: string | undefined;
419
+ placeholder?: string | undefined;
420
+ required?: boolean | undefined;
421
+ readOnly?: boolean | undefined;
422
+ fontSize?: number | undefined;
423
+ type: "name";
424
+ textAlign?: EnvelopeGetManyTextAlign2 | undefined;
425
+ };
426
+
427
+ export const EnvelopeGetManyTextAlign1 = {
428
+ Left: "left",
429
+ Center: "center",
430
+ Right: "right",
431
+ } as const;
432
+ export type EnvelopeGetManyTextAlign1 = ClosedEnum<
433
+ typeof EnvelopeGetManyTextAlign1
434
+ >;
435
+
436
+ export type EnvelopeGetManyFieldMetaInitials = {
437
+ label?: string | undefined;
438
+ placeholder?: string | undefined;
439
+ required?: boolean | undefined;
440
+ readOnly?: boolean | undefined;
441
+ fontSize?: number | undefined;
442
+ type: "initials";
443
+ textAlign?: EnvelopeGetManyTextAlign1 | undefined;
444
+ };
445
+
446
+ export type EnvelopeGetManyFieldMetaSignature = {
447
+ label?: string | undefined;
448
+ placeholder?: string | undefined;
449
+ required?: boolean | undefined;
450
+ readOnly?: boolean | undefined;
451
+ fontSize?: number | undefined;
452
+ type: "signature";
453
+ };
454
+
455
+ export type EnvelopeGetManyFieldMetaUnion =
456
+ | EnvelopeGetManyFieldMetaSignature
457
+ | EnvelopeGetManyFieldMetaInitials
458
+ | EnvelopeGetManyFieldMetaName
459
+ | EnvelopeGetManyFieldMetaEmail
460
+ | EnvelopeGetManyFieldMetaDate
461
+ | EnvelopeGetManyFieldMetaText
462
+ | EnvelopeGetManyFieldMetaNumber
463
+ | EnvelopeGetManyFieldMetaRadio
464
+ | EnvelopeGetManyFieldMetaCheckbox
465
+ | EnvelopeGetManyFieldMetaDropdown;
466
+
467
+ export type EnvelopeGetManyField = {
468
+ envelopeId: string;
469
+ envelopeItemId: string;
470
+ type: EnvelopeGetManyFieldTypeEnum;
471
+ id: number;
472
+ secondaryId: string;
473
+ recipientId: number;
474
+ page: number;
475
+ positionX?: any | undefined;
476
+ positionY?: any | undefined;
477
+ width?: any | undefined;
478
+ height?: any | undefined;
479
+ customText: string;
480
+ inserted: boolean;
481
+ fieldMeta:
482
+ | EnvelopeGetManyFieldMetaSignature
483
+ | EnvelopeGetManyFieldMetaInitials
484
+ | EnvelopeGetManyFieldMetaName
485
+ | EnvelopeGetManyFieldMetaEmail
486
+ | EnvelopeGetManyFieldMetaDate
487
+ | EnvelopeGetManyFieldMetaText
488
+ | EnvelopeGetManyFieldMetaNumber
489
+ | EnvelopeGetManyFieldMetaRadio
490
+ | EnvelopeGetManyFieldMetaCheckbox
491
+ | EnvelopeGetManyFieldMetaDropdown
492
+ | null;
493
+ };
494
+
495
+ export type EnvelopeGetManyEnvelopeItem = {
496
+ envelopeId: string;
497
+ id: string;
498
+ title: string;
499
+ order: number;
500
+ };
501
+
502
+ export type EnvelopeGetManyDirectLink = {
503
+ directTemplateRecipientId: number;
504
+ enabled: boolean;
505
+ id: string;
506
+ token: string;
507
+ };
508
+
509
+ export type EnvelopeGetManyTeam = {
510
+ id: number;
511
+ url: string;
512
+ };
513
+
514
+ export type EnvelopeGetManyUser = {
515
+ id: number;
516
+ name: string;
517
+ email: string;
518
+ };
519
+
520
+ export type EnvelopeGetManyData = {
521
+ internalVersion: number;
522
+ type: EnvelopeGetManyTypeEnum;
523
+ status: EnvelopeGetManyStatus;
524
+ source: EnvelopeGetManySource;
525
+ visibility: EnvelopeGetManyVisibility;
526
+ templateType: EnvelopeGetManyTemplateType;
527
+ id: string;
528
+ secondaryId: string;
529
+ externalId: string | null;
530
+ createdAt: string;
531
+ updatedAt: string;
532
+ completedAt: string | null;
533
+ deletedAt: string | null;
534
+ title: string;
535
+ authOptions: EnvelopeGetManyAuthOptions | null;
536
+ formValues: { [k: string]: string | boolean | number } | null;
537
+ publicTitle: string;
538
+ publicDescription: string;
539
+ userId: number;
540
+ teamId: number;
541
+ folderId: string | null;
542
+ templateId: number | null;
543
+ documentMeta: EnvelopeGetManyDocumentMeta;
544
+ recipients: Array<EnvelopeGetManyRecipient>;
545
+ fields: Array<EnvelopeGetManyField>;
546
+ envelopeItems: Array<EnvelopeGetManyEnvelopeItem>;
547
+ directLink: EnvelopeGetManyDirectLink | null;
548
+ team: EnvelopeGetManyTeam;
549
+ user: EnvelopeGetManyUser;
550
+ };
551
+
552
+ /**
553
+ * Successful response
554
+ */
555
+ export type EnvelopeGetManyResponse = {
556
+ data: Array<EnvelopeGetManyData>;
557
+ };
558
+
559
+ /** @internal */
560
+ export const IdsTemplateID$inboundSchema: z.ZodType<
561
+ IdsTemplateID,
562
+ z.ZodTypeDef,
563
+ unknown
564
+ > = z.object({
565
+ type: z.literal("templateId"),
566
+ ids: z.array(z.number()),
567
+ });
568
+ /** @internal */
569
+ export type IdsTemplateID$Outbound = {
570
+ type: "templateId";
571
+ ids: Array<number>;
572
+ };
573
+
574
+ /** @internal */
575
+ export const IdsTemplateID$outboundSchema: z.ZodType<
576
+ IdsTemplateID$Outbound,
577
+ z.ZodTypeDef,
578
+ IdsTemplateID
579
+ > = z.object({
580
+ type: z.literal("templateId"),
581
+ ids: z.array(z.number()),
582
+ });
583
+
584
+ export function idsTemplateIDToJSON(idsTemplateID: IdsTemplateID): string {
585
+ return JSON.stringify(IdsTemplateID$outboundSchema.parse(idsTemplateID));
586
+ }
587
+ export function idsTemplateIDFromJSON(
588
+ jsonString: string,
589
+ ): SafeParseResult<IdsTemplateID, SDKValidationError> {
590
+ return safeParse(
591
+ jsonString,
592
+ (x) => IdsTemplateID$inboundSchema.parse(JSON.parse(x)),
593
+ `Failed to parse 'IdsTemplateID' from JSON`,
594
+ );
595
+ }
596
+
597
+ /** @internal */
598
+ export const IdsDocumentID$inboundSchema: z.ZodType<
599
+ IdsDocumentID,
600
+ z.ZodTypeDef,
601
+ unknown
602
+ > = z.object({
603
+ type: z.literal("documentId"),
604
+ ids: z.array(z.number()),
605
+ });
606
+ /** @internal */
607
+ export type IdsDocumentID$Outbound = {
608
+ type: "documentId";
609
+ ids: Array<number>;
610
+ };
611
+
612
+ /** @internal */
613
+ export const IdsDocumentID$outboundSchema: z.ZodType<
614
+ IdsDocumentID$Outbound,
615
+ z.ZodTypeDef,
616
+ IdsDocumentID
617
+ > = z.object({
618
+ type: z.literal("documentId"),
619
+ ids: z.array(z.number()),
620
+ });
621
+
622
+ export function idsDocumentIDToJSON(idsDocumentID: IdsDocumentID): string {
623
+ return JSON.stringify(IdsDocumentID$outboundSchema.parse(idsDocumentID));
624
+ }
625
+ export function idsDocumentIDFromJSON(
626
+ jsonString: string,
627
+ ): SafeParseResult<IdsDocumentID, SDKValidationError> {
628
+ return safeParse(
629
+ jsonString,
630
+ (x) => IdsDocumentID$inboundSchema.parse(JSON.parse(x)),
631
+ `Failed to parse 'IdsDocumentID' from JSON`,
632
+ );
633
+ }
634
+
635
+ /** @internal */
636
+ export const IdsEnvelopeID$inboundSchema: z.ZodType<
637
+ IdsEnvelopeID,
638
+ z.ZodTypeDef,
639
+ unknown
640
+ > = z.object({
641
+ type: z.literal("envelopeId"),
642
+ ids: z.array(z.string()),
643
+ });
644
+ /** @internal */
645
+ export type IdsEnvelopeID$Outbound = {
646
+ type: "envelopeId";
647
+ ids: Array<string>;
648
+ };
649
+
650
+ /** @internal */
651
+ export const IdsEnvelopeID$outboundSchema: z.ZodType<
652
+ IdsEnvelopeID$Outbound,
653
+ z.ZodTypeDef,
654
+ IdsEnvelopeID
655
+ > = z.object({
656
+ type: z.literal("envelopeId"),
657
+ ids: z.array(z.string()),
658
+ });
659
+
660
+ export function idsEnvelopeIDToJSON(idsEnvelopeID: IdsEnvelopeID): string {
661
+ return JSON.stringify(IdsEnvelopeID$outboundSchema.parse(idsEnvelopeID));
662
+ }
663
+ export function idsEnvelopeIDFromJSON(
664
+ jsonString: string,
665
+ ): SafeParseResult<IdsEnvelopeID, SDKValidationError> {
666
+ return safeParse(
667
+ jsonString,
668
+ (x) => IdsEnvelopeID$inboundSchema.parse(JSON.parse(x)),
669
+ `Failed to parse 'IdsEnvelopeID' from JSON`,
670
+ );
671
+ }
672
+
673
+ /** @internal */
674
+ export const Ids$inboundSchema: z.ZodType<Ids, z.ZodTypeDef, unknown> = z.union(
675
+ [
676
+ z.lazy(() => IdsEnvelopeID$inboundSchema),
677
+ z.lazy(() => IdsDocumentID$inboundSchema),
678
+ z.lazy(() => IdsTemplateID$inboundSchema),
679
+ ],
680
+ );
681
+ /** @internal */
682
+ export type Ids$Outbound =
683
+ | IdsEnvelopeID$Outbound
684
+ | IdsDocumentID$Outbound
685
+ | IdsTemplateID$Outbound;
686
+
687
+ /** @internal */
688
+ export const Ids$outboundSchema: z.ZodType<Ids$Outbound, z.ZodTypeDef, Ids> = z
689
+ .union([
690
+ z.lazy(() => IdsEnvelopeID$outboundSchema),
691
+ z.lazy(() => IdsDocumentID$outboundSchema),
692
+ z.lazy(() => IdsTemplateID$outboundSchema),
693
+ ]);
694
+
695
+ export function idsToJSON(ids: Ids): string {
696
+ return JSON.stringify(Ids$outboundSchema.parse(ids));
697
+ }
698
+ export function idsFromJSON(
699
+ jsonString: string,
700
+ ): SafeParseResult<Ids, SDKValidationError> {
701
+ return safeParse(
702
+ jsonString,
703
+ (x) => Ids$inboundSchema.parse(JSON.parse(x)),
704
+ `Failed to parse 'Ids' from JSON`,
705
+ );
706
+ }
707
+
708
+ /** @internal */
709
+ export const EnvelopeGetManyRequest$inboundSchema: z.ZodType<
710
+ EnvelopeGetManyRequest,
711
+ z.ZodTypeDef,
712
+ unknown
713
+ > = z.object({
714
+ ids: z.union([
715
+ z.lazy(() => IdsEnvelopeID$inboundSchema),
716
+ z.lazy(() => IdsDocumentID$inboundSchema),
717
+ z.lazy(() => IdsTemplateID$inboundSchema),
718
+ ]),
719
+ });
720
+ /** @internal */
721
+ export type EnvelopeGetManyRequest$Outbound = {
722
+ ids: IdsEnvelopeID$Outbound | IdsDocumentID$Outbound | IdsTemplateID$Outbound;
723
+ };
724
+
725
+ /** @internal */
726
+ export const EnvelopeGetManyRequest$outboundSchema: z.ZodType<
727
+ EnvelopeGetManyRequest$Outbound,
728
+ z.ZodTypeDef,
729
+ EnvelopeGetManyRequest
730
+ > = z.object({
731
+ ids: z.union([
732
+ z.lazy(() => IdsEnvelopeID$outboundSchema),
733
+ z.lazy(() => IdsDocumentID$outboundSchema),
734
+ z.lazy(() => IdsTemplateID$outboundSchema),
735
+ ]),
736
+ });
737
+
738
+ export function envelopeGetManyRequestToJSON(
739
+ envelopeGetManyRequest: EnvelopeGetManyRequest,
740
+ ): string {
741
+ return JSON.stringify(
742
+ EnvelopeGetManyRequest$outboundSchema.parse(envelopeGetManyRequest),
743
+ );
744
+ }
745
+ export function envelopeGetManyRequestFromJSON(
746
+ jsonString: string,
747
+ ): SafeParseResult<EnvelopeGetManyRequest, SDKValidationError> {
748
+ return safeParse(
749
+ jsonString,
750
+ (x) => EnvelopeGetManyRequest$inboundSchema.parse(JSON.parse(x)),
751
+ `Failed to parse 'EnvelopeGetManyRequest' from JSON`,
752
+ );
753
+ }
754
+
755
+ /** @internal */
756
+ export const EnvelopeGetManyTypeEnum$inboundSchema: z.ZodNativeEnum<
757
+ typeof EnvelopeGetManyTypeEnum
758
+ > = z.nativeEnum(EnvelopeGetManyTypeEnum);
759
+ /** @internal */
760
+ export const EnvelopeGetManyTypeEnum$outboundSchema: z.ZodNativeEnum<
761
+ typeof EnvelopeGetManyTypeEnum
762
+ > = EnvelopeGetManyTypeEnum$inboundSchema;
763
+
764
+ /** @internal */
765
+ export const EnvelopeGetManyStatus$inboundSchema: z.ZodNativeEnum<
766
+ typeof EnvelopeGetManyStatus
767
+ > = z.nativeEnum(EnvelopeGetManyStatus);
768
+ /** @internal */
769
+ export const EnvelopeGetManyStatus$outboundSchema: z.ZodNativeEnum<
770
+ typeof EnvelopeGetManyStatus
771
+ > = EnvelopeGetManyStatus$inboundSchema;
772
+
773
+ /** @internal */
774
+ export const EnvelopeGetManySource$inboundSchema: z.ZodNativeEnum<
775
+ typeof EnvelopeGetManySource
776
+ > = z.nativeEnum(EnvelopeGetManySource);
777
+ /** @internal */
778
+ export const EnvelopeGetManySource$outboundSchema: z.ZodNativeEnum<
779
+ typeof EnvelopeGetManySource
780
+ > = EnvelopeGetManySource$inboundSchema;
781
+
782
+ /** @internal */
783
+ export const EnvelopeGetManyVisibility$inboundSchema: z.ZodNativeEnum<
784
+ typeof EnvelopeGetManyVisibility
785
+ > = z.nativeEnum(EnvelopeGetManyVisibility);
786
+ /** @internal */
787
+ export const EnvelopeGetManyVisibility$outboundSchema: z.ZodNativeEnum<
788
+ typeof EnvelopeGetManyVisibility
789
+ > = EnvelopeGetManyVisibility$inboundSchema;
790
+
791
+ /** @internal */
792
+ export const EnvelopeGetManyTemplateType$inboundSchema: z.ZodNativeEnum<
793
+ typeof EnvelopeGetManyTemplateType
794
+ > = z.nativeEnum(EnvelopeGetManyTemplateType);
795
+ /** @internal */
796
+ export const EnvelopeGetManyTemplateType$outboundSchema: z.ZodNativeEnum<
797
+ typeof EnvelopeGetManyTemplateType
798
+ > = EnvelopeGetManyTemplateType$inboundSchema;
799
+
800
+ /** @internal */
801
+ export const EnvelopeGetManyGlobalAccessAuth$inboundSchema: z.ZodNativeEnum<
802
+ typeof EnvelopeGetManyGlobalAccessAuth
803
+ > = z.nativeEnum(EnvelopeGetManyGlobalAccessAuth);
804
+ /** @internal */
805
+ export const EnvelopeGetManyGlobalAccessAuth$outboundSchema: z.ZodNativeEnum<
806
+ typeof EnvelopeGetManyGlobalAccessAuth
807
+ > = EnvelopeGetManyGlobalAccessAuth$inboundSchema;
808
+
809
+ /** @internal */
810
+ export const EnvelopeGetManyGlobalActionAuth$inboundSchema: z.ZodNativeEnum<
811
+ typeof EnvelopeGetManyGlobalActionAuth
812
+ > = z.nativeEnum(EnvelopeGetManyGlobalActionAuth);
813
+ /** @internal */
814
+ export const EnvelopeGetManyGlobalActionAuth$outboundSchema: z.ZodNativeEnum<
815
+ typeof EnvelopeGetManyGlobalActionAuth
816
+ > = EnvelopeGetManyGlobalActionAuth$inboundSchema;
817
+
818
+ /** @internal */
819
+ export const EnvelopeGetManyAuthOptions$inboundSchema: z.ZodType<
820
+ EnvelopeGetManyAuthOptions,
821
+ z.ZodTypeDef,
822
+ unknown
823
+ > = z.object({
824
+ globalAccessAuth: z.array(EnvelopeGetManyGlobalAccessAuth$inboundSchema),
825
+ globalActionAuth: z.array(EnvelopeGetManyGlobalActionAuth$inboundSchema),
826
+ });
827
+ /** @internal */
828
+ export type EnvelopeGetManyAuthOptions$Outbound = {
829
+ globalAccessAuth: Array<string>;
830
+ globalActionAuth: Array<string>;
831
+ };
832
+
833
+ /** @internal */
834
+ export const EnvelopeGetManyAuthOptions$outboundSchema: z.ZodType<
835
+ EnvelopeGetManyAuthOptions$Outbound,
836
+ z.ZodTypeDef,
837
+ EnvelopeGetManyAuthOptions
838
+ > = z.object({
839
+ globalAccessAuth: z.array(EnvelopeGetManyGlobalAccessAuth$outboundSchema),
840
+ globalActionAuth: z.array(EnvelopeGetManyGlobalActionAuth$outboundSchema),
841
+ });
842
+
843
+ export function envelopeGetManyAuthOptionsToJSON(
844
+ envelopeGetManyAuthOptions: EnvelopeGetManyAuthOptions,
845
+ ): string {
846
+ return JSON.stringify(
847
+ EnvelopeGetManyAuthOptions$outboundSchema.parse(envelopeGetManyAuthOptions),
848
+ );
849
+ }
850
+ export function envelopeGetManyAuthOptionsFromJSON(
851
+ jsonString: string,
852
+ ): SafeParseResult<EnvelopeGetManyAuthOptions, SDKValidationError> {
853
+ return safeParse(
854
+ jsonString,
855
+ (x) => EnvelopeGetManyAuthOptions$inboundSchema.parse(JSON.parse(x)),
856
+ `Failed to parse 'EnvelopeGetManyAuthOptions' from JSON`,
857
+ );
858
+ }
859
+
860
+ /** @internal */
861
+ export const EnvelopeGetManyFormValues$inboundSchema: z.ZodType<
862
+ EnvelopeGetManyFormValues,
863
+ z.ZodTypeDef,
864
+ unknown
865
+ > = z.union([z.string(), z.boolean(), z.number()]);
866
+ /** @internal */
867
+ export type EnvelopeGetManyFormValues$Outbound = string | boolean | number;
868
+
869
+ /** @internal */
870
+ export const EnvelopeGetManyFormValues$outboundSchema: z.ZodType<
871
+ EnvelopeGetManyFormValues$Outbound,
872
+ z.ZodTypeDef,
873
+ EnvelopeGetManyFormValues
874
+ > = z.union([z.string(), z.boolean(), z.number()]);
875
+
876
+ export function envelopeGetManyFormValuesToJSON(
877
+ envelopeGetManyFormValues: EnvelopeGetManyFormValues,
878
+ ): string {
879
+ return JSON.stringify(
880
+ EnvelopeGetManyFormValues$outboundSchema.parse(envelopeGetManyFormValues),
881
+ );
882
+ }
883
+ export function envelopeGetManyFormValuesFromJSON(
884
+ jsonString: string,
885
+ ): SafeParseResult<EnvelopeGetManyFormValues, SDKValidationError> {
886
+ return safeParse(
887
+ jsonString,
888
+ (x) => EnvelopeGetManyFormValues$inboundSchema.parse(JSON.parse(x)),
889
+ `Failed to parse 'EnvelopeGetManyFormValues' from JSON`,
890
+ );
891
+ }
892
+
893
+ /** @internal */
894
+ export const EnvelopeGetManySigningOrder$inboundSchema: z.ZodNativeEnum<
895
+ typeof EnvelopeGetManySigningOrder
896
+ > = z.nativeEnum(EnvelopeGetManySigningOrder);
897
+ /** @internal */
898
+ export const EnvelopeGetManySigningOrder$outboundSchema: z.ZodNativeEnum<
899
+ typeof EnvelopeGetManySigningOrder
900
+ > = EnvelopeGetManySigningOrder$inboundSchema;
901
+
902
+ /** @internal */
903
+ export const EnvelopeGetManyDistributionMethod$inboundSchema: z.ZodNativeEnum<
904
+ typeof EnvelopeGetManyDistributionMethod
905
+ > = z.nativeEnum(EnvelopeGetManyDistributionMethod);
906
+ /** @internal */
907
+ export const EnvelopeGetManyDistributionMethod$outboundSchema: z.ZodNativeEnum<
908
+ typeof EnvelopeGetManyDistributionMethod
909
+ > = EnvelopeGetManyDistributionMethod$inboundSchema;
910
+
911
+ /** @internal */
912
+ export const EnvelopeGetManyEmailSettings$inboundSchema: z.ZodType<
913
+ EnvelopeGetManyEmailSettings,
914
+ z.ZodTypeDef,
915
+ unknown
916
+ > = z.object({
917
+ recipientSigningRequest: z.boolean().default(true),
918
+ recipientRemoved: z.boolean().default(true),
919
+ recipientSigned: z.boolean().default(true),
920
+ documentPending: z.boolean().default(true),
921
+ documentCompleted: z.boolean().default(true),
922
+ documentDeleted: z.boolean().default(true),
923
+ ownerDocumentCompleted: z.boolean().default(true),
924
+ });
925
+ /** @internal */
926
+ export type EnvelopeGetManyEmailSettings$Outbound = {
927
+ recipientSigningRequest: boolean;
928
+ recipientRemoved: boolean;
929
+ recipientSigned: boolean;
930
+ documentPending: boolean;
931
+ documentCompleted: boolean;
932
+ documentDeleted: boolean;
933
+ ownerDocumentCompleted: boolean;
934
+ };
935
+
936
+ /** @internal */
937
+ export const EnvelopeGetManyEmailSettings$outboundSchema: z.ZodType<
938
+ EnvelopeGetManyEmailSettings$Outbound,
939
+ z.ZodTypeDef,
940
+ EnvelopeGetManyEmailSettings
941
+ > = z.object({
942
+ recipientSigningRequest: z.boolean().default(true),
943
+ recipientRemoved: z.boolean().default(true),
944
+ recipientSigned: z.boolean().default(true),
945
+ documentPending: z.boolean().default(true),
946
+ documentCompleted: z.boolean().default(true),
947
+ documentDeleted: z.boolean().default(true),
948
+ ownerDocumentCompleted: z.boolean().default(true),
949
+ });
950
+
951
+ export function envelopeGetManyEmailSettingsToJSON(
952
+ envelopeGetManyEmailSettings: EnvelopeGetManyEmailSettings,
953
+ ): string {
954
+ return JSON.stringify(
955
+ EnvelopeGetManyEmailSettings$outboundSchema.parse(
956
+ envelopeGetManyEmailSettings,
957
+ ),
958
+ );
959
+ }
960
+ export function envelopeGetManyEmailSettingsFromJSON(
961
+ jsonString: string,
962
+ ): SafeParseResult<EnvelopeGetManyEmailSettings, SDKValidationError> {
963
+ return safeParse(
964
+ jsonString,
965
+ (x) => EnvelopeGetManyEmailSettings$inboundSchema.parse(JSON.parse(x)),
966
+ `Failed to parse 'EnvelopeGetManyEmailSettings' from JSON`,
967
+ );
968
+ }
969
+
970
+ /** @internal */
971
+ export const EnvelopeGetManyDocumentMeta$inboundSchema: z.ZodType<
972
+ EnvelopeGetManyDocumentMeta,
973
+ z.ZodTypeDef,
974
+ unknown
975
+ > = z.object({
976
+ signingOrder: EnvelopeGetManySigningOrder$inboundSchema,
977
+ distributionMethod: EnvelopeGetManyDistributionMethod$inboundSchema,
978
+ id: z.string(),
979
+ subject: z.nullable(z.string()),
980
+ message: z.nullable(z.string()),
981
+ timezone: z.nullable(z.string()),
982
+ dateFormat: z.nullable(z.string()),
983
+ redirectUrl: z.nullable(z.string()),
984
+ typedSignatureEnabled: z.boolean(),
985
+ uploadSignatureEnabled: z.boolean(),
986
+ drawSignatureEnabled: z.boolean(),
987
+ allowDictateNextSigner: z.boolean(),
988
+ language: z.string(),
989
+ emailSettings: z.nullable(
990
+ z.lazy(() => EnvelopeGetManyEmailSettings$inboundSchema),
991
+ ),
992
+ emailId: z.nullable(z.string()),
993
+ emailReplyTo: z.nullable(z.string()),
994
+ });
995
+ /** @internal */
996
+ export type EnvelopeGetManyDocumentMeta$Outbound = {
997
+ signingOrder: string;
998
+ distributionMethod: string;
999
+ id: string;
1000
+ subject: string | null;
1001
+ message: string | null;
1002
+ timezone: string | null;
1003
+ dateFormat: string | null;
1004
+ redirectUrl: string | null;
1005
+ typedSignatureEnabled: boolean;
1006
+ uploadSignatureEnabled: boolean;
1007
+ drawSignatureEnabled: boolean;
1008
+ allowDictateNextSigner: boolean;
1009
+ language: string;
1010
+ emailSettings: EnvelopeGetManyEmailSettings$Outbound | null;
1011
+ emailId: string | null;
1012
+ emailReplyTo: string | null;
1013
+ };
1014
+
1015
+ /** @internal */
1016
+ export const EnvelopeGetManyDocumentMeta$outboundSchema: z.ZodType<
1017
+ EnvelopeGetManyDocumentMeta$Outbound,
1018
+ z.ZodTypeDef,
1019
+ EnvelopeGetManyDocumentMeta
1020
+ > = z.object({
1021
+ signingOrder: EnvelopeGetManySigningOrder$outboundSchema,
1022
+ distributionMethod: EnvelopeGetManyDistributionMethod$outboundSchema,
1023
+ id: z.string(),
1024
+ subject: z.nullable(z.string()),
1025
+ message: z.nullable(z.string()),
1026
+ timezone: z.nullable(z.string()),
1027
+ dateFormat: z.nullable(z.string()),
1028
+ redirectUrl: z.nullable(z.string()),
1029
+ typedSignatureEnabled: z.boolean(),
1030
+ uploadSignatureEnabled: z.boolean(),
1031
+ drawSignatureEnabled: z.boolean(),
1032
+ allowDictateNextSigner: z.boolean(),
1033
+ language: z.string(),
1034
+ emailSettings: z.nullable(
1035
+ z.lazy(() => EnvelopeGetManyEmailSettings$outboundSchema),
1036
+ ),
1037
+ emailId: z.nullable(z.string()),
1038
+ emailReplyTo: z.nullable(z.string()),
1039
+ });
1040
+
1041
+ export function envelopeGetManyDocumentMetaToJSON(
1042
+ envelopeGetManyDocumentMeta: EnvelopeGetManyDocumentMeta,
1043
+ ): string {
1044
+ return JSON.stringify(
1045
+ EnvelopeGetManyDocumentMeta$outboundSchema.parse(
1046
+ envelopeGetManyDocumentMeta,
1047
+ ),
1048
+ );
1049
+ }
1050
+ export function envelopeGetManyDocumentMetaFromJSON(
1051
+ jsonString: string,
1052
+ ): SafeParseResult<EnvelopeGetManyDocumentMeta, SDKValidationError> {
1053
+ return safeParse(
1054
+ jsonString,
1055
+ (x) => EnvelopeGetManyDocumentMeta$inboundSchema.parse(JSON.parse(x)),
1056
+ `Failed to parse 'EnvelopeGetManyDocumentMeta' from JSON`,
1057
+ );
1058
+ }
1059
+
1060
+ /** @internal */
1061
+ export const EnvelopeGetManyRole$inboundSchema: z.ZodNativeEnum<
1062
+ typeof EnvelopeGetManyRole
1063
+ > = z.nativeEnum(EnvelopeGetManyRole);
1064
+ /** @internal */
1065
+ export const EnvelopeGetManyRole$outboundSchema: z.ZodNativeEnum<
1066
+ typeof EnvelopeGetManyRole
1067
+ > = EnvelopeGetManyRole$inboundSchema;
1068
+
1069
+ /** @internal */
1070
+ export const EnvelopeGetManyReadStatus$inboundSchema: z.ZodNativeEnum<
1071
+ typeof EnvelopeGetManyReadStatus
1072
+ > = z.nativeEnum(EnvelopeGetManyReadStatus);
1073
+ /** @internal */
1074
+ export const EnvelopeGetManyReadStatus$outboundSchema: z.ZodNativeEnum<
1075
+ typeof EnvelopeGetManyReadStatus
1076
+ > = EnvelopeGetManyReadStatus$inboundSchema;
1077
+
1078
+ /** @internal */
1079
+ export const EnvelopeGetManySigningStatus$inboundSchema: z.ZodNativeEnum<
1080
+ typeof EnvelopeGetManySigningStatus
1081
+ > = z.nativeEnum(EnvelopeGetManySigningStatus);
1082
+ /** @internal */
1083
+ export const EnvelopeGetManySigningStatus$outboundSchema: z.ZodNativeEnum<
1084
+ typeof EnvelopeGetManySigningStatus
1085
+ > = EnvelopeGetManySigningStatus$inboundSchema;
1086
+
1087
+ /** @internal */
1088
+ export const EnvelopeGetManySendStatus$inboundSchema: z.ZodNativeEnum<
1089
+ typeof EnvelopeGetManySendStatus
1090
+ > = z.nativeEnum(EnvelopeGetManySendStatus);
1091
+ /** @internal */
1092
+ export const EnvelopeGetManySendStatus$outboundSchema: z.ZodNativeEnum<
1093
+ typeof EnvelopeGetManySendStatus
1094
+ > = EnvelopeGetManySendStatus$inboundSchema;
1095
+
1096
+ /** @internal */
1097
+ export const EnvelopeGetManyAccessAuth$inboundSchema: z.ZodNativeEnum<
1098
+ typeof EnvelopeGetManyAccessAuth
1099
+ > = z.nativeEnum(EnvelopeGetManyAccessAuth);
1100
+ /** @internal */
1101
+ export const EnvelopeGetManyAccessAuth$outboundSchema: z.ZodNativeEnum<
1102
+ typeof EnvelopeGetManyAccessAuth
1103
+ > = EnvelopeGetManyAccessAuth$inboundSchema;
1104
+
1105
+ /** @internal */
1106
+ export const EnvelopeGetManyActionAuth$inboundSchema: z.ZodNativeEnum<
1107
+ typeof EnvelopeGetManyActionAuth
1108
+ > = z.nativeEnum(EnvelopeGetManyActionAuth);
1109
+ /** @internal */
1110
+ export const EnvelopeGetManyActionAuth$outboundSchema: z.ZodNativeEnum<
1111
+ typeof EnvelopeGetManyActionAuth
1112
+ > = EnvelopeGetManyActionAuth$inboundSchema;
1113
+
1114
+ /** @internal */
1115
+ export const EnvelopeGetManyRecipientAuthOptions$inboundSchema: z.ZodType<
1116
+ EnvelopeGetManyRecipientAuthOptions,
1117
+ z.ZodTypeDef,
1118
+ unknown
1119
+ > = z.object({
1120
+ accessAuth: z.array(EnvelopeGetManyAccessAuth$inboundSchema),
1121
+ actionAuth: z.array(EnvelopeGetManyActionAuth$inboundSchema),
1122
+ });
1123
+ /** @internal */
1124
+ export type EnvelopeGetManyRecipientAuthOptions$Outbound = {
1125
+ accessAuth: Array<string>;
1126
+ actionAuth: Array<string>;
1127
+ };
1128
+
1129
+ /** @internal */
1130
+ export const EnvelopeGetManyRecipientAuthOptions$outboundSchema: z.ZodType<
1131
+ EnvelopeGetManyRecipientAuthOptions$Outbound,
1132
+ z.ZodTypeDef,
1133
+ EnvelopeGetManyRecipientAuthOptions
1134
+ > = z.object({
1135
+ accessAuth: z.array(EnvelopeGetManyAccessAuth$outboundSchema),
1136
+ actionAuth: z.array(EnvelopeGetManyActionAuth$outboundSchema),
1137
+ });
1138
+
1139
+ export function envelopeGetManyRecipientAuthOptionsToJSON(
1140
+ envelopeGetManyRecipientAuthOptions: EnvelopeGetManyRecipientAuthOptions,
1141
+ ): string {
1142
+ return JSON.stringify(
1143
+ EnvelopeGetManyRecipientAuthOptions$outboundSchema.parse(
1144
+ envelopeGetManyRecipientAuthOptions,
1145
+ ),
1146
+ );
1147
+ }
1148
+ export function envelopeGetManyRecipientAuthOptionsFromJSON(
1149
+ jsonString: string,
1150
+ ): SafeParseResult<EnvelopeGetManyRecipientAuthOptions, SDKValidationError> {
1151
+ return safeParse(
1152
+ jsonString,
1153
+ (x) =>
1154
+ EnvelopeGetManyRecipientAuthOptions$inboundSchema.parse(JSON.parse(x)),
1155
+ `Failed to parse 'EnvelopeGetManyRecipientAuthOptions' from JSON`,
1156
+ );
1157
+ }
1158
+
1159
+ /** @internal */
1160
+ export const EnvelopeGetManyRecipient$inboundSchema: z.ZodType<
1161
+ EnvelopeGetManyRecipient,
1162
+ z.ZodTypeDef,
1163
+ unknown
1164
+ > = z.object({
1165
+ envelopeId: z.string(),
1166
+ role: EnvelopeGetManyRole$inboundSchema,
1167
+ readStatus: EnvelopeGetManyReadStatus$inboundSchema,
1168
+ signingStatus: EnvelopeGetManySigningStatus$inboundSchema,
1169
+ sendStatus: EnvelopeGetManySendStatus$inboundSchema,
1170
+ id: z.number(),
1171
+ email: z.string(),
1172
+ name: z.string(),
1173
+ token: z.string(),
1174
+ documentDeletedAt: z.nullable(z.string()),
1175
+ expired: z.nullable(z.string()),
1176
+ signedAt: z.nullable(z.string()),
1177
+ authOptions: z.nullable(
1178
+ z.lazy(() => EnvelopeGetManyRecipientAuthOptions$inboundSchema),
1179
+ ),
1180
+ signingOrder: z.nullable(z.number()),
1181
+ rejectionReason: z.nullable(z.string()),
1182
+ });
1183
+ /** @internal */
1184
+ export type EnvelopeGetManyRecipient$Outbound = {
1185
+ envelopeId: string;
1186
+ role: string;
1187
+ readStatus: string;
1188
+ signingStatus: string;
1189
+ sendStatus: string;
1190
+ id: number;
1191
+ email: string;
1192
+ name: string;
1193
+ token: string;
1194
+ documentDeletedAt: string | null;
1195
+ expired: string | null;
1196
+ signedAt: string | null;
1197
+ authOptions: EnvelopeGetManyRecipientAuthOptions$Outbound | null;
1198
+ signingOrder: number | null;
1199
+ rejectionReason: string | null;
1200
+ };
1201
+
1202
+ /** @internal */
1203
+ export const EnvelopeGetManyRecipient$outboundSchema: z.ZodType<
1204
+ EnvelopeGetManyRecipient$Outbound,
1205
+ z.ZodTypeDef,
1206
+ EnvelopeGetManyRecipient
1207
+ > = z.object({
1208
+ envelopeId: z.string(),
1209
+ role: EnvelopeGetManyRole$outboundSchema,
1210
+ readStatus: EnvelopeGetManyReadStatus$outboundSchema,
1211
+ signingStatus: EnvelopeGetManySigningStatus$outboundSchema,
1212
+ sendStatus: EnvelopeGetManySendStatus$outboundSchema,
1213
+ id: z.number(),
1214
+ email: z.string(),
1215
+ name: z.string(),
1216
+ token: z.string(),
1217
+ documentDeletedAt: z.nullable(z.string()),
1218
+ expired: z.nullable(z.string()),
1219
+ signedAt: z.nullable(z.string()),
1220
+ authOptions: z.nullable(
1221
+ z.lazy(() => EnvelopeGetManyRecipientAuthOptions$outboundSchema),
1222
+ ),
1223
+ signingOrder: z.nullable(z.number()),
1224
+ rejectionReason: z.nullable(z.string()),
1225
+ });
1226
+
1227
+ export function envelopeGetManyRecipientToJSON(
1228
+ envelopeGetManyRecipient: EnvelopeGetManyRecipient,
1229
+ ): string {
1230
+ return JSON.stringify(
1231
+ EnvelopeGetManyRecipient$outboundSchema.parse(envelopeGetManyRecipient),
1232
+ );
1233
+ }
1234
+ export function envelopeGetManyRecipientFromJSON(
1235
+ jsonString: string,
1236
+ ): SafeParseResult<EnvelopeGetManyRecipient, SDKValidationError> {
1237
+ return safeParse(
1238
+ jsonString,
1239
+ (x) => EnvelopeGetManyRecipient$inboundSchema.parse(JSON.parse(x)),
1240
+ `Failed to parse 'EnvelopeGetManyRecipient' from JSON`,
1241
+ );
1242
+ }
1243
+
1244
+ /** @internal */
1245
+ export const EnvelopeGetManyFieldTypeEnum$inboundSchema: z.ZodNativeEnum<
1246
+ typeof EnvelopeGetManyFieldTypeEnum
1247
+ > = z.nativeEnum(EnvelopeGetManyFieldTypeEnum);
1248
+ /** @internal */
1249
+ export const EnvelopeGetManyFieldTypeEnum$outboundSchema: z.ZodNativeEnum<
1250
+ typeof EnvelopeGetManyFieldTypeEnum
1251
+ > = EnvelopeGetManyFieldTypeEnum$inboundSchema;
1252
+
1253
+ /** @internal */
1254
+ export const EnvelopeGetManyValue3$inboundSchema: z.ZodType<
1255
+ EnvelopeGetManyValue3,
1256
+ z.ZodTypeDef,
1257
+ unknown
1258
+ > = z.object({
1259
+ value: z.string(),
1260
+ });
1261
+ /** @internal */
1262
+ export type EnvelopeGetManyValue3$Outbound = {
1263
+ value: string;
1264
+ };
1265
+
1266
+ /** @internal */
1267
+ export const EnvelopeGetManyValue3$outboundSchema: z.ZodType<
1268
+ EnvelopeGetManyValue3$Outbound,
1269
+ z.ZodTypeDef,
1270
+ EnvelopeGetManyValue3
1271
+ > = z.object({
1272
+ value: z.string(),
1273
+ });
1274
+
1275
+ export function envelopeGetManyValue3ToJSON(
1276
+ envelopeGetManyValue3: EnvelopeGetManyValue3,
1277
+ ): string {
1278
+ return JSON.stringify(
1279
+ EnvelopeGetManyValue3$outboundSchema.parse(envelopeGetManyValue3),
1280
+ );
1281
+ }
1282
+ export function envelopeGetManyValue3FromJSON(
1283
+ jsonString: string,
1284
+ ): SafeParseResult<EnvelopeGetManyValue3, SDKValidationError> {
1285
+ return safeParse(
1286
+ jsonString,
1287
+ (x) => EnvelopeGetManyValue3$inboundSchema.parse(JSON.parse(x)),
1288
+ `Failed to parse 'EnvelopeGetManyValue3' from JSON`,
1289
+ );
1290
+ }
1291
+
1292
+ /** @internal */
1293
+ export const EnvelopeGetManyFieldMetaDropdown$inboundSchema: z.ZodType<
1294
+ EnvelopeGetManyFieldMetaDropdown,
1295
+ z.ZodTypeDef,
1296
+ unknown
1297
+ > = z.object({
1298
+ label: z.string().optional(),
1299
+ placeholder: z.string().optional(),
1300
+ required: z.boolean().optional(),
1301
+ readOnly: z.boolean().optional(),
1302
+ fontSize: z.number().default(12),
1303
+ type: z.literal("dropdown"),
1304
+ values: z.array(z.lazy(() => EnvelopeGetManyValue3$inboundSchema)).optional(),
1305
+ defaultValue: z.string().optional(),
1306
+ });
1307
+ /** @internal */
1308
+ export type EnvelopeGetManyFieldMetaDropdown$Outbound = {
1309
+ label?: string | undefined;
1310
+ placeholder?: string | undefined;
1311
+ required?: boolean | undefined;
1312
+ readOnly?: boolean | undefined;
1313
+ fontSize: number;
1314
+ type: "dropdown";
1315
+ values?: Array<EnvelopeGetManyValue3$Outbound> | undefined;
1316
+ defaultValue?: string | undefined;
1317
+ };
1318
+
1319
+ /** @internal */
1320
+ export const EnvelopeGetManyFieldMetaDropdown$outboundSchema: z.ZodType<
1321
+ EnvelopeGetManyFieldMetaDropdown$Outbound,
1322
+ z.ZodTypeDef,
1323
+ EnvelopeGetManyFieldMetaDropdown
1324
+ > = z.object({
1325
+ label: z.string().optional(),
1326
+ placeholder: z.string().optional(),
1327
+ required: z.boolean().optional(),
1328
+ readOnly: z.boolean().optional(),
1329
+ fontSize: z.number().default(12),
1330
+ type: z.literal("dropdown"),
1331
+ values: z.array(z.lazy(() => EnvelopeGetManyValue3$outboundSchema))
1332
+ .optional(),
1333
+ defaultValue: z.string().optional(),
1334
+ });
1335
+
1336
+ export function envelopeGetManyFieldMetaDropdownToJSON(
1337
+ envelopeGetManyFieldMetaDropdown: EnvelopeGetManyFieldMetaDropdown,
1338
+ ): string {
1339
+ return JSON.stringify(
1340
+ EnvelopeGetManyFieldMetaDropdown$outboundSchema.parse(
1341
+ envelopeGetManyFieldMetaDropdown,
1342
+ ),
1343
+ );
1344
+ }
1345
+ export function envelopeGetManyFieldMetaDropdownFromJSON(
1346
+ jsonString: string,
1347
+ ): SafeParseResult<EnvelopeGetManyFieldMetaDropdown, SDKValidationError> {
1348
+ return safeParse(
1349
+ jsonString,
1350
+ (x) => EnvelopeGetManyFieldMetaDropdown$inboundSchema.parse(JSON.parse(x)),
1351
+ `Failed to parse 'EnvelopeGetManyFieldMetaDropdown' from JSON`,
1352
+ );
1353
+ }
1354
+
1355
+ /** @internal */
1356
+ export const EnvelopeGetManyValue2$inboundSchema: z.ZodType<
1357
+ EnvelopeGetManyValue2,
1358
+ z.ZodTypeDef,
1359
+ unknown
1360
+ > = z.object({
1361
+ id: z.number(),
1362
+ checked: z.boolean(),
1363
+ value: z.string(),
1364
+ });
1365
+ /** @internal */
1366
+ export type EnvelopeGetManyValue2$Outbound = {
1367
+ id: number;
1368
+ checked: boolean;
1369
+ value: string;
1370
+ };
1371
+
1372
+ /** @internal */
1373
+ export const EnvelopeGetManyValue2$outboundSchema: z.ZodType<
1374
+ EnvelopeGetManyValue2$Outbound,
1375
+ z.ZodTypeDef,
1376
+ EnvelopeGetManyValue2
1377
+ > = z.object({
1378
+ id: z.number(),
1379
+ checked: z.boolean(),
1380
+ value: z.string(),
1381
+ });
1382
+
1383
+ export function envelopeGetManyValue2ToJSON(
1384
+ envelopeGetManyValue2: EnvelopeGetManyValue2,
1385
+ ): string {
1386
+ return JSON.stringify(
1387
+ EnvelopeGetManyValue2$outboundSchema.parse(envelopeGetManyValue2),
1388
+ );
1389
+ }
1390
+ export function envelopeGetManyValue2FromJSON(
1391
+ jsonString: string,
1392
+ ): SafeParseResult<EnvelopeGetManyValue2, SDKValidationError> {
1393
+ return safeParse(
1394
+ jsonString,
1395
+ (x) => EnvelopeGetManyValue2$inboundSchema.parse(JSON.parse(x)),
1396
+ `Failed to parse 'EnvelopeGetManyValue2' from JSON`,
1397
+ );
1398
+ }
1399
+
1400
+ /** @internal */
1401
+ export const EnvelopeGetManyDirection2$inboundSchema: z.ZodNativeEnum<
1402
+ typeof EnvelopeGetManyDirection2
1403
+ > = z.nativeEnum(EnvelopeGetManyDirection2);
1404
+ /** @internal */
1405
+ export const EnvelopeGetManyDirection2$outboundSchema: z.ZodNativeEnum<
1406
+ typeof EnvelopeGetManyDirection2
1407
+ > = EnvelopeGetManyDirection2$inboundSchema;
1408
+
1409
+ /** @internal */
1410
+ export const EnvelopeGetManyFieldMetaCheckbox$inboundSchema: z.ZodType<
1411
+ EnvelopeGetManyFieldMetaCheckbox,
1412
+ z.ZodTypeDef,
1413
+ unknown
1414
+ > = z.object({
1415
+ label: z.string().optional(),
1416
+ placeholder: z.string().optional(),
1417
+ required: z.boolean().optional(),
1418
+ readOnly: z.boolean().optional(),
1419
+ fontSize: z.number().default(12),
1420
+ type: z.literal("checkbox"),
1421
+ values: z.array(z.lazy(() => EnvelopeGetManyValue2$inboundSchema)).optional(),
1422
+ validationRule: z.string().optional(),
1423
+ validationLength: z.number().optional(),
1424
+ direction: EnvelopeGetManyDirection2$inboundSchema.default("vertical"),
1425
+ });
1426
+ /** @internal */
1427
+ export type EnvelopeGetManyFieldMetaCheckbox$Outbound = {
1428
+ label?: string | undefined;
1429
+ placeholder?: string | undefined;
1430
+ required?: boolean | undefined;
1431
+ readOnly?: boolean | undefined;
1432
+ fontSize: number;
1433
+ type: "checkbox";
1434
+ values?: Array<EnvelopeGetManyValue2$Outbound> | undefined;
1435
+ validationRule?: string | undefined;
1436
+ validationLength?: number | undefined;
1437
+ direction: string;
1438
+ };
1439
+
1440
+ /** @internal */
1441
+ export const EnvelopeGetManyFieldMetaCheckbox$outboundSchema: z.ZodType<
1442
+ EnvelopeGetManyFieldMetaCheckbox$Outbound,
1443
+ z.ZodTypeDef,
1444
+ EnvelopeGetManyFieldMetaCheckbox
1445
+ > = z.object({
1446
+ label: z.string().optional(),
1447
+ placeholder: z.string().optional(),
1448
+ required: z.boolean().optional(),
1449
+ readOnly: z.boolean().optional(),
1450
+ fontSize: z.number().default(12),
1451
+ type: z.literal("checkbox"),
1452
+ values: z.array(z.lazy(() => EnvelopeGetManyValue2$outboundSchema))
1453
+ .optional(),
1454
+ validationRule: z.string().optional(),
1455
+ validationLength: z.number().optional(),
1456
+ direction: EnvelopeGetManyDirection2$outboundSchema.default("vertical"),
1457
+ });
1458
+
1459
+ export function envelopeGetManyFieldMetaCheckboxToJSON(
1460
+ envelopeGetManyFieldMetaCheckbox: EnvelopeGetManyFieldMetaCheckbox,
1461
+ ): string {
1462
+ return JSON.stringify(
1463
+ EnvelopeGetManyFieldMetaCheckbox$outboundSchema.parse(
1464
+ envelopeGetManyFieldMetaCheckbox,
1465
+ ),
1466
+ );
1467
+ }
1468
+ export function envelopeGetManyFieldMetaCheckboxFromJSON(
1469
+ jsonString: string,
1470
+ ): SafeParseResult<EnvelopeGetManyFieldMetaCheckbox, SDKValidationError> {
1471
+ return safeParse(
1472
+ jsonString,
1473
+ (x) => EnvelopeGetManyFieldMetaCheckbox$inboundSchema.parse(JSON.parse(x)),
1474
+ `Failed to parse 'EnvelopeGetManyFieldMetaCheckbox' from JSON`,
1475
+ );
1476
+ }
1477
+
1478
+ /** @internal */
1479
+ export const EnvelopeGetManyValue1$inboundSchema: z.ZodType<
1480
+ EnvelopeGetManyValue1,
1481
+ z.ZodTypeDef,
1482
+ unknown
1483
+ > = z.object({
1484
+ id: z.number(),
1485
+ checked: z.boolean(),
1486
+ value: z.string(),
1487
+ });
1488
+ /** @internal */
1489
+ export type EnvelopeGetManyValue1$Outbound = {
1490
+ id: number;
1491
+ checked: boolean;
1492
+ value: string;
1493
+ };
1494
+
1495
+ /** @internal */
1496
+ export const EnvelopeGetManyValue1$outboundSchema: z.ZodType<
1497
+ EnvelopeGetManyValue1$Outbound,
1498
+ z.ZodTypeDef,
1499
+ EnvelopeGetManyValue1
1500
+ > = z.object({
1501
+ id: z.number(),
1502
+ checked: z.boolean(),
1503
+ value: z.string(),
1504
+ });
1505
+
1506
+ export function envelopeGetManyValue1ToJSON(
1507
+ envelopeGetManyValue1: EnvelopeGetManyValue1,
1508
+ ): string {
1509
+ return JSON.stringify(
1510
+ EnvelopeGetManyValue1$outboundSchema.parse(envelopeGetManyValue1),
1511
+ );
1512
+ }
1513
+ export function envelopeGetManyValue1FromJSON(
1514
+ jsonString: string,
1515
+ ): SafeParseResult<EnvelopeGetManyValue1, SDKValidationError> {
1516
+ return safeParse(
1517
+ jsonString,
1518
+ (x) => EnvelopeGetManyValue1$inboundSchema.parse(JSON.parse(x)),
1519
+ `Failed to parse 'EnvelopeGetManyValue1' from JSON`,
1520
+ );
1521
+ }
1522
+
1523
+ /** @internal */
1524
+ export const EnvelopeGetManyDirection1$inboundSchema: z.ZodNativeEnum<
1525
+ typeof EnvelopeGetManyDirection1
1526
+ > = z.nativeEnum(EnvelopeGetManyDirection1);
1527
+ /** @internal */
1528
+ export const EnvelopeGetManyDirection1$outboundSchema: z.ZodNativeEnum<
1529
+ typeof EnvelopeGetManyDirection1
1530
+ > = EnvelopeGetManyDirection1$inboundSchema;
1531
+
1532
+ /** @internal */
1533
+ export const EnvelopeGetManyFieldMetaRadio$inboundSchema: z.ZodType<
1534
+ EnvelopeGetManyFieldMetaRadio,
1535
+ z.ZodTypeDef,
1536
+ unknown
1537
+ > = z.object({
1538
+ label: z.string().optional(),
1539
+ placeholder: z.string().optional(),
1540
+ required: z.boolean().optional(),
1541
+ readOnly: z.boolean().optional(),
1542
+ fontSize: z.number().default(12),
1543
+ type: z.literal("radio"),
1544
+ values: z.array(z.lazy(() => EnvelopeGetManyValue1$inboundSchema)).optional(),
1545
+ direction: EnvelopeGetManyDirection1$inboundSchema.default("vertical"),
1546
+ });
1547
+ /** @internal */
1548
+ export type EnvelopeGetManyFieldMetaRadio$Outbound = {
1549
+ label?: string | undefined;
1550
+ placeholder?: string | undefined;
1551
+ required?: boolean | undefined;
1552
+ readOnly?: boolean | undefined;
1553
+ fontSize: number;
1554
+ type: "radio";
1555
+ values?: Array<EnvelopeGetManyValue1$Outbound> | undefined;
1556
+ direction: string;
1557
+ };
1558
+
1559
+ /** @internal */
1560
+ export const EnvelopeGetManyFieldMetaRadio$outboundSchema: z.ZodType<
1561
+ EnvelopeGetManyFieldMetaRadio$Outbound,
1562
+ z.ZodTypeDef,
1563
+ EnvelopeGetManyFieldMetaRadio
1564
+ > = z.object({
1565
+ label: z.string().optional(),
1566
+ placeholder: z.string().optional(),
1567
+ required: z.boolean().optional(),
1568
+ readOnly: z.boolean().optional(),
1569
+ fontSize: z.number().default(12),
1570
+ type: z.literal("radio"),
1571
+ values: z.array(z.lazy(() => EnvelopeGetManyValue1$outboundSchema))
1572
+ .optional(),
1573
+ direction: EnvelopeGetManyDirection1$outboundSchema.default("vertical"),
1574
+ });
1575
+
1576
+ export function envelopeGetManyFieldMetaRadioToJSON(
1577
+ envelopeGetManyFieldMetaRadio: EnvelopeGetManyFieldMetaRadio,
1578
+ ): string {
1579
+ return JSON.stringify(
1580
+ EnvelopeGetManyFieldMetaRadio$outboundSchema.parse(
1581
+ envelopeGetManyFieldMetaRadio,
1582
+ ),
1583
+ );
1584
+ }
1585
+ export function envelopeGetManyFieldMetaRadioFromJSON(
1586
+ jsonString: string,
1587
+ ): SafeParseResult<EnvelopeGetManyFieldMetaRadio, SDKValidationError> {
1588
+ return safeParse(
1589
+ jsonString,
1590
+ (x) => EnvelopeGetManyFieldMetaRadio$inboundSchema.parse(JSON.parse(x)),
1591
+ `Failed to parse 'EnvelopeGetManyFieldMetaRadio' from JSON`,
1592
+ );
1593
+ }
1594
+
1595
+ /** @internal */
1596
+ export const EnvelopeGetManyTextAlign6$inboundSchema: z.ZodNativeEnum<
1597
+ typeof EnvelopeGetManyTextAlign6
1598
+ > = z.nativeEnum(EnvelopeGetManyTextAlign6);
1599
+ /** @internal */
1600
+ export const EnvelopeGetManyTextAlign6$outboundSchema: z.ZodNativeEnum<
1601
+ typeof EnvelopeGetManyTextAlign6
1602
+ > = EnvelopeGetManyTextAlign6$inboundSchema;
1603
+
1604
+ /** @internal */
1605
+ export const EnvelopeGetManyVerticalAlign2$inboundSchema: z.ZodNativeEnum<
1606
+ typeof EnvelopeGetManyVerticalAlign2
1607
+ > = z.nativeEnum(EnvelopeGetManyVerticalAlign2);
1608
+ /** @internal */
1609
+ export const EnvelopeGetManyVerticalAlign2$outboundSchema: z.ZodNativeEnum<
1610
+ typeof EnvelopeGetManyVerticalAlign2
1611
+ > = EnvelopeGetManyVerticalAlign2$inboundSchema;
1612
+
1613
+ /** @internal */
1614
+ export const EnvelopeGetManyFieldMetaNumber$inboundSchema: z.ZodType<
1615
+ EnvelopeGetManyFieldMetaNumber,
1616
+ z.ZodTypeDef,
1617
+ unknown
1618
+ > = z.object({
1619
+ label: z.string().optional(),
1620
+ placeholder: z.string().optional(),
1621
+ required: z.boolean().optional(),
1622
+ readOnly: z.boolean().optional(),
1623
+ fontSize: z.number().default(12),
1624
+ type: z.literal("number"),
1625
+ numberFormat: z.nullable(z.string()).optional(),
1626
+ value: z.string().optional(),
1627
+ minValue: z.nullable(z.number()).optional(),
1628
+ maxValue: z.nullable(z.number()).optional(),
1629
+ textAlign: EnvelopeGetManyTextAlign6$inboundSchema.optional(),
1630
+ lineHeight: z.nullable(z.number()).optional(),
1631
+ letterSpacing: z.nullable(z.number()).optional(),
1632
+ verticalAlign: z.nullable(EnvelopeGetManyVerticalAlign2$inboundSchema)
1633
+ .optional(),
1634
+ });
1635
+ /** @internal */
1636
+ export type EnvelopeGetManyFieldMetaNumber$Outbound = {
1637
+ label?: string | undefined;
1638
+ placeholder?: string | undefined;
1639
+ required?: boolean | undefined;
1640
+ readOnly?: boolean | undefined;
1641
+ fontSize: number;
1642
+ type: "number";
1643
+ numberFormat?: string | null | undefined;
1644
+ value?: string | undefined;
1645
+ minValue?: number | null | undefined;
1646
+ maxValue?: number | null | undefined;
1647
+ textAlign?: string | undefined;
1648
+ lineHeight?: number | null | undefined;
1649
+ letterSpacing?: number | null | undefined;
1650
+ verticalAlign?: string | null | undefined;
1651
+ };
1652
+
1653
+ /** @internal */
1654
+ export const EnvelopeGetManyFieldMetaNumber$outboundSchema: z.ZodType<
1655
+ EnvelopeGetManyFieldMetaNumber$Outbound,
1656
+ z.ZodTypeDef,
1657
+ EnvelopeGetManyFieldMetaNumber
1658
+ > = z.object({
1659
+ label: z.string().optional(),
1660
+ placeholder: z.string().optional(),
1661
+ required: z.boolean().optional(),
1662
+ readOnly: z.boolean().optional(),
1663
+ fontSize: z.number().default(12),
1664
+ type: z.literal("number"),
1665
+ numberFormat: z.nullable(z.string()).optional(),
1666
+ value: z.string().optional(),
1667
+ minValue: z.nullable(z.number()).optional(),
1668
+ maxValue: z.nullable(z.number()).optional(),
1669
+ textAlign: EnvelopeGetManyTextAlign6$outboundSchema.optional(),
1670
+ lineHeight: z.nullable(z.number()).optional(),
1671
+ letterSpacing: z.nullable(z.number()).optional(),
1672
+ verticalAlign: z.nullable(EnvelopeGetManyVerticalAlign2$outboundSchema)
1673
+ .optional(),
1674
+ });
1675
+
1676
+ export function envelopeGetManyFieldMetaNumberToJSON(
1677
+ envelopeGetManyFieldMetaNumber: EnvelopeGetManyFieldMetaNumber,
1678
+ ): string {
1679
+ return JSON.stringify(
1680
+ EnvelopeGetManyFieldMetaNumber$outboundSchema.parse(
1681
+ envelopeGetManyFieldMetaNumber,
1682
+ ),
1683
+ );
1684
+ }
1685
+ export function envelopeGetManyFieldMetaNumberFromJSON(
1686
+ jsonString: string,
1687
+ ): SafeParseResult<EnvelopeGetManyFieldMetaNumber, SDKValidationError> {
1688
+ return safeParse(
1689
+ jsonString,
1690
+ (x) => EnvelopeGetManyFieldMetaNumber$inboundSchema.parse(JSON.parse(x)),
1691
+ `Failed to parse 'EnvelopeGetManyFieldMetaNumber' from JSON`,
1692
+ );
1693
+ }
1694
+
1695
+ /** @internal */
1696
+ export const EnvelopeGetManyTextAlign5$inboundSchema: z.ZodNativeEnum<
1697
+ typeof EnvelopeGetManyTextAlign5
1698
+ > = z.nativeEnum(EnvelopeGetManyTextAlign5);
1699
+ /** @internal */
1700
+ export const EnvelopeGetManyTextAlign5$outboundSchema: z.ZodNativeEnum<
1701
+ typeof EnvelopeGetManyTextAlign5
1702
+ > = EnvelopeGetManyTextAlign5$inboundSchema;
1703
+
1704
+ /** @internal */
1705
+ export const EnvelopeGetManyVerticalAlign1$inboundSchema: z.ZodNativeEnum<
1706
+ typeof EnvelopeGetManyVerticalAlign1
1707
+ > = z.nativeEnum(EnvelopeGetManyVerticalAlign1);
1708
+ /** @internal */
1709
+ export const EnvelopeGetManyVerticalAlign1$outboundSchema: z.ZodNativeEnum<
1710
+ typeof EnvelopeGetManyVerticalAlign1
1711
+ > = EnvelopeGetManyVerticalAlign1$inboundSchema;
1712
+
1713
+ /** @internal */
1714
+ export const EnvelopeGetManyFieldMetaText$inboundSchema: z.ZodType<
1715
+ EnvelopeGetManyFieldMetaText,
1716
+ z.ZodTypeDef,
1717
+ unknown
1718
+ > = z.object({
1719
+ label: z.string().optional(),
1720
+ placeholder: z.string().optional(),
1721
+ required: z.boolean().optional(),
1722
+ readOnly: z.boolean().optional(),
1723
+ fontSize: z.number().default(12),
1724
+ type: z.literal("text"),
1725
+ text: z.string().optional(),
1726
+ characterLimit: z.number().optional(),
1727
+ textAlign: EnvelopeGetManyTextAlign5$inboundSchema.optional(),
1728
+ lineHeight: z.nullable(z.number()).optional(),
1729
+ letterSpacing: z.nullable(z.number()).optional(),
1730
+ verticalAlign: z.nullable(EnvelopeGetManyVerticalAlign1$inboundSchema)
1731
+ .optional(),
1732
+ });
1733
+ /** @internal */
1734
+ export type EnvelopeGetManyFieldMetaText$Outbound = {
1735
+ label?: string | undefined;
1736
+ placeholder?: string | undefined;
1737
+ required?: boolean | undefined;
1738
+ readOnly?: boolean | undefined;
1739
+ fontSize: number;
1740
+ type: "text";
1741
+ text?: string | undefined;
1742
+ characterLimit?: number | undefined;
1743
+ textAlign?: string | undefined;
1744
+ lineHeight?: number | null | undefined;
1745
+ letterSpacing?: number | null | undefined;
1746
+ verticalAlign?: string | null | undefined;
1747
+ };
1748
+
1749
+ /** @internal */
1750
+ export const EnvelopeGetManyFieldMetaText$outboundSchema: z.ZodType<
1751
+ EnvelopeGetManyFieldMetaText$Outbound,
1752
+ z.ZodTypeDef,
1753
+ EnvelopeGetManyFieldMetaText
1754
+ > = z.object({
1755
+ label: z.string().optional(),
1756
+ placeholder: z.string().optional(),
1757
+ required: z.boolean().optional(),
1758
+ readOnly: z.boolean().optional(),
1759
+ fontSize: z.number().default(12),
1760
+ type: z.literal("text"),
1761
+ text: z.string().optional(),
1762
+ characterLimit: z.number().optional(),
1763
+ textAlign: EnvelopeGetManyTextAlign5$outboundSchema.optional(),
1764
+ lineHeight: z.nullable(z.number()).optional(),
1765
+ letterSpacing: z.nullable(z.number()).optional(),
1766
+ verticalAlign: z.nullable(EnvelopeGetManyVerticalAlign1$outboundSchema)
1767
+ .optional(),
1768
+ });
1769
+
1770
+ export function envelopeGetManyFieldMetaTextToJSON(
1771
+ envelopeGetManyFieldMetaText: EnvelopeGetManyFieldMetaText,
1772
+ ): string {
1773
+ return JSON.stringify(
1774
+ EnvelopeGetManyFieldMetaText$outboundSchema.parse(
1775
+ envelopeGetManyFieldMetaText,
1776
+ ),
1777
+ );
1778
+ }
1779
+ export function envelopeGetManyFieldMetaTextFromJSON(
1780
+ jsonString: string,
1781
+ ): SafeParseResult<EnvelopeGetManyFieldMetaText, SDKValidationError> {
1782
+ return safeParse(
1783
+ jsonString,
1784
+ (x) => EnvelopeGetManyFieldMetaText$inboundSchema.parse(JSON.parse(x)),
1785
+ `Failed to parse 'EnvelopeGetManyFieldMetaText' from JSON`,
1786
+ );
1787
+ }
1788
+
1789
+ /** @internal */
1790
+ export const EnvelopeGetManyTextAlign4$inboundSchema: z.ZodNativeEnum<
1791
+ typeof EnvelopeGetManyTextAlign4
1792
+ > = z.nativeEnum(EnvelopeGetManyTextAlign4);
1793
+ /** @internal */
1794
+ export const EnvelopeGetManyTextAlign4$outboundSchema: z.ZodNativeEnum<
1795
+ typeof EnvelopeGetManyTextAlign4
1796
+ > = EnvelopeGetManyTextAlign4$inboundSchema;
1797
+
1798
+ /** @internal */
1799
+ export const EnvelopeGetManyFieldMetaDate$inboundSchema: z.ZodType<
1800
+ EnvelopeGetManyFieldMetaDate,
1801
+ z.ZodTypeDef,
1802
+ unknown
1803
+ > = z.object({
1804
+ label: z.string().optional(),
1805
+ placeholder: z.string().optional(),
1806
+ required: z.boolean().optional(),
1807
+ readOnly: z.boolean().optional(),
1808
+ fontSize: z.number().default(12),
1809
+ type: z.literal("date"),
1810
+ textAlign: EnvelopeGetManyTextAlign4$inboundSchema.optional(),
1811
+ });
1812
+ /** @internal */
1813
+ export type EnvelopeGetManyFieldMetaDate$Outbound = {
1814
+ label?: string | undefined;
1815
+ placeholder?: string | undefined;
1816
+ required?: boolean | undefined;
1817
+ readOnly?: boolean | undefined;
1818
+ fontSize: number;
1819
+ type: "date";
1820
+ textAlign?: string | undefined;
1821
+ };
1822
+
1823
+ /** @internal */
1824
+ export const EnvelopeGetManyFieldMetaDate$outboundSchema: z.ZodType<
1825
+ EnvelopeGetManyFieldMetaDate$Outbound,
1826
+ z.ZodTypeDef,
1827
+ EnvelopeGetManyFieldMetaDate
1828
+ > = z.object({
1829
+ label: z.string().optional(),
1830
+ placeholder: z.string().optional(),
1831
+ required: z.boolean().optional(),
1832
+ readOnly: z.boolean().optional(),
1833
+ fontSize: z.number().default(12),
1834
+ type: z.literal("date"),
1835
+ textAlign: EnvelopeGetManyTextAlign4$outboundSchema.optional(),
1836
+ });
1837
+
1838
+ export function envelopeGetManyFieldMetaDateToJSON(
1839
+ envelopeGetManyFieldMetaDate: EnvelopeGetManyFieldMetaDate,
1840
+ ): string {
1841
+ return JSON.stringify(
1842
+ EnvelopeGetManyFieldMetaDate$outboundSchema.parse(
1843
+ envelopeGetManyFieldMetaDate,
1844
+ ),
1845
+ );
1846
+ }
1847
+ export function envelopeGetManyFieldMetaDateFromJSON(
1848
+ jsonString: string,
1849
+ ): SafeParseResult<EnvelopeGetManyFieldMetaDate, SDKValidationError> {
1850
+ return safeParse(
1851
+ jsonString,
1852
+ (x) => EnvelopeGetManyFieldMetaDate$inboundSchema.parse(JSON.parse(x)),
1853
+ `Failed to parse 'EnvelopeGetManyFieldMetaDate' from JSON`,
1854
+ );
1855
+ }
1856
+
1857
+ /** @internal */
1858
+ export const EnvelopeGetManyTextAlign3$inboundSchema: z.ZodNativeEnum<
1859
+ typeof EnvelopeGetManyTextAlign3
1860
+ > = z.nativeEnum(EnvelopeGetManyTextAlign3);
1861
+ /** @internal */
1862
+ export const EnvelopeGetManyTextAlign3$outboundSchema: z.ZodNativeEnum<
1863
+ typeof EnvelopeGetManyTextAlign3
1864
+ > = EnvelopeGetManyTextAlign3$inboundSchema;
1865
+
1866
+ /** @internal */
1867
+ export const EnvelopeGetManyFieldMetaEmail$inboundSchema: z.ZodType<
1868
+ EnvelopeGetManyFieldMetaEmail,
1869
+ z.ZodTypeDef,
1870
+ unknown
1871
+ > = z.object({
1872
+ label: z.string().optional(),
1873
+ placeholder: z.string().optional(),
1874
+ required: z.boolean().optional(),
1875
+ readOnly: z.boolean().optional(),
1876
+ fontSize: z.number().default(12),
1877
+ type: z.literal("email"),
1878
+ textAlign: EnvelopeGetManyTextAlign3$inboundSchema.optional(),
1879
+ });
1880
+ /** @internal */
1881
+ export type EnvelopeGetManyFieldMetaEmail$Outbound = {
1882
+ label?: string | undefined;
1883
+ placeholder?: string | undefined;
1884
+ required?: boolean | undefined;
1885
+ readOnly?: boolean | undefined;
1886
+ fontSize: number;
1887
+ type: "email";
1888
+ textAlign?: string | undefined;
1889
+ };
1890
+
1891
+ /** @internal */
1892
+ export const EnvelopeGetManyFieldMetaEmail$outboundSchema: z.ZodType<
1893
+ EnvelopeGetManyFieldMetaEmail$Outbound,
1894
+ z.ZodTypeDef,
1895
+ EnvelopeGetManyFieldMetaEmail
1896
+ > = z.object({
1897
+ label: z.string().optional(),
1898
+ placeholder: z.string().optional(),
1899
+ required: z.boolean().optional(),
1900
+ readOnly: z.boolean().optional(),
1901
+ fontSize: z.number().default(12),
1902
+ type: z.literal("email"),
1903
+ textAlign: EnvelopeGetManyTextAlign3$outboundSchema.optional(),
1904
+ });
1905
+
1906
+ export function envelopeGetManyFieldMetaEmailToJSON(
1907
+ envelopeGetManyFieldMetaEmail: EnvelopeGetManyFieldMetaEmail,
1908
+ ): string {
1909
+ return JSON.stringify(
1910
+ EnvelopeGetManyFieldMetaEmail$outboundSchema.parse(
1911
+ envelopeGetManyFieldMetaEmail,
1912
+ ),
1913
+ );
1914
+ }
1915
+ export function envelopeGetManyFieldMetaEmailFromJSON(
1916
+ jsonString: string,
1917
+ ): SafeParseResult<EnvelopeGetManyFieldMetaEmail, SDKValidationError> {
1918
+ return safeParse(
1919
+ jsonString,
1920
+ (x) => EnvelopeGetManyFieldMetaEmail$inboundSchema.parse(JSON.parse(x)),
1921
+ `Failed to parse 'EnvelopeGetManyFieldMetaEmail' from JSON`,
1922
+ );
1923
+ }
1924
+
1925
+ /** @internal */
1926
+ export const EnvelopeGetManyTextAlign2$inboundSchema: z.ZodNativeEnum<
1927
+ typeof EnvelopeGetManyTextAlign2
1928
+ > = z.nativeEnum(EnvelopeGetManyTextAlign2);
1929
+ /** @internal */
1930
+ export const EnvelopeGetManyTextAlign2$outboundSchema: z.ZodNativeEnum<
1931
+ typeof EnvelopeGetManyTextAlign2
1932
+ > = EnvelopeGetManyTextAlign2$inboundSchema;
1933
+
1934
+ /** @internal */
1935
+ export const EnvelopeGetManyFieldMetaName$inboundSchema: z.ZodType<
1936
+ EnvelopeGetManyFieldMetaName,
1937
+ z.ZodTypeDef,
1938
+ unknown
1939
+ > = z.object({
1940
+ label: z.string().optional(),
1941
+ placeholder: z.string().optional(),
1942
+ required: z.boolean().optional(),
1943
+ readOnly: z.boolean().optional(),
1944
+ fontSize: z.number().default(12),
1945
+ type: z.literal("name"),
1946
+ textAlign: EnvelopeGetManyTextAlign2$inboundSchema.optional(),
1947
+ });
1948
+ /** @internal */
1949
+ export type EnvelopeGetManyFieldMetaName$Outbound = {
1950
+ label?: string | undefined;
1951
+ placeholder?: string | undefined;
1952
+ required?: boolean | undefined;
1953
+ readOnly?: boolean | undefined;
1954
+ fontSize: number;
1955
+ type: "name";
1956
+ textAlign?: string | undefined;
1957
+ };
1958
+
1959
+ /** @internal */
1960
+ export const EnvelopeGetManyFieldMetaName$outboundSchema: z.ZodType<
1961
+ EnvelopeGetManyFieldMetaName$Outbound,
1962
+ z.ZodTypeDef,
1963
+ EnvelopeGetManyFieldMetaName
1964
+ > = z.object({
1965
+ label: z.string().optional(),
1966
+ placeholder: z.string().optional(),
1967
+ required: z.boolean().optional(),
1968
+ readOnly: z.boolean().optional(),
1969
+ fontSize: z.number().default(12),
1970
+ type: z.literal("name"),
1971
+ textAlign: EnvelopeGetManyTextAlign2$outboundSchema.optional(),
1972
+ });
1973
+
1974
+ export function envelopeGetManyFieldMetaNameToJSON(
1975
+ envelopeGetManyFieldMetaName: EnvelopeGetManyFieldMetaName,
1976
+ ): string {
1977
+ return JSON.stringify(
1978
+ EnvelopeGetManyFieldMetaName$outboundSchema.parse(
1979
+ envelopeGetManyFieldMetaName,
1980
+ ),
1981
+ );
1982
+ }
1983
+ export function envelopeGetManyFieldMetaNameFromJSON(
1984
+ jsonString: string,
1985
+ ): SafeParseResult<EnvelopeGetManyFieldMetaName, SDKValidationError> {
1986
+ return safeParse(
1987
+ jsonString,
1988
+ (x) => EnvelopeGetManyFieldMetaName$inboundSchema.parse(JSON.parse(x)),
1989
+ `Failed to parse 'EnvelopeGetManyFieldMetaName' from JSON`,
1990
+ );
1991
+ }
1992
+
1993
+ /** @internal */
1994
+ export const EnvelopeGetManyTextAlign1$inboundSchema: z.ZodNativeEnum<
1995
+ typeof EnvelopeGetManyTextAlign1
1996
+ > = z.nativeEnum(EnvelopeGetManyTextAlign1);
1997
+ /** @internal */
1998
+ export const EnvelopeGetManyTextAlign1$outboundSchema: z.ZodNativeEnum<
1999
+ typeof EnvelopeGetManyTextAlign1
2000
+ > = EnvelopeGetManyTextAlign1$inboundSchema;
2001
+
2002
+ /** @internal */
2003
+ export const EnvelopeGetManyFieldMetaInitials$inboundSchema: z.ZodType<
2004
+ EnvelopeGetManyFieldMetaInitials,
2005
+ z.ZodTypeDef,
2006
+ unknown
2007
+ > = z.object({
2008
+ label: z.string().optional(),
2009
+ placeholder: z.string().optional(),
2010
+ required: z.boolean().optional(),
2011
+ readOnly: z.boolean().optional(),
2012
+ fontSize: z.number().default(12),
2013
+ type: z.literal("initials"),
2014
+ textAlign: EnvelopeGetManyTextAlign1$inboundSchema.optional(),
2015
+ });
2016
+ /** @internal */
2017
+ export type EnvelopeGetManyFieldMetaInitials$Outbound = {
2018
+ label?: string | undefined;
2019
+ placeholder?: string | undefined;
2020
+ required?: boolean | undefined;
2021
+ readOnly?: boolean | undefined;
2022
+ fontSize: number;
2023
+ type: "initials";
2024
+ textAlign?: string | undefined;
2025
+ };
2026
+
2027
+ /** @internal */
2028
+ export const EnvelopeGetManyFieldMetaInitials$outboundSchema: z.ZodType<
2029
+ EnvelopeGetManyFieldMetaInitials$Outbound,
2030
+ z.ZodTypeDef,
2031
+ EnvelopeGetManyFieldMetaInitials
2032
+ > = z.object({
2033
+ label: z.string().optional(),
2034
+ placeholder: z.string().optional(),
2035
+ required: z.boolean().optional(),
2036
+ readOnly: z.boolean().optional(),
2037
+ fontSize: z.number().default(12),
2038
+ type: z.literal("initials"),
2039
+ textAlign: EnvelopeGetManyTextAlign1$outboundSchema.optional(),
2040
+ });
2041
+
2042
+ export function envelopeGetManyFieldMetaInitialsToJSON(
2043
+ envelopeGetManyFieldMetaInitials: EnvelopeGetManyFieldMetaInitials,
2044
+ ): string {
2045
+ return JSON.stringify(
2046
+ EnvelopeGetManyFieldMetaInitials$outboundSchema.parse(
2047
+ envelopeGetManyFieldMetaInitials,
2048
+ ),
2049
+ );
2050
+ }
2051
+ export function envelopeGetManyFieldMetaInitialsFromJSON(
2052
+ jsonString: string,
2053
+ ): SafeParseResult<EnvelopeGetManyFieldMetaInitials, SDKValidationError> {
2054
+ return safeParse(
2055
+ jsonString,
2056
+ (x) => EnvelopeGetManyFieldMetaInitials$inboundSchema.parse(JSON.parse(x)),
2057
+ `Failed to parse 'EnvelopeGetManyFieldMetaInitials' from JSON`,
2058
+ );
2059
+ }
2060
+
2061
+ /** @internal */
2062
+ export const EnvelopeGetManyFieldMetaSignature$inboundSchema: z.ZodType<
2063
+ EnvelopeGetManyFieldMetaSignature,
2064
+ z.ZodTypeDef,
2065
+ unknown
2066
+ > = z.object({
2067
+ label: z.string().optional(),
2068
+ placeholder: z.string().optional(),
2069
+ required: z.boolean().optional(),
2070
+ readOnly: z.boolean().optional(),
2071
+ fontSize: z.number().default(12),
2072
+ type: z.literal("signature"),
2073
+ });
2074
+ /** @internal */
2075
+ export type EnvelopeGetManyFieldMetaSignature$Outbound = {
2076
+ label?: string | undefined;
2077
+ placeholder?: string | undefined;
2078
+ required?: boolean | undefined;
2079
+ readOnly?: boolean | undefined;
2080
+ fontSize: number;
2081
+ type: "signature";
2082
+ };
2083
+
2084
+ /** @internal */
2085
+ export const EnvelopeGetManyFieldMetaSignature$outboundSchema: z.ZodType<
2086
+ EnvelopeGetManyFieldMetaSignature$Outbound,
2087
+ z.ZodTypeDef,
2088
+ EnvelopeGetManyFieldMetaSignature
2089
+ > = z.object({
2090
+ label: z.string().optional(),
2091
+ placeholder: z.string().optional(),
2092
+ required: z.boolean().optional(),
2093
+ readOnly: z.boolean().optional(),
2094
+ fontSize: z.number().default(12),
2095
+ type: z.literal("signature"),
2096
+ });
2097
+
2098
+ export function envelopeGetManyFieldMetaSignatureToJSON(
2099
+ envelopeGetManyFieldMetaSignature: EnvelopeGetManyFieldMetaSignature,
2100
+ ): string {
2101
+ return JSON.stringify(
2102
+ EnvelopeGetManyFieldMetaSignature$outboundSchema.parse(
2103
+ envelopeGetManyFieldMetaSignature,
2104
+ ),
2105
+ );
2106
+ }
2107
+ export function envelopeGetManyFieldMetaSignatureFromJSON(
2108
+ jsonString: string,
2109
+ ): SafeParseResult<EnvelopeGetManyFieldMetaSignature, SDKValidationError> {
2110
+ return safeParse(
2111
+ jsonString,
2112
+ (x) => EnvelopeGetManyFieldMetaSignature$inboundSchema.parse(JSON.parse(x)),
2113
+ `Failed to parse 'EnvelopeGetManyFieldMetaSignature' from JSON`,
2114
+ );
2115
+ }
2116
+
2117
+ /** @internal */
2118
+ export const EnvelopeGetManyFieldMetaUnion$inboundSchema: z.ZodType<
2119
+ EnvelopeGetManyFieldMetaUnion,
2120
+ z.ZodTypeDef,
2121
+ unknown
2122
+ > = z.union([
2123
+ z.lazy(() => EnvelopeGetManyFieldMetaSignature$inboundSchema),
2124
+ z.lazy(() => EnvelopeGetManyFieldMetaInitials$inboundSchema),
2125
+ z.lazy(() => EnvelopeGetManyFieldMetaName$inboundSchema),
2126
+ z.lazy(() => EnvelopeGetManyFieldMetaEmail$inboundSchema),
2127
+ z.lazy(() => EnvelopeGetManyFieldMetaDate$inboundSchema),
2128
+ z.lazy(() => EnvelopeGetManyFieldMetaText$inboundSchema),
2129
+ z.lazy(() => EnvelopeGetManyFieldMetaNumber$inboundSchema),
2130
+ z.lazy(() => EnvelopeGetManyFieldMetaRadio$inboundSchema),
2131
+ z.lazy(() => EnvelopeGetManyFieldMetaCheckbox$inboundSchema),
2132
+ z.lazy(() => EnvelopeGetManyFieldMetaDropdown$inboundSchema),
2133
+ ]);
2134
+ /** @internal */
2135
+ export type EnvelopeGetManyFieldMetaUnion$Outbound =
2136
+ | EnvelopeGetManyFieldMetaSignature$Outbound
2137
+ | EnvelopeGetManyFieldMetaInitials$Outbound
2138
+ | EnvelopeGetManyFieldMetaName$Outbound
2139
+ | EnvelopeGetManyFieldMetaEmail$Outbound
2140
+ | EnvelopeGetManyFieldMetaDate$Outbound
2141
+ | EnvelopeGetManyFieldMetaText$Outbound
2142
+ | EnvelopeGetManyFieldMetaNumber$Outbound
2143
+ | EnvelopeGetManyFieldMetaRadio$Outbound
2144
+ | EnvelopeGetManyFieldMetaCheckbox$Outbound
2145
+ | EnvelopeGetManyFieldMetaDropdown$Outbound;
2146
+
2147
+ /** @internal */
2148
+ export const EnvelopeGetManyFieldMetaUnion$outboundSchema: z.ZodType<
2149
+ EnvelopeGetManyFieldMetaUnion$Outbound,
2150
+ z.ZodTypeDef,
2151
+ EnvelopeGetManyFieldMetaUnion
2152
+ > = z.union([
2153
+ z.lazy(() => EnvelopeGetManyFieldMetaSignature$outboundSchema),
2154
+ z.lazy(() => EnvelopeGetManyFieldMetaInitials$outboundSchema),
2155
+ z.lazy(() => EnvelopeGetManyFieldMetaName$outboundSchema),
2156
+ z.lazy(() => EnvelopeGetManyFieldMetaEmail$outboundSchema),
2157
+ z.lazy(() => EnvelopeGetManyFieldMetaDate$outboundSchema),
2158
+ z.lazy(() => EnvelopeGetManyFieldMetaText$outboundSchema),
2159
+ z.lazy(() => EnvelopeGetManyFieldMetaNumber$outboundSchema),
2160
+ z.lazy(() => EnvelopeGetManyFieldMetaRadio$outboundSchema),
2161
+ z.lazy(() => EnvelopeGetManyFieldMetaCheckbox$outboundSchema),
2162
+ z.lazy(() => EnvelopeGetManyFieldMetaDropdown$outboundSchema),
2163
+ ]);
2164
+
2165
+ export function envelopeGetManyFieldMetaUnionToJSON(
2166
+ envelopeGetManyFieldMetaUnion: EnvelopeGetManyFieldMetaUnion,
2167
+ ): string {
2168
+ return JSON.stringify(
2169
+ EnvelopeGetManyFieldMetaUnion$outboundSchema.parse(
2170
+ envelopeGetManyFieldMetaUnion,
2171
+ ),
2172
+ );
2173
+ }
2174
+ export function envelopeGetManyFieldMetaUnionFromJSON(
2175
+ jsonString: string,
2176
+ ): SafeParseResult<EnvelopeGetManyFieldMetaUnion, SDKValidationError> {
2177
+ return safeParse(
2178
+ jsonString,
2179
+ (x) => EnvelopeGetManyFieldMetaUnion$inboundSchema.parse(JSON.parse(x)),
2180
+ `Failed to parse 'EnvelopeGetManyFieldMetaUnion' from JSON`,
2181
+ );
2182
+ }
2183
+
2184
+ /** @internal */
2185
+ export const EnvelopeGetManyField$inboundSchema: z.ZodType<
2186
+ EnvelopeGetManyField,
2187
+ z.ZodTypeDef,
2188
+ unknown
2189
+ > = z.object({
2190
+ envelopeId: z.string(),
2191
+ envelopeItemId: z.string(),
2192
+ type: EnvelopeGetManyFieldTypeEnum$inboundSchema,
2193
+ id: z.number(),
2194
+ secondaryId: z.string(),
2195
+ recipientId: z.number(),
2196
+ page: z.number(),
2197
+ positionX: z.any().optional(),
2198
+ positionY: z.any().optional(),
2199
+ width: z.any().optional(),
2200
+ height: z.any().optional(),
2201
+ customText: z.string(),
2202
+ inserted: z.boolean(),
2203
+ fieldMeta: z.nullable(
2204
+ z.union([
2205
+ z.lazy(() => EnvelopeGetManyFieldMetaSignature$inboundSchema),
2206
+ z.lazy(() => EnvelopeGetManyFieldMetaInitials$inboundSchema),
2207
+ z.lazy(() => EnvelopeGetManyFieldMetaName$inboundSchema),
2208
+ z.lazy(() => EnvelopeGetManyFieldMetaEmail$inboundSchema),
2209
+ z.lazy(() => EnvelopeGetManyFieldMetaDate$inboundSchema),
2210
+ z.lazy(() => EnvelopeGetManyFieldMetaText$inboundSchema),
2211
+ z.lazy(() => EnvelopeGetManyFieldMetaNumber$inboundSchema),
2212
+ z.lazy(() => EnvelopeGetManyFieldMetaRadio$inboundSchema),
2213
+ z.lazy(() => EnvelopeGetManyFieldMetaCheckbox$inboundSchema),
2214
+ z.lazy(() => EnvelopeGetManyFieldMetaDropdown$inboundSchema),
2215
+ ]),
2216
+ ),
2217
+ });
2218
+ /** @internal */
2219
+ export type EnvelopeGetManyField$Outbound = {
2220
+ envelopeId: string;
2221
+ envelopeItemId: string;
2222
+ type: string;
2223
+ id: number;
2224
+ secondaryId: string;
2225
+ recipientId: number;
2226
+ page: number;
2227
+ positionX?: any | undefined;
2228
+ positionY?: any | undefined;
2229
+ width?: any | undefined;
2230
+ height?: any | undefined;
2231
+ customText: string;
2232
+ inserted: boolean;
2233
+ fieldMeta:
2234
+ | EnvelopeGetManyFieldMetaSignature$Outbound
2235
+ | EnvelopeGetManyFieldMetaInitials$Outbound
2236
+ | EnvelopeGetManyFieldMetaName$Outbound
2237
+ | EnvelopeGetManyFieldMetaEmail$Outbound
2238
+ | EnvelopeGetManyFieldMetaDate$Outbound
2239
+ | EnvelopeGetManyFieldMetaText$Outbound
2240
+ | EnvelopeGetManyFieldMetaNumber$Outbound
2241
+ | EnvelopeGetManyFieldMetaRadio$Outbound
2242
+ | EnvelopeGetManyFieldMetaCheckbox$Outbound
2243
+ | EnvelopeGetManyFieldMetaDropdown$Outbound
2244
+ | null;
2245
+ };
2246
+
2247
+ /** @internal */
2248
+ export const EnvelopeGetManyField$outboundSchema: z.ZodType<
2249
+ EnvelopeGetManyField$Outbound,
2250
+ z.ZodTypeDef,
2251
+ EnvelopeGetManyField
2252
+ > = z.object({
2253
+ envelopeId: z.string(),
2254
+ envelopeItemId: z.string(),
2255
+ type: EnvelopeGetManyFieldTypeEnum$outboundSchema,
2256
+ id: z.number(),
2257
+ secondaryId: z.string(),
2258
+ recipientId: z.number(),
2259
+ page: z.number(),
2260
+ positionX: z.any().optional(),
2261
+ positionY: z.any().optional(),
2262
+ width: z.any().optional(),
2263
+ height: z.any().optional(),
2264
+ customText: z.string(),
2265
+ inserted: z.boolean(),
2266
+ fieldMeta: z.nullable(
2267
+ z.union([
2268
+ z.lazy(() => EnvelopeGetManyFieldMetaSignature$outboundSchema),
2269
+ z.lazy(() => EnvelopeGetManyFieldMetaInitials$outboundSchema),
2270
+ z.lazy(() => EnvelopeGetManyFieldMetaName$outboundSchema),
2271
+ z.lazy(() => EnvelopeGetManyFieldMetaEmail$outboundSchema),
2272
+ z.lazy(() => EnvelopeGetManyFieldMetaDate$outboundSchema),
2273
+ z.lazy(() => EnvelopeGetManyFieldMetaText$outboundSchema),
2274
+ z.lazy(() => EnvelopeGetManyFieldMetaNumber$outboundSchema),
2275
+ z.lazy(() => EnvelopeGetManyFieldMetaRadio$outboundSchema),
2276
+ z.lazy(() => EnvelopeGetManyFieldMetaCheckbox$outboundSchema),
2277
+ z.lazy(() => EnvelopeGetManyFieldMetaDropdown$outboundSchema),
2278
+ ]),
2279
+ ),
2280
+ });
2281
+
2282
+ export function envelopeGetManyFieldToJSON(
2283
+ envelopeGetManyField: EnvelopeGetManyField,
2284
+ ): string {
2285
+ return JSON.stringify(
2286
+ EnvelopeGetManyField$outboundSchema.parse(envelopeGetManyField),
2287
+ );
2288
+ }
2289
+ export function envelopeGetManyFieldFromJSON(
2290
+ jsonString: string,
2291
+ ): SafeParseResult<EnvelopeGetManyField, SDKValidationError> {
2292
+ return safeParse(
2293
+ jsonString,
2294
+ (x) => EnvelopeGetManyField$inboundSchema.parse(JSON.parse(x)),
2295
+ `Failed to parse 'EnvelopeGetManyField' from JSON`,
2296
+ );
2297
+ }
2298
+
2299
+ /** @internal */
2300
+ export const EnvelopeGetManyEnvelopeItem$inboundSchema: z.ZodType<
2301
+ EnvelopeGetManyEnvelopeItem,
2302
+ z.ZodTypeDef,
2303
+ unknown
2304
+ > = z.object({
2305
+ envelopeId: z.string(),
2306
+ id: z.string(),
2307
+ title: z.string(),
2308
+ order: z.number(),
2309
+ });
2310
+ /** @internal */
2311
+ export type EnvelopeGetManyEnvelopeItem$Outbound = {
2312
+ envelopeId: string;
2313
+ id: string;
2314
+ title: string;
2315
+ order: number;
2316
+ };
2317
+
2318
+ /** @internal */
2319
+ export const EnvelopeGetManyEnvelopeItem$outboundSchema: z.ZodType<
2320
+ EnvelopeGetManyEnvelopeItem$Outbound,
2321
+ z.ZodTypeDef,
2322
+ EnvelopeGetManyEnvelopeItem
2323
+ > = z.object({
2324
+ envelopeId: z.string(),
2325
+ id: z.string(),
2326
+ title: z.string(),
2327
+ order: z.number(),
2328
+ });
2329
+
2330
+ export function envelopeGetManyEnvelopeItemToJSON(
2331
+ envelopeGetManyEnvelopeItem: EnvelopeGetManyEnvelopeItem,
2332
+ ): string {
2333
+ return JSON.stringify(
2334
+ EnvelopeGetManyEnvelopeItem$outboundSchema.parse(
2335
+ envelopeGetManyEnvelopeItem,
2336
+ ),
2337
+ );
2338
+ }
2339
+ export function envelopeGetManyEnvelopeItemFromJSON(
2340
+ jsonString: string,
2341
+ ): SafeParseResult<EnvelopeGetManyEnvelopeItem, SDKValidationError> {
2342
+ return safeParse(
2343
+ jsonString,
2344
+ (x) => EnvelopeGetManyEnvelopeItem$inboundSchema.parse(JSON.parse(x)),
2345
+ `Failed to parse 'EnvelopeGetManyEnvelopeItem' from JSON`,
2346
+ );
2347
+ }
2348
+
2349
+ /** @internal */
2350
+ export const EnvelopeGetManyDirectLink$inboundSchema: z.ZodType<
2351
+ EnvelopeGetManyDirectLink,
2352
+ z.ZodTypeDef,
2353
+ unknown
2354
+ > = z.object({
2355
+ directTemplateRecipientId: z.number(),
2356
+ enabled: z.boolean(),
2357
+ id: z.string(),
2358
+ token: z.string(),
2359
+ });
2360
+ /** @internal */
2361
+ export type EnvelopeGetManyDirectLink$Outbound = {
2362
+ directTemplateRecipientId: number;
2363
+ enabled: boolean;
2364
+ id: string;
2365
+ token: string;
2366
+ };
2367
+
2368
+ /** @internal */
2369
+ export const EnvelopeGetManyDirectLink$outboundSchema: z.ZodType<
2370
+ EnvelopeGetManyDirectLink$Outbound,
2371
+ z.ZodTypeDef,
2372
+ EnvelopeGetManyDirectLink
2373
+ > = z.object({
2374
+ directTemplateRecipientId: z.number(),
2375
+ enabled: z.boolean(),
2376
+ id: z.string(),
2377
+ token: z.string(),
2378
+ });
2379
+
2380
+ export function envelopeGetManyDirectLinkToJSON(
2381
+ envelopeGetManyDirectLink: EnvelopeGetManyDirectLink,
2382
+ ): string {
2383
+ return JSON.stringify(
2384
+ EnvelopeGetManyDirectLink$outboundSchema.parse(envelopeGetManyDirectLink),
2385
+ );
2386
+ }
2387
+ export function envelopeGetManyDirectLinkFromJSON(
2388
+ jsonString: string,
2389
+ ): SafeParseResult<EnvelopeGetManyDirectLink, SDKValidationError> {
2390
+ return safeParse(
2391
+ jsonString,
2392
+ (x) => EnvelopeGetManyDirectLink$inboundSchema.parse(JSON.parse(x)),
2393
+ `Failed to parse 'EnvelopeGetManyDirectLink' from JSON`,
2394
+ );
2395
+ }
2396
+
2397
+ /** @internal */
2398
+ export const EnvelopeGetManyTeam$inboundSchema: z.ZodType<
2399
+ EnvelopeGetManyTeam,
2400
+ z.ZodTypeDef,
2401
+ unknown
2402
+ > = z.object({
2403
+ id: z.number(),
2404
+ url: z.string(),
2405
+ });
2406
+ /** @internal */
2407
+ export type EnvelopeGetManyTeam$Outbound = {
2408
+ id: number;
2409
+ url: string;
2410
+ };
2411
+
2412
+ /** @internal */
2413
+ export const EnvelopeGetManyTeam$outboundSchema: z.ZodType<
2414
+ EnvelopeGetManyTeam$Outbound,
2415
+ z.ZodTypeDef,
2416
+ EnvelopeGetManyTeam
2417
+ > = z.object({
2418
+ id: z.number(),
2419
+ url: z.string(),
2420
+ });
2421
+
2422
+ export function envelopeGetManyTeamToJSON(
2423
+ envelopeGetManyTeam: EnvelopeGetManyTeam,
2424
+ ): string {
2425
+ return JSON.stringify(
2426
+ EnvelopeGetManyTeam$outboundSchema.parse(envelopeGetManyTeam),
2427
+ );
2428
+ }
2429
+ export function envelopeGetManyTeamFromJSON(
2430
+ jsonString: string,
2431
+ ): SafeParseResult<EnvelopeGetManyTeam, SDKValidationError> {
2432
+ return safeParse(
2433
+ jsonString,
2434
+ (x) => EnvelopeGetManyTeam$inboundSchema.parse(JSON.parse(x)),
2435
+ `Failed to parse 'EnvelopeGetManyTeam' from JSON`,
2436
+ );
2437
+ }
2438
+
2439
+ /** @internal */
2440
+ export const EnvelopeGetManyUser$inboundSchema: z.ZodType<
2441
+ EnvelopeGetManyUser,
2442
+ z.ZodTypeDef,
2443
+ unknown
2444
+ > = z.object({
2445
+ id: z.number(),
2446
+ name: z.string(),
2447
+ email: z.string(),
2448
+ });
2449
+ /** @internal */
2450
+ export type EnvelopeGetManyUser$Outbound = {
2451
+ id: number;
2452
+ name: string;
2453
+ email: string;
2454
+ };
2455
+
2456
+ /** @internal */
2457
+ export const EnvelopeGetManyUser$outboundSchema: z.ZodType<
2458
+ EnvelopeGetManyUser$Outbound,
2459
+ z.ZodTypeDef,
2460
+ EnvelopeGetManyUser
2461
+ > = z.object({
2462
+ id: z.number(),
2463
+ name: z.string(),
2464
+ email: z.string(),
2465
+ });
2466
+
2467
+ export function envelopeGetManyUserToJSON(
2468
+ envelopeGetManyUser: EnvelopeGetManyUser,
2469
+ ): string {
2470
+ return JSON.stringify(
2471
+ EnvelopeGetManyUser$outboundSchema.parse(envelopeGetManyUser),
2472
+ );
2473
+ }
2474
+ export function envelopeGetManyUserFromJSON(
2475
+ jsonString: string,
2476
+ ): SafeParseResult<EnvelopeGetManyUser, SDKValidationError> {
2477
+ return safeParse(
2478
+ jsonString,
2479
+ (x) => EnvelopeGetManyUser$inboundSchema.parse(JSON.parse(x)),
2480
+ `Failed to parse 'EnvelopeGetManyUser' from JSON`,
2481
+ );
2482
+ }
2483
+
2484
+ /** @internal */
2485
+ export const EnvelopeGetManyData$inboundSchema: z.ZodType<
2486
+ EnvelopeGetManyData,
2487
+ z.ZodTypeDef,
2488
+ unknown
2489
+ > = z.object({
2490
+ internalVersion: z.number(),
2491
+ type: EnvelopeGetManyTypeEnum$inboundSchema,
2492
+ status: EnvelopeGetManyStatus$inboundSchema,
2493
+ source: EnvelopeGetManySource$inboundSchema,
2494
+ visibility: EnvelopeGetManyVisibility$inboundSchema,
2495
+ templateType: EnvelopeGetManyTemplateType$inboundSchema,
2496
+ id: z.string(),
2497
+ secondaryId: z.string(),
2498
+ externalId: z.nullable(z.string()),
2499
+ createdAt: z.string(),
2500
+ updatedAt: z.string(),
2501
+ completedAt: z.nullable(z.string()),
2502
+ deletedAt: z.nullable(z.string()),
2503
+ title: z.string(),
2504
+ authOptions: z.nullable(
2505
+ z.lazy(() => EnvelopeGetManyAuthOptions$inboundSchema),
2506
+ ),
2507
+ formValues: z.nullable(
2508
+ z.record(z.union([z.string(), z.boolean(), z.number()])),
2509
+ ),
2510
+ publicTitle: z.string(),
2511
+ publicDescription: z.string(),
2512
+ userId: z.number(),
2513
+ teamId: z.number(),
2514
+ folderId: z.nullable(z.string()),
2515
+ templateId: z.nullable(z.number()),
2516
+ documentMeta: z.lazy(() => EnvelopeGetManyDocumentMeta$inboundSchema),
2517
+ recipients: z.array(z.lazy(() => EnvelopeGetManyRecipient$inboundSchema)),
2518
+ fields: z.array(z.lazy(() => EnvelopeGetManyField$inboundSchema)),
2519
+ envelopeItems: z.array(
2520
+ z.lazy(() => EnvelopeGetManyEnvelopeItem$inboundSchema),
2521
+ ),
2522
+ directLink: z.nullable(z.lazy(() => EnvelopeGetManyDirectLink$inboundSchema)),
2523
+ team: z.lazy(() => EnvelopeGetManyTeam$inboundSchema),
2524
+ user: z.lazy(() => EnvelopeGetManyUser$inboundSchema),
2525
+ });
2526
+ /** @internal */
2527
+ export type EnvelopeGetManyData$Outbound = {
2528
+ internalVersion: number;
2529
+ type: string;
2530
+ status: string;
2531
+ source: string;
2532
+ visibility: string;
2533
+ templateType: string;
2534
+ id: string;
2535
+ secondaryId: string;
2536
+ externalId: string | null;
2537
+ createdAt: string;
2538
+ updatedAt: string;
2539
+ completedAt: string | null;
2540
+ deletedAt: string | null;
2541
+ title: string;
2542
+ authOptions: EnvelopeGetManyAuthOptions$Outbound | null;
2543
+ formValues: { [k: string]: string | boolean | number } | null;
2544
+ publicTitle: string;
2545
+ publicDescription: string;
2546
+ userId: number;
2547
+ teamId: number;
2548
+ folderId: string | null;
2549
+ templateId: number | null;
2550
+ documentMeta: EnvelopeGetManyDocumentMeta$Outbound;
2551
+ recipients: Array<EnvelopeGetManyRecipient$Outbound>;
2552
+ fields: Array<EnvelopeGetManyField$Outbound>;
2553
+ envelopeItems: Array<EnvelopeGetManyEnvelopeItem$Outbound>;
2554
+ directLink: EnvelopeGetManyDirectLink$Outbound | null;
2555
+ team: EnvelopeGetManyTeam$Outbound;
2556
+ user: EnvelopeGetManyUser$Outbound;
2557
+ };
2558
+
2559
+ /** @internal */
2560
+ export const EnvelopeGetManyData$outboundSchema: z.ZodType<
2561
+ EnvelopeGetManyData$Outbound,
2562
+ z.ZodTypeDef,
2563
+ EnvelopeGetManyData
2564
+ > = z.object({
2565
+ internalVersion: z.number(),
2566
+ type: EnvelopeGetManyTypeEnum$outboundSchema,
2567
+ status: EnvelopeGetManyStatus$outboundSchema,
2568
+ source: EnvelopeGetManySource$outboundSchema,
2569
+ visibility: EnvelopeGetManyVisibility$outboundSchema,
2570
+ templateType: EnvelopeGetManyTemplateType$outboundSchema,
2571
+ id: z.string(),
2572
+ secondaryId: z.string(),
2573
+ externalId: z.nullable(z.string()),
2574
+ createdAt: z.string(),
2575
+ updatedAt: z.string(),
2576
+ completedAt: z.nullable(z.string()),
2577
+ deletedAt: z.nullable(z.string()),
2578
+ title: z.string(),
2579
+ authOptions: z.nullable(
2580
+ z.lazy(() => EnvelopeGetManyAuthOptions$outboundSchema),
2581
+ ),
2582
+ formValues: z.nullable(
2583
+ z.record(z.union([z.string(), z.boolean(), z.number()])),
2584
+ ),
2585
+ publicTitle: z.string(),
2586
+ publicDescription: z.string(),
2587
+ userId: z.number(),
2588
+ teamId: z.number(),
2589
+ folderId: z.nullable(z.string()),
2590
+ templateId: z.nullable(z.number()),
2591
+ documentMeta: z.lazy(() => EnvelopeGetManyDocumentMeta$outboundSchema),
2592
+ recipients: z.array(z.lazy(() => EnvelopeGetManyRecipient$outboundSchema)),
2593
+ fields: z.array(z.lazy(() => EnvelopeGetManyField$outboundSchema)),
2594
+ envelopeItems: z.array(
2595
+ z.lazy(() => EnvelopeGetManyEnvelopeItem$outboundSchema),
2596
+ ),
2597
+ directLink: z.nullable(
2598
+ z.lazy(() => EnvelopeGetManyDirectLink$outboundSchema),
2599
+ ),
2600
+ team: z.lazy(() => EnvelopeGetManyTeam$outboundSchema),
2601
+ user: z.lazy(() => EnvelopeGetManyUser$outboundSchema),
2602
+ });
2603
+
2604
+ export function envelopeGetManyDataToJSON(
2605
+ envelopeGetManyData: EnvelopeGetManyData,
2606
+ ): string {
2607
+ return JSON.stringify(
2608
+ EnvelopeGetManyData$outboundSchema.parse(envelopeGetManyData),
2609
+ );
2610
+ }
2611
+ export function envelopeGetManyDataFromJSON(
2612
+ jsonString: string,
2613
+ ): SafeParseResult<EnvelopeGetManyData, SDKValidationError> {
2614
+ return safeParse(
2615
+ jsonString,
2616
+ (x) => EnvelopeGetManyData$inboundSchema.parse(JSON.parse(x)),
2617
+ `Failed to parse 'EnvelopeGetManyData' from JSON`,
2618
+ );
2619
+ }
2620
+
2621
+ /** @internal */
2622
+ export const EnvelopeGetManyResponse$inboundSchema: z.ZodType<
2623
+ EnvelopeGetManyResponse,
2624
+ z.ZodTypeDef,
2625
+ unknown
2626
+ > = z.object({
2627
+ data: z.array(z.lazy(() => EnvelopeGetManyData$inboundSchema)),
2628
+ });
2629
+ /** @internal */
2630
+ export type EnvelopeGetManyResponse$Outbound = {
2631
+ data: Array<EnvelopeGetManyData$Outbound>;
2632
+ };
2633
+
2634
+ /** @internal */
2635
+ export const EnvelopeGetManyResponse$outboundSchema: z.ZodType<
2636
+ EnvelopeGetManyResponse$Outbound,
2637
+ z.ZodTypeDef,
2638
+ EnvelopeGetManyResponse
2639
+ > = z.object({
2640
+ data: z.array(z.lazy(() => EnvelopeGetManyData$outboundSchema)),
2641
+ });
2642
+
2643
+ export function envelopeGetManyResponseToJSON(
2644
+ envelopeGetManyResponse: EnvelopeGetManyResponse,
2645
+ ): string {
2646
+ return JSON.stringify(
2647
+ EnvelopeGetManyResponse$outboundSchema.parse(envelopeGetManyResponse),
2648
+ );
2649
+ }
2650
+ export function envelopeGetManyResponseFromJSON(
2651
+ jsonString: string,
2652
+ ): SafeParseResult<EnvelopeGetManyResponse, SDKValidationError> {
2653
+ return safeParse(
2654
+ jsonString,
2655
+ (x) => EnvelopeGetManyResponse$inboundSchema.parse(JSON.parse(x)),
2656
+ `Failed to parse 'EnvelopeGetManyResponse' from JSON`,
2657
+ );
2658
+ }