@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,315 @@
|
|
|
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 V3ThreathuntingGetHostObservationsWithCertificateGlobals = {
|
|
13
|
+
organizationId?: string | undefined;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export type V3ThreathuntingGetHostObservationsWithCertificateRequest = {
|
|
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
|
+
* SHA-256 hash of the certificate
|
|
23
|
+
*/
|
|
24
|
+
certificateId: string;
|
|
25
|
+
/**
|
|
26
|
+
* Only show ranges ending at or after this time (ISO 8601)
|
|
27
|
+
*/
|
|
28
|
+
startTime?: string | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* Only show ranges starting at or before this time (ISO 8601)
|
|
31
|
+
*/
|
|
32
|
+
endTime?: string | undefined;
|
|
33
|
+
/**
|
|
34
|
+
* The port to filter by
|
|
35
|
+
*/
|
|
36
|
+
port?: number | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* The transport protocol to filter by
|
|
39
|
+
*/
|
|
40
|
+
protocol?: string | undefined;
|
|
41
|
+
/**
|
|
42
|
+
* Pagination token from previous response to retrieve next page of results
|
|
43
|
+
*/
|
|
44
|
+
pageToken?: string | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* Number of results per page. Maximum 100, defaults to 100 if not specified
|
|
47
|
+
*/
|
|
48
|
+
pageSize?: number | undefined;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export type V3ThreathuntingGetHostObservationsWithCertificateResponse = {
|
|
52
|
+
headers: { [k: string]: Array<string> };
|
|
53
|
+
result: components.ResponseEnvelopeHostObservationResponse;
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
/** @internal */
|
|
57
|
+
export const V3ThreathuntingGetHostObservationsWithCertificateGlobals$inboundSchema:
|
|
58
|
+
z.ZodType<
|
|
59
|
+
V3ThreathuntingGetHostObservationsWithCertificateGlobals,
|
|
60
|
+
z.ZodTypeDef,
|
|
61
|
+
unknown
|
|
62
|
+
> = z.object({
|
|
63
|
+
organization_id: z.string().optional(),
|
|
64
|
+
}).transform((v) => {
|
|
65
|
+
return remap$(v, {
|
|
66
|
+
"organization_id": "organizationId",
|
|
67
|
+
});
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
/** @internal */
|
|
71
|
+
export type V3ThreathuntingGetHostObservationsWithCertificateGlobals$Outbound =
|
|
72
|
+
{
|
|
73
|
+
organization_id?: string | undefined;
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
/** @internal */
|
|
77
|
+
export const V3ThreathuntingGetHostObservationsWithCertificateGlobals$outboundSchema:
|
|
78
|
+
z.ZodType<
|
|
79
|
+
V3ThreathuntingGetHostObservationsWithCertificateGlobals$Outbound,
|
|
80
|
+
z.ZodTypeDef,
|
|
81
|
+
V3ThreathuntingGetHostObservationsWithCertificateGlobals
|
|
82
|
+
> = z.object({
|
|
83
|
+
organizationId: z.string().optional(),
|
|
84
|
+
}).transform((v) => {
|
|
85
|
+
return remap$(v, {
|
|
86
|
+
organizationId: "organization_id",
|
|
87
|
+
});
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* @internal
|
|
92
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
93
|
+
*/
|
|
94
|
+
export namespace V3ThreathuntingGetHostObservationsWithCertificateGlobals$ {
|
|
95
|
+
/** @deprecated use `V3ThreathuntingGetHostObservationsWithCertificateGlobals$inboundSchema` instead. */
|
|
96
|
+
export const inboundSchema =
|
|
97
|
+
V3ThreathuntingGetHostObservationsWithCertificateGlobals$inboundSchema;
|
|
98
|
+
/** @deprecated use `V3ThreathuntingGetHostObservationsWithCertificateGlobals$outboundSchema` instead. */
|
|
99
|
+
export const outboundSchema =
|
|
100
|
+
V3ThreathuntingGetHostObservationsWithCertificateGlobals$outboundSchema;
|
|
101
|
+
/** @deprecated use `V3ThreathuntingGetHostObservationsWithCertificateGlobals$Outbound` instead. */
|
|
102
|
+
export type Outbound =
|
|
103
|
+
V3ThreathuntingGetHostObservationsWithCertificateGlobals$Outbound;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export function v3ThreathuntingGetHostObservationsWithCertificateGlobalsToJSON(
|
|
107
|
+
v3ThreathuntingGetHostObservationsWithCertificateGlobals:
|
|
108
|
+
V3ThreathuntingGetHostObservationsWithCertificateGlobals,
|
|
109
|
+
): string {
|
|
110
|
+
return JSON.stringify(
|
|
111
|
+
V3ThreathuntingGetHostObservationsWithCertificateGlobals$outboundSchema
|
|
112
|
+
.parse(v3ThreathuntingGetHostObservationsWithCertificateGlobals),
|
|
113
|
+
);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export function v3ThreathuntingGetHostObservationsWithCertificateGlobalsFromJSON(
|
|
117
|
+
jsonString: string,
|
|
118
|
+
): SafeParseResult<
|
|
119
|
+
V3ThreathuntingGetHostObservationsWithCertificateGlobals,
|
|
120
|
+
SDKValidationError
|
|
121
|
+
> {
|
|
122
|
+
return safeParse(
|
|
123
|
+
jsonString,
|
|
124
|
+
(x) =>
|
|
125
|
+
V3ThreathuntingGetHostObservationsWithCertificateGlobals$inboundSchema
|
|
126
|
+
.parse(JSON.parse(x)),
|
|
127
|
+
`Failed to parse 'V3ThreathuntingGetHostObservationsWithCertificateGlobals' from JSON`,
|
|
128
|
+
);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/** @internal */
|
|
132
|
+
export const V3ThreathuntingGetHostObservationsWithCertificateRequest$inboundSchema:
|
|
133
|
+
z.ZodType<
|
|
134
|
+
V3ThreathuntingGetHostObservationsWithCertificateRequest,
|
|
135
|
+
z.ZodTypeDef,
|
|
136
|
+
unknown
|
|
137
|
+
> = z.object({
|
|
138
|
+
organization_id: z.string().optional(),
|
|
139
|
+
certificate_id: z.string(),
|
|
140
|
+
start_time: z.string().optional(),
|
|
141
|
+
end_time: z.string().optional(),
|
|
142
|
+
port: z.number().int().optional(),
|
|
143
|
+
protocol: z.string().optional(),
|
|
144
|
+
page_token: z.string().optional(),
|
|
145
|
+
page_size: z.number().int().optional(),
|
|
146
|
+
}).transform((v) => {
|
|
147
|
+
return remap$(v, {
|
|
148
|
+
"organization_id": "organizationId",
|
|
149
|
+
"certificate_id": "certificateId",
|
|
150
|
+
"start_time": "startTime",
|
|
151
|
+
"end_time": "endTime",
|
|
152
|
+
"page_token": "pageToken",
|
|
153
|
+
"page_size": "pageSize",
|
|
154
|
+
});
|
|
155
|
+
});
|
|
156
|
+
|
|
157
|
+
/** @internal */
|
|
158
|
+
export type V3ThreathuntingGetHostObservationsWithCertificateRequest$Outbound =
|
|
159
|
+
{
|
|
160
|
+
organization_id?: string | undefined;
|
|
161
|
+
certificate_id: string;
|
|
162
|
+
start_time?: string | undefined;
|
|
163
|
+
end_time?: string | undefined;
|
|
164
|
+
port?: number | undefined;
|
|
165
|
+
protocol?: string | undefined;
|
|
166
|
+
page_token?: string | undefined;
|
|
167
|
+
page_size?: number | undefined;
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
/** @internal */
|
|
171
|
+
export const V3ThreathuntingGetHostObservationsWithCertificateRequest$outboundSchema:
|
|
172
|
+
z.ZodType<
|
|
173
|
+
V3ThreathuntingGetHostObservationsWithCertificateRequest$Outbound,
|
|
174
|
+
z.ZodTypeDef,
|
|
175
|
+
V3ThreathuntingGetHostObservationsWithCertificateRequest
|
|
176
|
+
> = z.object({
|
|
177
|
+
organizationId: z.string().optional(),
|
|
178
|
+
certificateId: z.string(),
|
|
179
|
+
startTime: z.string().optional(),
|
|
180
|
+
endTime: z.string().optional(),
|
|
181
|
+
port: z.number().int().optional(),
|
|
182
|
+
protocol: z.string().optional(),
|
|
183
|
+
pageToken: z.string().optional(),
|
|
184
|
+
pageSize: z.number().int().optional(),
|
|
185
|
+
}).transform((v) => {
|
|
186
|
+
return remap$(v, {
|
|
187
|
+
organizationId: "organization_id",
|
|
188
|
+
certificateId: "certificate_id",
|
|
189
|
+
startTime: "start_time",
|
|
190
|
+
endTime: "end_time",
|
|
191
|
+
pageToken: "page_token",
|
|
192
|
+
pageSize: "page_size",
|
|
193
|
+
});
|
|
194
|
+
});
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* @internal
|
|
198
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
199
|
+
*/
|
|
200
|
+
export namespace V3ThreathuntingGetHostObservationsWithCertificateRequest$ {
|
|
201
|
+
/** @deprecated use `V3ThreathuntingGetHostObservationsWithCertificateRequest$inboundSchema` instead. */
|
|
202
|
+
export const inboundSchema =
|
|
203
|
+
V3ThreathuntingGetHostObservationsWithCertificateRequest$inboundSchema;
|
|
204
|
+
/** @deprecated use `V3ThreathuntingGetHostObservationsWithCertificateRequest$outboundSchema` instead. */
|
|
205
|
+
export const outboundSchema =
|
|
206
|
+
V3ThreathuntingGetHostObservationsWithCertificateRequest$outboundSchema;
|
|
207
|
+
/** @deprecated use `V3ThreathuntingGetHostObservationsWithCertificateRequest$Outbound` instead. */
|
|
208
|
+
export type Outbound =
|
|
209
|
+
V3ThreathuntingGetHostObservationsWithCertificateRequest$Outbound;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
export function v3ThreathuntingGetHostObservationsWithCertificateRequestToJSON(
|
|
213
|
+
v3ThreathuntingGetHostObservationsWithCertificateRequest:
|
|
214
|
+
V3ThreathuntingGetHostObservationsWithCertificateRequest,
|
|
215
|
+
): string {
|
|
216
|
+
return JSON.stringify(
|
|
217
|
+
V3ThreathuntingGetHostObservationsWithCertificateRequest$outboundSchema
|
|
218
|
+
.parse(v3ThreathuntingGetHostObservationsWithCertificateRequest),
|
|
219
|
+
);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
export function v3ThreathuntingGetHostObservationsWithCertificateRequestFromJSON(
|
|
223
|
+
jsonString: string,
|
|
224
|
+
): SafeParseResult<
|
|
225
|
+
V3ThreathuntingGetHostObservationsWithCertificateRequest,
|
|
226
|
+
SDKValidationError
|
|
227
|
+
> {
|
|
228
|
+
return safeParse(
|
|
229
|
+
jsonString,
|
|
230
|
+
(x) =>
|
|
231
|
+
V3ThreathuntingGetHostObservationsWithCertificateRequest$inboundSchema
|
|
232
|
+
.parse(JSON.parse(x)),
|
|
233
|
+
`Failed to parse 'V3ThreathuntingGetHostObservationsWithCertificateRequest' from JSON`,
|
|
234
|
+
);
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
/** @internal */
|
|
238
|
+
export const V3ThreathuntingGetHostObservationsWithCertificateResponse$inboundSchema:
|
|
239
|
+
z.ZodType<
|
|
240
|
+
V3ThreathuntingGetHostObservationsWithCertificateResponse,
|
|
241
|
+
z.ZodTypeDef,
|
|
242
|
+
unknown
|
|
243
|
+
> = z.object({
|
|
244
|
+
Headers: z.record(z.array(z.string())),
|
|
245
|
+
Result: components.ResponseEnvelopeHostObservationResponse$inboundSchema,
|
|
246
|
+
}).transform((v) => {
|
|
247
|
+
return remap$(v, {
|
|
248
|
+
"Headers": "headers",
|
|
249
|
+
"Result": "result",
|
|
250
|
+
});
|
|
251
|
+
});
|
|
252
|
+
|
|
253
|
+
/** @internal */
|
|
254
|
+
export type V3ThreathuntingGetHostObservationsWithCertificateResponse$Outbound =
|
|
255
|
+
{
|
|
256
|
+
Headers: { [k: string]: Array<string> };
|
|
257
|
+
Result: components.ResponseEnvelopeHostObservationResponse$Outbound;
|
|
258
|
+
};
|
|
259
|
+
|
|
260
|
+
/** @internal */
|
|
261
|
+
export const V3ThreathuntingGetHostObservationsWithCertificateResponse$outboundSchema:
|
|
262
|
+
z.ZodType<
|
|
263
|
+
V3ThreathuntingGetHostObservationsWithCertificateResponse$Outbound,
|
|
264
|
+
z.ZodTypeDef,
|
|
265
|
+
V3ThreathuntingGetHostObservationsWithCertificateResponse
|
|
266
|
+
> = z.object({
|
|
267
|
+
headers: z.record(z.array(z.string())),
|
|
268
|
+
result: components.ResponseEnvelopeHostObservationResponse$outboundSchema,
|
|
269
|
+
}).transform((v) => {
|
|
270
|
+
return remap$(v, {
|
|
271
|
+
headers: "Headers",
|
|
272
|
+
result: "Result",
|
|
273
|
+
});
|
|
274
|
+
});
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* @internal
|
|
278
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
279
|
+
*/
|
|
280
|
+
export namespace V3ThreathuntingGetHostObservationsWithCertificateResponse$ {
|
|
281
|
+
/** @deprecated use `V3ThreathuntingGetHostObservationsWithCertificateResponse$inboundSchema` instead. */
|
|
282
|
+
export const inboundSchema =
|
|
283
|
+
V3ThreathuntingGetHostObservationsWithCertificateResponse$inboundSchema;
|
|
284
|
+
/** @deprecated use `V3ThreathuntingGetHostObservationsWithCertificateResponse$outboundSchema` instead. */
|
|
285
|
+
export const outboundSchema =
|
|
286
|
+
V3ThreathuntingGetHostObservationsWithCertificateResponse$outboundSchema;
|
|
287
|
+
/** @deprecated use `V3ThreathuntingGetHostObservationsWithCertificateResponse$Outbound` instead. */
|
|
288
|
+
export type Outbound =
|
|
289
|
+
V3ThreathuntingGetHostObservationsWithCertificateResponse$Outbound;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
export function v3ThreathuntingGetHostObservationsWithCertificateResponseToJSON(
|
|
293
|
+
v3ThreathuntingGetHostObservationsWithCertificateResponse:
|
|
294
|
+
V3ThreathuntingGetHostObservationsWithCertificateResponse,
|
|
295
|
+
): string {
|
|
296
|
+
return JSON.stringify(
|
|
297
|
+
V3ThreathuntingGetHostObservationsWithCertificateResponse$outboundSchema
|
|
298
|
+
.parse(v3ThreathuntingGetHostObservationsWithCertificateResponse),
|
|
299
|
+
);
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
export function v3ThreathuntingGetHostObservationsWithCertificateResponseFromJSON(
|
|
303
|
+
jsonString: string,
|
|
304
|
+
): SafeParseResult<
|
|
305
|
+
V3ThreathuntingGetHostObservationsWithCertificateResponse,
|
|
306
|
+
SDKValidationError
|
|
307
|
+
> {
|
|
308
|
+
return safeParse(
|
|
309
|
+
jsonString,
|
|
310
|
+
(x) =>
|
|
311
|
+
V3ThreathuntingGetHostObservationsWithCertificateResponse$inboundSchema
|
|
312
|
+
.parse(JSON.parse(x)),
|
|
313
|
+
`Failed to parse 'V3ThreathuntingGetHostObservationsWithCertificateResponse' from JSON`,
|
|
314
|
+
);
|
|
315
|
+
}
|
|
@@ -0,0 +1,238 @@
|
|
|
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 V3ThreathuntingScansDiscoveryGlobals = {
|
|
13
|
+
organizationId?: string | undefined;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export type V3ThreathuntingScansDiscoveryRequest = {
|
|
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
|
+
scansDiscoveryInputBody: components.ScansDiscoveryInputBody;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export type V3ThreathuntingScansDiscoveryResponse = {
|
|
25
|
+
headers: { [k: string]: Array<string> };
|
|
26
|
+
result: components.ResponseEnvelopeTrackedScan;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
/** @internal */
|
|
30
|
+
export const V3ThreathuntingScansDiscoveryGlobals$inboundSchema: z.ZodType<
|
|
31
|
+
V3ThreathuntingScansDiscoveryGlobals,
|
|
32
|
+
z.ZodTypeDef,
|
|
33
|
+
unknown
|
|
34
|
+
> = z.object({
|
|
35
|
+
organization_id: z.string().optional(),
|
|
36
|
+
}).transform((v) => {
|
|
37
|
+
return remap$(v, {
|
|
38
|
+
"organization_id": "organizationId",
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
/** @internal */
|
|
43
|
+
export type V3ThreathuntingScansDiscoveryGlobals$Outbound = {
|
|
44
|
+
organization_id?: string | undefined;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
/** @internal */
|
|
48
|
+
export const V3ThreathuntingScansDiscoveryGlobals$outboundSchema: z.ZodType<
|
|
49
|
+
V3ThreathuntingScansDiscoveryGlobals$Outbound,
|
|
50
|
+
z.ZodTypeDef,
|
|
51
|
+
V3ThreathuntingScansDiscoveryGlobals
|
|
52
|
+
> = z.object({
|
|
53
|
+
organizationId: z.string().optional(),
|
|
54
|
+
}).transform((v) => {
|
|
55
|
+
return remap$(v, {
|
|
56
|
+
organizationId: "organization_id",
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* @internal
|
|
62
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
63
|
+
*/
|
|
64
|
+
export namespace V3ThreathuntingScansDiscoveryGlobals$ {
|
|
65
|
+
/** @deprecated use `V3ThreathuntingScansDiscoveryGlobals$inboundSchema` instead. */
|
|
66
|
+
export const inboundSchema =
|
|
67
|
+
V3ThreathuntingScansDiscoveryGlobals$inboundSchema;
|
|
68
|
+
/** @deprecated use `V3ThreathuntingScansDiscoveryGlobals$outboundSchema` instead. */
|
|
69
|
+
export const outboundSchema =
|
|
70
|
+
V3ThreathuntingScansDiscoveryGlobals$outboundSchema;
|
|
71
|
+
/** @deprecated use `V3ThreathuntingScansDiscoveryGlobals$Outbound` instead. */
|
|
72
|
+
export type Outbound = V3ThreathuntingScansDiscoveryGlobals$Outbound;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function v3ThreathuntingScansDiscoveryGlobalsToJSON(
|
|
76
|
+
v3ThreathuntingScansDiscoveryGlobals: V3ThreathuntingScansDiscoveryGlobals,
|
|
77
|
+
): string {
|
|
78
|
+
return JSON.stringify(
|
|
79
|
+
V3ThreathuntingScansDiscoveryGlobals$outboundSchema.parse(
|
|
80
|
+
v3ThreathuntingScansDiscoveryGlobals,
|
|
81
|
+
),
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export function v3ThreathuntingScansDiscoveryGlobalsFromJSON(
|
|
86
|
+
jsonString: string,
|
|
87
|
+
): SafeParseResult<V3ThreathuntingScansDiscoveryGlobals, SDKValidationError> {
|
|
88
|
+
return safeParse(
|
|
89
|
+
jsonString,
|
|
90
|
+
(x) =>
|
|
91
|
+
V3ThreathuntingScansDiscoveryGlobals$inboundSchema.parse(JSON.parse(x)),
|
|
92
|
+
`Failed to parse 'V3ThreathuntingScansDiscoveryGlobals' from JSON`,
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/** @internal */
|
|
97
|
+
export const V3ThreathuntingScansDiscoveryRequest$inboundSchema: z.ZodType<
|
|
98
|
+
V3ThreathuntingScansDiscoveryRequest,
|
|
99
|
+
z.ZodTypeDef,
|
|
100
|
+
unknown
|
|
101
|
+
> = z.object({
|
|
102
|
+
organization_id: z.string().optional(),
|
|
103
|
+
ScansDiscoveryInputBody: components.ScansDiscoveryInputBody$inboundSchema,
|
|
104
|
+
}).transform((v) => {
|
|
105
|
+
return remap$(v, {
|
|
106
|
+
"organization_id": "organizationId",
|
|
107
|
+
"ScansDiscoveryInputBody": "scansDiscoveryInputBody",
|
|
108
|
+
});
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
/** @internal */
|
|
112
|
+
export type V3ThreathuntingScansDiscoveryRequest$Outbound = {
|
|
113
|
+
organization_id?: string | undefined;
|
|
114
|
+
ScansDiscoveryInputBody: components.ScansDiscoveryInputBody$Outbound;
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
/** @internal */
|
|
118
|
+
export const V3ThreathuntingScansDiscoveryRequest$outboundSchema: z.ZodType<
|
|
119
|
+
V3ThreathuntingScansDiscoveryRequest$Outbound,
|
|
120
|
+
z.ZodTypeDef,
|
|
121
|
+
V3ThreathuntingScansDiscoveryRequest
|
|
122
|
+
> = z.object({
|
|
123
|
+
organizationId: z.string().optional(),
|
|
124
|
+
scansDiscoveryInputBody: components.ScansDiscoveryInputBody$outboundSchema,
|
|
125
|
+
}).transform((v) => {
|
|
126
|
+
return remap$(v, {
|
|
127
|
+
organizationId: "organization_id",
|
|
128
|
+
scansDiscoveryInputBody: "ScansDiscoveryInputBody",
|
|
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 V3ThreathuntingScansDiscoveryRequest$ {
|
|
137
|
+
/** @deprecated use `V3ThreathuntingScansDiscoveryRequest$inboundSchema` instead. */
|
|
138
|
+
export const inboundSchema =
|
|
139
|
+
V3ThreathuntingScansDiscoveryRequest$inboundSchema;
|
|
140
|
+
/** @deprecated use `V3ThreathuntingScansDiscoveryRequest$outboundSchema` instead. */
|
|
141
|
+
export const outboundSchema =
|
|
142
|
+
V3ThreathuntingScansDiscoveryRequest$outboundSchema;
|
|
143
|
+
/** @deprecated use `V3ThreathuntingScansDiscoveryRequest$Outbound` instead. */
|
|
144
|
+
export type Outbound = V3ThreathuntingScansDiscoveryRequest$Outbound;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export function v3ThreathuntingScansDiscoveryRequestToJSON(
|
|
148
|
+
v3ThreathuntingScansDiscoveryRequest: V3ThreathuntingScansDiscoveryRequest,
|
|
149
|
+
): string {
|
|
150
|
+
return JSON.stringify(
|
|
151
|
+
V3ThreathuntingScansDiscoveryRequest$outboundSchema.parse(
|
|
152
|
+
v3ThreathuntingScansDiscoveryRequest,
|
|
153
|
+
),
|
|
154
|
+
);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
export function v3ThreathuntingScansDiscoveryRequestFromJSON(
|
|
158
|
+
jsonString: string,
|
|
159
|
+
): SafeParseResult<V3ThreathuntingScansDiscoveryRequest, SDKValidationError> {
|
|
160
|
+
return safeParse(
|
|
161
|
+
jsonString,
|
|
162
|
+
(x) =>
|
|
163
|
+
V3ThreathuntingScansDiscoveryRequest$inboundSchema.parse(JSON.parse(x)),
|
|
164
|
+
`Failed to parse 'V3ThreathuntingScansDiscoveryRequest' from JSON`,
|
|
165
|
+
);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/** @internal */
|
|
169
|
+
export const V3ThreathuntingScansDiscoveryResponse$inboundSchema: z.ZodType<
|
|
170
|
+
V3ThreathuntingScansDiscoveryResponse,
|
|
171
|
+
z.ZodTypeDef,
|
|
172
|
+
unknown
|
|
173
|
+
> = z.object({
|
|
174
|
+
Headers: z.record(z.array(z.string())),
|
|
175
|
+
Result: components.ResponseEnvelopeTrackedScan$inboundSchema,
|
|
176
|
+
}).transform((v) => {
|
|
177
|
+
return remap$(v, {
|
|
178
|
+
"Headers": "headers",
|
|
179
|
+
"Result": "result",
|
|
180
|
+
});
|
|
181
|
+
});
|
|
182
|
+
|
|
183
|
+
/** @internal */
|
|
184
|
+
export type V3ThreathuntingScansDiscoveryResponse$Outbound = {
|
|
185
|
+
Headers: { [k: string]: Array<string> };
|
|
186
|
+
Result: components.ResponseEnvelopeTrackedScan$Outbound;
|
|
187
|
+
};
|
|
188
|
+
|
|
189
|
+
/** @internal */
|
|
190
|
+
export const V3ThreathuntingScansDiscoveryResponse$outboundSchema: z.ZodType<
|
|
191
|
+
V3ThreathuntingScansDiscoveryResponse$Outbound,
|
|
192
|
+
z.ZodTypeDef,
|
|
193
|
+
V3ThreathuntingScansDiscoveryResponse
|
|
194
|
+
> = z.object({
|
|
195
|
+
headers: z.record(z.array(z.string())),
|
|
196
|
+
result: components.ResponseEnvelopeTrackedScan$outboundSchema,
|
|
197
|
+
}).transform((v) => {
|
|
198
|
+
return remap$(v, {
|
|
199
|
+
headers: "Headers",
|
|
200
|
+
result: "Result",
|
|
201
|
+
});
|
|
202
|
+
});
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* @internal
|
|
206
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
207
|
+
*/
|
|
208
|
+
export namespace V3ThreathuntingScansDiscoveryResponse$ {
|
|
209
|
+
/** @deprecated use `V3ThreathuntingScansDiscoveryResponse$inboundSchema` instead. */
|
|
210
|
+
export const inboundSchema =
|
|
211
|
+
V3ThreathuntingScansDiscoveryResponse$inboundSchema;
|
|
212
|
+
/** @deprecated use `V3ThreathuntingScansDiscoveryResponse$outboundSchema` instead. */
|
|
213
|
+
export const outboundSchema =
|
|
214
|
+
V3ThreathuntingScansDiscoveryResponse$outboundSchema;
|
|
215
|
+
/** @deprecated use `V3ThreathuntingScansDiscoveryResponse$Outbound` instead. */
|
|
216
|
+
export type Outbound = V3ThreathuntingScansDiscoveryResponse$Outbound;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
export function v3ThreathuntingScansDiscoveryResponseToJSON(
|
|
220
|
+
v3ThreathuntingScansDiscoveryResponse: V3ThreathuntingScansDiscoveryResponse,
|
|
221
|
+
): string {
|
|
222
|
+
return JSON.stringify(
|
|
223
|
+
V3ThreathuntingScansDiscoveryResponse$outboundSchema.parse(
|
|
224
|
+
v3ThreathuntingScansDiscoveryResponse,
|
|
225
|
+
),
|
|
226
|
+
);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
export function v3ThreathuntingScansDiscoveryResponseFromJSON(
|
|
230
|
+
jsonString: string,
|
|
231
|
+
): SafeParseResult<V3ThreathuntingScansDiscoveryResponse, SDKValidationError> {
|
|
232
|
+
return safeParse(
|
|
233
|
+
jsonString,
|
|
234
|
+
(x) =>
|
|
235
|
+
V3ThreathuntingScansDiscoveryResponse$inboundSchema.parse(JSON.parse(x)),
|
|
236
|
+
`Failed to parse 'V3ThreathuntingScansDiscoveryResponse' from JSON`,
|
|
237
|
+
);
|
|
238
|
+
}
|