@censys/platform-sdk 0.4.3 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/FUNCTIONS.md +0 -1
- package/README.md +17 -2
- package/docs/sdks/collections/README.md +12 -6
- package/docs/sdks/globaldata/README.md +260 -6
- package/docs/sdks/threathunting/README.md +335 -0
- package/examples/globalDataSearch.example.ts +0 -1
- package/examples/package-lock.json +5 -6
- package/funcs/globalDataCreateTrackedScan.d.ts +18 -0
- package/funcs/globalDataCreateTrackedScan.d.ts.map +1 -0
- package/funcs/globalDataCreateTrackedScan.js +132 -0
- package/funcs/globalDataCreateTrackedScan.js.map +1 -0
- package/funcs/globalDataGetTrackedScan.d.ts +19 -0
- package/funcs/globalDataGetTrackedScan.d.ts.map +1 -0
- package/funcs/globalDataGetTrackedScan.js +137 -0
- package/funcs/globalDataGetTrackedScan.js.map +1 -0
- package/funcs/globalDataGetTrackedScanThreatHunting.d.ts +19 -0
- package/funcs/globalDataGetTrackedScanThreatHunting.d.ts.map +1 -0
- package/funcs/globalDataGetTrackedScanThreatHunting.js +137 -0
- package/funcs/globalDataGetTrackedScanThreatHunting.js.map +1 -0
- package/funcs/threatHuntingCreateTrackedScan.d.ts +18 -0
- package/funcs/threatHuntingCreateTrackedScan.d.ts.map +1 -0
- package/funcs/threatHuntingCreateTrackedScan.js +129 -0
- package/funcs/threatHuntingCreateTrackedScan.js.map +1 -0
- package/funcs/threatHuntingGetHostObservationsWithCertificate.d.ts +18 -0
- package/funcs/threatHuntingGetHostObservationsWithCertificate.d.ts.map +1 -0
- package/funcs/threatHuntingGetHostObservationsWithCertificate.js +141 -0
- package/funcs/threatHuntingGetHostObservationsWithCertificate.js.map +1 -0
- package/jsr.json +1 -1
- package/lib/config.d.ts +4 -4
- package/lib/config.js +4 -4
- package/models/components/elasticsearch.d.ts +3 -0
- package/models/components/elasticsearch.d.ts.map +1 -1
- package/models/components/elasticsearch.js +5 -0
- package/models/components/elasticsearch.js.map +1 -1
- package/models/components/elasticsearcherrormessage.d.ts +33 -0
- package/models/components/elasticsearcherrormessage.d.ts.map +1 -0
- package/models/components/elasticsearcherrormessage.js +73 -0
- package/models/components/elasticsearcherrormessage.js.map +1 -0
- package/models/components/hostobservationrange.d.ts +39 -0
- package/models/components/hostobservationrange.d.ts.map +1 -0
- package/models/components/hostobservationrange.js +92 -0
- package/models/components/hostobservationrange.js.map +1 -0
- package/models/components/hostobservationresponse.d.ts +34 -0
- package/models/components/hostobservationresponse.d.ts.map +1 -0
- package/models/components/hostobservationresponse.js +85 -0
- package/models/components/hostobservationresponse.js.map +1 -0
- package/models/components/httpfavicon.d.ts +5 -0
- package/models/components/httpfavicon.d.ts.map +1 -1
- package/models/components/httpfavicon.js +4 -0
- package/models/components/httpfavicon.js.map +1 -1
- package/models/components/index.d.ts +14 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +14 -0
- package/models/components/index.js.map +1 -1
- package/models/components/responseenvelopehostobservationresponse.d.ts +30 -0
- package/models/components/responseenvelopehostobservationresponse.d.ts.map +1 -0
- package/models/components/responseenvelopehostobservationresponse.js +70 -0
- package/models/components/responseenvelopehostobservationresponse.js.map +1 -0
- package/models/components/responseenvelopetrackedscan.d.ts +30 -0
- package/models/components/responseenvelopetrackedscan.d.ts.map +1 -0
- package/models/components/responseenvelopetrackedscan.js +70 -0
- package/models/components/responseenvelopetrackedscan.js.map +1 -0
- package/models/components/scansdiscoveryinputbody.d.ts +172 -0
- package/models/components/scansdiscoveryinputbody.d.ts.map +1 -0
- package/models/components/scansdiscoveryinputbody.js +233 -0
- package/models/components/scansdiscoveryinputbody.js.map +1 -0
- package/models/components/scansrescaninputbody.d.ts +214 -0
- package/models/components/scansrescaninputbody.d.ts.map +1 -0
- package/models/components/scansrescaninputbody.js +268 -0
- package/models/components/scansrescaninputbody.js.map +1 -0
- package/models/components/screenshot.d.ts +2 -0
- package/models/components/screenshot.d.ts.map +1 -1
- package/models/components/screenshot.js +11 -0
- package/models/components/screenshot.js.map +1 -1
- package/models/components/searchaggregateinputbody.d.ts +5 -0
- package/models/components/searchaggregateinputbody.d.ts.map +1 -1
- package/models/components/searchaggregateinputbody.js +4 -0
- package/models/components/searchaggregateinputbody.js.map +1 -1
- package/models/components/searchvaluecountsinputbody.d.ts +5 -0
- package/models/components/searchvaluecountsinputbody.d.ts.map +1 -1
- package/models/components/searchvaluecountsinputbody.js +2 -0
- package/models/components/searchvaluecountsinputbody.js.map +1 -1
- package/models/components/serviceid.d.ts +70 -0
- package/models/components/serviceid.d.ts.map +1 -0
- package/models/components/serviceid.js +106 -0
- package/models/components/serviceid.js.map +1 -0
- package/models/components/trackedscan.d.ts +39 -0
- package/models/components/trackedscan.d.ts.map +1 -0
- package/models/components/trackedscan.js +90 -0
- package/models/components/trackedscan.js.map +1 -0
- package/models/components/trackedscanscantarget.d.ts +39 -0
- package/models/components/trackedscanscantarget.d.ts.map +1 -0
- package/models/components/trackedscanscantarget.js +94 -0
- package/models/components/trackedscanscantarget.js.map +1 -0
- package/models/components/trackedscanscantargethostnameport.d.ts +31 -0
- package/models/components/trackedscanscantargethostnameport.d.ts.map +1 -0
- package/models/components/trackedscanscantargethostnameport.js +71 -0
- package/models/components/trackedscanscantargethostnameport.js.map +1 -0
- package/models/components/trackedscanscantargethostport.d.ts +31 -0
- package/models/components/trackedscanscantargethostport.d.ts.map +1 -0
- package/models/components/trackedscanscantargethostport.js +71 -0
- package/models/components/trackedscanscantargethostport.js.map +1 -0
- package/models/components/trackedscantask.d.ts +74 -0
- package/models/components/trackedscantask.d.ts.map +1 -0
- package/models/components/trackedscantask.js +106 -0
- package/models/components/trackedscantask.js.map +1 -0
- package/models/components/weborigin.d.ts +31 -0
- package/models/components/weborigin.d.ts.map +1 -0
- package/models/components/weborigin.js +71 -0
- package/models/components/weborigin.js.map +1 -0
- package/models/operations/index.d.ts +5 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +5 -0
- package/models/operations/index.js.map +1 -1
- package/models/operations/v3globaldatascansget.d.ts +94 -0
- package/models/operations/v3globaldatascansget.d.ts.map +1 -0
- package/models/operations/v3globaldatascansget.js +157 -0
- package/models/operations/v3globaldatascansget.js.map +1 -0
- package/models/operations/v3globaldatascansrescan.d.ts +91 -0
- package/models/operations/v3globaldatascansrescan.d.ts.map +1 -0
- package/models/operations/v3globaldatascansrescan.js +157 -0
- package/models/operations/v3globaldatascansrescan.js.map +1 -0
- package/models/operations/v3threathuntinggethostobservationswithcertificate.d.ts +124 -0
- package/models/operations/v3threathuntinggethostobservationswithcertificate.d.ts.map +1 -0
- package/models/operations/v3threathuntinggethostobservationswithcertificate.js +183 -0
- package/models/operations/v3threathuntinggethostobservationswithcertificate.js.map +1 -0
- package/models/operations/v3threathuntingscansdiscovery.d.ts +91 -0
- package/models/operations/v3threathuntingscansdiscovery.d.ts.map +1 -0
- package/models/operations/v3threathuntingscansdiscovery.js +157 -0
- package/models/operations/v3threathuntingscansdiscovery.js.map +1 -0
- package/models/operations/v3threathuntingscansget.d.ts +94 -0
- package/models/operations/v3threathuntingscansget.d.ts.map +1 -0
- package/models/operations/v3threathuntingscansget.js +157 -0
- package/models/operations/v3threathuntingscansget.js.map +1 -0
- package/package.json +4 -5
- package/sdk/globaldata.d.ts +23 -0
- package/sdk/globaldata.d.ts.map +1 -1
- package/sdk/globaldata.js +32 -0
- package/sdk/globaldata.js.map +1 -1
- package/sdk/threathunting.d.ts +30 -0
- package/sdk/threathunting.d.ts.map +1 -1
- package/sdk/threathunting.js +42 -0
- package/sdk/threathunting.js.map +1 -1
- package/src/funcs/globalDataCreateTrackedScan.ts +185 -0
- package/src/funcs/globalDataGetTrackedScan.ts +191 -0
- package/src/funcs/globalDataGetTrackedScanThreatHunting.ts +191 -0
- package/src/funcs/threatHuntingCreateTrackedScan.ts +188 -0
- package/src/funcs/threatHuntingGetHostObservationsWithCertificate.ts +201 -0
- package/src/lib/config.ts +4 -4
- package/src/models/components/elasticsearch.ts +12 -0
- package/src/models/components/elasticsearcherrormessage.ts +74 -0
- package/src/models/components/hostobservationrange.ts +99 -0
- package/src/models/components/hostobservationresponse.ts +91 -0
- package/src/models/components/httpfavicon.ts +9 -0
- package/src/models/components/index.ts +14 -0
- package/src/models/components/responseenvelopehostobservationresponse.ts +83 -0
- package/src/models/components/responseenvelopetrackedscan.ts +74 -0
- package/src/models/components/scansdiscoveryinputbody.ts +385 -0
- package/src/models/components/scansrescaninputbody.ts +428 -0
- package/src/models/components/screenshot.ts +13 -0
- package/src/models/components/searchaggregateinputbody.ts +9 -0
- package/src/models/components/searchvaluecountsinputbody.ts +7 -0
- package/src/models/components/serviceid.ts +116 -0
- package/src/models/components/trackedscan.ts +101 -0
- package/src/models/components/trackedscanscantarget.ts +117 -0
- package/src/models/components/trackedscanscantargethostnameport.ts +73 -0
- package/src/models/components/trackedscanscantargethostport.ts +72 -0
- package/src/models/components/trackedscantask.ts +114 -0
- package/src/models/components/weborigin.ts +66 -0
- package/src/models/operations/index.ts +5 -0
- package/src/models/operations/v3globaldatascansget.ts +232 -0
- package/src/models/operations/v3globaldatascansrescan.ts +229 -0
- package/src/models/operations/v3threathuntinggethostobservationswithcertificate.ts +315 -0
- package/src/models/operations/v3threathuntingscansdiscovery.ts +238 -0
- package/src/models/operations/v3threathuntingscansget.ts +232 -0
- package/src/sdk/globaldata.ts +56 -0
- package/src/sdk/threathunting.ts +77 -0
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
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 V3ThreathuntingScansGetGlobals = {
|
|
13
|
+
organizationId?: string | undefined;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export type V3ThreathuntingScansGetRequest = {
|
|
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-set-your-organization-id) for more information.
|
|
19
|
+
*/
|
|
20
|
+
organizationId?: string | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* The unique identifier of the tracked scan
|
|
23
|
+
*/
|
|
24
|
+
scanId: string;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export type V3ThreathuntingScansGetResponse = {
|
|
28
|
+
headers: { [k: string]: Array<string> };
|
|
29
|
+
result: components.ResponseEnvelopeTrackedScan;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
/** @internal */
|
|
33
|
+
export const V3ThreathuntingScansGetGlobals$inboundSchema: z.ZodType<
|
|
34
|
+
V3ThreathuntingScansGetGlobals,
|
|
35
|
+
z.ZodTypeDef,
|
|
36
|
+
unknown
|
|
37
|
+
> = z.object({
|
|
38
|
+
organization_id: z.string().optional(),
|
|
39
|
+
}).transform((v) => {
|
|
40
|
+
return remap$(v, {
|
|
41
|
+
"organization_id": "organizationId",
|
|
42
|
+
});
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
/** @internal */
|
|
46
|
+
export type V3ThreathuntingScansGetGlobals$Outbound = {
|
|
47
|
+
organization_id?: string | undefined;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
/** @internal */
|
|
51
|
+
export const V3ThreathuntingScansGetGlobals$outboundSchema: z.ZodType<
|
|
52
|
+
V3ThreathuntingScansGetGlobals$Outbound,
|
|
53
|
+
z.ZodTypeDef,
|
|
54
|
+
V3ThreathuntingScansGetGlobals
|
|
55
|
+
> = z.object({
|
|
56
|
+
organizationId: z.string().optional(),
|
|
57
|
+
}).transform((v) => {
|
|
58
|
+
return remap$(v, {
|
|
59
|
+
organizationId: "organization_id",
|
|
60
|
+
});
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* @internal
|
|
65
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
66
|
+
*/
|
|
67
|
+
export namespace V3ThreathuntingScansGetGlobals$ {
|
|
68
|
+
/** @deprecated use `V3ThreathuntingScansGetGlobals$inboundSchema` instead. */
|
|
69
|
+
export const inboundSchema = V3ThreathuntingScansGetGlobals$inboundSchema;
|
|
70
|
+
/** @deprecated use `V3ThreathuntingScansGetGlobals$outboundSchema` instead. */
|
|
71
|
+
export const outboundSchema = V3ThreathuntingScansGetGlobals$outboundSchema;
|
|
72
|
+
/** @deprecated use `V3ThreathuntingScansGetGlobals$Outbound` instead. */
|
|
73
|
+
export type Outbound = V3ThreathuntingScansGetGlobals$Outbound;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export function v3ThreathuntingScansGetGlobalsToJSON(
|
|
77
|
+
v3ThreathuntingScansGetGlobals: V3ThreathuntingScansGetGlobals,
|
|
78
|
+
): string {
|
|
79
|
+
return JSON.stringify(
|
|
80
|
+
V3ThreathuntingScansGetGlobals$outboundSchema.parse(
|
|
81
|
+
v3ThreathuntingScansGetGlobals,
|
|
82
|
+
),
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export function v3ThreathuntingScansGetGlobalsFromJSON(
|
|
87
|
+
jsonString: string,
|
|
88
|
+
): SafeParseResult<V3ThreathuntingScansGetGlobals, SDKValidationError> {
|
|
89
|
+
return safeParse(
|
|
90
|
+
jsonString,
|
|
91
|
+
(x) => V3ThreathuntingScansGetGlobals$inboundSchema.parse(JSON.parse(x)),
|
|
92
|
+
`Failed to parse 'V3ThreathuntingScansGetGlobals' from JSON`,
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/** @internal */
|
|
97
|
+
export const V3ThreathuntingScansGetRequest$inboundSchema: z.ZodType<
|
|
98
|
+
V3ThreathuntingScansGetRequest,
|
|
99
|
+
z.ZodTypeDef,
|
|
100
|
+
unknown
|
|
101
|
+
> = z.object({
|
|
102
|
+
organization_id: z.string().optional(),
|
|
103
|
+
scan_id: z.string(),
|
|
104
|
+
}).transform((v) => {
|
|
105
|
+
return remap$(v, {
|
|
106
|
+
"organization_id": "organizationId",
|
|
107
|
+
"scan_id": "scanId",
|
|
108
|
+
});
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
/** @internal */
|
|
112
|
+
export type V3ThreathuntingScansGetRequest$Outbound = {
|
|
113
|
+
organization_id?: string | undefined;
|
|
114
|
+
scan_id: string;
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
/** @internal */
|
|
118
|
+
export const V3ThreathuntingScansGetRequest$outboundSchema: z.ZodType<
|
|
119
|
+
V3ThreathuntingScansGetRequest$Outbound,
|
|
120
|
+
z.ZodTypeDef,
|
|
121
|
+
V3ThreathuntingScansGetRequest
|
|
122
|
+
> = z.object({
|
|
123
|
+
organizationId: z.string().optional(),
|
|
124
|
+
scanId: z.string(),
|
|
125
|
+
}).transform((v) => {
|
|
126
|
+
return remap$(v, {
|
|
127
|
+
organizationId: "organization_id",
|
|
128
|
+
scanId: "scan_id",
|
|
129
|
+
});
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* @internal
|
|
134
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
135
|
+
*/
|
|
136
|
+
export namespace V3ThreathuntingScansGetRequest$ {
|
|
137
|
+
/** @deprecated use `V3ThreathuntingScansGetRequest$inboundSchema` instead. */
|
|
138
|
+
export const inboundSchema = V3ThreathuntingScansGetRequest$inboundSchema;
|
|
139
|
+
/** @deprecated use `V3ThreathuntingScansGetRequest$outboundSchema` instead. */
|
|
140
|
+
export const outboundSchema = V3ThreathuntingScansGetRequest$outboundSchema;
|
|
141
|
+
/** @deprecated use `V3ThreathuntingScansGetRequest$Outbound` instead. */
|
|
142
|
+
export type Outbound = V3ThreathuntingScansGetRequest$Outbound;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export function v3ThreathuntingScansGetRequestToJSON(
|
|
146
|
+
v3ThreathuntingScansGetRequest: V3ThreathuntingScansGetRequest,
|
|
147
|
+
): string {
|
|
148
|
+
return JSON.stringify(
|
|
149
|
+
V3ThreathuntingScansGetRequest$outboundSchema.parse(
|
|
150
|
+
v3ThreathuntingScansGetRequest,
|
|
151
|
+
),
|
|
152
|
+
);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export function v3ThreathuntingScansGetRequestFromJSON(
|
|
156
|
+
jsonString: string,
|
|
157
|
+
): SafeParseResult<V3ThreathuntingScansGetRequest, SDKValidationError> {
|
|
158
|
+
return safeParse(
|
|
159
|
+
jsonString,
|
|
160
|
+
(x) => V3ThreathuntingScansGetRequest$inboundSchema.parse(JSON.parse(x)),
|
|
161
|
+
`Failed to parse 'V3ThreathuntingScansGetRequest' from JSON`,
|
|
162
|
+
);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/** @internal */
|
|
166
|
+
export const V3ThreathuntingScansGetResponse$inboundSchema: z.ZodType<
|
|
167
|
+
V3ThreathuntingScansGetResponse,
|
|
168
|
+
z.ZodTypeDef,
|
|
169
|
+
unknown
|
|
170
|
+
> = z.object({
|
|
171
|
+
Headers: z.record(z.array(z.string())),
|
|
172
|
+
Result: components.ResponseEnvelopeTrackedScan$inboundSchema,
|
|
173
|
+
}).transform((v) => {
|
|
174
|
+
return remap$(v, {
|
|
175
|
+
"Headers": "headers",
|
|
176
|
+
"Result": "result",
|
|
177
|
+
});
|
|
178
|
+
});
|
|
179
|
+
|
|
180
|
+
/** @internal */
|
|
181
|
+
export type V3ThreathuntingScansGetResponse$Outbound = {
|
|
182
|
+
Headers: { [k: string]: Array<string> };
|
|
183
|
+
Result: components.ResponseEnvelopeTrackedScan$Outbound;
|
|
184
|
+
};
|
|
185
|
+
|
|
186
|
+
/** @internal */
|
|
187
|
+
export const V3ThreathuntingScansGetResponse$outboundSchema: z.ZodType<
|
|
188
|
+
V3ThreathuntingScansGetResponse$Outbound,
|
|
189
|
+
z.ZodTypeDef,
|
|
190
|
+
V3ThreathuntingScansGetResponse
|
|
191
|
+
> = z.object({
|
|
192
|
+
headers: z.record(z.array(z.string())),
|
|
193
|
+
result: components.ResponseEnvelopeTrackedScan$outboundSchema,
|
|
194
|
+
}).transform((v) => {
|
|
195
|
+
return remap$(v, {
|
|
196
|
+
headers: "Headers",
|
|
197
|
+
result: "Result",
|
|
198
|
+
});
|
|
199
|
+
});
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* @internal
|
|
203
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
204
|
+
*/
|
|
205
|
+
export namespace V3ThreathuntingScansGetResponse$ {
|
|
206
|
+
/** @deprecated use `V3ThreathuntingScansGetResponse$inboundSchema` instead. */
|
|
207
|
+
export const inboundSchema = V3ThreathuntingScansGetResponse$inboundSchema;
|
|
208
|
+
/** @deprecated use `V3ThreathuntingScansGetResponse$outboundSchema` instead. */
|
|
209
|
+
export const outboundSchema = V3ThreathuntingScansGetResponse$outboundSchema;
|
|
210
|
+
/** @deprecated use `V3ThreathuntingScansGetResponse$Outbound` instead. */
|
|
211
|
+
export type Outbound = V3ThreathuntingScansGetResponse$Outbound;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
export function v3ThreathuntingScansGetResponseToJSON(
|
|
215
|
+
v3ThreathuntingScansGetResponse: V3ThreathuntingScansGetResponse,
|
|
216
|
+
): string {
|
|
217
|
+
return JSON.stringify(
|
|
218
|
+
V3ThreathuntingScansGetResponse$outboundSchema.parse(
|
|
219
|
+
v3ThreathuntingScansGetResponse,
|
|
220
|
+
),
|
|
221
|
+
);
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
export function v3ThreathuntingScansGetResponseFromJSON(
|
|
225
|
+
jsonString: string,
|
|
226
|
+
): SafeParseResult<V3ThreathuntingScansGetResponse, SDKValidationError> {
|
|
227
|
+
return safeParse(
|
|
228
|
+
jsonString,
|
|
229
|
+
(x) => V3ThreathuntingScansGetResponse$inboundSchema.parse(JSON.parse(x)),
|
|
230
|
+
`Failed to parse 'V3ThreathuntingScansGetResponse' from JSON`,
|
|
231
|
+
);
|
|
232
|
+
}
|
package/src/sdk/globaldata.ts
CHANGED
|
@@ -3,11 +3,14 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import { globalDataAggregate } from "../funcs/globalDataAggregate.js";
|
|
6
|
+
import { globalDataCreateTrackedScan } from "../funcs/globalDataCreateTrackedScan.js";
|
|
6
7
|
import { globalDataGetCertificate } from "../funcs/globalDataGetCertificate.js";
|
|
7
8
|
import { globalDataGetCertificates } from "../funcs/globalDataGetCertificates.js";
|
|
8
9
|
import { globalDataGetHost } from "../funcs/globalDataGetHost.js";
|
|
9
10
|
import { globalDataGetHosts } from "../funcs/globalDataGetHosts.js";
|
|
10
11
|
import { globalDataGetHostTimeline } from "../funcs/globalDataGetHostTimeline.js";
|
|
12
|
+
import { globalDataGetTrackedScan } from "../funcs/globalDataGetTrackedScan.js";
|
|
13
|
+
import { globalDataGetTrackedScanThreatHunting } from "../funcs/globalDataGetTrackedScanThreatHunting.js";
|
|
11
14
|
import { globalDataGetWebProperties } from "../funcs/globalDataGetWebProperties.js";
|
|
12
15
|
import { globalDataGetWebProperty } from "../funcs/globalDataGetWebProperty.js";
|
|
13
16
|
import { globalDataSearch } from "../funcs/globalDataSearch.js";
|
|
@@ -135,6 +138,41 @@ export class GlobalData extends ClientSDK {
|
|
|
135
138
|
));
|
|
136
139
|
}
|
|
137
140
|
|
|
141
|
+
/**
|
|
142
|
+
* Create a tracked rescan
|
|
143
|
+
*
|
|
144
|
+
* @remarks
|
|
145
|
+
* Create a new tracked rescan for a known service or web property. Rescans are used to update information for previously discovered targets. The scan will be queued. The response will contain a scan ID that you can use with the [get tracked scan details endpoint](https://docs.censys.com/reference/v3-globaldata-scans-get#/) to monitor its status and results.<br><br>This endpoint is available to all Enterprise customers.
|
|
146
|
+
*/
|
|
147
|
+
async createTrackedScan(
|
|
148
|
+
request: operations.V3GlobaldataScansRescanRequest,
|
|
149
|
+
options?: RequestOptions,
|
|
150
|
+
): Promise<operations.V3GlobaldataScansRescanResponse> {
|
|
151
|
+
return unwrapAsync(globalDataCreateTrackedScan(
|
|
152
|
+
this,
|
|
153
|
+
request,
|
|
154
|
+
options,
|
|
155
|
+
));
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* Get tracked scan details
|
|
160
|
+
*
|
|
161
|
+
* @remarks
|
|
162
|
+
* Retrieve the current status and results of a tracked scan by its ID.
|
|
163
|
+
* This endpoint works for both discovery scans and rescans.
|
|
164
|
+
*/
|
|
165
|
+
async getTrackedScan(
|
|
166
|
+
request: operations.V3GlobaldataScansGetRequest,
|
|
167
|
+
options?: RequestOptions,
|
|
168
|
+
): Promise<operations.V3GlobaldataScansGetResponse> {
|
|
169
|
+
return unwrapAsync(globalDataGetTrackedScan(
|
|
170
|
+
this,
|
|
171
|
+
request,
|
|
172
|
+
options,
|
|
173
|
+
));
|
|
174
|
+
}
|
|
175
|
+
|
|
138
176
|
/**
|
|
139
177
|
* Aggregate results for a search query
|
|
140
178
|
*
|
|
@@ -168,4 +206,22 @@ export class GlobalData extends ClientSDK {
|
|
|
168
206
|
options,
|
|
169
207
|
));
|
|
170
208
|
}
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* Get tracked scan details
|
|
212
|
+
*
|
|
213
|
+
* @remarks
|
|
214
|
+
* Retrieve the current status and results of a tracked scan by its ID.
|
|
215
|
+
* This endpoint works for both discovery scans and rescans.
|
|
216
|
+
*/
|
|
217
|
+
async getTrackedScanThreatHunting(
|
|
218
|
+
request: operations.V3ThreathuntingScansGetRequest,
|
|
219
|
+
options?: RequestOptions,
|
|
220
|
+
): Promise<operations.V3ThreathuntingScansGetResponse> {
|
|
221
|
+
return unwrapAsync(globalDataGetTrackedScanThreatHunting(
|
|
222
|
+
this,
|
|
223
|
+
request,
|
|
224
|
+
options,
|
|
225
|
+
));
|
|
226
|
+
}
|
|
171
227
|
}
|
package/src/sdk/threathunting.ts
CHANGED
|
@@ -2,12 +2,89 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
+
import { globalDataGetTrackedScan } from "../funcs/globalDataGetTrackedScan.js";
|
|
6
|
+
import { globalDataGetTrackedScanThreatHunting } from "../funcs/globalDataGetTrackedScanThreatHunting.js";
|
|
7
|
+
import { threatHuntingCreateTrackedScan } from "../funcs/threatHuntingCreateTrackedScan.js";
|
|
8
|
+
import { threatHuntingGetHostObservationsWithCertificate } from "../funcs/threatHuntingGetHostObservationsWithCertificate.js";
|
|
5
9
|
import { threatHuntingValueCounts } from "../funcs/threatHuntingValueCounts.js";
|
|
6
10
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
7
11
|
import * as operations from "../models/operations/index.js";
|
|
8
12
|
import { unwrapAsync } from "../types/fp.js";
|
|
9
13
|
|
|
10
14
|
export class ThreatHunting extends ClientSDK {
|
|
15
|
+
/**
|
|
16
|
+
* Get tracked scan details
|
|
17
|
+
*
|
|
18
|
+
* @remarks
|
|
19
|
+
* Retrieve the current status and results of a tracked scan by its ID.
|
|
20
|
+
* This endpoint works for both discovery scans and rescans.
|
|
21
|
+
*/
|
|
22
|
+
async getTrackedScan(
|
|
23
|
+
request: operations.V3GlobaldataScansGetRequest,
|
|
24
|
+
options?: RequestOptions,
|
|
25
|
+
): Promise<operations.V3GlobaldataScansGetResponse> {
|
|
26
|
+
return unwrapAsync(globalDataGetTrackedScan(
|
|
27
|
+
this,
|
|
28
|
+
request,
|
|
29
|
+
options,
|
|
30
|
+
));
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Get Host Observations With Certificate
|
|
35
|
+
*
|
|
36
|
+
* @remarks
|
|
37
|
+
* Retrieve historical observations of hosts associated with a certificate fingerprint. Useful for threat hunting, detection engineering, and timeline generation.
|
|
38
|
+
*/
|
|
39
|
+
async getHostObservationsWithCertificate(
|
|
40
|
+
request:
|
|
41
|
+
operations.V3ThreathuntingGetHostObservationsWithCertificateRequest,
|
|
42
|
+
options?: RequestOptions,
|
|
43
|
+
): Promise<
|
|
44
|
+
operations.V3ThreathuntingGetHostObservationsWithCertificateResponse
|
|
45
|
+
> {
|
|
46
|
+
return unwrapAsync(threatHuntingGetHostObservationsWithCertificate(
|
|
47
|
+
this,
|
|
48
|
+
request,
|
|
49
|
+
options,
|
|
50
|
+
));
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Create a tracked discovery scan
|
|
55
|
+
*
|
|
56
|
+
* @remarks
|
|
57
|
+
* Create a new tracked discovery scan for a specified target. Discovery scans are used to scan new targets that have not been previously identified. The scan will be queued. The response will contain a scan ID that you can use with the [get tracked scan details endpoint](https://docs.censys.com/reference/v3-globaldata-scans-get#/) to monitor its status and results.<br><br>This endpoint is available to organizations that have access to the Threat Hunting module.
|
|
58
|
+
*/
|
|
59
|
+
async createTrackedScan(
|
|
60
|
+
request: operations.V3ThreathuntingScansDiscoveryRequest,
|
|
61
|
+
options?: RequestOptions,
|
|
62
|
+
): Promise<operations.V3ThreathuntingScansDiscoveryResponse> {
|
|
63
|
+
return unwrapAsync(threatHuntingCreateTrackedScan(
|
|
64
|
+
this,
|
|
65
|
+
request,
|
|
66
|
+
options,
|
|
67
|
+
));
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Get tracked scan details
|
|
72
|
+
*
|
|
73
|
+
* @remarks
|
|
74
|
+
* Retrieve the current status and results of a tracked scan by its ID.
|
|
75
|
+
* This endpoint works for both discovery scans and rescans.
|
|
76
|
+
*/
|
|
77
|
+
async getTrackedScanThreatHunting(
|
|
78
|
+
request: operations.V3ThreathuntingScansGetRequest,
|
|
79
|
+
options?: RequestOptions,
|
|
80
|
+
): Promise<operations.V3ThreathuntingScansGetResponse> {
|
|
81
|
+
return unwrapAsync(globalDataGetTrackedScanThreatHunting(
|
|
82
|
+
this,
|
|
83
|
+
request,
|
|
84
|
+
options,
|
|
85
|
+
));
|
|
86
|
+
}
|
|
87
|
+
|
|
11
88
|
/**
|
|
12
89
|
* CensEye: Retrieve value counts to discover pivots
|
|
13
90
|
*
|