@censys/platform-sdk 0.8.0 → 0.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (383) hide show
  1. package/README.md +14 -8
  2. package/docs/sdks/accountmanagement/README.md +169 -5
  3. package/docs/sdks/collections/README.md +6 -7
  4. package/docs/sdks/globaldata/README.md +0 -1
  5. package/docs/sdks/threathunting/README.md +78 -1
  6. package/examples/package-lock.json +1 -1
  7. package/funcs/accountManagementGetMemberCreditUsage.d.ts +2 -2
  8. package/funcs/accountManagementGetMemberCreditUsage.js +5 -2
  9. package/funcs/accountManagementGetMemberCreditUsage.js.map +1 -1
  10. package/funcs/accountManagementGetOrganizationCreditUsage.d.ts +1 -1
  11. package/funcs/accountManagementGetOrganizationCreditUsage.js +5 -1
  12. package/funcs/accountManagementGetOrganizationCreditUsage.js.map +1 -1
  13. package/funcs/accountManagementGetOrganizationCredits.d.ts +1 -1
  14. package/funcs/accountManagementGetOrganizationCredits.js +1 -1
  15. package/funcs/accountManagementGetUserCredits.d.ts +18 -0
  16. package/funcs/accountManagementGetUserCredits.d.ts.map +1 -0
  17. package/funcs/accountManagementGetUserCredits.js +112 -0
  18. package/funcs/accountManagementGetUserCredits.js.map +1 -0
  19. package/funcs/accountManagementGetUserCreditsUsage.d.ts +18 -0
  20. package/funcs/accountManagementGetUserCreditsUsage.d.ts.map +1 -0
  21. package/funcs/accountManagementGetUserCreditsUsage.js +129 -0
  22. package/funcs/accountManagementGetUserCreditsUsage.js.map +1 -0
  23. package/funcs/collectionsCreate.d.ts +1 -1
  24. package/funcs/collectionsCreate.js +1 -1
  25. package/funcs/collectionsDelete.d.ts +1 -1
  26. package/funcs/collectionsDelete.js +1 -1
  27. package/funcs/collectionsGet.d.ts +1 -1
  28. package/funcs/collectionsGet.js +1 -1
  29. package/funcs/collectionsList.d.ts +1 -1
  30. package/funcs/collectionsList.js +1 -1
  31. package/funcs/collectionsListEvents.d.ts +1 -1
  32. package/funcs/collectionsListEvents.js +1 -1
  33. package/funcs/collectionsUpdate.d.ts +1 -1
  34. package/funcs/collectionsUpdate.js +1 -1
  35. package/funcs/threatHuntingListThreats.d.ts +18 -0
  36. package/funcs/threatHuntingListThreats.d.ts.map +1 -0
  37. package/funcs/threatHuntingListThreats.js +130 -0
  38. package/funcs/threatHuntingListThreats.js.map +1 -0
  39. package/jsr.json +1 -1
  40. package/lib/config.d.ts +4 -4
  41. package/lib/config.js +4 -4
  42. package/lib/encodings.d.ts +1 -0
  43. package/lib/encodings.d.ts.map +1 -1
  44. package/lib/encodings.js +12 -1
  45. package/lib/encodings.js.map +1 -1
  46. package/lib/sdks.js +2 -2
  47. package/lib/sdks.js.map +1 -1
  48. package/models/components/alternativequery.d.ts +3 -3
  49. package/models/components/alternativequery.d.ts.map +1 -1
  50. package/models/components/alternativequery.js +2 -2
  51. package/models/components/alternativequery.js.map +1 -1
  52. package/models/components/attribute.d.ts +4 -3
  53. package/models/components/attribute.d.ts.map +1 -1
  54. package/models/components/attribute.js +3 -2
  55. package/models/components/attribute.js.map +1 -1
  56. package/models/components/certificate.d.ts +5 -5
  57. package/models/components/certificate.d.ts.map +1 -1
  58. package/models/components/certificate.js +3 -3
  59. package/models/components/certificate.js.map +1 -1
  60. package/models/components/certificaterevocationrevocationinfo.d.ts +3 -3
  61. package/models/components/certificaterevocationrevocationinfo.d.ts.map +1 -1
  62. package/models/components/certificaterevocationrevocationinfo.js +2 -2
  63. package/models/components/certificaterevocationrevocationinfo.js.map +1 -1
  64. package/models/components/cobaltstrikeconfig.d.ts +1 -0
  65. package/models/components/cobaltstrikeconfig.d.ts.map +1 -1
  66. package/models/components/cobaltstrikeconfig.js +2 -0
  67. package/models/components/cobaltstrikeconfig.js.map +1 -1
  68. package/models/components/collection.d.ts +9 -5
  69. package/models/components/collection.d.ts.map +1 -1
  70. package/models/components/collection.js +5 -2
  71. package/models/components/collection.js.map +1 -1
  72. package/models/components/creditexpiration.d.ts +4 -0
  73. package/models/components/creditexpiration.d.ts.map +1 -1
  74. package/models/components/creditexpiration.js +2 -0
  75. package/models/components/creditexpiration.js.map +1 -1
  76. package/models/components/creditusagereport.d.ts +44 -5
  77. package/models/components/creditusagereport.d.ts.map +1 -1
  78. package/models/components/creditusagereport.js +28 -7
  79. package/models/components/creditusagereport.js.map +1 -1
  80. package/models/components/creditusagereportperiod.d.ts +33 -0
  81. package/models/components/creditusagereportperiod.d.ts.map +1 -0
  82. package/models/components/creditusagereportperiod.js +65 -0
  83. package/models/components/creditusagereportperiod.js.map +1 -0
  84. package/models/components/cvsscomponents.d.ts +17 -17
  85. package/models/components/cvsscomponents.d.ts.map +1 -1
  86. package/models/components/cvsscomponents.js +9 -9
  87. package/models/components/cvsscomponents.js.map +1 -1
  88. package/models/components/cvssv4components.d.ts +29 -29
  89. package/models/components/cvssv4components.d.ts.map +1 -1
  90. package/models/components/cvssv4components.js +15 -17
  91. package/models/components/cvssv4components.js.map +1 -1
  92. package/models/components/dns.d.ts +5 -5
  93. package/models/components/dns.d.ts.map +1 -1
  94. package/models/components/dns.js +3 -3
  95. package/models/components/dns.js.map +1 -1
  96. package/models/components/dnsresourcerecord.d.ts +3 -3
  97. package/models/components/dnsresourcerecord.d.ts.map +1 -1
  98. package/models/components/dnsresourcerecord.js +2 -1
  99. package/models/components/dnsresourcerecord.js.map +1 -1
  100. package/models/components/endpointscan.d.ts +3 -3
  101. package/models/components/endpointscan.d.ts.map +1 -1
  102. package/models/components/endpointscan.js +2 -1
  103. package/models/components/endpointscan.js.map +1 -1
  104. package/models/components/endpointscanstate.d.ts +5 -3
  105. package/models/components/endpointscanstate.d.ts.map +1 -1
  106. package/models/components/endpointscanstate.js +4 -1
  107. package/models/components/endpointscanstate.js.map +1 -1
  108. package/models/components/eventassetchange.d.ts +3 -3
  109. package/models/components/eventassetchange.d.ts.map +1 -1
  110. package/models/components/eventassetchange.js +2 -2
  111. package/models/components/eventassetchange.js.map +1 -1
  112. package/models/components/eventstatuschange.d.ts +5 -5
  113. package/models/components/eventstatuschange.d.ts.map +1 -1
  114. package/models/components/eventstatuschange.js +3 -4
  115. package/models/components/eventstatuschange.js.map +1 -1
  116. package/models/components/extractedendpointdata.d.ts +17 -0
  117. package/models/components/extractedendpointdata.d.ts.map +1 -0
  118. package/models/components/extractedendpointdata.js +65 -0
  119. package/models/components/extractedendpointdata.js.map +1 -0
  120. package/models/components/extractedendpointdataanalyticsservice.d.ts +11 -0
  121. package/models/components/extractedendpointdataanalyticsservice.d.ts.map +1 -0
  122. package/models/components/extractedendpointdataanalyticsservice.js +51 -0
  123. package/models/components/extractedendpointdataanalyticsservice.js.map +1 -0
  124. package/models/components/extractedendpointdatacopyright.d.ts +13 -0
  125. package/models/components/extractedendpointdatacopyright.d.ts.map +1 -0
  126. package/models/components/extractedendpointdatacopyright.js +59 -0
  127. package/models/components/extractedendpointdatacopyright.js.map +1 -0
  128. package/models/components/hajime.d.ts +10 -0
  129. package/models/components/hajime.d.ts.map +1 -0
  130. package/models/components/hajime.js +56 -0
  131. package/models/components/hajime.js.map +1 -0
  132. package/models/components/hostdnsforwardresolution.d.ts +3 -3
  133. package/models/components/hostdnsforwardresolution.d.ts.map +1 -1
  134. package/models/components/hostdnsforwardresolution.js +2 -2
  135. package/models/components/hostdnsforwardresolution.js.map +1 -1
  136. package/models/components/http.d.ts +7 -0
  137. package/models/components/http.d.ts.map +1 -1
  138. package/models/components/http.js +7 -0
  139. package/models/components/http.js.map +1 -1
  140. package/models/components/httpredirectchainlink.d.ts +25 -0
  141. package/models/components/httpredirectchainlink.d.ts.map +1 -0
  142. package/models/components/httpredirectchainlink.js +70 -0
  143. package/models/components/httpredirectchainlink.js.map +1 -0
  144. package/models/components/index.d.ts +14 -0
  145. package/models/components/index.d.ts.map +1 -1
  146. package/models/components/index.js +14 -0
  147. package/models/components/index.js.map +1 -1
  148. package/models/components/jarmscan.d.ts +3 -3
  149. package/models/components/jarmscan.d.ts.map +1 -1
  150. package/models/components/jarmscan.js +2 -1
  151. package/models/components/jarmscan.js.map +1 -1
  152. package/models/components/kev.d.ts +3 -3
  153. package/models/components/kev.d.ts.map +1 -1
  154. package/models/components/kev.js +2 -2
  155. package/models/components/kev.js.map +1 -1
  156. package/models/components/label.d.ts +4 -3
  157. package/models/components/label.d.ts.map +1 -1
  158. package/models/components/label.js +3 -2
  159. package/models/components/label.js.map +1 -1
  160. package/models/components/matchedservice.d.ts +3 -3
  161. package/models/components/matchedservice.d.ts.map +1 -1
  162. package/models/components/matchedservice.js +2 -1
  163. package/models/components/matchedservice.js.map +1 -1
  164. package/models/components/networklog.d.ts +18 -0
  165. package/models/components/networklog.d.ts.map +1 -0
  166. package/models/components/networklog.js +58 -0
  167. package/models/components/networklog.js.map +1 -0
  168. package/models/components/networklogresourceinfo.d.ts +49 -0
  169. package/models/components/networklogresourceinfo.d.ts.map +1 -0
  170. package/models/components/networklogresourceinfo.js +64 -0
  171. package/models/components/networklogresourceinfo.js.map +1 -0
  172. package/models/components/paginationinfo.d.ts +1 -1
  173. package/models/components/reject.d.ts +3 -3
  174. package/models/components/reject.d.ts.map +1 -1
  175. package/models/components/reject.js +2 -2
  176. package/models/components/reject.js.map +1 -1
  177. package/models/components/representativeinfo.d.ts +3 -3
  178. package/models/components/representativeinfo.d.ts.map +1 -1
  179. package/models/components/representativeinfo.js +2 -1
  180. package/models/components/representativeinfo.js.map +1 -1
  181. package/models/components/responseenvelopethreatslistresponse.d.ts +11 -0
  182. package/models/components/responseenvelopethreatslistresponse.d.ts.map +1 -0
  183. package/models/components/responseenvelopethreatslistresponse.js +51 -0
  184. package/models/components/responseenvelopethreatslistresponse.js.map +1 -0
  185. package/models/components/responseenvelopeusercredits.d.ts +11 -0
  186. package/models/components/responseenvelopeusercredits.d.ts.map +1 -0
  187. package/models/components/responseenvelopeusercredits.js +51 -0
  188. package/models/components/responseenvelopeusercredits.js.map +1 -0
  189. package/models/components/risk.d.ts +8 -7
  190. package/models/components/risk.d.ts.map +1 -1
  191. package/models/components/risk.js +5 -6
  192. package/models/components/risk.js.map +1 -1
  193. package/models/components/rootstore.d.ts +3 -3
  194. package/models/components/rootstore.d.ts.map +1 -1
  195. package/models/components/rootstore.js +2 -1
  196. package/models/components/rootstore.js.map +1 -1
  197. package/models/components/searchconvertqueryresponse.d.ts +3 -3
  198. package/models/components/searchconvertqueryresponse.d.ts.map +1 -1
  199. package/models/components/searchconvertqueryresponse.js +2 -1
  200. package/models/components/searchconvertqueryresponse.js.map +1 -1
  201. package/models/components/service.d.ts +5 -3
  202. package/models/components/service.d.ts.map +1 -1
  203. package/models/components/service.js +4 -1
  204. package/models/components/service.js.map +1 -1
  205. package/models/components/serviceid.d.ts +3 -3
  206. package/models/components/serviceid.d.ts.map +1 -1
  207. package/models/components/serviceid.js +2 -1
  208. package/models/components/serviceid.js.map +1 -1
  209. package/models/components/servicescan.d.ts +5 -3
  210. package/models/components/servicescan.d.ts.map +1 -1
  211. package/models/components/servicescan.js +4 -1
  212. package/models/components/servicescan.js.map +1 -1
  213. package/models/components/sourceusagebreakdown.d.ts +9 -1
  214. package/models/components/sourceusagebreakdown.d.ts.map +1 -1
  215. package/models/components/sourceusagebreakdown.js +7 -0
  216. package/models/components/sourceusagebreakdown.js.map +1 -1
  217. package/models/components/threat.d.ts +4 -3
  218. package/models/components/threat.d.ts.map +1 -1
  219. package/models/components/threat.js +3 -1
  220. package/models/components/threat.js.map +1 -1
  221. package/models/components/threatlistitem.d.ts +42 -0
  222. package/models/components/threatlistitem.d.ts.map +1 -0
  223. package/models/components/threatlistitem.js +66 -0
  224. package/models/components/threatlistitem.js.map +1 -0
  225. package/models/components/threatreference.d.ts +13 -0
  226. package/models/components/threatreference.d.ts.map +1 -0
  227. package/models/components/threatreference.js +50 -0
  228. package/models/components/threatreference.js.map +1 -0
  229. package/models/components/threatslistresponse.d.ts +14 -0
  230. package/models/components/threatslistresponse.d.ts.map +1 -0
  231. package/models/components/threatslistresponse.js +51 -0
  232. package/models/components/threatslistresponse.js.map +1 -0
  233. package/models/components/tls.d.ts +3 -3
  234. package/models/components/tls.d.ts.map +1 -1
  235. package/models/components/tls.js +2 -1
  236. package/models/components/tls.js.map +1 -1
  237. package/models/components/tlsversiondata.d.ts +3 -3
  238. package/models/components/tlsversiondata.d.ts.map +1 -1
  239. package/models/components/tlsversiondata.js +2 -2
  240. package/models/components/tlsversiondata.js.map +1 -1
  241. package/models/components/trackedscantask.d.ts +3 -3
  242. package/models/components/trackedscantask.d.ts.map +1 -1
  243. package/models/components/trackedscantask.js +2 -1
  244. package/models/components/trackedscantask.js.map +1 -1
  245. package/models/components/usercredits.d.ts +17 -0
  246. package/models/components/usercredits.d.ts.map +1 -0
  247. package/models/components/usercredits.js +57 -0
  248. package/models/components/usercredits.js.map +1 -0
  249. package/models/components/vuln.d.ts +8 -7
  250. package/models/components/vuln.d.ts.map +1 -1
  251. package/models/components/vuln.js +5 -4
  252. package/models/components/vuln.js.map +1 -1
  253. package/models/operations/index.d.ts +3 -0
  254. package/models/operations/index.d.ts.map +1 -1
  255. package/models/operations/index.js +3 -0
  256. package/models/operations/index.js.map +1 -1
  257. package/models/operations/v3accountmanagementmembercreditsusage.d.ts +33 -3
  258. package/models/operations/v3accountmanagementmembercreditsusage.d.ts.map +1 -1
  259. package/models/operations/v3accountmanagementmembercreditsusage.js +17 -2
  260. package/models/operations/v3accountmanagementmembercreditsusage.js.map +1 -1
  261. package/models/operations/v3accountmanagementorgcreditsusage.d.ts +38 -3
  262. package/models/operations/v3accountmanagementorgcreditsusage.d.ts.map +1 -1
  263. package/models/operations/v3accountmanagementorgcreditsusage.js +20 -2
  264. package/models/operations/v3accountmanagementorgcreditsusage.js.map +1 -1
  265. package/models/operations/v3accountmanagementusercredits.d.ts +14 -0
  266. package/models/operations/v3accountmanagementusercredits.d.ts.map +1 -0
  267. package/models/operations/v3accountmanagementusercredits.js +58 -0
  268. package/models/operations/v3accountmanagementusercredits.js.map +1 -0
  269. package/models/operations/v3accountmanagementusercreditsusage.d.ts +57 -0
  270. package/models/operations/v3accountmanagementusercreditsusage.d.ts.map +1 -0
  271. package/models/operations/v3accountmanagementusercreditsusage.js +85 -0
  272. package/models/operations/v3accountmanagementusercreditsusage.js.map +1 -0
  273. package/models/operations/v3globaldatasearchaggregate.d.ts +1 -1
  274. package/models/operations/v3globaldatasearchquery.d.ts +1 -1
  275. package/models/operations/v3threathuntingthreatslist.d.ts +35 -0
  276. package/models/operations/v3threathuntingthreatslist.d.ts.map +1 -0
  277. package/models/operations/v3threathuntingthreatslist.js +71 -0
  278. package/models/operations/v3threathuntingthreatslist.js.map +1 -0
  279. package/package.json +1 -1
  280. package/sdk/accountmanagement.d.ts +18 -4
  281. package/sdk/accountmanagement.d.ts.map +1 -1
  282. package/sdk/accountmanagement.js +24 -4
  283. package/sdk/accountmanagement.js.map +1 -1
  284. package/sdk/collections.d.ts +6 -6
  285. package/sdk/collections.js +6 -6
  286. package/sdk/threathunting.d.ts +7 -0
  287. package/sdk/threathunting.d.ts.map +1 -1
  288. package/sdk/threathunting.js +10 -0
  289. package/sdk/threathunting.js.map +1 -1
  290. package/src/funcs/accountManagementGetMemberCreditUsage.ts +5 -2
  291. package/src/funcs/accountManagementGetOrganizationCreditUsage.ts +5 -1
  292. package/src/funcs/accountManagementGetOrganizationCredits.ts +1 -1
  293. package/src/funcs/accountManagementGetUserCredits.ts +163 -0
  294. package/src/funcs/accountManagementGetUserCreditsUsage.ts +190 -0
  295. package/src/funcs/collectionsCreate.ts +1 -1
  296. package/src/funcs/collectionsDelete.ts +1 -1
  297. package/src/funcs/collectionsGet.ts +1 -1
  298. package/src/funcs/collectionsList.ts +1 -1
  299. package/src/funcs/collectionsListEvents.ts +1 -1
  300. package/src/funcs/collectionsUpdate.ts +1 -1
  301. package/src/funcs/threatHuntingListThreats.ts +187 -0
  302. package/src/lib/config.ts +4 -4
  303. package/src/lib/encodings.ts +17 -3
  304. package/src/lib/sdks.ts +2 -2
  305. package/src/models/components/alternativequery.ts +5 -4
  306. package/src/models/components/attribute.ts +6 -4
  307. package/src/models/components/certificate.ts +14 -8
  308. package/src/models/components/certificaterevocationrevocationinfo.ts +5 -4
  309. package/src/models/components/cobaltstrikeconfig.ts +3 -0
  310. package/src/models/components/collection.ts +20 -8
  311. package/src/models/components/creditexpiration.ts +6 -0
  312. package/src/models/components/creditusagereport.ts +70 -11
  313. package/src/models/components/creditusagereportperiod.ts +69 -0
  314. package/src/models/components/cvsscomponents.ts +47 -30
  315. package/src/models/components/cvssv4components.ts +83 -53
  316. package/src/models/components/dns.ts +11 -8
  317. package/src/models/components/dnsresourcerecord.ts +8 -5
  318. package/src/models/components/endpointscan.ts +8 -5
  319. package/src/models/components/endpointscanstate.ts +14 -5
  320. package/src/models/components/eventassetchange.ts +8 -4
  321. package/src/models/components/eventstatuschange.ts +14 -7
  322. package/src/models/components/extractedendpointdata.ts +62 -0
  323. package/src/models/components/extractedendpointdataanalyticsservice.ts +34 -0
  324. package/src/models/components/extractedendpointdatacopyright.ts +43 -0
  325. package/src/models/components/hajime.ts +33 -0
  326. package/src/models/components/hostdnsforwardresolution.ts +8 -4
  327. package/src/models/components/http.ts +15 -0
  328. package/src/models/components/httpredirectchainlink.ts +65 -0
  329. package/src/models/components/index.ts +14 -0
  330. package/src/models/components/jarmscan.ts +8 -5
  331. package/src/models/components/kev.ts +8 -4
  332. package/src/models/components/label.ts +9 -4
  333. package/src/models/components/matchedservice.ts +8 -5
  334. package/src/models/components/networklog.ts +49 -0
  335. package/src/models/components/networklogresourceinfo.ts +84 -0
  336. package/src/models/components/paginationinfo.ts +1 -1
  337. package/src/models/components/reject.ts +8 -4
  338. package/src/models/components/representativeinfo.ts +8 -5
  339. package/src/models/components/responseenvelopethreatslistresponse.ts +36 -0
  340. package/src/models/components/responseenvelopeusercredits.ts +32 -0
  341. package/src/models/components/risk.ts +21 -10
  342. package/src/models/components/rootstore.ts +5 -5
  343. package/src/models/components/searchconvertqueryresponse.ts +8 -5
  344. package/src/models/components/service.ts +11 -5
  345. package/src/models/components/serviceid.ts +8 -5
  346. package/src/models/components/servicescan.ts +11 -5
  347. package/src/models/components/sourceusagebreakdown.ts +16 -1
  348. package/src/models/components/threat.ts +9 -4
  349. package/src/models/components/threatlistitem.ts +81 -0
  350. package/src/models/components/threatreference.ts +34 -0
  351. package/src/models/components/threatslistresponse.ts +38 -0
  352. package/src/models/components/tls.ts +8 -5
  353. package/src/models/components/tlsversiondata.ts +5 -4
  354. package/src/models/components/trackedscantask.ts +8 -5
  355. package/src/models/components/usercredits.ts +45 -0
  356. package/src/models/components/vuln.ts +21 -11
  357. package/src/models/operations/index.ts +3 -0
  358. package/src/models/operations/v3accountmanagementmembercreditsusage.ts +43 -4
  359. package/src/models/operations/v3accountmanagementorgcreditsusage.ts +49 -4
  360. package/src/models/operations/v3accountmanagementusercredits.ts +41 -0
  361. package/src/models/operations/v3accountmanagementusercreditsusage.ts +128 -0
  362. package/src/models/operations/v3globaldatasearchaggregate.ts +1 -1
  363. package/src/models/operations/v3globaldatasearchquery.ts +1 -1
  364. package/src/models/operations/v3threathuntingthreatslist.ts +86 -0
  365. package/src/sdk/accountmanagement.ts +38 -4
  366. package/src/sdk/collections.ts +6 -6
  367. package/src/sdk/threathunting.ts +18 -0
  368. package/src/types/enums.ts +38 -9
  369. package/src/types/index.ts +2 -2
  370. package/src/types/unrecognized.ts +35 -0
  371. package/tsconfig.json +1 -2
  372. package/types/enums.d.ts +8 -11
  373. package/types/enums.d.ts.map +1 -1
  374. package/types/enums.js +59 -3
  375. package/types/enums.js.map +1 -1
  376. package/types/index.d.ts +2 -2
  377. package/types/index.d.ts.map +1 -1
  378. package/types/index.js +16 -3
  379. package/types/index.js.map +1 -1
  380. package/types/unrecognized.d.ts +16 -0
  381. package/types/unrecognized.d.ts.map +1 -0
  382. package/types/unrecognized.js +34 -0
  383. package/types/unrecognized.js.map +1 -0
@@ -9,7 +9,7 @@ import * as operations from "../models/operations/index.js";
9
9
  import { APIPromise } from "../types/async.js";
10
10
  import { Result } from "../types/fp.js";
11
11
  /**
12
- * Get organization credit statistics
12
+ * Get organization credit balance
13
13
  *
14
14
  * @remarks
15
15
  * Retrieve credit balance and expiration information for an organization. <br><br>Credits expire 12 months after they are acquired.<br><br>This endpoint does not cost any credits to execute.
@@ -47,7 +47,7 @@ const errors = __importStar(require("../models/errors/index.js"));
47
47
  const operations = __importStar(require("../models/operations/index.js"));
48
48
  const async_js_1 = require("../types/async.js");
49
49
  /**
50
- * Get organization credit statistics
50
+ * Get organization credit balance
51
51
  *
52
52
  * @remarks
53
53
  * Retrieve credit balance and expiration information for an organization. <br><br>Credits expire 12 months after they are acquired.<br><br>This endpoint does not cost any credits to execute.
@@ -0,0 +1,18 @@
1
+ import { SDKCore } from "../core.js";
2
+ import { RequestOptions } from "../lib/sdks.js";
3
+ import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
4
+ import * as errors from "../models/errors/index.js";
5
+ import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
6
+ import { SDKBaseError } from "../models/errors/sdkbaseerror.js";
7
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
8
+ import * as operations from "../models/operations/index.js";
9
+ import { APIPromise } from "../types/async.js";
10
+ import { Result } from "../types/fp.js";
11
+ /**
12
+ * Get Free user credit balance
13
+ *
14
+ * @remarks
15
+ * Retrieve your Free user account credit balance and refresh information. To retrieve the credit balance for a Starter or Enterprise account, use the [get organization credit balance endpoint](https://docs.censys.com/reference/v3-accountmanagement-org-credits).<br><br>This endpoint does not cost any credits to execute.
16
+ */
17
+ export declare function accountManagementGetUserCredits(client: SDKCore, options?: RequestOptions): APIPromise<Result<operations.V3AccountmanagementUserCreditsResponse, errors.AuthenticationError | errors.ErrorModel | SDKBaseError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
18
+ //# sourceMappingURL=accountManagementGetUserCredits.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accountManagementGetUserCredits.d.ts","sourceRoot":"","sources":["../src/funcs/accountManagementGetUserCredits.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAGrC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;GAKG;AACH,wBAAgB,+BAA+B,CAC7C,MAAM,EAAE,OAAO,EACf,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,UAAU,CAAC,sCAAsC,EAC/C,MAAM,CAAC,mBAAmB,GAC1B,MAAM,CAAC,UAAU,GACjB,YAAY,GACZ,uBAAuB,GACvB,eAAe,GACf,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,qBAAqB,GACrB,kBAAkB,CACrB,CACF,CAKA"}
@@ -0,0 +1,112 @@
1
+ "use strict";
2
+ /*
3
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.accountManagementGetUserCredits = accountManagementGetUserCredits;
40
+ const M = __importStar(require("../lib/matchers.js"));
41
+ const primitives_js_1 = require("../lib/primitives.js");
42
+ const security_js_1 = require("../lib/security.js");
43
+ const url_js_1 = require("../lib/url.js");
44
+ const errors = __importStar(require("../models/errors/index.js"));
45
+ const operations = __importStar(require("../models/operations/index.js"));
46
+ const async_js_1 = require("../types/async.js");
47
+ /**
48
+ * Get Free user credit balance
49
+ *
50
+ * @remarks
51
+ * Retrieve your Free user account credit balance and refresh information. To retrieve the credit balance for a Starter or Enterprise account, use the [get organization credit balance endpoint](https://docs.censys.com/reference/v3-accountmanagement-org-credits).<br><br>This endpoint does not cost any credits to execute.
52
+ */
53
+ function accountManagementGetUserCredits(client, options) {
54
+ return new async_js_1.APIPromise($do(client, options));
55
+ }
56
+ async function $do(client, options) {
57
+ const path = (0, url_js_1.pathToFunc)("/v3/accounts/users/credits")();
58
+ const headers = new Headers((0, primitives_js_1.compactMap)({
59
+ Accept: "application/json",
60
+ }));
61
+ const secConfig = await (0, security_js_1.extractSecurity)(client._options.personalAccessToken);
62
+ const securityInput = secConfig == null
63
+ ? {}
64
+ : { personalAccessToken: secConfig };
65
+ const requestSecurity = (0, security_js_1.resolveGlobalSecurity)(securityInput);
66
+ const context = {
67
+ options: client._options,
68
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
69
+ operationID: "v3-accountmanagement-user-credits",
70
+ oAuth2Scopes: null,
71
+ resolvedSecurity: requestSecurity,
72
+ securitySource: client._options.personalAccessToken,
73
+ retryConfig: options?.retries
74
+ || client._options.retryConfig
75
+ || { strategy: "none" },
76
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
77
+ };
78
+ const requestRes = client._createRequest(context, {
79
+ security: requestSecurity,
80
+ method: "GET",
81
+ baseURL: options?.serverURL,
82
+ path: path,
83
+ headers: headers,
84
+ userAgent: client._options.userAgent,
85
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
86
+ }, options);
87
+ if (!requestRes.ok) {
88
+ return [requestRes, { status: "invalid" }];
89
+ }
90
+ const req = requestRes.value;
91
+ const doResult = await client._do(req, {
92
+ context,
93
+ errorCodes: ["401", "404", "4XX", "5XX"],
94
+ retryConfig: context.retryConfig,
95
+ retryCodes: context.retryCodes,
96
+ });
97
+ if (!doResult.ok) {
98
+ return [doResult, { status: "request-error", request: req }];
99
+ }
100
+ const response = doResult.value;
101
+ const responseFields = {
102
+ HttpMeta: { Response: response, Request: req },
103
+ };
104
+ const [result] = await M.match(M.json(200, operations.V3AccountmanagementUserCreditsResponse$inboundSchema, { hdrs: true, key: "Result" }), M.jsonErr(401, errors.AuthenticationError$inboundSchema), M.jsonErr(404, errors.ErrorModel$inboundSchema, {
105
+ ctype: "application/problem+json",
106
+ }), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
107
+ if (!result.ok) {
108
+ return [result, { status: "complete", request: req, response }];
109
+ }
110
+ return [result, { status: "complete", request: req, response }];
111
+ }
112
+ //# sourceMappingURL=accountManagementGetUserCredits.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accountManagementGetUserCredits.js","sourceRoot":"","sources":["../src/funcs/accountManagementGetUserCredits.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BH,0EAsBC;AAhDD,sDAAwC;AACxC,wDAAkD;AAElD,oDAA4E;AAC5E,0CAA2C;AAQ3C,kEAAoD;AAIpD,0EAA4D;AAC5D,gDAAwD;AAGxD;;;;;GAKG;AACH,SAAgB,+BAA+B,CAC7C,MAAe,EACf,OAAwB;IAgBxB,OAAO,IAAI,qBAAU,CAAC,GAAG,CACvB,MAAM,EACN,OAAO,CACR,CAAC,CAAC;AACL,CAAC;AAED,KAAK,UAAU,GAAG,CAChB,MAAe,EACf,OAAwB;IAmBxB,MAAM,IAAI,GAAG,IAAA,mBAAU,EAAC,4BAA4B,CAAC,EAAE,CAAC;IAExD,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,IAAA,0BAAU,EAAC;QACrC,MAAM,EAAE,kBAAkB;KAC3B,CAAC,CAAC,CAAC;IAEJ,MAAM,SAAS,GAAG,MAAM,IAAA,6BAAe,EAAC,MAAM,CAAC,QAAQ,CAAC,mBAAmB,CAAC,CAAC;IAC7E,MAAM,aAAa,GAAG,SAAS,IAAI,IAAI;QACrC,CAAC,CAAC,EAAE;QACJ,CAAC,CAAC,EAAE,mBAAmB,EAAE,SAAS,EAAE,CAAC;IACvC,MAAM,eAAe,GAAG,IAAA,mCAAqB,EAAC,aAAa,CAAC,CAAC;IAE7D,MAAM,OAAO,GAAG;QACd,OAAO,EAAE,MAAM,CAAC,QAAQ;QACxB,OAAO,EAAE,OAAO,EAAE,SAAS,IAAI,MAAM,CAAC,QAAQ,IAAI,EAAE;QACpD,WAAW,EAAE,mCAAmC;QAChD,YA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AE,GAAG,EAAE,CAAC,CAAC;IAC/D,CAAC;IACD,MAAM,QAAQ,GAAG,QAAQ,CAAC,KAAK,CAAC;IAEhC,MAAM,cAAc,GAAG;QACrB,QAAQ,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE;KAC/C,CAAC;IAEF,MAAM,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC,KAAK,CAa5B,CAAC,CAAC,IAAI,CACJ,GAAG,EACH,UAAU,CAAC,oDAAoD,EAC/D,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,CAC9B,EACD,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,iCAAiC,CAAC,EACxD,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,wBAAwB,EAAE;QAC9C,KAAK,EAAE,0BAA0B;KAClC,CAAC,EACF,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,EACb,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CACd,CAAC,QAAQ,EAAE,GAAG,EAAE,EAAE,WAAW,EAAE,cAAc,EAAE,CAAC,CAAC;IAClD,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;IAClE,CAAC;IAED,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;AAClE,CAAC"}
@@ -0,0 +1,18 @@
1
+ import { SDKCore } from "../core.js";
2
+ import { RequestOptions } from "../lib/sdks.js";
3
+ import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
4
+ import * as errors from "../models/errors/index.js";
5
+ import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
6
+ import { SDKBaseError } from "../models/errors/sdkbaseerror.js";
7
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
8
+ import * as operations from "../models/operations/index.js";
9
+ import { APIPromise } from "../types/async.js";
10
+ import { Result } from "../types/fp.js";
11
+ /**
12
+ * Get Free user credit usage
13
+ *
14
+ * @remarks
15
+ * Retrieve your Free user account credit consumption information over a specific date range. You must include a start date in your request.<br><br>This endpoint does not cost any credits to execute.
16
+ */
17
+ export declare function accountManagementGetUserCreditsUsage(client: SDKCore, request: operations.V3AccountmanagementUserCreditsUsageRequest, options?: RequestOptions): APIPromise<Result<operations.V3AccountmanagementUserCreditsUsageResponse, errors.AuthenticationError | errors.ErrorModel | SDKBaseError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
18
+ //# sourceMappingURL=accountManagementGetUserCreditsUsage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accountManagementGetUserCreditsUsage.d.ts","sourceRoot":"","sources":["../src/funcs/accountManagementGetUserCreditsUsage.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAKrC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;GAKG;AACH,wBAAgB,oCAAoC,CAClD,MAAM,EAAE,OAAO,EACf,OAAO,EAAE,UAAU,CAAC,0CAA0C,EAC9D,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,UAAU,CAAC,2CAA2C,EACpD,MAAM,CAAC,mBAAmB,GAC1B,MAAM,CAAC,UAAU,GACjB,YAAY,GACZ,uBAAuB,GACvB,eAAe,GACf,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,qBAAqB,GACrB,kBAAkB,CACrB,CACF,CAMA"}
@@ -0,0 +1,129 @@
1
+ "use strict";
2
+ /*
3
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.accountManagementGetUserCreditsUsage = accountManagementGetUserCreditsUsage;
40
+ const encodings_js_1 = require("../lib/encodings.js");
41
+ const M = __importStar(require("../lib/matchers.js"));
42
+ const primitives_js_1 = require("../lib/primitives.js");
43
+ const schemas_js_1 = require("../lib/schemas.js");
44
+ const security_js_1 = require("../lib/security.js");
45
+ const url_js_1 = require("../lib/url.js");
46
+ const errors = __importStar(require("../models/errors/index.js"));
47
+ const operations = __importStar(require("../models/operations/index.js"));
48
+ const async_js_1 = require("../types/async.js");
49
+ /**
50
+ * Get Free user credit usage
51
+ *
52
+ * @remarks
53
+ * Retrieve your Free user account credit consumption information over a specific date range. You must include a start date in your request.<br><br>This endpoint does not cost any credits to execute.
54
+ */
55
+ function accountManagementGetUserCreditsUsage(client, request, options) {
56
+ return new async_js_1.APIPromise($do(client, request, options));
57
+ }
58
+ async function $do(client, request, options) {
59
+ const parsed = (0, schemas_js_1.safeParse)(request, (value) => operations.V3AccountmanagementUserCreditsUsageRequest$outboundSchema
60
+ .parse(value), "Input validation failed");
61
+ if (!parsed.ok) {
62
+ return [parsed, { status: "invalid" }];
63
+ }
64
+ const payload = parsed.value;
65
+ const body = null;
66
+ const path = (0, url_js_1.pathToFunc)("/v3/accounts/users/credits/usage")();
67
+ const query = (0, encodings_js_1.encodeFormQuery)({
68
+ "date": payload.date,
69
+ "end_date": payload.end_date,
70
+ "granularity": payload.granularity,
71
+ "start_date": payload.start_date,
72
+ }, { explode: false });
73
+ const headers = new Headers((0, primitives_js_1.compactMap)({
74
+ Accept: "application/json",
75
+ }));
76
+ const secConfig = await (0, security_js_1.extractSecurity)(client._options.personalAccessToken);
77
+ const securityInput = secConfig == null
78
+ ? {}
79
+ : { personalAccessToken: secConfig };
80
+ const requestSecurity = (0, security_js_1.resolveGlobalSecurity)(securityInput);
81
+ const context = {
82
+ options: client._options,
83
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
84
+ operationID: "v3-accountmanagement-user-credits-usage",
85
+ oAuth2Scopes: null,
86
+ resolvedSecurity: requestSecurity,
87
+ securitySource: client._options.personalAccessToken,
88
+ retryConfig: options?.retries
89
+ || client._options.retryConfig
90
+ || { strategy: "none" },
91
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
92
+ };
93
+ const requestRes = client._createRequest(context, {
94
+ security: requestSecurity,
95
+ method: "GET",
96
+ baseURL: options?.serverURL,
97
+ path: path,
98
+ headers: headers,
99
+ query: query,
100
+ body: body,
101
+ userAgent: client._options.userAgent,
102
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
103
+ }, options);
104
+ if (!requestRes.ok) {
105
+ return [requestRes, { status: "invalid" }];
106
+ }
107
+ const req = requestRes.value;
108
+ const doResult = await client._do(req, {
109
+ context,
110
+ errorCodes: ["401", "404", "4XX", "5XX"],
111
+ retryConfig: context.retryConfig,
112
+ retryCodes: context.retryCodes,
113
+ });
114
+ if (!doResult.ok) {
115
+ return [doResult, { status: "request-error", request: req }];
116
+ }
117
+ const response = doResult.value;
118
+ const responseFields = {
119
+ HttpMeta: { Response: response, Request: req },
120
+ };
121
+ const [result] = await M.match(M.json(200, operations.V3AccountmanagementUserCreditsUsageResponse$inboundSchema, { hdrs: true, key: "Result" }), M.jsonErr(401, errors.AuthenticationError$inboundSchema), M.jsonErr(404, errors.ErrorModel$inboundSchema, {
122
+ ctype: "application/problem+json",
123
+ }), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
124
+ if (!result.ok) {
125
+ return [result, { status: "complete", request: req, response }];
126
+ }
127
+ return [result, { status: "complete", request: req, response }];
128
+ }
129
+ //# sourceMappingURL=accountManagementGetUserCreditsUsage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accountManagementGetUserCreditsUsage.js","sourceRoot":"","sources":["../src/funcs/accountManag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,GAAG,EAAE,EAAE,WAAW,EAAE,cAAc,EAAE,CAAC,CAAC;IAClD,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;IAClE,CAAC;IAED,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;AAClE,CAAC"}
@@ -12,7 +12,7 @@ import { Result } from "../types/fp.js";
12
12
  * Create a collection
13
13
  *
14
14
  * @remarks
15
- * Create a new collection.
15
+ * Create a new collection.<br><br>This endpoint does not cost credits to execute.
16
16
  */
17
17
  export declare function collectionsCreate(client: SDKCore, request: operations.V3CollectionsCrudCreateRequest, options?: RequestOptions): APIPromise<Result<operations.V3CollectionsCrudCreateResponse, errors.AuthenticationError | errors.ErrorModel | SDKBaseError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
18
18
  //# sourceMappingURL=collectionsCreate.d.ts.map
@@ -50,7 +50,7 @@ const async_js_1 = require("../types/async.js");
50
50
  * Create a collection
51
51
  *
52
52
  * @remarks
53
- * Create a new collection.
53
+ * Create a new collection.<br><br>This endpoint does not cost credits to execute.
54
54
  */
55
55
  function collectionsCreate(client, request, options) {
56
56
  return new async_js_1.APIPromise($do(client, request, options));
@@ -16,7 +16,7 @@ export declare enum DeleteAcceptEnum {
16
16
  * Delete a collection
17
17
  *
18
18
  * @remarks
19
- * Delete a collection.
19
+ * Delete a collection.<br><br>This endpoint does not cost credits to execute.
20
20
  */
21
21
  export declare function collectionsDelete(client: SDKCore, request: operations.V3CollectionsCrudDeleteRequest, options?: RequestOptions & {
22
22
  acceptHeaderOverride?: DeleteAcceptEnum;
@@ -56,7 +56,7 @@ var DeleteAcceptEnum;
56
56
  * Delete a collection
57
57
  *
58
58
  * @remarks
59
- * Delete a collection.
59
+ * Delete a collection.<br><br>This endpoint does not cost credits to execute.
60
60
  */
61
61
  function collectionsDelete(client, request, options) {
62
62
  return new async_js_1.APIPromise($do(client, request, options));
@@ -12,7 +12,7 @@ import { Result } from "../types/fp.js";
12
12
  * Get a collection
13
13
  *
14
14
  * @remarks
15
- * Retrieve information about a collection. Retrieved information includes its name, query, description, status, and asset count.
15
+ * Retrieve information about a collection. Retrieved information includes its name, query, description, status, and asset count.<br><br>This endpoint does not cost credits to execute.
16
16
  */
17
17
  export declare function collectionsGet(client: SDKCore, request: operations.V3CollectionsCrudGetRequest, options?: RequestOptions): APIPromise<Result<operations.V3CollectionsCrudGetResponse, errors.AuthenticationError | errors.ErrorModel | SDKBaseError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
18
18
  //# sourceMappingURL=collectionsGet.d.ts.map
@@ -50,7 +50,7 @@ const async_js_1 = require("../types/async.js");
50
50
  * Get a collection
51
51
  *
52
52
  * @remarks
53
- * Retrieve information about a collection. Retrieved information includes its name, query, description, status, and asset count.
53
+ * Retrieve information about a collection. Retrieved information includes its name, query, description, status, and asset count.<br><br>This endpoint does not cost credits to execute.
54
54
  */
55
55
  function collectionsGet(client, request, options) {
56
56
  return new async_js_1.APIPromise($do(client, request, options));
@@ -12,7 +12,7 @@ import { Result } from "../types/fp.js";
12
12
  * List collections
13
13
  *
14
14
  * @remarks
15
- * List all collections for an organization. Retrieved information includes collection ID, name, query, description, status, and asset count.
15
+ * List all collections for an organization. Retrieved information includes collection ID, name, query, description, status, and asset count.<br><br>This endpoint does not cost credits to execute.
16
16
  */
17
17
  export declare function collectionsList(client: SDKCore, request: operations.V3CollectionsCrudListRequest, options?: RequestOptions): APIPromise<Result<operations.V3CollectionsCrudListResponse, errors.AuthenticationError | errors.ErrorModel | SDKBaseError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
18
18
  //# sourceMappingURL=collectionsList.d.ts.map
@@ -50,7 +50,7 @@ const async_js_1 = require("../types/async.js");
50
50
  * List collections
51
51
  *
52
52
  * @remarks
53
- * List all collections for an organization. Retrieved information includes collection ID, name, query, description, status, and asset count.
53
+ * List all collections for an organization. Retrieved information includes collection ID, name, query, description, status, and asset count.<br><br>This endpoint does not cost credits to execute.
54
54
  */
55
55
  function collectionsList(client, request, options) {
56
56
  return new async_js_1.APIPromise($do(client, request, options));
@@ -12,7 +12,7 @@ import { Result } from "../types/fp.js";
12
12
  * Get a collection's events
13
13
  *
14
14
  * @remarks
15
- * Retrieve the event history for a collection. This includes the addition or removal of assets as well as collection status changes.
15
+ * Retrieve the event history for a collection. This includes the addition or removal of assets as well as collection status changes.<br><br>This endpoint does not cost credits to execute.
16
16
  */
17
17
  export declare function collectionsListEvents(client: SDKCore, request: operations.V3CollectionsListEventsRequest, options?: RequestOptions): APIPromise<Result<operations.V3CollectionsListEventsResponse, errors.AuthenticationError | errors.ErrorModel | SDKBaseError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
18
18
  //# sourceMappingURL=collectionsListEvents.d.ts.map
@@ -50,7 +50,7 @@ const async_js_1 = require("../types/async.js");
50
50
  * Get a collection's events
51
51
  *
52
52
  * @remarks
53
- * Retrieve the event history for a collection. This includes the addition or removal of assets as well as collection status changes.
53
+ * Retrieve the event history for a collection. This includes the addition or removal of assets as well as collection status changes.<br><br>This endpoint does not cost credits to execute.
54
54
  */
55
55
  function collectionsListEvents(client, request, options) {
56
56
  return new async_js_1.APIPromise($do(client, request, options));
@@ -12,7 +12,7 @@ import { Result } from "../types/fp.js";
12
12
  * Update a collection
13
13
  *
14
14
  * @remarks
15
- * Update a collection's name, description, and/or query.
15
+ * Update a collection's name, description, and/or query.<br><br>This endpoint does not cost credits to execute.
16
16
  */
17
17
  export declare function collectionsUpdate(client: SDKCore, request: operations.V3CollectionsCrudUpdateRequest, options?: RequestOptions): APIPromise<Result<operations.V3CollectionsCrudUpdateResponse, errors.AuthenticationError | errors.ErrorModel | SDKBaseError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
18
18
  //# sourceMappingURL=collectionsUpdate.d.ts.map
@@ -50,7 +50,7 @@ const async_js_1 = require("../types/async.js");
50
50
  * Update a collection
51
51
  *
52
52
  * @remarks
53
- * Update a collection's name, description, and/or query.
53
+ * Update a collection's name, description, and/or query.<br><br>This endpoint does not cost credits to execute.
54
54
  */
55
55
  function collectionsUpdate(client, request, options) {
56
56
  return new async_js_1.APIPromise($do(client, request, options));
@@ -0,0 +1,18 @@
1
+ import { SDKCore } from "../core.js";
2
+ import { RequestOptions } from "../lib/sdks.js";
3
+ import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
4
+ import * as errors from "../models/errors/index.js";
5
+ import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
6
+ import { SDKBaseError } from "../models/errors/sdkbaseerror.js";
7
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
8
+ import * as operations from "../models/operations/index.js";
9
+ import { APIPromise } from "../types/async.js";
10
+ import { Result } from "../types/fp.js";
11
+ /**
12
+ * List active threats
13
+ *
14
+ * @remarks
15
+ * Retrieve a list of active threats observed by Censys by aggregating threat IDs across hosts and web properties. Threats are active if their fingerprint has been identified on hosts or web properties by Censys scans. This information is also available on the [Explore Threats page in the Platform web UI](https://platform.censys.io/threats).<br><br>This endpoint is available to organizations that have access to the Threat Hunting module.
16
+ */
17
+ export declare function threatHuntingListThreats(client: SDKCore, request: operations.V3ThreathuntingThreatsListRequest, options?: RequestOptions): APIPromise<Result<operations.V3ThreathuntingThreatsListResponse, errors.AuthenticationError | errors.ErrorModel | SDKBaseError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
18
+ //# sourceMappingURL=threatHuntingListThreats.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"threatHuntingListThreats.d.ts","sourceRoot":"","sources":["../src/funcs/threatHuntingListThreats.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAKrC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;GAKG;AACH,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,OAAO,EACf,OAAO,EAAE,UAAU,CAAC,iCAAiC,EACrD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,UAAU,CAAC,kCAAkC,EAC3C,MAAM,CAAC,mBAAmB,GAC1B,MAAM,CAAC,UAAU,GACjB,YAAY,GACZ,uBAAuB,GACvB,eAAe,GACf,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,qBAAqB,GACrB,kBAAkB,CACrB,CACF,CAMA"}
@@ -0,0 +1,130 @@
1
+ "use strict";
2
+ /*
3
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.threatHuntingListThreats = threatHuntingListThreats;
40
+ const encodings_js_1 = require("../lib/encodings.js");
41
+ const M = __importStar(require("../lib/matchers.js"));
42
+ const primitives_js_1 = require("../lib/primitives.js");
43
+ const schemas_js_1 = require("../lib/schemas.js");
44
+ const security_js_1 = require("../lib/security.js");
45
+ const url_js_1 = require("../lib/url.js");
46
+ const errors = __importStar(require("../models/errors/index.js"));
47
+ const operations = __importStar(require("../models/operations/index.js"));
48
+ const async_js_1 = require("../types/async.js");
49
+ /**
50
+ * List active threats
51
+ *
52
+ * @remarks
53
+ * Retrieve a list of active threats observed by Censys by aggregating threat IDs across hosts and web properties. Threats are active if their fingerprint has been identified on hosts or web properties by Censys scans. This information is also available on the [Explore Threats page in the Platform web UI](https://platform.censys.io/threats).<br><br>This endpoint is available to organizations that have access to the Threat Hunting module.
54
+ */
55
+ function threatHuntingListThreats(client, request, options) {
56
+ return new async_js_1.APIPromise($do(client, request, options));
57
+ }
58
+ async function $do(client, request, options) {
59
+ const parsed = (0, schemas_js_1.safeParse)(request, (value) => operations.V3ThreathuntingThreatsListRequest$outboundSchema.parse(value), "Input validation failed");
60
+ if (!parsed.ok) {
61
+ return [parsed, { status: "invalid" }];
62
+ }
63
+ const payload = parsed.value;
64
+ const body = null;
65
+ const path = (0, url_js_1.pathToFunc)("/v3/threat-hunting/threats")();
66
+ const query = (0, encodings_js_1.encodeFormQuery)({
67
+ "organization_id": payload.organization_id
68
+ ?? client._options.organizationId,
69
+ "query": payload.query,
70
+ }, { explode: false });
71
+ const headers = new Headers((0, primitives_js_1.compactMap)({
72
+ Accept: "application/json",
73
+ }));
74
+ const secConfig = await (0, security_js_1.extractSecurity)(client._options.personalAccessToken);
75
+ const securityInput = secConfig == null
76
+ ? {}
77
+ : { personalAccessToken: secConfig };
78
+ const requestSecurity = (0, security_js_1.resolveGlobalSecurity)(securityInput);
79
+ const context = {
80
+ options: client._options,
81
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
82
+ operationID: "v3-threathunting-threats-list",
83
+ oAuth2Scopes: null,
84
+ resolvedSecurity: requestSecurity,
85
+ securitySource: client._options.personalAccessToken,
86
+ retryConfig: options?.retries
87
+ || client._options.retryConfig
88
+ || { strategy: "none" },
89
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
90
+ };
91
+ const requestRes = client._createRequest(context, {
92
+ security: requestSecurity,
93
+ method: "GET",
94
+ baseURL: options?.serverURL,
95
+ path: path,
96
+ headers: headers,
97
+ query: query,
98
+ body: body,
99
+ userAgent: client._options.userAgent,
100
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
101
+ }, options);
102
+ if (!requestRes.ok) {
103
+ return [requestRes, { status: "invalid" }];
104
+ }
105
+ const req = requestRes.value;
106
+ const doResult = await client._do(req, {
107
+ context,
108
+ errorCodes: ["401", "403", "422", "4XX", "5XX"],
109
+ retryConfig: context.retryConfig,
110
+ retryCodes: context.retryCodes,
111
+ });
112
+ if (!doResult.ok) {
113
+ return [doResult, { status: "request-error", request: req }];
114
+ }
115
+ const response = doResult.value;
116
+ const responseFields = {
117
+ HttpMeta: { Response: response, Request: req },
118
+ };
119
+ const [result] = await M.match(M.json(200, operations.V3ThreathuntingThreatsListResponse$inboundSchema, {
120
+ hdrs: true,
121
+ key: "Result",
122
+ }), M.jsonErr(401, errors.AuthenticationError$inboundSchema), M.jsonErr([403, 422], errors.ErrorModel$inboundSchema, {
123
+ ctype: "application/problem+json",
124
+ }), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
125
+ if (!result.ok) {
126
+ return [result, { status: "complete", request: req, response }];
127
+ }
128
+ return [result, { status: "complete", request: req, response }];
129
+ }
130
+ //# sourceMappingURL=threatHuntingListThreats.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"threatHuntingListThreats.js","sourceRoot":"","sources":["../src/funcs/threatHuntingListThreats.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BH,4DAwBC;AApDD,sDAAsD;AACtD,sDAAwC;AACxC,wDAAkD;AAClD,kDAA8C;AAE9C,oDAA4E;AAC5E,0CAA2C;AAQ3C,kEAAoD;AAIpD,0EAA4D;AAC5D,gDAAwD;AAGxD;;;;;GAKG;AACH,SAAgB,wBAAwB,CACtC,MAAe,EACf,OAAqD,EACrD,OAAwB;IAgBxB,OAAO,IAAI,qBAAU,CAAC,GAAG,CACvB,MAAM,EACN,OAAO,EACP,OAAO,CACR,CAAC,CAAC;AACL,CAAC;AAED,KAAK,UAAU,GAAG,CAChB,MAAe,EACf,OAAqD,EACrD,OAAwB;I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./src/index.ts",
8
8
  "./models/errors": "./src/models/errors/index.ts",