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,30 @@
1
+
2
+ > **Remember to shutdown a GitHub Codespace when it is not in use!**
3
+
4
+ # Dev Containers Quick Start
5
+
6
+ The default location for usage snippets is the `samples` directory.
7
+
8
+ ## Running a Usage Sample
9
+
10
+ A sample usage example has been provided in a `root.ts` file. As you work with the SDK, it's expected that you will modify these samples to fit your needs. To execute this particular snippet, use the command below.
11
+
12
+ ```
13
+ ts-node root.ts
14
+ ```
15
+
16
+ ## Generating Additional Usage Samples
17
+
18
+ The speakeasy CLI allows you to generate more usage snippets. Here's how:
19
+
20
+ - To generate a sample for a specific operation by providing an operation ID, use:
21
+
22
+ ```
23
+ speakeasy generate usage -s api_spec.yaml -l typescript -i {INPUT_OPERATION_ID} -o ./samples
24
+ ```
25
+
26
+ - To generate samples for an entire namespace (like a tag or group name), use:
27
+
28
+ ```
29
+ speakeasy generate usage -s api_spec.yaml -l typescript -n {INPUT_TAG_NAME} -o ./samples
30
+ ```
package/FUNCTIONS.md ADDED
@@ -0,0 +1,104 @@
1
+ # Standalone Functions
2
+
3
+ > [!NOTE]
4
+ > This section is useful if you are using a bundler and targetting browsers and
5
+ > runtimes where the size of an application affects performance and load times.
6
+
7
+ Every method in this SDK is also available as a standalone function. This
8
+ alternative API is suitable when targetting the browser or serverless runtimes
9
+ and using a bundler to build your application since all unused functionality
10
+ will be tree-shaken away. This includes code for unused methods, Zod schemas,
11
+ encoding helpers and response handlers. The result is dramatically smaller
12
+ impact on the application's final bundle size which grows very slowly as you use
13
+ more and more functionality from this SDK.
14
+
15
+ Calling methods through the main SDK class remains a valid and generally more
16
+ more ergonomic option. Standalone functions represent an optimisation for a
17
+ specific category of applications.
18
+
19
+ ## Example
20
+
21
+ ```typescript
22
+ import { VantaCore } from "vanta-auditor-api-sdk/core.js";
23
+ import { auditsList } from "vanta-auditor-api-sdk/funcs/auditsList.js";
24
+ import { SDKValidationError } from "vanta-auditor-api-sdk/models/errors/sdkvalidationerror.js";
25
+
26
+ // Use `VantaCore` for best tree-shaking performance.
27
+ // You can create one instance of it to use across an application.
28
+ const vanta = new VantaCore({
29
+ bearerAuth: process.env["VANTA_BEARER_AUTH"] ?? "",
30
+ });
31
+
32
+ async function run() {
33
+ const res = await auditsList(vanta, {});
34
+
35
+ switch (true) {
36
+ case res.ok:
37
+ // The success case will be handled outside of the switch block
38
+ break;
39
+ case res.error instanceof SDKValidationError:
40
+ // Pretty-print validation errors.
41
+ return console.log(res.error.pretty());
42
+ case res.error instanceof Error:
43
+ return console.log(res.error);
44
+ default:
45
+ // TypeScript's type checking will fail on the following line if the above
46
+ // cases were not exhaustive.
47
+ res.error satisfies never;
48
+ throw new Error("Assertion failed: expected error checks to be exhaustive: " + res.error);
49
+ }
50
+
51
+
52
+ const { value: result } = res;
53
+
54
+ // Handle the result
55
+ console.log(result);
56
+ }
57
+
58
+ run();
59
+ ```
60
+
61
+ ## Result types
62
+
63
+ Standalone functions differ from SDK methods in that they return a
64
+ `Result<Value, Error>` type to capture _known errors_ and document them using
65
+ the type system. By avoiding throwing errors, application code maintains clear
66
+ control flow and error-handling become part of the regular flow of application
67
+ code.
68
+
69
+ > We use the term "known errors" because standalone functions, and JavaScript
70
+ > code in general, can still throw unexpected errors such as `TypeError`s,
71
+ > `RangeError`s and `DOMException`s. Exhaustively catching all errors may be
72
+ > something this SDK addresses in the future. Nevertheless, there is still a lot
73
+ > of benefit from capturing most errors and turning them into values.
74
+
75
+ The second reason for this style of programming is because these functions will
76
+ typically be used in front-end applications where exception throwing is
77
+ sometimes discouraged or considered unidiomatic. React and similar ecosystems
78
+ and libraries tend to promote this style of programming so that components
79
+ render useful content under all states (loading, success, error and so on).
80
+
81
+ The general pattern when calling standalone functions looks like this:
82
+
83
+ ```typescript
84
+ import { Core } from "<sdk-package-name>";
85
+ import { fetchSomething } from "<sdk-package-name>/funcs/fetchSomething.js";
86
+
87
+ const client = new Core();
88
+
89
+ async function run() {
90
+ const result = await fetchSomething(client, { id: "123" });
91
+ if (!result.ok) {
92
+ // You can throw the error or handle it. It's your choice now.
93
+ throw result.error;
94
+ }
95
+
96
+ console.log(result.value);
97
+ }
98
+
99
+ run();
100
+ ```
101
+
102
+ Notably, `result.error` above will have an explicit type compared to a try-catch
103
+ variation where the error in the catch block can only be of type `unknown` (or
104
+ `any` depending on your TypeScript settings).
package/README.md ADDED
@@ -0,0 +1,440 @@
1
+ # vanta-auditor-api-sdk
2
+
3
+ Developer-friendly & type-safe Typescript SDK specifically catered to leverage *vanta-auditor-api-sdk* API.
4
+
5
+ <div align="left">
6
+ <a href="https://www.speakeasy.com/?utm_source=vanta-auditor-api-sdk&utm_campaign=typescript"><img src="https://custom-icon-badges.demolab.com/badge/-Built%20By%20Speakeasy-212015?style=for-the-badge&logoColor=FBE331&logo=speakeasy&labelColor=545454" /></a>
7
+ <a href="https://opensource.org/licenses/MIT">
8
+ <img src="https://img.shields.io/badge/License-MIT-blue.svg" style="width: 100px; height: 28px;" />
9
+ </a>
10
+ </div>
11
+
12
+
13
+ <br /><br />
14
+ > [!IMPORTANT]
15
+ > This SDK is not yet ready for production use. To complete setup please follow the steps outlined in your [workspace](https://app.speakeasy.com/org/vanta/vanta). Delete this section before > publishing to a package manager.
16
+
17
+ <!-- Start Summary [summary] -->
18
+ ## Summary
19
+
20
+ Conduct an audit: The Auditor API lets audit firms conduct audits from a tool outside of Vanta. Unlock data syncing with Vanta through this API.
21
+ <!-- End Summary [summary] -->
22
+
23
+ <!-- Start Table of Contents [toc] -->
24
+ ## Table of Contents
25
+ <!-- $toc-max-depth=2 -->
26
+ * [vanta-auditor-api-sdk](#vanta-auditor-api-sdk)
27
+ * [SDK Installation](#sdk-installation)
28
+ * [Requirements](#requirements)
29
+ * [SDK Example Usage](#sdk-example-usage)
30
+ * [Authentication](#authentication)
31
+ * [Available Resources and Operations](#available-resources-and-operations)
32
+ * [Standalone functions](#standalone-functions)
33
+ * [Retries](#retries)
34
+ * [Error Handling](#error-handling)
35
+ * [Server Selection](#server-selection)
36
+ * [Custom HTTP Client](#custom-http-client)
37
+ * [Debugging](#debugging)
38
+ * [Development](#development)
39
+ * [Maturity](#maturity)
40
+ * [Contributions](#contributions)
41
+
42
+ <!-- End Table of Contents [toc] -->
43
+
44
+ <!-- Start SDK Installation [installation] -->
45
+ ## SDK Installation
46
+
47
+ > [!TIP]
48
+ > To finish publishing your SDK to npm and others you must [run your first generation action](https://www.speakeasy.com/docs/github-setup#step-by-step-guide).
49
+
50
+
51
+ The SDK can be installed with either [npm](https://www.npmjs.com/), [pnpm](https://pnpm.io/), [bun](https://bun.sh/) or [yarn](https://classic.yarnpkg.com/en/) package managers.
52
+
53
+ ### NPM
54
+
55
+ ```bash
56
+ npm add <UNSET>
57
+ ```
58
+
59
+ ### PNPM
60
+
61
+ ```bash
62
+ pnpm add <UNSET>
63
+ ```
64
+
65
+ ### Bun
66
+
67
+ ```bash
68
+ bun add <UNSET>
69
+ ```
70
+
71
+ ### Yarn
72
+
73
+ ```bash
74
+ yarn add <UNSET> zod
75
+
76
+ # Note that Yarn does not install peer dependencies automatically. You will need
77
+ # to install zod as shown above.
78
+ ```
79
+ <!-- End SDK Installation [installation] -->
80
+
81
+ <!-- Start Requirements [requirements] -->
82
+ ## Requirements
83
+
84
+ For supported JavaScript runtimes, please consult [RUNTIMES.md](RUNTIMES.md).
85
+ <!-- End Requirements [requirements] -->
86
+
87
+ <!-- Start SDK Example Usage [usage] -->
88
+ ## SDK Example Usage
89
+
90
+ ### Example
91
+
92
+ ```typescript
93
+ import { Vanta } from "vanta-auditor-api-sdk";
94
+
95
+ const vanta = new Vanta({
96
+ bearerAuth: process.env["VANTA_BEARER_AUTH"] ?? "",
97
+ });
98
+
99
+ async function run() {
100
+ const result = await vanta.audits.list({});
101
+
102
+ // Handle the result
103
+ console.log(result);
104
+ }
105
+
106
+ run();
107
+
108
+ ```
109
+ <!-- End SDK Example Usage [usage] -->
110
+
111
+ <!-- Start Authentication [security] -->
112
+ ## Authentication
113
+
114
+ ### Per-Client Security Schemes
115
+
116
+ This SDK supports the following security scheme globally:
117
+
118
+ | Name | Type | Scheme | Environment Variable |
119
+ | ------------ | ---- | ----------- | -------------------- |
120
+ | `bearerAuth` | http | HTTP Bearer | `VANTA_BEARER_AUTH` |
121
+
122
+ To authenticate with the API the `bearerAuth` parameter must be set when initializing the SDK client instance. For example:
123
+ ```typescript
124
+ import { Vanta } from "vanta-auditor-api-sdk";
125
+
126
+ const vanta = new Vanta({
127
+ bearerAuth: process.env["VANTA_BEARER_AUTH"] ?? "",
128
+ });
129
+
130
+ async function run() {
131
+ const result = await vanta.audits.list({});
132
+
133
+ // Handle the result
134
+ console.log(result);
135
+ }
136
+
137
+ run();
138
+
139
+ ```
140
+ <!-- End Authentication [security] -->
141
+
142
+ <!-- Start Available Resources and Operations [operations] -->
143
+ ## Available Resources and Operations
144
+
145
+ <details open>
146
+ <summary>Available methods</summary>
147
+
148
+ ### [auditors](docs/sdks/auditors/README.md)
149
+
150
+ * [create](docs/sdks/auditors/README.md#create) - Create an auditor
151
+
152
+ ### [audits](docs/sdks/audits/README.md)
153
+
154
+ * [list](docs/sdks/audits/README.md#list) - List audits
155
+ * [getEvidenceUrls](docs/sdks/audits/README.md#getevidenceurls) - List audit evidence url
156
+ * [listEvidence](docs/sdks/audits/README.md#listevidence) - List audit evidence
157
+ * [listComments](docs/sdks/audits/README.md#listcomments) - List audit comments
158
+ * [listControls](docs/sdks/audits/README.md#listcontrols) - List audit controls
159
+ * [createCommentForEvidence](docs/sdks/audits/README.md#createcommentforevidence) - Create a comment for audit evidence
160
+ * [updateEvidence](docs/sdks/audits/README.md#updateevidence) - Update audit evidence
161
+ * [createCustomEvidenceRequest](docs/sdks/audits/README.md#createcustomevidencerequest) - Create a custom evidence request for an audit
162
+ * [createCustomControl](docs/sdks/audits/README.md#createcustomcontrol) - Create a custom control for an audit
163
+
164
+
165
+ </details>
166
+ <!-- End Available Resources and Operations [operations] -->
167
+
168
+ <!-- Start Standalone functions [standalone-funcs] -->
169
+ ## Standalone functions
170
+
171
+ All the methods listed above are available as standalone functions. These
172
+ functions are ideal for use in applications running in the browser, serverless
173
+ runtimes or other environments where application bundle size is a primary
174
+ concern. When using a bundler to build your application, all unused
175
+ functionality will be either excluded from the final bundle or tree-shaken away.
176
+
177
+ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md).
178
+
179
+ <details>
180
+
181
+ <summary>Available standalone functions</summary>
182
+
183
+ - [`auditorsCreate`](docs/sdks/auditors/README.md#create) - Create an auditor
184
+ - [`auditsCreateCommentForEvidence`](docs/sdks/audits/README.md#createcommentforevidence) - Create a comment for audit evidence
185
+ - [`auditsCreateCustomControl`](docs/sdks/audits/README.md#createcustomcontrol) - Create a custom control for an audit
186
+ - [`auditsCreateCustomEvidenceRequest`](docs/sdks/audits/README.md#createcustomevidencerequest) - Create a custom evidence request for an audit
187
+ - [`auditsGetEvidenceUrls`](docs/sdks/audits/README.md#getevidenceurls) - List audit evidence url
188
+ - [`auditsList`](docs/sdks/audits/README.md#list) - List audits
189
+ - [`auditsListComments`](docs/sdks/audits/README.md#listcomments) - List audit comments
190
+ - [`auditsListControls`](docs/sdks/audits/README.md#listcontrols) - List audit controls
191
+ - [`auditsListEvidence`](docs/sdks/audits/README.md#listevidence) - List audit evidence
192
+ - [`auditsUpdateEvidence`](docs/sdks/audits/README.md#updateevidence) - Update audit evidence
193
+
194
+ </details>
195
+ <!-- End Standalone functions [standalone-funcs] -->
196
+
197
+ <!-- Start Retries [retries] -->
198
+ ## Retries
199
+
200
+ Some of the endpoints in this SDK support retries. If you use the SDK without any configuration, it will fall back to the default retry strategy provided by the API. However, the default retry strategy can be overridden on a per-operation basis, or across the entire SDK.
201
+
202
+ To change the default retry strategy for a single API call, simply provide a retryConfig object to the call:
203
+ ```typescript
204
+ import { Vanta } from "vanta-auditor-api-sdk";
205
+
206
+ const vanta = new Vanta({
207
+ bearerAuth: process.env["VANTA_BEARER_AUTH"] ?? "",
208
+ });
209
+
210
+ async function run() {
211
+ const result = await vanta.audits.list({}, {
212
+ retries: {
213
+ strategy: "backoff",
214
+ backoff: {
215
+ initialInterval: 1,
216
+ maxInterval: 50,
217
+ exponent: 1.1,
218
+ maxElapsedTime: 100,
219
+ },
220
+ retryConnectionErrors: false,
221
+ },
222
+ });
223
+
224
+ // Handle the result
225
+ console.log(result);
226
+ }
227
+
228
+ run();
229
+
230
+ ```
231
+
232
+ If you'd like to override the default retry strategy for all operations that support retries, you can provide a retryConfig at SDK initialization:
233
+ ```typescript
234
+ import { Vanta } from "vanta-auditor-api-sdk";
235
+
236
+ const vanta = new Vanta({
237
+ retryConfig: {
238
+ strategy: "backoff",
239
+ backoff: {
240
+ initialInterval: 1,
241
+ maxInterval: 50,
242
+ exponent: 1.1,
243
+ maxElapsedTime: 100,
244
+ },
245
+ retryConnectionErrors: false,
246
+ },
247
+ bearerAuth: process.env["VANTA_BEARER_AUTH"] ?? "",
248
+ });
249
+
250
+ async function run() {
251
+ const result = await vanta.audits.list({});
252
+
253
+ // Handle the result
254
+ console.log(result);
255
+ }
256
+
257
+ run();
258
+
259
+ ```
260
+ <!-- End Retries [retries] -->
261
+
262
+ <!-- Start Error Handling [errors] -->
263
+ ## Error Handling
264
+
265
+ If the request fails due to, for example 4XX or 5XX status codes, it will throw a `APIError`.
266
+
267
+ | Error Type | Status Code | Content Type |
268
+ | --------------- | ----------- | ------------ |
269
+ | errors.APIError | 4XX, 5XX | \*/\* |
270
+
271
+ ```typescript
272
+ import { Vanta } from "vanta-auditor-api-sdk";
273
+ import { SDKValidationError } from "vanta-auditor-api-sdk/models/errors";
274
+
275
+ const vanta = new Vanta({
276
+ bearerAuth: process.env["VANTA_BEARER_AUTH"] ?? "",
277
+ });
278
+
279
+ async function run() {
280
+ let result;
281
+ try {
282
+ result = await vanta.audits.list({});
283
+
284
+ // Handle the result
285
+ console.log(result);
286
+ } catch (err) {
287
+ switch (true) {
288
+ // The server response does not match the expected SDK schema
289
+ case (err instanceof SDKValidationError):
290
+ {
291
+ // Pretty-print will provide a human-readable multi-line error message
292
+ console.error(err.pretty());
293
+ // Raw value may also be inspected
294
+ console.error(err.rawValue);
295
+ return;
296
+ }
297
+ apierror.js;
298
+ // Server returned an error status code or an unknown content type
299
+ case (err instanceof APIError): {
300
+ console.error(err.statusCode);
301
+ console.error(err.rawResponse.body);
302
+ return;
303
+ }
304
+ default: {
305
+ // Other errors such as network errors, see HTTPClientErrors for more details
306
+ throw err;
307
+ }
308
+ }
309
+ }
310
+ }
311
+
312
+ run();
313
+
314
+ ```
315
+
316
+ Validation errors can also occur when either method arguments or data returned from the server do not match the expected format. The `SDKValidationError` that is thrown as a result will capture the raw value that failed validation in an attribute called `rawValue`. Additionally, a `pretty()` method is available on this error that can be used to log a nicely formatted multi-line string since validation errors can list many issues and the plain error string may be difficult read when debugging.
317
+
318
+ In some rare cases, the SDK can fail to get a response from the server or even make the request due to unexpected circumstances such as network conditions. These types of errors are captured in the `models/errors/httpclienterrors.ts` module:
319
+
320
+ | HTTP Client Error | Description |
321
+ | ---------------------------------------------------- | ---------------------------------------------------- |
322
+ | RequestAbortedError | HTTP request was aborted by the client |
323
+ | RequestTimeoutError | HTTP request timed out due to an AbortSignal signal |
324
+ | ConnectionError | HTTP client was unable to make a request to a server |
325
+ | InvalidRequestError | Any input used to create a request is invalid |
326
+ | UnexpectedClientError | Unrecognised or unexpected error |
327
+ <!-- End Error Handling [errors] -->
328
+
329
+ <!-- Start Server Selection [server] -->
330
+ ## Server Selection
331
+
332
+ ### Override Server URL Per-Client
333
+
334
+ The default server can also be overridden globally by passing a URL to the `serverURL: string` optional parameter when initializing the SDK client instance. For example:
335
+ ```typescript
336
+ import { Vanta } from "vanta-auditor-api-sdk";
337
+
338
+ const vanta = new Vanta({
339
+ serverURL: "https://api.vanta.com/v1",
340
+ bearerAuth: process.env["VANTA_BEARER_AUTH"] ?? "",
341
+ });
342
+
343
+ async function run() {
344
+ const result = await vanta.audits.list({});
345
+
346
+ // Handle the result
347
+ console.log(result);
348
+ }
349
+
350
+ run();
351
+
352
+ ```
353
+ <!-- End Server Selection [server] -->
354
+
355
+ <!-- Start Custom HTTP Client [http-client] -->
356
+ ## Custom HTTP Client
357
+
358
+ The TypeScript SDK makes API calls using an `HTTPClient` that wraps the native
359
+ [Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API). This
360
+ client is a thin wrapper around `fetch` and provides the ability to attach hooks
361
+ around the request lifecycle that can be used to modify the request or handle
362
+ errors and response.
363
+
364
+ The `HTTPClient` constructor takes an optional `fetcher` argument that can be
365
+ used to integrate a third-party HTTP client or when writing tests to mock out
366
+ the HTTP client and feed in fixtures.
367
+
368
+ The following example shows how to use the `"beforeRequest"` hook to to add a
369
+ custom header and a timeout to requests and how to use the `"requestError"` hook
370
+ to log errors:
371
+
372
+ ```typescript
373
+ import { Vanta } from "vanta-auditor-api-sdk";
374
+ import { HTTPClient } from "vanta-auditor-api-sdk/lib/http";
375
+
376
+ const httpClient = new HTTPClient({
377
+ // fetcher takes a function that has the same signature as native `fetch`.
378
+ fetcher: (request) => {
379
+ return fetch(request);
380
+ }
381
+ });
382
+
383
+ httpClient.addHook("beforeRequest", (request) => {
384
+ const nextRequest = new Request(request, {
385
+ signal: request.signal || AbortSignal.timeout(5000)
386
+ });
387
+
388
+ nextRequest.headers.set("x-custom-header", "custom value");
389
+
390
+ return nextRequest;
391
+ });
392
+
393
+ httpClient.addHook("requestError", (error, request) => {
394
+ console.group("Request Error");
395
+ console.log("Reason:", `${error}`);
396
+ console.log("Endpoint:", `${request.method} ${request.url}`);
397
+ console.groupEnd();
398
+ });
399
+
400
+ const sdk = new Vanta({ httpClient });
401
+ ```
402
+ <!-- End Custom HTTP Client [http-client] -->
403
+
404
+ <!-- Start Debugging [debug] -->
405
+ ## Debugging
406
+
407
+ You can setup your SDK to emit debug logs for SDK requests and responses.
408
+
409
+ You can pass a logger that matches `console`'s interface as an SDK option.
410
+
411
+ > [!WARNING]
412
+ > Beware that debug logging will reveal secrets, like API tokens in headers, in log messages printed to a console or files. It's recommended to use this feature only during local development and not in production.
413
+
414
+ ```typescript
415
+ import { Vanta } from "vanta-auditor-api-sdk";
416
+
417
+ const sdk = new Vanta({ debugLogger: console });
418
+ ```
419
+
420
+ You can also enable a default debug logger by setting an environment variable `VANTA_DEBUG` to true.
421
+ <!-- End Debugging [debug] -->
422
+
423
+ <!-- Placeholder for Future Speakeasy SDK Sections -->
424
+
425
+ # Development
426
+
427
+ ## Maturity
428
+
429
+ This SDK is in beta, and there may be breaking changes between versions without a major version update. Therefore, we recommend pinning usage
430
+ to a specific package version. This way, you can install the same version each time without breaking changes unless you are intentionally
431
+ looking for the latest version.
432
+
433
+ ## Contributions
434
+
435
+ While we value open-source contributions to this SDK, this library is generated programmatically. Any manual changes added to internal files will be overwritten on the next generation.
436
+ We look forward to hearing your feedback. Feel free to open a PR or an issue with a proof of concept and we'll do our best to include it in a future release.
437
+
438
+ ### SDK Created by [Speakeasy](https://www.speakeasy.com/?utm_source=vanta-auditor-api-sdk&utm_campaign=typescript)
439
+ # vanta-auditor-api-sdk-typescript
440
+ # vanta-auditor-api-sdk-typescript
package/RUNTIMES.md ADDED
@@ -0,0 +1,48 @@
1
+ # Supported JavaScript runtimes
2
+
3
+ This SDK is intended to be used in JavaScript runtimes that support ECMAScript 2020 or newer. The SDK uses the following features:
4
+
5
+ * [Web Fetch API][web-fetch]
6
+ * [Web Streams API][web-streams] and in particular `ReadableStream`
7
+ * [Async iterables][async-iter] using `Symbol.asyncIterator`
8
+
9
+ [web-fetch]: https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API
10
+ [web-streams]: https://developer.mozilla.org/en-US/docs/Web/API/Streams_API
11
+ [async-iter]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#the_async_iterator_and_async_iterable_protocols
12
+
13
+ Runtime environments that are explicitly supported are:
14
+
15
+ - Evergreen browsers which include: Chrome, Safari, Edge, Firefox
16
+ - Node.js active and maintenance LTS releases
17
+ - Currently, this is v18 and v20
18
+ - Bun v1 and above
19
+ - Deno v1.39
20
+ - Note that Deno does not currently have native support for streaming file uploads backed by the filesystem ([issue link][deno-file-streaming])
21
+
22
+ [deno-file-streaming]: https://github.com/denoland/deno/issues/11018
23
+
24
+ ## Recommended TypeScript compiler options
25
+
26
+ The following `tsconfig.json` options are recommended for projects using this
27
+ SDK in order to get static type support for features like async iterables,
28
+ streams and `fetch`-related APIs ([`for await...of`][for-await-of],
29
+ [`AbortSignal`][abort-signal], [`Request`][request], [`Response`][response] and
30
+ so on):
31
+
32
+ [for-await-of]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of
33
+ [abort-signal]: https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal
34
+ [request]: https://developer.mozilla.org/en-US/docs/Web/API/Request
35
+ [response]: https://developer.mozilla.org/en-US/docs/Web/API/Response
36
+
37
+ ```jsonc
38
+ {
39
+ "compilerOptions": {
40
+ "target": "es2020", // or higher
41
+ "lib": ["es2020", "dom", "dom.iterable"],
42
+ }
43
+ }
44
+ ```
45
+
46
+ While `target` can be set to older ECMAScript versions, it may result in extra,
47
+ unnecessary compatibility code being generated if you are not targeting old
48
+ runtimes.
package/core.d.ts ADDED
@@ -0,0 +1,10 @@
1
+ import { ClientSDK } from "./lib/sdks.js";
2
+ /**
3
+ * A minimal client to use when calling standalone SDK functions. Typically, an
4
+ * instance of this class would be instantiated once at the start of an
5
+ * application and passed around through some dependency injection mechanism to
6
+ * parts of an application that need to make SDK calls.
7
+ */
8
+ export declare class VantaCore extends ClientSDK {
9
+ }
10
+ //# sourceMappingURL=core.d.ts.map
package/core.d.ts.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"core.d.ts","sourceRoot":"","sources":["src/core.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C;;;;;GAKG;AACH,qBAAa,SAAU,SAAQ,SAAS;CAAG"}
package/core.js ADDED
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ /*
3
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.VantaCore = void 0;
7
+ const sdks_js_1 = require("./lib/sdks.js");
8
+ /**
9
+ * A minimal client to use when calling standalone SDK functions. Typically, an
10
+ * instance of this class would be instantiated once at the start of an
11
+ * application and passed around through some dependency injection mechanism to
12
+ * parts of an application that need to make SDK calls.
13
+ */
14
+ class VantaCore extends sdks_js_1.ClientSDK {
15
+ }
16
+ exports.VantaCore = VantaCore;
17
+ //# sourceMappingURL=core.js.map
package/core.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"core.js","sourceRoot":"","sources":["src/core.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,2CAA0C;AAE1C;;;;;GAKG;AACH,MAAa,SAAU,SAAQ,mBAAS;CAAG;AAA3C,8BAA2C"}