@trycompai/mcp-server 0.1.0 → 0.2.0

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 (226) hide show
  1. package/README.md +2 -2
  2. package/bin/mcp-server.js +3550 -2509
  3. package/bin/mcp-server.js.map +43 -21
  4. package/esm/funcs/cloudSecurityCloudSecurityControllerResolveSessionV1.d.ts +16 -0
  5. package/esm/funcs/cloudSecurityCloudSecurityControllerResolveSessionV1.d.ts.map +1 -0
  6. package/esm/funcs/cloudSecurityCloudSecurityControllerResolveSessionV1.js +87 -0
  7. package/esm/funcs/cloudSecurityCloudSecurityControllerResolveSessionV1.js.map +1 -0
  8. package/esm/funcs/evidenceExportAuditorAuditorEvidenceExportControllerExportAllEvidenceV1.d.ts +2 -2
  9. package/esm/funcs/evidenceExportAuditorAuditorEvidenceExportControllerExportAllEvidenceV1.js +3 -3
  10. package/esm/funcs/evidenceExportAuditorAuditorEvidenceExportControllerExportAllEvidenceV1.js.map +1 -1
  11. package/esm/funcs/securityPenetrationTestsPentestFindingContextsControllerListV1.d.ts +18 -0
  12. package/esm/funcs/securityPenetrationTestsPentestFindingContextsControllerListV1.d.ts.map +1 -0
  13. package/esm/funcs/securityPenetrationTestsPentestFindingContextsControllerListV1.js +88 -0
  14. package/esm/funcs/securityPenetrationTestsPentestFindingContextsControllerListV1.js.map +1 -0
  15. package/esm/funcs/securityPenetrationTestsPentestFindingContextsControllerRemoveV1.d.ts +18 -0
  16. package/esm/funcs/securityPenetrationTestsPentestFindingContextsControllerRemoveV1.d.ts.map +1 -0
  17. package/esm/funcs/securityPenetrationTestsPentestFindingContextsControllerRemoveV1.js +90 -0
  18. package/esm/funcs/securityPenetrationTestsPentestFindingContextsControllerRemoveV1.js.map +1 -0
  19. package/esm/funcs/securityPenetrationTestsPentestFindingContextsControllerUpsertV1.d.ts +18 -0
  20. package/esm/funcs/securityPenetrationTestsPentestFindingContextsControllerUpsertV1.d.ts.map +1 -0
  21. package/esm/funcs/securityPenetrationTestsPentestFindingContextsControllerUpsertV1.js +91 -0
  22. package/esm/funcs/securityPenetrationTestsPentestFindingContextsControllerUpsertV1.js.map +1 -0
  23. package/esm/funcs/taskAutomationsAutomationsControllerCreateVersionV1.js +3 -2
  24. package/esm/funcs/taskAutomationsAutomationsControllerCreateVersionV1.js.map +1 -1
  25. package/esm/funcs/trustAccessTrustAccessControllerGetPublicCustomFrameworksV1.d.ts +16 -0
  26. package/esm/funcs/trustAccessTrustAccessControllerGetPublicCustomFrameworksV1.d.ts.map +1 -0
  27. package/esm/funcs/trustAccessTrustAccessControllerGetPublicCustomFrameworksV1.js +87 -0
  28. package/esm/funcs/trustAccessTrustAccessControllerGetPublicCustomFrameworksV1.js.map +1 -0
  29. package/esm/funcs/trustPortalTrustPortalControllerListCustomFrameworksV1.d.ts +17 -0
  30. package/esm/funcs/trustPortalTrustPortalControllerListCustomFrameworksV1.d.ts.map +1 -0
  31. package/esm/funcs/trustPortalTrustPortalControllerListCustomFrameworksV1.js +73 -0
  32. package/esm/funcs/trustPortalTrustPortalControllerListCustomFrameworksV1.js.map +1 -0
  33. package/esm/funcs/trustPortalTrustPortalControllerUpdateAllowedEmailsV1.d.ts +18 -0
  34. package/esm/funcs/trustPortalTrustPortalControllerUpdateAllowedEmailsV1.d.ts.map +1 -0
  35. package/esm/funcs/trustPortalTrustPortalControllerUpdateAllowedEmailsV1.js +84 -0
  36. package/esm/funcs/trustPortalTrustPortalControllerUpdateAllowedEmailsV1.js.map +1 -0
  37. package/esm/funcs/trustPortalTrustPortalControllerUpdateCustomFrameworkV1.d.ts +18 -0
  38. package/esm/funcs/trustPortalTrustPortalControllerUpdateCustomFrameworkV1.d.ts.map +1 -0
  39. package/esm/funcs/trustPortalTrustPortalControllerUpdateCustomFrameworkV1.js +84 -0
  40. package/esm/funcs/trustPortalTrustPortalControllerUpdateCustomFrameworkV1.js.map +1 -0
  41. package/esm/landing-page.js +1 -1
  42. package/esm/lib/config.d.ts +3 -3
  43. package/esm/lib/config.js +3 -3
  44. package/esm/lib/encodings.js +1 -1
  45. package/esm/lib/encodings.js.map +1 -1
  46. package/esm/lib/env.d.ts.map +1 -1
  47. package/esm/lib/env.js +2 -2
  48. package/esm/lib/env.js.map +1 -1
  49. package/esm/lib/primitives.d.ts +1 -0
  50. package/esm/lib/primitives.d.ts.map +1 -1
  51. package/esm/lib/primitives.js +17 -0
  52. package/esm/lib/primitives.js.map +1 -1
  53. package/esm/mcp-server/mcp-server.js +1 -1
  54. package/esm/mcp-server/server.d.ts.map +1 -1
  55. package/esm/mcp-server/server.js +17 -1
  56. package/esm/mcp-server/server.js.map +1 -1
  57. package/esm/mcp-server/tools/cloudSecurityCloudSecurityControllerResolveSessionV1.d.ts +7 -0
  58. package/esm/mcp-server/tools/cloudSecurityCloudSecurityControllerResolveSessionV1.d.ts.map +1 -0
  59. package/esm/mcp-server/tools/cloudSecurityCloudSecurityControllerResolveSessionV1.js +34 -0
  60. package/esm/mcp-server/tools/cloudSecurityCloudSecurityControllerResolveSessionV1.js.map +1 -0
  61. package/esm/mcp-server/tools/evidenceExportAuditorAuditorEvidenceExportControllerExportAllEvidenceV1.js +2 -2
  62. package/esm/mcp-server/tools/evidenceExportAuditorAuditorEvidenceExportControllerExportAllEvidenceV1.js.map +1 -1
  63. package/esm/mcp-server/tools/securityPenetrationTestsPentestFindingContextsControllerListV1.d.ts +7 -0
  64. package/esm/mcp-server/tools/securityPenetrationTestsPentestFindingContextsControllerListV1.d.ts.map +1 -0
  65. package/esm/mcp-server/tools/securityPenetrationTestsPentestFindingContextsControllerListV1.js +34 -0
  66. package/esm/mcp-server/tools/securityPenetrationTestsPentestFindingContextsControllerListV1.js.map +1 -0
  67. package/esm/mcp-server/tools/securityPenetrationTestsPentestFindingContextsControllerRemoveV1.d.ts +7 -0
  68. package/esm/mcp-server/tools/securityPenetrationTestsPentestFindingContextsControllerRemoveV1.d.ts.map +1 -0
  69. package/esm/mcp-server/tools/securityPenetrationTestsPentestFindingContextsControllerRemoveV1.js +34 -0
  70. package/esm/mcp-server/tools/securityPenetrationTestsPentestFindingContextsControllerRemoveV1.js.map +1 -0
  71. package/esm/mcp-server/tools/securityPenetrationTestsPentestFindingContextsControllerUpsertV1.d.ts +7 -0
  72. package/esm/mcp-server/tools/securityPenetrationTestsPentestFindingContextsControllerUpsertV1.d.ts.map +1 -0
  73. package/esm/mcp-server/tools/securityPenetrationTestsPentestFindingContextsControllerUpsertV1.js +34 -0
  74. package/esm/mcp-server/tools/securityPenetrationTestsPentestFindingContextsControllerUpsertV1.js.map +1 -0
  75. package/esm/mcp-server/tools/trustAccessTrustAccessControllerGetPublicCustomFrameworksV1.d.ts +7 -0
  76. package/esm/mcp-server/tools/trustAccessTrustAccessControllerGetPublicCustomFrameworksV1.d.ts.map +1 -0
  77. package/esm/mcp-server/tools/trustAccessTrustAccessControllerGetPublicCustomFrameworksV1.js +34 -0
  78. package/esm/mcp-server/tools/trustAccessTrustAccessControllerGetPublicCustomFrameworksV1.js.map +1 -0
  79. package/esm/mcp-server/tools/trustPortalTrustPortalControllerListCustomFrameworksV1.d.ts +3 -0
  80. package/esm/mcp-server/tools/trustPortalTrustPortalControllerListCustomFrameworksV1.d.ts.map +1 -0
  81. package/esm/mcp-server/tools/trustPortalTrustPortalControllerListCustomFrameworksV1.js +29 -0
  82. package/esm/mcp-server/tools/trustPortalTrustPortalControllerListCustomFrameworksV1.js.map +1 -0
  83. package/esm/mcp-server/tools/trustPortalTrustPortalControllerUpdateAllowedEmailsV1.d.ts +7 -0
  84. package/esm/mcp-server/tools/trustPortalTrustPortalControllerUpdateAllowedEmailsV1.d.ts.map +1 -0
  85. package/esm/mcp-server/tools/trustPortalTrustPortalControllerUpdateAllowedEmailsV1.js +34 -0
  86. package/esm/mcp-server/tools/trustPortalTrustPortalControllerUpdateAllowedEmailsV1.js.map +1 -0
  87. package/esm/mcp-server/tools/trustPortalTrustPortalControllerUpdateCustomFrameworkV1.d.ts +7 -0
  88. package/esm/mcp-server/tools/trustPortalTrustPortalControllerUpdateCustomFrameworkV1.d.ts.map +1 -0
  89. package/esm/mcp-server/tools/trustPortalTrustPortalControllerUpdateCustomFrameworkV1.js +35 -0
  90. package/esm/mcp-server/tools/trustPortalTrustPortalControllerUpdateCustomFrameworkV1.js.map +1 -0
  91. package/esm/models/automationscontrollercreateversionv1op.d.ts +2 -0
  92. package/esm/models/automationscontrollercreateversionv1op.d.ts.map +1 -1
  93. package/esm/models/automationscontrollercreateversionv1op.js +2 -0
  94. package/esm/models/automationscontrollercreateversionv1op.js.map +1 -1
  95. package/esm/models/cloudsecuritycontrollerresolvesessionv1op.d.ts +6 -0
  96. package/esm/models/cloudsecuritycontrollerresolvesessionv1op.d.ts.map +1 -0
  97. package/esm/models/cloudsecuritycontrollerresolvesessionv1op.js +8 -0
  98. package/esm/models/cloudsecuritycontrollerresolvesessionv1op.js.map +1 -0
  99. package/esm/models/complianceresourceresponsedto.d.ts +13 -1
  100. package/esm/models/complianceresourceresponsedto.d.ts.map +1 -1
  101. package/esm/models/complianceresourceresponsedto.js +10 -2
  102. package/esm/models/complianceresourceresponsedto.js.map +1 -1
  103. package/esm/models/complianceresourcesignedurldto.d.ts +4 -3
  104. package/esm/models/complianceresourcesignedurldto.d.ts.map +1 -1
  105. package/esm/models/complianceresourcesignedurldto.js +5 -3
  106. package/esm/models/complianceresourcesignedurldto.js.map +1 -1
  107. package/esm/models/controlscontrollerunlinkdocumenttypev1op.d.ts +3 -1
  108. package/esm/models/controlscontrollerunlinkdocumenttypev1op.d.ts.map +1 -1
  109. package/esm/models/controlscontrollerunlinkdocumenttypev1op.js +2 -0
  110. package/esm/models/controlscontrollerunlinkdocumenttypev1op.js.map +1 -1
  111. package/esm/models/createcontroldto.d.ts +2 -0
  112. package/esm/models/createcontroldto.d.ts.map +1 -1
  113. package/esm/models/createcontroldto.js +2 -0
  114. package/esm/models/createcontroldto.js.map +1 -1
  115. package/esm/models/createfindingdto.d.ts +2 -0
  116. package/esm/models/createfindingdto.d.ts.map +1 -1
  117. package/esm/models/createfindingdto.js +2 -0
  118. package/esm/models/createfindingdto.js.map +1 -1
  119. package/esm/models/createpenetrationtestdto.d.ts +1 -0
  120. package/esm/models/createpenetrationtestdto.d.ts.map +1 -1
  121. package/esm/models/createpenetrationtestdto.js +1 -0
  122. package/esm/models/createpenetrationtestdto.js.map +1 -1
  123. package/esm/models/createversiondto.d.ts +2 -1
  124. package/esm/models/createversiondto.d.ts.map +1 -1
  125. package/esm/models/createversiondto.js +3 -2
  126. package/esm/models/createversiondto.js.map +1 -1
  127. package/esm/models/findingscontrollerlistfindingsv1op.d.ts +2 -0
  128. package/esm/models/findingscontrollerlistfindingsv1op.d.ts.map +1 -1
  129. package/esm/models/findingscontrollerlistfindingsv1op.js +2 -0
  130. package/esm/models/findingscontrollerlistfindingsv1op.js.map +1 -1
  131. package/esm/models/linkdocumenttypesdto.d.ts +2 -0
  132. package/esm/models/linkdocumenttypesdto.d.ts.map +1 -1
  133. package/esm/models/linkdocumenttypesdto.js +2 -0
  134. package/esm/models/linkdocumenttypesdto.js.map +1 -1
  135. package/esm/models/pentestfindingcontextscontrollerlistv1op.d.ts +7 -0
  136. package/esm/models/pentestfindingcontextscontrollerlistv1op.d.ts.map +1 -0
  137. package/esm/models/pentestfindingcontextscontrollerlistv1op.js +9 -0
  138. package/esm/models/pentestfindingcontextscontrollerlistv1op.js.map +1 -0
  139. package/esm/models/pentestfindingcontextscontrollerremovev1op.d.ts +7 -0
  140. package/esm/models/pentestfindingcontextscontrollerremovev1op.d.ts.map +1 -0
  141. package/esm/models/pentestfindingcontextscontrollerremovev1op.js +9 -0
  142. package/esm/models/pentestfindingcontextscontrollerremovev1op.js.map +1 -0
  143. package/esm/models/pentestfindingcontextscontrollerupsertv1op.d.ts +9 -0
  144. package/esm/models/pentestfindingcontextscontrollerupsertv1op.d.ts.map +1 -0
  145. package/esm/models/pentestfindingcontextscontrollerupsertv1op.js +11 -0
  146. package/esm/models/pentestfindingcontextscontrollerupsertv1op.js.map +1 -0
  147. package/esm/models/trustaccesscontrollergetpubliccustomframeworksv1op.d.ts +6 -0
  148. package/esm/models/trustaccesscontrollergetpubliccustomframeworksv1op.d.ts.map +1 -0
  149. package/esm/models/trustaccesscontrollergetpubliccustomframeworksv1op.js +8 -0
  150. package/esm/models/trustaccesscontrollergetpubliccustomframeworksv1op.js.map +1 -0
  151. package/esm/models/trustportalcontrollerupdatecustomframeworkv1op.d.ts +42 -0
  152. package/esm/models/trustportalcontrollerupdatecustomframeworkv1op.d.ts.map +1 -0
  153. package/esm/models/trustportalcontrollerupdatecustomframeworkv1op.js +44 -0
  154. package/esm/models/trustportalcontrollerupdatecustomframeworkv1op.js.map +1 -0
  155. package/esm/models/updateallowedemailsdto.d.ts +6 -0
  156. package/esm/models/updateallowedemailsdto.d.ts.map +1 -0
  157. package/esm/models/updateallowedemailsdto.js +8 -0
  158. package/esm/models/updateallowedemailsdto.js.map +1 -0
  159. package/esm/models/uploadcomplianceresourcedto.d.ts +4 -3
  160. package/esm/models/uploadcomplianceresourcedto.d.ts.map +1 -1
  161. package/esm/models/uploadcomplianceresourcedto.js +4 -3
  162. package/esm/models/uploadcomplianceresourcedto.js.map +1 -1
  163. package/esm/models/upsertfindingcontextdto.d.ts +7 -0
  164. package/esm/models/upsertfindingcontextdto.d.ts.map +1 -0
  165. package/esm/models/upsertfindingcontextdto.js +9 -0
  166. package/esm/models/upsertfindingcontextdto.js.map +1 -0
  167. package/esm/tool-names.d.ts.map +1 -1
  168. package/esm/tool-names.js +33 -1
  169. package/esm/tool-names.js.map +1 -1
  170. package/package.json +1 -1
  171. package/src/funcs/cloudSecurityCloudSecurityControllerResolveSessionV1.ts +153 -0
  172. package/src/funcs/evidenceExportAuditorAuditorEvidenceExportControllerExportAllEvidenceV1.ts +3 -3
  173. package/src/funcs/securityPenetrationTestsPentestFindingContextsControllerListV1.ts +155 -0
  174. package/src/funcs/securityPenetrationTestsPentestFindingContextsControllerRemoveV1.ts +160 -0
  175. package/src/funcs/securityPenetrationTestsPentestFindingContextsControllerUpsertV1.ts +161 -0
  176. package/src/funcs/taskAutomationsAutomationsControllerCreateVersionV1.ts +3 -2
  177. package/src/funcs/trustAccessTrustAccessControllerGetPublicCustomFrameworksV1.ts +155 -0
  178. package/src/funcs/trustPortalTrustPortalControllerListCustomFrameworksV1.ts +125 -0
  179. package/src/funcs/trustPortalTrustPortalControllerUpdateAllowedEmailsV1.ts +146 -0
  180. package/src/funcs/trustPortalTrustPortalControllerUpdateCustomFrameworkV1.ts +149 -0
  181. package/src/landing-page.ts +1 -1
  182. package/src/lib/config.ts +3 -3
  183. package/src/lib/encodings.ts +1 -1
  184. package/src/lib/env.ts +6 -3
  185. package/src/lib/primitives.ts +16 -0
  186. package/src/mcp-server/mcp-server.ts +1 -1
  187. package/src/mcp-server/server.ts +17 -1
  188. package/src/mcp-server/tools/cloudSecurityCloudSecurityControllerResolveSessionV1.ts +45 -0
  189. package/src/mcp-server/tools/evidenceExportAuditorAuditorEvidenceExportControllerExportAllEvidenceV1.ts +2 -2
  190. package/src/mcp-server/tools/securityPenetrationTestsPentestFindingContextsControllerListV1.ts +44 -0
  191. package/src/mcp-server/tools/securityPenetrationTestsPentestFindingContextsControllerRemoveV1.ts +44 -0
  192. package/src/mcp-server/tools/securityPenetrationTestsPentestFindingContextsControllerUpsertV1.ts +44 -0
  193. package/src/mcp-server/tools/trustAccessTrustAccessControllerGetPublicCustomFrameworksV1.ts +44 -0
  194. package/src/mcp-server/tools/trustPortalTrustPortalControllerListCustomFrameworksV1.ts +38 -0
  195. package/src/mcp-server/tools/trustPortalTrustPortalControllerUpdateAllowedEmailsV1.ts +44 -0
  196. package/src/mcp-server/tools/trustPortalTrustPortalControllerUpdateCustomFrameworkV1.ts +46 -0
  197. package/src/models/automationscontrollercreateversionv1op.ts +6 -0
  198. package/src/models/cloudsecuritycontrollerresolvesessionv1op.ts +14 -0
  199. package/src/models/complianceresourceresponsedto.ts +23 -3
  200. package/src/models/complianceresourcesignedurldto.ts +9 -6
  201. package/src/models/controlscontrollerunlinkdocumenttypev1op.ts +3 -1
  202. package/src/models/createcontroldto.ts +2 -0
  203. package/src/models/createfindingdto.ts +2 -0
  204. package/src/models/createpenetrationtestdto.ts +4 -0
  205. package/src/models/createversiondto.ts +6 -4
  206. package/src/models/findingscontrollerlistfindingsv1op.ts +2 -0
  207. package/src/models/linkdocumenttypesdto.ts +2 -0
  208. package/src/models/pentestfindingcontextscontrollerlistv1op.ts +19 -0
  209. package/src/models/pentestfindingcontextscontrollerremovev1op.ts +18 -0
  210. package/src/models/pentestfindingcontextscontrollerupsertv1op.ts +24 -0
  211. package/src/models/trustaccesscontrollergetpubliccustomframeworksv1op.ts +18 -0
  212. package/src/models/trustportalcontrollerupdatecustomframeworkv1op.ts +84 -0
  213. package/src/models/updateallowedemailsdto.ts +15 -0
  214. package/src/models/uploadcomplianceresourcedto.ts +10 -6
  215. package/src/models/upsertfindingcontextdto.ts +16 -0
  216. package/src/tool-names.ts +33 -1
  217. package/esm/lib/dlv.d.ts +0 -14
  218. package/esm/lib/dlv.d.ts.map +0 -1
  219. package/esm/lib/dlv.js +0 -46
  220. package/esm/lib/dlv.js.map +0 -1
  221. package/esm/lib/is-plain-object.d.ts +0 -2
  222. package/esm/lib/is-plain-object.d.ts.map +0 -1
  223. package/esm/lib/is-plain-object.js +0 -38
  224. package/esm/lib/is-plain-object.js.map +0 -1
  225. package/src/lib/dlv.ts +0 -53
  226. package/src/lib/is-plain-object.ts +0 -43
@@ -0,0 +1,153 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { CompAiCore } from "../core.js";
6
+ import { encodeSimple } from "../lib/encodings.js";
7
+ import { compactMap } from "../lib/primitives.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 {
13
+ CloudSecurityControllerResolveSessionV1Request,
14
+ CloudSecurityControllerResolveSessionV1Request$zodSchema,
15
+ } from "../models/cloudsecuritycontrollerresolvesessionv1op.js";
16
+ import { APIError } from "../models/errors/apierror.js";
17
+ import {
18
+ ConnectionError,
19
+ InvalidRequestError,
20
+ RequestAbortedError,
21
+ RequestTimeoutError,
22
+ UnexpectedClientError,
23
+ } from "../models/errors/httpclienterrors.js";
24
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
25
+ import { APICall, APIPromise } from "../types/async.js";
26
+ import { Result } from "../types/fp.js";
27
+
28
+ /**
29
+ * Resolve short-lived AWS credentials for a connection (internal only)
30
+ *
31
+ * @remarks
32
+ * Resolve short-lived AWS credentials for a connection (internal only) in Comp AI. Run AWS, Azure, and GCP cloud security scans, detect enabled services, review findings, and connect cloud posture results to compliance work.
33
+ */
34
+ export function cloudSecurityCloudSecurityControllerResolveSessionV1(
35
+ client$: CompAiCore,
36
+ request: CloudSecurityControllerResolveSessionV1Request,
37
+ options?: RequestOptions,
38
+ ): APIPromise<
39
+ Result<
40
+ Response,
41
+ | APIError
42
+ | SDKValidationError
43
+ | UnexpectedClientError
44
+ | InvalidRequestError
45
+ | RequestAbortedError
46
+ | RequestTimeoutError
47
+ | ConnectionError
48
+ >
49
+ > {
50
+ return new APIPromise($do(
51
+ client$,
52
+ request,
53
+ options,
54
+ ));
55
+ }
56
+
57
+ async function $do(
58
+ client$: CompAiCore,
59
+ request: CloudSecurityControllerResolveSessionV1Request,
60
+ options?: RequestOptions,
61
+ ): Promise<
62
+ [
63
+ Result<
64
+ Response,
65
+ | APIError
66
+ | SDKValidationError
67
+ | UnexpectedClientError
68
+ | InvalidRequestError
69
+ | RequestAbortedError
70
+ | RequestTimeoutError
71
+ | ConnectionError
72
+ >,
73
+ APICall,
74
+ ]
75
+ > {
76
+ const parsed$ = safeParse(
77
+ request,
78
+ (value$) =>
79
+ CloudSecurityControllerResolveSessionV1Request$zodSchema.parse(value$),
80
+ "Input validation failed",
81
+ );
82
+ if (!parsed$.ok) {
83
+ return [parsed$, { status: "invalid" }];
84
+ }
85
+ const payload$ = parsed$.value;
86
+ const body$ = null;
87
+
88
+ const pathParams$ = {
89
+ connectionId: encodeSimple("connectionId", payload$.connectionId, {
90
+ explode: false,
91
+ charEncoding: "percent",
92
+ }),
93
+ };
94
+ const path$ = pathToFunc("/v1/cloud-security/resolve-session/{connectionId}")(
95
+ pathParams$,
96
+ );
97
+
98
+ const headers$ = new Headers(compactMap({
99
+ Accept: "*/*",
100
+ }));
101
+ const securityInput = await extractSecurity(client$._options.security);
102
+ const requestSecurity = resolveGlobalSecurity(securityInput);
103
+
104
+ const context = {
105
+ options: client$._options,
106
+ baseURL: options?.serverURL ?? client$._baseURL ?? "",
107
+ operationID: "CloudSecurityController_resolveSession_v1",
108
+ oAuth2Scopes: null,
109
+ resolvedSecurity: requestSecurity,
110
+ securitySource: client$._options.security,
111
+ retryConfig: options?.retries
112
+ || client$._options.retryConfig
113
+ || { strategy: "none" },
114
+ retryCodes: options?.retryCodes || [
115
+ "429",
116
+ "500",
117
+ "502",
118
+ "503",
119
+ "504",
120
+ ],
121
+ };
122
+
123
+ const requestRes = client$._createRequest(context, {
124
+ security: requestSecurity,
125
+ method: "POST",
126
+ baseURL: options?.serverURL,
127
+ path: path$,
128
+ headers: headers$,
129
+ body: body$,
130
+ userAgent: client$._options.userAgent,
131
+ timeoutMs: options?.timeoutMs || client$._options.timeoutMs
132
+ || 120000,
133
+ }, options);
134
+ if (!requestRes.ok) {
135
+ return [requestRes, { status: "invalid" }];
136
+ }
137
+ const req$ = requestRes.value;
138
+
139
+ const doResult = await client$._do(req$, {
140
+ context,
141
+ errorCodes: [],
142
+ retryConfig: context.retryConfig,
143
+ retryCodes: context.retryCodes,
144
+ });
145
+ if (!doResult.ok) {
146
+ return [doResult, { status: "request-error", request: req$ }];
147
+ }
148
+ return [doResult, {
149
+ status: "complete",
150
+ "request": req$,
151
+ response: doResult.value,
152
+ }];
153
+ }
@@ -26,10 +26,10 @@ import { APICall, APIPromise } from "../types/async.js";
26
26
  import { Result } from "../types/fp.js";
27
27
 
28
28
  /**
29
- * Export all organization evidence as ZIP (Auditor only)
29
+ * Trigger bulk evidence export (Auditor only)
30
30
  *
31
31
  * @remarks
32
- * Export all organization evidence as ZIP (Auditor only) in Comp AI. Export all organization evidence for an auditor review package.
32
+ * Trigger bulk evidence export (Auditor only) in Comp AI. Export all organization evidence for an auditor review package.
33
33
  *
34
34
  * If set, this operation will use {@link Security.apikey} from the global security.
35
35
  */
@@ -123,7 +123,7 @@ async function $do(
123
123
 
124
124
  const requestRes = client$._createRequest(context, {
125
125
  security: requestSecurity,
126
- method: "GET",
126
+ method: "POST",
127
127
  baseURL: options?.serverURL,
128
128
  path: path$,
129
129
  headers: headers$,
@@ -0,0 +1,155 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { CompAiCore } from "../core.js";
6
+ import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
7
+ import { compactMap } from "../lib/primitives.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 { APIError } from "../models/errors/apierror.js";
13
+ import {
14
+ ConnectionError,
15
+ InvalidRequestError,
16
+ RequestAbortedError,
17
+ RequestTimeoutError,
18
+ UnexpectedClientError,
19
+ } from "../models/errors/httpclienterrors.js";
20
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
21
+ import {
22
+ PentestFindingContextsControllerListV1Request,
23
+ PentestFindingContextsControllerListV1Request$zodSchema,
24
+ } from "../models/pentestfindingcontextscontrollerlistv1op.js";
25
+ import { APICall, APIPromise } from "../types/async.js";
26
+ import { Result } from "../types/fp.js";
27
+
28
+ /**
29
+ * List pentest finding context notes
30
+ *
31
+ * @remarks
32
+ * Returns the customer-written context notes attached to pentest findings for a target URL. These notes are shared with the testing agent on future scans of the same target so retests are informed, not blind.
33
+ *
34
+ * If set, this operation will use {@link Security.apikey} from the global security.
35
+ */
36
+ export function securityPenetrationTestsPentestFindingContextsControllerListV1(
37
+ client$: CompAiCore,
38
+ request: PentestFindingContextsControllerListV1Request,
39
+ options?: RequestOptions,
40
+ ): APIPromise<
41
+ Result<
42
+ Response,
43
+ | APIError
44
+ | SDKValidationError
45
+ | UnexpectedClientError
46
+ | InvalidRequestError
47
+ | RequestAbortedError
48
+ | RequestTimeoutError
49
+ | ConnectionError
50
+ >
51
+ > {
52
+ return new APIPromise($do(
53
+ client$,
54
+ request,
55
+ options,
56
+ ));
57
+ }
58
+
59
+ async function $do(
60
+ client$: CompAiCore,
61
+ request: PentestFindingContextsControllerListV1Request,
62
+ options?: RequestOptions,
63
+ ): Promise<
64
+ [
65
+ Result<
66
+ Response,
67
+ | APIError
68
+ | SDKValidationError
69
+ | UnexpectedClientError
70
+ | InvalidRequestError
71
+ | RequestAbortedError
72
+ | RequestTimeoutError
73
+ | ConnectionError
74
+ >,
75
+ APICall,
76
+ ]
77
+ > {
78
+ const parsed$ = safeParse(
79
+ request,
80
+ (value$) =>
81
+ PentestFindingContextsControllerListV1Request$zodSchema.parse(value$),
82
+ "Input validation failed",
83
+ );
84
+ if (!parsed$.ok) {
85
+ return [parsed$, { status: "invalid" }];
86
+ }
87
+ const payload$ = parsed$.value;
88
+ const body$ = null;
89
+ const path$ = pathToFunc("/v1/pentest-finding-contexts")();
90
+ const query$ = encodeFormQuery({
91
+ "targetUrl": payload$.targetUrl,
92
+ });
93
+
94
+ const headers$ = new Headers(compactMap({
95
+ Accept: "*/*",
96
+ "X-Organization-Id": encodeSimple(
97
+ "X-Organization-Id",
98
+ payload$.xOrganizationId,
99
+ { explode: false, charEncoding: "none" },
100
+ ),
101
+ }));
102
+ const securityInput = await extractSecurity(client$._options.security);
103
+ const requestSecurity = resolveGlobalSecurity(securityInput, [0]);
104
+
105
+ const context = {
106
+ options: client$._options,
107
+ baseURL: options?.serverURL ?? client$._baseURL ?? "",
108
+ operationID: "PentestFindingContextsController_list_v1",
109
+ oAuth2Scopes: null,
110
+ resolvedSecurity: requestSecurity,
111
+ securitySource: client$._options.security,
112
+ retryConfig: options?.retries
113
+ || client$._options.retryConfig
114
+ || { strategy: "none" },
115
+ retryCodes: options?.retryCodes || [
116
+ "429",
117
+ "500",
118
+ "502",
119
+ "503",
120
+ "504",
121
+ ],
122
+ };
123
+
124
+ const requestRes = client$._createRequest(context, {
125
+ security: requestSecurity,
126
+ method: "GET",
127
+ baseURL: options?.serverURL,
128
+ path: path$,
129
+ headers: headers$,
130
+ query: query$,
131
+ body: body$,
132
+ userAgent: client$._options.userAgent,
133
+ timeoutMs: options?.timeoutMs || client$._options.timeoutMs
134
+ || 120000,
135
+ }, options);
136
+ if (!requestRes.ok) {
137
+ return [requestRes, { status: "invalid" }];
138
+ }
139
+ const req$ = requestRes.value;
140
+
141
+ const doResult = await client$._do(req$, {
142
+ context,
143
+ errorCodes: [],
144
+ retryConfig: context.retryConfig,
145
+ retryCodes: context.retryCodes,
146
+ });
147
+ if (!doResult.ok) {
148
+ return [doResult, { status: "request-error", request: req$ }];
149
+ }
150
+ return [doResult, {
151
+ status: "complete",
152
+ "request": req$,
153
+ response: doResult.value,
154
+ }];
155
+ }
@@ -0,0 +1,160 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { CompAiCore } from "../core.js";
6
+ import { encodeSimple } from "../lib/encodings.js";
7
+ import { compactMap } from "../lib/primitives.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 { APIError } from "../models/errors/apierror.js";
13
+ import {
14
+ ConnectionError,
15
+ InvalidRequestError,
16
+ RequestAbortedError,
17
+ RequestTimeoutError,
18
+ UnexpectedClientError,
19
+ } from "../models/errors/httpclienterrors.js";
20
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
21
+ import {
22
+ PentestFindingContextsControllerRemoveV1Request,
23
+ PentestFindingContextsControllerRemoveV1Request$zodSchema,
24
+ } from "../models/pentestfindingcontextscontrollerremovev1op.js";
25
+ import { APICall, APIPromise } from "../types/async.js";
26
+ import { Result } from "../types/fp.js";
27
+
28
+ /**
29
+ * Remove context from a pentest finding
30
+ *
31
+ * @remarks
32
+ * Deletes the customer context note attached to a pentest finding so future scans of the target no longer receive it from the testing agent briefing.
33
+ *
34
+ * If set, this operation will use {@link Security.apikey} from the global security.
35
+ */
36
+ export function securityPenetrationTestsPentestFindingContextsControllerRemoveV1(
37
+ client$: CompAiCore,
38
+ request: PentestFindingContextsControllerRemoveV1Request,
39
+ options?: RequestOptions,
40
+ ): APIPromise<
41
+ Result<
42
+ Response,
43
+ | APIError
44
+ | SDKValidationError
45
+ | UnexpectedClientError
46
+ | InvalidRequestError
47
+ | RequestAbortedError
48
+ | RequestTimeoutError
49
+ | ConnectionError
50
+ >
51
+ > {
52
+ return new APIPromise($do(
53
+ client$,
54
+ request,
55
+ options,
56
+ ));
57
+ }
58
+
59
+ async function $do(
60
+ client$: CompAiCore,
61
+ request: PentestFindingContextsControllerRemoveV1Request,
62
+ options?: RequestOptions,
63
+ ): Promise<
64
+ [
65
+ Result<
66
+ Response,
67
+ | APIError
68
+ | SDKValidationError
69
+ | UnexpectedClientError
70
+ | InvalidRequestError
71
+ | RequestAbortedError
72
+ | RequestTimeoutError
73
+ | ConnectionError
74
+ >,
75
+ APICall,
76
+ ]
77
+ > {
78
+ const parsed$ = safeParse(
79
+ request,
80
+ (value$) =>
81
+ PentestFindingContextsControllerRemoveV1Request$zodSchema.parse(value$),
82
+ "Input validation failed",
83
+ );
84
+ if (!parsed$.ok) {
85
+ return [parsed$, { status: "invalid" }];
86
+ }
87
+ const payload$ = parsed$.value;
88
+ const body$ = null;
89
+
90
+ const pathParams$ = {
91
+ issueId: encodeSimple("issueId", payload$.issueId, {
92
+ explode: false,
93
+ charEncoding: "percent",
94
+ }),
95
+ };
96
+ const path$ = pathToFunc("/v1/pentest-finding-contexts/{issueId}")(
97
+ pathParams$,
98
+ );
99
+
100
+ const headers$ = new Headers(compactMap({
101
+ Accept: "*/*",
102
+ "X-Organization-Id": encodeSimple(
103
+ "X-Organization-Id",
104
+ payload$.xOrganizationId,
105
+ { explode: false, charEncoding: "none" },
106
+ ),
107
+ }));
108
+ const securityInput = await extractSecurity(client$._options.security);
109
+ const requestSecurity = resolveGlobalSecurity(securityInput, [0]);
110
+
111
+ const context = {
112
+ options: client$._options,
113
+ baseURL: options?.serverURL ?? client$._baseURL ?? "",
114
+ operationID: "PentestFindingContextsController_remove_v1",
115
+ oAuth2Scopes: null,
116
+ resolvedSecurity: requestSecurity,
117
+ securitySource: client$._options.security,
118
+ retryConfig: options?.retries
119
+ || client$._options.retryConfig
120
+ || { strategy: "none" },
121
+ retryCodes: options?.retryCodes || [
122
+ "429",
123
+ "500",
124
+ "502",
125
+ "503",
126
+ "504",
127
+ ],
128
+ };
129
+
130
+ const requestRes = client$._createRequest(context, {
131
+ security: requestSecurity,
132
+ method: "DELETE",
133
+ baseURL: options?.serverURL,
134
+ path: path$,
135
+ headers: headers$,
136
+ body: body$,
137
+ userAgent: client$._options.userAgent,
138
+ timeoutMs: options?.timeoutMs || client$._options.timeoutMs
139
+ || 120000,
140
+ }, options);
141
+ if (!requestRes.ok) {
142
+ return [requestRes, { status: "invalid" }];
143
+ }
144
+ const req$ = requestRes.value;
145
+
146
+ const doResult = await client$._do(req$, {
147
+ context,
148
+ errorCodes: [],
149
+ retryConfig: context.retryConfig,
150
+ retryCodes: context.retryCodes,
151
+ });
152
+ if (!doResult.ok) {
153
+ return [doResult, { status: "request-error", request: req$ }];
154
+ }
155
+ return [doResult, {
156
+ status: "complete",
157
+ "request": req$,
158
+ response: doResult.value,
159
+ }];
160
+ }
@@ -0,0 +1,161 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { CompAiCore } from "../core.js";
6
+ import { encodeJSON, encodeSimple } from "../lib/encodings.js";
7
+ import { compactMap } from "../lib/primitives.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 { APIError } from "../models/errors/apierror.js";
13
+ import {
14
+ ConnectionError,
15
+ InvalidRequestError,
16
+ RequestAbortedError,
17
+ RequestTimeoutError,
18
+ UnexpectedClientError,
19
+ } from "../models/errors/httpclienterrors.js";
20
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
21
+ import {
22
+ PentestFindingContextsControllerUpsertV1Request,
23
+ PentestFindingContextsControllerUpsertV1Request$zodSchema,
24
+ } from "../models/pentestfindingcontextscontrollerupsertv1op.js";
25
+ import { APICall, APIPromise } from "../types/async.js";
26
+ import { Result } from "../types/fp.js";
27
+
28
+ /**
29
+ * Add context to a pentest finding
30
+ *
31
+ * @remarks
32
+ * Saves a customer context note on a pentest finding, e.g. an accepted-by-design rationale or remediation details. Future scans of the same target pass the note to the testing agent so the issue is retested with that context.
33
+ *
34
+ * If set, this operation will use {@link Security.apikey} from the global security.
35
+ */
36
+ export function securityPenetrationTestsPentestFindingContextsControllerUpsertV1(
37
+ client$: CompAiCore,
38
+ request: PentestFindingContextsControllerUpsertV1Request,
39
+ options?: RequestOptions,
40
+ ): APIPromise<
41
+ Result<
42
+ Response,
43
+ | APIError
44
+ | SDKValidationError
45
+ | UnexpectedClientError
46
+ | InvalidRequestError
47
+ | RequestAbortedError
48
+ | RequestTimeoutError
49
+ | ConnectionError
50
+ >
51
+ > {
52
+ return new APIPromise($do(
53
+ client$,
54
+ request,
55
+ options,
56
+ ));
57
+ }
58
+
59
+ async function $do(
60
+ client$: CompAiCore,
61
+ request: PentestFindingContextsControllerUpsertV1Request,
62
+ options?: RequestOptions,
63
+ ): Promise<
64
+ [
65
+ Result<
66
+ Response,
67
+ | APIError
68
+ | SDKValidationError
69
+ | UnexpectedClientError
70
+ | InvalidRequestError
71
+ | RequestAbortedError
72
+ | RequestTimeoutError
73
+ | ConnectionError
74
+ >,
75
+ APICall,
76
+ ]
77
+ > {
78
+ const parsed$ = safeParse(
79
+ request,
80
+ (value$) =>
81
+ PentestFindingContextsControllerUpsertV1Request$zodSchema.parse(value$),
82
+ "Input validation failed",
83
+ );
84
+ if (!parsed$.ok) {
85
+ return [parsed$, { status: "invalid" }];
86
+ }
87
+ const payload$ = parsed$.value;
88
+ const body$ = encodeJSON("body", payload$.body, { explode: true });
89
+
90
+ const pathParams$ = {
91
+ issueId: encodeSimple("issueId", payload$.issueId, {
92
+ explode: false,
93
+ charEncoding: "percent",
94
+ }),
95
+ };
96
+ const path$ = pathToFunc("/v1/pentest-finding-contexts/{issueId}")(
97
+ pathParams$,
98
+ );
99
+
100
+ const headers$ = new Headers(compactMap({
101
+ "Content-Type": "application/json",
102
+ Accept: "*/*",
103
+ "X-Organization-Id": encodeSimple(
104
+ "X-Organization-Id",
105
+ payload$.xOrganizationId,
106
+ { explode: false, charEncoding: "none" },
107
+ ),
108
+ }));
109
+ const securityInput = await extractSecurity(client$._options.security);
110
+ const requestSecurity = resolveGlobalSecurity(securityInput, [0]);
111
+
112
+ const context = {
113
+ options: client$._options,
114
+ baseURL: options?.serverURL ?? client$._baseURL ?? "",
115
+ operationID: "PentestFindingContextsController_upsert_v1",
116
+ oAuth2Scopes: null,
117
+ resolvedSecurity: requestSecurity,
118
+ securitySource: client$._options.security,
119
+ retryConfig: options?.retries
120
+ || client$._options.retryConfig
121
+ || { strategy: "none" },
122
+ retryCodes: options?.retryCodes || [
123
+ "429",
124
+ "500",
125
+ "502",
126
+ "503",
127
+ "504",
128
+ ],
129
+ };
130
+
131
+ const requestRes = client$._createRequest(context, {
132
+ security: requestSecurity,
133
+ method: "PUT",
134
+ baseURL: options?.serverURL,
135
+ path: path$,
136
+ headers: headers$,
137
+ body: body$,
138
+ userAgent: client$._options.userAgent,
139
+ timeoutMs: options?.timeoutMs || client$._options.timeoutMs
140
+ || 120000,
141
+ }, options);
142
+ if (!requestRes.ok) {
143
+ return [requestRes, { status: "invalid" }];
144
+ }
145
+ const req$ = requestRes.value;
146
+
147
+ const doResult = await client$._do(req$, {
148
+ context,
149
+ errorCodes: [],
150
+ retryConfig: context.retryConfig,
151
+ retryCodes: context.retryCodes,
152
+ });
153
+ if (!doResult.ok) {
154
+ return [doResult, { status: "request-error", request: req$ }];
155
+ }
156
+ return [doResult, {
157
+ status: "complete",
158
+ "request": req$,
159
+ response: doResult.value,
160
+ }];
161
+ }
@@ -3,7 +3,7 @@
3
3
  */
4
4
 
5
5
  import { CompAiCore } from "../core.js";
6
- import { encodeSimple } from "../lib/encodings.js";
6
+ import { encodeJSON, encodeSimple } from "../lib/encodings.js";
7
7
  import { compactMap } from "../lib/primitives.js";
8
8
  import { safeParse } from "../lib/schemas.js";
9
9
  import { RequestOptions } from "../lib/sdks.js";
@@ -85,7 +85,7 @@ async function $do(
85
85
  return [parsed$, { status: "invalid" }];
86
86
  }
87
87
  const payload$ = parsed$.value;
88
- const body$ = null;
88
+ const body$ = encodeJSON("body", payload$.body, { explode: true });
89
89
 
90
90
  const pathParams$ = {
91
91
  automationId: encodeSimple("automationId", payload$.automationId, {
@@ -104,6 +104,7 @@ async function $do(
104
104
  );
105
105
 
106
106
  const headers$ = new Headers(compactMap({
107
+ "Content-Type": "application/json",
107
108
  Accept: "*/*",
108
109
  }));
109
110
  const securityInput = await extractSecurity(client$._options.security);