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,141 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { VantaCore } from "../core.js";
6
+ import { encodeJSON, encodeSimple } from "../lib/encodings.js";
7
+ import * as M from "../lib/matchers.js";
8
+ import { safeParse } from "../lib/schemas.js";
9
+ import { RequestOptions } from "../lib/sdks.js";
10
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
11
+ import { pathToFunc } from "../lib/url.js";
12
+ import * as components from "../models/components/index.js";
13
+ import { APIError } from "../models/errors/apierror.js";
14
+ import {
15
+ ConnectionError,
16
+ InvalidRequestError,
17
+ RequestAbortedError,
18
+ RequestTimeoutError,
19
+ UnexpectedClientError,
20
+ } from "../models/errors/httpclienterrors.js";
21
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
22
+ import * as operations from "../models/operations/index.js";
23
+ import { Result } from "../types/fp.js";
24
+
25
+ /**
26
+ * Create a comment for audit evidence
27
+ *
28
+ * @remarks
29
+ * Create a comment in Vanta for a piece of evidence.
30
+ */
31
+ export async function auditsCreateCommentForEvidence(
32
+ client: VantaCore,
33
+ request: operations.CreateCommentForAuditEvidenceRequest,
34
+ options?: RequestOptions,
35
+ ): Promise<
36
+ Result<
37
+ components.Comment,
38
+ | APIError
39
+ | SDKValidationError
40
+ | UnexpectedClientError
41
+ | InvalidRequestError
42
+ | RequestAbortedError
43
+ | RequestTimeoutError
44
+ | ConnectionError
45
+ >
46
+ > {
47
+ const parsed = safeParse(
48
+ request,
49
+ (value) =>
50
+ operations.CreateCommentForAuditEvidenceRequest$outboundSchema.parse(
51
+ value,
52
+ ),
53
+ "Input validation failed",
54
+ );
55
+ if (!parsed.ok) {
56
+ return parsed;
57
+ }
58
+ const payload = parsed.value;
59
+ const body = encodeJSON("body", payload.AddCommentInput, { explode: true });
60
+
61
+ const pathParams = {
62
+ auditEvidenceId: encodeSimple("auditEvidenceId", payload.auditEvidenceId, {
63
+ explode: false,
64
+ charEncoding: "percent",
65
+ }),
66
+ auditId: encodeSimple("auditId", payload.auditId, {
67
+ explode: false,
68
+ charEncoding: "percent",
69
+ }),
70
+ };
71
+
72
+ const path = pathToFunc(
73
+ "/audits/{auditId}/evidence/{auditEvidenceId}/comments",
74
+ )(pathParams);
75
+
76
+ const headers = new Headers({
77
+ "Content-Type": "application/json",
78
+ Accept: "application/json",
79
+ });
80
+
81
+ const secConfig = await extractSecurity(client._options.bearerAuth);
82
+ const securityInput = secConfig == null ? {} : { bearerAuth: secConfig };
83
+ const requestSecurity = resolveGlobalSecurity(securityInput);
84
+
85
+ const context = {
86
+ operationID: "CreateCommentForAuditEvidence",
87
+ oAuth2Scopes: [],
88
+
89
+ resolvedSecurity: requestSecurity,
90
+
91
+ securitySource: client._options.bearerAuth,
92
+ retryConfig: options?.retries
93
+ || client._options.retryConfig
94
+ || { strategy: "none" },
95
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
96
+ };
97
+
98
+ const requestRes = client._createRequest(context, {
99
+ security: requestSecurity,
100
+ method: "POST",
101
+ baseURL: options?.serverURL,
102
+ path: path,
103
+ headers: headers,
104
+ body: body,
105
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
106
+ }, options);
107
+ if (!requestRes.ok) {
108
+ return requestRes;
109
+ }
110
+ const req = requestRes.value;
111
+
112
+ const doResult = await client._do(req, {
113
+ context,
114
+ errorCodes: ["4XX", "5XX"],
115
+ retryConfig: context.retryConfig,
116
+ retryCodes: context.retryCodes,
117
+ });
118
+ if (!doResult.ok) {
119
+ return doResult;
120
+ }
121
+ const response = doResult.value;
122
+
123
+ const [result] = await M.match<
124
+ components.Comment,
125
+ | APIError
126
+ | SDKValidationError
127
+ | UnexpectedClientError
128
+ | InvalidRequestError
129
+ | RequestAbortedError
130
+ | RequestTimeoutError
131
+ | ConnectionError
132
+ >(
133
+ M.json(200, components.Comment$inboundSchema),
134
+ M.fail(["4XX", "5XX"]),
135
+ )(response);
136
+ if (!result.ok) {
137
+ return result;
138
+ }
139
+
140
+ return result;
141
+ }
@@ -0,0 +1,137 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { VantaCore } from "../core.js";
6
+ import { encodeJSON, encodeSimple } from "../lib/encodings.js";
7
+ import * as M from "../lib/matchers.js";
8
+ import { safeParse } from "../lib/schemas.js";
9
+ import { RequestOptions } from "../lib/sdks.js";
10
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
11
+ import { pathToFunc } from "../lib/url.js";
12
+ import * as components from "../models/components/index.js";
13
+ import { APIError } from "../models/errors/apierror.js";
14
+ import {
15
+ ConnectionError,
16
+ InvalidRequestError,
17
+ RequestAbortedError,
18
+ RequestTimeoutError,
19
+ UnexpectedClientError,
20
+ } from "../models/errors/httpclienterrors.js";
21
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
22
+ import * as operations from "../models/operations/index.js";
23
+ import { Result } from "../types/fp.js";
24
+
25
+ /**
26
+ * Create a custom control for an audit
27
+ *
28
+ * @remarks
29
+ * Create a custom control for an audit.
30
+ */
31
+ export async function auditsCreateCustomControl(
32
+ client: VantaCore,
33
+ request: operations.CreateCustomControlRequest,
34
+ options?: RequestOptions,
35
+ ): Promise<
36
+ Result<
37
+ components.Control,
38
+ | APIError
39
+ | SDKValidationError
40
+ | UnexpectedClientError
41
+ | InvalidRequestError
42
+ | RequestAbortedError
43
+ | RequestTimeoutError
44
+ | ConnectionError
45
+ >
46
+ > {
47
+ const parsed = safeParse(
48
+ request,
49
+ (value) =>
50
+ operations.CreateCustomControlRequest$outboundSchema.parse(value),
51
+ "Input validation failed",
52
+ );
53
+ if (!parsed.ok) {
54
+ return parsed;
55
+ }
56
+ const payload = parsed.value;
57
+ const body = encodeJSON("body", payload.CreateCustomControlInput, {
58
+ explode: true,
59
+ });
60
+
61
+ const pathParams = {
62
+ auditId: encodeSimple("auditId", payload.auditId, {
63
+ explode: false,
64
+ charEncoding: "percent",
65
+ }),
66
+ };
67
+
68
+ const path = pathToFunc("/audits/{auditId}/controls/custom-controls")(
69
+ pathParams,
70
+ );
71
+
72
+ const headers = new Headers({
73
+ "Content-Type": "application/json",
74
+ Accept: "application/json",
75
+ });
76
+
77
+ const secConfig = await extractSecurity(client._options.bearerAuth);
78
+ const securityInput = secConfig == null ? {} : { bearerAuth: secConfig };
79
+ const requestSecurity = resolveGlobalSecurity(securityInput);
80
+
81
+ const context = {
82
+ operationID: "CreateCustomControl",
83
+ oAuth2Scopes: [],
84
+
85
+ resolvedSecurity: requestSecurity,
86
+
87
+ securitySource: client._options.bearerAuth,
88
+ retryConfig: options?.retries
89
+ || client._options.retryConfig
90
+ || { strategy: "none" },
91
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
92
+ };
93
+
94
+ const requestRes = client._createRequest(context, {
95
+ security: requestSecurity,
96
+ method: "POST",
97
+ baseURL: options?.serverURL,
98
+ path: path,
99
+ headers: headers,
100
+ body: body,
101
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
102
+ }, options);
103
+ if (!requestRes.ok) {
104
+ return requestRes;
105
+ }
106
+ const req = requestRes.value;
107
+
108
+ const doResult = await client._do(req, {
109
+ context,
110
+ errorCodes: ["4XX", "5XX"],
111
+ retryConfig: context.retryConfig,
112
+ retryCodes: context.retryCodes,
113
+ });
114
+ if (!doResult.ok) {
115
+ return doResult;
116
+ }
117
+ const response = doResult.value;
118
+
119
+ const [result] = await M.match<
120
+ components.Control,
121
+ | APIError
122
+ | SDKValidationError
123
+ | UnexpectedClientError
124
+ | InvalidRequestError
125
+ | RequestAbortedError
126
+ | RequestTimeoutError
127
+ | ConnectionError
128
+ >(
129
+ M.json(201, components.Control$inboundSchema),
130
+ M.fail(["4XX", "5XX"]),
131
+ )(response);
132
+ if (!result.ok) {
133
+ return result;
134
+ }
135
+
136
+ return result;
137
+ }
@@ -0,0 +1,137 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { VantaCore } from "../core.js";
6
+ import { encodeJSON, encodeSimple } from "../lib/encodings.js";
7
+ import * as M from "../lib/matchers.js";
8
+ import { safeParse } from "../lib/schemas.js";
9
+ import { RequestOptions } from "../lib/sdks.js";
10
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
11
+ import { pathToFunc } from "../lib/url.js";
12
+ import * as components from "../models/components/index.js";
13
+ import { APIError } from "../models/errors/apierror.js";
14
+ import {
15
+ ConnectionError,
16
+ InvalidRequestError,
17
+ RequestAbortedError,
18
+ RequestTimeoutError,
19
+ UnexpectedClientError,
20
+ } from "../models/errors/httpclienterrors.js";
21
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
22
+ import * as operations from "../models/operations/index.js";
23
+ import { Result } from "../types/fp.js";
24
+
25
+ /**
26
+ * Create a custom evidence request for an audit
27
+ *
28
+ * @remarks
29
+ * Create a custom evidence request for an audit.
30
+ */
31
+ export async function auditsCreateCustomEvidenceRequest(
32
+ client: VantaCore,
33
+ request: operations.CreateCustomEvidenceRequestRequest,
34
+ options?: RequestOptions,
35
+ ): Promise<
36
+ Result<
37
+ components.CustomEvidenceRequest,
38
+ | APIError
39
+ | SDKValidationError
40
+ | UnexpectedClientError
41
+ | InvalidRequestError
42
+ | RequestAbortedError
43
+ | RequestTimeoutError
44
+ | ConnectionError
45
+ >
46
+ > {
47
+ const parsed = safeParse(
48
+ request,
49
+ (value) =>
50
+ operations.CreateCustomEvidenceRequestRequest$outboundSchema.parse(value),
51
+ "Input validation failed",
52
+ );
53
+ if (!parsed.ok) {
54
+ return parsed;
55
+ }
56
+ const payload = parsed.value;
57
+ const body = encodeJSON("body", payload.CreateCustomEvidenceRequestInput, {
58
+ explode: true,
59
+ });
60
+
61
+ const pathParams = {
62
+ auditId: encodeSimple("auditId", payload.auditId, {
63
+ explode: false,
64
+ charEncoding: "percent",
65
+ }),
66
+ };
67
+
68
+ const path = pathToFunc(
69
+ "/audits/{auditId}/evidence/custom-evidence-requests",
70
+ )(pathParams);
71
+
72
+ const headers = new Headers({
73
+ "Content-Type": "application/json",
74
+ Accept: "application/json",
75
+ });
76
+
77
+ const secConfig = await extractSecurity(client._options.bearerAuth);
78
+ const securityInput = secConfig == null ? {} : { bearerAuth: secConfig };
79
+ const requestSecurity = resolveGlobalSecurity(securityInput);
80
+
81
+ const context = {
82
+ operationID: "CreateCustomEvidenceRequest",
83
+ oAuth2Scopes: [],
84
+
85
+ resolvedSecurity: requestSecurity,
86
+
87
+ securitySource: client._options.bearerAuth,
88
+ retryConfig: options?.retries
89
+ || client._options.retryConfig
90
+ || { strategy: "none" },
91
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
92
+ };
93
+
94
+ const requestRes = client._createRequest(context, {
95
+ security: requestSecurity,
96
+ method: "POST",
97
+ baseURL: options?.serverURL,
98
+ path: path,
99
+ headers: headers,
100
+ body: body,
101
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
102
+ }, options);
103
+ if (!requestRes.ok) {
104
+ return requestRes;
105
+ }
106
+ const req = requestRes.value;
107
+
108
+ const doResult = await client._do(req, {
109
+ context,
110
+ errorCodes: ["4XX", "5XX"],
111
+ retryConfig: context.retryConfig,
112
+ retryCodes: context.retryCodes,
113
+ });
114
+ if (!doResult.ok) {
115
+ return doResult;
116
+ }
117
+ const response = doResult.value;
118
+
119
+ const [result] = await M.match<
120
+ components.CustomEvidenceRequest,
121
+ | APIError
122
+ | SDKValidationError
123
+ | UnexpectedClientError
124
+ | InvalidRequestError
125
+ | RequestAbortedError
126
+ | RequestTimeoutError
127
+ | ConnectionError
128
+ >(
129
+ M.json(200, components.CustomEvidenceRequest$inboundSchema),
130
+ M.fail(["4XX", "5XX"]),
131
+ )(response);
132
+ if (!result.ok) {
133
+ return result;
134
+ }
135
+
136
+ return result;
137
+ }
@@ -0,0 +1,144 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { VantaCore } from "../core.js";
6
+ import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
7
+ import * as M from "../lib/matchers.js";
8
+ import { safeParse } from "../lib/schemas.js";
9
+ import { RequestOptions } from "../lib/sdks.js";
10
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
11
+ import { pathToFunc } from "../lib/url.js";
12
+ import * as components from "../models/components/index.js";
13
+ import { APIError } from "../models/errors/apierror.js";
14
+ import {
15
+ ConnectionError,
16
+ InvalidRequestError,
17
+ RequestAbortedError,
18
+ RequestTimeoutError,
19
+ UnexpectedClientError,
20
+ } from "../models/errors/httpclienterrors.js";
21
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
22
+ import * as operations from "../models/operations/index.js";
23
+ import { Result } from "../types/fp.js";
24
+
25
+ /**
26
+ * List audit evidence url
27
+ *
28
+ * @remarks
29
+ * Returns a paginated list of evidence urls for an audit.
30
+ */
31
+ export async function auditsGetEvidenceUrls(
32
+ client: VantaCore,
33
+ request: operations.ListAuditEvidenceUrlsRequest,
34
+ options?: RequestOptions,
35
+ ): Promise<
36
+ Result<
37
+ components.PaginatedResponseEvidenceUrl,
38
+ | APIError
39
+ | SDKValidationError
40
+ | UnexpectedClientError
41
+ | InvalidRequestError
42
+ | RequestAbortedError
43
+ | RequestTimeoutError
44
+ | ConnectionError
45
+ >
46
+ > {
47
+ const parsed = safeParse(
48
+ request,
49
+ (value) =>
50
+ operations.ListAuditEvidenceUrlsRequest$outboundSchema.parse(value),
51
+ "Input validation failed",
52
+ );
53
+ if (!parsed.ok) {
54
+ return parsed;
55
+ }
56
+ const payload = parsed.value;
57
+ const body = null;
58
+
59
+ const pathParams = {
60
+ auditEvidenceId: encodeSimple("auditEvidenceId", payload.auditEvidenceId, {
61
+ explode: false,
62
+ charEncoding: "percent",
63
+ }),
64
+ auditId: encodeSimple("auditId", payload.auditId, {
65
+ explode: false,
66
+ charEncoding: "percent",
67
+ }),
68
+ };
69
+
70
+ const path = pathToFunc("/audits/{auditId}/evidence/{auditEvidenceId}/urls")(
71
+ pathParams,
72
+ );
73
+
74
+ const query = encodeFormQuery({
75
+ "pageCursor": payload.pageCursor,
76
+ "pageSize": payload.pageSize,
77
+ });
78
+
79
+ const headers = new Headers({
80
+ Accept: "application/json",
81
+ });
82
+
83
+ const secConfig = await extractSecurity(client._options.bearerAuth);
84
+ const securityInput = secConfig == null ? {} : { bearerAuth: secConfig };
85
+ const requestSecurity = resolveGlobalSecurity(securityInput);
86
+
87
+ const context = {
88
+ operationID: "ListAuditEvidenceUrls",
89
+ oAuth2Scopes: [],
90
+
91
+ resolvedSecurity: requestSecurity,
92
+
93
+ securitySource: client._options.bearerAuth,
94
+ retryConfig: options?.retries
95
+ || client._options.retryConfig
96
+ || { strategy: "none" },
97
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
98
+ };
99
+
100
+ const requestRes = client._createRequest(context, {
101
+ security: requestSecurity,
102
+ method: "GET",
103
+ baseURL: options?.serverURL,
104
+ path: path,
105
+ headers: headers,
106
+ query: query,
107
+ body: body,
108
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
109
+ }, options);
110
+ if (!requestRes.ok) {
111
+ return requestRes;
112
+ }
113
+ const req = requestRes.value;
114
+
115
+ const doResult = await client._do(req, {
116
+ context,
117
+ errorCodes: ["4XX", "5XX"],
118
+ retryConfig: context.retryConfig,
119
+ retryCodes: context.retryCodes,
120
+ });
121
+ if (!doResult.ok) {
122
+ return doResult;
123
+ }
124
+ const response = doResult.value;
125
+
126
+ const [result] = await M.match<
127
+ components.PaginatedResponseEvidenceUrl,
128
+ | APIError
129
+ | SDKValidationError
130
+ | UnexpectedClientError
131
+ | InvalidRequestError
132
+ | RequestAbortedError
133
+ | RequestTimeoutError
134
+ | ConnectionError
135
+ >(
136
+ M.json(200, components.PaginatedResponseEvidenceUrl$inboundSchema),
137
+ M.fail(["4XX", "5XX"]),
138
+ )(response);
139
+ if (!result.ok) {
140
+ return result;
141
+ }
142
+
143
+ return result;
144
+ }
@@ -0,0 +1,131 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { VantaCore } from "../core.js";
6
+ import { encodeFormQuery } from "../lib/encodings.js";
7
+ import * as M from "../lib/matchers.js";
8
+ import { safeParse } from "../lib/schemas.js";
9
+ import { RequestOptions } from "../lib/sdks.js";
10
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
11
+ import { pathToFunc } from "../lib/url.js";
12
+ import * as components from "../models/components/index.js";
13
+ import { APIError } from "../models/errors/apierror.js";
14
+ import {
15
+ ConnectionError,
16
+ InvalidRequestError,
17
+ RequestAbortedError,
18
+ RequestTimeoutError,
19
+ UnexpectedClientError,
20
+ } from "../models/errors/httpclienterrors.js";
21
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
22
+ import * as operations from "../models/operations/index.js";
23
+ import { Result } from "../types/fp.js";
24
+
25
+ /**
26
+ * List audits
27
+ *
28
+ * @remarks
29
+ * Returns a paginated list of audits scoped to the audit firm.
30
+ */
31
+ export async function auditsList(
32
+ client: VantaCore,
33
+ request: operations.ListAuditsRequest,
34
+ options?: RequestOptions,
35
+ ): Promise<
36
+ Result<
37
+ components.PaginatedResponseAudit,
38
+ | APIError
39
+ | SDKValidationError
40
+ | UnexpectedClientError
41
+ | InvalidRequestError
42
+ | RequestAbortedError
43
+ | RequestTimeoutError
44
+ | ConnectionError
45
+ >
46
+ > {
47
+ const parsed = safeParse(
48
+ request,
49
+ (value) => operations.ListAuditsRequest$outboundSchema.parse(value),
50
+ "Input validation failed",
51
+ );
52
+ if (!parsed.ok) {
53
+ return parsed;
54
+ }
55
+ const payload = parsed.value;
56
+ const body = null;
57
+
58
+ const path = pathToFunc("/audits")();
59
+
60
+ const query = encodeFormQuery({
61
+ "changedSinceDate": payload.changedSinceDate,
62
+ "pageCursor": payload.pageCursor,
63
+ "pageSize": payload.pageSize,
64
+ });
65
+
66
+ const headers = new Headers({
67
+ Accept: "application/json",
68
+ });
69
+
70
+ const secConfig = await extractSecurity(client._options.bearerAuth);
71
+ const securityInput = secConfig == null ? {} : { bearerAuth: secConfig };
72
+ const requestSecurity = resolveGlobalSecurity(securityInput);
73
+
74
+ const context = {
75
+ operationID: "ListAudits",
76
+ oAuth2Scopes: [],
77
+
78
+ resolvedSecurity: requestSecurity,
79
+
80
+ securitySource: client._options.bearerAuth,
81
+ retryConfig: options?.retries
82
+ || client._options.retryConfig
83
+ || { strategy: "none" },
84
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
85
+ };
86
+
87
+ const requestRes = client._createRequest(context, {
88
+ security: requestSecurity,
89
+ method: "GET",
90
+ baseURL: options?.serverURL,
91
+ path: path,
92
+ headers: headers,
93
+ query: query,
94
+ body: body,
95
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
96
+ }, options);
97
+ if (!requestRes.ok) {
98
+ return requestRes;
99
+ }
100
+ const req = requestRes.value;
101
+
102
+ const doResult = await client._do(req, {
103
+ context,
104
+ errorCodes: ["4XX", "5XX"],
105
+ retryConfig: context.retryConfig,
106
+ retryCodes: context.retryCodes,
107
+ });
108
+ if (!doResult.ok) {
109
+ return doResult;
110
+ }
111
+ const response = doResult.value;
112
+
113
+ const [result] = await M.match<
114
+ components.PaginatedResponseAudit,
115
+ | APIError
116
+ | SDKValidationError
117
+ | UnexpectedClientError
118
+ | InvalidRequestError
119
+ | RequestAbortedError
120
+ | RequestTimeoutError
121
+ | ConnectionError
122
+ >(
123
+ M.json(200, components.PaginatedResponseAudit$inboundSchema),
124
+ M.fail(["4XX", "5XX"]),
125
+ )(response);
126
+ if (!result.ok) {
127
+ return result;
128
+ }
129
+
130
+ return result;
131
+ }