@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.
- package/README.md +2 -2
- package/bin/mcp-server.js +3550 -2509
- package/bin/mcp-server.js.map +43 -21
- package/esm/funcs/cloudSecurityCloudSecurityControllerResolveSessionV1.d.ts +16 -0
- package/esm/funcs/cloudSecurityCloudSecurityControllerResolveSessionV1.d.ts.map +1 -0
- package/esm/funcs/cloudSecurityCloudSecurityControllerResolveSessionV1.js +87 -0
- package/esm/funcs/cloudSecurityCloudSecurityControllerResolveSessionV1.js.map +1 -0
- package/esm/funcs/evidenceExportAuditorAuditorEvidenceExportControllerExportAllEvidenceV1.d.ts +2 -2
- package/esm/funcs/evidenceExportAuditorAuditorEvidenceExportControllerExportAllEvidenceV1.js +3 -3
- package/esm/funcs/evidenceExportAuditorAuditorEvidenceExportControllerExportAllEvidenceV1.js.map +1 -1
- package/esm/funcs/securityPenetrationTestsPentestFindingContextsControllerListV1.d.ts +18 -0
- package/esm/funcs/securityPenetrationTestsPentestFindingContextsControllerListV1.d.ts.map +1 -0
- package/esm/funcs/securityPenetrationTestsPentestFindingContextsControllerListV1.js +88 -0
- package/esm/funcs/securityPenetrationTestsPentestFindingContextsControllerListV1.js.map +1 -0
- package/esm/funcs/securityPenetrationTestsPentestFindingContextsControllerRemoveV1.d.ts +18 -0
- package/esm/funcs/securityPenetrationTestsPentestFindingContextsControllerRemoveV1.d.ts.map +1 -0
- package/esm/funcs/securityPenetrationTestsPentestFindingContextsControllerRemoveV1.js +90 -0
- package/esm/funcs/securityPenetrationTestsPentestFindingContextsControllerRemoveV1.js.map +1 -0
- package/esm/funcs/securityPenetrationTestsPentestFindingContextsControllerUpsertV1.d.ts +18 -0
- package/esm/funcs/securityPenetrationTestsPentestFindingContextsControllerUpsertV1.d.ts.map +1 -0
- package/esm/funcs/securityPenetrationTestsPentestFindingContextsControllerUpsertV1.js +91 -0
- package/esm/funcs/securityPenetrationTestsPentestFindingContextsControllerUpsertV1.js.map +1 -0
- package/esm/funcs/taskAutomationsAutomationsControllerCreateVersionV1.js +3 -2
- package/esm/funcs/taskAutomationsAutomationsControllerCreateVersionV1.js.map +1 -1
- package/esm/funcs/trustAccessTrustAccessControllerGetPublicCustomFrameworksV1.d.ts +16 -0
- package/esm/funcs/trustAccessTrustAccessControllerGetPublicCustomFrameworksV1.d.ts.map +1 -0
- package/esm/funcs/trustAccessTrustAccessControllerGetPublicCustomFrameworksV1.js +87 -0
- package/esm/funcs/trustAccessTrustAccessControllerGetPublicCustomFrameworksV1.js.map +1 -0
- package/esm/funcs/trustPortalTrustPortalControllerListCustomFrameworksV1.d.ts +17 -0
- package/esm/funcs/trustPortalTrustPortalControllerListCustomFrameworksV1.d.ts.map +1 -0
- package/esm/funcs/trustPortalTrustPortalControllerListCustomFrameworksV1.js +73 -0
- package/esm/funcs/trustPortalTrustPortalControllerListCustomFrameworksV1.js.map +1 -0
- package/esm/funcs/trustPortalTrustPortalControllerUpdateAllowedEmailsV1.d.ts +18 -0
- package/esm/funcs/trustPortalTrustPortalControllerUpdateAllowedEmailsV1.d.ts.map +1 -0
- package/esm/funcs/trustPortalTrustPortalControllerUpdateAllowedEmailsV1.js +84 -0
- package/esm/funcs/trustPortalTrustPortalControllerUpdateAllowedEmailsV1.js.map +1 -0
- package/esm/funcs/trustPortalTrustPortalControllerUpdateCustomFrameworkV1.d.ts +18 -0
- package/esm/funcs/trustPortalTrustPortalControllerUpdateCustomFrameworkV1.d.ts.map +1 -0
- package/esm/funcs/trustPortalTrustPortalControllerUpdateCustomFrameworkV1.js +84 -0
- package/esm/funcs/trustPortalTrustPortalControllerUpdateCustomFrameworkV1.js.map +1 -0
- package/esm/landing-page.js +1 -1
- package/esm/lib/config.d.ts +3 -3
- package/esm/lib/config.js +3 -3
- package/esm/lib/encodings.js +1 -1
- package/esm/lib/encodings.js.map +1 -1
- package/esm/lib/env.d.ts.map +1 -1
- package/esm/lib/env.js +2 -2
- package/esm/lib/env.js.map +1 -1
- package/esm/lib/primitives.d.ts +1 -0
- package/esm/lib/primitives.d.ts.map +1 -1
- package/esm/lib/primitives.js +17 -0
- package/esm/lib/primitives.js.map +1 -1
- package/esm/mcp-server/mcp-server.js +1 -1
- package/esm/mcp-server/server.d.ts.map +1 -1
- package/esm/mcp-server/server.js +17 -1
- package/esm/mcp-server/server.js.map +1 -1
- package/esm/mcp-server/tools/cloudSecurityCloudSecurityControllerResolveSessionV1.d.ts +7 -0
- package/esm/mcp-server/tools/cloudSecurityCloudSecurityControllerResolveSessionV1.d.ts.map +1 -0
- package/esm/mcp-server/tools/cloudSecurityCloudSecurityControllerResolveSessionV1.js +34 -0
- package/esm/mcp-server/tools/cloudSecurityCloudSecurityControllerResolveSessionV1.js.map +1 -0
- package/esm/mcp-server/tools/evidenceExportAuditorAuditorEvidenceExportControllerExportAllEvidenceV1.js +2 -2
- package/esm/mcp-server/tools/evidenceExportAuditorAuditorEvidenceExportControllerExportAllEvidenceV1.js.map +1 -1
- package/esm/mcp-server/tools/securityPenetrationTestsPentestFindingContextsControllerListV1.d.ts +7 -0
- package/esm/mcp-server/tools/securityPenetrationTestsPentestFindingContextsControllerListV1.d.ts.map +1 -0
- package/esm/mcp-server/tools/securityPenetrationTestsPentestFindingContextsControllerListV1.js +34 -0
- package/esm/mcp-server/tools/securityPenetrationTestsPentestFindingContextsControllerListV1.js.map +1 -0
- package/esm/mcp-server/tools/securityPenetrationTestsPentestFindingContextsControllerRemoveV1.d.ts +7 -0
- package/esm/mcp-server/tools/securityPenetrationTestsPentestFindingContextsControllerRemoveV1.d.ts.map +1 -0
- package/esm/mcp-server/tools/securityPenetrationTestsPentestFindingContextsControllerRemoveV1.js +34 -0
- package/esm/mcp-server/tools/securityPenetrationTestsPentestFindingContextsControllerRemoveV1.js.map +1 -0
- package/esm/mcp-server/tools/securityPenetrationTestsPentestFindingContextsControllerUpsertV1.d.ts +7 -0
- package/esm/mcp-server/tools/securityPenetrationTestsPentestFindingContextsControllerUpsertV1.d.ts.map +1 -0
- package/esm/mcp-server/tools/securityPenetrationTestsPentestFindingContextsControllerUpsertV1.js +34 -0
- package/esm/mcp-server/tools/securityPenetrationTestsPentestFindingContextsControllerUpsertV1.js.map +1 -0
- package/esm/mcp-server/tools/trustAccessTrustAccessControllerGetPublicCustomFrameworksV1.d.ts +7 -0
- package/esm/mcp-server/tools/trustAccessTrustAccessControllerGetPublicCustomFrameworksV1.d.ts.map +1 -0
- package/esm/mcp-server/tools/trustAccessTrustAccessControllerGetPublicCustomFrameworksV1.js +34 -0
- package/esm/mcp-server/tools/trustAccessTrustAccessControllerGetPublicCustomFrameworksV1.js.map +1 -0
- package/esm/mcp-server/tools/trustPortalTrustPortalControllerListCustomFrameworksV1.d.ts +3 -0
- package/esm/mcp-server/tools/trustPortalTrustPortalControllerListCustomFrameworksV1.d.ts.map +1 -0
- package/esm/mcp-server/tools/trustPortalTrustPortalControllerListCustomFrameworksV1.js +29 -0
- package/esm/mcp-server/tools/trustPortalTrustPortalControllerListCustomFrameworksV1.js.map +1 -0
- package/esm/mcp-server/tools/trustPortalTrustPortalControllerUpdateAllowedEmailsV1.d.ts +7 -0
- package/esm/mcp-server/tools/trustPortalTrustPortalControllerUpdateAllowedEmailsV1.d.ts.map +1 -0
- package/esm/mcp-server/tools/trustPortalTrustPortalControllerUpdateAllowedEmailsV1.js +34 -0
- package/esm/mcp-server/tools/trustPortalTrustPortalControllerUpdateAllowedEmailsV1.js.map +1 -0
- package/esm/mcp-server/tools/trustPortalTrustPortalControllerUpdateCustomFrameworkV1.d.ts +7 -0
- package/esm/mcp-server/tools/trustPortalTrustPortalControllerUpdateCustomFrameworkV1.d.ts.map +1 -0
- package/esm/mcp-server/tools/trustPortalTrustPortalControllerUpdateCustomFrameworkV1.js +35 -0
- package/esm/mcp-server/tools/trustPortalTrustPortalControllerUpdateCustomFrameworkV1.js.map +1 -0
- package/esm/models/automationscontrollercreateversionv1op.d.ts +2 -0
- package/esm/models/automationscontrollercreateversionv1op.d.ts.map +1 -1
- package/esm/models/automationscontrollercreateversionv1op.js +2 -0
- package/esm/models/automationscontrollercreateversionv1op.js.map +1 -1
- package/esm/models/cloudsecuritycontrollerresolvesessionv1op.d.ts +6 -0
- package/esm/models/cloudsecuritycontrollerresolvesessionv1op.d.ts.map +1 -0
- package/esm/models/cloudsecuritycontrollerresolvesessionv1op.js +8 -0
- package/esm/models/cloudsecuritycontrollerresolvesessionv1op.js.map +1 -0
- package/esm/models/complianceresourceresponsedto.d.ts +13 -1
- package/esm/models/complianceresourceresponsedto.d.ts.map +1 -1
- package/esm/models/complianceresourceresponsedto.js +10 -2
- package/esm/models/complianceresourceresponsedto.js.map +1 -1
- package/esm/models/complianceresourcesignedurldto.d.ts +4 -3
- package/esm/models/complianceresourcesignedurldto.d.ts.map +1 -1
- package/esm/models/complianceresourcesignedurldto.js +5 -3
- package/esm/models/complianceresourcesignedurldto.js.map +1 -1
- package/esm/models/controlscontrollerunlinkdocumenttypev1op.d.ts +3 -1
- package/esm/models/controlscontrollerunlinkdocumenttypev1op.d.ts.map +1 -1
- package/esm/models/controlscontrollerunlinkdocumenttypev1op.js +2 -0
- package/esm/models/controlscontrollerunlinkdocumenttypev1op.js.map +1 -1
- package/esm/models/createcontroldto.d.ts +2 -0
- package/esm/models/createcontroldto.d.ts.map +1 -1
- package/esm/models/createcontroldto.js +2 -0
- package/esm/models/createcontroldto.js.map +1 -1
- package/esm/models/createfindingdto.d.ts +2 -0
- package/esm/models/createfindingdto.d.ts.map +1 -1
- package/esm/models/createfindingdto.js +2 -0
- package/esm/models/createfindingdto.js.map +1 -1
- package/esm/models/createpenetrationtestdto.d.ts +1 -0
- package/esm/models/createpenetrationtestdto.d.ts.map +1 -1
- package/esm/models/createpenetrationtestdto.js +1 -0
- package/esm/models/createpenetrationtestdto.js.map +1 -1
- package/esm/models/createversiondto.d.ts +2 -1
- package/esm/models/createversiondto.d.ts.map +1 -1
- package/esm/models/createversiondto.js +3 -2
- package/esm/models/createversiondto.js.map +1 -1
- package/esm/models/findingscontrollerlistfindingsv1op.d.ts +2 -0
- package/esm/models/findingscontrollerlistfindingsv1op.d.ts.map +1 -1
- package/esm/models/findingscontrollerlistfindingsv1op.js +2 -0
- package/esm/models/findingscontrollerlistfindingsv1op.js.map +1 -1
- package/esm/models/linkdocumenttypesdto.d.ts +2 -0
- package/esm/models/linkdocumenttypesdto.d.ts.map +1 -1
- package/esm/models/linkdocumenttypesdto.js +2 -0
- package/esm/models/linkdocumenttypesdto.js.map +1 -1
- package/esm/models/pentestfindingcontextscontrollerlistv1op.d.ts +7 -0
- package/esm/models/pentestfindingcontextscontrollerlistv1op.d.ts.map +1 -0
- package/esm/models/pentestfindingcontextscontrollerlistv1op.js +9 -0
- package/esm/models/pentestfindingcontextscontrollerlistv1op.js.map +1 -0
- package/esm/models/pentestfindingcontextscontrollerremovev1op.d.ts +7 -0
- package/esm/models/pentestfindingcontextscontrollerremovev1op.d.ts.map +1 -0
- package/esm/models/pentestfindingcontextscontrollerremovev1op.js +9 -0
- package/esm/models/pentestfindingcontextscontrollerremovev1op.js.map +1 -0
- package/esm/models/pentestfindingcontextscontrollerupsertv1op.d.ts +9 -0
- package/esm/models/pentestfindingcontextscontrollerupsertv1op.d.ts.map +1 -0
- package/esm/models/pentestfindingcontextscontrollerupsertv1op.js +11 -0
- package/esm/models/pentestfindingcontextscontrollerupsertv1op.js.map +1 -0
- package/esm/models/trustaccesscontrollergetpubliccustomframeworksv1op.d.ts +6 -0
- package/esm/models/trustaccesscontrollergetpubliccustomframeworksv1op.d.ts.map +1 -0
- package/esm/models/trustaccesscontrollergetpubliccustomframeworksv1op.js +8 -0
- package/esm/models/trustaccesscontrollergetpubliccustomframeworksv1op.js.map +1 -0
- package/esm/models/trustportalcontrollerupdatecustomframeworkv1op.d.ts +42 -0
- package/esm/models/trustportalcontrollerupdatecustomframeworkv1op.d.ts.map +1 -0
- package/esm/models/trustportalcontrollerupdatecustomframeworkv1op.js +44 -0
- package/esm/models/trustportalcontrollerupdatecustomframeworkv1op.js.map +1 -0
- package/esm/models/updateallowedemailsdto.d.ts +6 -0
- package/esm/models/updateallowedemailsdto.d.ts.map +1 -0
- package/esm/models/updateallowedemailsdto.js +8 -0
- package/esm/models/updateallowedemailsdto.js.map +1 -0
- package/esm/models/uploadcomplianceresourcedto.d.ts +4 -3
- package/esm/models/uploadcomplianceresourcedto.d.ts.map +1 -1
- package/esm/models/uploadcomplianceresourcedto.js +4 -3
- package/esm/models/uploadcomplianceresourcedto.js.map +1 -1
- package/esm/models/upsertfindingcontextdto.d.ts +7 -0
- package/esm/models/upsertfindingcontextdto.d.ts.map +1 -0
- package/esm/models/upsertfindingcontextdto.js +9 -0
- package/esm/models/upsertfindingcontextdto.js.map +1 -0
- package/esm/tool-names.d.ts.map +1 -1
- package/esm/tool-names.js +33 -1
- package/esm/tool-names.js.map +1 -1
- package/package.json +1 -1
- package/src/funcs/cloudSecurityCloudSecurityControllerResolveSessionV1.ts +153 -0
- package/src/funcs/evidenceExportAuditorAuditorEvidenceExportControllerExportAllEvidenceV1.ts +3 -3
- package/src/funcs/securityPenetrationTestsPentestFindingContextsControllerListV1.ts +155 -0
- package/src/funcs/securityPenetrationTestsPentestFindingContextsControllerRemoveV1.ts +160 -0
- package/src/funcs/securityPenetrationTestsPentestFindingContextsControllerUpsertV1.ts +161 -0
- package/src/funcs/taskAutomationsAutomationsControllerCreateVersionV1.ts +3 -2
- package/src/funcs/trustAccessTrustAccessControllerGetPublicCustomFrameworksV1.ts +155 -0
- package/src/funcs/trustPortalTrustPortalControllerListCustomFrameworksV1.ts +125 -0
- package/src/funcs/trustPortalTrustPortalControllerUpdateAllowedEmailsV1.ts +146 -0
- package/src/funcs/trustPortalTrustPortalControllerUpdateCustomFrameworkV1.ts +149 -0
- package/src/landing-page.ts +1 -1
- package/src/lib/config.ts +3 -3
- package/src/lib/encodings.ts +1 -1
- package/src/lib/env.ts +6 -3
- package/src/lib/primitives.ts +16 -0
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +17 -1
- package/src/mcp-server/tools/cloudSecurityCloudSecurityControllerResolveSessionV1.ts +45 -0
- package/src/mcp-server/tools/evidenceExportAuditorAuditorEvidenceExportControllerExportAllEvidenceV1.ts +2 -2
- package/src/mcp-server/tools/securityPenetrationTestsPentestFindingContextsControllerListV1.ts +44 -0
- package/src/mcp-server/tools/securityPenetrationTestsPentestFindingContextsControllerRemoveV1.ts +44 -0
- package/src/mcp-server/tools/securityPenetrationTestsPentestFindingContextsControllerUpsertV1.ts +44 -0
- package/src/mcp-server/tools/trustAccessTrustAccessControllerGetPublicCustomFrameworksV1.ts +44 -0
- package/src/mcp-server/tools/trustPortalTrustPortalControllerListCustomFrameworksV1.ts +38 -0
- package/src/mcp-server/tools/trustPortalTrustPortalControllerUpdateAllowedEmailsV1.ts +44 -0
- package/src/mcp-server/tools/trustPortalTrustPortalControllerUpdateCustomFrameworkV1.ts +46 -0
- package/src/models/automationscontrollercreateversionv1op.ts +6 -0
- package/src/models/cloudsecuritycontrollerresolvesessionv1op.ts +14 -0
- package/src/models/complianceresourceresponsedto.ts +23 -3
- package/src/models/complianceresourcesignedurldto.ts +9 -6
- package/src/models/controlscontrollerunlinkdocumenttypev1op.ts +3 -1
- package/src/models/createcontroldto.ts +2 -0
- package/src/models/createfindingdto.ts +2 -0
- package/src/models/createpenetrationtestdto.ts +4 -0
- package/src/models/createversiondto.ts +6 -4
- package/src/models/findingscontrollerlistfindingsv1op.ts +2 -0
- package/src/models/linkdocumenttypesdto.ts +2 -0
- package/src/models/pentestfindingcontextscontrollerlistv1op.ts +19 -0
- package/src/models/pentestfindingcontextscontrollerremovev1op.ts +18 -0
- package/src/models/pentestfindingcontextscontrollerupsertv1op.ts +24 -0
- package/src/models/trustaccesscontrollergetpubliccustomframeworksv1op.ts +18 -0
- package/src/models/trustportalcontrollerupdatecustomframeworkv1op.ts +84 -0
- package/src/models/updateallowedemailsdto.ts +15 -0
- package/src/models/uploadcomplianceresourcedto.ts +10 -6
- package/src/models/upsertfindingcontextdto.ts +16 -0
- package/src/tool-names.ts +33 -1
- package/esm/lib/dlv.d.ts +0 -14
- package/esm/lib/dlv.d.ts.map +0 -1
- package/esm/lib/dlv.js +0 -46
- package/esm/lib/dlv.js.map +0 -1
- package/esm/lib/is-plain-object.d.ts +0 -2
- package/esm/lib/is-plain-object.d.ts.map +0 -1
- package/esm/lib/is-plain-object.js +0 -38
- package/esm/lib/is-plain-object.js.map +0 -1
- package/src/lib/dlv.ts +0 -53
- 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
|
+
}
|
package/src/funcs/evidenceExportAuditorAuditorEvidenceExportControllerExportAllEvidenceV1.ts
CHANGED
|
@@ -26,10 +26,10 @@ import { APICall, APIPromise } from "../types/async.js";
|
|
|
26
26
|
import { Result } from "../types/fp.js";
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
|
-
*
|
|
29
|
+
* Trigger bulk evidence export (Auditor only)
|
|
30
30
|
*
|
|
31
31
|
* @remarks
|
|
32
|
-
*
|
|
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: "
|
|
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$ =
|
|
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);
|