@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.
Files changed (230) hide show
  1. package/README.md +17 -17
  2. package/docs/sdks/globaldata/README.md +190 -92
  3. package/docs/sdks/threathunting/README.md +29 -21
  4. package/examples/globalDataSearch.example.ts +1 -1
  5. package/examples/package-lock.json +3 -3
  6. package/funcs/globalDataConvertLegacySearchQueries.d.ts +18 -0
  7. package/funcs/globalDataConvertLegacySearchQueries.d.ts.map +1 -0
  8. package/funcs/globalDataConvertLegacySearchQueries.js +134 -0
  9. package/funcs/globalDataConvertLegacySearchQueries.js.map +1 -0
  10. package/funcs/globalDataCreateTrackedScan.d.ts +2 -2
  11. package/funcs/globalDataCreateTrackedScan.js +2 -2
  12. package/funcs/{globalDataGetTrackedScanThreatHunting.d.ts → globalDataGetCertificateRaw.d.ts} +4 -5
  13. package/funcs/globalDataGetCertificateRaw.d.ts.map +1 -0
  14. package/funcs/{globalDataGetHostObservationsWithCertificate.js → globalDataGetCertificateRaw.js} +10 -19
  15. package/funcs/globalDataGetCertificateRaw.js.map +1 -0
  16. package/funcs/globalDataGetCertificates.d.ts +1 -1
  17. package/funcs/globalDataGetCertificates.d.ts.map +1 -1
  18. package/funcs/globalDataGetCertificates.js +9 -6
  19. package/funcs/globalDataGetCertificates.js.map +1 -1
  20. package/funcs/globalDataGetCertificatesRaw.d.ts +18 -0
  21. package/funcs/globalDataGetCertificatesRaw.d.ts.map +1 -0
  22. package/funcs/globalDataGetCertificatesRaw.js +130 -0
  23. package/funcs/globalDataGetCertificatesRaw.js.map +1 -0
  24. package/funcs/globalDataGetHostTimeline.d.ts +1 -1
  25. package/funcs/globalDataGetHostTimeline.js +1 -1
  26. package/funcs/globalDataGetHosts.d.ts +1 -1
  27. package/funcs/globalDataGetHosts.d.ts.map +1 -1
  28. package/funcs/globalDataGetHosts.js +8 -6
  29. package/funcs/globalDataGetHosts.js.map +1 -1
  30. package/funcs/globalDataGetTrackedScan.d.ts +2 -3
  31. package/funcs/globalDataGetTrackedScan.d.ts.map +1 -1
  32. package/funcs/globalDataGetTrackedScan.js +2 -3
  33. package/funcs/globalDataGetTrackedScan.js.map +1 -1
  34. package/funcs/globalDataGetWebProperties.d.ts +1 -1
  35. package/funcs/globalDataGetWebProperties.d.ts.map +1 -1
  36. package/funcs/globalDataGetWebProperties.js +9 -6
  37. package/funcs/globalDataGetWebProperties.js.map +1 -1
  38. package/funcs/threatHuntingCreateTrackedScan.d.ts +2 -2
  39. package/funcs/threatHuntingCreateTrackedScan.js +2 -2
  40. package/funcs/threatHuntingGetHostObservationsWithCertificate.d.ts +18 -0
  41. package/funcs/threatHuntingGetHostObservationsWithCertificate.d.ts.map +1 -0
  42. package/funcs/threatHuntingGetHostObservationsWithCertificate.js +141 -0
  43. package/funcs/threatHuntingGetHostObservationsWithCertificate.js.map +1 -0
  44. package/funcs/threatHuntingGetTrackedScanThreatHunting.d.ts +18 -0
  45. package/funcs/threatHuntingGetTrackedScanThreatHunting.d.ts.map +1 -0
  46. package/funcs/{globalDataGetTrackedScanThreatHunting.js → threatHuntingGetTrackedScanThreatHunting.js} +5 -6
  47. package/funcs/threatHuntingGetTrackedScanThreatHunting.js.map +1 -0
  48. package/jsr.json +1 -1
  49. package/lib/config.d.ts +4 -4
  50. package/lib/config.js +4 -4
  51. package/lib/security.d.ts.map +1 -1
  52. package/lib/security.js.map +1 -1
  53. package/models/components/alternativequery.d.ts +69 -0
  54. package/models/components/alternativequery.d.ts.map +1 -0
  55. package/models/components/alternativequery.js +93 -0
  56. package/models/components/alternativequery.js.map +1 -0
  57. package/models/components/assetcertificatelistinputbody.d.ts +32 -0
  58. package/models/components/assetcertificatelistinputbody.d.ts.map +1 -0
  59. package/models/components/assetcertificatelistinputbody.js +78 -0
  60. package/models/components/assetcertificatelistinputbody.js.map +1 -0
  61. package/models/components/assethostlistinputbody.d.ts +32 -0
  62. package/models/components/assethostlistinputbody.d.ts.map +1 -0
  63. package/models/components/assethostlistinputbody.js +78 -0
  64. package/models/components/assethostlistinputbody.js.map +1 -0
  65. package/models/components/assetwebpropertylistinputbody.d.ts +32 -0
  66. package/models/components/assetwebpropertylistinputbody.d.ts.map +1 -0
  67. package/models/components/assetwebpropertylistinputbody.js +78 -0
  68. package/models/components/assetwebpropertylistinputbody.js.map +1 -0
  69. package/models/components/asteriskmanagerinterface.d.ts +29 -0
  70. package/models/components/asteriskmanagerinterface.d.ts.map +1 -0
  71. package/models/components/asteriskmanagerinterface.js +69 -0
  72. package/models/components/asteriskmanagerinterface.js.map +1 -0
  73. package/models/components/convertqueryerror.d.ts +32 -0
  74. package/models/components/convertqueryerror.d.ts.map +1 -0
  75. package/models/components/convertqueryerror.js +69 -0
  76. package/models/components/convertqueryerror.js.map +1 -0
  77. package/models/components/index.d.ts +12 -0
  78. package/models/components/index.d.ts.map +1 -1
  79. package/models/components/index.js +12 -0
  80. package/models/components/index.js.map +1 -1
  81. package/models/components/openvpnmgmt.d.ts +37 -0
  82. package/models/components/openvpnmgmt.d.ts.map +1 -0
  83. package/models/components/openvpnmgmt.js +92 -0
  84. package/models/components/openvpnmgmt.js.map +1 -0
  85. package/models/components/rawcertificateresponse.d.ts +31 -0
  86. package/models/components/rawcertificateresponse.d.ts.map +1 -0
  87. package/models/components/rawcertificateresponse.js +80 -0
  88. package/models/components/rawcertificateresponse.js.map +1 -0
  89. package/models/components/rdp.d.ts +2 -0
  90. package/models/components/rdp.d.ts.map +1 -1
  91. package/models/components/rdp.js +4 -0
  92. package/models/components/rdp.js.map +1 -1
  93. package/models/components/responseenvelopelistrawcertificateresponse.d.ts +30 -0
  94. package/models/components/responseenvelopelistrawcertificateresponse.d.ts.map +1 -0
  95. package/models/components/responseenvelopelistrawcertificateresponse.js +72 -0
  96. package/models/components/responseenvelopelistrawcertificateresponse.js.map +1 -0
  97. package/models/components/responseenvelopelistsearchconvertqueryresponse.d.ts +30 -0
  98. package/models/components/responseenvelopelistsearchconvertqueryresponse.d.ts.map +1 -0
  99. package/models/components/responseenvelopelistsearchconvertqueryresponse.js +72 -0
  100. package/models/components/responseenvelopelistsearchconvertqueryresponse.js.map +1 -0
  101. package/models/components/screenshot.d.ts +2 -0
  102. package/models/components/screenshot.d.ts.map +1 -1
  103. package/models/components/screenshot.js +2 -0
  104. package/models/components/screenshot.js.map +1 -1
  105. package/models/components/searchconvertqueryinputbody.d.ts +32 -0
  106. package/models/components/searchconvertqueryinputbody.d.ts.map +1 -0
  107. package/models/components/searchconvertqueryinputbody.js +69 -0
  108. package/models/components/searchconvertqueryinputbody.js.map +1 -0
  109. package/models/components/searchconvertqueryresponse.d.ts +91 -0
  110. package/models/components/searchconvertqueryresponse.d.ts.map +1 -0
  111. package/models/components/searchconvertqueryresponse.js +117 -0
  112. package/models/components/searchconvertqueryresponse.js.map +1 -0
  113. package/models/components/service.d.ts +6 -0
  114. package/models/components/service.d.ts.map +1 -1
  115. package/models/components/service.js +11 -0
  116. package/models/components/service.js.map +1 -1
  117. package/models/components/servicescan.d.ts +6 -0
  118. package/models/components/servicescan.d.ts.map +1 -1
  119. package/models/components/servicescan.js +10 -0
  120. package/models/components/servicescan.js.map +1 -1
  121. package/models/operations/index.d.ts +7 -4
  122. package/models/operations/index.d.ts.map +1 -1
  123. package/models/operations/index.js +7 -4
  124. package/models/operations/index.js.map +1 -1
  125. package/models/operations/v3globaldataassetcertificatelistpost.d.ts +91 -0
  126. package/models/operations/v3globaldataassetcertificatelistpost.d.ts.map +1 -0
  127. package/models/operations/v3globaldataassetcertificatelistpost.js +157 -0
  128. package/models/operations/v3globaldataassetcertificatelistpost.js.map +1 -0
  129. package/models/operations/v3globaldataassetcertificatelistrawpost.d.ts +91 -0
  130. package/models/operations/v3globaldataassetcertificatelistrawpost.d.ts.map +1 -0
  131. package/models/operations/v3globaldataassetcertificatelistrawpost.js +157 -0
  132. package/models/operations/v3globaldataassetcertificatelistrawpost.js.map +1 -0
  133. package/models/operations/v3globaldataassetcertificateraw.d.ts +93 -0
  134. package/models/operations/v3globaldataassetcertificateraw.d.ts.map +1 -0
  135. package/models/operations/v3globaldataassetcertificateraw.js +156 -0
  136. package/models/operations/v3globaldataassetcertificateraw.js.map +1 -0
  137. package/models/operations/v3globaldataassethostlistpost.d.ts +91 -0
  138. package/models/operations/v3globaldataassethostlistpost.d.ts.map +1 -0
  139. package/models/operations/v3globaldataassethostlistpost.js +157 -0
  140. package/models/operations/v3globaldataassethostlistpost.js.map +1 -0
  141. package/models/operations/v3globaldataassethosttimeline.d.ts +2 -2
  142. package/models/operations/v3globaldataassetwebpropertylistpost.d.ts +91 -0
  143. package/models/operations/v3globaldataassetwebpropertylistpost.d.ts.map +1 -0
  144. package/models/operations/v3globaldataassetwebpropertylistpost.js +157 -0
  145. package/models/operations/v3globaldataassetwebpropertylistpost.js.map +1 -0
  146. package/models/operations/v3globaldatasearchconvert.d.ts +91 -0
  147. package/models/operations/v3globaldatasearchconvert.d.ts.map +1 -0
  148. package/models/operations/v3globaldatasearchconvert.js +157 -0
  149. package/models/operations/v3globaldatasearchconvert.js.map +1 -0
  150. package/models/operations/v3threathuntinggethostobservationswithcertificate.d.ts +124 -0
  151. package/models/operations/v3threathuntinggethostobservationswithcertificate.d.ts.map +1 -0
  152. package/models/operations/v3threathuntinggethostobservationswithcertificate.js +183 -0
  153. package/models/operations/v3threathuntinggethostobservationswithcertificate.js.map +1 -0
  154. package/package.json +3 -3
  155. package/sdk/globaldata.d.ts +24 -19
  156. package/sdk/globaldata.d.ts.map +1 -1
  157. package/sdk/globaldata.js +29 -21
  158. package/sdk/globaldata.js.map +1 -1
  159. package/sdk/threathunting.d.ts +7 -9
  160. package/sdk/threathunting.d.ts.map +1 -1
  161. package/sdk/threathunting.js +11 -13
  162. package/sdk/threathunting.js.map +1 -1
  163. package/src/funcs/globalDataConvertLegacySearchQueries.ts +188 -0
  164. package/src/funcs/globalDataCreateTrackedScan.ts +2 -2
  165. package/src/funcs/{globalDataGetHostObservationsWithCertificate.ts → globalDataGetCertificateRaw.ts} +19 -26
  166. package/src/funcs/globalDataGetCertificates.ts +15 -14
  167. package/src/funcs/globalDataGetCertificatesRaw.ts +187 -0
  168. package/src/funcs/globalDataGetHostTimeline.ts +1 -1
  169. package/src/funcs/globalDataGetHosts.ts +24 -16
  170. package/src/funcs/globalDataGetTrackedScan.ts +2 -3
  171. package/src/funcs/globalDataGetWebProperties.ts +15 -14
  172. package/src/funcs/threatHuntingCreateTrackedScan.ts +2 -2
  173. package/src/funcs/threatHuntingGetHostObservationsWithCertificate.ts +201 -0
  174. package/src/funcs/{globalDataGetTrackedScanThreatHunting.ts → threatHuntingGetTrackedScanThreatHunting.ts} +3 -4
  175. package/src/lib/config.ts +4 -4
  176. package/src/lib/security.ts +4 -1
  177. package/src/models/components/alternativequery.ts +104 -0
  178. package/src/models/components/assetcertificatelistinputbody.ts +80 -0
  179. package/src/models/components/assethostlistinputbody.ts +78 -0
  180. package/src/models/components/assetwebpropertylistinputbody.ts +80 -0
  181. package/src/models/components/asteriskmanagerinterface.ts +66 -0
  182. package/src/models/components/convertqueryerror.ts +69 -0
  183. package/src/models/components/index.ts +12 -0
  184. package/src/models/components/openvpnmgmt.ts +93 -0
  185. package/src/models/components/rawcertificateresponse.ts +79 -0
  186. package/src/models/components/rdp.ts +6 -0
  187. package/src/models/components/responseenvelopelistrawcertificateresponse.ts +84 -0
  188. package/src/models/components/responseenvelopelistsearchconvertqueryresponse.ts +88 -0
  189. package/src/models/components/screenshot.ts +4 -0
  190. package/src/models/components/searchconvertqueryinputbody.ts +71 -0
  191. package/src/models/components/searchconvertqueryresponse.ts +166 -0
  192. package/src/models/components/service.ts +25 -0
  193. package/src/models/components/servicescan.ts +24 -0
  194. package/src/models/operations/index.ts +7 -4
  195. package/src/models/operations/v3globaldataassetcertificatelistpost.ts +265 -0
  196. package/src/models/operations/v3globaldataassetcertificatelistrawpost.ts +269 -0
  197. package/src/models/operations/v3globaldataassetcertificateraw.ts +248 -0
  198. package/src/models/operations/v3globaldataassethostlistpost.ts +238 -0
  199. package/src/models/operations/v3globaldataassethosttimeline.ts +2 -2
  200. package/src/models/operations/v3globaldataassetwebpropertylistpost.ts +265 -0
  201. package/src/models/operations/v3globaldatasearchconvert.ts +234 -0
  202. package/src/models/operations/v3threathuntinggethostobservationswithcertificate.ts +315 -0
  203. package/src/sdk/globaldata.ts +49 -35
  204. package/src/sdk/threathunting.ts +16 -15
  205. package/tests/sdk.test.ts +2 -2
  206. package/funcs/globalDataGetHostObservationsWithCertificate.d.ts +0 -18
  207. package/funcs/globalDataGetHostObservationsWithCertificate.d.ts.map +0 -1
  208. package/funcs/globalDataGetHostObservationsWithCertificate.js.map +0 -1
  209. package/funcs/globalDataGetTrackedScanThreatHunting.d.ts.map +0 -1
  210. package/funcs/globalDataGetTrackedScanThreatHunting.js.map +0 -1
  211. package/models/operations/v3globaldataassetcertificatelist.d.ts +0 -94
  212. package/models/operations/v3globaldataassetcertificatelist.d.ts.map +0 -1
  213. package/models/operations/v3globaldataassetcertificatelist.js +0 -157
  214. package/models/operations/v3globaldataassetcertificatelist.js.map +0 -1
  215. package/models/operations/v3globaldataassethostlist.d.ts +0 -94
  216. package/models/operations/v3globaldataassethostlist.d.ts.map +0 -1
  217. package/models/operations/v3globaldataassethostlist.js +0 -157
  218. package/models/operations/v3globaldataassethostlist.js.map +0 -1
  219. package/models/operations/v3globaldataassetwebpropertylist.d.ts +0 -94
  220. package/models/operations/v3globaldataassetwebpropertylist.d.ts.map +0 -1
  221. package/models/operations/v3globaldataassetwebpropertylist.js +0 -157
  222. package/models/operations/v3globaldataassetwebpropertylist.js.map +0 -1
  223. package/models/operations/v3globaldatagethostobservationswithcertificate.d.ts +0 -124
  224. package/models/operations/v3globaldatagethostobservationswithcertificate.d.ts.map +0 -1
  225. package/models/operations/v3globaldatagethostobservationswithcertificate.js +0 -178
  226. package/models/operations/v3globaldatagethostobservationswithcertificate.js.map +0 -1
  227. package/src/models/operations/v3globaldataassetcertificatelist.ts +0 -259
  228. package/src/models/operations/v3globaldataassethostlist.ts +0 -233
  229. package/src/models/operations/v3globaldataassetwebpropertylist.ts +0 -259
  230. 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
+ }