@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 V3GlobaldataScansGetGlobals = {
|
|
13
|
+
organizationId?: string | undefined;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export type V3GlobaldataScansGetRequest = {
|
|
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 V3GlobaldataScansGetResponse = {
|
|
28
|
+
headers: { [k: string]: Array<string> };
|
|
29
|
+
result: components.ResponseEnvelopeTrackedScan;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
/** @internal */
|
|
33
|
+
export const V3GlobaldataScansGetGlobals$inboundSchema: z.ZodType<
|
|
34
|
+
V3GlobaldataScansGetGlobals,
|
|
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 V3GlobaldataScansGetGlobals$Outbound = {
|
|
47
|
+
organization_id?: string | undefined;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
/** @internal */
|
|
51
|
+
export const V3GlobaldataScansGetGlobals$outboundSchema: z.ZodType<
|
|
52
|
+
V3GlobaldataScansGetGlobals$Outbound,
|
|
53
|
+
z.ZodTypeDef,
|
|
54
|
+
V3GlobaldataScansGetGlobals
|
|
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 V3GlobaldataScansGetGlobals$ {
|
|
68
|
+
/** @deprecated use `V3GlobaldataScansGetGlobals$inboundSchema` instead. */
|
|
69
|
+
export const inboundSchema = V3GlobaldataScansGetGlobals$inboundSchema;
|
|
70
|
+
/** @deprecated use `V3GlobaldataScansGetGlobals$outboundSchema` instead. */
|
|
71
|
+
export const outboundSchema = V3GlobaldataScansGetGlobals$outboundSchema;
|
|
72
|
+
/** @deprecated use `V3GlobaldataScansGetGlobals$Outbound` instead. */
|
|
73
|
+
export type Outbound = V3GlobaldataScansGetGlobals$Outbound;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export function v3GlobaldataScansGetGlobalsToJSON(
|
|
77
|
+
v3GlobaldataScansGetGlobals: V3GlobaldataScansGetGlobals,
|
|
78
|
+
): string {
|
|
79
|
+
return JSON.stringify(
|
|
80
|
+
V3GlobaldataScansGetGlobals$outboundSchema.parse(
|
|
81
|
+
v3GlobaldataScansGetGlobals,
|
|
82
|
+
),
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export function v3GlobaldataScansGetGlobalsFromJSON(
|
|
87
|
+
jsonString: string,
|
|
88
|
+
): SafeParseResult<V3GlobaldataScansGetGlobals, SDKValidationError> {
|
|
89
|
+
return safeParse(
|
|
90
|
+
jsonString,
|
|
91
|
+
(x) => V3GlobaldataScansGetGlobals$inboundSchema.parse(JSON.parse(x)),
|
|
92
|
+
`Failed to parse 'V3GlobaldataScansGetGlobals' from JSON`,
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/** @internal */
|
|
97
|
+
export const V3GlobaldataScansGetRequest$inboundSchema: z.ZodType<
|
|
98
|
+
V3GlobaldataScansGetRequest,
|
|
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 V3GlobaldataScansGetRequest$Outbound = {
|
|
113
|
+
organization_id?: string | undefined;
|
|
114
|
+
scan_id: string;
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
/** @internal */
|
|
118
|
+
export const V3GlobaldataScansGetRequest$outboundSchema: z.ZodType<
|
|
119
|
+
V3GlobaldataScansGetRequest$Outbound,
|
|
120
|
+
z.ZodTypeDef,
|
|
121
|
+
V3GlobaldataScansGetRequest
|
|
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 V3GlobaldataScansGetRequest$ {
|
|
137
|
+
/** @deprecated use `V3GlobaldataScansGetRequest$inboundSchema` instead. */
|
|
138
|
+
export const inboundSchema = V3GlobaldataScansGetRequest$inboundSchema;
|
|
139
|
+
/** @deprecated use `V3GlobaldataScansGetRequest$outboundSchema` instead. */
|
|
140
|
+
export const outboundSchema = V3GlobaldataScansGetRequest$outboundSchema;
|
|
141
|
+
/** @deprecated use `V3GlobaldataScansGetRequest$Outbound` instead. */
|
|
142
|
+
export type Outbound = V3GlobaldataScansGetRequest$Outbound;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export function v3GlobaldataScansGetRequestToJSON(
|
|
146
|
+
v3GlobaldataScansGetRequest: V3GlobaldataScansGetRequest,
|
|
147
|
+
): string {
|
|
148
|
+
return JSON.stringify(
|
|
149
|
+
V3GlobaldataScansGetRequest$outboundSchema.parse(
|
|
150
|
+
v3GlobaldataScansGetRequest,
|
|
151
|
+
),
|
|
152
|
+
);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export function v3GlobaldataScansGetRequestFromJSON(
|
|
156
|
+
jsonString: string,
|
|
157
|
+
): SafeParseResult<V3GlobaldataScansGetRequest, SDKValidationError> {
|
|
158
|
+
return safeParse(
|
|
159
|
+
jsonString,
|
|
160
|
+
(x) => V3GlobaldataScansGetRequest$inboundSchema.parse(JSON.parse(x)),
|
|
161
|
+
`Failed to parse 'V3GlobaldataScansGetRequest' from JSON`,
|
|
162
|
+
);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/** @internal */
|
|
166
|
+
export const V3GlobaldataScansGetResponse$inboundSchema: z.ZodType<
|
|
167
|
+
V3GlobaldataScansGetResponse,
|
|
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 V3GlobaldataScansGetResponse$Outbound = {
|
|
182
|
+
Headers: { [k: string]: Array<string> };
|
|
183
|
+
Result: components.ResponseEnvelopeTrackedScan$Outbound;
|
|
184
|
+
};
|
|
185
|
+
|
|
186
|
+
/** @internal */
|
|
187
|
+
export const V3GlobaldataScansGetResponse$outboundSchema: z.ZodType<
|
|
188
|
+
V3GlobaldataScansGetResponse$Outbound,
|
|
189
|
+
z.ZodTypeDef,
|
|
190
|
+
V3GlobaldataScansGetResponse
|
|
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 V3GlobaldataScansGetResponse$ {
|
|
206
|
+
/** @deprecated use `V3GlobaldataScansGetResponse$inboundSchema` instead. */
|
|
207
|
+
export const inboundSchema = V3GlobaldataScansGetResponse$inboundSchema;
|
|
208
|
+
/** @deprecated use `V3GlobaldataScansGetResponse$outboundSchema` instead. */
|
|
209
|
+
export const outboundSchema = V3GlobaldataScansGetResponse$outboundSchema;
|
|
210
|
+
/** @deprecated use `V3GlobaldataScansGetResponse$Outbound` instead. */
|
|
211
|
+
export type Outbound = V3GlobaldataScansGetResponse$Outbound;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
export function v3GlobaldataScansGetResponseToJSON(
|
|
215
|
+
v3GlobaldataScansGetResponse: V3GlobaldataScansGetResponse,
|
|
216
|
+
): string {
|
|
217
|
+
return JSON.stringify(
|
|
218
|
+
V3GlobaldataScansGetResponse$outboundSchema.parse(
|
|
219
|
+
v3GlobaldataScansGetResponse,
|
|
220
|
+
),
|
|
221
|
+
);
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
export function v3GlobaldataScansGetResponseFromJSON(
|
|
225
|
+
jsonString: string,
|
|
226
|
+
): SafeParseResult<V3GlobaldataScansGetResponse, SDKValidationError> {
|
|
227
|
+
return safeParse(
|
|
228
|
+
jsonString,
|
|
229
|
+
(x) => V3GlobaldataScansGetResponse$inboundSchema.parse(JSON.parse(x)),
|
|
230
|
+
`Failed to parse 'V3GlobaldataScansGetResponse' from JSON`,
|
|
231
|
+
);
|
|
232
|
+
}
|
|
@@ -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
|
+
}
|