@censys/platform-sdk 0.10.0 → 0.10.2

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 (385) hide show
  1. package/README.md +8 -0
  2. package/docs/sdks/collections/README.md +8 -0
  3. package/docs/sdks/globaldata/README.md +91 -0
  4. package/docs/sdks/threathunting/README.md +250 -1
  5. package/funcs/accountManagementGetMemberCreditUsage.js.map +1 -1
  6. package/funcs/accountManagementGetOrganizationCreditUsage.js.map +1 -1
  7. package/funcs/accountManagementGetOrganizationCredits.js.map +1 -1
  8. package/funcs/accountManagementGetOrganizationDetails.js.map +1 -1
  9. package/funcs/accountManagementInviteUserToOrganization.js.map +1 -1
  10. package/funcs/accountManagementListOrganizationMembers.js.map +1 -1
  11. package/funcs/accountManagementRemoveOrganizationMember.js.map +1 -1
  12. package/funcs/accountManagementUpdateOrganizationMember.js.map +1 -1
  13. package/funcs/collectionsAggregate.js.map +1 -1
  14. package/funcs/collectionsDelete.js.map +1 -1
  15. package/funcs/collectionsGet.js.map +1 -1
  16. package/funcs/collectionsList.js +1 -0
  17. package/funcs/collectionsList.js.map +1 -1
  18. package/funcs/collectionsListEvents.js.map +1 -1
  19. package/funcs/collectionsSearch.js.map +1 -1
  20. package/funcs/collectionsUpdate.js.map +1 -1
  21. package/funcs/globalDataGetCertificate.js.map +1 -1
  22. package/funcs/globalDataGetCertificateRaw.js.map +1 -1
  23. package/funcs/globalDataGetHost.js.map +1 -1
  24. package/funcs/globalDataGetHostTimeline.js.map +1 -1
  25. package/funcs/globalDataGetTrackedScan.js.map +1 -1
  26. package/funcs/globalDataGetWebProperty.js.map +1 -1
  27. package/funcs/globalDataListServicesOnHost.d.ts +18 -0
  28. package/funcs/globalDataListServicesOnHost.d.ts.map +1 -0
  29. package/funcs/globalDataListServicesOnHost.js +145 -0
  30. package/funcs/globalDataListServicesOnHost.js.map +1 -0
  31. package/funcs/threatHuntingCreateCenseyeJob.d.ts +18 -0
  32. package/funcs/threatHuntingCreateCenseyeJob.d.ts.map +1 -0
  33. package/funcs/threatHuntingCreateCenseyeJob.js +131 -0
  34. package/funcs/threatHuntingCreateCenseyeJob.js.map +1 -0
  35. package/funcs/threatHuntingGetCenseyeJob.d.ts +18 -0
  36. package/funcs/threatHuntingGetCenseyeJob.d.ts.map +1 -0
  37. package/funcs/threatHuntingGetCenseyeJob.js +134 -0
  38. package/funcs/threatHuntingGetCenseyeJob.js.map +1 -0
  39. package/funcs/threatHuntingGetCenseyeJobResults.d.ts +18 -0
  40. package/funcs/threatHuntingGetCenseyeJobResults.d.ts.map +1 -0
  41. package/funcs/threatHuntingGetCenseyeJobResults.js +136 -0
  42. package/funcs/threatHuntingGetCenseyeJobResults.js.map +1 -0
  43. package/funcs/threatHuntingGetHostObservationsWithCertificate.js.map +1 -1
  44. package/funcs/threatHuntingGetTrackedScanThreatHunting.js.map +1 -1
  45. package/funcs/threatHuntingValueCounts.d.ts +1 -1
  46. package/funcs/threatHuntingValueCounts.js +1 -1
  47. package/jsr.json +1 -1
  48. package/lib/config.d.ts +4 -4
  49. package/lib/config.js +4 -4
  50. package/lib/config.js.map +1 -1
  51. package/lib/encodings.d.ts.map +1 -1
  52. package/lib/encodings.js +20 -5
  53. package/lib/encodings.js.map +1 -1
  54. package/lib/files.d.ts +13 -0
  55. package/lib/files.d.ts.map +1 -1
  56. package/lib/files.js +19 -0
  57. package/lib/files.js.map +1 -1
  58. package/lib/matchers.d.ts.map +1 -1
  59. package/lib/matchers.js +0 -1
  60. package/lib/matchers.js.map +1 -1
  61. package/lib/sdks.d.ts.map +1 -1
  62. package/lib/sdks.js +8 -4
  63. package/lib/sdks.js.map +1 -1
  64. package/lib/security.d.ts.map +1 -1
  65. package/lib/security.js +1 -2
  66. package/lib/security.js.map +1 -1
  67. package/lib/url.d.ts.map +1 -1
  68. package/lib/url.js +4 -2
  69. package/lib/url.js.map +1 -1
  70. package/models/components/anermacfforth.d.ts +14 -0
  71. package/models/components/anermacfforth.d.ts.map +1 -0
  72. package/models/components/anermacfforth.js +60 -0
  73. package/models/components/anermacfforth.js.map +1 -0
  74. package/models/components/censeyejob.d.ts +59 -0
  75. package/models/components/censeyejob.d.ts.map +1 -0
  76. package/models/components/censeyejob.js +85 -0
  77. package/models/components/censeyejob.js.map +1 -0
  78. package/models/components/censeyeresult.d.ts +18 -0
  79. package/models/components/censeyeresult.d.ts.map +1 -0
  80. package/models/components/censeyeresult.js +57 -0
  81. package/models/components/censeyeresult.js.map +1 -0
  82. package/models/components/censeyeresultsresponse.d.ts +18 -0
  83. package/models/components/censeyeresultsresponse.d.ts.map +1 -0
  84. package/models/components/censeyeresultsresponse.js +57 -0
  85. package/models/components/censeyeresultsresponse.js.map +1 -0
  86. package/models/components/censeyetarget.d.ts +30 -0
  87. package/models/components/censeyetarget.d.ts.map +1 -0
  88. package/models/components/censeyetarget.js +75 -0
  89. package/models/components/censeyetarget.js.map +1 -0
  90. package/models/components/countcondition.d.ts +1 -1
  91. package/models/components/createcenseyejobinputbody.d.ts +13 -0
  92. package/models/components/createcenseyejobinputbody.d.ts.map +1 -0
  93. package/models/components/createcenseyejobinputbody.js +50 -0
  94. package/models/components/createcenseyejobinputbody.js.map +1 -0
  95. package/models/components/cursorontarget.d.ts +11 -0
  96. package/models/components/cursorontarget.d.ts.map +1 -0
  97. package/models/components/cursorontarget.js +51 -0
  98. package/models/components/cursorontarget.js.map +1 -0
  99. package/models/components/cursorontargetevent.d.ts +25 -0
  100. package/models/components/cursorontargetevent.d.ts.map +1 -0
  101. package/models/components/cursorontargetevent.js +70 -0
  102. package/models/components/cursorontargetevent.js.map +1 -0
  103. package/models/components/cursorontargetpoint.d.ts +14 -0
  104. package/models/components/cursorontargetpoint.d.ts.map +1 -0
  105. package/models/components/cursorontargetpoint.js +54 -0
  106. package/models/components/cursorontargetpoint.js.map +1 -0
  107. package/models/components/cursorontargetstatus.d.ts +10 -0
  108. package/models/components/cursorontargetstatus.d.ts.map +1 -0
  109. package/models/components/cursorontargetstatus.js +50 -0
  110. package/models/components/cursorontargetstatus.js.map +1 -0
  111. package/models/components/cursorontargettakv.d.ts +13 -0
  112. package/models/components/cursorontargettakv.d.ts.map +1 -0
  113. package/models/components/cursorontargettakv.js +53 -0
  114. package/models/components/cursorontargettakv.js.map +1 -0
  115. package/models/components/fieldvaluepair.d.ts +5 -0
  116. package/models/components/fieldvaluepair.d.ts.map +1 -1
  117. package/models/components/fieldvaluepair.js +11 -1
  118. package/models/components/fieldvaluepair.js.map +1 -1
  119. package/models/components/frps.d.ts +12 -0
  120. package/models/components/frps.d.ts.map +1 -0
  121. package/models/components/frps.js +58 -0
  122. package/models/components/frps.js.map +1 -0
  123. package/models/components/host.d.ts +12 -0
  124. package/models/components/host.d.ts.map +1 -1
  125. package/models/components/host.js +7 -0
  126. package/models/components/host.js.map +1 -1
  127. package/models/components/icap.d.ts +11 -0
  128. package/models/components/icap.d.ts.map +1 -0
  129. package/models/components/icap.js +57 -0
  130. package/models/components/icap.js.map +1 -0
  131. package/models/components/icapoptionsresponse.d.ts +21 -0
  132. package/models/components/icapoptionsresponse.d.ts.map +1 -0
  133. package/models/components/icapoptionsresponse.js +73 -0
  134. package/models/components/icapoptionsresponse.js.map +1 -0
  135. package/models/components/index.d.ts +40 -0
  136. package/models/components/index.d.ts.map +1 -1
  137. package/models/components/index.js +40 -0
  138. package/models/components/index.js.map +1 -1
  139. package/models/components/networkclassification.d.ts +27 -0
  140. package/models/components/networkclassification.d.ts.map +1 -0
  141. package/models/components/networkclassification.js +60 -0
  142. package/models/components/networkclassification.js.map +1 -0
  143. package/models/components/networkmobileinfo.d.ts +21 -0
  144. package/models/components/networkmobileinfo.d.ts.map +1 -0
  145. package/models/components/networkmobileinfo.js +57 -0
  146. package/models/components/networkmobileinfo.js.map +1 -0
  147. package/models/components/privacy.d.ts +39 -0
  148. package/models/components/privacy.d.ts.map +1 -0
  149. package/models/components/privacy.js +64 -0
  150. package/models/components/privacy.js.map +1 -0
  151. package/models/components/privacytorinfo.d.ts +11 -0
  152. package/models/components/privacytorinfo.d.ts.map +1 -0
  153. package/models/components/privacytorinfo.js +51 -0
  154. package/models/components/privacytorinfo.js.map +1 -0
  155. package/models/components/privacytorinforelay.d.ts +140 -0
  156. package/models/components/privacytorinforelay.d.ts.map +1 -0
  157. package/models/components/privacytorinforelay.js +114 -0
  158. package/models/components/privacytorinforelay.js.map +1 -0
  159. package/models/components/privacytorinforelayexitpolicysummary.d.ts +17 -0
  160. package/models/components/privacytorinforelayexitpolicysummary.d.ts.map +1 -0
  161. package/models/components/privacytorinforelayexitpolicysummary.js +51 -0
  162. package/models/components/privacytorinforelayexitpolicysummary.js.map +1 -0
  163. package/models/components/reputation.d.ts +26 -0
  164. package/models/components/reputation.d.ts.map +1 -0
  165. package/models/components/reputation.js +71 -0
  166. package/models/components/reputation.js.map +1 -0
  167. package/models/components/reputationevidence.d.ts +17 -0
  168. package/models/components/reputationevidence.d.ts.map +1 -0
  169. package/models/components/reputationevidence.js +65 -0
  170. package/models/components/reputationevidence.js.map +1 -0
  171. package/models/components/reputationevidenceexternalsignal.d.ts +23 -0
  172. package/models/components/reputationevidenceexternalsignal.d.ts.map +1 -0
  173. package/models/components/reputationevidenceexternalsignal.js +62 -0
  174. package/models/components/reputationevidenceexternalsignal.js.map +1 -0
  175. package/models/components/reputationevidencefieldvalue.d.ts +11 -0
  176. package/models/components/reputationevidencefieldvalue.d.ts.map +1 -0
  177. package/models/components/reputationevidencefieldvalue.js +51 -0
  178. package/models/components/reputationevidencefieldvalue.js.map +1 -0
  179. package/models/components/reputationevidencethreat.d.ts +12 -0
  180. package/models/components/reputationevidencethreat.d.ts.map +1 -0
  181. package/models/components/reputationevidencethreat.js +59 -0
  182. package/models/components/reputationevidencethreat.js.map +1 -0
  183. package/models/components/responseenvelopecenseyejob.d.ts +11 -0
  184. package/models/components/responseenvelopecenseyejob.d.ts.map +1 -0
  185. package/models/components/responseenvelopecenseyejob.js +51 -0
  186. package/models/components/responseenvelopecenseyejob.js.map +1 -0
  187. package/models/components/responseenvelopecenseyeresultsresponse.d.ts +11 -0
  188. package/models/components/responseenvelopecenseyeresultsresponse.d.ts.map +1 -0
  189. package/models/components/responseenvelopecenseyeresultsresponse.js +51 -0
  190. package/models/components/responseenvelopecenseyeresultsresponse.js.map +1 -0
  191. package/models/components/responseenvelopeservicesonhostresponse.d.ts +11 -0
  192. package/models/components/responseenvelopeservicesonhostresponse.d.ts.map +1 -0
  193. package/models/components/responseenvelopeservicesonhostresponse.js +51 -0
  194. package/models/components/responseenvelopeservicesonhostresponse.js.map +1 -0
  195. package/models/components/sapient.d.ts +15 -0
  196. package/models/components/sapient.d.ts.map +1 -0
  197. package/models/components/sapient.js +60 -0
  198. package/models/components/sapient.js.map +1 -0
  199. package/models/components/sapienterror.d.ts +11 -0
  200. package/models/components/sapienterror.d.ts.map +1 -0
  201. package/models/components/sapienterror.js +56 -0
  202. package/models/components/sapienterror.js.map +1 -0
  203. package/models/components/sapientregistrationack.d.ts +11 -0
  204. package/models/components/sapientregistrationack.d.ts.map +1 -0
  205. package/models/components/sapientregistrationack.js +56 -0
  206. package/models/components/sapientregistrationack.js.map +1 -0
  207. package/models/components/searchvaluecountsinputbody.d.ts +1 -1
  208. package/models/components/service.d.ts +12 -0
  209. package/models/components/service.d.ts.map +1 -1
  210. package/models/components/service.js +14 -0
  211. package/models/components/service.js.map +1 -1
  212. package/models/components/serviceonhostrange.d.ts +33 -0
  213. package/models/components/serviceonhostrange.d.ts.map +1 -0
  214. package/models/components/serviceonhostrange.js +62 -0
  215. package/models/components/serviceonhostrange.js.map +1 -0
  216. package/models/components/servicescan.d.ts +12 -0
  217. package/models/components/servicescan.d.ts.map +1 -1
  218. package/models/components/servicescan.js +14 -0
  219. package/models/components/servicescan.js.map +1 -1
  220. package/models/components/servicesonhostresponse.d.ts +18 -0
  221. package/models/components/servicesonhostresponse.d.ts.map +1 -0
  222. package/models/components/servicesonhostresponse.js +57 -0
  223. package/models/components/servicesonhostresponse.js.map +1 -0
  224. package/models/components/sourceusagebreakdown.d.ts +2 -2
  225. package/models/components/sourceusagebreakdown.d.ts.map +1 -1
  226. package/models/components/sourceusagebreakdown.js +2 -2
  227. package/models/components/sourceusagebreakdown.js.map +1 -1
  228. package/models/components/stun.d.ts +17 -0
  229. package/models/components/stun.d.ts.map +1 -0
  230. package/models/components/stun.js +67 -0
  231. package/models/components/stun.js.map +1 -0
  232. package/models/components/stunbindingerrorresponse.d.ts +13 -0
  233. package/models/components/stunbindingerrorresponse.d.ts.map +1 -0
  234. package/models/components/stunbindingerrorresponse.js +60 -0
  235. package/models/components/stunbindingerrorresponse.js.map +1 -0
  236. package/models/components/stunbindingsuccessresponse.d.ts +13 -0
  237. package/models/components/stunbindingsuccessresponse.d.ts.map +1 -0
  238. package/models/components/stunbindingsuccessresponse.js +59 -0
  239. package/models/components/stunbindingsuccessresponse.js.map +1 -0
  240. package/models/components/stunmappedaddress.d.ts +11 -0
  241. package/models/components/stunmappedaddress.d.ts.map +1 -0
  242. package/models/components/stunmappedaddress.js +51 -0
  243. package/models/components/stunmappedaddress.js.map +1 -0
  244. package/models/components/stunturn.d.ts +15 -0
  245. package/models/components/stunturn.d.ts.map +1 -0
  246. package/models/components/stunturn.js +65 -0
  247. package/models/components/stunturn.js.map +1 -0
  248. package/models/components/stunturnallocateerrorresponse.d.ts +15 -0
  249. package/models/components/stunturnallocateerrorresponse.d.ts.map +1 -0
  250. package/models/components/stunturnallocateerrorresponse.js +62 -0
  251. package/models/components/stunturnallocateerrorresponse.js.map +1 -0
  252. package/models/components/stunturnallocatesuccessresponse.d.ts +13 -0
  253. package/models/components/stunturnallocatesuccessresponse.d.ts.map +1 -0
  254. package/models/components/stunturnallocatesuccessresponse.js +59 -0
  255. package/models/components/stunturnallocatesuccessresponse.js.map +1 -0
  256. package/models/operations/index.d.ts +4 -0
  257. package/models/operations/index.d.ts.map +1 -1
  258. package/models/operations/index.js +4 -0
  259. package/models/operations/index.js.map +1 -1
  260. package/models/operations/v3collectionscrudlist.d.ts +15 -0
  261. package/models/operations/v3collectionscrudlist.d.ts.map +1 -1
  262. package/models/operations/v3collectionscrudlist.js +12 -1
  263. package/models/operations/v3collectionscrudlist.js.map +1 -1
  264. package/models/operations/v3globaldataserviceonhost.d.ts +101 -0
  265. package/models/operations/v3globaldataserviceonhost.d.ts.map +1 -0
  266. package/models/operations/v3globaldataserviceonhost.js +107 -0
  267. package/models/operations/v3globaldataserviceonhost.js.map +1 -0
  268. package/models/operations/v3threathuntingcenseyejobresults.d.ts +45 -0
  269. package/models/operations/v3threathuntingcenseyejobresults.d.ts.map +1 -0
  270. package/models/operations/v3threathuntingcenseyejobresults.js +76 -0
  271. package/models/operations/v3threathuntingcenseyejobresults.js.map +1 -0
  272. package/models/operations/v3threathuntingcenseyejobscreate.d.ts +32 -0
  273. package/models/operations/v3threathuntingcenseyejobscreate.d.ts.map +1 -0
  274. package/models/operations/v3threathuntingcenseyejobscreate.js +72 -0
  275. package/models/operations/v3threathuntingcenseyejobscreate.js.map +1 -0
  276. package/models/operations/v3threathuntingcenseyejobsget.d.ts +35 -0
  277. package/models/operations/v3threathuntingcenseyejobsget.d.ts.map +1 -0
  278. package/models/operations/v3threathuntingcenseyejobsget.js +72 -0
  279. package/models/operations/v3threathuntingcenseyejobsget.js.map +1 -0
  280. package/package.json +1 -1
  281. package/sdk/globaldata.d.ts +7 -0
  282. package/sdk/globaldata.d.ts.map +1 -1
  283. package/sdk/globaldata.js +10 -0
  284. package/sdk/globaldata.js.map +1 -1
  285. package/sdk/threathunting.d.ts +22 -1
  286. package/sdk/threathunting.d.ts.map +1 -1
  287. package/sdk/threathunting.js +31 -1
  288. package/sdk/threathunting.js.map +1 -1
  289. package/src/funcs/accountManagementGetMemberCreditUsage.ts +0 -1
  290. package/src/funcs/accountManagementGetOrganizationCreditUsage.ts +0 -1
  291. package/src/funcs/accountManagementGetOrganizationCredits.ts +0 -1
  292. package/src/funcs/accountManagementGetOrganizationDetails.ts +0 -1
  293. package/src/funcs/accountManagementInviteUserToOrganization.ts +0 -1
  294. package/src/funcs/accountManagementListOrganizationMembers.ts +0 -1
  295. package/src/funcs/accountManagementRemoveOrganizationMember.ts +0 -1
  296. package/src/funcs/accountManagementUpdateOrganizationMember.ts +0 -1
  297. package/src/funcs/collectionsAggregate.ts +0 -1
  298. package/src/funcs/collectionsDelete.ts +0 -1
  299. package/src/funcs/collectionsGet.ts +0 -1
  300. package/src/funcs/collectionsList.ts +1 -0
  301. package/src/funcs/collectionsListEvents.ts +0 -1
  302. package/src/funcs/collectionsSearch.ts +0 -1
  303. package/src/funcs/collectionsUpdate.ts +0 -1
  304. package/src/funcs/globalDataGetCertificate.ts +0 -1
  305. package/src/funcs/globalDataGetCertificateRaw.ts +0 -1
  306. package/src/funcs/globalDataGetHost.ts +0 -1
  307. package/src/funcs/globalDataGetHostTimeline.ts +0 -1
  308. package/src/funcs/globalDataGetTrackedScan.ts +0 -1
  309. package/src/funcs/globalDataGetWebProperty.ts +0 -1
  310. package/src/funcs/globalDataListServicesOnHost.ts +205 -0
  311. package/src/funcs/threatHuntingCreateCenseyeJob.ts +195 -0
  312. package/src/funcs/threatHuntingGetCenseyeJob.ts +200 -0
  313. package/src/funcs/threatHuntingGetCenseyeJobResults.ts +202 -0
  314. package/src/funcs/threatHuntingGetHostObservationsWithCertificate.ts +0 -1
  315. package/src/funcs/threatHuntingGetTrackedScanThreatHunting.ts +0 -1
  316. package/src/funcs/threatHuntingValueCounts.ts +1 -1
  317. package/src/lib/config.ts +4 -4
  318. package/src/lib/encodings.ts +23 -4
  319. package/src/lib/files.ts +22 -0
  320. package/src/lib/matchers.ts +3 -2
  321. package/src/lib/sdks.ts +7 -5
  322. package/src/lib/security.ts +1 -2
  323. package/src/lib/url.ts +16 -14
  324. package/src/models/components/anermacfforth.ts +45 -0
  325. package/src/models/components/censeyejob.ts +106 -0
  326. package/src/models/components/censeyeresult.ts +48 -0
  327. package/src/models/components/censeyeresultsresponse.ts +45 -0
  328. package/src/models/components/censeyetarget.ts +77 -0
  329. package/src/models/components/countcondition.ts +1 -1
  330. package/src/models/components/createcenseyejobinputbody.ts +36 -0
  331. package/src/models/components/cursorontarget.ts +35 -0
  332. package/src/models/components/cursorontargetevent.ts +72 -0
  333. package/src/models/components/cursorontargetpoint.ts +39 -0
  334. package/src/models/components/cursorontargetstatus.ts +31 -0
  335. package/src/models/components/cursorontargettakv.ts +37 -0
  336. package/src/models/components/fieldvaluepair.ts +21 -0
  337. package/src/models/components/frps.ts +37 -0
  338. package/src/models/components/host.ts +19 -0
  339. package/src/models/components/icap.ts +37 -0
  340. package/src/models/components/icapoptionsresponse.ts +65 -0
  341. package/src/models/components/index.ts +40 -0
  342. package/src/models/components/networkclassification.ts +60 -0
  343. package/src/models/components/networkmobileinfo.ts +49 -0
  344. package/src/models/components/privacy.ts +73 -0
  345. package/src/models/components/privacytorinfo.ts +35 -0
  346. package/src/models/components/privacytorinforelay.ts +227 -0
  347. package/src/models/components/privacytorinforelayexitpolicysummary.ts +40 -0
  348. package/src/models/components/reputation.ts +66 -0
  349. package/src/models/components/reputationevidence.ts +63 -0
  350. package/src/models/components/reputationevidenceexternalsignal.ts +50 -0
  351. package/src/models/components/reputationevidencefieldvalue.ts +33 -0
  352. package/src/models/components/reputationevidencethreat.ts +42 -0
  353. package/src/models/components/responseenvelopecenseyejob.ts +32 -0
  354. package/src/models/components/responseenvelopecenseyeresultsresponse.ts +36 -0
  355. package/src/models/components/responseenvelopeservicesonhostresponse.ts +36 -0
  356. package/src/models/components/sapient.ts +44 -0
  357. package/src/models/components/sapienterror.ts +38 -0
  358. package/src/models/components/sapientregistrationack.ts +38 -0
  359. package/src/models/components/searchvaluecountsinputbody.ts +1 -1
  360. package/src/models/components/service.ts +23 -0
  361. package/src/models/components/serviceonhostrange.ts +66 -0
  362. package/src/models/components/servicescan.ts +23 -0
  363. package/src/models/components/servicesonhostresponse.ts +48 -0
  364. package/src/models/components/sourceusagebreakdown.ts +4 -4
  365. package/src/models/components/stun.ts +54 -0
  366. package/src/models/components/stunbindingerrorresponse.ts +44 -0
  367. package/src/models/components/stunbindingsuccessresponse.ts +45 -0
  368. package/src/models/components/stunmappedaddress.ts +33 -0
  369. package/src/models/components/stunturn.ts +55 -0
  370. package/src/models/components/stunturnallocateerrorresponse.ts +48 -0
  371. package/src/models/components/stunturnallocatesuccessresponse.ts +45 -0
  372. package/src/models/operations/index.ts +4 -0
  373. package/src/models/operations/v3collectionscrudlist.ts +22 -0
  374. package/src/models/operations/v3globaldataserviceonhost.ts +173 -0
  375. package/src/models/operations/v3threathuntingcenseyejobresults.ts +107 -0
  376. package/src/models/operations/v3threathuntingcenseyejobscreate.ts +91 -0
  377. package/src/models/operations/v3threathuntingcenseyejobsget.ts +87 -0
  378. package/src/sdk/globaldata.ts +18 -0
  379. package/src/sdk/threathunting.ts +55 -1
  380. package/tests/sdk.test.ts +412 -259
  381. package/examples/package-lock.json +0 -610
  382. package/examples/package.json +0 -18
  383. package/tests/package-lock.json +0 -1448
  384. package/tests/package.json +0 -11
  385. package/tsconfig.json +0 -40
package/sdk/globaldata.js CHANGED
@@ -17,6 +17,7 @@ const globalDataGetHostTimeline_js_1 = require("../funcs/globalDataGetHostTimeli
17
17
  const globalDataGetTrackedScan_js_1 = require("../funcs/globalDataGetTrackedScan.js");
18
18
  const globalDataGetWebProperties_js_1 = require("../funcs/globalDataGetWebProperties.js");
19
19
  const globalDataGetWebProperty_js_1 = require("../funcs/globalDataGetWebProperty.js");
20
+ const globalDataListServicesOnHost_js_1 = require("../funcs/globalDataListServicesOnHost.js");
20
21
  const globalDataSearch_js_1 = require("../funcs/globalDataSearch.js");
21
22
  const sdks_js_1 = require("../lib/sdks.js");
22
23
  const fp_js_1 = require("../types/fp.js");
@@ -75,6 +76,15 @@ class GlobalData extends sdks_js_1.ClientSDK {
75
76
  async getHost(request, options) {
76
77
  return (0, fp_js_1.unwrapAsync)((0, globalDataGetHost_js_1.globalDataGetHost)(this, request, options));
77
78
  }
79
+ /**
80
+ * Get service history for a host
81
+ *
82
+ * @remarks
83
+ * Retrieve historical service observations for a host. This endpoint returns time ranges during which services were detected on the host.<br><br>You can define a specific time frame of interest. If you do not specify a time frame, this endpoint will search the historical dataset that is available to your account.<br><br>You can filter by port number, protocol, and transport protocol.
84
+ */
85
+ async listServicesOnHost(request, options) {
86
+ return (0, fp_js_1.unwrapAsync)((0, globalDataListServicesOnHost_js_1.globalDataListServicesOnHost)(this, request, options));
87
+ }
78
88
  /**
79
89
  * Get host event history
80
90
  *
@@ -1 +1 @@
1
- {"version":3,"file":"globaldata.js","sourceRoot":"","sources":["../src/sdk/globaldata.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,4EAAsE;AACtE,8GAAwG;AACxG,4FAAsF;AACtF,sFAAgF;AAChF,4FAAsF;AACtF,wFAAkF;AAClF,8FAAwF;AACxF,wEAAkE;AAClE,0EAAoE;AACpE,wFAAkF;AAClF,sFAAgF;AAChF,0FAAoF;AACpF,sFAAgF;AAChF,sEAAgE;AAChE,4CAA2D;AAE3D,0CAA6C;AAE7C,MAAa,UAAW,SAAQ,mBAAS;IACvC;;;;;OAKG;IACH,KAAK,CAAC,eAAe,CACnB,OAA+D,EAC/D,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,wDAAyB,EAC1C,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,kBAAkB,CACtB,OAAkE,EAClE,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,8DAA4B,EAC7C,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,cAAc,CAClB,OAAuD,EACvD,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,sDAAwB,EACzC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,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,CAClB,OAA+C,EAC/C,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,sDAAwB,EACzC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,SAAS,CACb,OAAsD,EACtD,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,4CAAmB,EACpC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,0BAA0B,CAC9B,OAAoD,EACpD,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,8EAAoC,EACrD,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,MAAM,CACV,OAAkD,EAClD,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,sCAAgB,EACjC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF;AA9OD,gCA8OC"}
1
+ {"version":3,"file":"globaldata.js","sourceRoot":"","sources":["../src/sdk/globaldata.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,4EAAsE;AACtE,8GAAwG;AACxG,4FAAsF;AACtF,sFAAgF;AAChF,4FAAsF;AACtF,wFAAkF;AAClF,8FAAwF;AACxF,wEAAkE;AAClE,0EAAoE;AACpE,wFAAkF;AAClF,sFAAgF;AAChF,0FAAoF;AACpF,sFAAgF;AAChF,8FAAwF;AACxF,sEAAgE;AAChE,4CAA2D;AAE3D,0CAA6C;AAE7C,MAAa,UAAW,SAAQ,mBAAS;IACvC;;;;;OAKG;IACH,KAAK,CAAC,eAAe,CACnB,OAA+D,EAC/D,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,wDAAyB,EAC1C,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;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"}
@@ -1,6 +1,27 @@
1
1
  import { ClientSDK, RequestOptions } from "../lib/sdks.js";
2
2
  import * as operations from "../models/operations/index.js";
3
3
  export declare class ThreatHunting extends ClientSDK {
4
+ /**
5
+ * CensEye: Create a pivot analysis job
6
+ *
7
+ * @remarks
8
+ * Create an asynchronous CensEye pivot analysis job for a host, web property, or certificate. The job extracts [default pivot fields](https://docs.censys.com/docs/platform-threat-hunting-use-censeye-to-build-detections#default-pivot-fields) from the target asset and counts matching documents for each field-value pair. Poll the job status endpoint to track progress, then retrieve results when complete.<br><br>To use this endpoint, your organization must have access to the Threat Hunting module.<br><br>This endpoint costs 44 credits to execute for a host, 28 credits to execute for a web property, and 7 credits to execute for a certificate.
9
+ */
10
+ createCenseyeJob(request: operations.V3ThreathuntingCenseyeJobsCreateRequest, options?: RequestOptions): Promise<operations.V3ThreathuntingCenseyeJobsCreateResponse>;
11
+ /**
12
+ * CensEye: Get job status
13
+ *
14
+ * @remarks
15
+ * Retrieve the current status of a CensEye pivot analysis job. Use this to poll for completion before fetching results.<br><br>To use this endpoint, your organization must have access to the Threat Hunting module.
16
+ */
17
+ getCenseyeJob(request: operations.V3ThreathuntingCenseyeJobsGetRequest, options?: RequestOptions): Promise<operations.V3ThreathuntingCenseyeJobsGetResponse>;
18
+ /**
19
+ * CensEye: Get job results
20
+ *
21
+ * @remarks
22
+ * Retrieve the results of a completed CensEye pivot analysis job. Each result contains a count and the field-value pairs that were analyzed. Results may be empty if the job is still running.<br><br>Results are paginated. Use the `next_page_token` from the response to fetch subsequent pages.<br><br>To use this endpoint, your organization must have access to the Threat Hunting module.
23
+ */
24
+ getCenseyeJobResults(request: operations.V3ThreathuntingCenseyeJobResultsRequest, options?: RequestOptions): Promise<operations.V3ThreathuntingCenseyeJobResultsResponse>;
4
25
  /**
5
26
  * Get host history for a certificate
6
27
  *
@@ -33,7 +54,7 @@ export declare class ThreatHunting extends ClientSDK {
33
54
  * CensEye: Retrieve value counts to discover pivots
34
55
  *
35
56
  * @remarks
36
- * Get counts of web assets for specific field-value pairs and combinations of field-value pairs. This is similar to the [CensEye functionality](https://docs.censys.com/docs/platform-threat-hunting-use-censeye-to-build-detections#/) available in the Platform web UI, but it allows you to define specific fields of interest rather than the [default fields](https://docs.censys.com/docs/platform-threat-hunting-use-censeye-to-build-detections#default-pivot-fields) leveraged by the tool in the UI.<br><br>Each array can only target fields within the same nested object. For example, you can combine `host.services.port=80` and `host.services.protocol=SSH` in the same array, but you cannot combine `host.services.port=80` and `host.location.country=”United States”` in the same array. You can input multiple arrays of objects in each API call.<br><br>To use this endpoint, your organization must have access to the Threat Hunting Module. This endpoint costs 1 credit per count condition (array of objects) included in the API call.
57
+ * Get counts of web assets for specific field-value pairs and combinations of field-value pairs. This is similar to the [CensEye functionality](https://docs.censys.com/docs/platform-threat-hunting-use-censeye-to-build-detections#/) available in the Platform web UI, but it allows you to define specific fields of interest rather than the [default fields](https://docs.censys.com/docs/platform-threat-hunting-use-censeye-to-build-detections#default-pivot-fields) leveraged by the tool in the UI.<br><br>Each array can only target fields within the same nested object and may contain at most 5 field-value pairs. For example, you can combine `host.services.port=80` and `host.services.protocol=SSH` in the same array, but you cannot combine `host.services.port=80` and `host.location.country="United States"` in the same array. You can input multiple arrays of objects in each API call.<br><br>To use this endpoint, your organization must have access to the Threat Hunting Module. This endpoint costs 1 credit per count condition (array of objects) included in the API call.
37
58
  */
38
59
  valueCounts(request: operations.V3ThreathuntingValueCountsRequest, options?: RequestOptions): Promise<operations.V3ThreathuntingValueCountsResponse>;
39
60
  }
@@ -1 +1 @@
1
- {"version":3,"file":"threathunting.d.ts","sourceRoot":"","sources":["../src/sdk/threathunting.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAG5D,qBAAa,aAAc,SAAQ,SAAS;IAC1C;;;;;OAKG;IACG,kCAAkC,CACtC,OAAO,EACL,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,UAAU,CAAC,uCAAuC,EAC3D,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,wCAAwC,CAAC;IAQ/D;;;;;OAKG;IACG,kCAAkC,CACtC,OAAO,EACL,UAAU,CAAC,wDAAwD,EACrE,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CACR,UAAU,CAAC,yDAAyD,CACrE;IAQD;;;;;OAKG;IACG,iBAAiB,CACrB,OAAO,EAAE,UAAU,CAAC,oCAAoC,EACxD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,qCAAqC,CAAC;IAQ5D;;;;;OAKG;IACG,2BAA2B,CAC/B,OAAO,EAAE,UAAU,CAAC,8BAA8B,EAClD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,+BAA+B,CAAC;IAQtD;;;;;OAKG;IACG,WAAW,CACf,OAAO,EAAE,UAAU,CAAC,iCAAiC,EACrD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,kCAAkC,CAAC;IAQzD;;;;;OAKG;IACG,WAAW,CACf,OAAO,EAAE,UAAU,CAAC,iCAAiC,EACrD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,kCAAkC,CAAC;CAO1D"}
@@ -4,7 +4,10 @@
4
4
  */
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.ThreatHunting = void 0;
7
+ const threatHuntingCreateCenseyeJob_js_1 = require("../funcs/threatHuntingCreateCenseyeJob.js");
7
8
  const threatHuntingCreateTrackedScan_js_1 = require("../funcs/threatHuntingCreateTrackedScan.js");
9
+ const threatHuntingGetCenseyeJob_js_1 = require("../funcs/threatHuntingGetCenseyeJob.js");
10
+ const threatHuntingGetCenseyeJobResults_js_1 = require("../funcs/threatHuntingGetCenseyeJobResults.js");
8
11
  const threatHuntingGetHostObservationsWithCertificate_js_1 = require("../funcs/threatHuntingGetHostObservationsWithCertificate.js");
9
12
  const threatHuntingGetTrackedScanThreatHunting_js_1 = require("../funcs/threatHuntingGetTrackedScanThreatHunting.js");
10
13
  const threatHuntingListThreats_js_1 = require("../funcs/threatHuntingListThreats.js");
@@ -12,6 +15,33 @@ const threatHuntingValueCounts_js_1 = require("../funcs/threatHuntingValueCounts
12
15
  const sdks_js_1 = require("../lib/sdks.js");
13
16
  const fp_js_1 = require("../types/fp.js");
14
17
  class ThreatHunting extends sdks_js_1.ClientSDK {
18
+ /**
19
+ * CensEye: Create a pivot analysis job
20
+ *
21
+ * @remarks
22
+ * Create an asynchronous CensEye pivot analysis job for a host, web property, or certificate. The job extracts [default pivot fields](https://docs.censys.com/docs/platform-threat-hunting-use-censeye-to-build-detections#default-pivot-fields) from the target asset and counts matching documents for each field-value pair. Poll the job status endpoint to track progress, then retrieve results when complete.<br><br>To use this endpoint, your organization must have access to the Threat Hunting module.<br><br>This endpoint costs 44 credits to execute for a host, 28 credits to execute for a web property, and 7 credits to execute for a certificate.
23
+ */
24
+ async createCenseyeJob(request, options) {
25
+ return (0, fp_js_1.unwrapAsync)((0, threatHuntingCreateCenseyeJob_js_1.threatHuntingCreateCenseyeJob)(this, request, options));
26
+ }
27
+ /**
28
+ * CensEye: Get job status
29
+ *
30
+ * @remarks
31
+ * Retrieve the current status of a CensEye pivot analysis job. Use this to poll for completion before fetching results.<br><br>To use this endpoint, your organization must have access to the Threat Hunting module.
32
+ */
33
+ async getCenseyeJob(request, options) {
34
+ return (0, fp_js_1.unwrapAsync)((0, threatHuntingGetCenseyeJob_js_1.threatHuntingGetCenseyeJob)(this, request, options));
35
+ }
36
+ /**
37
+ * CensEye: Get job results
38
+ *
39
+ * @remarks
40
+ * Retrieve the results of a completed CensEye pivot analysis job. Each result contains a count and the field-value pairs that were analyzed. Results may be empty if the job is still running.<br><br>Results are paginated. Use the `next_page_token` from the response to fetch subsequent pages.<br><br>To use this endpoint, your organization must have access to the Threat Hunting module.
41
+ */
42
+ async getCenseyeJobResults(request, options) {
43
+ return (0, fp_js_1.unwrapAsync)((0, threatHuntingGetCenseyeJobResults_js_1.threatHuntingGetCenseyeJobResults)(this, request, options));
44
+ }
15
45
  /**
16
46
  * Get host history for a certificate
17
47
  *
@@ -52,7 +82,7 @@ class ThreatHunting extends sdks_js_1.ClientSDK {
52
82
  * CensEye: Retrieve value counts to discover pivots
53
83
  *
54
84
  * @remarks
55
- * Get counts of web assets for specific field-value pairs and combinations of field-value pairs. This is similar to the [CensEye functionality](https://docs.censys.com/docs/platform-threat-hunting-use-censeye-to-build-detections#/) available in the Platform web UI, but it allows you to define specific fields of interest rather than the [default fields](https://docs.censys.com/docs/platform-threat-hunting-use-censeye-to-build-detections#default-pivot-fields) leveraged by the tool in the UI.<br><br>Each array can only target fields within the same nested object. For example, you can combine `host.services.port=80` and `host.services.protocol=SSH` in the same array, but you cannot combine `host.services.port=80` and `host.location.country=”United States”` in the same array. You can input multiple arrays of objects in each API call.<br><br>To use this endpoint, your organization must have access to the Threat Hunting Module. This endpoint costs 1 credit per count condition (array of objects) included in the API call.
85
+ * Get counts of web assets for specific field-value pairs and combinations of field-value pairs. This is similar to the [CensEye functionality](https://docs.censys.com/docs/platform-threat-hunting-use-censeye-to-build-detections#/) available in the Platform web UI, but it allows you to define specific fields of interest rather than the [default fields](https://docs.censys.com/docs/platform-threat-hunting-use-censeye-to-build-detections#default-pivot-fields) leveraged by the tool in the UI.<br><br>Each array can only target fields within the same nested object and may contain at most 5 field-value pairs. For example, you can combine `host.services.port=80` and `host.services.protocol=SSH` in the same array, but you cannot combine `host.services.port=80` and `host.location.country="United States"` in the same array. You can input multiple arrays of objects in each API call.<br><br>To use this endpoint, your organization must have access to the Threat Hunting Module. This endpoint costs 1 credit per count condition (array of objects) included in the API call.
56
86
  */
57
87
  async valueCounts(request, options) {
58
88
  return (0, fp_js_1.unwrapAsync)((0, threatHuntingValueCounts_js_1.threatHuntingValueCounts)(this, request, options));
@@ -1 +1 @@
1
- {"version":3,"file":"threathunting.js","sourceRoot":"","sources":["../src/sdk/threathunting.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,kGAA4F;AAC5F,oIAA8H;AAC9H,sHAAgH;AAChH,sFAAgF;AAChF,sFAAgF;AAChF,4CAA2D;AAE3D,0CAA6C;AAE7C,MAAa,aAAc,SAAQ,mBAAS;IAC1C;;;;;OAKG;IACH,KAAK,CAAC,kCAAkC,CACtC,OACqE,EACrE,OAAwB;QAIxB,OAAO,IAAA,mBAAW,EAAC,IAAA,oGAA+C,EAChE,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,iBAAiB,CACrB,OAAwD,EACxD,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,kEAA8B,EAC/C,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,2BAA2B,CAC/B,OAAkD,EAClD,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,sFAAwC,EACzD,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,WAAW,CACf,OAAqD,EACrD,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,sDAAwB,EACzC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,WAAW,CACf,OAAqD,EACrD,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,sDAAwB,EACzC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF;AAxFD,sCAwFC"}
1
+ {"version":3,"file":"threathunting.js","sourceRoot":"","sources":["../src/sdk/threathunting.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,gGAA0F;AAC1F,kGAA4F;AAC5F,0F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AAC,WAAW,CACf,OAAqD,EACrD,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,sDAAwB,EACzC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,WAAW,CACf,OAAqD,EACrD,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,sDAAwB,EACzC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF;AA3ID,sCA2IC"}
@@ -102,7 +102,6 @@ async function $do(
102
102
  charEncoding: "percent",
103
103
  }),
104
104
  };
105
-
106
105
  const path = pathToFunc(
107
106
  "/v3/accounts/organizations/{organization_id}/members/{user_id}/credits/usage",
108
107
  )(pathParams);
@@ -99,7 +99,6 @@ async function $do(
99
99
  charEncoding: "percent",
100
100
  }),
101
101
  };
102
-
103
102
  const path = pathToFunc(
104
103
  "/v3/accounts/organizations/{organization_id}/credits/usage",
105
104
  )(pathParams);
@@ -99,7 +99,6 @@ async function $do(
99
99
  charEncoding: "percent",
100
100
  }),
101
101
  };
102
-
103
102
  const path = pathToFunc(
104
103
  "/v3/accounts/organizations/{organization_id}/credits",
105
104
  )(pathParams);
@@ -99,7 +99,6 @@ async function $do(
99
99
  charEncoding: "percent",
100
100
  }),
101
101
  };
102
-
103
102
  const path = pathToFunc("/v3/accounts/organizations/{organization_id}")(
104
103
  pathParams,
105
104
  );
@@ -110,7 +110,6 @@ async function $do(
110
110
  charEncoding: "percent",
111
111
  }),
112
112
  };
113
-
114
113
  const path = pathToFunc(
115
114
  "/v3/accounts/organizations/{organization_id}/invitations",
116
115
  )(pathParams);
@@ -99,7 +99,6 @@ async function $do(
99
99
  charEncoding: "percent",
100
100
  }),
101
101
  };
102
-
103
102
  const path = pathToFunc(
104
103
  "/v3/accounts/organizations/{organization_id}/members",
105
104
  )(pathParams);
@@ -112,7 +112,6 @@ async function $do(
112
112
  charEncoding: "percent",
113
113
  }),
114
114
  };
115
-
116
115
  const path = pathToFunc(
117
116
  "/v3/accounts/organizations/{organization_id}/members/{user_id}",
118
117
  )(pathParams);
@@ -114,7 +114,6 @@ async function $do(
114
114
  charEncoding: "percent",
115
115
  }),
116
116
  };
117
-
118
117
  const path = pathToFunc(
119
118
  "/v3/accounts/organizations/{organization_id}/members/{user_id}",
120
119
  )(pathParams);
@@ -101,7 +101,6 @@ async function $do(
101
101
  charEncoding: "percent",
102
102
  }),
103
103
  };
104
-
105
104
  const path = pathToFunc("/v3/collections/{collection_uid}/search/aggregate")(
106
105
  pathParams,
107
106
  );
@@ -102,7 +102,6 @@ async function $do(
102
102
  charEncoding: "percent",
103
103
  }),
104
104
  };
105
-
106
105
  const path = pathToFunc("/v3/collections/{collection_uid}")(pathParams);
107
106
 
108
107
  const query = encodeFormQuery({
@@ -97,7 +97,6 @@ async function $do(
97
97
  charEncoding: "percent",
98
98
  }),
99
99
  };
100
-
101
100
  const path = pathToFunc("/v3/collections/{collection_uid}")(pathParams);
102
101
 
103
102
  const query = encodeFormQuery({
@@ -94,6 +94,7 @@ async function $do(
94
94
  const path = pathToFunc("/v3/collections")();
95
95
 
96
96
  const query = encodeFormQuery({
97
+ "collection_statuses": payload.collection_statuses,
97
98
  "organization_id": payload.organization_id
98
99
  ?? client._options.organizationId,
99
100
  "page_size": payload.page_size,
@@ -97,7 +97,6 @@ async function $do(
97
97
  charEncoding: "percent",
98
98
  }),
99
99
  };
100
-
101
100
  const path = pathToFunc("/v3/collections/{collection_uid}/events")(
102
101
  pathParams,
103
102
  );
@@ -99,7 +99,6 @@ async function $do(
99
99
  charEncoding: "percent",
100
100
  }),
101
101
  };
102
-
103
102
  const path = pathToFunc("/v3/collections/{collection_uid}/search/query")(
104
103
  pathParams,
105
104
  );
@@ -99,7 +99,6 @@ async function $do(
99
99
  charEncoding: "percent",
100
100
  }),
101
101
  };
102
-
103
102
  const path = pathToFunc("/v3/collections/{collection_uid}")(pathParams);
104
103
 
105
104
  const query = encodeFormQuery({
@@ -99,7 +99,6 @@ async function $do(
99
99
  charEncoding: "percent",
100
100
  }),
101
101
  };
102
-
103
102
  const path = pathToFunc("/v3/global/asset/certificate/{certificate_id}")(
104
103
  pathParams,
105
104
  );
@@ -99,7 +99,6 @@ async function $do(
99
99
  charEncoding: "percent",
100
100
  }),
101
101
  };
102
-
103
102
  const path = pathToFunc("/v3/global/asset/certificate/{certificate_id}/raw")(
104
103
  pathParams,
105
104
  );
@@ -97,7 +97,6 @@ async function $do(
97
97
  charEncoding: "percent",
98
98
  }),
99
99
  };
100
-
101
100
  const path = pathToFunc("/v3/global/asset/host/{host_id}")(pathParams);
102
101
 
103
102
  const query = encodeFormQuery({
@@ -99,7 +99,6 @@ async function $do(
99
99
  charEncoding: "percent",
100
100
  }),
101
101
  };
102
-
103
102
  const path = pathToFunc("/v3/global/asset/host/{host_id}/timeline")(
104
103
  pathParams,
105
104
  );
@@ -97,7 +97,6 @@ async function $do(
97
97
  charEncoding: "percent",
98
98
  }),
99
99
  };
100
-
101
100
  const path = pathToFunc("/v3/global/scans/{scan_id}")(pathParams);
102
101
 
103
102
  const query = encodeFormQuery({
@@ -99,7 +99,6 @@ async function $do(
99
99
  charEncoding: "percent",
100
100
  }),
101
101
  };
102
-
103
102
  const path = pathToFunc("/v3/global/asset/webproperty/{webproperty_id}")(
104
103
  pathParams,
105
104
  );
@@ -0,0 +1,205 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { SDKCore } from "../core.js";
6
+ import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
7
+ import * as M from "../lib/matchers.js";
8
+ import { compactMap } from "../lib/primitives.js";
9
+ import { safeParse } from "../lib/schemas.js";
10
+ import { RequestOptions } from "../lib/sdks.js";
11
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
12
+ import { pathToFunc } from "../lib/url.js";
13
+ import {
14
+ ConnectionError,
15
+ InvalidRequestError,
16
+ RequestAbortedError,
17
+ RequestTimeoutError,
18
+ UnexpectedClientError,
19
+ } from "../models/errors/httpclienterrors.js";
20
+ import * as errors from "../models/errors/index.js";
21
+ import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
22
+ import { SDKBaseError } from "../models/errors/sdkbaseerror.js";
23
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
24
+ import * as operations from "../models/operations/index.js";
25
+ import { APICall, APIPromise } from "../types/async.js";
26
+ import { Result } from "../types/fp.js";
27
+
28
+ /**
29
+ * Get service history for a host
30
+ *
31
+ * @remarks
32
+ * Retrieve historical service observations for a host. This endpoint returns time ranges during which services were detected on the host.<br><br>You can define a specific time frame of interest. If you do not specify a time frame, this endpoint will search the historical dataset that is available to your account.<br><br>You can filter by port number, protocol, and transport protocol.
33
+ */
34
+ export function globalDataListServicesOnHost(
35
+ client: SDKCore,
36
+ request: operations.V3GlobaldataServiceOnHostRequest,
37
+ options?: RequestOptions,
38
+ ): APIPromise<
39
+ Result<
40
+ operations.V3GlobaldataServiceOnHostResponse,
41
+ | errors.AuthenticationError
42
+ | errors.ErrorModel
43
+ | SDKBaseError
44
+ | ResponseValidationError
45
+ | ConnectionError
46
+ | RequestAbortedError
47
+ | RequestTimeoutError
48
+ | InvalidRequestError
49
+ | UnexpectedClientError
50
+ | SDKValidationError
51
+ >
52
+ > {
53
+ return new APIPromise($do(
54
+ client,
55
+ request,
56
+ options,
57
+ ));
58
+ }
59
+
60
+ async function $do(
61
+ client: SDKCore,
62
+ request: operations.V3GlobaldataServiceOnHostRequest,
63
+ options?: RequestOptions,
64
+ ): Promise<
65
+ [
66
+ Result<
67
+ operations.V3GlobaldataServiceOnHostResponse,
68
+ | errors.AuthenticationError
69
+ | errors.ErrorModel
70
+ | SDKBaseError
71
+ | ResponseValidationError
72
+ | ConnectionError
73
+ | RequestAbortedError
74
+ | RequestTimeoutError
75
+ | InvalidRequestError
76
+ | UnexpectedClientError
77
+ | SDKValidationError
78
+ >,
79
+ APICall,
80
+ ]
81
+ > {
82
+ const parsed = safeParse(
83
+ request,
84
+ (value) =>
85
+ operations.V3GlobaldataServiceOnHostRequest$outboundSchema.parse(value),
86
+ "Input validation failed",
87
+ );
88
+ if (!parsed.ok) {
89
+ return [parsed, { status: "invalid" }];
90
+ }
91
+ const payload = parsed.value;
92
+ const body = null;
93
+
94
+ const pathParams = {
95
+ host_id: encodeSimple("host_id", payload.host_id, {
96
+ explode: false,
97
+ charEncoding: "percent",
98
+ }),
99
+ };
100
+ const path = pathToFunc(
101
+ "/v3/global/asset/host/{host_id}/observations/services",
102
+ )(pathParams);
103
+
104
+ const query = encodeFormQuery({
105
+ "end_time": payload.end_time,
106
+ "order_by": payload.order_by,
107
+ "organization_id": payload.organization_id
108
+ ?? client._options.organizationId,
109
+ "page_size": payload.page_size,
110
+ "page_token": payload.page_token,
111
+ "port": payload.port,
112
+ "protocol": payload.protocol,
113
+ "start_time": payload.start_time,
114
+ "transport_protocol": payload.transport_protocol,
115
+ }, { explode: false });
116
+
117
+ const headers = new Headers(compactMap({
118
+ Accept: "application/json",
119
+ }));
120
+
121
+ const secConfig = await extractSecurity(client._options.personalAccessToken);
122
+ const securityInput = secConfig == null
123
+ ? {}
124
+ : { personalAccessToken: secConfig };
125
+ const requestSecurity = resolveGlobalSecurity(securityInput);
126
+
127
+ const context = {
128
+ options: client._options,
129
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
130
+ operationID: "v3-globaldata-service-on-host",
131
+ oAuth2Scopes: null,
132
+
133
+ resolvedSecurity: requestSecurity,
134
+
135
+ securitySource: client._options.personalAccessToken,
136
+ retryConfig: options?.retries
137
+ || client._options.retryConfig
138
+ || { strategy: "none" },
139
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
140
+ };
141
+
142
+ const requestRes = client._createRequest(context, {
143
+ security: requestSecurity,
144
+ method: "GET",
145
+ baseURL: options?.serverURL,
146
+ path: path,
147
+ headers: headers,
148
+ query: query,
149
+ body: body,
150
+ userAgent: client._options.userAgent,
151
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
152
+ }, options);
153
+ if (!requestRes.ok) {
154
+ return [requestRes, { status: "invalid" }];
155
+ }
156
+ const req = requestRes.value;
157
+
158
+ const doResult = await client._do(req, {
159
+ context,
160
+ errorCodes: ["400", "401", "403", "404", "409", "4XX", "500", "5XX"],
161
+ retryConfig: context.retryConfig,
162
+ retryCodes: context.retryCodes,
163
+ });
164
+ if (!doResult.ok) {
165
+ return [doResult, { status: "request-error", request: req }];
166
+ }
167
+ const response = doResult.value;
168
+
169
+ const responseFields = {
170
+ HttpMeta: { Response: response, Request: req },
171
+ };
172
+
173
+ const [result] = await M.match<
174
+ operations.V3GlobaldataServiceOnHostResponse,
175
+ | errors.AuthenticationError
176
+ | errors.ErrorModel
177
+ | SDKBaseError
178
+ | ResponseValidationError
179
+ | ConnectionError
180
+ | RequestAbortedError
181
+ | RequestTimeoutError
182
+ | InvalidRequestError
183
+ | UnexpectedClientError
184
+ | SDKValidationError
185
+ >(
186
+ M.json(200, operations.V3GlobaldataServiceOnHostResponse$inboundSchema, {
187
+ hdrs: true,
188
+ key: "Result",
189
+ }),
190
+ M.jsonErr(401, errors.AuthenticationError$inboundSchema),
191
+ M.jsonErr([400, 403, 404, 409], errors.ErrorModel$inboundSchema, {
192
+ ctype: "application/problem+json",
193
+ }),
194
+ M.jsonErr(500, errors.ErrorModel$inboundSchema, {
195
+ ctype: "application/problem+json",
196
+ }),
197
+ M.fail("4XX"),
198
+ M.fail("5XX"),
199
+ )(response, req, { extraFields: responseFields });
200
+ if (!result.ok) {
201
+ return [result, { status: "complete", request: req, response }];
202
+ }
203
+
204
+ return [result, { status: "complete", request: req, response }];
205
+ }