diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 6de3106..e9410fd 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,19 +1,19 @@ lockVersion: 2.0.0 id: 5ca2c9b7-aea6-4a23-a631-998fcc6c18a8 management: - docChecksum: f11f36a009a350c23dcc79ac36737159 - docVersion: 1.0.123 + docChecksum: 675728091831dc0dbf72fdee4fb1bb47 + docVersion: 1.0.124 speakeasyVersion: 1.791.0 generationVersion: 2.924.0 - releaseVersion: 0.15.3 - configChecksum: 76b6e73c1f704f2c5293009b43c95301 + releaseVersion: 0.15.4 + configChecksum: d5ae22d28bb3a7fb9b9c681be320d735 repoURL: https://github.com/censys/censys-sdk-python.git installationURL: https://github.com/censys/censys-sdk-python.git published: true persistentEdits: - generation_id: bb18d464-2e7e-4f1c-bc80-035b1daa1919 - pristine_commit_hash: ff48fec86363556fccbc246893338772e96ef48e - pristine_tree_hash: 3d32e35c0c7609efca949660ac45ccd97dcd971d + generation_id: 2f0431aa-3000-4ac5-b6b1-c9ec50fa7561 + pristine_commit_hash: 83abdecf0a65c463f6418a7bbc0035c929530e62 + pristine_tree_hash: 08041bb44a1ce5e65f1ceb77d6334b1e7cbc18fe features: python: acceptHeaders: 3.0.0 @@ -2388,6 +2388,10 @@ trackedFiles: id: 5734dc75b40e last_write_checksum: sha1:81dc29d5924d84c98e84ea938a9192b74cf01629 pristine_git_object: c9bfaa8efa5cc9590171dfefcb5e3d9b4a7f3b61 + docs/models/responseenvelopewebpropertytimeline.md: + id: 89f5c4fda4e5 + last_write_checksum: sha1:baeedbc736ddb5fd552160d6a80c1324607f100d + pristine_git_object: 776f5914386b604a9de906b389a173c005dee846 docs/models/reversednsresolved.md: id: 0292fc82f4b5 last_write_checksum: sha1:818c4f166e067f42cb588d689efca00fd60423ec @@ -3496,6 +3500,18 @@ trackedFiles: id: f722e221bc3d last_write_checksum: sha1:d6cbfe0b421e8d6d41854aa4b6814778a39887f6 pristine_git_object: 392e67a3c738dd0d034e495d7a9c394fd47cc991 + docs/models/v3globaldataassetwebpropertytimelineglobals.md: + id: 9dc85a7d9014 + last_write_checksum: sha1:9b073255aaf42da946a661047bbebe7af37ae6f6 + pristine_git_object: 884a3486a76bbc6b5403d5e3d2b5cfa379f037ed + docs/models/v3globaldataassetwebpropertytimelinerequest.md: + id: f6074ba2dbbe + last_write_checksum: sha1:f4085b1fca12ebd24e17b1492d736bf892adfa24 + pristine_git_object: 4fdfad9870bf0bc3eba860c852a14687e7a7e21b + docs/models/v3globaldataassetwebpropertytimelineresponse.md: + id: f8ac8284e9dc + last_write_checksum: sha1:614cad2e6818410e72af7dd5d5788804ff37e47d + pristine_git_object: e6152fe41826fb692bfed1920573f92b2127cdb7 docs/models/v3globaldatadnsipresolutionboundglobals.md: id: 1dffee6d777d last_write_checksum: sha1:034ef83a5cff5c33b1d3a044f33a8fdcbd56705c @@ -3988,6 +4004,18 @@ trackedFiles: id: 41cd8d84cf7e last_write_checksum: sha1:5cccfe244d87e54f8c3bf3da8cac966d24728aa1 pristine_git_object: 97cfaf766a46f71c653ae70a81604e52e727cf35 + docs/models/webpropertytimeline.md: + id: 1bc39d491f33 + last_write_checksum: sha1:3abdf5759701f29281bcffd35cdfe6350c8bfae0 + pristine_git_object: e569d42bed922f0275dd413c36fce6020383c2d4 + docs/models/webtimelineevent.md: + id: 2f2eb33a9b7c + last_write_checksum: sha1:9fbfffe582a478f8b3c7a2bb6350284bce740f71 + pristine_git_object: 5785c72e919d79e2b8279bfd782c4a3b4709c231 + docs/models/webtimelineeventasset.md: + id: 274cd7c323cc + last_write_checksum: sha1:865bea53c5349a3a70ddef3248832e54944bd533 + pristine_git_object: 6c953d86ab0fd9b0fbbac326d026c32a5bf3cbf1 docs/models/whois.md: id: 8cf5e40cc0f3 last_write_checksum: sha1:4327667872a5f4a399ccf76db59491336090bede @@ -4050,8 +4078,8 @@ trackedFiles: pristine_git_object: 7c00028bb7ac927b2a2a51c23903759c44d6207c docs/sdks/globaldata/README.md: id: 0c68886632e6 - last_write_checksum: sha1:dec8d76f7251bbdfe8fca0193d5be882d2e4644b - pristine_git_object: 3c074e4fd1632366e188b5f234d4d8dc6d9806d6 + last_write_checksum: sha1:c6e5fb19bc9c93678901ea8327044fcf041e28a8 + pristine_git_object: 4a61b053515ebea6064242dc6f5fadbc84701570 docs/sdks/tagsandcomments/README.md: id: 092d693513d0 last_write_checksum: sha1:10248efb939c1a4d162c667daf867564492d9250 @@ -4074,8 +4102,8 @@ trackedFiles: pristine_git_object: bfd8691be4b4b5ee9f2c4baf849970d807ade207 pyproject.toml: id: 5d07e7d72637 - last_write_checksum: sha1:78c0070191a5fe45d774d526befab375baa97a49 - pristine_git_object: 87426efb4c748dc59ac32f2ff03c68a0949eda2e + last_write_checksum: sha1:9d8d8abcaa516e198c029e4fc700f3c4761a3afa + pristine_git_object: b4d78043291d16312b155f46550008605cc1d0a1 scripts/prepare_readme.py: id: e0c5957a6035 last_write_checksum: sha1:10d6ae008b24c68e99d7e8ba9c2e747070685ead @@ -4102,8 +4130,8 @@ trackedFiles: pristine_git_object: ec32aa84954b1a51f33327002cacd727eb9ab81e src/censys_platform/_version.py: id: d2dc39704c23 - last_write_checksum: sha1:5de518fc0239483c03d187e20f7dddda37358518 - pristine_git_object: 94757b6db7e164cd3efde4a98309f160cf614e12 + last_write_checksum: sha1:137dcb893b993844ebdc8925ed6ff1c3f03c9c86 + pristine_git_object: 3bc5c856313eafaf95b2569bd50ec8d1b9e31bf4 src/censys_platform/account_management.py: id: 09993862b047 last_write_checksum: sha1:bd19db50cb8a422da287a12730ebd3520de2d4ee @@ -4122,16 +4150,16 @@ trackedFiles: pristine_git_object: 6a3f9934fb892e840d0b61300ac27d8a2e53624a src/censys_platform/global_data.py: id: 0eedbf9a2038 - last_write_checksum: sha1:f3b4b72c915b2c6d8d50290e44321dc9c184f1b8 - pristine_git_object: 02ad99b51b63241c92985d6306e4662f62f80fcb + last_write_checksum: sha1:ea4d80f9aeb481bfc01e640a2d7a1fd1923f15be + pristine_git_object: 436e83850b6657043d1526999a9d1ddc4080bd08 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:dedd55e6fe46910543daeb6d02e453935bcc2369 - pristine_git_object: 49c88356a2bf458a13131fecf37cf2ffe6d4a879 + last_write_checksum: sha1:17819f62fa748f1d40a91092b74700a2d4d59b7d + pristine_git_object: 59cfb385298a0106f216b356dab08b2269df566e src/censys_platform/models/activemq.py: id: c852b87bc559 last_write_checksum: sha1:a754dc1ce0647be6304994e4c598c533e0db974e @@ -6244,6 +6272,10 @@ trackedFiles: id: f9b99fb3688b last_write_checksum: sha1:366cfd90bd0e02a453b2fb7a3dc99642272865c1 pristine_git_object: cb1bae2c452ecfa962a0f9970a1199124461fbfc + src/censys_platform/models/responseenvelopewebpropertytimeline.py: + id: 8ae9ed108f65 + last_write_checksum: sha1:25ef0a7db3753c88d841ebaa22d67ded0887d4a8 + pristine_git_object: f130e27b6e8ac54e435a0d2f8b317d4bdff607bd src/censys_platform/models/responsevalidationerror.py: id: 6b2931513e38 last_write_checksum: sha1:aebc366c848aecbde4b9041d45b18a993b8a12a8 @@ -6992,6 +7024,10 @@ trackedFiles: id: c685301403e0 last_write_checksum: sha1:58815bb1faf4748ce00e49255a1a3471da40c299 pristine_git_object: 4303d552ad60feeeaabc44b9e902e88c870196ea + src/censys_platform/models/v3_globaldata_asset_webproperty_timelineop.py: + id: 3405c703d49e + last_write_checksum: sha1:8d7782f3ed6f7e5d803b6c39e944105dd97372c7 + pristine_git_object: 317f10aeaa2e1e7a669a3031213eeee2149509b6 src/censys_platform/models/v3_globaldata_asset_webpropertyop.py: id: 1c3e75b528e2 last_write_checksum: sha1:17eca54d0bd32e28ce9a55842284ec3978692a0d @@ -7180,6 +7216,18 @@ trackedFiles: id: 394f87dd6c6c last_write_checksum: sha1:ed22af90d1bb3caddbc37afebef9b72ec737a25d pristine_git_object: eee8bfa0a9b97e6038c7a534ab43395c7874cfcc + src/censys_platform/models/webpropertytimeline.py: + id: 2c3784044d4c + last_write_checksum: sha1:5c67840860a4fa6a5e6f1cee07bb803d3ebe9841 + pristine_git_object: cd61310aa6810fc7185b579dbf2f0e5df3c08bbc + src/censys_platform/models/webtimelineevent.py: + id: 0e7bc4d14677 + last_write_checksum: sha1:a0f66e5c3d6e882b2826b82bdb0d24e527b2760c + pristine_git_object: 4765ba8b2f58275b924377a3dee7cfcf0364ff0b + src/censys_platform/models/webtimelineeventasset.py: + id: 4b7973aa7d0b + last_write_checksum: sha1:6f090f2ce41ed3b7e0acf35c6fe302711eee69d8 + pristine_git_object: d05c40ff8b2ecda29394b886131bd583196aea2c src/censys_platform/models/whois.py: id: 9478e226ecc1 last_write_checksum: sha1:2b4d4107e9d663c36a5399d056ec9a02ba43e6e0 @@ -8542,6 +8590,23 @@ examples: application/problem+json: {"detail": "Property foo is required but is missing.", "instance": "https://example.com/error-log/abc123", "status": 400, "title": "Bad Request", "type": "https://example.com/errors/example"} "500": application/problem+json: {"detail": "Property foo is required but is missing.", "instance": "https://example.com/error-log/abc123", "status": 400, "title": "Bad Request", "type": "https://example.com/errors/example"} + v3-globaldata-asset-webproperty-timeline: + speakeasy-default-v3-globaldata-asset-webproperty-timeline: + parameters: + path: + webproperty_id: "platform.censys.io:80" + query: + start_time: "2025-01-02T00:00:00Z" + end_time: "2025-01-01T00:00:00Z" + responses: + "200": + application/vnd.censys.api.v3.web_timeline_event.v1+json: {} + "401": + application/json: {"error": {"code": 401, "message": "Access credentials are invalid", "reason": "Access token is not active", "status": "Unauthorized"}} + "400": + application/problem+json: {"detail": "Property foo is required but is missing.", "instance": "https://example.com/error-log/abc123", "status": 400, "title": "Bad Request", "type": "https://example.com/errors/example"} + "500": + application/problem+json: {"detail": "Property foo is required but is missing.", "instance": "https://example.com/error-log/abc123", "status": 400, "title": "Bad Request", "type": "https://example.com/errors/example"} examplesVersion: 1.0.2 generatedTests: {} generatedFiles: diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index e73efaa..ee340a6 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -29,7 +29,7 @@ generation: generateNewTests: false skipResponseBodyAssertions: false python: - version: 0.15.3 + version: 0.15.4 additionalDependencies: dev: {} main: {} diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 217c1aa..b5bb113 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -2,19 +2,19 @@ speakeasyVersion: 1.791.0 sources: converge-source: sourceNamespace: converge-source - sourceRevisionDigest: sha256:c6bbfcffb80dc5339fc751fa8c8207aca607fde4708d6683f4afa20bbcc5eb3e - sourceBlobDigest: sha256:38a565fb51d9910a2fdb0f3821dfa0a3ba9d6db6fdbc4259c594d0c27d7bf892 + sourceRevisionDigest: sha256:90529c03d3b04235f84af38090546d2b68694954253d5908f4758875f555910c + sourceBlobDigest: sha256:be5af8ccca1c0834d667b936514f8f4dc3ea6b1d1456c2fdff3709911e644191 tags: - latest - - 1.0.123 + - 1.0.124 targets: censys-sdk-python: source: converge-source sourceNamespace: converge-source - sourceRevisionDigest: sha256:c6bbfcffb80dc5339fc751fa8c8207aca607fde4708d6683f4afa20bbcc5eb3e - sourceBlobDigest: sha256:38a565fb51d9910a2fdb0f3821dfa0a3ba9d6db6fdbc4259c594d0c27d7bf892 + sourceRevisionDigest: sha256:90529c03d3b04235f84af38090546d2b68694954253d5908f4758875f555910c + sourceBlobDigest: sha256:be5af8ccca1c0834d667b936514f8f4dc3ea6b1d1456c2fdff3709911e644191 codeSamplesNamespace: converge-source-python-code-samples - codeSamplesRevisionDigest: sha256:77af15b1acd8a634e9331219a5e6f5b85943cabb65b646383a822c92c248c6d7 + codeSamplesRevisionDigest: sha256:8c3f4f5a812749b04738a015b862da93cdfb1c64c5901078182a7845bfdb6009 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/README-PYPI.md b/README-PYPI.md index 352eb9f..09843d2 100644 --- a/README-PYPI.md +++ b/README-PYPI.md @@ -225,6 +225,7 @@ asyncio.run(main()) * [get_host_timeline](https://github.com/censys/censys-sdk-python/blob/master/docs/sdks/globaldata/README.md#get_host_timeline) - Get host event history * [get_web_properties](https://github.com/censys/censys-sdk-python/blob/master/docs/sdks/globaldata/README.md#get_web_properties) - Retrieve multiple web properties * [get_web_property](https://github.com/censys/censys-sdk-python/blob/master/docs/sdks/globaldata/README.md#get_web_property) - Get a web property +* [get_web_property_timeline](https://github.com/censys/censys-sdk-python/blob/master/docs/sdks/globaldata/README.md#get_web_property_timeline) - Get web property event history * [list_dns_ip_resolution_bounds](https://github.com/censys/censys-sdk-python/blob/master/docs/sdks/globaldata/README.md#list_dns_ip_resolution_bounds) - Get DNS names that resolved to an IP (aggregated bounds) * [list_dns_ip_resolution_ranges](https://github.com/censys/censys-sdk-python/blob/master/docs/sdks/globaldata/README.md#list_dns_ip_resolution_ranges) - Get DNS names that resolved to an IP (ranges) * [list_dns_name_resolution_bounds](https://github.com/censys/censys-sdk-python/blob/master/docs/sdks/globaldata/README.md#list_dns_name_resolution_bounds) - Get DNS resolution records for a name (aggregated bounds) diff --git a/README.md b/README.md index dd38564..a576f14 100644 --- a/README.md +++ b/README.md @@ -225,6 +225,7 @@ asyncio.run(main()) * [get_host_timeline](docs/sdks/globaldata/README.md#get_host_timeline) - Get host event history * [get_web_properties](docs/sdks/globaldata/README.md#get_web_properties) - Retrieve multiple web properties * [get_web_property](docs/sdks/globaldata/README.md#get_web_property) - Get a web property +* [get_web_property_timeline](docs/sdks/globaldata/README.md#get_web_property_timeline) - Get web property event history * [list_dns_ip_resolution_bounds](docs/sdks/globaldata/README.md#list_dns_ip_resolution_bounds) - Get DNS names that resolved to an IP (aggregated bounds) * [list_dns_ip_resolution_ranges](docs/sdks/globaldata/README.md#list_dns_ip_resolution_ranges) - Get DNS names that resolved to an IP (ranges) * [list_dns_name_resolution_bounds](docs/sdks/globaldata/README.md#list_dns_name_resolution_bounds) - Get DNS resolution records for a name (aggregated bounds) diff --git a/RELEASES.md b/RELEASES.md index cef6d6d..6913a01 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -366,4 +366,14 @@ Based on: ### Generated - [python v0.15.3] . ### Releases -- [PyPI v0.15.3] https://pypi.org/project/censys-platform/0.15.3 - . \ No newline at end of file +- [PyPI v0.15.3] https://pypi.org/project/censys-platform/0.15.3 - . + +## 2026-08-02 00:44:16 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.791.0 (2.924.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v0.15.4] . +### Releases +- [PyPI v0.15.4] https://pypi.org/project/censys-platform/0.15.4 - . \ No newline at end of file diff --git a/docs/models/responseenvelopewebpropertytimeline.md b/docs/models/responseenvelopewebpropertytimeline.md new file mode 100644 index 0000000..776f591 --- /dev/null +++ b/docs/models/responseenvelopewebpropertytimeline.md @@ -0,0 +1,8 @@ +# ResponseEnvelopeWebpropertyTimeline + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | +| `result` | [Optional[models.WebpropertyTimeline]](../models/webpropertytimeline.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/v3globaldataassetwebpropertytimelineglobals.md b/docs/models/v3globaldataassetwebpropertytimelineglobals.md new file mode 100644 index 0000000..884a348 --- /dev/null +++ b/docs/models/v3globaldataassetwebpropertytimelineglobals.md @@ -0,0 +1,8 @@ +# V3GlobaldataAssetWebpropertyTimelineGlobals + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `organization_id` | *Optional[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/v3globaldataassetwebpropertytimelinerequest.md b/docs/models/v3globaldataassetwebpropertytimelinerequest.md new file mode 100644 index 0000000..4fdfad9 --- /dev/null +++ b/docs/models/v3globaldataassetwebpropertytimelinerequest.md @@ -0,0 +1,11 @@ +# V3GlobaldataAssetWebpropertyTimelineRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `organization_id` | *Optional[str]* | :heavy_minus_sign: | The ID of a Censys organization to associate the request with. If omitted, the request will be processed using the authenticated user's free wallet where applicable. See the [Getting Started docs](https://docs.censys.com/reference/get-started#step-3-find-and-use-your-organization-id-optional) for more information. | | +| `webproperty_id` | *str* | :heavy_check_mark: | A web property identifier, such as platform.censys.io:80. URL-encode the colon when used in the path (e.g. platform.censys.io%3A80). | platform.censys.io:80 | +| `start_time` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | Start time of the web property timeline. Equivalent to the To field in the event history UI. This must be the timestamp closest to the current time. For example, if you want events from January 1, 2025 to the start of January 2, 2025, input the January 2 timestamp here. Must be a valid RFC3339 string. Ensure that you suffix the date with T00:00:00Z or a specific time. | 2025-01-02T00:00:00Z | +| `end_time` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | End time of the web property timeline. Equivalent to the From field in the event history UI. This must be the timestamp furthest from the current time. For example, if you want events from January 1, 2025 to the start of January 2, 2025, input the January 1 timestamp here. Must be a valid RFC3339 string. Ensure that you suffix the date with T00:00:00Z or a specific time. | 2025-01-01T00:00:00Z | \ No newline at end of file diff --git a/docs/models/v3globaldataassetwebpropertytimelineresponse.md b/docs/models/v3globaldataassetwebpropertytimelineresponse.md new file mode 100644 index 0000000..e6152fe --- /dev/null +++ b/docs/models/v3globaldataassetwebpropertytimelineresponse.md @@ -0,0 +1,9 @@ +# V3GlobaldataAssetWebpropertyTimelineResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `headers` | Dict[str, List[*str*]] | :heavy_check_mark: | N/A | +| `result` | [models.ResponseEnvelopeWebpropertyTimeline](../models/responseenvelopewebpropertytimeline.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/webpropertytimeline.md b/docs/models/webpropertytimeline.md new file mode 100644 index 0000000..e569d42 --- /dev/null +++ b/docs/models/webpropertytimeline.md @@ -0,0 +1,9 @@ +# WebpropertyTimeline + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | +| `events` | List[[models.WebTimelineEventAsset](../models/webtimelineeventasset.md)] | :heavy_check_mark: | N/A | +| `scanned_to` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/webtimelineevent.md b/docs/models/webtimelineevent.md new file mode 100644 index 0000000..5785c72 --- /dev/null +++ b/docs/models/webtimelineevent.md @@ -0,0 +1,10 @@ +# WebTimelineEvent + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | +| `endpoint_scanned` | [Optional[models.EndpointScanned]](../models/endpointscanned.md) | :heavy_minus_sign: | N/A | +| `event_time` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `jarm_scanned` | [Optional[models.JarmScanned]](../models/jarmscanned.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/webtimelineeventasset.md b/docs/models/webtimelineeventasset.md new file mode 100644 index 0000000..6c953d8 --- /dev/null +++ b/docs/models/webtimelineeventasset.md @@ -0,0 +1,9 @@ +# WebTimelineEventAsset + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | +| `extensions` | Dict[str, *Any*] | :heavy_check_mark: | N/A | +| `resource` | [models.WebTimelineEvent](../models/webtimelineevent.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdks/globaldata/README.md b/docs/sdks/globaldata/README.md index 3c074e4..4a61b05 100644 --- a/docs/sdks/globaldata/README.md +++ b/docs/sdks/globaldata/README.md @@ -17,6 +17,7 @@ Endpoints related to the Global Data product * [get_host_timeline](#get_host_timeline) - Get host event history * [get_web_properties](#get_web_properties) - Retrieve multiple web properties * [get_web_property](#get_web_property) - Get a web property +* [get_web_property_timeline](#get_web_property_timeline) - Get web property event history * [list_dns_ip_resolution_bounds](#list_dns_ip_resolution_bounds) - Get DNS names that resolved to an IP (aggregated bounds) * [list_dns_ip_resolution_ranges](#list_dns_ip_resolution_ranges) - Get DNS names that resolved to an IP (ranges) * [list_dns_name_resolution_bounds](#list_dns_name_resolution_bounds) - Get DNS resolution records for a name (aggregated bounds) @@ -547,6 +548,53 @@ with SDK( | models.ErrorModel | 500 | application/problem+json | | models.SDKError | 4XX, 5XX | \*/\* | +## get_web_property_timeline + +Retrieve event history for a web property. Web properties are identified using a combination of a hostname and port joined with a colon, such as `platform.censys.io:80`. URL-encode the colon when used in the path (e.g. `platform.censys.io%3A80`). + +### Example Usage + + +```python +from censys_platform import SDK +from censys_platform.utils import parse_datetime + + +with SDK( + organization_id="11111111-2222-3333-4444-555555555555", + personal_access_token="", +) as sdk: + + res = sdk.global_data.get_web_property_timeline(webproperty_id="platform.censys.io:80", start_time=parse_datetime("2025-01-02T00:00:00Z"), end_time=parse_datetime("2025-01-01T00:00:00Z")) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `webproperty_id` | *str* | :heavy_check_mark: | A web property identifier, such as platform.censys.io:80. URL-encode the colon when used in the path (e.g. platform.censys.io%3A80). | platform.censys.io:80 | +| `start_time` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | Start time of the web property timeline. Equivalent to the To field in the event history UI. This must be the timestamp closest to the current time. For example, if you want events from January 1, 2025 to the start of January 2, 2025, input the January 2 timestamp here. Must be a valid RFC3339 string. Ensure that you suffix the date with T00:00:00Z or a specific time. | 2025-01-02T00:00:00Z | +| `end_time` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | End time of the web property timeline. Equivalent to the From field in the event history UI. This must be the timestamp furthest from the current time. For example, if you want events from January 1, 2025 to the start of January 2, 2025, input the January 1 timestamp here. Must be a valid RFC3339 string. Ensure that you suffix the date with T00:00:00Z or a specific time. | 2025-01-01T00:00:00Z | +| `organization_id` | *Optional[str]* | :heavy_minus_sign: | The ID of a Censys organization to associate the request with. If omitted, the request will be processed using the authenticated user's free wallet where applicable. See the [Getting Started docs](https://docs.censys.com/reference/get-started#step-3-find-and-use-your-organization-id-optional) for more information. | | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | + +### Response + +**[models.V3GlobaldataAssetWebpropertyTimelineResponse](../../models/v3globaldataassetwebpropertytimelineresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| models.AuthenticationError | 401 | application/json | +| models.ErrorModel | 400, 403, 404, 422 | application/problem+json | +| models.ErrorModel | 500 | application/problem+json | +| models.SDKError | 4XX, 5XX | \*/\* | + ## list_dns_ip_resolution_bounds Retrieve the domain names that resolved to an IP during a time frame. You can narrow results with `record_types` (A or AAAA).

Results are aggregated per domain name and multiple distinct ranges for a name will be grouped into one row of results. For example, if `censys.com` resolved to `1.1.1.1` from January 1 to January 7 during two different ranges of January 1 to January 3 and January 5 to January 7, and you targeted January 1 through January 7 with your API call, then this endpoint will group those ranges into one entry for `censys.com` in the response.

To retrieve domain names for an IP with each record broken down by time range, use the [ranges endpoint](https://docs.censys.com/reference/v3-globaldata-dns-ip-resolution-ranges)

This endpoint is only available to organizations on the Censys Search and Censys Core plans.

[Learn more about Censys Active DNS](https://docs.censys.com/docs/platform-active-dns). diff --git a/pyproject.toml b/pyproject.toml index 87426ef..b4d7804 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "censys-platform" -version = "0.15.3" +version = "0.15.4" description = "Python Client SDK Generated by Speakeasy." authors = [{ name = "Speakeasy" },] readme = "README-PYPI.md" diff --git a/src/censys_platform/_version.py b/src/censys_platform/_version.py index 94757b6..3bc5c85 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.15.3" -__openapi_doc_version__: str = "1.0.123" +__version__: str = "0.15.4" +__openapi_doc_version__: str = "1.0.124" __gen_version__: str = "2.924.0" -__user_agent__: str = "speakeasy-sdk/python 0.15.3 2.924.0 1.0.123 censys-platform" +__user_agent__: str = "speakeasy-sdk/python 0.15.4 2.924.0 1.0.124 censys-platform" try: if __package__ is not None: diff --git a/src/censys_platform/global_data.py b/src/censys_platform/global_data.py index 02ad99b..436e838 100644 --- a/src/censys_platform/global_data.py +++ b/src/censys_platform/global_data.py @@ -2578,6 +2578,240 @@ async def get_web_property_async( raise models.SDKError("Unexpected response received", http_res) + def get_web_property_timeline( + self, + *, + webproperty_id: str, + start_time: datetime, + end_time: datetime, + organization_id: Optional[str] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.V3GlobaldataAssetWebpropertyTimelineResponse: + r"""Get web property event history + + Retrieve event history for a web property. Web properties are identified using a combination of a hostname and port joined with a colon, such as `platform.censys.io:80`. URL-encode the colon when used in the path (e.g. `platform.censys.io%3A80`). + + :param webproperty_id: A web property identifier, such as platform.censys.io:80. URL-encode the colon when used in the path (e.g. platform.censys.io%3A80). + :param start_time: Start time of the web property timeline. Equivalent to the To field in the event history UI. This must be the timestamp closest to the current time. For example, if you want events from January 1, 2025 to the start of January 2, 2025, input the January 2 timestamp here. Must be a valid RFC3339 string. Ensure that you suffix the date with T00:00:00Z or a specific time. + :param end_time: End time of the web property timeline. Equivalent to the From field in the event history UI. This must be the timestamp furthest from the current time. For example, if you want events from January 1, 2025 to the start of January 2, 2025, input the January 1 timestamp here. Must be a valid RFC3339 string. Ensure that you suffix the date with T00:00:00Z or a specific time. + :param organization_id: The ID of a Censys organization to associate the request with. If omitted, the request will be processed using the authenticated user's free wallet where applicable. See the [Getting Started docs](https://docs.censys.com/reference/get-started#step-3-find-and-use-your-organization-id-optional) for more information. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.V3GlobaldataAssetWebpropertyTimelineRequest( + organization_id=organization_id, + webproperty_id=webproperty_id, + start_time=start_time, + end_time=end_time, + ) + + req = self._build_request( + method="GET", + path="/v3/global/asset/webproperty/{webproperty_id}/timeline", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/vnd.censys.api.v3.web_timeline_event.v1+json", + http_headers=http_headers, + _globals=models.V3GlobaldataAssetWebpropertyTimelineGlobals( + organization_id=self.sdk_configuration.globals.organization_id, + ), + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="v3-globaldata-asset-webproperty-timeline", + oauth2_scopes=None, + security_source=self.sdk_configuration.security, + tags=["Global Data"], + extensions=None, + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response( + http_res, "200", "application/vnd.censys.api.v3.web_timeline_event.v1+json" + ): + return models.V3GlobaldataAssetWebpropertyTimelineResponse( + result=unmarshal_json_response( + models.ResponseEnvelopeWebpropertyTimeline, http_res + ), + headers=utils.get_response_headers(http_res.headers), + ) + if utils.match_response(http_res, "401", "application/json"): + response_data = unmarshal_json_response( + models.AuthenticationErrorData, http_res + ) + raise models.AuthenticationError(response_data, http_res) + if utils.match_response( + http_res, ["400", "403", "404", "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) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.SDKError("API error occurred", http_res, http_res_text) + + raise models.SDKError("Unexpected response received", http_res) + + async def get_web_property_timeline_async( + self, + *, + webproperty_id: str, + start_time: datetime, + end_time: datetime, + organization_id: Optional[str] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.V3GlobaldataAssetWebpropertyTimelineResponse: + r"""Get web property event history + + Retrieve event history for a web property. Web properties are identified using a combination of a hostname and port joined with a colon, such as `platform.censys.io:80`. URL-encode the colon when used in the path (e.g. `platform.censys.io%3A80`). + + :param webproperty_id: A web property identifier, such as platform.censys.io:80. URL-encode the colon when used in the path (e.g. platform.censys.io%3A80). + :param start_time: Start time of the web property timeline. Equivalent to the To field in the event history UI. This must be the timestamp closest to the current time. For example, if you want events from January 1, 2025 to the start of January 2, 2025, input the January 2 timestamp here. Must be a valid RFC3339 string. Ensure that you suffix the date with T00:00:00Z or a specific time. + :param end_time: End time of the web property timeline. Equivalent to the From field in the event history UI. This must be the timestamp furthest from the current time. For example, if you want events from January 1, 2025 to the start of January 2, 2025, input the January 1 timestamp here. Must be a valid RFC3339 string. Ensure that you suffix the date with T00:00:00Z or a specific time. + :param organization_id: The ID of a Censys organization to associate the request with. If omitted, the request will be processed using the authenticated user's free wallet where applicable. See the [Getting Started docs](https://docs.censys.com/reference/get-started#step-3-find-and-use-your-organization-id-optional) for more information. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.V3GlobaldataAssetWebpropertyTimelineRequest( + organization_id=organization_id, + webproperty_id=webproperty_id, + start_time=start_time, + end_time=end_time, + ) + + req = self._build_request_async( + method="GET", + path="/v3/global/asset/webproperty/{webproperty_id}/timeline", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/vnd.censys.api.v3.web_timeline_event.v1+json", + http_headers=http_headers, + _globals=models.V3GlobaldataAssetWebpropertyTimelineGlobals( + organization_id=self.sdk_configuration.globals.organization_id, + ), + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="v3-globaldata-asset-webproperty-timeline", + oauth2_scopes=None, + security_source=self.sdk_configuration.security, + tags=["Global Data"], + extensions=None, + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response( + http_res, "200", "application/vnd.censys.api.v3.web_timeline_event.v1+json" + ): + return models.V3GlobaldataAssetWebpropertyTimelineResponse( + result=unmarshal_json_response( + models.ResponseEnvelopeWebpropertyTimeline, http_res + ), + headers=utils.get_response_headers(http_res.headers), + ) + if utils.match_response(http_res, "401", "application/json"): + response_data = unmarshal_json_response( + models.AuthenticationErrorData, http_res + ) + raise models.AuthenticationError(response_data, http_res) + if utils.match_response( + http_res, ["400", "403", "404", "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) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.SDKError("API error occurred", http_res, http_res_text) + + raise models.SDKError("Unexpected response received", http_res) + def list_dns_ip_resolution_bounds( self, *, diff --git a/src/censys_platform/models/__init__.py b/src/censys_platform/models/__init__.py index 49c8835..59cfb38 100644 --- a/src/censys_platform/models/__init__.py +++ b/src/censys_platform/models/__init__.py @@ -1136,6 +1136,10 @@ ResponseEnvelopeWebpropertyAsset, ResponseEnvelopeWebpropertyAssetTypedDict, ) + from .responseenvelopewebpropertytimeline import ( + ResponseEnvelopeWebpropertyTimeline, + ResponseEnvelopeWebpropertyTimelineTypedDict, + ) from .responsevalidationerror import ResponseValidationError from .reversednsresolved import ReverseDNSResolved, ReverseDNSResolvedTypedDict from .rifatron import Rifatron, RifatronTypedDict @@ -1677,6 +1681,14 @@ V3GlobaldataAssetWebpropertyListPostResponse, V3GlobaldataAssetWebpropertyListPostResponseTypedDict, ) + from .v3_globaldata_asset_webproperty_timelineop import ( + V3GlobaldataAssetWebpropertyTimelineGlobals, + V3GlobaldataAssetWebpropertyTimelineGlobalsTypedDict, + V3GlobaldataAssetWebpropertyTimelineRequest, + V3GlobaldataAssetWebpropertyTimelineRequestTypedDict, + V3GlobaldataAssetWebpropertyTimelineResponse, + V3GlobaldataAssetWebpropertyTimelineResponseTypedDict, + ) from .v3_globaldata_asset_webpropertyop import ( V3GlobaldataAssetWebpropertyGlobals, V3GlobaldataAssetWebpropertyGlobalsTypedDict, @@ -1968,6 +1980,12 @@ from .weborigin import WebOrigin, WebOriginTypedDict from .webproperty import Webproperty, WebpropertyTypedDict from .webpropertyasset import WebpropertyAsset, WebpropertyAssetTypedDict + from .webpropertytimeline import WebpropertyTimeline, WebpropertyTimelineTypedDict + from .webtimelineevent import WebTimelineEvent, WebTimelineEventTypedDict + from .webtimelineeventasset import ( + WebTimelineEventAsset, + WebTimelineEventAssetTypedDict, + ) from .whois import Whois, WhoisTypedDict from .whoisupdated import WhoisUpdated, WhoisUpdatedTypedDict from .wincecerdisp import WinceCerdisp, WinceCerdispTypedDict @@ -3098,6 +3116,8 @@ "ResponseEnvelopeValueCountsResponseTypedDict", "ResponseEnvelopeWebpropertyAsset", "ResponseEnvelopeWebpropertyAssetTypedDict", + "ResponseEnvelopeWebpropertyTimeline", + "ResponseEnvelopeWebpropertyTimelineTypedDict", "ResponseValidationError", "ReverseDNSResolved", "ReverseDNSResolvedTypedDict", @@ -3620,6 +3640,12 @@ "V3GlobaldataAssetWebpropertyRequestTypedDict", "V3GlobaldataAssetWebpropertyResponse", "V3GlobaldataAssetWebpropertyResponseTypedDict", + "V3GlobaldataAssetWebpropertyTimelineGlobals", + "V3GlobaldataAssetWebpropertyTimelineGlobalsTypedDict", + "V3GlobaldataAssetWebpropertyTimelineRequest", + "V3GlobaldataAssetWebpropertyTimelineRequestTypedDict", + "V3GlobaldataAssetWebpropertyTimelineResponse", + "V3GlobaldataAssetWebpropertyTimelineResponseTypedDict", "V3GlobaldataDNSIPResolutionBoundGlobals", "V3GlobaldataDNSIPResolutionBoundGlobalsTypedDict", "V3GlobaldataDNSIPResolutionBoundRequest", @@ -3847,11 +3873,17 @@ "VulnerabilityResponseEffort", "WebOrigin", "WebOriginTypedDict", + "WebTimelineEvent", + "WebTimelineEventAsset", + "WebTimelineEventAssetTypedDict", + "WebTimelineEventTypedDict", "WeblogicT3", "WeblogicT3TypedDict", "Webproperty", "WebpropertyAsset", "WebpropertyAssetTypedDict", + "WebpropertyTimeline", + "WebpropertyTimelineTypedDict", "WebpropertyTypedDict", "Whois", "WhoisTypedDict", @@ -4988,6 +5020,8 @@ "ResponseEnvelopeValueCountsResponseTypedDict": ".responseenvelopevaluecountsresponse", "ResponseEnvelopeWebpropertyAsset": ".responseenvelopewebpropertyasset", "ResponseEnvelopeWebpropertyAssetTypedDict": ".responseenvelopewebpropertyasset", + "ResponseEnvelopeWebpropertyTimeline": ".responseenvelopewebpropertytimeline", + "ResponseEnvelopeWebpropertyTimelineTypedDict": ".responseenvelopewebpropertytimeline", "ResponseValidationError": ".responsevalidationerror", "ReverseDNSResolved": ".reversednsresolved", "ReverseDNSResolvedTypedDict": ".reversednsresolved", @@ -5507,6 +5541,12 @@ "V3GlobaldataAssetWebpropertyListPostRequestTypedDict": ".v3_globaldata_asset_webproperty_list_postop", "V3GlobaldataAssetWebpropertyListPostResponse": ".v3_globaldata_asset_webproperty_list_postop", "V3GlobaldataAssetWebpropertyListPostResponseTypedDict": ".v3_globaldata_asset_webproperty_list_postop", + "V3GlobaldataAssetWebpropertyTimelineGlobals": ".v3_globaldata_asset_webproperty_timelineop", + "V3GlobaldataAssetWebpropertyTimelineGlobalsTypedDict": ".v3_globaldata_asset_webproperty_timelineop", + "V3GlobaldataAssetWebpropertyTimelineRequest": ".v3_globaldata_asset_webproperty_timelineop", + "V3GlobaldataAssetWebpropertyTimelineRequestTypedDict": ".v3_globaldata_asset_webproperty_timelineop", + "V3GlobaldataAssetWebpropertyTimelineResponse": ".v3_globaldata_asset_webproperty_timelineop", + "V3GlobaldataAssetWebpropertyTimelineResponseTypedDict": ".v3_globaldata_asset_webproperty_timelineop", "V3GlobaldataAssetWebpropertyGlobals": ".v3_globaldata_asset_webpropertyop", "V3GlobaldataAssetWebpropertyGlobalsTypedDict": ".v3_globaldata_asset_webpropertyop", "V3GlobaldataAssetWebpropertyRequest": ".v3_globaldata_asset_webpropertyop", @@ -5749,6 +5789,12 @@ "WebpropertyTypedDict": ".webproperty", "WebpropertyAsset": ".webpropertyasset", "WebpropertyAssetTypedDict": ".webpropertyasset", + "WebpropertyTimeline": ".webpropertytimeline", + "WebpropertyTimelineTypedDict": ".webpropertytimeline", + "WebTimelineEvent": ".webtimelineevent", + "WebTimelineEventTypedDict": ".webtimelineevent", + "WebTimelineEventAsset": ".webtimelineeventasset", + "WebTimelineEventAssetTypedDict": ".webtimelineeventasset", "Whois": ".whois", "WhoisTypedDict": ".whois", "WhoisUpdated": ".whoisupdated", diff --git a/src/censys_platform/models/responseenvelopewebpropertytimeline.py b/src/censys_platform/models/responseenvelopewebpropertytimeline.py new file mode 100644 index 0000000..f130e27 --- /dev/null +++ b/src/censys_platform/models/responseenvelopewebpropertytimeline.py @@ -0,0 +1,32 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .webpropertytimeline import WebpropertyTimeline, WebpropertyTimelineTypedDict +from censys_platform.types import BaseModel, UNSET_SENTINEL +from pydantic import model_serializer +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class ResponseEnvelopeWebpropertyTimelineTypedDict(TypedDict): + result: NotRequired[WebpropertyTimelineTypedDict] + + +class ResponseEnvelopeWebpropertyTimeline(BaseModel): + result: Optional[WebpropertyTimeline] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["result"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/censys_platform/models/v3_globaldata_asset_webproperty_timelineop.py b/src/censys_platform/models/v3_globaldata_asset_webproperty_timelineop.py new file mode 100644 index 0000000..317f10a --- /dev/null +++ b/src/censys_platform/models/v3_globaldata_asset_webproperty_timelineop.py @@ -0,0 +1,101 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .responseenvelopewebpropertytimeline import ( + ResponseEnvelopeWebpropertyTimeline, + ResponseEnvelopeWebpropertyTimelineTypedDict, +) +from censys_platform.types import BaseModel, UNSET_SENTINEL +from censys_platform.utils import FieldMetadata, PathParamMetadata, QueryParamMetadata +from datetime import datetime +from pydantic import model_serializer +from typing import Dict, List, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class V3GlobaldataAssetWebpropertyTimelineGlobalsTypedDict(TypedDict): + organization_id: NotRequired[str] + + +class V3GlobaldataAssetWebpropertyTimelineGlobals(BaseModel): + organization_id: Annotated[ + Optional[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["organization_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + + +class V3GlobaldataAssetWebpropertyTimelineRequestTypedDict(TypedDict): + webproperty_id: str + r"""A web property identifier, such as platform.censys.io:80. URL-encode the colon when used in the path (e.g. platform.censys.io%3A80).""" + start_time: datetime + r"""Start time of the web property timeline. Equivalent to the To field in the event history UI. This must be the timestamp closest to the current time. For example, if you want events from January 1, 2025 to the start of January 2, 2025, input the January 2 timestamp here. Must be a valid RFC3339 string. Ensure that you suffix the date with T00:00:00Z or a specific time.""" + end_time: datetime + r"""End time of the web property timeline. Equivalent to the From field in the event history UI. This must be the timestamp furthest from the current time. For example, if you want events from January 1, 2025 to the start of January 2, 2025, input the January 1 timestamp here. Must be a valid RFC3339 string. Ensure that you suffix the date with T00:00:00Z or a specific time.""" + organization_id: NotRequired[str] + r"""The ID of a Censys organization to associate the request with. If omitted, the request will be processed using the authenticated user's free wallet where applicable. See the [Getting Started docs](https://docs.censys.com/reference/get-started#step-3-find-and-use-your-organization-id-optional) for more information.""" + + +class V3GlobaldataAssetWebpropertyTimelineRequest(BaseModel): + webproperty_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + r"""A web property identifier, such as platform.censys.io:80. URL-encode the colon when used in the path (e.g. platform.censys.io%3A80).""" + + start_time: Annotated[ + datetime, FieldMetadata(query=QueryParamMetadata(style="form", explode=False)) + ] + r"""Start time of the web property timeline. Equivalent to the To field in the event history UI. This must be the timestamp closest to the current time. For example, if you want events from January 1, 2025 to the start of January 2, 2025, input the January 2 timestamp here. Must be a valid RFC3339 string. Ensure that you suffix the date with T00:00:00Z or a specific time.""" + + end_time: Annotated[ + datetime, FieldMetadata(query=QueryParamMetadata(style="form", explode=False)) + ] + r"""End time of the web property timeline. Equivalent to the From field in the event history UI. This must be the timestamp furthest from the current time. For example, if you want events from January 1, 2025 to the start of January 2, 2025, input the January 1 timestamp here. Must be a valid RFC3339 string. Ensure that you suffix the date with T00:00:00Z or a specific time.""" + + organization_id: Annotated[ + Optional[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=False)), + ] = None + r"""The ID of a Censys organization to associate the request with. If omitted, the request will be processed using the authenticated user's free wallet where applicable. See the [Getting Started docs](https://docs.censys.com/reference/get-started#step-3-find-and-use-your-organization-id-optional) for more information.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["organization_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + + +class V3GlobaldataAssetWebpropertyTimelineResponseTypedDict(TypedDict): + headers: Dict[str, List[str]] + result: ResponseEnvelopeWebpropertyTimelineTypedDict + + +class V3GlobaldataAssetWebpropertyTimelineResponse(BaseModel): + headers: Dict[str, List[str]] + + result: ResponseEnvelopeWebpropertyTimeline diff --git a/src/censys_platform/models/webpropertytimeline.py b/src/censys_platform/models/webpropertytimeline.py new file mode 100644 index 0000000..cd61310 --- /dev/null +++ b/src/censys_platform/models/webpropertytimeline.py @@ -0,0 +1,34 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .webtimelineeventasset import WebTimelineEventAsset, WebTimelineEventAssetTypedDict +from censys_platform.types import BaseModel, Nullable, UNSET_SENTINEL +from datetime import datetime +from pydantic import model_serializer +from typing import List +from typing_extensions import TypedDict + + +class WebpropertyTimelineTypedDict(TypedDict): + events: Nullable[List[WebTimelineEventAssetTypedDict]] + scanned_to: datetime + + +class WebpropertyTimeline(BaseModel): + events: Nullable[List[WebTimelineEventAsset]] + + scanned_to: datetime + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + m[k] = val + + return m diff --git a/src/censys_platform/models/webtimelineevent.py b/src/censys_platform/models/webtimelineevent.py new file mode 100644 index 0000000..4765ba8 --- /dev/null +++ b/src/censys_platform/models/webtimelineevent.py @@ -0,0 +1,39 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .endpointscanned import EndpointScanned, EndpointScannedTypedDict +from .jarmscanned import JarmScanned, JarmScannedTypedDict +from censys_platform.types import BaseModel, UNSET_SENTINEL +from pydantic import model_serializer +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class WebTimelineEventTypedDict(TypedDict): + endpoint_scanned: NotRequired[EndpointScannedTypedDict] + event_time: NotRequired[str] + jarm_scanned: NotRequired[JarmScannedTypedDict] + + +class WebTimelineEvent(BaseModel): + endpoint_scanned: Optional[EndpointScanned] = None + + event_time: Optional[str] = None + + jarm_scanned: Optional[JarmScanned] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["endpoint_scanned", "event_time", "jarm_scanned"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/censys_platform/models/webtimelineeventasset.py b/src/censys_platform/models/webtimelineeventasset.py new file mode 100644 index 0000000..d05c40f --- /dev/null +++ b/src/censys_platform/models/webtimelineeventasset.py @@ -0,0 +1,18 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .webtimelineevent import WebTimelineEvent, WebTimelineEventTypedDict +from censys_platform.types import BaseModel +from typing import Any, Dict +from typing_extensions import TypedDict + + +class WebTimelineEventAssetTypedDict(TypedDict): + extensions: Dict[str, Any] + resource: WebTimelineEventTypedDict + + +class WebTimelineEventAsset(BaseModel): + extensions: Dict[str, Any] + + resource: WebTimelineEvent