@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,238 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import * as components from "../components/index.js";
10
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
+
12
+ export type V3GlobaldataAssetHostListPostGlobals = {
13
+ organizationId?: string | undefined;
14
+ };
15
+
16
+ export type V3GlobaldataAssetHostListPostRequest = {
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
+ assetHostListInputBody: components.AssetHostListInputBody;
22
+ };
23
+
24
+ export type V3GlobaldataAssetHostListPostResponse = {
25
+ headers: { [k: string]: Array<string> };
26
+ result: components.ResponseEnvelopeListHostAsset;
27
+ };
28
+
29
+ /** @internal */
30
+ export const V3GlobaldataAssetHostListPostGlobals$inboundSchema: z.ZodType<
31
+ V3GlobaldataAssetHostListPostGlobals,
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 V3GlobaldataAssetHostListPostGlobals$Outbound = {
44
+ organization_id?: string | undefined;
45
+ };
46
+
47
+ /** @internal */
48
+ export const V3GlobaldataAssetHostListPostGlobals$outboundSchema: z.ZodType<
49
+ V3GlobaldataAssetHostListPostGlobals$Outbound,
50
+ z.ZodTypeDef,
51
+ V3GlobaldataAssetHostListPostGlobals
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 V3GlobaldataAssetHostListPostGlobals$ {
65
+ /** @deprecated use `V3GlobaldataAssetHostListPostGlobals$inboundSchema` instead. */
66
+ export const inboundSchema =
67
+ V3GlobaldataAssetHostListPostGlobals$inboundSchema;
68
+ /** @deprecated use `V3GlobaldataAssetHostListPostGlobals$outboundSchema` instead. */
69
+ export const outboundSchema =
70
+ V3GlobaldataAssetHostListPostGlobals$outboundSchema;
71
+ /** @deprecated use `V3GlobaldataAssetHostListPostGlobals$Outbound` instead. */
72
+ export type Outbound = V3GlobaldataAssetHostListPostGlobals$Outbound;
73
+ }
74
+
75
+ export function v3GlobaldataAssetHostListPostGlobalsToJSON(
76
+ v3GlobaldataAssetHostListPostGlobals: V3GlobaldataAssetHostListPostGlobals,
77
+ ): string {
78
+ return JSON.stringify(
79
+ V3GlobaldataAssetHostListPostGlobals$outboundSchema.parse(
80
+ v3GlobaldataAssetHostListPostGlobals,
81
+ ),
82
+ );
83
+ }
84
+
85
+ export function v3GlobaldataAssetHostListPostGlobalsFromJSON(
86
+ jsonString: string,
87
+ ): SafeParseResult<V3GlobaldataAssetHostListPostGlobals, SDKValidationError> {
88
+ return safeParse(
89
+ jsonString,
90
+ (x) =>
91
+ V3GlobaldataAssetHostListPostGlobals$inboundSchema.parse(JSON.parse(x)),
92
+ `Failed to parse 'V3GlobaldataAssetHostListPostGlobals' from JSON`,
93
+ );
94
+ }
95
+
96
+ /** @internal */
97
+ export const V3GlobaldataAssetHostListPostRequest$inboundSchema: z.ZodType<
98
+ V3GlobaldataAssetHostListPostRequest,
99
+ z.ZodTypeDef,
100
+ unknown
101
+ > = z.object({
102
+ organization_id: z.string().optional(),
103
+ AssetHostListInputBody: components.AssetHostListInputBody$inboundSchema,
104
+ }).transform((v) => {
105
+ return remap$(v, {
106
+ "organization_id": "organizationId",
107
+ "AssetHostListInputBody": "assetHostListInputBody",
108
+ });
109
+ });
110
+
111
+ /** @internal */
112
+ export type V3GlobaldataAssetHostListPostRequest$Outbound = {
113
+ organization_id?: string | undefined;
114
+ AssetHostListInputBody: components.AssetHostListInputBody$Outbound;
115
+ };
116
+
117
+ /** @internal */
118
+ export const V3GlobaldataAssetHostListPostRequest$outboundSchema: z.ZodType<
119
+ V3GlobaldataAssetHostListPostRequest$Outbound,
120
+ z.ZodTypeDef,
121
+ V3GlobaldataAssetHostListPostRequest
122
+ > = z.object({
123
+ organizationId: z.string().optional(),
124
+ assetHostListInputBody: components.AssetHostListInputBody$outboundSchema,
125
+ }).transform((v) => {
126
+ return remap$(v, {
127
+ organizationId: "organization_id",
128
+ assetHostListInputBody: "AssetHostListInputBody",
129
+ });
130
+ });
131
+
132
+ /**
133
+ * @internal
134
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
135
+ */
136
+ export namespace V3GlobaldataAssetHostListPostRequest$ {
137
+ /** @deprecated use `V3GlobaldataAssetHostListPostRequest$inboundSchema` instead. */
138
+ export const inboundSchema =
139
+ V3GlobaldataAssetHostListPostRequest$inboundSchema;
140
+ /** @deprecated use `V3GlobaldataAssetHostListPostRequest$outboundSchema` instead. */
141
+ export const outboundSchema =
142
+ V3GlobaldataAssetHostListPostRequest$outboundSchema;
143
+ /** @deprecated use `V3GlobaldataAssetHostListPostRequest$Outbound` instead. */
144
+ export type Outbound = V3GlobaldataAssetHostListPostRequest$Outbound;
145
+ }
146
+
147
+ export function v3GlobaldataAssetHostListPostRequestToJSON(
148
+ v3GlobaldataAssetHostListPostRequest: V3GlobaldataAssetHostListPostRequest,
149
+ ): string {
150
+ return JSON.stringify(
151
+ V3GlobaldataAssetHostListPostRequest$outboundSchema.parse(
152
+ v3GlobaldataAssetHostListPostRequest,
153
+ ),
154
+ );
155
+ }
156
+
157
+ export function v3GlobaldataAssetHostListPostRequestFromJSON(
158
+ jsonString: string,
159
+ ): SafeParseResult<V3GlobaldataAssetHostListPostRequest, SDKValidationError> {
160
+ return safeParse(
161
+ jsonString,
162
+ (x) =>
163
+ V3GlobaldataAssetHostListPostRequest$inboundSchema.parse(JSON.parse(x)),
164
+ `Failed to parse 'V3GlobaldataAssetHostListPostRequest' from JSON`,
165
+ );
166
+ }
167
+
168
+ /** @internal */
169
+ export const V3GlobaldataAssetHostListPostResponse$inboundSchema: z.ZodType<
170
+ V3GlobaldataAssetHostListPostResponse,
171
+ z.ZodTypeDef,
172
+ unknown
173
+ > = z.object({
174
+ Headers: z.record(z.array(z.string())),
175
+ Result: components.ResponseEnvelopeListHostAsset$inboundSchema,
176
+ }).transform((v) => {
177
+ return remap$(v, {
178
+ "Headers": "headers",
179
+ "Result": "result",
180
+ });
181
+ });
182
+
183
+ /** @internal */
184
+ export type V3GlobaldataAssetHostListPostResponse$Outbound = {
185
+ Headers: { [k: string]: Array<string> };
186
+ Result: components.ResponseEnvelopeListHostAsset$Outbound;
187
+ };
188
+
189
+ /** @internal */
190
+ export const V3GlobaldataAssetHostListPostResponse$outboundSchema: z.ZodType<
191
+ V3GlobaldataAssetHostListPostResponse$Outbound,
192
+ z.ZodTypeDef,
193
+ V3GlobaldataAssetHostListPostResponse
194
+ > = z.object({
195
+ headers: z.record(z.array(z.string())),
196
+ result: components.ResponseEnvelopeListHostAsset$outboundSchema,
197
+ }).transform((v) => {
198
+ return remap$(v, {
199
+ headers: "Headers",
200
+ result: "Result",
201
+ });
202
+ });
203
+
204
+ /**
205
+ * @internal
206
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
207
+ */
208
+ export namespace V3GlobaldataAssetHostListPostResponse$ {
209
+ /** @deprecated use `V3GlobaldataAssetHostListPostResponse$inboundSchema` instead. */
210
+ export const inboundSchema =
211
+ V3GlobaldataAssetHostListPostResponse$inboundSchema;
212
+ /** @deprecated use `V3GlobaldataAssetHostListPostResponse$outboundSchema` instead. */
213
+ export const outboundSchema =
214
+ V3GlobaldataAssetHostListPostResponse$outboundSchema;
215
+ /** @deprecated use `V3GlobaldataAssetHostListPostResponse$Outbound` instead. */
216
+ export type Outbound = V3GlobaldataAssetHostListPostResponse$Outbound;
217
+ }
218
+
219
+ export function v3GlobaldataAssetHostListPostResponseToJSON(
220
+ v3GlobaldataAssetHostListPostResponse: V3GlobaldataAssetHostListPostResponse,
221
+ ): string {
222
+ return JSON.stringify(
223
+ V3GlobaldataAssetHostListPostResponse$outboundSchema.parse(
224
+ v3GlobaldataAssetHostListPostResponse,
225
+ ),
226
+ );
227
+ }
228
+
229
+ export function v3GlobaldataAssetHostListPostResponseFromJSON(
230
+ jsonString: string,
231
+ ): SafeParseResult<V3GlobaldataAssetHostListPostResponse, SDKValidationError> {
232
+ return safeParse(
233
+ jsonString,
234
+ (x) =>
235
+ V3GlobaldataAssetHostListPostResponse$inboundSchema.parse(JSON.parse(x)),
236
+ `Failed to parse 'V3GlobaldataAssetHostListPostResponse' from JSON`,
237
+ );
238
+ }
@@ -23,11 +23,11 @@ export type V3GlobaldataAssetHostTimelineRequest = {
23
23
  */
24
24
  hostId: string;
25
25
  /**
26
- * Start time of the host timeline. Must be a valid RFC3339 string. Ensure that you suffix the date with T00:00:00Z or a specific time.
26
+ * Start time of the host timeline. Equivalent to the To field in the event history UI. This must be the timestamp closest to the current time. For example, if you want events from January 1, 2025 to the start of January 2, 2025, input the January 2 timestamp here. Must be a valid RFC3339 string. Ensure that you suffix the date with T00:00:00Z or a specific time.
27
27
  */
28
28
  startTime: Date;
29
29
  /**
30
- * End time of the host timeline. Must be a valid RFC3339 string. Ensure that you suffix the date with T00:00:00Z or a specific time.
30
+ * End time of the host timeline. Equivalent to the From field in the event history UI. This must be the timestamp furthest from the current time. For example, if you want events from January 1, 2025 to the start of January 2, 2025, input the January 1 timestamp here. Must be a valid RFC3339 string. Ensure that you suffix the date with T00:00:00Z or a specific time.
31
31
  */
32
32
  endTime: Date;
33
33
  };
@@ -0,0 +1,265 @@
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 V3GlobaldataAssetWebpropertyListPostGlobals = {
13
+ organizationId?: string | undefined;
14
+ };
15
+
16
+ export type V3GlobaldataAssetWebpropertyListPostRequest = {
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
+ assetWebpropertyListInputBody: components.AssetWebpropertyListInputBody;
22
+ };
23
+
24
+ export type V3GlobaldataAssetWebpropertyListPostResponse = {
25
+ headers: { [k: string]: Array<string> };
26
+ result: components.ResponseEnvelopeListWebpropertyAsset;
27
+ };
28
+
29
+ /** @internal */
30
+ export const V3GlobaldataAssetWebpropertyListPostGlobals$inboundSchema:
31
+ z.ZodType<
32
+ V3GlobaldataAssetWebpropertyListPostGlobals,
33
+ z.ZodTypeDef,
34
+ unknown
35
+ > = z.object({
36
+ organization_id: z.string().optional(),
37
+ }).transform((v) => {
38
+ return remap$(v, {
39
+ "organization_id": "organizationId",
40
+ });
41
+ });
42
+
43
+ /** @internal */
44
+ export type V3GlobaldataAssetWebpropertyListPostGlobals$Outbound = {
45
+ organization_id?: string | undefined;
46
+ };
47
+
48
+ /** @internal */
49
+ export const V3GlobaldataAssetWebpropertyListPostGlobals$outboundSchema:
50
+ z.ZodType<
51
+ V3GlobaldataAssetWebpropertyListPostGlobals$Outbound,
52
+ z.ZodTypeDef,
53
+ V3GlobaldataAssetWebpropertyListPostGlobals
54
+ > = z.object({
55
+ organizationId: z.string().optional(),
56
+ }).transform((v) => {
57
+ return remap$(v, {
58
+ organizationId: "organization_id",
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 V3GlobaldataAssetWebpropertyListPostGlobals$ {
67
+ /** @deprecated use `V3GlobaldataAssetWebpropertyListPostGlobals$inboundSchema` instead. */
68
+ export const inboundSchema =
69
+ V3GlobaldataAssetWebpropertyListPostGlobals$inboundSchema;
70
+ /** @deprecated use `V3GlobaldataAssetWebpropertyListPostGlobals$outboundSchema` instead. */
71
+ export const outboundSchema =
72
+ V3GlobaldataAssetWebpropertyListPostGlobals$outboundSchema;
73
+ /** @deprecated use `V3GlobaldataAssetWebpropertyListPostGlobals$Outbound` instead. */
74
+ export type Outbound = V3GlobaldataAssetWebpropertyListPostGlobals$Outbound;
75
+ }
76
+
77
+ export function v3GlobaldataAssetWebpropertyListPostGlobalsToJSON(
78
+ v3GlobaldataAssetWebpropertyListPostGlobals:
79
+ V3GlobaldataAssetWebpropertyListPostGlobals,
80
+ ): string {
81
+ return JSON.stringify(
82
+ V3GlobaldataAssetWebpropertyListPostGlobals$outboundSchema.parse(
83
+ v3GlobaldataAssetWebpropertyListPostGlobals,
84
+ ),
85
+ );
86
+ }
87
+
88
+ export function v3GlobaldataAssetWebpropertyListPostGlobalsFromJSON(
89
+ jsonString: string,
90
+ ): SafeParseResult<
91
+ V3GlobaldataAssetWebpropertyListPostGlobals,
92
+ SDKValidationError
93
+ > {
94
+ return safeParse(
95
+ jsonString,
96
+ (x) =>
97
+ V3GlobaldataAssetWebpropertyListPostGlobals$inboundSchema.parse(
98
+ JSON.parse(x),
99
+ ),
100
+ `Failed to parse 'V3GlobaldataAssetWebpropertyListPostGlobals' from JSON`,
101
+ );
102
+ }
103
+
104
+ /** @internal */
105
+ export const V3GlobaldataAssetWebpropertyListPostRequest$inboundSchema:
106
+ z.ZodType<
107
+ V3GlobaldataAssetWebpropertyListPostRequest,
108
+ z.ZodTypeDef,
109
+ unknown
110
+ > = z.object({
111
+ organization_id: z.string().optional(),
112
+ AssetWebpropertyListInputBody:
113
+ components.AssetWebpropertyListInputBody$inboundSchema,
114
+ }).transform((v) => {
115
+ return remap$(v, {
116
+ "organization_id": "organizationId",
117
+ "AssetWebpropertyListInputBody": "assetWebpropertyListInputBody",
118
+ });
119
+ });
120
+
121
+ /** @internal */
122
+ export type V3GlobaldataAssetWebpropertyListPostRequest$Outbound = {
123
+ organization_id?: string | undefined;
124
+ AssetWebpropertyListInputBody:
125
+ components.AssetWebpropertyListInputBody$Outbound;
126
+ };
127
+
128
+ /** @internal */
129
+ export const V3GlobaldataAssetWebpropertyListPostRequest$outboundSchema:
130
+ z.ZodType<
131
+ V3GlobaldataAssetWebpropertyListPostRequest$Outbound,
132
+ z.ZodTypeDef,
133
+ V3GlobaldataAssetWebpropertyListPostRequest
134
+ > = z.object({
135
+ organizationId: z.string().optional(),
136
+ assetWebpropertyListInputBody:
137
+ components.AssetWebpropertyListInputBody$outboundSchema,
138
+ }).transform((v) => {
139
+ return remap$(v, {
140
+ organizationId: "organization_id",
141
+ assetWebpropertyListInputBody: "AssetWebpropertyListInputBody",
142
+ });
143
+ });
144
+
145
+ /**
146
+ * @internal
147
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
148
+ */
149
+ export namespace V3GlobaldataAssetWebpropertyListPostRequest$ {
150
+ /** @deprecated use `V3GlobaldataAssetWebpropertyListPostRequest$inboundSchema` instead. */
151
+ export const inboundSchema =
152
+ V3GlobaldataAssetWebpropertyListPostRequest$inboundSchema;
153
+ /** @deprecated use `V3GlobaldataAssetWebpropertyListPostRequest$outboundSchema` instead. */
154
+ export const outboundSchema =
155
+ V3GlobaldataAssetWebpropertyListPostRequest$outboundSchema;
156
+ /** @deprecated use `V3GlobaldataAssetWebpropertyListPostRequest$Outbound` instead. */
157
+ export type Outbound = V3GlobaldataAssetWebpropertyListPostRequest$Outbound;
158
+ }
159
+
160
+ export function v3GlobaldataAssetWebpropertyListPostRequestToJSON(
161
+ v3GlobaldataAssetWebpropertyListPostRequest:
162
+ V3GlobaldataAssetWebpropertyListPostRequest,
163
+ ): string {
164
+ return JSON.stringify(
165
+ V3GlobaldataAssetWebpropertyListPostRequest$outboundSchema.parse(
166
+ v3GlobaldataAssetWebpropertyListPostRequest,
167
+ ),
168
+ );
169
+ }
170
+
171
+ export function v3GlobaldataAssetWebpropertyListPostRequestFromJSON(
172
+ jsonString: string,
173
+ ): SafeParseResult<
174
+ V3GlobaldataAssetWebpropertyListPostRequest,
175
+ SDKValidationError
176
+ > {
177
+ return safeParse(
178
+ jsonString,
179
+ (x) =>
180
+ V3GlobaldataAssetWebpropertyListPostRequest$inboundSchema.parse(
181
+ JSON.parse(x),
182
+ ),
183
+ `Failed to parse 'V3GlobaldataAssetWebpropertyListPostRequest' from JSON`,
184
+ );
185
+ }
186
+
187
+ /** @internal */
188
+ export const V3GlobaldataAssetWebpropertyListPostResponse$inboundSchema:
189
+ z.ZodType<
190
+ V3GlobaldataAssetWebpropertyListPostResponse,
191
+ z.ZodTypeDef,
192
+ unknown
193
+ > = z.object({
194
+ Headers: z.record(z.array(z.string())),
195
+ Result: components.ResponseEnvelopeListWebpropertyAsset$inboundSchema,
196
+ }).transform((v) => {
197
+ return remap$(v, {
198
+ "Headers": "headers",
199
+ "Result": "result",
200
+ });
201
+ });
202
+
203
+ /** @internal */
204
+ export type V3GlobaldataAssetWebpropertyListPostResponse$Outbound = {
205
+ Headers: { [k: string]: Array<string> };
206
+ Result: components.ResponseEnvelopeListWebpropertyAsset$Outbound;
207
+ };
208
+
209
+ /** @internal */
210
+ export const V3GlobaldataAssetWebpropertyListPostResponse$outboundSchema:
211
+ z.ZodType<
212
+ V3GlobaldataAssetWebpropertyListPostResponse$Outbound,
213
+ z.ZodTypeDef,
214
+ V3GlobaldataAssetWebpropertyListPostResponse
215
+ > = z.object({
216
+ headers: z.record(z.array(z.string())),
217
+ result: components.ResponseEnvelopeListWebpropertyAsset$outboundSchema,
218
+ }).transform((v) => {
219
+ return remap$(v, {
220
+ headers: "Headers",
221
+ result: "Result",
222
+ });
223
+ });
224
+
225
+ /**
226
+ * @internal
227
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
228
+ */
229
+ export namespace V3GlobaldataAssetWebpropertyListPostResponse$ {
230
+ /** @deprecated use `V3GlobaldataAssetWebpropertyListPostResponse$inboundSchema` instead. */
231
+ export const inboundSchema =
232
+ V3GlobaldataAssetWebpropertyListPostResponse$inboundSchema;
233
+ /** @deprecated use `V3GlobaldataAssetWebpropertyListPostResponse$outboundSchema` instead. */
234
+ export const outboundSchema =
235
+ V3GlobaldataAssetWebpropertyListPostResponse$outboundSchema;
236
+ /** @deprecated use `V3GlobaldataAssetWebpropertyListPostResponse$Outbound` instead. */
237
+ export type Outbound = V3GlobaldataAssetWebpropertyListPostResponse$Outbound;
238
+ }
239
+
240
+ export function v3GlobaldataAssetWebpropertyListPostResponseToJSON(
241
+ v3GlobaldataAssetWebpropertyListPostResponse:
242
+ V3GlobaldataAssetWebpropertyListPostResponse,
243
+ ): string {
244
+ return JSON.stringify(
245
+ V3GlobaldataAssetWebpropertyListPostResponse$outboundSchema.parse(
246
+ v3GlobaldataAssetWebpropertyListPostResponse,
247
+ ),
248
+ );
249
+ }
250
+
251
+ export function v3GlobaldataAssetWebpropertyListPostResponseFromJSON(
252
+ jsonString: string,
253
+ ): SafeParseResult<
254
+ V3GlobaldataAssetWebpropertyListPostResponse,
255
+ SDKValidationError
256
+ > {
257
+ return safeParse(
258
+ jsonString,
259
+ (x) =>
260
+ V3GlobaldataAssetWebpropertyListPostResponse$inboundSchema.parse(
261
+ JSON.parse(x),
262
+ ),
263
+ `Failed to parse 'V3GlobaldataAssetWebpropertyListPostResponse' from JSON`,
264
+ );
265
+ }