@censys/platform-sdk 0.10.1 → 0.10.3
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 +6 -0
- package/docs/sdks/threathunting/README.md +250 -1
- package/funcs/accountManagementGetMemberCreditUsage.js.map +1 -1
- package/funcs/accountManagementGetOrganizationCreditUsage.js.map +1 -1
- package/funcs/accountManagementGetOrganizationCredits.js.map +1 -1
- package/funcs/accountManagementGetOrganizationDetails.js.map +1 -1
- package/funcs/accountManagementInviteUserToOrganization.js.map +1 -1
- package/funcs/accountManagementListOrganizationMembers.js.map +1 -1
- package/funcs/accountManagementRemoveOrganizationMember.js.map +1 -1
- package/funcs/accountManagementUpdateOrganizationMember.js.map +1 -1
- package/funcs/collectionsAggregate.js.map +1 -1
- package/funcs/collectionsDelete.js.map +1 -1
- package/funcs/collectionsGet.js.map +1 -1
- package/funcs/collectionsListEvents.js.map +1 -1
- package/funcs/collectionsSearch.js.map +1 -1
- package/funcs/collectionsUpdate.js.map +1 -1
- package/funcs/globalDataGetCertificate.js.map +1 -1
- package/funcs/globalDataGetCertificateRaw.js.map +1 -1
- package/funcs/globalDataGetHost.js.map +1 -1
- package/funcs/globalDataGetHostTimeline.js.map +1 -1
- package/funcs/globalDataGetTrackedScan.js.map +1 -1
- package/funcs/globalDataGetWebProperty.js.map +1 -1
- package/funcs/globalDataListServicesOnHost.js.map +1 -1
- package/funcs/threatHuntingCreateCenseyeJob.d.ts +18 -0
- package/funcs/threatHuntingCreateCenseyeJob.d.ts.map +1 -0
- package/funcs/threatHuntingCreateCenseyeJob.js +131 -0
- package/funcs/threatHuntingCreateCenseyeJob.js.map +1 -0
- package/funcs/threatHuntingGetCenseyeJob.d.ts +18 -0
- package/funcs/threatHuntingGetCenseyeJob.d.ts.map +1 -0
- package/funcs/threatHuntingGetCenseyeJob.js +134 -0
- package/funcs/threatHuntingGetCenseyeJob.js.map +1 -0
- package/funcs/threatHuntingGetCenseyeJobResults.d.ts +18 -0
- package/funcs/threatHuntingGetCenseyeJobResults.d.ts.map +1 -0
- package/funcs/threatHuntingGetCenseyeJobResults.js +136 -0
- package/funcs/threatHuntingGetCenseyeJobResults.js.map +1 -0
- package/funcs/threatHuntingGetHostObservationsWithCertificate.js.map +1 -1
- package/funcs/threatHuntingGetTrackedScanThreatHunting.js.map +1 -1
- package/funcs/threatHuntingValueCounts.d.ts +1 -1
- package/funcs/threatHuntingValueCounts.js +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +4 -4
- package/lib/config.js +4 -4
- package/lib/config.js.map +1 -1
- package/lib/encodings.d.ts.map +1 -1
- package/lib/encodings.js +20 -5
- package/lib/encodings.js.map +1 -1
- package/lib/files.d.ts +13 -0
- package/lib/files.d.ts.map +1 -1
- package/lib/files.js +19 -0
- package/lib/files.js.map +1 -1
- package/lib/matchers.d.ts.map +1 -1
- package/lib/matchers.js +0 -1
- package/lib/matchers.js.map +1 -1
- package/lib/sdks.d.ts.map +1 -1
- package/lib/sdks.js +8 -4
- package/lib/sdks.js.map +1 -1
- package/lib/security.d.ts +1 -1
- package/lib/security.d.ts.map +1 -1
- package/lib/security.js +20 -10
- package/lib/security.js.map +1 -1
- package/lib/url.d.ts.map +1 -1
- package/lib/url.js +4 -2
- package/lib/url.js.map +1 -1
- package/models/components/censeyejob.d.ts +59 -0
- package/models/components/censeyejob.d.ts.map +1 -0
- package/models/components/censeyejob.js +85 -0
- package/models/components/censeyejob.js.map +1 -0
- package/models/components/censeyeresult.d.ts +18 -0
- package/models/components/censeyeresult.d.ts.map +1 -0
- package/models/components/censeyeresult.js +57 -0
- package/models/components/censeyeresult.js.map +1 -0
- package/models/components/censeyeresultsresponse.d.ts +18 -0
- package/models/components/censeyeresultsresponse.d.ts.map +1 -0
- package/models/components/censeyeresultsresponse.js +57 -0
- package/models/components/censeyeresultsresponse.js.map +1 -0
- package/models/components/censeyetarget.d.ts +30 -0
- package/models/components/censeyetarget.d.ts.map +1 -0
- package/models/components/censeyetarget.js +75 -0
- package/models/components/censeyetarget.js.map +1 -0
- package/models/components/countcondition.d.ts +1 -1
- package/models/components/createcenseyejobinputbody.d.ts +13 -0
- package/models/components/createcenseyejobinputbody.d.ts.map +1 -0
- package/models/components/createcenseyejobinputbody.js +50 -0
- package/models/components/createcenseyejobinputbody.js.map +1 -0
- package/models/components/fieldvaluepair.d.ts +5 -0
- package/models/components/fieldvaluepair.d.ts.map +1 -1
- package/models/components/fieldvaluepair.js +11 -1
- package/models/components/fieldvaluepair.js.map +1 -1
- package/models/components/host.d.ts +12 -0
- package/models/components/host.d.ts.map +1 -1
- package/models/components/host.js +7 -0
- package/models/components/host.js.map +1 -1
- package/models/components/index.d.ts +21 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +21 -0
- package/models/components/index.js.map +1 -1
- package/models/components/networkclassification.d.ts +27 -0
- package/models/components/networkclassification.d.ts.map +1 -0
- package/models/components/networkclassification.js +60 -0
- package/models/components/networkclassification.js.map +1 -0
- package/models/components/networkmobileinfo.d.ts +21 -0
- package/models/components/networkmobileinfo.d.ts.map +1 -0
- package/models/components/networkmobileinfo.js +57 -0
- package/models/components/networkmobileinfo.js.map +1 -0
- package/models/components/privacy.d.ts +39 -0
- package/models/components/privacy.d.ts.map +1 -0
- package/models/components/privacy.js +64 -0
- package/models/components/privacy.js.map +1 -0
- package/models/components/privacytorinfo.d.ts +11 -0
- package/models/components/privacytorinfo.d.ts.map +1 -0
- package/models/components/privacytorinfo.js +51 -0
- package/models/components/privacytorinfo.js.map +1 -0
- package/models/components/privacytorinforelay.d.ts +140 -0
- package/models/components/privacytorinforelay.d.ts.map +1 -0
- package/models/components/privacytorinforelay.js +114 -0
- package/models/components/privacytorinforelay.js.map +1 -0
- package/models/components/privacytorinforelayexitpolicysummary.d.ts +17 -0
- package/models/components/privacytorinforelayexitpolicysummary.d.ts.map +1 -0
- package/models/components/privacytorinforelayexitpolicysummary.js +51 -0
- package/models/components/privacytorinforelayexitpolicysummary.js.map +1 -0
- package/models/components/reputation.d.ts +26 -0
- package/models/components/reputation.d.ts.map +1 -0
- package/models/components/reputation.js +71 -0
- package/models/components/reputation.js.map +1 -0
- package/models/components/reputationevidence.d.ts +17 -0
- package/models/components/reputationevidence.d.ts.map +1 -0
- package/models/components/reputationevidence.js +65 -0
- package/models/components/reputationevidence.js.map +1 -0
- package/models/components/reputationevidenceexternalsignal.d.ts +23 -0
- package/models/components/reputationevidenceexternalsignal.d.ts.map +1 -0
- package/models/components/reputationevidenceexternalsignal.js +62 -0
- package/models/components/reputationevidenceexternalsignal.js.map +1 -0
- package/models/components/reputationevidencefieldvalue.d.ts +11 -0
- package/models/components/reputationevidencefieldvalue.d.ts.map +1 -0
- package/models/components/reputationevidencefieldvalue.js +51 -0
- package/models/components/reputationevidencefieldvalue.js.map +1 -0
- package/models/components/reputationevidencethreat.d.ts +12 -0
- package/models/components/reputationevidencethreat.d.ts.map +1 -0
- package/models/components/reputationevidencethreat.js +59 -0
- package/models/components/reputationevidencethreat.js.map +1 -0
- package/models/components/responseenvelopecenseyejob.d.ts +11 -0
- package/models/components/responseenvelopecenseyejob.d.ts.map +1 -0
- package/models/components/responseenvelopecenseyejob.js +51 -0
- package/models/components/responseenvelopecenseyejob.js.map +1 -0
- package/models/components/responseenvelopecenseyeresultsresponse.d.ts +11 -0
- package/models/components/responseenvelopecenseyeresultsresponse.d.ts.map +1 -0
- package/models/components/responseenvelopecenseyeresultsresponse.js +51 -0
- package/models/components/responseenvelopecenseyeresultsresponse.js.map +1 -0
- package/models/components/sapient.d.ts +15 -0
- package/models/components/sapient.d.ts.map +1 -0
- package/models/components/sapient.js +60 -0
- package/models/components/sapient.js.map +1 -0
- package/models/components/sapienterror.d.ts +11 -0
- package/models/components/sapienterror.d.ts.map +1 -0
- package/models/components/sapienterror.js +56 -0
- package/models/components/sapienterror.js.map +1 -0
- package/models/components/sapientregistrationack.d.ts +11 -0
- package/models/components/sapientregistrationack.d.ts.map +1 -0
- package/models/components/sapientregistrationack.js +56 -0
- package/models/components/sapientregistrationack.js.map +1 -0
- package/models/components/searchvaluecountsinputbody.d.ts +1 -1
- package/models/components/service.d.ts +2 -0
- package/models/components/service.d.ts.map +1 -1
- package/models/components/service.js +2 -0
- package/models/components/service.js.map +1 -1
- package/models/components/servicescan.d.ts +2 -0
- package/models/components/servicescan.d.ts.map +1 -1
- package/models/components/servicescan.js +2 -0
- package/models/components/servicescan.js.map +1 -1
- package/models/components/servicesonhostresponse.d.ts +6 -0
- package/models/components/servicesonhostresponse.d.ts.map +1 -1
- package/models/components/servicesonhostresponse.js +3 -4
- package/models/components/servicesonhostresponse.js.map +1 -1
- package/models/components/socks.d.ts +1 -0
- package/models/components/socks.d.ts.map +1 -1
- package/models/components/socks.js +2 -0
- package/models/components/socks.js.map +1 -1
- package/models/operations/index.d.ts +3 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +3 -0
- package/models/operations/index.js.map +1 -1
- package/models/operations/v3threathuntingcenseyejobresults.d.ts +45 -0
- package/models/operations/v3threathuntingcenseyejobresults.d.ts.map +1 -0
- package/models/operations/v3threathuntingcenseyejobresults.js +76 -0
- package/models/operations/v3threathuntingcenseyejobresults.js.map +1 -0
- package/models/operations/v3threathuntingcenseyejobscreate.d.ts +32 -0
- package/models/operations/v3threathuntingcenseyejobscreate.d.ts.map +1 -0
- package/models/operations/v3threathuntingcenseyejobscreate.js +72 -0
- package/models/operations/v3threathuntingcenseyejobscreate.js.map +1 -0
- package/models/operations/v3threathuntingcenseyejobsget.d.ts +35 -0
- package/models/operations/v3threathuntingcenseyejobsget.d.ts.map +1 -0
- package/models/operations/v3threathuntingcenseyejobsget.js +72 -0
- package/models/operations/v3threathuntingcenseyejobsget.js.map +1 -0
- package/package.json +1 -1
- package/sdk/threathunting.d.ts +22 -1
- package/sdk/threathunting.d.ts.map +1 -1
- package/sdk/threathunting.js +31 -1
- package/sdk/threathunting.js.map +1 -1
- package/src/funcs/accountManagementGetMemberCreditUsage.ts +0 -1
- package/src/funcs/accountManagementGetOrganizationCreditUsage.ts +0 -1
- package/src/funcs/accountManagementGetOrganizationCredits.ts +0 -1
- package/src/funcs/accountManagementGetOrganizationDetails.ts +0 -1
- package/src/funcs/accountManagementInviteUserToOrganization.ts +0 -1
- package/src/funcs/accountManagementListOrganizationMembers.ts +0 -1
- package/src/funcs/accountManagementRemoveOrganizationMember.ts +0 -1
- package/src/funcs/accountManagementUpdateOrganizationMember.ts +0 -1
- package/src/funcs/collectionsAggregate.ts +0 -1
- package/src/funcs/collectionsDelete.ts +0 -1
- package/src/funcs/collectionsGet.ts +0 -1
- package/src/funcs/collectionsListEvents.ts +0 -1
- package/src/funcs/collectionsSearch.ts +0 -1
- package/src/funcs/collectionsUpdate.ts +0 -1
- package/src/funcs/globalDataGetCertificate.ts +0 -1
- package/src/funcs/globalDataGetCertificateRaw.ts +0 -1
- package/src/funcs/globalDataGetHost.ts +0 -1
- package/src/funcs/globalDataGetHostTimeline.ts +0 -1
- package/src/funcs/globalDataGetTrackedScan.ts +0 -1
- package/src/funcs/globalDataGetWebProperty.ts +0 -1
- package/src/funcs/globalDataListServicesOnHost.ts +0 -1
- package/src/funcs/threatHuntingCreateCenseyeJob.ts +195 -0
- package/src/funcs/threatHuntingGetCenseyeJob.ts +200 -0
- package/src/funcs/threatHuntingGetCenseyeJobResults.ts +202 -0
- package/src/funcs/threatHuntingGetHostObservationsWithCertificate.ts +0 -1
- package/src/funcs/threatHuntingGetTrackedScanThreatHunting.ts +0 -1
- package/src/funcs/threatHuntingValueCounts.ts +1 -1
- package/src/lib/config.ts +4 -4
- package/src/lib/encodings.ts +23 -4
- package/src/lib/files.ts +22 -0
- package/src/lib/matchers.ts +3 -2
- package/src/lib/sdks.ts +7 -5
- package/src/lib/security.ts +15 -4
- package/src/lib/url.ts +16 -14
- package/src/models/components/censeyejob.ts +106 -0
- package/src/models/components/censeyeresult.ts +48 -0
- package/src/models/components/censeyeresultsresponse.ts +45 -0
- package/src/models/components/censeyetarget.ts +77 -0
- package/src/models/components/countcondition.ts +1 -1
- package/src/models/components/createcenseyejobinputbody.ts +36 -0
- package/src/models/components/fieldvaluepair.ts +21 -0
- package/src/models/components/host.ts +19 -0
- package/src/models/components/index.ts +21 -0
- package/src/models/components/networkclassification.ts +60 -0
- package/src/models/components/networkmobileinfo.ts +49 -0
- package/src/models/components/privacy.ts +73 -0
- package/src/models/components/privacytorinfo.ts +35 -0
- package/src/models/components/privacytorinforelay.ts +227 -0
- package/src/models/components/privacytorinforelayexitpolicysummary.ts +40 -0
- package/src/models/components/reputation.ts +66 -0
- package/src/models/components/reputationevidence.ts +63 -0
- package/src/models/components/reputationevidenceexternalsignal.ts +50 -0
- package/src/models/components/reputationevidencefieldvalue.ts +33 -0
- package/src/models/components/reputationevidencethreat.ts +42 -0
- package/src/models/components/responseenvelopecenseyejob.ts +32 -0
- package/src/models/components/responseenvelopecenseyeresultsresponse.ts +36 -0
- package/src/models/components/sapient.ts +44 -0
- package/src/models/components/sapienterror.ts +38 -0
- package/src/models/components/sapientregistrationack.ts +38 -0
- package/src/models/components/searchvaluecountsinputbody.ts +1 -1
- package/src/models/components/service.ts +3 -0
- package/src/models/components/servicescan.ts +3 -0
- package/src/models/components/servicesonhostresponse.ts +9 -4
- package/src/models/components/socks.ts +3 -0
- package/src/models/operations/index.ts +3 -0
- package/src/models/operations/v3threathuntingcenseyejobresults.ts +107 -0
- package/src/models/operations/v3threathuntingcenseyejobscreate.ts +91 -0
- package/src/models/operations/v3threathuntingcenseyejobsget.ts +87 -0
- package/src/sdk/threathunting.ts +55 -1
- package/tests/sdk.test.ts +412 -259
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
import { CenseyeJob, CenseyeJob$inboundSchema } from "./censeyejob.js";
|
|
10
|
+
|
|
11
|
+
export type ResponseEnvelopeCenseyeJob = {
|
|
12
|
+
result?: CenseyeJob | undefined;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
/** @internal */
|
|
16
|
+
export const ResponseEnvelopeCenseyeJob$inboundSchema: z.ZodType<
|
|
17
|
+
ResponseEnvelopeCenseyeJob,
|
|
18
|
+
z.ZodTypeDef,
|
|
19
|
+
unknown
|
|
20
|
+
> = z.object({
|
|
21
|
+
result: CenseyeJob$inboundSchema.optional(),
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
export function responseEnvelopeCenseyeJobFromJSON(
|
|
25
|
+
jsonString: string,
|
|
26
|
+
): SafeParseResult<ResponseEnvelopeCenseyeJob, SDKValidationError> {
|
|
27
|
+
return safeParse(
|
|
28
|
+
jsonString,
|
|
29
|
+
(x) => ResponseEnvelopeCenseyeJob$inboundSchema.parse(JSON.parse(x)),
|
|
30
|
+
`Failed to parse 'ResponseEnvelopeCenseyeJob' from JSON`,
|
|
31
|
+
);
|
|
32
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
import {
|
|
10
|
+
CenseyeResultsResponse,
|
|
11
|
+
CenseyeResultsResponse$inboundSchema,
|
|
12
|
+
} from "./censeyeresultsresponse.js";
|
|
13
|
+
|
|
14
|
+
export type ResponseEnvelopeCenseyeResultsResponse = {
|
|
15
|
+
result?: CenseyeResultsResponse | undefined;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
/** @internal */
|
|
19
|
+
export const ResponseEnvelopeCenseyeResultsResponse$inboundSchema: z.ZodType<
|
|
20
|
+
ResponseEnvelopeCenseyeResultsResponse,
|
|
21
|
+
z.ZodTypeDef,
|
|
22
|
+
unknown
|
|
23
|
+
> = z.object({
|
|
24
|
+
result: CenseyeResultsResponse$inboundSchema.optional(),
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
export function responseEnvelopeCenseyeResultsResponseFromJSON(
|
|
28
|
+
jsonString: string,
|
|
29
|
+
): SafeParseResult<ResponseEnvelopeCenseyeResultsResponse, SDKValidationError> {
|
|
30
|
+
return safeParse(
|
|
31
|
+
jsonString,
|
|
32
|
+
(x) =>
|
|
33
|
+
ResponseEnvelopeCenseyeResultsResponse$inboundSchema.parse(JSON.parse(x)),
|
|
34
|
+
`Failed to parse 'ResponseEnvelopeCenseyeResultsResponse' from JSON`,
|
|
35
|
+
);
|
|
36
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
import { SapientError, SapientError$inboundSchema } from "./sapienterror.js";
|
|
11
|
+
import {
|
|
12
|
+
SapientRegistrationAck,
|
|
13
|
+
SapientRegistrationAck$inboundSchema,
|
|
14
|
+
} from "./sapientregistrationack.js";
|
|
15
|
+
|
|
16
|
+
export type Sapient = {
|
|
17
|
+
error?: SapientError | undefined;
|
|
18
|
+
payload?: string | undefined;
|
|
19
|
+
registrationAck?: SapientRegistrationAck | undefined;
|
|
20
|
+
unknown?: string | undefined;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
/** @internal */
|
|
24
|
+
export const Sapient$inboundSchema: z.ZodType<Sapient, z.ZodTypeDef, unknown> =
|
|
25
|
+
z.object({
|
|
26
|
+
error: SapientError$inboundSchema.optional(),
|
|
27
|
+
payload: z.string().optional(),
|
|
28
|
+
registration_ack: SapientRegistrationAck$inboundSchema.optional(),
|
|
29
|
+
unknown: z.string().optional(),
|
|
30
|
+
}).transform((v) => {
|
|
31
|
+
return remap$(v, {
|
|
32
|
+
"registration_ack": "registrationAck",
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
export function sapientFromJSON(
|
|
37
|
+
jsonString: string,
|
|
38
|
+
): SafeParseResult<Sapient, SDKValidationError> {
|
|
39
|
+
return safeParse(
|
|
40
|
+
jsonString,
|
|
41
|
+
(x) => Sapient$inboundSchema.parse(JSON.parse(x)),
|
|
42
|
+
`Failed to parse 'Sapient' from JSON`,
|
|
43
|
+
);
|
|
44
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
export type SapientError = {
|
|
12
|
+
errorMessage?: Array<string> | null | undefined;
|
|
13
|
+
packet?: string | undefined;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
/** @internal */
|
|
17
|
+
export const SapientError$inboundSchema: z.ZodType<
|
|
18
|
+
SapientError,
|
|
19
|
+
z.ZodTypeDef,
|
|
20
|
+
unknown
|
|
21
|
+
> = z.object({
|
|
22
|
+
error_message: z.nullable(z.array(z.string())).optional(),
|
|
23
|
+
packet: z.string().optional(),
|
|
24
|
+
}).transform((v) => {
|
|
25
|
+
return remap$(v, {
|
|
26
|
+
"error_message": "errorMessage",
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
export function sapientErrorFromJSON(
|
|
31
|
+
jsonString: string,
|
|
32
|
+
): SafeParseResult<SapientError, SDKValidationError> {
|
|
33
|
+
return safeParse(
|
|
34
|
+
jsonString,
|
|
35
|
+
(x) => SapientError$inboundSchema.parse(JSON.parse(x)),
|
|
36
|
+
`Failed to parse 'SapientError' from JSON`,
|
|
37
|
+
);
|
|
38
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
export type SapientRegistrationAck = {
|
|
12
|
+
acceptance?: boolean | undefined;
|
|
13
|
+
ackResponseReason?: Array<string> | null | undefined;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
/** @internal */
|
|
17
|
+
export const SapientRegistrationAck$inboundSchema: z.ZodType<
|
|
18
|
+
SapientRegistrationAck,
|
|
19
|
+
z.ZodTypeDef,
|
|
20
|
+
unknown
|
|
21
|
+
> = z.object({
|
|
22
|
+
acceptance: z.boolean().optional(),
|
|
23
|
+
ack_response_reason: z.nullable(z.array(z.string())).optional(),
|
|
24
|
+
}).transform((v) => {
|
|
25
|
+
return remap$(v, {
|
|
26
|
+
"ack_response_reason": "ackResponseReason",
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
export function sapientRegistrationAckFromJSON(
|
|
31
|
+
jsonString: string,
|
|
32
|
+
): SafeParseResult<SapientRegistrationAck, SDKValidationError> {
|
|
33
|
+
return safeParse(
|
|
34
|
+
jsonString,
|
|
35
|
+
(x) => SapientRegistrationAck$inboundSchema.parse(JSON.parse(x)),
|
|
36
|
+
`Failed to parse 'SapientRegistrationAck' from JSON`,
|
|
37
|
+
);
|
|
38
|
+
}
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
|
|
13
13
|
export type SearchValueCountsInputBody = {
|
|
14
14
|
/**
|
|
15
|
-
* Groups of field-value pairs to count matches for.
|
|
15
|
+
* Groups of field-value pairs to count matches for. Each group may contain up to 5 field-value pairs.
|
|
16
16
|
*/
|
|
17
17
|
andCountConditions: Array<CountCondition> | null;
|
|
18
18
|
/**
|
|
@@ -149,6 +149,7 @@ import {
|
|
|
149
149
|
RustdeskRendezvous$inboundSchema,
|
|
150
150
|
} from "./rustdeskrendezvous.js";
|
|
151
151
|
import { S7, S7$inboundSchema } from "./s7.js";
|
|
152
|
+
import { Sapient, Sapient$inboundSchema } from "./sapient.js";
|
|
152
153
|
import { SapRouter, SapRouter$inboundSchema } from "./saprouter.js";
|
|
153
154
|
import { Scpi, Scpi$inboundSchema } from "./scpi.js";
|
|
154
155
|
import { Screenshot, Screenshot$inboundSchema } from "./screenshot.js";
|
|
@@ -317,6 +318,7 @@ export type Service = {
|
|
|
317
318
|
rustdeskRendezvous?: RustdeskRendezvous | undefined;
|
|
318
319
|
s7?: S7 | undefined;
|
|
319
320
|
sapRouter?: SapRouter | undefined;
|
|
321
|
+
sapient?: Sapient | undefined;
|
|
320
322
|
scanTime?: string | undefined;
|
|
321
323
|
scpi?: Scpi | undefined;
|
|
322
324
|
screenshots?: Array<Screenshot> | null | undefined;
|
|
@@ -481,6 +483,7 @@ export const Service$inboundSchema: z.ZodType<Service, z.ZodTypeDef, unknown> =
|
|
|
481
483
|
rustdesk_rendezvous: RustdeskRendezvous$inboundSchema.optional(),
|
|
482
484
|
s7: S7$inboundSchema.optional(),
|
|
483
485
|
sap_router: SapRouter$inboundSchema.optional(),
|
|
486
|
+
sapient: Sapient$inboundSchema.optional(),
|
|
484
487
|
scan_time: z.string().optional(),
|
|
485
488
|
scpi: Scpi$inboundSchema.optional(),
|
|
486
489
|
screenshots: z.nullable(z.array(Screenshot$inboundSchema)).optional(),
|
|
@@ -139,6 +139,7 @@ import {
|
|
|
139
139
|
RustdeskRendezvous$inboundSchema,
|
|
140
140
|
} from "./rustdeskrendezvous.js";
|
|
141
141
|
import { S7, S7$inboundSchema } from "./s7.js";
|
|
142
|
+
import { Sapient, Sapient$inboundSchema } from "./sapient.js";
|
|
142
143
|
import { SapRouter, SapRouter$inboundSchema } from "./saprouter.js";
|
|
143
144
|
import { Scpi, Scpi$inboundSchema } from "./scpi.js";
|
|
144
145
|
import { Screenshot, Screenshot$inboundSchema } from "./screenshot.js";
|
|
@@ -296,6 +297,7 @@ export type ServiceScan = {
|
|
|
296
297
|
rustdeskRendezvous?: RustdeskRendezvous | undefined;
|
|
297
298
|
s7?: S7 | undefined;
|
|
298
299
|
sapRouter?: SapRouter | undefined;
|
|
300
|
+
sapient?: Sapient | undefined;
|
|
299
301
|
scanTime?: string | undefined;
|
|
300
302
|
scpi?: Scpi | undefined;
|
|
301
303
|
screenshots?: Array<Screenshot> | null | undefined;
|
|
@@ -450,6 +452,7 @@ export const ServiceScan$inboundSchema: z.ZodType<
|
|
|
450
452
|
rustdesk_rendezvous: RustdeskRendezvous$inboundSchema.optional(),
|
|
451
453
|
s7: S7$inboundSchema.optional(),
|
|
452
454
|
sap_router: SapRouter$inboundSchema.optional(),
|
|
455
|
+
sapient: Sapient$inboundSchema.optional(),
|
|
453
456
|
scan_time: z.string().optional(),
|
|
454
457
|
scpi: Scpi$inboundSchema.optional(),
|
|
455
458
|
screenshots: z.nullable(z.array(Screenshot$inboundSchema)).optional(),
|
|
@@ -13,7 +13,13 @@ import {
|
|
|
13
13
|
} from "./serviceonhostrange.js";
|
|
14
14
|
|
|
15
15
|
export type ServicesOnHostResponse = {
|
|
16
|
+
/**
|
|
17
|
+
* A token that can be used to retrieve the next page of ranges.
|
|
18
|
+
*/
|
|
16
19
|
nextPageToken: string;
|
|
20
|
+
/**
|
|
21
|
+
* The list of requested services.
|
|
22
|
+
*/
|
|
17
23
|
ranges: Array<ServiceOnHostRange> | null;
|
|
18
24
|
};
|
|
19
25
|
|
|
@@ -23,12 +29,11 @@ export const ServicesOnHostResponse$inboundSchema: z.ZodType<
|
|
|
23
29
|
z.ZodTypeDef,
|
|
24
30
|
unknown
|
|
25
31
|
> = z.object({
|
|
26
|
-
|
|
27
|
-
|
|
32
|
+
next_page_token: z.string(),
|
|
33
|
+
ranges: z.nullable(z.array(ServiceOnHostRange$inboundSchema)),
|
|
28
34
|
}).transform((v) => {
|
|
29
35
|
return remap$(v, {
|
|
30
|
-
"
|
|
31
|
-
"Ranges": "ranges",
|
|
36
|
+
"next_page_token": "nextPageToken",
|
|
32
37
|
});
|
|
33
38
|
});
|
|
34
39
|
|
|
@@ -13,6 +13,7 @@ export type Socks = {
|
|
|
13
13
|
preferredAuthentication?: string | undefined;
|
|
14
14
|
preferredAuthenticationValue?: number | undefined;
|
|
15
15
|
socksVersion?: number | undefined;
|
|
16
|
+
supportedVersions?: Array<number> | null | undefined;
|
|
16
17
|
};
|
|
17
18
|
|
|
18
19
|
/** @internal */
|
|
@@ -22,12 +23,14 @@ export const Socks$inboundSchema: z.ZodType<Socks, z.ZodTypeDef, unknown> = z
|
|
|
22
23
|
preferred_authentication: z.string().optional(),
|
|
23
24
|
preferred_authentication_value: z.number().int().optional(),
|
|
24
25
|
socks_version: z.number().int().optional(),
|
|
26
|
+
supported_versions: z.nullable(z.array(z.number().int())).optional(),
|
|
25
27
|
}).transform((v) => {
|
|
26
28
|
return remap$(v, {
|
|
27
29
|
"no_authentication_required": "noAuthenticationRequired",
|
|
28
30
|
"preferred_authentication": "preferredAuthentication",
|
|
29
31
|
"preferred_authentication_value": "preferredAuthenticationValue",
|
|
30
32
|
"socks_version": "socksVersion",
|
|
33
|
+
"supported_versions": "supportedVersions",
|
|
31
34
|
});
|
|
32
35
|
});
|
|
33
36
|
|
|
@@ -35,6 +35,9 @@ export * from "./v3globaldatasearchaggregate.js";
|
|
|
35
35
|
export * from "./v3globaldatasearchconvert.js";
|
|
36
36
|
export * from "./v3globaldatasearchquery.js";
|
|
37
37
|
export * from "./v3globaldataserviceonhost.js";
|
|
38
|
+
export * from "./v3threathuntingcenseyejobresults.js";
|
|
39
|
+
export * from "./v3threathuntingcenseyejobscreate.js";
|
|
40
|
+
export * from "./v3threathuntingcenseyejobsget.js";
|
|
38
41
|
export * from "./v3threathuntinggethostobservationswithcertificate.js";
|
|
39
42
|
export * from "./v3threathuntingscansdiscovery.js";
|
|
40
43
|
export * from "./v3threathuntingscansget.js";
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import * as components from "../components/index.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
export type V3ThreathuntingCenseyeJobResultsGlobals = {
|
|
13
|
+
organizationId?: string | undefined;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export type V3ThreathuntingCenseyeJobResultsRequest = {
|
|
17
|
+
/**
|
|
18
|
+
* The ID of a Censys organization to associate the request with. See the [Getting Started docs](https://docs.censys.com/reference/get-started#step-3-find-and-use-your-organization-id-optional) for more information.
|
|
19
|
+
*/
|
|
20
|
+
organizationId?: string | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* The unique identifier of the CensEye job.
|
|
23
|
+
*/
|
|
24
|
+
jobId: string;
|
|
25
|
+
/**
|
|
26
|
+
* Number of results per page (max 100)
|
|
27
|
+
*/
|
|
28
|
+
pageSize?: number | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* Pagination token from previous response
|
|
31
|
+
*/
|
|
32
|
+
pageToken?: string | undefined;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export type V3ThreathuntingCenseyeJobResultsResponse = {
|
|
36
|
+
headers: { [k: string]: Array<string> };
|
|
37
|
+
result: components.ResponseEnvelopeCenseyeResultsResponse;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
/** @internal */
|
|
41
|
+
export type V3ThreathuntingCenseyeJobResultsRequest$Outbound = {
|
|
42
|
+
organization_id?: string | undefined;
|
|
43
|
+
job_id: string;
|
|
44
|
+
page_size: number;
|
|
45
|
+
page_token?: string | undefined;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
/** @internal */
|
|
49
|
+
export const V3ThreathuntingCenseyeJobResultsRequest$outboundSchema: z.ZodType<
|
|
50
|
+
V3ThreathuntingCenseyeJobResultsRequest$Outbound,
|
|
51
|
+
z.ZodTypeDef,
|
|
52
|
+
V3ThreathuntingCenseyeJobResultsRequest
|
|
53
|
+
> = z.object({
|
|
54
|
+
organizationId: z.string().optional(),
|
|
55
|
+
jobId: z.string(),
|
|
56
|
+
pageSize: z.number().int().default(100),
|
|
57
|
+
pageToken: z.string().optional(),
|
|
58
|
+
}).transform((v) => {
|
|
59
|
+
return remap$(v, {
|
|
60
|
+
organizationId: "organization_id",
|
|
61
|
+
jobId: "job_id",
|
|
62
|
+
pageSize: "page_size",
|
|
63
|
+
pageToken: "page_token",
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
export function v3ThreathuntingCenseyeJobResultsRequestToJSON(
|
|
68
|
+
v3ThreathuntingCenseyeJobResultsRequest:
|
|
69
|
+
V3ThreathuntingCenseyeJobResultsRequest,
|
|
70
|
+
): string {
|
|
71
|
+
return JSON.stringify(
|
|
72
|
+
V3ThreathuntingCenseyeJobResultsRequest$outboundSchema.parse(
|
|
73
|
+
v3ThreathuntingCenseyeJobResultsRequest,
|
|
74
|
+
),
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/** @internal */
|
|
79
|
+
export const V3ThreathuntingCenseyeJobResultsResponse$inboundSchema: z.ZodType<
|
|
80
|
+
V3ThreathuntingCenseyeJobResultsResponse,
|
|
81
|
+
z.ZodTypeDef,
|
|
82
|
+
unknown
|
|
83
|
+
> = z.object({
|
|
84
|
+
Headers: z.record(z.array(z.string())).default({}),
|
|
85
|
+
Result: components.ResponseEnvelopeCenseyeResultsResponse$inboundSchema,
|
|
86
|
+
}).transform((v) => {
|
|
87
|
+
return remap$(v, {
|
|
88
|
+
"Headers": "headers",
|
|
89
|
+
"Result": "result",
|
|
90
|
+
});
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
export function v3ThreathuntingCenseyeJobResultsResponseFromJSON(
|
|
94
|
+
jsonString: string,
|
|
95
|
+
): SafeParseResult<
|
|
96
|
+
V3ThreathuntingCenseyeJobResultsResponse,
|
|
97
|
+
SDKValidationError
|
|
98
|
+
> {
|
|
99
|
+
return safeParse(
|
|
100
|
+
jsonString,
|
|
101
|
+
(x) =>
|
|
102
|
+
V3ThreathuntingCenseyeJobResultsResponse$inboundSchema.parse(
|
|
103
|
+
JSON.parse(x),
|
|
104
|
+
),
|
|
105
|
+
`Failed to parse 'V3ThreathuntingCenseyeJobResultsResponse' from JSON`,
|
|
106
|
+
);
|
|
107
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import * as components from "../components/index.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
export type V3ThreathuntingCenseyeJobsCreateGlobals = {
|
|
13
|
+
organizationId?: string | undefined;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export type V3ThreathuntingCenseyeJobsCreateRequest = {
|
|
17
|
+
/**
|
|
18
|
+
* The ID of a Censys organization to associate the request with. See the [Getting Started docs](https://docs.censys.com/reference/get-started#step-3-find-and-use-your-organization-id-optional) for more information.
|
|
19
|
+
*/
|
|
20
|
+
organizationId?: string | undefined;
|
|
21
|
+
createCenseyeJobInputBody: components.CreateCenseyeJobInputBody;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export type V3ThreathuntingCenseyeJobsCreateResponse = {
|
|
25
|
+
headers: { [k: string]: Array<string> };
|
|
26
|
+
result: components.ResponseEnvelopeCenseyeJob;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
/** @internal */
|
|
30
|
+
export type V3ThreathuntingCenseyeJobsCreateRequest$Outbound = {
|
|
31
|
+
organization_id?: string | undefined;
|
|
32
|
+
CreateCenseyeJobInputBody: components.CreateCenseyeJobInputBody$Outbound;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
/** @internal */
|
|
36
|
+
export const V3ThreathuntingCenseyeJobsCreateRequest$outboundSchema: z.ZodType<
|
|
37
|
+
V3ThreathuntingCenseyeJobsCreateRequest$Outbound,
|
|
38
|
+
z.ZodTypeDef,
|
|
39
|
+
V3ThreathuntingCenseyeJobsCreateRequest
|
|
40
|
+
> = z.object({
|
|
41
|
+
organizationId: z.string().optional(),
|
|
42
|
+
createCenseyeJobInputBody:
|
|
43
|
+
components.CreateCenseyeJobInputBody$outboundSchema,
|
|
44
|
+
}).transform((v) => {
|
|
45
|
+
return remap$(v, {
|
|
46
|
+
organizationId: "organization_id",
|
|
47
|
+
createCenseyeJobInputBody: "CreateCenseyeJobInputBody",
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
export function v3ThreathuntingCenseyeJobsCreateRequestToJSON(
|
|
52
|
+
v3ThreathuntingCenseyeJobsCreateRequest:
|
|
53
|
+
V3ThreathuntingCenseyeJobsCreateRequest,
|
|
54
|
+
): string {
|
|
55
|
+
return JSON.stringify(
|
|
56
|
+
V3ThreathuntingCenseyeJobsCreateRequest$outboundSchema.parse(
|
|
57
|
+
v3ThreathuntingCenseyeJobsCreateRequest,
|
|
58
|
+
),
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/** @internal */
|
|
63
|
+
export const V3ThreathuntingCenseyeJobsCreateResponse$inboundSchema: z.ZodType<
|
|
64
|
+
V3ThreathuntingCenseyeJobsCreateResponse,
|
|
65
|
+
z.ZodTypeDef,
|
|
66
|
+
unknown
|
|
67
|
+
> = z.object({
|
|
68
|
+
Headers: z.record(z.array(z.string())).default({}),
|
|
69
|
+
Result: components.ResponseEnvelopeCenseyeJob$inboundSchema,
|
|
70
|
+
}).transform((v) => {
|
|
71
|
+
return remap$(v, {
|
|
72
|
+
"Headers": "headers",
|
|
73
|
+
"Result": "result",
|
|
74
|
+
});
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
export function v3ThreathuntingCenseyeJobsCreateResponseFromJSON(
|
|
78
|
+
jsonString: string,
|
|
79
|
+
): SafeParseResult<
|
|
80
|
+
V3ThreathuntingCenseyeJobsCreateResponse,
|
|
81
|
+
SDKValidationError
|
|
82
|
+
> {
|
|
83
|
+
return safeParse(
|
|
84
|
+
jsonString,
|
|
85
|
+
(x) =>
|
|
86
|
+
V3ThreathuntingCenseyeJobsCreateResponse$inboundSchema.parse(
|
|
87
|
+
JSON.parse(x),
|
|
88
|
+
),
|
|
89
|
+
`Failed to parse 'V3ThreathuntingCenseyeJobsCreateResponse' from JSON`,
|
|
90
|
+
);
|
|
91
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import * as components from "../components/index.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
export type V3ThreathuntingCenseyeJobsGetGlobals = {
|
|
13
|
+
organizationId?: string | undefined;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export type V3ThreathuntingCenseyeJobsGetRequest = {
|
|
17
|
+
/**
|
|
18
|
+
* The ID of a Censys organization to associate the request with. See the [Getting Started docs](https://docs.censys.com/reference/get-started#step-3-find-and-use-your-organization-id-optional) for more information.
|
|
19
|
+
*/
|
|
20
|
+
organizationId?: string | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* The unique identifier of the CensEye job.
|
|
23
|
+
*/
|
|
24
|
+
jobId: string;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export type V3ThreathuntingCenseyeJobsGetResponse = {
|
|
28
|
+
headers: { [k: string]: Array<string> };
|
|
29
|
+
result: components.ResponseEnvelopeCenseyeJob;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
/** @internal */
|
|
33
|
+
export type V3ThreathuntingCenseyeJobsGetRequest$Outbound = {
|
|
34
|
+
organization_id?: string | undefined;
|
|
35
|
+
job_id: string;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
/** @internal */
|
|
39
|
+
export const V3ThreathuntingCenseyeJobsGetRequest$outboundSchema: z.ZodType<
|
|
40
|
+
V3ThreathuntingCenseyeJobsGetRequest$Outbound,
|
|
41
|
+
z.ZodTypeDef,
|
|
42
|
+
V3ThreathuntingCenseyeJobsGetRequest
|
|
43
|
+
> = z.object({
|
|
44
|
+
organizationId: z.string().optional(),
|
|
45
|
+
jobId: z.string(),
|
|
46
|
+
}).transform((v) => {
|
|
47
|
+
return remap$(v, {
|
|
48
|
+
organizationId: "organization_id",
|
|
49
|
+
jobId: "job_id",
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
export function v3ThreathuntingCenseyeJobsGetRequestToJSON(
|
|
54
|
+
v3ThreathuntingCenseyeJobsGetRequest: V3ThreathuntingCenseyeJobsGetRequest,
|
|
55
|
+
): string {
|
|
56
|
+
return JSON.stringify(
|
|
57
|
+
V3ThreathuntingCenseyeJobsGetRequest$outboundSchema.parse(
|
|
58
|
+
v3ThreathuntingCenseyeJobsGetRequest,
|
|
59
|
+
),
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/** @internal */
|
|
64
|
+
export const V3ThreathuntingCenseyeJobsGetResponse$inboundSchema: z.ZodType<
|
|
65
|
+
V3ThreathuntingCenseyeJobsGetResponse,
|
|
66
|
+
z.ZodTypeDef,
|
|
67
|
+
unknown
|
|
68
|
+
> = z.object({
|
|
69
|
+
Headers: z.record(z.array(z.string())).default({}),
|
|
70
|
+
Result: components.ResponseEnvelopeCenseyeJob$inboundSchema,
|
|
71
|
+
}).transform((v) => {
|
|
72
|
+
return remap$(v, {
|
|
73
|
+
"Headers": "headers",
|
|
74
|
+
"Result": "result",
|
|
75
|
+
});
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
export function v3ThreathuntingCenseyeJobsGetResponseFromJSON(
|
|
79
|
+
jsonString: string,
|
|
80
|
+
): SafeParseResult<V3ThreathuntingCenseyeJobsGetResponse, SDKValidationError> {
|
|
81
|
+
return safeParse(
|
|
82
|
+
jsonString,
|
|
83
|
+
(x) =>
|
|
84
|
+
V3ThreathuntingCenseyeJobsGetResponse$inboundSchema.parse(JSON.parse(x)),
|
|
85
|
+
`Failed to parse 'V3ThreathuntingCenseyeJobsGetResponse' from JSON`,
|
|
86
|
+
);
|
|
87
|
+
}
|
package/src/sdk/threathunting.ts
CHANGED
|
@@ -2,7 +2,10 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
+
import { threatHuntingCreateCenseyeJob } from "../funcs/threatHuntingCreateCenseyeJob.js";
|
|
5
6
|
import { threatHuntingCreateTrackedScan } from "../funcs/threatHuntingCreateTrackedScan.js";
|
|
7
|
+
import { threatHuntingGetCenseyeJob } from "../funcs/threatHuntingGetCenseyeJob.js";
|
|
8
|
+
import { threatHuntingGetCenseyeJobResults } from "../funcs/threatHuntingGetCenseyeJobResults.js";
|
|
6
9
|
import { threatHuntingGetHostObservationsWithCertificate } from "../funcs/threatHuntingGetHostObservationsWithCertificate.js";
|
|
7
10
|
import { threatHuntingGetTrackedScanThreatHunting } from "../funcs/threatHuntingGetTrackedScanThreatHunting.js";
|
|
8
11
|
import { threatHuntingListThreats } from "../funcs/threatHuntingListThreats.js";
|
|
@@ -12,6 +15,57 @@ import * as operations from "../models/operations/index.js";
|
|
|
12
15
|
import { unwrapAsync } from "../types/fp.js";
|
|
13
16
|
|
|
14
17
|
export class ThreatHunting extends ClientSDK {
|
|
18
|
+
/**
|
|
19
|
+
* CensEye: Create a pivot analysis job
|
|
20
|
+
*
|
|
21
|
+
* @remarks
|
|
22
|
+
* Create an asynchronous CensEye pivot analysis job for a host, web property, or certificate. The job extracts [default pivot fields](https://docs.censys.com/docs/platform-threat-hunting-use-censeye-to-build-detections#default-pivot-fields) from the target asset and counts matching documents for each field-value pair. Poll the job status endpoint to track progress, then retrieve results when complete.<br><br>To use this endpoint, your organization must have access to the Threat Hunting module.<br><br>This endpoint costs 44 credits to execute for a host, 28 credits to execute for a web property, and 7 credits to execute for a certificate.
|
|
23
|
+
*/
|
|
24
|
+
async createCenseyeJob(
|
|
25
|
+
request: operations.V3ThreathuntingCenseyeJobsCreateRequest,
|
|
26
|
+
options?: RequestOptions,
|
|
27
|
+
): Promise<operations.V3ThreathuntingCenseyeJobsCreateResponse> {
|
|
28
|
+
return unwrapAsync(threatHuntingCreateCenseyeJob(
|
|
29
|
+
this,
|
|
30
|
+
request,
|
|
31
|
+
options,
|
|
32
|
+
));
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* CensEye: Get job status
|
|
37
|
+
*
|
|
38
|
+
* @remarks
|
|
39
|
+
* Retrieve the current status of a CensEye pivot analysis job. Use this to poll for completion before fetching results.<br><br>To use this endpoint, your organization must have access to the Threat Hunting module.
|
|
40
|
+
*/
|
|
41
|
+
async getCenseyeJob(
|
|
42
|
+
request: operations.V3ThreathuntingCenseyeJobsGetRequest,
|
|
43
|
+
options?: RequestOptions,
|
|
44
|
+
): Promise<operations.V3ThreathuntingCenseyeJobsGetResponse> {
|
|
45
|
+
return unwrapAsync(threatHuntingGetCenseyeJob(
|
|
46
|
+
this,
|
|
47
|
+
request,
|
|
48
|
+
options,
|
|
49
|
+
));
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* CensEye: Get job results
|
|
54
|
+
*
|
|
55
|
+
* @remarks
|
|
56
|
+
* Retrieve the results of a completed CensEye pivot analysis job. Each result contains a count and the field-value pairs that were analyzed. Results may be empty if the job is still running.<br><br>Results are paginated. Use the `next_page_token` from the response to fetch subsequent pages.<br><br>To use this endpoint, your organization must have access to the Threat Hunting module.
|
|
57
|
+
*/
|
|
58
|
+
async getCenseyeJobResults(
|
|
59
|
+
request: operations.V3ThreathuntingCenseyeJobResultsRequest,
|
|
60
|
+
options?: RequestOptions,
|
|
61
|
+
): Promise<operations.V3ThreathuntingCenseyeJobResultsResponse> {
|
|
62
|
+
return unwrapAsync(threatHuntingGetCenseyeJobResults(
|
|
63
|
+
this,
|
|
64
|
+
request,
|
|
65
|
+
options,
|
|
66
|
+
));
|
|
67
|
+
}
|
|
68
|
+
|
|
15
69
|
/**
|
|
16
70
|
* Get host history for a certificate
|
|
17
71
|
*
|
|
@@ -87,7 +141,7 @@ export class ThreatHunting extends ClientSDK {
|
|
|
87
141
|
* CensEye: Retrieve value counts to discover pivots
|
|
88
142
|
*
|
|
89
143
|
* @remarks
|
|
90
|
-
* Get counts of web assets for specific field-value pairs and combinations of field-value pairs. This is similar to the [CensEye functionality](https://docs.censys.com/docs/platform-threat-hunting-use-censeye-to-build-detections#/) available in the Platform web UI, but it allows you to define specific fields of interest rather than the [default fields](https://docs.censys.com/docs/platform-threat-hunting-use-censeye-to-build-detections#default-pivot-fields) leveraged by the tool in the UI.<br><br>Each array can only target fields within the same nested object. For example, you can combine `host.services.port=80` and `host.services.protocol=SSH` in the same array, but you cannot combine `host.services.port=80` and `host.location.country
|
|
144
|
+
* Get counts of web assets for specific field-value pairs and combinations of field-value pairs. This is similar to the [CensEye functionality](https://docs.censys.com/docs/platform-threat-hunting-use-censeye-to-build-detections#/) available in the Platform web UI, but it allows you to define specific fields of interest rather than the [default fields](https://docs.censys.com/docs/platform-threat-hunting-use-censeye-to-build-detections#default-pivot-fields) leveraged by the tool in the UI.<br><br>Each array can only target fields within the same nested object and may contain at most 5 field-value pairs. For example, you can combine `host.services.port=80` and `host.services.protocol=SSH` in the same array, but you cannot combine `host.services.port=80` and `host.location.country="United States"` in the same array. You can input multiple arrays of objects in each API call.<br><br>To use this endpoint, your organization must have access to the Threat Hunting Module. This endpoint costs 1 credit per count condition (array of objects) included in the API call.
|
|
91
145
|
*/
|
|
92
146
|
async valueCounts(
|
|
93
147
|
request: operations.V3ThreathuntingValueCountsRequest,
|