@censys/platform-sdk 0.5.0 → 0.6.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/README.md +17 -17
- package/docs/sdks/globaldata/README.md +190 -92
- package/docs/sdks/threathunting/README.md +29 -21
- package/examples/globalDataSearch.example.ts +1 -1
- package/examples/package-lock.json +3 -3
- package/funcs/globalDataConvertLegacySearchQueries.d.ts +18 -0
- package/funcs/globalDataConvertLegacySearchQueries.d.ts.map +1 -0
- package/funcs/globalDataConvertLegacySearchQueries.js +134 -0
- package/funcs/globalDataConvertLegacySearchQueries.js.map +1 -0
- package/funcs/globalDataCreateTrackedScan.d.ts +2 -2
- package/funcs/globalDataCreateTrackedScan.js +2 -2
- package/funcs/{globalDataGetTrackedScanThreatHunting.d.ts → globalDataGetCertificateRaw.d.ts} +4 -5
- package/funcs/globalDataGetCertificateRaw.d.ts.map +1 -0
- package/funcs/{globalDataGetHostObservationsWithCertificate.js → globalDataGetCertificateRaw.js} +10 -19
- package/funcs/globalDataGetCertificateRaw.js.map +1 -0
- package/funcs/globalDataGetCertificates.d.ts +1 -1
- package/funcs/globalDataGetCertificates.d.ts.map +1 -1
- package/funcs/globalDataGetCertificates.js +9 -6
- package/funcs/globalDataGetCertificates.js.map +1 -1
- package/funcs/globalDataGetCertificatesRaw.d.ts +18 -0
- package/funcs/globalDataGetCertificatesRaw.d.ts.map +1 -0
- package/funcs/globalDataGetCertificatesRaw.js +130 -0
- package/funcs/globalDataGetCertificatesRaw.js.map +1 -0
- package/funcs/globalDataGetHostTimeline.d.ts +1 -1
- package/funcs/globalDataGetHostTimeline.js +1 -1
- package/funcs/globalDataGetHosts.d.ts +1 -1
- package/funcs/globalDataGetHosts.d.ts.map +1 -1
- package/funcs/globalDataGetHosts.js +8 -6
- package/funcs/globalDataGetHosts.js.map +1 -1
- package/funcs/globalDataGetTrackedScan.d.ts +2 -3
- package/funcs/globalDataGetTrackedScan.d.ts.map +1 -1
- package/funcs/globalDataGetTrackedScan.js +2 -3
- package/funcs/globalDataGetTrackedScan.js.map +1 -1
- package/funcs/globalDataGetWebProperties.d.ts +1 -1
- package/funcs/globalDataGetWebProperties.d.ts.map +1 -1
- package/funcs/globalDataGetWebProperties.js +9 -6
- package/funcs/globalDataGetWebProperties.js.map +1 -1
- package/funcs/threatHuntingCreateTrackedScan.d.ts +2 -2
- package/funcs/threatHuntingCreateTrackedScan.js +2 -2
- 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/funcs/threatHuntingGetTrackedScanThreatHunting.d.ts +18 -0
- package/funcs/threatHuntingGetTrackedScanThreatHunting.d.ts.map +1 -0
- package/funcs/{globalDataGetTrackedScanThreatHunting.js → threatHuntingGetTrackedScanThreatHunting.js} +5 -6
- package/funcs/threatHuntingGetTrackedScanThreatHunting.js.map +1 -0
- package/jsr.json +1 -1
- package/lib/config.d.ts +4 -4
- package/lib/config.js +4 -4
- package/lib/security.d.ts.map +1 -1
- package/lib/security.js.map +1 -1
- package/models/components/alternativequery.d.ts +69 -0
- package/models/components/alternativequery.d.ts.map +1 -0
- package/models/components/alternativequery.js +93 -0
- package/models/components/alternativequery.js.map +1 -0
- package/models/components/assetcertificatelistinputbody.d.ts +32 -0
- package/models/components/assetcertificatelistinputbody.d.ts.map +1 -0
- package/models/components/assetcertificatelistinputbody.js +78 -0
- package/models/components/assetcertificatelistinputbody.js.map +1 -0
- package/models/components/assethostlistinputbody.d.ts +32 -0
- package/models/components/assethostlistinputbody.d.ts.map +1 -0
- package/models/components/assethostlistinputbody.js +78 -0
- package/models/components/assethostlistinputbody.js.map +1 -0
- package/models/components/assetwebpropertylistinputbody.d.ts +32 -0
- package/models/components/assetwebpropertylistinputbody.d.ts.map +1 -0
- package/models/components/assetwebpropertylistinputbody.js +78 -0
- package/models/components/assetwebpropertylistinputbody.js.map +1 -0
- package/models/components/asteriskmanagerinterface.d.ts +29 -0
- package/models/components/asteriskmanagerinterface.d.ts.map +1 -0
- package/models/components/asteriskmanagerinterface.js +69 -0
- package/models/components/asteriskmanagerinterface.js.map +1 -0
- package/models/components/convertqueryerror.d.ts +32 -0
- package/models/components/convertqueryerror.d.ts.map +1 -0
- package/models/components/convertqueryerror.js +69 -0
- package/models/components/convertqueryerror.js.map +1 -0
- package/models/components/index.d.ts +12 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +12 -0
- package/models/components/index.js.map +1 -1
- package/models/components/openvpnmgmt.d.ts +37 -0
- package/models/components/openvpnmgmt.d.ts.map +1 -0
- package/models/components/openvpnmgmt.js +92 -0
- package/models/components/openvpnmgmt.js.map +1 -0
- package/models/components/rawcertificateresponse.d.ts +31 -0
- package/models/components/rawcertificateresponse.d.ts.map +1 -0
- package/models/components/rawcertificateresponse.js +80 -0
- package/models/components/rawcertificateresponse.js.map +1 -0
- package/models/components/rdp.d.ts +2 -0
- package/models/components/rdp.d.ts.map +1 -1
- package/models/components/rdp.js +4 -0
- package/models/components/rdp.js.map +1 -1
- package/models/components/responseenvelopelistrawcertificateresponse.d.ts +30 -0
- package/models/components/responseenvelopelistrawcertificateresponse.d.ts.map +1 -0
- package/models/components/responseenvelopelistrawcertificateresponse.js +72 -0
- package/models/components/responseenvelopelistrawcertificateresponse.js.map +1 -0
- package/models/components/responseenvelopelistsearchconvertqueryresponse.d.ts +30 -0
- package/models/components/responseenvelopelistsearchconvertqueryresponse.d.ts.map +1 -0
- package/models/components/responseenvelopelistsearchconvertqueryresponse.js +72 -0
- package/models/components/responseenvelopelistsearchconvertqueryresponse.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 +2 -0
- package/models/components/screenshot.js.map +1 -1
- package/models/components/searchconvertqueryinputbody.d.ts +32 -0
- package/models/components/searchconvertqueryinputbody.d.ts.map +1 -0
- package/models/components/searchconvertqueryinputbody.js +69 -0
- package/models/components/searchconvertqueryinputbody.js.map +1 -0
- package/models/components/searchconvertqueryresponse.d.ts +91 -0
- package/models/components/searchconvertqueryresponse.d.ts.map +1 -0
- package/models/components/searchconvertqueryresponse.js +117 -0
- package/models/components/searchconvertqueryresponse.js.map +1 -0
- package/models/components/service.d.ts +6 -0
- package/models/components/service.d.ts.map +1 -1
- package/models/components/service.js +11 -0
- package/models/components/service.js.map +1 -1
- package/models/components/servicescan.d.ts +6 -0
- package/models/components/servicescan.d.ts.map +1 -1
- package/models/components/servicescan.js +10 -0
- package/models/components/servicescan.js.map +1 -1
- package/models/operations/index.d.ts +7 -4
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +7 -4
- package/models/operations/index.js.map +1 -1
- package/models/operations/v3globaldataassetcertificatelistpost.d.ts +91 -0
- package/models/operations/v3globaldataassetcertificatelistpost.d.ts.map +1 -0
- package/models/operations/v3globaldataassetcertificatelistpost.js +157 -0
- package/models/operations/v3globaldataassetcertificatelistpost.js.map +1 -0
- package/models/operations/v3globaldataassetcertificatelistrawpost.d.ts +91 -0
- package/models/operations/v3globaldataassetcertificatelistrawpost.d.ts.map +1 -0
- package/models/operations/v3globaldataassetcertificatelistrawpost.js +157 -0
- package/models/operations/v3globaldataassetcertificatelistrawpost.js.map +1 -0
- package/models/operations/v3globaldataassetcertificateraw.d.ts +93 -0
- package/models/operations/v3globaldataassetcertificateraw.d.ts.map +1 -0
- package/models/operations/v3globaldataassetcertificateraw.js +156 -0
- package/models/operations/v3globaldataassetcertificateraw.js.map +1 -0
- package/models/operations/v3globaldataassethostlistpost.d.ts +91 -0
- package/models/operations/v3globaldataassethostlistpost.d.ts.map +1 -0
- package/models/operations/v3globaldataassethostlistpost.js +157 -0
- package/models/operations/v3globaldataassethostlistpost.js.map +1 -0
- package/models/operations/v3globaldataassethosttimeline.d.ts +2 -2
- package/models/operations/v3globaldataassetwebpropertylistpost.d.ts +91 -0
- package/models/operations/v3globaldataassetwebpropertylistpost.d.ts.map +1 -0
- package/models/operations/v3globaldataassetwebpropertylistpost.js +157 -0
- package/models/operations/v3globaldataassetwebpropertylistpost.js.map +1 -0
- package/models/operations/v3globaldatasearchconvert.d.ts +91 -0
- package/models/operations/v3globaldatasearchconvert.d.ts.map +1 -0
- package/models/operations/v3globaldatasearchconvert.js +157 -0
- package/models/operations/v3globaldatasearchconvert.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/package.json +3 -3
- package/sdk/globaldata.d.ts +24 -19
- package/sdk/globaldata.d.ts.map +1 -1
- package/sdk/globaldata.js +29 -21
- package/sdk/globaldata.js.map +1 -1
- package/sdk/threathunting.d.ts +7 -9
- package/sdk/threathunting.d.ts.map +1 -1
- package/sdk/threathunting.js +11 -13
- package/sdk/threathunting.js.map +1 -1
- package/src/funcs/globalDataConvertLegacySearchQueries.ts +188 -0
- package/src/funcs/globalDataCreateTrackedScan.ts +2 -2
- package/src/funcs/{globalDataGetHostObservationsWithCertificate.ts → globalDataGetCertificateRaw.ts} +19 -26
- package/src/funcs/globalDataGetCertificates.ts +15 -14
- package/src/funcs/globalDataGetCertificatesRaw.ts +187 -0
- package/src/funcs/globalDataGetHostTimeline.ts +1 -1
- package/src/funcs/globalDataGetHosts.ts +24 -16
- package/src/funcs/globalDataGetTrackedScan.ts +2 -3
- package/src/funcs/globalDataGetWebProperties.ts +15 -14
- package/src/funcs/threatHuntingCreateTrackedScan.ts +2 -2
- package/src/funcs/threatHuntingGetHostObservationsWithCertificate.ts +201 -0
- package/src/funcs/{globalDataGetTrackedScanThreatHunting.ts → threatHuntingGetTrackedScanThreatHunting.ts} +3 -4
- package/src/lib/config.ts +4 -4
- package/src/lib/security.ts +4 -1
- package/src/models/components/alternativequery.ts +104 -0
- package/src/models/components/assetcertificatelistinputbody.ts +80 -0
- package/src/models/components/assethostlistinputbody.ts +78 -0
- package/src/models/components/assetwebpropertylistinputbody.ts +80 -0
- package/src/models/components/asteriskmanagerinterface.ts +66 -0
- package/src/models/components/convertqueryerror.ts +69 -0
- package/src/models/components/index.ts +12 -0
- package/src/models/components/openvpnmgmt.ts +93 -0
- package/src/models/components/rawcertificateresponse.ts +79 -0
- package/src/models/components/rdp.ts +6 -0
- package/src/models/components/responseenvelopelistrawcertificateresponse.ts +84 -0
- package/src/models/components/responseenvelopelistsearchconvertqueryresponse.ts +88 -0
- package/src/models/components/screenshot.ts +4 -0
- package/src/models/components/searchconvertqueryinputbody.ts +71 -0
- package/src/models/components/searchconvertqueryresponse.ts +166 -0
- package/src/models/components/service.ts +25 -0
- package/src/models/components/servicescan.ts +24 -0
- package/src/models/operations/index.ts +7 -4
- package/src/models/operations/v3globaldataassetcertificatelistpost.ts +265 -0
- package/src/models/operations/v3globaldataassetcertificatelistrawpost.ts +269 -0
- package/src/models/operations/v3globaldataassetcertificateraw.ts +248 -0
- package/src/models/operations/v3globaldataassethostlistpost.ts +238 -0
- package/src/models/operations/v3globaldataassethosttimeline.ts +2 -2
- package/src/models/operations/v3globaldataassetwebpropertylistpost.ts +265 -0
- package/src/models/operations/v3globaldatasearchconvert.ts +234 -0
- package/src/models/operations/v3threathuntinggethostobservationswithcertificate.ts +315 -0
- package/src/sdk/globaldata.ts +49 -35
- package/src/sdk/threathunting.ts +16 -15
- package/tests/sdk.test.ts +2 -2
- package/funcs/globalDataGetHostObservationsWithCertificate.d.ts +0 -18
- package/funcs/globalDataGetHostObservationsWithCertificate.d.ts.map +0 -1
- package/funcs/globalDataGetHostObservationsWithCertificate.js.map +0 -1
- package/funcs/globalDataGetTrackedScanThreatHunting.d.ts.map +0 -1
- package/funcs/globalDataGetTrackedScanThreatHunting.js.map +0 -1
- package/models/operations/v3globaldataassetcertificatelist.d.ts +0 -94
- package/models/operations/v3globaldataassetcertificatelist.d.ts.map +0 -1
- package/models/operations/v3globaldataassetcertificatelist.js +0 -157
- package/models/operations/v3globaldataassetcertificatelist.js.map +0 -1
- package/models/operations/v3globaldataassethostlist.d.ts +0 -94
- package/models/operations/v3globaldataassethostlist.d.ts.map +0 -1
- package/models/operations/v3globaldataassethostlist.js +0 -157
- package/models/operations/v3globaldataassethostlist.js.map +0 -1
- package/models/operations/v3globaldataassetwebpropertylist.d.ts +0 -94
- package/models/operations/v3globaldataassetwebpropertylist.d.ts.map +0 -1
- package/models/operations/v3globaldataassetwebpropertylist.js +0 -157
- package/models/operations/v3globaldataassetwebpropertylist.js.map +0 -1
- package/models/operations/v3globaldatagethostobservationswithcertificate.d.ts +0 -124
- package/models/operations/v3globaldatagethostobservationswithcertificate.d.ts.map +0 -1
- package/models/operations/v3globaldatagethostobservationswithcertificate.js +0 -178
- package/models/operations/v3globaldatagethostobservationswithcertificate.js.map +0 -1
- package/src/models/operations/v3globaldataassetcertificatelist.ts +0 -259
- package/src/models/operations/v3globaldataassethostlist.ts +0 -233
- package/src/models/operations/v3globaldataassetwebpropertylist.ts +0 -259
- package/src/models/operations/v3globaldatagethostobservationswithcertificate.ts +0 -317
|
@@ -0,0 +1,234 @@
|
|
|
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 V3GlobaldataSearchConvertGlobals = {
|
|
13
|
+
organizationId?: string | undefined;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export type V3GlobaldataSearchConvertRequest = {
|
|
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
|
+
searchConvertQueryInputBody: components.SearchConvertQueryInputBody;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export type V3GlobaldataSearchConvertResponse = {
|
|
25
|
+
headers: { [k: string]: Array<string> };
|
|
26
|
+
result: components.ResponseEnvelopeListSearchConvertQueryResponse;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
/** @internal */
|
|
30
|
+
export const V3GlobaldataSearchConvertGlobals$inboundSchema: z.ZodType<
|
|
31
|
+
V3GlobaldataSearchConvertGlobals,
|
|
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 V3GlobaldataSearchConvertGlobals$Outbound = {
|
|
44
|
+
organization_id?: string | undefined;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
/** @internal */
|
|
48
|
+
export const V3GlobaldataSearchConvertGlobals$outboundSchema: z.ZodType<
|
|
49
|
+
V3GlobaldataSearchConvertGlobals$Outbound,
|
|
50
|
+
z.ZodTypeDef,
|
|
51
|
+
V3GlobaldataSearchConvertGlobals
|
|
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 V3GlobaldataSearchConvertGlobals$ {
|
|
65
|
+
/** @deprecated use `V3GlobaldataSearchConvertGlobals$inboundSchema` instead. */
|
|
66
|
+
export const inboundSchema = V3GlobaldataSearchConvertGlobals$inboundSchema;
|
|
67
|
+
/** @deprecated use `V3GlobaldataSearchConvertGlobals$outboundSchema` instead. */
|
|
68
|
+
export const outboundSchema = V3GlobaldataSearchConvertGlobals$outboundSchema;
|
|
69
|
+
/** @deprecated use `V3GlobaldataSearchConvertGlobals$Outbound` instead. */
|
|
70
|
+
export type Outbound = V3GlobaldataSearchConvertGlobals$Outbound;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function v3GlobaldataSearchConvertGlobalsToJSON(
|
|
74
|
+
v3GlobaldataSearchConvertGlobals: V3GlobaldataSearchConvertGlobals,
|
|
75
|
+
): string {
|
|
76
|
+
return JSON.stringify(
|
|
77
|
+
V3GlobaldataSearchConvertGlobals$outboundSchema.parse(
|
|
78
|
+
v3GlobaldataSearchConvertGlobals,
|
|
79
|
+
),
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export function v3GlobaldataSearchConvertGlobalsFromJSON(
|
|
84
|
+
jsonString: string,
|
|
85
|
+
): SafeParseResult<V3GlobaldataSearchConvertGlobals, SDKValidationError> {
|
|
86
|
+
return safeParse(
|
|
87
|
+
jsonString,
|
|
88
|
+
(x) => V3GlobaldataSearchConvertGlobals$inboundSchema.parse(JSON.parse(x)),
|
|
89
|
+
`Failed to parse 'V3GlobaldataSearchConvertGlobals' from JSON`,
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/** @internal */
|
|
94
|
+
export const V3GlobaldataSearchConvertRequest$inboundSchema: z.ZodType<
|
|
95
|
+
V3GlobaldataSearchConvertRequest,
|
|
96
|
+
z.ZodTypeDef,
|
|
97
|
+
unknown
|
|
98
|
+
> = z.object({
|
|
99
|
+
organization_id: z.string().optional(),
|
|
100
|
+
SearchConvertQueryInputBody:
|
|
101
|
+
components.SearchConvertQueryInputBody$inboundSchema,
|
|
102
|
+
}).transform((v) => {
|
|
103
|
+
return remap$(v, {
|
|
104
|
+
"organization_id": "organizationId",
|
|
105
|
+
"SearchConvertQueryInputBody": "searchConvertQueryInputBody",
|
|
106
|
+
});
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
/** @internal */
|
|
110
|
+
export type V3GlobaldataSearchConvertRequest$Outbound = {
|
|
111
|
+
organization_id?: string | undefined;
|
|
112
|
+
SearchConvertQueryInputBody: components.SearchConvertQueryInputBody$Outbound;
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
/** @internal */
|
|
116
|
+
export const V3GlobaldataSearchConvertRequest$outboundSchema: z.ZodType<
|
|
117
|
+
V3GlobaldataSearchConvertRequest$Outbound,
|
|
118
|
+
z.ZodTypeDef,
|
|
119
|
+
V3GlobaldataSearchConvertRequest
|
|
120
|
+
> = z.object({
|
|
121
|
+
organizationId: z.string().optional(),
|
|
122
|
+
searchConvertQueryInputBody:
|
|
123
|
+
components.SearchConvertQueryInputBody$outboundSchema,
|
|
124
|
+
}).transform((v) => {
|
|
125
|
+
return remap$(v, {
|
|
126
|
+
organizationId: "organization_id",
|
|
127
|
+
searchConvertQueryInputBody: "SearchConvertQueryInputBody",
|
|
128
|
+
});
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* @internal
|
|
133
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
134
|
+
*/
|
|
135
|
+
export namespace V3GlobaldataSearchConvertRequest$ {
|
|
136
|
+
/** @deprecated use `V3GlobaldataSearchConvertRequest$inboundSchema` instead. */
|
|
137
|
+
export const inboundSchema = V3GlobaldataSearchConvertRequest$inboundSchema;
|
|
138
|
+
/** @deprecated use `V3GlobaldataSearchConvertRequest$outboundSchema` instead. */
|
|
139
|
+
export const outboundSchema = V3GlobaldataSearchConvertRequest$outboundSchema;
|
|
140
|
+
/** @deprecated use `V3GlobaldataSearchConvertRequest$Outbound` instead. */
|
|
141
|
+
export type Outbound = V3GlobaldataSearchConvertRequest$Outbound;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
export function v3GlobaldataSearchConvertRequestToJSON(
|
|
145
|
+
v3GlobaldataSearchConvertRequest: V3GlobaldataSearchConvertRequest,
|
|
146
|
+
): string {
|
|
147
|
+
return JSON.stringify(
|
|
148
|
+
V3GlobaldataSearchConvertRequest$outboundSchema.parse(
|
|
149
|
+
v3GlobaldataSearchConvertRequest,
|
|
150
|
+
),
|
|
151
|
+
);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
export function v3GlobaldataSearchConvertRequestFromJSON(
|
|
155
|
+
jsonString: string,
|
|
156
|
+
): SafeParseResult<V3GlobaldataSearchConvertRequest, SDKValidationError> {
|
|
157
|
+
return safeParse(
|
|
158
|
+
jsonString,
|
|
159
|
+
(x) => V3GlobaldataSearchConvertRequest$inboundSchema.parse(JSON.parse(x)),
|
|
160
|
+
`Failed to parse 'V3GlobaldataSearchConvertRequest' from JSON`,
|
|
161
|
+
);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/** @internal */
|
|
165
|
+
export const V3GlobaldataSearchConvertResponse$inboundSchema: z.ZodType<
|
|
166
|
+
V3GlobaldataSearchConvertResponse,
|
|
167
|
+
z.ZodTypeDef,
|
|
168
|
+
unknown
|
|
169
|
+
> = z.object({
|
|
170
|
+
Headers: z.record(z.array(z.string())),
|
|
171
|
+
Result:
|
|
172
|
+
components.ResponseEnvelopeListSearchConvertQueryResponse$inboundSchema,
|
|
173
|
+
}).transform((v) => {
|
|
174
|
+
return remap$(v, {
|
|
175
|
+
"Headers": "headers",
|
|
176
|
+
"Result": "result",
|
|
177
|
+
});
|
|
178
|
+
});
|
|
179
|
+
|
|
180
|
+
/** @internal */
|
|
181
|
+
export type V3GlobaldataSearchConvertResponse$Outbound = {
|
|
182
|
+
Headers: { [k: string]: Array<string> };
|
|
183
|
+
Result: components.ResponseEnvelopeListSearchConvertQueryResponse$Outbound;
|
|
184
|
+
};
|
|
185
|
+
|
|
186
|
+
/** @internal */
|
|
187
|
+
export const V3GlobaldataSearchConvertResponse$outboundSchema: z.ZodType<
|
|
188
|
+
V3GlobaldataSearchConvertResponse$Outbound,
|
|
189
|
+
z.ZodTypeDef,
|
|
190
|
+
V3GlobaldataSearchConvertResponse
|
|
191
|
+
> = z.object({
|
|
192
|
+
headers: z.record(z.array(z.string())),
|
|
193
|
+
result:
|
|
194
|
+
components.ResponseEnvelopeListSearchConvertQueryResponse$outboundSchema,
|
|
195
|
+
}).transform((v) => {
|
|
196
|
+
return remap$(v, {
|
|
197
|
+
headers: "Headers",
|
|
198
|
+
result: "Result",
|
|
199
|
+
});
|
|
200
|
+
});
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* @internal
|
|
204
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
205
|
+
*/
|
|
206
|
+
export namespace V3GlobaldataSearchConvertResponse$ {
|
|
207
|
+
/** @deprecated use `V3GlobaldataSearchConvertResponse$inboundSchema` instead. */
|
|
208
|
+
export const inboundSchema = V3GlobaldataSearchConvertResponse$inboundSchema;
|
|
209
|
+
/** @deprecated use `V3GlobaldataSearchConvertResponse$outboundSchema` instead. */
|
|
210
|
+
export const outboundSchema =
|
|
211
|
+
V3GlobaldataSearchConvertResponse$outboundSchema;
|
|
212
|
+
/** @deprecated use `V3GlobaldataSearchConvertResponse$Outbound` instead. */
|
|
213
|
+
export type Outbound = V3GlobaldataSearchConvertResponse$Outbound;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
export function v3GlobaldataSearchConvertResponseToJSON(
|
|
217
|
+
v3GlobaldataSearchConvertResponse: V3GlobaldataSearchConvertResponse,
|
|
218
|
+
): string {
|
|
219
|
+
return JSON.stringify(
|
|
220
|
+
V3GlobaldataSearchConvertResponse$outboundSchema.parse(
|
|
221
|
+
v3GlobaldataSearchConvertResponse,
|
|
222
|
+
),
|
|
223
|
+
);
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
export function v3GlobaldataSearchConvertResponseFromJSON(
|
|
227
|
+
jsonString: string,
|
|
228
|
+
): SafeParseResult<V3GlobaldataSearchConvertResponse, SDKValidationError> {
|
|
229
|
+
return safeParse(
|
|
230
|
+
jsonString,
|
|
231
|
+
(x) => V3GlobaldataSearchConvertResponse$inboundSchema.parse(JSON.parse(x)),
|
|
232
|
+
`Failed to parse 'V3GlobaldataSearchConvertResponse' from JSON`,
|
|
233
|
+
);
|
|
234
|
+
}
|
|
@@ -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
|
+
}
|