@clientcasa/sdk 0.3.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (387) hide show
  1. package/README.md +19 -24
  2. package/esm/funcs/catalog-items-list.js +1 -0
  3. package/esm/funcs/catalog-items-list.js.map +1 -1
  4. package/esm/funcs/{inquiries-get.d.ts → form-submissions-get.d.ts} +3 -3
  5. package/esm/funcs/form-submissions-get.d.ts.map +1 -0
  6. package/esm/funcs/{inquiries-delete.js → form-submissions-get.js} +9 -8
  7. package/esm/funcs/form-submissions-get.js.map +1 -0
  8. package/esm/funcs/form-submissions-list.d.ts +21 -0
  9. package/esm/funcs/form-submissions-list.d.ts.map +1 -0
  10. package/esm/funcs/{inquiries-list.js → form-submissions-list.js} +14 -9
  11. package/esm/funcs/form-submissions-list.js.map +1 -0
  12. package/esm/funcs/{proposals-get.d.ts → forms-and-agreements-get.d.ts} +2 -2
  13. package/esm/funcs/forms-and-agreements-get.d.ts.map +1 -0
  14. package/esm/funcs/{proposals-get.js → forms-and-agreements-get.js} +6 -6
  15. package/esm/funcs/forms-and-agreements-get.js.map +1 -0
  16. package/esm/funcs/{inquiries-delete.d.ts → forms-and-agreements-list.d.ts} +6 -3
  17. package/esm/funcs/forms-and-agreements-list.d.ts.map +1 -0
  18. package/esm/funcs/{proposals-list.js → forms-and-agreements-list.js} +8 -8
  19. package/esm/funcs/forms-and-agreements-list.js.map +1 -0
  20. package/esm/funcs/{proposals-list.d.ts → forms-get.d.ts} +4 -6
  21. package/esm/funcs/forms-get.d.ts.map +1 -0
  22. package/esm/funcs/{inquiries-get.js → forms-get.js} +7 -7
  23. package/esm/funcs/forms-get.js.map +1 -0
  24. package/esm/funcs/{inquiries-list.d.ts → forms-list.d.ts} +3 -3
  25. package/esm/funcs/forms-list.d.ts.map +1 -0
  26. package/esm/funcs/forms-list.js +138 -0
  27. package/esm/funcs/forms-list.js.map +1 -0
  28. package/esm/funcs/invoices-create.d.ts +1 -1
  29. package/esm/funcs/invoices-create.js +1 -1
  30. package/esm/funcs/invoices-list.js +1 -0
  31. package/esm/funcs/invoices-list.js.map +1 -1
  32. package/esm/funcs/milestones-create.d.ts +1 -1
  33. package/esm/funcs/milestones-create.js +1 -1
  34. package/esm/hooks/types.d.ts +1 -0
  35. package/esm/hooks/types.d.ts.map +1 -1
  36. package/esm/lib/config.d.ts +3 -3
  37. package/esm/lib/config.js +3 -3
  38. package/esm/lib/sdks.d.ts.map +1 -1
  39. package/esm/lib/sdks.js +13 -4
  40. package/esm/lib/sdks.js.map +1 -1
  41. package/esm/models/api-error.d.ts +1 -0
  42. package/esm/models/api-error.d.ts.map +1 -1
  43. package/esm/models/api-error.js +1 -0
  44. package/esm/models/api-error.js.map +1 -1
  45. package/esm/models/catalog-item.d.ts +17 -0
  46. package/esm/models/catalog-item.d.ts.map +1 -1
  47. package/esm/models/catalog-item.js +15 -0
  48. package/esm/models/catalog-item.js.map +1 -1
  49. package/esm/models/client-create.d.ts +5 -1
  50. package/esm/models/client-create.d.ts.map +1 -1
  51. package/esm/models/client-create.js +5 -1
  52. package/esm/models/client-create.js.map +1 -1
  53. package/esm/models/client-document-list.d.ts +13 -0
  54. package/esm/models/client-document-list.d.ts.map +1 -0
  55. package/esm/models/client-document-list.js +16 -0
  56. package/esm/models/client-document-list.js.map +1 -0
  57. package/esm/models/client-document.d.ts +70 -0
  58. package/esm/models/client-document.d.ts.map +1 -0
  59. package/esm/models/client-document.js +45 -0
  60. package/esm/models/client-document.js.map +1 -0
  61. package/esm/models/client-update.d.ts +5 -1
  62. package/esm/models/client-update.d.ts.map +1 -1
  63. package/esm/models/client-update.js +5 -1
  64. package/esm/models/client-update.js.map +1 -1
  65. package/esm/models/client.d.ts +5 -1
  66. package/esm/models/client.d.ts.map +1 -1
  67. package/esm/models/client.js +5 -1
  68. package/esm/models/client.js.map +1 -1
  69. package/esm/models/contact.d.ts +1 -1
  70. package/esm/models/contact.d.ts.map +1 -1
  71. package/esm/models/contact.js +1 -1
  72. package/esm/models/contact.js.map +1 -1
  73. package/esm/models/contract-create.d.ts +0 -5
  74. package/esm/models/contract-create.d.ts.map +1 -1
  75. package/esm/models/contract-create.js +0 -1
  76. package/esm/models/contract-create.js.map +1 -1
  77. package/esm/models/contract.d.ts +0 -4
  78. package/esm/models/contract.d.ts.map +1 -1
  79. package/esm/models/contract.js +0 -1
  80. package/esm/models/contract.js.map +1 -1
  81. package/esm/models/form-list.d.ts +13 -0
  82. package/esm/models/form-list.d.ts.map +1 -0
  83. package/esm/models/form-list.js +17 -0
  84. package/esm/models/form-list.js.map +1 -0
  85. package/esm/models/form-submission-answer.d.ts +12 -0
  86. package/esm/models/form-submission-answer.d.ts.map +1 -0
  87. package/esm/models/form-submission-answer.js +16 -0
  88. package/esm/models/form-submission-answer.js.map +1 -0
  89. package/esm/models/form-submission-list.d.ts +13 -0
  90. package/esm/models/form-submission-list.d.ts.map +1 -0
  91. package/esm/models/form-submission-list.js +16 -0
  92. package/esm/models/form-submission-list.js.map +1 -0
  93. package/esm/models/form-submission.d.ts +54 -0
  94. package/esm/models/form-submission.d.ts.map +1 -0
  95. package/esm/models/form-submission.js +38 -0
  96. package/esm/models/form-submission.js.map +1 -0
  97. package/esm/models/form.d.ts +36 -0
  98. package/esm/models/form.d.ts.map +1 -0
  99. package/esm/models/form.js +30 -0
  100. package/esm/models/form.js.map +1 -0
  101. package/esm/models/index.d.ts +7 -8
  102. package/esm/models/index.d.ts.map +1 -1
  103. package/esm/models/index.js +7 -8
  104. package/esm/models/index.js.map +1 -1
  105. package/esm/models/invoice.d.ts +4 -1
  106. package/esm/models/invoice.d.ts.map +1 -1
  107. package/esm/models/invoice.js +1 -1
  108. package/esm/models/invoice.js.map +1 -1
  109. package/esm/models/milestone-create.d.ts +1 -1
  110. package/esm/models/milestone-create.js +1 -1
  111. package/esm/models/milestone-create.js.map +1 -1
  112. package/esm/models/milestone.d.ts +1 -1
  113. package/esm/models/milestone.js +1 -1
  114. package/esm/models/milestone.js.map +1 -1
  115. package/esm/models/operations/get-client-document.d.ts +27 -0
  116. package/esm/models/operations/get-client-document.d.ts.map +1 -0
  117. package/esm/models/operations/get-client-document.js +20 -0
  118. package/esm/models/operations/get-client-document.js.map +1 -0
  119. package/esm/models/operations/get-form-submission.d.ts +27 -0
  120. package/esm/models/operations/get-form-submission.d.ts.map +1 -0
  121. package/esm/models/operations/get-form-submission.js +20 -0
  122. package/esm/models/operations/get-form-submission.js.map +1 -0
  123. package/esm/models/operations/get-form.d.ts +27 -0
  124. package/esm/models/operations/get-form.d.ts.map +1 -0
  125. package/esm/models/operations/get-form.js +20 -0
  126. package/esm/models/operations/get-form.js.map +1 -0
  127. package/esm/models/operations/index.d.ts +6 -10
  128. package/esm/models/operations/index.d.ts.map +1 -1
  129. package/esm/models/operations/index.js +6 -10
  130. package/esm/models/operations/index.js.map +1 -1
  131. package/esm/models/operations/list-catalog-items.d.ts +9 -0
  132. package/esm/models/operations/list-catalog-items.d.ts.map +1 -1
  133. package/esm/models/operations/list-catalog-items.js +8 -0
  134. package/esm/models/operations/list-catalog-items.js.map +1 -1
  135. package/esm/models/operations/list-client-documents.d.ts +61 -0
  136. package/esm/models/operations/list-client-documents.d.ts.map +1 -0
  137. package/esm/models/operations/list-client-documents.js +50 -0
  138. package/esm/models/operations/list-client-documents.js.map +1 -0
  139. package/esm/models/operations/list-clients.d.ts +5 -1
  140. package/esm/models/operations/list-clients.d.ts.map +1 -1
  141. package/esm/models/operations/list-clients.js +5 -1
  142. package/esm/models/operations/list-clients.js.map +1 -1
  143. package/esm/models/operations/list-form-submissions.d.ts +64 -0
  144. package/esm/models/operations/list-form-submissions.d.ts.map +1 -0
  145. package/esm/models/operations/list-form-submissions.js +51 -0
  146. package/esm/models/operations/list-form-submissions.js.map +1 -0
  147. package/esm/models/operations/list-forms.d.ts +47 -0
  148. package/esm/models/operations/list-forms.d.ts.map +1 -0
  149. package/esm/models/operations/list-forms.js +43 -0
  150. package/esm/models/operations/list-forms.js.map +1 -0
  151. package/esm/models/operations/list-invoices.d.ts +18 -1
  152. package/esm/models/operations/list-invoices.d.ts.map +1 -1
  153. package/esm/models/operations/list-invoices.js +10 -1
  154. package/esm/models/operations/list-invoices.js.map +1 -1
  155. package/esm/models/operations/list-milestones.d.ts +1 -1
  156. package/esm/models/operations/list-milestones.js +1 -1
  157. package/esm/models/operations/list-milestones.js.map +1 -1
  158. package/esm/models/operations/list-payments.d.ts +4 -4
  159. package/esm/models/operations/list-payments.d.ts.map +1 -1
  160. package/esm/models/operations/list-payments.js +3 -3
  161. package/esm/models/operations/list-payments.js.map +1 -1
  162. package/esm/models/operations/list-webhooks.d.ts +10 -11
  163. package/esm/models/operations/list-webhooks.d.ts.map +1 -1
  164. package/esm/models/operations/list-webhooks.js +10 -11
  165. package/esm/models/operations/list-webhooks.js.map +1 -1
  166. package/esm/models/webhook-create.d.ts +10 -11
  167. package/esm/models/webhook-create.d.ts.map +1 -1
  168. package/esm/models/webhook-create.js +10 -11
  169. package/esm/models/webhook-create.js.map +1 -1
  170. package/esm/models/webhook-update.d.ts +10 -11
  171. package/esm/models/webhook-update.d.ts.map +1 -1
  172. package/esm/models/webhook-update.js +10 -11
  173. package/esm/models/webhook-update.js.map +1 -1
  174. package/esm/models/webhook.d.ts +10 -11
  175. package/esm/models/webhook.d.ts.map +1 -1
  176. package/esm/models/webhook.js +10 -11
  177. package/esm/models/webhook.js.map +1 -1
  178. package/esm/sdk/form-submissions.d.ts +20 -0
  179. package/esm/sdk/form-submissions.d.ts.map +1 -0
  180. package/esm/sdk/form-submissions.js +26 -0
  181. package/esm/sdk/form-submissions.js.map +1 -0
  182. package/esm/sdk/forms-and-agreements.d.ts +17 -0
  183. package/esm/sdk/forms-and-agreements.d.ts.map +1 -0
  184. package/esm/sdk/forms-and-agreements.js +23 -0
  185. package/esm/sdk/forms-and-agreements.js.map +1 -0
  186. package/esm/sdk/forms.d.ts +17 -0
  187. package/esm/sdk/forms.d.ts.map +1 -0
  188. package/esm/sdk/forms.js +23 -0
  189. package/esm/sdk/forms.js.map +1 -0
  190. package/esm/sdk/invoices.d.ts +1 -1
  191. package/esm/sdk/invoices.js +1 -1
  192. package/esm/sdk/milestones.d.ts +1 -1
  193. package/esm/sdk/milestones.js +1 -1
  194. package/esm/sdk/sdk.d.ts +9 -6
  195. package/esm/sdk/sdk.d.ts.map +1 -1
  196. package/esm/sdk/sdk.js +15 -10
  197. package/esm/sdk/sdk.js.map +1 -1
  198. package/jsr.json +1 -1
  199. package/package.json +1 -1
  200. package/src/funcs/catalog-items-list.ts +1 -0
  201. package/src/funcs/{proposals-delete.ts → form-submissions-get.ts} +16 -14
  202. package/src/funcs/form-submissions-list.ts +284 -0
  203. package/src/funcs/{proposals-get.ts → forms-and-agreements-get.ts} +13 -12
  204. package/src/funcs/{proposals-list.ts → forms-and-agreements-list.ts} +15 -15
  205. package/src/funcs/{inquiries-get.ts → forms-get.ts} +13 -13
  206. package/src/funcs/{inquiries-list.ts → forms-list.ts} +17 -22
  207. package/src/funcs/invoices-create.ts +1 -1
  208. package/src/funcs/invoices-list.ts +1 -0
  209. package/src/funcs/milestones-create.ts +1 -1
  210. package/src/hooks/types.ts +1 -0
  211. package/src/lib/config.ts +3 -3
  212. package/src/lib/sdks.ts +13 -4
  213. package/src/models/api-error.ts +1 -0
  214. package/src/models/catalog-item.ts +28 -0
  215. package/src/models/client-create.ts +5 -1
  216. package/src/models/client-document-list.ts +40 -0
  217. package/src/models/client-document.ts +114 -0
  218. package/src/models/client-update.ts +5 -1
  219. package/src/models/client.ts +5 -1
  220. package/src/models/contact.ts +2 -2
  221. package/src/models/contract-create.ts +0 -6
  222. package/src/models/contract.ts +0 -5
  223. package/src/models/{inquiry-list.ts → form-list.ts} +9 -9
  224. package/src/models/form-submission-answer.ts +35 -0
  225. package/src/models/form-submission-list.ts +40 -0
  226. package/src/models/form-submission.ts +99 -0
  227. package/src/models/form.ts +67 -0
  228. package/src/models/index.ts +7 -8
  229. package/src/models/invoice.ts +5 -1
  230. package/src/models/milestone-create.ts +1 -1
  231. package/src/models/milestone.ts +1 -1
  232. package/src/models/operations/get-client-document.ts +61 -0
  233. package/src/models/operations/get-form-submission.ts +61 -0
  234. package/src/models/operations/get-form.ts +55 -0
  235. package/src/models/operations/index.ts +6 -10
  236. package/src/models/operations/list-catalog-items.ts +13 -0
  237. package/src/models/operations/list-client-documents.ts +132 -0
  238. package/src/models/operations/list-clients.ts +5 -1
  239. package/src/models/operations/list-form-submissions.ts +142 -0
  240. package/src/models/operations/list-forms.ts +112 -0
  241. package/src/models/operations/list-invoices.ts +23 -1
  242. package/src/models/operations/list-milestones.ts +1 -1
  243. package/src/models/operations/list-payments.ts +7 -5
  244. package/src/models/operations/list-webhooks.ts +10 -11
  245. package/src/models/webhook-create.ts +10 -11
  246. package/src/models/webhook-update.ts +10 -11
  247. package/src/models/webhook.ts +10 -11
  248. package/src/sdk/form-submissions.ts +50 -0
  249. package/src/sdk/forms-and-agreements.ts +47 -0
  250. package/src/sdk/forms.ts +45 -0
  251. package/src/sdk/invoices.ts +1 -1
  252. package/src/sdk/milestones.ts +1 -1
  253. package/src/sdk/sdk.ts +18 -12
  254. package/esm/funcs/inquiries-create.d.ts +0 -19
  255. package/esm/funcs/inquiries-create.d.ts.map +0 -1
  256. package/esm/funcs/inquiries-create.js +0 -96
  257. package/esm/funcs/inquiries-create.js.map +0 -1
  258. package/esm/funcs/inquiries-delete.d.ts.map +0 -1
  259. package/esm/funcs/inquiries-delete.js.map +0 -1
  260. package/esm/funcs/inquiries-get.d.ts.map +0 -1
  261. package/esm/funcs/inquiries-get.js.map +0 -1
  262. package/esm/funcs/inquiries-list.d.ts.map +0 -1
  263. package/esm/funcs/inquiries-list.js.map +0 -1
  264. package/esm/funcs/inquiries-update.d.ts +0 -19
  265. package/esm/funcs/inquiries-update.d.ts.map +0 -1
  266. package/esm/funcs/inquiries-update.js +0 -111
  267. package/esm/funcs/inquiries-update.js.map +0 -1
  268. package/esm/funcs/proposals-create.d.ts +0 -19
  269. package/esm/funcs/proposals-create.d.ts.map +0 -1
  270. package/esm/funcs/proposals-create.js +0 -96
  271. package/esm/funcs/proposals-create.js.map +0 -1
  272. package/esm/funcs/proposals-delete.d.ts +0 -15
  273. package/esm/funcs/proposals-delete.d.ts.map +0 -1
  274. package/esm/funcs/proposals-delete.js +0 -106
  275. package/esm/funcs/proposals-delete.js.map +0 -1
  276. package/esm/funcs/proposals-get.d.ts.map +0 -1
  277. package/esm/funcs/proposals-get.js.map +0 -1
  278. package/esm/funcs/proposals-list.d.ts.map +0 -1
  279. package/esm/funcs/proposals-list.js.map +0 -1
  280. package/esm/funcs/proposals-update.d.ts +0 -19
  281. package/esm/funcs/proposals-update.d.ts.map +0 -1
  282. package/esm/funcs/proposals-update.js +0 -111
  283. package/esm/funcs/proposals-update.js.map +0 -1
  284. package/esm/models/inquiry-create.d.ts +0 -45
  285. package/esm/models/inquiry-create.d.ts.map +0 -1
  286. package/esm/models/inquiry-create.js +0 -28
  287. package/esm/models/inquiry-create.js.map +0 -1
  288. package/esm/models/inquiry-list.d.ts +0 -13
  289. package/esm/models/inquiry-list.d.ts.map +0 -1
  290. package/esm/models/inquiry-list.js +0 -17
  291. package/esm/models/inquiry-list.js.map +0 -1
  292. package/esm/models/inquiry-update.d.ts +0 -45
  293. package/esm/models/inquiry-update.d.ts.map +0 -1
  294. package/esm/models/inquiry-update.js +0 -29
  295. package/esm/models/inquiry-update.js.map +0 -1
  296. package/esm/models/inquiry.d.ts +0 -78
  297. package/esm/models/inquiry.d.ts.map +0 -1
  298. package/esm/models/inquiry.js +0 -51
  299. package/esm/models/inquiry.js.map +0 -1
  300. package/esm/models/operations/create-inquiry.d.ts +0 -30
  301. package/esm/models/operations/create-inquiry.d.ts.map +0 -1
  302. package/esm/models/operations/create-inquiry.js +0 -27
  303. package/esm/models/operations/create-inquiry.js.map +0 -1
  304. package/esm/models/operations/create-proposal.d.ts +0 -30
  305. package/esm/models/operations/create-proposal.d.ts.map +0 -1
  306. package/esm/models/operations/create-proposal.js +0 -27
  307. package/esm/models/operations/create-proposal.js.map +0 -1
  308. package/esm/models/operations/delete-inquiry.d.ts +0 -27
  309. package/esm/models/operations/delete-inquiry.d.ts.map +0 -1
  310. package/esm/models/operations/delete-inquiry.js +0 -20
  311. package/esm/models/operations/delete-inquiry.js.map +0 -1
  312. package/esm/models/operations/delete-proposal.d.ts +0 -27
  313. package/esm/models/operations/delete-proposal.d.ts.map +0 -1
  314. package/esm/models/operations/delete-proposal.js +0 -20
  315. package/esm/models/operations/delete-proposal.js.map +0 -1
  316. package/esm/models/operations/get-inquiry.d.ts +0 -27
  317. package/esm/models/operations/get-inquiry.d.ts.map +0 -1
  318. package/esm/models/operations/get-inquiry.js +0 -20
  319. package/esm/models/operations/get-inquiry.js.map +0 -1
  320. package/esm/models/operations/get-proposal.d.ts +0 -27
  321. package/esm/models/operations/get-proposal.d.ts.map +0 -1
  322. package/esm/models/operations/get-proposal.js +0 -20
  323. package/esm/models/operations/get-proposal.js.map +0 -1
  324. package/esm/models/operations/list-inquiries.d.ts +0 -60
  325. package/esm/models/operations/list-inquiries.d.ts.map +0 -1
  326. package/esm/models/operations/list-inquiries.js +0 -55
  327. package/esm/models/operations/list-inquiries.js.map +0 -1
  328. package/esm/models/operations/list-proposals.d.ts +0 -56
  329. package/esm/models/operations/list-proposals.d.ts.map +0 -1
  330. package/esm/models/operations/list-proposals.js +0 -48
  331. package/esm/models/operations/list-proposals.js.map +0 -1
  332. package/esm/models/operations/update-inquiry.d.ts +0 -30
  333. package/esm/models/operations/update-inquiry.d.ts.map +0 -1
  334. package/esm/models/operations/update-inquiry.js +0 -22
  335. package/esm/models/operations/update-inquiry.js.map +0 -1
  336. package/esm/models/operations/update-proposal.d.ts +0 -30
  337. package/esm/models/operations/update-proposal.d.ts.map +0 -1
  338. package/esm/models/operations/update-proposal.js +0 -22
  339. package/esm/models/operations/update-proposal.js.map +0 -1
  340. package/esm/models/proposal-create.d.ts +0 -45
  341. package/esm/models/proposal-create.d.ts.map +0 -1
  342. package/esm/models/proposal-create.js +0 -26
  343. package/esm/models/proposal-create.js.map +0 -1
  344. package/esm/models/proposal-list.d.ts +0 -13
  345. package/esm/models/proposal-list.d.ts.map +0 -1
  346. package/esm/models/proposal-list.js +0 -16
  347. package/esm/models/proposal-list.js.map +0 -1
  348. package/esm/models/proposal-update.d.ts +0 -43
  349. package/esm/models/proposal-update.d.ts.map +0 -1
  350. package/esm/models/proposal-update.js +0 -27
  351. package/esm/models/proposal-update.js.map +0 -1
  352. package/esm/models/proposal.d.ts +0 -70
  353. package/esm/models/proposal.d.ts.map +0 -1
  354. package/esm/models/proposal.js +0 -52
  355. package/esm/models/proposal.js.map +0 -1
  356. package/esm/sdk/inquiries.d.ts +0 -35
  357. package/esm/sdk/inquiries.d.ts.map +0 -1
  358. package/esm/sdk/inquiries.js +0 -50
  359. package/esm/sdk/inquiries.js.map +0 -1
  360. package/esm/sdk/proposals.d.ts +0 -35
  361. package/esm/sdk/proposals.d.ts.map +0 -1
  362. package/esm/sdk/proposals.js +0 -50
  363. package/esm/sdk/proposals.js.map +0 -1
  364. package/src/funcs/inquiries-create.ts +0 -195
  365. package/src/funcs/inquiries-delete.ts +0 -201
  366. package/src/funcs/inquiries-update.ts +0 -206
  367. package/src/funcs/proposals-create.ts +0 -195
  368. package/src/funcs/proposals-update.ts +0 -206
  369. package/src/models/inquiry-create.ts +0 -72
  370. package/src/models/inquiry-update.ts +0 -80
  371. package/src/models/inquiry.ts +0 -123
  372. package/src/models/operations/create-inquiry.ts +0 -73
  373. package/src/models/operations/create-proposal.ts +0 -73
  374. package/src/models/operations/delete-inquiry.ts +0 -61
  375. package/src/models/operations/delete-proposal.ts +0 -61
  376. package/src/models/operations/get-inquiry.ts +0 -61
  377. package/src/models/operations/get-proposal.ts +0 -61
  378. package/src/models/operations/list-inquiries.ts +0 -130
  379. package/src/models/operations/list-proposals.ts +0 -123
  380. package/src/models/operations/update-inquiry.ts +0 -65
  381. package/src/models/operations/update-proposal.ts +0 -65
  382. package/src/models/proposal-create.ts +0 -86
  383. package/src/models/proposal-list.ts +0 -35
  384. package/src/models/proposal-update.ts +0 -84
  385. package/src/models/proposal.ts +0 -120
  386. package/src/sdk/inquiries.ts +0 -102
  387. package/src/sdk/proposals.ts +0 -102
package/src/lib/config.ts CHANGED
@@ -61,7 +61,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
61
61
  export const SDK_METADATA = {
62
62
  language: "typescript",
63
63
  openapiDocVersion: "1.0.0",
64
- sdkVersion: "0.3.0",
65
- genVersion: "2.885.1",
66
- userAgent: "speakeasy-sdk/typescript 0.3.0 2.885.1 1.0.0 @clientcasa/sdk",
64
+ sdkVersion: "0.4.1",
65
+ genVersion: "2.900.0",
66
+ userAgent: "speakeasy-sdk/typescript 0.4.1 2.900.0 1.0.0 @clientcasa/sdk",
67
67
  } as const;
package/src/lib/sdks.ts CHANGED
@@ -24,6 +24,7 @@ import {
24
24
  matchContentType,
25
25
  } from "./http.js";
26
26
  import { Logger } from "./logger.js";
27
+ import { combineSignals } from "./primitives.js";
27
28
  import { retry, RetryConfig } from "./retries.js";
28
29
  import { SecurityState } from "./security.js";
29
30
 
@@ -197,9 +198,8 @@ export class ClientSDK {
197
198
  ...options?.fetchOptions,
198
199
  ...options,
199
200
  };
200
- if (!fetchOptions?.signal && conf.timeoutMs && conf.timeoutMs > 0) {
201
- const timeoutSignal = AbortSignal.timeout(conf.timeoutMs);
202
- fetchOptions.signal = timeoutSignal;
201
+ if (!fetchOptions?.signal && conf.timeoutMs != null && conf.timeoutMs > 0) {
202
+ context.timeoutMs = conf.timeoutMs;
203
203
  }
204
204
 
205
205
  if (conf.body instanceof ReadableStream) {
@@ -246,10 +246,19 @@ export class ClientSDK {
246
246
  >
247
247
  > {
248
248
  const { context, isErrorStatusCode } = options;
249
+ const timeoutMs = context.timeoutMs;
249
250
 
250
251
  return retry(
251
252
  async () => {
252
- const req = await this.#hooks.beforeRequest(context, request.clone());
253
+ const cloned = request.clone();
254
+ let attempt = cloned;
255
+ if (timeoutMs != null && timeoutMs > 0) {
256
+ const timeoutSignal = AbortSignal.timeout(timeoutMs);
257
+ const combined = combineSignals(cloned.signal, timeoutSignal)
258
+ ?? timeoutSignal;
259
+ attempt = new Request(cloned, { signal: combined });
260
+ }
261
+ const req = await this.#hooks.beforeRequest(context, attempt);
253
262
  await logRequest(this.#logger, req).catch((e) =>
254
263
  this.#logger?.log("Failed to log request:", e)
255
264
  );
@@ -17,6 +17,7 @@ export const Code = {
17
17
  InvalidRequest: "invalid_request",
18
18
  RateLimited: "rate_limited",
19
19
  Conflict: "conflict",
20
+ Gone: "gone",
20
21
  InternalError: "internal_error",
21
22
  } as const;
22
23
  export type Code = OpenEnum<typeof Code>;
@@ -40,6 +40,18 @@ export const CatalogItemPricingMode = {
40
40
  } as const;
41
41
  export type CatalogItemPricingMode = OpenEnum<typeof CatalogItemPricingMode>;
42
42
 
43
+ export const Composition = {
44
+ Atom: "atom",
45
+ Bundle: "bundle",
46
+ } as const;
47
+ export type Composition = OpenEnum<typeof Composition>;
48
+
49
+ export const BundlePriceMode = {
50
+ Sum: "sum",
51
+ Fixed: "fixed",
52
+ } as const;
53
+ export type BundlePriceMode = OpenEnum<typeof BundlePriceMode>;
54
+
43
55
  export const CatalogItemStatus = {
44
56
  Active: "active",
45
57
  Paused: "paused",
@@ -61,6 +73,9 @@ export type CatalogItem = {
61
73
  defaultFrequency: CatalogItemDefaultFrequency;
62
74
  type: CatalogItemType;
63
75
  pricingMode: CatalogItemPricingMode;
76
+ composition: Composition;
77
+ bundlePriceMode: BundlePriceMode | null;
78
+ bundleFixedPrice: number | null;
64
79
  /**
65
80
  * UUID v4
66
81
  */
@@ -104,6 +119,16 @@ export const CatalogItemPricingMode$inboundSchema: z.ZodMiniType<
104
119
  unknown
105
120
  > = openEnums.inboundSchema(CatalogItemPricingMode);
106
121
 
122
+ /** @internal */
123
+ export const Composition$inboundSchema: z.ZodMiniType<Composition, unknown> =
124
+ openEnums.inboundSchema(Composition);
125
+
126
+ /** @internal */
127
+ export const BundlePriceMode$inboundSchema: z.ZodMiniType<
128
+ BundlePriceMode,
129
+ unknown
130
+ > = openEnums.inboundSchema(BundlePriceMode);
131
+
107
132
  /** @internal */
108
133
  export const CatalogItemStatus$inboundSchema: z.ZodMiniType<
109
134
  CatalogItemStatus,
@@ -123,6 +148,9 @@ export const CatalogItem$inboundSchema: z.ZodMiniType<CatalogItem, unknown> = z
123
148
  defaultFrequency: CatalogItemDefaultFrequency$inboundSchema,
124
149
  type: CatalogItemType$inboundSchema,
125
150
  pricingMode: CatalogItemPricingMode$inboundSchema,
151
+ composition: Composition$inboundSchema,
152
+ bundlePriceMode: types.nullable(BundlePriceMode$inboundSchema),
153
+ bundleFixedPrice: types.nullable(types.number()),
126
154
  taxCategoryId: types.nullable(types.string()),
127
155
  status: CatalogItemStatus$inboundSchema,
128
156
  clientId: types.nullable(types.string()),
@@ -6,9 +6,13 @@ import * as z from "zod/v4-mini";
6
6
  import { ClosedEnum } from "../types/enums.js";
7
7
 
8
8
  export const ClientCreateStatus = {
9
- Prospect: "prospect",
9
+ New: "new",
10
+ Contacted: "contacted",
11
+ Qualified: "qualified",
10
12
  Active: "active",
11
13
  Inactive: "inactive",
14
+ Declined: "declined",
15
+ Spam: "spam",
12
16
  } as const;
13
17
  export type ClientCreateStatus = ClosedEnum<typeof ClientCreateStatus>;
14
18
 
@@ -0,0 +1,40 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v4-mini";
6
+ import { safeParse } from "../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../types/fp.js";
8
+ import {
9
+ ClientDocument,
10
+ ClientDocument$inboundSchema,
11
+ } from "./client-document.js";
12
+ import { SDKValidationError } from "./errors/sdk-validation-error.js";
13
+ import {
14
+ PaginationMeta,
15
+ PaginationMeta$inboundSchema,
16
+ } from "./pagination-meta.js";
17
+
18
+ export type ClientDocumentList = {
19
+ data: Array<ClientDocument>;
20
+ pagination: PaginationMeta;
21
+ };
22
+
23
+ /** @internal */
24
+ export const ClientDocumentList$inboundSchema: z.ZodMiniType<
25
+ ClientDocumentList,
26
+ unknown
27
+ > = z.object({
28
+ data: z.array(ClientDocument$inboundSchema),
29
+ pagination: PaginationMeta$inboundSchema,
30
+ });
31
+
32
+ export function clientDocumentListFromJSON(
33
+ jsonString: string,
34
+ ): SafeParseResult<ClientDocumentList, SDKValidationError> {
35
+ return safeParse(
36
+ jsonString,
37
+ (x) => ClientDocumentList$inboundSchema.parse(JSON.parse(x)),
38
+ `Failed to parse 'ClientDocumentList' from JSON`,
39
+ );
40
+ }
@@ -0,0 +1,114 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v4-mini";
6
+ import { safeParse } from "../lib/schemas.js";
7
+ import * as openEnums from "../types/enums.js";
8
+ import { ClosedEnum, OpenEnum } from "../types/enums.js";
9
+ import { Result as SafeParseResult } from "../types/fp.js";
10
+ import * as types from "../types/primitives.js";
11
+ import { SDKValidationError } from "./errors/sdk-validation-error.js";
12
+
13
+ export const ClientDocumentKind = {
14
+ SmartFile: "smart-file",
15
+ } as const;
16
+ export type ClientDocumentKind = ClosedEnum<typeof ClientDocumentKind>;
17
+
18
+ export const ClientDocumentStatus = {
19
+ Draft: "draft",
20
+ Sent: "sent",
21
+ Viewed: "viewed",
22
+ InProgress: "in_progress",
23
+ Accepted: "accepted",
24
+ Completed: "completed",
25
+ Expired: "expired",
26
+ Void: "void",
27
+ } as const;
28
+ export type ClientDocumentStatus = OpenEnum<typeof ClientDocumentStatus>;
29
+
30
+ export type ClientDocument = {
31
+ /**
32
+ * UUID v4
33
+ */
34
+ id: string;
35
+ kind: ClientDocumentKind;
36
+ title: string | null;
37
+ status: ClientDocumentStatus;
38
+ /**
39
+ * UUID v4
40
+ */
41
+ contactId: string | null;
42
+ /**
43
+ * UUID v4
44
+ */
45
+ clientId: string | null;
46
+ /**
47
+ * UUID v4
48
+ */
49
+ projectId: string | null;
50
+ /**
51
+ * UUID v4
52
+ */
53
+ engagementProjectId: string | null;
54
+ isTemplate: boolean;
55
+ clientUrl: string | null;
56
+ /**
57
+ * ISO 8601 timestamp (UTC)
58
+ */
59
+ quoteConvertedAt: Date | null;
60
+ /**
61
+ * ISO 8601 timestamp (UTC)
62
+ */
63
+ expiresAt: Date | null;
64
+ /**
65
+ * ISO 8601 timestamp (UTC)
66
+ */
67
+ createdAt: Date;
68
+ /**
69
+ * ISO 8601 timestamp (UTC)
70
+ */
71
+ updatedAt: Date;
72
+ };
73
+
74
+ /** @internal */
75
+ export const ClientDocumentKind$inboundSchema: z.ZodMiniEnum<
76
+ typeof ClientDocumentKind
77
+ > = z.enum(ClientDocumentKind);
78
+
79
+ /** @internal */
80
+ export const ClientDocumentStatus$inboundSchema: z.ZodMiniType<
81
+ ClientDocumentStatus,
82
+ unknown
83
+ > = openEnums.inboundSchema(ClientDocumentStatus);
84
+
85
+ /** @internal */
86
+ export const ClientDocument$inboundSchema: z.ZodMiniType<
87
+ ClientDocument,
88
+ unknown
89
+ > = z.object({
90
+ id: types.string(),
91
+ kind: ClientDocumentKind$inboundSchema,
92
+ title: types.nullable(types.string()),
93
+ status: ClientDocumentStatus$inboundSchema,
94
+ contactId: types.nullable(types.string()),
95
+ clientId: types.nullable(types.string()),
96
+ projectId: types.nullable(types.string()),
97
+ engagementProjectId: types.nullable(types.string()),
98
+ isTemplate: types.boolean(),
99
+ clientUrl: types.nullable(types.string()),
100
+ quoteConvertedAt: types.nullable(types.date()),
101
+ expiresAt: types.nullable(types.date()),
102
+ createdAt: types.date(),
103
+ updatedAt: types.date(),
104
+ });
105
+
106
+ export function clientDocumentFromJSON(
107
+ jsonString: string,
108
+ ): SafeParseResult<ClientDocument, SDKValidationError> {
109
+ return safeParse(
110
+ jsonString,
111
+ (x) => ClientDocument$inboundSchema.parse(JSON.parse(x)),
112
+ `Failed to parse 'ClientDocument' from JSON`,
113
+ );
114
+ }
@@ -6,9 +6,13 @@ import * as z from "zod/v4-mini";
6
6
  import { ClosedEnum } from "../types/enums.js";
7
7
 
8
8
  export const ClientUpdateStatus = {
9
- Prospect: "prospect",
9
+ New: "new",
10
+ Contacted: "contacted",
11
+ Qualified: "qualified",
10
12
  Active: "active",
11
13
  Inactive: "inactive",
14
+ Declined: "declined",
15
+ Spam: "spam",
12
16
  } as const;
13
17
  export type ClientUpdateStatus = ClosedEnum<typeof ClientUpdateStatus>;
14
18
 
@@ -11,9 +11,13 @@ import * as types from "../types/primitives.js";
11
11
  import { SDKValidationError } from "./errors/sdk-validation-error.js";
12
12
 
13
13
  export const ClientStatus = {
14
- Prospect: "prospect",
14
+ New: "new",
15
+ Contacted: "contacted",
16
+ Qualified: "qualified",
15
17
  Active: "active",
16
18
  Inactive: "inactive",
19
+ Declined: "declined",
20
+ Spam: "spam",
17
21
  } as const;
18
22
  export type ClientStatus = OpenEnum<typeof ClientStatus>;
19
23
 
@@ -35,7 +35,7 @@ export type Contact = {
35
35
  /**
36
36
  * UUID v4
37
37
  */
38
- inquiryId: string | null;
38
+ sourceSubmissionId: string | null;
39
39
  /**
40
40
  * ISO 8601 timestamp (UTC)
41
41
  */
@@ -60,7 +60,7 @@ export const Contact$inboundSchema: z.ZodMiniType<Contact, unknown> = z.object({
60
60
  role: ContactRole$inboundSchema,
61
61
  isPrimary: types.boolean(),
62
62
  clientId: types.nullable(types.string()),
63
- inquiryId: types.nullable(types.string()),
63
+ sourceSubmissionId: types.nullable(types.string()),
64
64
  createdAt: types.date(),
65
65
  updatedAt: types.date(),
66
66
  });
@@ -14,10 +14,6 @@ export type ContractCreate = {
14
14
  * UUID v4
15
15
  */
16
16
  billingContactId?: string | undefined;
17
- /**
18
- * UUID v4
19
- */
20
- proposalId?: string | undefined;
21
17
  /**
22
18
  * UUID v4
23
19
  */
@@ -37,7 +33,6 @@ export type ContractCreate$Outbound = {
37
33
  title: string;
38
34
  clientId: string;
39
35
  billingContactId?: string | undefined;
40
- proposalId?: string | undefined;
41
36
  projectId?: string | undefined;
42
37
  sourceTemplateId?: string | undefined;
43
38
  issueDate?: string | undefined;
@@ -54,7 +49,6 @@ export const ContractCreate$outboundSchema: z.ZodMiniType<
54
49
  title: z.string(),
55
50
  clientId: z.string(),
56
51
  billingContactId: z.optional(z.string()),
57
- proposalId: z.optional(z.string()),
58
52
  projectId: z.optional(z.string()),
59
53
  sourceTemplateId: z.optional(z.string()),
60
54
  issueDate: z.optional(
@@ -73,10 +73,6 @@ export type Contract = {
73
73
  * UUID v4
74
74
  */
75
75
  billingContactId: string | null;
76
- /**
77
- * UUID v4
78
- */
79
- proposalId: string | null;
80
76
  /**
81
77
  * UUID v4
82
78
  */
@@ -173,7 +169,6 @@ export const Contract$inboundSchema: z.ZodMiniType<Contract, unknown> = z
173
169
  title: types.string(),
174
170
  clientId: types.string(),
175
171
  billingContactId: types.nullable(types.string()),
176
- proposalId: types.nullable(types.string()),
177
172
  projectId: types.nullable(types.string()),
178
173
  sourceTemplateId: types.nullable(types.string()),
179
174
  status: ContractStatus$inboundSchema,
@@ -6,30 +6,30 @@ import * as z from "zod/v4-mini";
6
6
  import { safeParse } from "../lib/schemas.js";
7
7
  import { Result as SafeParseResult } from "../types/fp.js";
8
8
  import { SDKValidationError } from "./errors/sdk-validation-error.js";
9
- import { Inquiry, Inquiry$inboundSchema } from "./inquiry.js";
9
+ import { Form, Form$inboundSchema } from "./form.js";
10
10
  import {
11
11
  PaginationMeta,
12
12
  PaginationMeta$inboundSchema,
13
13
  } from "./pagination-meta.js";
14
14
 
15
- export type InquiryList = {
16
- data: Array<Inquiry>;
15
+ export type FormList = {
16
+ data: Array<Form>;
17
17
  pagination: PaginationMeta;
18
18
  };
19
19
 
20
20
  /** @internal */
21
- export const InquiryList$inboundSchema: z.ZodMiniType<InquiryList, unknown> = z
21
+ export const FormList$inboundSchema: z.ZodMiniType<FormList, unknown> = z
22
22
  .object({
23
- data: z.array(Inquiry$inboundSchema),
23
+ data: z.array(Form$inboundSchema),
24
24
  pagination: PaginationMeta$inboundSchema,
25
25
  });
26
26
 
27
- export function inquiryListFromJSON(
27
+ export function formListFromJSON(
28
28
  jsonString: string,
29
- ): SafeParseResult<InquiryList, SDKValidationError> {
29
+ ): SafeParseResult<FormList, SDKValidationError> {
30
30
  return safeParse(
31
31
  jsonString,
32
- (x) => InquiryList$inboundSchema.parse(JSON.parse(x)),
33
- `Failed to parse 'InquiryList' from JSON`,
32
+ (x) => FormList$inboundSchema.parse(JSON.parse(x)),
33
+ `Failed to parse 'FormList' from JSON`,
34
34
  );
35
35
  }
@@ -0,0 +1,35 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v4-mini";
6
+ import { safeParse } from "../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../types/fp.js";
8
+ import * as types from "../types/primitives.js";
9
+ import { SDKValidationError } from "./errors/sdk-validation-error.js";
10
+
11
+ export type FormSubmissionAnswer = {
12
+ fieldId: string;
13
+ question: string;
14
+ answer: string;
15
+ };
16
+
17
+ /** @internal */
18
+ export const FormSubmissionAnswer$inboundSchema: z.ZodMiniType<
19
+ FormSubmissionAnswer,
20
+ unknown
21
+ > = z.object({
22
+ fieldId: types.string(),
23
+ question: types.string(),
24
+ answer: types.string(),
25
+ });
26
+
27
+ export function formSubmissionAnswerFromJSON(
28
+ jsonString: string,
29
+ ): SafeParseResult<FormSubmissionAnswer, SDKValidationError> {
30
+ return safeParse(
31
+ jsonString,
32
+ (x) => FormSubmissionAnswer$inboundSchema.parse(JSON.parse(x)),
33
+ `Failed to parse 'FormSubmissionAnswer' from JSON`,
34
+ );
35
+ }
@@ -0,0 +1,40 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v4-mini";
6
+ import { safeParse } from "../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../types/fp.js";
8
+ import { SDKValidationError } from "./errors/sdk-validation-error.js";
9
+ import {
10
+ FormSubmission,
11
+ FormSubmission$inboundSchema,
12
+ } from "./form-submission.js";
13
+ import {
14
+ PaginationMeta,
15
+ PaginationMeta$inboundSchema,
16
+ } from "./pagination-meta.js";
17
+
18
+ export type FormSubmissionList = {
19
+ data: Array<FormSubmission>;
20
+ pagination: PaginationMeta;
21
+ };
22
+
23
+ /** @internal */
24
+ export const FormSubmissionList$inboundSchema: z.ZodMiniType<
25
+ FormSubmissionList,
26
+ unknown
27
+ > = z.object({
28
+ data: z.array(FormSubmission$inboundSchema),
29
+ pagination: PaginationMeta$inboundSchema,
30
+ });
31
+
32
+ export function formSubmissionListFromJSON(
33
+ jsonString: string,
34
+ ): SafeParseResult<FormSubmissionList, SDKValidationError> {
35
+ return safeParse(
36
+ jsonString,
37
+ (x) => FormSubmissionList$inboundSchema.parse(JSON.parse(x)),
38
+ `Failed to parse 'FormSubmissionList' from JSON`,
39
+ );
40
+ }
@@ -0,0 +1,99 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v4-mini";
6
+ import { safeParse } from "../lib/schemas.js";
7
+ import * as openEnums from "../types/enums.js";
8
+ import { OpenEnum } from "../types/enums.js";
9
+ import { Result as SafeParseResult } from "../types/fp.js";
10
+ import * as types from "../types/primitives.js";
11
+ import { SDKValidationError } from "./errors/sdk-validation-error.js";
12
+ import {
13
+ FormSubmissionAnswer,
14
+ FormSubmissionAnswer$inboundSchema,
15
+ } from "./form-submission-answer.js";
16
+
17
+ export const FormSubmissionKind = {
18
+ Inquiry: "inquiry",
19
+ Questionnaire: "questionnaire",
20
+ } as const;
21
+ export type FormSubmissionKind = OpenEnum<typeof FormSubmissionKind>;
22
+
23
+ export const FormSubmissionStatus = {
24
+ InProgress: "in_progress",
25
+ Submitted: "submitted",
26
+ } as const;
27
+ export type FormSubmissionStatus = OpenEnum<typeof FormSubmissionStatus>;
28
+
29
+ export type FormSubmission = {
30
+ /**
31
+ * UUID v4
32
+ */
33
+ id: string;
34
+ /**
35
+ * UUID v4
36
+ */
37
+ formId: string;
38
+ kind: FormSubmissionKind | null;
39
+ status: FormSubmissionStatus;
40
+ /**
41
+ * UUID v4
42
+ */
43
+ contactId: string | null;
44
+ /**
45
+ * UUID v4
46
+ */
47
+ clientId: string | null;
48
+ source: string | null;
49
+ submittedAt: Date | null;
50
+ answers: Array<FormSubmissionAnswer> | null;
51
+ /**
52
+ * ISO 8601 timestamp (UTC)
53
+ */
54
+ createdAt: Date;
55
+ /**
56
+ * ISO 8601 timestamp (UTC)
57
+ */
58
+ updatedAt: Date;
59
+ };
60
+
61
+ /** @internal */
62
+ export const FormSubmissionKind$inboundSchema: z.ZodMiniType<
63
+ FormSubmissionKind,
64
+ unknown
65
+ > = openEnums.inboundSchema(FormSubmissionKind);
66
+
67
+ /** @internal */
68
+ export const FormSubmissionStatus$inboundSchema: z.ZodMiniType<
69
+ FormSubmissionStatus,
70
+ unknown
71
+ > = openEnums.inboundSchema(FormSubmissionStatus);
72
+
73
+ /** @internal */
74
+ export const FormSubmission$inboundSchema: z.ZodMiniType<
75
+ FormSubmission,
76
+ unknown
77
+ > = z.object({
78
+ id: types.string(),
79
+ formId: types.string(),
80
+ kind: types.nullable(FormSubmissionKind$inboundSchema),
81
+ status: FormSubmissionStatus$inboundSchema,
82
+ contactId: types.nullable(types.string()),
83
+ clientId: types.nullable(types.string()),
84
+ source: types.nullable(types.string()),
85
+ submittedAt: types.nullable(types.date()),
86
+ answers: types.nullable(z.array(FormSubmissionAnswer$inboundSchema)),
87
+ createdAt: types.date(),
88
+ updatedAt: types.date(),
89
+ });
90
+
91
+ export function formSubmissionFromJSON(
92
+ jsonString: string,
93
+ ): SafeParseResult<FormSubmission, SDKValidationError> {
94
+ return safeParse(
95
+ jsonString,
96
+ (x) => FormSubmission$inboundSchema.parse(JSON.parse(x)),
97
+ `Failed to parse 'FormSubmission' from JSON`,
98
+ );
99
+ }
@@ -0,0 +1,67 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v4-mini";
6
+ import { safeParse } from "../lib/schemas.js";
7
+ import * as openEnums from "../types/enums.js";
8
+ import { OpenEnum } from "../types/enums.js";
9
+ import { Result as SafeParseResult } from "../types/fp.js";
10
+ import * as types from "../types/primitives.js";
11
+ import { SDKValidationError } from "./errors/sdk-validation-error.js";
12
+
13
+ export const FormKind = {
14
+ Inquiry: "inquiry",
15
+ Questionnaire: "questionnaire",
16
+ } as const;
17
+ export type FormKind = OpenEnum<typeof FormKind>;
18
+
19
+ export type Form = {
20
+ /**
21
+ * UUID v4
22
+ */
23
+ id: string;
24
+ name: string;
25
+ title: string | null;
26
+ description: string | null;
27
+ kind: FormKind;
28
+ slug: string | null;
29
+ enabled: boolean;
30
+ isDefault: boolean;
31
+ /**
32
+ * ISO 8601 timestamp (UTC)
33
+ */
34
+ createdAt: Date;
35
+ /**
36
+ * ISO 8601 timestamp (UTC)
37
+ */
38
+ updatedAt: Date;
39
+ };
40
+
41
+ /** @internal */
42
+ export const FormKind$inboundSchema: z.ZodMiniType<FormKind, unknown> =
43
+ openEnums.inboundSchema(FormKind);
44
+
45
+ /** @internal */
46
+ export const Form$inboundSchema: z.ZodMiniType<Form, unknown> = z.object({
47
+ id: types.string(),
48
+ name: types.string(),
49
+ title: types.nullable(types.string()),
50
+ description: types.nullable(types.string()),
51
+ kind: FormKind$inboundSchema,
52
+ slug: types.nullable(types.string()),
53
+ enabled: types.boolean(),
54
+ isDefault: types.boolean(),
55
+ createdAt: types.date(),
56
+ updatedAt: types.date(),
57
+ });
58
+
59
+ export function formFromJSON(
60
+ jsonString: string,
61
+ ): SafeParseResult<Form, SDKValidationError> {
62
+ return safeParse(
63
+ jsonString,
64
+ (x) => Form$inboundSchema.parse(JSON.parse(x)),
65
+ `Failed to parse 'Form' from JSON`,
66
+ );
67
+ }