@censys/platform-sdk 0.4.3 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/FUNCTIONS.md +0 -1
- package/README.md +17 -2
- package/docs/sdks/collections/README.md +12 -6
- package/docs/sdks/globaldata/README.md +347 -6
- package/docs/sdks/threathunting/README.md +248 -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/globalDataGetHostObservationsWithCertificate.d.ts +18 -0
- package/funcs/globalDataGetHostObservationsWithCertificate.d.ts.map +1 -0
- package/funcs/globalDataGetHostObservationsWithCertificate.js +141 -0
- package/funcs/globalDataGetHostObservationsWithCertificate.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/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/v3globaldatagethostobservationswithcertificate.d.ts +124 -0
- package/models/operations/v3globaldatagethostobservationswithcertificate.d.ts.map +1 -0
- package/models/operations/v3globaldatagethostobservationswithcertificate.js +178 -0
- package/models/operations/v3globaldatagethostobservationswithcertificate.js.map +1 -0
- 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/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 +30 -0
- package/sdk/globaldata.d.ts.map +1 -1
- package/sdk/globaldata.js +42 -0
- package/sdk/globaldata.js.map +1 -1
- package/sdk/threathunting.d.ts +23 -0
- package/sdk/threathunting.d.ts.map +1 -1
- package/sdk/threathunting.js +32 -0
- package/sdk/threathunting.js.map +1 -1
- package/src/funcs/globalDataCreateTrackedScan.ts +185 -0
- package/src/funcs/globalDataGetHostObservationsWithCertificate.ts +201 -0
- package/src/funcs/globalDataGetTrackedScan.ts +191 -0
- package/src/funcs/globalDataGetTrackedScanThreatHunting.ts +191 -0
- package/src/funcs/threatHuntingCreateTrackedScan.ts +188 -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/v3globaldatagethostobservationswithcertificate.ts +317 -0
- package/src/models/operations/v3globaldatascansget.ts +232 -0
- package/src/models/operations/v3globaldatascansrescan.ts +229 -0
- package/src/models/operations/v3threathuntingscansdiscovery.ts +238 -0
- package/src/models/operations/v3threathuntingscansget.ts +232 -0
- package/src/sdk/globaldata.ts +76 -0
- package/src/sdk/threathunting.ts +56 -0
|
@@ -0,0 +1,229 @@
|
|
|
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 V3GlobaldataScansRescanGlobals = {
|
|
13
|
+
organizationId?: string | undefined;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export type V3GlobaldataScansRescanRequest = {
|
|
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
|
+
scansRescanInputBody: components.ScansRescanInputBody;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export type V3GlobaldataScansRescanResponse = {
|
|
25
|
+
headers: { [k: string]: Array<string> };
|
|
26
|
+
result: components.ResponseEnvelopeTrackedScan;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
/** @internal */
|
|
30
|
+
export const V3GlobaldataScansRescanGlobals$inboundSchema: z.ZodType<
|
|
31
|
+
V3GlobaldataScansRescanGlobals,
|
|
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 V3GlobaldataScansRescanGlobals$Outbound = {
|
|
44
|
+
organization_id?: string | undefined;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
/** @internal */
|
|
48
|
+
export const V3GlobaldataScansRescanGlobals$outboundSchema: z.ZodType<
|
|
49
|
+
V3GlobaldataScansRescanGlobals$Outbound,
|
|
50
|
+
z.ZodTypeDef,
|
|
51
|
+
V3GlobaldataScansRescanGlobals
|
|
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 V3GlobaldataScansRescanGlobals$ {
|
|
65
|
+
/** @deprecated use `V3GlobaldataScansRescanGlobals$inboundSchema` instead. */
|
|
66
|
+
export const inboundSchema = V3GlobaldataScansRescanGlobals$inboundSchema;
|
|
67
|
+
/** @deprecated use `V3GlobaldataScansRescanGlobals$outboundSchema` instead. */
|
|
68
|
+
export const outboundSchema = V3GlobaldataScansRescanGlobals$outboundSchema;
|
|
69
|
+
/** @deprecated use `V3GlobaldataScansRescanGlobals$Outbound` instead. */
|
|
70
|
+
export type Outbound = V3GlobaldataScansRescanGlobals$Outbound;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function v3GlobaldataScansRescanGlobalsToJSON(
|
|
74
|
+
v3GlobaldataScansRescanGlobals: V3GlobaldataScansRescanGlobals,
|
|
75
|
+
): string {
|
|
76
|
+
return JSON.stringify(
|
|
77
|
+
V3GlobaldataScansRescanGlobals$outboundSchema.parse(
|
|
78
|
+
v3GlobaldataScansRescanGlobals,
|
|
79
|
+
),
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export function v3GlobaldataScansRescanGlobalsFromJSON(
|
|
84
|
+
jsonString: string,
|
|
85
|
+
): SafeParseResult<V3GlobaldataScansRescanGlobals, SDKValidationError> {
|
|
86
|
+
return safeParse(
|
|
87
|
+
jsonString,
|
|
88
|
+
(x) => V3GlobaldataScansRescanGlobals$inboundSchema.parse(JSON.parse(x)),
|
|
89
|
+
`Failed to parse 'V3GlobaldataScansRescanGlobals' from JSON`,
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/** @internal */
|
|
94
|
+
export const V3GlobaldataScansRescanRequest$inboundSchema: z.ZodType<
|
|
95
|
+
V3GlobaldataScansRescanRequest,
|
|
96
|
+
z.ZodTypeDef,
|
|
97
|
+
unknown
|
|
98
|
+
> = z.object({
|
|
99
|
+
organization_id: z.string().optional(),
|
|
100
|
+
ScansRescanInputBody: components.ScansRescanInputBody$inboundSchema,
|
|
101
|
+
}).transform((v) => {
|
|
102
|
+
return remap$(v, {
|
|
103
|
+
"organization_id": "organizationId",
|
|
104
|
+
"ScansRescanInputBody": "scansRescanInputBody",
|
|
105
|
+
});
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
/** @internal */
|
|
109
|
+
export type V3GlobaldataScansRescanRequest$Outbound = {
|
|
110
|
+
organization_id?: string | undefined;
|
|
111
|
+
ScansRescanInputBody: components.ScansRescanInputBody$Outbound;
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
/** @internal */
|
|
115
|
+
export const V3GlobaldataScansRescanRequest$outboundSchema: z.ZodType<
|
|
116
|
+
V3GlobaldataScansRescanRequest$Outbound,
|
|
117
|
+
z.ZodTypeDef,
|
|
118
|
+
V3GlobaldataScansRescanRequest
|
|
119
|
+
> = z.object({
|
|
120
|
+
organizationId: z.string().optional(),
|
|
121
|
+
scansRescanInputBody: components.ScansRescanInputBody$outboundSchema,
|
|
122
|
+
}).transform((v) => {
|
|
123
|
+
return remap$(v, {
|
|
124
|
+
organizationId: "organization_id",
|
|
125
|
+
scansRescanInputBody: "ScansRescanInputBody",
|
|
126
|
+
});
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* @internal
|
|
131
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
132
|
+
*/
|
|
133
|
+
export namespace V3GlobaldataScansRescanRequest$ {
|
|
134
|
+
/** @deprecated use `V3GlobaldataScansRescanRequest$inboundSchema` instead. */
|
|
135
|
+
export const inboundSchema = V3GlobaldataScansRescanRequest$inboundSchema;
|
|
136
|
+
/** @deprecated use `V3GlobaldataScansRescanRequest$outboundSchema` instead. */
|
|
137
|
+
export const outboundSchema = V3GlobaldataScansRescanRequest$outboundSchema;
|
|
138
|
+
/** @deprecated use `V3GlobaldataScansRescanRequest$Outbound` instead. */
|
|
139
|
+
export type Outbound = V3GlobaldataScansRescanRequest$Outbound;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
export function v3GlobaldataScansRescanRequestToJSON(
|
|
143
|
+
v3GlobaldataScansRescanRequest: V3GlobaldataScansRescanRequest,
|
|
144
|
+
): string {
|
|
145
|
+
return JSON.stringify(
|
|
146
|
+
V3GlobaldataScansRescanRequest$outboundSchema.parse(
|
|
147
|
+
v3GlobaldataScansRescanRequest,
|
|
148
|
+
),
|
|
149
|
+
);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
export function v3GlobaldataScansRescanRequestFromJSON(
|
|
153
|
+
jsonString: string,
|
|
154
|
+
): SafeParseResult<V3GlobaldataScansRescanRequest, SDKValidationError> {
|
|
155
|
+
return safeParse(
|
|
156
|
+
jsonString,
|
|
157
|
+
(x) => V3GlobaldataScansRescanRequest$inboundSchema.parse(JSON.parse(x)),
|
|
158
|
+
`Failed to parse 'V3GlobaldataScansRescanRequest' from JSON`,
|
|
159
|
+
);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
/** @internal */
|
|
163
|
+
export const V3GlobaldataScansRescanResponse$inboundSchema: z.ZodType<
|
|
164
|
+
V3GlobaldataScansRescanResponse,
|
|
165
|
+
z.ZodTypeDef,
|
|
166
|
+
unknown
|
|
167
|
+
> = z.object({
|
|
168
|
+
Headers: z.record(z.array(z.string())),
|
|
169
|
+
Result: components.ResponseEnvelopeTrackedScan$inboundSchema,
|
|
170
|
+
}).transform((v) => {
|
|
171
|
+
return remap$(v, {
|
|
172
|
+
"Headers": "headers",
|
|
173
|
+
"Result": "result",
|
|
174
|
+
});
|
|
175
|
+
});
|
|
176
|
+
|
|
177
|
+
/** @internal */
|
|
178
|
+
export type V3GlobaldataScansRescanResponse$Outbound = {
|
|
179
|
+
Headers: { [k: string]: Array<string> };
|
|
180
|
+
Result: components.ResponseEnvelopeTrackedScan$Outbound;
|
|
181
|
+
};
|
|
182
|
+
|
|
183
|
+
/** @internal */
|
|
184
|
+
export const V3GlobaldataScansRescanResponse$outboundSchema: z.ZodType<
|
|
185
|
+
V3GlobaldataScansRescanResponse$Outbound,
|
|
186
|
+
z.ZodTypeDef,
|
|
187
|
+
V3GlobaldataScansRescanResponse
|
|
188
|
+
> = z.object({
|
|
189
|
+
headers: z.record(z.array(z.string())),
|
|
190
|
+
result: components.ResponseEnvelopeTrackedScan$outboundSchema,
|
|
191
|
+
}).transform((v) => {
|
|
192
|
+
return remap$(v, {
|
|
193
|
+
headers: "Headers",
|
|
194
|
+
result: "Result",
|
|
195
|
+
});
|
|
196
|
+
});
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* @internal
|
|
200
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
201
|
+
*/
|
|
202
|
+
export namespace V3GlobaldataScansRescanResponse$ {
|
|
203
|
+
/** @deprecated use `V3GlobaldataScansRescanResponse$inboundSchema` instead. */
|
|
204
|
+
export const inboundSchema = V3GlobaldataScansRescanResponse$inboundSchema;
|
|
205
|
+
/** @deprecated use `V3GlobaldataScansRescanResponse$outboundSchema` instead. */
|
|
206
|
+
export const outboundSchema = V3GlobaldataScansRescanResponse$outboundSchema;
|
|
207
|
+
/** @deprecated use `V3GlobaldataScansRescanResponse$Outbound` instead. */
|
|
208
|
+
export type Outbound = V3GlobaldataScansRescanResponse$Outbound;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
export function v3GlobaldataScansRescanResponseToJSON(
|
|
212
|
+
v3GlobaldataScansRescanResponse: V3GlobaldataScansRescanResponse,
|
|
213
|
+
): string {
|
|
214
|
+
return JSON.stringify(
|
|
215
|
+
V3GlobaldataScansRescanResponse$outboundSchema.parse(
|
|
216
|
+
v3GlobaldataScansRescanResponse,
|
|
217
|
+
),
|
|
218
|
+
);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
export function v3GlobaldataScansRescanResponseFromJSON(
|
|
222
|
+
jsonString: string,
|
|
223
|
+
): SafeParseResult<V3GlobaldataScansRescanResponse, SDKValidationError> {
|
|
224
|
+
return safeParse(
|
|
225
|
+
jsonString,
|
|
226
|
+
(x) => V3GlobaldataScansRescanResponse$inboundSchema.parse(JSON.parse(x)),
|
|
227
|
+
`Failed to parse 'V3GlobaldataScansRescanResponse' from JSON`,
|
|
228
|
+
);
|
|
229
|
+
}
|
|
@@ -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
|
+
}
|
|
@@ -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
|
+
}
|