vanta-auditor-api-sdk 0.1.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 (448) hide show
  1. package/.devcontainer/README.md +30 -0
  2. package/FUNCTIONS.md +104 -0
  3. package/README.md +440 -0
  4. package/RUNTIMES.md +48 -0
  5. package/core.d.ts +10 -0
  6. package/core.d.ts.map +1 -0
  7. package/core.js +17 -0
  8. package/core.js.map +1 -0
  9. package/docs/sdks/auditors/README.md +88 -0
  10. package/docs/sdks/audits/README.md +748 -0
  11. package/docs/sdks/vanta/README.md +7 -0
  12. package/funcs/auditorsCreate.d.ts +15 -0
  13. package/funcs/auditorsCreate.d.ts.map +1 -0
  14. package/funcs/auditorsCreate.js +106 -0
  15. package/funcs/auditorsCreate.js.map +1 -0
  16. package/funcs/auditsCreateCommentForEvidence.d.ts +16 -0
  17. package/funcs/auditsCreateCommentForEvidence.d.ts.map +1 -0
  18. package/funcs/auditsCreateCommentForEvidence.js +117 -0
  19. package/funcs/auditsCreateCommentForEvidence.js.map +1 -0
  20. package/funcs/auditsCreateCustomControl.d.ts +16 -0
  21. package/funcs/auditsCreateCustomControl.d.ts.map +1 -0
  22. package/funcs/auditsCreateCustomControl.js +115 -0
  23. package/funcs/auditsCreateCustomControl.js.map +1 -0
  24. package/funcs/auditsCreateCustomEvidenceRequest.d.ts +16 -0
  25. package/funcs/auditsCreateCustomEvidenceRequest.d.ts.map +1 -0
  26. package/funcs/auditsCreateCustomEvidenceRequest.js +115 -0
  27. package/funcs/auditsCreateCustomEvidenceRequest.js.map +1 -0
  28. package/funcs/auditsGetEvidenceUrls.d.ts +16 -0
  29. package/funcs/auditsGetEvidenceUrls.d.ts.map +1 -0
  30. package/funcs/auditsGetEvidenceUrls.js +121 -0
  31. package/funcs/auditsGetEvidenceUrls.js.map +1 -0
  32. package/funcs/auditsList.d.ts +16 -0
  33. package/funcs/auditsList.d.ts.map +1 -0
  34. package/funcs/auditsList.js +112 -0
  35. package/funcs/auditsList.js.map +1 -0
  36. package/funcs/auditsListComments.d.ts +16 -0
  37. package/funcs/auditsListComments.d.ts.map +1 -0
  38. package/funcs/auditsListComments.js +118 -0
  39. package/funcs/auditsListComments.js.map +1 -0
  40. package/funcs/auditsListControls.d.ts +16 -0
  41. package/funcs/auditsListControls.d.ts.map +1 -0
  42. package/funcs/auditsListControls.js +117 -0
  43. package/funcs/auditsListControls.js.map +1 -0
  44. package/funcs/auditsListEvidence.d.ts +16 -0
  45. package/funcs/auditsListEvidence.d.ts.map +1 -0
  46. package/funcs/auditsListEvidence.js +118 -0
  47. package/funcs/auditsListEvidence.js.map +1 -0
  48. package/funcs/auditsUpdateEvidence.d.ts +16 -0
  49. package/funcs/auditsUpdateEvidence.d.ts.map +1 -0
  50. package/funcs/auditsUpdateEvidence.js +119 -0
  51. package/funcs/auditsUpdateEvidence.js.map +1 -0
  52. package/hooks/hooks.d.ts +24 -0
  53. package/hooks/hooks.d.ts.map +1 -0
  54. package/hooks/hooks.js +86 -0
  55. package/hooks/hooks.js.map +1 -0
  56. package/hooks/index.d.ts +3 -0
  57. package/hooks/index.d.ts.map +1 -0
  58. package/hooks/index.js +22 -0
  59. package/hooks/index.js.map +1 -0
  60. package/hooks/registration.d.ts +3 -0
  61. package/hooks/registration.d.ts.map +1 -0
  62. package/hooks/registration.js +15 -0
  63. package/hooks/registration.js.map +1 -0
  64. package/hooks/types.d.ts +77 -0
  65. package/hooks/types.d.ts.map +1 -0
  66. package/hooks/types.js +6 -0
  67. package/hooks/types.js.map +1 -0
  68. package/index.d.ts +4 -0
  69. package/index.d.ts.map +1 -0
  70. package/index.js +46 -0
  71. package/index.js.map +1 -0
  72. package/lib/base64.d.ts +10 -0
  73. package/lib/base64.d.ts.map +1 -0
  74. package/lib/base64.js +71 -0
  75. package/lib/base64.js.map +1 -0
  76. package/lib/config.d.ts +34 -0
  77. package/lib/config.d.ts.map +1 -0
  78. package/lib/config.js +35 -0
  79. package/lib/config.js.map +1 -0
  80. package/lib/dlv.d.ts +14 -0
  81. package/lib/dlv.d.ts.map +1 -0
  82. package/lib/dlv.js +49 -0
  83. package/lib/dlv.js.map +1 -0
  84. package/lib/encodings.d.ts +51 -0
  85. package/lib/encodings.d.ts.map +1 -0
  86. package/lib/encodings.js +342 -0
  87. package/lib/encodings.js.map +1 -0
  88. package/lib/env.d.ts +15 -0
  89. package/lib/env.d.ts.map +1 -0
  90. package/lib/env.js +65 -0
  91. package/lib/env.js.map +1 -0
  92. package/lib/files.d.ts +8 -0
  93. package/lib/files.d.ts.map +1 -0
  94. package/lib/files.js +36 -0
  95. package/lib/files.js.map +1 -0
  96. package/lib/http.d.ts +67 -0
  97. package/lib/http.d.ts.map +1 -0
  98. package/lib/http.js +217 -0
  99. package/lib/http.js.map +1 -0
  100. package/lib/is-plain-object.d.ts +2 -0
  101. package/lib/is-plain-object.d.ts.map +1 -0
  102. package/lib/is-plain-object.js +41 -0
  103. package/lib/is-plain-object.js.map +1 -0
  104. package/lib/logger.d.ts +6 -0
  105. package/lib/logger.d.ts.map +1 -0
  106. package/lib/logger.js +6 -0
  107. package/lib/logger.js.map +1 -0
  108. package/lib/matchers.d.ts +64 -0
  109. package/lib/matchers.d.ts.map +1 -0
  110. package/lib/matchers.js +204 -0
  111. package/lib/matchers.js.map +1 -0
  112. package/lib/primitives.d.ts +22 -0
  113. package/lib/primitives.d.ts.map +1 -0
  114. package/lib/primitives.js +94 -0
  115. package/lib/primitives.js.map +1 -0
  116. package/lib/retries.d.ts +38 -0
  117. package/lib/retries.d.ts.map +1 -0
  118. package/lib/retries.js +154 -0
  119. package/lib/retries.js.map +1 -0
  120. package/lib/schemas.d.ts +19 -0
  121. package/lib/schemas.d.ts.map +1 -0
  122. package/lib/schemas.js +59 -0
  123. package/lib/schemas.js.map +1 -0
  124. package/lib/sdks.d.ts +60 -0
  125. package/lib/sdks.d.ts.map +1 -0
  126. package/lib/sdks.js +277 -0
  127. package/lib/sdks.js.map +1 -0
  128. package/lib/security.d.ts +82 -0
  129. package/lib/security.d.ts.map +1 -0
  130. package/lib/security.js +139 -0
  131. package/lib/security.js.map +1 -0
  132. package/lib/url.d.ts +5 -0
  133. package/lib/url.d.ts.map +1 -0
  134. package/lib/url.js +25 -0
  135. package/lib/url.js.map +1 -0
  136. package/models/components/addauditorinput.d.ts +42 -0
  137. package/models/components/addauditorinput.d.ts.map +1 -0
  138. package/models/components/addauditorinput.js +73 -0
  139. package/models/components/addauditorinput.js.map +1 -0
  140. package/models/components/addcommentinput.d.ts +42 -0
  141. package/models/components/addcommentinput.d.ts.map +1 -0
  142. package/models/components/addcommentinput.js +73 -0
  143. package/models/components/addcommentinput.js.map +1 -0
  144. package/models/components/audit.d.ts +97 -0
  145. package/models/components/audit.d.ts.map +1 -0
  146. package/models/components/audit.js +96 -0
  147. package/models/components/audit.js.map +1 -0
  148. package/models/components/auditevidencestate.d.ts +40 -0
  149. package/models/components/auditevidencestate.d.ts.map +1 -0
  150. package/models/components/auditevidencestate.js +64 -0
  151. package/models/components/auditevidencestate.js.map +1 -0
  152. package/models/components/auditevidencetype.d.ts +31 -0
  153. package/models/components/auditevidencetype.d.ts.map +1 -0
  154. package/models/components/auditevidencetype.js +61 -0
  155. package/models/components/auditevidencetype.js.map +1 -0
  156. package/models/components/auditevidenceupdateinput.d.ts +60 -0
  157. package/models/components/auditevidenceupdateinput.d.ts.map +1 -0
  158. package/models/components/auditevidenceupdateinput.js +99 -0
  159. package/models/components/auditevidenceupdateinput.js.map +1 -0
  160. package/models/components/auditor.d.ts +49 -0
  161. package/models/components/auditor.d.ts.map +1 -0
  162. package/models/components/auditor.js +77 -0
  163. package/models/components/auditor.js.map +1 -0
  164. package/models/components/auditorcontrol.d.ts +111 -0
  165. package/models/components/auditorcontrol.d.ts.map +1 -0
  166. package/models/components/auditorcontrol.js +118 -0
  167. package/models/components/auditorcontrol.js.map +1 -0
  168. package/models/components/auditorenabledstatetransition.d.ts +34 -0
  169. package/models/components/auditorenabledstatetransition.d.ts.map +1 -0
  170. package/models/components/auditorenabledstatetransition.js +62 -0
  171. package/models/components/auditorenabledstatetransition.js.map +1 -0
  172. package/models/components/comment.d.ts +57 -0
  173. package/models/components/comment.d.ts.map +1 -0
  174. package/models/components/comment.js +79 -0
  175. package/models/components/comment.js.map +1 -0
  176. package/models/components/control.d.ts +106 -0
  177. package/models/components/control.d.ts.map +1 -0
  178. package/models/components/control.js +115 -0
  179. package/models/components/control.js.map +1 -0
  180. package/models/components/controldomain.d.ts +136 -0
  181. package/models/components/controldomain.d.ts.map +1 -0
  182. package/models/components/controldomain.js +96 -0
  183. package/models/components/controldomain.js.map +1 -0
  184. package/models/components/controlsource.d.ts +28 -0
  185. package/models/components/controlsource.d.ts.map +1 -0
  186. package/models/components/controlsource.js +60 -0
  187. package/models/components/controlsource.js.map +1 -0
  188. package/models/components/createcustomcontrolinput.d.ts +105 -0
  189. package/models/components/createcustomcontrolinput.d.ts.map +1 -0
  190. package/models/components/createcustomcontrolinput.js +109 -0
  191. package/models/components/createcustomcontrolinput.js.map +1 -0
  192. package/models/components/createcustomevidencerequestinput.d.ts +52 -0
  193. package/models/components/createcustomevidencerequestinput.d.ts.map +1 -0
  194. package/models/components/createcustomevidencerequestinput.js +80 -0
  195. package/models/components/createcustomevidencerequestinput.js.map +1 -0
  196. package/models/components/customevidencerequest.d.ts +57 -0
  197. package/models/components/customevidencerequest.d.ts.map +1 -0
  198. package/models/components/customevidencerequest.js +82 -0
  199. package/models/components/customevidencerequest.js.map +1 -0
  200. package/models/components/evidence.d.ts +84 -0
  201. package/models/components/evidence.d.ts.map +1 -0
  202. package/models/components/evidence.js +94 -0
  203. package/models/components/evidence.js.map +1 -0
  204. package/models/components/evidencecontrol.d.ts +37 -0
  205. package/models/components/evidencecontrol.d.ts.map +1 -0
  206. package/models/components/evidencecontrol.js +71 -0
  207. package/models/components/evidencecontrol.js.map +1 -0
  208. package/models/components/evidenceurl.d.ts +47 -0
  209. package/models/components/evidenceurl.d.ts.map +1 -0
  210. package/models/components/evidenceurl.js +75 -0
  211. package/models/components/evidenceurl.js.map +1 -0
  212. package/models/components/frameworkid.d.ts +127 -0
  213. package/models/components/frameworkid.d.ts.map +1 -0
  214. package/models/components/frameworkid.js +94 -0
  215. package/models/components/frameworkid.js.map +1 -0
  216. package/models/components/frameworksection.d.ts +53 -0
  217. package/models/components/frameworksection.d.ts.map +1 -0
  218. package/models/components/frameworksection.js +95 -0
  219. package/models/components/frameworksection.js.map +1 -0
  220. package/models/components/index.d.ts +30 -0
  221. package/models/components/index.d.ts.map +1 -0
  222. package/models/components/index.js +49 -0
  223. package/models/components/index.js.map +1 -0
  224. package/models/components/pageinfo.d.ts +50 -0
  225. package/models/components/pageinfo.d.ts.map +1 -0
  226. package/models/components/pageinfo.js +75 -0
  227. package/models/components/pageinfo.js.map +1 -0
  228. package/models/components/paginatedresponseaudit.d.ts +61 -0
  229. package/models/components/paginatedresponseaudit.d.ts.map +1 -0
  230. package/models/components/paginatedresponseaudit.js +100 -0
  231. package/models/components/paginatedresponseaudit.js.map +1 -0
  232. package/models/components/paginatedresponseauditorcontrol.d.ts +61 -0
  233. package/models/components/paginatedresponseauditorcontrol.d.ts.map +1 -0
  234. package/models/components/paginatedresponseauditorcontrol.js +100 -0
  235. package/models/components/paginatedresponseauditorcontrol.js.map +1 -0
  236. package/models/components/paginatedresponsecomment.d.ts +61 -0
  237. package/models/components/paginatedresponsecomment.d.ts.map +1 -0
  238. package/models/components/paginatedresponsecomment.js +100 -0
  239. package/models/components/paginatedresponsecomment.js.map +1 -0
  240. package/models/components/paginatedresponseevidence.d.ts +61 -0
  241. package/models/components/paginatedresponseevidence.d.ts.map +1 -0
  242. package/models/components/paginatedresponseevidence.js +100 -0
  243. package/models/components/paginatedresponseevidence.js.map +1 -0
  244. package/models/components/paginatedresponseevidenceurl.d.ts +61 -0
  245. package/models/components/paginatedresponseevidenceurl.d.ts.map +1 -0
  246. package/models/components/paginatedresponseevidenceurl.js +100 -0
  247. package/models/components/paginatedresponseevidenceurl.js.map +1 -0
  248. package/models/components/recurrenceduration.d.ts +43 -0
  249. package/models/components/recurrenceduration.d.ts.map +1 -0
  250. package/models/components/recurrenceduration.js +65 -0
  251. package/models/components/recurrenceduration.js.map +1 -0
  252. package/models/components/security.d.ts +29 -0
  253. package/models/components/security.d.ts.map +1 -0
  254. package/models/components/security.js +69 -0
  255. package/models/components/security.js.map +1 -0
  256. package/models/errors/apierror.d.ts +8 -0
  257. package/models/errors/apierror.d.ts.map +1 -0
  258. package/models/errors/apierror.js +21 -0
  259. package/models/errors/apierror.js.map +1 -0
  260. package/models/errors/httpclienterrors.d.ts +44 -0
  261. package/models/errors/httpclienterrors.d.ts.map +1 -0
  262. package/models/errors/httpclienterrors.js +78 -0
  263. package/models/errors/httpclienterrors.js.map +1 -0
  264. package/models/errors/index.d.ts +4 -0
  265. package/models/errors/index.d.ts.map +1 -0
  266. package/models/errors/index.js +23 -0
  267. package/models/errors/index.js.map +1 -0
  268. package/models/errors/sdkvalidationerror.d.ts +20 -0
  269. package/models/errors/sdkvalidationerror.d.ts.map +1 -0
  270. package/models/errors/sdkvalidationerror.js +115 -0
  271. package/models/errors/sdkvalidationerror.js.map +1 -0
  272. package/models/operations/createcommentforauditevidence.d.ts +34 -0
  273. package/models/operations/createcommentforauditevidence.d.ts.map +1 -0
  274. package/models/operations/createcommentforauditevidence.js +83 -0
  275. package/models/operations/createcommentforauditevidence.js.map +1 -0
  276. package/models/operations/createcustomcontrol.d.ts +32 -0
  277. package/models/operations/createcustomcontrol.d.ts.map +1 -0
  278. package/models/operations/createcustomcontrol.js +81 -0
  279. package/models/operations/createcustomcontrol.js.map +1 -0
  280. package/models/operations/createcustomevidencerequest.d.ts +32 -0
  281. package/models/operations/createcustomevidencerequest.d.ts.map +1 -0
  282. package/models/operations/createcustomevidencerequest.js +81 -0
  283. package/models/operations/createcustomevidencerequest.js.map +1 -0
  284. package/models/operations/index.d.ts +10 -0
  285. package/models/operations/index.d.ts.map +1 -0
  286. package/models/operations/index.js +29 -0
  287. package/models/operations/index.js.map +1 -0
  288. package/models/operations/listauditcomments.d.ts +38 -0
  289. package/models/operations/listauditcomments.d.ts.map +1 -0
  290. package/models/operations/listauditcomments.js +75 -0
  291. package/models/operations/listauditcomments.js.map +1 -0
  292. package/models/operations/listauditcontrols.d.ts +33 -0
  293. package/models/operations/listauditcontrols.d.ts.map +1 -0
  294. package/models/operations/listauditcontrols.js +73 -0
  295. package/models/operations/listauditcontrols.js.map +1 -0
  296. package/models/operations/listauditevidence.d.ts +38 -0
  297. package/models/operations/listauditevidence.d.ts.map +1 -0
  298. package/models/operations/listauditevidence.js +75 -0
  299. package/models/operations/listauditevidence.js.map +1 -0
  300. package/models/operations/listauditevidenceurls.d.ts +35 -0
  301. package/models/operations/listauditevidenceurls.d.ts.map +1 -0
  302. package/models/operations/listauditevidenceurls.js +75 -0
  303. package/models/operations/listauditevidenceurls.js.map +1 -0
  304. package/models/operations/listaudits.d.ts +36 -0
  305. package/models/operations/listaudits.d.ts.map +1 -0
  306. package/models/operations/listaudits.js +73 -0
  307. package/models/operations/listaudits.js.map +1 -0
  308. package/models/operations/updateauditevidence.d.ts +34 -0
  309. package/models/operations/updateauditevidence.d.ts.map +1 -0
  310. package/models/operations/updateauditevidence.js +83 -0
  311. package/models/operations/updateauditevidence.js.map +1 -0
  312. package/package.json +27 -0
  313. package/sdk/auditors.d.ts +12 -0
  314. package/sdk/auditors.d.ts.map +1 -0
  315. package/sdk/auditors.js +22 -0
  316. package/sdk/auditors.js.map +1 -0
  317. package/sdk/audits.d.ts +69 -0
  318. package/sdk/audits.d.ts.map +1 -0
  319. package/sdk/audits.js +102 -0
  320. package/sdk/audits.js.map +1 -0
  321. package/sdk/index.d.ts +2 -0
  322. package/sdk/index.d.ts.map +1 -0
  323. package/sdk/index.js +21 -0
  324. package/sdk/index.js.map +1 -0
  325. package/sdk/sdk.d.ts +10 -0
  326. package/sdk/sdk.d.ts.map +1 -0
  327. package/sdk/sdk.js +19 -0
  328. package/sdk/sdk.js.map +1 -0
  329. package/src/core.ts +13 -0
  330. package/src/funcs/auditorsCreate.ts +124 -0
  331. package/src/funcs/auditsCreateCommentForEvidence.ts +141 -0
  332. package/src/funcs/auditsCreateCustomControl.ts +137 -0
  333. package/src/funcs/auditsCreateCustomEvidenceRequest.ts +137 -0
  334. package/src/funcs/auditsGetEvidenceUrls.ts +144 -0
  335. package/src/funcs/auditsList.ts +131 -0
  336. package/src/funcs/auditsListComments.ts +138 -0
  337. package/src/funcs/auditsListControls.ts +137 -0
  338. package/src/funcs/auditsListEvidence.ts +138 -0
  339. package/src/funcs/auditsUpdateEvidence.ts +141 -0
  340. package/src/hooks/hooks.ts +132 -0
  341. package/src/hooks/index.ts +6 -0
  342. package/src/hooks/registration.ts +14 -0
  343. package/src/hooks/types.ts +109 -0
  344. package/src/index.ts +7 -0
  345. package/src/lib/base64.ts +37 -0
  346. package/src/lib/config.ts +61 -0
  347. package/src/lib/dlv.ts +53 -0
  348. package/src/lib/encodings.ts +449 -0
  349. package/src/lib/env.ts +41 -0
  350. package/src/lib/files.ts +40 -0
  351. package/src/lib/http.ts +323 -0
  352. package/src/lib/is-plain-object.ts +43 -0
  353. package/src/lib/logger.ts +9 -0
  354. package/src/lib/matchers.ts +322 -0
  355. package/src/lib/primitives.ts +122 -0
  356. package/src/lib/retries.ts +219 -0
  357. package/src/lib/schemas.ts +86 -0
  358. package/src/lib/sdks.ts +397 -0
  359. package/src/lib/security.ts +254 -0
  360. package/src/lib/url.ts +33 -0
  361. package/src/models/components/addauditorinput.ts +81 -0
  362. package/src/models/components/addcommentinput.ts +83 -0
  363. package/src/models/components/audit.ts +167 -0
  364. package/src/models/components/auditevidencestate.ts +37 -0
  365. package/src/models/components/auditevidencetype.ts +34 -0
  366. package/src/models/components/auditevidenceupdateinput.ts +132 -0
  367. package/src/models/components/auditor.ts +87 -0
  368. package/src/models/components/auditorcontrol.ts +194 -0
  369. package/src/models/components/auditorenabledstatetransition.ts +37 -0
  370. package/src/models/components/comment.ts +101 -0
  371. package/src/models/components/control.ts +187 -0
  372. package/src/models/components/controldomain.ts +70 -0
  373. package/src/models/components/controlsource.ts +33 -0
  374. package/src/models/components/createcustomcontrolinput.ts +164 -0
  375. package/src/models/components/createcustomevidencerequestinput.ts +105 -0
  376. package/src/models/components/customevidencerequest.ts +110 -0
  377. package/src/models/components/evidence.ts +158 -0
  378. package/src/models/components/evidencecontrol.ts +74 -0
  379. package/src/models/components/evidenceurl.ts +86 -0
  380. package/src/models/components/frameworkid.ts +64 -0
  381. package/src/models/components/frameworksection.ts +127 -0
  382. package/src/models/components/index.ts +33 -0
  383. package/src/models/components/pageinfo.ts +89 -0
  384. package/src/models/components/paginatedresponseaudit.ts +136 -0
  385. package/src/models/components/paginatedresponseauditorcontrol.ts +151 -0
  386. package/src/models/components/paginatedresponsecomment.ts +145 -0
  387. package/src/models/components/paginatedresponseevidence.ts +145 -0
  388. package/src/models/components/paginatedresponseevidenceurl.ts +150 -0
  389. package/src/models/components/recurrenceduration.ts +38 -0
  390. package/src/models/components/security.ts +62 -0
  391. package/src/models/errors/apierror.ts +27 -0
  392. package/src/models/errors/httpclienterrors.ts +62 -0
  393. package/src/models/errors/index.ts +7 -0
  394. package/src/models/errors/sdkvalidationerror.ts +97 -0
  395. package/src/models/operations/createcommentforauditevidence.ts +89 -0
  396. package/src/models/operations/createcustomcontrol.ts +80 -0
  397. package/src/models/operations/createcustomevidencerequest.ts +87 -0
  398. package/src/models/operations/index.ts +13 -0
  399. package/src/models/operations/listauditcomments.ts +83 -0
  400. package/src/models/operations/listauditcontrols.ts +74 -0
  401. package/src/models/operations/listauditevidence.ts +83 -0
  402. package/src/models/operations/listauditevidenceurls.ts +80 -0
  403. package/src/models/operations/listaudits.ts +79 -0
  404. package/src/models/operations/updateauditevidence.ts +84 -0
  405. package/src/sdk/auditors.ts +27 -0
  406. package/src/sdk/audits.ts +172 -0
  407. package/src/sdk/index.ts +5 -0
  408. package/src/sdk/sdk.ts +19 -0
  409. package/src/types/blobs.ts +31 -0
  410. package/src/types/constdatetime.ts +15 -0
  411. package/src/types/enums.ts +16 -0
  412. package/src/types/fp.ts +50 -0
  413. package/src/types/index.ts +11 -0
  414. package/src/types/operations.ts +105 -0
  415. package/src/types/rfcdate.ts +54 -0
  416. package/src/types/streams.ts +21 -0
  417. package/types/blobs.d.ts +4 -0
  418. package/types/blobs.d.ts.map +1 -0
  419. package/types/blobs.js +62 -0
  420. package/types/blobs.js.map +1 -0
  421. package/types/constdatetime.d.ts +3 -0
  422. package/types/constdatetime.d.ts.map +1 -0
  423. package/types/constdatetime.js +46 -0
  424. package/types/constdatetime.js.map +1 -0
  425. package/types/enums.d.ts +12 -0
  426. package/types/enums.d.ts.map +1 -0
  427. package/types/enums.js +10 -0
  428. package/types/enums.js.map +1 -0
  429. package/types/fp.d.ts +31 -0
  430. package/types/fp.d.ts.map +1 -0
  431. package/types/fp.js +37 -0
  432. package/types/fp.js.map +1 -0
  433. package/types/index.d.ts +8 -0
  434. package/types/index.d.ts.map +1 -0
  435. package/types/index.js +16 -0
  436. package/types/index.js.map +1 -0
  437. package/types/operations.d.ts +27 -0
  438. package/types/operations.d.ts.map +1 -0
  439. package/types/operations.js +83 -0
  440. package/types/operations.js.map +1 -0
  441. package/types/rfcdate.d.ts +21 -0
  442. package/types/rfcdate.d.ts.map +1 -0
  443. package/types/rfcdate.js +46 -0
  444. package/types/rfcdate.js.map +1 -0
  445. package/types/streams.d.ts +2 -0
  446. package/types/streams.d.ts.map +1 -0
  447. package/types/streams.js +18 -0
  448. package/types/streams.js.map +1 -0
@@ -0,0 +1,187 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
+ import {
10
+ ControlSource,
11
+ ControlSource$inboundSchema,
12
+ ControlSource$outboundSchema,
13
+ } from "./controlsource.js";
14
+
15
+ /**
16
+ * The control's owner.
17
+ */
18
+ export type ControlOwner = {
19
+ /**
20
+ * Unique identifier for the person.
21
+ */
22
+ id: string;
23
+ /**
24
+ * Name of the person that is shown in product.
25
+ */
26
+ displayName: string;
27
+ /**
28
+ * Email address of the person.
29
+ */
30
+ emailAddress: string;
31
+ };
32
+
33
+ export type Control = {
34
+ /**
35
+ * The control's unique ID.
36
+ */
37
+ id: string;
38
+ /**
39
+ * The control's external ID.
40
+ */
41
+ externalId: string | null;
42
+ /**
43
+ * The control's name.
44
+ */
45
+ name: string;
46
+ /**
47
+ * The control's description.
48
+ */
49
+ description: string;
50
+ source: ControlSource;
51
+ /**
52
+ * The security domains that the control belongs to.
53
+ */
54
+ domains: Array<string>;
55
+ /**
56
+ * The control's owner.
57
+ */
58
+ owner: ControlOwner | null;
59
+ /**
60
+ * The control's GDPR role, if the control is a GDPR control.
61
+ */
62
+ role?: string | undefined;
63
+ };
64
+
65
+ /** @internal */
66
+ export const ControlOwner$inboundSchema: z.ZodType<
67
+ ControlOwner,
68
+ z.ZodTypeDef,
69
+ unknown
70
+ > = z.object({
71
+ id: z.string(),
72
+ displayName: z.string(),
73
+ emailAddress: z.string(),
74
+ });
75
+
76
+ /** @internal */
77
+ export type ControlOwner$Outbound = {
78
+ id: string;
79
+ displayName: string;
80
+ emailAddress: string;
81
+ };
82
+
83
+ /** @internal */
84
+ export const ControlOwner$outboundSchema: z.ZodType<
85
+ ControlOwner$Outbound,
86
+ z.ZodTypeDef,
87
+ ControlOwner
88
+ > = z.object({
89
+ id: z.string(),
90
+ displayName: z.string(),
91
+ emailAddress: z.string(),
92
+ });
93
+
94
+ /**
95
+ * @internal
96
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
97
+ */
98
+ export namespace ControlOwner$ {
99
+ /** @deprecated use `ControlOwner$inboundSchema` instead. */
100
+ export const inboundSchema = ControlOwner$inboundSchema;
101
+ /** @deprecated use `ControlOwner$outboundSchema` instead. */
102
+ export const outboundSchema = ControlOwner$outboundSchema;
103
+ /** @deprecated use `ControlOwner$Outbound` instead. */
104
+ export type Outbound = ControlOwner$Outbound;
105
+ }
106
+
107
+ export function controlOwnerToJSON(controlOwner: ControlOwner): string {
108
+ return JSON.stringify(ControlOwner$outboundSchema.parse(controlOwner));
109
+ }
110
+
111
+ export function controlOwnerFromJSON(
112
+ jsonString: string,
113
+ ): SafeParseResult<ControlOwner, SDKValidationError> {
114
+ return safeParse(
115
+ jsonString,
116
+ (x) => ControlOwner$inboundSchema.parse(JSON.parse(x)),
117
+ `Failed to parse 'ControlOwner' from JSON`,
118
+ );
119
+ }
120
+
121
+ /** @internal */
122
+ export const Control$inboundSchema: z.ZodType<Control, z.ZodTypeDef, unknown> =
123
+ z.object({
124
+ id: z.string(),
125
+ externalId: z.nullable(z.string()),
126
+ name: z.string(),
127
+ description: z.string(),
128
+ source: ControlSource$inboundSchema,
129
+ domains: z.array(z.string()),
130
+ owner: z.nullable(z.lazy(() => ControlOwner$inboundSchema)),
131
+ role: z.string().optional(),
132
+ });
133
+
134
+ /** @internal */
135
+ export type Control$Outbound = {
136
+ id: string;
137
+ externalId: string | null;
138
+ name: string;
139
+ description: string;
140
+ source: string;
141
+ domains: Array<string>;
142
+ owner: ControlOwner$Outbound | null;
143
+ role?: string | undefined;
144
+ };
145
+
146
+ /** @internal */
147
+ export const Control$outboundSchema: z.ZodType<
148
+ Control$Outbound,
149
+ z.ZodTypeDef,
150
+ Control
151
+ > = z.object({
152
+ id: z.string(),
153
+ externalId: z.nullable(z.string()),
154
+ name: z.string(),
155
+ description: z.string(),
156
+ source: ControlSource$outboundSchema,
157
+ domains: z.array(z.string()),
158
+ owner: z.nullable(z.lazy(() => ControlOwner$outboundSchema)),
159
+ role: z.string().optional(),
160
+ });
161
+
162
+ /**
163
+ * @internal
164
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
165
+ */
166
+ export namespace Control$ {
167
+ /** @deprecated use `Control$inboundSchema` instead. */
168
+ export const inboundSchema = Control$inboundSchema;
169
+ /** @deprecated use `Control$outboundSchema` instead. */
170
+ export const outboundSchema = Control$outboundSchema;
171
+ /** @deprecated use `Control$Outbound` instead. */
172
+ export type Outbound = Control$Outbound;
173
+ }
174
+
175
+ export function controlToJSON(control: Control): string {
176
+ return JSON.stringify(Control$outboundSchema.parse(control));
177
+ }
178
+
179
+ export function controlFromJSON(
180
+ jsonString: string,
181
+ ): SafeParseResult<Control, SDKValidationError> {
182
+ return safeParse(
183
+ jsonString,
184
+ (x) => Control$inboundSchema.parse(JSON.parse(x)),
185
+ `Failed to parse 'Control' from JSON`,
186
+ );
187
+ }
@@ -0,0 +1,70 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { ClosedEnum } from "../../types/enums.js";
7
+
8
+ export const ControlDomain = {
9
+ ARTIFICIALAndAUTONOMOUSTECHNOLOGY: "ARTIFICIAL_&_AUTONOMOUS_TECHNOLOGY",
10
+ AssetManagement: "ASSET_MANAGEMENT",
11
+ BUSINESSCONTINUITYAndDISASTERRECOVERY:
12
+ "BUSINESS_CONTINUITY_&_DISASTER_RECOVERY",
13
+ CAPACITYAndPERFORMANCEPLANNING: "CAPACITY_&_PERFORMANCE_PLANNING",
14
+ ChangeManagement: "CHANGE_MANAGEMENT",
15
+ CloudSecurity: "CLOUD_SECURITY",
16
+ Compliance: "COMPLIANCE",
17
+ ConfigurationManagement: "CONFIGURATION_MANAGEMENT",
18
+ ContinuousMonitoring: "CONTINUOUS_MONITORING",
19
+ CryptographicProtections: "CRYPTOGRAPHIC_PROTECTIONS",
20
+ DATACLASSIFICATIONAndHANDLING: "DATA_CLASSIFICATION_&_HANDLING",
21
+ EmbeddedTechnology: "EMBEDDED_TECHNOLOGY",
22
+ EndpointSecurity: "ENDPOINT_SECURITY",
23
+ HumanResourcesSecurity: "HUMAN_RESOURCES_SECURITY",
24
+ IDENTIFICATIONAndAUTHENTICATION: "IDENTIFICATION_&_AUTHENTICATION",
25
+ IncidentResponse: "INCIDENT_RESPONSE",
26
+ InformationAssurance: "INFORMATION_ASSURANCE",
27
+ Maintenance: "MAINTENANCE",
28
+ MobileDeviceManagement: "MOBILE_DEVICE_MANAGEMENT",
29
+ NetworkSecurity: "NETWORK SECURITY",
30
+ PHYSICALAndENVIRONMENTALSECURITY: "PHYSICAL_&_ENVIRONMENTAL_SECURITY",
31
+ Privacy: "PRIVACY",
32
+ PROJECTAndRESOURCEMANAGEMENT: "PROJECT_&_RESOURCE MANAGEMENT",
33
+ RiskManagement: "RISK_MANAGEMENT",
34
+ SECUREENGINEERINGAndARCHITECTURE: "SECURE_ENGINEERING_&_ARCHITECTURE",
35
+ SECURITYAWARENESSAndTRAINING: "SECURITY_AWARENESS_&_TRAINING",
36
+ SecurityOperations: "SECURITY_OPERATIONS",
37
+ SECURITYAndPRIVACYGOVERNANCE: "SECURITY_&_PRIVACY_GOVERNANCE",
38
+ TECHNOLOGYDEVELOPMENTAndACQUISITION: "TECHNOLOGY_DEVELOPMENT_&_ACQUISITION",
39
+ ThirdPartyManagement: "THIRD-PARTY_MANAGEMENT",
40
+ ThreatManagement: "THREAT_MANAGEMENT",
41
+ VULNERABILITYAndPATCHMANAGEMENT: "VULNERABILITY_&_PATCH_MANAGEMENT",
42
+ WebSecurity: "WEB_SECURITY",
43
+ Administrative: "ADMINISTRATIVE",
44
+ Physical: "PHYSICAL",
45
+ Technical: "TECHNICAL",
46
+ Basic: "BASIC",
47
+ Derived: "DERIVED",
48
+ } as const;
49
+ export type ControlDomain = ClosedEnum<typeof ControlDomain>;
50
+
51
+ /** @internal */
52
+ export const ControlDomain$inboundSchema: z.ZodNativeEnum<
53
+ typeof ControlDomain
54
+ > = z.nativeEnum(ControlDomain);
55
+
56
+ /** @internal */
57
+ export const ControlDomain$outboundSchema: z.ZodNativeEnum<
58
+ typeof ControlDomain
59
+ > = ControlDomain$inboundSchema;
60
+
61
+ /**
62
+ * @internal
63
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
64
+ */
65
+ export namespace ControlDomain$ {
66
+ /** @deprecated use `ControlDomain$inboundSchema` instead. */
67
+ export const inboundSchema = ControlDomain$inboundSchema;
68
+ /** @deprecated use `ControlDomain$outboundSchema` instead. */
69
+ export const outboundSchema = ControlDomain$outboundSchema;
70
+ }
@@ -0,0 +1,33 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { ClosedEnum } from "../../types/enums.js";
7
+
8
+ export const ControlSource = {
9
+ Vanta: "Vanta",
10
+ Custom: "Custom",
11
+ } as const;
12
+ export type ControlSource = ClosedEnum<typeof ControlSource>;
13
+
14
+ /** @internal */
15
+ export const ControlSource$inboundSchema: z.ZodNativeEnum<
16
+ typeof ControlSource
17
+ > = z.nativeEnum(ControlSource);
18
+
19
+ /** @internal */
20
+ export const ControlSource$outboundSchema: z.ZodNativeEnum<
21
+ typeof ControlSource
22
+ > = ControlSource$inboundSchema;
23
+
24
+ /**
25
+ * @internal
26
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
27
+ */
28
+ export namespace ControlSource$ {
29
+ /** @deprecated use `ControlSource$inboundSchema` instead. */
30
+ export const inboundSchema = ControlSource$inboundSchema;
31
+ /** @deprecated use `ControlSource$outboundSchema` instead. */
32
+ export const outboundSchema = ControlSource$outboundSchema;
33
+ }
@@ -0,0 +1,164 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
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
+ import {
11
+ ControlDomain,
12
+ ControlDomain$inboundSchema,
13
+ ControlDomain$outboundSchema,
14
+ } from "./controldomain.js";
15
+ import {
16
+ FrameworkSection,
17
+ FrameworkSection$inboundSchema,
18
+ FrameworkSection$Outbound,
19
+ FrameworkSection$outboundSchema,
20
+ } from "./frameworksection.js";
21
+
22
+ /**
23
+ * The GDPR role of the control, which specifies whether the data is being "collected" or "processed". See the GdprRole enum for possible values.
24
+ *
25
+ * @remarks
26
+ * This field should only be included for controls that are to be mapped to the GDPR framework.
27
+ */
28
+ export const Role = {
29
+ Both: "BOTH",
30
+ Controller: "CONTROLLER",
31
+ Processor: "PROCESSOR",
32
+ } as const;
33
+ /**
34
+ * The GDPR role of the control, which specifies whether the data is being "collected" or "processed". See the GdprRole enum for possible values.
35
+ *
36
+ * @remarks
37
+ * This field should only be included for controls that are to be mapped to the GDPR framework.
38
+ */
39
+ export type Role = ClosedEnum<typeof Role>;
40
+
41
+ export type CreateCustomControlInput = {
42
+ /**
43
+ * The external id of the control.
44
+ */
45
+ externalId: string;
46
+ /**
47
+ * The name of the control.
48
+ */
49
+ name: string | null;
50
+ /**
51
+ * The description of the control.
52
+ */
53
+ description: string;
54
+ /**
55
+ * The effective date of the control.
56
+ */
57
+ effectiveDate: Date;
58
+ category: ControlDomain;
59
+ /**
60
+ * Framework sections that the control should be mapped to.
61
+ */
62
+ sections?: Array<FrameworkSection> | null | undefined;
63
+ /**
64
+ * The GDPR role of the control, which specifies whether the data is being "collected" or "processed". See the GdprRole enum for possible values.
65
+ *
66
+ * @remarks
67
+ * This field should only be included for controls that are to be mapped to the GDPR framework.
68
+ */
69
+ role?: Role | null | undefined;
70
+ };
71
+
72
+ /** @internal */
73
+ export const Role$inboundSchema: z.ZodNativeEnum<typeof Role> = z.nativeEnum(
74
+ Role,
75
+ );
76
+
77
+ /** @internal */
78
+ export const Role$outboundSchema: z.ZodNativeEnum<typeof Role> =
79
+ Role$inboundSchema;
80
+
81
+ /**
82
+ * @internal
83
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
84
+ */
85
+ export namespace Role$ {
86
+ /** @deprecated use `Role$inboundSchema` instead. */
87
+ export const inboundSchema = Role$inboundSchema;
88
+ /** @deprecated use `Role$outboundSchema` instead. */
89
+ export const outboundSchema = Role$outboundSchema;
90
+ }
91
+
92
+ /** @internal */
93
+ export const CreateCustomControlInput$inboundSchema: z.ZodType<
94
+ CreateCustomControlInput,
95
+ z.ZodTypeDef,
96
+ unknown
97
+ > = z.object({
98
+ externalId: z.string(),
99
+ name: z.nullable(z.string()),
100
+ description: z.string(),
101
+ effectiveDate: z.string().datetime({ offset: true }).transform(v =>
102
+ new Date(v)
103
+ ),
104
+ category: ControlDomain$inboundSchema,
105
+ sections: z.nullable(z.array(FrameworkSection$inboundSchema)).optional(),
106
+ role: z.nullable(Role$inboundSchema).optional(),
107
+ });
108
+
109
+ /** @internal */
110
+ export type CreateCustomControlInput$Outbound = {
111
+ externalId: string;
112
+ name: string | null;
113
+ description: string;
114
+ effectiveDate: string;
115
+ category: string;
116
+ sections?: Array<FrameworkSection$Outbound> | null | undefined;
117
+ role?: string | null | undefined;
118
+ };
119
+
120
+ /** @internal */
121
+ export const CreateCustomControlInput$outboundSchema: z.ZodType<
122
+ CreateCustomControlInput$Outbound,
123
+ z.ZodTypeDef,
124
+ CreateCustomControlInput
125
+ > = z.object({
126
+ externalId: z.string(),
127
+ name: z.nullable(z.string()),
128
+ description: z.string(),
129
+ effectiveDate: z.date().transform(v => v.toISOString()),
130
+ category: ControlDomain$outboundSchema,
131
+ sections: z.nullable(z.array(FrameworkSection$outboundSchema)).optional(),
132
+ role: z.nullable(Role$outboundSchema).optional(),
133
+ });
134
+
135
+ /**
136
+ * @internal
137
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
138
+ */
139
+ export namespace CreateCustomControlInput$ {
140
+ /** @deprecated use `CreateCustomControlInput$inboundSchema` instead. */
141
+ export const inboundSchema = CreateCustomControlInput$inboundSchema;
142
+ /** @deprecated use `CreateCustomControlInput$outboundSchema` instead. */
143
+ export const outboundSchema = CreateCustomControlInput$outboundSchema;
144
+ /** @deprecated use `CreateCustomControlInput$Outbound` instead. */
145
+ export type Outbound = CreateCustomControlInput$Outbound;
146
+ }
147
+
148
+ export function createCustomControlInputToJSON(
149
+ createCustomControlInput: CreateCustomControlInput,
150
+ ): string {
151
+ return JSON.stringify(
152
+ CreateCustomControlInput$outboundSchema.parse(createCustomControlInput),
153
+ );
154
+ }
155
+
156
+ export function createCustomControlInputFromJSON(
157
+ jsonString: string,
158
+ ): SafeParseResult<CreateCustomControlInput, SDKValidationError> {
159
+ return safeParse(
160
+ jsonString,
161
+ (x) => CreateCustomControlInput$inboundSchema.parse(JSON.parse(x)),
162
+ `Failed to parse 'CreateCustomControlInput' from JSON`,
163
+ );
164
+ }
@@ -0,0 +1,105 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
+ import {
10
+ RecurrenceDuration,
11
+ RecurrenceDuration$inboundSchema,
12
+ RecurrenceDuration$outboundSchema,
13
+ } from "./recurrenceduration.js";
14
+
15
+ export type CreateCustomEvidenceRequestInput = {
16
+ /**
17
+ * A set of controls, referenced by id, to map the evidence to
18
+ */
19
+ controlIds: Array<string>;
20
+ /**
21
+ * Title for the evidence request
22
+ */
23
+ title: string;
24
+ /**
25
+ * Description for the evidence request
26
+ */
27
+ description: string;
28
+ cadence: RecurrenceDuration;
29
+ reminderWindow: RecurrenceDuration;
30
+ /**
31
+ * Whether this document contains sensitive data and needs more restrictive read access
32
+ */
33
+ isRestricted: boolean;
34
+ };
35
+
36
+ /** @internal */
37
+ export const CreateCustomEvidenceRequestInput$inboundSchema: z.ZodType<
38
+ CreateCustomEvidenceRequestInput,
39
+ z.ZodTypeDef,
40
+ unknown
41
+ > = z.object({
42
+ controlIds: z.array(z.string()),
43
+ title: z.string(),
44
+ description: z.string(),
45
+ cadence: RecurrenceDuration$inboundSchema,
46
+ reminderWindow: RecurrenceDuration$inboundSchema,
47
+ isRestricted: z.boolean(),
48
+ });
49
+
50
+ /** @internal */
51
+ export type CreateCustomEvidenceRequestInput$Outbound = {
52
+ controlIds: Array<string>;
53
+ title: string;
54
+ description: string;
55
+ cadence: string;
56
+ reminderWindow: string;
57
+ isRestricted: boolean;
58
+ };
59
+
60
+ /** @internal */
61
+ export const CreateCustomEvidenceRequestInput$outboundSchema: z.ZodType<
62
+ CreateCustomEvidenceRequestInput$Outbound,
63
+ z.ZodTypeDef,
64
+ CreateCustomEvidenceRequestInput
65
+ > = z.object({
66
+ controlIds: z.array(z.string()),
67
+ title: z.string(),
68
+ description: z.string(),
69
+ cadence: RecurrenceDuration$outboundSchema,
70
+ reminderWindow: RecurrenceDuration$outboundSchema,
71
+ isRestricted: z.boolean(),
72
+ });
73
+
74
+ /**
75
+ * @internal
76
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
77
+ */
78
+ export namespace CreateCustomEvidenceRequestInput$ {
79
+ /** @deprecated use `CreateCustomEvidenceRequestInput$inboundSchema` instead. */
80
+ export const inboundSchema = CreateCustomEvidenceRequestInput$inboundSchema;
81
+ /** @deprecated use `CreateCustomEvidenceRequestInput$outboundSchema` instead. */
82
+ export const outboundSchema = CreateCustomEvidenceRequestInput$outboundSchema;
83
+ /** @deprecated use `CreateCustomEvidenceRequestInput$Outbound` instead. */
84
+ export type Outbound = CreateCustomEvidenceRequestInput$Outbound;
85
+ }
86
+
87
+ export function createCustomEvidenceRequestInputToJSON(
88
+ createCustomEvidenceRequestInput: CreateCustomEvidenceRequestInput,
89
+ ): string {
90
+ return JSON.stringify(
91
+ CreateCustomEvidenceRequestInput$outboundSchema.parse(
92
+ createCustomEvidenceRequestInput,
93
+ ),
94
+ );
95
+ }
96
+
97
+ export function createCustomEvidenceRequestInputFromJSON(
98
+ jsonString: string,
99
+ ): SafeParseResult<CreateCustomEvidenceRequestInput, SDKValidationError> {
100
+ return safeParse(
101
+ jsonString,
102
+ (x) => CreateCustomEvidenceRequestInput$inboundSchema.parse(JSON.parse(x)),
103
+ `Failed to parse 'CreateCustomEvidenceRequestInput' from JSON`,
104
+ );
105
+ }
@@ -0,0 +1,110 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
+ import {
10
+ RecurrenceDuration,
11
+ RecurrenceDuration$inboundSchema,
12
+ RecurrenceDuration$outboundSchema,
13
+ } from "./recurrenceduration.js";
14
+
15
+ export type CustomEvidenceRequest = {
16
+ /**
17
+ * Internal id of the custom evidence request within Vanta
18
+ */
19
+ id: string;
20
+ /**
21
+ * A set of controls, referenced by id, to map the evidence to
22
+ */
23
+ controlIds: Array<string>;
24
+ /**
25
+ * Title for the evidence request
26
+ */
27
+ title: string;
28
+ /**
29
+ * Description for the evidence request
30
+ */
31
+ description: string;
32
+ cadence: RecurrenceDuration;
33
+ reminderWindow: RecurrenceDuration;
34
+ /**
35
+ * Whether this document contains sensitive data and needs more restrictive read access
36
+ */
37
+ isRestricted: boolean;
38
+ };
39
+
40
+ /** @internal */
41
+ export const CustomEvidenceRequest$inboundSchema: z.ZodType<
42
+ CustomEvidenceRequest,
43
+ z.ZodTypeDef,
44
+ unknown
45
+ > = z.object({
46
+ id: z.string(),
47
+ controlIds: z.array(z.string()),
48
+ title: z.string(),
49
+ description: z.string(),
50
+ cadence: RecurrenceDuration$inboundSchema,
51
+ reminderWindow: RecurrenceDuration$inboundSchema,
52
+ isRestricted: z.boolean(),
53
+ });
54
+
55
+ /** @internal */
56
+ export type CustomEvidenceRequest$Outbound = {
57
+ id: string;
58
+ controlIds: Array<string>;
59
+ title: string;
60
+ description: string;
61
+ cadence: string;
62
+ reminderWindow: string;
63
+ isRestricted: boolean;
64
+ };
65
+
66
+ /** @internal */
67
+ export const CustomEvidenceRequest$outboundSchema: z.ZodType<
68
+ CustomEvidenceRequest$Outbound,
69
+ z.ZodTypeDef,
70
+ CustomEvidenceRequest
71
+ > = z.object({
72
+ id: z.string(),
73
+ controlIds: z.array(z.string()),
74
+ title: z.string(),
75
+ description: z.string(),
76
+ cadence: RecurrenceDuration$outboundSchema,
77
+ reminderWindow: RecurrenceDuration$outboundSchema,
78
+ isRestricted: z.boolean(),
79
+ });
80
+
81
+ /**
82
+ * @internal
83
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
84
+ */
85
+ export namespace CustomEvidenceRequest$ {
86
+ /** @deprecated use `CustomEvidenceRequest$inboundSchema` instead. */
87
+ export const inboundSchema = CustomEvidenceRequest$inboundSchema;
88
+ /** @deprecated use `CustomEvidenceRequest$outboundSchema` instead. */
89
+ export const outboundSchema = CustomEvidenceRequest$outboundSchema;
90
+ /** @deprecated use `CustomEvidenceRequest$Outbound` instead. */
91
+ export type Outbound = CustomEvidenceRequest$Outbound;
92
+ }
93
+
94
+ export function customEvidenceRequestToJSON(
95
+ customEvidenceRequest: CustomEvidenceRequest,
96
+ ): string {
97
+ return JSON.stringify(
98
+ CustomEvidenceRequest$outboundSchema.parse(customEvidenceRequest),
99
+ );
100
+ }
101
+
102
+ export function customEvidenceRequestFromJSON(
103
+ jsonString: string,
104
+ ): SafeParseResult<CustomEvidenceRequest, SDKValidationError> {
105
+ return safeParse(
106
+ jsonString,
107
+ (x) => CustomEvidenceRequest$inboundSchema.parse(JSON.parse(x)),
108
+ `Failed to parse 'CustomEvidenceRequest' from JSON`,
109
+ );
110
+ }