diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 69102d2..af93d56 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,25 +1,25 @@ lockVersion: 2.0.0 id: 5ca2c9b7-aea6-4a23-a631-998fcc6c18a8 management: - docChecksum: 269986e028193a25443c5b9e34f232c6 - docVersion: 1.0.103 - speakeasyVersion: 1.769.2 - generationVersion: 2.892.5 - releaseVersion: 0.14.0 - configChecksum: 69d1cc873719d52c3a59e7b653a5ec73 + docChecksum: 012c0d5374289fca8b5a197e3d4572a9 + docVersion: 1.0.105 + speakeasyVersion: 1.773.1 + generationVersion: 2.897.1 + releaseVersion: 0.14.1 + configChecksum: e55be9209e4d081701e730a8cbf66dd6 repoURL: https://github.com/censys/censys-sdk-python.git installationURL: https://github.com/censys/censys-sdk-python.git published: true persistentEdits: - generation_id: 28e65c8d-aa6b-4d9e-93d0-0f10da12e455 - pristine_commit_hash: 29a99aab0068e4cb92519d7d106ef09ff43b695a - pristine_tree_hash: 08fe32f074079ffc7f2a6083aa5a667b18028161 + generation_id: df7c96b5-2810-479c-9717-5809b676ad07 + pristine_commit_hash: 60007caea838d91ce773798fb04dd311516dc3cf + pristine_tree_hash: ac064187cca346b37b5047e913b2ec15f866154b features: python: acceptHeaders: 3.0.0 additionalDependencies: 1.1.0 constsAndDefaults: 1.0.7 - core: 6.0.24 + core: 6.0.27 defaultEnabledRetries: 0.2.0 downloadStreams: 1.0.1 enumUnions: 0.1.1 @@ -560,6 +560,54 @@ trackedFiles: id: 6f7c172f232b last_write_checksum: sha1:f9170d6ce5c12bb5d0fc9714f19ad465b90fa55f pristine_git_object: 407c66cb42830108c46afe05baeb45eb58ebb14d + docs/models/dnsipresolutionboundresponse.md: + id: 8319be328e7f + last_write_checksum: sha1:628732275afb1c9878a71d1a94fc7bb4bb2bfe44 + pristine_git_object: 38d3222dd288b39d12c3d8a2e65c64fa5830d896 + docs/models/dnsipresolutionrangerecord.md: + id: ddac79e5ff9b + last_write_checksum: sha1:e8faa3ee5fe6086421ebf41cec37d0295dec4c4b + pristine_git_object: b56dcdad3adc5cd1972197eb30ede7a4d906c2d3 + docs/models/dnsipresolutionrangerecordrecordtype.md: + id: 3e9b842a4b3a + last_write_checksum: sha1:40b7a7c341352cf133d70b4ed76933ec7aa2f56e + pristine_git_object: 9317cc14b2e338b0406180ec971ce4b2ffe46c7d + docs/models/dnsipresolutionrangeresponse.md: + id: 253aba81981a + last_write_checksum: sha1:848084a0cee5e8b2d687a78c0dfb9019c344190b + pristine_git_object: 308bfe4f630f75e171078ac372a59b9fe2c467b1 + docs/models/dnsipresolutionrecord.md: + id: 3131b868ae67 + last_write_checksum: sha1:b9029b08a8dda945734c1afabb0c62eb93a79fe0 + pristine_git_object: e4174798b6b2e559a24dc93a85bcad42fa1053d3 + docs/models/dnsipresolutionrecordrecordtype.md: + id: 3c6d0d5a7c23 + last_write_checksum: sha1:afc8e5473b7bc10f1b986d9a3bbbcb3aceef719c + pristine_git_object: 6882f804b12a4ce7b1a6d86e3f52a8a3fc8b3f90 + docs/models/dnsnameresolutionboundresponse.md: + id: 39aa89019f9f + last_write_checksum: sha1:7669bc50de20e3e12f427bba5a3ac6b804032a1b + pristine_git_object: 702ec1c3a1baf90de748aa7651f25b0818976a46 + docs/models/dnsnameresolutionrangeresponse.md: + id: ca8d6239bfec + last_write_checksum: sha1:936d154aff84fe781537efad9ba06d5d15940dab + pristine_git_object: af9c310e4ebbbdd14067c9127ce3351986353c76 + docs/models/dnsresolutionrangerecord.md: + id: 4de192d7d744 + last_write_checksum: sha1:f9691aca986e0d7b53b73a7cdd56c565ecb0f8fd + pristine_git_object: 2d1ffb7c9861db749140e064d59212e90caf1c97 + docs/models/dnsresolutionrangerecordrecordtype.md: + id: a0063162ed9b + last_write_checksum: sha1:4d03c049b89f9263531a6dc462239ac57997b477 + pristine_git_object: 670d9ddf363e12d2742e74678f21c2c68b97371a + docs/models/dnsresolutionrecord.md: + id: d57da9cbca34 + last_write_checksum: sha1:42d52970ecc0689a0e9af5d4905f48991f705738 + pristine_git_object: 1e060666d56f872dbe5e2dc2278d800533264735 + docs/models/dnsresolutionrecordrecordtype.md: + id: 97ba8ecb8a1f + last_write_checksum: sha1:e66c1ad6e6e957670e63bacc77d53c0fbc4eca21 + pristine_git_object: 44090cfd30bf2f943a4dde17c695436d06126073 docs/models/dnsresourcerecord.md: id: 00cfa4eae20a last_write_checksum: sha1:4da2baae61743be485b11920d84e37f6b27adef7 @@ -1796,6 +1844,10 @@ trackedFiles: id: facc1b8a819b last_write_checksum: sha1:12df7ebcb3c86ae343603fbddf317d118090b07d pristine_git_object: b5c5524733c421a45416d75d7ee16579a9361737 + docs/models/queryparamrecordtypes.md: + id: 2d1bb9c4e269 + last_write_checksum: sha1:39b4f281e8732df64dab4b6a889e2cbe125734f3 + pristine_git_object: f9b3f9a819b38295213964444d71ba4664e50a85 docs/models/queryparamtransportprotocol.md: id: b6531f948a00 last_write_checksum: sha1:386ab93342f86c93e671fe9cedd0d18faba4daa9 @@ -1860,6 +1912,10 @@ trackedFiles: id: 4a0589693388 last_write_checksum: sha1:3ec3c18f22e4c8d7c1dd2ed0cfc58efd55014f0c pristine_git_object: 31840963e5430cf74214c67d5d92d8fc3cd908de + docs/models/recordtypes.md: + id: 60b7bb15e902 + last_write_checksum: sha1:6e5b415e6be534ac83757858e68c620398197891 + pristine_git_object: 70d430100dc53e88f3a9b1ad2a1d2184e5d25f9a docs/models/recovery.md: id: 4b7f781e8651 last_write_checksum: sha1:283e1a5db617408139761ec772d4b3f9dc573c1c @@ -1960,6 +2016,22 @@ trackedFiles: id: f5500feb1c05 last_write_checksum: sha1:fe33585e2d3be564e785daa9df02908f3476fa1f pristine_git_object: dc9c74cce4e3317d62178f36ac854c0bf35f88cf + docs/models/responseenvelopednsipresolutionboundresponse.md: + id: 5d89ba08771e + last_write_checksum: sha1:0698add68bb0b4b3bcbeceae614f4ef7da2e1409 + pristine_git_object: f12b8f7722797889ae46b45bdf8583e63aba5268 + docs/models/responseenvelopednsipresolutionrangeresponse.md: + id: 49dad5620bef + last_write_checksum: sha1:a34dca790987d08a6cd38eadd3d1b3740a67e58d + pristine_git_object: 4d062986438a3506050508fa409ed40cd976e68c + docs/models/responseenvelopednsnameresolutionboundresponse.md: + id: f5c10a441400 + last_write_checksum: sha1:00e0ef11c8e21610f2f52cb5d2b3cf893844805f + pristine_git_object: bcdfc9a8a96f86d745409ac2fa854dcdd85a3c9c + docs/models/responseenvelopednsnameresolutionrangeresponse.md: + id: 371dd8193d76 + last_write_checksum: sha1:4b58dc30cdfec1199cec4806dea7f85ad6b5d755 + pristine_git_object: 936cee666219b83bbda1ef1dea2205177e55234c docs/models/responseenvelopehostasset.md: id: 3a27c86f15fd last_write_checksum: sha1:9c564116ca0e4c06f3cc752dc1d2a71888b73f78 @@ -2082,8 +2154,8 @@ trackedFiles: pristine_git_object: e2a7bb0d0bbbcc9d939d6987e57821ac7247dff8 docs/models/risk.md: id: e738dd662688 - last_write_checksum: sha1:1c0b8b639986b24df37b11e08ea4e77edb430fda - pristine_git_object: 5684e6a9925ff6a968e6d16c1e90975a944c6ccd + last_write_checksum: sha1:f18a453f450229e9c424322460be089f39bce70a + pristine_git_object: 44979399415819c90b67ed0c26aa648270c554f5 docs/models/risksource.md: id: 92ad09068f33 last_write_checksum: sha1:bf99a5c39e08f19d7940e74abdab6a3f16df6bad @@ -2326,8 +2398,8 @@ trackedFiles: pristine_git_object: 61ab9835916f66983134f42416d3c9c860c00420 docs/models/service.md: id: d38041323049 - last_write_checksum: sha1:cc376cec7e2f3dff920a2147b9c3de4c0dd87609 - pristine_git_object: 71ac5aebd5c20864e77f3b1c4aea77c6d6c552a2 + last_write_checksum: sha1:72c4d681d97cae2ad0004a2113b40a5fdddab94e + pristine_git_object: 72d9a2d3b662e03e682642925fcb3e26f54e5db4 docs/models/serviceid.md: id: 78670c733096 last_write_checksum: sha1:4388c75f08f99206fc758d5d47396f1a13fd37e1 @@ -3100,6 +3172,62 @@ trackedFiles: id: f722e221bc3d last_write_checksum: sha1:d6cbfe0b421e8d6d41854aa4b6814778a39887f6 pristine_git_object: 392e67a3c738dd0d034e495d7a9c394fd47cc991 + docs/models/v3globaldatadnsipresolutionboundglobals.md: + id: 1dffee6d777d + last_write_checksum: sha1:034ef83a5cff5c33b1d3a044f33a8fdcbd56705c + pristine_git_object: 412ce185d7556bf8fcfba6bf97d8065a4b2be5de + docs/models/v3globaldatadnsipresolutionboundrequest.md: + id: 425dbb90670b + last_write_checksum: sha1:6ee0e162fce0a3ef712584927b2dca31713f473d + pristine_git_object: cb74bd6ca2952ca645c8a67fd69cb68fd8b22969 + docs/models/v3globaldatadnsipresolutionboundresponse.md: + id: a0b13bf4c1cb + last_write_checksum: sha1:a3563c7301f7d7cc3d7126019d00b5c9c16bbfce + pristine_git_object: 29c75d7f85dc91dee8ce2e2ab7311bc7be6d0b83 + docs/models/v3globaldatadnsipresolutionrangesglobals.md: + id: a253740dbac6 + last_write_checksum: sha1:1e400a6af3ca75a94a142c7d6fdc632ac9283a7c + pristine_git_object: 6c3480666785f424c03bc2dbec331deefaf25379 + docs/models/v3globaldatadnsipresolutionrangesrequest.md: + id: 4935da170e99 + last_write_checksum: sha1:100898d40aaad255c4842ab076196e19aae489fd + pristine_git_object: 0e11deb2d7f9009397b219a22bddf15c27071fd0 + docs/models/v3globaldatadnsipresolutionrangesresponse.md: + id: b072c3eb8bd9 + last_write_checksum: sha1:29b0c0af9c9329036fbd392cae916c16748b521a + pristine_git_object: f109920f1c4ba9871683f8099bf7f862c3faca2e + docs/models/v3globaldatadnsnameresolutionboundglobals.md: + id: 570103ec983b + last_write_checksum: sha1:630b3607c2ef5fcf6a4a20d2ad61ccc6a57997a9 + pristine_git_object: 19460fcd6c8018a471d9f5daf6ed9355e08f7746 + docs/models/v3globaldatadnsnameresolutionboundqueryparamrecordtypes.md: + id: 547e676a69ee + last_write_checksum: sha1:ebae8c7ea04892939d150f39473ae734a455c147 + pristine_git_object: 7330cb48a376ad1793759ebe33d3eed1f2fbf11b + docs/models/v3globaldatadnsnameresolutionboundrequest.md: + id: 35be9f7ea1c9 + last_write_checksum: sha1:d49619a14797ea508093982f896d56e7371442f7 + pristine_git_object: 523759d0277377fe69626015d22eea4fecfe27b3 + docs/models/v3globaldatadnsnameresolutionboundresponse.md: + id: 16f0f970d272 + last_write_checksum: sha1:224a79220855f669f96961487be55c917931cad4 + pristine_git_object: 845c57c68d7e202a6612c775a4d4746a72f9c5fa + docs/models/v3globaldatadnsnameresolutionrangesglobals.md: + id: 26efa8fcfa3b + last_write_checksum: sha1:dda7d2f15f6b60e2eea6bfe7d52b5cbe08877250 + pristine_git_object: 1cc39ee2028bb676f4fa6f126e0009abce6c0cd0 + docs/models/v3globaldatadnsnameresolutionrangesqueryparamrecordtypes.md: + id: 6ec487c37133 + last_write_checksum: sha1:057436e2b247d8bccecd927d59ee737169679f3d + pristine_git_object: 77ff5fe02d77aa98f3c0e72967bca08f0c4b5ddf + docs/models/v3globaldatadnsnameresolutionrangesrequest.md: + id: 5005509f22b5 + last_write_checksum: sha1:347aa48d172b119f7f8fe4b47527687160379a57 + pristine_git_object: dabf2c7409e0b1893a905d4f388224e8cafb490e + docs/models/v3globaldatadnsnameresolutionrangesresponse.md: + id: 450398c6e9d5 + last_write_checksum: sha1:34e55344dcc0f1661aaf0fcb1cbc8031309a219f + pristine_git_object: 811d06287e4180cdee61518fac773f471f456b26 docs/models/v3globaldatascansgetglobals.md: id: 23ea91241ba4 last_write_checksum: sha1:1d4ad0784c9dc8e271f3c2a85b047306c3b83847 @@ -3434,8 +3562,8 @@ trackedFiles: pristine_git_object: 12ca1e29790302193bd3cb4ca17433442ecb6166 docs/models/vuln.md: id: 45934d668349 - last_write_checksum: sha1:f03f323f564652f9b475284bcbf0b9c8a46a9df7 - pristine_git_object: 2d1d278f0de54bbcab28446eda0ab8052bbb15fb + last_write_checksum: sha1:ae994237ccca3f94812285e1d827f7480ee9cf82 + pristine_git_object: 584504787aac29bde2ad6a55c69f8d5a3381f483 docs/models/vulnerabilityresponseeffort.md: id: 02dd423457e6 last_write_checksum: sha1:1087ff1b7ade2b880645bf86799f7eb77be1a361 @@ -3462,8 +3590,8 @@ trackedFiles: pristine_git_object: fc9e57154c542f53a26595429dff4f4792ead900 docs/models/webproperty.md: id: 4803b436b2cb - last_write_checksum: sha1:20fb9e435d18e33dff9db4f8ea675a8655d30e8c - pristine_git_object: 650fbc0c7c37c5da8f09547e4aa082d47d258072 + last_write_checksum: sha1:24ade7313dcaa431c8f2019e7e61fd6f95e6afa7 + pristine_git_object: 60a6bc69d38d6589e5d2a9e0d10ac3d1c127c52c docs/models/webpropertyasset.md: id: 41cd8d84cf7e last_write_checksum: sha1:5cccfe244d87e54f8c3bf3da8cac966d24728aa1 @@ -3522,8 +3650,8 @@ trackedFiles: pristine_git_object: 7c00028bb7ac927b2a2a51c23903759c44d6207c docs/sdks/globaldata/README.md: id: 0c68886632e6 - last_write_checksum: sha1:b9d2d19c6e1971d147d6fd1587118553feb1f2ac - pristine_git_object: 14eb0315e424fd6316fbaad0d68949d6bbe67ac7 + last_write_checksum: sha1:689acccd3ce95031c529fae5f56634888e3ecc39 + pristine_git_object: b1095525259e7d09028dea2fa0069efaeb069689 docs/sdks/tagsandcomments/README.md: id: 092d693513d0 last_write_checksum: sha1:b55277bc96e17b34da0b308dd923aadb9f69b7db @@ -3546,8 +3674,8 @@ trackedFiles: pristine_git_object: bfd8691be4b4b5ee9f2c4baf849970d807ade207 pyproject.toml: id: 5d07e7d72637 - last_write_checksum: sha1:80db30e3ecf785b018d3ab72e447c147a6d2772e - pristine_git_object: f4c536d14297c6a928ec5c5f41a6bd1fdeb0d234 + last_write_checksum: sha1:0a933ccd695a479282163550dea4facf09b02498 + pristine_git_object: 552b51ba888213c2c9be61a418219526255a5a75 scripts/prepare_readme.py: id: e0c5957a6035 last_write_checksum: sha1:10d6ae008b24c68e99d7e8ba9c2e747070685ead @@ -3574,8 +3702,8 @@ trackedFiles: pristine_git_object: 352d3691d91c2d0ba0f05b48b56d4df5ce520098 src/censys_platform/_version.py: id: d2dc39704c23 - last_write_checksum: sha1:daa985c0ff0a68e79c66fb293c5bfa72f19eabe6 - pristine_git_object: c80c1a5ef46582700f5c3c22edd149d90292f436 + last_write_checksum: sha1:4c75c917333d1dca93cb529859cd909a2322821b + pristine_git_object: 3f7ad73c6c0515d52d41505ebf3ac2e6bf882faa src/censys_platform/account_management.py: id: 09993862b047 last_write_checksum: sha1:09f4a14d8ae7684622d2d8633656f043c3ae9bef @@ -3594,16 +3722,16 @@ trackedFiles: pristine_git_object: 176a0551bfb62efd9847529aeade4043b7b923df src/censys_platform/global_data.py: id: 0eedbf9a2038 - last_write_checksum: sha1:7121fb3cec4d479588ed1ee761181f0b24d56e59 - pristine_git_object: fe0954a46d93206591ea269ab6d47c42ff8feb33 + last_write_checksum: sha1:9041016f3cafc9826264accf81dc9c84b808ebef + pristine_git_object: 2bee92e444caa9292d36277e66d654950bd9c0f0 src/censys_platform/httpclient.py: id: 9378a19c2de6 last_write_checksum: sha1:5e55338d6ee9f01ab648cad4380201a8a3da7dd7 pristine_git_object: 89560b566073785535643e694c112bedbd3db13d src/censys_platform/models/__init__.py: id: 4c65ae1e4fed - last_write_checksum: sha1:be8757971721b69a3e296437a1e8de2de6e75769 - pristine_git_object: c5c03e0f84a0ec6d8d5a17bae3f7704e955c73da + last_write_checksum: sha1:031176bc5c13c876a5f6fc5e8e8fa618efa796d5 + pristine_git_object: fe5ff84e3fc3e69ad34fe83c1d90b9e0b17af64a src/censys_platform/models/activemq.py: id: c852b87bc559 last_write_checksum: sha1:a754dc1ce0647be6304994e4c598c533e0db974e @@ -4032,6 +4160,38 @@ trackedFiles: id: dc6d47644d43 last_write_checksum: sha1:f7c3e41ddf71256d4b3ef35caa284f420fe965a3 pristine_git_object: 0eac9cae1770aebca65402e3660f29ae07acb798 + src/censys_platform/models/dnsipresolutionboundresponse.py: + id: da6ed7791a1c + last_write_checksum: sha1:54d45b9f8ab6bb26c5708f164af294188fc2051c + pristine_git_object: d5ce8984b8820cd3ce1a3e98009dede2ab885e71 + src/censys_platform/models/dnsipresolutionrangerecord.py: + id: b43d865f9882 + last_write_checksum: sha1:8ce605cd7f49407f231e08e727b67151e1a02cbf + pristine_git_object: 3c9c75612dd9271f97b7718c6dbeb39fdf81bde3 + src/censys_platform/models/dnsipresolutionrangeresponse.py: + id: e25a1315383e + last_write_checksum: sha1:668bf03a5e1a2a503a39ca2d897f47595dfdb989 + pristine_git_object: 211b8e0cd9a2cf1c196668178bff328d91838769 + src/censys_platform/models/dnsipresolutionrecord.py: + id: 86cbffcd64d6 + last_write_checksum: sha1:1759ad8436db75363baab70b6789fc074d8cd6bd + pristine_git_object: 27d3a1f5962824240359ec636e204587e7a648ac + src/censys_platform/models/dnsnameresolutionboundresponse.py: + id: 6a205441b92f + last_write_checksum: sha1:6ab3b13c5a2b4a1d57b4dc9ac86357c0972a0bcf + pristine_git_object: e5fd115adefe3b1a99a624e16cc1738d91b74c69 + src/censys_platform/models/dnsnameresolutionrangeresponse.py: + id: fbeddb573246 + last_write_checksum: sha1:d8ff888b4a35e60749cb8ef7d116de403398b916 + pristine_git_object: 936f231ede4090891a663af8a789cadf1b8d0bce + src/censys_platform/models/dnsresolutionrangerecord.py: + id: af9c1919358f + last_write_checksum: sha1:65cd5d73f8b6f55082f134fbf20fb8b37bfd24d9 + pristine_git_object: 0b4f34425dc4dab9ec6261434bd8eb7267c83506 + src/censys_platform/models/dnsresolutionrecord.py: + id: d4cf4be39fc8 + last_write_checksum: sha1:b6d660dfff654ccd30a5862ee7801c77c18ecdf5 + pristine_git_object: 342b9200c3aa2f3544aa202e1142934dd19889de src/censys_platform/models/dsacryptographickey.py: id: 3c7788304b89 last_write_checksum: sha1:110d5abbd1f9649a7f60ba1ecdc7408569bdbc06 @@ -5324,6 +5484,22 @@ trackedFiles: id: b13771039f42 last_write_checksum: sha1:410b8f9506c652be5287470f73b67e37e7b87e3b pristine_git_object: bb7fe4e66f6f52c0259e63944ae363bd0cef7c6f + src/censys_platform/models/responseenvelopednsipresolutionboundresponse.py: + id: 0f68b3a4e809 + last_write_checksum: sha1:ee621b07972ff0b0d7bdfbab92f7046cb89780cd + pristine_git_object: 9743b3f0d8409f411e0416380155c6acc951e8d8 + src/censys_platform/models/responseenvelopednsipresolutionrangeresponse.py: + id: 3732da120434 + last_write_checksum: sha1:07f61721dddf67e4e15a56e06def088af653496f + pristine_git_object: 50c23e88b26ee98018f0d9b05c7de340c220ec98 + src/censys_platform/models/responseenvelopednsnameresolutionboundresponse.py: + id: 46e2272528e2 + last_write_checksum: sha1:85299a09dc6c67433f2b1d9cc32c2ac4563c6fe8 + pristine_git_object: ae56e74aa77625fe82812673eba5f4ed7c6b0bfb + src/censys_platform/models/responseenvelopednsnameresolutionrangeresponse.py: + id: 91df84904279 + last_write_checksum: sha1:d22329eb9e544f5b786986a5749850a54275cd9f + pristine_git_object: 3bd441287107406ceebf6587cfd1d0dd74204440 src/censys_platform/models/responseenvelopehostasset.py: id: 992a65c9b63c last_write_checksum: sha1:7f7b5f3d77e1c82ff8941d689cd89f01677f7acb @@ -5450,8 +5626,8 @@ trackedFiles: pristine_git_object: c333ce38c9c8d283a61f7101cd3f5549251c7aaa src/censys_platform/models/risk.py: id: 0b47bdbe2e69 - last_write_checksum: sha1:fee5c6ef0635236e88bf7fe1b7cb0e6e879e871a - pristine_git_object: e72477558ce3d3ede4e1c7e57697d00f09c26619 + last_write_checksum: sha1:2e3beab6e7b537210a76fb4598f7615189d683f6 + pristine_git_object: 8a7329a9dae341710f4bdb01a46fa24dda67e02d src/censys_platform/models/rlogin.py: id: 32fb1187dfbb last_write_checksum: sha1:ed991919f8fcef503f4fe11c19cfa1eaded17ed9 @@ -5662,8 +5838,8 @@ trackedFiles: pristine_git_object: 88a109718356961a048e8c8c432885e6191e5292 src/censys_platform/models/service.py: id: 25dc1044897b - last_write_checksum: sha1:22447b237b96177c03cbe53992c4d9c9a6df9783 - pristine_git_object: b68e80ecbea4d6a090c19eb07ae644a62919b90e + last_write_checksum: sha1:89f1540d752c39ea6b77d7a0470b68ac7c340132 + pristine_git_object: f780a8789b1cfb55b46fdae5d196dd62ac939f6b src/censys_platform/models/serviceid.py: id: 52a5b098ac72 last_write_checksum: sha1:a179ab2be8d3b5670d9f0e2174c807f96d3560cb @@ -6124,6 +6300,22 @@ trackedFiles: id: 1c3e75b528e2 last_write_checksum: sha1:17eca54d0bd32e28ce9a55842284ec3978692a0d pristine_git_object: 32322125936989d5069ffbf275cd69c86195c31e + src/censys_platform/models/v3_globaldata_dns_ip_resolution_boundop.py: + id: 92d62e8a9d4f + last_write_checksum: sha1:7bdefb675aa66541e01116231274aa3ebe1ba475 + pristine_git_object: 9c2173bd8dff68a9c5fbf0968afc743cede7e91f + src/censys_platform/models/v3_globaldata_dns_ip_resolution_rangesop.py: + id: cd49cf835215 + last_write_checksum: sha1:1ecfb8eb108cd183243136be08b54e7df0ee1450 + pristine_git_object: 26e87306bdcfaddce720da83ee5fcfb2c39dbedc + src/censys_platform/models/v3_globaldata_dns_name_resolution_boundop.py: + id: b267389b4a92 + last_write_checksum: sha1:105ef7e02d5cee293392e5424d74c9f83f89497e + pristine_git_object: c9fd150ae901754ddd632ed3a8d506df293c4d38 + src/censys_platform/models/v3_globaldata_dns_name_resolution_rangesop.py: + id: 8332d0b6273a + last_write_checksum: sha1:b47c7927ed75b487727550209b75fb7510e8bcb3 + pristine_git_object: 5a8f8bdac91095bb41d4719ac32de60bd2345733 src/censys_platform/models/v3_globaldata_scans_getop.py: id: ab00483fe559 last_write_checksum: sha1:78f9a174631da8cba9683dc65fed0d24cd807cf4 @@ -6250,8 +6442,8 @@ trackedFiles: pristine_git_object: 9cf47b559521b5cf5e146f3ed131ddc7a8514a5e src/censys_platform/models/vuln.py: id: f51f970c072b - last_write_checksum: sha1:ec5e478230464dbc39609d700186ff6054918d44 - pristine_git_object: 98f528cd025d1947b8e406e23e9a2c71fd935a7e + last_write_checksum: sha1:679f28a3636f7927cbcf54df929b006972811d13 + pristine_git_object: 942177cb82637511edc2aef239a2526fb8b6b47b src/censys_platform/models/weblogict3.py: id: 3b51cf2919e4 last_write_checksum: sha1:adf5be4277520abd8ad089892ac9ab5ad616d261 @@ -6262,8 +6454,8 @@ trackedFiles: pristine_git_object: 9a21ab8a957f961b9c22e8ce2ab44240da706a56 src/censys_platform/models/webproperty.py: id: 5f9ffc5693b1 - last_write_checksum: sha1:3ea729067852272c05c2bfab0beb0a3f13f3617c - pristine_git_object: e09faa1adf7f723a91ab725ed7bf7d4d3713d45d + last_write_checksum: sha1:0982594441cf953439b3faf2f24a85c5caa7bd8e + pristine_git_object: 833dda4f8a5989f3dd5ae40dc23b8ccb9f20f339 src/censys_platform/models/webpropertyasset.py: id: 394f87dd6c6c last_write_checksum: sha1:ed22af90d1bb3caddbc37afebef9b72ec737a25d @@ -6362,8 +6554,8 @@ trackedFiles: pristine_git_object: 3324e1bc2668c54c4d5f5a1a845675319757a828 src/censys_platform/utils/eventstreaming.py: id: 79888c9b9f71 - last_write_checksum: sha1:620d78a8b4e3b854e08d136e02e40a01a786bd70 - pristine_git_object: 3bdcd6d3d4fc772cb7f5fca8685dcdc8c85e13e8 + last_write_checksum: sha1:cad7e4feff4f1b2824afd0d30f2b1964a604f4dd + pristine_git_object: 1c189bf6fcad7ba90e0ec6d2f36ca7329d33bb99 src/censys_platform/utils/forms.py: id: e6173af8260d last_write_checksum: sha1:15fa7e9ab1611e062a9984cf06cb20969713d295 @@ -7435,6 +7627,87 @@ examples: application/problem+json: {"detail": "Property foo is required but is missing.", "instance": "https://example.com/error-log/abc123", "status": 400, "title": "Bad Request", "type": "https://example.com/errors/example"} "500": application/problem+json: {"detail": "Property foo is required but is missing.", "instance": "https://example.com/error-log/abc123", "status": 400, "title": "Bad Request", "type": "https://example.com/errors/example"} + v3-globaldata-dns-ip-resolution-bound: + speakeasy-default-v3-globaldata-dns-ip-resolution-bound: + parameters: + path: + ip: "8.8.8.8" + query: + organization_id: "" + start_time: "2024-01-01T00:00:00Z" + end_time: "2024-01-31T23:59:59Z" + page_size: 50 + record_types: ["A"] + responses: + "200": + application/json: {} + "401": + application/json: {"error": {"code": 401, "message": "Access credentials are invalid", "reason": "Access token is not active", "status": "Unauthorized"}} + "400": + application/problem+json: {"detail": "Property foo is required but is missing.", "instance": "https://example.com/error-log/abc123", "status": 400, "title": "Bad Request", "type": "https://example.com/errors/example"} + "500": + application/problem+json: {"detail": "Property foo is required but is missing.", "instance": "https://example.com/error-log/abc123", "status": 400, "title": "Bad Request", "type": "https://example.com/errors/example"} + v3-globaldata-dns-ip-resolution-ranges: + speakeasy-default-v3-globaldata-dns-ip-resolution-ranges: + parameters: + path: + ip: "8.8.8.8" + query: + organization_id: "" + start_time: "2024-01-01T00:00:00Z" + end_time: "2024-01-31T23:59:59Z" + page_size: 50 + record_types: ["A"] + domain: "platform.censys.io" + responses: + "200": + application/json: {} + "401": + application/json: {"error": {"code": 401, "message": "Access credentials are invalid", "reason": "Access token is not active", "status": "Unauthorized"}} + "400": + application/problem+json: {"detail": "Property foo is required but is missing.", "instance": "https://example.com/error-log/abc123", "status": 400, "title": "Bad Request", "type": "https://example.com/errors/example"} + "500": + application/problem+json: {"detail": "Property foo is required but is missing.", "instance": "https://example.com/error-log/abc123", "status": 400, "title": "Bad Request", "type": "https://example.com/errors/example"} + v3-globaldata-dns-name-resolution-bound: + speakeasy-default-v3-globaldata-dns-name-resolution-bound: + parameters: + path: + name: "platform.censys.io" + query: + organization_id: "" + start_time: "2024-01-01T00:00:00Z" + end_time: "2024-01-31T23:59:59Z" + page_size: 50 + record_types: ["MX"] + responses: + "200": + application/json: {} + "401": + application/json: {"error": {"code": 401, "message": "Access credentials are invalid", "reason": "Access token is not active", "status": "Unauthorized"}} + "400": + application/problem+json: {"detail": "Property foo is required but is missing.", "instance": "https://example.com/error-log/abc123", "status": 400, "title": "Bad Request", "type": "https://example.com/errors/example"} + "500": + application/problem+json: {"detail": "Property foo is required but is missing.", "instance": "https://example.com/error-log/abc123", "status": 400, "title": "Bad Request", "type": "https://example.com/errors/example"} + v3-globaldata-dns-name-resolution-ranges: + speakeasy-default-v3-globaldata-dns-name-resolution-ranges: + parameters: + path: + name: "platform.censys.io" + query: + organization_id: "" + start_time: "2024-01-01T00:00:00Z" + end_time: "2024-01-31T23:59:59Z" + page_size: 50 + record_types: ["MX"] + responses: + "200": + application/json: {} + "401": + application/json: {"error": {"code": 401, "message": "Access credentials are invalid", "reason": "Access token is not active", "status": "Unauthorized"}} + "400": + application/problem+json: {"detail": "Property foo is required but is missing.", "instance": "https://example.com/error-log/abc123", "status": 400, "title": "Bad Request", "type": "https://example.com/errors/example"} + "500": + application/problem+json: {"detail": "Property foo is required but is missing.", "instance": "https://example.com/error-log/abc123", "status": 400, "title": "Bad Request", "type": "https://example.com/errors/example"} examplesVersion: 1.0.2 generatedTests: {} generatedFiles: diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 22b7ecd..b9be93b 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -29,7 +29,7 @@ generation: generateNewTests: false skipResponseBodyAssertions: false python: - version: 0.14.0 + version: 0.14.1 additionalDependencies: dev: {} main: {} @@ -47,6 +47,9 @@ python: description: Python Client SDK Generated by Speakeasy. enableCustomCodeRegions: false enumFormat: enum + eventStreamClassNames: + async: EventStreamAsync + sync: EventStream fixFlags: asyncPaginationSep2025: false conflictResistantModelImportsFeb2026: false @@ -81,6 +84,7 @@ python: preApplyUnionDiscriminators: false pytestFilterWarnings: [] pytestTimeout: 0 + rawResponseHelpers: false responseFormat: flat sseFlatResponse: false templateVersion: v2 diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 3cd8f46..789d0c2 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,20 +1,20 @@ -speakeasyVersion: 1.769.2 +speakeasyVersion: 1.773.1 sources: converge-source: sourceNamespace: converge-source - sourceRevisionDigest: sha256:3eb39d0d190fbacd3c015888a75b96c5dea07837829f0cd99893fc440b5bf5f2 - sourceBlobDigest: sha256:96df2678212eda09805d40d41272c47753ffb2361adfcea387c10a6cc2a47069 + sourceRevisionDigest: sha256:afb68ef012bf0ed02d74bfb0dc03c3119ef985d80ab02d2e1cb9ff2859a33b1f + sourceBlobDigest: sha256:83b614a896b62d20ad9ea873f54a367522253d4562efb3bf55fd08996372442f tags: - latest - - 1.0.103 + - 1.0.105 targets: censys-sdk-python: source: converge-source sourceNamespace: converge-source - sourceRevisionDigest: sha256:3eb39d0d190fbacd3c015888a75b96c5dea07837829f0cd99893fc440b5bf5f2 - sourceBlobDigest: sha256:96df2678212eda09805d40d41272c47753ffb2361adfcea387c10a6cc2a47069 + sourceRevisionDigest: sha256:afb68ef012bf0ed02d74bfb0dc03c3119ef985d80ab02d2e1cb9ff2859a33b1f + sourceBlobDigest: sha256:83b614a896b62d20ad9ea873f54a367522253d4562efb3bf55fd08996372442f codeSamplesNamespace: converge-source-python-code-samples - codeSamplesRevisionDigest: sha256:9656b7bf9f59c554f9aeffa1a378f10587ca486a6021ea26be0bde58fe34e2bc + codeSamplesRevisionDigest: sha256:eaf6365d3b5cc0e98ce265fa554fcfb545f7a40496fb05207f40cdd4f0a0558c workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/README-PYPI.md b/README-PYPI.md index ac00ca2..3238a08 100644 --- a/README-PYPI.md +++ b/README-PYPI.md @@ -224,6 +224,10 @@ asyncio.run(main()) * [get_host_timeline](https://github.com/censys/censys-sdk-python/blob/master/docs/sdks/globaldata/README.md#get_host_timeline) - Get host event history * [get_web_properties](https://github.com/censys/censys-sdk-python/blob/master/docs/sdks/globaldata/README.md#get_web_properties) - Retrieve multiple web properties * [get_web_property](https://github.com/censys/censys-sdk-python/blob/master/docs/sdks/globaldata/README.md#get_web_property) - Get a web property +* [list_dns_ip_resolution_bounds](https://github.com/censys/censys-sdk-python/blob/master/docs/sdks/globaldata/README.md#list_dns_ip_resolution_bounds) - Get latest DNS names that resolved to an IP +* [list_dns_ip_resolution_ranges](https://github.com/censys/censys-sdk-python/blob/master/docs/sdks/globaldata/README.md#list_dns_ip_resolution_ranges) - Get DNS names that resolved to an IP within a time window +* [list_dns_name_resolution_bounds](https://github.com/censys/censys-sdk-python/blob/master/docs/sdks/globaldata/README.md#list_dns_name_resolution_bounds) - Get latest DNS resolution records for a name +* [list_dns_name_resolution_ranges](https://github.com/censys/censys-sdk-python/blob/master/docs/sdks/globaldata/README.md#list_dns_name_resolution_ranges) - Get historical DNS resolution ranges for a name * [create_tracked_scan](https://github.com/censys/censys-sdk-python/blob/master/docs/sdks/globaldata/README.md#create_tracked_scan) - Live Rescan: Initiate a new rescan * [get_tracked_scan](https://github.com/censys/censys-sdk-python/blob/master/docs/sdks/globaldata/README.md#get_tracked_scan) - Get scan status * [aggregate](https://github.com/censys/censys-sdk-python/blob/master/docs/sdks/globaldata/README.md#aggregate) - Aggregate results for a search query diff --git a/README.md b/README.md index ffd3ffa..3bbb6fb 100644 --- a/README.md +++ b/README.md @@ -224,6 +224,10 @@ asyncio.run(main()) * [get_host_timeline](docs/sdks/globaldata/README.md#get_host_timeline) - Get host event history * [get_web_properties](docs/sdks/globaldata/README.md#get_web_properties) - Retrieve multiple web properties * [get_web_property](docs/sdks/globaldata/README.md#get_web_property) - Get a web property +* [list_dns_ip_resolution_bounds](docs/sdks/globaldata/README.md#list_dns_ip_resolution_bounds) - Get latest DNS names that resolved to an IP +* [list_dns_ip_resolution_ranges](docs/sdks/globaldata/README.md#list_dns_ip_resolution_ranges) - Get DNS names that resolved to an IP within a time window +* [list_dns_name_resolution_bounds](docs/sdks/globaldata/README.md#list_dns_name_resolution_bounds) - Get latest DNS resolution records for a name +* [list_dns_name_resolution_ranges](docs/sdks/globaldata/README.md#list_dns_name_resolution_ranges) - Get historical DNS resolution ranges for a name * [create_tracked_scan](docs/sdks/globaldata/README.md#create_tracked_scan) - Live Rescan: Initiate a new rescan * [get_tracked_scan](docs/sdks/globaldata/README.md#get_tracked_scan) - Get scan status * [aggregate](docs/sdks/globaldata/README.md#aggregate) - Aggregate results for a search query diff --git a/RELEASES.md b/RELEASES.md index f8c80ad..18ad622 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -286,4 +286,14 @@ Based on: ### Generated - [python v0.14.0] . ### Releases -- [PyPI v0.14.0] https://pypi.org/project/censys-platform/0.14.0 - . \ No newline at end of file +- [PyPI v0.14.0] https://pypi.org/project/censys-platform/0.14.0 - . + +## 2026-06-09 00:57:53 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.773.1 (2.897.1) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v0.14.1] . +### Releases +- [PyPI v0.14.1] https://pypi.org/project/censys-platform/0.14.1 - . \ No newline at end of file diff --git a/docs/models/dnsipresolutionboundresponse.md b/docs/models/dnsipresolutionboundresponse.md new file mode 100644 index 0000000..38d3222 --- /dev/null +++ b/docs/models/dnsipresolutionboundresponse.md @@ -0,0 +1,11 @@ +# DNSIPResolutionBoundResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | +| `ip` | *str* | :heavy_check_mark: | The IP address that was queried. | +| `next_page_token` | *str* | :heavy_check_mark: | A token that can be used to retrieve the next page of records. | +| `records` | List[[models.DNSIPResolutionRecord](../models/dnsipresolutionrecord.md)] | :heavy_check_mark: | The list of domain names that resolved to this IP. | +| `total_records` | *int* | :heavy_check_mark: | The number of records that exist in total across all pages. | \ No newline at end of file diff --git a/docs/models/dnsipresolutionrangerecord.md b/docs/models/dnsipresolutionrangerecord.md new file mode 100644 index 0000000..b56dcda --- /dev/null +++ b/docs/models/dnsipresolutionrangerecord.md @@ -0,0 +1,11 @@ +# DNSIPResolutionRangeRecord + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | +| `domain` | *str* | :heavy_check_mark: | The domain name that resolved to this IP. | +| `first_seen` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | The time this record was first observed. | +| `last_seen` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | The time this record was last observed. | +| `record_type` | [models.DNSIPResolutionRangeRecordRecordType](../models/dnsipresolutionrangerecordrecordtype.md) | :heavy_check_mark: | Either A or AAAA. | \ No newline at end of file diff --git a/docs/models/dnsipresolutionrangerecordrecordtype.md b/docs/models/dnsipresolutionrangerecordrecordtype.md new file mode 100644 index 0000000..9317cc1 --- /dev/null +++ b/docs/models/dnsipresolutionrangerecordrecordtype.md @@ -0,0 +1,21 @@ +# DNSIPResolutionRangeRecordRecordType + +Either A or AAAA. + +## Example Usage + +```python +from censys_platform.models import DNSIPResolutionRangeRecordRecordType + +value = DNSIPResolutionRangeRecordRecordType.A + +# Open enum: unrecognized values are captured as UnrecognizedStr +``` + + +## Values + +| Name | Value | +| ------ | ------ | +| `A` | A | +| `AAAA` | AAAA | \ No newline at end of file diff --git a/docs/models/dnsipresolutionrangeresponse.md b/docs/models/dnsipresolutionrangeresponse.md new file mode 100644 index 0000000..308bfe4 --- /dev/null +++ b/docs/models/dnsipresolutionrangeresponse.md @@ -0,0 +1,11 @@ +# DNSIPResolutionRangeResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `ip` | *str* | :heavy_check_mark: | The IP address that was queried. | +| `next_page_token` | *str* | :heavy_check_mark: | A token that can be used to retrieve the next page of records. | +| `records` | List[[models.DNSIPResolutionRangeRecord](../models/dnsipresolutionrangerecord.md)] | :heavy_check_mark: | The list of domain names that resolved to this IP. | +| `total_records` | *int* | :heavy_check_mark: | The number of records that exist in total across all pages. | \ No newline at end of file diff --git a/docs/models/dnsipresolutionrecord.md b/docs/models/dnsipresolutionrecord.md new file mode 100644 index 0000000..e417479 --- /dev/null +++ b/docs/models/dnsipresolutionrecord.md @@ -0,0 +1,11 @@ +# DNSIPResolutionRecord + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `domain` | *str* | :heavy_check_mark: | The domain name that resolved to this IP. | +| `first_seen` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | The time this record was first observed. | +| `last_seen` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | The time this record was last observed. | +| `record_type` | [models.DNSIPResolutionRecordRecordType](../models/dnsipresolutionrecordrecordtype.md) | :heavy_check_mark: | Either A or AAAA. | \ No newline at end of file diff --git a/docs/models/dnsipresolutionrecordrecordtype.md b/docs/models/dnsipresolutionrecordrecordtype.md new file mode 100644 index 0000000..6882f80 --- /dev/null +++ b/docs/models/dnsipresolutionrecordrecordtype.md @@ -0,0 +1,21 @@ +# DNSIPResolutionRecordRecordType + +Either A or AAAA. + +## Example Usage + +```python +from censys_platform.models import DNSIPResolutionRecordRecordType + +value = DNSIPResolutionRecordRecordType.A + +# Open enum: unrecognized values are captured as UnrecognizedStr +``` + + +## Values + +| Name | Value | +| ------ | ------ | +| `A` | A | +| `AAAA` | AAAA | \ No newline at end of file diff --git a/docs/models/dnsnameresolutionboundresponse.md b/docs/models/dnsnameresolutionboundresponse.md new file mode 100644 index 0000000..702ec1c --- /dev/null +++ b/docs/models/dnsnameresolutionboundresponse.md @@ -0,0 +1,11 @@ +# DNSNameResolutionBoundResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `name` | *str* | :heavy_check_mark: | The domain name that was queried. | +| `next_page_token` | *str* | :heavy_check_mark: | A token that can be used to retrieve the next page of records. | +| `records` | List[[models.DNSResolutionRecord](../models/dnsresolutionrecord.md)] | :heavy_check_mark: | The list of DNS records. | +| `total_records` | *int* | :heavy_check_mark: | The number of records that exist in total across all pages. | \ No newline at end of file diff --git a/docs/models/dnsnameresolutionrangeresponse.md b/docs/models/dnsnameresolutionrangeresponse.md new file mode 100644 index 0000000..af9c310 --- /dev/null +++ b/docs/models/dnsnameresolutionrangeresponse.md @@ -0,0 +1,11 @@ +# DNSNameResolutionRangeResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `name` | *str* | :heavy_check_mark: | The domain name that was queried. | +| `next_page_token` | *str* | :heavy_check_mark: | A token that can be used to retrieve the next page of records. | +| `records` | List[[models.DNSResolutionRangeRecord](../models/dnsresolutionrangerecord.md)] | :heavy_check_mark: | The list of DNS observation windows. | +| `total_records` | *int* | :heavy_check_mark: | The number of records that exist in total across all pages. | \ No newline at end of file diff --git a/docs/models/dnsresolutionrangerecord.md b/docs/models/dnsresolutionrangerecord.md new file mode 100644 index 0000000..2d1ffb7 --- /dev/null +++ b/docs/models/dnsresolutionrangerecord.md @@ -0,0 +1,17 @@ +# DNSResolutionRangeRecord + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | +| `first_observed` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | When this record was first observed in this window. | +| `ip` | *Optional[str]* | :heavy_minus_sign: | The IP of the record. IPv4 if the record_type is A. IPv6 if the record_type is AAAA. Otherwise not present. | +| `last_observed` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | When this record was last observed in this window. | +| `mail_server` | *Optional[str]* | :heavy_minus_sign: | The MX mail server. Only present when record_type is MX. Otherwise not present. | +| `mname` | *Optional[str]* | :heavy_minus_sign: | The primary name server. Only present when record_type is SOA. Otherwise not present. | +| `name_server` | *Optional[str]* | :heavy_minus_sign: | The name server. Only present when record_type is NS. Otherwise not present. | +| `priority` | *Optional[int]* | :heavy_minus_sign: | The MX priority. Only present when record_type is MX. Otherwise not present. | +| `record_type` | [models.DNSResolutionRangeRecordRecordType](../models/dnsresolutionrangerecordrecordtype.md) | :heavy_check_mark: | The record type. Either A, AAAA, MX, NS, SOA, or TXT. | +| `rname` | *Optional[str]* | :heavy_minus_sign: | The responsible contact, as email. Only present when record_type is SOA. Otherwise not present. | +| `value` | *Optional[str]* | :heavy_minus_sign: | Full, untruncated string. Only present when record_type is TXT. Otherwise not present. | \ No newline at end of file diff --git a/docs/models/dnsresolutionrangerecordrecordtype.md b/docs/models/dnsresolutionrangerecordrecordtype.md new file mode 100644 index 0000000..670d9dd --- /dev/null +++ b/docs/models/dnsresolutionrangerecordrecordtype.md @@ -0,0 +1,25 @@ +# DNSResolutionRangeRecordRecordType + +The record type. Either A, AAAA, MX, NS, SOA, or TXT. + +## Example Usage + +```python +from censys_platform.models import DNSResolutionRangeRecordRecordType + +value = DNSResolutionRangeRecordRecordType.A + +# Open enum: unrecognized values are captured as UnrecognizedStr +``` + + +## Values + +| Name | Value | +| ------ | ------ | +| `A` | A | +| `AAAA` | AAAA | +| `MX` | MX | +| `NS` | NS | +| `SOA` | SOA | +| `TXT` | TXT | \ No newline at end of file diff --git a/docs/models/dnsresolutionrecord.md b/docs/models/dnsresolutionrecord.md new file mode 100644 index 0000000..1e06066 --- /dev/null +++ b/docs/models/dnsresolutionrecord.md @@ -0,0 +1,17 @@ +# DNSResolutionRecord + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | +| `first_seen` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | The time this record was first observed. | +| `ip` | *Optional[str]* | :heavy_minus_sign: | The IP of the record. IPv4 if the record_type is A. IPv6 if the record_type is AAAA. Otherwise not present. | +| `last_seen` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | The time this record was last observed. | +| `mail_server` | *Optional[str]* | :heavy_minus_sign: | The MX mail server. Only present when record_type is MX. Otherwise not present. | +| `mname` | *Optional[str]* | :heavy_minus_sign: | The primary name server. Only present when record_type is SOA. Otherwise not present. | +| `name_server` | *Optional[str]* | :heavy_minus_sign: | The name server. Only present when record_type is NS. Otherwise not present. | +| `priority` | *Optional[int]* | :heavy_minus_sign: | The MX priority. Only present when record_type is MX. Otherwise not present. | +| `record_type` | [models.DNSResolutionRecordRecordType](../models/dnsresolutionrecordrecordtype.md) | :heavy_check_mark: | The record type. Either A, AAAA, MX, NS, SOA, or TXT. | +| `rname` | *Optional[str]* | :heavy_minus_sign: | The responsible contact, as email. Only present when record_type is SOA. Otherwise not present. | +| `value` | *Optional[str]* | :heavy_minus_sign: | Full, untruncated string. Only present when record_type is TXT. Otherwise not present. | \ No newline at end of file diff --git a/docs/models/dnsresolutionrecordrecordtype.md b/docs/models/dnsresolutionrecordrecordtype.md new file mode 100644 index 0000000..44090cf --- /dev/null +++ b/docs/models/dnsresolutionrecordrecordtype.md @@ -0,0 +1,25 @@ +# DNSResolutionRecordRecordType + +The record type. Either A, AAAA, MX, NS, SOA, or TXT. + +## Example Usage + +```python +from censys_platform.models import DNSResolutionRecordRecordType + +value = DNSResolutionRecordRecordType.A + +# Open enum: unrecognized values are captured as UnrecognizedStr +``` + + +## Values + +| Name | Value | +| ------ | ------ | +| `A` | A | +| `AAAA` | AAAA | +| `MX` | MX | +| `NS` | NS | +| `SOA` | SOA | +| `TXT` | TXT | \ No newline at end of file diff --git a/docs/models/queryparamrecordtypes.md b/docs/models/queryparamrecordtypes.md new file mode 100644 index 0000000..f9b3f9a --- /dev/null +++ b/docs/models/queryparamrecordtypes.md @@ -0,0 +1,17 @@ +# QueryParamRecordTypes + +## Example Usage + +```python +from censys_platform.models import QueryParamRecordTypes + +value = QueryParamRecordTypes.A +``` + + +## Values + +| Name | Value | +| ------ | ------ | +| `A` | A | +| `AAAA` | AAAA | \ No newline at end of file diff --git a/docs/models/recordtypes.md b/docs/models/recordtypes.md new file mode 100644 index 0000000..70d4301 --- /dev/null +++ b/docs/models/recordtypes.md @@ -0,0 +1,17 @@ +# RecordTypes + +## Example Usage + +```python +from censys_platform.models import RecordTypes + +value = RecordTypes.A +``` + + +## Values + +| Name | Value | +| ------ | ------ | +| `A` | A | +| `AAAA` | AAAA | \ No newline at end of file diff --git a/docs/models/responseenvelopednsipresolutionboundresponse.md b/docs/models/responseenvelopednsipresolutionboundresponse.md new file mode 100644 index 0000000..f12b8f7 --- /dev/null +++ b/docs/models/responseenvelopednsipresolutionboundresponse.md @@ -0,0 +1,8 @@ +# ResponseEnvelopeDNSIPResolutionBoundResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `result` | [Optional[models.DNSIPResolutionBoundResponse]](../models/dnsipresolutionboundresponse.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/responseenvelopednsipresolutionrangeresponse.md b/docs/models/responseenvelopednsipresolutionrangeresponse.md new file mode 100644 index 0000000..4d06298 --- /dev/null +++ b/docs/models/responseenvelopednsipresolutionrangeresponse.md @@ -0,0 +1,8 @@ +# ResponseEnvelopeDNSIPResolutionRangeResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `result` | [Optional[models.DNSIPResolutionRangeResponse]](../models/dnsipresolutionrangeresponse.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/responseenvelopednsnameresolutionboundresponse.md b/docs/models/responseenvelopednsnameresolutionboundresponse.md new file mode 100644 index 0000000..bcdfc9a --- /dev/null +++ b/docs/models/responseenvelopednsnameresolutionboundresponse.md @@ -0,0 +1,8 @@ +# ResponseEnvelopeDNSNameResolutionBoundResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `result` | [Optional[models.DNSNameResolutionBoundResponse]](../models/dnsnameresolutionboundresponse.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/responseenvelopednsnameresolutionrangeresponse.md b/docs/models/responseenvelopednsnameresolutionrangeresponse.md new file mode 100644 index 0000000..936cee6 --- /dev/null +++ b/docs/models/responseenvelopednsnameresolutionrangeresponse.md @@ -0,0 +1,8 @@ +# ResponseEnvelopeDNSNameResolutionRangeResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `result` | [Optional[models.DNSNameResolutionRangeResponse]](../models/dnsnameresolutionrangeresponse.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/risk.md b/docs/models/risk.md index 5684e6a..4497939 100644 --- a/docs/models/risk.md +++ b/docs/models/risk.md @@ -14,4 +14,5 @@ | `risk_source` | [Optional[models.RiskSource]](../models/risksource.md) | :heavy_minus_sign: | N/A | | `severity` | [Optional[models.Severity]](../models/severity.md) | :heavy_minus_sign: | N/A | | `source` | [Optional[models.RiskSource1]](../models/risksource1.md) | :heavy_minus_sign: | N/A | +| `type` | List[*str*] | :heavy_minus_sign: | N/A | | `year` | *Optional[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/service.md b/docs/models/service.md index 71ac5ae..72d9a2d 100644 --- a/docs/models/service.md +++ b/docs/models/service.md @@ -20,6 +20,7 @@ | `cisco_ipsla` | [Optional[models.CiscoIpsla]](../models/ciscoipsla.md) | :heavy_minus_sign: | N/A | | `cmore` | [Optional[models.Cmore]](../models/cmore.md) | :heavy_minus_sign: | N/A | | `coap` | [Optional[models.Coap]](../models/coap.md) | :heavy_minus_sign: | N/A | +| `compromises` | List[[models.Risk](../models/risk.md)] | :heavy_minus_sign: | N/A | | `crestron_cp3` | [Optional[models.CrestronCp3]](../models/crestroncp3.md) | :heavy_minus_sign: | N/A | | `crestron_din_ap2` | [Optional[models.CrestronDinAp2]](../models/crestrondinap2.md) | :heavy_minus_sign: | N/A | | `cursor_on_target` | [Optional[models.CursorOnTarget]](../models/cursorontarget.md) | :heavy_minus_sign: | N/A | diff --git a/docs/models/v3globaldatadnsipresolutionboundglobals.md b/docs/models/v3globaldatadnsipresolutionboundglobals.md new file mode 100644 index 0000000..412ce18 --- /dev/null +++ b/docs/models/v3globaldatadnsipresolutionboundglobals.md @@ -0,0 +1,8 @@ +# V3GlobaldataDNSIPResolutionBoundGlobals + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `organization_id` | *Optional[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/v3globaldatadnsipresolutionboundrequest.md b/docs/models/v3globaldatadnsipresolutionboundrequest.md new file mode 100644 index 0000000..cb74bd6 --- /dev/null +++ b/docs/models/v3globaldatadnsipresolutionboundrequest.md @@ -0,0 +1,14 @@ +# V3GlobaldataDNSIPResolutionBoundRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `organization_id` | *Optional[str]* | :heavy_minus_sign: | The ID of a Censys organization to associate the request with. See the [Getting Started docs](https://docs.censys.com/reference/get-started#step-3-find-and-use-your-organization-id-optional) for more information. | | +| `start_time` | *Optional[str]* | :heavy_minus_sign: | Start of date range (RFC3339 format, e.g., 2024-01-01T00:00:00Z). If not specified, defaults to the maximum query window back from the end time. | 2024-01-01T00:00:00Z | +| `end_time` | *Optional[str]* | :heavy_minus_sign: | End of date range (RFC3339 format, e.g., 2024-01-31T23:59:59Z). If not specified, defaults to now. Cannot be in the future. | 2024-01-31T23:59:59Z | +| `page_size` | *Optional[int]* | :heavy_minus_sign: | Number of results per page (max 100) | 50 | +| `page_token` | *Optional[str]* | :heavy_minus_sign: | Pagination token from previous response | | +| `record_types` | List[[models.RecordTypes](../models/recordtypes.md)] | :heavy_minus_sign: | Filter by record types (A, AAAA). For multiple values, include comma-separated values. Defaults to A and AAAA when omitted. | [
"A"
] | +| `ip` | *str* | :heavy_check_mark: | The IP address of a DNS record. | 8.8.8.8 | \ No newline at end of file diff --git a/docs/models/v3globaldatadnsipresolutionboundresponse.md b/docs/models/v3globaldatadnsipresolutionboundresponse.md new file mode 100644 index 0000000..29c75d7 --- /dev/null +++ b/docs/models/v3globaldatadnsipresolutionboundresponse.md @@ -0,0 +1,9 @@ +# V3GlobaldataDNSIPResolutionBoundResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | +| `headers` | Dict[str, List[*str*]] | :heavy_check_mark: | N/A | +| `result` | [models.ResponseEnvelopeDNSIPResolutionBoundResponse](../models/responseenvelopednsipresolutionboundresponse.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/v3globaldatadnsipresolutionrangesglobals.md b/docs/models/v3globaldatadnsipresolutionrangesglobals.md new file mode 100644 index 0000000..6c34806 --- /dev/null +++ b/docs/models/v3globaldatadnsipresolutionrangesglobals.md @@ -0,0 +1,8 @@ +# V3GlobaldataDNSIPResolutionRangesGlobals + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `organization_id` | *Optional[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/v3globaldatadnsipresolutionrangesrequest.md b/docs/models/v3globaldatadnsipresolutionrangesrequest.md new file mode 100644 index 0000000..0e11deb --- /dev/null +++ b/docs/models/v3globaldatadnsipresolutionrangesrequest.md @@ -0,0 +1,15 @@ +# V3GlobaldataDNSIPResolutionRangesRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `organization_id` | *Optional[str]* | :heavy_minus_sign: | The ID of a Censys organization to associate the request with. See the [Getting Started docs](https://docs.censys.com/reference/get-started#step-3-find-and-use-your-organization-id-optional) for more information. | | +| `start_time` | *Optional[str]* | :heavy_minus_sign: | Start of date range (RFC3339 format, e.g., 2024-01-01T00:00:00Z). If not specified, defaults to the maximum query window back from the end time. | 2024-01-01T00:00:00Z | +| `end_time` | *Optional[str]* | :heavy_minus_sign: | End of date range (RFC3339 format, e.g., 2024-01-31T23:59:59Z). If not specified, defaults to now. Cannot be in the future. | 2024-01-31T23:59:59Z | +| `page_size` | *Optional[int]* | :heavy_minus_sign: | Number of results per page (max 100) | 50 | +| `page_token` | *Optional[str]* | :heavy_minus_sign: | Pagination token from previous response | | +| `record_types` | List[[models.QueryParamRecordTypes](../models/queryparamrecordtypes.md)] | :heavy_minus_sign: | Filter by record types (A, AAAA). For multiple values, include comma-separated values. Defaults to A and AAAA when omitted. | [
"A"
] | +| `domain` | *Optional[str]* | :heavy_minus_sign: | Filter to a specific domain name resolving to this IP. | platform.censys.io | +| `ip` | *str* | :heavy_check_mark: | The IP address of a DNS record. | 8.8.8.8 | \ No newline at end of file diff --git a/docs/models/v3globaldatadnsipresolutionrangesresponse.md b/docs/models/v3globaldatadnsipresolutionrangesresponse.md new file mode 100644 index 0000000..f109920 --- /dev/null +++ b/docs/models/v3globaldatadnsipresolutionrangesresponse.md @@ -0,0 +1,9 @@ +# V3GlobaldataDNSIPResolutionRangesResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | +| `headers` | Dict[str, List[*str*]] | :heavy_check_mark: | N/A | +| `result` | [models.ResponseEnvelopeDNSIPResolutionRangeResponse](../models/responseenvelopednsipresolutionrangeresponse.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/v3globaldatadnsnameresolutionboundglobals.md b/docs/models/v3globaldatadnsnameresolutionboundglobals.md new file mode 100644 index 0000000..19460fc --- /dev/null +++ b/docs/models/v3globaldatadnsnameresolutionboundglobals.md @@ -0,0 +1,8 @@ +# V3GlobaldataDNSNameResolutionBoundGlobals + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `organization_id` | *Optional[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/v3globaldatadnsnameresolutionboundqueryparamrecordtypes.md b/docs/models/v3globaldatadnsnameresolutionboundqueryparamrecordtypes.md new file mode 100644 index 0000000..7330cb4 --- /dev/null +++ b/docs/models/v3globaldatadnsnameresolutionboundqueryparamrecordtypes.md @@ -0,0 +1,21 @@ +# V3GlobaldataDNSNameResolutionBoundQueryParamRecordTypes + +## Example Usage + +```python +from censys_platform.models import V3GlobaldataDNSNameResolutionBoundQueryParamRecordTypes + +value = V3GlobaldataDNSNameResolutionBoundQueryParamRecordTypes.A +``` + + +## Values + +| Name | Value | +| ------ | ------ | +| `A` | A | +| `AAAA` | AAAA | +| `MX` | MX | +| `NS` | NS | +| `SOA` | SOA | +| `TXT` | TXT | \ No newline at end of file diff --git a/docs/models/v3globaldatadnsnameresolutionboundrequest.md b/docs/models/v3globaldatadnsnameresolutionboundrequest.md new file mode 100644 index 0000000..523759d --- /dev/null +++ b/docs/models/v3globaldatadnsnameresolutionboundrequest.md @@ -0,0 +1,14 @@ +# V3GlobaldataDNSNameResolutionBoundRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `organization_id` | *Optional[str]* | :heavy_minus_sign: | The ID of a Censys organization to associate the request with. See the [Getting Started docs](https://docs.censys.com/reference/get-started#step-3-find-and-use-your-organization-id-optional) for more information. | | +| `start_time` | *Optional[str]* | :heavy_minus_sign: | Start of date range (RFC3339 format, e.g., 2024-01-01T00:00:00Z). If not specified, defaults to the maximum query window back from the end time. | 2024-01-01T00:00:00Z | +| `end_time` | *Optional[str]* | :heavy_minus_sign: | End of date range (RFC3339 format, e.g., 2024-01-31T23:59:59Z). If not specified, defaults to now. Cannot be in the future. | 2024-01-31T23:59:59Z | +| `page_size` | *Optional[int]* | :heavy_minus_sign: | Number of results per page (max 100) | 50 | +| `page_token` | *Optional[str]* | :heavy_minus_sign: | Pagination token from previous response | | +| `record_types` | List[[models.V3GlobaldataDNSNameResolutionBoundQueryParamRecordTypes](../models/v3globaldatadnsnameresolutionboundqueryparamrecordtypes.md)] | :heavy_minus_sign: | Filter by record types (A, AAAA, MX, NS, SOA, TXT). For multiple values, include comma-separated values. Defaults to all supported types when omitted. | [
"MX"
] | +| `name` | *str* | :heavy_check_mark: | The domain name | platform.censys.io | \ No newline at end of file diff --git a/docs/models/v3globaldatadnsnameresolutionboundresponse.md b/docs/models/v3globaldatadnsnameresolutionboundresponse.md new file mode 100644 index 0000000..845c57c --- /dev/null +++ b/docs/models/v3globaldatadnsnameresolutionboundresponse.md @@ -0,0 +1,9 @@ +# V3GlobaldataDNSNameResolutionBoundResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `headers` | Dict[str, List[*str*]] | :heavy_check_mark: | N/A | +| `result` | [models.ResponseEnvelopeDNSNameResolutionBoundResponse](../models/responseenvelopednsnameresolutionboundresponse.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/v3globaldatadnsnameresolutionrangesglobals.md b/docs/models/v3globaldatadnsnameresolutionrangesglobals.md new file mode 100644 index 0000000..1cc39ee --- /dev/null +++ b/docs/models/v3globaldatadnsnameresolutionrangesglobals.md @@ -0,0 +1,8 @@ +# V3GlobaldataDNSNameResolutionRangesGlobals + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `organization_id` | *Optional[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/v3globaldatadnsnameresolutionrangesqueryparamrecordtypes.md b/docs/models/v3globaldatadnsnameresolutionrangesqueryparamrecordtypes.md new file mode 100644 index 0000000..77ff5fe --- /dev/null +++ b/docs/models/v3globaldatadnsnameresolutionrangesqueryparamrecordtypes.md @@ -0,0 +1,21 @@ +# V3GlobaldataDNSNameResolutionRangesQueryParamRecordTypes + +## Example Usage + +```python +from censys_platform.models import V3GlobaldataDNSNameResolutionRangesQueryParamRecordTypes + +value = V3GlobaldataDNSNameResolutionRangesQueryParamRecordTypes.A +``` + + +## Values + +| Name | Value | +| ------ | ------ | +| `A` | A | +| `AAAA` | AAAA | +| `MX` | MX | +| `NS` | NS | +| `SOA` | SOA | +| `TXT` | TXT | \ No newline at end of file diff --git a/docs/models/v3globaldatadnsnameresolutionrangesrequest.md b/docs/models/v3globaldatadnsnameresolutionrangesrequest.md new file mode 100644 index 0000000..dabf2c7 --- /dev/null +++ b/docs/models/v3globaldatadnsnameresolutionrangesrequest.md @@ -0,0 +1,14 @@ +# V3GlobaldataDNSNameResolutionRangesRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `organization_id` | *Optional[str]* | :heavy_minus_sign: | The ID of a Censys organization to associate the request with. See the [Getting Started docs](https://docs.censys.com/reference/get-started#step-3-find-and-use-your-organization-id-optional) for more information. | | +| `start_time` | *Optional[str]* | :heavy_minus_sign: | Start of date range (RFC3339 format, e.g., 2024-01-01T00:00:00Z). If not specified, defaults to the maximum query window back from the end time. | 2024-01-01T00:00:00Z | +| `end_time` | *Optional[str]* | :heavy_minus_sign: | End of date range (RFC3339 format, e.g., 2024-01-31T23:59:59Z). If not specified, defaults to now. Cannot be in the future. | 2024-01-31T23:59:59Z | +| `page_size` | *Optional[int]* | :heavy_minus_sign: | Number of results per page (max 100) | 50 | +| `page_token` | *Optional[str]* | :heavy_minus_sign: | Pagination token from previous response | | +| `record_types` | List[[models.V3GlobaldataDNSNameResolutionRangesQueryParamRecordTypes](../models/v3globaldatadnsnameresolutionrangesqueryparamrecordtypes.md)] | :heavy_minus_sign: | Filter by record types (A, AAAA, MX, NS, SOA, TXT). For multiple values, include comma-separated values. Defaults to all supported types when omitted. | [
"MX"
] | +| `name` | *str* | :heavy_check_mark: | The domain name | platform.censys.io | \ No newline at end of file diff --git a/docs/models/v3globaldatadnsnameresolutionrangesresponse.md b/docs/models/v3globaldatadnsnameresolutionrangesresponse.md new file mode 100644 index 0000000..811d062 --- /dev/null +++ b/docs/models/v3globaldatadnsnameresolutionrangesresponse.md @@ -0,0 +1,9 @@ +# V3GlobaldataDNSNameResolutionRangesResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `headers` | Dict[str, List[*str*]] | :heavy_check_mark: | N/A | +| `result` | [models.ResponseEnvelopeDNSNameResolutionRangeResponse](../models/responseenvelopednsnameresolutionrangeresponse.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/vuln.md b/docs/models/vuln.md index 2d1d278..5845047 100644 --- a/docs/models/vuln.md +++ b/docs/models/vuln.md @@ -15,4 +15,5 @@ | `risk_source` | [Optional[models.VulnRiskSource]](../models/vulnrisksource.md) | :heavy_minus_sign: | N/A | | `severity` | [Optional[models.VulnSeverity]](../models/vulnseverity.md) | :heavy_minus_sign: | N/A | | `source` | [Optional[models.VulnSource]](../models/vulnsource.md) | :heavy_minus_sign: | N/A | +| `type` | List[*str*] | :heavy_minus_sign: | N/A | | `year` | *Optional[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/webproperty.md b/docs/models/webproperty.md index 650fbc0..60a6bc6 100644 --- a/docs/models/webproperty.md +++ b/docs/models/webproperty.md @@ -6,6 +6,7 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | | `cert` | [Optional[models.Certificate]](../models/certificate.md) | :heavy_minus_sign: | N/A | +| `compromises` | List[[models.Risk](../models/risk.md)] | :heavy_minus_sign: | N/A | | `endpoints` | List[[models.EndpointScanState](../models/endpointscanstate.md)] | :heavy_minus_sign: | N/A | | `exposures` | List[[models.Risk](../models/risk.md)] | :heavy_minus_sign: | N/A | | `hardware` | List[[models.Attribute](../models/attribute.md)] | :heavy_minus_sign: | N/A | diff --git a/docs/sdks/globaldata/README.md b/docs/sdks/globaldata/README.md index 14eb031..b109552 100644 --- a/docs/sdks/globaldata/README.md +++ b/docs/sdks/globaldata/README.md @@ -16,6 +16,10 @@ Endpoints related to the Global Data product * [get_host_timeline](#get_host_timeline) - Get host event history * [get_web_properties](#get_web_properties) - Retrieve multiple web properties * [get_web_property](#get_web_property) - Get a web property +* [list_dns_ip_resolution_bounds](#list_dns_ip_resolution_bounds) - Get latest DNS names that resolved to an IP +* [list_dns_ip_resolution_ranges](#list_dns_ip_resolution_ranges) - Get DNS names that resolved to an IP within a time window +* [list_dns_name_resolution_bounds](#list_dns_name_resolution_bounds) - Get latest DNS resolution records for a name +* [list_dns_name_resolution_ranges](#list_dns_name_resolution_ranges) - Get historical DNS resolution ranges for a name * [create_tracked_scan](#create_tracked_scan) - Live Rescan: Initiate a new rescan * [get_tracked_scan](#get_tracked_scan) - Get scan status * [aggregate](#aggregate) - Aggregate results for a search query @@ -497,6 +501,215 @@ with SDK( | models.ErrorModel | 500 | application/problem+json | | models.SDKError | 4XX, 5XX | \*/\* | +## list_dns_ip_resolution_bounds + +Retrieve the latest domain names that resolved to the IP you provide (A and AAAA). You can narrow results with `record_types` (A or AAAA).

[Learn more about Censys Active DNS Resolution](https://docs.censys.com/docs/platform-active-dns).

This endpoint is in beta and is only available to Censys Enterprise users. + +### Example Usage + + +```python +import censys_platform +from censys_platform import SDK + + +with SDK( + organization_id="11111111-2222-3333-4444-555555555555", + personal_access_token="", +) as sdk: + + res = sdk.global_data.list_dns_ip_resolution_bounds(request={ + "start_time": "2024-01-01T00:00:00Z", + "end_time": "2024-01-31T23:59:59Z", + "page_size": 50, + "record_types": [ + censys_platform.RecordTypes.A, + ], + "ip": "8.8.8.8", + }) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | +| `request` | [models.V3GlobaldataDNSIPResolutionBoundRequest](../../models/v3globaldatadnsipresolutionboundrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.V3GlobaldataDNSIPResolutionBoundResponse](../../models/v3globaldatadnsipresolutionboundresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| models.AuthenticationError | 401 | application/json | +| models.ErrorModel | 400, 403, 404, 409 | application/problem+json | +| models.ErrorModel | 500 | application/problem+json | +| models.SDKError | 4XX, 5XX | \*/\* | + +## list_dns_ip_resolution_ranges + +Retrieve domain names that resolved to the IP you provide (A and AAAA) within the requested time window.

[Learn more about Censys Active DNS Resolution](https://docs.censys.com/docs/platform-active-dns).

This endpoint is in beta and is only available to Censys Enterprise users. + +### Example Usage + + +```python +import censys_platform +from censys_platform import SDK + + +with SDK( + organization_id="11111111-2222-3333-4444-555555555555", + personal_access_token="", +) as sdk: + + res = sdk.global_data.list_dns_ip_resolution_ranges(request={ + "start_time": "2024-01-01T00:00:00Z", + "end_time": "2024-01-31T23:59:59Z", + "page_size": 50, + "record_types": [ + censys_platform.QueryParamRecordTypes.A, + ], + "domain": "platform.censys.io", + "ip": "8.8.8.8", + }) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | +| `request` | [models.V3GlobaldataDNSIPResolutionRangesRequest](../../models/v3globaldatadnsipresolutionrangesrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.V3GlobaldataDNSIPResolutionRangesResponse](../../models/v3globaldatadnsipresolutionrangesresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| models.AuthenticationError | 401 | application/json | +| models.ErrorModel | 400, 403, 404, 409 | application/problem+json | +| models.ErrorModel | 500 | application/problem+json | +| models.SDKError | 4XX, 5XX | \*/\* | + +## list_dns_name_resolution_bounds + +Retrieve the latest DNS resolution records for a name. This endpoint returns the latest observed A, AAAA, MX, NS, SOA, and TXT records for the name you provide. You can filter by one or more record types using `record_types`.

[Learn more about Censys Active DNS Resolution](https://docs.censys.com/docs/platform-active-dns).

This endpoint is in beta and is only available to Censys Enterprise users. + +### Example Usage + + +```python +import censys_platform +from censys_platform import SDK + + +with SDK( + organization_id="11111111-2222-3333-4444-555555555555", + personal_access_token="", +) as sdk: + + res = sdk.global_data.list_dns_name_resolution_bounds(request={ + "start_time": "2024-01-01T00:00:00Z", + "end_time": "2024-01-31T23:59:59Z", + "page_size": 50, + "record_types": [ + censys_platform.V3GlobaldataDNSNameResolutionBoundQueryParamRecordTypes.MX, + ], + "name": "platform.censys.io", + }) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | +| `request` | [models.V3GlobaldataDNSNameResolutionBoundRequest](../../models/v3globaldatadnsnameresolutionboundrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.V3GlobaldataDNSNameResolutionBoundResponse](../../models/v3globaldatadnsnameresolutionboundresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| models.AuthenticationError | 401 | application/json | +| models.ErrorModel | 400, 403, 404, 409 | application/problem+json | +| models.ErrorModel | 500 | application/problem+json | +| models.SDKError | 4XX, 5XX | \*/\* | + +## list_dns_name_resolution_ranges + +Retrieve historical DNS resolution observations for a name. Each item is one window during which a record value was observed by Censys.

[Learn more about Censys Active DNS Resolution](https://docs.censys.com/docs/platform-active-dns).

This endpoint is in beta and is only available to Censys Enterprise users. + +### Example Usage + + +```python +import censys_platform +from censys_platform import SDK + + +with SDK( + organization_id="11111111-2222-3333-4444-555555555555", + personal_access_token="", +) as sdk: + + res = sdk.global_data.list_dns_name_resolution_ranges(request={ + "start_time": "2024-01-01T00:00:00Z", + "end_time": "2024-01-31T23:59:59Z", + "page_size": 50, + "record_types": [ + censys_platform.V3GlobaldataDNSNameResolutionRangesQueryParamRecordTypes.MX, + ], + "name": "platform.censys.io", + }) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | +| `request` | [models.V3GlobaldataDNSNameResolutionRangesRequest](../../models/v3globaldatadnsnameresolutionrangesrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.V3GlobaldataDNSNameResolutionRangesResponse](../../models/v3globaldatadnsnameresolutionrangesresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| models.AuthenticationError | 401 | application/json | +| models.ErrorModel | 400, 403, 404, 409 | application/problem+json | +| models.ErrorModel | 500 | application/problem+json | +| models.SDKError | 4XX, 5XX | \*/\* | + ## create_tracked_scan Initiate a rescan for a known host service at a specific IP and port (`ip:port`) or hostname and port (`hostname:port`). This is equivalent to the [Live Rescan](https://docs.censys.com/docs/platform-live-rescan#/) feature available in the UI, but you can also target web properties in addition to hosts.

The scan may take several minutes to complete. The response will contain a scan ID that you can use to [monitor the scan's status](https://docs.censys.com/reference/v3-globaldata-scans-get#/). After the scan completes, perform a lookup on the target asset to retrieve detailed scan information.

This endpoint is available to all Enterprise customers. It costs 10 credits to execute. diff --git a/pyproject.toml b/pyproject.toml index f4c536d..552b51b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "censys-platform" -version = "0.14.0" +version = "0.14.1" description = "Python Client SDK Generated by Speakeasy." authors = [{ name = "Speakeasy" },] readme = "README-PYPI.md" diff --git a/src/censys_platform/_version.py b/src/censys_platform/_version.py index c80c1a5..3f7ad73 100644 --- a/src/censys_platform/_version.py +++ b/src/censys_platform/_version.py @@ -3,10 +3,10 @@ import importlib.metadata __title__: str = "censys-platform" -__version__: str = "0.14.0" -__openapi_doc_version__: str = "1.0.103" -__gen_version__: str = "2.892.5" -__user_agent__: str = "speakeasy-sdk/python 0.14.0 2.892.5 1.0.103 censys-platform" +__version__: str = "0.14.1" +__openapi_doc_version__: str = "1.0.105" +__gen_version__: str = "2.897.1" +__user_agent__: str = "speakeasy-sdk/python 0.14.1 2.897.1 1.0.105 censys-platform" try: if __package__ is not None: diff --git a/src/censys_platform/global_data.py b/src/censys_platform/global_data.py index fe0954a..2bee92e 100644 --- a/src/censys_platform/global_data.py +++ b/src/censys_platform/global_data.py @@ -2310,6 +2310,878 @@ async def get_web_property_async( raise models.SDKError("Unexpected response received", http_res) + def list_dns_ip_resolution_bounds( + self, + *, + request: Union[ + models.V3GlobaldataDNSIPResolutionBoundRequest, + models.V3GlobaldataDNSIPResolutionBoundRequestTypedDict, + ], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.V3GlobaldataDNSIPResolutionBoundResponse: + r"""Get latest DNS names that resolved to an IP + + Retrieve the latest domain names that resolved to the IP you provide (A and AAAA). You can narrow results with `record_types` (A or AAAA).

[Learn more about Censys Active DNS Resolution](https://docs.censys.com/docs/platform-active-dns).

This endpoint is in beta and is only available to Censys Enterprise users. + + :param request: The request object to send. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + if not isinstance(request, BaseModel): + request = utils.unmarshal( + request, models.V3GlobaldataDNSIPResolutionBoundRequest + ) + request = cast(models.V3GlobaldataDNSIPResolutionBoundRequest, request) + + req = self._build_request( + method="GET", + path="/v3/global/dns/resolutions/ip/{ip}/bounds", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + _globals=models.V3GlobaldataDNSIPResolutionBoundGlobals( + organization_id=self.sdk_configuration.globals.organization_id, + ), + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="v3-globaldata-dns-ip-resolution-bound", + oauth2_scopes=None, + security_source=self.sdk_configuration.security, + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return models.V3GlobaldataDNSIPResolutionBoundResponse( + result=unmarshal_json_response( + models.ResponseEnvelopeDNSIPResolutionBoundResponse, http_res + ), + headers=utils.get_response_headers(http_res.headers), + ) + if utils.match_response(http_res, "401", "application/json"): + response_data = unmarshal_json_response( + models.AuthenticationErrorData, http_res + ) + raise models.AuthenticationError(response_data, http_res) + if utils.match_response( + http_res, ["400", "403", "404", "409"], "application/problem+json" + ): + response_data = unmarshal_json_response(models.ErrorModelData, http_res) + raise models.ErrorModel(response_data, http_res) + if utils.match_response(http_res, "500", "application/problem+json"): + response_data = unmarshal_json_response(models.ErrorModelData, http_res) + raise models.ErrorModel(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.SDKError("API error occurred", http_res, http_res_text) + + raise models.SDKError("Unexpected response received", http_res) + + async def list_dns_ip_resolution_bounds_async( + self, + *, + request: Union[ + models.V3GlobaldataDNSIPResolutionBoundRequest, + models.V3GlobaldataDNSIPResolutionBoundRequestTypedDict, + ], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.V3GlobaldataDNSIPResolutionBoundResponse: + r"""Get latest DNS names that resolved to an IP + + Retrieve the latest domain names that resolved to the IP you provide (A and AAAA). You can narrow results with `record_types` (A or AAAA).

[Learn more about Censys Active DNS Resolution](https://docs.censys.com/docs/platform-active-dns).

This endpoint is in beta and is only available to Censys Enterprise users. + + :param request: The request object to send. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + if not isinstance(request, BaseModel): + request = utils.unmarshal( + request, models.V3GlobaldataDNSIPResolutionBoundRequest + ) + request = cast(models.V3GlobaldataDNSIPResolutionBoundRequest, request) + + req = self._build_request_async( + method="GET", + path="/v3/global/dns/resolutions/ip/{ip}/bounds", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + _globals=models.V3GlobaldataDNSIPResolutionBoundGlobals( + organization_id=self.sdk_configuration.globals.organization_id, + ), + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="v3-globaldata-dns-ip-resolution-bound", + oauth2_scopes=None, + security_source=self.sdk_configuration.security, + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return models.V3GlobaldataDNSIPResolutionBoundResponse( + result=unmarshal_json_response( + models.ResponseEnvelopeDNSIPResolutionBoundResponse, http_res + ), + headers=utils.get_response_headers(http_res.headers), + ) + if utils.match_response(http_res, "401", "application/json"): + response_data = unmarshal_json_response( + models.AuthenticationErrorData, http_res + ) + raise models.AuthenticationError(response_data, http_res) + if utils.match_response( + http_res, ["400", "403", "404", "409"], "application/problem+json" + ): + response_data = unmarshal_json_response(models.ErrorModelData, http_res) + raise models.ErrorModel(response_data, http_res) + if utils.match_response(http_res, "500", "application/problem+json"): + response_data = unmarshal_json_response(models.ErrorModelData, http_res) + raise models.ErrorModel(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.SDKError("API error occurred", http_res, http_res_text) + + raise models.SDKError("Unexpected response received", http_res) + + def list_dns_ip_resolution_ranges( + self, + *, + request: Union[ + models.V3GlobaldataDNSIPResolutionRangesRequest, + models.V3GlobaldataDNSIPResolutionRangesRequestTypedDict, + ], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.V3GlobaldataDNSIPResolutionRangesResponse: + r"""Get DNS names that resolved to an IP within a time window + + Retrieve domain names that resolved to the IP you provide (A and AAAA) within the requested time window.

[Learn more about Censys Active DNS Resolution](https://docs.censys.com/docs/platform-active-dns).

This endpoint is in beta and is only available to Censys Enterprise users. + + :param request: The request object to send. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + if not isinstance(request, BaseModel): + request = utils.unmarshal( + request, models.V3GlobaldataDNSIPResolutionRangesRequest + ) + request = cast(models.V3GlobaldataDNSIPResolutionRangesRequest, request) + + req = self._build_request( + method="GET", + path="/v3/global/dns/resolutions/ip/{ip}/ranges", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + _globals=models.V3GlobaldataDNSIPResolutionRangesGlobals( + organization_id=self.sdk_configuration.globals.organization_id, + ), + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="v3-globaldata-dns-ip-resolution-ranges", + oauth2_scopes=None, + security_source=self.sdk_configuration.security, + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return models.V3GlobaldataDNSIPResolutionRangesResponse( + result=unmarshal_json_response( + models.ResponseEnvelopeDNSIPResolutionRangeResponse, http_res + ), + headers=utils.get_response_headers(http_res.headers), + ) + if utils.match_response(http_res, "401", "application/json"): + response_data = unmarshal_json_response( + models.AuthenticationErrorData, http_res + ) + raise models.AuthenticationError(response_data, http_res) + if utils.match_response( + http_res, ["400", "403", "404", "409"], "application/problem+json" + ): + response_data = unmarshal_json_response(models.ErrorModelData, http_res) + raise models.ErrorModel(response_data, http_res) + if utils.match_response(http_res, "500", "application/problem+json"): + response_data = unmarshal_json_response(models.ErrorModelData, http_res) + raise models.ErrorModel(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.SDKError("API error occurred", http_res, http_res_text) + + raise models.SDKError("Unexpected response received", http_res) + + async def list_dns_ip_resolution_ranges_async( + self, + *, + request: Union[ + models.V3GlobaldataDNSIPResolutionRangesRequest, + models.V3GlobaldataDNSIPResolutionRangesRequestTypedDict, + ], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.V3GlobaldataDNSIPResolutionRangesResponse: + r"""Get DNS names that resolved to an IP within a time window + + Retrieve domain names that resolved to the IP you provide (A and AAAA) within the requested time window.

[Learn more about Censys Active DNS Resolution](https://docs.censys.com/docs/platform-active-dns).

This endpoint is in beta and is only available to Censys Enterprise users. + + :param request: The request object to send. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + if not isinstance(request, BaseModel): + request = utils.unmarshal( + request, models.V3GlobaldataDNSIPResolutionRangesRequest + ) + request = cast(models.V3GlobaldataDNSIPResolutionRangesRequest, request) + + req = self._build_request_async( + method="GET", + path="/v3/global/dns/resolutions/ip/{ip}/ranges", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + _globals=models.V3GlobaldataDNSIPResolutionRangesGlobals( + organization_id=self.sdk_configuration.globals.organization_id, + ), + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="v3-globaldata-dns-ip-resolution-ranges", + oauth2_scopes=None, + security_source=self.sdk_configuration.security, + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return models.V3GlobaldataDNSIPResolutionRangesResponse( + result=unmarshal_json_response( + models.ResponseEnvelopeDNSIPResolutionRangeResponse, http_res + ), + headers=utils.get_response_headers(http_res.headers), + ) + if utils.match_response(http_res, "401", "application/json"): + response_data = unmarshal_json_response( + models.AuthenticationErrorData, http_res + ) + raise models.AuthenticationError(response_data, http_res) + if utils.match_response( + http_res, ["400", "403", "404", "409"], "application/problem+json" + ): + response_data = unmarshal_json_response(models.ErrorModelData, http_res) + raise models.ErrorModel(response_data, http_res) + if utils.match_response(http_res, "500", "application/problem+json"): + response_data = unmarshal_json_response(models.ErrorModelData, http_res) + raise models.ErrorModel(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.SDKError("API error occurred", http_res, http_res_text) + + raise models.SDKError("Unexpected response received", http_res) + + def list_dns_name_resolution_bounds( + self, + *, + request: Union[ + models.V3GlobaldataDNSNameResolutionBoundRequest, + models.V3GlobaldataDNSNameResolutionBoundRequestTypedDict, + ], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.V3GlobaldataDNSNameResolutionBoundResponse: + r"""Get latest DNS resolution records for a name + + Retrieve the latest DNS resolution records for a name. This endpoint returns the latest observed A, AAAA, MX, NS, SOA, and TXT records for the name you provide. You can filter by one or more record types using `record_types`.

[Learn more about Censys Active DNS Resolution](https://docs.censys.com/docs/platform-active-dns).

This endpoint is in beta and is only available to Censys Enterprise users. + + :param request: The request object to send. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + if not isinstance(request, BaseModel): + request = utils.unmarshal( + request, models.V3GlobaldataDNSNameResolutionBoundRequest + ) + request = cast(models.V3GlobaldataDNSNameResolutionBoundRequest, request) + + req = self._build_request( + method="GET", + path="/v3/global/dns/resolutions/{name}/bounds", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + _globals=models.V3GlobaldataDNSNameResolutionBoundGlobals( + organization_id=self.sdk_configuration.globals.organization_id, + ), + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="v3-globaldata-dns-name-resolution-bound", + oauth2_scopes=None, + security_source=self.sdk_configuration.security, + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return models.V3GlobaldataDNSNameResolutionBoundResponse( + result=unmarshal_json_response( + models.ResponseEnvelopeDNSNameResolutionBoundResponse, http_res + ), + headers=utils.get_response_headers(http_res.headers), + ) + if utils.match_response(http_res, "401", "application/json"): + response_data = unmarshal_json_response( + models.AuthenticationErrorData, http_res + ) + raise models.AuthenticationError(response_data, http_res) + if utils.match_response( + http_res, ["400", "403", "404", "409"], "application/problem+json" + ): + response_data = unmarshal_json_response(models.ErrorModelData, http_res) + raise models.ErrorModel(response_data, http_res) + if utils.match_response(http_res, "500", "application/problem+json"): + response_data = unmarshal_json_response(models.ErrorModelData, http_res) + raise models.ErrorModel(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.SDKError("API error occurred", http_res, http_res_text) + + raise models.SDKError("Unexpected response received", http_res) + + async def list_dns_name_resolution_bounds_async( + self, + *, + request: Union[ + models.V3GlobaldataDNSNameResolutionBoundRequest, + models.V3GlobaldataDNSNameResolutionBoundRequestTypedDict, + ], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.V3GlobaldataDNSNameResolutionBoundResponse: + r"""Get latest DNS resolution records for a name + + Retrieve the latest DNS resolution records for a name. This endpoint returns the latest observed A, AAAA, MX, NS, SOA, and TXT records for the name you provide. You can filter by one or more record types using `record_types`.

[Learn more about Censys Active DNS Resolution](https://docs.censys.com/docs/platform-active-dns).

This endpoint is in beta and is only available to Censys Enterprise users. + + :param request: The request object to send. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + if not isinstance(request, BaseModel): + request = utils.unmarshal( + request, models.V3GlobaldataDNSNameResolutionBoundRequest + ) + request = cast(models.V3GlobaldataDNSNameResolutionBoundRequest, request) + + req = self._build_request_async( + method="GET", + path="/v3/global/dns/resolutions/{name}/bounds", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + _globals=models.V3GlobaldataDNSNameResolutionBoundGlobals( + organization_id=self.sdk_configuration.globals.organization_id, + ), + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="v3-globaldata-dns-name-resolution-bound", + oauth2_scopes=None, + security_source=self.sdk_configuration.security, + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return models.V3GlobaldataDNSNameResolutionBoundResponse( + result=unmarshal_json_response( + models.ResponseEnvelopeDNSNameResolutionBoundResponse, http_res + ), + headers=utils.get_response_headers(http_res.headers), + ) + if utils.match_response(http_res, "401", "application/json"): + response_data = unmarshal_json_response( + models.AuthenticationErrorData, http_res + ) + raise models.AuthenticationError(response_data, http_res) + if utils.match_response( + http_res, ["400", "403", "404", "409"], "application/problem+json" + ): + response_data = unmarshal_json_response(models.ErrorModelData, http_res) + raise models.ErrorModel(response_data, http_res) + if utils.match_response(http_res, "500", "application/problem+json"): + response_data = unmarshal_json_response(models.ErrorModelData, http_res) + raise models.ErrorModel(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.SDKError("API error occurred", http_res, http_res_text) + + raise models.SDKError("Unexpected response received", http_res) + + def list_dns_name_resolution_ranges( + self, + *, + request: Union[ + models.V3GlobaldataDNSNameResolutionRangesRequest, + models.V3GlobaldataDNSNameResolutionRangesRequestTypedDict, + ], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.V3GlobaldataDNSNameResolutionRangesResponse: + r"""Get historical DNS resolution ranges for a name + + Retrieve historical DNS resolution observations for a name. Each item is one window during which a record value was observed by Censys.

[Learn more about Censys Active DNS Resolution](https://docs.censys.com/docs/platform-active-dns).

This endpoint is in beta and is only available to Censys Enterprise users. + + :param request: The request object to send. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + if not isinstance(request, BaseModel): + request = utils.unmarshal( + request, models.V3GlobaldataDNSNameResolutionRangesRequest + ) + request = cast(models.V3GlobaldataDNSNameResolutionRangesRequest, request) + + req = self._build_request( + method="GET", + path="/v3/global/dns/resolutions/{name}/ranges", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + _globals=models.V3GlobaldataDNSNameResolutionRangesGlobals( + organization_id=self.sdk_configuration.globals.organization_id, + ), + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="v3-globaldata-dns-name-resolution-ranges", + oauth2_scopes=None, + security_source=self.sdk_configuration.security, + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return models.V3GlobaldataDNSNameResolutionRangesResponse( + result=unmarshal_json_response( + models.ResponseEnvelopeDNSNameResolutionRangeResponse, http_res + ), + headers=utils.get_response_headers(http_res.headers), + ) + if utils.match_response(http_res, "401", "application/json"): + response_data = unmarshal_json_response( + models.AuthenticationErrorData, http_res + ) + raise models.AuthenticationError(response_data, http_res) + if utils.match_response( + http_res, ["400", "403", "404", "409"], "application/problem+json" + ): + response_data = unmarshal_json_response(models.ErrorModelData, http_res) + raise models.ErrorModel(response_data, http_res) + if utils.match_response(http_res, "500", "application/problem+json"): + response_data = unmarshal_json_response(models.ErrorModelData, http_res) + raise models.ErrorModel(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.SDKError("API error occurred", http_res, http_res_text) + + raise models.SDKError("Unexpected response received", http_res) + + async def list_dns_name_resolution_ranges_async( + self, + *, + request: Union[ + models.V3GlobaldataDNSNameResolutionRangesRequest, + models.V3GlobaldataDNSNameResolutionRangesRequestTypedDict, + ], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.V3GlobaldataDNSNameResolutionRangesResponse: + r"""Get historical DNS resolution ranges for a name + + Retrieve historical DNS resolution observations for a name. Each item is one window during which a record value was observed by Censys.

[Learn more about Censys Active DNS Resolution](https://docs.censys.com/docs/platform-active-dns).

This endpoint is in beta and is only available to Censys Enterprise users. + + :param request: The request object to send. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + if not isinstance(request, BaseModel): + request = utils.unmarshal( + request, models.V3GlobaldataDNSNameResolutionRangesRequest + ) + request = cast(models.V3GlobaldataDNSNameResolutionRangesRequest, request) + + req = self._build_request_async( + method="GET", + path="/v3/global/dns/resolutions/{name}/ranges", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + _globals=models.V3GlobaldataDNSNameResolutionRangesGlobals( + organization_id=self.sdk_configuration.globals.organization_id, + ), + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="v3-globaldata-dns-name-resolution-ranges", + oauth2_scopes=None, + security_source=self.sdk_configuration.security, + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return models.V3GlobaldataDNSNameResolutionRangesResponse( + result=unmarshal_json_response( + models.ResponseEnvelopeDNSNameResolutionRangeResponse, http_res + ), + headers=utils.get_response_headers(http_res.headers), + ) + if utils.match_response(http_res, "401", "application/json"): + response_data = unmarshal_json_response( + models.AuthenticationErrorData, http_res + ) + raise models.AuthenticationError(response_data, http_res) + if utils.match_response( + http_res, ["400", "403", "404", "409"], "application/problem+json" + ): + response_data = unmarshal_json_response(models.ErrorModelData, http_res) + raise models.ErrorModel(response_data, http_res) + if utils.match_response(http_res, "500", "application/problem+json"): + response_data = unmarshal_json_response(models.ErrorModelData, http_res) + raise models.ErrorModel(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.SDKError("API error occurred", http_res, http_res_text) + + raise models.SDKError("Unexpected response received", http_res) + def create_tracked_scan( self, *, diff --git a/src/censys_platform/models/__init__.py b/src/censys_platform/models/__init__.py index c5c03e0..fe5ff84 100644 --- a/src/censys_platform/models/__init__.py +++ b/src/censys_platform/models/__init__.py @@ -245,6 +245,42 @@ DNSResourceRecordType, DNSResourceRecordTypedDict, ) + from .dnsipresolutionboundresponse import ( + DNSIPResolutionBoundResponse, + DNSIPResolutionBoundResponseTypedDict, + ) + from .dnsipresolutionrangerecord import ( + DNSIPResolutionRangeRecord, + DNSIPResolutionRangeRecordRecordType, + DNSIPResolutionRangeRecordTypedDict, + ) + from .dnsipresolutionrangeresponse import ( + DNSIPResolutionRangeResponse, + DNSIPResolutionRangeResponseTypedDict, + ) + from .dnsipresolutionrecord import ( + DNSIPResolutionRecord, + DNSIPResolutionRecordRecordType, + DNSIPResolutionRecordTypedDict, + ) + from .dnsnameresolutionboundresponse import ( + DNSNameResolutionBoundResponse, + DNSNameResolutionBoundResponseTypedDict, + ) + from .dnsnameresolutionrangeresponse import ( + DNSNameResolutionRangeResponse, + DNSNameResolutionRangeResponseTypedDict, + ) + from .dnsresolutionrangerecord import ( + DNSResolutionRangeRecord, + DNSResolutionRangeRecordRecordType, + DNSResolutionRangeRecordTypedDict, + ) + from .dnsresolutionrecord import ( + DNSResolutionRecord, + DNSResolutionRecordRecordType, + DNSResolutionRecordTypedDict, + ) from .dsacryptographickey import DSACryptographicKey, DSACryptographicKeyTypedDict from .dsapublickey import DsaPublicKey, DsaPublicKeyTypedDict from .dtls import Dtls, DtlsTypedDict @@ -875,6 +911,22 @@ ResponseEnvelopeCreditUsageReport, ResponseEnvelopeCreditUsageReportTypedDict, ) + from .responseenvelopednsipresolutionboundresponse import ( + ResponseEnvelopeDNSIPResolutionBoundResponse, + ResponseEnvelopeDNSIPResolutionBoundResponseTypedDict, + ) + from .responseenvelopednsipresolutionrangeresponse import ( + ResponseEnvelopeDNSIPResolutionRangeResponse, + ResponseEnvelopeDNSIPResolutionRangeResponseTypedDict, + ) + from .responseenvelopednsnameresolutionboundresponse import ( + ResponseEnvelopeDNSNameResolutionBoundResponse, + ResponseEnvelopeDNSNameResolutionBoundResponseTypedDict, + ) + from .responseenvelopednsnameresolutionrangeresponse import ( + ResponseEnvelopeDNSNameResolutionRangeResponse, + ResponseEnvelopeDNSNameResolutionRangeResponseTypedDict, + ) from .responseenvelopehostasset import ( ResponseEnvelopeHostAsset, ResponseEnvelopeHostAssetTypedDict, @@ -1493,6 +1545,42 @@ V3GlobaldataAssetWebpropertyResponse, V3GlobaldataAssetWebpropertyResponseTypedDict, ) + from .v3_globaldata_dns_ip_resolution_boundop import ( + RecordTypes, + V3GlobaldataDNSIPResolutionBoundGlobals, + V3GlobaldataDNSIPResolutionBoundGlobalsTypedDict, + V3GlobaldataDNSIPResolutionBoundRequest, + V3GlobaldataDNSIPResolutionBoundRequestTypedDict, + V3GlobaldataDNSIPResolutionBoundResponse, + V3GlobaldataDNSIPResolutionBoundResponseTypedDict, + ) + from .v3_globaldata_dns_ip_resolution_rangesop import ( + QueryParamRecordTypes, + V3GlobaldataDNSIPResolutionRangesGlobals, + V3GlobaldataDNSIPResolutionRangesGlobalsTypedDict, + V3GlobaldataDNSIPResolutionRangesRequest, + V3GlobaldataDNSIPResolutionRangesRequestTypedDict, + V3GlobaldataDNSIPResolutionRangesResponse, + V3GlobaldataDNSIPResolutionRangesResponseTypedDict, + ) + from .v3_globaldata_dns_name_resolution_boundop import ( + V3GlobaldataDNSNameResolutionBoundGlobals, + V3GlobaldataDNSNameResolutionBoundGlobalsTypedDict, + V3GlobaldataDNSNameResolutionBoundQueryParamRecordTypes, + V3GlobaldataDNSNameResolutionBoundRequest, + V3GlobaldataDNSNameResolutionBoundRequestTypedDict, + V3GlobaldataDNSNameResolutionBoundResponse, + V3GlobaldataDNSNameResolutionBoundResponseTypedDict, + ) + from .v3_globaldata_dns_name_resolution_rangesop import ( + V3GlobaldataDNSNameResolutionRangesGlobals, + V3GlobaldataDNSNameResolutionRangesGlobalsTypedDict, + V3GlobaldataDNSNameResolutionRangesQueryParamRecordTypes, + V3GlobaldataDNSNameResolutionRangesRequest, + V3GlobaldataDNSNameResolutionRangesRequestTypedDict, + V3GlobaldataDNSNameResolutionRangesResponse, + V3GlobaldataDNSNameResolutionRangesResponseTypedDict, + ) from .v3_globaldata_scans_getop import ( V3GlobaldataScansGetGlobals, V3GlobaldataScansGetGlobalsTypedDict, @@ -1913,6 +2001,26 @@ "DNS", "DNSEDNS", "DNSEDNSTypedDict", + "DNSIPResolutionBoundResponse", + "DNSIPResolutionBoundResponseTypedDict", + "DNSIPResolutionRangeRecord", + "DNSIPResolutionRangeRecordRecordType", + "DNSIPResolutionRangeRecordTypedDict", + "DNSIPResolutionRangeResponse", + "DNSIPResolutionRangeResponseTypedDict", + "DNSIPResolutionRecord", + "DNSIPResolutionRecordRecordType", + "DNSIPResolutionRecordTypedDict", + "DNSNameResolutionBoundResponse", + "DNSNameResolutionBoundResponseTypedDict", + "DNSNameResolutionRangeResponse", + "DNSNameResolutionRangeResponseTypedDict", + "DNSResolutionRangeRecord", + "DNSResolutionRangeRecordRecordType", + "DNSResolutionRangeRecordTypedDict", + "DNSResolutionRecord", + "DNSResolutionRecordRecordType", + "DNSResolutionRecordTypedDict", "DNSResourceRecord", "DNSResourceRecordType", "DNSResourceRecordTypedDict", @@ -2541,6 +2649,7 @@ "QueryParamGranularity", "QueryParamOrderBy", "QueryParamPrivacy", + "QueryParamRecordTypes", "QueryParamTransportProtocol", "RCode", "RSACryptographicKey", @@ -2569,6 +2678,7 @@ "RealportTypedDict", "Reason", "RecordType", + "RecordTypes", "RecordingCapabilities", "RecordingCapabilitiesTypedDict", "Recovery", @@ -2618,6 +2728,14 @@ "ResponseEnvelopeCommentsListTypedDict", "ResponseEnvelopeCreditUsageReport", "ResponseEnvelopeCreditUsageReportTypedDict", + "ResponseEnvelopeDNSIPResolutionBoundResponse", + "ResponseEnvelopeDNSIPResolutionBoundResponseTypedDict", + "ResponseEnvelopeDNSIPResolutionRangeResponse", + "ResponseEnvelopeDNSIPResolutionRangeResponseTypedDict", + "ResponseEnvelopeDNSNameResolutionBoundResponse", + "ResponseEnvelopeDNSNameResolutionBoundResponseTypedDict", + "ResponseEnvelopeDNSNameResolutionRangeResponse", + "ResponseEnvelopeDNSNameResolutionRangeResponseTypedDict", "ResponseEnvelopeHostAsset", "ResponseEnvelopeHostAssetTypedDict", "ResponseEnvelopeHostObservationResponse", @@ -3158,6 +3276,32 @@ "V3GlobaldataAssetWebpropertyRequestTypedDict", "V3GlobaldataAssetWebpropertyResponse", "V3GlobaldataAssetWebpropertyResponseTypedDict", + "V3GlobaldataDNSIPResolutionBoundGlobals", + "V3GlobaldataDNSIPResolutionBoundGlobalsTypedDict", + "V3GlobaldataDNSIPResolutionBoundRequest", + "V3GlobaldataDNSIPResolutionBoundRequestTypedDict", + "V3GlobaldataDNSIPResolutionBoundResponse", + "V3GlobaldataDNSIPResolutionBoundResponseTypedDict", + "V3GlobaldataDNSIPResolutionRangesGlobals", + "V3GlobaldataDNSIPResolutionRangesGlobalsTypedDict", + "V3GlobaldataDNSIPResolutionRangesRequest", + "V3GlobaldataDNSIPResolutionRangesRequestTypedDict", + "V3GlobaldataDNSIPResolutionRangesResponse", + "V3GlobaldataDNSIPResolutionRangesResponseTypedDict", + "V3GlobaldataDNSNameResolutionBoundGlobals", + "V3GlobaldataDNSNameResolutionBoundGlobalsTypedDict", + "V3GlobaldataDNSNameResolutionBoundQueryParamRecordTypes", + "V3GlobaldataDNSNameResolutionBoundRequest", + "V3GlobaldataDNSNameResolutionBoundRequestTypedDict", + "V3GlobaldataDNSNameResolutionBoundResponse", + "V3GlobaldataDNSNameResolutionBoundResponseTypedDict", + "V3GlobaldataDNSNameResolutionRangesGlobals", + "V3GlobaldataDNSNameResolutionRangesGlobalsTypedDict", + "V3GlobaldataDNSNameResolutionRangesQueryParamRecordTypes", + "V3GlobaldataDNSNameResolutionRangesRequest", + "V3GlobaldataDNSNameResolutionRangesRequestTypedDict", + "V3GlobaldataDNSNameResolutionRangesResponse", + "V3GlobaldataDNSNameResolutionRangesResponseTypedDict", "V3GlobaldataScansGetGlobals", "V3GlobaldataScansGetGlobalsTypedDict", "V3GlobaldataScansGetRequest", @@ -3605,6 +3749,26 @@ "DNSResourceRecord": ".dns_resourcerecord", "DNSResourceRecordType": ".dns_resourcerecord", "DNSResourceRecordTypedDict": ".dns_resourcerecord", + "DNSIPResolutionBoundResponse": ".dnsipresolutionboundresponse", + "DNSIPResolutionBoundResponseTypedDict": ".dnsipresolutionboundresponse", + "DNSIPResolutionRangeRecord": ".dnsipresolutionrangerecord", + "DNSIPResolutionRangeRecordRecordType": ".dnsipresolutionrangerecord", + "DNSIPResolutionRangeRecordTypedDict": ".dnsipresolutionrangerecord", + "DNSIPResolutionRangeResponse": ".dnsipresolutionrangeresponse", + "DNSIPResolutionRangeResponseTypedDict": ".dnsipresolutionrangeresponse", + "DNSIPResolutionRecord": ".dnsipresolutionrecord", + "DNSIPResolutionRecordRecordType": ".dnsipresolutionrecord", + "DNSIPResolutionRecordTypedDict": ".dnsipresolutionrecord", + "DNSNameResolutionBoundResponse": ".dnsnameresolutionboundresponse", + "DNSNameResolutionBoundResponseTypedDict": ".dnsnameresolutionboundresponse", + "DNSNameResolutionRangeResponse": ".dnsnameresolutionrangeresponse", + "DNSNameResolutionRangeResponseTypedDict": ".dnsnameresolutionrangeresponse", + "DNSResolutionRangeRecord": ".dnsresolutionrangerecord", + "DNSResolutionRangeRecordRecordType": ".dnsresolutionrangerecord", + "DNSResolutionRangeRecordTypedDict": ".dnsresolutionrangerecord", + "DNSResolutionRecord": ".dnsresolutionrecord", + "DNSResolutionRecordRecordType": ".dnsresolutionrecord", + "DNSResolutionRecordTypedDict": ".dnsresolutionrecord", "DSACryptographicKey": ".dsacryptographickey", "DSACryptographicKeyTypedDict": ".dsacryptographickey", "DsaPublicKey": ".dsapublickey", @@ -4263,6 +4427,14 @@ "ResponseEnvelopeCommentsListTypedDict": ".responseenvelopecommentslist", "ResponseEnvelopeCreditUsageReport": ".responseenvelopecreditusagereport", "ResponseEnvelopeCreditUsageReportTypedDict": ".responseenvelopecreditusagereport", + "ResponseEnvelopeDNSIPResolutionBoundResponse": ".responseenvelopednsipresolutionboundresponse", + "ResponseEnvelopeDNSIPResolutionBoundResponseTypedDict": ".responseenvelopednsipresolutionboundresponse", + "ResponseEnvelopeDNSIPResolutionRangeResponse": ".responseenvelopednsipresolutionrangeresponse", + "ResponseEnvelopeDNSIPResolutionRangeResponseTypedDict": ".responseenvelopednsipresolutionrangeresponse", + "ResponseEnvelopeDNSNameResolutionBoundResponse": ".responseenvelopednsnameresolutionboundresponse", + "ResponseEnvelopeDNSNameResolutionBoundResponseTypedDict": ".responseenvelopednsnameresolutionboundresponse", + "ResponseEnvelopeDNSNameResolutionRangeResponse": ".responseenvelopednsnameresolutionrangeresponse", + "ResponseEnvelopeDNSNameResolutionRangeResponseTypedDict": ".responseenvelopednsnameresolutionrangeresponse", "ResponseEnvelopeHostAsset": ".responseenvelopehostasset", "ResponseEnvelopeHostAssetTypedDict": ".responseenvelopehostasset", "ResponseEnvelopeHostObservationResponse": ".responseenvelopehostobservationresponse", @@ -4806,6 +4978,34 @@ "V3GlobaldataAssetWebpropertyRequestTypedDict": ".v3_globaldata_asset_webpropertyop", "V3GlobaldataAssetWebpropertyResponse": ".v3_globaldata_asset_webpropertyop", "V3GlobaldataAssetWebpropertyResponseTypedDict": ".v3_globaldata_asset_webpropertyop", + "RecordTypes": ".v3_globaldata_dns_ip_resolution_boundop", + "V3GlobaldataDNSIPResolutionBoundGlobals": ".v3_globaldata_dns_ip_resolution_boundop", + "V3GlobaldataDNSIPResolutionBoundGlobalsTypedDict": ".v3_globaldata_dns_ip_resolution_boundop", + "V3GlobaldataDNSIPResolutionBoundRequest": ".v3_globaldata_dns_ip_resolution_boundop", + "V3GlobaldataDNSIPResolutionBoundRequestTypedDict": ".v3_globaldata_dns_ip_resolution_boundop", + "V3GlobaldataDNSIPResolutionBoundResponse": ".v3_globaldata_dns_ip_resolution_boundop", + "V3GlobaldataDNSIPResolutionBoundResponseTypedDict": ".v3_globaldata_dns_ip_resolution_boundop", + "QueryParamRecordTypes": ".v3_globaldata_dns_ip_resolution_rangesop", + "V3GlobaldataDNSIPResolutionRangesGlobals": ".v3_globaldata_dns_ip_resolution_rangesop", + "V3GlobaldataDNSIPResolutionRangesGlobalsTypedDict": ".v3_globaldata_dns_ip_resolution_rangesop", + "V3GlobaldataDNSIPResolutionRangesRequest": ".v3_globaldata_dns_ip_resolution_rangesop", + "V3GlobaldataDNSIPResolutionRangesRequestTypedDict": ".v3_globaldata_dns_ip_resolution_rangesop", + "V3GlobaldataDNSIPResolutionRangesResponse": ".v3_globaldata_dns_ip_resolution_rangesop", + "V3GlobaldataDNSIPResolutionRangesResponseTypedDict": ".v3_globaldata_dns_ip_resolution_rangesop", + "V3GlobaldataDNSNameResolutionBoundGlobals": ".v3_globaldata_dns_name_resolution_boundop", + "V3GlobaldataDNSNameResolutionBoundGlobalsTypedDict": ".v3_globaldata_dns_name_resolution_boundop", + "V3GlobaldataDNSNameResolutionBoundQueryParamRecordTypes": ".v3_globaldata_dns_name_resolution_boundop", + "V3GlobaldataDNSNameResolutionBoundRequest": ".v3_globaldata_dns_name_resolution_boundop", + "V3GlobaldataDNSNameResolutionBoundRequestTypedDict": ".v3_globaldata_dns_name_resolution_boundop", + "V3GlobaldataDNSNameResolutionBoundResponse": ".v3_globaldata_dns_name_resolution_boundop", + "V3GlobaldataDNSNameResolutionBoundResponseTypedDict": ".v3_globaldata_dns_name_resolution_boundop", + "V3GlobaldataDNSNameResolutionRangesGlobals": ".v3_globaldata_dns_name_resolution_rangesop", + "V3GlobaldataDNSNameResolutionRangesGlobalsTypedDict": ".v3_globaldata_dns_name_resolution_rangesop", + "V3GlobaldataDNSNameResolutionRangesQueryParamRecordTypes": ".v3_globaldata_dns_name_resolution_rangesop", + "V3GlobaldataDNSNameResolutionRangesRequest": ".v3_globaldata_dns_name_resolution_rangesop", + "V3GlobaldataDNSNameResolutionRangesRequestTypedDict": ".v3_globaldata_dns_name_resolution_rangesop", + "V3GlobaldataDNSNameResolutionRangesResponse": ".v3_globaldata_dns_name_resolution_rangesop", + "V3GlobaldataDNSNameResolutionRangesResponseTypedDict": ".v3_globaldata_dns_name_resolution_rangesop", "V3GlobaldataScansGetGlobals": ".v3_globaldata_scans_getop", "V3GlobaldataScansGetGlobalsTypedDict": ".v3_globaldata_scans_getop", "V3GlobaldataScansGetRequest": ".v3_globaldata_scans_getop", diff --git a/src/censys_platform/models/dnsipresolutionboundresponse.py b/src/censys_platform/models/dnsipresolutionboundresponse.py new file mode 100644 index 0000000..d5ce898 --- /dev/null +++ b/src/censys_platform/models/dnsipresolutionboundresponse.py @@ -0,0 +1,47 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .dnsipresolutionrecord import DNSIPResolutionRecord, DNSIPResolutionRecordTypedDict +from censys_platform.types import BaseModel, Nullable, UNSET_SENTINEL +from pydantic import model_serializer +from typing import List +from typing_extensions import TypedDict + + +class DNSIPResolutionBoundResponseTypedDict(TypedDict): + ip: str + r"""The IP address that was queried.""" + next_page_token: str + r"""A token that can be used to retrieve the next page of records.""" + records: Nullable[List[DNSIPResolutionRecordTypedDict]] + r"""The list of domain names that resolved to this IP.""" + total_records: int + r"""The number of records that exist in total across all pages.""" + + +class DNSIPResolutionBoundResponse(BaseModel): + ip: str + r"""The IP address that was queried.""" + + next_page_token: str + r"""A token that can be used to retrieve the next page of records.""" + + records: Nullable[List[DNSIPResolutionRecord]] + r"""The list of domain names that resolved to this IP.""" + + total_records: int + r"""The number of records that exist in total across all pages.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + m[k] = val + + return m diff --git a/src/censys_platform/models/dnsipresolutionrangerecord.py b/src/censys_platform/models/dnsipresolutionrangerecord.py new file mode 100644 index 0000000..3c9c756 --- /dev/null +++ b/src/censys_platform/models/dnsipresolutionrangerecord.py @@ -0,0 +1,50 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from censys_platform import models, utils +from censys_platform.types import BaseModel +from datetime import datetime +from enum import Enum +from pydantic import field_serializer +from typing_extensions import TypedDict + + +class DNSIPResolutionRangeRecordRecordType(str, Enum, metaclass=utils.OpenEnumMeta): + r"""Either A or AAAA.""" + + A = "A" + AAAA = "AAAA" + + +class DNSIPResolutionRangeRecordTypedDict(TypedDict): + domain: str + r"""The domain name that resolved to this IP.""" + first_seen: datetime + r"""The time this record was first observed.""" + last_seen: datetime + r"""The time this record was last observed.""" + record_type: DNSIPResolutionRangeRecordRecordType + r"""Either A or AAAA.""" + + +class DNSIPResolutionRangeRecord(BaseModel): + domain: str + r"""The domain name that resolved to this IP.""" + + first_seen: datetime + r"""The time this record was first observed.""" + + last_seen: datetime + r"""The time this record was last observed.""" + + record_type: DNSIPResolutionRangeRecordRecordType + r"""Either A or AAAA.""" + + @field_serializer("record_type") + def serialize_record_type(self, value): + if isinstance(value, str): + try: + return models.DNSIPResolutionRangeRecordRecordType(value) + except ValueError: + return value + return value diff --git a/src/censys_platform/models/dnsipresolutionrangeresponse.py b/src/censys_platform/models/dnsipresolutionrangeresponse.py new file mode 100644 index 0000000..211b8e0 --- /dev/null +++ b/src/censys_platform/models/dnsipresolutionrangeresponse.py @@ -0,0 +1,50 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .dnsipresolutionrangerecord import ( + DNSIPResolutionRangeRecord, + DNSIPResolutionRangeRecordTypedDict, +) +from censys_platform.types import BaseModel, Nullable, UNSET_SENTINEL +from pydantic import model_serializer +from typing import List +from typing_extensions import TypedDict + + +class DNSIPResolutionRangeResponseTypedDict(TypedDict): + ip: str + r"""The IP address that was queried.""" + next_page_token: str + r"""A token that can be used to retrieve the next page of records.""" + records: Nullable[List[DNSIPResolutionRangeRecordTypedDict]] + r"""The list of domain names that resolved to this IP.""" + total_records: int + r"""The number of records that exist in total across all pages.""" + + +class DNSIPResolutionRangeResponse(BaseModel): + ip: str + r"""The IP address that was queried.""" + + next_page_token: str + r"""A token that can be used to retrieve the next page of records.""" + + records: Nullable[List[DNSIPResolutionRangeRecord]] + r"""The list of domain names that resolved to this IP.""" + + total_records: int + r"""The number of records that exist in total across all pages.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + m[k] = val + + return m diff --git a/src/censys_platform/models/dnsipresolutionrecord.py b/src/censys_platform/models/dnsipresolutionrecord.py new file mode 100644 index 0000000..27d3a1f --- /dev/null +++ b/src/censys_platform/models/dnsipresolutionrecord.py @@ -0,0 +1,50 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from censys_platform import models, utils +from censys_platform.types import BaseModel +from datetime import datetime +from enum import Enum +from pydantic import field_serializer +from typing_extensions import TypedDict + + +class DNSIPResolutionRecordRecordType(str, Enum, metaclass=utils.OpenEnumMeta): + r"""Either A or AAAA.""" + + A = "A" + AAAA = "AAAA" + + +class DNSIPResolutionRecordTypedDict(TypedDict): + domain: str + r"""The domain name that resolved to this IP.""" + first_seen: datetime + r"""The time this record was first observed.""" + last_seen: datetime + r"""The time this record was last observed.""" + record_type: DNSIPResolutionRecordRecordType + r"""Either A or AAAA.""" + + +class DNSIPResolutionRecord(BaseModel): + domain: str + r"""The domain name that resolved to this IP.""" + + first_seen: datetime + r"""The time this record was first observed.""" + + last_seen: datetime + r"""The time this record was last observed.""" + + record_type: DNSIPResolutionRecordRecordType + r"""Either A or AAAA.""" + + @field_serializer("record_type") + def serialize_record_type(self, value): + if isinstance(value, str): + try: + return models.DNSIPResolutionRecordRecordType(value) + except ValueError: + return value + return value diff --git a/src/censys_platform/models/dnsnameresolutionboundresponse.py b/src/censys_platform/models/dnsnameresolutionboundresponse.py new file mode 100644 index 0000000..e5fd115 --- /dev/null +++ b/src/censys_platform/models/dnsnameresolutionboundresponse.py @@ -0,0 +1,47 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .dnsresolutionrecord import DNSResolutionRecord, DNSResolutionRecordTypedDict +from censys_platform.types import BaseModel, Nullable, UNSET_SENTINEL +from pydantic import model_serializer +from typing import List +from typing_extensions import TypedDict + + +class DNSNameResolutionBoundResponseTypedDict(TypedDict): + name: str + r"""The domain name that was queried.""" + next_page_token: str + r"""A token that can be used to retrieve the next page of records.""" + records: Nullable[List[DNSResolutionRecordTypedDict]] + r"""The list of DNS records.""" + total_records: int + r"""The number of records that exist in total across all pages.""" + + +class DNSNameResolutionBoundResponse(BaseModel): + name: str + r"""The domain name that was queried.""" + + next_page_token: str + r"""A token that can be used to retrieve the next page of records.""" + + records: Nullable[List[DNSResolutionRecord]] + r"""The list of DNS records.""" + + total_records: int + r"""The number of records that exist in total across all pages.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + m[k] = val + + return m diff --git a/src/censys_platform/models/dnsnameresolutionrangeresponse.py b/src/censys_platform/models/dnsnameresolutionrangeresponse.py new file mode 100644 index 0000000..936f231 --- /dev/null +++ b/src/censys_platform/models/dnsnameresolutionrangeresponse.py @@ -0,0 +1,50 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .dnsresolutionrangerecord import ( + DNSResolutionRangeRecord, + DNSResolutionRangeRecordTypedDict, +) +from censys_platform.types import BaseModel, Nullable, UNSET_SENTINEL +from pydantic import model_serializer +from typing import List +from typing_extensions import TypedDict + + +class DNSNameResolutionRangeResponseTypedDict(TypedDict): + name: str + r"""The domain name that was queried.""" + next_page_token: str + r"""A token that can be used to retrieve the next page of records.""" + records: Nullable[List[DNSResolutionRangeRecordTypedDict]] + r"""The list of DNS observation windows.""" + total_records: int + r"""The number of records that exist in total across all pages.""" + + +class DNSNameResolutionRangeResponse(BaseModel): + name: str + r"""The domain name that was queried.""" + + next_page_token: str + r"""A token that can be used to retrieve the next page of records.""" + + records: Nullable[List[DNSResolutionRangeRecord]] + r"""The list of DNS observation windows.""" + + total_records: int + r"""The number of records that exist in total across all pages.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + m[k] = val + + return m diff --git a/src/censys_platform/models/dnsresolutionrangerecord.py b/src/censys_platform/models/dnsresolutionrangerecord.py new file mode 100644 index 0000000..0b4f344 --- /dev/null +++ b/src/censys_platform/models/dnsresolutionrangerecord.py @@ -0,0 +1,103 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from censys_platform import models, utils +from censys_platform.types import BaseModel, UNSET_SENTINEL +from datetime import datetime +from enum import Enum +from pydantic import field_serializer, model_serializer +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class DNSResolutionRangeRecordRecordType(str, Enum, metaclass=utils.OpenEnumMeta): + r"""The record type. Either A, AAAA, MX, NS, SOA, or TXT.""" + + A = "A" + AAAA = "AAAA" + MX = "MX" + NS = "NS" + SOA = "SOA" + TXT = "TXT" + + +class DNSResolutionRangeRecordTypedDict(TypedDict): + first_observed: datetime + r"""When this record was first observed in this window.""" + last_observed: datetime + r"""When this record was last observed in this window.""" + record_type: DNSResolutionRangeRecordRecordType + r"""The record type. Either A, AAAA, MX, NS, SOA, or TXT.""" + ip: NotRequired[str] + r"""The IP of the record. IPv4 if the record_type is A. IPv6 if the record_type is AAAA. Otherwise not present.""" + mail_server: NotRequired[str] + r"""The MX mail server. Only present when record_type is MX. Otherwise not present.""" + mname: NotRequired[str] + r"""The primary name server. Only present when record_type is SOA. Otherwise not present.""" + name_server: NotRequired[str] + r"""The name server. Only present when record_type is NS. Otherwise not present.""" + priority: NotRequired[int] + r"""The MX priority. Only present when record_type is MX. Otherwise not present.""" + rname: NotRequired[str] + r"""The responsible contact, as email. Only present when record_type is SOA. Otherwise not present.""" + value: NotRequired[str] + r"""Full, untruncated string. Only present when record_type is TXT. Otherwise not present.""" + + +class DNSResolutionRangeRecord(BaseModel): + first_observed: datetime + r"""When this record was first observed in this window.""" + + last_observed: datetime + r"""When this record was last observed in this window.""" + + record_type: DNSResolutionRangeRecordRecordType + r"""The record type. Either A, AAAA, MX, NS, SOA, or TXT.""" + + ip: Optional[str] = None + r"""The IP of the record. IPv4 if the record_type is A. IPv6 if the record_type is AAAA. Otherwise not present.""" + + mail_server: Optional[str] = None + r"""The MX mail server. Only present when record_type is MX. Otherwise not present.""" + + mname: Optional[str] = None + r"""The primary name server. Only present when record_type is SOA. Otherwise not present.""" + + name_server: Optional[str] = None + r"""The name server. Only present when record_type is NS. Otherwise not present.""" + + priority: Optional[int] = None + r"""The MX priority. Only present when record_type is MX. Otherwise not present.""" + + rname: Optional[str] = None + r"""The responsible contact, as email. Only present when record_type is SOA. Otherwise not present.""" + + value: Optional[str] = None + r"""Full, untruncated string. Only present when record_type is TXT. Otherwise not present.""" + + @field_serializer("record_type") + def serialize_record_type(self, value): + if isinstance(value, str): + try: + return models.DNSResolutionRangeRecordRecordType(value) + except ValueError: + return value + return value + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + ["ip", "mail_server", "mname", "name_server", "priority", "rname", "value"] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/censys_platform/models/dnsresolutionrecord.py b/src/censys_platform/models/dnsresolutionrecord.py new file mode 100644 index 0000000..342b920 --- /dev/null +++ b/src/censys_platform/models/dnsresolutionrecord.py @@ -0,0 +1,103 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from censys_platform import models, utils +from censys_platform.types import BaseModel, UNSET_SENTINEL +from datetime import datetime +from enum import Enum +from pydantic import field_serializer, model_serializer +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class DNSResolutionRecordRecordType(str, Enum, metaclass=utils.OpenEnumMeta): + r"""The record type. Either A, AAAA, MX, NS, SOA, or TXT.""" + + A = "A" + AAAA = "AAAA" + MX = "MX" + NS = "NS" + SOA = "SOA" + TXT = "TXT" + + +class DNSResolutionRecordTypedDict(TypedDict): + first_seen: datetime + r"""The time this record was first observed.""" + last_seen: datetime + r"""The time this record was last observed.""" + record_type: DNSResolutionRecordRecordType + r"""The record type. Either A, AAAA, MX, NS, SOA, or TXT.""" + ip: NotRequired[str] + r"""The IP of the record. IPv4 if the record_type is A. IPv6 if the record_type is AAAA. Otherwise not present.""" + mail_server: NotRequired[str] + r"""The MX mail server. Only present when record_type is MX. Otherwise not present.""" + mname: NotRequired[str] + r"""The primary name server. Only present when record_type is SOA. Otherwise not present.""" + name_server: NotRequired[str] + r"""The name server. Only present when record_type is NS. Otherwise not present.""" + priority: NotRequired[int] + r"""The MX priority. Only present when record_type is MX. Otherwise not present.""" + rname: NotRequired[str] + r"""The responsible contact, as email. Only present when record_type is SOA. Otherwise not present.""" + value: NotRequired[str] + r"""Full, untruncated string. Only present when record_type is TXT. Otherwise not present.""" + + +class DNSResolutionRecord(BaseModel): + first_seen: datetime + r"""The time this record was first observed.""" + + last_seen: datetime + r"""The time this record was last observed.""" + + record_type: DNSResolutionRecordRecordType + r"""The record type. Either A, AAAA, MX, NS, SOA, or TXT.""" + + ip: Optional[str] = None + r"""The IP of the record. IPv4 if the record_type is A. IPv6 if the record_type is AAAA. Otherwise not present.""" + + mail_server: Optional[str] = None + r"""The MX mail server. Only present when record_type is MX. Otherwise not present.""" + + mname: Optional[str] = None + r"""The primary name server. Only present when record_type is SOA. Otherwise not present.""" + + name_server: Optional[str] = None + r"""The name server. Only present when record_type is NS. Otherwise not present.""" + + priority: Optional[int] = None + r"""The MX priority. Only present when record_type is MX. Otherwise not present.""" + + rname: Optional[str] = None + r"""The responsible contact, as email. Only present when record_type is SOA. Otherwise not present.""" + + value: Optional[str] = None + r"""Full, untruncated string. Only present when record_type is TXT. Otherwise not present.""" + + @field_serializer("record_type") + def serialize_record_type(self, value): + if isinstance(value, str): + try: + return models.DNSResolutionRecordRecordType(value) + except ValueError: + return value + return value + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + ["ip", "mail_server", "mname", "name_server", "priority", "rname", "value"] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/censys_platform/models/responseenvelopednsipresolutionboundresponse.py b/src/censys_platform/models/responseenvelopednsipresolutionboundresponse.py new file mode 100644 index 0000000..9743b3f --- /dev/null +++ b/src/censys_platform/models/responseenvelopednsipresolutionboundresponse.py @@ -0,0 +1,35 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .dnsipresolutionboundresponse import ( + DNSIPResolutionBoundResponse, + DNSIPResolutionBoundResponseTypedDict, +) +from censys_platform.types import BaseModel, UNSET_SENTINEL +from pydantic import model_serializer +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class ResponseEnvelopeDNSIPResolutionBoundResponseTypedDict(TypedDict): + result: NotRequired[DNSIPResolutionBoundResponseTypedDict] + + +class ResponseEnvelopeDNSIPResolutionBoundResponse(BaseModel): + result: Optional[DNSIPResolutionBoundResponse] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["result"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/censys_platform/models/responseenvelopednsipresolutionrangeresponse.py b/src/censys_platform/models/responseenvelopednsipresolutionrangeresponse.py new file mode 100644 index 0000000..50c23e8 --- /dev/null +++ b/src/censys_platform/models/responseenvelopednsipresolutionrangeresponse.py @@ -0,0 +1,35 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .dnsipresolutionrangeresponse import ( + DNSIPResolutionRangeResponse, + DNSIPResolutionRangeResponseTypedDict, +) +from censys_platform.types import BaseModel, UNSET_SENTINEL +from pydantic import model_serializer +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class ResponseEnvelopeDNSIPResolutionRangeResponseTypedDict(TypedDict): + result: NotRequired[DNSIPResolutionRangeResponseTypedDict] + + +class ResponseEnvelopeDNSIPResolutionRangeResponse(BaseModel): + result: Optional[DNSIPResolutionRangeResponse] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["result"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/censys_platform/models/responseenvelopednsnameresolutionboundresponse.py b/src/censys_platform/models/responseenvelopednsnameresolutionboundresponse.py new file mode 100644 index 0000000..ae56e74 --- /dev/null +++ b/src/censys_platform/models/responseenvelopednsnameresolutionboundresponse.py @@ -0,0 +1,35 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .dnsnameresolutionboundresponse import ( + DNSNameResolutionBoundResponse, + DNSNameResolutionBoundResponseTypedDict, +) +from censys_platform.types import BaseModel, UNSET_SENTINEL +from pydantic import model_serializer +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class ResponseEnvelopeDNSNameResolutionBoundResponseTypedDict(TypedDict): + result: NotRequired[DNSNameResolutionBoundResponseTypedDict] + + +class ResponseEnvelopeDNSNameResolutionBoundResponse(BaseModel): + result: Optional[DNSNameResolutionBoundResponse] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["result"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/censys_platform/models/responseenvelopednsnameresolutionrangeresponse.py b/src/censys_platform/models/responseenvelopednsnameresolutionrangeresponse.py new file mode 100644 index 0000000..3bd4412 --- /dev/null +++ b/src/censys_platform/models/responseenvelopednsnameresolutionrangeresponse.py @@ -0,0 +1,35 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .dnsnameresolutionrangeresponse import ( + DNSNameResolutionRangeResponse, + DNSNameResolutionRangeResponseTypedDict, +) +from censys_platform.types import BaseModel, UNSET_SENTINEL +from pydantic import model_serializer +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class ResponseEnvelopeDNSNameResolutionRangeResponseTypedDict(TypedDict): + result: NotRequired[DNSNameResolutionRangeResponseTypedDict] + + +class ResponseEnvelopeDNSNameResolutionRangeResponse(BaseModel): + result: Optional[DNSNameResolutionRangeResponse] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["result"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/censys_platform/models/risk.py b/src/censys_platform/models/risk.py index e724775..8a7329a 100644 --- a/src/censys_platform/models/risk.py +++ b/src/censys_platform/models/risk.py @@ -51,6 +51,7 @@ class RiskTypedDict(TypedDict): risk_source: NotRequired[RiskSource] severity: NotRequired[Severity] source: NotRequired[RiskSource1] + type: NotRequired[Nullable[List[str]]] year: NotRequired[int] @@ -73,6 +74,8 @@ class Risk(BaseModel): source: Optional[RiskSource1] = None + type: OptionalNullable[List[str]] = UNSET + year: Optional[int] = None @field_serializer("risk_source") @@ -115,10 +118,11 @@ def serialize_model(self, handler): "risk_source", "severity", "source", + "type", "year", ] ) - nullable_fields = set(["evidence"]) + nullable_fields = set(["evidence", "type"]) serialized = handler(self) m = {} diff --git a/src/censys_platform/models/service.py b/src/censys_platform/models/service.py index b68e80e..f780a87 100644 --- a/src/censys_platform/models/service.py +++ b/src/censys_platform/models/service.py @@ -183,6 +183,7 @@ class ServiceTypedDict(TypedDict): cisco_ipsla: NotRequired[CiscoIpslaTypedDict] cmore: NotRequired[CmoreTypedDict] coap: NotRequired[CoapTypedDict] + compromises: NotRequired[Nullable[List[RiskTypedDict]]] crestron_cp3: NotRequired[CrestronCp3TypedDict] crestron_din_ap2: NotRequired[CrestronDinAp2TypedDict] cursor_on_target: NotRequired[CursorOnTargetTypedDict] @@ -353,6 +354,8 @@ class Service(BaseModel): coap: Optional[Coap] = None + compromises: OptionalNullable[List[Risk]] = UNSET + crestron_cp3: Optional[CrestronCp3] = None crestron_din_ap2: Optional[CrestronDinAp2] = None @@ -655,6 +658,7 @@ def serialize_model(self, handler): "cisco_ipsla", "cmore", "coap", + "compromises", "crestron_cp3", "crestron_din_ap2", "cursor_on_target", @@ -796,6 +800,7 @@ def serialize_model(self, handler): ) nullable_fields = set( [ + "compromises", "endpoints", "exposures", "hardware", diff --git a/src/censys_platform/models/v3_globaldata_dns_ip_resolution_boundop.py b/src/censys_platform/models/v3_globaldata_dns_ip_resolution_boundop.py new file mode 100644 index 0000000..9c2173b --- /dev/null +++ b/src/censys_platform/models/v3_globaldata_dns_ip_resolution_boundop.py @@ -0,0 +1,156 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .responseenvelopednsipresolutionboundresponse import ( + ResponseEnvelopeDNSIPResolutionBoundResponse, + ResponseEnvelopeDNSIPResolutionBoundResponseTypedDict, +) +from censys_platform.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from censys_platform.utils import FieldMetadata, PathParamMetadata, QueryParamMetadata +from enum import Enum +from pydantic import model_serializer +from typing import Dict, List, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class V3GlobaldataDNSIPResolutionBoundGlobalsTypedDict(TypedDict): + organization_id: NotRequired[str] + + +class V3GlobaldataDNSIPResolutionBoundGlobals(BaseModel): + organization_id: Annotated[ + Optional[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["organization_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + + +class RecordTypes(str, Enum): + A = "A" + AAAA = "AAAA" + + +class V3GlobaldataDNSIPResolutionBoundRequestTypedDict(TypedDict): + ip: str + r"""The IP address of a DNS record.""" + organization_id: NotRequired[str] + r"""The ID of a Censys organization to associate the request with. See the [Getting Started docs](https://docs.censys.com/reference/get-started#step-3-find-and-use-your-organization-id-optional) for more information.""" + start_time: NotRequired[str] + r"""Start of date range (RFC3339 format, e.g., 2024-01-01T00:00:00Z). If not specified, defaults to the maximum query window back from the end time.""" + end_time: NotRequired[str] + r"""End of date range (RFC3339 format, e.g., 2024-01-31T23:59:59Z). If not specified, defaults to now. Cannot be in the future.""" + page_size: NotRequired[int] + r"""Number of results per page (max 100)""" + page_token: NotRequired[str] + r"""Pagination token from previous response""" + record_types: NotRequired[Nullable[List[RecordTypes]]] + r"""Filter by record types (A, AAAA). For multiple values, include comma-separated values. Defaults to A and AAAA when omitted.""" + + +class V3GlobaldataDNSIPResolutionBoundRequest(BaseModel): + ip: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + r"""The IP address of a DNS record.""" + + organization_id: Annotated[ + Optional[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=False)), + ] = None + r"""The ID of a Censys organization to associate the request with. See the [Getting Started docs](https://docs.censys.com/reference/get-started#step-3-find-and-use-your-organization-id-optional) for more information.""" + + start_time: Annotated[ + Optional[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=False)), + ] = None + r"""Start of date range (RFC3339 format, e.g., 2024-01-01T00:00:00Z). If not specified, defaults to the maximum query window back from the end time.""" + + end_time: Annotated[ + Optional[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=False)), + ] = None + r"""End of date range (RFC3339 format, e.g., 2024-01-31T23:59:59Z). If not specified, defaults to now. Cannot be in the future.""" + + page_size: Annotated[ + Optional[int], + FieldMetadata(query=QueryParamMetadata(style="form", explode=False)), + ] = 100 + r"""Number of results per page (max 100)""" + + page_token: Annotated[ + Optional[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=False)), + ] = None + r"""Pagination token from previous response""" + + record_types: Annotated[ + OptionalNullable[List[RecordTypes]], + FieldMetadata(query=QueryParamMetadata(style="form", explode=False)), + ] = UNSET + r"""Filter by record types (A, AAAA). For multiple values, include comma-separated values. Defaults to A and AAAA when omitted.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "organization_id", + "start_time", + "end_time", + "page_size", + "page_token", + "record_types", + ] + ) + nullable_fields = set(["record_types"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + + +class V3GlobaldataDNSIPResolutionBoundResponseTypedDict(TypedDict): + headers: Dict[str, List[str]] + result: ResponseEnvelopeDNSIPResolutionBoundResponseTypedDict + + +class V3GlobaldataDNSIPResolutionBoundResponse(BaseModel): + headers: Dict[str, List[str]] + + result: ResponseEnvelopeDNSIPResolutionBoundResponse diff --git a/src/censys_platform/models/v3_globaldata_dns_ip_resolution_rangesop.py b/src/censys_platform/models/v3_globaldata_dns_ip_resolution_rangesop.py new file mode 100644 index 0000000..26e8730 --- /dev/null +++ b/src/censys_platform/models/v3_globaldata_dns_ip_resolution_rangesop.py @@ -0,0 +1,165 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .responseenvelopednsipresolutionrangeresponse import ( + ResponseEnvelopeDNSIPResolutionRangeResponse, + ResponseEnvelopeDNSIPResolutionRangeResponseTypedDict, +) +from censys_platform.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from censys_platform.utils import FieldMetadata, PathParamMetadata, QueryParamMetadata +from enum import Enum +from pydantic import model_serializer +from typing import Dict, List, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class V3GlobaldataDNSIPResolutionRangesGlobalsTypedDict(TypedDict): + organization_id: NotRequired[str] + + +class V3GlobaldataDNSIPResolutionRangesGlobals(BaseModel): + organization_id: Annotated[ + Optional[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["organization_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + + +class QueryParamRecordTypes(str, Enum): + A = "A" + AAAA = "AAAA" + + +class V3GlobaldataDNSIPResolutionRangesRequestTypedDict(TypedDict): + ip: str + r"""The IP address of a DNS record.""" + organization_id: NotRequired[str] + r"""The ID of a Censys organization to associate the request with. See the [Getting Started docs](https://docs.censys.com/reference/get-started#step-3-find-and-use-your-organization-id-optional) for more information.""" + start_time: NotRequired[str] + r"""Start of date range (RFC3339 format, e.g., 2024-01-01T00:00:00Z). If not specified, defaults to the maximum query window back from the end time.""" + end_time: NotRequired[str] + r"""End of date range (RFC3339 format, e.g., 2024-01-31T23:59:59Z). If not specified, defaults to now. Cannot be in the future.""" + page_size: NotRequired[int] + r"""Number of results per page (max 100)""" + page_token: NotRequired[str] + r"""Pagination token from previous response""" + record_types: NotRequired[Nullable[List[QueryParamRecordTypes]]] + r"""Filter by record types (A, AAAA). For multiple values, include comma-separated values. Defaults to A and AAAA when omitted.""" + domain: NotRequired[str] + r"""Filter to a specific domain name resolving to this IP.""" + + +class V3GlobaldataDNSIPResolutionRangesRequest(BaseModel): + ip: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + r"""The IP address of a DNS record.""" + + organization_id: Annotated[ + Optional[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=False)), + ] = None + r"""The ID of a Censys organization to associate the request with. See the [Getting Started docs](https://docs.censys.com/reference/get-started#step-3-find-and-use-your-organization-id-optional) for more information.""" + + start_time: Annotated[ + Optional[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=False)), + ] = None + r"""Start of date range (RFC3339 format, e.g., 2024-01-01T00:00:00Z). If not specified, defaults to the maximum query window back from the end time.""" + + end_time: Annotated[ + Optional[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=False)), + ] = None + r"""End of date range (RFC3339 format, e.g., 2024-01-31T23:59:59Z). If not specified, defaults to now. Cannot be in the future.""" + + page_size: Annotated[ + Optional[int], + FieldMetadata(query=QueryParamMetadata(style="form", explode=False)), + ] = 100 + r"""Number of results per page (max 100)""" + + page_token: Annotated[ + Optional[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=False)), + ] = None + r"""Pagination token from previous response""" + + record_types: Annotated[ + OptionalNullable[List[QueryParamRecordTypes]], + FieldMetadata(query=QueryParamMetadata(style="form", explode=False)), + ] = UNSET + r"""Filter by record types (A, AAAA). For multiple values, include comma-separated values. Defaults to A and AAAA when omitted.""" + + domain: Annotated[ + Optional[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=False)), + ] = None + r"""Filter to a specific domain name resolving to this IP.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "organization_id", + "start_time", + "end_time", + "page_size", + "page_token", + "record_types", + "domain", + ] + ) + nullable_fields = set(["record_types"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + + +class V3GlobaldataDNSIPResolutionRangesResponseTypedDict(TypedDict): + headers: Dict[str, List[str]] + result: ResponseEnvelopeDNSIPResolutionRangeResponseTypedDict + + +class V3GlobaldataDNSIPResolutionRangesResponse(BaseModel): + headers: Dict[str, List[str]] + + result: ResponseEnvelopeDNSIPResolutionRangeResponse diff --git a/src/censys_platform/models/v3_globaldata_dns_name_resolution_boundop.py b/src/censys_platform/models/v3_globaldata_dns_name_resolution_boundop.py new file mode 100644 index 0000000..c9fd150 --- /dev/null +++ b/src/censys_platform/models/v3_globaldata_dns_name_resolution_boundop.py @@ -0,0 +1,162 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .responseenvelopednsnameresolutionboundresponse import ( + ResponseEnvelopeDNSNameResolutionBoundResponse, + ResponseEnvelopeDNSNameResolutionBoundResponseTypedDict, +) +from censys_platform.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from censys_platform.utils import FieldMetadata, PathParamMetadata, QueryParamMetadata +from enum import Enum +from pydantic import model_serializer +from typing import Dict, List, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class V3GlobaldataDNSNameResolutionBoundGlobalsTypedDict(TypedDict): + organization_id: NotRequired[str] + + +class V3GlobaldataDNSNameResolutionBoundGlobals(BaseModel): + organization_id: Annotated[ + Optional[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["organization_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + + +class V3GlobaldataDNSNameResolutionBoundQueryParamRecordTypes(str, Enum): + A = "A" + AAAA = "AAAA" + MX = "MX" + NS = "NS" + SOA = "SOA" + TXT = "TXT" + + +class V3GlobaldataDNSNameResolutionBoundRequestTypedDict(TypedDict): + name: str + r"""The domain name""" + organization_id: NotRequired[str] + r"""The ID of a Censys organization to associate the request with. See the [Getting Started docs](https://docs.censys.com/reference/get-started#step-3-find-and-use-your-organization-id-optional) for more information.""" + start_time: NotRequired[str] + r"""Start of date range (RFC3339 format, e.g., 2024-01-01T00:00:00Z). If not specified, defaults to the maximum query window back from the end time.""" + end_time: NotRequired[str] + r"""End of date range (RFC3339 format, e.g., 2024-01-31T23:59:59Z). If not specified, defaults to now. Cannot be in the future.""" + page_size: NotRequired[int] + r"""Number of results per page (max 100)""" + page_token: NotRequired[str] + r"""Pagination token from previous response""" + record_types: NotRequired[ + Nullable[List[V3GlobaldataDNSNameResolutionBoundQueryParamRecordTypes]] + ] + r"""Filter by record types (A, AAAA, MX, NS, SOA, TXT). For multiple values, include comma-separated values. Defaults to all supported types when omitted.""" + + +class V3GlobaldataDNSNameResolutionBoundRequest(BaseModel): + name: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + r"""The domain name""" + + organization_id: Annotated[ + Optional[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=False)), + ] = None + r"""The ID of a Censys organization to associate the request with. See the [Getting Started docs](https://docs.censys.com/reference/get-started#step-3-find-and-use-your-organization-id-optional) for more information.""" + + start_time: Annotated[ + Optional[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=False)), + ] = None + r"""Start of date range (RFC3339 format, e.g., 2024-01-01T00:00:00Z). If not specified, defaults to the maximum query window back from the end time.""" + + end_time: Annotated[ + Optional[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=False)), + ] = None + r"""End of date range (RFC3339 format, e.g., 2024-01-31T23:59:59Z). If not specified, defaults to now. Cannot be in the future.""" + + page_size: Annotated[ + Optional[int], + FieldMetadata(query=QueryParamMetadata(style="form", explode=False)), + ] = 100 + r"""Number of results per page (max 100)""" + + page_token: Annotated[ + Optional[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=False)), + ] = None + r"""Pagination token from previous response""" + + record_types: Annotated[ + OptionalNullable[List[V3GlobaldataDNSNameResolutionBoundQueryParamRecordTypes]], + FieldMetadata(query=QueryParamMetadata(style="form", explode=False)), + ] = UNSET + r"""Filter by record types (A, AAAA, MX, NS, SOA, TXT). For multiple values, include comma-separated values. Defaults to all supported types when omitted.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "organization_id", + "start_time", + "end_time", + "page_size", + "page_token", + "record_types", + ] + ) + nullable_fields = set(["record_types"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + + +class V3GlobaldataDNSNameResolutionBoundResponseTypedDict(TypedDict): + headers: Dict[str, List[str]] + result: ResponseEnvelopeDNSNameResolutionBoundResponseTypedDict + + +class V3GlobaldataDNSNameResolutionBoundResponse(BaseModel): + headers: Dict[str, List[str]] + + result: ResponseEnvelopeDNSNameResolutionBoundResponse diff --git a/src/censys_platform/models/v3_globaldata_dns_name_resolution_rangesop.py b/src/censys_platform/models/v3_globaldata_dns_name_resolution_rangesop.py new file mode 100644 index 0000000..5a8f8bd --- /dev/null +++ b/src/censys_platform/models/v3_globaldata_dns_name_resolution_rangesop.py @@ -0,0 +1,164 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .responseenvelopednsnameresolutionrangeresponse import ( + ResponseEnvelopeDNSNameResolutionRangeResponse, + ResponseEnvelopeDNSNameResolutionRangeResponseTypedDict, +) +from censys_platform.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from censys_platform.utils import FieldMetadata, PathParamMetadata, QueryParamMetadata +from enum import Enum +from pydantic import model_serializer +from typing import Dict, List, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class V3GlobaldataDNSNameResolutionRangesGlobalsTypedDict(TypedDict): + organization_id: NotRequired[str] + + +class V3GlobaldataDNSNameResolutionRangesGlobals(BaseModel): + organization_id: Annotated[ + Optional[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["organization_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + + +class V3GlobaldataDNSNameResolutionRangesQueryParamRecordTypes(str, Enum): + A = "A" + AAAA = "AAAA" + MX = "MX" + NS = "NS" + SOA = "SOA" + TXT = "TXT" + + +class V3GlobaldataDNSNameResolutionRangesRequestTypedDict(TypedDict): + name: str + r"""The domain name""" + organization_id: NotRequired[str] + r"""The ID of a Censys organization to associate the request with. See the [Getting Started docs](https://docs.censys.com/reference/get-started#step-3-find-and-use-your-organization-id-optional) for more information.""" + start_time: NotRequired[str] + r"""Start of date range (RFC3339 format, e.g., 2024-01-01T00:00:00Z). If not specified, defaults to the maximum query window back from the end time.""" + end_time: NotRequired[str] + r"""End of date range (RFC3339 format, e.g., 2024-01-31T23:59:59Z). If not specified, defaults to now. Cannot be in the future.""" + page_size: NotRequired[int] + r"""Number of results per page (max 100)""" + page_token: NotRequired[str] + r"""Pagination token from previous response""" + record_types: NotRequired[ + Nullable[List[V3GlobaldataDNSNameResolutionRangesQueryParamRecordTypes]] + ] + r"""Filter by record types (A, AAAA, MX, NS, SOA, TXT). For multiple values, include comma-separated values. Defaults to all supported types when omitted.""" + + +class V3GlobaldataDNSNameResolutionRangesRequest(BaseModel): + name: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + r"""The domain name""" + + organization_id: Annotated[ + Optional[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=False)), + ] = None + r"""The ID of a Censys organization to associate the request with. See the [Getting Started docs](https://docs.censys.com/reference/get-started#step-3-find-and-use-your-organization-id-optional) for more information.""" + + start_time: Annotated[ + Optional[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=False)), + ] = None + r"""Start of date range (RFC3339 format, e.g., 2024-01-01T00:00:00Z). If not specified, defaults to the maximum query window back from the end time.""" + + end_time: Annotated[ + Optional[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=False)), + ] = None + r"""End of date range (RFC3339 format, e.g., 2024-01-31T23:59:59Z). If not specified, defaults to now. Cannot be in the future.""" + + page_size: Annotated[ + Optional[int], + FieldMetadata(query=QueryParamMetadata(style="form", explode=False)), + ] = 100 + r"""Number of results per page (max 100)""" + + page_token: Annotated[ + Optional[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=False)), + ] = None + r"""Pagination token from previous response""" + + record_types: Annotated[ + OptionalNullable[ + List[V3GlobaldataDNSNameResolutionRangesQueryParamRecordTypes] + ], + FieldMetadata(query=QueryParamMetadata(style="form", explode=False)), + ] = UNSET + r"""Filter by record types (A, AAAA, MX, NS, SOA, TXT). For multiple values, include comma-separated values. Defaults to all supported types when omitted.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "organization_id", + "start_time", + "end_time", + "page_size", + "page_token", + "record_types", + ] + ) + nullable_fields = set(["record_types"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + + +class V3GlobaldataDNSNameResolutionRangesResponseTypedDict(TypedDict): + headers: Dict[str, List[str]] + result: ResponseEnvelopeDNSNameResolutionRangeResponseTypedDict + + +class V3GlobaldataDNSNameResolutionRangesResponse(BaseModel): + headers: Dict[str, List[str]] + + result: ResponseEnvelopeDNSNameResolutionRangeResponse diff --git a/src/censys_platform/models/vuln.py b/src/censys_platform/models/vuln.py index 98f528c..942177c 100644 --- a/src/censys_platform/models/vuln.py +++ b/src/censys_platform/models/vuln.py @@ -53,6 +53,7 @@ class VulnTypedDict(TypedDict): risk_source: NotRequired[VulnRiskSource] severity: NotRequired[VulnSeverity] source: NotRequired[VulnSource] + type: NotRequired[Nullable[List[str]]] year: NotRequired[int] @@ -77,6 +78,8 @@ class Vuln(BaseModel): source: Optional[VulnSource] = None + type: OptionalNullable[List[str]] = UNSET + year: Optional[int] = None @field_serializer("risk_source") @@ -120,10 +123,11 @@ def serialize_model(self, handler): "risk_source", "severity", "source", + "type", "year", ] ) - nullable_fields = set(["cwes", "evidence", "kev"]) + nullable_fields = set(["cwes", "evidence", "kev", "type"]) serialized = handler(self) m = {} diff --git a/src/censys_platform/models/webproperty.py b/src/censys_platform/models/webproperty.py index e09faa1..833dda4 100644 --- a/src/censys_platform/models/webproperty.py +++ b/src/censys_platform/models/webproperty.py @@ -24,6 +24,7 @@ class WebpropertyTypedDict(TypedDict): cert: NotRequired[CertificateTypedDict] + compromises: NotRequired[Nullable[List[RiskTypedDict]]] endpoints: NotRequired[Nullable[List[EndpointScanStateTypedDict]]] exposures: NotRequired[Nullable[List[RiskTypedDict]]] hardware: NotRequired[Nullable[List[AttributeTypedDict]]] @@ -43,6 +44,8 @@ class WebpropertyTypedDict(TypedDict): class Webproperty(BaseModel): cert: Optional[Certificate] = None + compromises: OptionalNullable[List[Risk]] = UNSET + endpoints: OptionalNullable[List[EndpointScanState]] = UNSET exposures: OptionalNullable[List[Risk]] = UNSET @@ -76,6 +79,7 @@ def serialize_model(self, handler): optional_fields = set( [ "cert", + "compromises", "endpoints", "exposures", "hardware", @@ -94,6 +98,7 @@ def serialize_model(self, handler): ) nullable_fields = set( [ + "compromises", "endpoints", "exposures", "hardware", diff --git a/src/censys_platform/utils/eventstreaming.py b/src/censys_platform/utils/eventstreaming.py index 3bdcd6d..1c189bf 100644 --- a/src/censys_platform/utils/eventstreaming.py +++ b/src/censys_platform/utils/eventstreaming.py @@ -53,6 +53,9 @@ def __enter__(self): return self def __exit__(self, exc_type, exc_val, exc_tb): + self.close() + + def close(self): self._closed = True self.response.close() @@ -92,6 +95,9 @@ async def __aenter__(self): return self async def __aexit__(self, exc_type, exc_val, exc_tb): + await self.close() + + async def close(self): self._closed = True await self.response.aclose() @@ -124,52 +130,54 @@ async def stream_events_async( sentinel: Optional[str] = None, data_required: bool = True, ) -> AsyncGenerator[T, None]: - buffer = bytearray() - position = 0 - event_id: Optional[str] = None - async for chunk in response.aiter_bytes(): - if len(buffer) == 0 and chunk.startswith(UTF8_BOM): - chunk = chunk[len(UTF8_BOM) :] - buffer += chunk - for i in range(position, len(buffer)): - char = buffer[i : i + 1] - seq: Optional[bytes] = None - if char in [b"\r", b"\n"]: - for boundary in MESSAGE_BOUNDARIES: - seq = _peek_sequence(i, buffer, boundary) - if seq is not None: - break - if seq is None: - continue - - block = buffer[position:i] - position = i + len(seq) - event, discard, event_id = _parse_event( - raw=block, - decoder=decoder, - sentinel=sentinel, - event_id=event_id, - data_required=data_required, - ) - if event is not None: - yield event - if discard: - await response.aclose() - return - - if position > 0: - buffer = buffer[position:] - position = 0 - - event, discard, _ = _parse_event( - raw=buffer, - decoder=decoder, - sentinel=sentinel, - event_id=event_id, - data_required=data_required, - ) - if event is not None: - yield event + try: + buffer = bytearray() + position = 0 + event_id: Optional[str] = None + async for chunk in response.aiter_bytes(): + if len(buffer) == 0 and chunk.startswith(UTF8_BOM): + chunk = chunk[len(UTF8_BOM) :] + buffer += chunk + for i in range(position, len(buffer)): + char = buffer[i : i + 1] + seq: Optional[bytes] = None + if char in [b"\r", b"\n"]: + for boundary in MESSAGE_BOUNDARIES: + seq = _peek_sequence(i, buffer, boundary) + if seq is not None: + break + if seq is None: + continue + + block = buffer[position:i] + position = i + len(seq) + event, discard, event_id = _parse_event( + raw=block, + decoder=decoder, + sentinel=sentinel, + event_id=event_id, + data_required=data_required, + ) + if event is not None: + yield event + if discard: + return + + if position > 0: + buffer = buffer[position:] + position = 0 + + event, discard, _ = _parse_event( + raw=buffer, + decoder=decoder, + sentinel=sentinel, + event_id=event_id, + data_required=data_required, + ) + if event is not None: + yield event + finally: + await response.aclose() def stream_events( @@ -178,52 +186,54 @@ def stream_events( sentinel: Optional[str] = None, data_required: bool = True, ) -> Generator[T, None, None]: - buffer = bytearray() - position = 0 - event_id: Optional[str] = None - for chunk in response.iter_bytes(): - if len(buffer) == 0 and chunk.startswith(UTF8_BOM): - chunk = chunk[len(UTF8_BOM) :] - buffer += chunk - for i in range(position, len(buffer)): - char = buffer[i : i + 1] - seq: Optional[bytes] = None - if char in [b"\r", b"\n"]: - for boundary in MESSAGE_BOUNDARIES: - seq = _peek_sequence(i, buffer, boundary) - if seq is not None: - break - if seq is None: - continue - - block = buffer[position:i] - position = i + len(seq) - event, discard, event_id = _parse_event( - raw=block, - decoder=decoder, - sentinel=sentinel, - event_id=event_id, - data_required=data_required, - ) - if event is not None: - yield event - if discard: - response.close() - return - - if position > 0: - buffer = buffer[position:] - position = 0 - - event, discard, _ = _parse_event( - raw=buffer, - decoder=decoder, - sentinel=sentinel, - event_id=event_id, - data_required=data_required, - ) - if event is not None: - yield event + try: + buffer = bytearray() + position = 0 + event_id: Optional[str] = None + for chunk in response.iter_bytes(): + if len(buffer) == 0 and chunk.startswith(UTF8_BOM): + chunk = chunk[len(UTF8_BOM) :] + buffer += chunk + for i in range(position, len(buffer)): + char = buffer[i : i + 1] + seq: Optional[bytes] = None + if char in [b"\r", b"\n"]: + for boundary in MESSAGE_BOUNDARIES: + seq = _peek_sequence(i, buffer, boundary) + if seq is not None: + break + if seq is None: + continue + + block = buffer[position:i] + position = i + len(seq) + event, discard, event_id = _parse_event( + raw=block, + decoder=decoder, + sentinel=sentinel, + event_id=event_id, + data_required=data_required, + ) + if event is not None: + yield event + if discard: + return + + if position > 0: + buffer = buffer[position:] + position = 0 + + event, discard, _ = _parse_event( + raw=buffer, + decoder=decoder, + sentinel=sentinel, + event_id=event_id, + data_required=data_required, + ) + if event is not None: + yield event + finally: + response.close() def _parse_event(