@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,91 @@
|
|
|
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 { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
import {
|
|
11
|
+
HostObservationRange,
|
|
12
|
+
HostObservationRange$inboundSchema,
|
|
13
|
+
HostObservationRange$Outbound,
|
|
14
|
+
HostObservationRange$outboundSchema,
|
|
15
|
+
} from "./hostobservationrange.js";
|
|
16
|
+
|
|
17
|
+
export type HostObservationResponse = {
|
|
18
|
+
nextPageToken?: string | undefined;
|
|
19
|
+
ranges: Array<HostObservationRange> | null;
|
|
20
|
+
totalResults: number;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
/** @internal */
|
|
24
|
+
export const HostObservationResponse$inboundSchema: z.ZodType<
|
|
25
|
+
HostObservationResponse,
|
|
26
|
+
z.ZodTypeDef,
|
|
27
|
+
unknown
|
|
28
|
+
> = z.object({
|
|
29
|
+
next_page_token: z.string().optional(),
|
|
30
|
+
ranges: z.nullable(z.array(HostObservationRange$inboundSchema)),
|
|
31
|
+
total_results: z.number().int(),
|
|
32
|
+
}).transform((v) => {
|
|
33
|
+
return remap$(v, {
|
|
34
|
+
"next_page_token": "nextPageToken",
|
|
35
|
+
"total_results": "totalResults",
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
/** @internal */
|
|
40
|
+
export type HostObservationResponse$Outbound = {
|
|
41
|
+
next_page_token?: string | undefined;
|
|
42
|
+
ranges: Array<HostObservationRange$Outbound> | null;
|
|
43
|
+
total_results: number;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
/** @internal */
|
|
47
|
+
export const HostObservationResponse$outboundSchema: z.ZodType<
|
|
48
|
+
HostObservationResponse$Outbound,
|
|
49
|
+
z.ZodTypeDef,
|
|
50
|
+
HostObservationResponse
|
|
51
|
+
> = z.object({
|
|
52
|
+
nextPageToken: z.string().optional(),
|
|
53
|
+
ranges: z.nullable(z.array(HostObservationRange$outboundSchema)),
|
|
54
|
+
totalResults: z.number().int(),
|
|
55
|
+
}).transform((v) => {
|
|
56
|
+
return remap$(v, {
|
|
57
|
+
nextPageToken: "next_page_token",
|
|
58
|
+
totalResults: "total_results",
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* @internal
|
|
64
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
65
|
+
*/
|
|
66
|
+
export namespace HostObservationResponse$ {
|
|
67
|
+
/** @deprecated use `HostObservationResponse$inboundSchema` instead. */
|
|
68
|
+
export const inboundSchema = HostObservationResponse$inboundSchema;
|
|
69
|
+
/** @deprecated use `HostObservationResponse$outboundSchema` instead. */
|
|
70
|
+
export const outboundSchema = HostObservationResponse$outboundSchema;
|
|
71
|
+
/** @deprecated use `HostObservationResponse$Outbound` instead. */
|
|
72
|
+
export type Outbound = HostObservationResponse$Outbound;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function hostObservationResponseToJSON(
|
|
76
|
+
hostObservationResponse: HostObservationResponse,
|
|
77
|
+
): string {
|
|
78
|
+
return JSON.stringify(
|
|
79
|
+
HostObservationResponse$outboundSchema.parse(hostObservationResponse),
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export function hostObservationResponseFromJSON(
|
|
84
|
+
jsonString: string,
|
|
85
|
+
): SafeParseResult<HostObservationResponse, SDKValidationError> {
|
|
86
|
+
return safeParse(
|
|
87
|
+
jsonString,
|
|
88
|
+
(x) => HostObservationResponse$inboundSchema.parse(JSON.parse(x)),
|
|
89
|
+
`Failed to parse 'HostObservationResponse' from JSON`,
|
|
90
|
+
);
|
|
91
|
+
}
|
|
@@ -10,6 +10,10 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
|
10
10
|
|
|
11
11
|
export type HttpFavicon = {
|
|
12
12
|
hashMd5?: string | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* A 64-bit 'perceptual' hash of the favicon
|
|
15
|
+
*/
|
|
16
|
+
hashPhash?: string | undefined;
|
|
13
17
|
hashSha256?: string | undefined;
|
|
14
18
|
/**
|
|
15
19
|
* A hash expressed as a signed decimal integer, provided for compatability with Shodan search.
|
|
@@ -32,6 +36,7 @@ export const HttpFavicon$inboundSchema: z.ZodType<
|
|
|
32
36
|
unknown
|
|
33
37
|
> = z.object({
|
|
34
38
|
hash_md5: z.string().optional(),
|
|
39
|
+
hash_phash: z.string().optional(),
|
|
35
40
|
hash_sha256: z.string().optional(),
|
|
36
41
|
hash_shodan: z.number().int().optional(),
|
|
37
42
|
name: z.string().optional(),
|
|
@@ -39,6 +44,7 @@ export const HttpFavicon$inboundSchema: z.ZodType<
|
|
|
39
44
|
}).transform((v) => {
|
|
40
45
|
return remap$(v, {
|
|
41
46
|
"hash_md5": "hashMd5",
|
|
47
|
+
"hash_phash": "hashPhash",
|
|
42
48
|
"hash_sha256": "hashSha256",
|
|
43
49
|
"hash_shodan": "hashShodan",
|
|
44
50
|
});
|
|
@@ -47,6 +53,7 @@ export const HttpFavicon$inboundSchema: z.ZodType<
|
|
|
47
53
|
/** @internal */
|
|
48
54
|
export type HttpFavicon$Outbound = {
|
|
49
55
|
hash_md5?: string | undefined;
|
|
56
|
+
hash_phash?: string | undefined;
|
|
50
57
|
hash_sha256?: string | undefined;
|
|
51
58
|
hash_shodan?: number | undefined;
|
|
52
59
|
name?: string | undefined;
|
|
@@ -60,6 +67,7 @@ export const HttpFavicon$outboundSchema: z.ZodType<
|
|
|
60
67
|
HttpFavicon
|
|
61
68
|
> = z.object({
|
|
62
69
|
hashMd5: z.string().optional(),
|
|
70
|
+
hashPhash: z.string().optional(),
|
|
63
71
|
hashSha256: z.string().optional(),
|
|
64
72
|
hashShodan: z.number().int().optional(),
|
|
65
73
|
name: z.string().optional(),
|
|
@@ -67,6 +75,7 @@ export const HttpFavicon$outboundSchema: z.ZodType<
|
|
|
67
75
|
}).transform((v) => {
|
|
68
76
|
return remap$(v, {
|
|
69
77
|
hashMd5: "hash_md5",
|
|
78
|
+
hashPhash: "hash_phash",
|
|
70
79
|
hashSha256: "hash_sha256",
|
|
71
80
|
hashShodan: "hash_shodan",
|
|
72
81
|
});
|
|
@@ -94,6 +94,7 @@ export * from "./eipidentity.js";
|
|
|
94
94
|
export * from "./eipinterface.js";
|
|
95
95
|
export * from "./eipservice.js";
|
|
96
96
|
export * from "./elasticsearch.js";
|
|
97
|
+
export * from "./elasticsearcherrormessage.js";
|
|
97
98
|
export * from "./elasticsearchresultsnodeinfo.js";
|
|
98
99
|
export * from "./elasticsearchresultsnodeinfoclustercombinedinfo.js";
|
|
99
100
|
export * from "./elasticsearchresultsnodeinfoclustercombinedinfofilesystem.js";
|
|
@@ -153,6 +154,8 @@ export * from "./hostasset.js";
|
|
|
153
154
|
export * from "./hostdns.js";
|
|
154
155
|
export * from "./hostdnsforwardresolution.js";
|
|
155
156
|
export * from "./hostdnsreverseresolution.js";
|
|
157
|
+
export * from "./hostobservationrange.js";
|
|
158
|
+
export * from "./hostobservationresponse.js";
|
|
156
159
|
export * from "./hosttimeline.js";
|
|
157
160
|
export * from "./hosttimelineevent.js";
|
|
158
161
|
export * from "./hosttimelineeventasset.js";
|
|
@@ -338,6 +341,7 @@ export * from "./responseenvelopecertificateasset.js";
|
|
|
338
341
|
export * from "./responseenvelopecollection.js";
|
|
339
342
|
export * from "./responseenvelopecollectioneventsresponse.js";
|
|
340
343
|
export * from "./responseenvelopehostasset.js";
|
|
344
|
+
export * from "./responseenvelopehostobservationresponse.js";
|
|
341
345
|
export * from "./responseenvelopehosttimeline.js";
|
|
342
346
|
export * from "./responseenvelopelistcertificateasset.js";
|
|
343
347
|
export * from "./responseenvelopelistcollectionsresponsev1.js";
|
|
@@ -345,6 +349,7 @@ export * from "./responseenvelopelisthostasset.js";
|
|
|
345
349
|
export * from "./responseenvelopelistwebpropertyasset.js";
|
|
346
350
|
export * from "./responseenvelopesearchaggregateresponse.js";
|
|
347
351
|
export * from "./responseenvelopesearchqueryresponse.js";
|
|
352
|
+
export * from "./responseenvelopetrackedscan.js";
|
|
348
353
|
export * from "./responseenvelopevaluecountsresponse.js";
|
|
349
354
|
export * from "./responseenvelopewebpropertyasset.js";
|
|
350
355
|
export * from "./reversednsresolved.js";
|
|
@@ -372,6 +377,8 @@ export * from "./saprouterclientinfo.js";
|
|
|
372
377
|
export * from "./saprouterrouterinfo.js";
|
|
373
378
|
export * from "./saprouterrouterversioninfo.js";
|
|
374
379
|
export * from "./scadaview.js";
|
|
380
|
+
export * from "./scansdiscoveryinputbody.js";
|
|
381
|
+
export * from "./scansrescaninputbody.js";
|
|
375
382
|
export * from "./scpi.js";
|
|
376
383
|
export * from "./screenshot.js";
|
|
377
384
|
export * from "./searchaggregateinputbody.js";
|
|
@@ -389,6 +396,7 @@ export * from "./ser2netserialparameters.js";
|
|
|
389
396
|
export * from "./serverconfig.js";
|
|
390
397
|
export * from "./serversync.js";
|
|
391
398
|
export * from "./service.js";
|
|
399
|
+
export * from "./serviceid.js";
|
|
392
400
|
export * from "./servicescan.js";
|
|
393
401
|
export * from "./servicescanned.js";
|
|
394
402
|
export * from "./sevendaystodie.js";
|
|
@@ -438,6 +446,11 @@ export * from "./tlschain.js";
|
|
|
438
446
|
export * from "./tlsversiondata.js";
|
|
439
447
|
export * from "./torservicedescriptor.js";
|
|
440
448
|
export * from "./tplinkkasa.js";
|
|
449
|
+
export * from "./trackedscan.js";
|
|
450
|
+
export * from "./trackedscanscantarget.js";
|
|
451
|
+
export * from "./trackedscanscantargethostnameport.js";
|
|
452
|
+
export * from "./trackedscanscantargethostport.js";
|
|
453
|
+
export * from "./trackedscantask.js";
|
|
441
454
|
export * from "./unitronicspcom.js";
|
|
442
455
|
export * from "./unrecognizedpublickey.js";
|
|
443
456
|
export * from "./upnp.js";
|
|
@@ -456,6 +469,7 @@ export * from "./vnc.js";
|
|
|
456
469
|
export * from "./vnckeyvalue.js";
|
|
457
470
|
export * from "./vuln.js";
|
|
458
471
|
export * from "./weblogict3.js";
|
|
472
|
+
export * from "./weborigin.js";
|
|
459
473
|
export * from "./webproperty.js";
|
|
460
474
|
export * from "./webpropertyasset.js";
|
|
461
475
|
export * from "./whois.js";
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
import {
|
|
10
|
+
HostObservationResponse,
|
|
11
|
+
HostObservationResponse$inboundSchema,
|
|
12
|
+
HostObservationResponse$Outbound,
|
|
13
|
+
HostObservationResponse$outboundSchema,
|
|
14
|
+
} from "./hostobservationresponse.js";
|
|
15
|
+
|
|
16
|
+
export type ResponseEnvelopeHostObservationResponse = {
|
|
17
|
+
result?: HostObservationResponse | undefined;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
/** @internal */
|
|
21
|
+
export const ResponseEnvelopeHostObservationResponse$inboundSchema: z.ZodType<
|
|
22
|
+
ResponseEnvelopeHostObservationResponse,
|
|
23
|
+
z.ZodTypeDef,
|
|
24
|
+
unknown
|
|
25
|
+
> = z.object({
|
|
26
|
+
result: HostObservationResponse$inboundSchema.optional(),
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
/** @internal */
|
|
30
|
+
export type ResponseEnvelopeHostObservationResponse$Outbound = {
|
|
31
|
+
result?: HostObservationResponse$Outbound | undefined;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
/** @internal */
|
|
35
|
+
export const ResponseEnvelopeHostObservationResponse$outboundSchema: z.ZodType<
|
|
36
|
+
ResponseEnvelopeHostObservationResponse$Outbound,
|
|
37
|
+
z.ZodTypeDef,
|
|
38
|
+
ResponseEnvelopeHostObservationResponse
|
|
39
|
+
> = z.object({
|
|
40
|
+
result: HostObservationResponse$outboundSchema.optional(),
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* @internal
|
|
45
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
46
|
+
*/
|
|
47
|
+
export namespace ResponseEnvelopeHostObservationResponse$ {
|
|
48
|
+
/** @deprecated use `ResponseEnvelopeHostObservationResponse$inboundSchema` instead. */
|
|
49
|
+
export const inboundSchema =
|
|
50
|
+
ResponseEnvelopeHostObservationResponse$inboundSchema;
|
|
51
|
+
/** @deprecated use `ResponseEnvelopeHostObservationResponse$outboundSchema` instead. */
|
|
52
|
+
export const outboundSchema =
|
|
53
|
+
ResponseEnvelopeHostObservationResponse$outboundSchema;
|
|
54
|
+
/** @deprecated use `ResponseEnvelopeHostObservationResponse$Outbound` instead. */
|
|
55
|
+
export type Outbound = ResponseEnvelopeHostObservationResponse$Outbound;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function responseEnvelopeHostObservationResponseToJSON(
|
|
59
|
+
responseEnvelopeHostObservationResponse:
|
|
60
|
+
ResponseEnvelopeHostObservationResponse,
|
|
61
|
+
): string {
|
|
62
|
+
return JSON.stringify(
|
|
63
|
+
ResponseEnvelopeHostObservationResponse$outboundSchema.parse(
|
|
64
|
+
responseEnvelopeHostObservationResponse,
|
|
65
|
+
),
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function responseEnvelopeHostObservationResponseFromJSON(
|
|
70
|
+
jsonString: string,
|
|
71
|
+
): SafeParseResult<
|
|
72
|
+
ResponseEnvelopeHostObservationResponse,
|
|
73
|
+
SDKValidationError
|
|
74
|
+
> {
|
|
75
|
+
return safeParse(
|
|
76
|
+
jsonString,
|
|
77
|
+
(x) =>
|
|
78
|
+
ResponseEnvelopeHostObservationResponse$inboundSchema.parse(
|
|
79
|
+
JSON.parse(x),
|
|
80
|
+
),
|
|
81
|
+
`Failed to parse 'ResponseEnvelopeHostObservationResponse' from JSON`,
|
|
82
|
+
);
|
|
83
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
import {
|
|
10
|
+
TrackedScan,
|
|
11
|
+
TrackedScan$inboundSchema,
|
|
12
|
+
TrackedScan$Outbound,
|
|
13
|
+
TrackedScan$outboundSchema,
|
|
14
|
+
} from "./trackedscan.js";
|
|
15
|
+
|
|
16
|
+
export type ResponseEnvelopeTrackedScan = {
|
|
17
|
+
result?: TrackedScan | undefined;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
/** @internal */
|
|
21
|
+
export const ResponseEnvelopeTrackedScan$inboundSchema: z.ZodType<
|
|
22
|
+
ResponseEnvelopeTrackedScan,
|
|
23
|
+
z.ZodTypeDef,
|
|
24
|
+
unknown
|
|
25
|
+
> = z.object({
|
|
26
|
+
result: TrackedScan$inboundSchema.optional(),
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
/** @internal */
|
|
30
|
+
export type ResponseEnvelopeTrackedScan$Outbound = {
|
|
31
|
+
result?: TrackedScan$Outbound | undefined;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
/** @internal */
|
|
35
|
+
export const ResponseEnvelopeTrackedScan$outboundSchema: z.ZodType<
|
|
36
|
+
ResponseEnvelopeTrackedScan$Outbound,
|
|
37
|
+
z.ZodTypeDef,
|
|
38
|
+
ResponseEnvelopeTrackedScan
|
|
39
|
+
> = z.object({
|
|
40
|
+
result: TrackedScan$outboundSchema.optional(),
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* @internal
|
|
45
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
46
|
+
*/
|
|
47
|
+
export namespace ResponseEnvelopeTrackedScan$ {
|
|
48
|
+
/** @deprecated use `ResponseEnvelopeTrackedScan$inboundSchema` instead. */
|
|
49
|
+
export const inboundSchema = ResponseEnvelopeTrackedScan$inboundSchema;
|
|
50
|
+
/** @deprecated use `ResponseEnvelopeTrackedScan$outboundSchema` instead. */
|
|
51
|
+
export const outboundSchema = ResponseEnvelopeTrackedScan$outboundSchema;
|
|
52
|
+
/** @deprecated use `ResponseEnvelopeTrackedScan$Outbound` instead. */
|
|
53
|
+
export type Outbound = ResponseEnvelopeTrackedScan$Outbound;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function responseEnvelopeTrackedScanToJSON(
|
|
57
|
+
responseEnvelopeTrackedScan: ResponseEnvelopeTrackedScan,
|
|
58
|
+
): string {
|
|
59
|
+
return JSON.stringify(
|
|
60
|
+
ResponseEnvelopeTrackedScan$outboundSchema.parse(
|
|
61
|
+
responseEnvelopeTrackedScan,
|
|
62
|
+
),
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export function responseEnvelopeTrackedScanFromJSON(
|
|
67
|
+
jsonString: string,
|
|
68
|
+
): SafeParseResult<ResponseEnvelopeTrackedScan, SDKValidationError> {
|
|
69
|
+
return safeParse(
|
|
70
|
+
jsonString,
|
|
71
|
+
(x) => ResponseEnvelopeTrackedScan$inboundSchema.parse(JSON.parse(x)),
|
|
72
|
+
`Failed to parse 'ResponseEnvelopeTrackedScan' from JSON`,
|
|
73
|
+
);
|
|
74
|
+
}
|