From 8687f3bbc4cf9302a3bcf4a285dec5b52c7db03f Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Sun, 15 Feb 2026 00:41:07 +0000 Subject: [PATCH 1/2] ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.717.0 --- .speakeasy/gen.lock | 264 +++++++++++++----- .speakeasy/gen.yaml | 4 +- .speakeasy/workflow.lock | 16 +- README-PYPI.md | 2 +- README.md | 2 +- RELEASES.md | 12 +- docs/models/gemini.md | 11 + docs/models/searchqueryinputbody.md | 2 +- docs/models/service.md | 1 + docs/models/servicescan.md | 1 + docs/sdks/accountmanagement/README.md | 18 +- docs/sdks/collections/README.md | 24 +- docs/sdks/globaldata/README.md | 41 ++- docs/sdks/threathunting/README.md | 15 +- poetry.lock | 11 +- pylintrc | 2 +- pyproject.toml | 4 +- src/censys_platform/_version.py | 8 +- src/censys_platform/account_management.py | 140 ++++++++-- src/censys_platform/collections.py | 156 ++++++++--- src/censys_platform/global_data.py | 248 ++++++++++++---- src/censys_platform/models/__init__.py | 5 + src/censys_platform/models/elffile.py | 6 + src/censys_platform/models/gemini.py | 40 +++ .../models/ipmi_rmcpheader_messageclass.py | 6 + src/censys_platform/models/rdate.py | 6 + .../models/searchqueryinputbody.py | 4 +- src/censys_platform/models/service.py | 5 + src/censys_platform/models/servicescan.py | 5 + src/censys_platform/models/snmp_engine.py | 6 + src/censys_platform/threat_hunting.py | 90 ++++-- src/censys_platform/utils/__init__.py | 5 +- src/censys_platform/utils/eventstreaming.py | 126 +++++---- src/censys_platform/utils/security.py | 2 + 34 files changed, 978 insertions(+), 310 deletions(-) create mode 100644 docs/models/gemini.md create mode 100644 src/censys_platform/models/gemini.py diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 0ca0f01..11de94a 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,32 +1,32 @@ lockVersion: 2.0.0 id: 5ca2c9b7-aea6-4a23-a631-998fcc6c18a8 management: - docChecksum: 133adc6bd5fd663ffb80f3e0b4509d77 - docVersion: 1.0.71 - speakeasyVersion: 1.700.2 - generationVersion: 2.801.2 - releaseVersion: 0.12.4 - configChecksum: a3186fbd4582b8547c35695d3eb76735 + docChecksum: 1546f9c59cb51cce3c43698e94c326d2 + docVersion: 1.0.75 + speakeasyVersion: 1.717.0 + generationVersion: 2.824.1 + releaseVersion: 0.13.0 + configChecksum: 5387ff698d94fb04e116e7c224328345 repoURL: https://github.com/censys/censys-sdk-python.git installationURL: https://github.com/censys/censys-sdk-python.git published: true persistentEdits: - generation_id: cc48e3b5-1c6f-42ab-b2c5-5cf2bdd54ab3 - pristine_commit_hash: 15c77a369b5f26ce5f4069e4f7ebfb0dc79b0d63 - pristine_tree_hash: b37aa486ed21a24c4554c2300476d02d80a34e19 + generation_id: 771e6ac3-e177-4e00-b210-68a3058bbfcc + pristine_commit_hash: 7192fba277ff427eba1ef9b9906f44b6efc1b0dd + pristine_tree_hash: 144da4df1029e7257f62c5150d3e2fe266d2d0d7 features: python: acceptHeaders: 3.0.0 additionalDependencies: 1.0.0 - constsAndDefaults: 1.0.5 - core: 5.23.18 + constsAndDefaults: 1.0.6 + core: 6.0.5 defaultEnabledRetries: 0.2.0 downloadStreams: 1.0.1 enumUnions: 0.1.0 envVarSecurityUsage: 0.3.2 examples: 3.0.2 flattening: 3.1.1 - globalSecurity: 3.0.4 + globalSecurity: 3.0.5 globalSecurityCallbacks: 1.0.0 globalSecurityFlattening: 1.0.0 globalServerURLs: 3.2.0 @@ -35,10 +35,10 @@ features: methodArguments: 1.0.2 nameOverrides: 3.0.1 nullables: 1.0.2 - responseFormat: 1.0.1 + responseFormat: 1.1.0 retries: 3.0.3 sdkHooks: 1.2.1 - unions: 3.1.2 + unions: 3.1.3 trackedFiles: .gitattributes: id: 24139dae6567 @@ -760,6 +760,10 @@ trackedFiles: id: 3cc4a188873c last_write_checksum: sha1:1f03d551fe4405702dfbd485b4073c31157f7277 pristine_git_object: c2bcf7cc6b2f4fb31163485acee3d18c25956b4d + docs/models/gemini.md: + id: cfd11344966a + last_write_checksum: sha1:df74c05fe48183e0d4de88780bbae072734a9d8f + pristine_git_object: 5eb1a3ebe7986fca01926dfd6da9caa6601ebc41 docs/models/generalnames.md: id: 88cde77f8ce5 last_write_checksum: sha1:83f6dd6f786652498fd42a522abcb9504fe9fbf4 @@ -1986,8 +1990,8 @@ trackedFiles: pristine_git_object: 9421fc6fd561aa8aa2d8c07145ea4745d5f7798b docs/models/searchqueryinputbody.md: id: 02f08f37bdf6 - last_write_checksum: sha1:63e373e16c49fec7bd16035ecf10adc002353a99 - pristine_git_object: f0c20567ac23cfc421edd1bcad74bdd9f23624b2 + last_write_checksum: sha1:2835a13e90cc08bd789e69a4f6038248336166b6 + pristine_git_object: 743a7731e0952d0430ef6408d558d6c472ea7a38 docs/models/searchqueryresponse.md: id: fb6b0986ba66 last_write_checksum: sha1:b7bff8da06f733cd442d415ff08f4312aeb3eb51 @@ -2026,8 +2030,8 @@ trackedFiles: pristine_git_object: e6f00cc1cb14bfc9139ac98eae6022b582da1895 docs/models/service.md: id: d38041323049 - last_write_checksum: sha1:2a1b04d9cdcc175313a7b2e9262ab66678ed6cc2 - pristine_git_object: 9416ec5689555eca9b14d7e8e46e665f4b96467a + last_write_checksum: sha1:f0381795e590520a4bbda541c944117ed8e3c708 + pristine_git_object: 212e4a99393fadc196921ff3bdd6874470391b4b docs/models/serviceid.md: id: 78670c733096 last_write_checksum: sha1:4388c75f08f99206fc758d5d47396f1a13fd37e1 @@ -2038,8 +2042,8 @@ trackedFiles: pristine_git_object: d4efd3a1544fbdb6abab868b5d03cc03deceddb4 docs/models/servicescan.md: id: 5079b5eb4109 - last_write_checksum: sha1:63b174aea6f7c4a35acf1370eae405b31821567b - pristine_git_object: 0c000a9bdcb278e44e348ecc6e19b18ff3ff1efb + last_write_checksum: sha1:3dbbdbb83c0d46e39ab314a4b0931233b9ade24f + pristine_git_object: 0b98e3b3a1d179f26dc076c66bc2d39a6f3608e4 docs/models/servicescanned.md: id: 8783aac64d52 last_write_checksum: sha1:95fa8c18ec2267c5969827ee2576a45c793fc904 @@ -2918,20 +2922,20 @@ trackedFiles: pristine_git_object: 924281f1d76d2c334d0d8c8329b518fef8f41798 docs/sdks/accountmanagement/README.md: id: 5ecc19ffd434 - last_write_checksum: sha1:9bbfbab1c604d80c3549ab501899e427861f8407 - pristine_git_object: 6125e5c643e2c7ec8c9f582251355db9d6aaf27f + last_write_checksum: sha1:6158ea9897139b88623065a82f3f426686039674 + pristine_git_object: 7d5aff9b18d011a6e257e53d83c88d8d47a4e4d8 docs/sdks/collections/README.md: id: 7985e64efccf - last_write_checksum: sha1:a475df9b5d470aa83fe95a7c2edd37a309ca5005 - pristine_git_object: f620a9fb9e9b80c94a76ddeade7fcce27964ba53 + last_write_checksum: sha1:a48cfce79adcb96db2e4161a5824dc8814e4ff7e + pristine_git_object: 3e61ad2b6d77ddb109bacccd5de70d83e97c8cf0 docs/sdks/globaldata/README.md: id: 0c68886632e6 - last_write_checksum: sha1:c8f777dc327fd79a72022cd627f5314e59f31e5c - pristine_git_object: b2ef5cc921ea4f2c406809dce4743a9211ae0fde + last_write_checksum: sha1:e306ee2378933f21750975d2d9434ec04e1f5efc + pristine_git_object: 4b35440d500338f47d0640832dd287e1f0f79e7c docs/sdks/threathunting/README.md: id: 9d697938ee45 - last_write_checksum: sha1:a691e078e534286de3ed1955554e6e00d8a8cda2 - pristine_git_object: 4d1b4e7b731d408808c7f86e2725d0ed9919adaa + last_write_checksum: sha1:dd67ab8b1f0ec0d2cbd3d9d5f0caeb5765684359 + pristine_git_object: b700bf4182e900d4ed68587286cde63c70da7882 poetry.toml: id: a81ade82122a last_write_checksum: sha1:2242305e29dc6921bdf5b200aea5d4bf67830230 @@ -2942,12 +2946,12 @@ trackedFiles: pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544 pylintrc: id: 7ce8b9f946e6 - last_write_checksum: sha1:021d728ef83b3b03a2cfdd33725924f7862ec67d - pristine_git_object: 451f601a6382e06ed064d9e37bb0d2581bd472e9 + last_write_checksum: sha1:6b714e2bf6c43f5f9d8258f34682054c84bc5c30 + pristine_git_object: 5240af4c93a867cfaaf8934eb76cbe84354ded18 pyproject.toml: id: 5d07e7d72637 - last_write_checksum: sha1:64a5ae4c2766e77363d0cb14ed045d12c9c2d33f - pristine_git_object: a39f186e9f8aad4837ff70cd97e156debe578463 + last_write_checksum: sha1:ef90876976f0833ca32919793dc8a8228b0b8468 + pristine_git_object: 6c35b32b3b4cbcb6fa5f08ffd89b297fcfe956f7 scripts/prepare_readme.py: id: e0c5957a6035 last_write_checksum: sha1:10d6ae008b24c68e99d7e8ba9c2e747070685ead @@ -2974,32 +2978,32 @@ trackedFiles: pristine_git_object: 352d3691d91c2d0ba0f05b48b56d4df5ce520098 src/censys_platform/_version.py: id: d2dc39704c23 - last_write_checksum: sha1:f58d46d54b73a8008ec34d95c377d58b423821f2 - pristine_git_object: 3b6b423d575a0988f0234a6d6d190149c4e65d73 + last_write_checksum: sha1:f779f7cd6eada64ad6fab8cb6a538f6f852696a1 + pristine_git_object: e38ae2c95bda8c234d50ab24f949660239df6f15 src/censys_platform/account_management.py: id: 09993862b047 - last_write_checksum: sha1:c635ab159be95add3d429513fb91143876bfc731 - pristine_git_object: 97bdf5cfc697a5b3b9f9b5c0d400f87a0eba22b5 + last_write_checksum: sha1:8c463369fda5bd1e76e021b26bfb99b492a2db90 + pristine_git_object: f75ccc66c32ada0b45237f70e890ea34d2ba9537 src/censys_platform/basesdk.py: id: a49fe6a31a15 last_write_checksum: sha1:04e5f0a1e4b6a7db86eec781a31edb2dc9a61ba5 pristine_git_object: aecdb5ca70b7d3674d45c29152c032e5feaf638d src/censys_platform/collections.py: id: e6d640c28668 - last_write_checksum: sha1:a7086e51da9b5565c486d9397ed5c57ab364dd53 - pristine_git_object: 23beebdc9f77f5117316ee6e58376851aac943c1 + last_write_checksum: sha1:d1725e480b56b3b567f5e8d4920d516597155816 + pristine_git_object: bb2bb50a5e15e8a18c2e4e65a5a8fdcd72d72b67 src/censys_platform/global_data.py: id: 0eedbf9a2038 - last_write_checksum: sha1:3b8c58bd5d8d1cf50b1d4d6054efe28816408832 - pristine_git_object: 80b1dda7736b46a3bcf42ecef6a6dd632513d1a6 + last_write_checksum: sha1:3ffd8225ac9b97381af8a1c9c79426fd3450c5bf + pristine_git_object: 6c2b62369021e6f28f8c16060d805942455c666f 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:aaecea428250a85d3c1a2fc7109faf64226db1d6 - pristine_git_object: ab90863cfc3e68ee2fa20b333b10c317d4455f85 + last_write_checksum: sha1:1afd1954df45abe5c3397ce8e43a626265725d69 + pristine_git_object: 795b3f7fe36990e975224c4b4d372c18d5bc1a78 src/censys_platform/models/activemq.py: id: c852b87bc559 last_write_checksum: sha1:5d8f5fbd113473e04d2d5824f960aebd03c6e892 @@ -3494,8 +3498,8 @@ trackedFiles: pristine_git_object: ed0ccf8ef10e812aed2b976b4d6ad2efedfbfbfc src/censys_platform/models/elffile.py: id: d1dd279522b2 - last_write_checksum: sha1:1e8c411d892bc5f3359f853ed2fe332ed8899fff - pristine_git_object: 0d436b8ee5214537a9c96f6ae6b8a656e9844731 + last_write_checksum: sha1:5e6b2e074c3a5fb7a7e7da89120ff7bbf901cbe3 + pristine_git_object: 9af18c6682675bdacffa5501885a5bd82bcc27c2 src/censys_platform/models/endpointscan.py: id: e9034f3e14f9 last_write_checksum: sha1:64dbbf1e463ad72d63c777519383425b858ea997 @@ -3624,6 +3628,10 @@ trackedFiles: id: 807b66e46ece last_write_checksum: sha1:d45183e562bc54c261c46378f640d4d5a9cd33bf pristine_git_object: 6860c6c85550bc3f2706c000aee5ef1e50859f60 + src/censys_platform/models/gemini.py: + id: 8639712c02a4 + last_write_checksum: sha1:a9331d0efc394f7b386d9ee689e975cba5f66ddc + pristine_git_object: 4819249d36154c75f28c73d5368c9d89eabc87b6 src/censys_platform/models/generalnames.py: id: e1539bc45d09 last_write_checksum: sha1:fbd893e4e7841d9033ee6c885451794d1f41a48c @@ -3806,8 +3814,8 @@ trackedFiles: pristine_git_object: 5025efd1808ab603dc0f695cbfd34d087dd2e17d src/censys_platform/models/ipmi_rmcpheader_messageclass.py: id: 6ce098f00464 - last_write_checksum: sha1:ca16d2e1f788cb735016f9c43cf74c64898732c2 - pristine_git_object: 1eaf0131dd3eea99ad9d442dd3dd84b499dad548 + last_write_checksum: sha1:df598356146fc75a5c8154e6591abfd4d73cb4f9 + pristine_git_object: e619e9ab8ad609f678305a9f3bb2726a22aff5a0 src/censys_platform/models/ipmi_sessionheader.py: id: 3981a0ef137f last_write_checksum: sha1:d7c309e98f21cf699f537fc2b953ddb0362492f4 @@ -4430,8 +4438,8 @@ trackedFiles: pristine_git_object: 676be7f1775133cda359da52dbda588edeffdd14 src/censys_platform/models/rdate.py: id: 93c562f8ee31 - last_write_checksum: sha1:b682bc31d73a82fccc614e96cbdf0b6455c3b92d - pristine_git_object: c3c69790ce4c49ba7bb94b6e00739990499bbb52 + last_write_checksum: sha1:2fce36c9b7995a077fa05596c1ce7ebea91d8943 + pristine_git_object: 2a4667682436cadce18a7eada417c9c75e7721e3 src/censys_platform/models/rdp.py: id: 1ba23ccc8bc8 last_write_checksum: sha1:bd680689ee8b5174e0c55463152825c67a26360b @@ -4754,8 +4762,8 @@ trackedFiles: pristine_git_object: 3732d3e1741a4ff8dd4e56cdd03c2b538d398f35 src/censys_platform/models/searchqueryinputbody.py: id: 5a19fe64c4c3 - last_write_checksum: sha1:2b0d648953845774d69e816b64d88857a56114eb - pristine_git_object: c9986a459389f2091a5026d4b7a65f261247e335 + last_write_checksum: sha1:488d7574bf24d8a7ef4bbda2c0de6a1ce562a96b + pristine_git_object: ad572c5922b3f18294d96ec95381775a7f312411 src/censys_platform/models/searchqueryresponse.py: id: a67e92fb07de last_write_checksum: sha1:ef529456c9318b0862ffdab6cbbd465aedd70ed7 @@ -4790,16 +4798,16 @@ trackedFiles: pristine_git_object: a7391bbf7b2dc4f949ac86ac6969dd4b84d2ce44 src/censys_platform/models/service.py: id: 25dc1044897b - last_write_checksum: sha1:b6d433fc7b07070012711ab4cc81b0029362319e - pristine_git_object: 92db92f9511d251187e973f9b500d3ff72f6246e + last_write_checksum: sha1:d44aaa1cb037c9e149a7ca71b961f357cb8d6167 + pristine_git_object: 5a83e655e2ea54e6993aa0b9495d70ca3b79e778 src/censys_platform/models/serviceid.py: id: 52a5b098ac72 last_write_checksum: sha1:1e7bf71c1365b3f352342f5de05fd85c63345b7a pristine_git_object: fb52b69a02398d69fe680fbbf1f9e131707cfd26 src/censys_platform/models/servicescan.py: id: 24c47a42f886 - last_write_checksum: sha1:c8c79161d1fb321a6251f001a9d14ead697cc025 - pristine_git_object: 4de276e5b6983f15805d43b7ef69ff30f3195e74 + last_write_checksum: sha1:62982327b3daeb124bafe7a799ded8bee5eeb100 + pristine_git_object: bf802479540979a7d0f772254e5f6e0f43577f35 src/censys_platform/models/servicescanned.py: id: 7a118692950e last_write_checksum: sha1:026ccd1b0189bfba2baa9b352deaefb55c4bce36 @@ -4862,8 +4870,8 @@ trackedFiles: pristine_git_object: b67e4cef99edfb29221441fe4950c4440fe7dc26 src/censys_platform/models/snmp_engine.py: id: 00b89f797e90 - last_write_checksum: sha1:44e028898365c866e93aebaddea943408a1342ab - pristine_git_object: 53e78ba9b100e18c69306335574627dad33a501e + last_write_checksum: sha1:f9bfbd7bb8ea947178782d98e4a039115ffd9a9b + pristine_git_object: 7977e44a760cff72cd5ad959f3395abf582f6f01 src/censys_platform/models/snmp_interfaces.py: id: 2d639901b28b last_write_checksum: sha1:b6fe501512d2832b69370a74fc8d7dc2e5287b21 @@ -5322,8 +5330,8 @@ trackedFiles: pristine_git_object: 5db48844a430af6402eb7ffaba0d9fcd30cf0724 src/censys_platform/threat_hunting.py: id: 970de984d111 - last_write_checksum: sha1:b0115f835efac61827a5c737ea11110d739571af - pristine_git_object: 510c0e4fb757bed2a3170e666b504554af6c3dae + last_write_checksum: sha1:172973ba567603208025764e1826027047fa84a4 + pristine_git_object: ea0e874df851bfd11d283d58e45e32039bab47ca src/censys_platform/types/__init__.py: id: 40a6abbc737a last_write_checksum: sha1:140ebdd01a46f92ffc710c52c958c4eba3cf68ed @@ -5334,8 +5342,8 @@ trackedFiles: pristine_git_object: a9a640a1a7048736383f96c67c6290c86bf536ee src/censys_platform/utils/__init__.py: id: 76ac94c422c2 - last_write_checksum: sha1:398211d49b762a067ec6d10197a4b11dfd258ff5 - pristine_git_object: c906e1e0192e9017fc13851eb23fc0c2753429c8 + last_write_checksum: sha1:a1f6ae620fb6a3ccc30e99b427e49a0c8be463af + pristine_git_object: 15394a08a7e30033d319e44dd5734664ddb587e5 src/censys_platform/utils/annotations.py: id: 259f8dfc4b83 last_write_checksum: sha1:a4824ad65f730303e4e1e3ec1febf87b4eb46dbc @@ -5350,8 +5358,8 @@ trackedFiles: pristine_git_object: 3324e1bc2668c54c4d5f5a1a845675319757a828 src/censys_platform/utils/eventstreaming.py: id: 79888c9b9f71 - last_write_checksum: sha1:bababae5d54b7efc360db701daa49e18a92c2f3b - pristine_git_object: 0969899bfc491e5e408d05643525f347ea95e4fc + last_write_checksum: sha1:ffa870a25a7e4e2015bfd7a467ccd3aa1de97f0e + pristine_git_object: f2052fc22d9fd6c663ba3dce019fe234ca37108b src/censys_platform/utils/forms.py: id: e6173af8260d last_write_checksum: sha1:15fa7e9ab1611e062a9984cf06cb20969713d295 @@ -5382,8 +5390,8 @@ trackedFiles: pristine_git_object: 88a91b10cd2076b4a2c6cff2ac6bfaa5e3c5ad13 src/censys_platform/utils/security.py: id: 1559cefe0793 - last_write_checksum: sha1:a17130ace2c0db6394f38dd941ad2b700cc755c8 - pristine_git_object: 295a3f40031dbb40073ad227fd4a355660f97ab2 + last_write_checksum: sha1:435dd8b180cefcd733e635b9fa45512da091d9c0 + pristine_git_object: 17996bd54b8624009802fbbdf30bcb4225b8dfed src/censys_platform/utils/serializers.py: id: a3afe58d4a90 last_write_checksum: sha1:ce1d8d7f500a9ccba0aeca5057cee9c271f4dfd7 @@ -5416,6 +5424,10 @@ examples: application/json: {"error": {"code": 401, "message": "Access credentials are invalid", "reason": "Access token is not active", "status": "Unauthorized"}} "403": 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"} + "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-collections-crud-create: speakeasy-default-v3-collections-crud-create: parameters: @@ -5431,6 +5443,10 @@ examples: application/json: {"error": {"code": 401, "message": "Access credentials are invalid", "reason": "Access token is not active", "status": "Unauthorized"}} "403": 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"} + "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-collections-crud-delete: speakeasy-default-v3-collections-crud-delete: parameters: @@ -5444,6 +5460,10 @@ examples: application/json: {"error": {"code": 401, "message": "Access credentials are invalid", "reason": "Access token is not active", "status": "Unauthorized"}} "403": 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"} + "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-collections-crud-get: speakeasy-default-v3-collections-crud-get: parameters: @@ -5459,6 +5479,10 @@ examples: application/json: {"error": {"code": 401, "message": "Access credentials are invalid", "reason": "Access token is not active", "status": "Unauthorized"}} "403": 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"} + "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-collections-crud-update: speakeasy-default-v3-collections-crud-update: parameters: @@ -5476,6 +5500,10 @@ examples: application/json: {"error": {"code": 401, "message": "Access credentials are invalid", "reason": "Access token is not active", "status": "Unauthorized"}} "403": 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"} + "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-collections-list-events: speakeasy-default-v3-collections-list-events: parameters: @@ -5495,6 +5523,10 @@ examples: application/json: {"error": {"code": 401, "message": "Access credentials are invalid", "reason": "Access token is not active", "status": "Unauthorized"}} "403": 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"} + "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-collections-search-aggregate: speakeasy-default-v3-collections-search-aggregate: parameters: @@ -5512,6 +5544,10 @@ examples: application/json: {"error": {"code": 401, "message": "Access credentials are invalid", "reason": "Access token is not active", "status": "Unauthorized"}} "403": 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"} + "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-collections-search-query: speakeasy-default-v3-collections-search-query: parameters: @@ -5529,6 +5565,10 @@ examples: application/json: {"error": {"code": 401, "message": "Access credentials are invalid", "reason": "Access token is not active", "status": "Unauthorized"}} "403": 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"} + "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-asset-certificate-list: speakeasy-default-v3-globaldata-asset-certificate-list: parameters: @@ -5555,6 +5595,10 @@ examples: application/json: {"error": {"code": 401, "message": "Access credentials are invalid", "reason": "Access token is not active", "status": "Unauthorized"}} "403": 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"} + "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-asset-host-list: speakeasy-default-v3-globaldata-asset-host-list: parameters: @@ -5582,6 +5626,10 @@ examples: application/json: {"error": {"code": 401, "message": "Access credentials are invalid", "reason": "Access token is not active", "status": "Unauthorized"}} "403": 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"} + "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-asset-host-timeline: speakeasy-default-v3-globaldata-asset-host-timeline: parameters: @@ -5599,6 +5647,10 @@ examples: application/json: {"error": {"code": 401, "message": "Access credentials are invalid", "reason": "Access token is not active", "status": "Unauthorized"}} "403": 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"} + "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-asset-webproperty-list: speakeasy-default-v3-globaldata-asset-webproperty-list: parameters: @@ -5626,6 +5678,10 @@ examples: application/json: {"error": {"code": 401, "message": "Access credentials are invalid", "reason": "Access token is not active", "status": "Unauthorized"}} "403": 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"} + "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-search-aggregate: speakeasy-default-v3-globaldata-search-aggregate: parameters: @@ -5641,6 +5697,10 @@ examples: application/json: {"error": {"code": 401, "message": "Access credentials are invalid", "reason": "Access token is not active", "status": "Unauthorized"}} "403": 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"} + "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-search-query: speakeasy-default-v3-globaldata-search-query: parameters: @@ -5656,6 +5716,10 @@ examples: application/json: {"error": {"code": 401, "message": "Access credentials are invalid", "reason": "Access token is not active", "status": "Unauthorized"}} "403": 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"} + "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-threathunting-value-counts: speakeasy-default-v3-threathunting-value-counts: parameters: @@ -5671,6 +5735,10 @@ examples: application/json: {"error": {"code": 401, "message": "Access credentials are invalid", "reason": "Access token is not active", "status": "Unauthorized"}} "403": 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"} + "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-get-host-observations-with-certificate: speakeasy-default-v3-globaldata-get-host-observations-with-certificate: parameters: @@ -5703,6 +5771,10 @@ examples: application/json: {"error": {"code": 401, "message": "Access credentials are invalid", "reason": "Access token is not active", "status": "Unauthorized"}} "403": 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"} + "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-scans-get: speakeasy-default-v3-globaldata-scans-get: parameters: @@ -5718,6 +5790,10 @@ examples: application/json: {"error": {"code": 401, "message": "Access credentials are invalid", "reason": "Access token is not active", "status": "Unauthorized"}} "403": 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"} + "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-threathunting-scans-get: speakeasy-default-v3-threathunting-scans-get: parameters: @@ -5733,6 +5809,10 @@ examples: application/json: {"error": {"code": 401, "message": "Access credentials are invalid", "reason": "Access token is not active", "status": "Unauthorized"}} "403": 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"} + "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-threathunting-scans-discovery: speakeasy-default-v3-threathunting-scans-discovery: parameters: @@ -5748,6 +5828,10 @@ examples: application/json: {"error": {"code": 401, "message": "Access credentials are invalid", "reason": "Access token is not active", "status": "Unauthorized"}} "403": 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"} + "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-threathunting-get-host-observations-with-certificate: speakeasy-default-v3-threathunting-get-host-observations-with-certificate: parameters: @@ -5768,6 +5852,10 @@ examples: application/json: {"error": {"code": 401, "message": "Access credentials are invalid", "reason": "Access token is not active", "status": "Unauthorized"}} "403": 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"} + "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-asset-certificate-list-post: speakeasy-default-v3-globaldata-asset-certificate-list-post: parameters: @@ -5783,6 +5871,10 @@ examples: application/json: {"error": {"code": 401, "message": "Access credentials are invalid", "reason": "Access token is not active", "status": "Unauthorized"}} "403": 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"} + "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-asset-certificate-list-raw-post: speakeasy-default-v3-globaldata-asset-certificate-list-raw-post: parameters: @@ -5798,6 +5890,10 @@ examples: application/json: {"error": {"code": 401, "message": "Access credentials are invalid", "reason": "Access token is not active", "status": "Unauthorized"}} "403": 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"} + "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-asset-certificate-raw: speakeasy-default-v3-globaldata-asset-certificate-raw: parameters: @@ -5813,6 +5909,10 @@ examples: application/json: {"error": {"code": 401, "message": "Access credentials are invalid", "reason": "Access token is not active", "status": "Unauthorized"}} "403": 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"} + "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-asset-host-list-post: speakeasy-default-v3-globaldata-asset-host-list-post: parameters: @@ -5828,6 +5928,10 @@ examples: application/json: {"error": {"code": 401, "message": "Access credentials are invalid", "reason": "Access token is not active", "status": "Unauthorized"}} "403": 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"} + "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-asset-webproperty-list-post: speakeasy-default-v3-globaldata-asset-webproperty-list-post: parameters: @@ -5843,6 +5947,10 @@ examples: application/json: {"error": {"code": 401, "message": "Access credentials are invalid", "reason": "Access token is not active", "status": "Unauthorized"}} "403": 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"} + "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-search-convert: speakeasy-default-v3-globaldata-search-convert: parameters: @@ -5860,6 +5968,8 @@ 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"} "403": 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"} + "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"} v3-accountmanagement-org-details: speakeasy-default-v3-accountmanagement-org-details: parameters: @@ -5874,6 +5984,8 @@ examples: application/json: {"error": {"code": 401, "message": "Access credentials are invalid", "reason": "Access token is not active", "status": "Unauthorized"}} "403": 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-accountmanagement-org-credits: speakeasy-default-v3-accountmanagement-org-credits: parameters: @@ -5886,6 +5998,8 @@ examples: application/json: {"error": {"code": 401, "message": "Access credentials are invalid", "reason": "Access token is not active", "status": "Unauthorized"}} "403": 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-accountmanagement-org-credits-usage: speakeasy-default-v3-accountmanagement-org-credits-usage: parameters: @@ -5904,6 +6018,8 @@ examples: 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-accountmanagement-invite-user-to-org: speakeasy-default-v3-accountmanagement-invite-user-to-org: parameters: @@ -5916,6 +6032,8 @@ examples: application/json: {"error": {"code": 401, "message": "Access credentials are invalid", "reason": "Access token is not active", "status": "Unauthorized"}} "403": 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-accountmanagement-list-org-members: speakeasy-default-v3-accountmanagement-list-org-members: parameters: @@ -5930,6 +6048,8 @@ examples: application/json: {"error": {"code": 401, "message": "Access credentials are invalid", "reason": "Access token is not active", "status": "Unauthorized"}} "403": 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-accountmanagement-remove-org-member: speakeasy-default-v3-accountmanagement-remove-org-member: parameters: @@ -5941,6 +6061,8 @@ examples: application/json: {"error": {"code": 401, "message": "Access credentials are invalid", "reason": "Access token is not active", "status": "Unauthorized"}} "403": 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-accountmanagement-update-org-member: speakeasy-default-v3-accountmanagement-update-org-member: parameters: @@ -5954,6 +6076,8 @@ examples: 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-accountmanagement-member-credits-usage: speakeasy-default-v3-accountmanagement-member-credits-usage: parameters: @@ -5972,6 +6096,8 @@ examples: 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-accountmanagement-user-credits: speakeasy-default-v3-accountmanagement-user-credits: responses: @@ -5981,6 +6107,8 @@ examples: application/json: {"error": {"code": 401, "message": "Access credentials are invalid", "reason": "Access token is not active", "status": "Unauthorized"}} "404": 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-threathunting-threats-list: speakeasy-default-v3-threathunting-threats-list: parameters: @@ -5994,6 +6122,10 @@ examples: application/json: {"error": {"code": 401, "message": "Access credentials are invalid", "reason": "Access token is not active", "status": "Unauthorized"}} "403": 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"} + "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-accountmanagement-user-credits-usage: speakeasy-default-v3-accountmanagement-user-credits-usage: parameters: @@ -6009,6 +6141,10 @@ examples: application/json: {"error": {"code": 401, "message": "Access credentials are invalid", "reason": "Access token is not active", "status": "Unauthorized"}} "404": 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"} + "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 b675ecc..2b90acb 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -21,13 +21,14 @@ generation: schemas: allOfMergeStrategy: shallowMerge requestBodyFieldName: "" + versioningStrategy: automatic persistentEdits: {} tests: generateTests: true generateNewTests: false skipResponseBodyAssertions: false python: - version: 0.12.4 + version: 0.13.0 additionalDependencies: dev: {} main: {} @@ -50,6 +51,7 @@ python: flattenRequests: false flatteningOrder: parameters-first forwardCompatibleEnumsByDefault: true + forwardCompatibleUnionsByDefault: "false" imports: option: openapi paths: diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index a3ce8fc..b04ac4e 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,21 +1,21 @@ -speakeasyVersion: 1.700.2 +speakeasyVersion: 1.717.0 sources: converge-source: sourceNamespace: converge-source - sourceRevisionDigest: sha256:7b3f780b817d3434a2d2aeb310cf8987d91c3d3a493f1b73bcf32ec3e877d56a - sourceBlobDigest: sha256:c82ea45eb541f2b2bd01aea26cd7a561098f9326ed7163df172c5ead3787bf44 + sourceRevisionDigest: sha256:82656d5ff51144d062a792dbc471ef98585cb8f6fcf856019fec29f5e1e7b56a + sourceBlobDigest: sha256:48a130aa4edd4ab2358954e6602f78ba678358386fedb6e7db4ef667de7cf6f0 tags: - latest - - speakeasy-sdk-regen-1769214570 - - 1.0.71 + - speakeasy-sdk-regen-1770424472 + - 1.0.75 targets: censys-sdk-python: source: converge-source sourceNamespace: converge-source - sourceRevisionDigest: sha256:7b3f780b817d3434a2d2aeb310cf8987d91c3d3a493f1b73bcf32ec3e877d56a - sourceBlobDigest: sha256:c82ea45eb541f2b2bd01aea26cd7a561098f9326ed7163df172c5ead3787bf44 + sourceRevisionDigest: sha256:82656d5ff51144d062a792dbc471ef98585cb8f6fcf856019fec29f5e1e7b56a + sourceBlobDigest: sha256:48a130aa4edd4ab2358954e6602f78ba678358386fedb6e7db4ef667de7cf6f0 codeSamplesNamespace: converge-source-python-code-samples - codeSamplesRevisionDigest: sha256:46f0471c3f518d7e1db3d3de0440503636ca49c3fa2d444e8e82b9a532835db1 + codeSamplesRevisionDigest: sha256:3e5450e8ca337c669472642b6fa6e263f19b0f00381dea7271da177d294f9262 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/README-PYPI.md b/README-PYPI.md index 1d5aaba..9969e87 100644 --- a/README-PYPI.md +++ b/README-PYPI.md @@ -85,7 +85,7 @@ It's also possible to write a standalone Python script without needing to set up ```python #!/usr/bin/env -S uv run --script # /// script -# requires-python = ">=3.9" +# requires-python = ">=3.10" # dependencies = [ # "censys-platform", # ] diff --git a/README.md b/README.md index a39446a..090ba74 100644 --- a/README.md +++ b/README.md @@ -85,7 +85,7 @@ It's also possible to write a standalone Python script without needing to set up ```python #!/usr/bin/env -S uv run --script # /// script -# requires-python = ">=3.9" +# requires-python = ">=3.10" # dependencies = [ # "censys-platform", # ] diff --git a/RELEASES.md b/RELEASES.md index c47cfe8..f9cae9d 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -196,4 +196,14 @@ Based on: ### Generated - [python v0.12.4] . ### Releases -- [PyPI v0.12.4] https://pypi.org/project/censys-platform/0.12.4 - . \ No newline at end of file +- [PyPI v0.12.4] https://pypi.org/project/censys-platform/0.12.4 - . + +## 2026-02-15 00:39:29 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.717.0 (2.824.1) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v0.13.0] . +### Releases +- [PyPI v0.13.0] https://pypi.org/project/censys-platform/0.13.0 - . \ No newline at end of file diff --git a/docs/models/gemini.md b/docs/models/gemini.md new file mode 100644 index 0000000..5eb1a3e --- /dev/null +++ b/docs/models/gemini.md @@ -0,0 +1,11 @@ +# Gemini + + +## Fields + +| Field | Type | Required | Description | +| ---------------------- | ---------------------- | ---------------------- | ---------------------- | +| `body` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `client_cert_required` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `meta` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `status_code` | *Optional[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/searchqueryinputbody.md b/docs/models/searchqueryinputbody.md index f0c2056..743a773 100644 --- a/docs/models/searchqueryinputbody.md +++ b/docs/models/searchqueryinputbody.md @@ -6,6 +6,6 @@ | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `fields` | List[*str*] | :heavy_minus_sign: | Specify fields to only return in the response. If you provide fields and omit `host.services.port`, `host.services.transport_protocol`, and `host.services.protocol`, then `matched_services` will not be returned in the response. | host.ip | -| `page_size` | *OptionalNullable[int]* | :heavy_minus_sign: | amount of results to return per page | 1 | +| `page_size` | *OptionalNullable[int]* | :heavy_minus_sign: | Number of results to return to per page. The default and maximum is 100. | 1 | | `page_token` | *Optional[str]* | :heavy_minus_sign: | page token for the requested page of search results | | | `query` | *str* | :heavy_check_mark: | CenQL query string to search upon | host.services: (protocol=SSH and not port: 22) | \ No newline at end of file diff --git a/docs/models/service.md b/docs/models/service.md index 9416ec5..212e4a9 100644 --- a/docs/models/service.md +++ b/docs/models/service.md @@ -40,6 +40,7 @@ | `fox` | [Optional[models.Fox]](../models/fox.md) | :heavy_minus_sign: | N/A | | `ftp` | [Optional[models.Ftp]](../models/ftp.md) | :heavy_minus_sign: | N/A | | `gearman` | [Optional[models.Gearman]](../models/gearman.md) | :heavy_minus_sign: | N/A | +| `gemini` | [Optional[models.Gemini]](../models/gemini.md) | :heavy_minus_sign: | N/A | | `hajime` | [Optional[models.Hajime]](../models/hajime.md) | :heavy_minus_sign: | N/A | | `hardware` | List[[models.Attribute](../models/attribute.md)] | :heavy_minus_sign: | N/A | | `hid_vertx` | [Optional[models.HidVertx]](../models/hidvertx.md) | :heavy_minus_sign: | N/A | diff --git a/docs/models/servicescan.md b/docs/models/servicescan.md index 0c000a9..0b98e3b 100644 --- a/docs/models/servicescan.md +++ b/docs/models/servicescan.md @@ -36,6 +36,7 @@ | `fox` | [Optional[models.Fox]](../models/fox.md) | :heavy_minus_sign: | N/A | | `ftp` | [Optional[models.Ftp]](../models/ftp.md) | :heavy_minus_sign: | N/A | | `gearman` | [Optional[models.Gearman]](../models/gearman.md) | :heavy_minus_sign: | N/A | +| `gemini` | [Optional[models.Gemini]](../models/gemini.md) | :heavy_minus_sign: | N/A | | `hajime` | [Optional[models.Hajime]](../models/hajime.md) | :heavy_minus_sign: | N/A | | `hid_vertx` | [Optional[models.HidVertx]](../models/hidvertx.md) | :heavy_minus_sign: | N/A | | `hikvision` | [Optional[models.Hikvision]](../models/hikvision.md) | :heavy_minus_sign: | N/A | diff --git a/docs/sdks/accountmanagement/README.md b/docs/sdks/accountmanagement/README.md index 6125e5c..7d5aff9 100644 --- a/docs/sdks/accountmanagement/README.md +++ b/docs/sdks/accountmanagement/README.md @@ -57,6 +57,7 @@ with SDK( | -------------------------- | -------------------------- | -------------------------- | | models.AuthenticationError | 401 | application/json | | models.ErrorModel | 403, 404, 422 | application/problem+json | +| models.ErrorModel | 500 | application/problem+json | | models.SDKError | 4XX, 5XX | \*/\* | ## get_organization_credits @@ -98,6 +99,7 @@ with SDK( | -------------------------- | -------------------------- | -------------------------- | | models.AuthenticationError | 401 | application/json | | models.ErrorModel | 403, 404, 422 | application/problem+json | +| models.ErrorModel | 500 | application/problem+json | | models.SDKError | 4XX, 5XX | \*/\* | ## get_organization_credit_usage @@ -145,6 +147,7 @@ with SDK( | -------------------------- | -------------------------- | -------------------------- | | models.AuthenticationError | 401 | application/json | | models.ErrorModel | 400, 403, 404, 422 | application/problem+json | +| models.ErrorModel | 500 | application/problem+json | | models.SDKError | 4XX, 5XX | \*/\* | ## invite_user_to_organization @@ -188,7 +191,8 @@ with SDK( | Error Type | Status Code | Content Type | | -------------------------- | -------------------------- | -------------------------- | | models.AuthenticationError | 401 | application/json | -| models.ErrorModel | 403, 404, 422 | application/problem+json | +| models.ErrorModel | 403, 404, 409, 422 | application/problem+json | +| models.ErrorModel | 500 | application/problem+json | | models.SDKError | 4XX, 5XX | \*/\* | ## list_organization_members @@ -231,7 +235,8 @@ with SDK( | Error Type | Status Code | Content Type | | -------------------------- | -------------------------- | -------------------------- | | models.AuthenticationError | 401 | application/json | -| models.ErrorModel | 403, 404 | application/problem+json | +| models.ErrorModel | 403, 404, 422 | application/problem+json | +| models.ErrorModel | 500 | application/problem+json | | models.SDKError | 4XX, 5XX | \*/\* | ## remove_organization_member @@ -274,6 +279,7 @@ with SDK( | -------------------------- | -------------------------- | -------------------------- | | models.AuthenticationError | 401 | application/json | | models.ErrorModel | 403, 404, 409, 422 | application/problem+json | +| models.ErrorModel | 500 | application/problem+json | | models.SDKError | 4XX, 5XX | \*/\* | ## update_organization_member @@ -318,7 +324,8 @@ with SDK( | Error Type | Status Code | Content Type | | -------------------------- | -------------------------- | -------------------------- | | models.AuthenticationError | 401 | application/json | -| models.ErrorModel | 400, 403, 404, 422 | application/problem+json | +| models.ErrorModel | 400, 403, 404, 409, 422 | application/problem+json | +| models.ErrorModel | 500 | application/problem+json | | models.SDKError | 4XX, 5XX | \*/\* | ## get_member_credit_usage @@ -367,6 +374,7 @@ with SDK( | -------------------------- | -------------------------- | -------------------------- | | models.AuthenticationError | 401 | application/json | | models.ErrorModel | 400, 403, 404, 422 | application/problem+json | +| models.ErrorModel | 500 | application/problem+json | | models.SDKError | 4XX, 5XX | \*/\* | ## get_user_credits @@ -407,6 +415,7 @@ with SDK( | -------------------------- | -------------------------- | -------------------------- | | models.AuthenticationError | 401 | application/json | | models.ErrorModel | 404 | application/problem+json | +| models.ErrorModel | 500 | application/problem+json | | models.SDKError | 4XX, 5XX | \*/\* | ## get_user_credits_usage @@ -452,5 +461,6 @@ with SDK( | Error Type | Status Code | Content Type | | -------------------------- | -------------------------- | -------------------------- | | models.AuthenticationError | 401 | application/json | -| models.ErrorModel | 404 | application/problem+json | +| models.ErrorModel | 400, 404 | application/problem+json | +| models.ErrorModel | 500 | application/problem+json | | models.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/collections/README.md b/docs/sdks/collections/README.md index f620a9f..3e61ad2 100644 --- a/docs/sdks/collections/README.md +++ b/docs/sdks/collections/README.md @@ -56,7 +56,8 @@ with SDK( | Error Type | Status Code | Content Type | | -------------------------- | -------------------------- | -------------------------- | | models.AuthenticationError | 401 | application/json | -| models.ErrorModel | 403 | application/problem+json | +| models.ErrorModel | 400, 403 | application/problem+json | +| models.ErrorModel | 500 | application/problem+json | | models.SDKError | 4XX, 5XX | \*/\* | ## create @@ -103,7 +104,8 @@ with SDK( | Error Type | Status Code | Content Type | | -------------------------- | -------------------------- | -------------------------- | | models.AuthenticationError | 401 | application/json | -| models.ErrorModel | 403 | application/problem+json | +| models.ErrorModel | 400, 403, 409, 412, 422 | application/problem+json | +| models.ErrorModel | 500 | application/problem+json | | models.SDKError | 4XX, 5XX | \*/\* | ## delete @@ -146,7 +148,8 @@ with SDK( | Error Type | Status Code | Content Type | | -------------------------- | -------------------------- | -------------------------- | | models.AuthenticationError | 401 | application/json | -| models.ErrorModel | 403, 404 | application/problem+json | +| models.ErrorModel | 400, 403, 404 | application/problem+json | +| models.ErrorModel | 500 | application/problem+json | | models.SDKError | 4XX, 5XX | \*/\* | ## get @@ -189,7 +192,8 @@ with SDK( | Error Type | Status Code | Content Type | | -------------------------- | -------------------------- | -------------------------- | | models.AuthenticationError | 401 | application/json | -| models.ErrorModel | 403, 404 | application/problem+json | +| models.ErrorModel | 400, 403, 404 | application/problem+json | +| models.ErrorModel | 500 | application/problem+json | | models.SDKError | 4XX, 5XX | \*/\* | ## update @@ -237,7 +241,8 @@ with SDK( | Error Type | Status Code | Content Type | | -------------------------- | -------------------------- | -------------------------- | | models.AuthenticationError | 401 | application/json | -| models.ErrorModel | 403, 404 | application/problem+json | +| models.ErrorModel | 400, 403, 404, 412 | application/problem+json | +| models.ErrorModel | 500 | application/problem+json | | models.SDKError | 4XX, 5XX | \*/\* | ## list_events @@ -286,7 +291,8 @@ with SDK( | Error Type | Status Code | Content Type | | -------------------------- | -------------------------- | -------------------------- | | models.AuthenticationError | 401 | application/json | -| models.ErrorModel | 403, 404 | application/problem+json | +| models.ErrorModel | 400, 403, 404, 422 | application/problem+json | +| models.ErrorModel | 500 | application/problem+json | | models.SDKError | 4XX, 5XX | \*/\* | ## aggregate @@ -334,7 +340,8 @@ with SDK( | Error Type | Status Code | Content Type | | -------------------------- | -------------------------- | -------------------------- | | models.AuthenticationError | 401 | application/json | -| models.ErrorModel | 403, 404, 422 | application/problem+json | +| models.ErrorModel | 400, 403, 404, 422 | application/problem+json | +| models.ErrorModel | 500 | application/problem+json | | models.SDKError | 4XX, 5XX | \*/\* | ## search @@ -384,5 +391,6 @@ with SDK( | Error Type | Status Code | Content Type | | -------------------------- | -------------------------- | -------------------------- | | models.AuthenticationError | 401 | application/json | -| models.ErrorModel | 403, 404 | application/problem+json | +| models.ErrorModel | 400, 403, 404, 422 | application/problem+json | +| models.ErrorModel | 500 | application/problem+json | | models.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/globaldata/README.md b/docs/sdks/globaldata/README.md index b2ef5cc..4b35440 100644 --- a/docs/sdks/globaldata/README.md +++ b/docs/sdks/globaldata/README.md @@ -65,7 +65,8 @@ with SDK( | Error Type | Status Code | Content Type | | -------------------------- | -------------------------- | -------------------------- | | models.AuthenticationError | 401 | application/json | -| models.ErrorModel | 403, 404 | application/problem+json | +| models.ErrorModel | 400, 403, 404 | application/problem+json | +| models.ErrorModel | 500 | application/problem+json | | models.SDKError | 4XX, 5XX | \*/\* | ## get_certificates_raw @@ -112,7 +113,8 @@ with SDK( | Error Type | Status Code | Content Type | | -------------------------- | -------------------------- | -------------------------- | | models.AuthenticationError | 401 | application/json | -| models.ErrorModel | 403, 404 | application/problem+json | +| models.ErrorModel | 400, 403, 404 | application/problem+json | +| models.ErrorModel | 500 | application/problem+json | | models.SDKError | 4XX, 5XX | \*/\* | ## get_certificate @@ -155,7 +157,8 @@ with SDK( | Error Type | Status Code | Content Type | | -------------------------- | -------------------------- | -------------------------- | | models.AuthenticationError | 401 | application/json | -| models.ErrorModel | 403, 404 | application/problem+json | +| models.ErrorModel | 400, 403, 404 | application/problem+json | +| models.ErrorModel | 500 | application/problem+json | | models.SDKError | 4XX, 5XX | \*/\* | ## get_certificate_raw @@ -198,7 +201,8 @@ with SDK( | Error Type | Status Code | Content Type | | -------------------------- | -------------------------- | -------------------------- | | models.AuthenticationError | 401 | application/json | -| models.ErrorModel | 403, 404 | application/problem+json | +| models.ErrorModel | 400, 403, 404 | application/problem+json | +| models.ErrorModel | 500 | application/problem+json | | models.SDKError | 4XX, 5XX | \*/\* | ## get_hosts @@ -247,7 +251,8 @@ with SDK( | Error Type | Status Code | Content Type | | -------------------------- | -------------------------- | -------------------------- | | models.AuthenticationError | 401 | application/json | -| models.ErrorModel | 403 | application/problem+json | +| models.ErrorModel | 400, 403, 404 | application/problem+json | +| models.ErrorModel | 500 | application/problem+json | | models.SDKError | 4XX, 5XX | \*/\* | ## get_host @@ -292,7 +297,8 @@ with SDK( | Error Type | Status Code | Content Type | | -------------------------- | -------------------------- | -------------------------- | | models.AuthenticationError | 401 | application/json | -| models.ErrorModel | 403, 404 | application/problem+json | +| models.ErrorModel | 400, 403, 404 | application/problem+json | +| models.ErrorModel | 500 | application/problem+json | | models.SDKError | 4XX, 5XX | \*/\* | ## get_host_timeline @@ -338,7 +344,8 @@ with SDK( | Error Type | Status Code | Content Type | | -------------------------- | -------------------------- | -------------------------- | | models.AuthenticationError | 401 | application/json | -| models.ErrorModel | 403 | application/problem+json | +| models.ErrorModel | 400, 403, 404 | application/problem+json | +| models.ErrorModel | 500 | application/problem+json | | models.SDKError | 4XX, 5XX | \*/\* | ## get_web_properties @@ -387,7 +394,8 @@ with SDK( | Error Type | Status Code | Content Type | | -------------------------- | -------------------------- | -------------------------- | | models.AuthenticationError | 401 | application/json | -| models.ErrorModel | 403 | application/problem+json | +| models.ErrorModel | 400, 403, 404 | application/problem+json | +| models.ErrorModel | 500 | application/problem+json | | models.SDKError | 4XX, 5XX | \*/\* | ## get_web_property @@ -432,7 +440,8 @@ with SDK( | Error Type | Status Code | Content Type | | -------------------------- | -------------------------- | -------------------------- | | models.AuthenticationError | 401 | application/json | -| models.ErrorModel | 403, 422 | application/problem+json | +| models.ErrorModel | 400, 403, 404, 422 | application/problem+json | +| models.ErrorModel | 500 | application/problem+json | | models.SDKError | 4XX, 5XX | \*/\* | ## create_tracked_scan @@ -482,7 +491,8 @@ with SDK( | Error Type | Status Code | Content Type | | -------------------------- | -------------------------- | -------------------------- | | models.AuthenticationError | 401 | application/json | -| models.ErrorModel | 403 | application/problem+json | +| models.ErrorModel | 400, 403, 422 | application/problem+json | +| models.ErrorModel | 500 | application/problem+json | | models.SDKError | 4XX, 5XX | \*/\* | ## get_tracked_scan @@ -525,7 +535,8 @@ with SDK( | Error Type | Status Code | Content Type | | -------------------------- | -------------------------- | -------------------------- | | models.AuthenticationError | 401 | application/json | -| models.ErrorModel | 403, 404 | application/problem+json | +| models.ErrorModel | 400, 403, 404 | application/problem+json | +| models.ErrorModel | 500 | application/problem+json | | models.SDKError | 4XX, 5XX | \*/\* | ## aggregate @@ -572,7 +583,8 @@ with SDK( | Error Type | Status Code | Content Type | | -------------------------- | -------------------------- | -------------------------- | | models.AuthenticationError | 401 | application/json | -| models.ErrorModel | 403, 422 | application/problem+json | +| models.ErrorModel | 400, 403, 422 | application/problem+json | +| models.ErrorModel | 500 | application/problem+json | | models.SDKError | 4XX, 5XX | \*/\* | ## convert_legacy_search_queries @@ -621,7 +633,7 @@ with SDK( | Error Type | Status Code | Content Type | | -------------------------- | -------------------------- | -------------------------- | | models.AuthenticationError | 401 | application/json | -| models.ErrorModel | 403 | application/problem+json | +| models.ErrorModel | 400, 403 | application/problem+json | | models.ErrorModel | 500 | application/problem+json | | models.SDKError | 4XX, 5XX | \*/\* | @@ -671,5 +683,6 @@ with SDK( | Error Type | Status Code | Content Type | | -------------------------- | -------------------------- | -------------------------- | | models.AuthenticationError | 401 | application/json | -| models.ErrorModel | 403 | application/problem+json | +| models.ErrorModel | 400, 403, 422 | application/problem+json | +| models.ErrorModel | 500 | application/problem+json | | models.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/threathunting/README.md b/docs/sdks/threathunting/README.md index 4d1b4e7..b700bf4 100644 --- a/docs/sdks/threathunting/README.md +++ b/docs/sdks/threathunting/README.md @@ -58,7 +58,8 @@ with SDK( | Error Type | Status Code | Content Type | | -------------------------- | -------------------------- | -------------------------- | | models.AuthenticationError | 401 | application/json | -| models.ErrorModel | 403 | application/problem+json | +| models.ErrorModel | 400, 403, 404 | application/problem+json | +| models.ErrorModel | 500 | application/problem+json | | models.SDKError | 4XX, 5XX | \*/\* | ## create_tracked_scan @@ -108,7 +109,8 @@ with SDK( | Error Type | Status Code | Content Type | | -------------------------- | -------------------------- | -------------------------- | | models.AuthenticationError | 401 | application/json | -| models.ErrorModel | 403 | application/problem+json | +| models.ErrorModel | 400, 403, 422 | application/problem+json | +| models.ErrorModel | 500 | application/problem+json | | models.SDKError | 4XX, 5XX | \*/\* | ## get_tracked_scan_threat_hunting @@ -151,7 +153,8 @@ with SDK( | Error Type | Status Code | Content Type | | -------------------------- | -------------------------- | -------------------------- | | models.AuthenticationError | 401 | application/json | -| models.ErrorModel | 403, 404 | application/problem+json | +| models.ErrorModel | 400, 403, 404 | application/problem+json | +| models.ErrorModel | 500 | application/problem+json | | models.SDKError | 4XX, 5XX | \*/\* | ## list_threats @@ -194,7 +197,8 @@ with SDK( | Error Type | Status Code | Content Type | | -------------------------- | -------------------------- | -------------------------- | | models.AuthenticationError | 401 | application/json | -| models.ErrorModel | 403, 422 | application/problem+json | +| models.ErrorModel | 400, 403, 422 | application/problem+json | +| models.ErrorModel | 500 | application/problem+json | | models.SDKError | 4XX, 5XX | \*/\* | ## value_counts @@ -251,5 +255,6 @@ with SDK( | Error Type | Status Code | Content Type | | -------------------------- | -------------------------- | -------------------------- | | models.AuthenticationError | 401 | application/json | -| models.ErrorModel | 403 | application/problem+json | +| models.ErrorModel | 400, 403, 422 | application/problem+json | +| models.ErrorModel | 500 | application/problem+json | | models.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/poetry.lock b/poetry.lock index 881b6f5..26973bd 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 2.3.1 and should not be changed by hand. +# This file is automatically @generated by Poetry 2.3.2 and should not be changed by hand. [[package]] name = "annotated-types" @@ -98,7 +98,7 @@ description = "Backport of PEP 654 (exception groups)" optional = false python-versions = ">=3.7" groups = ["main"] -markers = "python_version < \"3.11\"" +markers = "python_version == \"3.10\"" files = [ {file = "exceptiongroup-1.2.2-py3-none-any.whl", hash = "sha256:3111b9d131c238bec2f8f516e123e14ba243563fb135d3fe885990585aa7795b"}, {file = "exceptiongroup-1.2.2.tar.gz", hash = "sha256:47c2edf7c6738fafb49fd34290706d1a1a2f4d1c6df275526b62cbb4aa5393cc"}, @@ -462,7 +462,6 @@ mccabe = ">=0.6,<0.8" platformdirs = ">=2.2.0" tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} tomlkit = ">=0.10.1" -typing-extensions = {version = ">=3.10.0", markers = "python_version < \"3.10\""} [package.extras] spelling = ["pyenchant (>=3.2,<4.0)"] @@ -508,7 +507,7 @@ description = "A lil' TOML parser" optional = false python-versions = ">=3.8" groups = ["dev"] -markers = "python_version < \"3.11\"" +markers = "python_version == \"3.10\"" files = [ {file = "tomli-2.2.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:678e4fa69e4575eb77d103de3df8a895e1591b48e740211bd1067378c69e8249"}, {file = "tomli-2.2.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:023aa114dd824ade0100497eb2318602af309e5a55595f76b626d6d9f3b7b0a6"}, @@ -585,5 +584,5 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.1" -python-versions = ">=3.9.2" -content-hash = "c0dd101f07fb15e54d4562dfdf249e128fb9507759d84012283e316c226a3b8c" +python-versions = ">=3.10" +content-hash = "f6a8355b7012376d6650030a1b23aaf67653ed8ccc9eae2880ccb8d9a23e3d6b" diff --git a/pylintrc b/pylintrc index 451f601..5240af4 100644 --- a/pylintrc +++ b/pylintrc @@ -89,7 +89,7 @@ persistent=yes # Minimum Python version to use for version dependent checks. Will default to # the version used to run pylint. -py-version=3.9 +py-version=3.10 # Discover python modules and packages in the file system subtree. recursive=no diff --git a/pyproject.toml b/pyproject.toml index a39f186..6c35b32 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,11 +1,11 @@ [project] name = "censys-platform" -version = "0.12.4" +version = "0.13.0" description = "Python Client SDK Generated by Speakeasy." authors = [{ name = "Speakeasy" },] readme = "README-PYPI.md" -requires-python = ">=3.9.2" +requires-python = ">=3.10" dependencies = [ "httpcore >=1.0.9", "httpx >=0.28.1", diff --git a/src/censys_platform/_version.py b/src/censys_platform/_version.py index 3b6b423..e38ae2c 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.12.4" -__openapi_doc_version__: str = "1.0.71" -__gen_version__: str = "2.801.2" -__user_agent__: str = "speakeasy-sdk/python 0.12.4 2.801.2 1.0.71 censys-platform" +__version__: str = "0.13.0" +__openapi_doc_version__: str = "1.0.75" +__gen_version__: str = "2.824.1" +__user_agent__: str = "speakeasy-sdk/python 0.13.0 2.824.1 1.0.75 censys-platform" try: if __package__ is not None: diff --git a/src/censys_platform/account_management.py b/src/censys_platform/account_management.py index 97bdf5c..f75ccc6 100644 --- a/src/censys_platform/account_management.py +++ b/src/censys_platform/account_management.py @@ -98,7 +98,7 @@ def get_organization_details( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["401", "403", "404", "422", "4XX", "5XX"], + error_status_codes=["401", "403", "404", "422", "4XX", "500", "5XX"], retry_config=retry_config, ) @@ -120,6 +120,9 @@ def get_organization_details( ): 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) @@ -199,7 +202,7 @@ async def get_organization_details_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["401", "403", "404", "422", "4XX", "5XX"], + error_status_codes=["401", "403", "404", "422", "4XX", "500", "5XX"], retry_config=retry_config, ) @@ -221,6 +224,9 @@ async def get_organization_details_async( ): 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) @@ -297,7 +303,7 @@ def get_organization_credits( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["401", "403", "404", "422", "4XX", "5XX"], + error_status_codes=["401", "403", "404", "422", "4XX", "500", "5XX"], retry_config=retry_config, ) @@ -319,6 +325,9 @@ def get_organization_credits( ): 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) @@ -395,7 +404,7 @@ async def get_organization_credits_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["401", "403", "404", "422", "4XX", "5XX"], + error_status_codes=["401", "403", "404", "422", "4XX", "500", "5XX"], retry_config=retry_config, ) @@ -417,6 +426,9 @@ async def get_organization_credits_async( ): 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) @@ -498,7 +510,7 @@ def get_organization_credit_usage( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["400", "401", "403", "404", "422", "4XX", "5XX"], + error_status_codes=["400", "401", "403", "404", "422", "4XX", "500", "5XX"], retry_config=retry_config, ) @@ -520,6 +532,9 @@ def get_organization_credit_usage( ): 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) @@ -601,7 +616,7 @@ async def get_organization_credit_usage_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["400", "401", "403", "404", "422", "4XX", "5XX"], + error_status_codes=["400", "401", "403", "404", "422", "4XX", "500", "5XX"], retry_config=retry_config, ) @@ -623,6 +638,9 @@ async def get_organization_credit_usage_async( ): 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) @@ -717,7 +735,7 @@ def invite_user_to_organization( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["401", "403", "404", "422", "4XX", "5XX"], + error_status_codes=["401", "403", "404", "409", "422", "4XX", "500", "5XX"], retry_config=retry_config, ) @@ -732,10 +750,13 @@ def invite_user_to_organization( ) raise models.AuthenticationError(response_data, http_res) if utils.match_response( - http_res, ["403", "404", "422"], "application/problem+json" + http_res, ["403", "404", "409", "422"], "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) @@ -830,7 +851,7 @@ async def invite_user_to_organization_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["401", "403", "404", "422", "4XX", "5XX"], + error_status_codes=["401", "403", "404", "409", "422", "4XX", "500", "5XX"], retry_config=retry_config, ) @@ -845,10 +866,13 @@ async def invite_user_to_organization_async( ) raise models.AuthenticationError(response_data, http_res) if utils.match_response( - http_res, ["403", "404", "422"], "application/problem+json" + http_res, ["403", "404", "409", "422"], "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) @@ -931,7 +955,7 @@ def list_organization_members( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["401", "403", "404", "4XX", "5XX"], + error_status_codes=["401", "403", "404", "422", "4XX", "500", "5XX"], retry_config=retry_config, ) @@ -948,7 +972,12 @@ def list_organization_members( models.AuthenticationErrorData, http_res ) raise models.AuthenticationError(response_data, http_res) - if utils.match_response(http_res, ["403", "404"], "application/problem+json"): + if utils.match_response( + http_res, ["403", "404", "422"], "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", "*"): @@ -1033,7 +1062,7 @@ async def list_organization_members_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["401", "403", "404", "4XX", "5XX"], + error_status_codes=["401", "403", "404", "422", "4XX", "500", "5XX"], retry_config=retry_config, ) @@ -1050,7 +1079,12 @@ async def list_organization_members_async( models.AuthenticationErrorData, http_res ) raise models.AuthenticationError(response_data, http_res) - if utils.match_response(http_res, ["403", "404"], "application/problem+json"): + if utils.match_response( + http_res, ["403", "404", "422"], "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", "*"): @@ -1136,7 +1170,7 @@ def remove_organization_member( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["401", "403", "404", "409", "422", "4XX", "5XX"], + error_status_codes=["401", "403", "404", "409", "422", "4XX", "500", "5XX"], retry_config=retry_config, ) @@ -1155,6 +1189,9 @@ def remove_organization_member( ): 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) @@ -1238,7 +1275,7 @@ async def remove_organization_member_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["401", "403", "404", "409", "422", "4XX", "5XX"], + error_status_codes=["401", "403", "404", "409", "422", "4XX", "500", "5XX"], retry_config=retry_config, ) @@ -1257,6 +1294,9 @@ async def remove_organization_member_async( ): 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) @@ -1354,7 +1394,17 @@ def update_organization_member( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["400", "401", "403", "404", "422", "4XX", "5XX"], + error_status_codes=[ + "400", + "401", + "403", + "404", + "409", + "422", + "4XX", + "500", + "5XX", + ], retry_config=retry_config, ) @@ -1369,10 +1419,13 @@ def update_organization_member( ) raise models.AuthenticationError(response_data, http_res) if utils.match_response( - http_res, ["400", "403", "404", "422"], "application/problem+json" + http_res, ["400", "403", "404", "409", "422"], "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) @@ -1470,7 +1523,17 @@ async def update_organization_member_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["400", "401", "403", "404", "422", "4XX", "5XX"], + error_status_codes=[ + "400", + "401", + "403", + "404", + "409", + "422", + "4XX", + "500", + "5XX", + ], retry_config=retry_config, ) @@ -1485,10 +1548,13 @@ async def update_organization_member_async( ) raise models.AuthenticationError(response_data, http_res) if utils.match_response( - http_res, ["400", "403", "404", "422"], "application/problem+json" + http_res, ["400", "403", "404", "409", "422"], "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) @@ -1570,7 +1636,7 @@ def get_member_credit_usage( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["400", "401", "403", "404", "422", "4XX", "5XX"], + error_status_codes=["400", "401", "403", "404", "422", "4XX", "500", "5XX"], retry_config=retry_config, ) @@ -1592,6 +1658,9 @@ def get_member_credit_usage( ): 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) @@ -1673,7 +1742,7 @@ async def get_member_credit_usage_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["400", "401", "403", "404", "422", "4XX", "5XX"], + error_status_codes=["400", "401", "403", "404", "422", "4XX", "500", "5XX"], retry_config=retry_config, ) @@ -1695,6 +1764,9 @@ async def get_member_credit_usage_async( ): 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) @@ -1764,7 +1836,7 @@ def get_user_credits( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["401", "404", "4XX", "5XX"], + error_status_codes=["401", "404", "4XX", "500", "5XX"], retry_config=retry_config, ) @@ -1784,6 +1856,9 @@ def get_user_credits( if utils.match_response(http_res, "404", "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) @@ -1853,7 +1928,7 @@ async def get_user_credits_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["401", "404", "4XX", "5XX"], + error_status_codes=["401", "404", "4XX", "500", "5XX"], retry_config=retry_config, ) @@ -1873,6 +1948,9 @@ async def get_user_credits_async( if utils.match_response(http_res, "404", "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) @@ -1958,7 +2036,7 @@ def get_user_credits_usage( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["401", "404", "4XX", "5XX"], + error_status_codes=["400", "401", "404", "4XX", "500", "5XX"], retry_config=retry_config, ) @@ -1975,7 +2053,10 @@ def get_user_credits_usage( models.AuthenticationErrorData, http_res ) raise models.AuthenticationError(response_data, http_res) - if utils.match_response(http_res, "404", "application/problem+json"): + if utils.match_response(http_res, ["400", "404"], "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", "*"): @@ -2063,7 +2144,7 @@ async def get_user_credits_usage_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["401", "404", "4XX", "5XX"], + error_status_codes=["400", "401", "404", "4XX", "500", "5XX"], retry_config=retry_config, ) @@ -2080,7 +2161,10 @@ async def get_user_credits_usage_async( models.AuthenticationErrorData, http_res ) raise models.AuthenticationError(response_data, http_res) - if utils.match_response(http_res, "404", "application/problem+json"): + if utils.match_response(http_res, ["400", "404"], "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", "*"): diff --git a/src/censys_platform/collections.py b/src/censys_platform/collections.py index 23beebd..bb2bb50 100644 --- a/src/censys_platform/collections.py +++ b/src/censys_platform/collections.py @@ -93,7 +93,7 @@ def list( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["401", "403", "4XX", "5XX"], + error_status_codes=["400", "401", "403", "4XX", "500", "5XX"], retry_config=retry_config, ) @@ -110,7 +110,10 @@ def list( models.AuthenticationErrorData, http_res ) raise models.AuthenticationError(response_data, http_res) - if utils.match_response(http_res, "403", "application/problem+json"): + if utils.match_response(http_res, ["400", "403"], "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", "*"): @@ -198,7 +201,7 @@ async def list_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["401", "403", "4XX", "5XX"], + error_status_codes=["400", "401", "403", "4XX", "500", "5XX"], retry_config=retry_config, ) @@ -215,7 +218,10 @@ async def list_async( models.AuthenticationErrorData, http_res ) raise models.AuthenticationError(response_data, http_res) - if utils.match_response(http_res, "403", "application/problem+json"): + if utils.match_response(http_res, ["400", "403"], "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", "*"): @@ -311,7 +317,17 @@ def create( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["401", "403", "4XX", "5XX"], + error_status_codes=[ + "400", + "401", + "403", + "409", + "412", + "422", + "4XX", + "500", + "5XX", + ], retry_config=retry_config, ) @@ -328,7 +344,12 @@ def create( models.AuthenticationErrorData, http_res ) raise models.AuthenticationError(response_data, http_res) - if utils.match_response(http_res, "403", "application/problem+json"): + if utils.match_response( + http_res, ["400", "403", "409", "412", "422"], "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", "*"): @@ -424,7 +445,17 @@ async def create_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["401", "403", "4XX", "5XX"], + error_status_codes=[ + "400", + "401", + "403", + "409", + "412", + "422", + "4XX", + "500", + "5XX", + ], retry_config=retry_config, ) @@ -441,7 +472,12 @@ async def create_async( models.AuthenticationErrorData, http_res ) raise models.AuthenticationError(response_data, http_res) - if utils.match_response(http_res, "403", "application/problem+json"): + if utils.match_response( + http_res, ["400", "403", "409", "412", "422"], "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", "*"): @@ -530,7 +566,7 @@ def delete( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["401", "403", "404", "4XX", "5XX"], + error_status_codes=["400", "401", "403", "404", "4XX", "500", "5XX"], retry_config=retry_config, ) @@ -544,7 +580,12 @@ def delete( models.AuthenticationErrorData, http_res ) raise models.AuthenticationError(response_data, http_res) - if utils.match_response(http_res, ["403", "404"], "application/problem+json"): + if utils.match_response( + http_res, ["400", "403", "404"], "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", "*"): @@ -633,7 +674,7 @@ async def delete_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["401", "403", "404", "4XX", "5XX"], + error_status_codes=["400", "401", "403", "404", "4XX", "500", "5XX"], retry_config=retry_config, ) @@ -647,7 +688,12 @@ async def delete_async( models.AuthenticationErrorData, http_res ) raise models.AuthenticationError(response_data, http_res) - if utils.match_response(http_res, ["403", "404"], "application/problem+json"): + if utils.match_response( + http_res, ["400", "403", "404"], "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", "*"): @@ -732,7 +778,7 @@ def get( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["401", "403", "404", "4XX", "5XX"], + error_status_codes=["400", "401", "403", "404", "4XX", "500", "5XX"], retry_config=retry_config, ) @@ -749,7 +795,12 @@ def get( models.AuthenticationErrorData, http_res ) raise models.AuthenticationError(response_data, http_res) - if utils.match_response(http_res, ["403", "404"], "application/problem+json"): + if utils.match_response( + http_res, ["400", "403", "404"], "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", "*"): @@ -834,7 +885,7 @@ async def get_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["401", "403", "404", "4XX", "5XX"], + error_status_codes=["400", "401", "403", "404", "4XX", "500", "5XX"], retry_config=retry_config, ) @@ -851,7 +902,12 @@ async def get_async( models.AuthenticationErrorData, http_res ) raise models.AuthenticationError(response_data, http_res) - if utils.match_response(http_res, ["403", "404"], "application/problem+json"): + if utils.match_response( + http_res, ["400", "403", "404"], "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", "*"): @@ -950,7 +1006,7 @@ def update( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["401", "403", "404", "4XX", "5XX"], + error_status_codes=["400", "401", "403", "404", "412", "4XX", "500", "5XX"], retry_config=retry_config, ) @@ -967,7 +1023,12 @@ def update( models.AuthenticationErrorData, http_res ) raise models.AuthenticationError(response_data, http_res) - if utils.match_response(http_res, ["403", "404"], "application/problem+json"): + if utils.match_response( + http_res, ["400", "403", "404", "412"], "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", "*"): @@ -1066,7 +1127,7 @@ async def update_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["401", "403", "404", "4XX", "5XX"], + error_status_codes=["400", "401", "403", "404", "412", "4XX", "500", "5XX"], retry_config=retry_config, ) @@ -1083,7 +1144,12 @@ async def update_async( models.AuthenticationErrorData, http_res ) raise models.AuthenticationError(response_data, http_res) - if utils.match_response(http_res, ["403", "404"], "application/problem+json"): + if utils.match_response( + http_res, ["400", "403", "404", "412"], "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", "*"): @@ -1168,7 +1234,7 @@ def list_events( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["401", "403", "404", "4XX", "5XX"], + error_status_codes=["400", "401", "403", "404", "422", "4XX", "500", "5XX"], retry_config=retry_config, ) @@ -1185,7 +1251,12 @@ def list_events( models.AuthenticationErrorData, http_res ) raise models.AuthenticationError(response_data, http_res) - if utils.match_response(http_res, ["403", "404"], "application/problem+json"): + if utils.match_response( + http_res, ["400", "403", "404", "422"], "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", "*"): @@ -1270,7 +1341,7 @@ async def list_events_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["401", "403", "404", "4XX", "5XX"], + error_status_codes=["400", "401", "403", "404", "422", "4XX", "500", "5XX"], retry_config=retry_config, ) @@ -1287,7 +1358,12 @@ async def list_events_async( models.AuthenticationErrorData, http_res ) raise models.AuthenticationError(response_data, http_res) - if utils.match_response(http_res, ["403", "404"], "application/problem+json"): + if utils.match_response( + http_res, ["400", "403", "404", "422"], "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", "*"): @@ -1386,7 +1462,7 @@ def aggregate( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["401", "403", "404", "422", "4XX", "5XX"], + error_status_codes=["400", "401", "403", "404", "422", "4XX", "500", "5XX"], retry_config=retry_config, ) @@ -1404,10 +1480,13 @@ def aggregate( ) raise models.AuthenticationError(response_data, http_res) if utils.match_response( - http_res, ["403", "404", "422"], "application/problem+json" + http_res, ["400", "403", "404", "422"], "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) @@ -1504,7 +1583,7 @@ async def aggregate_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["401", "403", "404", "422", "4XX", "5XX"], + error_status_codes=["400", "401", "403", "404", "422", "4XX", "500", "5XX"], retry_config=retry_config, ) @@ -1522,10 +1601,13 @@ async def aggregate_async( ) raise models.AuthenticationError(response_data, http_res) if utils.match_response( - http_res, ["403", "404", "422"], "application/problem+json" + http_res, ["400", "403", "404", "422"], "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) @@ -1622,7 +1704,7 @@ def search( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["401", "403", "404", "4XX", "5XX"], + error_status_codes=["400", "401", "403", "404", "422", "4XX", "500", "5XX"], retry_config=retry_config, ) @@ -1639,7 +1721,12 @@ def search( models.AuthenticationErrorData, http_res ) raise models.AuthenticationError(response_data, http_res) - if utils.match_response(http_res, ["403", "404"], "application/problem+json"): + if utils.match_response( + http_res, ["400", "403", "404", "422"], "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", "*"): @@ -1738,7 +1825,7 @@ async def search_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["401", "403", "404", "4XX", "5XX"], + error_status_codes=["400", "401", "403", "404", "422", "4XX", "500", "5XX"], retry_config=retry_config, ) @@ -1755,7 +1842,12 @@ async def search_async( models.AuthenticationErrorData, http_res ) raise models.AuthenticationError(response_data, http_res) - if utils.match_response(http_res, ["403", "404"], "application/problem+json"): + if utils.match_response( + http_res, ["400", "403", "404", "422"], "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", "*"): diff --git a/src/censys_platform/global_data.py b/src/censys_platform/global_data.py index 80b1dda..6c2b623 100644 --- a/src/censys_platform/global_data.py +++ b/src/censys_platform/global_data.py @@ -97,7 +97,7 @@ def get_certificates( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["401", "403", "404", "4XX", "5XX"], + error_status_codes=["400", "401", "403", "404", "4XX", "500", "5XX"], retry_config=retry_config, ) @@ -116,7 +116,12 @@ def get_certificates( models.AuthenticationErrorData, http_res ) raise models.AuthenticationError(response_data, http_res) - if utils.match_response(http_res, ["403", "404"], "application/problem+json"): + if utils.match_response( + http_res, ["400", "403", "404"], "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", "*"): @@ -213,7 +218,7 @@ async def get_certificates_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["401", "403", "404", "4XX", "5XX"], + error_status_codes=["400", "401", "403", "404", "4XX", "500", "5XX"], retry_config=retry_config, ) @@ -232,7 +237,12 @@ async def get_certificates_async( models.AuthenticationErrorData, http_res ) raise models.AuthenticationError(response_data, http_res) - if utils.match_response(http_res, ["403", "404"], "application/problem+json"): + if utils.match_response( + http_res, ["400", "403", "404"], "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", "*"): @@ -329,7 +339,7 @@ def get_certificates_raw( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["401", "403", "404", "4XX", "5XX"], + error_status_codes=["400", "401", "403", "404", "4XX", "500", "5XX"], retry_config=retry_config, ) @@ -346,7 +356,12 @@ def get_certificates_raw( models.AuthenticationErrorData, http_res ) raise models.AuthenticationError(response_data, http_res) - if utils.match_response(http_res, ["403", "404"], "application/problem+json"): + if utils.match_response( + http_res, ["400", "403", "404"], "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", "*"): @@ -443,7 +458,7 @@ async def get_certificates_raw_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["401", "403", "404", "4XX", "5XX"], + error_status_codes=["400", "401", "403", "404", "4XX", "500", "5XX"], retry_config=retry_config, ) @@ -460,7 +475,12 @@ async def get_certificates_raw_async( models.AuthenticationErrorData, http_res ) raise models.AuthenticationError(response_data, http_res) - if utils.match_response(http_res, ["403", "404"], "application/problem+json"): + if utils.match_response( + http_res, ["400", "403", "404"], "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", "*"): @@ -545,7 +565,7 @@ def get_certificate( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["401", "403", "404", "4XX", "5XX"], + error_status_codes=["400", "401", "403", "404", "4XX", "500", "5XX"], retry_config=retry_config, ) @@ -564,7 +584,12 @@ def get_certificate( models.AuthenticationErrorData, http_res ) raise models.AuthenticationError(response_data, http_res) - if utils.match_response(http_res, ["403", "404"], "application/problem+json"): + if utils.match_response( + http_res, ["400", "403", "404"], "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", "*"): @@ -649,7 +674,7 @@ async def get_certificate_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["401", "403", "404", "4XX", "5XX"], + error_status_codes=["400", "401", "403", "404", "4XX", "500", "5XX"], retry_config=retry_config, ) @@ -668,7 +693,12 @@ async def get_certificate_async( models.AuthenticationErrorData, http_res ) raise models.AuthenticationError(response_data, http_res) - if utils.match_response(http_res, ["403", "404"], "application/problem+json"): + if utils.match_response( + http_res, ["400", "403", "404"], "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", "*"): @@ -753,7 +783,7 @@ def get_certificate_raw( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["401", "403", "404", "4XX", "5XX"], + error_status_codes=["400", "401", "403", "404", "4XX", "500", "5XX"], stream=True, retry_config=retry_config, ) @@ -769,7 +799,15 @@ def get_certificate_raw( models.AuthenticationErrorData, http_res, http_res_text ) raise models.AuthenticationError(response_data, http_res, http_res_text) - if utils.match_response(http_res, ["403", "404"], "application/problem+json"): + if utils.match_response( + http_res, ["400", "403", "404"], "application/problem+json" + ): + http_res_text = utils.stream_to_text(http_res) + response_data = unmarshal_json_response( + models.ErrorModelData, http_res, http_res_text + ) + raise models.ErrorModel(response_data, http_res, http_res_text) + if utils.match_response(http_res, "500", "application/problem+json"): http_res_text = utils.stream_to_text(http_res) response_data = unmarshal_json_response( models.ErrorModelData, http_res, http_res_text @@ -858,7 +896,7 @@ async def get_certificate_raw_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["401", "403", "404", "4XX", "5XX"], + error_status_codes=["400", "401", "403", "404", "4XX", "500", "5XX"], stream=True, retry_config=retry_config, ) @@ -874,7 +912,15 @@ async def get_certificate_raw_async( models.AuthenticationErrorData, http_res, http_res_text ) raise models.AuthenticationError(response_data, http_res, http_res_text) - if utils.match_response(http_res, ["403", "404"], "application/problem+json"): + if utils.match_response( + http_res, ["400", "403", "404"], "application/problem+json" + ): + http_res_text = await utils.stream_to_text_async(http_res) + response_data = unmarshal_json_response( + models.ErrorModelData, http_res, http_res_text + ) + raise models.ErrorModel(response_data, http_res, http_res_text) + if utils.match_response(http_res, "500", "application/problem+json"): http_res_text = await utils.stream_to_text_async(http_res) response_data = unmarshal_json_response( models.ErrorModelData, http_res, http_res_text @@ -974,7 +1020,7 @@ def get_hosts( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["401", "403", "4XX", "5XX"], + error_status_codes=["400", "401", "403", "404", "4XX", "500", "5XX"], retry_config=retry_config, ) @@ -993,7 +1039,12 @@ def get_hosts( models.AuthenticationErrorData, http_res ) raise models.AuthenticationError(response_data, http_res) - if utils.match_response(http_res, "403", "application/problem+json"): + if utils.match_response( + http_res, ["400", "403", "404"], "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", "*"): @@ -1089,7 +1140,7 @@ async def get_hosts_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["401", "403", "4XX", "5XX"], + error_status_codes=["400", "401", "403", "404", "4XX", "500", "5XX"], retry_config=retry_config, ) @@ -1108,7 +1159,12 @@ async def get_hosts_async( models.AuthenticationErrorData, http_res ) raise models.AuthenticationError(response_data, http_res) - if utils.match_response(http_res, "403", "application/problem+json"): + if utils.match_response( + http_res, ["400", "403", "404"], "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", "*"): @@ -1196,7 +1252,7 @@ def get_host( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["401", "403", "404", "4XX", "5XX"], + error_status_codes=["400", "401", "403", "404", "4XX", "500", "5XX"], retry_config=retry_config, ) @@ -1215,7 +1271,12 @@ def get_host( models.AuthenticationErrorData, http_res ) raise models.AuthenticationError(response_data, http_res) - if utils.match_response(http_res, ["403", "404"], "application/problem+json"): + if utils.match_response( + http_res, ["400", "403", "404"], "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", "*"): @@ -1303,7 +1364,7 @@ async def get_host_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["401", "403", "404", "4XX", "5XX"], + error_status_codes=["400", "401", "403", "404", "4XX", "500", "5XX"], retry_config=retry_config, ) @@ -1322,7 +1383,12 @@ async def get_host_async( models.AuthenticationErrorData, http_res ) raise models.AuthenticationError(response_data, http_res) - if utils.match_response(http_res, ["403", "404"], "application/problem+json"): + if utils.match_response( + http_res, ["400", "403", "404"], "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", "*"): @@ -1413,7 +1479,7 @@ def get_host_timeline( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["401", "403", "4XX", "5XX"], + error_status_codes=["400", "401", "403", "404", "4XX", "500", "5XX"], retry_config=retry_config, ) @@ -1432,7 +1498,12 @@ def get_host_timeline( models.AuthenticationErrorData, http_res ) raise models.AuthenticationError(response_data, http_res) - if utils.match_response(http_res, "403", "application/problem+json"): + if utils.match_response( + http_res, ["400", "403", "404"], "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", "*"): @@ -1523,7 +1594,7 @@ async def get_host_timeline_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["401", "403", "4XX", "5XX"], + error_status_codes=["400", "401", "403", "404", "4XX", "500", "5XX"], retry_config=retry_config, ) @@ -1542,7 +1613,12 @@ async def get_host_timeline_async( models.AuthenticationErrorData, http_res ) raise models.AuthenticationError(response_data, http_res) - if utils.match_response(http_res, "403", "application/problem+json"): + if utils.match_response( + http_res, ["400", "403", "404"], "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", "*"): @@ -1639,7 +1715,7 @@ def get_web_properties( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["401", "403", "4XX", "5XX"], + error_status_codes=["400", "401", "403", "404", "4XX", "500", "5XX"], retry_config=retry_config, ) @@ -1658,7 +1734,12 @@ def get_web_properties( models.AuthenticationErrorData, http_res ) raise models.AuthenticationError(response_data, http_res) - if utils.match_response(http_res, "403", "application/problem+json"): + if utils.match_response( + http_res, ["400", "403", "404"], "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", "*"): @@ -1755,7 +1836,7 @@ async def get_web_properties_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["401", "403", "4XX", "5XX"], + error_status_codes=["400", "401", "403", "404", "4XX", "500", "5XX"], retry_config=retry_config, ) @@ -1774,7 +1855,12 @@ async def get_web_properties_async( models.AuthenticationErrorData, http_res ) raise models.AuthenticationError(response_data, http_res) - if utils.match_response(http_res, "403", "application/problem+json"): + if utils.match_response( + http_res, ["400", "403", "404"], "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", "*"): @@ -1862,7 +1948,7 @@ def get_web_property( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["401", "403", "422", "4XX", "5XX"], + error_status_codes=["400", "401", "403", "404", "422", "4XX", "500", "5XX"], retry_config=retry_config, ) @@ -1881,7 +1967,12 @@ def get_web_property( models.AuthenticationErrorData, http_res ) raise models.AuthenticationError(response_data, http_res) - if utils.match_response(http_res, ["403", "422"], "application/problem+json"): + if utils.match_response( + http_res, ["400", "403", "404", "422"], "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", "*"): @@ -1969,7 +2060,7 @@ async def get_web_property_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["401", "403", "422", "4XX", "5XX"], + error_status_codes=["400", "401", "403", "404", "422", "4XX", "500", "5XX"], retry_config=retry_config, ) @@ -1988,7 +2079,12 @@ async def get_web_property_async( models.AuthenticationErrorData, http_res ) raise models.AuthenticationError(response_data, http_res) - if utils.match_response(http_res, ["403", "422"], "application/problem+json"): + if utils.match_response( + http_res, ["400", "403", "404", "422"], "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", "*"): @@ -2084,7 +2180,7 @@ def create_tracked_scan( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["401", "403", "4XX", "5XX"], + error_status_codes=["400", "401", "403", "422", "4XX", "500", "5XX"], retry_config=retry_config, ) @@ -2101,7 +2197,12 @@ def create_tracked_scan( models.AuthenticationErrorData, http_res ) raise models.AuthenticationError(response_data, http_res) - if utils.match_response(http_res, "403", "application/problem+json"): + if utils.match_response( + http_res, ["400", "403", "422"], "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", "*"): @@ -2197,7 +2298,7 @@ async def create_tracked_scan_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["401", "403", "4XX", "5XX"], + error_status_codes=["400", "401", "403", "422", "4XX", "500", "5XX"], retry_config=retry_config, ) @@ -2214,7 +2315,12 @@ async def create_tracked_scan_async( models.AuthenticationErrorData, http_res ) raise models.AuthenticationError(response_data, http_res) - if utils.match_response(http_res, "403", "application/problem+json"): + if utils.match_response( + http_res, ["400", "403", "422"], "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", "*"): @@ -2299,7 +2405,7 @@ def get_tracked_scan( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["401", "403", "404", "4XX", "5XX"], + error_status_codes=["400", "401", "403", "404", "4XX", "500", "5XX"], retry_config=retry_config, ) @@ -2318,7 +2424,12 @@ def get_tracked_scan( models.AuthenticationErrorData, http_res ) raise models.AuthenticationError(response_data, http_res) - if utils.match_response(http_res, ["403", "404"], "application/problem+json"): + if utils.match_response( + http_res, ["400", "403", "404"], "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", "*"): @@ -2403,7 +2514,7 @@ async def get_tracked_scan_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["401", "403", "404", "4XX", "5XX"], + error_status_codes=["400", "401", "403", "404", "4XX", "500", "5XX"], retry_config=retry_config, ) @@ -2422,7 +2533,12 @@ async def get_tracked_scan_async( models.AuthenticationErrorData, http_res ) raise models.AuthenticationError(response_data, http_res) - if utils.match_response(http_res, ["403", "404"], "application/problem+json"): + if utils.match_response( + http_res, ["400", "403", "404"], "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", "*"): @@ -2518,7 +2634,7 @@ def aggregate( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["401", "403", "422", "4XX", "5XX"], + error_status_codes=["400", "401", "403", "422", "4XX", "500", "5XX"], retry_config=retry_config, ) @@ -2535,7 +2651,12 @@ def aggregate( models.AuthenticationErrorData, http_res ) raise models.AuthenticationError(response_data, http_res) - if utils.match_response(http_res, ["403", "422"], "application/problem+json"): + if utils.match_response( + http_res, ["400", "403", "422"], "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", "*"): @@ -2631,7 +2752,7 @@ async def aggregate_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["401", "403", "422", "4XX", "5XX"], + error_status_codes=["400", "401", "403", "422", "4XX", "500", "5XX"], retry_config=retry_config, ) @@ -2648,7 +2769,12 @@ async def aggregate_async( models.AuthenticationErrorData, http_res ) raise models.AuthenticationError(response_data, http_res) - if utils.match_response(http_res, ["403", "422"], "application/problem+json"): + if utils.match_response( + http_res, ["400", "403", "422"], "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", "*"): @@ -2745,7 +2871,7 @@ def convert_legacy_search_queries( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["401", "403", "4XX", "500", "5XX"], + error_status_codes=["400", "401", "403", "4XX", "500", "5XX"], retry_config=retry_config, ) @@ -2762,7 +2888,7 @@ def convert_legacy_search_queries( models.AuthenticationErrorData, http_res ) raise models.AuthenticationError(response_data, http_res) - if utils.match_response(http_res, "403", "application/problem+json"): + if utils.match_response(http_res, ["400", "403"], "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"): @@ -2862,7 +2988,7 @@ async def convert_legacy_search_queries_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["401", "403", "4XX", "500", "5XX"], + error_status_codes=["400", "401", "403", "4XX", "500", "5XX"], retry_config=retry_config, ) @@ -2879,7 +3005,7 @@ async def convert_legacy_search_queries_async( models.AuthenticationErrorData, http_res ) raise models.AuthenticationError(response_data, http_res) - if utils.match_response(http_res, "403", "application/problem+json"): + if utils.match_response(http_res, ["400", "403"], "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"): @@ -2978,7 +3104,7 @@ def search( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["401", "403", "4XX", "5XX"], + error_status_codes=["400", "401", "403", "422", "4XX", "500", "5XX"], retry_config=retry_config, ) @@ -2995,7 +3121,12 @@ def search( models.AuthenticationErrorData, http_res ) raise models.AuthenticationError(response_data, http_res) - if utils.match_response(http_res, "403", "application/problem+json"): + if utils.match_response( + http_res, ["400", "403", "422"], "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", "*"): @@ -3091,7 +3222,7 @@ async def search_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["401", "403", "4XX", "5XX"], + error_status_codes=["400", "401", "403", "422", "4XX", "500", "5XX"], retry_config=retry_config, ) @@ -3108,7 +3239,12 @@ async def search_async( models.AuthenticationErrorData, http_res ) raise models.AuthenticationError(response_data, http_res) - if utils.match_response(http_res, "403", "application/problem+json"): + if utils.match_response( + http_res, ["400", "403", "422"], "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", "*"): diff --git a/src/censys_platform/models/__init__.py b/src/censys_platform/models/__init__.py index ab90863..795b3f7 100644 --- a/src/censys_platform/models/__init__.py +++ b/src/censys_platform/models/__init__.py @@ -365,6 +365,7 @@ from .fox import Fox, FoxTypedDict from .ftp import Ftp, FtpTypedDict from .gearman import Gearman, GearmanTypedDict + from .gemini import Gemini, GeminiTypedDict from .generalnames import GeneralNames, GeneralNamesTypedDict from .generalsubtreeip import GeneralSubtreeIP, GeneralSubtreeIPTypedDict from .graphql import Graphql, GraphqlTypedDict @@ -1708,6 +1709,8 @@ "FtpTypedDict", "Gearman", "GearmanTypedDict", + "Gemini", + "GeminiTypedDict", "GeneralNames", "GeneralNamesTypedDict", "GeneralSubtreeIP", @@ -3090,6 +3093,8 @@ "FtpTypedDict": ".ftp", "Gearman": ".gearman", "GearmanTypedDict": ".gearman", + "Gemini": ".gemini", + "GeminiTypedDict": ".gemini", "GeneralNames": ".generalnames", "GeneralNamesTypedDict": ".generalnames", "GeneralSubtreeIP": ".generalsubtreeip", diff --git a/src/censys_platform/models/elffile.py b/src/censys_platform/models/elffile.py index 0d436b8..9af18c6 100644 --- a/src/censys_platform/models/elffile.py +++ b/src/censys_platform/models/elffile.py @@ -42,3 +42,9 @@ def serialize_model(self, handler): m[k] = val return m + + +try: + ElfFile.model_rebuild() +except NameError: + pass diff --git a/src/censys_platform/models/gemini.py b/src/censys_platform/models/gemini.py new file mode 100644 index 0000000..4819249 --- /dev/null +++ b/src/censys_platform/models/gemini.py @@ -0,0 +1,40 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from censys_platform.types import BaseModel, UNSET_SENTINEL +from pydantic import model_serializer +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class GeminiTypedDict(TypedDict): + body: NotRequired[str] + client_cert_required: NotRequired[bool] + meta: NotRequired[str] + status_code: NotRequired[int] + + +class Gemini(BaseModel): + body: Optional[str] = None + + client_cert_required: Optional[bool] = None + + meta: Optional[str] = None + + status_code: Optional[int] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["body", "client_cert_required", "meta", "status_code"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + 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/ipmi_rmcpheader_messageclass.py b/src/censys_platform/models/ipmi_rmcpheader_messageclass.py index 1eaf013..e619e9a 100644 --- a/src/censys_platform/models/ipmi_rmcpheader_messageclass.py +++ b/src/censys_platform/models/ipmi_rmcpheader_messageclass.py @@ -47,3 +47,9 @@ def serialize_model(self, handler): m[k] = val return m + + +try: + IpmiRMCPHeaderMessageClass.model_rebuild() +except NameError: + pass diff --git a/src/censys_platform/models/rdate.py b/src/censys_platform/models/rdate.py index c3c6979..2a46676 100644 --- a/src/censys_platform/models/rdate.py +++ b/src/censys_platform/models/rdate.py @@ -30,3 +30,9 @@ def serialize_model(self, handler): m[k] = val return m + + +try: + Rdate.model_rebuild() +except NameError: + pass diff --git a/src/censys_platform/models/searchqueryinputbody.py b/src/censys_platform/models/searchqueryinputbody.py index c9986a4..ad572c5 100644 --- a/src/censys_platform/models/searchqueryinputbody.py +++ b/src/censys_platform/models/searchqueryinputbody.py @@ -19,7 +19,7 @@ class SearchQueryInputBodyTypedDict(TypedDict): fields: NotRequired[Nullable[List[str]]] r"""Specify fields to only return in the response. If you provide fields and omit `host.services.port`, `host.services.transport_protocol`, and `host.services.protocol`, then `matched_services` will not be returned in the response.""" page_size: NotRequired[Nullable[int]] - r"""amount of results to return per page""" + r"""Number of results to return to per page. The default and maximum is 100.""" page_token: NotRequired[str] r"""page token for the requested page of search results""" @@ -32,7 +32,7 @@ class SearchQueryInputBody(BaseModel): r"""Specify fields to only return in the response. If you provide fields and omit `host.services.port`, `host.services.transport_protocol`, and `host.services.protocol`, then `matched_services` will not be returned in the response.""" page_size: OptionalNullable[int] = UNSET - r"""amount of results to return per page""" + r"""Number of results to return to per page. The default and maximum is 100.""" page_token: Optional[str] = None r"""page token for the requested page of search results""" diff --git a/src/censys_platform/models/service.py b/src/censys_platform/models/service.py index 92db92f..5a83e65 100644 --- a/src/censys_platform/models/service.py +++ b/src/censys_platform/models/service.py @@ -36,6 +36,7 @@ from .fox import Fox, FoxTypedDict from .ftp import Ftp, FtpTypedDict from .gearman import Gearman, GearmanTypedDict +from .gemini import Gemini, GeminiTypedDict from .hajime import Hajime, HajimeTypedDict from .hidvertx import HidVertx, HidVertxTypedDict from .hikvision import Hikvision, HikvisionTypedDict @@ -188,6 +189,7 @@ class ServiceTypedDict(TypedDict): fox: NotRequired[FoxTypedDict] ftp: NotRequired[FtpTypedDict] gearman: NotRequired[GearmanTypedDict] + gemini: NotRequired[GeminiTypedDict] hajime: NotRequired[HajimeTypedDict] hardware: NotRequired[Nullable[List[AttributeTypedDict]]] hid_vertx: NotRequired[HidVertxTypedDict] @@ -363,6 +365,8 @@ class Service(BaseModel): gearman: Optional[Gearman] = None + gemini: Optional[Gemini] = None + hajime: Optional[Hajime] = None hardware: OptionalNullable[List[Attribute]] = UNSET @@ -615,6 +619,7 @@ def serialize_model(self, handler): "fox", "ftp", "gearman", + "gemini", "hajime", "hardware", "hid_vertx", diff --git a/src/censys_platform/models/servicescan.py b/src/censys_platform/models/servicescan.py index 4de276e..bf80247 100644 --- a/src/censys_platform/models/servicescan.py +++ b/src/censys_platform/models/servicescan.py @@ -33,6 +33,7 @@ from .fox import Fox, FoxTypedDict from .ftp import Ftp, FtpTypedDict from .gearman import Gearman, GearmanTypedDict +from .gemini import Gemini, GeminiTypedDict from .hajime import Hajime, HajimeTypedDict from .hidvertx import HidVertx, HidVertxTypedDict from .hikvision import Hikvision, HikvisionTypedDict @@ -175,6 +176,7 @@ class ServiceScanTypedDict(TypedDict): fox: NotRequired[FoxTypedDict] ftp: NotRequired[FtpTypedDict] gearman: NotRequired[GearmanTypedDict] + gemini: NotRequired[GeminiTypedDict] hajime: NotRequired[HajimeTypedDict] hid_vertx: NotRequired[HidVertxTypedDict] hikvision: NotRequired[HikvisionTypedDict] @@ -334,6 +336,8 @@ class ServiceScan(BaseModel): gearman: Optional[Gearman] = None + gemini: Optional[Gemini] = None + hajime: Optional[Hajime] = None hid_vertx: Optional[HidVertx] = None @@ -566,6 +570,7 @@ def serialize_model(self, handler): "fox", "ftp", "gearman", + "gemini", "hajime", "hid_vertx", "hikvision", diff --git a/src/censys_platform/models/snmp_engine.py b/src/censys_platform/models/snmp_engine.py index 53e78ba..7977e44 100644 --- a/src/censys_platform/models/snmp_engine.py +++ b/src/censys_platform/models/snmp_engine.py @@ -66,3 +66,9 @@ def serialize_model(self, handler): m[k] = val return m + + +try: + SnmpEngine.model_rebuild() +except NameError: + pass diff --git a/src/censys_platform/threat_hunting.py b/src/censys_platform/threat_hunting.py index 510c0e4..ea0e874 100644 --- a/src/censys_platform/threat_hunting.py +++ b/src/censys_platform/threat_hunting.py @@ -88,7 +88,7 @@ def get_host_observations_with_certificate( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["401", "403", "4XX", "5XX"], + error_status_codes=["400", "401", "403", "404", "4XX", "500", "5XX"], retry_config=retry_config, ) @@ -105,7 +105,12 @@ def get_host_observations_with_certificate( models.AuthenticationErrorData, http_res ) raise models.AuthenticationError(response_data, http_res) - if utils.match_response(http_res, "403", "application/problem+json"): + if utils.match_response( + http_res, ["400", "403", "404"], "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", "*"): @@ -194,7 +199,7 @@ async def get_host_observations_with_certificate_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["401", "403", "4XX", "5XX"], + error_status_codes=["400", "401", "403", "404", "4XX", "500", "5XX"], retry_config=retry_config, ) @@ -211,7 +216,12 @@ async def get_host_observations_with_certificate_async( models.AuthenticationErrorData, http_res ) raise models.AuthenticationError(response_data, http_res) - if utils.match_response(http_res, "403", "application/problem+json"): + if utils.match_response( + http_res, ["400", "403", "404"], "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", "*"): @@ -307,7 +317,7 @@ def create_tracked_scan( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["401", "403", "4XX", "5XX"], + error_status_codes=["400", "401", "403", "422", "4XX", "500", "5XX"], retry_config=retry_config, ) @@ -324,7 +334,12 @@ def create_tracked_scan( models.AuthenticationErrorData, http_res ) raise models.AuthenticationError(response_data, http_res) - if utils.match_response(http_res, "403", "application/problem+json"): + if utils.match_response( + http_res, ["400", "403", "422"], "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", "*"): @@ -420,7 +435,7 @@ async def create_tracked_scan_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["401", "403", "4XX", "5XX"], + error_status_codes=["400", "401", "403", "422", "4XX", "500", "5XX"], retry_config=retry_config, ) @@ -437,7 +452,12 @@ async def create_tracked_scan_async( models.AuthenticationErrorData, http_res ) raise models.AuthenticationError(response_data, http_res) - if utils.match_response(http_res, "403", "application/problem+json"): + if utils.match_response( + http_res, ["400", "403", "422"], "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", "*"): @@ -522,7 +542,7 @@ def get_tracked_scan_threat_hunting( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["401", "403", "404", "4XX", "5XX"], + error_status_codes=["400", "401", "403", "404", "4XX", "500", "5XX"], retry_config=retry_config, ) @@ -541,7 +561,12 @@ def get_tracked_scan_threat_hunting( models.AuthenticationErrorData, http_res ) raise models.AuthenticationError(response_data, http_res) - if utils.match_response(http_res, ["403", "404"], "application/problem+json"): + if utils.match_response( + http_res, ["400", "403", "404"], "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", "*"): @@ -626,7 +651,7 @@ async def get_tracked_scan_threat_hunting_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["401", "403", "404", "4XX", "5XX"], + error_status_codes=["400", "401", "403", "404", "4XX", "500", "5XX"], retry_config=retry_config, ) @@ -645,7 +670,12 @@ async def get_tracked_scan_threat_hunting_async( models.AuthenticationErrorData, http_res ) raise models.AuthenticationError(response_data, http_res) - if utils.match_response(http_res, ["403", "404"], "application/problem+json"): + if utils.match_response( + http_res, ["400", "403", "404"], "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", "*"): @@ -730,7 +760,7 @@ def list_threats( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["401", "403", "422", "4XX", "5XX"], + error_status_codes=["400", "401", "403", "422", "4XX", "500", "5XX"], retry_config=retry_config, ) @@ -747,7 +777,12 @@ def list_threats( models.AuthenticationErrorData, http_res ) raise models.AuthenticationError(response_data, http_res) - if utils.match_response(http_res, ["403", "422"], "application/problem+json"): + if utils.match_response( + http_res, ["400", "403", "422"], "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", "*"): @@ -832,7 +867,7 @@ async def list_threats_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["401", "403", "422", "4XX", "5XX"], + error_status_codes=["400", "401", "403", "422", "4XX", "500", "5XX"], retry_config=retry_config, ) @@ -849,7 +884,12 @@ async def list_threats_async( models.AuthenticationErrorData, http_res ) raise models.AuthenticationError(response_data, http_res) - if utils.match_response(http_res, ["403", "422"], "application/problem+json"): + if utils.match_response( + http_res, ["400", "403", "422"], "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", "*"): @@ -946,7 +986,7 @@ def value_counts( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["401", "403", "4XX", "5XX"], + error_status_codes=["400", "401", "403", "422", "4XX", "500", "5XX"], retry_config=retry_config, ) @@ -963,7 +1003,12 @@ def value_counts( models.AuthenticationErrorData, http_res ) raise models.AuthenticationError(response_data, http_res) - if utils.match_response(http_res, "403", "application/problem+json"): + if utils.match_response( + http_res, ["400", "403", "422"], "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", "*"): @@ -1060,7 +1105,7 @@ async def value_counts_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["401", "403", "4XX", "5XX"], + error_status_codes=["400", "401", "403", "422", "4XX", "500", "5XX"], retry_config=retry_config, ) @@ -1077,7 +1122,12 @@ async def value_counts_async( models.AuthenticationErrorData, http_res ) raise models.AuthenticationError(response_data, http_res) - if utils.match_response(http_res, "403", "application/problem+json"): + if utils.match_response( + http_res, ["400", "403", "422"], "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", "*"): diff --git a/src/censys_platform/utils/__init__.py b/src/censys_platform/utils/__init__.py index c906e1e..15394a0 100644 --- a/src/censys_platform/utils/__init__.py +++ b/src/censys_platform/utils/__init__.py @@ -11,10 +11,7 @@ async def run_sync_in_thread(func: Callable[..., _T], *args) -> _T: """Run a synchronous function in a thread pool to avoid blocking the event loop.""" - if sys.version_info >= (3, 9): - return await asyncio.to_thread(func, *args) - loop = asyncio.get_event_loop() - return await loop.run_in_executor(None, func, *args) + return await asyncio.to_thread(func, *args) if TYPE_CHECKING: diff --git a/src/censys_platform/utils/eventstreaming.py b/src/censys_platform/utils/eventstreaming.py index 0969899..f2052fc 100644 --- a/src/censys_platform/utils/eventstreaming.py +++ b/src/censys_platform/utils/eventstreaming.py @@ -2,7 +2,9 @@ import re import json +from dataclasses import dataclass, asdict from typing import ( + Any, Callable, Generic, TypeVar, @@ -22,6 +24,7 @@ class EventStream(Generic[T]): client_ref: Optional[object] response: httpx.Response generator: Generator[T, None, None] + _closed: bool def __init__( self, @@ -33,17 +36,21 @@ def __init__( self.response = response self.generator = stream_events(response, decoder, sentinel) self.client_ref = client_ref + self._closed = False def __iter__(self): return self def __next__(self): + if self._closed: + raise StopIteration return next(self.generator) def __enter__(self): return self def __exit__(self, exc_type, exc_val, exc_tb): + self._closed = True self.response.close() @@ -53,6 +60,7 @@ class EventStreamAsync(Generic[T]): client_ref: Optional[object] response: httpx.Response generator: AsyncGenerator[T, None] + _closed: bool def __init__( self, @@ -64,33 +72,45 @@ def __init__( self.response = response self.generator = stream_events_async(response, decoder, sentinel) self.client_ref = client_ref + self._closed = False def __aiter__(self): return self async def __anext__(self): + if self._closed: + raise StopAsyncIteration return await self.generator.__anext__() async def __aenter__(self): return self async def __aexit__(self, exc_type, exc_val, exc_tb): + self._closed = True await self.response.aclose() +@dataclass class ServerEvent: id: Optional[str] = None event: Optional[str] = None - data: Optional[str] = None + data: Any = None retry: Optional[int] = None MESSAGE_BOUNDARIES = [ b"\r\n\r\n", - b"\n\n", + b"\r\n\r", + b"\r\n\n", + b"\r\r\n", + b"\n\r\n", b"\r\r", + b"\n\r", + b"\n\n", ] +UTF8_BOM = b"\xef\xbb\xbf" + async def stream_events_async( response: httpx.Response, @@ -99,14 +119,10 @@ async def stream_events_async( ) -> AsyncGenerator[T, None]: buffer = bytearray() position = 0 - discard = False + event_id: Optional[str] = None async for chunk in response.aiter_bytes(): - # We've encountered the sentinel value and should no longer process - # incoming data. Instead we throw new data away until the server closes - # the connection. - if discard: - continue - + 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] @@ -121,15 +137,22 @@ async def stream_events_async( block = buffer[position:i] position = i + len(seq) - event, discard = _parse_event(block, decoder, sentinel) + event, discard, event_id = _parse_event( + raw=block, decoder=decoder, sentinel=sentinel, event_id=event_id + ) 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(buffer, decoder, sentinel) + event, discard, _ = _parse_event( + raw=buffer, decoder=decoder, sentinel=sentinel, event_id=event_id + ) if event is not None: yield event @@ -141,14 +164,10 @@ def stream_events( ) -> Generator[T, None, None]: buffer = bytearray() position = 0 - discard = False + event_id: Optional[str] = None for chunk in response.iter_bytes(): - # We've encountered the sentinel value and should no longer process - # incoming data. Instead we throw new data away until the server closes - # the connection. - if discard: - continue - + 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] @@ -163,22 +182,33 @@ def stream_events( block = buffer[position:i] position = i + len(seq) - event, discard = _parse_event(block, decoder, sentinel) + event, discard, event_id = _parse_event( + raw=block, decoder=decoder, sentinel=sentinel, event_id=event_id + ) if event is not None: yield event + if discard: + response.close() + return if position > 0: buffer = buffer[position:] position = 0 - event, discard = _parse_event(buffer, decoder, sentinel) + event, discard, _ = _parse_event( + raw=buffer, decoder=decoder, sentinel=sentinel, event_id=event_id + ) if event is not None: yield event def _parse_event( - raw: bytearray, decoder: Callable[[str], T], sentinel: Optional[str] = None -) -> Tuple[Optional[T], bool]: + *, + raw: bytearray, + decoder: Callable[[str], T], + sentinel: Optional[str] = None, + event_id: Optional[str] = None, +) -> Tuple[Optional[T], bool, Optional[str]]: block = raw.decode() lines = re.split(r"\r?\n|\r", block) publish = False @@ -189,13 +219,16 @@ def _parse_event( continue delim = line.find(":") - if delim <= 0: + if delim == 0: continue - field = line[0:delim] - value = line[delim + 1 :] if delim < len(line) - 1 else "" - if len(value) and value[0] == " ": - value = value[1:] + field = line + value = "" + if delim > 0: + field = line[0:delim] + value = line[delim + 1 :] if delim < len(line) - 1 else "" + if len(value) and value[0] == " ": + value = value[1:] if field == "event": event.event = value @@ -204,37 +237,36 @@ def _parse_event( data += value + "\n" publish = True elif field == "id": - event.id = value publish = True + if "\x00" not in value: + event_id = value elif field == "retry": - event.retry = int(value) if value.isdigit() else None + if value.isdigit(): + event.retry = int(value) publish = True + event.id = event_id + if sentinel and data == f"{sentinel}\n": - return None, True + return None, True, event_id if data: data = data[:-1] - event.data = data - - data_is_primitive = ( - data.isnumeric() or data == "true" or data == "false" or data == "null" - ) - data_is_json = ( - data.startswith("{") or data.startswith("[") or data.startswith('"') - ) - - if data_is_primitive or data_is_json: - try: - event.data = json.loads(data) - except Exception: - pass + try: + event.data = json.loads(data) + except json.JSONDecodeError: + event.data = data out = None if publish: - out = decoder(json.dumps(event.__dict__)) - - return out, False + out_dict = { + k: v + for k, v in asdict(event).items() + if v is not None or (k == "data" and data) + } + out = decoder(json.dumps(out_dict)) + + return out, False, event_id def _peek_sequence(position: int, buffer: bytearray, sequence: bytes): diff --git a/src/censys_platform/utils/security.py b/src/censys_platform/utils/security.py index 295a3f4..17996bd 100644 --- a/src/censys_platform/utils/security.py +++ b/src/censys_platform/utils/security.py @@ -135,6 +135,8 @@ def _parse_security_scheme_value( elif scheme_type == "http": if sub_type == "bearer": headers[header_name] = _apply_bearer(value) + elif sub_type == "basic": + headers[header_name] = value elif sub_type == "custom": return else: From 359b9acea33811d61c424d043eaaac97f3d55e9c Mon Sep 17 00:00:00 2001 From: "speakeasy-github[bot]" <128539517+speakeasy-github[bot]@users.noreply.github.com> Date: Sun, 15 Feb 2026 00:41:20 +0000 Subject: [PATCH 2/2] empty commit to trigger [run-tests] workflow